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() for
231 * GApplication::open:
232 * @application: the application
233 * @files: (array length=n_files) (element-type GFile): an array of #GFiles
234 * @n_files: the length of @files
235 * @hint: a hint provided by the calling instance
237 * The ::open signal is emitted on the primary instance when there are
238 * files to open. See g_application_open() for more information.
243 * GApplication::startup:
244 * @application: the application
246 * The ::startup signal is emitted on the primary instance immediately
247 * after registration. See g_activation_register().
253 * @startup: invoked on the primary instance immediately after registration
254 * @activate: invoked on the primary instance when an activation occurs
255 * @open: invoked on the primary instance when there are files to open
256 * @command_line: invoked on the primary instance when a command-line is not handled locally
257 * @local_command_line: invoked (locally) when the process has been invoked via commandline execution. The virtual function has the chance to inspect (and possibly replace) the list of command line arguments. See g_application_run() for more information.
258 * @before_emit: invoked on the primary instance before 'activate', 'open' or any action invocation
259 * @after_emit: invoked on the primary instance after 'activate', 'open' or any action invocation
260 * @add_platform_data: invoked (locally) to add 'platform data' to be sent to the primary instance when activating, opening or invoking actions
261 * @quit_mainloop: invoked on the primary instance when the use count of the application drops to zero (and after any inactivity timeout, if requested)
262 * @run_mainloop: invoked on the primary instance from g_application_run() if the use-count is non-zero
271 * GApplicationCommandLine:
273 * The <structname>GApplicationCommandLine</structname> structure contains private
274 * data and should only be accessed using the provided API
281 * GApplicationCommandLineClass:
283 * The <structname>GApplicationCommandLineClass</structname> structure contains
292 * @G_APPLICATION_FLAGS_NONE: Default
293 * @G_APPLICATION_IS_SERVICE: Run as a service. In this mode, registration fails if the service is already running, and the application will stay around for a while when the use count falls to zero.
294 * @G_APPLICATION_IS_LAUNCHER: Don't try to become the primary instance.
295 * @G_APPLICATION_HANDLES_OPEN: This application handles opening files (in the primary instance)
296 * @G_APPLICATION_HANDLES_COMMAND_LINE: This application handles command line arguments (in the primary instance)
297 * @G_APPLICATION_SEND_ENVIRONMENT: Send the environment of the launching process to the primary instance
299 * Flags used to define the behaviour of a #GApplication.
307 * @G_ASK_PASSWORD_NEED_PASSWORD: operation requires a password.
308 * @G_ASK_PASSWORD_NEED_USERNAME: operation requires a username.
309 * @G_ASK_PASSWORD_NEED_DOMAIN: operation requires a domain.
310 * @G_ASK_PASSWORD_SAVING_SUPPORTED: operation supports saving settings.
311 * @G_ASK_PASSWORD_ANONYMOUS_SUPPORTED: operation supports anonymous users.
313 * #GAskPasswordFlags are used to request specific information from the
314 * user, or to notify the user of their choices in an authentication
322 * Interface for asynchronously initializable objects.
329 * GAsyncInitableIface:
330 * @g_iface: The parent interface.
331 * @init_async: Starts initialization of the object.
332 * @init_finish: Finishes initialization of the object.
334 * Provides an interface for asynchronous initializing object such that
335 * initialization may fail.
342 * GAsyncReadyCallback:
343 * @source_object: the object the asynchronous operation was started with.
344 * @res: a #GAsyncResult.
345 * @user_data: user data passed to the callback.
347 * Type definition for a function that will be called back when an asynchronous
348 * operation within GIO has been completed.
355 * Holds results information for an asynchronous operation,
356 * usually passed directly to a asynchronous _finish() operation.
362 * @g_iface: The parent interface.
363 * @get_user_data: Gets the user data passed to the callback.
364 * @get_source_object: Gets the source object that issued the asynchronous operation.
366 * Interface definition for #GAsyncResult.
372 * @g_class: The #GTypeClass structure to finalize.
374 * A callback function used by the type system to finalize those portions
375 * of a derived types class structure that were setup from the corresponding
376 * GBaseInitFunc() function. Class finalization basically works the inverse
377 * way in which class intialization is performed.
378 * See GClassInitFunc() for a discussion of the class intialization process.
384 * @g_class: The #GTypeClass structure to initialize.
386 * A callback function used by the type system to do base initialization
387 * of the class structures of derived types. It is called as part of the
388 * initialization process of all derived classes and should reallocate
389 * or reset all dynamic class members copied over from the parent class.
390 * For example, class members (such as strings) that are not sufficiently
391 * handled by a plain memory copy of the parent class into the derived class
392 * have to be altered. See GClassInitFunc() for a discussion of the class
393 * intialization process.
400 * <structname>GBinding</structname> is an opaque structure whose members
401 * cannot be accessed directly.
409 * @G_BINDING_DEFAULT: The default binding; if the source property changes, the target property is updated with its value.
410 * @G_BINDING_BIDIRECTIONAL: Bidirectional binding; if either the property of the source or the property of the target changes, the other is updated.
411 * @G_BINDING_SYNC_CREATE: Synchronize the values of the source and target properties when creating the binding; the direction of the synchronization is always from the source to the target.
412 * @G_BINDING_INVERT_BOOLEAN: If the two properties being bound are booleans, setting one to %TRUE will result in the other being set to %FALSE and vice versa. This flag will only work for boolean properties, and cannot be used when passing custom transformation functions to g_object_bind_property_full().
414 * Flags to be passed to g_object_bind_property() or
415 * g_object_bind_property_full().
416 * This enumeration can be extended at later date.
423 * GBindingTransformFunc:
424 * @binding: a #GBinding
425 * @source_value: the value of the source property
426 * @target_value: the value of the target property
427 * @user_data: data passed to the transform function
429 * A function to be called to transform the source property of @source
430 * from @source_value into the target property of @target
431 * using @target_value.
434 * Returns: %TRUE if the transformation was successful, and %FALSE
442 * The <structname>GBookmarkFile</structname> struct contains only
443 * private data and should not be directly accessed.
448 * GBookmarkFileError:
449 * @G_BOOKMARK_FILE_ERROR_INVALID_URI: URI was ill-formed
450 * @G_BOOKMARK_FILE_ERROR_INVALID_VALUE: a requested field was not found
451 * @G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED: a requested application did not register a bookmark
452 * @G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND: a requested URI was not found
453 * @G_BOOKMARK_FILE_ERROR_READ: document was ill formed
454 * @G_BOOKMARK_FILE_ERROR_UNKNOWN_ENCODING: the text being parsed was in an unknown encoding
455 * @G_BOOKMARK_FILE_ERROR_WRITE: an error occurred while writing
456 * @G_BOOKMARK_FILE_ERROR_FILE_NOT_FOUND: requested file was not found
458 * Error codes returned by bookmark file parsing.
464 * @boxed: The boxed structure to be copied.
466 * This function is provided by the user and should produce a copy of the passed
467 * in boxed structure.
469 * Returns: The newly created copy of the boxed structure.
475 * @boxed: The boxed structure to be freed.
477 * This function is provided by the user and should free the boxed
483 * GBufferedInputStream:
485 * Implements #GFilterInputStream with a sized input buffer.
490 * GBufferedOutputStream:
492 * An implementation of #GFilterOutputStream with a sized buffer.
497 * GBusAcquiredCallback:
498 * @connection: The #GDBusConnection to a message bus.
499 * @name: The name that is requested to be owned.
500 * @user_data: User data passed to g_bus_own_name().
502 * Invoked when a connection to a message bus has been obtained.
509 * GBusNameAcquiredCallback:
510 * @connection: The #GDBusConnection on which to acquired the name.
511 * @name: The name being owned.
512 * @user_data: User data passed to g_bus_own_name() or g_bus_own_name_on_connection().
514 * Invoked when the name is acquired.
521 * GBusNameAppearedCallback:
522 * @connection: The #GDBusConnection the name is being watched on.
523 * @name: The name being watched.
524 * @name_owner: Unique name of the owner of the name being watched.
525 * @user_data: User data passed to g_bus_watch_name().
527 * Invoked when the name being watched is known to have to have a owner.
534 * GBusNameLostCallback:
535 * @connection: The #GDBusConnection on which to acquire the name or %NULL if the connection was disconnected.
536 * @name: The name being owned.
537 * @user_data: User data passed to g_bus_own_name() or g_bus_own_name_on_connection().
539 * Invoked when the name is lost or @connection has been closed.
546 * GBusNameOwnerFlags:
547 * @G_BUS_NAME_OWNER_FLAGS_NONE: No flags set.
548 * @G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT: Allow another message bus connection to claim the the name.
549 * @G_BUS_NAME_OWNER_FLAGS_REPLACE: If another message bus connection owns the name and have specified #G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT, then take the name from the other connection.
551 * Flags used in g_bus_own_name().
558 * GBusNameVanishedCallback:
559 * @connection: The #GDBusConnection the name is being watched on.
560 * @name: The name being watched.
561 * @user_data: User data passed to g_bus_watch_name().
563 * Invoked when the name being watched is known not to have to have a owner.
570 * GBusNameWatcherFlags:
571 * @G_BUS_NAME_WATCHER_FLAGS_NONE: No flags set.
572 * @G_BUS_NAME_WATCHER_FLAGS_AUTO_START: If no-one owns the name when beginning to watch the name, ask the bus to launch an owner for the name.
574 * Flags used in g_bus_watch_name().
582 * @G_BUS_TYPE_STARTER: An alias for the message bus that activated the process, if any.
583 * @G_BUS_TYPE_NONE: Not a message bus.
584 * @G_BUS_TYPE_SYSTEM: The system-wide message bus.
585 * @G_BUS_TYPE_SESSION: The login session message bus.
587 * An enumeration for well-known message buses.
595 * @closure: the #GClosure
596 * @callback: the callback function
598 * A #GCClosure is a specialization of #GClosure for C function callbacks.
605 * The type used for callback functions in structure definitions and function
606 * signatures. This doesn't mean that all callback functions must take no
607 * parameters and return void. The required signature of a callback function
608 * is determined by the context in which is used (e.g. the signal to which it
609 * is connected). Use G_CALLBACK() to cast the callback function to a #GCallback.
616 * Allows actions to be cancelled.
621 * GCancellable::cancelled:
622 * @cancellable: a #GCancellable.
624 * Emitted when the operation has been cancelled.
625 * Can be used by implementations of cancellable operations. If the
626 * operation is cancelled from another thread, the signal will be
627 * emitted in the thread that cancelled the operation, not the
628 * thread that is running the operation.
629 * Note that disconnecting from this signal (or any signal) in a
630 * multi-threaded program is prone to race conditions. For instance
631 * it is possible that a signal handler may be invoked even
632 * <emphasis>after</emphasis> a call to
633 * g_signal_handler_disconnect() for that handler has already
635 * There is also a problem when cancellation happen
636 * right before connecting to the signal. If this happens the
637 * signal will unexpectedly not be emitted, and checking before
638 * connecting to the signal leaves a race condition where this is
640 * In order to make it safe and easy to connect handlers there
641 * g_cancellable_disconnect() which protect against problems
643 * An example of how to us this:
645 * /<!-- -->* Make sure we don't do any unnecessary work if already cancelled *<!-- -->/
646 * if (g_cancellable_set_error_if_cancelled (cancellable))
648 * /<!-- -->* Set up all the data needed to be able to
649 * * handle cancellation of the operation *<!-- -->/
650 * my_data = my_data_new (...);
653 * id = g_cancellable_connect (cancellable,
654 * G_CALLBACK (cancelled_handler)
656 * /<!-- -->* cancellable operation here... *<!-- -->/
657 * g_cancellable_disconnect (cancellable, id);
658 * /<!-- -->* cancelled_handler is never called after this, it
659 * * is now safe to free the data *<!-- -->/
660 * my_data_free (my_data);
662 * Note that the cancelled signal is emitted in the thread that
663 * the user cancelled from, which may be the main thread. So, the
664 * cancellable signal should not do something that can block.
666 * Are two helper functions: g_cancellable_connect() and
671 * GCancellableSourceFunc:
672 * @cancellable: the #GCancellable
673 * @user_data: data passed in by the user.
675 * This is the function type of the callback used for the #GSource
676 * returned by g_cancellable_source_new().
678 * Returns: it should return %FALSE if the source should be removed.
686 * Conversions between character sets.
693 * An opaque structure representing a checksumming operation.
694 * To create a new GChecksum, use g_checksum_new(). To free
695 * a GChecksum, use g_checksum_free().
703 * @G_CHECKSUM_MD5: Use the MD5 hashing algorithm
704 * @G_CHECKSUM_SHA1: Use the SHA-1 hashing algorithm
705 * @G_CHECKSUM_SHA256: Use the SHA-256 hashing algorithm
707 * The hashing algorithm to be used by #GChecksum when performing the
708 * digest of some data.
709 * Note that the #GChecksumType enumeration may be extended at a later
710 * date to include new hashing algorithm types.
718 * @pid: the process id of the child process
719 * @status: Status information about the child process, see waitpid(2) for more information about this field
720 * @data: user data passed to g_child_watch_add()
722 * The type of functions to be called when a child exists.
727 * GClassFinalizeFunc:
728 * @g_class: The #GTypeClass structure to finalize.
729 * @class_data: The @class_data member supplied via the #GTypeInfo structure.
731 * A callback function used by the type system to finalize a class.
732 * This function is rarely needed, as dynamically allocated class resources
733 * should be handled by GBaseInitFunc() and GBaseFinalizeFunc().
734 * Also, specification of a GClassFinalizeFunc() in the #GTypeInfo
735 * structure of a static type is invalid, because classes of static types
736 * will never be finalized (they are artificially kept alive when their
737 * reference count drops to zero).
743 * @g_class: The #GTypeClass structure to initialize.
744 * @class_data: The @class_data member supplied via the #GTypeInfo structure.
746 * A callback function used by the type system to initialize the class
747 * of a specific type. This function should initialize all static class
749 * The initialization process of a class involves:
752 * 1 - Copying common members from the parent class over to the
753 * derived class structure.
756 * 2 - Zero initialization of the remaining members not copied
757 * over from the parent class.
760 * 3 - Invocation of the GBaseInitFunc() initializers of all parent
761 * types and the class' type.
764 * 4 - Invocation of the class' GClassInitFunc() initializer.
767 * Since derived classes are partially initialized through a memory copy
768 * of the parent class, the general rule is that GBaseInitFunc() and
769 * GBaseFinalizeFunc() should take care of necessary reinitialization
770 * and release of those class members that were introduced by the type
771 * that specified these GBaseInitFunc()/GBaseFinalizeFunc().
772 * GClassInitFunc() should only care about initializing static
773 * class members, while dynamic class members (such as allocated strings
774 * or reference counted resources) are better handled by a GBaseInitFunc()
775 * for this type, so proper initialization of the dynamic class members
776 * is performed for class initialization of derived types as well.
777 * An example may help to correspond the intend of the different class
781 * GObjectClass parent_class;
782 * gint static_integer;
783 * gchar *dynamic_string;
786 * type_a_base_class_init (TypeAClass *class)
788 * class->dynamic_string = g_strdup ("some string");
791 * type_a_base_class_finalize (TypeAClass *class)
793 * g_free (class->dynamic_string);
796 * type_a_class_init (TypeAClass *class)
798 * class->static_integer = 42;
801 * TypeAClass parent_class;
802 * gfloat static_float;
803 * GString *dynamic_gstring;
806 * type_b_base_class_init (TypeBClass *class)
808 * class->dynamic_gstring = g_string_new ("some other string");
811 * type_b_base_class_finalize (TypeBClass *class)
813 * g_string_free (class->dynamic_gstring);
816 * type_b_class_init (TypeBClass *class)
818 * class->static_float = 3.14159265358979323846;
821 * Initialization of TypeBClass will first cause initialization of
822 * TypeAClass (derived classes reference their parent classes, see
823 * g_type_class_ref() on this).
824 * Initialization of TypeAClass roughly involves zero-initializing its fields,
825 * then calling its GBaseInitFunc() type_a_base_class_init() to allocate
826 * its dynamic members (dynamic_string), and finally calling its GClassInitFunc()
827 * type_a_class_init() to initialize its static members (static_integer).
828 * The first step in the initialization process of TypeBClass is then
829 * a plain memory copy of the contents of TypeAClass into TypeBClass and
830 * zero-initialization of the remaining fields in TypeBClass.
831 * The dynamic members of TypeAClass within TypeBClass now need
832 * reinitialization which is performed by calling type_a_base_class_init()
833 * with an argument of TypeBClass.
834 * After that, the GBaseInitFunc() of TypeBClass, type_b_base_class_init()
835 * is called to allocate the dynamic members of TypeBClass (dynamic_gstring),
836 * and finally the GClassInitFunc() of TypeBClass, type_b_class_init(),
837 * is called to complete the initialization process with the static members
839 * Corresponding finalization counter parts to the GBaseInitFunc() functions
840 * have to be provided to release allocated resources at class finalization
847 * @in_marshal: Indicates whether the closure is currently being invoked with g_closure_invoke()
848 * @is_invalid: Indicates whether the closure has been invalidated by g_closure_invalidate()
850 * A #GClosure represents a callback supplied by the programmer.
856 * @closure: the #GClosure to which the marshaller belongs
857 * @return_value: a #GValue to store the return value. May be %NULL if the callback of @closure doesn't return a value.
858 * @n_param_values: the length of the @param_values array
859 * @param_values: an array of #GValue<!-- -->s holding the arguments on which to invoke the callback of @closure
860 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
861 * @marshal_data: additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()
863 * The type used for marshaller functions.
869 * @data: data specified when registering the notification callback
870 * @closure: the #GClosure on which the notification is emitted
872 * The type used for the various notification callbacks which can be registered
879 * @G_CONNECT_AFTER: whether the handler should be called before or after the default handler of the signal.
880 * @G_CONNECT_SWAPPED: whether the instance and data should be swapped when calling the handler.
882 * The connection flags are used to specify the behaviour of a signal's
889 * @G_CONVERT_ERROR_NO_CONVERSION: Conversion between the requested character sets is not supported.
890 * @G_CONVERT_ERROR_ILLEGAL_SEQUENCE: Invalid byte sequence in conversion input.
891 * @G_CONVERT_ERROR_FAILED: Conversion failed for some reason.
892 * @G_CONVERT_ERROR_PARTIAL_INPUT: Partial character sequence at end of input.
893 * @G_CONVERT_ERROR_BAD_URI: URI is invalid.
894 * @G_CONVERT_ERROR_NOT_ABSOLUTE_PATH: Pathname is not an absolute path.
896 * Error codes returned by character set conversion routines.
903 * Seek object for streaming operations.
911 * @G_CONVERTER_NO_FLAGS: No flags.
912 * @G_CONVERTER_INPUT_AT_END: At end of input data
913 * @G_CONVERTER_FLUSH: Flush data
915 * Flags used when calling a g_converter_convert().
923 * @g_iface: The parent interface.
924 * @convert: Converts data.
925 * @reset: Reverts the internal state of the converter to its initial state.
927 * Provides an interface for converting data from one type
928 * to another type. The conversion can be stateful
929 * and may fail at any place.
936 * GConverterInputStream:
938 * An implementation of #GFilterInputStream that allows data
944 * GConverterOutputStream:
946 * An implementation of #GFilterOutputStream that allows data
953 * @G_CONVERTER_ERROR: There was an error during conversion.
954 * @G_CONVERTER_CONVERTED: Some data was consumed or produced
955 * @G_CONVERTER_FINISHED: The conversion is finished
956 * @G_CONVERTER_FLUSHED: Flushing is finished
958 * Results returned from g_converter_convert().
966 * @src: A pointer to the data which should be copied
967 * @data: Additional data
969 * A function of this signature is used to copy the node data
970 * when doing a deep-copy of a tree.
972 * Returns: A pointer to the copy
980 * The #GCredentials structure contains only private data and
981 * should only be accessed using the provided API.
990 * Class structure for #GCredentials.
998 * @G_CREDENTIALS_TYPE_INVALID: Indicates an invalid native credential type.
999 * @G_CREDENTIALS_TYPE_LINUX_UCRED: The native credentials type is a <type>struct ucred</type>.
1000 * @G_CREDENTIALS_TYPE_FREEBSD_CMSGCRED: The native credentials type is a <type>struct cmsgcred</type>.
1002 * Enumeration describing different kinds of native credential types.
1009 * GDBusAnnotationInfo:
1010 * @ref_count: The reference count or -1 if statically allocated.
1011 * @key: The name of the annotation, e.g. "org.freedesktop.DBus.Deprecated".
1012 * @value: The value of the annotation.
1013 * @annotations: A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
1015 * Information about an annotation.
1023 * @ref_count: The reference count or -1 if statically allocated.
1024 * @name: Name of the argument, e.g. @unix_user_id.
1025 * @signature: D-Bus signature of the argument (a single complete type).
1026 * @annotations: A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
1028 * Information about an argument for a method or a signal.
1035 * GDBusAuthMechanism:credentials:
1037 * If authenticating as a server, this property contains the
1038 * received credentials, if any.
1039 * If authenticating as a client, the property contains the
1040 * credentials that were sent, if any.
1045 * GDBusAuthObserver:
1047 * The #GDBusAuthObserver structure contains only private data and
1048 * should only be accessed using the provided API.
1055 * GDBusAuthObserver::authorize-authenticated-peer:
1056 * @observer: The #GDBusAuthObserver emitting the signal.
1057 * @stream: A #GIOStream for the #GDBusConnection.
1058 * @credentials: Credentials received from the peer or %NULL.
1060 * Emitted to check if a peer that is successfully authenticated
1063 * Returns: %TRUE if the peer is authorized, %FALSE if not.
1069 * GDBusAuthObserverClass:
1070 * @authorize_authenticated_peer: Signal class handler for the #GDBusAuthObserver::authorize-authenticated-peer signal.
1072 * Class structure for #GDBusAuthObserverClass.
1080 * @G_DBUS_CALL_FLAGS_NONE: No flags set.
1081 * @G_DBUS_CALL_FLAGS_NO_AUTO_START: The bus must not launch an owner for the destination name in response to this method invocation.
1083 * Flags used in g_dbus_connection_call() and similar APIs.
1090 * GDBusCapabilityFlags:
1091 * @G_DBUS_CAPABILITY_FLAGS_NONE: No flags set.
1092 * @G_DBUS_CAPABILITY_FLAGS_UNIX_FD_PASSING: The connection supports exchanging UNIX file descriptors with the remote peer.
1094 * Capabilities negotiated with the remote peer.
1103 * The #GDBusConnection structure contains only private data and
1104 * should only be accessed using the provided API.
1111 * GDBusConnection::closed:
1112 * @connection: The #GDBusConnection emitting the signal.
1113 * @remote_peer_vanished: %TRUE if @connection is closed because the remote peer closed its end of the connection.
1114 * @error: A #GError with more details about the event or %NULL.
1116 * Emitted when the connection is closed.
1117 * The cause of this event can be
1120 * If g_dbus_connection_close() is called. In this case
1121 * </para></listitem>
1123 * If the remote peer closes the connection. In this case
1124 * </para></listitem>
1126 * If the remote peer sends invalid or malformed data. In this
1127 * case @remote_peer_vanished is set to %FALSE and @error
1129 * </para></listitem>
1131 * Upon receiving this signal, you should give up your reference to
1139 * GDBusConnection:address:
1141 * A D-Bus address specifying potential endpoints that can be used
1142 * when establishing the connection.
1149 * GDBusConnection:authentication-observer:
1151 * A #GDBusAuthObserver object to assist in the authentication process or %NULL.
1158 * GDBusConnection:capabilities:
1160 * Flags from the #GDBusCapabilityFlags enumeration
1161 * representing connection features negotiated with the other peer.
1168 * GDBusConnection:closed:
1170 * A boolean specifying whether the connection has been closed.
1177 * GDBusConnection:exit-on-close:
1179 * A boolean specifying whether the process will be terminated (by
1180 * calling <literal>raise(SIGTERM)</literal>) if the connection
1181 * is closed by the remote peer.
1188 * GDBusConnection:flags:
1190 * Flags from the #GDBusConnectionFlags enumeration.
1197 * GDBusConnection:guid:
1199 * The GUID of the peer performing the role of server when
1201 * If you are constructing a #GDBusConnection and pass
1202 * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER in the
1203 * #GDBusConnection:flags property then you MUST also set this
1204 * property to a valid guid.
1205 * If you are constructing a #GDBusConnection and pass
1206 * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT in the
1207 * #GDBusConnection:flags property you will be able to read the GUID
1208 * of the other peer here after the connection has been successfully
1216 * GDBusConnection:locked:
1218 * A boolean specifying whether the message is locked.
1225 * GDBusConnection:stream:
1227 * The underlying #GIOStream used for I/O.
1234 * GDBusConnection:unique-name:
1236 * The unique name as assigned by the message bus or %NULL if the
1237 * connection is not open or not a message bus connection.
1244 * GDBusConnectionClass:
1245 * @closed: Signal class handler for the #GDBusConnection::closed signal.
1247 * Class structure for #GDBusConnection.
1254 * GDBusConnectionFlags:
1255 * @G_DBUS_CONNECTION_FLAGS_NONE: No flags set.
1256 * @G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT: Perform authentication against server.
1257 * @G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER: Perform authentication against client.
1258 * @G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS: When authenticating as a server, allow the anonymous authentication method.
1259 * @G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION: Pass this flag if connecting to a peer that is a message bus. This means that the Hello() method will be invoked as part of the connection setup.
1260 * @G_DBUS_CONNECTION_FLAGS_DELAY_MESSAGE_PROCESSING: If set, processing of D-Bus messages is delayed until g_dbus_connection_start_message_processing() is called.
1262 * Flags used when creating a new #GDBusConnection.
1271 * A generic error; "something went wrong" - see the error message for
1273 * There was not enough memory to complete an operation.
1274 * The bus doesn't know how to launch a service to supply the bus name
1276 * The bus name you referenced doesn't exist (i.e. no application owns
1278 * No reply to a message expecting one, usually means a timeout occurred.
1279 * Something went wrong reading or writing to a socket, for example.
1280 * A D-Bus bus address was malformed.
1281 * Requested operation isn't supported (like ENOSYS on UNIX).
1282 * Some limited resource is exhausted.
1283 * Security restrictions don't allow doing what you're trying to do.
1284 * Authentication didn't work.
1285 * Unable to connect to server (probably caused by ECONNREFUSED on a
1287 * Certain timeout errors, possibly ETIMEDOUT on a socket. Note that
1288 * %G_DBUS_ERROR_NO_REPLY is used for message reply timeouts. Warning:
1289 * this is confusingly-named given that %G_DBUS_ERROR_TIMED_OUT also
1290 * exists. We can't fix it for compatibility reasons so just be
1292 * No network access (probably ENETUNREACH on a socket).
1293 * Can't bind a socket since its address is in use (i.e. EADDRINUSE).
1294 * The connection is disconnected and you're trying to use it.
1295 * Invalid arguments passed to a method call.
1297 * Existing file and the operation you're using does not silently overwrite.
1298 * Method name you invoked isn't known by the object you invoked it on.
1299 * confusingly-named given that %G_DBUS_ERROR_TIMEOUT also exists. We
1300 * can't fix it for compatibility reasons so just be careful.
1301 * Tried to remove or modify a match rule that didn't exist.
1302 * The match rule isn't syntactically valid.
1303 * While starting a new process, the exec() call failed.
1304 * While starting a new process, the fork() call failed.
1305 * While starting a new process, the child exited with a status code.
1306 * While starting a new process, the child exited on a signal.
1307 * While starting a new process, something went wrong.
1308 * We failed to setup the environment correctly.
1309 * We failed to setup the config parser correctly.
1310 * Bus name was not valid.
1311 * Service file not found in system-services directory.
1312 * Permissions are incorrect on the setuid helper.
1313 * Service file invalid (Name, User or Exec missing).
1314 * Tried to get a UNIX process ID and it wasn't available.
1315 * Tried to get a UNIX process ID and it wasn't available.
1316 * A type signature is not valid.
1317 * A file contains invalid syntax or is otherwise broken.
1318 * Asked for SELinux security context and it wasn't available.
1319 * Asked for ADT audit data and it wasn't available.
1320 * There's already an object with the requested object path.
1321 * Error codes for the %G_DBUS_ERROR error domain.
1323 * Certain timeout errors, e.g. while starting a service. warning: this is
1330 * @error_code: An error code.
1331 * @dbus_error_name: The D-Bus error name to associate with @error_code.
1333 * Struct used in g_dbus_error_register_error_domain().
1340 * GDBusInterfaceGetPropertyFunc:
1341 * @connection: A #GDBusConnection.
1342 * @sender: The unique bus name of the remote caller.
1343 * @object_path: The object path that the method was invoked on.
1344 * @interface_name: The D-Bus interface name for the property.
1345 * @property_name: The name of the property to get the value of.
1346 * @error: Return location for error.
1347 * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_object().
1349 * The type of the @get_property function in #GDBusInterfaceVTable.
1350 * consumed - otherwise its reference count is decreased by one.
1352 * Returns: A #GVariant with the value for @property_name or %NULL if
1358 * GDBusInterfaceInfo:
1359 * @ref_count: The reference count or -1 if statically allocated.
1360 * @name: The name of the D-Bus interface, e.g. "org.freedesktop.DBus.Properties".
1361 * @methods: A pointer to a %NULL-terminated array of pointers to #GDBusMethodInfo structures or %NULL if there are no methods.
1362 * @signals: A pointer to a %NULL-terminated array of pointers to #GDBusSignalInfo structures or %NULL if there are no signals.
1363 * @properties: A pointer to a %NULL-terminated array of pointers to #GDBusPropertyInfo structures or %NULL if there are no properties.
1364 * @annotations: A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
1366 * Information about a D-Bus interface.
1373 * GDBusInterfaceMethodCallFunc:
1374 * @connection: A #GDBusConnection.
1375 * @sender: The unique bus name of the remote caller.
1376 * @object_path: The object path that the method was invoked on.
1377 * @interface_name: The D-Bus interface name the method was invoked on.
1378 * @method_name: The name of the method that was invoked.
1379 * @parameters: A #GVariant tuple with parameters.
1380 * @invocation: A #GDBusMethodInvocation object that can be used to return a value or error.
1381 * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_object().
1383 * The type of the @method_call function in #GDBusInterfaceVTable.
1390 * GDBusInterfaceSetPropertyFunc:
1391 * @connection: A #GDBusConnection.
1392 * @sender: The unique bus name of the remote caller.
1393 * @object_path: The object path that the method was invoked on.
1394 * @interface_name: The D-Bus interface name for the property.
1395 * @property_name: The name of the property to get the value of.
1396 * @value: The value to set the property to.
1397 * @error: Return location for error.
1398 * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_object().
1400 * The type of the @set_property function in #GDBusInterfaceVTable.
1402 * Returns: %TRUE if the property was set to @value, %FALSE if @error is set.
1408 * GDBusInterfaceVTable:
1409 * @method_call: Function for handling incoming method calls.
1410 * @get_property: Function for getting a property.
1411 * @set_property: Function for setting a property.
1413 * Virtual table for handling properties and method calls for a D-Bus
1415 * If you want to handle getting/setting D-Bus properties asynchronously, simply
1416 * register an object with the <literal>org.freedesktop.DBus.Properties</literal>
1417 * D-Bus interface using g_dbus_connection_register_object().
1426 * The #GDBusMessage structure contains only private data and should
1427 * only be accessed using the provided API.
1434 * GDBusMessageByteOrder:
1435 * @G_DBUS_MESSAGE_BYTE_ORDER_BIG_ENDIAN: The byte order is big endian.
1436 * @G_DBUS_MESSAGE_BYTE_ORDER_LITTLE_ENDIAN: The byte order is little endian.
1438 * Enumeration used to describe the byte order of a D-Bus message.
1445 * GDBusMessageClass:
1447 * Class structure for #GDBusMessage.
1454 * GDBusMessageFilterFunction:
1455 * @connection: (transfer none): A #GDBusConnection.
1456 * @message: (transfer full): A locked #GDBusMessage that the filter function takes ownership of.
1457 * @incoming: %TRUE if it is a message received from the other peer, %FALSE if it is a message to be sent to the other peer.
1458 * @user_data: User data passed when adding the filter.
1460 * Signature for function used in g_dbus_connection_add_filter().
1461 * A filter function is passed a #GDBusMessage and expected to return
1462 * a #GDBusMessage too. Passive filter functions that don't modify the
1463 * message can simply return the @message object:
1465 * static GDBusMessage *
1466 * passive_filter (GDBusConnection *connection
1467 * GDBusMessage *message,
1468 * gboolean incoming,
1469 * gpointer user_data)
1471 * /<!-- -->* inspect @message *<!-- -->/
1475 * Filter functions that wants to drop a message can simply return %NULL:
1477 * static GDBusMessage *
1478 * drop_filter (GDBusConnection *connection
1479 * GDBusMessage *message,
1480 * gboolean incoming,
1481 * gpointer user_data)
1483 * if (should_drop_message)
1485 * g_object_unref (message);
1491 * Finally, a filter function may modify a message by copying it:
1493 * static GDBusMessage *
1494 * modifying_filter (GDBusConnection *connection
1495 * GDBusMessage *message,
1496 * gboolean incoming,
1497 * gpointer user_data)
1499 * GDBusMessage *copy;
1502 * copy = g_dbus_message_copy (message, &error);
1503 * /<!-- -->* handle @error being is set *<!-- -->/
1504 * g_object_unref (message);
1505 * /<!-- -->* modify @copy *<!-- -->/
1509 * If the returned #GDBusMessage is different from @message and cannot
1510 * be sent on @connection (it could use features, such as file
1511 * descriptors, not compatible with @connection), then a warning is
1512 * logged to <emphasis>standard error</emphasis>. Applications can
1513 * check this ahead of time using g_dbus_message_to_blob() passing a
1514 * #GDBusCapabilityFlags value obtained from @connection.
1515 * g_object_unref() or %NULL to drop the message. Passive filter
1516 * functions can simply return the passed @message object.
1518 * Returns: (transfer full) (allow-none): A #GDBusMessage that will be freed with
1524 * GDBusMessageFlags:
1525 * @G_DBUS_MESSAGE_FLAGS_NONE: No flags set.
1526 * @G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED: A reply is not expected.
1527 * @G_DBUS_MESSAGE_FLAGS_NO_AUTO_START: The bus must not launch an owner for the destination name in response to this message.
1529 * Message flags used in #GDBusMessage.
1536 * GDBusMessageHeaderField:
1537 * @G_DBUS_MESSAGE_HEADER_FIELD_INVALID: Not a valid header field.
1538 * @G_DBUS_MESSAGE_HEADER_FIELD_PATH: The object path.
1539 * @G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE: The interface name.
1540 * @G_DBUS_MESSAGE_HEADER_FIELD_MEMBER: The method or signal name.
1541 * @G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME: The name of the error that occurred.
1542 * @G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL: The serial number the message is a reply to.
1543 * @G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION: The name the message is intended for.
1544 * @G_DBUS_MESSAGE_HEADER_FIELD_SENDER: Unique name of the sender of the message (filled in by the bus).
1545 * @G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE: The signature of the message body.
1546 * @G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS: The number of UNIX file descriptors that accompany the message.
1548 * Header fields used in #GDBusMessage.
1556 * @G_DBUS_MESSAGE_TYPE_INVALID: Message is of invalid type.
1557 * @G_DBUS_MESSAGE_TYPE_METHOD_CALL: Method call.
1558 * @G_DBUS_MESSAGE_TYPE_METHOD_RETURN: Method reply.
1559 * @G_DBUS_MESSAGE_TYPE_ERROR: Error reply.
1560 * @G_DBUS_MESSAGE_TYPE_SIGNAL: Signal emission.
1562 * Message types used in #GDBusMessage.
1570 * @ref_count: The reference count or -1 if statically allocated.
1571 * @name: The name of the D-Bus method, e.g. @RequestName.
1572 * @in_args: A pointer to a %NULL-terminated array of pointers to #GDBusArgInfo structures or %NULL if there are no in arguments.
1573 * @out_args: A pointer to a %NULL-terminated array of pointers to #GDBusArgInfo structures or %NULL if there are no out arguments.
1574 * @annotations: A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
1576 * Information about a method on an D-Bus interface.
1583 * GDBusMethodInvocation:
1585 * The #GDBusMethodInvocation structure contains only private data and
1586 * should only be accessed using the provided API.
1593 * GDBusMethodInvocationClass:
1595 * Class structure for #GDBusMethodInvocation.
1603 * @ref_count: The reference count or -1 if statically allocated.
1604 * @path: The path of the node or %NULL if omitted. Note that this may be a relative path. See the D-Bus specification for more details.
1605 * @interfaces: A pointer to a %NULL-terminated array of pointers to #GDBusInterfaceInfo structures or %NULL if there are no interfaces.
1606 * @nodes: A pointer to a %NULL-terminated array of pointers to #GDBusNodeInfo structures or %NULL if there are no nodes.
1607 * @annotations: A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
1609 * Information about nodes in a remote object hierarchy.
1616 * GDBusPropertyInfo:
1617 * @ref_count: The reference count or -1 if statically allocated.
1618 * @name: The name of the D-Bus property, e.g. "SupportedFilesystems".
1619 * @signature: The D-Bus signature of the property (a single complete type).
1620 * @flags: Access control flags for the property.
1621 * @annotations: A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
1623 * Information about a D-Bus property on a D-Bus interface.
1630 * GDBusPropertyInfoFlags:
1631 * @G_DBUS_PROPERTY_INFO_FLAGS_NONE: No flags set.
1632 * @G_DBUS_PROPERTY_INFO_FLAGS_READABLE: Property is readable.
1633 * @G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE: Property is writable.
1635 * Flags describing the access control of a D-Bus property.
1644 * The #GDBusProxy structure contains only private data and
1645 * should only be accessed using the provided API.
1652 * GDBusProxy::g-properties-changed:
1653 * @proxy: The #GDBusProxy emitting the signal.
1654 * @changed_properties: A #GVariant containing the properties that changed
1655 * @invalidated_properties: A %NULL terminated array of properties that was invalidated
1657 * Emitted when one or more D-Bus properties on @proxy changes. The
1658 * local cache has already been updated when this signal fires. Note
1659 * that both @changed_properties and @invalidated_properties are
1660 * guaranteed to never be %NULL (either may be empty though).
1661 * This signal corresponds to the
1662 * <literal>PropertiesChanged</literal> D-Bus signal on the
1663 * <literal>org.freedesktop.DBus.Properties</literal> interface.
1670 * GDBusProxy::g-signal:
1671 * @proxy: The #GDBusProxy emitting the signal.
1672 * @sender_name: The sender of the signal or %NULL if the connection is not a bus connection.
1673 * @signal_name: The name of the signal.
1674 * @parameters: A #GVariant tuple with parameters for the signal.
1676 * Emitted when a signal from the remote object and interface that @proxy is for, has been received.
1683 * GDBusProxy:g-bus-type:
1685 * If this property is not %G_BUS_TYPE_NONE, then
1686 * #GDBusProxy:g-connection must be %NULL and will be set to the
1687 * #GDBusConnection obtained by calling g_bus_get() with the value
1695 * GDBusProxy:g-connection:
1697 * The #GDBusConnection the proxy is for.
1704 * GDBusProxy:g-default-timeout:
1706 * The timeout to use if -1 (specifying default timeout) is passed
1707 * as @timeout_msec in the g_dbus_proxy_call() and
1708 * g_dbus_proxy_call_sync() functions.
1709 * This allows applications to set a proxy-wide timeout for all
1710 * remote method invocations on the proxy. If this property is -1,
1711 * the default timeout (typically 25 seconds) is used. If set to
1712 * %G_MAXINT, then no timeout is used.
1719 * GDBusProxy:g-flags:
1721 * Flags from the #GDBusProxyFlags enumeration.
1728 * GDBusProxy:g-interface-info:
1730 * Ensure that interactions with this proxy conform to the given
1731 * interface. For example, when completing a method call, if the
1732 * type signature of the message isn't what's expected, the given
1733 * #GError is set. Signals that have a type signature mismatch are
1741 * GDBusProxy:g-interface-name:
1743 * The D-Bus interface name the proxy is for.
1750 * GDBusProxy:g-name:
1752 * The well-known or unique name that the proxy is for.
1759 * GDBusProxy:g-name-owner:
1761 * The unique name that owns #GDBusProxy:name or %NULL if no-one
1762 * currently owns that name. You may connect to #GObject::notify signal to
1763 * track changes to this property.
1770 * GDBusProxy:g-object-path:
1772 * The object path the proxy is for.
1780 * @g_properties_changed: Signal class handler for the #GDBusProxy::g-properties-changed signal.
1781 * @g_signal: Signal class handler for the #GDBusProxy::g-signal signal.
1783 * Class structure for #GDBusProxy.
1791 * @G_DBUS_PROXY_FLAGS_NONE: No flags set.
1792 * @G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES: Don't load properties.
1793 * @G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS: Don't connect to signals on the remote object.
1794 * @G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START: If not set and the proxy if for a well-known name, then request the bus to launch an owner for the name if no-one owns the name. This flag can only be used in proxies for well-known names.
1796 * Flags used when constructing an instance of a #GDBusProxy derived class.
1803 * GDBusSendMessageFlags:
1804 * @G_DBUS_SEND_MESSAGE_FLAGS_NONE: No flags set.
1805 * @G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL: Do not automatically assign a serial number from the #GDBusConnection object when sending a message.
1807 * Flags used when sending #GDBusMessage<!-- -->s on a #GDBusConnection.
1816 * The #GDBusServer structure contains only private data and
1817 * should only be accessed using the provided API.
1824 * GDBusServer::new-connection:
1825 * @server: The #GDBusServer emitting the signal.
1826 * @connection: A #GDBusConnection for the new connection.
1828 * Emitted when a new authenticated connection has been made. Use
1829 * g_dbus_connection_get_peer_credentials() to figure out what
1830 * identity (if any), was authenticated.
1831 * If you want to accept the connection, take a reference to the
1832 * connection call g_dbus_connection_close() and give up your
1833 * reference. Note that the other peer may disconnect at any time -
1834 * a typical thing to do when accepting a connection is to listen to
1835 * the #GDBusConnection::closed signal.
1836 * If #GDBusServer:flags contains %G_DBUS_SERVER_FLAGS_RUN_IN_THREAD
1837 * then the signal is emitted in a new thread dedicated to the
1838 * connection. Otherwise the signal is emitted in the <link
1839 * linkend="g-main-context-push-thread-default">thread-default main
1840 * loop</link> of the thread that @server was constructed in.
1841 * You are guaranteed that signal handlers for this signal runs
1842 * before incoming messages on @connection are processed. This means
1843 * that it's suitable to call g_dbus_connection_register_object() or
1844 * similar from the signal handler.
1847 * Returns: %TRUE to claim @connection, %FALSE to let other handlers
1853 * GDBusServer:active:
1855 * Whether the server is currently active.
1862 * GDBusServer:address:
1864 * The D-Bus address to listen on.
1871 * GDBusServer:authentication-observer:
1873 * A #GDBusAuthObserver object to assist in the authentication process or %NULL.
1880 * GDBusServer:client-address:
1882 * The D-Bus address that clients can use.
1889 * GDBusServer:flags:
1891 * Flags from the #GDBusServerFlags enumeration.
1900 * The guid of the server.
1908 * @new_connection: Signal class handler for the #GDBusServer::new-connection signal.
1910 * Class structure for #GDBusServer.
1918 * @G_DBUS_SERVER_FLAGS_NONE: No flags set.
1919 * @G_DBUS_SERVER_FLAGS_RUN_IN_THREAD: All #GDBusServer::new-connection signals will run in separated dedicated threads (see signal for details).
1920 * @G_DBUS_SERVER_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS: Allow the anonymous authentication method.
1922 * Flags used when creating a #GDBusServer.
1929 * GDBusSignalCallback:
1930 * @connection: A #GDBusConnection.
1931 * @sender_name: The unique bus name of the sender of the signal.
1932 * @object_path: The object path that the signal was emitted on.
1933 * @interface_name: The name of the interface.
1934 * @signal_name: The name of the signal.
1935 * @parameters: A #GVariant tuple with parameters for the signal.
1936 * @user_data: User data passed when subscribing to the signal.
1938 * Signature for callback function used in g_dbus_connection_signal_subscribe().
1946 * @G_DBUS_SIGNAL_FLAGS_NONE: No flags set.
1947 * @G_DBUS_SIGNAL_FLAGS_NO_MATCH_RULE: Don't actually send the AddMatch DBus call for this signal subscription. This gives you more control over which match rules you add (but you must add them manually).
1949 * Flags used when subscribing to signals via g_dbus_connection_signal_subscribe().
1957 * @ref_count: The reference count or -1 if statically allocated.
1958 * @name: The name of the D-Bus signal, e.g. "NameOwnerChanged".
1959 * @args: A pointer to a %NULL-terminated array of pointers to #GDBusArgInfo structures or %NULL if there are no arguments.
1960 * @annotations: A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
1962 * Information about a signal on a D-Bus interface.
1969 * GDBusSubtreeDispatchFunc:
1970 * @connection: A #GDBusConnection.
1971 * @sender: The unique bus name of the remote caller.
1972 * @object_path: The object path that was registered with g_dbus_connection_register_subtree().
1973 * @interface_name: The D-Bus interface name that the method call or property access is for.
1974 * @node: A node that is a child of @object_path (relative to @object_path) or %NULL for the root of the subtree.
1975 * @out_user_data: Return location for user data to pass to functions in the returned #GDBusInterfaceVTable (never %NULL).
1976 * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_subtree().
1978 * The type of the @dispatch function in #GDBusSubtreeVTable.
1979 * Subtrees are flat. @node, if non-%NULL, is always exactly one
1981 * Segment of the object path (ie: it never contains a slash).
1982 * Returns: A #GDBusInterfaceVTable or %NULL if you don't want to handle the methods.
1988 * GDBusSubtreeEnumerateFunc:
1989 * @connection: A #GDBusConnection.
1990 * @sender: The unique bus name of the remote caller.
1991 * @object_path: The object path that was registered with g_dbus_connection_register_subtree().
1992 * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_subtree().
1994 * The type of the @enumerate function in #GDBusSubtreeVTable.
1995 * This function is called when generating introspection data and also
1996 * when preparing to dispatch incoming messages in the event that the
1997 * %G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES flag is not
1998 * Hierarchies are not supported; the items that you return should not
1999 * contain the '/' character.
2000 * The return value will be freed with g_strfreev().
2002 * Specified (ie: to verify that the object path is valid).
2003 * Returns: A newly allocated array of strings for node names that are children of @object_path.
2009 * GDBusSubtreeFlags:
2010 * @G_DBUS_SUBTREE_FLAGS_NONE: No flags set.
2011 * @G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES: Method calls to objects not in the enumerated range will still be dispatched. This is useful if you want to dynamically spawn objects in the subtree.
2013 * Flags passed to g_dbus_connection_register_subtree().
2020 * GDBusSubtreeIntrospectFunc:
2021 * @connection: A #GDBusConnection.
2022 * @sender: The unique bus name of the remote caller.
2023 * @object_path: The object path that was registered with g_dbus_connection_register_subtree().
2024 * @node: A node that is a child of @object_path (relative to @object_path) or %NULL for the root of the subtree.
2025 * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_subtree().
2027 * The type of the @introspect function in #GDBusSubtreeVTable.
2028 * Subtrees are flat. @node, if non-%NULL, is always exactly one
2029 * This function should return %NULL to indicate that there is no object
2031 * If this function returns non-%NULL, the return value is expected to
2032 * be a %NULL-terminated array of pointers to #GDBusInterfaceInfo
2033 * structures describing the interfaces implemented by @node. This
2034 * array will have g_dbus_interface_info_unref() called on each item
2035 * before being freed with g_free().
2036 * The difference between returning %NULL and an array containing zero
2037 * items is that the standard DBus interfaces will returned to the
2038 * remote introspector in the empty array case, but not in the %NULL
2041 * Segment of the object path (ie: it never contains a slash).
2042 * Returns: A %NULL-terminated array of pointers to #GDBusInterfaceInfo, or %NULL.
2048 * GDBusSubtreeVTable:
2049 * @enumerate: Function for enumerating child nodes.
2050 * @introspect: Function for introspecting a child node.
2051 * @dispatch: Function for dispatching a remote call on a child node.
2053 * Virtual table for handling subtrees registered with g_dbus_connection_register_subtree().
2062 * An implementation of #GBufferedInputStream that allows for high-level
2063 * data manipulation of arbitrary data (including binary operations).
2068 * GDataOutputStream:
2070 * An implementation of #GBufferedOutputStream that allows for high-level
2071 * data manipulation of arbitrary data (including binary operations).
2076 * GDataOutputStream:byte-order:
2078 * Determines the byte ordering that is used when writing
2079 * multi-byte entities (such as integers) to the stream.
2084 * GDataStream:byte-order:
2086 * The ::byte-order property determines the byte ordering that
2087 * is used when reading multi-byte entities (such as integers)
2093 * GDataStream:newline-type:
2095 * The :newline-type property determines what is considered
2096 * as a line ending when reading complete lines from the stream.
2101 * GDataStreamByteOrder:
2102 * @G_DATA_STREAM_BYTE_ORDER_BIG_ENDIAN: Selects Big Endian byte order.
2103 * @G_DATA_STREAM_BYTE_ORDER_LITTLE_ENDIAN: Selects Little Endian byte order.
2104 * @G_DATA_STREAM_BYTE_ORDER_HOST_ENDIAN: Selects endianness based on host machine's architecture.
2106 * #GDataStreamByteOrder is used to ensure proper endianness of streaming data sources
2107 * across various machine architectures.
2112 * GDataStreamNewlineType:
2113 * @G_DATA_STREAM_NEWLINE_TYPE_LF: Selects "LF" line endings, common on most modern UNIX platforms.
2114 * @G_DATA_STREAM_NEWLINE_TYPE_CR: Selects "CR" line endings.
2115 * @G_DATA_STREAM_NEWLINE_TYPE_CR_LF: Selects "CR, LF" line ending, common on Microsoft Windows.
2116 * @G_DATA_STREAM_NEWLINE_TYPE_ANY: Automatically try to handle any line ending type.
2118 * #GDataStreamNewlineType is used when checking for or setting the line endings for a given file.
2125 * <structname>GDateTime</structname> is an opaque structure whose members
2126 * cannot be accessed directly.
2135 * Information about an installed application from a desktop file.
2140 * GDesktopAppInfoLookup:
2142 * Interface that is used by backends to associate default
2143 * handlers with URI schemes.
2148 * GDesktopAppLaunchCallback:
2149 * @appinfo: a #GDesktopAppInfo
2150 * @pid: Process identifier
2151 * @user_data: User data
2153 * During invocation, g_desktop_app_info_launch_uris_as_manager() may
2154 * create one or more child processes. This callback is invoked once
2155 * for each, providing the process ID.
2162 * Opaque drive object.
2168 * @drive: a #GDrive.
2170 * Emitted when the drive's state has changed.
2175 * GDrive::disconnected:
2176 * @drive: a #GDrive.
2178 * This signal is emitted when the #GDrive have been
2179 * disconnected. If the recipient is holding references to the
2180 * object they should release them so the object can be
2186 * GDrive::eject-button:
2187 * @drive: a #GDrive.
2189 * Emitted when the physical eject button (if any) of a drive has
2195 * GDrive::stop-button:
2196 * @drive: a #GDrive.
2198 * Emitted when the physical stop button (if any) of a drive has
2207 * @g_iface: The parent interface.
2208 * @changed: Signal emitted when the drive is changed.
2209 * @disconnected: The removed signal that is emitted when the #GDrive have been disconnected. If the recipient is holding references to the object they should release them so the object can be finalized.
2210 * @eject_button: Signal emitted when the physical eject button (if any) of a drive have been pressed.
2211 * @get_name: Returns the name for the given #GDrive.
2212 * @get_icon: Returns a #GIcon for the given #GDrive.
2213 * @has_volumes: Returns %TRUE if the #GDrive has mountable volumes.
2214 * @get_volumes: Returns a list #GList of #GVolume for the #GDrive.
2215 * @is_media_removable: Returns %TRUE if the #GDrive supports removal and insertion of media.
2216 * @has_media: Returns %TRUE if the #GDrive has media inserted.
2217 * @is_media_check_automatic: Returns %TRUE if the #GDrive is capabable of automatically detecting media changes.
2218 * @can_poll_for_media: Returns %TRUE if the #GDrive is capable of manually polling for media change.
2219 * @can_eject: Returns %TRUE if the #GDrive can eject media.
2220 * @eject: Ejects a #GDrive.
2221 * @eject_finish: Finishes an eject operation.
2222 * @poll_for_media: Poll for media insertion/removal on a #GDrive.
2223 * @poll_for_media_finish: Finishes a media poll operation.
2224 * @get_identifier: Returns the identifier of the given kind, or %NULL if the #GDrive doesn't have one.
2225 * @enumerate_identifiers: Returns an array strings listing the kinds of identifiers which the #GDrive has.
2226 * @get_start_stop_type: Gets a #GDriveStartStopType with details about starting/stopping the drive. Since 2.22.
2227 * @can_stop: Returns %TRUE if a #GDrive can be stopped. Since 2.22.
2228 * @stop: Stops a #GDrive. Since 2.22.
2229 * @stop_finish: Finishes a stop operation. Since 2.22.
2230 * @can_start: Returns %TRUE if a #GDrive can be started. Since 2.22.
2231 * @can_start_degraded: Returns %TRUE if a #GDrive can be started degraded. Since 2.22.
2232 * @start: Starts a #GDrive. Since 2.22.
2233 * @start_finish: Finishes a start operation. Since 2.22.
2234 * @stop_button: Signal emitted when the physical stop button (if any) of a drive have been pressed. Since 2.22.
2235 * @eject_with_operation: Starts ejecting a #GDrive using a #GMountOperation. Since 2.22.
2236 * @eject_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22.
2238 * Interface for creating #GDrive implementations.
2244 * @G_DRIVE_START_NONE: No flags set.
2246 * Flags used when starting a drive.
2253 * GDriveStartStopType:
2254 * @G_DRIVE_START_STOP_TYPE_UNKNOWN: Unknown or drive doesn't support start/stop.
2255 * @G_DRIVE_START_STOP_TYPE_SHUTDOWN: The stop method will physically shut down the drive and e.g. power down the port the drive is attached to.
2256 * @G_DRIVE_START_STOP_TYPE_NETWORK: The start/stop methods are used for connecting/disconnect to the drive over the network.
2257 * @G_DRIVE_START_STOP_TYPE_MULTIDISK: The start/stop methods will assemble/disassemble a virtual drive from several physical drives.
2258 * @G_DRIVE_START_STOP_TYPE_PASSWORD: The start/stop methods will unlock/lock the disk (for example using the ATA <quote>SECURITY UNLOCK DEVICE</quote> command)
2260 * Enumeration describing how a drive can be started/stopped.
2269 * An object for Emblems
2275 * @G_EMBLEM_ORIGIN_UNKNOWN: Emblem of unknown origin
2276 * @G_EMBLEM_ORIGIN_DEVICE: Emblem adds device-specific information
2277 * @G_EMBLEM_ORIGIN_LIVEMETADATA: Emblem depicts live metadata, such as "readonly"
2278 * @G_EMBLEM_ORIGIN_TAG: Emblem comes from a user-defined tag, e.g. set by nautilus (in the future)
2280 * GEmblemOrigin is used to add information about the origin of the emblem
2290 * An implementation of #GIcon for icons with emblems.
2296 * @g_type_class: the parent class
2297 * @minimum: the smallest possible value.
2298 * @maximum: the largest possible value.
2299 * @n_values: the number of possible values.
2300 * @values: an array of #GEnumValue structs describing the individual values.
2302 * The class of an enumeration type holds information about its
2309 * @value: the enum value
2310 * @value_name: the name of the value
2311 * @value_nick: the nickname of the value
2313 * A structure which contains a single enum value, its name, and its
2321 * A handle to an object implementing the #GFileIface interface.
2322 * Generally stores a location within the file system. Handles do not
2323 * necessarily represent files or directories that currently exist.
2328 * GFileAttributeInfo:
2329 * @name: the name of the attribute.
2330 * @type: the #GFileAttributeType type of the attribute.
2331 * @flags: a set of #GFileAttributeInfoFlags.
2333 * Information about a specific attribute.
2338 * GFileAttributeInfoFlags:
2339 * @G_FILE_ATTRIBUTE_INFO_NONE: no flags set.
2340 * @G_FILE_ATTRIBUTE_INFO_COPY_WITH_FILE: copy the attribute values when the file is copied.
2341 * @G_FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED: copy the attribute values when the file is moved.
2343 * Flags specifying the behaviour of an attribute.
2348 * GFileAttributeInfoList:
2349 * @infos: an array of #GFileAttributeInfo<!-- -->s.
2350 * @n_infos: the number of values in the array.
2352 * Acts as a lightweight registry for possible valid file attributes.
2353 * The registry stores Key-Value pair formats as #GFileAttributeInfo<!-- -->s.
2358 * GFileAttributeMatcher:
2360 * Determines if a string matches a file attribute.
2365 * GFileAttributeStatus:
2366 * @G_FILE_ATTRIBUTE_STATUS_UNSET: Attribute value is unset (empty).
2367 * @G_FILE_ATTRIBUTE_STATUS_SET: Attribute value is set.
2368 * @G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING: Indicates an error in setting the value.
2370 * Used by g_file_set_attributes_from_info() when setting file attributes.
2375 * GFileAttributeType:
2376 * @G_FILE_ATTRIBUTE_TYPE_INVALID: indicates an invalid or uninitalized type.
2377 * @G_FILE_ATTRIBUTE_TYPE_STRING: a null terminated UTF8 string.
2378 * @G_FILE_ATTRIBUTE_TYPE_BYTE_STRING: a zero terminated string of non-zero bytes.
2379 * @G_FILE_ATTRIBUTE_TYPE_BOOLEAN: a boolean value.
2380 * @G_FILE_ATTRIBUTE_TYPE_UINT32: an unsigned 4-byte/32-bit integer.
2381 * @G_FILE_ATTRIBUTE_TYPE_INT32: a signed 4-byte/32-bit integer.
2382 * @G_FILE_ATTRIBUTE_TYPE_UINT64: an unsigned 8-byte/64-bit integer.
2383 * @G_FILE_ATTRIBUTE_TYPE_INT64: a signed 8-byte/64-bit integer.
2384 * @G_FILE_ATTRIBUTE_TYPE_OBJECT: a #GObject.
2385 * @G_FILE_ATTRIBUTE_TYPE_STRINGV: a %NULL terminated char **. Since 2.22
2387 * The data types for file attributes.
2393 * @G_FILE_COPY_NONE: No flags set.
2394 * @G_FILE_COPY_OVERWRITE: Overwrite any existing files
2395 * @G_FILE_COPY_BACKUP: Make a backup of any existing files.
2396 * @G_FILE_COPY_NOFOLLOW_SYMLINKS: Don't follow symlinks.
2397 * @G_FILE_COPY_ALL_METADATA: Copy all file metadata instead of just default set used for copy (see #GFileInfo).
2398 * @G_FILE_COPY_NO_FALLBACK_FOR_MOVE: Don't use copy and delete fallback if native move not supported.
2399 * @G_FILE_COPY_TARGET_DEFAULT_PERMS: Leaves target file with default perms, instead of setting the source file perms.
2401 * Flags used when copying or moving files.
2407 * @G_FILE_CREATE_NONE: No flags set.
2408 * @G_FILE_CREATE_PRIVATE: Create a file that can only be accessed by the current user.
2409 * @G_FILE_CREATE_REPLACE_DESTINATION: Replace the destination as if it didn't exist before. Don't try to keep any old permissions, replace instead of following links. This is generally useful if you're doing a "copy over" rather than a "save new version of" replace operation. You can think of it as "unlink destination" before writing to it, although the implementation may not be exactly like that. Since 2.20
2411 * Flags used when an operation may create a file.
2416 * GFileDescriptorBased:
2418 * An interface for file descriptor based io objects.
2423 * GFileDescriptorBasedIface:
2424 * @g_iface: The parent interface.
2433 * A per matched file iterator.
2440 * A subclass of GIOStream for opened files. This adds
2441 * a few file-specific operations and seeking and truncating.
2442 * #GFileIOStream implements GSeekable.
2449 * Gets an icon for a #GFile. Implements #GLoadableIcon.
2456 * The file containing the icon.
2462 * @g_iface: The parent interface.
2463 * @dup: Duplicates a #GFile.
2464 * @hash: Creates a hash of a #GFile.
2465 * @equal: Checks equality of two given #GFile<!-- -->s.
2466 * @is_native: Checks to see if a file is native to the system.
2467 * @has_uri_scheme: Checks to see if a #GFile has a given URI scheme.
2468 * @get_uri_scheme: Gets the URI scheme for a #GFile.
2469 * @get_basename: Gets the basename for a given #GFile.
2470 * @get_path: Gets the current path within a #GFile.
2471 * @get_uri: Gets a URI for the path within a #GFile.
2472 * @get_parse_name: Gets the parsed name for the #GFile.
2473 * @get_parent: Gets the parent directory for the #GFile.
2474 * @prefix_matches: Checks whether a #GFile contains a specified file.
2475 * @get_relative_path: Gets the path for a #GFile relative to a given path.
2476 * @resolve_relative_path: Resolves a relative path for a #GFile to an absolute path.
2477 * @get_child_for_display_name: Gets the child #GFile for a given display name.
2478 * @enumerate_children: Gets a #GFileEnumerator with the children of a #GFile.
2479 * @enumerate_children_async: Asynchronously gets a #GFileEnumerator with the children of a #GFile.
2480 * @enumerate_children_finish: Finishes asynchronously enumerating the children.
2481 * @query_info: Gets the #GFileInfo for a #GFile.
2482 * @query_info_async: Asynchronously gets the #GFileInfo for a #GFile.
2483 * @query_info_finish: Finishes an asynchronous query info operation.
2484 * @query_filesystem_info: Gets a #GFileInfo for the file system #GFile is on.
2485 * @query_filesystem_info_async: Asynchronously gets a #GFileInfo for the file system #GFile is on.
2486 * @query_filesystem_info_finish: Finishes asynchronously getting the file system info.
2487 * @find_enclosing_mount: Gets a #GMount for the #GFile.
2488 * @find_enclosing_mount_async: Asynchronously gets the #GMount for a #GFile.
2489 * @find_enclosing_mount_finish: Finishes asynchronously getting the volume.
2490 * @set_display_name: Sets the display name for a #GFile.
2491 * @set_display_name_async: Asynchronously sets a #GFile's display name.
2492 * @set_display_name_finish: Finishes asynchronously setting a #GFile's display name.
2493 * @query_settable_attributes: Returns a list of #GFileAttribute<!-- -->s that can be set.
2494 * @_query_settable_attributes_async: Asynchronously gets a list of #GFileAttribute<!-- -->s that can be set.
2495 * @_query_settable_attributes_finish: Finishes asynchronously querying settable attributes.
2496 * @query_writable_namespaces: Returns a list of #GFileAttribute namespaces that are writable.
2497 * @_query_writable_namespaces_async: Asynchronously gets a list of #GFileAttribute namespaces that are writable.
2498 * @_query_writable_namespaces_finish: Finishes asynchronously querying the writable namespaces.
2499 * @set_attribute: Sets a #GFileAttribute.
2500 * @set_attributes_from_info: Sets a #GFileAttribute with information from a #GFileInfo.
2501 * @set_attributes_async: Asynchronously sets a file's attributes.
2502 * @set_attributes_finish: Finishes setting a file's attributes asynchronously.
2503 * @read_fn: Reads a file asynchronously.
2504 * @read_async: Asynchronously reads a file.
2505 * @read_finish: Finishes asynchronously reading a file.
2506 * @append_to: Writes to the end of a file.
2507 * @append_to_async: Asynchronously writes to the end of a file.
2508 * @append_to_finish: Finishes an asynchronous file append operation.
2509 * @create: Creates a new file.
2510 * @create_async: Asynchronously creates a file.
2511 * @create_finish: Finishes asynchronously creating a file.
2512 * @replace: Replaces the contents of a file.
2513 * @replace_async: Asynchronously replaces the contents of a file.
2514 * @replace_finish: Finishes asynchronously replacing a file.
2515 * @delete_file: Deletes a file.
2516 * @_delete_file_async: Asynchronously deletes a file.
2517 * @_delete_file_finish: Finishes an asynchronous delete.
2518 * @trash: Sends a #GFile to the Trash location.
2519 * @_trash_async: Asynchronously sends a #GFile to the Trash location.
2520 * @_trash_finish: Finishes an asynchronous file trashing operation.
2521 * @make_directory: Makes a directory.
2522 * @_make_directory_async: Asynchronously makes a directory.
2523 * @_make_directory_finish: Finishes making a directory asynchronously.
2524 * @make_symbolic_link: Makes a symbolic link.
2525 * @_make_symbolic_link_async: Asynchronously makes a symbolic link
2526 * @_make_symbolic_link_finish: Finishes making a symbolic link asynchronously.
2527 * @copy: Copies a file.
2528 * @copy_async: Asynchronously copies a file.
2529 * @copy_finish: Finishes an asynchronous copy operation.
2530 * @move: Moves a file.
2531 * @_move_async: Asynchronously moves a file.
2532 * @_move_finish: Finishes an asynchronous move operation.
2533 * @mount_mountable: Mounts a mountable object.
2534 * @mount_mountable_finish: Finishes a mounting operation.
2535 * @unmount_mountable: Unmounts a mountable object.
2536 * @unmount_mountable_finish: Finishes an unmount operation.
2537 * @eject_mountable: Ejects a mountable.
2538 * @eject_mountable_finish: Finishes an eject operation.
2539 * @mount_enclosing_volume: Mounts a specified location.
2540 * @mount_enclosing_volume_finish: Finishes mounting a specified location.
2541 * @monitor_dir: Creates a #GFileMonitor for the location.
2542 * @monitor_file: Creates a #GFileMonitor for the location.
2543 * @open_readwrite: Open file read/write. Since 2.22.
2544 * @open_readwrite_async: Asynchronously opens file read/write. Since 2.22.
2545 * @open_readwrite_finish: Finishes an asynchronous open read/write. Since 2.22.
2546 * @create_readwrite: Creates file read/write. Since 2.22.
2547 * @create_readwrite_async: Asynchronously creates file read/write. Since 2.22.
2548 * @create_readwrite_finish: Finishes an asynchronous creates read/write. Since 2.22.
2549 * @replace_readwrite: Replaces file read/write. Since 2.22.
2550 * @replace_readwrite_async: Asynchronously replaces file read/write. Since 2.22.
2551 * @replace_readwrite_finish: Finishes an asynchronous replace read/write. Since 2.22.
2552 * @start_mountable: Starts a mountable object. Since 2.22.
2553 * @start_mountable_finish: Finishes an start operation. Since 2.22.
2554 * @stop_mountable: Stops a mountable. Since 2.22.
2555 * @stop_mountable_finish: Finishes an stop operation. Since 2.22.
2556 * @supports_thread_contexts: a boolean that indicates whether the #GFile implementation supports thread-default contexts. Since 2.22.
2557 * @unmount_mountable_with_operation: Unmounts a mountable object using a #GMountOperation. Since 2.22.
2558 * @unmount_mountable_with_operation_finish: Finishes an unmount operation using a #GMountOperation. Since 2.22.
2559 * @eject_mountable_with_operation: Ejects a mountable object using a #GMountOperation. Since 2.22.
2560 * @eject_mountable_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22.
2561 * @poll_mountable: Polls a mountable object for media changes. Since 2.22.
2562 * @poll_mountable_finish: Finishes an poll operation for media changes. Since 2.22.
2564 * An interface for writing VFS file handles.
2571 * Stores information about a file system object referenced by a #GFile.
2578 * A subclass of GInputStream for opened files. This adds
2579 * a few file-specific operations and seeking.
2580 * #GFileInputStream implements #GSeekable.
2587 * Watches for changes to a file.
2592 * GFileMonitor::changed:
2593 * @monitor: a #GFileMonitor.
2595 * @other_file: a #GFile or #NULL.
2596 * @event_type: a #GFileMonitorEvent.
2598 * Emitted when @file has been changed.
2599 * If using #G_FILE_MONITOR_SEND_MOVED flag and @event_type is
2600 * #G_FILE_MONITOR_SEND_MOVED, @file will be set to a #GFile containing the
2601 * old path, and @other_file will be set to a #GFile containing the new path.
2602 * In all the other cases, @other_file will be set to #NULL.
2607 * GFileMonitorEvent:
2608 * @G_FILE_MONITOR_EVENT_CHANGED: a file changed.
2609 * @G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT: a hint that this was probably the last change in a set of changes.
2610 * @G_FILE_MONITOR_EVENT_DELETED: a file was deleted.
2611 * @G_FILE_MONITOR_EVENT_CREATED: a file was created.
2612 * @G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED: a file attribute was changed.
2613 * @G_FILE_MONITOR_EVENT_PRE_UNMOUNT: the file location will soon be unmounted.
2614 * @G_FILE_MONITOR_EVENT_UNMOUNTED: the file location was unmounted.
2615 * @G_FILE_MONITOR_EVENT_MOVED: the file was moved.
2617 * Specifies what type of event a monitor event is.
2622 * GFileMonitorFlags:
2623 * @G_FILE_MONITOR_NONE: No flags set.
2624 * @G_FILE_MONITOR_WATCH_MOUNTS: Watch for mount events.
2625 * @G_FILE_MONITOR_SEND_MOVED: Pair DELETED and CREATED events caused by file renames (moves) and send a single G_FILE_MONITOR_EVENT_MOVED event instead (NB: not supported on all backends; the default behaviour -without specifying this flag- is to send single DELETED and CREATED events).
2627 * Flags used to set what a #GFileMonitor will watch for.
2632 * GFileOutputStream:
2634 * A subclass of GOutputStream for opened files. This adds
2635 * a few file-specific operations and seeking and truncating.
2636 * #GFileOutputStream implements GSeekable.
2641 * GFileProgressCallback:
2642 * @current_num_bytes: the current number of bytes in the operation.
2643 * @total_num_bytes: the total number of bytes in the operation.
2644 * @user_data: user data passed to the callback.
2646 * When doing file operations that may take a while, such as moving
2647 * a file or copying a file, a progress callback is used to pass how
2648 * far along that operation is to the application.
2653 * GFileQueryInfoFlags:
2654 * @G_FILE_QUERY_INFO_NONE: No flags set.
2655 * @G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS: Don't follow symlinks.
2657 * Flags used when querying a #GFileInfo.
2662 * GFileReadMoreCallback:
2663 * @file_contents: the data as currently read.
2664 * @file_size: the size of the data currently read.
2665 * @callback_data: data passed to the callback.
2667 * When loading the partial contents of a file with g_file_load_partial_contents_async(),
2668 * it may become necessary to determine if any more data from the file should be loaded.
2669 * A #GFileReadMoreCallback function facilitates this by returning %TRUE if more data
2670 * should be read, or %FALSE otherwise.
2672 * Returns: %TRUE if more data should be read back. %FALSE otherwise.
2678 * @G_FILE_TYPE_UNKNOWN: File's type is unknown.
2679 * @G_FILE_TYPE_REGULAR: File handle represents a regular file.
2680 * @G_FILE_TYPE_DIRECTORY: File handle represents a directory.
2681 * @G_FILE_TYPE_SYMBOLIC_LINK: File handle represents a symbolic link (Unix systems).
2682 * @G_FILE_TYPE_SPECIAL: File is a "special" file, such as a socket, fifo, block device, or character device.
2683 * @G_FILE_TYPE_SHORTCUT: File is a shortcut (Windows systems).
2684 * @G_FILE_TYPE_MOUNTABLE: File is a mountable location.
2686 * Indicates the file's on-disk type.
2691 * GFilenameCompleter:
2693 * Completes filenames based on files that exist within the file system.
2698 * GFilenameCompleter::got-completion-data:
2700 * Emitted when the file name completion information comes available.
2705 * GFilesystemPreviewType:
2706 * @G_FILESYSTEM_PREVIEW_TYPE_IF_ALWAYS: Only preview files if user has explicitly requested it.
2707 * @G_FILESYSTEM_PREVIEW_TYPE_IF_LOCAL: Preview files if user has requested preview of "local" files.
2708 * @G_FILESYSTEM_PREVIEW_TYPE_NEVER: Never preview files.
2710 * Indicates a hint from the file system whether files should be
2711 * previewed in a file manager. Returned as the value of the key
2712 * #G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW.
2717 * GFilterInputStream:
2719 * A base class for all input streams that work on an underlying stream.
2724 * GFilterOutputStream:
2726 * A base class for all output streams that work on an underlying stream.
2732 * @g_type_class: the parent class
2733 * @mask: a mask covering all possible values.
2734 * @n_values: the number of possible values.
2735 * @values: an array of #GFlagsValue structs describing the individual values.
2737 * The class of a flags type holds information about its
2744 * @value: the flags value
2745 * @value_name: the name of the value
2746 * @value_nick: the nickname of the value
2748 * A structure which contains a single flags value, its name, and its
2755 * @G_IO_ERROR_FAILED: Generic error condition for when any operation fails.
2756 * @G_IO_ERROR_NOT_FOUND: File not found error.
2757 * @G_IO_ERROR_EXISTS: File already exists error.
2758 * @G_IO_ERROR_IS_DIRECTORY: File is a directory error.
2759 * @G_IO_ERROR_NOT_DIRECTORY: File is not a directory.
2760 * @G_IO_ERROR_NOT_EMPTY: File is a directory that isn't empty.
2761 * @G_IO_ERROR_NOT_REGULAR_FILE: File is not a regular file.
2762 * @G_IO_ERROR_NOT_SYMBOLIC_LINK: File is not a symbolic link.
2763 * @G_IO_ERROR_NOT_MOUNTABLE_FILE: File cannot be mounted.
2764 * @G_IO_ERROR_FILENAME_TOO_LONG: Filename is too many characters.
2765 * @G_IO_ERROR_INVALID_FILENAME: Filename is invalid or contains invalid characters.
2766 * @G_IO_ERROR_TOO_MANY_LINKS: File contains too many symbolic links.
2767 * @G_IO_ERROR_NO_SPACE: No space left on drive.
2768 * @G_IO_ERROR_INVALID_ARGUMENT: Invalid argument.
2769 * @G_IO_ERROR_PERMISSION_DENIED: Permission denied.
2770 * @G_IO_ERROR_NOT_SUPPORTED: Operation not supported for the current backend.
2771 * @G_IO_ERROR_NOT_MOUNTED: File isn't mounted.
2772 * @G_IO_ERROR_ALREADY_MOUNTED: File is already mounted.
2773 * @G_IO_ERROR_CLOSED: File was closed.
2774 * @G_IO_ERROR_CANCELLED: Operation was cancelled. See #GCancellable.
2775 * @G_IO_ERROR_PENDING: Operations are still pending.
2776 * @G_IO_ERROR_READ_ONLY: File is read only.
2777 * @G_IO_ERROR_CANT_CREATE_BACKUP: Backup couldn't be created.
2778 * @G_IO_ERROR_WRONG_ETAG: File's Entity Tag was incorrect.
2779 * @G_IO_ERROR_TIMED_OUT: Operation timed out.
2780 * @G_IO_ERROR_WOULD_RECURSE: Operation would be recursive.
2781 * @G_IO_ERROR_BUSY: File is busy.
2782 * @G_IO_ERROR_WOULD_BLOCK: Operation would block.
2783 * @G_IO_ERROR_HOST_NOT_FOUND: Host couldn't be found (remote operations).
2784 * @G_IO_ERROR_WOULD_MERGE: Operation would merge files.
2785 * @G_IO_ERROR_FAILED_HANDLED: Operation failed and a helper program has already interacted with the user. Do not display any error dialog.
2786 * @G_IO_ERROR_TOO_MANY_OPEN_FILES: The current process has too many files open and can't open any more. Duplicate descriptors do count toward this limit. Since 2.20
2787 * @G_IO_ERROR_NOT_INITIALIZED: The object has not been initialized. Since 2.22
2788 * @G_IO_ERROR_ADDRESS_IN_USE: The requested address is already in use. Since 2.22
2789 * @G_IO_ERROR_PARTIAL_INPUT: Need more input to finish operation. Since 2.24
2790 * @G_IO_ERROR_INVALID_DATA: There input data was invalid. Since 2.24
2791 * @G_IO_ERROR_DBUS_ERROR: A remote object generated an error that doesn't correspond to a locally registered #GError error domain. Use g_dbus_error_get_remote_error() to extract the D-Bus error name and g_dbus_error_strip_remote_error() to fix up the message so it matches what was received on the wire. Since 2.26.
2792 * @G_IO_ERROR_HOST_UNREACHABLE: Host unreachable. Since 2.26
2793 * @G_IO_ERROR_NETWORK_UNREACHABLE: Network unreachable. Since 2.26
2794 * @G_IO_ERROR_CONNECTION_REFUSED: Connection refused. Since 2.26
2795 * @G_IO_ERROR_PROXY_FAILED: Connection to proxy server failed. Since 2.26
2796 * @G_IO_ERROR_PROXY_AUTH_FAILED: Proxy authentication failed. Since 2.26
2797 * @G_IO_ERROR_PROXY_NEED_AUTH: Proxy server needs authentication. Since 2.26
2798 * @G_IO_ERROR_PROXY_NOT_ALLOWED: Proxy connection is not allowed by ruleset. Since 2.26
2800 * Error codes returned by GIO functions.
2807 * Opaque module base class for extending GIO.
2814 * Opaque class for definining and scheduling IO jobs.
2819 * GIOSchedulerJobFunc:
2820 * @job: a #GIOSchedulerJob.
2821 * @cancellable: optional #GCancellable object, %NULL to ignore.
2822 * @user_data: the data to pass to callback function
2825 * Note that depending on whether threads are available, the
2826 * #GIOScheduler may run jobs in separate threads or in an idle
2828 * Long-running jobs should periodically check the @cancellable
2829 * to see if they have been cancelled.
2830 * complete the job, %FALSE if the job is complete (or cancelled)
2832 * Returns: %TRUE if this function should be called again to
2839 * Base class for read-write streams.
2844 * GIOStreamSpliceFlags:
2845 * @G_IO_STREAM_SPLICE_NONE: Do not close either stream.
2846 * @G_IO_STREAM_SPLICE_CLOSE_STREAM1: Close the first stream after the splice.
2847 * @G_IO_STREAM_SPLICE_CLOSE_STREAM2: Close the second stream after the splice.
2848 * @G_IO_STREAM_SPLICE_WAIT_FOR_BOTH: Wait for both splice operations to finish before calling the callback.
2850 * GIOStreamSpliceFlags determine how streams should be spliced.
2859 * An abstract type that specifies an icon.
2865 * @g_iface: The parent interface.
2866 * @hash: A hash for a given #GIcon.
2867 * @equal: Checks if two #GIcon<!-- -->s are equal.
2868 * @to_tokens: Serializes a #GIcon into tokens. The tokens must not contain any whitespace. Don't implement if the #GIcon can't be serialized (Since 2.20).
2869 * @from_tokens: Constructs a #GIcon from tokens. Set the #GError if the tokens are malformed. Don't implement if the #GIcon can't be serialized (Since 2.20).
2871 * GIconIface is used to implement GIcon types for various
2872 * different systems. See #GThemedIcon and #GLoadableIcon for
2873 * examples of how to implement this interface.
2880 * The <structname>GIConv</structname> struct wraps an
2881 * iconv() conversion descriptor. It contains private data
2882 * and should only be accessed using the following functions.
2889 * An IPv4 or IPv6 internet address.
2894 * GInetAddress:is-any:
2896 * Whether this is the "any" address for its family.
2897 * See g_inet_address_get_is_any().
2904 * GInetAddress:is-link-local:
2906 * Whether this is a link-local address.
2907 * See g_inet_address_get_is_link_local().
2914 * GInetAddress:is-loopback:
2916 * Whether this is the loopback address for its family.
2917 * See g_inet_address_get_is_loopback().
2924 * GInetAddress:is-mc-global:
2926 * Whether this is a global multicast address.
2927 * See g_inet_address_get_is_mc_global().
2934 * GInetAddress:is-mc-link-local:
2936 * Whether this is a link-local multicast address.
2937 * See g_inet_address_get_is_mc_link_local().
2944 * GInetAddress:is-mc-node-local:
2946 * Whether this is a node-local multicast address.
2947 * See g_inet_address_get_is_mc_node_local().
2954 * GInetAddress:is-mc-org-local:
2956 * Whether this is an organization-local multicast address.
2957 * See g_inet_address_get_is_mc_org_local().
2964 * GInetAddress:is-mc-site-local:
2966 * Whether this is a site-local multicast address.
2967 * See g_inet_address_get_is_mc_site_local().
2974 * GInetAddress:is-multicast:
2976 * Whether this is a multicast address.
2977 * See g_inet_address_get_is_multicast().
2984 * GInetAddress:is-site-local:
2986 * Whether this is a site-local address.
2987 * See g_inet_address_get_is_loopback().
2994 * GInetSocketAddress:
2996 * An IPv4 or IPv6 socket address, corresponding to a <type>struct
2997 * sockaddr_in</type> or <type>struct sockaddr_in6</type>.
3004 * Interface for initializable objects.
3012 * @g_iface: The parent interface.
3013 * @init: Initializes the object.
3015 * Provides an interface for initializing object such that initialization
3023 * GInitiallyUnowned:
3025 * All the fields in the <structname>GInitiallyUnowned</structname> structure
3026 * are private to the #GInitiallyUnowned implementation and should never be
3027 * accessed directly.
3032 * GInitiallyUnownedClass:
3034 * The class structure for the <structname>GInitiallyUnowned</structname> type.
3041 * Base class for streaming input operations.
3047 * @buffer: Pointer to a buffer where data will be written.
3048 * @size: the available size in @buffer.
3050 * Structure used for scatter/gather data input.
3051 * You generally pass in an array of #GInputVector<!-- -->s
3052 * and the operation will store the read data starting in the
3053 * first buffer, switching to the next as needed.
3060 * GInstanceInitFunc:
3061 * @instance: The instance to initialize.
3062 * @g_class: The class of the type the instance is created for.
3064 * A callback function used by the type system to initialize a new
3065 * instance of a type. This function initializes all instance members and
3066 * allocates any resources required by it.
3067 * Initialization of a derived instance involves calling all its parent
3068 * types instance initializers, so the class member of the instance
3069 * is altered during its initialization to always point to the class that
3070 * belongs to the type the current initializer was introduced for.
3075 * GInterfaceFinalizeFunc:
3076 * @g_iface: The interface structure to finalize.
3077 * @iface_data: The @interface_data supplied via the #GInterfaceInfo structure.
3079 * A callback function used by the type system to finalize an interface.
3080 * This function should destroy any internal data and release any resources
3081 * allocated by the corresponding GInterfaceInitFunc() function.
3087 * @interface_init: location of the interface initialization function
3088 * @interface_finalize: location of the interface finalization function
3089 * @interface_data: user-supplied data passed to the interface init/finalize functions
3091 * A structure that provides information to the type system which is
3092 * used specifically for managing interface types.
3097 * GInterfaceInitFunc:
3098 * @g_iface: The interface structure to initialize.
3099 * @iface_data: The @interface_data supplied via the #GInterfaceInfo structure.
3101 * A callback function used by the type system to initialize a new
3102 * interface. This function should initialize all internal data and
3103 * allocate any resources required by the interface.
3110 * Generic type for all kinds of icons that can be loaded
3116 * GLoadableIconIface:
3117 * @g_iface: The parent interface.
3118 * @load: Loads an icon.
3119 * @load_async: Loads an icon asynchronously.
3120 * @load_finish: Finishes an asynchronous icon load.
3122 * Interface for icons that can be loaded as a stream.
3129 * The <structname>GMainContext</structname> struct is an opaque data
3130 * type representing a set of sources to be handled in a main loop.
3137 * The <structname>GMainLoop</structname> struct is an opaque data type
3138 * representing the main event loop of a GLib or GTK+ application.
3144 * @G_MARKUP_ERROR_BAD_UTF8: text being parsed was not valid UTF-8
3145 * @G_MARKUP_ERROR_EMPTY: document contained nothing, or only whitespace
3146 * @G_MARKUP_ERROR_PARSE: document was ill-formed
3147 * @G_MARKUP_ERROR_UNKNOWN_ELEMENT: error should be set by #GMarkupParser functions; element wasn't known
3148 * @G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE: error should be set by #GMarkupParser functions; attribute wasn't known
3149 * @G_MARKUP_ERROR_INVALID_CONTENT: error should be set by #GMarkupParser functions; content was invalid
3150 * @G_MARKUP_ERROR_MISSING_ATTRIBUTE: error should be set by #GMarkupParser functions; a required attribute was missing
3152 * Error codes returned by markup parsing.
3157 * GMarkupParseContext:
3159 * A parse context is used to parse a stream of bytes that
3160 * you expect to contain marked-up text.
3161 * See g_markup_parse_context_new(), #GMarkupParser, and so
3162 * on for more details.
3167 * GMarkupParseFlags:
3168 * @G_MARKUP_DO_NOT_USE_THIS_UNSUPPORTED_FLAG: flag you should not use
3169 * @G_MARKUP_TREAT_CDATA_AS_TEXT: When this flag is set, CDATA marked sections are not passed literally to the @passthrough function of the parser. Instead, the content of the section (without the <literal><![CDATA[</literal> and <literal>]]></literal>) is passed to the @text function. This flag was added in GLib 2.12
3170 * @G_MARKUP_PREFIX_ERROR_POSITION: Normally errors caught by GMarkup itself have line/column information prefixed to them to let the caller know the location of the error. When this flag is set the location information is also prefixed to errors generated by the #GMarkupParser implementation functions
3172 * Flags that affect the behaviour of the parser.
3178 * @start_element: Callback to invoke when the opening tag of an element is seen.
3179 * @end_element: Callback to invoke when the closing tag of an element is seen. Note that this is also called for empty tags like <literal><empty/></literal>.
3180 * @text: Callback to invoke when some text is seen (text is always inside an element). Note that the text of an element may be spread over multiple calls of this function. If the %G_MARKUP_TREAT_CDATA_AS_TEXT flag is set, this function is also called for the content of CDATA marked sections.
3181 * @passthrough: Callback to invoke for comments, processing instructions and doctype declarations; if you're re-writing the parsed document, write the passthrough text back out in the same position. If the %G_MARKUP_TREAT_CDATA_AS_TEXT flag is not set, this function is also called for CDATA marked sections.
3182 * @error: Callback to invoke when an error occurs.
3184 * Any of the fields in #GMarkupParser can be %NULL, in which case they
3185 * will be ignored. Except for the @error function, any of these callbacks
3186 * can set an error; in particular the %G_MARKUP_ERROR_UNKNOWN_ELEMENT,
3187 * %G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE, and %G_MARKUP_ERROR_INVALID_CONTENT
3188 * errors are intended to be set from these callbacks. If you set an error
3189 * from a callback, g_markup_parse_context_parse() will report that error
3190 * back to its caller.
3196 * @malloc: function to use for allocating memory.
3197 * @realloc: function to use for reallocating memory.
3198 * @free: function to use to free memory.
3199 * @calloc: function to use for allocating zero-filled memory.
3200 * @try_malloc: function to use for allocating memory without a default error handler.
3201 * @try_realloc: function to use for reallocating memory without a default error handler.
3203 * A set of functions used to perform memory allocation. The same #GMemVTable must
3204 * be used for all allocations in the same program; a call to g_mem_set_vtable(),
3205 * if it exists, should be prior to any use of GLib.
3210 * GMemoryInputStream:
3212 * Implements #GInputStream for arbitrary memory chunks.
3217 * GMemoryOutputStream:
3219 * Implements #GOutputStream for arbitrary memory chunks.
3224 * GMemoryOutputStream:data:
3226 * Pointer to buffer where data will be written.
3233 * GMemoryOutputStream:data-size:
3235 * Size of data written to the buffer.
3242 * GMemoryOutputStream:destroy-function: (skip)
3244 * Function called with the buffer as argument when the stream is destroyed.
3251 * GMemoryOutputStream:realloc-function: (skip)
3253 * Function with realloc semantics called to enlarge the buffer.
3260 * GMemoryOutputStream:size:
3262 * Current size of the data buffer.
3271 * A handle to an object implementing the #GMountIface interface.
3277 * @mount: the object on which the signal is emitted
3279 * Emitted when the mount has been changed.
3284 * GMount::pre-unmount:
3285 * @mount: the object on which the signal is emitted
3287 * This signal is emitted when the #GMount is about to be
3295 * GMount::unmounted:
3296 * @mount: the object on which the signal is emitted
3298 * This signal is emitted when the #GMount have been
3299 * unmounted. If the recipient is holding references to the
3300 * object they should release them so the object can be
3307 * @g_iface: The parent interface.
3308 * @changed: Changed signal that is emitted when the mount's state has changed.
3309 * @unmounted: The unmounted signal that is emitted when the #GMount have been unmounted. If the recipient is holding references to the object they should release them so the object can be finalized.
3310 * @pre_unmount: The pre_unmout signal that is emitted when the #GMount will soon be emitted. If the recipient is somehow holding the mount open by keeping an open file on it it should close the file.
3311 * @get_root: Gets a #GFile to the root directory of the #GMount.
3312 * @get_name: Gets a string containing the name of the #GMount.
3313 * @get_icon: Gets a #GIcon for the #GMount.
3314 * @get_uuid: Gets the UUID for the #GMount. The reference is typically based on the file system UUID for the mount in question and should be considered an opaque string. Returns %NULL if there is no UUID available.
3315 * @get_volume: Gets a #GVolume the mount is located on. Returns %NULL if the #GMount is not associated with a #GVolume.
3316 * @get_drive: Gets a #GDrive the volume of the mount is located on. Returns %NULL if the #GMount is not associated with a #GDrive or a #GVolume. This is convenience method for getting the #GVolume and using that to get the #GDrive.
3317 * @can_unmount: Checks if a #GMount can be unmounted.
3318 * @can_eject: Checks if a #GMount can be ejected.
3319 * @unmount: Starts unmounting a #GMount.
3320 * @unmount_finish: Finishes an unmounting operation.
3321 * @eject: Starts ejecting a #GMount.
3322 * @eject_finish: Finishes an eject operation.
3323 * @remount: Starts remounting a #GMount.
3324 * @remount_finish: Finishes a remounting operation.
3325 * @guess_content_type: Starts guessing the type of the content of a #GMount. See g_mount_guess_content_type() for more information on content type guessing. This operation was added in 2.18.
3326 * @guess_content_type_finish: Finishes a contenet type guessing operation. Added in 2.18.
3327 * @guess_content_type_sync: Synchronous variant of @guess_content_type. Added in 2.18
3328 * @unmount_with_operation: Starts unmounting a #GMount using a #GMountOperation. Since 2.22.
3329 * @unmount_with_operation_finish: Finishes an unmounting operation using a #GMountOperation. Since 2.22.
3330 * @eject_with_operation: Starts ejecting a #GMount using a #GMountOperation. Since 2.22.
3331 * @eject_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22.
3332 * @get_default_location: Gets a #GFile indication a start location that can be use as the entry point for this mount. Since 2.24.
3334 * Interface for implementing operations for mounts.
3340 * @G_MOUNT_MOUNT_NONE: No flags set.
3342 * Flags used when mounting a mount.
3349 * Class for providing authentication methods for mounting operations,
3350 * such as mounting a file locally, or authenticating with a server.
3355 * GMountOperation::aborted:
3357 * Emitted by the backend when e.g. a device becomes unavailable
3358 * while a mount operation is in progress.
3359 * Implementations of GMountOperation should handle this signal
3360 * by dismissing open password dialogs.
3367 * GMountOperation::ask-password:
3368 * @op: a #GMountOperation requesting a password.
3369 * @message: string containing a message to display to the user.
3370 * @default_user: string containing the default user name.
3371 * @default_domain: string containing the default domain.
3372 * @flags: a set of #GAskPasswordFlags.
3374 * Emitted when a mount operation asks the user for a password.
3375 * If the message contains a line break, the first line should be
3376 * presented as a heading. For example, it may be used as the
3377 * primary text in a #GtkMessageDialog.
3382 * GMountOperation::ask-question:
3383 * @op: a #GMountOperation asking a question.
3384 * @message: string containing a message to display to the user.
3385 * @choices: an array of strings for each possible choice.
3387 * Emitted when asking the user a question and gives a list of
3388 * choices for the user to choose from.
3389 * If the message contains a line break, the first line should be
3390 * presented as a heading. For example, it may be used as the
3391 * primary text in a #GtkMessageDialog.
3396 * GMountOperation::reply:
3397 * @op: a #GMountOperation.
3398 * @result: a #GMountOperationResult indicating how the request was handled
3400 * Emitted when the user has replied to the mount operation.
3405 * GMountOperation::show-processes:
3406 * @op: a #GMountOperation.
3407 * @message: string containing a message to display to the user.
3408 * @processes: an array of #GPid for processes blocking the operation.
3409 * @choices: an array of strings for each possible choice.
3411 * Emitted when one or more processes are blocking an operation
3412 * e.g. unmounting/ejecting a #GMount or stopping a #GDrive.
3413 * Note that this signal may be emitted several times to update the
3414 * list of blocking processes as processes close files. The
3415 * application should only respond with g_mount_operation_reply() to
3416 * the latest signal (setting #GMountOperation:choice to the choice
3418 * If the message contains a line break, the first line should be
3419 * presented as a heading. For example, it may be used as the
3420 * primary text in a #GtkMessageDialog.
3427 * GMountOperation:anonymous:
3429 * Whether to use an anonymous user when authenticating.
3434 * GMountOperation:choice:
3436 * The index of the user's choice when a question is asked during the
3437 * mount operation. See the #GMountOperation::ask-question signal.
3442 * GMountOperation:domain:
3444 * The domain to use for the mount operation.
3449 * GMountOperation:password:
3451 * The password that is used for authentication when carrying out
3452 * the mount operation.
3457 * GMountOperation:password-save:
3459 * Determines if and how the password information should be saved.
3464 * GMountOperation:username:
3466 * The user name that is used for authentication when carrying out
3467 * the mount operation.
3472 * GMountOperationResult:
3473 * @G_MOUNT_OPERATION_HANDLED: The request was fulfilled and the user specified data is now available
3474 * @G_MOUNT_OPERATION_ABORTED: The user requested the mount operation to be aborted
3475 * @G_MOUNT_OPERATION_UNHANDLED: The request was unhandled (i.e. not implemented)
3477 * #GMountOperationResult is returned as a result when a request for
3478 * information is send by the mounting operation.
3483 * GMountUnmountFlags:
3484 * @G_MOUNT_UNMOUNT_NONE: No flags set.
3485 * @G_MOUNT_UNMOUNT_FORCE: Unmount even if there are outstanding file operations on the mount.
3487 * Flags used when an unmounting a mount.
3494 * A #GSocketConnectable for resolving a hostname and connecting to
3502 * A #GSocketConnectable for resolving a SRV record and connecting to
3510 * All the fields in the <structname>GObject</structname> structure are private
3511 * to the #GObject implementation and should never be accessed directly.
3517 * @g_type_class: the parent class
3518 * @constructor: the @constructor function is called by g_object_new () to complete the object initialization after all the construction properties are set. The first thing a @constructor implementation must do is chain up to the needed, e.g. to handle construct properties, or to implement singletons.
3519 * @set_property: the generic setter for all properties of this type. Should be overridden for every type with properties. Implementations of @set_property don't need to emit property change notification explicitly, this is handled by the type system.
3520 * @get_property: the generic getter for all properties of this type. Should be overridden for every type with properties.
3521 * @dispose: the @dispose function is supposed to drop all references to other objects, but keep the instance otherwise intact, so that client method invocations still work. It may be run multiple times (due to reference loops). Before returning, @dispose should chain up to the @dispose method of the parent class.
3522 * @finalize: instance finalization function, should finish the finalization of the instance begun in @dispose and chain up to the @finalize method of the parent class.
3523 * @dispatch_properties_changed: emits property change notification for a bunch of properties. Overriding @dispatch_properties_changed should be rarely needed.
3524 * @notify: the class closure for the notify signal
3525 * @constructed: the @constructed function is called by g_object_new() as the final step of the object creation process. At the point of the call, all construction properties have been set on the object. The purpose of this call is to allow for object initialisation steps that can only be performed after construction properties have been set. @constructed implementors should chain up to the @constructed call of their parent class to allow it to complete its initialisation.
3527 * The class structure for the <structname>GObject</structname> type.
3529 * <title>Implementing singletons using a constructor</title>
3531 * static MySingleton *the_singleton = NULL;
3533 * my_singleton_constructor (GType type,
3534 * guint n_construct_params,
3535 * GObjectConstructParam *construct_params)
3538 * if (!the_singleton)
3540 * object = G_OBJECT_CLASS (parent_class)->constructor (type,
3541 * n_construct_params,
3542 * construct_params);
3543 * the_singleton = MY_SINGLETON (object);
3546 * object = g_object_ref (G_OBJECT (the_singleton));
3549 * </programlisting></example>
3554 * GObjectConstructParam:
3555 * @pspec: the #GParamSpec of the construct parameter
3556 * @value: the value to set the parameter to
3558 * The <structname>GObjectConstructParam</structname> struct is an auxiliary
3559 * structure used to hand #GParamSpec/#GValue pairs to the @constructor of
3565 * GObjectFinalizeFunc:
3566 * @object: the #GObject being finalized
3568 * The type of the @finalize function of #GObjectClass.
3573 * GObjectGetPropertyFunc:
3574 * @object: a #GObject
3575 * @property_id: the numeric id under which the property was registered with g_object_class_install_property().
3576 * @value: a #GValue to return the property value in
3577 * @pspec: the #GParamSpec describing the property
3579 * The type of the @get_property function of #GObjectClass.
3584 * GObjectSetPropertyFunc:
3585 * @object: a #GObject
3586 * @property_id: the numeric id under which the property was registered with g_object_class_install_property().
3587 * @value: the new value for the property
3588 * @pspec: the #GParamSpec describing the property
3590 * The type of the @set_property function of #GObjectClass.
3596 * @G_OPTION_ARG_NONE: No extra argument. This is useful for simple flags.
3597 * @G_OPTION_ARG_STRING: The option takes a string argument.
3598 * @G_OPTION_ARG_INT: The option takes an integer argument.
3599 * @G_OPTION_ARG_CALLBACK: The option provides a callback to parse the extra argument.
3600 * @G_OPTION_ARG_FILENAME: The option takes a filename as argument.
3601 * @G_OPTION_ARG_STRING_ARRAY: The option takes a string argument, multiple uses of the option are collected into an array of strings.
3602 * @G_OPTION_ARG_FILENAME_ARRAY: The option takes a filename as argument, multiple uses of the option are collected into an array of strings.
3603 * @G_OPTION_ARG_DOUBLE: The option takes a double argument. The argument can be formatted either for the user's locale or for the "C" locale. Since 2.12
3604 * @G_OPTION_ARG_INT64: The option takes a 64-bit integer. Like %G_OPTION_ARG_INT but for larger numbers. The number can be in decimal base, or in hexadecimal (when prefixed with <literal>0x</literal>, for example, <literal>0xffffffff</literal>). Since 2.12
3606 * The #GOptionArg enum values determine which type of extra argument the
3607 * options expect to find. If an option expects an extra argument, it
3608 * can be specified in several ways; with a short option:
3609 * <option>-x arg</option>, with a long option: <option>--name arg</option>
3611 * Or combined in a single argument: <option>--name=arg</option>.
3617 * @option_name: The name of the option being parsed. This will be either a single dash followed by a single letter (for a short name) or two dashes followed by a long option name.
3618 * @value: The value to be parsed.
3619 * @data: User data added to the #GOptionGroup containing the option when it was created with g_option_group_new()
3620 * @error: A return location for errors. The error code %G_OPTION_ERROR_FAILED is intended to be used for errors in #GOptionArgFunc callbacks.
3622 * The type of function to be passed as callback for %G_OPTION_ARG_CALLBACK
3624 * occurred, in which case @error should be set with g_set_error()
3626 * Returns: %TRUE if the option was successfully parsed, %FALSE if an error
3633 * A <structname>GOptionContext</structname> struct defines which options
3634 * are accepted by the commandline option parser. The struct has only private
3635 * fields and should not be directly accessed.
3641 * @long_name: The long name of an option can be used to specify it in a commandline as --<replaceable>long_name</replaceable>. Every option must have a long name. To resolve conflicts if multiple option groups contain the same long name, it is also possible to specify the option as --<replaceable>groupname</replaceable>-<replaceable>long_name</replaceable>.
3642 * @short_name: If an option has a short name, it can be specified -<replaceable>short_name</replaceable> in a commandline. @short_name must be a printable ASCII character different from '-', or zero if the option has no short name.
3643 * @flags: Flags from #GOptionFlags.
3644 * @arg: The type of the option, as a #GOptionArg.
3645 * @arg_data: If the @arg type is %G_OPTION_ARG_CALLBACK, then @arg_data must point to a #GOptionArgFunc callback function, which will be called to handle the extra argument. Otherwise, @arg_data is a pointer to a location to store the value, the required type of the location depends on the @arg type: <variablelist> <varlistentry> <term>%G_OPTION_ARG_NONE</term> <listitem><para>%gboolean</para></listitem> </varlistentry> <varlistentry> <term>%G_OPTION_ARG_STRING</term> <listitem><para>%gchar*</para></listitem> </varlistentry> <varlistentry> <term>%G_OPTION_ARG_INT</term> <listitem><para>%gint</para></listitem> </varlistentry> <varlistentry> <term>%G_OPTION_ARG_FILENAME</term> <listitem><para>%gchar*</para></listitem> </varlistentry> <varlistentry> <term>%G_OPTION_ARG_STRING_ARRAY</term> <listitem><para>%gchar**</para></listitem> </varlistentry> <varlistentry> <term>%G_OPTION_ARG_FILENAME_ARRAY</term> <listitem><para>%gchar**</para></listitem> </varlistentry> <varlistentry> <term>%G_OPTION_ARG_DOUBLE</term> <listitem><para>%gdouble</para></listitem> </varlistentry> </variablelist> If @arg type is %G_OPTION_ARG_STRING or %G_OPTION_ARG_FILENAME the location will contain a newly allocated string if the option was given. That string needs to be freed by the callee using g_free(). Likewise if @arg type is %G_OPTION_ARG_STRING_ARRAY or %G_OPTION_ARG_FILENAME_ARRAY, the data should be freed using g_strfreev().
3646 * @description: the description for the option in <option>--help</option> output. The @description is translated using the @translate_func of the group, see g_option_group_set_translation_domain().
3647 * @arg_description: The placeholder to use for the extra argument parsed by the option in <option>--help</option> output. The @arg_description is translated using the @translate_func of the group, see g_option_group_set_translation_domain().
3649 * A <structname>GOptionEntry</structname> defines a single option.
3650 * To have an effect, they must be added to a #GOptionGroup with
3651 * g_option_context_add_main_entries() or g_option_group_add_entries().
3657 * @G_OPTION_ERROR_UNKNOWN_OPTION: An option was not known to the parser. This error will only be reported, if the parser hasn't been instructed to ignore unknown options, see g_option_context_set_ignore_unknown_options().
3658 * @G_OPTION_ERROR_BAD_VALUE: A value couldn't be parsed.
3659 * @G_OPTION_ERROR_FAILED: A #GOptionArgFunc callback failed.
3661 * Error codes returned by option parsing.
3667 * @context: The active #GOptionContext
3668 * @group: The group to which the function belongs
3669 * @data: User data added to the #GOptionGroup containing the option when it was created with g_option_group_new()
3670 * @error: The #GError containing details about the parse error
3672 * The type of function to be used as callback when a parse error occurs.
3678 * @G_OPTION_FLAG_HIDDEN: The option doesn't appear in <option>--help</option> output.
3679 * @G_OPTION_FLAG_IN_MAIN: The option appears in the main section of the <option>--help</option> output, even if it is defined in a group.
3680 * @G_OPTION_FLAG_REVERSE: For options of the %G_OPTION_ARG_NONE kind, this flag indicates that the sense of the option is reversed.
3681 * @G_OPTION_FLAG_NO_ARG: For options of the %G_OPTION_ARG_CALLBACK kind, this flag indicates that the callback does not take any argument (like a %G_OPTION_ARG_NONE option). Since 2.8
3682 * @G_OPTION_FLAG_FILENAME: For options of the %G_OPTION_ARG_CALLBACK kind, this flag indicates that the argument should be passed to the callback in the GLib filename encoding rather than UTF-8. Since 2.8
3683 * @G_OPTION_FLAG_OPTIONAL_ARG: For options of the %G_OPTION_ARG_CALLBACK kind, this flag indicates that the argument supply is optional. If no argument is given then data of %GOptionParseFunc will be set to NULL. Since 2.8
3684 * @G_OPTION_FLAG_NOALIAS: This flag turns off the automatic conflict resolution which prefixes long option names with <literal>groupname-</literal> if there is a conflict. This option should only be used in situations where aliasing is necessary to model some legacy commandline interface. It is not safe to use this option, unless all option groups are under your direct control. Since 2.8.
3686 * Flags which modify individual options.
3693 * A <structname>GOptionGroup</structname> struct defines the options in a single
3694 * group. The struct has only private fields and should not be directly accessed.
3695 * All options in a group share the same translation function. Libraries which
3696 * need to parse commandline options are expected to provide a function for
3697 * getting a <structname>GOptionGroup</structname> holding their options, which
3698 * the application can then add to its #GOptionContext.
3704 * @context: The active #GOptionContext
3705 * @group: The group to which the function belongs
3706 * @data: User data added to the #GOptionGroup containing the option when it was created with g_option_group_new()
3707 * @error: A return location for error details
3709 * The type of function that can be called before and after parsing.
3710 * occurred, in which case @error should be set with g_set_error()
3712 * Returns: %TRUE if the function completed successfully, %FALSE if an error
3719 * Base class for writing output.
3720 * All classes derived from GOutputStream should implement synchronous
3721 * writing, splicing, flushing and closing streams, but may implement
3722 * asynchronous versions.
3727 * GOutputStreamSpliceFlags:
3728 * @G_OUTPUT_STREAM_SPLICE_NONE: Do not close either stream.
3729 * @G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE: Close the source stream after the splice.
3730 * @G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET: Close the target stream after the splice.
3732 * GOutputStreamSpliceFlags determine how streams should be spliced.
3738 * @buffer: Pointer to a buffer of data to read.
3739 * @size: the size of @buffer.
3741 * Structure used for scatter/gather data output.
3742 * You generally pass in an array of #GOutputVector<!-- -->s
3743 * and the operation will use all the buffers as if they were
3752 * @G_PARAM_READABLE: the parameter is readable
3753 * @G_PARAM_WRITABLE: the parameter is writable
3754 * @G_PARAM_CONSTRUCT: the parameter will be set upon object construction
3755 * @G_PARAM_CONSTRUCT_ONLY: the parameter will only be set upon object construction
3756 * @G_PARAM_LAX_VALIDATION: upon parameter conversion (see g_param_value_convert()) strict validation is not required
3757 * @G_PARAM_STATIC_NAME: the string used as name when constructing the parameter is guaranteed to remain valid and unmodified for the lifetime of the parameter. Since 2.8
3758 * @G_PARAM_STATIC_NICK: the string used as nick when constructing the parameter is guaranteed to remain valid and unmmodified for the lifetime of the parameter. Since 2.8
3759 * @G_PARAM_STATIC_BLURB: the string used as blurb when constructing the parameter is guaranteed to remain valid and unmodified for the lifetime of the parameter. Since 2.8
3760 * @G_PARAM_PRIVATE: internal
3761 * @G_PARAM_DEPRECATED: the parameter is deprecated and will be removed in a future version. A warning will be generated if it is used while running with G_ENABLE_DIAGNOSTIC=1. Since: 2.26
3763 * Through the #GParamFlags flag values, certain aspects of parameters
3764 * can be configured.
3770 * @g_type_instance: private #GTypeInstance portion
3771 * @name: name of this parameter
3772 * @flags: #GParamFlags flags for this parameter
3773 * @value_type: the #GValue type for this parameter
3774 * @owner_type: #GType type that uses (introduces) this parameter
3776 * All other fields of the <structname>GParamSpec</structname> struct are private and
3777 * should not be used directly.
3782 * GParamSpecBoolean:
3783 * @parent_instance: private #GParamSpec portion
3784 * @default_value: default value for the property specified
3786 * A #GParamSpec derived structure that contains the meta data for boolean properties.
3792 * @parent_instance: private #GParamSpec portion
3794 * A #GParamSpec derived structure that contains the meta data for boxed properties.
3800 * @parent_instance: private #GParamSpec portion
3801 * @minimum: minimum value for the property specified
3802 * @maximum: maximum value for the property specified
3803 * @default_value: default value for the property specified
3805 * A #GParamSpec derived structure that contains the meta data for character properties.
3811 * @g_type_class: the parent class
3812 * @value_type: the #GValue type for this parameter
3813 * @finalize: The instance finalization function (optional), should chain up to the finalize method of the parent class.
3814 * @value_set_default: Resets a @value to the default value for this type (recommended, the default is g_value_reset()), see g_param_value_set_default().
3815 * @value_validate: Ensures that the contents of @value comply with the specifications set out by this type (optional), see g_param_value_set_validate().
3816 * @values_cmp: Compares @value1 with @value2 according to this type (recommended, the default is memcmp()), see g_param_values_cmp().
3818 * The class structure for the <structname>GParamSpec</structname> type.
3819 * Normally, <structname>GParamSpec</structname> classes are filled by
3820 * g_param_type_register_static().
3826 * @parent_instance: private #GParamSpec portion
3827 * @minimum: minimum value for the property specified
3828 * @maximum: maximum value for the property specified
3829 * @default_value: default value for the property specified
3830 * @epsilon: values closer than @epsilon will be considered identical by g_param_values_cmp(); the default value is 1e-90.
3832 * A #GParamSpec derived structure that contains the meta data for double properties.
3838 * @parent_instance: private #GParamSpec portion
3839 * @enum_class: the #GEnumClass for the enum
3840 * @default_value: default value for the property specified
3842 * A #GParamSpec derived structure that contains the meta data for enum
3849 * @parent_instance: private #GParamSpec portion
3850 * @flags_class: the #GFlagsClass for the flags
3851 * @default_value: default value for the property specified
3853 * A #GParamSpec derived structure that contains the meta data for flags
3860 * @parent_instance: private #GParamSpec portion
3861 * @minimum: minimum value for the property specified
3862 * @maximum: maximum value for the property specified
3863 * @default_value: default value for the property specified
3864 * @epsilon: values closer than @epsilon will be considered identical by g_param_values_cmp(); the default value is 1e-30.
3866 * A #GParamSpec derived structure that contains the meta data for float properties.
3872 * @parent_instance: private #GParamSpec portion
3873 * @is_a_type: a #GType whose subtypes can occur as values
3875 * A #GParamSpec derived structure that contains the meta data for #GType properties.
3883 * @parent_instance: private #GParamSpec portion
3884 * @minimum: minimum value for the property specified
3885 * @maximum: maximum value for the property specified
3886 * @default_value: default value for the property specified
3888 * A #GParamSpec derived structure that contains the meta data for integer properties.
3894 * @parent_instance: private #GParamSpec portion
3895 * @minimum: minimum value for the property specified
3896 * @maximum: maximum value for the property specified
3897 * @default_value: default value for the property specified
3899 * A #GParamSpec derived structure that contains the meta data for 64bit integer properties.
3905 * @parent_instance: private #GParamSpec portion
3906 * @minimum: minimum value for the property specified
3907 * @maximum: maximum value for the property specified
3908 * @default_value: default value for the property specified
3910 * A #GParamSpec derived structure that contains the meta data for long integer properties.
3916 * @parent_instance: private #GParamSpec portion
3918 * A #GParamSpec derived structure that contains the meta data for object properties.
3923 * GParamSpecOverride:
3925 * This is a type of #GParamSpec type that simply redirects operations to
3926 * another paramspec. All operations other than getting or
3927 * setting the value are redirected, including accessing the nick and
3928 * blurb, validating a value, and so forth. See
3929 * g_param_spec_get_redirect_target() for retrieving the overidden
3930 * property. #GParamSpecOverride is used in implementing
3931 * g_object_class_override_property(), and will not be directly useful
3932 * unless you are implementing a new base type similar to GObject.
3940 * @parent_instance: private #GParamSpec portion
3942 * A #GParamSpec derived structure that contains the meta data for %G_TYPE_PARAM
3948 * GParamSpecPointer:
3949 * @parent_instance: private #GParamSpec portion
3951 * A #GParamSpec derived structure that contains the meta data for pointer properties.
3957 * @parent_instance: private #GParamSpec portion
3958 * @default_value: default value for the property specified
3959 * @cset_first: a string containing the allowed values for the first byte
3960 * @cset_nth: a string containing the allowed values for the subsequent bytes
3961 * @substitutor: the replacement byte for bytes which don't match @cset_first or @cset_nth.
3962 * @null_fold_if_empty: replace empty string by %NULL
3963 * @ensure_non_null: replace %NULL strings by an empty string
3965 * A #GParamSpec derived structure that contains the meta data for string
3971 * GParamSpecTypeInfo:
3972 * @instance_size: Size of the instance (object) structure.
3973 * @n_preallocs: Prior to GLib 2.10, it specified the number of pre-allocated (cached) instances to reserve memory for (0 indicates no caching). Since GLib 2.10, it is ignored, since instances are allocated with the <link linkend="glib-Memory-Slices">slice allocator</link> now.
3974 * @instance_init: Location of the instance initialization function (optional).
3975 * @value_type: The #GType of values conforming to this #GParamSpec
3976 * @finalize: The instance finalization function (optional).
3977 * @value_set_default: Resets a @value to the default value for @pspec (recommended, the default is g_value_reset()), see g_param_value_set_default().
3978 * @value_validate: Ensures that the contents of @value comply with the specifications set out by @pspec (optional), see g_param_value_set_validate().
3979 * @values_cmp: Compares @value1 with @value2 according to @pspec (recommended, the default is memcmp()), see g_param_values_cmp().
3981 * This structure is used to provide the type system with the information
3982 * required to initialize and destruct (finalize) a parameter's class and
3983 * instances thereof.
3984 * The initialized structure is passed to the g_param_type_register_static()
3985 * The type system will perform a deep copy of this structure, so its memory
3986 * does not need to be persistent across invocation of
3987 * g_param_type_register_static().
3993 * @parent_instance: private #GParamSpec portion
3994 * @minimum: minimum value for the property specified
3995 * @maximum: maximum value for the property specified
3996 * @default_value: default value for the property specified
3998 * A #GParamSpec derived structure that contains the meta data for unsigned character properties.
4004 * @parent_instance: private #GParamSpec portion
4005 * @minimum: minimum value for the property specified
4006 * @maximum: maximum value for the property specified
4007 * @default_value: default value for the property specified
4009 * A #GParamSpec derived structure that contains the meta data for unsigned integer properties.
4015 * @parent_instance: private #GParamSpec portion
4016 * @minimum: minimum value for the property specified
4017 * @maximum: maximum value for the property specified
4018 * @default_value: default value for the property specified
4020 * A #GParamSpec derived structure that contains the meta data for unsigned 64bit integer properties.
4026 * @parent_instance: private #GParamSpec portion
4027 * @minimum: minimum value for the property specified
4028 * @maximum: maximum value for the property specified
4029 * @default_value: default value for the property specified
4031 * A #GParamSpec derived structure that contains the meta data for unsigned long integer properties.
4036 * GParamSpecUnichar:
4037 * @parent_instance: private #GParamSpec portion
4038 * @default_value: default value for the property specified
4040 * A #GParamSpec derived structure that contains the meta data for unichar (unsigned integer) properties.
4045 * GParamSpecValueArray:
4046 * @parent_instance: private #GParamSpec portion
4047 * @element_spec: a #GParamSpec describing the elements contained in arrays of this property, may be %NULL
4048 * @fixed_n_elements: if greater than 0, arrays of this property will always have this many elements
4050 * A #GParamSpec derived structure that contains the meta data for #GValueArray properties.
4055 * GParamSpecVariant:
4056 * @parent_instance: private #GParamSpec portion
4057 * @type: a #GVariantType, or %NULL
4058 * @default_value: a #GVariant, or %NULL
4060 * A #GParamSpec derived structure that contains the meta data for #GVariant properties.
4068 * @name: the parameter name
4069 * @value: the parameter value
4071 * The <structname>GParameter</structname> struct is an auxiliary structure used
4072 * to hand parameter name/value pairs to g_object_newv().
4078 * @G_PASSWORD_SAVE_NEVER: never save a password.
4079 * @G_PASSWORD_SAVE_FOR_SESSION: save a password for the session.
4080 * @G_PASSWORD_SAVE_PERMANENTLY: save a password permanently.
4082 * #GPasswordSave is used to indicate the lifespan of a saved password.
4083 * #Gvfs stores passwords in the Gnome keyring when this flag allows it
4084 * to, and later retrieves it again from there.
4091 * #GPermission is an opaque data structure and can only be accessed
4092 * using the following functions.
4097 * GPermission:allowed:
4099 * %TRUE if the caller currently has permission to perform the action that
4104 * GPermission:can-acquire:
4106 * %TRUE if it is generally possible to acquire the permission by calling
4107 * g_permission_acquire().
4112 * GPermission:can-release:
4114 * %TRUE if it is generally possible to release the permission by calling
4115 * g_permission_release().
4122 * A type which is used to hold a process identification.
4123 * On UNIX, processes are identified by a process id (an integer),
4124 * while Windows uses process handles (which are pointers).
4130 * @fd: the file descriptor to poll (or a <type>HANDLE</type> on Win32)
4131 * @events: a bitwise combination from #GIOCondition, specifying which events should be polled for. Typically for reading from a file descriptor you would use %G_IO_IN | %G_IO_HUP | %G_IO_ERR, and for writing you would use %G_IO_OUT | %G_IO_ERR.
4132 * @revents: a bitwise combination of flags from #GIOCondition, returned from the poll() function to indicate which events occurred.
4140 * @ufds: an array of #GPollFD elements
4141 * @nfsd: the number of elements in @ufds
4142 * @timeout_: the maximum time to wait for an event of the file descriptors. A negative value indicates an infinite timeout.
4144 * Specifies the type of function passed to g_main_context_set_poll_func().
4145 * The semantics of the function should match those of the poll() system call.
4146 * reported, or -1 if an error occurred.
4148 * Returns: the number of #GPollFD elements which have events or errors
4153 * GPollableInputStream:
4155 * An interface for a #GInputStream that can be polled for readability.
4162 * GPollableInputStreamInterface:
4163 * @g_iface: The parent interface.
4164 * @can_poll: Checks if the #GPollableInputStream instance is actually pollable
4165 * @is_readable: Checks if the stream is readable
4166 * @create_source: Creates a #GSource to poll the stream
4167 * @read_nonblocking: Does a non-blocking read or returns %G_IO_ERROR_WOULD_BLOCK
4169 * The interface for pollable input streams.
4170 * The default implementation of @can_poll always returns %TRUE.
4171 * The default implementation of @read_nonblocking calls
4172 * g_pollable_input_stream_is_readable(), and then calls
4173 * g_input_stream_read() if it returns %TRUE. This means you only need
4174 * to override it if it is possible that your @is_readable
4175 * implementation may return %TRUE when the stream is not actually
4183 * GPollableOutputStream:
4185 * An interface for a #GOutputStream that can be polled for readability.
4192 * GPollableOutputStreamInterface:
4193 * @g_iface: The parent interface.
4194 * @can_poll: Checks if the #GPollableOutputStream instance is actually pollable
4195 * @is_writable: Checks if the stream is writable
4196 * @create_source: Creates a #GSource to poll the stream
4197 * @write_nonblocking: Does a non-blocking write or returns %G_IO_ERROR_WOULD_BLOCK
4199 * The interface for pollable output streams.
4200 * The default implementation of @can_poll always returns %TRUE.
4201 * The default implementation of @write_nonblocking calls
4202 * g_pollable_output_stream_is_writable(), and then calls
4203 * g_output_stream_write() if it returns %TRUE. This means you only
4204 * need to override it if it is possible that your @is_writable
4205 * implementation may return %TRUE when the stream is not actually
4213 * GPollableSourceFunc:
4214 * @pollable_stream: the #GPollableInputStream or #GPollableOutputStream
4215 * @user_data: data passed in by the user.
4217 * This is the function type of the callback used for the #GSource
4218 * returned by g_pollable_input_stream_create_source() and
4219 * g_pollable_output_stream_create_source().
4221 * Returns: it should return %FALSE if the source should be removed.
4229 * Interface that handles proxy connection and payload.
4238 * A #GInetSocketAddress representing a connection via a proxy server
4245 * GProxyAddressEnumerator:
4247 * A subclass of #GSocketAddressEnumerator that takes another address
4248 * enumerator and wraps its results in #GProxyAddress<!-- -->es as
4249 * directed by the default #GProxyResolver.
4255 * @g_iface: The parent interface.
4256 * @connect: Connect to proxy server and wrap (if required) the #connection to handle payload.
4257 * @connect_async: Same has connect() but asynchronous.
4258 * @connect_finish: Returns the result of connect_async()
4260 * Provides an interface for handling proxy connection and payload.
4269 * Interface that can be used to resolve proxy address.
4275 * @data: memory block to reallocate
4276 * @size: size to reallocate @data to
4278 * Changes the size of the memory block pointed to by @data to
4279 * The function should have the same semantics as realloc().
4281 * Returns: a pointer to the reallocated memory
4288 * A GRegex is the "compiled" form of a regular expression pattern. This
4289 * structure is opaque and its fields cannot be accessed directly.
4296 * GRegexCompileFlags:
4297 * @G_REGEX_CASELESS: Letters in the pattern match both upper- and lowercase letters. This option can be changed within a pattern by a "(?i)" option setting.
4298 * @G_REGEX_MULTILINE: By default, GRegex treats the strings as consisting of a single line of characters (even if it actually contains newlines). The "start of line" metacharacter ("^") matches only at the start of the string, while the "end of line" metacharacter ("$") matches only at the end of the string, or before a terminating newline (unless #G_REGEX_DOLLAR_ENDONLY is set). When #G_REGEX_MULTILINE is set, the "start of line" and "end of line" constructs match immediately following or immediately before any newline in the string, respectively, as well as at the very start and end. This can be changed within a pattern by a "(?m)" option setting.
4299 * @G_REGEX_DOTALL: A dot metacharater (".") in the pattern matches all characters, including newlines. Without it, newlines are excluded. This option can be changed within a pattern by a ("?s") option setting.
4300 * @G_REGEX_EXTENDED: Whitespace data characters in the pattern are totally ignored except when escaped or inside a character class. Whitespace does not include the VT character (code 11). In addition, characters between an unescaped "#" outside a character class and the next newline character, inclusive, are also ignored. This can be changed within a pattern by a "(?x)" option setting.
4301 * @G_REGEX_ANCHORED: The pattern is forced to be "anchored", that is, it is constrained to match only at the first matching point in the string that is being searched. This effect can also be achieved by appropriate constructs in the pattern itself such as the "^" metacharater.
4302 * @G_REGEX_DOLLAR_ENDONLY: A dollar metacharacter ("$") in the pattern matches only at the end of the string. Without this option, a dollar also matches immediately before the final character if it is a newline (but not before any other newlines). This option is ignored if #G_REGEX_MULTILINE is set.
4303 * @G_REGEX_UNGREEDY: Inverts the "greediness" of the quantifiers so that they are not greedy by default, but become greedy if followed by "?". It can also be set by a "(?U)" option setting within the pattern.
4304 * @G_REGEX_RAW: Usually strings must be valid UTF-8 strings, using this flag they are considered as a raw sequence of bytes.
4305 * @G_REGEX_NO_AUTO_CAPTURE: Disables the use of numbered capturing parentheses in the pattern. Any opening parenthesis that is not followed by "?" behaves as if it were followed by "?:" but named parentheses can still be used for capturing (and they acquire numbers in the usual way).
4306 * @G_REGEX_OPTIMIZE: Optimize the regular expression. If the pattern will be used many times, then it may be worth the effort to optimize it to improve the speed of matches.
4307 * @G_REGEX_DUPNAMES: Names used to identify capturing subpatterns need not be unique. This can be helpful for certain types of pattern when it is known that only one instance of the named subpattern can ever be matched.
4308 * @G_REGEX_NEWLINE_CR: Usually any newline character is recognized, if this option is set, the only recognized newline character is '\r'.
4309 * @G_REGEX_NEWLINE_LF: Usually any newline character is recognized, if this option is set, the only recognized newline character is '\n'.
4310 * @G_REGEX_NEWLINE_CRLF: Usually any newline character is recognized, if this option is set, the only recognized newline character sequence is '\r\n'.
4312 * Flags specifying compile-time options.
4320 * @G_REGEX_ERROR_COMPILE: Compilation of the regular expression failed.
4321 * @G_REGEX_ERROR_OPTIMIZE: Optimization of the regular expression failed.
4322 * @G_REGEX_ERROR_REPLACE: Replacement failed due to an ill-formed replacement string.
4323 * @G_REGEX_ERROR_MATCH: The match process failed.
4324 * @G_REGEX_ERROR_INTERNAL: Internal error of the regular expression engine. Since 2.16
4325 * @G_REGEX_ERROR_STRAY_BACKSLASH: "\\" at end of pattern. Since 2.16
4326 * @G_REGEX_ERROR_MISSING_CONTROL_CHAR: "\\c" at end of pattern. Since 2.16
4327 * @G_REGEX_ERROR_UNRECOGNIZED_ESCAPE: Unrecognized character follows "\\". Since 2.16
4328 * @G_REGEX_ERROR_QUANTIFIERS_OUT_OF_ORDER: Numbers out of order in "{}" quantifier. Since 2.16
4329 * @G_REGEX_ERROR_QUANTIFIER_TOO_BIG: Number too big in "{}" quantifier. Since 2.16
4330 * @G_REGEX_ERROR_UNTERMINATED_CHARACTER_CLASS: Missing terminating "]" for character class. Since 2.16
4331 * @G_REGEX_ERROR_INVALID_ESCAPE_IN_CHARACTER_CLASS: Invalid escape sequence in character class. Since 2.16
4332 * @G_REGEX_ERROR_RANGE_OUT_OF_ORDER: Range out of order in character class. Since 2.16
4333 * @G_REGEX_ERROR_NOTHING_TO_REPEAT: Nothing to repeat. Since 2.16
4334 * @G_REGEX_ERROR_UNRECOGNIZED_CHARACTER: Unrecognized character after "(?", "(?<" or "(?P". Since 2.16
4335 * @G_REGEX_ERROR_POSIX_NAMED_CLASS_OUTSIDE_CLASS: POSIX named classes are supported only within a class. Since 2.16
4336 * @G_REGEX_ERROR_UNMATCHED_PARENTHESIS: Missing terminating ")" or ")" without opening "(". Since 2.16
4337 * @G_REGEX_ERROR_INEXISTENT_SUBPATTERN_REFERENCE: Reference to non-existent subpattern. Since 2.16
4338 * @G_REGEX_ERROR_UNTERMINATED_COMMENT: Missing terminating ")" after comment. Since 2.16
4339 * @G_REGEX_ERROR_EXPRESSION_TOO_LARGE: Regular expression too large. Since 2.16
4340 * @G_REGEX_ERROR_MEMORY_ERROR: Failed to get memory. Since 2.16
4341 * @G_REGEX_ERROR_VARIABLE_LENGTH_LOOKBEHIND: Lookbehind assertion is not fixed length. Since 2.16
4342 * @G_REGEX_ERROR_MALFORMED_CONDITION: Malformed number or name after "(?(". Since 2.16
4343 * @G_REGEX_ERROR_TOO_MANY_CONDITIONAL_BRANCHES: Conditional group contains more than two branches. Since 2.16
4344 * @G_REGEX_ERROR_ASSERTION_EXPECTED: Assertion expected after "(?(". Since 2.16
4345 * @G_REGEX_ERROR_UNKNOWN_POSIX_CLASS_NAME: Unknown POSIX class name. Since 2.16
4346 * @G_REGEX_ERROR_POSIX_COLLATING_ELEMENTS_NOT_SUPPORTED: POSIX collating elements are not supported. Since 2.16
4347 * @G_REGEX_ERROR_HEX_CODE_TOO_LARGE: Character value in "\\x{...}" sequence is too large. Since 2.16
4348 * @G_REGEX_ERROR_INVALID_CONDITION: Invalid condition "(?(0)". Since 2.16
4349 * @G_REGEX_ERROR_SINGLE_BYTE_MATCH_IN_LOOKBEHIND: \\C not allowed in lookbehind assertion. Since 2.16
4350 * @G_REGEX_ERROR_INFINITE_LOOP: Recursive call could loop indefinitely. Since 2.16
4351 * @G_REGEX_ERROR_MISSING_SUBPATTERN_NAME_TERMINATOR: Missing terminator in subpattern name. Since 2.16
4352 * @G_REGEX_ERROR_DUPLICATE_SUBPATTERN_NAME: Two named subpatterns have the same name. Since 2.16
4353 * @G_REGEX_ERROR_MALFORMED_PROPERTY: Malformed "\\P" or "\\p" sequence. Since 2.16
4354 * @G_REGEX_ERROR_UNKNOWN_PROPERTY: Unknown property name after "\\P" or "\\p". Since 2.16
4355 * @G_REGEX_ERROR_SUBPATTERN_NAME_TOO_LONG: Subpattern name is too long (maximum 32 characters). Since 2.16
4356 * @G_REGEX_ERROR_TOO_MANY_SUBPATTERNS: Too many named subpatterns (maximum 10,000). Since 2.16
4357 * @G_REGEX_ERROR_INVALID_OCTAL_VALUE: Octal value is greater than "\\377". Since 2.16
4358 * @G_REGEX_ERROR_TOO_MANY_BRANCHES_IN_DEFINE: "DEFINE" group contains more than one branch. Since 2.16
4359 * @G_REGEX_ERROR_DEFINE_REPETION: Repeating a "DEFINE" group is not allowed. Since 2.16
4360 * @G_REGEX_ERROR_INCONSISTENT_NEWLINE_OPTIONS: Inconsistent newline options. Since 2.16
4361 * @G_REGEX_ERROR_MISSING_BACK_REFERENCE: "\\g" is not followed by a braced name or an optionally braced non-zero number. Since 2.16
4363 * Error codes returned by regular expressions functions.
4370 * GRegexEvalCallback:
4371 * @match_info: the #GMatchInfo generated by the match. Use g_match_info_get_regex() and g_match_info_get_string() if you need the #GRegex or the matched string.
4372 * @result: a #GString containing the new string
4373 * @user_data: user data passed to g_regex_replace_eval()
4375 * Specifies the type of the function passed to g_regex_replace_eval().
4376 * It is called for each occurance of the pattern in the string passed
4377 * to g_regex_replace_eval(), and it should append the replacement to
4379 * Returns: %FALSE to continue the replacement process, %TRUE to stop it
4386 * @G_REGEX_MATCH_ANCHORED: The pattern is forced to be "anchored", that is, it is constrained to match only at the first matching point in the string that is being searched. This effect can also be achieved by appropriate constructs in the pattern itself such as the "^" metacharater.
4387 * @G_REGEX_MATCH_NOTBOL: Specifies that first character of the string is not the beginning of a line, so the circumflex metacharacter should not match before it. Setting this without #G_REGEX_MULTILINE (at compile time) causes circumflex never to match. This option affects only the behaviour of the circumflex metacharacter, it does not affect "\A".
4388 * @G_REGEX_MATCH_NOTEOL: Specifies that the end of the subject string is not the end of a line, so the dollar metacharacter should not match it nor (except in multiline mode) a newline immediately before it. Setting this without #G_REGEX_MULTILINE (at compile time) causes dollar never to match. This option affects only the behaviour of the dollar metacharacter, it does not affect "\Z" or "\z".
4389 * @G_REGEX_MATCH_NOTEMPTY: An empty string is not considered to be a valid match if this option is set. If there are alternatives in the pattern, they are tried. If all the alternatives match the empty string, the entire match fails. For example, if the pattern "a?b?" is applied to a string not beginning with "a" or "b", it matches the empty string at the start of the string. With this flag set, this match is not valid, so GRegex searches further into the string for occurrences of "a" or "b".
4390 * @G_REGEX_MATCH_PARTIAL: Turns on the partial matching feature, for more documentation on partial matching see g_match_info_is_partial_match().
4391 * @G_REGEX_MATCH_NEWLINE_CR: Overrides the newline definition set when creating a new #GRegex, setting the '\r' character as line terminator.
4392 * @G_REGEX_MATCH_NEWLINE_LF: Overrides the newline definition set when creating a new #GRegex, setting the '\n' character as line terminator.
4393 * @G_REGEX_MATCH_NEWLINE_CRLF: Overrides the newline definition set when creating a new #GRegex, setting the '\r\n' characters as line terminator.
4394 * @G_REGEX_MATCH_NEWLINE_ANY: Overrides the newline definition set when creating a new #GRegex, any newline character or character sequence is recognized.
4396 * Flags specifying match-time options.
4405 * The object that handles DNS resolution. Use g_resolver_get_default()
4406 * to get the default resolver.
4411 * GResolver::reload:
4412 * @resolver: a #GResolver
4414 * Emitted when the resolver notices that the system resolver
4415 * configuration has changed.
4421 * @G_RESOLVER_ERROR_NOT_FOUND: the requested name/address/service was not found
4422 * @G_RESOLVER_ERROR_TEMPORARY_FAILURE: the requested information could not be looked up due to a network error or similar problem
4423 * @G_RESOLVER_ERROR_INTERNAL: unknown error
4425 * An error code used with %G_RESOLVER_ERROR in a #GError returned
4426 * from a #GResolver routine.
4435 * Seek object for streaming operations.
4441 * @g_iface: The parent interface.
4442 * @tell: Tells the current location within a stream.
4443 * @can_seek: Checks if seeking is supported by the stream.
4444 * @seek: Seeks to a location within a stream.
4445 * @can_truncate: Chekcs if truncation is suppored by the stream.
4446 * @truncate_fn: Truncates a stream.
4448 * Provides an interface for implementing seekable functionality on I/O Streams.
4453 * GSettings::change-event:
4454 * @settings: the object on which the signal was emitted
4455 * @keys: (array length=n_keys) (element-type GQuark) (allow-none): an array of #GQuark<!-- -->s for the changed keys, or %NULL
4456 * @n_keys: the length of the @keys array, or 0
4457 * @returns: %TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.
4459 * The "change-event" signal is emitted once per change event that
4460 * affects this settings object. You should connect to this signal
4461 * only if you are interested in viewing groups of changes before they
4462 * are split out into multiple emissions of the "changed" signal.
4463 * For most use cases it is more appropriate to use the "changed" signal.
4464 * In the event that the change event applies to one or more specified
4465 * keys, @keys will be an array of #GQuark of length @n_keys. In the
4466 * event that the change event applies to the #GSettings object as a
4467 * be %NULL and @n_keys will be 0.
4468 * The default handler for this signal invokes the "changed" signal
4469 * for each affected key. If any other connected handler returns
4470 * %TRUE then this default functionality will be supressed.
4472 * Whole (ie: potentially every key has been changed) then @keys will
4477 * GSettings::changed:
4478 * @settings: the object on which the signal was emitted
4479 * @key: the name of the key that changed
4481 * The "changed" signal is emitted when a key has potentially changed.
4482 * You should call one of the g_settings_get() calls to check the new
4484 * This signal supports detailed connections. You can connect to the
4485 * detailed signal "changed::x" in order to only receive callbacks
4486 * when key "x" changes.
4491 * GSettings::writable-change-event:
4492 * @settings: the object on which the signal was emitted
4493 * @key: the quark of the key, or 0
4494 * @returns: %TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.
4496 * The "writable-change-event" signal is emitted once per writability
4497 * change event that affects this settings object. You should connect
4498 * to this signal if you are interested in viewing groups of changes
4499 * before they are split out into multiple emissions of the
4500 * "writable-changed" signal. For most use cases it is more
4501 * appropriate to use the "writable-changed" signal.
4502 * In the event that the writability change applies only to a single
4503 * key, @key will be set to the #GQuark for that key. In the event
4504 * that the writability change affects the entire settings object,
4505 * The default handler for this signal invokes the "writable-changed"
4506 * and "changed" signals for each affected key. This is done because
4507 * changes in writability might also imply changes in value (if for
4508 * example, a new mandatory setting is introduced). If any other
4509 * connected handler returns %TRUE then this default functionality
4510 * will be supressed.
4515 * GSettings::writable-changed:
4516 * @settings: the object on which the signal was emitted
4519 * The "writable-changed" signal is emitted when the writability of a
4520 * key has potentially changed. You should call
4521 * g_settings_is_writable() in order to determine the new status.
4522 * This signal supports detailed connections. You can connect to the
4523 * detailed signal "writable-changed::x" in order to only receive
4524 * callbacks when the writability of "x" changes.
4529 * GSettings:context:
4531 * The name of the context that the settings are stored in.
4536 * GSettings:delay-apply:
4538 * Whether the #GSettings object is in 'delay-apply' mode. See
4539 * g_settings_delay() for details.
4546 * GSettings:has-unapplied:
4548 * If this property is %TRUE, the #GSettings object has outstanding
4549 * changes that will be applied when g_settings_apply() is called.
4556 * The path within the backend where the settings are stored.
4563 * The name of the schema that describes the types of keys
4564 * for this #GSettings object.
4571 * An implementation of a settings storage repository.
4576 * GSettingsBindFlags:
4577 * @G_SETTINGS_BIND_DEFAULT: Equivalent to <literal>G_SETTINGS_BIND_GET|G_SETTINGS_BIND_SET</literal>
4578 * @G_SETTINGS_BIND_GET: Update the #GObject property when the setting changes. It is an error to use this flag if the property is not writable.
4579 * @G_SETTINGS_BIND_SET: Update the setting when the #GObject property changes. It is an error to use this flag if the property is not readable.
4580 * @G_SETTINGS_BIND_NO_SENSITIVITY: Do not try to bind a "sensitivity" property to the writability of the setting
4581 * @G_SETTINGS_BIND_GET_NO_CHANGES: When set in addition to #G_SETTINGS_BIND_GET, set the #GObject property value initially from the setting, but do not listen for changes of the setting
4582 * @G_SETTINGS_BIND_INVERT_BOOLEAN: When passed to g_settings_bind(), uses a pair of mapping functions that invert the boolean value when mapping between the setting and the property. The setting and property must both be booleans. You can not pass this flag to g_settings_bind_with_mapping().
4584 * Flags used when creating a binding. These flags determine in which
4585 * direction the binding works. The default is to synchronize in both
4591 * GSettingsBindGetMapping:
4592 * @value: return location for the property value
4593 * @variant: the #GVariant
4594 * @user_data: user data that was specified when the binding was created
4595 * @returns: %TRUE if the conversion succeeded, %FALSE in case of an error
4597 * The type for the function that is used to convert from #GSettings to
4598 * an object property. The @value is already initialized to hold values
4599 * of the appropriate type.
4604 * GSettingsBindSetMapping:
4605 * @value: a #GValue containing the property value to map
4606 * @expected_type: the #GVariantType to create
4607 * @user_data: user data that was specified when the binding was created
4608 * @returns: a new #GVariant holding the data from @value, or %NULL in case of an error
4610 * The type for the function that is used to convert an object property
4611 * value to a #GVariant for storing it in #GSettings.
4616 * GSettingsGetMapping:
4617 * @value: the #GVariant to map, or %NULL
4618 * @result: (out): the result of the mapping
4619 * @user_data: (closure): the user data that was passed to g_settings_get_mapped()
4620 * @returns: %TRUE if the conversion succeeded, %FALSE in case of an error
4622 * The type of the function that is used to convert from a value stored
4623 * in a #GSettings to a value that is useful to the application.
4624 * If the value is successfully mapped, the result should be stored at
4625 * is not in the right format) then %FALSE should be returned.
4626 * If @value is %NULL then it means that the mapping function is being
4627 * given a "last chance" to successfully return a valid value. %TRUE
4628 * must be returned in this case.
4633 * GSignalAccumulator:
4634 * @ihint: Signal invocation hint, see #GSignalInvocationHint.
4635 * @return_accu: Accumulator to collect callback return values in, this is the return value of the current signal emission.
4636 * @handler_return: A #GValue holding the return value of the signal handler.
4637 * @data: Callback data that was specified when creating the signal.
4639 * The signal accumulator is a special callback function that can be used
4640 * to collect return values of the various callbacks that are called
4641 * during a signal emission. The signal accumulator is specified at signal
4642 * creation time, if it is left %NULL, no accumulation of callback return
4643 * values is performed. The return value of signal emissions is then the
4644 * value returned by the last callback.
4645 * should be aborted. Returning %FALSE means to abort the
4646 * current emission and %TRUE is returned for continuation.
4648 * Returns: The accumulator function returns whether the signal emission
4653 * GSignalCMarshaller:
4655 * This is the signature of marshaller functions, required to marshall
4656 * arrays of parameter values to signal emissions into C language callback
4657 * invocations. It is merely an alias to #GClosureMarshal since the #GClosure
4658 * mechanism takes over responsibility of actual function invocation for the
4664 * GSignalEmissionHook:
4665 * @ihint: Signal invocation hint, see #GSignalInvocationHint.
4666 * @n_param_values: the number of parameters to the function, including the instance on which the signal was emitted.
4667 * @param_values: the instance on which the signal was emitted, followed by the parameters of the emission.
4668 * @data: user data associated with the hook.
4670 * A simple function pointer to get invoked when the signal is emitted. This
4671 * allows you to tie a hook to the signal type, so that it will trap all
4672 * emissions of that signal, from any object.
4673 * You may not attach these to signals created with the #G_SIGNAL_NO_HOOKS flag.
4674 * hook is disconnected (and destroyed).
4676 * Returns: whether it wants to stay connected. If it returns %FALSE, the signal
4682 * @G_SIGNAL_RUN_FIRST: Invoke the object method handler in the first emission stage.
4683 * @G_SIGNAL_RUN_LAST: Invoke the object method handler in the third emission stage.
4684 * @G_SIGNAL_RUN_CLEANUP: Invoke the object method handler in the last emission stage.
4685 * @G_SIGNAL_NO_RECURSE: Signals being emitted for an object while currently being in emission for this very object will not be emitted recursively, but instead cause the first emission to be restarted.
4686 * @G_SIGNAL_DETAILED: This signal supports "::detail" appendices to the signal name upon handler connections and emissions.
4687 * @G_SIGNAL_ACTION: Action signals are signals that may freely be emitted on alive objects from user code via g_signal_emit() and friends, without the need of being embedded into extra code that performs pre or post emission adjustments on the object. They can also be thought of as object methods which can be called generically by third-party code.
4688 * @G_SIGNAL_NO_HOOKS: No emissions hooks are supported for this signal.
4690 * The signal flags are used to specify a signal's behaviour, the overall
4691 * signal description outlines how especially the RUN flags control the
4692 * stages of a signal emission.
4697 * GSignalInvocationHint:
4698 * @signal_id: The signal id of the signal invoking the callback
4699 * @detail: The detail passed on for this emission
4700 * @run_type: The stage the signal emission is currently in, this field will contain one of %G_SIGNAL_RUN_FIRST, %G_SIGNAL_RUN_LAST or %G_SIGNAL_RUN_CLEANUP.
4702 * The #GSignalInvocationHint structure is used to pass on additional information
4703 * to callbacks during a signal emission.
4709 * @G_SIGNAL_MATCH_ID: The signal id must be equal.
4710 * @G_SIGNAL_MATCH_DETAIL: The signal detail be equal.
4711 * @G_SIGNAL_MATCH_CLOSURE: The closure must be the same.
4712 * @G_SIGNAL_MATCH_FUNC: The C closure callback must be the same.
4713 * @G_SIGNAL_MATCH_DATA: The closure data must be the same.
4714 * @G_SIGNAL_MATCH_UNBLOCKED: Only unblocked signals may matched.
4716 * The match types specify what g_signal_handlers_block_matched(),
4717 * g_signal_handlers_unblock_matched() and g_signal_handlers_disconnect_matched()
4724 * @signal_id: The signal id of the signal being queried, or 0 if the signal to be queried was unknown.
4725 * @signal_name: The signal name.
4726 * @itype: The interface/instance type that this signal can be emitted for.
4727 * @signal_flags: The signal flags as passed in to g_signal_new().
4728 * @return_type: The return type for user callbacks.
4729 * @n_params: The number of parameters that user callbacks take.
4730 * @param_types: The individual parameter types for user callbacks, note that the effective callback signature is: <programlisting> [#param_types param_names,] #gpointer data2); </programlisting>
4732 * A structure holding in-depth information for a specific signal. It is
4733 * filled in by the g_signal_query() function.
4740 * The <structname>GSimpleAction</structname> structure contains private
4741 * data and should only be accessed using the provided API
4748 * GSimpleAction::activate:
4749 * @simple: the #GSimpleAction
4750 * @parameter: (allow-none): the parameter to the activation
4752 * Indicates that the action was just activated.
4753 * an incorrect type was given, no signal will be emitted.
4760 * GSimpleAction:enabled:
4762 * If @action is currently enabled.
4763 * If the action is disabled then calls to g_simple_action_activate() and
4764 * g_simple_action_set_state() have no effect.
4771 * GSimpleAction:name:
4773 * The name of the action. This is mostly meaningful for identifying
4774 * the action once it has been added to a #GSimpleActionGroup.
4781 * GSimpleAction:parameter-type:
4783 * The type of the parameter that must be given when activating the
4791 * GSimpleAction:state:
4793 * The state of the action, or %NULL if the action is stateless.
4800 * GSimpleAction:state-type:
4802 * The #GVariantType of the state that the action has, or %NULL if the
4803 * action is stateless.
4810 * GSimpleActionClass:
4811 * @activate: the class closure for the activate signal
4820 * GSimpleActionGroup:
4822 * The #GSimpleActionGroup structure contains private data and should only be accessed using the provided API.
4829 * GSimpleAsyncResult:
4831 * A simple implementation of #GAsyncResult.
4836 * GSimpleAsyncThreadFunc:
4837 * @res: a #GSimpleAsyncResult.
4838 * @object: a #GObject.
4839 * @cancellable: optional #GCancellable object, %NULL to ignore.
4841 * Simple thread function that runs an asynchronous operation and
4842 * checks for cancellation.
4847 * GSimplePermission:
4849 * #GSimplePermission is an opaque data structure. There are no methods
4850 * except for those defined by #GPermission.
4857 * A lowlevel network socket object.
4866 * The timeout in seconds on socket I/O
4875 * A socket endpoint address, corresponding to <type>struct sockaddr</type>
4876 * or one of its subtypes.
4881 * GSocketAddressEnumerator:
4883 * Enumerator type for objects that contain or generate
4884 * #GSocketAddress<!-- -->es.
4891 * A helper class for network servers to listen for and accept connections.
4898 * GSocketConnectable:
4900 * Interface for objects that contain or generate #GSocketAddress<!-- -->es.
4905 * GSocketConnectableIface:
4906 * @g_iface: The parent interface.
4907 * @enumerate: Creates a #GSocketAddressEnumerator
4908 * @proxy_enumerate: Creates a #GProxyAddressEnumerator
4910 * Provides an interface for returning a #GSocketAddressEnumerator
4911 * and #GProxyAddressEnumerator
4916 * GSocketConnection:
4918 * A socket connection GIOStream object for connection-oriented sockets.
4925 * GSocketControlMessage:
4927 * Base class for socket-type specific control messages that can be sent and
4928 * received over #GSocket.
4933 * GSocketControlMessageClass:
4934 * @get_size: gets the size of the message.
4935 * @get_level: gets the protocol of the message.
4936 * @get_type: gets the protocol specific type of the message.
4937 * @serialize: Writes out the message data.
4938 * @deserialize: Tries to deserialize a message.
4946 * @G_SOCKET_FAMILY_INVALID: no address family
4947 * @G_SOCKET_FAMILY_IPV4: the IPv4 family
4948 * @G_SOCKET_FAMILY_IPV6: the IPv6 family
4949 * @G_SOCKET_FAMILY_UNIX: the UNIX domain family
4951 * The protocol family of a #GSocketAddress. (These values are
4952 * identical to the system defines %AF_INET, %AF_INET6 and %AF_UNIX,
4960 * GSocketListenerClass:
4961 * @changed: virtual method called when the set of socket listened to changes
4969 * @G_SOCKET_MSG_NONE: No flags.
4970 * @G_SOCKET_MSG_OOB: Request to send/receive out of band data.
4971 * @G_SOCKET_MSG_PEEK: Read data from the socket without removing it from the queue.
4972 * @G_SOCKET_MSG_DONTROUTE: Don't use a gateway to send out the packet, only send to hosts on directly connected networks.
4974 * Flags used in g_socket_receive_message() and g_socket_send_message().
4975 * The flags listed in the enum are some commonly available flags, but the
4976 * values used for them are the same as on the platform, and any other flags
4977 * are passed in/out as is. So to use a platform specific flag, just include
4978 * the right system header and pass in the flag.
4986 * @G_SOCKET_PROTOCOL_UNKNOWN: The protocol type is unknown
4987 * @G_SOCKET_PROTOCOL_DEFAULT: The default protocol for the family/type
4988 * @G_SOCKET_PROTOCOL_TCP: TCP over IP
4989 * @G_SOCKET_PROTOCOL_UDP: UDP over IP
4990 * @G_SOCKET_PROTOCOL_SCTP: SCTP over IP
4992 * A protocol identifier is specified when creating a #GSocket, which is a
4993 * family/type specific identifier, where 0 means the default protocol for
4994 * the particular family/type.
4995 * This enum contains a set of commonly available and used protocols. You
4996 * can also pass any other identifiers handled by the platform in order to
4997 * use protocols not listed here.
5006 * A helper class for handling accepting incomming connections in the
5014 * GSocketService::incoming:
5015 * @service: the #GSocketService.
5016 * @connection: a new #GSocketConnection object.
5017 * @source_object: the source_object passed to g_socket_listener_add_address().
5019 * The ::incoming signal is emitted when a new incoming connection
5020 * to @service needs to be handled. The handler must initiate the
5021 * handling of @connection, but may not block; in essence,
5022 * asynchronous operations must be used.
5024 * Returns: %TRUE to stop other handlers from being called
5030 * GSocketServiceClass:
5031 * @incomming: signal emitted when new connections are accepted
5038 * GSocketSourceFunc:
5039 * @socket: the #GSocket
5040 * @condition: the current condition at the source fired.
5041 * @user_data: data passed in by the user.
5043 * This is the function type of the callback used for the #GSource
5044 * returned by g_socket_create_source().
5046 * Returns: it should return %FALSE if the source should be removed.
5053 * @G_SOCKET_TYPE_INVALID: Type unknown or wrong
5054 * @G_SOCKET_TYPE_STREAM: Reliable connection-based byte streams (e.g. TCP).
5055 * @G_SOCKET_TYPE_DATAGRAM: Connectionless, unreliable datagram passing. (e.g. UDP)
5056 * @G_SOCKET_TYPE_SEQPACKET: Reliable connection-based passing of datagrams of fixed maximum length (e.g. SCTP).
5058 * Flags used when creating a #GSocket. Some protocols may not implement
5059 * all the socket types.
5068 * The <structname>GSource</structname> struct is an opaque data type
5069 * representing an event source.
5074 * GSourceCallbackFuncs:
5075 * @ref: Called when a reference is added to the callback object
5076 * @unref: Called when a reference to the callback object is dropped
5077 * @get: Called to extract the callback function and data from the callback object.
5079 * The <structname>GSourceCallbackFuncs</structname> struct contains
5080 * functions for managing callback objects.
5086 * @prepare: Called before all the file descriptors are polled. If the source can determine that it is ready here (without waiting for the results of the poll() call) it should return %TRUE. It can also return a @timeout_ value which should be the maximum timeout (in milliseconds) which should be passed to the poll() call. The actual timeout used will be -1 if all sources returned -1, or it will be the minimum of all the
5087 * @check: Called after all the file descriptors are polled. The source should return %TRUE if it is ready to be dispatched. Note that some time may have passed since the previous prepare function was called, so the source should be checked again here.
5088 * @dispatch: Called to dispatch the event source, after it has returned %TRUE in either its @prepare or its @check function. The @dispatch function is passed in a callback function and data. The callback function may be %NULL if the source was never connected to a callback using g_source_set_callback(). The @dispatch function should call the callback function with @user_data and whatever additional parameters are needed for this type of event source.
5089 * @finalize: Called when the source is finalized.
5091 * The <structname>GSourceFuncs</structname> struct contains a table of
5092 * functions used to handle event sources in a generic manner.
5093 * For idle sources, the prepare and check functions always return %TRUE
5094 * to indicate that the source is always ready to be processed. The prepare
5095 * function also returns a timeout value of 0 to ensure that the poll() call
5096 * doesn't block (since that would be time wasted which could have been spent
5097 * running the idle function).
5098 * For timeout sources, the prepare and check functions both return %TRUE
5099 * if the timeout interval has expired. The prepare function also returns
5100 * a timeout value to ensure that the poll() call doesn't block too long
5101 * and miss the next timeout.
5102 * For file descriptor sources, the prepare function typically returns %FALSE,
5103 * since it must wait until poll() has been called before it knows whether
5104 * any events need to be processed. It sets the returned timeout to -1 to
5105 * indicate that it doesn't mind how long the poll() call blocks. In the
5106 * check function, it tests the results of the poll() call to see if the
5107 * required condition has been met, and returns %TRUE if so.
5114 * A single target host/port that a network service is running on.
5121 * A C representable type name for #G_TYPE_STRV.
5128 * A #GSocketConnection for UNIX domain socket connections.
5135 * GTestLogFatalFunc:
5136 * @log_domain: the log domain of the message
5137 * @log_level: the log level of the message (including the fatal and recursion flags)
5138 * @message: the message to process
5139 * @user_data: user data, set in g_test_log_set_fatal_handler()
5141 * Specifies the prototype of fatal log handler functions.
5143 * Returns: %TRUE if the program should abort, %FALSE otherwise
5151 * An implementation of #GIcon for themed icons.
5163 * GThemedIcon:names:
5165 * A %NULL-terminated array of icon names.
5170 * GThemedIcon:use-default-fallbacks:
5172 * Whether to use the default fallbacks found by shortening the icon name
5173 * at '-' characters. If the "names" array has more than one element,
5174 * ignores any past the first.
5175 * For example, if the icon name was "gnome-dev-cdrom-audio", the array
5179 * "gnome-dev-cdrom-audio",
5180 * "gnome-dev-cdrom",
5190 * GThreadedSocketService:
5192 * A helper class for handling accepting incomming connections in the
5193 * glib mainloop and handling them in a thread.
5200 * GThreadedSocketService::run:
5201 * @service: the #GThreadedSocketService.
5202 * @connection: a new #GSocketConnection object.
5203 * @source_object: the source_object passed to g_socket_listener_add_address().
5205 * The ::run signal is emitted in a worker thread in response to an
5206 * incoming connection. This thread is dedicated to handling
5207 * not return until the connection is closed.
5209 * Returns: %TRUE to stope further signal handlers from being called
5216 * A value representing an interval of time, in microseconds.
5224 * @G_TIME_TYPE_STANDARD: the time is in local standard time
5225 * @G_TIME_TYPE_DAYLIGHT: the time is in local daylight time
5226 * @G_TIME_TYPE_UNIVERSAL: the time is in UTC
5228 * Disambiguates a given time in two ways.
5229 * First, specifies if the given time is in universal or local time.
5230 * Second, if the time is in local time, specifies if it is local
5231 * standard time or local daylight time. This is important for the case
5232 * where the same local time occurs twice (during daylight savings time
5233 * transitions, for example).
5238 * GTlsAuthenticationMode:
5239 * @G_TLS_AUTHENTICATION_NONE: client authentication not required
5240 * @G_TLS_AUTHENTICATION_REQUESTED: client authentication is requested
5241 * @G_TLS_AUTHENTICATION_REQUIRED: client authentication is required
5243 * The client authentication mode for a #GTlsServerConnection.
5252 * TLS (Transport Layer Security, aka SSL) backend. This is an
5253 * internal type used to coordinate the different classes implemented
5261 * GTlsBackendInterface:
5262 * @g_iface: The parent interface.
5263 * @get_certificate_type: returns the #GTlsCertificate implementation type
5264 * @get_client_connection_type: returns the #GTlsClientConnection implementation type
5265 * @get_server_connection_type: returns the #GTlsServerConnection implementation type
5267 * Provides an interface for describing TLS-related types.
5276 * Abstract base class for TLS certificate types.
5283 * GTlsCertificate:certificate:
5285 * The DER (binary) encoded representation of the certificate's
5286 * public key. This property and the
5287 * #GTlsCertificate:certificate-pem property represent the same
5288 * data, just in different forms.
5295 * GTlsCertificate:certificate-pem:
5297 * The PEM (ASCII) encoded representation of the certificate's
5298 * public key. This property and the #GTlsCertificate:certificate
5299 * property represent the same data, just in different forms.
5306 * GTlsCertificate:issuer:
5308 * A #GTlsCertificate representing the entity that issued this
5309 * certificate. If %NULL, this means that the certificate is either
5310 * self-signed, or else the certificate of the issuer is not
5318 * GTlsCertificate:private-key:
5320 * The DER (binary) encoded representation of the certificate's
5321 * private key. This property (or the
5322 * #GTlsCertificate:private-key-pem property) can be set when
5323 * constructing a key (eg, from a file), but cannot be read.
5330 * GTlsCertificate:private-key-pem:
5332 * The PEM (ASCII) encoded representation of the certificate's
5333 * private key. This property (or the #GTlsCertificate:private-key
5334 * property) can be set when constructing a key (eg, from a file),
5335 * but cannot be read.
5342 * GTlsCertificateFlags:
5343 * @G_TLS_CERTIFICATE_UNKNOWN_CA: The signing certificate authority is not known.
5344 * @G_TLS_CERTIFICATE_BAD_IDENTITY: The certificate does not match the expected identity of the site that it was retrieved from.
5345 * @G_TLS_CERTIFICATE_NOT_ACTIVATED: The certificate's activation time is still in the future
5346 * @G_TLS_CERTIFICATE_EXPIRED: The certificate has expired
5347 * @G_TLS_CERTIFICATE_REVOKED: The certificate has been revoked according to the #GTlsContext's certificate revocation list.
5348 * @G_TLS_CERTIFICATE_INSECURE: The certificate's algorithm is considered insecure.
5349 * @G_TLS_CERTIFICATE_GENERIC_ERROR: Some other error occurred validating the certificate
5350 * @G_TLS_CERTIFICATE_VALIDATE_ALL: the combination of all of the above flags
5352 * A set of flags describing TLS certification validation. This can be
5353 * used to set which validation steps to perform (eg, with
5354 * g_tls_client_connection_set_validation_flags()), or to describe why
5355 * a particular certificate was rejected (eg, in
5356 * #GTlsConnection::accept-certificate).
5363 * GTlsClientConnection:
5365 * TLS client-side connection; the client-side implementation of a
5373 * GTlsClientConnection:accepted-cas:
5375 * A list of the distinguished names of the Certificate Authorities
5376 * that the server will accept client certificates signed by. If the
5377 * server requests a client certificate during the handshake, then
5378 * this property will be set after the handshake completes.
5379 * Each item in the list is a #GByteArray which contains the complete
5380 * subject DN of the certificate authority.
5387 * GTlsClientConnection:server-identity:
5389 * A #GSocketConnectable describing the identity of the server that
5390 * is expected on the other end of the connection.
5391 * If the %G_TLS_CERTIFICATE_BAD_IDENTITY flag is set in
5392 * #GTlsClientConnection:validation-flags, this object will be used
5393 * to determine the expected identify of the remote end of the
5394 * connection; if #GTlsClientConnection:server-identity is not set,
5395 * or does not match the identity presented by the server, then the
5396 * %G_TLS_CERTIFICATE_BAD_IDENTITY validation will fail.
5397 * In addition to its use in verifying the server certificate,
5398 * this is also used to give a hint to the server about what
5399 * certificate we expect, which is useful for servers that serve
5407 * GTlsClientConnection:use-ssl3:
5409 * If %TRUE, tells the connection to use SSL 3.0 rather than trying
5410 * to negotiate the best version of TLS or SSL to use. This can be
5411 * used when talking to servers that don't implement version
5412 * negotiation correctly and therefore refuse to handshake at all with
5413 * a "modern" TLS handshake.
5420 * GTlsClientConnection:validation-flags:
5422 * What steps to perform when validating a certificate received from
5423 * a server. Server certificates that fail to validate in all of the
5424 * ways indicated here will be rejected unless the application
5425 * overrides the default via #GTlsConnection::accept-certificate.
5434 * TLS connection. This is an abstract type that will be subclassed by
5435 * a TLS-library-specific subtype.
5442 * GTlsConnection::accept-certificate:
5443 * @conn: a #GTlsConnection
5444 * @peer_cert: the peer's #GTlsCertificate
5445 * @errors: the problems with @peer_cert.
5447 * Emitted during the TLS handshake after the peer certificate has
5448 * been received. You can examine @peer_cert's certification path by
5449 * calling g_tls_certificate_get_issuer() on it.
5450 * For a client-side connection, @peer_cert is the server's
5451 * certificate, and the signal will only be emitted if the
5452 * certificate was not acceptable according to @conn's
5453 * #GTlsClientConnection:validation_flags. If you would like the
5454 * certificate to be accepted despite @errors, return %TRUE from the
5455 * signal handler. Otherwise, if no handler accepts the certificate,
5456 * the handshake will fail with %G_TLS_ERROR_BAD_CERTIFICATE.
5457 * For a server-side connection, @peer_cert is the certificate
5458 * presented by the client, if this was requested via the server's
5459 * #GTlsServerConnection:authentication_mode. On the server side,
5460 * the signal is always emitted when the client presents a
5461 * certificate, and the certificate will only be accepted if a
5462 * handler returns %TRUE.
5463 * Note that if this signal is emitted as part of asynchronous I/O
5464 * in the main thread, then you should not attempt to interact with
5465 * the user before returning from the signal handler. If you want to
5466 * let the user decide whether or not to accept the certificate, you
5467 * would have to return %FALSE from the signal handler on the first
5468 * attempt, and then after the connection attempt returns a
5469 * %G_TLS_ERROR_HANDSHAKE, you can interact with the user, and if
5470 * the user decides to accept the certificate, remember that fact,
5471 * create a new connection, and return %TRUE from the signal handler
5473 * If you are doing I/O in another thread, you do not
5474 * need to worry about this, and can simply block in the signal
5475 * handler until the UI thread returns an answer.
5476 * immediately end the signal emission). %FALSE to allow the signal
5477 * emission to continue, which will cause the handshake to fail if
5478 * no one else overrides it.
5480 * Returns: %TRUE to accept @peer_cert (which will also
5486 * GTlsConnection:base-io-stream:
5488 * The #GIOStream that the connection wraps
5495 * GTlsConnection:certificate:
5497 * The connection's certificate; see
5498 * g_tls_connection_set_certificate().
5505 * GTlsConnection:peer-certificate:
5507 * The connection's peer's certificate, after the TLS handshake has
5508 * completed and the certificate has been accepted. Note in
5509 * particular that this is not yet set during the emission of
5510 * #GTlsConnection::accept-certificate.
5511 * (You can watch for a #GObject::notify signal on this property to
5512 * detect when a handshake has occurred.)
5519 * GTlsConnection:peer-certificate-errors:
5521 * The errors noticed-and-ignored while verifying
5522 * #GTlsConnection:peer-certificate. Normally this should be %0, but
5523 * it may not be if #GTlsClientConnection::validation-flags is not
5524 * %G_TLS_CERTIFICATE_VALIDATE_ALL, or if
5525 * #GTlsConnection::accept-certificate overrode the default
5533 * GTlsConnection:rehandshake-mode:
5535 * The rehandshaking mode. See
5536 * g_tls_connection_set_rehandshake_mode().
5543 * GTlsConnection:require-close-notify:
5545 * Whether or not proper TLS close notification is required.
5546 * See g_tls_connection_set_require_close_notify().
5553 * GTlsConnection:use-system-certdb:
5555 * Whether or not the system certificate database will be used to
5556 * verify peer certificates. See
5557 * g_tls_connection_set_use_system_certdb().
5565 * @G_TLS_ERROR_UNAVAILABLE: No TLS provider is available
5566 * @G_TLS_ERROR_MISC: Miscellaneous TLS error
5567 * @G_TLS_ERROR_BAD_CERTIFICATE: A certificate could not be parsed
5568 * @G_TLS_ERROR_NOT_TLS: The TLS handshake failed because the peer does not seem to be a TLS server.
5569 * @G_TLS_ERROR_HANDSHAKE: The TLS handshake failed because the peer's certificate was not acceptable.
5570 * @G_TLS_ERROR_CERTIFICATE_REQUIRED: The TLS handshake failed because the server requested a client-side certificate, but none was provided. See g_tls_connection_set_certificate().
5571 * @G_TLS_ERROR_EOF: The TLS connection was closed without proper notice, which may indicate an attack. See g_tls_connection_set_require_close_notify().
5573 * An error code used with %G_TLS_ERROR in a #GError returned from a
5574 * TLS-related routine.
5581 * GTlsRehandshakeMode:
5582 * @G_TLS_REHANDSHAKE_NEVER: Never allow rehandshaking
5583 * @G_TLS_REHANDSHAKE_SAFELY: Allow safe rehandshaking only
5584 * @G_TLS_REHANDSHAKE_UNSAFELY: Allow unsafe rehandshaking
5586 * When to allow rehandshaking. See
5587 * g_tls_connection_set_rehandshake_mode().
5594 * GTlsServerConnection:
5596 * TLS server-side connection. This is the server-side implementation
5597 * of a #GTlsConnection.
5604 * GTlsServerConnection:authentication-mode:
5606 * The #GTlsAuthenticationMode for the server. This can be changed
5607 * before calling g_tls_connection_handshake() if you want to
5608 * rehandshake with a different mode from the initial handshake.
5616 * @data: Callback data passed to g_object_add_toggle_ref()
5617 * @object: The object on which g_object_add_toggle_ref() was called.
5618 * @is_last_ref: %TRUE if the toggle reference is now the last reference to the object. %FALSE if the toggle reference was the last reference and there are now other references.
5620 * A callback function used for notification when the state
5621 * of a toggle reference changes. See g_object_add_toggle_ref().
5627 * @str: the untranslated string
5628 * @data: user data specified when installing the function, e.g. in g_option_group_set_translate_func()
5630 * The type of functions which are used to translate user-visible
5631 * strings, for <option>--help</option> output.
5632 * The returned string is owned by GLib and must not be freed.
5634 * Returns: a translation of the string for the current locale.
5641 * A numerical value which represents the unique identifier of a registered
5649 * An opaque structure used as the base of all classes.
5654 * GTypeClassCacheFunc:
5655 * @cache_data: data that was given to the g_type_add_class_cache_func() call
5656 * @g_class: The #GTypeClass structure which is unreferenced
5658 * A callback function which is called when the reference count of a class
5659 * drops to zero. It may use g_type_class_ref() to prevent the class from
5660 * being freed. You should not call g_type_class_unref() from a
5661 * #GTypeClassCacheFunc function to prevent infinite recursion, use
5662 * g_type_class_unref_uncached() instead.
5663 * The functions have to check the class id passed in to figure
5664 * whether they actually want to cache the class of this type, since all
5665 * classes are routed through the same #GTypeClassCacheFunc chain.
5666 * called, %FALSE to continue.
5668 * Returns: %TRUE to stop further #GTypeClassCacheFunc<!-- -->s from being
5674 * @G_TYPE_DEBUG_NONE: Print no messages.
5675 * @G_TYPE_DEBUG_OBJECTS: Print messages about object bookkeeping.
5676 * @G_TYPE_DEBUG_SIGNALS: Print messages about signal emissions.
5677 * @G_TYPE_DEBUG_MASK: Mask covering all debug flags.
5679 * The <type>GTypeDebugFlags</type> enumeration values can be passed to
5680 * g_type_init_with_debug_flags() to trigger debugging messages during runtime.
5681 * Note that the messages can also be triggered by setting the
5682 * <envar>GOBJECT_DEBUG</envar> environment variable to a ':'-separated list of
5683 * "objects" and "signals".
5689 * @G_TYPE_FLAG_ABSTRACT: Indicates an abstract type. No instances can be created for an abstract type.
5690 * @G_TYPE_FLAG_VALUE_ABSTRACT: Indicates an abstract value type, i.e. a type that introduces a value table, but can't be used for g_value_init().
5692 * Bit masks used to check or determine characteristics of a type.
5697 * GTypeFundamentalFlags:
5698 * @G_TYPE_FLAG_CLASSED: Indicates a classed type.
5699 * @G_TYPE_FLAG_INSTANTIATABLE: Indicates an instantiable type (implies classed).
5700 * @G_TYPE_FLAG_DERIVABLE: Indicates a flat derivable type.
5701 * @G_TYPE_FLAG_DEEP_DERIVABLE: Indicates a deep derivable type (implies derivable).
5703 * Bit masks used to check or determine specific characteristics of a
5709 * GTypeFundamentalInfo:
5710 * @type_flags: #GTypeFundamentalFlags describing the characteristics of the fundamental type
5712 * A structure that provides information to the type system which is
5713 * used specifically for managing fundamental types.
5719 * @class_size: Size of the class structure (required for interface, classed and instantiatable types).
5720 * @base_init: Location of the base initialization function (optional).
5721 * @base_finalize: Location of the base finalization function (optional).
5722 * @class_init: Location of the class initialization function for classed and instantiatable types. Location of the default vtable inititalization function for interface types. (optional) This function is used both to fill in virtual functions in the class or default vtable, and to do type-specific setup such as registering signals and object properties.
5723 * @class_finalize: Location of the class finalization function for classed and instantiatable types. Location fo the default vtable finalization function for interface types. (optional)
5724 * @class_data: User-supplied data passed to the class init/finalize functions.
5725 * @instance_size: Size of the instance (object) structure (required for instantiatable types only).
5726 * @n_preallocs: Prior to GLib 2.10, it specified the number of pre-allocated (cached) instances to reserve memory for (0 indicates no caching). Since GLib 2.10, it is ignored, since instances are allocated with the <link linkend="glib-Memory-Slices">slice allocator</link> now.
5727 * @instance_init: Location of the instance initialization function (optional, for instantiatable types only).
5728 * @value_table: A #GTypeValueTable function table for generic handling of GValues of this type (usually only useful for fundamental types).
5730 * This structure is used to provide the type system with the information
5731 * required to initialize and destruct (finalize) a type's class and
5733 * The initialized structure is passed to the g_type_register_static() function
5734 * (or is copied into the provided #GTypeInfo structure in the
5735 * g_type_plugin_complete_type_info()). The type system will perform a deep
5736 * copy of this structure, so its memory does not need to be persistent
5737 * across invocation of g_type_register_static().
5744 * An opaque structure used as the base of all type instances.
5751 * An opaque structure used as the base of all interface types.
5756 * GTypeInterfaceCheckFunc:
5757 * @check_data: data passed to g_type_add_interface_check().
5758 * @g_iface: the interface that has been initialized
5760 * A callback called after an interface vtable is initialized.
5761 * See g_type_add_interface_check().
5769 * @name: the name of the module
5771 * The members of the <structname>GTypeModule</structname> structure should not
5772 * be accessed directly, except for the @name field.
5778 * @parent_class: the parent class
5779 * @load: loads the module and registers one or more types using g_type_module_register_type().
5780 * @unload: unloads the module
5782 * In order to implement dynamic loading of types based on #GTypeModule,
5783 * the @load and @unload functions in #GTypeModuleClass must be implemented.
5790 * The <structname>GTypePlugin</structname> typedef is used as a placeholder
5791 * for objects that implement the <structname>GTypePlugin</structname>
5798 * @use_plugin: Increases the use count of the plugin.
5799 * @unuse_plugin: Decreases the use count of the plugin.
5800 * @complete_type_info: Fills in the #GTypeInfo and #GTypeValueTable structs for the type. The structs are initialized with <literal>memset(s, 0, sizeof (s))</literal> before calling this function.
5801 * @complete_interface_info: Fills in missing parts of the #GInterfaceInfo for the interface. The structs is initialized with <literal>memset(s, 0, sizeof (s))</literal> before calling this function.
5803 * The #GTypePlugin interface is used by the type system in order to handle
5804 * the lifecycle of dynamically loaded types.
5809 * GTypePluginCompleteInterfaceInfo:
5810 * @plugin: the #GTypePlugin
5811 * @instance_type: the #GType of an instantiable type to which the interface is added
5812 * @interface_type: the #GType of the interface whose info is completed
5813 * @info: the #GInterfaceInfo to fill in
5815 * The type of the @complete_interface_info function of #GTypePluginClass.
5820 * GTypePluginCompleteTypeInfo:
5821 * @plugin: the #GTypePlugin
5822 * @g_type: the #GType whose info is completed
5823 * @info: the #GTypeInfo struct to fill in
5824 * @value_table: the #GTypeValueTable to fill in
5826 * The type of the @complete_type_info function of #GTypePluginClass.
5832 * @plugin: the #GTypePlugin whose use count should be decreased
5834 * The type of the @unuse_plugin function of #GTypePluginClass.
5840 * @plugin: the #GTypePlugin whose use count should be increased
5842 * The type of the @use_plugin function of #GTypePluginClass, which gets called
5843 * to increase the use count of @plugin.
5849 * @type: the #GType value of the type.
5850 * @type_name: the name of the type.
5851 * @class_size: the size of the class structure.
5852 * @instance_size: the size of the instance structure.
5854 * A structure holding information for a specific type. It is
5855 * filled in by the g_type_query() function.
5861 * @value_init: Default initialize @values contents by poking values directly into the value->data array. The data array of the #GValue passed into this function was zero-filled with <function>memset()</function>, so no care has to be taken to free any old contents. E.g. for the implementation of a string value that may never be %NULL, the implementation might look like: |[ value->data[0].v_pointer = g_strdup (""); ]|
5862 * @value_free: Free any old contents that might be left in the data array of the passed in @value. No resources may remain allocated through the #GValue contents after this function returns. E.g. for our above string type: |[ // only free strings without a specific flag for static storage if (!(value->data[1].v_uint & G_VALUE_NOCOPY_CONTENTS)) g_free (value->data[0].v_pointer); ]|
5863 * @value_copy: @dest_value is a #GValue with zero-filled data section and @src_value is a properly setup #GValue of same or derived type. The purpose of this function is to copy the contents of remain valid. String type example: |[ dest_value->data[0].v_pointer = g_strdup (src_value->data[0].v_pointer); ]|
5864 * @value_peek_pointer: If the value contents fit into a pointer, such as objects or strings, return this pointer, so the caller can peek at the current contents. To extend on our above string example: |[ return value->data[0].v_pointer; ]|
5865 * @collect_format: A string format describing how to collect the contents of this value bit-by-bit. Each character in the format represents an argument to be collected, and the characters themselves indicate the type of the argument. Currently supported arguments are: <variablelist> <varlistentry><term /><listitem><para> 'i' - Integers. passed as collect_values[].v_int. </para></listitem></varlistentry> <varlistentry><term /><listitem><para> 'l' - Longs. passed as collect_values[].v_long. </para></listitem></varlistentry> <varlistentry><term /><listitem><para> 'd' - Doubles. passed as collect_values[].v_double. </para></listitem></varlistentry> <varlistentry><term /><listitem><para> 'p' - Pointers. passed as collect_values[].v_pointer. </para></listitem></varlistentry> </variablelist> It should be noted that for variable argument list construction, ANSI C promotes every type smaller than an integer to an int, and floats to doubles. So for collection of short int or char, 'i' needs to be used, and for collection of floats 'd'.
5866 * @collect_value: The collect_value() function is responsible for converting the values collected from a variable argument list into contents suitable for storage in a GValue. This function should setup does not allow %NULL pointers, it needs to either spew an error, or do an implicit conversion by storing an empty string. The @value passed in to this function has a zero-filled data array, so just like for value_init() it is guaranteed to not contain any old contents that might need freeing. and @collect_values is an array of unions #GTypeCValue with length @n_collect_values, containing the collected values according to @collect_format. It may contain the flag %G_VALUE_NOCOPY_CONTENTS indicating, that the collected value contents may be considered "static" for the duration of the @value lifetime. Thus an extra copy of the contents stored in @collect_values is not required for assignment to @value. For our above string example, we continue with: |[ if (!collect_values[0].v_pointer) value->data[0].v_pointer = g_strdup (""); else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { value->data[0].v_pointer = collect_values[0].v_pointer; // keep a flag for the value_free() implementation to not free this string value->data[1].v_uint = G_VALUE_NOCOPY_CONTENTS; } else value->data[0].v_pointer = g_strdup (collect_values[0].v_pointer); return NULL; ]| It should be noted, that it is generally a bad idea to follow the #G_VALUE_NOCOPY_CONTENTS hint for reference counted types. Due to reentrancy requirements and reference count assertions performed by the #GSignal code, reference counts should always be incremented for reference counted contents stored in the value->data array. To deviate from our string example for a moment, and taking a look at an exemplary implementation for collect_value() of #GObject: |[ if (collect_values[0].v_pointer) { GObject *object = G_OBJECT (collect_values[0].v_pointer); // never honour G_VALUE_NOCOPY_CONTENTS for ref-counted types value->data[0].v_pointer = g_object_ref (object); return NULL; } else return g_strdup_printf ("Object passed as invalid NULL pointer"); } ]| The reference count for valid objects is always incremented, regardless of @collect_flags. For invalid objects, the example returns a newly allocated string without altering @value. Upon success, collect_value() needs to return %NULL. If, however, an error condition occurred, collect_value() may spew an error by returning a newly allocated non-%NULL string, giving a suitable description of the error condition. The calling code makes no assumptions about the @value contents being valid upon error returns, @value is simply thrown away without further freeing. As such, it is a good idea to not allocate #GValue contents, prior to returning an error, however, collect_values() is not obliged to return a correctly setup @value for error returns, simply because any non-%NULL return is considered a fatal condition so further program behaviour is undefined.
5867 * @lcopy_format: Format description of the arguments to collect for @lcopy_value, analogous to @collect_format. Usually, @lcopy_format string consists only of 'p's to provide lcopy_value() with pointers to storage locations.
5868 * @lcopy_value: This function is responsible for storing the @value contents into arguments passed through a variable argument list which got collected into @collect_values according to @lcopy_format. and @collect_flags may contain %G_VALUE_NOCOPY_CONTENTS. In contrast to collect_value(), lcopy_value() is obliged to always properly support %G_VALUE_NOCOPY_CONTENTS. Similar to collect_value() the function may prematurely abort by returning a newly allocated string describing an error condition. To complete the string example: |[ gchar **string_p = collect_values[0].v_pointer; if (!string_p) return g_strdup_printf ("string location passed as NULL"); if (collect_flags & G_VALUE_NOCOPY_CONTENTS) *string_p = value->data[0].v_pointer; else *string_p = g_strdup (value->data[0].v_pointer); ]| And an illustrative version of lcopy_value() for reference-counted types: |[ GObject **object_p = collect_values[0].v_pointer; if (!object_p) return g_strdup_printf ("object location passed as NULL"); if (!value->data[0].v_pointer) *object_p = NULL; else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) // always honour *object_p = value->data[0].v_pointer; else *object_p = g_object_ref (value->data[0].v_pointer); return NULL; ]|
5870 * The #GTypeValueTable provides the functions required by the #GValue implementation,
5871 * to serve as a container for values of a type.
5876 * GUnixCredentialsMessage:
5878 * The #GUnixCredentialsMessage structure contains only private data
5879 * and should only be accessed using the provided API.
5886 * GUnixCredentialsMessage:credentials:
5888 * The credentials stored in the message.
5895 * GUnixCredentialsMessageClass:
5897 * Class structure for #GUnixCredentialsMessage.
5906 * Implements #GInputStream for reading from selectable unix file descriptors
5911 * GUnixInputStream:close-fd:
5913 * Whether to close the file descriptor when the stream is closed.
5920 * GUnixInputStream:fd:
5922 * The file descriptor that the stream reads from.
5931 * Implementation of the #GMount interface for Unix systems.
5938 * Defines a Unix mount entry (e.g. <filename>/media/cdrom</filename>).
5939 * This corresponds roughly to a mtab entry.
5944 * GUnixMountMonitor:
5946 * Watches #GUnixMount<!-- -->s for changes.
5951 * GUnixMountMonitor::mountpoints-changed:
5952 * @monitor: the object on which the signal is emitted
5954 * Emitted when the unix mount points have changed.
5959 * GUnixMountMonitor::mounts-changed:
5960 * @monitor: the object on which the signal is emitted
5962 * Emitted when the unix mounts have changed.
5969 * Defines a Unix mount point (e.g. <filename>/dev</filename>).
5970 * This corresponds roughly to a fstab entry.
5975 * GUnixOutputStream:
5977 * Implements #GOutputStream for outputting to selectable unix file descriptors
5982 * GUnixOutputStream:close-fd:
5984 * Whether to close the file descriptor when the stream is closed.
5991 * GUnixOutputStream:fd:
5993 * The file descriptor that the stream writes to.
6000 * GUnixSocketAddress:
6002 * A UNIX-domain (local) socket address, corresponding to a
6003 * <type>struct sockaddr_un</type>.
6008 * GUnixSocketAddress:abstract:
6010 * Whether or not this is an abstract address
6011 * distinguishes between zero-padded and non-zero-padded
6012 * abstract addresses.
6014 * Deprecated: Use #GUnixSocketAddress:address-type, which
6019 * GUnixSocketAddressType:
6020 * @G_UNIX_SOCKET_ADDRESS_INVALID: invalid
6021 * @G_UNIX_SOCKET_ADDRESS_ANONYMOUS: anonymous
6022 * @G_UNIX_SOCKET_ADDRESS_PATH: a filesystem path
6023 * @G_UNIX_SOCKET_ADDRESS_ABSTRACT: an abstract name
6024 * @G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED: an abstract name, 0-padded to the full length of a unix socket name
6026 * The type of name used by a #GUnixSocketAddress.
6027 * %G_UNIX_SOCKET_ADDRESS_PATH indicates a traditional unix domain
6028 * socket bound to a filesystem path. %G_UNIX_SOCKET_ADDRESS_ANONYMOUS
6029 * indicates a socket not bound to any name (eg, a client-side socket,
6030 * or a socket created with socketpair()).
6031 * For abstract sockets, there are two incompatible ways of naming
6032 * sockaddr_un</literal> as the name, padding the unused parts of the
6033 * %sun_path field with zeroes; this corresponds to
6034 * %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED. However, many programs
6035 * instead just use a portion of %sun_path, and pass an appropriate
6036 * smaller length to bind() or connect(). This is
6037 * %G_UNIX_SOCKET_ADDRESS_ABSTRACT.
6039 * Them: the man pages suggest using the entire <literal>struct
6046 * @G_USER_DIRECTORY_DESKTOP: the user's Desktop directory
6047 * @G_USER_DIRECTORY_DOCUMENTS: the user's Documents directory
6048 * @G_USER_DIRECTORY_DOWNLOAD: the user's Downloads directory
6049 * @G_USER_DIRECTORY_MUSIC: the user's Music directory
6050 * @G_USER_DIRECTORY_PICTURES: the user's Pictures directory
6051 * @G_USER_DIRECTORY_PUBLIC_SHARE: the user's shared directory
6052 * @G_USER_DIRECTORY_TEMPLATES: the user's Templates directory
6053 * @G_USER_DIRECTORY_VIDEOS: the user's Movies directory
6054 * @G_USER_N_DIRECTORIES: the number of enum values
6056 * These are logical ids for special directories which are defined
6057 * depending on the platform used. You should use g_get_user_special_dir()
6058 * to retrieve the full path associated to the logical id.
6059 * The #GUserDirectory enumeration can be extended at later date. Not
6060 * every platform has a directory for every logical id in this
6070 * An opaque structure used to hold different types of values.
6071 * to functions within a #GTypeValueTable structure, or implementations of
6072 * the g_value_*() API. That is, code portions which implement new fundamental
6074 * #GValue users can not make any assumptions about how data is stored
6075 * within the 2 element @data union, and the @g_type member should
6076 * only be accessed through the G_VALUE_TYPE() macro.
6078 * The data within the structure has protected scope: it is accessible only
6084 * @n_values: number of values contained in the array
6085 * @values: array of values
6087 * A #GValueArray contains an array of #GValue elements.
6093 * @src_value: Source value.
6094 * @dest_value: Target value.
6096 * The type of value transformation functions which can be registered with
6097 * g_value_register_transform_func().
6104 * A type in the GVariant type system.
6105 * Two types may not be compared by value; use g_variant_type_equal() or
6106 * g_variant_type_is_subtype(). May be copied using
6107 * g_variant_type_copy() and freed using g_variant_type_free().
6114 * Virtual File System object.
6121 * Opaque mountable volume object.
6128 * Emitted when the volume has been changed.
6135 * This signal is emitted when the #GVolume have been removed. If
6136 * the recipient is holding references to the object they should
6137 * release them so the object can be finalized.
6143 * @g_iface: The parent interface.
6144 * @changed: Changed signal that is emitted when the volume's state has changed.
6145 * @removed: The removed signal that is emitted when the #GVolume have been removed. If the recipient is holding references to the object they should release them so the object can be finalized.
6146 * @get_name: Gets a string containing the name of the #GVolume.
6147 * @get_icon: Gets a #GIcon for the #GVolume.
6148 * @get_uuid: Gets the UUID for the #GVolume. The reference is typically based on the file system UUID for the mount in question and should be considered an opaque string. Returns %NULL if there is no UUID available.
6149 * @get_drive: Gets a #GDrive the volume is located on. Returns %NULL if the #GVolume is not associated with a #GDrive.
6150 * @get_mount: Gets a #GMount representing the mounted volume. Returns %NULL if the #GVolume is not mounted.
6151 * @can_mount: Returns %TRUE if the #GVolume can be mounted.
6152 * @can_eject: Checks if a #GVolume can be ejected.
6153 * @mount_fn: Mounts a given #GVolume. #GVolume implementations must emit the #GMountOperation::aborted signal before completing a mount operation that is aborted while awaiting input from the user through a #GMountOperation instance.
6154 * @mount_finish: Finishes a mount operation.
6155 * @eject: Ejects a given #GVolume.
6156 * @eject_finish: Finishes an eject operation.
6157 * @get_identifier: Returns the <link linkend="volume-identifier">identifier</link> of the given kind, or %NULL if the #GVolume doesn't have one.
6158 * @enumerate_identifiers: Returns an array strings listing the kinds of <link linkend="volume-identifier">identifiers</link> which the #GVolume has.
6159 * @should_automount: Returns %TRUE if the #GVolume should be automatically mounted.
6160 * @get_activation_root: Returns the activation root for the #GVolume if it is known in advance or %NULL if it is not known.
6161 * @eject_with_operation: Starts ejecting a #GVolume using a #GMountOperation. Since 2.22.
6162 * @eject_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22.
6164 * Interface for implementing operations for mountable volumes.
6171 * A Volume Monitor that watches for volume events.
6176 * GVolumeMonitor::drive-changed:
6177 * @volume_monitor: The volume monitor emitting the signal.
6178 * @drive: the drive that changed
6180 * Emitted when a drive changes.
6185 * GVolumeMonitor::drive-connected:
6186 * @volume_monitor: The volume monitor emitting the signal.
6187 * @drive: a #GDrive that was connected.
6189 * Emitted when a drive is connected to the system.
6194 * GVolumeMonitor::drive-disconnected:
6195 * @volume_monitor: The volume monitor emitting the signal.
6196 * @drive: a #GDrive that was disconnected.
6198 * Emitted when a drive is disconnected from the system.
6203 * GVolumeMonitor::drive-eject-button:
6204 * @volume_monitor: The volume monitor emitting the signal.
6205 * @drive: the drive where the eject button was pressed
6207 * Emitted when the eject button is pressed on @drive.
6214 * GVolumeMonitor::drive-stop-button:
6215 * @volume_monitor: The volume monitor emitting the signal.
6216 * @drive: the drive where the stop button was pressed
6218 * Emitted when the stop button is pressed on @drive.
6225 * GVolumeMonitor::mount-added:
6226 * @volume_monitor: The volume monitor emitting the signal.
6227 * @mount: a #GMount that was added.
6229 * Emitted when a mount is added.
6234 * GVolumeMonitor::mount-changed:
6235 * @volume_monitor: The volume monitor emitting the signal.
6236 * @mount: a #GMount that changed.
6238 * Emitted when a mount changes.
6243 * GVolumeMonitor::mount-pre-unmount:
6244 * @volume_monitor: The volume monitor emitting the signal.
6245 * @mount: a #GMount that is being unmounted.
6247 * Emitted when a mount is about to be removed.
6252 * GVolumeMonitor::mount-removed:
6253 * @volume_monitor: The volume monitor emitting the signal.
6254 * @mount: a #GMount that was removed.
6256 * Emitted when a mount is removed.
6261 * GVolumeMonitor::volume-added:
6262 * @volume_monitor: The volume monitor emitting the signal.
6263 * @volume: a #GVolume that was added.
6265 * Emitted when a mountable volume is added to the system.
6270 * GVolumeMonitor::volume-changed:
6271 * @volume_monitor: The volume monitor emitting the signal.
6272 * @volume: a #GVolume that changed.
6274 * Emitted when mountable volume is changed.
6279 * GVolumeMonitor::volume-removed:
6280 * @volume_monitor: The volume monitor emitting the signal.
6281 * @volume: a #GVolume that was removed.
6283 * Emitted when a mountable volume is removed from the system.
6289 * @data: data that was provided when the weak reference was established
6290 * @where_the_object_was: the object being finalized
6292 * A #GWeakNotify function can be added to an object as a callback that gets
6293 * triggered when the object is finalized. Since the object is already being
6294 * finalized when the #GWeakNotify is called, there's not much you could do
6295 * with the object, apart from e.g. using its adress as hash-index or the like.
6300 * GWin32InputStream:
6302 * Implements #GInputStream for reading from selectable Windows file handles
6307 * GWin32InputStream:close-handle:
6309 * Whether to close the file handle when the stream is closed.
6316 * GWin32InputStream:handle:
6318 * The handle that the stream reads from.
6327 * Implementation of the #GMount interface for Win32 systems.
6332 * GWin32OutputStream:
6334 * Implements #GOutputStream for outputting to Windows file handles
6339 * GWin32OutputStream:close-handle:
6341 * Whether to close the file handle when the stream is closed.
6348 * GWin32OutputStream:handle:
6350 * The file handle that the stream writes to.
6359 * Zlib decompression
6364 * GZlibCompressor:file-info:
6366 * If set to a non-%NULL #GFileInfo object, and #GZlibCompressor:format is
6367 * %G_ZLIB_COMPRESSOR_FORMAT_GZIP, the compressor will write the file name
6368 * and modification time from the file info to the the GZIP header.
6375 * GZlibCompressorFormat:
6376 * @G_ZLIB_COMPRESSOR_FORMAT_ZLIB: deflate compression with zlib header
6377 * @G_ZLIB_COMPRESSOR_FORMAT_GZIP: gzip file format
6378 * @G_ZLIB_COMPRESSOR_FORMAT_RAW: deflate compression with no header
6380 * Used to select the type of data format to use for #GZlibDecompressor
6381 * and #GZlibCompressor.
6388 * GZlibDecompressor:
6390 * Zlib decompression
6395 * GZlibDecompressor:file-info:
6397 * A #GFileInfo containing the information found in the GZIP header
6398 * of the data stream processed, or %NULL if the header was not yet
6399 * fully processed, is not present at all, or the compressor's
6400 * #GZlibDecompressor:format property is not %G_ZLIB_COMPRESSOR_FORMAT_GZIP.
6407 * G_BOOKMARK_FILE_ERROR:
6409 * Error domain for bookmark file parsing.
6410 * Errors in this domain will be from the #GBookmarkFileError
6411 * enumeration. See #GError for information on error domains.
6417 * @f: a function pointer.
6419 * Cast a function pointer to a #GCallback.
6424 * G_CCLOSURE_SWAP_DATA:
6425 * @cclosure: a #GCClosure
6427 * Checks whether the user data of the #GCClosure should be passed as the
6428 * first parameter to the callback. See g_cclosure_new_swap().
6430 * Returns: %TRUE if data has to be swapped.
6435 * G_CLOSURE_NEEDS_MARSHAL:
6436 * @closure: a #GClosure
6438 * Check if the closure still needs a marshaller. See g_closure_set_marshal().
6440 * Returns: %TRUE if a #GClosureMarshal marshaller has not yet been set on
6445 * G_CLOSURE_N_NOTIFIERS:
6448 * Get the total number of notifiers connected with the closure @cl.
6449 * The count includes the meta marshaller, the finalize and invalidate notifiers
6450 * and the marshal guards. Note that each guard counts as two notifiers.
6451 * See g_closure_set_meta_marshal(), g_closure_add_finalize_notifier(),
6452 * g_closure_add_invalidate_notifier() and g_closure_add_marshal_guards().
6454 * Returns: number of notifiers
6461 * Error domain for character set conversions. Errors in this domain will
6462 * be from the #GConvertError enumeration. See #GError for information on
6468 * G_DATALIST_FLAGS_MASK:
6470 * A bitmask that restricts the possible flags passed to
6471 * g_datalist_set_flags(). Passing a flags value where
6472 * flags & ~G_DATALIST_FLAGS_MASK != 0 is an error.
6479 * Error domain for errors generated by a remote message bus. Errors
6480 * in this domain will be from the #GDBusError enumeration. See
6481 * #GError for more information on error domains.
6482 * Note that errors in this error domain is intended only for
6483 * returning errors from a remote message bus process. Errors
6484 * generated locally in-process by e.g. #GDBusConnection is from the
6485 * %G_IO_ERROR domain.
6492 * G_DEFINE_ABSTRACT_TYPE:
6493 * @TN: The name of the new type, in Camel case.
6494 * @t_n: The name of the new type, in lowercase, with words separated by '_'.
6495 * @T_P: The #GType of the parent type.
6497 * A convenience macro for type implementations.
6498 * Similar to G_DEFINE_TYPE(), but defines an abstract type.
6499 * See G_DEFINE_TYPE_EXTENDED() for an example.
6506 * G_DEFINE_ABSTRACT_TYPE_WITH_CODE:
6507 * @TN: The name of the new type, in Camel case.
6508 * @t_n: The name of the new type, in lowercase, with words separated by '_'.
6509 * @T_P: The #GType of the parent type.
6510 * @_C_: Custom code that gets inserted in the @type_name_get_type() function.
6512 * A convenience macro for type implementations.
6513 * Similar to G_DEFINE_TYPE_WITH_CODE(), but defines an abstract type and allows you to
6514 * insert custom code into the *_get_type() function, e.g. interface implementations
6515 * via G_IMPLEMENT_INTERFACE(). See G_DEFINE_TYPE_EXTENDED() for an example.
6522 * G_DEFINE_BOXED_TYPE:
6523 * @TypeName: The name of the new type, in Camel case.
6524 * @type_name: The name of the new type, in lowercase, with words separated by '_'.
6525 * @copy_func: the #GBoxedCopyFunc for the new type
6526 * @free_func: the #GBoxedFreeFunc for the new type
6528 * A convenience macro for boxed type implementations, which defines a
6529 * type_name_get_type() function registering the boxed type.
6536 * G_DEFINE_BOXED_TYPE_WITH_CODE:
6537 * @TypeName: The name of the new type, in Camel case.
6538 * @type_name: The name of the new type, in lowercase, with words separated by '_'.
6539 * @copy_func: the #GBoxedCopyFunc for the new type
6540 * @free_func: the #GBoxedFreeFunc for the new type
6541 * @_C_: Custom code that gets inserted in the *_get_type() function.
6543 * A convenience macro for boxed type implementations.
6544 * Similar to G_DEFINE_BOXED_TYPE(), but allows to insert custom code into the
6545 * type_name_get_type() function, e.g. to register value transformations with
6546 * g_value_register_transform_func().
6553 * G_DEFINE_DYNAMIC_TYPE:
6554 * @TN: The name of the new type, in Camel case.
6555 * @t_n: The name of the new type, in lowercase, with words separated by '_'.
6556 * @T_P: The #GType of the parent type.
6558 * A convenience macro for dynamic type implementations, which declares a
6559 * class initialization function, an instance initialization function (see
6560 * #GTypeInfo for information about these) and a static variable named
6561 * it defines a <function>*_get_type()</function> and a static
6562 * <function>*_register_type()</function> function for use in your
6563 * <function>module_init()</function>.
6564 * See G_DEFINE_DYNAMIC_TYPE_EXTENDED() for an example.
6571 * G_DEFINE_DYNAMIC_TYPE_EXTENDED:
6572 * @TypeName: The name of the new type, in Camel case.
6573 * @type_name: The name of the new type, in lowercase, with words separated by '_'.
6574 * @TYPE_PARENT: The #GType of the parent type.
6575 * @flags: #GTypeFlags to pass to g_type_module_register_type()
6576 * @CODE: Custom code that gets inserted in the *_get_type() function.
6578 * A more general version of G_DEFINE_DYNAMIC_TYPE() which
6579 * allows to specify #GTypeFlags and custom code.
6581 * G_DEFINE_DYNAMIC_TYPE_EXTENDED (GtkGadget,
6585 * G_IMPLEMENT_INTERFACE_DYNAMIC (TYPE_GIZMO,
6586 * gtk_gadget_gizmo_init));
6590 * static void gtk_gadget_init (GtkGadget *self);
6591 * static void gtk_gadget_class_init (GtkGadgetClass *klass);
6592 * static void gtk_gadget_class_finalize (GtkGadgetClass *klass);
6593 * static gpointer gtk_gadget_parent_class = NULL;
6594 * static GType gtk_gadget_type_id = 0;
6595 * static void gtk_gadget_class_intern_init (gpointer klass)
6597 * gtk_gadget_parent_class = g_type_class_peek_parent (klass);
6598 * gtk_gadget_class_init ((GtkGadgetClass*) klass);
6601 * gtk_gadget_get_type (void)
6603 * return gtk_gadget_type_id;
6606 * gtk_gadget_register_type (GTypeModule *type_module)
6608 * const GTypeInfo g_define_type_info = {
6609 * sizeof (GtkGadgetClass),
6610 * (GBaseInitFunc) NULL,
6611 * (GBaseFinalizeFunc) NULL,
6612 * (GClassInitFunc) gtk_gadget_class_intern_init,
6613 * (GClassFinalizeFunc) gtk_gadget_class_finalize,
6614 * NULL, // class_data
6615 * sizeof (GtkGadget),
6617 * (GInstanceInitFunc) gtk_gadget_init,
6618 * NULL // value_table
6620 * gtk_gadget_type_id = g_type_module_register_type (type_module,
6623 * &g_define_type_info,
6624 * (GTypeFlags) flags);
6626 * const GInterfaceInfo g_implement_interface_info = {
6627 * (GInterfaceInitFunc) gtk_gadget_gizmo_init
6629 * g_type_module_add_interface (type_module, g_define_type_id, TYPE_GIZMO, &g_implement_interface_info);
6639 * G_DEFINE_INTERFACE:
6640 * @TN: The name of the new type, in Camel case.
6641 * @t_n: The name of the new type, in lowercase, with words separated by '_'.
6642 * @T_P: The #GType of the prerequisite type for the interface, or 0 (%G_TYPE_INVALID) for no prerequisite type.
6644 * A convenience macro for #GTypeInterface definitions, which declares
6645 * a default vtable initialization function and defines a *_get_type()
6647 * The macro expects the interface initialization function to have the
6648 * name <literal>t_n ## _default_init</literal>, and the interface
6649 * structure to have the name <literal>TN ## Interface</literal>.
6656 * G_DEFINE_INTERFACE_WITH_CODE:
6657 * @TN: The name of the new type, in Camel case.
6658 * @t_n: The name of the new type, in lowercase, with words separated by '_'.
6659 * @T_P: The #GType of the prerequisite type for the interface, or 0 (%G_TYPE_INVALID) for no prerequisite type.
6660 * @_C_: Custom code that gets inserted in the *_get_type() function.
6662 * A convenience macro for #GTypeInterface definitions. Similar to
6663 * G_DEFINE_INTERFACE(), but allows you to insert custom code into the
6664 * *_get_type() function, e.g. additional interface implementations
6665 * via G_IMPLEMENT_INTERFACE(), or additional prerequisite types. See
6666 * G_DEFINE_TYPE_EXTENDED() for a similar example using
6667 * G_DEFINE_TYPE_WITH_CODE().
6674 * G_DEFINE_POINTER_TYPE:
6675 * @TypeName: The name of the new type, in Camel case.
6676 * @type_name: The name of the new type, in lowercase, with words separated by '_'.
6678 * A convenience macro for pointer type implementations, which defines a
6679 * type_name_get_type() function registering the pointer type.
6686 * G_DEFINE_POINTER_TYPE_WITH_CODE:
6687 * @TypeName: The name of the new type, in Camel case.
6688 * @type_name: The name of the new type, in lowercase, with words separated by '_'.
6689 * @_C_: Custom code that gets inserted in the *_get_type() function.
6691 * A convenience macro for pointer type implementations.
6692 * Similar to G_DEFINE_POINTER_TYPE(), but allows to insert custom code into the
6693 * type_name_get_type() function.
6701 * @TN: The name of the new type, in Camel case.
6702 * @t_n: The name of the new type, in lowercase, with words separated by '_'.
6703 * @T_P: The #GType of the parent type.
6705 * A convenience macro for type implementations, which declares a
6706 * class initialization function, an instance initialization function (see #GTypeInfo for information about
6707 * these) and a static variable named @t_n<!-- -->_parent_class pointing to the parent class. Furthermore, it defines
6708 * a *_get_type() function. See G_DEFINE_TYPE_EXTENDED() for an example.
6715 * G_DEFINE_TYPE_EXTENDED:
6716 * @TN: The name of the new type, in Camel case.
6717 * @t_n: The name of the new type, in lowercase, with words separated by '_'.
6718 * @T_P: The #GType of the parent type.
6719 * @_f_: #GTypeFlags to pass to g_type_register_static()
6720 * @_C_: Custom code that gets inserted in the *_get_type() function.
6722 * The most general convenience macro for type implementations, on which
6723 * G_DEFINE_TYPE(), etc are based.
6725 * G_DEFINE_TYPE_EXTENDED (GtkGadget,
6729 * G_IMPLEMENT_INTERFACE (TYPE_GIZMO,
6730 * gtk_gadget_gizmo_init));
6734 * static void gtk_gadget_init (GtkGadget *self);
6735 * static void gtk_gadget_class_init (GtkGadgetClass *klass);
6736 * static gpointer gtk_gadget_parent_class = NULL;
6737 * static void gtk_gadget_class_intern_init (gpointer klass)
6739 * gtk_gadget_parent_class = g_type_class_peek_parent (klass);
6740 * gtk_gadget_class_init ((GtkGadgetClass*) klass);
6743 * gtk_gadget_get_type (void)
6745 * static volatile gsize g_define_type_id__volatile = 0;
6746 * if (g_once_init_enter (&g_define_type_id__volatile))
6748 * GType g_define_type_id =
6749 * g_type_register_static_simple (GTK_TYPE_WIDGET,
6750 * g_intern_static_string ("GtkGadget"),
6751 * sizeof (GtkGadgetClass),
6752 * (GClassInitFunc) gtk_gadget_class_intern_init,
6753 * sizeof (GtkGadget),
6754 * (GInstanceInitFunc) gtk_gadget_init,
6755 * (GTypeFlags) flags);
6757 * static const GInterfaceInfo g_implement_interface_info = {
6758 * (GInterfaceInitFunc) gtk_gadget_gizmo_init
6760 * g_type_add_interface_static (g_define_type_id, TYPE_GIZMO, &g_implement_interface_info);
6762 * g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
6764 * return g_define_type_id__volatile;
6767 * The only pieces which have to be manually provided are the definitions of
6768 * the instance and class structure and the definitions of the instance and
6769 * class init functions.
6776 * G_DEFINE_TYPE_WITH_CODE:
6777 * @TN: The name of the new type, in Camel case.
6778 * @t_n: The name of the new type in lowercase, with words separated by '_'.
6779 * @T_P: The #GType of the parent type.
6780 * @_C_: Custom code that gets inserted in the *_get_type() function.
6782 * A convenience macro for type implementations.
6783 * Similar to G_DEFINE_TYPE(), but allows you to insert custom code into the
6784 * *_get_type() function, e.g. interface implementations via G_IMPLEMENT_INTERFACE().
6785 * See G_DEFINE_TYPE_EXTENDED() for an example.
6792 * G_DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME:
6794 * Extension point for default handler to URI association. See
6795 * <link linkend="extending-gio">Extending GIO</link>.
6801 * @class: a valid #GEnumClass
6803 * Casts a derived #GEnumClass structure into a #GEnumClass structure.
6808 * G_ENUM_CLASS_TYPE:
6809 * @class: a #GEnumClass
6811 * Get the type identifier from a given #GEnumClass structure.
6813 * Returns: the #GType
6818 * G_ENUM_CLASS_TYPE_NAME:
6819 * @class: a #GEnumClass
6821 * Get the static type name from a given #GEnumClass structure.
6823 * Returns: the type name.
6828 * G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE:
6830 * A key in the "access" namespace for checking deletion privileges.
6831 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
6832 * This attribute will be %TRUE if the user is able to delete the file.
6837 * G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE:
6839 * A key in the "access" namespace for getting execution privileges.
6840 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
6841 * This attribute will be %TRUE if the user is able to execute the file.
6846 * G_FILE_ATTRIBUTE_ACCESS_CAN_READ:
6848 * A key in the "access" namespace for getting read privileges.
6849 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
6850 * This attribute will be %TRUE if the user is able to read the file.
6855 * G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME:
6857 * A key in the "access" namespace for checking renaming privileges.
6858 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
6859 * This attribute will be %TRUE if the user is able to rename the file.
6864 * G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH:
6866 * A key in the "access" namespace for checking trashing privileges.
6867 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
6868 * This attribute will be %TRUE if the user is able to move the file to
6874 * G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE:
6876 * A key in the "access" namespace for getting write privileges.
6877 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
6878 * This attribute will be %TRUE if the user is able to write to the file.
6883 * G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE:
6885 * A key in the "dos" namespace for checking if the file's archive flag
6886 * is set. This attribute is %TRUE if the archive flag is set. This attribute
6887 * is only available for DOS file systems. Corresponding #GFileAttributeType
6888 * is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
6893 * G_FILE_ATTRIBUTE_DOS_IS_SYSTEM:
6895 * A key in the "dos" namespace for checking if the file's backup flag
6896 * is set. This attribute is %TRUE if the backup flag is set. This attribute
6897 * is only available for DOS file systems. Corresponding #GFileAttributeType
6898 * is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
6903 * G_FILE_ATTRIBUTE_ETAG_VALUE:
6905 * A key in the "etag" namespace for getting the value of the file's
6906 * entity tag. Corresponding #GFileAttributeType is
6907 * %G_FILE_ATTRIBUTE_TYPE_STRING.
6912 * G_FILE_ATTRIBUTE_FILESYSTEM_FREE:
6914 * A key in the "filesystem" namespace for getting the number of bytes of free space left on the
6915 * file system. Corresponding #GFileAttributeType is
6916 * %G_FILE_ATTRIBUTE_TYPE_UINT64.
6921 * G_FILE_ATTRIBUTE_FILESYSTEM_READONLY:
6923 * A key in the "filesystem" namespace for checking if the file system
6924 * is read only. Is set to %TRUE if the file system is read only.
6925 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
6930 * G_FILE_ATTRIBUTE_FILESYSTEM_SIZE:
6932 * A key in the "filesystem" namespace for getting the total size (in bytes) of the file system,
6933 * used in g_file_query_filesystem_info(). Corresponding #GFileAttributeType
6934 * is %G_FILE_ATTRIBUTE_TYPE_UINT64.
6939 * G_FILE_ATTRIBUTE_FILESYSTEM_TYPE:
6941 * A key in the "filesystem" namespace for getting the file system's type.
6942 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
6947 * G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW:
6949 * A key in the "filesystem" namespace for hinting a file manager
6950 * application whether it should preview (e.g. thumbnail) files on the
6951 * file system. The value for this key contain a
6952 * #GFilesystemPreviewType.
6957 * G_FILE_ATTRIBUTE_GVFS_BACKEND:
6959 * A key in the "gvfs" namespace that gets the name of the current
6960 * GVFS backend in use. Corresponding #GFileAttributeType is
6961 * %G_FILE_ATTRIBUTE_TYPE_STRING.
6966 * G_FILE_ATTRIBUTE_ID_FILE:
6968 * A key in the "id" namespace for getting a file identifier.
6969 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
6970 * An example use would be during listing files, to avoid recursive
6971 * directory scanning.
6976 * G_FILE_ATTRIBUTE_ID_FILESYSTEM:
6978 * A key in the "id" namespace for getting the file system identifier.
6979 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
6980 * An example use would be during drag and drop to see if the source
6981 * and target are on the same filesystem (default to move) or not (default
6987 * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT:
6989 * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be ejected.
6990 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
6995 * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT:
6997 * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is mountable.
6998 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7003 * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_POLL:
7005 * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be polled.
7006 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7013 * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START:
7015 * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be started.
7016 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7023 * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START_DEGRADED:
7025 * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be started
7027 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7034 * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_STOP:
7036 * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be stopped.
7037 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7044 * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT:
7046 * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is unmountable.
7047 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7052 * G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI:
7054 * A key in the "mountable" namespace for getting the HAL UDI for the mountable
7055 * file. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7060 * G_FILE_ATTRIBUTE_MOUNTABLE_IS_MEDIA_CHECK_AUTOMATIC:
7062 * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE)
7063 * is automatically polled for media.
7064 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7071 * G_FILE_ATTRIBUTE_MOUNTABLE_START_STOP_TYPE:
7073 * A key in the "mountable" namespace for getting the #GDriveStartStopType.
7074 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
7081 * G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE:
7083 * A key in the "mountable" namespace for getting the unix device.
7084 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
7089 * G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE:
7091 * A key in the "mountable" namespace for getting the unix device file.
7092 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7099 * G_FILE_ATTRIBUTE_OWNER_GROUP:
7101 * A key in the "owner" namespace for getting the file owner's group.
7102 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7107 * G_FILE_ATTRIBUTE_OWNER_USER:
7109 * A key in the "owner" namespace for getting the user name of the
7110 * file's owner. Corresponding #GFileAttributeType is
7111 * %G_FILE_ATTRIBUTE_TYPE_STRING.
7116 * G_FILE_ATTRIBUTE_OWNER_USER_REAL:
7118 * A key in the "owner" namespace for getting the real name of the
7119 * user that owns the file. Corresponding #GFileAttributeType is
7120 * %G_FILE_ATTRIBUTE_TYPE_STRING.
7125 * G_FILE_ATTRIBUTE_PREVIEW_ICON:
7127 * A key in the "preview" namespace for getting a #GIcon that can be
7128 * used to get preview of the file. For example, it may be a low
7129 * resolution thumbnail without metadata. Corresponding
7130 * #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT. The value
7131 * for this key should contain a #GIcon.
7138 * G_FILE_ATTRIBUTE_SELINUX_CONTEXT:
7140 * A key in the "selinux" namespace for getting the file's SELinux
7141 * context. Corresponding #GFileAttributeType is
7142 * %G_FILE_ATTRIBUTE_TYPE_STRING. Note that this attribute is only
7143 * available if GLib has been built with SELinux support.
7148 * G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE:
7150 * A key in the "standard" namespace for getting the amount of disk space
7151 * that is consumed by the file (in bytes). This will generally be larger
7152 * than the file size (due to block size overhead) but can occasionally be
7153 * smaller (for example, for sparse files).
7154 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
7161 * G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE:
7163 * A key in the "standard" namespace for getting the content type of the file.
7164 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7165 * The value for this key should contain a valid content type.
7170 * G_FILE_ATTRIBUTE_STANDARD_COPY_NAME:
7172 * A key in the "standard" namespace for getting the copy name of the file.
7173 * The copy name is an optional version of the name. If available it's always
7174 * in UTF8, and corresponds directly to the original filename (only transcoded to
7175 * UTF8). This is useful if you want to copy the file to another filesystem that
7176 * might have a different encoding. If the filename is not a valid string in the
7177 * encoding selected for the filesystem it is in then the copy name will not be set.
7178 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7183 * G_FILE_ATTRIBUTE_STANDARD_DESCRIPTION:
7185 * A key in the "standard" namespace for getting the description of the file.
7186 * The description is a utf8 string that describes the file, generally containing
7187 * the filename, but can also contain furter information. Example descriptions
7188 * could be "filename (on hostname)" for a remote file or "filename (in trash)"
7189 * for a file in the trash. This is useful for instance as the window title
7190 * when displaying a directory or for a bookmarks menu.
7191 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7196 * G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME:
7198 * A key in the "standard" namespace for getting the display name of the file.
7199 * A display name is guaranteed to be in UTF8 and can thus be displayed in
7201 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7206 * G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME:
7208 * A key in the "standard" namespace for edit name of the file.
7209 * An edit name is similar to the display name, but it is meant to be
7210 * used when you want to rename the file in the UI. The display name
7211 * might contain information you don't want in the new filename (such as
7212 * "(invalid unicode)" if the filename was in an invalid encoding).
7213 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7218 * G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE:
7220 * A key in the "standard" namespace for getting the fast content type.
7221 * The fast content type isn't as reliable as the regular one, as it
7222 * only uses the filename to guess it, but it is faster to calculate than the
7223 * regular content type.
7224 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7229 * G_FILE_ATTRIBUTE_STANDARD_ICON:
7231 * A key in the "standard" namespace for getting the icon for the file.
7232 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT.
7233 * The value for this key should contain a #GIcon.
7238 * G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP:
7240 * A key in the "standard" namespace for checking if a file is a backup file.
7241 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7246 * G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN:
7248 * A key in the "standard" namespace for checking if a file is hidden.
7249 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7254 * G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK:
7256 * A key in the "standard" namespace for checking if the file is a symlink.
7257 * Typically the actual type is something else, if we followed the symlink
7259 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7264 * G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL:
7266 * A key in the "standard" namespace for checking if a file is virtual.
7267 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7272 * G_FILE_ATTRIBUTE_STANDARD_NAME:
7274 * A key in the "standard" namespace for getting the name of the file.
7275 * The name is the on-disk filename which may not be in any known encoding,
7276 * and can thus not be generally displayed as is.
7277 * Use #G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME if you need to display the
7278 * name in a user interface.
7279 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
7284 * G_FILE_ATTRIBUTE_STANDARD_SIZE:
7286 * A key in the "standard" namespace for getting the file's size (in bytes).
7287 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
7292 * G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER:
7294 * A key in the "standard" namespace for setting the sort order of a file.
7295 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_INT32.
7296 * An example use would be in file managers, which would use this key
7297 * to set the order files are displayed. Files with smaller sort order
7298 * should be sorted first, and files without sort order as if sort order
7304 * G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET:
7306 * A key in the "standard" namespace for getting the symlink target, if the file
7307 * is a symlink. Corresponding #GFileAttributeType is
7308 * %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
7313 * G_FILE_ATTRIBUTE_STANDARD_TARGET_URI:
7315 * A key in the "standard" namespace for getting the target URI for the file, in
7316 * the case of %G_FILE_TYPE_SHORTCUT or %G_FILE_TYPE_MOUNTABLE files.
7317 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7322 * G_FILE_ATTRIBUTE_STANDARD_TYPE:
7324 * A key in the "standard" namespace for storing file types.
7325 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
7326 * The value for this key should contain a #GFileType.
7331 * G_FILE_ATTRIBUTE_THUMBNAILING_FAILED:
7333 * A key in the "thumbnail" namespace for checking if thumbnailing failed.
7334 * This attribute is %TRUE if thumbnailing failed. Corresponding
7335 * #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7340 * G_FILE_ATTRIBUTE_THUMBNAIL_PATH:
7342 * A key in the "thumbnail" namespace for getting the path to the thumbnail
7343 * image. Corresponding #GFileAttributeType is
7344 * %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
7349 * G_FILE_ATTRIBUTE_TIME_ACCESS:
7351 * A key in the "time" namespace for getting the time the file was last
7352 * accessed. Corresponding #GFileAttributeType is
7353 * %G_FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the
7354 * file was last accessed.
7359 * G_FILE_ATTRIBUTE_TIME_ACCESS_USEC:
7361 * A key in the "time" namespace for getting the microseconds of the time
7362 * the file was last accessed. This should be used in conjunction with
7363 * #G_FILE_ATTRIBUTE_TIME_ACCESS. Corresponding #GFileAttributeType is
7364 * %G_FILE_ATTRIBUTE_TYPE_UINT32.
7369 * G_FILE_ATTRIBUTE_TIME_CHANGED:
7371 * A key in the "time" namespace for getting the time the file was last
7372 * changed. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64,
7373 * and contains the UNIX time since the file was last changed.
7374 * This corresponds to the traditional UNIX ctime.
7379 * G_FILE_ATTRIBUTE_TIME_CHANGED_USEC:
7381 * A key in the "time" namespace for getting the microseconds of the time
7382 * the file was last changed. This should be used in conjunction with
7383 * #G_FILE_ATTRIBUTE_TIME_CHANGED. Corresponding #GFileAttributeType is
7384 * %G_FILE_ATTRIBUTE_TYPE_UINT32.
7389 * G_FILE_ATTRIBUTE_TIME_CREATED:
7391 * A key in the "time" namespace for getting the time the file was created.
7392 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64,
7393 * and contains the UNIX time since the file was created.
7394 * This corresponds to the NTFS ctime.
7399 * G_FILE_ATTRIBUTE_TIME_CREATED_USEC:
7401 * A key in the "time" namespace for getting the microseconds of the time
7402 * the file was created. This should be used in conjunction with
7403 * #G_FILE_ATTRIBUTE_TIME_CREATED. Corresponding #GFileAttributeType is
7404 * %G_FILE_ATTRIBUTE_TYPE_UINT32.
7409 * G_FILE_ATTRIBUTE_TIME_MODIFIED:
7411 * A key in the "time" namespace for getting the time the file was last
7412 * modified. Corresponding #GFileAttributeType is
7413 * %G_FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the
7414 * file was modified.
7419 * G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC:
7421 * A key in the "time" namespace for getting the miliseconds of the time
7422 * the file was last modified. This should be used in conjunction with
7423 * #G_FILE_ATTRIBUTE_TIME_MODIFIED. Corresponding #GFileAttributeType is
7424 * %G_FILE_ATTRIBUTE_TYPE_UINT32.
7429 * G_FILE_ATTRIBUTE_TRASH_DELETION_DATE:
7431 * A key in the "trash" namespace. When requested against
7432 * items in "trash:///", will return the date and time when the file
7433 * was trashed. The format of the returned string is YYYY-MM-DDThh:mm:ss.
7434 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7441 * G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT:
7443 * A key in the "trash" namespace. When requested against
7444 * "trash:///" returns the number of (toplevel) items in the trash folder.
7445 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
7450 * G_FILE_ATTRIBUTE_TRASH_ORIG_PATH:
7452 * A key in the "trash" namespace. When requested against
7453 * items in "trash:///", will return the original path to the file before it
7454 * was trashed. Corresponding #GFileAttributeType is
7455 * %G_FILE_ATTRIBUTE_TYPE_STRING.
7462 * G_FILE_ATTRIBUTE_UNIX_BLOCKS:
7464 * A key in the "unix" namespace for getting the number of blocks allocated
7465 * for the file. This attribute is only available for UNIX file systems.
7466 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
7471 * G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE:
7473 * A key in the "unix" namespace for getting the block size for the file
7474 * system. This attribute is only available for UNIX file systems.
7475 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
7480 * G_FILE_ATTRIBUTE_UNIX_DEVICE:
7482 * A key in the "unix" namespace for getting the device id of the device the
7483 * file is located on (see stat() documentation). This attribute is only
7484 * available for UNIX file systems. Corresponding #GFileAttributeType is
7485 * %G_FILE_ATTRIBUTE_TYPE_UINT32.
7490 * G_FILE_ATTRIBUTE_UNIX_GID:
7492 * A key in the "unix" namespace for getting the group ID for the file.
7493 * This attribute is only available for UNIX file systems.
7494 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
7499 * G_FILE_ATTRIBUTE_UNIX_INODE:
7501 * A key in the "unix" namespace for getting the inode of the file.
7502 * This attribute is only available for UNIX file systems. Corresponding
7503 * #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
7508 * G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT:
7510 * A key in the "unix" namespace for checking if the file represents a
7511 * UNIX mount point. This attribute is %TRUE if the file is a UNIX mount
7512 * point. This attribute is only available for UNIX file systems.
7513 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7518 * G_FILE_ATTRIBUTE_UNIX_MODE:
7520 * A key in the "unix" namespace for getting the mode of the file
7521 * (e.g. whether the file is a regular file, symlink, etc). See lstat()
7522 * documentation. This attribute is only available for UNIX file systems.
7523 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
7528 * G_FILE_ATTRIBUTE_UNIX_NLINK:
7530 * A key in the "unix" namespace for getting the number of hard links
7531 * for a file. See lstat() documentation. This attribute is only available
7532 * for UNIX file systems. Corresponding #GFileAttributeType is
7533 * %G_FILE_ATTRIBUTE_TYPE_UINT32.
7538 * G_FILE_ATTRIBUTE_UNIX_RDEV:
7540 * A key in the "unix" namespace for getting the device ID for the file
7541 * (if it is a special file). See lstat() documentation. This attribute
7542 * is only available for UNIX file systems. Corresponding #GFileAttributeType
7543 * is %G_FILE_ATTRIBUTE_TYPE_UINT32.
7548 * G_FILE_ATTRIBUTE_UNIX_UID:
7550 * A key in the "unix" namespace for getting the user ID for the file.
7551 * This attribute is only available for UNIX file systems.
7552 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
7558 * @class: a valid #GFlagsClass
7560 * Casts a derived #GFlagsClass structure into a #GFlagsClass structure.
7565 * G_FLAGS_CLASS_TYPE:
7566 * @class: a #GFlagsClass
7568 * Get the type identifier from a given #GFlagsClass structure.
7570 * Returns: the #GType
7575 * G_FLAGS_CLASS_TYPE_NAME:
7576 * @class: a #GFlagsClass
7578 * Get the static type name from a given #GFlagsClass structure.
7580 * Returns: the type name.
7585 * G_IMPLEMENT_INTERFACE:
7586 * @TYPE_IFACE: The #GType of the interface to add
7587 * @iface_init: The interface init function
7589 * A convenience macro to ease interface addition in the @_C_ section
7590 * of G_DEFINE_TYPE_WITH_CODE() or G_DEFINE_ABSTRACT_TYPE_WITH_CODE().
7591 * See G_DEFINE_TYPE_EXTENDED() for an example.
7592 * Note that this macro can only be used together with the G_DEFINE_TYPE_*
7593 * macros, since it depends on variable names from those macros.
7600 * G_IMPLEMENT_INTERFACE_DYNAMIC:
7601 * @TYPE_IFACE: The #GType of the interface to add
7602 * @iface_init: The interface init function
7604 * A convenience macro to ease interface addition in the @_C_ section
7605 * of G_DEFINE_DYNAMIC_TYPE_EXTENDED(). See G_DEFINE_DYNAMIC_TYPE_EXTENDED()
7607 * Note that this macro can only be used together with the
7608 * G_DEFINE_DYNAMIC_TYPE_EXTENDED macros, since it depends on variable
7609 * names from that macro.
7616 * G_INITIALLY_UNOWNED:
7617 * @object: Object which is subject to casting.
7619 * Casts a #GInitiallyUnowned or derived pointer into a (GInitiallyUnowned*)
7620 * pointer. Depending on the current debugging level, this function may invoke
7621 * certain runtime checks to identify invalid casts.
7626 * G_INITIALLY_UNOWNED_CLASS:
7627 * @class: a valid #GInitiallyUnownedClass
7629 * Casts a derived #GInitiallyUnownedClass structure into a
7630 * #GInitiallyUnownedClass structure.
7635 * G_INITIALLY_UNOWNED_GET_CLASS:
7636 * @object: a #GInitiallyUnowned instance.
7638 * Get the class structure associated to a #GInitiallyUnowned instance.
7640 * Returns: pointer to object class structure.
7647 * Error domain for GIO. Errors in this domain will be from the #GIOErrorEnum enumeration.
7648 * See #GError for more information on error domains.
7654 * @class: a #GEnumClass
7656 * Checks whether @class "is a" valid #GEnumClass structure of type %G_TYPE_ENUM
7663 * @class: a #GFlagsClass
7665 * Checks whether @class "is a" valid #GFlagsClass structure of type %G_TYPE_FLAGS
7671 * G_IS_INITIALLY_UNOWNED:
7672 * @object: Instance to check for being a %G_TYPE_INITIALLY_UNOWNED.
7674 * Checks whether a valid #GTypeInstance pointer is of type %G_TYPE_INITIALLY_UNOWNED.
7679 * G_IS_INITIALLY_UNOWNED_CLASS:
7680 * @class: a #GInitiallyUnownedClass
7682 * Checks whether @class "is a" valid #GInitiallyUnownedClass structure of type
7683 * %G_TYPE_INITIALLY_UNOWNED or derived.
7689 * @object: Instance to check for being a %G_TYPE_OBJECT.
7691 * Checks whether a valid #GTypeInstance pointer is of type %G_TYPE_OBJECT.
7696 * G_IS_OBJECT_CLASS:
7697 * @class: a #GObjectClass
7699 * Checks whether @class "is a" valid #GObjectClass structure of type
7700 * %G_TYPE_OBJECT or derived.
7706 * @pspec: a #GParamSpec
7708 * Checks whether @pspec "is a" valid #GParamSpec structure of type %G_TYPE_PARAM
7714 * G_IS_PARAM_SPEC_BOOLEAN:
7715 * @pspec: a valid #GParamSpec instance
7717 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_BOOLEAN.
7719 * Returns: %TRUE on success.
7724 * G_IS_PARAM_SPEC_BOXED:
7725 * @pspec: a valid #GParamSpec instance
7727 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_BOXED.
7729 * Returns: %TRUE on success.
7734 * G_IS_PARAM_SPEC_CHAR:
7735 * @pspec: a valid #GParamSpec instance
7737 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_CHAR.
7739 * Returns: %TRUE on success.
7744 * G_IS_PARAM_SPEC_CLASS:
7745 * @pclass: a #GParamSpecClass
7747 * Checks whether @pclass "is a" valid #GParamSpecClass structure of type
7748 * %G_TYPE_PARAM or derived.
7753 * G_IS_PARAM_SPEC_DOUBLE:
7754 * @pspec: a valid #GParamSpec instance
7756 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_DOUBLE.
7758 * Returns: %TRUE on success.
7763 * G_IS_PARAM_SPEC_ENUM:
7764 * @pspec: a valid #GParamSpec instance
7766 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_ENUM.
7768 * Returns: %TRUE on success.
7773 * G_IS_PARAM_SPEC_FLAGS:
7774 * @pspec: a valid #GParamSpec instance
7776 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_FLAGS.
7778 * Returns: %TRUE on success.
7783 * G_IS_PARAM_SPEC_FLOAT:
7784 * @pspec: a valid #GParamSpec instance
7786 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_FLOAT.
7788 * Returns: %TRUE on success.
7793 * G_IS_PARAM_SPEC_GTYPE:
7794 * @pspec: a #GParamSpec
7796 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_GTYPE.
7799 * Returns: %TRUE on success.
7804 * G_IS_PARAM_SPEC_INT:
7805 * @pspec: a valid #GParamSpec instance
7807 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_INT.
7809 * Returns: %TRUE on success.
7814 * G_IS_PARAM_SPEC_INT64:
7815 * @pspec: a valid #GParamSpec instance
7817 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_INT64.
7819 * Returns: %TRUE on success.
7824 * G_IS_PARAM_SPEC_LONG:
7825 * @pspec: a valid #GParamSpec instance
7827 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_LONG.
7829 * Returns: %TRUE on success.
7834 * G_IS_PARAM_SPEC_OBJECT:
7835 * @pspec: a valid #GParamSpec instance
7837 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_OBJECT.
7839 * Returns: %TRUE on success.
7844 * G_IS_PARAM_SPEC_OVERRIDE:
7845 * @pspec: a #GParamSpec
7847 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_OVERRIDE.
7850 * Returns: %TRUE on success.
7855 * G_IS_PARAM_SPEC_PARAM:
7856 * @pspec: a valid #GParamSpec instance
7858 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_PARAM.
7860 * Returns: %TRUE on success.
7865 * G_IS_PARAM_SPEC_POINTER:
7866 * @pspec: a valid #GParamSpec instance
7868 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_POINTER.
7870 * Returns: %TRUE on success.
7875 * G_IS_PARAM_SPEC_STRING:
7876 * @pspec: a valid #GParamSpec instance
7878 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_STRING.
7880 * Returns: %TRUE on success.
7885 * G_IS_PARAM_SPEC_UCHAR:
7886 * @pspec: a valid #GParamSpec instance
7888 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UCHAR.
7890 * Returns: %TRUE on success.
7895 * G_IS_PARAM_SPEC_UINT:
7896 * @pspec: a valid #GParamSpec instance
7898 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UINT.
7900 * Returns: %TRUE on success.
7905 * G_IS_PARAM_SPEC_UINT64:
7906 * @pspec: a valid #GParamSpec instance
7908 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UINT64.
7910 * Returns: %TRUE on success.
7915 * G_IS_PARAM_SPEC_ULONG:
7916 * @pspec: a valid #GParamSpec instance
7918 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_ULONG.
7920 * Returns: %TRUE on success.
7925 * G_IS_PARAM_SPEC_UNICHAR:
7926 * @pspec: a valid #GParamSpec instance
7928 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UNICHAR.
7930 * Returns: %TRUE on success.
7935 * G_IS_PARAM_SPEC_VALUE_ARRAY:
7936 * @pspec: a valid #GParamSpec instance
7938 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_VALUE_ARRAY.
7940 * Returns: %TRUE on success.
7945 * G_IS_PARAM_SPEC_VARIANT:
7946 * @pspec: a #GParamSpec
7948 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_VARIANT.
7950 * Returns: %TRUE on success
7957 * @value: A #GValue structure.
7959 * Checks if @value is a valid and initialized #GValue structure.
7961 * Returns: %TRUE on success.
7968 * Error domain for markup parsing.
7969 * Errors in this domain will be from the #GMarkupError enumeration.
7970 * See #GError for information on error domains.
7978 * Returns %TRUE if a #GNode is a leaf node.
7979 * (i.e. it has no children)
7981 * Returns: %TRUE if the #GNode is a leaf node
7989 * Returns %TRUE if a #GNode is the root of a tree.
7990 * (i.e. it has no parent or siblings)
7992 * Returns: %TRUE if the #GNode is the root of a tree
7998 * @object: Object which is subject to casting.
8000 * Casts a #GObject or derived pointer into a (GObject*) pointer.
8001 * Depending on the current debugging level, this function may invoke
8002 * certain runtime checks to identify invalid casts.
8008 * @class: a valid #GObjectClass
8010 * Casts a derived #GObjectClass structure into a #GObjectClass structure.
8015 * G_OBJECT_CLASS_NAME:
8016 * @class: a valid #GObjectClass
8018 * Return the name of a class structure's type.
8019 * should not be freed.
8021 * Returns: Type name of @class. The string is owned by the type system and
8026 * G_OBJECT_CLASS_TYPE:
8027 * @class: a valid #GObjectClass
8029 * Get the type id of a class structure.
8031 * Returns: Type id of @class.
8036 * G_OBJECT_GET_CLASS:
8037 * @object: a #GObject instance.
8039 * Get the class structure associated to a #GObject instance.
8041 * Returns: pointer to object class structure.
8047 * @object: Object to return the type id for.
8049 * Get the type id of an object.
8051 * Returns: Type id of @object.
8056 * G_OBJECT_TYPE_NAME:
8057 * @object: Object to return the type name for.
8059 * Get the name of an object's type.
8060 * should not be freed.
8062 * Returns: Type name of @object. The string is owned by the type system and
8067 * G_OBJECT_WARN_INVALID_PROPERTY_ID:
8068 * @object: the #GObject on which set_property() or get_property() was called
8069 * @property_id: the numeric id of the property
8070 * @pspec: the #GParamSpec of the property
8072 * This macro should be used to emit a standard warning about unexpected
8073 * properties in set_property() and get_property() implementations.
8080 * Error domain for option parsing. Errors in this domain will
8081 * be from the #GOptionError enumeration. See #GError for information on
8087 * G_OPTION_REMAINING:
8089 * If a long option in the main group has this name, it is not treated as a
8090 * regular option. Instead it collects all non-option arguments which would
8091 * otherwise be left in <literal>argv</literal>. The option must be of type
8092 * %G_OPTION_ARG_CALLBACK, %G_OPTION_ARG_STRING_ARRAY
8093 * or %G_OPTION_ARG_FILENAME_ARRAY.
8094 * Using #G_OPTION_REMAINING instead of simply scanning <literal>argv</literal>
8095 * for leftover arguments has the advantage that GOption takes care of
8096 * necessary encoding conversions for strings or filenames.
8105 * Mask containing the bits of #GParamSpec.flags which are reserved for GLib.
8110 * G_PARAM_READWRITE:
8112 * #GParamFlags value alias for %G_PARAM_READABLE | %G_PARAM_WRITABLE.
8118 * @pspec: a valid #GParamSpec
8120 * Casts a derived #GParamSpec object (e.g. of type #GParamSpecInt) into
8121 * a #GParamSpec object.
8126 * G_PARAM_SPEC_BOOLEAN:
8127 * @pspec: a valid #GParamSpec instance
8129 * Cast a #GParamSpec instance into a #GParamSpecBoolean.
8134 * G_PARAM_SPEC_BOXED:
8135 * @pspec: a valid #GParamSpec instance
8137 * Cast a #GParamSpec instance into a #GParamSpecBoxed.
8142 * G_PARAM_SPEC_CHAR:
8143 * @pspec: a valid #GParamSpec instance
8145 * Cast a #GParamSpec instance into a #GParamSpecChar.
8150 * G_PARAM_SPEC_CLASS:
8151 * @pclass: a valid #GParamSpecClass
8153 * Casts a derived #GParamSpecClass structure into a #GParamSpecClass structure.
8158 * G_PARAM_SPEC_DOUBLE:
8159 * @pspec: a valid #GParamSpec instance
8161 * Cast a #GParamSpec instance into a #GParamSpecDouble.
8166 * G_PARAM_SPEC_ENUM:
8167 * @pspec: a valid #GParamSpec instance
8169 * Cast a #GParamSpec instance into a #GParamSpecEnum.
8174 * G_PARAM_SPEC_FLAGS:
8175 * @pspec: a valid #GParamSpec instance
8177 * Cast a #GParamSpec instance into a #GParamSpecFlags.
8182 * G_PARAM_SPEC_FLOAT:
8183 * @pspec: a valid #GParamSpec instance
8185 * Cast a #GParamSpec instance into a #GParamSpecFloat.
8190 * G_PARAM_SPEC_GET_CLASS:
8191 * @pspec: a valid #GParamSpec
8193 * Retrieves the #GParamSpecClass of a #GParamSpec.
8198 * G_PARAM_SPEC_GTYPE:
8199 * @pspec: a #GParamSpec
8201 * Casts a #GParamSpec into a #GParamSpecGType.
8209 * @pspec: a valid #GParamSpec instance
8211 * Cast a #GParamSpec instance into a #GParamSpecInt.
8216 * G_PARAM_SPEC_INT64:
8217 * @pspec: a valid #GParamSpec instance
8219 * Cast a #GParamSpec instance into a #GParamSpecInt64.
8224 * G_PARAM_SPEC_LONG:
8225 * @pspec: a valid #GParamSpec instance
8227 * Cast a #GParamSpec instance into a #GParamSpecLong.
8232 * G_PARAM_SPEC_OBJECT:
8233 * @pspec: a valid #GParamSpec instance
8235 * Casts a #GParamSpec instance into a #GParamSpecObject.
8240 * G_PARAM_SPEC_OVERRIDE:
8241 * @pspec: a #GParamSpec
8243 * Casts a #GParamSpec into a #GParamSpecOverride.
8250 * G_PARAM_SPEC_PARAM:
8251 * @pspec: a valid #GParamSpec instance
8253 * Casts a #GParamSpec instance into a #GParamSpecParam.
8258 * G_PARAM_SPEC_POINTER:
8259 * @pspec: a valid #GParamSpec instance
8261 * Casts a #GParamSpec instance into a #GParamSpecPointer.
8266 * G_PARAM_SPEC_STRING:
8267 * @pspec: a valid #GParamSpec instance
8269 * Casts a #GParamSpec instance into a #GParamSpecString.
8274 * G_PARAM_SPEC_TYPE:
8275 * @pspec: a valid #GParamSpec
8277 * Retrieves the #GType of this @pspec.
8282 * G_PARAM_SPEC_TYPE_NAME:
8283 * @pspec: a valid #GParamSpec
8285 * Retrieves the #GType name of this @pspec.
8290 * G_PARAM_SPEC_UCHAR:
8291 * @pspec: a valid #GParamSpec instance
8293 * Cast a #GParamSpec instance into a #GParamSpecUChar.
8298 * G_PARAM_SPEC_UINT:
8299 * @pspec: a valid #GParamSpec instance
8301 * Cast a #GParamSpec instance into a #GParamSpecUInt.
8306 * G_PARAM_SPEC_UINT64:
8307 * @pspec: a valid #GParamSpec instance
8309 * Cast a #GParamSpec instance into a #GParamSpecUInt64.
8314 * G_PARAM_SPEC_ULONG:
8315 * @pspec: a valid #GParamSpec instance
8317 * Cast a #GParamSpec instance into a #GParamSpecULong.
8322 * G_PARAM_SPEC_UNICHAR:
8323 * @pspec: a valid #GParamSpec instance
8325 * Cast a #GParamSpec instance into a #GParamSpecUnichar.
8330 * G_PARAM_SPEC_VALUE_ARRAY:
8331 * @pspec: a valid #GParamSpec instance
8333 * Cast a #GParamSpec instance into a #GParamSpecValueArray.
8338 * G_PARAM_SPEC_VALUE_TYPE:
8339 * @pspec: a valid #GParamSpec
8341 * Retrieves the #GType to initialize a #GValue for this parameter.
8346 * G_PARAM_SPEC_VARIANT:
8347 * @pspec: a #GParamSpec
8349 * Casts a #GParamSpec into a #GParamSpecVariant.
8356 * G_PARAM_STATIC_STRINGS:
8358 * #GParamFlags value alias for %G_PARAM_STATIC_NAME | %G_PARAM_STATIC_NICK | %G_PARAM_STATIC_BLURB.
8364 * G_PARAM_USER_SHIFT:
8366 * Minimum shift count to be used for user defined flags, to be stored in
8367 * #GParamSpec.flags. The maximum allowed is 30 + G_PARAM_USER_SHIFT.
8372 * G_PRIORITY_DEFAULT:
8374 * Use this for default priority event sources.
8375 * In GLib this priority is used when adding timeout functions
8376 * with g_timeout_add(). In GDK this priority is used for events
8377 * from the X server.
8382 * G_PRIORITY_DEFAULT_IDLE:
8384 * Use this for default priority idle functions.
8385 * In GLib this priority is used when adding idle functions with
8393 * Use this for high priority event sources.
8394 * It is not used within GLib or GTK+.
8399 * G_PRIORITY_HIGH_IDLE:
8401 * Use this for high priority idle functions.
8402 * GTK+ uses #G_PRIORITY_HIGH_IDLE + 10 for resizing operations,
8403 * and #G_PRIORITY_HIGH_IDLE + 20 for redrawing operations. (This is
8404 * done to ensure that any pending resizes are processed before any
8405 * pending redraws, so that widgets are not redrawn twice unnecessarily.)
8412 * Use this for very low priority background tasks.
8413 * It is not used within GLib or GTK+.
8418 * G_PROXY_EXTENSION_POINT_NAME:
8420 * Extension point for proxy functionality.
8421 * See <link linkend="extending-gio">Extending GIO</link>.
8428 * G_PROXY_RESOLVER_EXTENSION_POINT_NAME:
8430 * Extension point for proxy resolving functionality.
8431 * See <link linkend="extending-gio">Extending GIO</link>.
8438 * Error domain for regular expressions. Errors in this domain will be
8439 * from the #GRegexError enumeration. See #GError for information on
8449 * Error domain for #GResolver. Errors in this domain will be from the
8450 * #GResolverError enumeration. See #GError for more information on
8456 * G_SETTINGS_BACKEND_EXTENSION_POINT_NAME:
8458 * Extension point for #GSettingsBackend functionality.
8463 * G_SIGNAL_FLAGS_MASK:
8465 * A mask for all #GSignalFlags bits.
8470 * G_SIGNAL_MATCH_MASK:
8472 * A mask for all #GSignalMatchType bits.
8477 * G_SIGNAL_TYPE_STATIC_SCOPE:
8479 * This macro flags signal argument types for which the signal system may
8480 * assume that instances thereof remain persistent across all signal emissions
8481 * they are used in. This is only useful for non ref-counted, value-copy types.
8482 * To flag a signal argument in this way, add
8483 * <literal>| G_SIGNAL_TYPE_STATIC_SCOPE</literal> to the corresponding argument
8484 * of g_signal_new().
8486 * g_signal_new ("size_request",
8487 * G_TYPE_FROM_CLASS (gobject_class),
8488 * G_SIGNAL_RUN_FIRST,
8489 * G_STRUCT_OFFSET (GtkWidgetClass, size_request),
8491 * _gtk_marshal_VOID__BOXED,
8493 * GTK_TYPE_REQUISITION | G_SIGNAL_TYPE_STATIC_SCOPE);
8501 * Evaluates to a time span of one day.
8510 * Evaluates to a time span of one hour.
8517 * G_TIME_SPAN_MILLISECOND:
8519 * Evaluates to a time span of one millisecond.
8526 * G_TIME_SPAN_MINUTE:
8528 * Evaluates to a time span of one minute.
8535 * G_TIME_SPAN_SECOND:
8537 * Evaluates to a time span of one second.
8544 * G_TLS_BACKEND_EXTENSION_POINT_NAME:
8546 * Extension point for TLS functionality via #GTlsBackend.
8547 * See <link linkend="extending-gio">Extending GIO</link>.
8554 * Error domain for TLS. Errors in this domain will be from the
8555 * #GTlsError enumeration. See #GError for more information on error
8563 * The #GType for a boxed type holding a #GArray reference.
8572 * The fundamental type corresponding to #gboolean.
8579 * The fundamental type from which all boxed types are derived.
8584 * G_TYPE_BYTE_ARRAY:
8586 * The #GType for a boxed type holding a #GByteArray reference.
8595 * The fundamental type corresponding to #gchar.
8596 * The type designated by G_TYPE_CHAR is unconditionally an 8-bit signed integer.
8597 * This may or may not be the same type a the C type "gchar".
8602 * G_TYPE_CHECK_CLASS_CAST:
8603 * @g_class: Location of a #GTypeClass structure.
8604 * @g_type: The type to be returned.
8605 * @c_type: The corresponding C type of class structure of @g_type.
8607 * Checks that @g_class is a class structure of the type identified by @g_type
8608 * and issues a warning if this is not the case. Returns @g_class casted
8609 * to a pointer to @c_type.
8610 * This macro should only be used in type implementations.
8615 * G_TYPE_CHECK_CLASS_TYPE:
8616 * @g_class: Location of a #GTypeClass structure.
8617 * @g_type: The type to be checked.
8619 * Checks if @g_class is a class structure of the type identified by
8620 * This macro should only be used in type implementations.
8622 * Returns: %TRUE on success.
8627 * G_TYPE_CHECK_INSTANCE:
8628 * @instance: Location of a #GTypeInstance structure.
8630 * Checks if @instance is a valid #GTypeInstance structure,
8631 * otherwise issues a warning and returns %FALSE.
8632 * This macro should only be used in type implementations.
8634 * Returns: %TRUE on success.
8639 * G_TYPE_CHECK_INSTANCE_CAST:
8640 * @instance: Location of a #GTypeInstance structure.
8641 * @g_type: The type to be returned.
8642 * @c_type: The corresponding C type of @g_type.
8644 * Checks that @instance is an instance of the type identified by @g_type
8645 * and issues a warning if this is not the case. Returns @instance casted
8646 * to a pointer to @c_type.
8647 * This macro should only be used in type implementations.
8652 * G_TYPE_CHECK_INSTANCE_TYPE:
8653 * @instance: Location of a #GTypeInstance structure.
8654 * @g_type: The type to be checked
8656 * Checks if @instance is an instance of the type identified by @g_type.
8657 * This macro should only be used in type implementations.
8659 * Returns: %TRUE on success.
8664 * G_TYPE_CHECK_VALUE:
8667 * Checks if @value has been initialized to hold values
8669 * This macro should only be used in type implementations.
8671 * Returns: %TRUE on success.
8676 * G_TYPE_CHECK_VALUE_TYPE:
8678 * @g_type: The type to be checked.
8680 * Checks if @value has been initialized to hold values
8682 * This macro should only be used in type implementations.
8684 * Returns: %TRUE on success.
8689 * G_TYPE_CLASS_GET_PRIVATE:
8690 * @klass: the class of a type deriving from @private_type.
8691 * @g_type: the type identifying which private data to retrieve.
8692 * @c_type: The C type for the private structure.
8694 * Gets the private class structure for a particular type.
8695 * The private structure must have been registered in the
8696 * get_type() function with g_type_add_class_private().
8697 * This macro should only be used in type implementations.
8700 * Returns: a pointer to the private data structure.
8707 * The #GType for #GClosure.
8714 * The #GType for #GDate.
8721 * The #GType for a boxed type holding a #GDateTime.
8728 * G_TYPE_DBUS_ANNOTATION_INFO:
8730 * The #GType for a boxed type holding a #GDBusAnnotationInfo.
8737 * G_TYPE_DBUS_ARG_INFO:
8739 * The #GType for a boxed type holding a #GDBusArgInfo.
8746 * G_TYPE_DBUS_INTERFACE_INFO:
8748 * The #GType for a boxed type holding a #GDBusInterfaceInfo.
8755 * G_TYPE_DBUS_METHOD_INFO:
8757 * The #GType for a boxed type holding a #GDBusMethodInfo.
8764 * G_TYPE_DBUS_NODE_INFO:
8766 * The #GType for a boxed type holding a #GDBusNodeInfo.
8773 * G_TYPE_DBUS_PROPERTY_INFO:
8775 * The #GType for a boxed type holding a #GDBusPropertyInfo.
8782 * G_TYPE_DBUS_SIGNAL_INFO:
8784 * The #GType for a boxed type holding a #GDBusSignalInfo.
8793 * The fundamental type corresponding to #gdouble.
8800 * The fundamental type from which all enumeration types are derived.
8807 * The #GType for a boxed type holding a #GError.
8816 * The fundamental type from which all flags types are derived.
8821 * G_TYPE_FLAG_RESERVED_ID_BIT:
8823 * A bit in the type number that's supposed to be left untouched.
8830 * The fundamental type corresponding to #gfloat.
8835 * G_TYPE_FROM_CLASS:
8836 * @g_class: Location of a valid #GTypeClass structure.
8838 * Get the type identifier from a given @class structure.
8839 * This macro should only be used in type implementations.
8841 * Returns: the #GType
8846 * G_TYPE_FROM_INSTANCE:
8847 * @instance: Location of a valid #GTypeInstance structure.
8849 * Get the type identifier from a given @instance structure.
8850 * This macro should only be used in type implementations.
8852 * Returns: the #GType
8857 * G_TYPE_FROM_INTERFACE:
8858 * @g_iface: Location of a valid #GTypeInterface structure.
8860 * Get the type identifier from a given @interface structure.
8861 * This macro should only be used in type implementations.
8863 * Returns: the #GType
8868 * G_TYPE_FUNDAMENTAL:
8869 * @type: A #GType value.
8871 * The fundamental type which is the ancestor of @type.
8872 * Fundamental types are types that serve as ultimate bases for the derived types,
8873 * thus they are the roots of distinct inheritance hierarchies.
8878 * G_TYPE_FUNDAMENTAL_MAX:
8880 * An integer constant that represents the number of identifiers reserved
8881 * for types that are assigned at compile-time.
8886 * G_TYPE_FUNDAMENTAL_SHIFT:
8888 * Shift value used in converting numbers to type IDs.
8895 * The #GType for #GString.
8902 * The type for #GType.
8907 * G_TYPE_HASH_TABLE:
8909 * The #GType for a boxed type holding a #GHashTable reference.
8916 * G_TYPE_HAS_VALUE_TABLE:
8917 * @type: A #GType value.
8919 * Checks if @type has a #GTypeValueTable.
8921 * Returns: %TRUE on success.
8926 * G_TYPE_INITIALLY_UNOWNED:
8928 * The type for #GInitiallyUnowned.
8933 * G_TYPE_INSTANCE_GET_CLASS:
8934 * @instance: Location of the #GTypeInstance structure.
8935 * @g_type: The #GType of the class to be returned.
8936 * @c_type: The C type of the class structure.
8938 * Get the class structure of a given @instance, casted
8939 * to a specified ancestor type @g_type of the instance.
8940 * Note that while calling a GInstanceInitFunc(), the class pointer gets
8941 * modified, so it might not always return the expected pointer.
8942 * This macro should only be used in type implementations.
8944 * Returns: a pointer to the class structure
8949 * G_TYPE_INSTANCE_GET_INTERFACE:
8950 * @instance: Location of the #GTypeInstance structure.
8951 * @g_type: The #GType of the interface to be returned.
8952 * @c_type: The C type of the interface structure.
8954 * Get the interface structure for interface @g_type of a given @instance.
8955 * This macro should only be used in type implementations.
8957 * Returns: a pointer to the interface structure
8962 * G_TYPE_INSTANCE_GET_PRIVATE:
8963 * @instance: the instance of a type deriving from @private_type.
8964 * @g_type: the type identifying which private data to retrieve.
8965 * @c_type: The C type for the private structure.
8967 * Gets the private structure for a particular type.
8968 * The private structure must have been registered in the
8969 * class_init function with g_type_class_add_private().
8970 * This macro should only be used in type implementations.
8973 * Returns: a pointer to the private data structure.
8980 * The fundamental type corresponding to #gint.
8987 * The fundamental type corresponding to #gint64.
8994 * The fundamental type from which all interfaces are derived.
9001 * An invalid #GType used as error return value in some functions which return
9007 * G_TYPE_IO_CHANNEL:
9009 * The #GType for #GIOChannel.
9014 * G_TYPE_IO_CONDITION:
9016 * The #GType for #GIOCondition.
9021 * G_TYPE_IS_ABSTRACT:
9022 * @type: A #GType value.
9024 * Checks if @type is an abstract type. An abstract type can not be
9025 * instantiated and is normally used as an abstract base class for
9028 * Returns: %TRUE on success.
9033 * G_TYPE_IS_CLASSED:
9034 * @type: A #GType value.
9036 * Checks if @type is a classed type.
9038 * Returns: %TRUE on success.
9043 * G_TYPE_IS_DEEP_DERIVABLE:
9044 * @type: A #GType value.
9046 * Checks if @type is a deep derivable type. A deep derivable type
9047 * can be used as the base class of a deep (multi-level) class hierarchy.
9049 * Returns: %TRUE on success.
9054 * G_TYPE_IS_DERIVABLE:
9055 * @type: A #GType value.
9057 * Checks if @type is a derivable type. A derivable type can
9058 * be used as the base class of a flat (single-level) class hierarchy.
9060 * Returns: %TRUE on success.
9065 * G_TYPE_IS_DERIVED:
9066 * @type: A #GType value.
9068 * Checks if @type is derived (or in object-oriented terminology:
9069 * inherited) from another type (this holds true for all non-fundamental
9072 * Returns: %TRUE on success.
9078 * @type: a #GType ID.
9080 * Checks whether @type "is a" %G_TYPE_ENUM.
9082 * Returns: %TRUE if @type "is a" %G_TYPE_ENUM.
9088 * @type: a #GType ID.
9090 * Checks whether @type "is a" %G_TYPE_FLAGS.
9092 * Returns: %TRUE if @type "is a" %G_TYPE_FLAGS.
9097 * G_TYPE_IS_FUNDAMENTAL:
9098 * @type: A #GType value.
9100 * Checks if @type is a fundamental type.
9102 * Returns: %TRUE on success.
9107 * G_TYPE_IS_INSTANTIATABLE:
9108 * @type: A #GType value.
9110 * Checks if @type can be instantiated. Instantiation is the
9111 * process of creating an instance (object) of this type.
9113 * Returns: %TRUE on success.
9118 * G_TYPE_IS_INTERFACE:
9119 * @type: A #GType value.
9121 * Checks if @type is an interface type.
9122 * An interface type provides a pure API, the implementation
9123 * of which is provided by another type (which is then said to conform
9124 * to the interface). GLib interfaces are somewhat analogous to Java
9125 * interfaces and C++ classes containing only pure virtual functions,
9126 * with the difference that GType interfaces are not derivable (but see
9127 * g_type_interface_add_prerequisite() for an alternative).
9129 * Returns: %TRUE on success.
9135 * @type: Type id to check
9137 * Check if the passed in type id is a %G_TYPE_OBJECT or derived from it.
9139 * Returns: %FALSE or %TRUE, indicating whether @type is a %G_TYPE_OBJECT.
9145 * @type: a #GType ID
9147 * Checks whether @type "is a" %G_TYPE_PARAM.
9153 * @type: A #GType value.
9155 * Checks whether the passed in type ID can be used for g_value_init().
9156 * That is, this macro checks whether this type provides an implementation
9157 * of the #GTypeValueTable functions required for a type to create a #GValue of.
9159 * Returns: Whether @type is suitable as a #GValue type.
9164 * G_TYPE_IS_VALUE_ABSTRACT:
9165 * @type: A #GType value.
9167 * Checks if @type is an abstract value type. An abstract value type introduces
9168 * a value table, but can't be used for g_value_init() and is normally used as
9169 * an abstract base type for derived value types.
9171 * Returns: %TRUE on success.
9176 * G_TYPE_IS_VALUE_TYPE:
9177 * @type: A #GType value.
9179 * Checks if @type is a value type and can be used with g_value_init().
9181 * Returns: %TRUE on success.
9188 * The fundamental type corresponding to #glong.
9193 * G_TYPE_MAKE_FUNDAMENTAL:
9194 * @x: the fundamental type number.
9196 * Get the type ID for the fundamental type number @x.
9197 * Use g_type_fundamental_next() instead of this macro to create new fundamental
9200 * Returns: the GType
9207 * A fundamental type which is used as a replacement for the C
9208 * <literal>void</literal> return type.
9215 * The fundamental type for #GObject.
9222 * The fundamental type from which all #GParamSpec types are derived.
9227 * G_TYPE_PARAM_BOOLEAN:
9229 * The #GType of #GParamSpecBoolean.
9234 * G_TYPE_PARAM_BOXED:
9236 * The #GType of #GParamSpecBoxed.
9241 * G_TYPE_PARAM_CHAR:
9243 * The #GType of #GParamSpecChar.
9248 * G_TYPE_PARAM_DOUBLE:
9250 * The #GType of #GParamSpecDouble.
9255 * G_TYPE_PARAM_ENUM:
9257 * The #GType of #GParamSpecEnum.
9262 * G_TYPE_PARAM_FLAGS:
9264 * The #GType of #GParamSpecFlags.
9269 * G_TYPE_PARAM_FLOAT:
9271 * The #GType of #GParamSpecFloat.
9276 * G_TYPE_PARAM_GTYPE:
9278 * The #GType of #GParamSpecGType.
9287 * The #GType of #GParamSpecInt.
9292 * G_TYPE_PARAM_INT64:
9294 * The #GType of #GParamSpecInt64.
9299 * G_TYPE_PARAM_LONG:
9301 * The #GType of #GParamSpecLong.
9306 * G_TYPE_PARAM_OBJECT:
9308 * The #GType of #GParamSpecObject.
9313 * G_TYPE_PARAM_OVERRIDE:
9315 * The #GType of #GParamSpecOverride.
9322 * G_TYPE_PARAM_PARAM:
9324 * The #GType of #GParamSpecParam.
9329 * G_TYPE_PARAM_POINTER:
9331 * The #GType of #GParamSpecPointer.
9336 * G_TYPE_PARAM_STRING:
9338 * The #GType of #GParamSpecString.
9343 * G_TYPE_PARAM_UCHAR:
9345 * The #GType of #GParamSpecUChar.
9350 * G_TYPE_PARAM_UINT:
9352 * The #GType of #GParamSpecUInt.
9357 * G_TYPE_PARAM_UINT64:
9359 * The #GType of #GParamSpecUInt64.
9364 * G_TYPE_PARAM_ULONG:
9366 * The #GType of #GParamSpecULong.
9371 * G_TYPE_PARAM_UNICHAR:
9373 * The #GType of #GParamSpecUnichar.
9378 * G_TYPE_PARAM_VALUE_ARRAY:
9380 * The #GType of #GParamSpecValueArray.
9385 * G_TYPE_PARAM_VARIANT:
9387 * The #GType of #GParamSpecVariant.
9396 * The fundamental type corresponding to #gpointer.
9403 * The #GType for a boxed type holding a #GPtrArray reference.
9412 * The #GType for a boxed type holding a #GRegex reference.
9419 * G_TYPE_RESERVED_BSE_FIRST:
9421 * First fundamental type number to create a new fundamental type id with
9422 * G_TYPE_MAKE_FUNDAMENTAL() reserved for BSE.
9427 * G_TYPE_RESERVED_BSE_LAST:
9429 * Last fundamental type number reserved for BSE.
9434 * G_TYPE_RESERVED_GLIB_FIRST:
9436 * First fundamental type number to create a new fundamental type id with
9437 * G_TYPE_MAKE_FUNDAMENTAL() reserved for GLib.
9442 * G_TYPE_RESERVED_GLIB_LAST:
9444 * Last fundamental type number reserved for GLib.
9449 * G_TYPE_RESERVED_USER_FIRST:
9451 * First available fundamental type number to create new fundamental
9452 * type id with G_TYPE_MAKE_FUNDAMENTAL().
9459 * The fundamental type corresponding to nul-terminated C strings.
9466 * The #GType for a boxed type holding a %NULL-terminated array of strings.
9467 * The code fragments in the following example show the use of a property of
9468 * type #G_TYPE_STRV with g_object_class_install_property(), g_object_set()
9469 * and g_object_get().
9471 * g_object_class_install_property (object_class,
9473 * g_param_spec_boxed ("authors",
9475 * _("List of authors"),
9477 * G_PARAM_READWRITE));
9478 * gchar *authors[] = { "Owen", "Tim", NULL };
9479 * g_object_set (obj, "authors", authors, NULL);
9481 * g_object_get (obj, "authors", &writers, NULL);
9482 * // do something with writers
9483 * g_strfreev (writers);
9493 * The fundamental type corresponding to #guchar.
9500 * The fundamental type corresponding to #guint.
9507 * The fundamental type corresponding to #guint64.
9514 * The fundamental type corresponding to #gulong.
9521 * The type ID of the "GValue" type which is a boxed type,
9522 * used to pass around pointers to GValues.
9527 * G_TYPE_VALUE_ARRAY:
9529 * The type ID of the "GValueArray" type which is a boxed type,
9530 * used to pass around pointers to GValueArrays.
9537 * The fundamental type corresponding to #GVariant.
9538 * All floating #GVariant instances passed through the #GType system are
9540 * Note that callbacks in closures, and signal handlers
9541 * for signals of return type %G_TYPE_VARIANT, must never return floating
9543 * with this fundamental type in 2.26.
9545 * Note: GLib 2.24 did include a boxed type with this name. It was replaced
9551 * G_TYPE_VARIANT_TYPE:
9553 * The #GType for a boxed type holding a #GVariantType.
9560 * G_URI_RESERVED_CHARS_ALLOWED_IN_PATH:
9562 * Allowed characters in a path. Includes "!$&'()*+,;=:@/".
9567 * G_URI_RESERVED_CHARS_ALLOWED_IN_PATH_ELEMENT:
9569 * Allowed characters in path elements. Includes "!$&'()*+,;=:@".
9574 * G_URI_RESERVED_CHARS_ALLOWED_IN_USERINFO:
9576 * Allowed characters in userinfo as defined in RFC 3986. Includes "!$&'()*+,;=:".
9581 * G_URI_RESERVED_CHARS_GENERIC_DELIMITERS:
9583 * Generic delimiters characters as defined in RFC 3986. Includes ":/?#[]@".
9588 * G_URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITER:
9590 * Subcomponent delimiter characters as defined in RFC 3986. Includes "!$&'()*+,;=".
9596 * @value: A #GValue structure.
9597 * @type: A #GType value.
9599 * Checks if @value holds (or contains) a value of @type.
9600 * This macro will also check for @value != %NULL and issue a
9601 * warning if the check fails.
9603 * Returns: %TRUE if @value holds the @type.
9608 * G_VALUE_HOLDS_BOOLEAN:
9609 * @value: a valid #GValue structure
9611 * Checks whether the given #GValue can hold values of type %G_TYPE_BOOLEAN.
9613 * Returns: %TRUE on success.
9618 * G_VALUE_HOLDS_BOXED:
9619 * @value: a valid #GValue structure
9621 * Checks whether the given #GValue can hold values derived from type %G_TYPE_BOXED.
9623 * Returns: %TRUE on success.
9628 * G_VALUE_HOLDS_CHAR:
9629 * @value: a valid #GValue structure
9631 * Checks whether the given #GValue can hold values of type %G_TYPE_CHAR.
9633 * Returns: %TRUE on success.
9638 * G_VALUE_HOLDS_DOUBLE:
9639 * @value: a valid #GValue structure
9641 * Checks whether the given #GValue can hold values of type %G_TYPE_DOUBLE.
9643 * Returns: %TRUE on success.
9648 * G_VALUE_HOLDS_ENUM:
9649 * @value: a valid #GValue structure
9651 * Checks whether the given #GValue can hold values derived from type %G_TYPE_ENUM.
9653 * Returns: %TRUE on success.
9658 * G_VALUE_HOLDS_FLAGS:
9659 * @value: a valid #GValue structure
9661 * Checks whether the given #GValue can hold values derived from type %G_TYPE_FLAGS.
9663 * Returns: %TRUE on success.
9668 * G_VALUE_HOLDS_FLOAT:
9669 * @value: a valid #GValue structure
9671 * Checks whether the given #GValue can hold values of type %G_TYPE_FLOAT.
9673 * Returns: %TRUE on success.
9678 * G_VALUE_HOLDS_GTYPE:
9679 * @value: a valid #GValue structure
9681 * Checks whether the given #GValue can hold values of type %G_TYPE_GTYPE.
9684 * Returns: %TRUE on success.
9689 * G_VALUE_HOLDS_INT:
9690 * @value: a valid #GValue structure
9692 * Checks whether the given #GValue can hold values of type %G_TYPE_INT.
9694 * Returns: %TRUE on success.
9699 * G_VALUE_HOLDS_INT64:
9700 * @value: a valid #GValue structure
9702 * Checks whether the given #GValue can hold values of type %G_TYPE_INT64.
9704 * Returns: %TRUE on success.
9709 * G_VALUE_HOLDS_LONG:
9710 * @value: a valid #GValue structure
9712 * Checks whether the given #GValue can hold values of type %G_TYPE_LONG.
9714 * Returns: %TRUE on success.
9719 * G_VALUE_HOLDS_OBJECT:
9720 * @value: a valid #GValue structure
9722 * Checks whether the given #GValue can hold values derived from type %G_TYPE_OBJECT.
9724 * Returns: %TRUE on success.
9729 * G_VALUE_HOLDS_PARAM:
9730 * @value: a valid #GValue structure
9732 * Checks whether the given #GValue can hold values derived from type %G_TYPE_PARAM.
9734 * Returns: %TRUE on success.
9739 * G_VALUE_HOLDS_POINTER:
9740 * @value: a valid #GValue structure
9742 * Checks whether the given #GValue can hold values of type %G_TYPE_POINTER.
9744 * Returns: %TRUE on success.
9749 * G_VALUE_HOLDS_STRING:
9750 * @value: a valid #GValue structure
9752 * Checks whether the given #GValue can hold values of type %G_TYPE_STRING.
9754 * Returns: %TRUE on success.
9759 * G_VALUE_HOLDS_UCHAR:
9760 * @value: a valid #GValue structure
9762 * Checks whether the given #GValue can hold values of type %G_TYPE_UCHAR.
9764 * Returns: %TRUE on success.
9769 * G_VALUE_HOLDS_UINT:
9770 * @value: a valid #GValue structure
9772 * Checks whether the given #GValue can hold values of type %G_TYPE_UINT.
9774 * Returns: %TRUE on success.
9779 * G_VALUE_HOLDS_UINT64:
9780 * @value: a valid #GValue structure
9782 * Checks whether the given #GValue can hold values of type %G_TYPE_UINT64.
9784 * Returns: %TRUE on success.
9789 * G_VALUE_HOLDS_ULONG:
9790 * @value: a valid #GValue structure
9792 * Checks whether the given #GValue can hold values of type %G_TYPE_ULONG.
9794 * Returns: %TRUE on success.
9799 * G_VALUE_HOLDS_VARIANT:
9800 * @value: a valid #GValue structure
9802 * Checks whether the given #GValue can hold values of type %G_TYPE_VARIANT.
9804 * Returns: %TRUE on success.
9811 * @value: A #GValue structure.
9813 * Get the type identifier of @value.
9815 * Returns: the #GType.
9820 * G_VALUE_TYPE_NAME:
9821 * @value: A #GValue structure.
9823 * Gets the the type name of @value.
9825 * Returns: the type name.
9831 * @type_string: a well-formed #GVariantType type string
9833 * Converts a string to a const #GVariantType. Depending on the
9834 * current debugging level, this function may perform a runtime check
9835 * to ensure that @string is a valid GVariant type string.
9836 * It is always a programmer error to use this macro with an invalid
9843 * G_VARIANT_TYPE_ANY:
9845 * An indefinite type that is a supertype of every type (including
9851 * G_VARIANT_TYPE_ARRAY:
9853 * An indefinite type that is a supertype of every array type.
9858 * G_VARIANT_TYPE_BASIC:
9860 * An indefinite type that is a supertype of every basic (ie:
9861 * non-container) type.
9866 * G_VARIANT_TYPE_BOOLEAN:
9868 * The type of a value that can be either %TRUE or %FALSE.
9873 * G_VARIANT_TYPE_BYTE:
9875 * The type of an integer value that can range from 0 to 255.
9880 * G_VARIANT_TYPE_BYTESTRING:
9882 * The type of an array of bytes. This type is commonly used to pass
9883 * around strings that may not be valid utf8. In that case, the
9884 * convention is that the nul terminator character should be included as
9885 * the last character in the array.
9890 * G_VARIANT_TYPE_BYTESTRING_ARRAY:
9892 * The type of an array of byte strings (an array of arrays of bytes).
9897 * G_VARIANT_TYPE_DICTIONARY:
9899 * An indefinite type that is a supertype of every dictionary type --
9900 * that is, any array type that has an element type equal to any
9901 * dictionary entry type.
9906 * G_VARIANT_TYPE_DICT_ENTRY:
9908 * An indefinite type that is a supertype of every dictionary entry
9914 * G_VARIANT_TYPE_DOUBLE:
9916 * The type of a double precision IEEE754 floating point number.
9917 * These guys go up to about 1.80e308 (plus and minus) but miss out on
9918 * some numbers in between. In any case, that's far greater than the
9919 * estimated number of fundamental particles in the observable
9925 * G_VARIANT_TYPE_HANDLE:
9927 * The type of a 32bit signed integer value, that by convention, is used
9928 * as an index into an array of file descriptors that are sent alongside
9930 * If you are not interacting with DBus, then there is no reason to make
9936 * G_VARIANT_TYPE_INT16:
9938 * The type of an integer value that can range from -32768 to 32767.
9943 * G_VARIANT_TYPE_INT32:
9945 * The type of an integer value that can range from -2147483648 to
9951 * G_VARIANT_TYPE_INT64:
9953 * The type of an integer value that can range from
9954 * -9223372036854775808 to 9223372036854775807.
9959 * G_VARIANT_TYPE_MAYBE:
9961 * An indefinite type that is a supertype of every maybe type.
9966 * G_VARIANT_TYPE_OBJECT_PATH:
9968 * The type of a DBus object reference. These are strings of a
9969 * specific format used to identify objects at a given destination on
9971 * If you are not interacting with DBus, then there is no reason to make
9972 * use of this type. If you are, then the DBus specification contains a
9973 * precise description of valid object paths.
9978 * G_VARIANT_TYPE_SIGNATURE:
9980 * The type of a DBus type signature. These are strings of a specific
9981 * format used as type signatures for DBus methods and messages.
9982 * If you are not interacting with DBus, then there is no reason to make
9983 * use of this type. If you are, then the DBus specification contains a
9984 * precise description of valid signature strings.
9989 * G_VARIANT_TYPE_STRING:
9991 * The type of a string. "" is a string. %NULL is not a string.
9996 * G_VARIANT_TYPE_STRING_ARRAY:
9998 * The type of an array of strings.
10003 * G_VARIANT_TYPE_TUPLE:
10005 * An indefinite type that is a supertype of every tuple type,
10006 * regardless of the number of items in the tuple.
10011 * G_VARIANT_TYPE_UINT16:
10013 * The type of an integer value that can range from 0 to 65535.
10014 * There were about this many people living in Toronto in the 1870s.
10019 * G_VARIANT_TYPE_UINT32:
10021 * The type of an integer value that can range from 0 to 4294967295.
10022 * That's one number for everyone who was around in the late 1970s.
10027 * G_VARIANT_TYPE_UINT64:
10029 * The type of an integer value that can range from 0 to
10030 * 18446744073709551616. That's a really big number, but a Rubik's
10031 * cube can have a bit more than twice as many possible positions.
10036 * G_VARIANT_TYPE_UNIT:
10038 * The empty tuple type. Has only one instance. Known also as "triv"
10044 * G_VARIANT_TYPE_VARIANT:
10046 * The type of a box that contains any other value (including another
10052 * G_VFS_EXTENSION_POINT_NAME:
10054 * Extension point for #GVfs functionality.
10055 * See <link linkend="extending-gio">Extending GIO</link>.
10060 * G_VOLUME_IDENTIFIER_KIND_HAL_UDI:
10062 * The string used to obtain a Hal UDI with g_volume_get_identifier().
10067 * G_VOLUME_IDENTIFIER_KIND_LABEL:
10069 * The string used to obtain a filesystem label with g_volume_get_identifier().
10074 * G_VOLUME_IDENTIFIER_KIND_NFS_MOUNT:
10076 * The string used to obtain a NFS mount with g_volume_get_identifier().
10081 * G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE:
10083 * The string used to obtain a Unix device path with g_volume_get_identifier().
10088 * G_VOLUME_IDENTIFIER_KIND_UUID:
10090 * The string used to obtain a UUID with g_volume_get_identifier().
10095 * G_VOLUME_MONITOR_EXTENSION_POINT_NAME:
10097 * Extension point for volume monitor functionality.
10098 * See <link linkend="extending-gio">Extending GIO</link>.
10104 * @title: GUnixFDMessage
10105 * @short_description: A GSocketControlMessage containing a GUnixFDList
10106 * @include: gio/gunixfdmessage.h
10107 * @see_also: #GUnixConnection, #GUnixFDList, #GSocketControlMessage
10109 * This #GSocketControlMessage contains a #GUnixFDList.
10110 * It may be sent using g_socket_send_message() and received using
10111 * %G_SOCKET_ADDRESS_UNIX family). The file descriptors are copied
10112 * between processes by the kernel.
10113 * For an easier way to send and receive file descriptors over
10114 * stream-oriented UNIX sockets, see g_unix_connection_send_fd() and
10115 * g_unix_connection_receive_fd().
10116 * Note that <filename><gio/gunixfdmessage.h></filename> belongs to
10117 * the UNIX-specific GIO interfaces, thus you have to use the
10118 * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
10120 * G_socket_receive_message() over unix sockets (ie: sockets in the
10125 * SECTION:extensionpoint:
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:gactiongrou:
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:gapplicationcommandlin:
10275 * @title: GApplicationCommandLine
10276 * @short_description: A command-line invocation of an application
10277 * @see_also: #GApplication
10279 * #GApplicationCommandLine represents a command-line invocation of
10280 * an application. It is created by #GApplication and emitted
10281 * in the #GApplication::command-line signal and virtual function.
10282 * The class contains the list of arguments that the program was invoked
10283 * with. It is also possible to query if the commandline invocation was
10284 * commandline to this process).
10285 * The exit status of the originally-invoked process may be set and
10286 * messages can be printed to stdout or stderr of that process. The
10287 * lifecycle of the originally-invoked process is tied to the lifecycle
10289 * <example id="gapplication-example-cmdline"><title>Handling commandline arguments with GApplication</title>
10291 * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gapplication-example-cmdline.c">
10292 * <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
10294 * </programlisting>
10296 * <example id="gapplication-example-cmdline2"><title>Complicated commandline handling</title>
10298 * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gapplication-example-cmdline2.c">
10299 * <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
10301 * </programlisting>
10304 * Local (ie: the current process is running in direct response to the
10305 * Invocation) or remote (ie: some other process forwarded the
10306 * Of this object (ie: the process exits when the last reference is
10311 * SECTION:gasynchelpe:
10312 * @short_description: Asynchronous Helper Functions
10313 * @include: gio/gio.h
10314 * @see_also: #GAsyncReady
10316 * Provides helper functions for asynchronous operations.
10321 * SECTION:gasyncinitabl:
10322 * @short_description: Asynchronously failable object initialization interface
10323 * @include: gio/gio.h
10324 * @see_also: #GInitable
10326 * This is the asynchronous version of #GInitable; it behaves the same
10327 * in all ways except that initialization is asynchronous. For more details
10328 * see the descriptions on #GInitable.
10329 * A class may implement both the #GInitable and #GAsyncInitable interfaces.
10330 * Users of objects implementing this are not intended to use the interface
10331 * method directly; instead it will be used automatically in various ways.
10332 * For C applications you generally just call g_async_initable_new_async()
10333 * directly, or indirectly via a foo_thing_new_async() wrapper. This will call
10334 * g_async_initable_init_async() under the cover, calling back with %NULL and
10335 * a set %GError on failure.
10336 * A typical implementation might look something like this:
10344 * _foo_ready_cb (Foo *self)
10347 * self->priv->state = INITIALIZED;
10348 * for (l = self->priv->init_results; l != NULL; l = l->next)
10350 * GSimpleAsyncResult *simple = l->data;
10351 * if (!self->priv->success)
10352 * g_simple_async_result_set_error (simple, ...);
10353 * g_simple_async_result_complete (simple);
10354 * g_object_unref (simple);
10356 * g_list_free (self->priv->init_results);
10357 * self->priv->init_results = NULL;
10360 * foo_init_async (GAsyncInitable *initable,
10362 * GCancellable *cancellable,
10363 * GAsyncReadyCallback callback,
10364 * gpointer user_data)
10366 * Foo *self = FOO (initable);
10367 * GSimpleAsyncResult *simple;
10368 * simple = g_simple_async_result_new (G_OBJECT (initable)
10372 * switch (self->priv->state)
10374 * case NOT_INITIALIZED:
10375 * _foo_get_ready (self);
10376 * self->priv->init_results = g_list_append (self->priv->init_results,
10378 * self->priv->state = INITIALIZING;
10380 * case INITIALIZING:
10381 * self->priv->init_results = g_list_append (self->priv->init_results,
10384 * case INITIALIZED:
10385 * if (!self->priv->success)
10386 * g_simple_async_result_set_error (simple, ...);
10387 * g_simple_async_result_complete_in_idle (simple);
10388 * g_object_unref (simple);
10393 * foo_init_finish (GAsyncInitable *initable,
10394 * GAsyncResult *result,
10397 * g_return_val_if_fail (g_simple_async_result_is_valid (result,
10398 * G_OBJECT (initable), foo_init_async), FALSE);
10399 * if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (result),
10405 * foo_async_initable_iface_init (gpointer g_iface,
10408 * GAsyncInitableIface *iface = g_iface;
10409 * iface->init_async = foo_init_async;
10410 * iface->init_finish = foo_init_finish;
10417 * SECTION:gasyncresul:
10418 * @short_description: Asynchronous Function Results
10419 * @include: gio/gio.h
10420 * @see_also: #GSimpleAsyncResult
10422 * Provides a base class for implementing asynchronous function results.
10423 * Asynchronous operations are broken up into two separate operations
10424 * which are chained together by a #GAsyncReadyCallback. To begin
10425 * an asynchronous operation, provide a #GAsyncReadyCallback to the
10426 * asynchronous function. This callback will be triggered when the
10427 * operation has completed, and will be passed a #GAsyncResult instance
10428 * filled with the details of the operation's success or failure, the
10429 * object the asynchronous function was started for and any error codes
10430 * returned. The asynchronous callback function is then expected to call
10431 * the corresponding "_finish()" function, passing the object the
10432 * function was called for, the #GAsyncResult instance, and (optionally)
10433 * an @error to grab any error conditions that may have occurred.
10434 * The "_finish()" function for an operation takes the generic result
10435 * (of type #GAsyncResult) and returns the specific result that the
10436 * operation in question yields (e.g. a #GFileEnumerator for a
10437 * "enumerate children" operation). If the result or error status of the
10438 * operation is not needed, there is no need to call the "_finish()"
10439 * function; GIO will take care of cleaning up the result and error
10440 * information after the #GAsyncReadyCallback returns. Applications may
10441 * also take a reference to the #GAsyncResult and call "_finish()"
10442 * later; however, the "_finish()" function may be called at most once.
10443 * Example of a typical asynchronous operation flow:
10445 * void _theoretical_frobnitz_async (Theoretical *t,
10447 * GAsyncReadyCallback *cb,
10449 * gboolean _theoretical_frobnitz_finish (Theoretical *t,
10450 * GAsyncResult *res,
10453 * frobnitz_result_func (GObject *source_object,
10454 * GAsyncResult *res,
10455 * gpointer user_data)
10457 * gboolean success = FALSE;
10458 * success = _theoretical_frobnitz_finish (source_object, res, NULL);
10460 * g_printf ("Hurray!\n");
10462 * g_printf ("Uh oh!\n");
10463 * /<!-- -->* ... *<!-- -->/
10465 * int main (int argc, void *argv[])
10467 * /<!-- -->* ... *<!-- -->/
10468 * _theoretical_frobnitz_async (theoretical_data,
10470 * frobnitz_result_func,
10472 * /<!-- -->* ... *<!-- -->/
10475 * The callback for an asynchronous operation is called only once, and is
10476 * always called, even in the case of a cancelled operation. On cancellation
10477 * the result is a %G_IO_ERROR_CANCELLED error.
10478 * Some asynchronous operations are implemented using synchronous calls.
10479 * These are run in a separate thread, if #GThread has been initialized, but
10480 * otherwise they are sent to the Main Event Loop and processed in an idle
10481 * function. So, if you truly need asynchronous operations, make sure to
10482 * initialize #GThread.
10487 * SECTION:gbufferedinputstrea:
10488 * @short_description: Buffered Input Stream
10489 * @include: gio/gio.h
10490 * @see_also: #GFilterInputStream, #GInputStream
10492 * Buffered input stream implements #GFilterInputStream and provides
10493 * for buffered reads.
10494 * By default, #GBufferedInputStream's buffer size is set at 4 kilobytes.
10495 * To create a buffered input stream, use g_buffered_input_stream_new(),
10496 * or g_buffered_input_stream_new_sized() to specify the buffer's size at
10498 * To get the size of a buffer within a buffered input stream, use
10499 * g_buffered_input_stream_get_buffer_size(). To change the size of a
10500 * buffered input stream's buffer, use
10501 * g_buffered_input_stream_set_buffer_size(). Note that the buffer's size
10502 * cannot be reduced below the size of the data within the buffer.
10507 * SECTION:gbufferedoutputstrea:
10508 * @short_description: Buffered Output Stream
10509 * @include: gio/gio.h
10510 * @see_also: #GFilterOutputStream, #GOutputStream
10512 * Buffered output stream implements #GFilterOutputStream and provides
10513 * for buffered writes.
10514 * By default, #GBufferedOutputStream's buffer size is set at 4 kilobytes.
10515 * To create a buffered output stream, use g_buffered_output_stream_new(),
10516 * or g_buffered_output_stream_new_sized() to specify the buffer's size
10518 * To get the size of a buffer within a buffered input stream, use
10519 * g_buffered_output_stream_get_buffer_size(). To change the size of a
10520 * buffered output stream's buffer, use
10521 * g_buffered_output_stream_set_buffer_size(). Note that the buffer's
10522 * size cannot be reduced below the size of the data within the buffer.
10527 * SECTION:gcancellabl:
10528 * @short_description: Thread-safe Operation Cancellation Stack
10529 * @include: gio/gio.h
10531 * GCancellable is a thread-safe operation cancellation stack used
10532 * throughout GIO to allow for cancellation of synchronous and
10533 * asynchronous operations.
10538 * SECTION:gcharsetconverte:
10539 * @short_description: Convert between charsets
10540 * @include: gio/gio.h
10542 * #GCharsetConverter is an implementation of #GConverter based on
10548 * SECTION:gcontenttyp:
10549 * @short_description: Platform-specific content typing
10550 * @include: gio/gio.h
10552 * A content type is a platform specific string that defines the type
10553 * of a file. On unix it is a mime type, on win32 it is an extension string
10554 * like ".doc", ".txt" or a percieved string like "audio". Such strings
10555 * can be looked up in the registry at HKEY_CLASSES_ROOT.
10560 * SECTION:gconverte:
10561 * @short_description: Data conversion interface
10562 * @include: gio/gio.h
10563 * @see_also: #GInputStream, #GOutputStream
10565 * #GConverter is implemented by objects that convert
10566 * binary data in various ways. The conversion can be
10567 * stateful and may fail at any place.
10568 * compression, decompression and regular expression
10571 * Some example conversions are: character set conversion,
10577 * SECTION:gconverterinputstrea:
10578 * @short_description: Converter Input Stream
10579 * @include: gio/gio.h
10580 * @see_also: #GInputStream, #GConverter
10582 * Converter input stream implements #GInputStream and allows
10583 * conversion of data of various types during reading.
10588 * SECTION:gconverteroutputstrea:
10589 * @short_description: Converter Output Stream
10590 * @include: gio/gio.h
10591 * @see_also: #GOutputStream, #GConverter
10593 * Converter output stream implements #GOutputStream and allows
10594 * conversion of data of various types during reading.
10599 * SECTION:gcredential:
10600 * @short_description: An object containing credentials
10601 * @include: gio/gio.h
10603 * The #GCredentials type is a reference-counted wrapper for native
10604 * credentials. This information is typically used for identifying,
10605 * authenticating and authorizing other processes.
10606 * Some operating systems supports looking up the credentials of the
10607 * remote peer of a communication endpoint - see e.g.
10608 * g_socket_get_credentials().
10609 * Some operating systems supports securely sending and receiving
10610 * credentials over a Unix Domain Socket, see
10611 * #GUnixCredentialsMessage, g_unix_connection_send_credentials() and
10612 * g_unix_connection_receive_credentials() for details.
10613 * On Linux, the native credential type is a <type>struct ucred</type>
10615 * <citerefentry><refentrytitle>unix</refentrytitle><manvolnum>7</manvolnum></citerefentry>
10616 * man page for details. This corresponds to
10617 * %G_CREDENTIALS_TYPE_LINUX_UCRED.
10618 * On FreeBSD, the native credential type is a <type>struct cmsgcred</type>.
10619 * This corresponds to %G_CREDENTIALS_TYPE_FREEBSD_CMSGCRED.
10624 * SECTION:gdatainputstrea:
10625 * @short_description: Data Input Stream
10626 * @include: gio/gio.h
10627 * @see_also: #GInputStream
10629 * Data input stream implements #GInputStream and includes functions for
10630 * reading structured data directly from a binary input stream.
10635 * SECTION:gdataoutputstrea:
10636 * @short_description: Data Output Stream
10637 * @include: gio/gio.h
10638 * @see_also: #GOutputStream
10640 * Data output stream implements #GOutputStream and includes functions for
10641 * writing data directly to an output stream.
10646 * SECTION:gdbusaddres:
10647 * @title: D-Bus Addresses
10648 * @short_description: D-Bus connection endpoints
10649 * @include: gio/gio.h
10651 * Routines for working with D-Bus addresses. A D-Bus address is a string
10652 * like "unix:tmpdir=/tmp/my-app-name". The exact format of addresses
10653 * is explained in detail in the <link linkend="http://dbus.freedesktop.org/doc/dbus-specification.html#addresses">D-Bus specification</link>.
10658 * SECTION:gdbusauthobserve:
10659 * @short_description: Object used for authenticating connections
10660 * @include: gio/gio.h
10662 * The #GDBusAuthObserver type provides a mechanism for participating
10663 * in how a #GDBusServer (or a #GDBusConnection) authenticates remote
10664 * peers. Simply instantiate a #GDBusAuthObserver and connect to the
10665 * signals you are interested in. Note that new signals may be added
10667 * For example, if you only want to allow D-Bus connections from
10668 * processes owned by the same uid as the server, you would use a
10669 * signal handler like the following:
10670 * <example id="auth-observer"><title>Controlling Authentication</title><programlisting>
10672 * on_authorize_authenticated_peer (GDBusAuthObserver *observer,
10673 * GIOStream *stream,
10674 * GCredentials *credentials,
10675 * gpointer user_data)
10677 * gboolean authorized;
10678 * authorized = FALSE;
10679 * if (credentials != NULL)
10681 * GCredentials *own_credentials;
10682 * own_credentials = g_credentials_new ();
10683 * if (g_credentials_is_same_user (credentials, own_credentials, NULL))
10684 * authorized = TRUE;
10685 * g_object_unref (own_credentials);
10687 * return authorized;
10689 * </programlisting></example>
10694 * SECTION:gdbusconnectio:
10695 * @short_description: D-Bus Connections
10696 * @include: gio/gio.h
10698 * The #GDBusConnection type is used for D-Bus connections to remote
10699 * peers such as a message buses. It is a low-level API that offers a
10700 * lot of flexibility. For instance, it lets you establish a connection
10701 * over any transport that can by represented as an #GIOStream.
10702 * This class is rarely used directly in D-Bus clients. If you are writing
10703 * an D-Bus client, it is often easier to use the g_bus_own_name(),
10704 * g_bus_watch_name() or g_dbus_proxy_new_for_bus() APIs.
10705 * <example id="gdbus-server"><title>D-Bus server example</title><programlisting><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gdbus-example-server.c"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting></example>
10706 * <example id="gdbus-subtree-server"><title>D-Bus subtree example</title><programlisting><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gdbus-example-subtree.c"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting></example>
10707 * <example id="gdbus-unix-fd-client"><title>D-Bus UNIX File Descriptor example</title><programlisting><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gdbus-example-unix-fd-client.c"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting></example>
10708 * <example id="gdbus-export"><title>Exporting a GObject</title><programlisting><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gdbus-example-export.c"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting></example>
10713 * SECTION:gdbuserro:
10714 * @title: GDBusError
10715 * @short_description: Mapping D-Bus errors to and from GError
10716 * @include: gio/gio.h
10718 * All facilities that return errors from remote methods (such as
10719 * g_dbus_connection_call_sync()) use #GError to represent both D-Bus
10720 * errors (e.g. errors returned from the other peer) and locally
10721 * in-process generated errors.
10722 * To check if a returned #GError is an error from a remote peer, use
10723 * g_dbus_error_is_remote_error(). To get the actual D-Bus error name,
10724 * use g_dbus_error_get_remote_error(). Before presenting an error,
10725 * always use g_dbus_error_strip_remote_error().
10726 * In addition, facilities used to return errors to a remote peer also
10727 * use #GError. See g_dbus_method_invocation_return_error() for
10728 * discussion about how the D-Bus error name is set.
10729 * Applications can associate a #GError error domain with a set of D-Bus errors in order to
10730 * automatically map from D-Bus errors to #GError and back. This
10731 * is typically done in the function returning the #GQuark for the
10733 * <example id="error-registration"><title>Error Registration</title><programlisting>
10734 * /<!-- -->* foo-bar-error.h: *<!-- -->/
10735 * #define FOO_BAR_ERROR (foo_bar_error_quark ())
10736 * GQuark foo_bar_error_quark (void);
10739 * FOO_BAR_ERROR_FAILED,
10740 * FOO_BAR_ERROR_ANOTHER_ERROR,
10741 * FOO_BAR_ERROR_SOME_THIRD_ERROR,
10743 * /<!-- -->* foo-bar-error.c: *<!-- -->/
10744 * static const GDBusErrorEntry foo_bar_error_entries[] =
10746 * {FOO_BAR_ERROR_FAILED, "org.project.Foo.Bar.Error.Failed"},
10747 * {FOO_BAR_ERROR_ANOTHER_ERROR, "org.project.Foo.Bar.Error.AnotherError"},
10748 * {FOO_BAR_ERROR_SOME_THIRD_ERROR, "org.project.Foo.Bar.Error.SomeThirdError"},
10751 * foo_bar_error_quark (void)
10753 * static volatile gsize quark_volatile = 0;
10754 * g_dbus_error_register_error_domain ("foo-bar-error-quark",
10756 * foo_bar_error_entries,
10757 * G_N_ELEMENTS (foo_bar_error_entries));
10758 * G_STATIC_ASSERT (G_N_ELEMENTS (foo_bar_error_entries) - 1 == FOO_BAR_ERROR_SOME_THIRD_ERROR);
10759 * return (GQuark) quark_volatile;
10761 * </programlisting></example>
10762 * With this setup, a D-Bus peer can transparently pass e.g. %FOO_BAR_ERROR_ANOTHER_ERROR and
10763 * other peers will see the D-Bus error name <literal>org.project.Foo.Bar.Error.AnotherError</literal>.
10764 * If the other peer is using GDBus, the peer will see also %FOO_BAR_ERROR_ANOTHER_ERROR instead
10765 * of %G_IO_ERROR_DBUS_ERROR. Note that GDBus clients can still recover
10766 * <literal>org.project.Foo.Bar.Error.AnotherError</literal> using g_dbus_error_get_remote_error().
10767 * Note that errors in the %G_DBUS_ERROR error domain is intended only
10768 * for returning errors from a remote message bus process. Errors
10769 * generated locally in-process by e.g. #GDBusConnection is from the
10770 * %G_IO_ERROR domain.
10775 * SECTION:gdbusintrospectio:
10776 * @title: D-Bus Introspection Data
10777 * @short_description: Node and interface description data structures
10778 * @include: gio/gio.h
10780 * Various data structures and convenience routines to parse and
10781 * generate D-Bus introspection XML. Introspection information is
10782 * used when registering objects with g_dbus_connection_register_object().
10783 * The format of D-Bus introspection XML is specified in the
10784 * <link linkend="http://dbus.freedesktop.org/doc/dbus-specification.html#introspection-format">D-Bus specification</link>.
10789 * SECTION:gdbusmessag:
10790 * @short_description: D-Bus Message
10791 * @include: gio/gio.h
10793 * A type for representing D-Bus messages that can be sent or received
10794 * on a #GDBusConnection.
10799 * SECTION:gdbusmethodinvocatio:
10800 * @short_description: Object for handling remote calls
10801 * @include: gio/gio.h
10803 * Instances of the #GDBusMethodInvocation class are used when
10804 * handling D-Bus method calls. It provides a way to asynchronously
10805 * return results and errors.
10806 * The normal way to obtain a #GDBusMethodInvocation object is to receive
10807 * it as an argument to the handle_method_call() function in a
10808 * #GDBusInterfaceVTable that was passed to g_dbus_connection_register_object().
10813 * SECTION:gdbusnameownin:
10814 * @title: Owning Bus Names
10815 * @short_description: Simple API for owning bus names
10816 * @include: gio/gio.h
10818 * Convenience API for owning bus names.
10819 * <example id="gdbus-owning-names"><title>Simple application owning a name</title><programlisting><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gdbus-example-own-name.c"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting></example>
10824 * SECTION:gdbusnamewatchin:
10825 * @title: Watching Bus Names
10826 * @short_description: Simple API for watching bus names
10827 * @include: gio/gio.h
10829 * Convenience API for watching bus names.
10830 * <example id="gdbus-watching-names"><title>Simple application watching a name</title><programlisting><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gdbus-example-watch-name.c"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting></example>
10835 * SECTION:gdbusprox:
10836 * @short_description: Client-side proxies
10837 * @include: gio/gio.h
10839 * #GDBusProxy is a base class used for proxies to access a D-Bus
10840 * interface on a remote object. A #GDBusProxy can be constructed for
10841 * both well-known and unique names.
10842 * By default, #GDBusProxy will cache all properties (and listen to
10843 * changes) of the remote object, and proxy all signals that gets
10844 * emitted. This behaviour can be changed by passing suitable
10845 * #GDBusProxyFlags when the proxy is created. If the proxy is for a
10846 * well-known name, the property cache is flushed when the name owner
10847 * vanishes and reloaded when a name owner appears.
10848 * If a #GDBusProxy is used for a well-known name, the owner of the
10849 * name is tracked and can be read from
10850 * #GDBusProxy:g-name-owner. Connect to the #GObject::notify signal to
10851 * get notified of changes. Additionally, only signals and property
10852 * changes emitted from the current name owner are considered and
10853 * calls are always sent to the current name owner. This avoids a
10854 * number of race conditions when the name is lost by one owner and
10855 * claimed by another. However, if no name owner currently exists,
10856 * then calls will be sent to the well-known name which may result in
10857 * the message bus launching an owner (unless
10858 * %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START is set).
10859 * The generic #GDBusProxy::g-properties-changed and #GDBusProxy::g-signal
10860 * signals are not very convenient to work with. Therefore, the recommended
10861 * way of working with proxies is to subclass #GDBusProxy, and have
10862 * more natural properties and signals in your derived class.
10863 * See <xref linkend="gdbus-example-proxy-subclass"/> for an example.
10864 * <example id="gdbus-wellknown-proxy"><title>GDBusProxy for a well-known-name</title><programlisting><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gdbus-example-watch-proxy.c"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting></example>
10869 * SECTION:gdbusserve:
10870 * @short_description: Helper for accepting connections
10871 * @include: gio/gio.h
10873 * #GDBusServer is a helper for listening to and accepting D-Bus
10875 * <example id="gdbus-peer-to-peer"><title>D-Bus peer-to-peer example</title><programlisting><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gdbus-example-peer.c"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting></example>
10880 * SECTION:gdbusutil:
10881 * @title: D-Bus Utilities
10882 * @short_description: Various utilities related to D-Bus.
10883 * @include: gio/gio.h
10885 * Various utility routines related to D-Bus.
10890 * SECTION:gdesktopappinf:
10891 * @title: GDesktopAppInfo
10892 * @short_description: Application information from desktop files
10893 * @include: gio/gdesktopappinfo.h
10895 * #GDesktopAppInfo is an implementation of #GAppInfo based on
10897 * Note that <filename><gio/gdesktopappinfo.h></filename> belongs to
10898 * the UNIX-specific GIO interfaces, thus you have to use the
10899 * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
10905 * @short_description: Drive management
10906 * @include: gio/gio.h
10908 * #GDrive - this represent a piece of hardware connected to the machine.
10909 * It's generally only created for removable hardware or hardware with
10911 * #GDrive is a container class for #GVolume objects that stem from
10912 * the same piece of media. As such, #GDrive abstracts a drive with
10913 * (or without) removable media and provides operations for querying
10914 * whether media is available, determing whether media change is
10915 * automatically detected and ejecting the media.
10916 * If the #GDrive reports that media isn't automatically detected, one
10917 * can poll for media; typically one should not do this periodically
10918 * as a poll for media operation is potententially expensive and may
10919 * spin up the drive creating noise.
10920 * #GDrive supports starting and stopping drives with authentication
10921 * support for the former. This can be used to support a diverse set
10922 * of use cases including connecting/disconnecting iSCSI devices,
10923 * powering down external disk enclosures and starting/stopping
10924 * multi-disk devices such as RAID devices. Note that the actual
10925 * semantics and side-effects of starting/stopping a #GDrive may vary
10926 * according to implementation. To choose the correct verbs in e.g. a
10927 * file manager, use g_drive_get_start_stop_type().
10928 * For porting from GnomeVFS note that there is no equivalent of
10929 * #GDrive in that API.
10935 * @short_description: An object for emblems
10936 * @include: gio/gio.h
10937 * @see_also: #GIcon, #GEmblemedIcon, #GLoadableIcon, #GThemedIcon
10939 * #GEmblem is an implementation of #GIcon that supports
10940 * having an emblem, which is an icon with additional properties.
10941 * It can than be added to a #GEmblemedIcon.
10942 * Currently, only metainformation about the emblem's origin is
10943 * supported. More may be added in the future.
10948 * SECTION:gemblemedico:
10949 * @short_description: Icon with emblems
10950 * @include: gio/gio.h
10951 * @see_also: #GIcon, #GLoadableIcon, #GThemedIcon, #GEmblem
10953 * #GEmblemedIcon is an implementation of #GIcon that supports
10954 * adding an emblem to an icon. Adding multiple emblems to an
10955 * icon is ensured via g_emblemed_icon_add_emblem().
10956 * Note that #GEmblemedIcon allows no control over the position
10957 * of the emblems. See also #GEmblem for more information.
10963 * @short_description: File and Directory Handling
10964 * @include: gio/gio.h
10965 * @see_also: #GFileInfo, #GFileEnumerator
10967 * #GFile is a high level abstraction for manipulating files on a
10968 * virtual file system. #GFile<!-- -->s are lightweight, immutable
10969 * objects that do no I/O upon creation. It is necessary to understand that
10970 * #GFile objects do not represent files, merely an identifier for a file. All
10971 * file content I/O is implemented as streaming operations (see #GInputStream and
10973 * g_file_new_for_path() if you have a path.
10974 * g_file_new_for_uri() if you have a URI.
10975 * g_file_new_for_commandline_arg() for a command line argument.
10976 * g_file_parse_name() from a utf8 string gotten from g_file_get_parse_name().
10977 * One way to think of a #GFile is as an abstraction of a pathname. For normal
10978 * files the system pathname is what is stored internally, but as #GFile<!-- -->s
10979 * are extensible it could also be something else that corresponds to a pathname
10980 * in a userspace implementation of a filesystem.
10981 * #GFile<!-- -->s make up hierarchies of directories and files that correspond to the
10982 * files on a filesystem. You can move through the file system with #GFile using
10983 * g_file_get_parent() to get an identifier for the parent directory, g_file_get_child()
10984 * to get a child within a directory, g_file_resolve_relative_path() to resolve a relative
10985 * path between two #GFile<!-- -->s. There can be multiple hierarchies, so you may not
10986 * end up at the same root if you repeatedly call g_file_get_parent() on two different
10988 * All #GFile<!-- -->s have a basename (get with g_file_get_basename()). These names
10989 * are byte strings that are used to identify the file on the filesystem (relative to
10990 * its parent directory) and there is no guarantees that they have any particular charset
10991 * encoding or even make any sense at all. If you want to use filenames in a user
10992 * interface you should use the display name that you can get by requesting the
10993 * %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME attribute with g_file_query_info().
10994 * This is guaranteed to be in utf8 and can be used in a user interface. But always
10995 * store the real basename or the #GFile to use to actually access the file, because
10996 * there is no way to go from a display name to the actual name.
10997 * Using #GFile as an identifier has the same weaknesses as using a path in that
10998 * there may be multiple aliases for the same file. For instance, hard or
10999 * soft links may cause two different #GFile<!-- -->s to refer to the same file.
11000 * and long names on Fat/NTFS, or bind mounts in Linux. If you want to check if
11001 * two #GFile<!-- -->s point to the same file you can query for the
11002 * %G_FILE_ATTRIBUTE_ID_FILE attribute. Note that #GFile does some trivial
11003 * canonicalization of pathnames passed in, so that trivial differences in the
11004 * path string used at creation (duplicated slashes, slash at end of path, "."
11005 * or ".." path segments, etc) does not create different #GFile<!-- -->s.
11006 * Many #GFile operations have both synchronous and asynchronous versions
11007 * to suit your application. Asynchronous versions of synchronous functions
11008 * simply have _async() appended to their function names. The asynchronous
11009 * I/O functions call a #GAsyncReadyCallback which is then used to finalize
11010 * the operation, producing a GAsyncResult which is then passed to the
11011 * function's matching _finish() operation.
11012 * Some #GFile operations do not have synchronous analogs, as they may
11013 * take a very long time to finish, and blocking may leave an application
11014 * unusable. Notable cases include:
11015 * g_file_mount_mountable() to mount a mountable file.
11016 * g_file_unmount_mountable_with_operation() to unmount a mountable file.
11017 * g_file_eject_mountable_with_operation() to eject a mountable file.
11018 * <para id="gfile-etag"><indexterm><primary>entity tag</primary></indexterm>
11019 * One notable feature of #GFile<!-- -->s are entity tags, or "etags" for
11020 * short. Entity tags are somewhat like a more abstract version of the
11021 * traditional mtime, and can be used to quickly determine if the file has
11022 * been modified from the version on the file system. See the HTTP 1.1
11023 * <ulink url="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html">specification</ulink>
11024 * for HTTP Etag headers, which are a very similar concept.
11027 * To construct a #gfile, you can use:
11028 * Other possible causes for aliases are: case insensitive filesystems, short
11033 * SECTION:gfileattribut:
11034 * @short_description: Key-Value Paired File Attributes
11035 * @include: gio/gio.h
11036 * @see_also: #GFile, #GFileInfo
11038 * File attributes in GIO consist of a list of key-value pairs.
11039 * Keys are strings that contain a key namespace and a key name, separated
11040 * by a colon, e.g. "namespace:keyname". Namespaces are included to sort
11041 * key-value pairs by namespaces for relevance. Keys can be retrived
11042 * using wildcards, e.g. "standard::*" will return all of the keys in the
11043 * "standard" namespace.
11044 * Values are stored within the list in #GFileAttributeValue structures.
11045 * Values can store different types, listed in the enum #GFileAttributeType.
11046 * Upon creation of a #GFileAttributeValue, the type will be set to
11047 * %G_FILE_ATTRIBUTE_TYPE_INVALID.
11048 * The list of possible attributes for a filesystem (pointed to by a #GFile) is
11049 * availible as a #GFileAttributeInfoList. This list is queryable by key names
11050 * as indicated earlier.
11051 * Classes that implement #GFileIface will create a #GFileAttributeInfoList and
11052 * install default keys and values for their given file system, architecture,
11053 * and other possible implementation details (e.g., on a UNIX system, a file
11054 * attribute key will be registered for the user id for a given file).
11057 * <title>GFileAttributes Default Namespaces</title>
11058 * <tgroup cols='2' align='left'><thead>
11059 * <row><entry>Namspace</entry><entry>Description</entry></row>
11062 * <row><entry>"standard"</entry><entry>The "Standard" namespace. General file
11063 * information that any application may need should be put in this namespace.
11064 * Examples include the file's name, type, and size.</entry></row>
11065 * <row><entry>"etag"</entry><entry>The <link linkend="gfile-etag">"Entity Tag"</link>
11066 * namespace. Currently, the only key in this namespace is "value", which contains
11067 * the value of the current entity tag.</entry></row>
11068 * <row><entry>"id"</entry><entry>The "Identification" namespace. This
11069 * namespace is used by file managers and applications that list directories
11070 * to check for loops and to uniquely identify files.</entry></row>
11071 * <row><entry>"access"</entry><entry>The "Access" namespace. Used to check
11072 * if a user has the proper privilidges to access files and perform
11073 * file operations. Keys in this namespace are made to be generic
11074 * and easily understood, e.g. the "can_read" key is %TRUE if
11075 * the current user has permission to read the file. UNIX permissions and
11076 * NTFS ACLs in Windows should be mapped to these values.</entry></row>
11077 * <row><entry>"mountable"</entry><entry>The "Mountable" namespace. Includes
11078 * simple boolean keys for checking if a file or path supports mount operations, e.g.
11079 * mount, unmount, eject. These are used for files of type %G_FILE_TYPE_MOUNTABLE.</entry></row>
11080 * <row><entry>"time"</entry><entry>The "Time" namespace. Includes file
11081 * access, changed, created times. </entry></row>
11082 * <row><entry>"unix"</entry><entry>The "Unix" namespace. Includes UNIX-specific
11083 * information and may not be available for all files. Examples include
11084 * the UNIX "UID", "GID", etc.</entry></row>
11085 * <row><entry>"dos"</entry><entry>The "DOS" namespace. Includes DOS-specific
11086 * information and may not be available for all files. Examples include
11087 * "is_system" for checking if a file is marked as a system file, and "is_archive"
11088 * for checking if a file is marked as an archive file.</entry></row>
11089 * <row><entry>"owner"</entry><entry>The "Owner" namespace. Includes information
11090 * about who owns a file. May not be available for all file systems. Examples include
11091 * "user" for getting the user name of the file owner. This information is often mapped from
11092 * some backend specific data such as a unix UID.</entry></row>
11093 * <row><entry>"thumbnail"</entry><entry>The "Thumbnail" namespace. Includes
11094 * information about file thumbnails and their location within the file system. Exaples of
11095 * keys in this namespace include "path" to get the location of a thumbnail, and "failed"
11096 * to check if thumbnailing of the file failed.</entry></row>
11097 * <row><entry>"filesystem"</entry><entry>The "Filesystem" namespace. Gets information
11098 * about the file system where a file is located, such as its type, how much
11099 * space is left available, and the overall size of the file system.</entry></row>
11100 * <row><entry>"gvfs"</entry><entry>The "GVFS" namespace. Keys in this namespace
11101 * contain information about the current GVFS backend in use. </entry></row>
11102 * <row><entry>"xattr"</entry><entry>The "xattr" namespace. Gets information
11103 * about extended user attributes. See attr(5). The "user." prefix of the
11104 * extended user attribute name is stripped away when constructing keys in
11105 * this namespace, e.g. "xattr::mime_type" for the extended attribute with
11106 * the name "user.mime_type". Note that this information is only available
11107 * if GLib has been built with extended attribute support.</entry></row>
11108 * <row><entry>"xattr-sys"</entry><entry>The "xattr-sys" namespace.
11109 * Gets information about extended attributes which are not user-specific.
11110 * See attr(5). Note that this information is only available if GLib
11111 * has been built with extended attribute support.</entry></row>
11112 * <row><entry>"selinux"</entry><entry>The "SELinux" namespace. Includes
11113 * information about the SELinux context of files. Note that this information
11114 * is only available if GLib has been built with SELinux support.</entry></row>
11119 * Please note that these are not all of the possible namespaces.
11120 * More namespaces can be added from GIO modules or by individual applications.
11121 * For more information about writing GIO modules, see #GIOModule.
11122 * <!-- TODO: Implementation note about using extended attributes on supported
11125 * <title>GFileAttributes Built-in Keys and Value Types</title>
11126 * <tgroup cols='3' align='left'><thead>
11127 * <row><entry>Enum Value</entry><entry>Namespace:Key</entry><entry>Value Type</entry></row>
11129 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_TYPE</entry><entry>standard::type</entry><entry>uint32 (#GFileType)</entry></row>
11130 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN</entry><entry>standard::is-hidden</entry><entry>boolean</entry></row>
11131 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP</entry><entry>standard::is-backup</entry><entry>boolean</entry></row>
11132 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK</entry><entry>standard::is-symlink</entry><entry>boolean</entry></row>
11133 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL</entry><entry>standard::is-virtual</entry><entry>boolean</entry></row>
11134 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_NAME</entry><entry>standard::name</entry><entry>byte string</entry></row>
11135 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME</entry><entry>standard::display-name</entry><entry>string</entry></row>
11136 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME</entry><entry>standard::edit-name</entry><entry>string</entry></row>
11137 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_ICON</entry><entry>standard::icon</entry><entry>object (#GIcon)</entry></row>
11138 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE</entry><entry>standard::content-type</entry><entry>string</entry></row>
11139 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE</entry><entry>standard::fast-content-type</entry><entry>string</entry></row>
11140 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_SIZE</entry><entry>standard::size</entry><entry>uint64</entry></row>
11141 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE</entry><entry>standard::allocated-size</entry><entry>uint64</entry></row>
11142 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET</entry><entry>standard::symlink-target</entry><entry>byte string</entry></row>
11143 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_TARGET_URI</entry><entry>standard::target-uri</entry><entry>string</entry></row>
11144 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER</entry><entry>standard::sort-order</entry><entry>int32</entry></row>
11145 * <row><entry>%G_FILE_ATTRIBUTE_ETAG_VALUE</entry><entry>etag::value</entry><entry>string</entry></row>
11146 * <row><entry>%G_FILE_ATTRIBUTE_ID_FILE</entry><entry>id::file</entry><entry>string</entry></row>
11147 * <row><entry>%G_FILE_ATTRIBUTE_ID_FILESYSTEM</entry><entry>id::filesystem</entry><entry>string</entry></row>
11148 * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_READ</entry><entry>access::can-read</entry><entry>boolean</entry></row>
11149 * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE</entry><entry>access::can-write</entry><entry>boolean</entry></row>
11150 * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE</entry><entry>access::can-execute</entry><entry>boolean</entry></row>
11151 * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE</entry><entry>access::can-delete</entry><entry>boolean</entry></row>
11152 * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH</entry><entry>access::can-trash</entry><entry>boolean</entry></row>
11153 * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME</entry><entry>access::can-rename</entry><entry>boolean</entry></row>
11154 * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT</entry><entry>mountable::can-mount</entry><entry>boolean</entry></row>
11155 * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT</entry><entry>mountable::can-unmount</entry><entry>boolean</entry></row>
11156 * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT</entry><entry>mountable::can-eject</entry><entry>boolean</entry></row>
11157 * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE</entry><entry>mountable::unix-device</entry><entry>uint32</entry></row>
11158 * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE</entry><entry>mountable::unix-device-file</entry><entry>string</entry></row>
11159 * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI</entry><entry>mountable::hal-udi</entry><entry>string</entry></row>
11160 * <row><entry>%G_FILE_ATTRIBUTE_TIME_MODIFIED</entry><entry>time::modified</entry><entry>uint64</entry></row>
11161 * <row><entry>%G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC</entry><entry>time::modified-usec</entry><entry>uint32</entry></row>
11162 * <row><entry>%G_FILE_ATTRIBUTE_TIME_ACCESS</entry><entry>time::access</entry><entry>uint64</entry></row>
11163 * <row><entry>%G_FILE_ATTRIBUTE_TIME_ACCESS_USEC</entry><entry>time::access-usec</entry><entry>uint32</entry></row>
11164 * <row><entry>%G_FILE_ATTRIBUTE_TIME_CHANGED</entry><entry>time::changed</entry><entry>uint64</entry></row>
11165 * <row><entry>%G_FILE_ATTRIBUTE_TIME_CHANGED_USEC</entry><entry>time::changed-usec</entry><entry>uint32</entry></row>
11166 * <row><entry>%G_FILE_ATTRIBUTE_TIME_CREATED</entry><entry>time::created</entry><entry>uint64</entry></row>
11167 * <row><entry>%G_FILE_ATTRIBUTE_TIME_CREATED_USEC</entry><entry>time::created-usec</entry><entry>uint32</entry></row>
11168 * <row><entry>%G_FILE_ATTRIBUTE_UNIX_DEVICE</entry><entry>unix::device</entry><entry>uint32</entry></row>
11169 * <row><entry>%G_FILE_ATTRIBUTE_UNIX_INODE</entry><entry>unix::inode</entry><entry>uint64</entry></row>
11170 * <row><entry>%G_FILE_ATTRIBUTE_UNIX_MODE</entry><entry>unix::mode</entry><entry>uint32</entry></row>
11171 * <row><entry>%G_FILE_ATTRIBUTE_UNIX_NLINK</entry><entry>unix::nlink</entry><entry>uint32</entry></row>
11172 * <row><entry>%G_FILE_ATTRIBUTE_UNIX_UID</entry><entry>unix::uid</entry><entry>uint32</entry></row>
11173 * <row><entry>%G_FILE_ATTRIBUTE_UNIX_GID</entry><entry>unix::gid</entry><entry>uint32</entry></row>
11174 * <row><entry>%G_FILE_ATTRIBUTE_UNIX_RDEV</entry><entry>unix::rdev</entry><entry>uint32</entry></row>
11175 * <row><entry>%G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE</entry><entry>unix::block-size</entry><entry>uint32</entry></row>
11176 * <row><entry>%G_FILE_ATTRIBUTE_UNIX_BLOCKS</entry><entry>unix::blocks</entry><entry>uint64</entry></row>
11177 * <row><entry>%G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT</entry><entry>unix::is-mountpoint</entry><entry>boolean</entry></row>
11178 * <row><entry>%G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE</entry><entry>dos::is-archive</entry><entry>boolean</entry></row>
11179 * <row><entry>%G_FILE_ATTRIBUTE_DOS_IS_SYSTEM</entry><entry>dos::is-system</entry><entry>boolean</entry></row>
11180 * <row><entry>%G_FILE_ATTRIBUTE_OWNER_USER</entry><entry>owner::user</entry><entry>string</entry></row>
11181 * <row><entry>%G_FILE_ATTRIBUTE_OWNER_USER_REAL</entry><entry>owner::user-real</entry><entry>string</entry></row>
11182 * <row><entry>%G_FILE_ATTRIBUTE_OWNER_GROUP</entry><entry>owner::group</entry><entry>string</entry></row>
11183 * <row><entry>%G_FILE_ATTRIBUTE_THUMBNAIL_PATH</entry><entry>thumbnail::path</entry><entry>bytestring</entry></row>
11184 * <row><entry>%G_FILE_ATTRIBUTE_THUMBNAILING_FAILED</entry><entry>thumbnail::failed</entry><entry>boolean</entry></row>
11185 * <row><entry>%G_FILE_ATTRIBUTE_PREVIEW_ICON</entry><entry>preview::icon</entry><entry>object (#GIcon)</entry></row>
11186 * <row><entry>%G_FILE_ATTRIBUTE_FILESYSTEM_SIZE</entry><entry>filesystem::size</entry><entry>uint64</entry></row>
11187 * <row><entry>%G_FILE_ATTRIBUTE_FILESYSTEM_FREE</entry><entry>filesystem::free</entry><entry>uint64</entry></row>
11188 * <row><entry>%G_FILE_ATTRIBUTE_FILESYSTEM_TYPE</entry><entry>filesystem::type</entry><entry>string</entry></row>
11189 * <row><entry>%G_FILE_ATTRIBUTE_FILESYSTEM_READONLY</entry><entry>filesystem::readonly</entry><entry>boolean</entry></row>
11190 * <row><entry>%G_FILE_ATTRIBUTE_GVFS_BACKEND</entry><entry>gvfs::backend</entry><entry>string</entry></row>
11191 * <row><entry>%G_FILE_ATTRIBUTE_SELINUX_CONTEXT</entry><entry>selinux::context</entry><entry>string</entry></row>
11192 * </tbody></tgroup></table></para>
11193 * Note that there are no predefined keys in the "xattr" and "xattr-sys"
11194 * namespaces. Keys for the "xattr" namespace are constructed by stripping
11195 * away the "user." prefix from the extended user attribute, and prepending
11196 * "xattr::". Keys for the "xattr-sys" namespace are constructed by
11197 * concatenating "xattr-sys::" with the extended attribute name. All extended
11198 * attribute values are returned as hex-encoded strings in which bytes outside
11199 * the ASCII range are encoded as hexadecimal escape sequences of the form
11200 * \x<replaceable>nn</replaceable>.
11205 * SECTION:gfiledescriptorbase:
11206 * @short_description: Interface for file descriptor based IO
11207 * @include: gio/gfiledescriptorbased.h
11208 * @see_also: #GInputStream, #GOutputStream
11210 * #GFileDescriptorBased is implemented by streams (implementations of
11211 * #GInputStream or #GOutputStream) that are based on file descriptors.
11212 * Note that <filename><gio/gfiledescriptorbased.h></filename> belongs to
11213 * the UNIX-specific GIO interfaces, thus you have to use the
11214 * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
11221 * SECTION:gfileenumerato:
11222 * @short_description: Enumerated Files Routines
11223 * @include: gio/gio.h
11225 * #GFileEnumerator allows you to operate on a set of #GFile<!-- -->s,
11226 * returning a #GFileInfo structure for each file enumerated (e.g.
11227 * g_file_enumerate_children() will return a #GFileEnumerator for each
11228 * of the children within a directory).
11229 * To get the next file's information from a #GFileEnumerator, use
11230 * g_file_enumerator_next_file() or its asynchronous version,
11231 * g_file_enumerator_next_files_async(). Note that the asynchronous
11232 * version will return a list of #GFileInfo<!---->s, whereas the
11233 * synchronous will only return the next file in the enumerator.
11234 * To close a #GFileEnumerator, use g_file_enumerator_close(), or
11235 * its asynchronous version, g_file_enumerator_close_async(). Once
11236 * a #GFileEnumerator is closed, no further actions may be performed
11237 * on it, and it should be freed with g_object_unref().
11242 * SECTION:gfileico:
11243 * @short_description: Icons pointing to an image file
11244 * @include: gio/gio.h
11245 * @see_also: #GIcon, #GLoadableIcon
11247 * #GFileIcon specifies an icon by pointing to an image file
11248 * to be used as icon.
11253 * SECTION:gfileinf:
11254 * @short_description: File Information and Attributes
11255 * @include: gio/gio.h
11256 * @see_also: #GFile, <link linkend="gio-GFileAttribute">GFileAttribute</link>
11258 * Functionality for manipulating basic metadata for files. #GFileInfo
11259 * implements methods for getting information that all files should
11260 * contain, and allows for manipulation of extended attributes.
11261 * See <link linkend="gio-GFileAttribute">GFileAttribute</link> for more
11262 * information on how GIO handles file attributes.
11263 * To obtain a #GFileInfo for a #GFile, use g_file_query_info() (or its
11264 * async variant). To obtain a #GFileInfo for a file input or output
11265 * stream, use g_file_input_stream_query_info() or
11266 * g_file_output_stream_query_info() (or their async variants).
11267 * To change the actual attributes of a file, you should then set the
11268 * attribute in the #GFileInfo and call g_file_set_attributes_from_info()
11269 * or g_file_set_attributes_async() on a GFile.
11270 * However, not all attributes can be changed in the file. For instance,
11271 * the actual size of a file cannot be changed via g_file_info_set_size().
11272 * You may call g_file_query_settable_attributes() and
11273 * g_file_query_writable_namespaces() to discover the settable attributes
11274 * of a particular file at runtime.
11275 * #GFileAttributeMatcher allows for searching through a #GFileInfo for
11281 * SECTION:gfileinputstrea:
11282 * @short_description: File input streaming operations
11283 * @include: gio/gio.h
11284 * @see_also: #GInputStream, #GDataInputStream, #GSeekable
11286 * GFileInputStream provides input streams that take their
11287 * content from a file.
11288 * GFileInputStream implements #GSeekable, which allows the input
11289 * stream to jump to arbitrary positions in the file, provided the
11290 * filesystem of the file allows it. To find the position of a file
11291 * input stream, use g_seekable_tell(). To find out if a file input
11292 * stream supports seeking, use g_seekable_stream_can_seek().
11293 * To position a file input stream, use g_seekable_seek().
11298 * SECTION:gfileiostrea:
11299 * @short_description: File read and write streaming operations
11300 * @include: gio/gio.h
11301 * @see_also: #GIOStream, #GFileInputStream, #GFileOutputStream, #GSeekable
11303 * GFileIOStream provides io streams that both read and write to the same
11305 * GFileIOStream implements #GSeekable, which allows the io
11306 * stream to jump to arbitrary positions in the file and to truncate
11307 * the file, provided the filesystem of the file supports these
11309 * To find the position of a file io stream, use
11310 * g_seekable_tell().
11311 * To find out if a file io stream supports seeking, use g_seekable_can_seek().
11312 * To position a file io stream, use g_seekable_seek().
11313 * To find out if a file io stream supports truncating, use
11314 * g_seekable_can_truncate(). To truncate a file io
11315 * stream, use g_seekable_truncate().
11316 * The default implementation of all the #GFileIOStream operations
11317 * and the implementation of #GSeekable just call into the same operations
11318 * on the output stream.
11325 * SECTION:gfilemonito:
11326 * @short_description: File Monitor
11327 * @include: gio/gio.h
11329 * Monitors a file or directory for changes.
11330 * To obtain a #GFileMonitor for a file or directory, use
11331 * g_file_monitor(), g_file_monitor_file(), or
11332 * g_file_monitor_directory().
11333 * To get informed about changes to the file or directory you are
11334 * monitoring, connect to the #GFileMonitor::changed signal. The
11335 * signal will be emitted in the <link
11336 * linkend="g-main-context-push-thread-default">thread-default main
11337 * context</link> of the thread that the monitor was created in
11338 * (though if the global default main context is blocked, this may
11339 * cause notifications to be blocked even if the thread-default
11340 * context is still running).
11345 * SECTION:gfilenamecomplete:
11346 * @short_description: Filename Completer
11347 * @include: gio/gio.h
11349 * Completes partial file and directory names given a partial string by
11350 * looking in the file system for clues. Can return a list of possible
11351 * completion strings for widget implementations.
11356 * SECTION:gfileoutputstrea:
11357 * @short_description: File output streaming operations
11358 * @include: gio/gio.h
11359 * @see_also: #GOutputStream, #GDataOutputStream, #GSeekable
11361 * GFileOutputStream provides output streams that write their
11362 * content to a file.
11363 * GFileOutputStream implements #GSeekable, which allows the output
11364 * stream to jump to arbitrary positions in the file and to truncate
11365 * the file, provided the filesystem of the file supports these
11367 * To find the position of a file output stream, use g_seekable_tell().
11368 * To find out if a file output stream supports seeking, use
11369 * g_seekable_can_seek().To position a file output stream, use
11370 * g_seekable_seek(). To find out if a file output stream supports
11371 * truncating, use g_seekable_can_truncate(). To truncate a file output
11372 * stream, use g_seekable_truncate().
11377 * SECTION:gfilterinputstrea:
11378 * @short_description: Filter Input Stream
11379 * @include: gio/gio.h
11381 * Base class for input stream implementations that perform some
11382 * kind of filtering operation on a base stream. Typical examples
11383 * of filtering operations are character set conversion, compression
11384 * and byte order flipping.
11389 * SECTION:gfilteroutputstrea:
11390 * @short_description: Filter Output Stream
11391 * @include: gio/gio.h
11393 * Base class for output stream implementations that perform some
11394 * kind of filtering operation on a base stream. Typical examples
11395 * of filtering operations are character set conversion, compression
11396 * and byte order flipping.
11402 * @short_description: Interface for icons
11403 * @include: gio/gio.h
11405 * #GIcon is a very minimal interface for icons. It provides functions
11406 * for checking the equality of two icons, hashing of icons and
11407 * serializing an icon to and from strings.
11408 * #GIcon does not provide the actual pixmap for the icon as this is out
11409 * of GIO's scope, however implementations of #GIcon may contain the name
11410 * of an icon (see #GThemedIcon), or the path to an icon (see #GLoadableIcon).
11411 * To obtain a hash of a #GIcon, see g_icon_hash().
11412 * To check if two #GIcons are equal, see g_icon_equal().
11413 * For serializing a #GIcon, use g_icon_to_string() and
11414 * g_icon_new_for_string().
11415 * If your application or library provides one or more #GIcon
11416 * implementations you need to ensure that each #GType is registered
11417 * with the type system prior to calling g_icon_new_for_string().
11422 * SECTION:ginetaddres:
11423 * @short_description: An IPv4/IPv6 address
11425 * #GInetAddress represents an IPv4 or IPv6 internet address. Use
11426 * g_resolver_lookup_by_name() or g_resolver_lookup_by_name_async() to
11427 * look up the #GInetAddress for a hostname. Use
11428 * g_resolver_lookup_by_address() or
11429 * g_resolver_lookup_by_address_async() to look up the hostname for a
11431 * To actually connect to a remote host, you will need a
11432 * #GInetSocketAddress (which includes a #GInetAddress as well as a
11438 * SECTION:ginetsocketaddres:
11439 * @short_description: Internet GSocketAddress
11441 * An IPv4 or IPv6 socket address; that is, the combination of a
11442 * #GInetAddress and a port number.
11447 * SECTION:ginitabl:
11448 * @short_description: Failable object initialization interface
11449 * @include: gio/gio.h
11450 * @see_also: #GAsyncInitable
11452 * #GInitable is implemented by objects that can fail during
11453 * initialization. If an object implements this interface the
11454 * g_initable_init() function must be called as the first thing
11455 * after construction. If g_initable_init() is not called, or if
11456 * it returns an error, all further operations on the object
11457 * should fail, generally with a %G_IO_ERROR_NOT_INITIALIZED error.
11458 * Users of objects implementing this are not intended to use
11459 * the interface method directly, instead it will be used automatically
11460 * in various ways. For C applications you generally just call
11461 * g_initable_new() directly, or indirectly via a foo_thing_new() wrapper.
11462 * This will call g_initable_init() under the cover, returning %NULL and
11463 * setting a %GError on failure.
11464 * For bindings in languages where the native constructor supports
11465 * exceptions the binding could check for objects implemention %GInitable
11466 * during normal construction and automatically initialize them, throwing
11467 * an exception on failure.
11472 * SECTION:ginputstrea:
11473 * @short_description: Base class for implementing streaming input
11474 * @include: gio/gio.h
11476 * GInputStream has functions to read from a stream (g_input_stream_read()),
11477 * to close a stream (g_input_stream_close()) and to skip some content
11478 * (g_input_stream_skip()).
11479 * To copy the content of an input stream to an output stream without
11480 * manually handling the reads and writes, use g_output_stream_splice().
11481 * All of these functions have async variants too.
11487 * @short_description: Error helper functions
11488 * @include: gio/gio.h
11490 * Contains helper functions for reporting errors to the user.
11495 * SECTION:giomodul:
11496 * @short_description: Loadable GIO Modules
11497 * @include: gio/gio.h
11499 * Provides an interface and default functions for loading and unloading
11500 * modules. This is used internally to make GIO extensible, but can also
11501 * be used by others to implement module loading.
11506 * SECTION:gioschedule:
11507 * @short_description: I/O Scheduler
11508 * @include: gio/gio.h
11510 * Schedules asynchronous I/O operations. #GIOScheduler integrates
11511 * into the main event loop (#GMainLoop) and may use threads if they
11513 * <para id="io-priority"><indexterm><primary>I/O priority</primary></indexterm>
11514 * Each I/O operation has a priority, and the scheduler uses the priorities
11515 * to determine the order in which operations are executed. They are
11516 * <emphasis>not</emphasis> used to determine system-wide I/O scheduling.
11517 * Priorities are integers, with lower numbers indicating higher priority.
11518 * It is recommended to choose priorities between %G_PRIORITY_LOW and
11519 * %G_PRIORITY_HIGH, with %G_PRIORITY_DEFAULT as a default.
11525 * SECTION:giostrea:
11526 * @short_description: Base class for implementing read/write streams
11527 * @include: gio/gio.h
11528 * @see_also: #GInputStream, #GOutputStream
11530 * GIOStream represents an object that has both read and write streams.
11531 * Generally the two streams acts as separate input and output streams,
11532 * but they share some common resources and state. For instance, for
11533 * seekable streams they may use the same position in both streams.
11534 * Examples of #GIOStream objects are #GSocketConnection which represents
11535 * a two-way network connection, and #GFileIOStream which represent a
11536 * file handle opened in read-write mode.
11537 * To do the actual reading and writing you need to get the substreams
11538 * with g_io_stream_get_input_stream() and g_io_stream_get_output_stream().
11539 * The #GIOStream object owns the input and the output streams, not the other
11540 * way around, so keeping the substreams alive will not keep the #GIOStream
11541 * object alive. If the #GIOStream object is freed it will be closed, thus
11542 * closing the substream, so even if the substreams stay alive they will
11543 * always just return a %G_IO_ERROR_CLOSED for all operations.
11544 * To close a stream use g_io_stream_close() which will close the common
11545 * stream object and also the individual substreams. You can also close
11546 * the substreams themselves. In most cases this only marks the
11547 * substream as closed, so further I/O on it fails. However, some streams
11548 * may support "half-closed" states where one direction of the stream
11549 * is actually shut down.
11556 * SECTION:gloadableico:
11557 * @short_description: Loadable Icons
11558 * @include: gio/gio.h
11559 * @see_also: #GIcon, #GThemedIcon
11561 * Extends the #GIcon interface and adds the ability to
11562 * load icons from streams.
11567 * SECTION:gmemoryinputstrea:
11568 * @short_description: Streaming input operations on memory chunks
11569 * @include: gio/gio.h
11570 * @see_also: #GMemoryOutputStream
11572 * #GMemoryInputStream is a class for using arbitrary
11573 * memory chunks as input for GIO streaming input operations.
11578 * SECTION:gmemoryoutputstrea:
11579 * @short_description: Streaming output operations on memory chunks
11580 * @include: gio/gio.h
11581 * @see_also: #GMemoryInputStream
11583 * #GMemoryOutputStream is a class for using arbitrary
11584 * memory chunks as output for GIO streaming output operations.
11590 * @short_description: Mount management
11591 * @include: gio/gio.h
11592 * @see_also: GVolume, GUnixMount
11594 * The #GMount interface represents user-visible mounts. Note, when
11595 * porting from GnomeVFS, #GMount is the moral equivalent of #GnomeVFSVolume.
11596 * #GMount is a "mounted" filesystem that you can access. Mounted is in
11597 * quotes because it's not the same as a unix mount, it might be a gvfs
11598 * mount, but you can still access the files on it if you use GIO. Might or
11599 * might not be related to a volume object.
11600 * Unmounting a #GMount instance is an asynchronous operation. For
11601 * more information about asynchronous operations, see #GAsyncReady
11602 * and #GSimpleAsyncReady. To unmount a #GMount instance, first call
11603 * g_mount_unmount_with_operation() with (at least) the #GMount instance and a
11604 * #GAsyncReadyCallback. The callback will be fired when the
11605 * operation has resolved (either with success or failure), and a
11606 * #GAsyncReady structure will be passed to the callback. That
11607 * callback should then call g_mount_unmount_with_operation_finish() with the #GMount
11608 * and the #GAsyncReady data to see if the operation was completed
11609 * successfully. If an @error is present when g_mount_unmount_with_operation_finish()
11610 * is called, then it will be filled with any error information.
11615 * SECTION:gmountoperatio:
11616 * @short_description: Object used for authentication and user interaction
11617 * @include: gio/gio.h
11619 * #GMountOperation provides a mechanism for interacting with the user.
11620 * It can be used for authenticating mountable operations, such as loop
11621 * mounting files, hard drive partitions or server locations. It can
11622 * also be used to ask the user questions or show a list of applications
11623 * preventing unmount or eject operations from completing.
11624 * Note that #GMountOperation is used for more than just #GMount
11625 * objects – for example it is also used in g_drive_start() and
11627 * Users should instantiate a subclass of this that implements all the
11628 * various callbacks to show the required dialogs, such as
11629 * #GtkMountOperation. If no user interaction is desired (for example
11630 * when automounting filesystems at login time), usually %NULL can be
11631 * passed, see each method taking a #GMountOperation for details.
11636 * SECTION:gnetworkaddres:
11637 * @short_description: A GSocketConnectable for resolving hostnames
11638 * @include: gio/gio.h
11640 * #GNetworkAddress provides an easy way to resolve a hostname and
11641 * then attempt to connect to that host, handling the possibility of
11642 * multiple IP addresses and multiple address families.
11643 * See #GSocketConnectable for and example of using the connectable
11649 * SECTION:gnetworkservic:
11650 * @short_description: A GSocketConnectable for resolving SRV records
11651 * @include: gio/gio.h
11653 * Like #GNetworkAddress does with hostnames, #GNetworkService
11654 * provides an easy way to resolve a SRV record, and then attempt to
11655 * connect to one of the hosts that implements that service, handling
11656 * service priority/weighting, multiple IP addresses, and multiple
11657 * address families.
11658 * See #GSrvTarget for more information about SRV records, and see
11659 * #GSocketConnectable for and example of using the connectable
11665 * SECTION:goutputstrea:
11666 * @short_description: Base class for implementing streaming output
11667 * @include: gio/gio.h
11669 * GOutputStream has functions to write to a stream (g_output_stream_write()),
11670 * to close a stream (g_output_stream_close()) and to flush pending writes
11671 * (g_output_stream_flush()).
11672 * To copy the content of an input stream to an output stream without
11673 * manually handling the reads and writes, use g_output_stream_splice().
11674 * All of these functions have async variants too.
11679 * SECTION:gpermissio:
11680 * @title: GPermission
11681 * @short_description: An object representing the permission to perform a certain action
11683 * A #GPermission represents the status of the caller's permission to
11684 * perform a certain action.
11685 * You can query if the action is currently allowed and if it is
11686 * possible to acquire the permission so that the action will be allowed
11688 * There is also an API to actually acquire the permission and one to
11690 * As an example, a #GPermission might represent the ability for the
11691 * user to write to a #GSettings object. This #GPermission object could
11692 * then be used to decide if it is appropriate to show a "Click here to
11693 * unlock" button in a dialog and to provide the mechanism to invoke
11694 * when that button is clicked.
11699 * SECTION:gpollableinputstrea:
11700 * @short_description: Interface for pollable input streams
11701 * @include: gio/gio.h
11702 * @see_also: #GInputStream, #GPollableOutputStream, #GFileDescriptorBased
11704 * #GPollableInputStream is implemented by #GInputStream<!-- -->s that
11705 * can be polled for readiness to read. This can be used when
11706 * interfacing with a non-GIO API that expects
11707 * UNIX-file-descriptor-style asynchronous I/O rather than GIO-style.
11714 * SECTION:gpollableoutputstrea:
11715 * @short_description: Interface for pollable output streams
11716 * @include: gio/gio.h
11717 * @see_also: #GOutputStream, #GFileDescriptorBased, #GPollableInputStream
11719 * #GPollableOutputStream is implemented by #GOutputStream<!-- -->s that
11720 * can be polled for readiness to write. This can be used when
11721 * interfacing with a non-GIO API that expects
11722 * UNIX-file-descriptor-style asynchronous I/O rather than GIO-style.
11730 * @short_description: Interface for proxy handling
11732 * A #GProxy handles connecting to a remote host via a given type of
11733 * proxy server. It is implemented by the 'gio-proxy' extension point.
11734 * The extensions are named after their proxy protocol name. As an
11735 * example, a SOCKS5 proxy implementation can be retrieved with the
11736 * name 'socks5' using the function
11737 * g_io_extension_point_get_extension_by_name().
11744 * SECTION:gproxyaddres:
11745 * @short_description: An internet address with proxy information
11747 * Support for proxied #GInetSocketAddress.
11752 * SECTION:gproxyresolve:
11753 * @short_description: Asynchronous and cancellable network proxy resolver
11754 * @include: gio/gio.h
11756 * #GProxyResolver provides synchronous and asynchronous network proxy
11757 * resolution. #GProxyResolver is used within #GClientSocket through
11758 * the method g_socket_connectable_proxy_enumerate().
11763 * SECTION:gresolve:
11764 * @short_description: Asynchronous and cancellable DNS resolver
11765 * @include: gio/gio.h
11767 * #GResolver provides cancellable synchronous and asynchronous DNS
11768 * resolution, for hostnames (g_resolver_lookup_by_address(),
11769 * g_resolver_lookup_by_name() and their async variants) and SRV
11770 * (service) records (g_resolver_lookup_service()).
11771 * #GNetworkAddress and #GNetworkService provide wrappers around
11772 * #GResolver functionality that also implement #GSocketConnectable,
11773 * making it easy to connect to a remote host/service.
11778 * SECTION:gseekabl:
11779 * @short_description: Stream seeking interface
11780 * @include: gio/gio.h
11781 * @see_also: #GInputStream, #GOutputStream
11783 * #GSeekable is implemented by streams (implementations of
11784 * #GInputStream or #GOutputStream) that support seeking.
11789 * SECTION:gsetting:
11790 * @short_description: High-level API for application settings
11792 * The #GSettings class provides a convenient API for storing and retrieving
11793 * application settings.
11794 * When creating a GSettings instance, you have to specify a schema
11795 * that describes the keys in your settings and their types and default
11796 * values, as well as some other information.
11797 * Normally, a schema has as fixed path that determines where the settings
11798 * are stored in the conceptual global tree of settings. However, schemas
11799 * can also be 'relocatable', i.e. not equipped with a fixed path. This is
11800 * useful e.g. when the schema describes an 'account', and you want to be
11801 * able to store a arbitrary number of accounts.
11802 * Unlike other configuration systems (like GConf), GSettings does not
11803 * restrict keys to basic types like strings and numbers. GSettings stores
11804 * values as #GVariant, and allows any #GVariantType for keys. Key names
11805 * are restricted to lowercase characters, numbers and '-'. Furthermore,
11806 * the names must begin with a lowercase character, must not end
11807 * with a '-', and must not contain consecutive dashes. Key names can
11808 * be up to 32 characters long.
11809 * Similar to GConf, the default values in GSettings schemas can be
11810 * localized, but the localized values are stored in gettext catalogs
11811 * and looked up with the domain that is specified in the
11812 * <tag class="attribute">gettext-domain</tag> attribute of the
11813 * <tag class="starttag">schemalist</tag> or <tag class="starttag">schema</tag>
11814 * elements and the category that is specified in the l10n attribute of the
11815 * <tag class="starttag">key</tag> element.
11816 * GSettings uses schemas in a compact binary form that is created
11817 * by the <link linkend="glib-compile-schemas">glib-compile-schemas</link>
11818 * utility. The input is a schema description in an XML format that can be
11819 * described by the following DTD:
11820 * |[<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/gschema.dtd"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include>]|
11821 * At runtime, schemas are identified by their id (as specified
11822 * in the <tag class="attribute">id</tag> attribute of the
11823 * <tag class="starttag">schema</tag> element). The
11824 * convention for schema ids is to use a dotted name, similar in
11825 * style to a D-Bus bus name, e.g. "org.gnome.SessionManager". In particular,
11826 * if the settings are for a specific service that owns a D-Bus bus name,
11827 * the D-Bus bus name and schema id should match. For schemas which deal
11828 * with settings not associated with one named application, the id should
11829 * not use StudlyCaps, e.g. "org.gnome.font-rendering".
11830 * In addition to #GVariant types, keys can have types that have enumerated
11831 * types. These can be described by a <tag class="starttag">choice</tag>,
11832 * <tag class="starttag">enum</tag> or <tag class="starttag">flags</tag> element, see
11833 * <xref linkend="schema-enumerated"/>. The underlying type of
11834 * such a key is string, but you can use g_settings_get_enum(),
11835 * g_settings_set_enum(), g_settings_get_flags(), g_settings_set_flags()
11836 * access the numeric values corresponding to the string value of enum
11838 * <example id="schema-default-values"><title>Default values</title>
11839 * <programlisting><![CDATA[
11841 * <schema id="org.gtk.Test" path="/tests/" gettext-domain="test">
11842 * <key name="greeting" type="s">
11843 * <default l10n="messages">"Hello, earthlings"</default>
11844 * <summary>A greeting</summary>
11846 * Greeting of the invading martians
11849 * <key name="box" type="(ii)">
11850 * <default>(20,30)</default>
11854 * ]]></programlisting></example>
11855 * <example id="schema-enumerated"><title>Ranges, choices and enumerated types</title>
11856 * <programlisting><![CDATA[
11858 * <enum id="myenum">
11859 * <value nick="first" value="1"/>
11860 * <value nick="second" value="2"/>
11862 * <enum id="myflags">
11863 * <value nick="flag1" value="1"/>
11864 * <value nick="flag2" value="2"/>
11865 * <value nick="flag3" value="4"/>
11867 * <schema id="org.gtk.Test">
11868 * <key name="key-with-range" type="i">
11869 * <range min="1" max="100"/>
11870 * <default>10</default>
11872 * <key name="key-with-choices" type="s">
11874 * <choice value='Elisabeth'/>
11875 * <choice value='Annabeth'/>
11876 * <choice value='Joe'/>
11879 * <alias value='Anna' target='Annabeth'/>
11880 * <alias value='Beth' target='Elisabeth'/>
11882 * <default>'Joe'</default>
11884 * <key name='enumerated-key' enum='myenum'>
11885 * <default>'first'</default>
11887 * <key name='flags-key' flags='myflags'>
11888 * <default>["flag1",flag2"]</default>
11892 * ]]></programlisting></example>
11894 * <title>Vendor overrides</title>
11896 * Default values are defined in the schemas that get installed by
11897 * an application. Sometimes, it is necessary for a vendor or distributor
11898 * to adjust these defaults. Since patching the XML source for the schema
11899 * is inconvenient and error-prone,
11900 * <link linkend="glib-compile-schemas">glib-compile-schemas</link> reads
11901 * so-called 'vendor override' files. These are keyfiles in the same
11902 * directory as the XML schema sources which can override default values.
11903 * The schema id serves as the group name in the key file, and the values
11904 * are expected in serialized GVariant form, as in the following example:
11905 * <informalexample><programlisting>
11906 * [org.gtk.Example]
11909 * </programlisting></informalexample>
11913 * <title>Binding</title>
11915 * A very convenient feature of GSettings lets you bind #GObject properties
11916 * directly to settings, using g_settings_bind(). Once a GObject property
11917 * has been bound to a setting, changes on either side are automatically
11918 * propagated to the other side. GSettings handles details like
11919 * mapping between GObject and GVariant types, and preventing infinite
11923 * This makes it very easy to hook up a preferences dialog to the
11924 * underlying settings. To make this even more convenient, GSettings
11925 * looks for a boolean property with the name "sensitivity" and
11926 * automatically binds it to the writability of the bound setting.
11927 * If this 'magic' gets in the way, it can be suppressed with the
11928 * #G_SETTINGS_BIND_NO_SENSITIVITY flag.
11935 * SECTION:gsettingsbacken:
11936 * @title: GSettingsBackend
11937 * @short_description: Interface for settings backend implementations
11938 * @include: gio/gsettingsbackend.h
11939 * @see_also: #GSettings, #GIOExtensionPoint
11941 * The #GSettingsBackend interface defines a generic interface for
11942 * non-strictly-typed data that is stored in a hierarchy. To implement
11943 * an alternative storage backend for #GSettings, you need to implement
11944 * the #GSettingsBackend interface and then make it implement the
11945 * extension point #G_SETTINGS_BACKEND_EXTENSION_POINT_NAME.
11946 * The interface defines methods for reading and writing values, a
11947 * method for determining if writing of certain values will fail
11948 * (lockdown) and a change notification mechanism.
11949 * The semantics of the interface are very precisely defined and
11950 * implementations must carefully adhere to the expectations of
11951 * callers that are documented on each of the interface methods.
11952 * Some of the GSettingsBackend functions accept or return a #GTree.
11953 * These trees always have strings as keys and #GVariant as values.
11954 * g_settings_backend_create_tree() is a convenience function to create
11957 * The #GSettingsBackend API is exported to allow third-party
11958 * implementations, but does not carry the same stability guarantees
11959 * as the public GIO API. For this reason, you have to define the
11960 * C preprocessor symbol #G_SETTINGS_ENABLE_BACKEND before including
11961 * <filename>gio/gsettingsbackend.h</filename>
11967 * SECTION:gsimpleactio:
11968 * @title: GSimpleAction
11969 * @short_description: A simple GSimpleAction
11971 * A #GSimpleAction is the obvious simple implementation of the #GSimpleAction
11972 * interface. This is the easiest way to create an action for purposes of
11973 * adding it to a #GSimpleActionGroup.
11974 * See also #GtkAction.
11979 * SECTION:gsimpleactiongrou:
11980 * @title: GSimpleActionGroup
11981 * @short_description: A simple GActionGroup implementation
11983 * #GSimpleActionGroup is a hash table filled with #GAction objects,
11984 * implementing the #GActionGroup interface.
11989 * SECTION:gsimpleasyncresul:
11990 * @short_description: Simple asynchronous results implementation
11991 * @include: gio/gio.h
11992 * @see_also: #GAsyncResult
11994 * Implements #GAsyncResult for simple cases. Most of the time, this
11995 * will be all an application needs, and will be used transparently.
11996 * Because of this, #GSimpleAsyncResult is used throughout GIO for
11997 * handling asynchronous functions.
11998 * GSimpleAsyncResult handles #GAsyncReadyCallback<!-- -->s, error
11999 * reporting, operation cancellation and the final state of an operation,
12000 * completely transparent to the application. Results can be returned
12001 * as a pointer e.g. for functions that return data that is collected
12002 * asynchronously, a boolean value for checking the success or failure
12003 * of an operation, or a #gssize for operations which return the number
12004 * of bytes modified by the operation; all of the simple return cases
12006 * Most of the time, an application will not need to know of the details
12007 * of this API; it is handled transparently, and any necessary operations
12008 * are handled by #GAsyncResult's interface. However, if implementing a
12009 * new GIO module, for writing language bindings, or for complex
12010 * applications that need better control of how asynchronous operations
12011 * are completed, it is important to understand this functionality.
12012 * GSimpleAsyncResults are tagged with the calling function to ensure
12013 * that asynchronous functions and their finishing functions are used
12014 * together correctly.
12015 * To create a new #GSimpleAsyncResult, call g_simple_async_result_new().
12016 * If the result needs to be created for a #GError, use
12017 * g_simple_async_result_new_from_error() or
12018 * g_simple_async_result_new_take_error(). If a #GError is not available
12019 * (e.g. the asynchronous operation's doesn't take a #GError argument),
12020 * but the result still needs to be created for an error condition, use
12021 * g_simple_async_result_new_error() (or g_simple_async_result_set_error_va()
12022 * if your application or binding requires passing a variable argument list
12023 * directly), and the error can then be propagated through the use of
12024 * g_simple_async_result_propagate_error().
12025 * An asynchronous operation can be made to ignore a cancellation event by
12026 * calling g_simple_async_result_set_handle_cancellation() with a
12027 * #GSimpleAsyncResult for the operation and %FALSE. This is useful for
12028 * operations that are dangerous to cancel, such as close (which would
12029 * cause a leak if cancelled before being run).
12030 * GSimpleAsyncResult can integrate into GLib's event loop, #GMainLoop,
12031 * or it can use #GThread<!-- -->s if available.
12032 * g_simple_async_result_complete() will finish an I/O task directly
12033 * from the point where it is called. g_simple_async_result_complete_in_idle()
12034 * will finish it from an idle handler in the <link
12035 * linkend="g-main-context-push-thread-default">thread-default main
12036 * context</link>. g_simple_async_result_run_in_thread() will run the
12037 * job in a separate thread and then deliver the result to the
12038 * thread-default main context.
12039 * To set the results of an asynchronous function,
12040 * g_simple_async_result_set_op_res_gpointer(),
12041 * g_simple_async_result_set_op_res_gboolean(), and
12042 * g_simple_async_result_set_op_res_gssize()
12043 * are provided, setting the operation's result to a gpointer, gboolean, or
12044 * gssize, respectively.
12045 * Likewise, to get the result of an asynchronous function,
12046 * g_simple_async_result_get_op_res_gpointer(),
12047 * g_simple_async_result_get_op_res_gboolean(), and
12048 * g_simple_async_result_get_op_res_gssize() are
12049 * provided, getting the operation's result as a gpointer, gboolean, and
12050 * gssize, respectively.
12051 * For the details of the requirements implementations must respect, see
12052 * #GAsyncResult. A typical implementation of an asynchronous operation
12053 * using GSimpleAsyncResult looks something like this:
12056 * baked_cb (Cake *cake,
12057 * gpointer user_data)
12059 * /* In this example, this callback is not given a reference to the cake, so
12060 * * the GSimpleAsyncResult has to take a reference to it.
12062 * GSimpleAsyncResult *result = user_data;
12063 * if (cake == NULL)
12064 * g_simple_async_result_set_error (result,
12066 * BAKER_ERROR_NO_FLOUR,
12067 * "Go to the supermarket");
12069 * g_simple_async_result_set_op_res_gpointer (result,
12070 * g_object_ref (cake),
12072 * /* In this example, we assume that baked_cb is called as a callback from
12073 * * the mainloop, so it's safe to complete the operation synchronously here.
12074 * * If, however, _baker_prepare_cake () might call its callback without
12075 * * first returning to the mainloop — inadvisable, but some APIs do so —
12076 * * we would need to use g_simple_async_result_complete_in_idle().
12078 * g_simple_async_result_complete (result);
12079 * g_object_unref (result);
12082 * baker_bake_cake_async (Baker *self,
12084 * GAsyncReadyCallback callback,
12085 * gpointer user_data)
12087 * GSimpleAsyncResult *simple;
12091 * g_simple_async_report_error_in_idle (G_OBJECT (self),
12095 * BAKER_ERROR_TOO_SMALL,
12096 * "%ucm radius cakes are silly",
12100 * simple = g_simple_async_result_new (G_OBJECT (self),
12103 * baker_bake_cake_async);
12104 * cake = _baker_get_cached_cake (self, radius);
12105 * if (cake != NULL)
12107 * g_simple_async_result_set_op_res_gpointer (simple,
12108 * g_object_ref (cake),
12110 * g_simple_async_result_complete_in_idle (simple);
12111 * g_object_unref (simple);
12112 * /* Drop the reference returned by _baker_get_cached_cake(); the
12113 * * GSimpleAsyncResult has taken its own reference.
12115 * g_object_unref (cake);
12118 * _baker_prepare_cake (self, radius, baked_cb, simple);
12121 * baker_bake_cake_finish (Baker *self,
12122 * GAsyncResult *result,
12125 * GSimpleAsyncResult *simple;
12127 * g_return_val_if_fail (g_simple_async_result_is_valid (result,
12129 * baker_bake_cake_async),
12131 * simple = (GSimpleAsyncResult *) result;
12132 * if (g_simple_async_result_propagate_error (simple, error))
12134 * cake = CAKE (g_simple_async_result_get_op_res_gpointer (simple));
12135 * return g_object_ref (cake);
12142 * SECTION:gsimplepermissio:
12143 * @title: GSimplePermission
12144 * @short_description: A GPermission that doesn't change value
12146 * #GSimplePermission is a trivial implementation of #GPermission that
12147 * represents a permission that is either always or never allowed. The
12148 * value is given at constuction and doesn't change.
12149 * Calling request or release will result in errors.
12155 * @short_description: Low-level socket object
12156 * @include: gio/gio.h
12157 * @see_also: #GInitable
12159 * A #GSocket is a low-level networking primitive. It is a more or less
12160 * direct mapping of the BSD socket API in a portable GObject based API.
12161 * It supports both the UNIX socket implementations and winsock2 on Windows.
12162 * #GSocket is the platform independent base upon which the higher level
12163 * network primitives are based. Applications are not typically meant to
12164 * use it directly, but rather through classes like #GSocketClient,
12165 * #GSocketService and #GSocketConnection. However there may be cases where
12166 * direct use of #GSocket is useful.
12167 * #GSocket implements the #GInitable interface, so if it is manually constructed
12168 * by e.g. g_object_new() you must call g_initable_init() and check the
12169 * results before using the object. This is done automatically in
12170 * g_socket_new() and g_socket_new_from_fd(), so these functions can return
12172 * Sockets operate in two general modes, blocking or non-blocking. When
12173 * in blocking mode all operations block until the requested operation
12174 * is finished or there is an error. In non-blocking mode all calls that
12175 * would block return immediately with a %G_IO_ERROR_WOULD_BLOCK error.
12176 * To know when a call would successfully run you can call g_socket_condition_check(),
12177 * or g_socket_condition_wait(). You can also use g_socket_create_source() and
12178 * attach it to a #GMainContext to get callbacks when I/O is possible.
12179 * Note that all sockets are always set to non blocking mode in the system, and
12180 * blocking mode is emulated in GSocket.
12181 * When working in non-blocking mode applications should always be able to
12182 * handle getting a %G_IO_ERROR_WOULD_BLOCK error even when some other
12183 * function said that I/O was possible. This can easily happen in case
12184 * of a race condition in the application, but it can also happen for other
12185 * reasons. For instance, on Windows a socket is always seen as writable
12186 * until a write returns %G_IO_ERROR_WOULD_BLOCK.
12187 * #GSocket<!-- -->s can be either connection oriented or datagram based.
12188 * For connection oriented types you must first establish a connection by
12189 * either connecting to an address or accepting a connection from another
12190 * address. For connectionless socket types the target/source address is
12191 * specified or received in each I/O operation.
12192 * All socket file descriptors are set to be close-on-exec.
12193 * Note that creating a #GSocket causes the signal %SIGPIPE to be
12194 * ignored for the remainder of the program. If you are writing a
12195 * command-line utility that uses #GSocket, you may need to take into
12196 * account the fact that your program will not automatically be killed
12197 * if it tries to write to %stdout after it has been closed.
12204 * SECTION:gsocketaddres:
12205 * @short_description: Abstract base class representing endpoints for socket communication
12207 * #GSocketAddress is the equivalent of <type>struct sockaddr</type>
12208 * in the BSD sockets API. This is an abstract class; use
12209 * #GInetSocketAddress for internet sockets, or #GUnixSocketAddress
12210 * for UNIX domain sockets.
12215 * SECTION:gsocketclien:
12216 * @short_description: Helper for connecting to a network service
12217 * @include: gio/gio.h
12218 * @see_also: #GSocketConnection, #GSocketListener
12220 * #GSocketClient is a high-level utility class for connecting to a
12221 * network host using a connection oriented socket type.
12222 * You create a #GSocketClient object, set any options you want, then
12223 * call a sync or async connect operation, which returns a #GSocketConnection
12224 * subclass on success.
12225 * The type of the #GSocketConnection object returned depends on the type of
12226 * the underlying socket that is in use. For instance, for a TCP/IP connection
12227 * it will be a #GTcpConnection.
12234 * SECTION:gsocketconnectabl:
12235 * @short_description: Interface for potential socket endpoints
12237 * Objects that describe one or more potential socket endpoints
12238 * implement #GSocketConnectable. Callers can then use
12239 * g_socket_connectable_enumerate() to get a #GSocketAddressEnumerator
12240 * to try out each socket address in turn until one succeeds, as shown
12241 * in the sample code below.
12243 * MyConnectionType *
12244 * connect_to_host (const char *hostname,
12246 * GCancellable *cancellable,
12249 * MyConnection *conn = NULL;
12250 * GSocketConnectable *addr;
12251 * GSocketAddressEnumerator *enumerator;
12252 * GSocketAddress *sockaddr;
12253 * GError *conn_error = NULL;
12254 * addr = g_network_address_new ("www.gnome.org", 80);
12255 * enumerator = g_socket_connectable_enumerate (addr);
12256 * g_object_unref (addr);
12257 * /<!-- -->* Try each sockaddr until we succeed. Record the first
12258 * * connection error, but not any further ones (since they'll probably
12259 * * be basically the same as the first).
12261 * while (!conn && (sockaddr = g_socket_address_enumerator_next (enumerator, cancellable, error))
12263 * g_object_unref (sockaddr);
12265 * g_object_unref (enumerator);
12270 * /<!-- -->* We couldn't connect to the first address, but we succeeded
12271 * * in connecting to a later address.
12273 * g_error_free (conn_error);
12279 * /<!-- -->* Either the initial lookup failed, or else the caller
12283 * g_error_free (conn_error);
12288 * g_error_propagate (error, conn_error);
12294 * Conn = connect_to_sockaddr (sockaddr, conn_error ? null : &conn_error);
12299 * SECTION:gsocketconnectio:
12300 * @short_description: A socket connection
12301 * @include: gio/gio.h
12302 * @see_also: #GIOStream, #GSocketClient, #GSocketListener
12304 * #GSocketConnection is a #GIOStream for a connected socket. They
12305 * can be created either by #GSocketClient when connecting to a host,
12306 * or by #GSocketListener when accepting a new client.
12307 * The type of the #GSocketConnection object returned from these calls
12308 * depends on the type of the underlying socket that is in use. For
12309 * instance, for a TCP/IP connection it will be a #GTcpConnection.
12310 * Chosing what type of object to construct is done with the socket
12311 * connection factory, and it is possible for 3rd parties to register
12312 * custom socket connection types for specific combination of socket
12313 * family/type/protocol using g_socket_connection_factory_register_type().
12320 * SECTION:gsrvtarge:
12321 * @short_description: DNS SRV record target
12322 * @include: gio/gio.h
12324 * SRV (service) records are used by some network protocols to provide
12325 * service-specific aliasing and load-balancing. For example, XMPP
12326 * (Jabber) uses SRV records to locate the XMPP server for a domain;
12327 * rather than connecting directly to "example.com" or assuming a
12328 * specific server hostname like "xmpp.example.com", an XMPP client
12329 * would look up the "xmpp-client" SRV record for "example.com", and
12330 * then connect to whatever host was pointed to by that record.
12331 * You can use g_resolver_lookup_service() or
12332 * g_resolver_lookup_service_async() to find the #GSrvTarget<!-- -->s
12333 * for a given service. However, if you are simply planning to connect
12334 * to the remote service, you can use #GNetworkService's
12335 * #GSocketConnectable interface and not need to worry about
12336 * #GSrvTarget at all.
12341 * SECTION:gthemedico:
12342 * @short_description: Icon theming support
12343 * @include: gio/gio.h
12344 * @see_also: #GIcon, #GLoadableIcon
12346 * #GThemedIcon is an implementation of #GIcon that supports icon themes.
12347 * #GThemedIcon contains a list of all of the icons present in an icon
12348 * theme, so that icons can be looked up quickly. #GThemedIcon does
12349 * not provide actual pixmaps for icons, just the icon names.
12350 * Ideally something like gtk_icon_theme_choose_icon() should be used to
12351 * resolve the list of names so that fallback icons work nicely with
12352 * themes that inherit other themes.
12358 * @title: TLS Overview
12359 * @short_description: TLS (aka SSL) support for GSocketConnection
12360 * @include: gio/gio.h
12362 * #GTlsConnection and related classes provide TLS (Transport Layer
12363 * Security, previously known as SSL, Secure Sockets Layer) support for
12364 * gio-based network streams.
12365 * In the simplest case, for a client connection, you can just set the
12366 * #GSocketClient:tls flag on a #GSocketClient, and then any
12367 * connections created by that client will have TLS negotiated
12368 * automatically, using appropriate default settings, and rejecting
12369 * any invalid or self-signed certificates (unless you change that
12370 * default by setting the #GSocketClient:tls-validation-flags
12371 * property). The returned object will be a #GTcpWrapperConnection,
12372 * which wraps the underlying #GTlsClientConnection.
12373 * For greater control, you can create your own #GTlsClientConnection,
12374 * wrapping a #GSocketConnection (or an arbitrary #GIOStream with
12375 * pollable input and output streams) and then connect to its signals,
12376 * such as #GTlsConnection::accept-certificate, before starting the
12378 * Server-side TLS is similar, using #GTlsServerConnection. At the
12379 * moment, there is no support for automatically wrapping server-side
12380 * connections in the way #GSocketClient does for client-side
12386 * SECTION:gtlsbacken:
12387 * @title: GTlsBackend
12388 * @short_description: TLS backend implementation
12389 * @include: gio/gio.h
12396 * SECTION:gtlsclientconnectio:
12397 * @short_description: TLS client-side connection
12398 * @include: gio/gio.h
12400 * #GTlsClientConnection is the client-side subclass of
12401 * #GTlsConnection, representing a client-side TLS connection.
12406 * SECTION:gtlsconnectio:
12407 * @short_description: TLS connection type
12408 * @include: gio/gio.h
12410 * #GTlsConnection is the base TLS connection class type, which wraps
12411 * a #GIOStream and provides TLS encryption on top of it. Its
12412 * subclasses, #GTlsClientConnection and #GTlsServerConnection,
12413 * implement client-side and server-side TLS, respectively.
12420 * SECTION:gtlsserverconnectio:
12421 * @short_description: TLS server-side connection
12422 * @include: gio/gio.h
12424 * #GTlsServerConnection is the server-side subclass of #GTlsConnection,
12425 * representing a server-side TLS connection.
12432 * SECTION:gunixinputstrea:
12433 * @short_description: Streaming input operations for UNIX file descriptors
12434 * @include: gio/gunixinputstream.h
12435 * @see_also: #GInputStream
12437 * #GUnixInputStream implements #GInputStream for reading from a
12438 * UNIX file descriptor, including asynchronous operations. The file
12439 * descriptor must be selectable, so it doesn't work with opened files.
12440 * Note that <filename><gio/gunixinputstream.h></filename> belongs
12441 * to the UNIX-specific GIO interfaces, thus you have to use the
12442 * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
12447 * SECTION:gunixmount:
12448 * @include: gio/gunixmounts.h
12449 * @short_description: UNIX mounts
12451 * Routines for managing mounted UNIX mount points and paths.
12452 * Note that <filename><gio/gunixmounts.h></filename> belongs to the
12453 * UNIX-specific GIO interfaces, thus you have to use the
12454 * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
12459 * SECTION:gunixoutputstrea:
12460 * @short_description: Streaming output operations for UNIX file descriptors
12461 * @include: gio/gunixoutputstream.h
12462 * @see_also: #GOutputStream
12464 * #GUnixOutputStream implements #GOutputStream for writing to a
12465 * UNIX file descriptor, including asynchronous operations. The file
12466 * descriptor must be selectable, so it doesn't work with opened files.
12467 * Note that <filename><gio/gunixoutputstream.h></filename> belongs
12468 * to the UNIX-specific GIO interfaces, thus you have to use the
12469 * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
12474 * SECTION:gunixsocketaddres:
12475 * @short_description: UNIX GSocketAddress
12476 * @include: gio/gunixsocketaddress.h
12478 * Support for UNIX-domain (also known as local) sockets.
12479 * UNIX domain sockets are generally visible in the filesystem.
12480 * However, some systems support abstract socket names which are not
12481 * visible in the filesystem and not affected by the filesystem
12482 * permissions, visibility, etc. Currently this is only supported
12483 * under Linux. If you attempt to use abstract sockets on other
12484 * systems, function calls may return %G_IO_ERROR_NOT_SUPPORTED
12485 * errors. You can use g_unix_socket_address_abstract_names_supported()
12486 * to see if abstract names are supported.
12487 * Note that <filename><gio/gunixsocketaddress.h></filename> belongs to
12488 * the UNIX-specific GIO interfaces, thus you have to use the
12489 * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
12495 * @short_description: Virtual File System
12496 * @include: gio/gio.h
12498 * Entry point for using GIO functionality.
12504 * @short_description: Volume management
12505 * @include: gio/gio.h
12507 * The #GVolume interface represents user-visible objects that can be
12508 * mounted. Note, when porting from GnomeVFS, #GVolume is the moral
12509 * equivalent of #GnomeVFSDrive.
12510 * Mounting a #GVolume instance is an asynchronous operation. For more
12511 * information about asynchronous operations, see #GAsyncReady and
12512 * #GSimpleAsyncReady. To mount a #GVolume, first call
12513 * g_volume_mount() with (at least) the #GVolume instance, optionally
12514 * a #GMountOperation object and a #GAsyncReadyCallback.
12515 * Typically, one will only want to pass %NULL for the
12516 * #GMountOperation if automounting all volumes when a desktop session
12517 * starts since it's not desirable to put up a lot of dialogs asking
12519 * The callback will be fired when the operation has resolved (either
12520 * with success or failure), and a #GAsyncReady structure will be
12521 * passed to the callback. That callback should then call
12522 * g_volume_mount_finish() with the #GVolume instance and the
12523 * #GAsyncReady data to see if the operation was completed
12524 * successfully. If an @error is present when g_volume_mount_finish()
12525 * is called, then it will be filled with any error information.
12526 * <para id="volume-identifier">
12527 * It is sometimes necessary to directly access the underlying
12528 * operating system object behind a volume (e.g. for passing a volume
12529 * to an application via the commandline). For this purpose, GIO
12530 * allows to obtain an 'identifier' for the volume. There can be
12531 * different kinds of identifiers, such as Hal UDIs, filesystem labels,
12532 * traditional Unix devices (e.g. <filename>/dev/sda2</filename>),
12533 * uuids. GIO uses predefind strings as names for the different kinds
12534 * #G_VOLUME_IDENTIFIER_KIND_LABEL, etc. Use g_volume_get_identifier()
12535 * to obtain an identifier for a volume.
12537 * Note that #G_VOLUME_IDENTIFIER_KIND_HAL_UDI will only be available
12538 * when the gvfs hal volume monitor is in use. Other volume monitors
12539 * will generally be able to provide the #G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE
12540 * identifier, which can be used to obtain a hal device by means of
12541 * libhal_manger_find_device_string_match().
12543 * Of identifiers: #G_VOLUME_IDENTIFIER_KIND_HAL_UDI,
12548 * SECTION:gvolumemonito:
12549 * @short_description: Volume Monitor
12550 * @include: gio/gio.h
12551 * @see_also: #GFileMonitor
12553 * #GVolumeMonitor is for listing the user interesting devices and volumes
12554 * on the computer. In other words, what a file selector or file manager
12555 * would show in a sidebar.
12556 * #GVolumeMonitor is not <link
12557 * linkend="g-main-context-push-thread-default">thread-default-context
12558 * aware</link>, and so should not be used other than from the main
12559 * thread, with no thread-default-context active.
12564 * SECTION:gwin32inputstrea:
12565 * @short_description: Streaming input operations for Windows file handles
12566 * @include: gio/gwin32inputstream.h
12567 * @see_also: #GInputStream
12569 * #GWin32InputStream implements #GInputStream for reading from a
12570 * Windows file handle.
12571 * Note that <filename><gio/gwin32inputstream.h></filename> belongs
12572 * to the Windows-specific GIO interfaces, thus you have to use the
12573 * <filename>gio-windows-2.0.pc</filename> pkg-config file when using it.
12578 * SECTION:gwin32outputstrea:
12579 * @short_description: Streaming output operations for Windows file handles
12580 * @include: gio/gwin32outputstream.h
12581 * @see_also: #GOutputStream
12583 * #GWin32OutputStream implements #GOutputStream for writing to a
12584 * Windows file handle.
12585 * Note that <filename><gio/gwin32outputstream.h></filename> belongs
12586 * to the Windows-specific GIO interfaces, thus you have to use the
12587 * <filename>gio-windows-2.0.pc</filename> pkg-config file when using it.
12592 * SECTION:gzcompresso:
12593 * @short_description: Zlib compressor
12594 * @include: gio/gio.h
12596 * #GZlibCompressor is an implementation of #GConverter that
12597 * compresses data using zlib.
12602 * SECTION:gzdecompresso:
12603 * @short_description: Zlib decompressor
12604 * @include: gio/gio.h
12606 * #GZlibDecompressor is an implementation of #GConverter that
12607 * decompresses data compressed with zlib.
12612 * The string info map is an efficient data structure designed to b:
12614 * used with a small set of items. It is used by GSettings schemas for
12616 * 1) Implement <choices> with a list of valid strings
12617 * 2) Implement <alias> by mapping one string to another
12618 * 3) Implement enumerated types by mapping strings to integer values
12620 * The map is made out of an array of uint32s. Each entry in the array
12621 * is an integer value, followed by a specially formatted string value:
12622 * The string starts with the byte 0xff or 0xfe, followed by the
12623 * content of the string, followed by a nul byte, followed by
12624 * additional nul bytes for padding, followed by a 0xff byte.
12625 * Padding is added so that the entire formatted string takes up a
12626 * multiple of 4 bytes, and not less than 8 bytes. The requirement
12627 * for a string to take up 8 bytes is so that the scanner doesn't lose
12628 * synch and mistake a string for an integer value.
12629 * The first byte of the formatted string depends on if the integer is
12630 * an enum value (0xff) or an alias (0xfe). If it is an alias then the
12631 * number refers to the word offset within the info map at which the
12632 * integer corresponding to the "target" value is stored.
12633 * For example, consider the case of the string info map representing an
12634 * enumerated type of 'foo' (value 1) and 'bar' (value 2) and 'baz'
12635 * (alias for 'bar'). Note that string info maps are always little
12637 * x01 x00 x00 x00 xff 'f' 'o' 'o' x00 x00 x00 xff x02 x00 x00 x00
12638 * xff 'b' 'a' 'r' x00 x00 x00 xff x03 x00 x00 x00 xfe 'b' 'a' 'z'
12640 * The operations that someone may want to perform with the map:
12641 * - lookup if a string is valid (and not an alias)
12642 * - lookup the integer value for a enum 'nick'
12643 * - lookup the integer value for the target of an alias
12644 * - lookup an alias and convert it to its target string
12645 * - lookup the enum nick for a given value
12646 * In order to lookup if a string is valid, it is padded on either side
12647 * (as described) and scanned for in the array. For example, you might
12649 * xff 'f' 'o' 'o' x00 x00 x00 xff
12650 * In order to lookup the integer value for a nick, the string is padded
12651 * on either side and scanned for in the array, as above. Instead of
12652 * merely succeeding, we look at the integer value to the left of the
12653 * match. This is the enum value.
12654 * In order to lookup an alias and convert it to its target enum value,
12655 * the string is padded on either side (as described, with 0xfe) and
12656 * scanned for. For example, you might look for "baz":
12657 * xfe 'b' 'a' 'z' x00 x00 x00 xff
12658 * The integer immediately preceeding the match then contains the offset
12659 * of the integer value of the target. In our example, that's '3'.
12660 * This index is dereferenced to find the enum value of '2'.
12661 * To convert the alias to its target string, 5 bytes just need to be
12662 * added past the start of the integer value to find the start of the
12664 * To lookup the enum nick for a given value, the value is searched for
12665 * in the array. To ensure that the value isn't matching the inside of a
12666 * string, we must check that it is either the first item in the array or
12667 * immediately preceeded by the byte 0xff. It must also be immediately
12668 * followed by the byte 0xff.
12669 * Because strings always take up a minimum of 2 words, because 0xff or
12670 * 0xfe never appear inside of a utf-8 string and because no two integer
12671 * values ever appear in sequence, the only way we can have the
12673 * xff __ __ __ __ xff (or 0xfe)
12674 * is in the event of an integer nested between two strings.
12675 * For implementation simplicity/efficiency, strings may not be more
12676 * the value of each choice is set to zero and ignored.
12678 * Than 65 characters in length (ie: 17 32bit words after padding).
12679 * In the event that we are doing <choices> (ie: not an enum type) then
12684 * g_action_activate:
12685 * @action: a #GAction
12686 * @parameter: (allow-none): the parameter to the activation
12688 * Activates the action.
12689 * the parameter type given at construction time). If the parameter
12690 * type was %NULL then @parameter must also be %NULL.
12697 * g_action_get_enabled:
12698 * @action: a #GAction
12700 * Checks if @action is currently enabled.
12701 * An action must be enabled in order to be activated or in order to
12702 * have its state changed from outside callers.
12704 * Returns: whether the action is enabled
12710 * g_action_get_name:
12711 * @action: a #GAction
12713 * Queries the name of @action.
12715 * Returns: the name of the action
12721 * g_action_get_parameter_type:
12722 * @action: a #GAction
12724 * Queries the type of the parameter that must be given when activating
12725 * When activating the action using g_action_activate(), the #GVariant
12726 * given to that function must be of the type returned by this function.
12727 * In the case that this function returns %NULL, you must not give any
12728 * #GVariant, but %NULL instead.
12730 * Returns: (allow-none): the parameter type
12736 * g_action_get_state:
12737 * @action: a #GAction
12739 * Queries the current state of @action.
12740 * If the action is not stateful then %NULL will be returned. If the
12741 * action is stateful then the type of the return value is the type
12742 * given by g_action_get_state_type().
12743 * The return value (if non-%NULL) should be freed with
12744 * g_variant_unref() when it is no longer required.
12746 * Returns: (transfer full): the current state of the action
12752 * g_action_get_state_hint:
12753 * @action: a #GAction
12755 * Requests a hint about the valid range of values for the state of
12756 * If %NULL is returned it either means that the action is not stateful
12757 * or that there is no hint about the valid range of values for the
12758 * state of the action.
12759 * If a #GVariant array is returned then each item in the array is a
12760 * returned then the tuple specifies the inclusive lower and upper bound
12761 * of valid values for the state.
12762 * In any case, the information is merely a hint. It may be possible to
12763 * have a state value outside of the hinted range and setting a value
12764 * within the range may fail.
12765 * The return value (if non-%NULL) should be freed with
12766 * g_variant_unref() when it is no longer required.
12768 * Possible value for the state. if a #gvariant pair (ie: two-tuple) is
12769 * Returns: (transfer full): the state range hint
12775 * g_action_get_state_type:
12776 * @action: a #GAction
12778 * Queries the type of the state of @action.
12779 * g_action_new_stateful()) then this function returns the #GVariantType
12780 * of the state. This is the type of the initial value given as the
12781 * state. All calls to g_action_set_state() must give a #GVariant of
12782 * this type and g_action_get_state() will return a #GVariant of the
12784 * this function will return %NULL. In that case, g_action_get_state()
12785 * will return %NULL and you must not call g_action_set_state().
12787 * If the action is stateful (ie: was created with
12788 * If the action is not stateful (ie: created with g_action_new()) then
12789 * Returns: (allow-none): the state type, if the action is stateful
12795 * g_action_group_action_added:
12796 * @action_group: a #GActionGroup
12797 * @action_name: the name of an action in the group
12799 * Emits the #GActionGroup::action-added signal on @action_group.
12800 * This function should only be called by #GActionGroup implementations.
12807 * g_action_group_action_enabled_changed:
12808 * @action_group: a #GActionGroup
12809 * @action_name: the name of an action in the group
12810 * @enabled: whether or not the action is now enabled
12812 * Emits the #GActionGroup::action-enabled-changed signal on @action_group.
12813 * This function should only be called by #GActionGroup implementations.
12820 * g_action_group_action_removed:
12821 * @action_group: a #GActionGroup
12822 * @action_name: the name of an action in the group
12824 * Emits the #GActionGroup::action-removed signal on @action_group.
12825 * This function should only be called by #GActionGroup implementations.
12832 * g_action_group_action_state_changed:
12833 * @action_group: a #GActionGroup
12834 * @action_name: the name of an action in the group
12835 * @state: the new state of the named action
12837 * Emits the #GActionGroup::action-state-changed signal on @action_group.
12838 * This function should only be called by #GActionGroup implementations.
12845 * g_action_group_activate_action:
12846 * @action_group: a #GActionGroup
12847 * @action_name: the name of the action to activate
12848 * @parameter: (allow-none): parameters to the activation
12850 * Activate the named action within @action_group.
12851 * If the action is expecting a parameter, then the correct type of
12852 * parameter must be given as @parameter. If the action is expecting no
12853 * parameters then @parameter must be %NULL. See
12854 * g_action_group_get_parameter_type().
12861 * g_action_group_change_action_state:
12862 * @action_group: a #GActionGroup
12863 * @action_name: the name of the action to request the change on
12864 * @value: the new state
12866 * Request for the state of the named action within @action_group to be
12867 * changed to @value.
12868 * The action must be stateful and @value must be of the correct type.
12869 * See g_action_group_get_state_type().
12870 * This call merely requests a change. The action may refuse to change
12871 * its state or may change its state to something other than @value.
12872 * See g_action_group_get_state_hint().
12873 * If the @value GVariant is floating, it is consumed.
12880 * g_action_group_get_action_enabled:
12881 * @action_group: a #GActionGroup
12882 * @action_name: the name of the action to query
12884 * Checks if the named action within @action_group is currently enabled.
12885 * An action must be enabled in order to be activated or in order to
12886 * have its state changed from outside callers.
12888 * Returns: whether or not the action is currently enabled
12894 * g_action_group_get_action_parameter_type:
12895 * @action_group: a #GActionGroup
12896 * @action_name: the name of the action to query
12898 * Queries the type of the parameter that must be given when activating
12899 * the named action within @action_group.
12900 * When activating the action using g_action_group_activate(), the
12901 * #GVariant given to that function must be of the type returned by this
12903 * In the case that this function returns %NULL, you must not give any
12904 * #GVariant, but %NULL instead.
12905 * The parameter type of a particular action will never change but it is
12906 * possible for an action to be removed and for a new action to be added
12907 * with the same name but a different parameter type.
12909 * Returns: the parameter type
12915 * g_action_group_get_action_state:
12916 * @action_group: a #GActionGroup
12917 * @action_name: the name of the action to query
12919 * Queries the current state of the named action within @action_group.
12920 * If the action is not stateful then %NULL will be returned. If the
12921 * action is stateful then the type of the return value is the type
12922 * given by g_action_group_get_state_type().
12923 * The return value (if non-%NULL) should be freed with
12924 * g_variant_unref() when it is no longer required.
12926 * Returns: (allow-none): the current state of the action
12932 * g_action_group_get_action_state_hint:
12933 * @action_group: a #GActionGroup
12934 * @action_name: the name of the action to query
12936 * Requests a hint about the valid range of values for the state of the
12937 * named action within @action_group.
12938 * If %NULL is returned it either means that the action is not stateful
12939 * or that there is no hint about the valid range of values for the
12940 * state of the action.
12941 * If a #GVariant array is returned then each item in the array is a
12942 * returned then the tuple specifies the inclusive lower and upper bound
12943 * of valid values for the state.
12944 * In any case, the information is merely a hint. It may be possible to
12945 * have a state value outside of the hinted range and setting a value
12946 * within the range may fail.
12947 * The return value (if non-%NULL) should be freed with
12948 * g_variant_unref() when it is no longer required.
12950 * Possible value for the state. if a #gvariant pair (ie: two-tuple) is
12951 * Returns: (transfer full): the state range hint
12957 * g_action_group_get_action_state_type:
12958 * @action_group: a #GActionGroup
12959 * @action_name: the name of the action to query
12961 * Queries the type of the state of the named action within
12962 * If the action is stateful then this function returns the
12963 * #GVariantType of the state. All calls to g_action_group_set_state()
12964 * must give a #GVariant of this type and g_action_group_get_state()
12965 * will return a #GVariant of the same type.
12966 * If the action is not stateful then this function will return %NULL.
12967 * In that case, g_action_group_get_state() will return %NULL and you
12968 * must not call g_action_group_set_state().
12969 * The state type of a particular action will never change but it is
12970 * possible for an action to be removed and for a new action to be added
12971 * with the same name but a different state type.
12973 * Returns: (transfer full): the state type, if the action is stateful
12979 * g_action_group_has_action:
12980 * @action_group: a #GActionGroup
12981 * @action_name: the name of the action to check for
12983 * Checks if the named action exists within @action_group.
12985 * Returns: whether the named action exists
12991 * g_action_group_list_actions:
12992 * @action_group: a #GActionGroup
12994 * Lists the actions contained within @action_group.
12995 * The caller is responsible for freeing the list with g_strfreev() when
12996 * it is no longer required.
12997 * actions in the groupb
12999 * Returns: (transfer full): a %NULL-terminated array of the names of the
13005 * g_action_set_state:
13006 * @action: a #GAction
13007 * @value: the new state
13009 * Request for the state of @action to be changed to @value.
13010 * The action must be stateful and @value must be of the correct type.
13011 * See g_action_get_state_type().
13012 * This call merely requests a change. The action may refuse to change
13013 * its state or may change its state to something other than @value.
13014 * See g_action_get_state_hint().
13015 * If the @value GVariant is floating, it is consumed.
13023 * @size: number of bytes to allocate.
13025 * Allocates @size bytes on the stack; these bytes will be freed when the current
13026 * stack frame is cleaned up. This macro essentially just wraps the alloca()
13027 * function present on most UNIX variants.
13028 * Thus it provides the same advantages and pitfalls as alloca():
13030 * <varlistentry><term></term><listitem><para>
13031 * + alloca() is very fast, as on most systems it's implemented by just adjusting
13032 * the stack pointer register.
13033 * </para></listitem></varlistentry>
13034 * <varlistentry><term></term><listitem><para>
13035 * + It doesn't cause any memory fragmentation, within its scope, separate alloca()
13036 * blocks just build up and are released together at function end.
13037 * </para></listitem></varlistentry>
13038 * <varlistentry><term></term><listitem><para>
13039 * - Allocation sizes have to fit into the current stack frame. For instance in a
13040 * threaded environment on Linux, the per-thread stack size is limited to 2 Megabytes,
13041 * so be sparse with alloca() uses.
13042 * </para></listitem></varlistentry>
13043 * <varlistentry><term></term><listitem><para>
13044 * - Allocation failure due to insufficient stack space is not indicated with a %NULL
13045 * return like e.g. with malloc(). Instead, most systems probably handle it the same
13046 * way as out of stack space situations from infinite function recursion, i.e.
13047 * with a segmentation fault.
13048 * </para></listitem></varlistentry>
13049 * <varlistentry><term></term><listitem><para>
13050 * - Special care has to be taken when mixing alloca() with GNU C variable sized arrays.
13051 * Stack space allocated with alloca() in the same scope as a variable sized array
13052 * will be freed together with the variable sized array upon exit of that scope, and
13053 * not upon exit of the enclosing function scope.
13054 * </para></listitem></varlistentry>
13057 * Returns: space for @size bytes, allocated on the stack
13062 * g_app_info_add_supports_type:
13063 * @appinfo: a #GAppInfo.
13064 * @content_type: a string.
13065 * @error: a #GError.
13067 * Adds a content type to the application information to indicate the
13068 * application is capable of opening files with the given content type.
13070 * Returns: %TRUE on success, %FALSE on error.
13075 * g_app_info_can_delete:
13076 * @appinfo: a #GAppInfo
13078 * Obtains the information whether the #GAppInfo can be deleted.
13079 * See g_app_info_delete().
13081 * Returns: %TRUE if @appinfo can be deleted
13087 * g_app_info_can_remove_supports_type:
13088 * @appinfo: a #GAppInfo.
13090 * Checks if a supported content type can be removed from an application.
13091 * content types from a given @appinfo, %FALSE if not.
13093 * Returns: %TRUE if it is possible to remove supported
13098 * g_app_info_create_from_commandline:
13099 * @commandline: the commandline to use
13100 * @application_name: (allow-none): the application name, or %NULL to use @commandline
13101 * @flags: flags that can specify details of the created #GAppInfo
13102 * @error: a #GError location to store the error occuring, %NULL to ignore.
13104 * Creates a new #GAppInfo from the given information.
13106 * Returns: (transfer full): new #GAppInfo for given command.
13111 * g_app_info_delete:
13112 * @appinfo: a #GAppInfo
13114 * Tries to delete a #GAppInfo.
13115 * On some platforms, there may be a difference between user-defined
13116 * #GAppInfo<!-- -->s which can be deleted, and system-wide ones which
13117 * cannot. See g_app_info_can_delete().
13119 * Virtual: do_delete
13120 * Returns: %TRUE if @appinfo has been deleted
13127 * @appinfo: a #GAppInfo.
13129 * Creates a duplicate of a #GAppInfo.
13131 * Returns: (transfer full): a duplicate of @appinfo.
13136 * g_app_info_equal:
13137 * @appinfo1: the first #GAppInfo.
13138 * @appinfo2: the second #GAppInfo.
13140 * Checks if two #GAppInfo<!-- -->s are equal.
13142 * Returns: %TRUE if @appinfo1 is equal to @appinfo2. %FALSE otherwise.
13147 * g_app_info_get_all:
13149 * Gets a list of all of the applications currently registered
13151 * For desktop files, this includes applications that have
13152 * <literal>NoDisplay=true</literal> set or are excluded from
13153 * display by means of <literal>OnlyShowIn</literal> or
13154 * <literal>NotShowIn</literal>. See g_app_info_should_show().
13155 * The returned list does not include applications which have
13156 * the <literal>Hidden</literal> key set.
13158 * Returns: (element-type GAppInfo) (transfer full): a newly allocated #GList of references to #GAppInfo<!---->s.
13163 * g_app_info_get_all_for_type:
13164 * @content_type: the content type to find a #GAppInfo for
13166 * Gets a list of all #GAppInfos for a given content type.
13167 * for given @content_type or %NULL on error.
13169 * Returns: (element-type GAppInfo) (transfer full): #GList of #GAppInfos
13174 * g_app_info_get_commandline:
13175 * @appinfo: a #GAppInfo
13177 * Gets the commandline with which the application will be
13179 * or %NULL if this information is not available
13181 * Returns: a string containing the @appinfo's commandline,
13187 * g_app_info_get_default_for_type:
13188 * @content_type: the content type to find a #GAppInfo for
13189 * @must_support_uris: if %TRUE, the #GAppInfo is expected to support URIs
13191 * Gets the #GAppInfo that corresponds to a given content type.
13194 * Returns: (transfer full): #GAppInfo for given @content_type or
13199 * g_app_info_get_default_for_uri_scheme:
13200 * @uri_scheme: a string containing a URI scheme.
13202 * Gets the default application for launching applications
13203 * using this URI scheme. A URI scheme is the initial part
13204 * of the URI, up to but not including the ':', e.g. "http",
13207 * Returns: (transfer full): #GAppInfo for given @uri_scheme or %NULL on error.
13212 * g_app_info_get_description:
13213 * @appinfo: a #GAppInfo.
13215 * Gets a human-readable description of an installed application.
13216 * application @appinfo, or %NULL if none.
13218 * Returns: a string containing a description of the
13223 * g_app_info_get_display_name:
13224 * @appinfo: a #GAppInfo.
13226 * Gets the display name of the application. The display name is often more
13227 * descriptive to the user than the name itself.
13228 * no display name is available.
13230 * Returns: the display name of the application for @appinfo, or the name if
13236 * g_app_info_get_executable:
13237 * @appinfo: a #GAppInfo
13239 * Gets the executable's name for the installed application.
13242 * Returns: a string containing the @appinfo's application
13247 * g_app_info_get_fallback_for_type:
13248 * @content_type: the content type to find a #GAppInfo for
13250 * Gets a list of fallback #GAppInfos for a given content type, i.e.
13251 * those applications which claim to support the given content type
13252 * by MIME type subclassing and not directly.
13253 * for given @content_type or %NULL on error.
13255 * Returns: (element-type GAppInfo) (transfer full): #GList of #GAppInfos
13261 * g_app_info_get_icon:
13262 * @appinfo: a #GAppInfo.
13264 * Gets the icon for the application.
13266 * Returns: (transfer none): the default #GIcon for @appinfo.
13271 * g_app_info_get_id:
13272 * @appinfo: a #GAppInfo.
13274 * Gets the ID of an application. An id is a string that
13275 * identifies the application. The exact format of the id is
13276 * platform dependent. For instance, on Unix this is the
13277 * desktop file id from the xdg menu specification.
13278 * Note that the returned ID may be %NULL, depending on how
13279 * the @appinfo has been constructed.
13281 * Returns: a string containing the application's ID.
13286 * g_app_info_get_name:
13287 * @appinfo: a #GAppInfo.
13289 * Gets the installed name of the application.
13291 * Returns: the name of the application for @appinfo.
13296 * g_app_info_get_recommended_for_type:
13297 * @content_type: the content type to find a #GAppInfo for
13299 * Gets a list of recommended #GAppInfos for a given content type, i.e.
13300 * those applications which claim to support the given content type exactly,
13301 * and not by MIME type subclassing.
13302 * Note that the first application of the list is the last used one, i.e.
13303 * the last one for which #g_app_info_set_as_last_used_for_type has been
13305 * for given @content_type or %NULL on error.
13307 * Returns: (element-type GAppInfo) (transfer full): #GList of #GAppInfos
13313 * g_app_info_launch:
13314 * @appinfo: a #GAppInfo
13315 * @files: (element-type GFile): a #GList of #GFile objects
13316 * @launch_context: (allow-none): a #GAppLaunchContext or %NULL
13317 * @error: a #GError
13319 * Launches the application. Passes @files to the launched application
13320 * as arguments, using the optional @launch_context to get information
13321 * about the details of the launcher (like what screen it is on).
13322 * On error, @error will be set accordingly.
13323 * To launch the application without arguments pass a %NULL @files list.
13324 * Note that even if the launch is successful the application launched
13325 * can fail to start if it runs into problems during startup. There is
13326 * no way to detect this.
13327 * Some URIs can be changed when passed through a GFile (for instance
13328 * unsupported uris with strange formats like mailto:), so if you have
13329 * a textual uri you want to pass in as argument, consider using
13330 * g_app_info_launch_uris() instead.
13331 * On UNIX, this function sets the <envar>GIO_LAUNCHED_DESKTOP_FILE</envar>
13332 * environment variable with the path of the launched desktop file and
13333 * <envar>GIO_LAUNCHED_DESKTOP_FILE_PID</envar> to the process
13334 * id of the launched process. This can be used to ignore
13335 * <envar>GIO_LAUNCHED_DESKTOP_FILE</envar>, should it be inherited
13336 * by further processes. The <envar>DISPLAY</envar> and
13337 * <envar>DESKTOP_STARTUP_ID</envar> environment variables are also
13338 * set, based on information provided in @launch_context.
13340 * Returns: %TRUE on successful launch, %FALSE otherwise.
13345 * g_app_info_launch_default_for_uri:
13346 * @uri: the uri to show
13347 * @launch_context: (allow-none): an optional #GAppLaunchContext.
13348 * @error: a #GError.
13350 * Utility function that launches the default application
13351 * registered to handle the specified uri. Synchronous I/O
13352 * is done on the uri to detect the type of the file if
13355 * Returns: %TRUE on success, %FALSE on error.
13360 * g_app_info_launch_uris:
13361 * @appinfo: a #GAppInfo
13362 * @uris: (element-type utf8): a #GList containing URIs to launch.
13363 * @launch_context: (allow-none): a #GAppLaunchContext or %NULL
13364 * @error: a #GError
13366 * Launches the application. Passes @uris to the launched application
13367 * as arguments, using the optional @launch_context to get information
13368 * about the details of the launcher (like what screen it is on).
13369 * On error, @error will be set accordingly.
13370 * To lauch the application without arguments pass a %NULL @uris list.
13371 * Note that even if the launch is successful the application launched
13372 * can fail to start if it runs into problems during startup. There is
13373 * no way to detect this.
13375 * Returns: %TRUE on successful launch, %FALSE otherwise.
13380 * g_app_info_remove_supports_type:
13381 * @appinfo: a #GAppInfo.
13382 * @content_type: a string.
13383 * @error: a #GError.
13385 * Removes a supported type from an application, if possible.
13387 * Returns: %TRUE on success, %FALSE on error.
13392 * g_app_info_reset_type_associations:
13393 * @content_type: a content type
13395 * Removes all changes to the type associations done by
13396 * g_app_info_set_as_default_for_type(),
13397 * g_app_info_set_as_default_for_extension(),
13398 * g_app_info_add_supports_type() or g_app_info_remove_supports_type().
13405 * g_app_info_set_as_default_for_extension:
13406 * @appinfo: a #GAppInfo.
13407 * @extension: a string containing the file extension (without the dot).
13408 * @error: a #GError.
13410 * Sets the application as the default handler for the given file extension.
13412 * Returns: %TRUE on success, %FALSE on error.
13417 * g_app_info_set_as_default_for_type:
13418 * @appinfo: a #GAppInfo.
13419 * @content_type: the content type.
13420 * @error: a #GError.
13422 * Sets the application as the default handler for a given type.
13424 * Returns: %TRUE on success, %FALSE on error.
13429 * g_app_info_set_as_last_used_for_type:
13430 * @appinfo: a #GAppInfo.
13431 * @content_type: the content type.
13432 * @error: a #GError.
13434 * Sets the application as the last used application for a given type.
13435 * This will make the application appear as first in the list returned by
13436 * #g_app_info_get_recommended_for_type, regardless of the default application
13437 * for that content type.
13439 * Returns: %TRUE on success, %FALSE on error.
13444 * g_app_info_should_show:
13445 * @appinfo: a #GAppInfo.
13447 * Checks if the application info should be shown in menus that
13448 * list available applications.
13450 * Returns: %TRUE if the @appinfo should be shown, %FALSE otherwise.
13455 * g_app_info_supports_files:
13456 * @appinfo: a #GAppInfo.
13458 * Checks if the application accepts files as arguments.
13460 * Returns: %TRUE if the @appinfo supports files.
13465 * g_app_info_supports_uris:
13466 * @appinfo: a #GAppInfo.
13468 * Checks if the application supports reading files and directories from URIs.
13470 * Returns: %TRUE if the @appinfo supports URIs.
13475 * g_app_launch_context_get_display:
13476 * @context: a #GAppLaunchContext
13477 * @info: a #GAppInfo
13478 * @files: (element-type GFile): a #GList of #GFile objects
13480 * Gets the display string for the @context. This is used to ensure new
13481 * applications are started on the same display as the launching
13482 * application, by setting the <envar>DISPLAY</envar> environment variable.
13484 * Returns: a display string for the display.
13489 * g_app_launch_context_get_startup_notify_id:
13490 * @context: a #GAppLaunchContext
13491 * @info: a #GAppInfo
13492 * @files: (element-type GFile): a #GList of of #GFile objects
13494 * Initiates startup notification for the application and returns the
13495 * <envar>DESKTOP_STARTUP_ID</envar> for the launched operation,
13497 * Startup notification IDs are defined in the <ulink
13498 * url="http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt">
13499 * FreeDesktop.Org Startup Notifications standard</ulink>.
13502 * Returns: a startup notification ID for the application, or %NULL if
13507 * g_app_launch_context_launch_failed:
13508 * @context: a #GAppLaunchContext.
13509 * @startup_notify_id: the startup notification id that was returned by g_app_launch_context_get_startup_notify_id().
13511 * Called when an application has failed to launch, so that it can cancel
13512 * the application startup notification started in g_app_launch_context_get_startup_notify_id().
13517 * g_app_launch_context_new:
13519 * Creates a new application launch context. This is not normally used,
13520 * instead you instantiate a subclass of this, such as #GdkAppLaunchContext.
13522 * Returns: a #GAppLaunchContext.
13527 * g_application_activate:
13528 * @application: a #GApplication
13530 * Activates the application.
13531 * In essence, this results in the #GApplication::activate() signal being
13532 * emitted in the primary instance.
13533 * The application must be registered before calling this function.
13540 * g_application_command_line_get_arguments:
13541 * @cmdline: a #GApplicationCommandLine
13542 * @argc: (out): the length of the arguments array, or %NULL
13544 * Gets the list of arguments that was passed on the command line.
13545 * The strings in the array may contain non-utf8 data.
13546 * The return value is %NULL-terminated and should be freed using
13548 * containing the arguments (the argv)
13550 * Returns: (array length=argc) (transfer full): the string array
13556 * g_application_command_line_get_cwd:
13557 * @cmdline: a #GApplicationCommandLine
13559 * Gets the working directory of the command line invocation. The
13560 * string may contain non-utf8 data.
13561 * It is possible that the remote application did not send a working
13562 * directory, so this may be %NULL.
13563 * The return value should not be modified or freed and is valid for as
13564 * long as @cmdline exists.
13566 * Returns: the current directory, or %NULL
13572 * g_application_command_line_get_environ:
13573 * @cmdline: a #GApplicationCommandLine
13575 * Gets the contents of the 'environ' variable of the command line
13576 * invocation, as would be returned by g_get_environ(). The strings may
13577 * contain non-utf8 data.
13578 * The remote application usually does not send an environment. Use
13579 * %G_APPLICATION_SEND_ENVIRONMENT to affect that. Even with this flag
13580 * set it is possible that the environment is still not available (due
13581 * to invocation messages from other applications).
13582 * The return value should not be modified or freed and is valid for as
13583 * long as @cmdline exists.
13584 * strings, or %NULL if they were not sent
13586 * Returns: (array zero-terminated=1) (transfer none): the environment
13592 * g_application_command_line_get_exit_status:
13593 * @cmdline: a #GApplicationCommandLine
13595 * Gets the exit status of @cmdline. See
13596 * g_application_command_line_set_exit_status() for more information.
13598 * Returns: the exit status
13604 * g_application_command_line_get_is_remote:
13605 * @cmdline: a #GApplicationCommandLine
13607 * Determines if @cmdline represents a remote invocation.
13609 * Returns: %TRUE if the invocation was remote
13615 * g_application_command_line_get_platform_data:
13616 * @cmdline: #GApplicationCommandLine
13618 * Gets the platform data associated with the invocation of @cmdline.
13619 * This is a #GVariant dictionary containing information about the
13620 * context in which the invocation occured. It typically contains
13621 * information like the current working directory and the startup
13623 * For local invocation, it will be %NULL.
13625 * Returns: the platform data, or %NULL
13631 * g_application_command_line_getenv:
13632 * @cmdline: a #GApplicationCommandLine
13633 * @name: the environment variable to get
13635 * Gets the value of a particular environment variable of the command
13636 * line invocation, as would be returned by g_getenv(). The strings may
13637 * contain non-utf8 data.
13638 * The remote application usually does not send an environment. Use
13639 * %G_APPLICATION_SEND_ENVIRONMENT to affect that. Even with this flag
13640 * set it is possible that the environment is still not available (due
13641 * to invocation messages from other applications).
13642 * The return value should not be modified or freed and is valid for as
13643 * long as @cmdline exists.
13645 * Returns: the value of the variable, or %NULL if unset or unsent
13651 * g_application_command_line_print:
13652 * @cmdline: a #GApplicationCommandLine
13653 * @format: a printf-style format string
13654 * @...: arguments, as per @format
13656 * Formats a message and prints it using the stdout print handler in the
13657 * invoking process.
13658 * If @cmdline is a local invocation then this is exactly equivalent to
13659 * g_print(). If @cmdline is remote then this is equivalent to calling
13660 * g_print() in the invoking process.
13667 * g_application_command_line_printerr:
13668 * @cmdline: a #GApplicationCommandLine
13669 * @format: a printf-style format string
13670 * @...: arguments, as per @format
13672 * Formats a message and prints it using the stderr print handler in the
13673 * invoking process.
13674 * If @cmdline is a local invocation then this is exactly equivalent to
13675 * g_printerr(). If @cmdline is remote then this is equivalent to
13676 * calling g_printerr() in the invoking process.
13683 * g_application_command_line_set_exit_status:
13684 * @cmdline: a #GApplicationCommandLine
13685 * @exit_status: the exit status
13687 * Sets the exit status that will be used when the invoking process
13689 * The return value of the #GApplication::command-line signal is
13690 * passed to this function when the handler returns. This is the usual
13691 * way of setting the exit status.
13692 * In the event that you want the remote invocation to continue running
13693 * and want to decide on the exit status in the future, you can use this
13694 * call. For the case of a remote invocation, the remote process will
13695 * typically exit when the last reference is dropped on @cmdline. The
13696 * exit status of the remote process will be equal to the last value
13697 * that was set with this function.
13698 * In the case that the commandline invocation is local, the situation
13699 * is slightly more complicated. If the commandline invocation results
13700 * increased to a non-zero value) then the application is considered to
13701 * have been 'successful' in a certain sense, and the exit status is
13702 * always zero. If the application use count is zero, though, the exit
13703 * status of the local #GApplicationCommandLine is used.
13705 * In the mainloop running (ie: because the use-count of the application
13711 * g_application_get_application_id:
13712 * @application: a #GApplication
13713 * @returns: the identifier for @application, owned by @application
13715 * Gets the unique identifier for @application.
13722 * g_application_get_flags:
13723 * @application: a #GApplication
13724 * @returns: the flags for @application
13726 * Gets the flags for @application.
13727 * See #GApplicationFlags.
13734 * g_application_get_inactivity_timeout:
13735 * @application: a #GApplication
13737 * Gets the current inactivity timeout for the application.
13738 * This is the amount of time (in milliseconds) after the last call to
13739 * g_application_release() before the application stops running.
13741 * Returns: the timeout, in milliseconds
13747 * g_application_get_is_registered:
13748 * @application: a #GApplication
13749 * @returns: %TRUE if @application is registered
13751 * Checks if @application is registered.
13752 * An application is registered if g_application_register() has been
13753 * successfully called.
13760 * g_application_get_is_remote:
13761 * @application: a #GApplication
13762 * @returns: %TRUE if @application is remote
13764 * Checks if @application is remote.
13765 * If @application is remote then it means that another instance of
13766 * application already exists (the 'primary' instance). Calls to
13767 * perform actions on @application will result in the actions being
13768 * performed by the primary instance.
13769 * The value of this property can not be accessed before
13770 * g_application_register() has been called. See
13771 * g_application_get_is_registered().
13778 * g_application_hold:
13779 * @application: a #GApplication
13781 * Increases the use count of @application.
13782 * Use this function to indicate that the application has a reason to
13783 * continue to run. For example, g_application_hold() is called by GTK+
13784 * when a toplevel window is on the screen.
13785 * To cancel the hold, call g_application_release().
13790 * g_application_id_is_valid:
13791 * @application_id: a potential application identifier
13792 * @returns: %TRUE if @application_id is valid
13794 * Checks if @application_id is a valid application identifier.
13795 * A valid ID is required for calls to g_application_new() and
13796 * g_application_set_application_id().
13797 * For convenience, the restrictions on application identifiers are
13800 * <listitem>Application identifiers must contain only the ASCII characters "[A-Z][a-z][0-9]_-" and must not begin with a digit.</listitem>
13801 * <listitem>Application identifiers must contain at least one '.' (period) character (and thus at least two elements).</listitem>
13802 * <listitem>Application identifiers must not begin with a '.' (period) character.</listitem>
13803 * <listitem>Application identifiers must not contain consecutive '.' (period) characters.</listitem>
13804 * <listitem>Application identifiers must not exceed 255 characters.</listitem>
13810 * g_application_new:
13811 * @application_id: the application id
13812 * @flags: the application flags
13813 * @returns: a new #GApplication instance
13815 * Creates a new #GApplication instance.
13816 * This function calls g_type_init() for you.
13817 * The application id must be valid. See g_application_id_is_valid().
13822 * g_application_open:
13823 * @application: a #GApplication
13824 * @files: (array length=n_files): an array of #GFiles to open
13825 * @n_files: the length of the @files array
13826 * @hint: a hint (or ""), but never %NULL
13828 * Opens the given files.
13829 * In essence, this results in the #GApplication::open signal being emitted
13830 * in the primary instance.
13831 * intended to be used by applications that have multiple modes for
13832 * for this functionality, you should use "".
13833 * The application must be registered before calling this function
13834 * and it must have the %G_APPLICATION_HANDLES_OPEN flag set.
13836 * Opening files (eg: "view" vs "edit", etc). Unless you have a need
13842 * g_application_register:
13843 * @application: a #GApplication
13844 * @cancellable: a #GCancellable, or %NULL
13845 * @error: a pointer to a NULL #GError, or %NULL
13846 * @returns: %TRUE if registration succeeded
13848 * Attempts registration of the application.
13849 * This is the point at which the application discovers if it is the
13850 * primary instance or merely acting as a remote for an already-existing
13851 * primary instance. This is implemented by attempting to acquire the
13852 * application identifier as a uniue bus name on the session bus using
13854 * Due to the internal architecture of GDBus, method calls can be
13855 * dispatched at any time (even if a main loop is not running). For
13856 * this reason, you must ensure that any object paths that you wish to
13857 * register are registered before calling this function.
13858 * If the application has already been registered then %TRUE is
13859 * returned with no work performed.
13860 * The #GApplication::startup signal is emitted if registration succeeds
13861 * and @application is the primary instance.
13862 * In the event of an error (such as @cancellable being cancelled, or a
13863 * failure to connect to the session bus), %FALSE is returned and @error
13864 * is set appropriately.
13865 * instance is or is not the primary instance of the application. See
13866 * g_application_get_is_remote() for that.
13868 * Note: the return value of this function is not an indicator that this
13874 * g_application_release:
13875 * @application: a #GApplication
13877 * Decrease the use count of @application.
13878 * When the use count reaches zero, the application will stop running.
13879 * Never call this function except to cancel the effect of a previous
13880 * call to g_application_hold().
13885 * g_application_run:
13886 * @application: a #GApplication
13887 * @argc: the argc from main()
13888 * @argv: (array length=argc): the argv from main()
13889 * @returns: the exit status
13891 * Runs the application.
13892 * This function is intended to be run from main() and its return value
13893 * is intended to be returned by main().
13894 * First, the local_command_line() virtual function is invoked. This
13895 * function always runs on the local instance. If that function returns
13896 * %FALSE then the application is registered and the #GApplication::command-line
13897 * signal is emitted in the primary instance (which may or may not be
13899 * If the application has the %G_APPLICATION_HANDLES_COMMAND_LINE
13900 * flag set then the default implementation of local_command_line()
13901 * always returns %FALSE immediately, resulting in the commandline
13902 * always being handled in the primary instance.
13903 * Otherwise, the default implementation of local_command_line() tries
13904 * to do a couple of things that are probably reasonable for most
13905 * applications. First, g_application_register() is called to attempt
13906 * to register the application. If that works, then the command line
13907 * arguments are inspected. If no commandline arguments are given, then
13908 * g_application_activate() is called. If commandline arguments are
13909 * given and the %G_APPLICATION_HANDLES_OPEN flag is set then they
13910 * are assumed to be filenames and g_application_open() is called.
13911 * If you are interested in doing more complicated local handling of the
13912 * commandline then you should implement your own #GApplication subclass
13913 * and override local_command_line(). See
13914 * <xref linkend="gapplication-example-cmdline2"/> for an example.
13915 * If, after the above is done, the use count of the application is zero
13916 * then the exit status is returned immediately. If the use count is
13917 * non-zero then the mainloop is run until the use count falls to zero,
13918 * at which point 0 is returned.
13919 * If the %G_APPLICATION_IS_SERVICE flag is set, then the exiting at
13920 * around to provide its <emphasis>service</emphasis> to others).
13922 * Use count of zero is delayed for a while (ie: the instance stays
13928 * g_application_set_action_group:
13929 * @application: a #GApplication
13930 * @action_group: (allow-none): a #GActionGroup, or %NULL
13932 * Sets or unsets the group of actions associated with the application.
13933 * These actions are the actions that can be remotely invoked.
13934 * It is an error to call this function after the application has been
13942 * g_application_set_application_id:
13943 * @application: a #GApplication
13944 * @application_id: the identifier for @application
13946 * Sets the unique identifier for @application.
13947 * The application id can only be modified if @application has not yet
13949 * The application id must be valid. See g_application_id_is_valid().
13956 * g_application_set_flags:
13957 * @application: a #GApplication
13958 * @flags: the flags for @application
13960 * Sets the flags for @application.
13961 * The flags can only be modified if @application has not yet been
13963 * See #GApplicationFlags.
13970 * g_application_set_inactivity_timeout:
13971 * @application: a #GApplication
13972 * @inactivity_timeout: the timeout, in milliseconds
13974 * Sets the current inactivity timeout for the application.
13975 * This is the amount of time (in milliseconds) after the last call to
13976 * g_application_release() before the application stops running.
13977 * This call has no side effects of its own. The value set here is only
13978 * used for next time g_application_release() drops the use count to
13979 * zero. Any timeouts currently in progress are not impacted.
13981 * Returns: the timeout, in milliseconds
13987 * g_async_initable_init_async:
13988 * @initable: a #GAsyncInitable.
13989 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the operation.
13990 * @cancellable: optional #GCancellable object, %NULL to ignore.
13991 * @callback: a #GAsyncReadyCallback to call when the request is satisfied
13992 * @user_data: the data to pass to callback function
13994 * Starts asynchronous initialization of the object implementing the
13995 * interface. This must be done before any real use of the object after
13996 * initial construction. If the object also implements #GInitable you can
13997 * optionally call g_initable_init() instead.
13998 * When the initialization is finished, @callback will be called. You can
13999 * then call g_async_initable_init_finish() to get the result of the
14001 * Implementations may also support cancellation. If @cancellable is not
14002 * %NULL, then initialization can be cancelled by triggering the cancellable
14003 * object from another thread. If the operation was cancelled, the error
14004 * %G_IO_ERROR_CANCELLED will be returned. If @cancellable is not %NULL, and
14005 * the object doesn't support cancellable initialization, the error
14006 * %G_IO_ERROR_NOT_SUPPORTED will be returned.
14007 * If this function is not called, or returns with an error, then all
14008 * operations on the object should fail, generally returning the
14009 * error %G_IO_ERROR_NOT_INITIALIZED.
14010 * to this function with the same argument should return the same results.
14011 * Only the first call initializes the object; further calls return the result
14012 * of the first call. This is so that it's safe to implement the singleton
14013 * pattern in the GObject constructor function.
14014 * For classes that also support the #GInitable interface, the default
14015 * implementation of this method will run the g_initable_init() function
14016 * in a thread, so if you want to support asynchronous initialization via
14017 * threads, just implement the #GAsyncInitable interface without overriding
14018 * any interface methods.
14020 * Implementations of this method must be idempotent: i.e. multiple calls
14026 * g_async_initable_init_finish:
14027 * @initable: a #GAsyncInitable.
14028 * @res: a #GAsyncResult.
14029 * @error: a #GError location to store the error occuring, or %NULL to ignore.
14031 * Finishes asynchronous initialization and returns the result.
14032 * See g_async_initable_init_async().
14033 * will return %FALSE and set @error appropriately if present.
14035 * Returns: %TRUE if successful. If an error has occurred, this function
14041 * g_async_initable_new_async:
14042 * @object_type: a #GType supporting #GAsyncInitable.
14043 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the operation.
14044 * @cancellable: optional #GCancellable object, %NULL to ignore.
14045 * @callback: a #GAsyncReadyCallback to call when the initialization is finished
14046 * @user_data: the data to pass to callback function
14047 * @first_property_name: the name of the first property, or %NULL if no properties
14048 * @...: the value of the first property, followed by other property value pairs, and ended by %NULL.
14050 * Helper function for constructing #GAsyncInitiable object. This is
14051 * similar to g_object_new() but also initializes the object asynchronously.
14052 * When the initialization is finished, @callback will be called. You can
14053 * then call g_async_initable_new_finish() to get the new object and check
14061 * g_async_initable_new_finish:
14062 * @initable: the #GAsyncInitable from the callback
14063 * @res: the #GAsyncResult.from the callback
14064 * @error: a #GError location to store the error occuring, or %NULL to ignore.
14066 * Finishes the async construction for the various g_async_initable_new calls,
14067 * returning the created object or %NULL on error.
14068 * g_object_unref().
14070 * Returns: (transfer full): a newly created #GObject, or %NULL on error. Free with
14076 * g_async_initable_new_valist_async:
14077 * @object_type: a #GType supporting #GAsyncInitable.
14078 * @first_property_name: the name of the first property, followed by the value, and other property value pairs, and ended by %NULL.
14079 * @var_args: The var args list generated from @first_property_name.
14080 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the operation.
14081 * @cancellable: optional #GCancellable object, %NULL to ignore.
14082 * @callback: a #GAsyncReadyCallback to call when the initialization is finished
14083 * @user_data: the data to pass to callback function
14085 * Helper function for constructing #GAsyncInitiable object. This is
14086 * similar to g_object_new_valist() but also initializes the object
14088 * When the initialization is finished, @callback will be called. You can
14089 * then call g_async_initable_new_finish() to get the new object and check
14097 * g_async_initable_newv_async:
14098 * @object_type: a #GType supporting #GAsyncInitable.
14099 * @n_parameters: the number of parameters in @parameters
14100 * @parameters: the parameters to use to construct the object
14101 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the operation.
14102 * @cancellable: optional #GCancellable object, %NULL to ignore.
14103 * @callback: a #GAsyncReadyCallback to call when the initialization is finished
14104 * @user_data: the data to pass to callback function
14106 * Helper function for constructing #GAsyncInitiable object. This is
14107 * similar to g_object_newv() but also initializes the object asynchronously.
14108 * When the initialization is finished, @callback will be called. You can
14109 * then call g_async_initable_new_finish() to get the new object and check
14117 * g_async_result_get_source_object:
14118 * @res: a #GAsyncResult
14120 * Gets the source object from a #GAsyncResult.
14121 * or %NULL if there is none.
14123 * Returns: (transfer full): a new reference to the source object for the @res,
14128 * g_async_result_get_user_data:
14129 * @res: a #GAsyncResult.
14131 * Gets the user data from a #GAsyncResult.
14133 * Returns: (transfer full): the user data for @res.
14138 * g_atomic_int_dec_and_test:
14139 * @atomic: a pointer to an integer
14141 * Atomically decrements the integer pointed to by @atomic by 1.
14142 * after decrementing it
14144 * Returns: %TRUE if the integer pointed to by @atomic is 0
14150 * g_atomic_int_inc:
14151 * @atomic: a pointer to an integer.
14153 * Atomically increments the integer pointed to by @atomic by 1.
14160 * g_buffered_input_stream_fill:
14161 * @stream: a #GBufferedInputStream
14162 * @count: the number of bytes that will be read from the stream
14163 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
14164 * @error: location to store the error occuring, or %NULL to ignore
14166 * Tries to read @count bytes from the stream into the buffer.
14167 * Will block during this read.
14168 * If @count is zero, returns zero and does nothing. A value of @count
14169 * larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
14170 * On success, the number of bytes read into the buffer is returned.
14171 * It is not an error if this is not the same as the requested size, as it
14172 * can happen e.g. near the end of a file. Zero is returned on end of file
14173 * (or if @count is zero), but never otherwise.
14174 * If @count is -1 then the attempted read size is equal to the number of
14175 * bytes that are required to fill the buffer.
14176 * If @cancellable is not %NULL, then the operation can be cancelled by
14177 * triggering the cancellable object from another thread. If the operation
14178 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
14179 * operation was partially finished when the operation was cancelled the
14180 * partial result will be returned, without an error.
14181 * On error -1 is returned and @error is set accordingly.
14182 * For the asynchronous, non-blocking, version of this function, see
14183 * g_buffered_input_stream_fill_async().
14186 * Returns: the number of bytes read into @stream's buffer, up to @count,
14191 * g_buffered_input_stream_fill_async:
14192 * @stream: a #GBufferedInputStream
14193 * @count: the number of bytes that will be read from the stream
14194 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request
14195 * @cancellable: (allow-none): optional #GCancellable object
14196 * @callback: (scope async): a #GAsyncReadyCallback
14197 * @user_data: (closure): a #gpointer
14199 * Reads data into @stream's buffer asynchronously, up to @count size.
14200 * version of this function, see g_buffered_input_stream_fill().
14201 * If @count is -1 then the attempted read size is equal to the number
14202 * of bytes that are required to fill the buffer.
14207 * g_buffered_input_stream_fill_finish:
14208 * @stream: a #GBufferedInputStream
14209 * @result: a #GAsyncResult
14210 * @error: a #GError
14212 * Finishes an asynchronous read.
14214 * Returns: a #gssize of the read stream, or %-1 on an error.
14219 * g_buffered_input_stream_get_available:
14220 * @stream: #GBufferedInputStream
14222 * Gets the size of the available data within the stream.
14224 * Returns: size of the available stream.
14229 * g_buffered_input_stream_get_buffer_size:
14230 * @stream: a #GBufferedInputStream
14232 * Gets the size of the input buffer.
14234 * Returns: the current buffer size.
14239 * g_buffered_input_stream_new:
14240 * @base_stream: a #GInputStream
14242 * Creates a new #GInputStream from the given @base_stream, with
14243 * a buffer set to the default size (4 kilobytes).
14245 * Returns: a #GInputStream for the given @base_stream.
14250 * g_buffered_input_stream_new_sized:
14251 * @base_stream: a #GInputStream
14254 * Creates a new #GBufferedInputStream from the given @base_stream,
14255 * with a buffer set to @size.
14257 * Returns: a #GInputStream.
14262 * g_buffered_input_stream_peek:
14263 * @stream: a #GBufferedInputStream
14264 * @buffer: a pointer to an allocated chunk of memory
14265 * @offset: a #gsize
14268 * Peeks in the buffer, copying data of size @count into @buffer,
14269 * offset @offset bytes.
14271 * Returns: a #gsize of the number of bytes peeked, or -1 on error.
14276 * g_buffered_input_stream_peek_buffer:
14277 * @stream: a #GBufferedInputStream
14278 * @count: (out): a #gsize to get the number of bytes available in the buffer
14280 * Returns the buffer with the currently available bytes. The returned
14281 * buffer must not be modified and will become invalid when reading from
14282 * the stream or filling the buffer.
14285 * Returns: (array length=count) (element-type guint8) (transfer none):
14290 * g_buffered_input_stream_read_byte:
14291 * @stream: a #GBufferedInputStream
14292 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
14293 * @error: location to store the error occuring, or %NULL to ignore
14295 * Tries to read a single byte from the stream or the buffer. Will block
14296 * during this read.
14297 * On success, the byte read from the stream is returned. On end of stream
14298 * -1 is returned but it's not an exceptional error and @error is not set.
14299 * If @cancellable is not %NULL, then the operation can be cancelled by
14300 * triggering the cancellable object from another thread. If the operation
14301 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
14302 * operation was partially finished when the operation was cancelled the
14303 * partial result will be returned, without an error.
14304 * On error -1 is returned and @error is set accordingly.
14306 * Returns: the byte read from the @stream, or -1 on end of stream or error.
14311 * g_buffered_input_stream_set_buffer_size:
14312 * @stream: a #GBufferedInputStream
14315 * Sets the size of the internal buffer of @stream to @size, or to the
14316 * size of the contents of the buffer. The buffer can never be resized
14317 * smaller than its current contents.
14322 * g_buffered_output_stream_get_auto_grow:
14323 * @stream: a #GBufferedOutputStream.
14325 * Checks if the buffer automatically grows as data is added.
14326 * %FALSE otherwise.
14328 * Returns: %TRUE if the @stream's buffer automatically grows,
14333 * g_buffered_output_stream_get_buffer_size:
14334 * @stream: a #GBufferedOutputStream.
14336 * Gets the size of the buffer in the @stream.
14338 * Returns: the current size of the buffer.
14343 * g_buffered_output_stream_new:
14344 * @base_stream: a #GOutputStream.
14346 * Creates a new buffered output stream for a base stream.
14348 * Returns: a #GOutputStream for the given @base_stream.
14353 * g_buffered_output_stream_new_sized:
14354 * @base_stream: a #GOutputStream.
14357 * Creates a new buffered output stream with a given buffer size.
14359 * Returns: a #GOutputStream with an internal buffer set to @size.
14364 * g_buffered_output_stream_set_auto_grow:
14365 * @stream: a #GBufferedOutputStream.
14366 * @auto_grow: a #gboolean.
14368 * Sets whether or not the @stream's buffer should automatically grow.
14369 * If @auto_grow is true, then each write will just make the buffer
14370 * larger, and you must manually flush the buffer to actually write out
14371 * the data to the underlying stream.
14376 * g_buffered_output_stream_set_buffer_size:
14377 * @stream: a #GBufferedOutputStream.
14380 * Sets the size of the internal buffer to @size.
14386 * @bus_type: A #GBusType.
14387 * @cancellable: A #GCancellable or %NULL.
14388 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
14389 * @user_data: The data to pass to @callback.
14391 * Asynchronously connects to the message bus specified by @bus_type.
14392 * When the operation is finished, @callback will be invoked. You can
14393 * then call g_bus_get_finish() to get the result of the operation.
14394 * This is a asynchronous failable function. See g_bus_get_sync() for
14395 * the synchronous version.
14402 * g_bus_get_finish:
14403 * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_bus_get().
14404 * @error: Return location for error or %NULL.
14406 * Finishes an operation started with g_bus_get().
14407 * The returned object is a singleton, that is, shared with other
14408 * callers of g_bus_get() and g_bus_get_sync() for @bus_type. In the
14409 * event that you need a private message bus connection, use
14410 * g_dbus_address_get_for_bus() and
14411 * g_dbus_connection_new_for_address().
14412 * Note that the returned #GDBusConnection object will (usually) have
14413 * the #GDBusConnection:exit-on-close property set to %TRUE.
14415 * Returns: (transfer full): A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
14422 * @bus_type: A #GBusType.
14423 * @cancellable: A #GCancellable or %NULL.
14424 * @error: Return location for error or %NULL.
14426 * Synchronously connects to the message bus specified by @bus_type.
14427 * Note that the returned object may shared with other callers,
14428 * e.g. if two separate parts of a process calls this function with
14429 * the same @bus_type, they will share the same object.
14430 * This is a synchronous failable function. See g_bus_get() and
14431 * g_bus_get_finish() for the asynchronous version.
14432 * The returned object is a singleton, that is, shared with other
14433 * callers of g_bus_get() and g_bus_get_sync() for @bus_type. In the
14434 * event that you need a private message bus connection, use
14435 * g_dbus_address_get_for_bus_sync() and
14436 * g_dbus_connection_new_for_address().
14437 * Note that the returned #GDBusConnection object will (usually) have
14438 * the #GDBusConnection:exit-on-close property set to %TRUE.
14440 * Returns: (transfer full): A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
14447 * @bus_type: The type of bus to own a name on.
14448 * @name: The well-known name to own.
14449 * @flags: A set of flags from the #GBusNameOwnerFlags enumeration.
14450 * @bus_acquired_handler: Handler to invoke when connected to the bus of type @bus_type or %NULL.
14451 * @name_acquired_handler: Handler to invoke when @name is acquired or %NULL.
14452 * @name_lost_handler: Handler to invoke when @name is lost or %NULL.
14453 * @user_data: User data to pass to handlers.
14454 * @user_data_free_func: Function for freeing @user_data or %NULL.
14456 * Starts acquiring @name on the bus specified by @bus_type and calls
14457 * acquired respectively lost. Callbacks will be invoked in the <link
14458 * linkend="g-main-context-push-thread-default">thread-default main
14459 * loop</link> of the thread you are calling this function from.
14460 * You are guaranteed that one of the @name_acquired_handler and @name_lost_handler
14461 * callbacks will be invoked after calling this function - there are three
14465 * </para></listitem>
14467 * </para></listitem>
14469 * </para></listitem>
14471 * When you are done owning the name, just call g_bus_unown_name()
14472 * with the owner id this function returns.
14473 * If the name is acquired or lost (for example another application
14474 * could acquire the name if you allow replacement or the application
14475 * currently owning the name exits), the handlers are also invoked. If the
14476 * #GDBusConnection that is used for attempting to own the name
14477 * closes, then @name_lost_handler is invoked since it is no
14478 * longer possible for other processes to access the process.
14479 * You cannot use g_bus_own_name() several times for the same name (unless
14480 * interleaved with calls to g_bus_unown_name()) - only the first call
14482 * Another guarantee is that invocations of @name_acquired_handler
14483 * and @name_lost_handler are guaranteed to alternate; that
14484 * is, if @name_acquired_handler is invoked then you are
14485 * guaranteed that the next time one of the handlers is invoked, it
14486 * will be @name_lost_handler. The reverse is also true.
14487 * If you plan on exporting objects (using e.g.
14488 * g_dbus_connection_register_object()), note that it is generally too late
14489 * to export the objects in @name_acquired_handler. Instead, you can do this
14490 * in @bus_acquired_handler since you are guaranteed that this will run
14491 * before @name is requested from the bus.
14492 * This behavior makes it very simple to write applications that wants
14493 * to own names and export objects, see <xref linkend="gdbus-owning-names"/>.
14494 * Simply register objects to be exported in @bus_acquired_handler and
14495 * unregister the objects (if any) in @name_lost_handler.
14496 * g_bus_unown_name() to stop owning the name.
14498 * Returns: An identifier (never 0) that an be used with
14504 * g_bus_own_name_on_connection:
14505 * @connection: A #GDBusConnection.
14506 * @name: The well-known name to own.
14507 * @flags: A set of flags from the #GBusNameOwnerFlags enumeration.
14508 * @name_acquired_handler: Handler to invoke when @name is acquired or %NULL.
14509 * @name_lost_handler: Handler to invoke when @name is lost or %NULL.
14510 * @user_data: User data to pass to handlers.
14511 * @user_data_free_func: Function for freeing @user_data or %NULL.
14513 * Like g_bus_own_name() but takes a #GDBusConnection instead of a
14515 * g_bus_unown_name() to stop owning the name.
14517 * Returns: An identifier (never 0) that an be used with
14523 * g_bus_own_name_on_connection_with_closures:
14524 * @connection: A #GDBusConnection.
14525 * @name: The well-known name to own.
14526 * @flags: A set of flags from the #GBusNameOwnerFlags enumeration.
14527 * @name_acquired_closure: (allow-none): #GClosure to invoke when @name is acquired or %NULL.
14528 * @name_lost_closure: (allow-none): #GClosure to invoke when @name is lost or %NULL.
14530 * Version of g_bus_own_name_on_connection() using closures instead of callbacks for
14531 * easier binding in other languages.
14532 * g_bus_unown_name() to stop owning the name.
14534 * Returns: An identifier (never 0) that an be used with
14535 * Rename to: g_bus_own_name_on_connection
14541 * g_bus_own_name_with_closures:
14542 * @bus_type: The type of bus to own a name on.
14543 * @name: The well-known name to own.
14544 * @flags: A set of flags from the #GBusNameOwnerFlags enumeration.
14545 * @bus_acquired_closure: (allow-none): #GClosure to invoke when connected to the bus of type @bus_type or %NULL.
14546 * @name_acquired_closure: (allow-none): #GClosure to invoke when @name is acquired or %NULL.
14547 * @name_lost_closure: (allow-none): #GClosure to invoke when @name is lost or %NULL.
14549 * Version of g_bus_own_name() using closures instead of callbacks for
14550 * easier binding in other languages.
14551 * g_bus_unown_name() to stop owning the name.
14553 * Returns: An identifier (never 0) that an be used with
14554 * Rename to: g_bus_own_name
14560 * g_bus_unown_name:
14561 * @owner_id: An identifier obtained from g_bus_own_name()
14563 * Stops owning a name.
14570 * g_bus_unwatch_name:
14571 * @watcher_id: An identifier obtained from g_bus_watch_name()
14573 * Stops watching a name.
14580 * g_bus_watch_name:
14581 * @bus_type: The type of bus to watch a name on.
14582 * @name: The name (well-known or unique) to watch.
14583 * @flags: Flags from the #GBusNameWatcherFlags enumeration.
14584 * @name_appeared_handler: Handler to invoke when @name is known to exist or %NULL.
14585 * @name_vanished_handler: Handler to invoke when @name is known to not exist or %NULL.
14586 * @user_data: User data to pass to handlers.
14587 * @user_data_free_func: Function for freeing @user_data or %NULL.
14589 * Starts watching @name on the bus specified by @bus_type and calls
14590 * known to have a owner respectively known to lose its
14591 * owner. Callbacks will be invoked in the <link
14592 * linkend="g-main-context-push-thread-default">thread-default main
14593 * loop</link> of the thread you are calling this function from.
14594 * You are guaranteed that one of the handlers will be invoked after
14595 * calling this function. When you are done watching the name, just
14596 * call g_bus_unwatch_name() with the watcher id this function
14598 * If the name vanishes or appears (for example the application owning
14599 * the name could restart), the handlers are also invoked. If the
14600 * #GDBusConnection that is used for watching the name disconnects, then
14601 * possible to access the name.
14602 * Another guarantee is that invocations of @name_appeared_handler
14603 * and @name_vanished_handler are guaranteed to alternate; that
14604 * is, if @name_appeared_handler is invoked then you are
14605 * guaranteed that the next time one of the handlers is invoked, it
14606 * will be @name_vanished_handler. The reverse is also true.
14607 * This behavior makes it very simple to write applications that wants
14608 * to take action when a certain name exists, see <xref
14609 * linkend="gdbus-watching-names"/>. Basically, the application
14610 * should create object proxies in @name_appeared_handler and destroy
14611 * them again (if any) in @name_vanished_handler.
14612 * g_bus_unwatch_name() to stop watching the name.
14614 * Returns: An identifier (never 0) that an be used with
14620 * g_bus_watch_name_on_connection:
14621 * @connection: A #GDBusConnection.
14622 * @name: The name (well-known or unique) to watch.
14623 * @flags: Flags from the #GBusNameWatcherFlags enumeration.
14624 * @name_appeared_handler: Handler to invoke when @name is known to exist or %NULL.
14625 * @name_vanished_handler: Handler to invoke when @name is known to not exist or %NULL.
14626 * @user_data: User data to pass to handlers.
14627 * @user_data_free_func: Function for freeing @user_data or %NULL.
14629 * Like g_bus_watch_name() but takes a #GDBusConnection instead of a
14631 * g_bus_unwatch_name() to stop watching the name.
14633 * Returns: An identifier (never 0) that an be used with
14639 * g_bus_watch_name_on_connection_with_closures:
14640 * @connection: A #GDBusConnection.
14641 * @name: The name (well-known or unique) to watch.
14642 * @flags: Flags from the #GBusNameWatcherFlags enumeration.
14643 * @name_appeared_closure: (allow-none): #GClosure to invoke when @name is known to exist or %NULL.
14644 * @name_vanished_closure: (allow-none): #GClosure to invoke when @name is known to not exist or %NULL.
14646 * Version of g_bus_watch_name_on_connection() using closures instead of callbacks for
14647 * easier binding in other languages.
14648 * g_bus_unwatch_name() to stop watching the name.
14650 * Returns: An identifier (never 0) that an be used with
14651 * Rename to: g_bus_watch_name_on_connection
14657 * g_bus_watch_name_with_closures:
14658 * @bus_type: The type of bus to watch a name on.
14659 * @name: The name (well-known or unique) to watch.
14660 * @flags: Flags from the #GBusNameWatcherFlags enumeration.
14661 * @name_appeared_closure: (allow-none): #GClosure to invoke when @name is known to exist or %NULL.
14662 * @name_vanished_closure: (allow-none): #GClosure to invoke when @name is known to not exist or %NULL.
14664 * Version of g_bus_watch_name() using closures instead of callbacks for
14665 * easier binding in other languages.
14666 * g_bus_unwatch_name() to stop watching the name.
14668 * Returns: An identifier (never 0) that an be used with
14669 * Rename to: g_bus_watch_name
14675 * g_cancellable_cancel:
14676 * @cancellable: a #GCancellable object.
14678 * Will set @cancellable to cancelled, and will emit the
14679 * #GCancellable::cancelled signal. (However, see the warning about
14680 * race conditions in the documentation for that signal if you are
14681 * planning to connect to it.)
14682 * This function is thread-safe. In other words, you can safely call
14683 * it from a thread other than the one running the operation that was
14684 * passed the @cancellable.
14685 * The convention within gio is that cancelling an asynchronous
14686 * operation causes it to complete asynchronously. That is, if you
14687 * cancel the operation from the same thread in which it is running,
14688 * then the operation's #GAsyncReadyCallback will not be invoked until
14689 * the application returns to the main loop.
14694 * g_cancellable_connect:
14695 * @cancellable: A #GCancellable.
14696 * @callback: The #GCallback to connect.
14697 * @data: Data to pass to @callback.
14698 * @data_destroy_func: Free function for @data or %NULL.
14700 * Convenience function to connect to the #GCancellable::cancelled
14701 * signal. Also handles the race condition that may happen
14702 * if the cancellable is cancelled right before connecting.
14703 * time of the connect if @cancellable is already cancelled,
14704 * or when @cancellable is cancelled in some thread.
14705 * disconnected, or immediately if the cancellable is already
14707 * See #GCancellable::cancelled for details on how to use this.
14710 * Returns: The id of the signal handler or 0 if @cancellable has already
14716 * g_cancellable_disconnect:
14717 * @cancellable: A #GCancellable or %NULL.
14718 * @handler_id: Handler id of the handler to be disconnected, or %0.
14720 * Disconnects a handler from a cancellable instance similar to
14721 * g_signal_handler_disconnect(). Additionally, in the event that a
14722 * signal handler is currently running, this call will block until the
14723 * handler has finished. Calling this function from a
14724 * #GCancellable::cancelled signal handler will therefore result in a
14726 * This avoids a race condition where a thread cancels at the
14727 * same time as the cancellable operation is finished and the
14728 * signal handler is removed. See #GCancellable::cancelled for
14729 * details on how to use this.
14730 * If @cancellable is %NULL or @handler_id is %0 this function does
14738 * g_cancellable_get_current:
14740 * Gets the top cancellable from the stack.
14741 * if the stack is empty.
14743 * Returns: (transfer none): a #GCancellable from the top of the stack, or %NULL
14748 * g_cancellable_get_fd:
14749 * @cancellable: a #GCancellable.
14751 * Gets the file descriptor for a cancellable job. This can be used to
14752 * implement cancellable operations on Unix systems. The returned fd will
14753 * turn readable when @cancellable is cancelled.
14754 * You are not supposed to read from the fd yourself, just check for
14755 * readable status. Reading to unset the readable status is done
14756 * with g_cancellable_reset().
14757 * After a successful return from this function, you should use
14758 * g_cancellable_release_fd() to free up resources allocated for
14759 * the returned file descriptor.
14760 * See also g_cancellable_make_pollfd().
14761 * is not supported, or on errors.
14763 * Returns: A valid file descriptor. %-1 if the file descriptor
14768 * g_cancellable_is_cancelled:
14769 * @cancellable: a #GCancellable or NULL.
14771 * Checks if a cancellable job has been cancelled.
14772 * FALSE if called with %NULL or if item is not cancelled.
14774 * Returns: %TRUE if @cancellable is cancelled,
14779 * g_cancellable_make_pollfd:
14780 * @cancellable: a #GCancellable or %NULL
14781 * @pollfd: a pointer to a #GPollFD
14783 * Creates a #GPollFD corresponding to @cancellable; this can be passed
14784 * to g_poll() and used to poll for cancellation. This is useful both
14785 * for unix systems without a native poll and for portability to
14787 * When this function returns %TRUE, you should use
14788 * g_cancellable_release_fd() to free up resources allocated for the
14789 * If this function returns %FALSE, either no @cancellable was given or
14790 * resource limits prevent this function from allocating the necessary
14791 * structures for polling. (On Linux, you will likely have reached
14792 * the maximum number of file descriptors.) The suggested way to handle
14793 * these cases is to ignore the @cancellable.
14794 * You are not supposed to read from the fd yourself, just check for
14795 * readable status. Reading to unset the readable status is done
14796 * with g_cancellable_reset().
14797 * failure to prepare the cancellable.
14799 * Returns: %TRUE if @pollfd was successfully initialized, %FALSE on
14805 * g_cancellable_new:
14807 * Creates a new #GCancellable object.
14808 * Applications that want to start one or more operations
14809 * that should be cancellable should create a #GCancellable
14810 * and pass it to the operations.
14811 * One #GCancellable can be used in multiple consecutive
14812 * operations, but not in multiple concurrent operations.
14814 * Returns: a #GCancellable.
14819 * g_cancellable_pop_current:
14820 * @cancellable: a #GCancellable object
14822 * Pops @cancellable off the cancellable stack (verifying that @cancellable
14823 * is on the top of the stack).
14828 * g_cancellable_push_current:
14829 * @cancellable: a #GCancellable object
14831 * Pushes @cancellable onto the cancellable stack. The current
14832 * cancellable can then be recieved using g_cancellable_get_current().
14833 * This is useful when implementing cancellable operations in
14834 * code that does not allow you to pass down the cancellable object.
14835 * This is typically called automatically by e.g. #GFile operations,
14836 * so you rarely have to call this yourself.
14841 * g_cancellable_release_fd:
14842 * @cancellable: a #GCancellable
14844 * Releases a resources previously allocated by g_cancellable_get_fd()
14845 * or g_cancellable_make_pollfd().
14846 * For compatibility reasons with older releases, calling this function
14847 * is not strictly required, the resources will be automatically freed
14848 * when the @cancellable is finalized. However, the @cancellable will
14849 * block scarce file descriptors until it is finalized if this function
14850 * is not called. This can cause the application to run out of file
14851 * descriptors when many #GCancellables are used at the same time.
14858 * g_cancellable_reset:
14859 * @cancellable: a #GCancellable object.
14861 * Resets @cancellable to its uncancelled state.
14866 * g_cancellable_set_error_if_cancelled:
14867 * @cancellable: a #GCancellable object.
14868 * @error: #GError to append error state to.
14870 * If the @cancellable is cancelled, sets the error to notify
14871 * that the operation was cancelled.
14873 * Returns: %TRUE if @cancellable was cancelled, %FALSE if it was not.
14878 * g_cancellable_source_new: (skip)
14879 * @cancellable: a #GCancellable, or %NULL
14881 * Creates a source that triggers if @cancellable is cancelled and
14882 * calls its callback of type #GCancellableSourceFunc. This is
14883 * primarily useful for attaching to another (non-cancellable) source
14884 * with g_source_add_child_source() to add cancellability to it.
14885 * For convenience, you can call this with a %NULL #GCancellable,
14886 * in which case the source will never trigger.
14888 * Returns: (transfer full): the new #GSource.
14894 * g_charset_converter_get_num_fallbacks:
14895 * @converter: a #GCharsetConverter
14897 * Gets the number of fallbacks that @converter has applied so far.
14899 * Returns: the number of fallbacks that @converter has applied
14905 * g_charset_converter_get_use_fallback:
14906 * @converter: a #GCharsetConverter
14908 * Gets the #GCharsetConverter:use-fallback property.
14910 * Returns: %TRUE if fallbacks are used by @converter
14916 * g_charset_converter_new:
14917 * @to_charset: destination charset
14918 * @from_charset: source charset
14919 * @error: #GError for error reporting, or %NULL to ignore.
14921 * Creates a new #GCharsetConverter.
14923 * Returns: a new #GCharsetConverter or %NULL on error.
14929 * g_charset_converter_set_use_fallback:
14930 * @converter: a #GCharsetConverter
14931 * @use_fallback: %TRUE to use fallbacks
14933 * Sets the #GCharsetConverter:use-fallback property.
14940 * g_content_type_can_be_executable:
14941 * @type: a content type string
14943 * Checks if a content type can be executable. Note that for instance
14944 * things like text files can be executables (i.e. scripts and batch files).
14945 * can be executable, %FALSE otherwise.
14947 * Returns: %TRUE if the file type corresponds to a type that
14952 * g_content_type_equals:
14953 * @type1: a content type string
14954 * @type2: a content type string
14956 * Compares two content types for equality.
14957 * %FALSE otherwise.
14959 * Returns: %TRUE if the two strings are identical or equivalent,
14964 * g_content_type_from_mime_type:
14965 * @mime_type: a mime type string
14967 * Tries to find a content type based on the mime type name.
14968 * or %NULL. Free with g_free()
14970 * Returns: (allow-none): Newly allocated string with content type
14976 * g_content_type_get_description:
14977 * @type: a content type string
14979 * Gets the human readable description of the content type.
14980 * returned string with g_free()
14982 * Returns: a short description of the content type @type. Free the
14987 * g_content_type_get_icon:
14988 * @type: a content type string
14990 * Gets the icon for a content type.
14991 * object with g_object_unref()
14993 * Returns: (transfer full): #GIcon corresponding to the content type. Free the returned
14998 * g_content_type_get_mime_type:
14999 * @type: a content type string
15001 * Gets the mime type for the content type, if one is registered.
15002 * or %NULL if unknown.
15004 * Returns: (allow-none): the registered mime type for the given @type,
15009 * g_content_type_guess:
15010 * @filename: (allow-none): a string, or %NULL
15011 * @data: (allow-none) (array length=data_size): a stream of data, or %NULL
15012 * @data_size: the size of @data
15013 * @result_uncertain: (allow-none) (out): return location for the certainty of the result, or %NULL
15015 * Guesses the content type based on example data. If the function is
15016 * uncertain, @result_uncertain will be set to %TRUE. Either @filename
15017 * or @data may be %NULL, in which case the guess will be based solely
15018 * on the other argument.
15019 * given data. Free with g_free()
15021 * Returns: a string indicating a guessed content type for the
15026 * g_content_type_guess_for_tree:
15027 * @root: the root of the tree to guess a type for
15029 * Tries to guess the type of the tree with root @root, by
15030 * looking at the files it contains. The result is an array
15031 * of content types, with the best guess coming first.
15032 * The types returned all have the form x-content/foo, e.g.
15033 * x-content/audio-cdda (for audio CDs) or x-content/image-dcf
15034 * (for a camera memory card). See the <ulink url="http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec">shared-mime-info</ulink>
15035 * specification for more on x-content types.
15036 * This function is useful in the implementation of
15037 * g_mount_guess_content_type().
15038 * array of zero or more content types, or %NULL. Free with g_strfreev()
15040 * Returns: (transfer full) (array zero-terminated=1): an %NULL-terminated
15046 * g_content_type_is_a:
15047 * @type: a content type string
15048 * @supertype: a content type string
15050 * Determines if @type is a subset of @supertype.
15051 * %FALSE otherwise.
15053 * Returns: %TRUE if @type is a kind of @supertype,
15058 * g_content_type_is_unknown:
15059 * @type: a content type string
15061 * Checks if the content type is the generic "unknown" type.
15062 * On UNIX this is the "application/octet-stream" mimetype,
15063 * while on win32 it is "*".
15065 * Returns: %TRUE if the type is the unknown type.
15070 * g_content_types_get_registered:
15072 * Gets a list of strings containing all the registered content types
15073 * known to the system. The list and its data should be freed using
15075 * g_list_foreach (list, g_free, NULL);
15076 * g_list_free (list);
15077 * </programlisting>
15079 * Returns: (element-type utf8) (transfer full): #GList of the registered content types
15084 * g_converter_convert:
15085 * @converter: a #GConverter.
15086 * @inbuf: (array length=inbuf_size) (element-type guint8): the buffer containing the data to convert.
15087 * @inbuf_size: the number of bytes in @inbuf
15088 * @outbuf: a buffer to write converted data in.
15089 * @outbuf_size: the number of bytes in @outbuf, must be at least one
15090 * @flags: a #GConvertFlags controlling the conversion details
15091 * @bytes_read: (out): will be set to the number of bytes read from @inbuf on success
15092 * @bytes_written: (out): will be set to the number of bytes written to @outbuf on success
15093 * @error: location to store the error occuring, or %NULL to ignore
15095 * This is the main operation used when converting data. It is to be called
15096 * multiple times in a loop, and each time it will do some work, i.e.
15097 * producing some output (in @outbuf) or consuming some input (from @inbuf) or
15098 * both. If its not possible to do any work an error is returned.
15099 * Note that a single call may not consume all input (or any input at all).
15100 * Also a call may produce output even if given no input, due to state stored
15101 * in the converter producing output.
15102 * If any data was either produced or consumed, and then an error happens, then
15103 * only the successful conversion is reported and the error is returned on the
15105 * A full conversion loop involves calling this method repeatedly, each time
15106 * giving it new input and space output space. When there is no more input
15107 * data after the data in @inbuf, the flag %G_CONVERTER_INPUT_AT_END must be set.
15108 * The loop will be (unless some error happens) returning %G_CONVERTER_CONVERTED
15109 * each time until all data is consumed and all output is produced, then
15110 * %G_CONVERTER_FINISHED is returned instead. Note, that %G_CONVERTER_FINISHED
15111 * may be returned even if %G_CONVERTER_INPUT_AT_END is not set, for instance
15112 * in a decompression converter where the end of data is detectable from the
15113 * data (and there might even be other data after the end of the compressed data).
15114 * When some data has successfully been converted @bytes_read and is set to
15115 * the number of bytes read from @inbuf, and @bytes_written is set to indicate
15116 * how many bytes was written to @outbuf. If there are more data to output
15117 * or consume (i.e. unless the G_CONVERTER_INPUT_AT_END is specified) then
15118 * G_CONVERTER_CONVERTED is returned, and if no more data is to be output
15119 * then G_CONVERTER_FINISHED is returned.
15120 * On error %G_CONVERTER_ERROR is returned and @error is set accordingly.
15121 * Some errors need special handling:
15122 * %G_IO_ERROR_NO_SPACE is returned if there is not enough space
15123 * to write the resulting converted data, the application should
15124 * call the function again with a larger @outbuf to continue.
15125 * %G_IO_ERROR_PARTIAL_INPUT is returned if there is not enough
15126 * input to fully determine what the conversion should produce,
15127 * and the %G_CONVERTER_INPUT_AT_END flag is not set. This happens for
15128 * example with an incomplete multibyte sequence when converting text,
15129 * or when a regexp matches up to the end of the input (and may match
15130 * further input). It may also happen when @inbuf_size is zero and
15131 * there is no more data to produce.
15132 * When this happens the application should read more input and then
15133 * call the function again. If further input shows that there is no
15134 * more data call the function again with the same data but with
15135 * the %G_CONVERTER_INPUT_AT_END flag set. This may cause the conversion
15136 * to finish as e.g. in the regexp match case (or, to fail again with
15137 * %G_IO_ERROR_PARTIAL_INPUT in e.g. a charset conversion where the
15138 * input is actually partial).
15139 * After g_converter_convert() has returned %G_CONVERTER_FINISHED the
15140 * converter object is in an invalid state where its not allowed
15141 * to call g_converter_convert() anymore. At this time you can only
15142 * free the object or call g_converter_reset() to reset it to the
15144 * If the flag %G_CONVERTER_FLUSH is set then conversion is modified
15145 * to try to write out all internal state to the output. The application
15146 * has to call the function multiple times with the flag set, and when
15147 * the availible input has been consumed and all internal state has
15148 * been produced then %G_CONVERTER_FLUSHED (or %G_CONVERTER_FINISHED if
15149 * really at the end) is returned instead of %G_CONVERTER_CONVERTED.
15150 * This is somewhat similar to what happens at the end of the input stream,
15151 * but done in the middle of the data.
15152 * This has different meanings for different conversions. For instance
15153 * in a compression converter it would mean that we flush all the
15154 * compression state into output such that if you uncompress the
15155 * compressed data you get back all the input data. Doing this may
15156 * make the final file larger due to padding though. Another example
15157 * is a regexp conversion, where if you at the end of the flushed data
15158 * have a match, but there is also a potential longer match. In the
15159 * non-flushed case we would ask for more input, but when flushing we
15160 * treat this as the end of input and do the match.
15161 * Flushing is not always possible (like if a charset converter flushes
15162 * at a partial multibyte sequence). Converters are supposed to try
15163 * to produce as much output as possible and then return an error
15164 * (typically %G_IO_ERROR_PARTIAL_INPUT).
15166 * Returns: a #GConverterResult, %G_CONVERTER_ERROR on error.
15172 * g_converter_input_stream_get_converter:
15173 * @converter_stream: a #GConverterInputStream
15175 * Gets the #GConverter that is used by @converter_stream.
15177 * Returns: (transfer none): the converter of the converter input stream
15183 * g_converter_input_stream_new:
15184 * @base_stream: a #GInputStream
15185 * @converter: a #GConverter
15187 * Creates a new converter input stream for the @base_stream.
15189 * Returns: a new #GInputStream.
15194 * g_converter_output_stream_get_converter:
15195 * @converter_stream: a #GConverterOutputStream
15197 * Gets the #GConverter that is used by @converter_stream.
15199 * Returns: (transfer none): the converter of the converter output stream
15205 * g_converter_output_stream_new:
15206 * @base_stream: a #GOutputStream
15207 * @converter: a #GConverter
15209 * Creates a new converter output stream for the @base_stream.
15211 * Returns: a new #GOutputStream.
15216 * g_converter_reset:
15217 * @converter: a #GConverter.
15219 * Resets all internal state in the converter, making it behave
15220 * as if it was just created. If the converter has any internal
15221 * state that would produce output then that output is lost.
15228 * g_credentials_get_native: (skip)
15229 * @credentials: A #GCredentials.
15230 * @native_type: The type of native credentials to get.
15232 * Gets a pointer to native credentials of type @native_type from
15233 * It is a programming error (which will cause an warning to be
15234 * logged) to use this method if there is no #GCredentials support for
15235 * the OS or if @native_type isn't supported by the OS.
15236 * operation there is no #GCredentials support for the OS or if
15237 * data, it is owned by @credentials.
15239 * Returns: The pointer to native credentials or %NULL if the
15245 * g_credentials_get_unix_user:
15246 * @credentials: A #GCredentials
15247 * @error: Return location for error or %NULL.
15249 * Tries to get the UNIX user identifier from @credentials. This
15250 * method is only available on UNIX platforms.
15251 * This operation can fail if #GCredentials is not supported on the
15252 * OS or if the native credentials type does not contain information
15253 * about the UNIX user.
15255 * Returns: The UNIX user identifier or -1 if @error is set.
15261 * g_credentials_is_same_user:
15262 * @credentials: A #GCredentials.
15263 * @other_credentials: A #GCredentials.
15264 * @error: Return location for error or %NULL.
15266 * Checks if @credentials and @other_credentials is the same user.
15267 * This operation can fail if #GCredentials is not supported on the
15269 * user, %FALSE otherwise or if @error is set.
15271 * Returns: %TRUE if @credentials and @other_credentials has the same
15277 * g_credentials_new:
15279 * Creates a new #GCredentials object with credentials matching the
15280 * the current process.
15282 * Returns: A #GCredentials. Free with g_object_unref().
15288 * g_credentials_set_native:
15289 * @credentials: A #GCredentials.
15290 * @native_type: The type of native credentials to set.
15291 * @native: A pointer to native credentials.
15293 * Copies the native credentials of type @native_type from @native
15294 * into @credentials.
15295 * It is a programming error (which will cause an warning to be
15296 * logged) to use this method if there is no #GCredentials support for
15297 * the OS or if @native_type isn't supported by the OS.
15304 * g_credentials_set_unix_user:
15305 * @credentials: A #GCredentials.
15306 * @uid: The UNIX user identifier to set.
15307 * @error: Return location for error or %NULL.
15309 * Tries to set the UNIX user identifier on @credentials. This method
15310 * is only available on UNIX platforms.
15311 * This operation can fail if #GCredentials is not supported on the
15312 * OS or if the native credentials type does not contain information
15313 * about the UNIX user.
15315 * Returns: %TRUE if @uid was set, %FALSE if error is set.
15321 * g_credentials_to_string:
15322 * @credentials: A #GCredentials object.
15324 * Creates a human-readable textual representation of @credentials
15325 * that can be used in logging and debug messages. The format of the
15326 * returned string may change in future GLib release.
15328 * Returns: A string that should be freed with g_free().
15334 * g_data_input_stream_get_byte_order:
15335 * @stream: a given #GDataInputStream.
15337 * Gets the byte order for the data input stream.
15339 * Returns: the @stream's current #GDataStreamByteOrder.
15344 * g_data_input_stream_get_newline_type:
15345 * @stream: a given #GDataInputStream.
15347 * Gets the current newline type for the @stream.
15349 * Returns: #GDataStreamNewlineType for the given @stream.
15354 * g_data_input_stream_new:
15355 * @base_stream: a #GInputStream.
15357 * Creates a new data input stream for the @base_stream.
15359 * Returns: a new #GDataInputStream.
15364 * g_data_input_stream_read_byte:
15365 * @stream: a given #GDataInputStream.
15366 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15367 * @error: #GError for error reporting.
15369 * Reads an unsigned 8-bit/1-byte value from @stream.
15370 * if an error occurred.
15372 * Returns: an unsigned 8-bit/1-byte value read from the @stream or %0
15377 * g_data_input_stream_read_int16:
15378 * @stream: a given #GDataInputStream.
15379 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15380 * @error: #GError for error reporting.
15382 * Reads a 16-bit/2-byte value from @stream.
15383 * In order to get the correct byte order for this read operation,
15384 * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
15385 * an error occurred.
15387 * Returns: a signed 16-bit/2-byte value read from @stream or %0 if
15392 * g_data_input_stream_read_int32:
15393 * @stream: a given #GDataInputStream.
15394 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15395 * @error: #GError for error reporting.
15397 * Reads a signed 32-bit/4-byte value from @stream.
15398 * In order to get the correct byte order for this read operation,
15399 * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
15400 * If @cancellable is not %NULL, then the operation can be cancelled by
15401 * triggering the cancellable object from another thread. If the operation
15402 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
15403 * an error occurred.
15405 * Returns: a signed 32-bit/4-byte value read from the @stream or %0 if
15410 * g_data_input_stream_read_int64:
15411 * @stream: a given #GDataInputStream.
15412 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15413 * @error: #GError for error reporting.
15415 * Reads a 64-bit/8-byte value from @stream.
15416 * In order to get the correct byte order for this read operation,
15417 * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
15418 * If @cancellable is not %NULL, then the operation can be cancelled by
15419 * triggering the cancellable object from another thread. If the operation
15420 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
15421 * an error occurred.
15423 * Returns: a signed 64-bit/8-byte value read from @stream or %0 if
15428 * g_data_input_stream_read_line:
15429 * @stream: a given #GDataInputStream.
15430 * @length: (out): a #gsize to get the length of the data read in.
15431 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15432 * @error: #GError for error reporting.
15434 * Reads a line from the data input stream.
15435 * If @cancellable is not %NULL, then the operation can be cancelled by
15436 * triggering the cancellable object from another thread. If the operation
15437 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
15438 * (without the newlines). Set @length to a #gsize to get the
15439 * length of the read line. On an error, it will return %NULL and
15440 * still return %NULL, but @error won't be set.
15442 * Returns: (transfer full): a string with the line that was read in
15447 * g_data_input_stream_read_line_async:
15448 * @stream: a given #GDataInputStream.
15449 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
15450 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15451 * @callback: (scope async): callback to call when the request is satisfied.
15452 * @user_data: (closure): the data to pass to callback function.
15454 * The asynchronous version of g_data_input_stream_read_line(). It is
15455 * an error to have two outstanding calls to this function.
15456 * When the operation is finished, @callback will be called. You
15457 * can then call g_data_input_stream_read_line_finish() to get
15458 * the result of the operation.
15465 * g_data_input_stream_read_line_finish:
15466 * @stream: a given #GDataInputStream.
15467 * @result: the #GAsyncResult that was provided to the callback.
15468 * @length: (out): a #gsize to get the length of the data read in.
15469 * @error: #GError for error reporting.
15471 * Finish an asynchronous call started by
15472 * g_data_input_stream_read_line_async().
15473 * (without the newlines). Set @length to a #gsize to get the
15474 * length of the read line. On an error, it will return %NULL and
15475 * still return %NULL, but @error won't be set.
15477 * Returns: (transfer full): a string with the line that was read in
15483 * g_data_input_stream_read_uint16:
15484 * @stream: a given #GDataInputStream.
15485 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15486 * @error: #GError for error reporting.
15488 * Reads an unsigned 16-bit/2-byte value from @stream.
15489 * In order to get the correct byte order for this read operation,
15490 * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
15491 * an error occurred.
15493 * Returns: an unsigned 16-bit/2-byte value read from the @stream or %0 if
15498 * g_data_input_stream_read_uint32:
15499 * @stream: a given #GDataInputStream.
15500 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15501 * @error: #GError for error reporting.
15503 * Reads an unsigned 32-bit/4-byte value from @stream.
15504 * In order to get the correct byte order for this read operation,
15505 * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
15506 * If @cancellable is not %NULL, then the operation can be cancelled by
15507 * triggering the cancellable object from another thread. If the operation
15508 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
15509 * an error occurred.
15511 * Returns: an unsigned 32-bit/4-byte value read from the @stream or %0 if
15516 * g_data_input_stream_read_uint64:
15517 * @stream: a given #GDataInputStream.
15518 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15519 * @error: #GError for error reporting.
15521 * Reads an unsigned 64-bit/8-byte value from @stream.
15522 * In order to get the correct byte order for this read operation,
15523 * see g_data_input_stream_get_byte_order().
15524 * If @cancellable is not %NULL, then the operation can be cancelled by
15525 * triggering the cancellable object from another thread. If the operation
15526 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
15527 * an error occurred.
15529 * Returns: an unsigned 64-bit/8-byte read from @stream or %0 if
15534 * g_data_input_stream_read_until:
15535 * @stream: a given #GDataInputStream.
15536 * @stop_chars: characters to terminate the read.
15537 * @length: (out): a #gsize to get the length of the data read in.
15538 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15539 * @error: #GError for error reporting.
15541 * Reads a string from the data input stream, up to the first
15542 * occurrence of any of the stop characters.
15543 * Note that, in contrast to g_data_input_stream_read_until_async(),
15544 * this function consumes the stop character that it finds.
15545 * Don't use this function in new code. Its functionality is
15546 * inconsistent with g_data_input_stream_read_until_async(). Both
15547 * functions will be marked as deprecated in a future release. Use
15548 * g_data_input_stream_read_upto() instead, but note that that function
15549 * does not consume the stop character.
15550 * before encountering any of the stop characters. Set @length to
15551 * a #gsize to get the length of the string. This function will
15552 * return %NULL on an error.
15554 * Returns: (transfer full): a string with the data that was read
15559 * g_data_input_stream_read_until_async:
15560 * @stream: a given #GDataInputStream.
15561 * @stop_chars: characters to terminate the read.
15562 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
15563 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15564 * @callback: (scope async): callback to call when the request is satisfied.
15565 * @user_data: (closure): the data to pass to callback function.
15567 * The asynchronous version of g_data_input_stream_read_until().
15568 * It is an error to have two outstanding calls to this function.
15569 * Note that, in contrast to g_data_input_stream_read_until(),
15570 * this function does not consume the stop character that it finds. You
15571 * must read it for yourself.
15572 * When the operation is finished, @callback will be called. You
15573 * can then call g_data_input_stream_read_until_finish() to get
15574 * the result of the operation.
15575 * Don't use this function in new code. Its functionality is
15576 * inconsistent with g_data_input_stream_read_until(). Both functions
15577 * will be marked as deprecated in a future release. Use
15578 * g_data_input_stream_read_upto_async() instead.
15585 * g_data_input_stream_read_until_finish:
15586 * @stream: a given #GDataInputStream.
15587 * @result: the #GAsyncResult that was provided to the callback.
15588 * @length: (out): a #gsize to get the length of the data read in.
15589 * @error: #GError for error reporting.
15591 * Finish an asynchronous call started by
15592 * g_data_input_stream_read_until_async().
15593 * before encountering any of the stop characters. Set @length to
15594 * a #gsize to get the length of the string. This function will
15595 * return %NULL on an error.
15598 * Returns: (transfer full): a string with the data that was read
15603 * g_data_input_stream_read_upto:
15604 * @stream: a #GDataInputStream
15605 * @stop_chars: characters to terminate the read
15606 * @stop_chars_len: length of @stop_chars. May be -1 if @stop_chars is nul-terminated
15607 * @length: (out): a #gsize to get the length of the data read in
15608 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
15609 * @error: #GError for error reporting
15611 * Reads a string from the data input stream, up to the first
15612 * occurrence of any of the stop characters.
15613 * In contrast to g_data_input_stream_read_until(), this function
15614 * does <emphasis>not</emphasis> consume the stop character. You have
15615 * to use g_data_input_stream_read_byte() to get it before calling
15616 * g_data_input_stream_read_upto() again.
15617 * Note that @stop_chars may contain '\0' if @stop_chars_len is
15619 * before encountering any of the stop characters. Set @length to
15620 * a #gsize to get the length of the string. This function will
15621 * return %NULL on an error
15623 * Returns: (transfer full): a string with the data that was read
15629 * g_data_input_stream_read_upto_async:
15630 * @stream: a #GDataInputStream
15631 * @stop_chars: characters to terminate the read
15632 * @stop_chars_len: length of @stop_chars. May be -1 if @stop_chars is nul-terminated
15633 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
15634 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
15635 * @callback: (scope async): callback to call when the request is satisfied
15636 * @user_data: (closure): the data to pass to callback function
15638 * The asynchronous version of g_data_input_stream_read_upto().
15639 * It is an error to have two outstanding calls to this function.
15640 * In contrast to g_data_input_stream_read_until(), this function
15641 * does <emphasis>not</emphasis> consume the stop character. You have
15642 * to use g_data_input_stream_read_byte() to get it before calling
15643 * g_data_input_stream_read_upto() again.
15644 * Note that @stop_chars may contain '\0' if @stop_chars_len is
15646 * When the operation is finished, @callback will be called. You
15647 * can then call g_data_input_stream_read_upto_finish() to get
15648 * the result of the operation.
15655 * g_data_input_stream_read_upto_finish:
15656 * @stream: a #GDataInputStream
15657 * @result: the #GAsyncResult that was provided to the callback
15658 * @length: (out): a #gsize to get the length of the data read in
15659 * @error: #GError for error reporting
15661 * Finish an asynchronous call started by
15662 * g_data_input_stream_read_upto_async().
15663 * Note that this function does <emphasis>not</emphasis> consume the
15664 * stop character. You have to use g_data_input_stream_read_byte() to
15665 * get it before calling g_data_input_stream_read_upto_async() again.
15666 * before encountering any of the stop characters. Set @length to
15667 * a #gsize to get the length of the string. This function will
15668 * return %NULL on an error.
15670 * Returns: (transfer full): a string with the data that was read
15676 * g_data_input_stream_set_byte_order:
15677 * @stream: a given #GDataInputStream.
15678 * @order: a #GDataStreamByteOrder to set.
15680 * This function sets the byte order for the given @stream. All subsequent
15681 * reads from the @stream will be read in the given @order.
15686 * g_data_input_stream_set_newline_type:
15687 * @stream: a #GDataInputStream.
15688 * @type: the type of new line return as #GDataStreamNewlineType.
15690 * Sets the newline type for the @stream.
15691 * Note that using G_DATA_STREAM_NEWLINE_TYPE_ANY is slightly unsafe. If a read
15692 * chunk ends in "CR" we must read an additional byte to know if this is "CR" or
15693 * "CR LF", and this might block if there is no more data availible.
15698 * g_data_output_stream_get_byte_order:
15699 * @stream: a #GDataOutputStream.
15701 * Gets the byte order for the stream.
15703 * Returns: the #GDataStreamByteOrder for the @stream.
15708 * g_data_output_stream_new:
15709 * @base_stream: a #GOutputStream.
15711 * Creates a new data output stream for @base_stream.
15713 * Returns: #GDataOutputStream.
15718 * g_data_output_stream_put_byte:
15719 * @stream: a #GDataOutputStream.
15720 * @data: a #guchar.
15721 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15722 * @error: a #GError, %NULL to ignore.
15724 * Puts a byte into the output stream.
15726 * Returns: %TRUE if @data was successfully added to the @stream.
15731 * g_data_output_stream_put_int16:
15732 * @stream: a #GDataOutputStream.
15733 * @data: a #gint16.
15734 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15735 * @error: a #GError, %NULL to ignore.
15737 * Puts a signed 16-bit integer into the output stream.
15739 * Returns: %TRUE if @data was successfully added to the @stream.
15744 * g_data_output_stream_put_int32:
15745 * @stream: a #GDataOutputStream.
15746 * @data: a #gint32.
15747 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15748 * @error: a #GError, %NULL to ignore.
15750 * Puts a signed 32-bit integer into the output stream.
15752 * Returns: %TRUE if @data was successfully added to the @stream.
15757 * g_data_output_stream_put_int64:
15758 * @stream: a #GDataOutputStream.
15759 * @data: a #gint64.
15760 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15761 * @error: a #GError, %NULL to ignore.
15763 * Puts a signed 64-bit integer into the stream.
15765 * Returns: %TRUE if @data was successfully added to the @stream.
15770 * g_data_output_stream_put_string:
15771 * @stream: a #GDataOutputStream.
15773 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15774 * @error: a #GError, %NULL to ignore.
15776 * Puts a string into the output stream.
15778 * Returns: %TRUE if @string was successfully added to the @stream.
15783 * g_data_output_stream_put_uint16:
15784 * @stream: a #GDataOutputStream.
15785 * @data: a #guint16.
15786 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15787 * @error: a #GError, %NULL to ignore.
15789 * Puts an unsigned 16-bit integer into the output stream.
15791 * Returns: %TRUE if @data was successfully added to the @stream.
15796 * g_data_output_stream_put_uint32:
15797 * @stream: a #GDataOutputStream.
15798 * @data: a #guint32.
15799 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15800 * @error: a #GError, %NULL to ignore.
15802 * Puts an unsigned 32-bit integer into the stream.
15804 * Returns: %TRUE if @data was successfully added to the @stream.
15809 * g_data_output_stream_put_uint64:
15810 * @stream: a #GDataOutputStream.
15811 * @data: a #guint64.
15812 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15813 * @error: a #GError, %NULL to ignore.
15815 * Puts an unsigned 64-bit integer into the stream.
15817 * Returns: %TRUE if @data was successfully added to the @stream.
15822 * g_data_output_stream_set_byte_order:
15823 * @stream: a #GDataOutputStream.
15824 * @order: a %GDataStreamByteOrder.
15826 * Sets the byte order of the data output stream to @order.
15831 * g_dbus_address_get_for_bus_sync:
15832 * @bus_type: A #GBusType.
15833 * @cancellable: A #GCancellable or %NULL.
15834 * @error: Return location for error or %NULL.
15836 * Synchronously looks up the D-Bus address for the well-known message
15837 * bus instance specified by @bus_type. This may involve using various
15838 * platform specific mechanisms.
15840 * Returns: A valid D-Bus address string for @bus_type or %NULL if @error is set.
15846 * g_dbus_address_get_stream:
15847 * @address: A valid D-Bus address.
15848 * @cancellable: A #GCancellable or %NULL.
15849 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
15850 * @user_data: Data to pass to @callback.
15852 * Asynchronously connects to an endpoint specified by @address and
15853 * sets up the connection so it is in a state to run the client-side
15854 * of the D-Bus authentication conversation.
15855 * When the operation is finished, @callback will be invoked. You can
15856 * then call g_dbus_address_get_stream_finish() to get the result of
15858 * This is an asynchronous failable function. See
15859 * g_dbus_address_get_stream_sync() for the synchronous version.
15866 * g_dbus_address_get_stream_finish:
15867 * @res: A #GAsyncResult obtained from the GAsyncReadyCallback passed to g_dbus_address_get_stream().
15868 * @out_guid: %NULL or return location to store the GUID extracted from @address, if any.
15869 * @error: Return location for error or %NULL.
15871 * Finishes an operation started with g_dbus_address_get_stream().
15873 * Returns: (transfer full): A #GIOStream or %NULL if @error is set.
15879 * g_dbus_address_get_stream_sync:
15880 * @address: A valid D-Bus address.
15881 * @out_guid: %NULL or return location to store the GUID extracted from @address, if any.
15882 * @cancellable: A #GCancellable or %NULL.
15883 * @error: Return location for error or %NULL.
15885 * Synchronously connects to an endpoint specified by @address and
15886 * sets up the connection so it is in a state to run the client-side
15887 * of the D-Bus authentication conversation.
15888 * This is a synchronous failable function. See
15889 * g_dbus_address_get_stream() for the asynchronous version.
15891 * Returns: (transfer full): A #GIOStream or %NULL if @error is set.
15897 * g_dbus_annotation_info_lookup:
15898 * @annotations: A %NULL-terminated array of annotations or %NULL.
15899 * @name: The name of the annotation to look up.
15901 * Looks up the value of an annotation.
15902 * This cost of this function is O(n) in number of annotations.
15904 * Returns: The value or %NULL if not found. Do not free, it is owned by @annotations.
15910 * g_dbus_annotation_info_ref:
15911 * @info: A #GDBusNodeInfo
15913 * If @info is statically allocated does nothing. Otherwise increases
15914 * the reference count.
15916 * Returns: The same @info.
15922 * g_dbus_annotation_info_unref:
15923 * @info: A #GDBusAnnotationInfo.
15925 * If @info is statically allocated, does nothing. Otherwise decreases
15926 * the reference count of @info. When its reference count drops to 0,
15927 * the memory used is freed.
15934 * g_dbus_arg_info_ref:
15935 * @info: A #GDBusArgInfo
15937 * If @info is statically allocated does nothing. Otherwise increases
15938 * the reference count.
15940 * Returns: The same @info.
15946 * g_dbus_arg_info_unref:
15947 * @info: A #GDBusArgInfo.
15949 * If @info is statically allocated, does nothing. Otherwise decreases
15950 * the reference count of @info. When its reference count drops to 0,
15951 * the memory used is freed.
15958 * g_dbus_auth_observer_authorize_authenticated_peer:
15959 * @observer: A #GDBusAuthObserver.
15960 * @stream: A #GIOStream for the #GDBusConnection.
15961 * @credentials: Credentials received from the peer or %NULL.
15963 * Emits the #GDBusAuthObserver::authorize-authenticated-peer signal on @observer.
15965 * Returns: %TRUE if the peer is authorized, %FALSE if not.
15971 * g_dbus_auth_observer_new:
15973 * Creates a new #GDBusAuthObserver object.
15975 * Returns: A #GDBusAuthObserver. Free with g_object_unref().
15981 * g_dbus_connection_add_filter:
15982 * @connection: A #GDBusConnection.
15983 * @filter_function: A filter function.
15984 * @user_data: User data to pass to @filter_function.
15985 * @user_data_free_func: Function to free @user_data with when filter is removed or %NULL.
15987 * Adds a message filter. Filters are handlers that are run on all
15988 * incoming and outgoing messages, prior to standard dispatch. Filters
15989 * are run in the order that they were added. The same handler can be
15990 * added as a filter more than once, in which case it will be run more
15991 * than once. Filters added during a filter callback won't be run on
15992 * the message being processed. Filter functions are allowed to modify
15993 * and even drop messages - see the #GDBusMessageFilterResult
15994 * enumeration for details.
15995 * Note that filters are run in a dedicated message handling thread so
15996 * they can't block and, generally, can't do anything but signal a
15997 * worker thread. Also note that filters are rarely needed - use API
15998 * such as g_dbus_connection_send_message_with_reply(),
15999 * g_dbus_connection_signal_subscribe() or
16000 * g_dbus_connection_call() instead.
16001 * If a filter consumes an incoming message the message is not
16002 * dispatched anywhere else - not even the standard dispatch machinery
16003 * (that API such as g_dbus_connection_signal_subscribe() and
16004 * g_dbus_connection_send_message_with_reply() relies on) will see the
16005 * message. Similary, if a filter consumes an outgoing message, the
16006 * message will not be sent to the other peer.
16007 * g_dbus_connection_remove_filter().
16009 * Returns: A filter identifier that can be used with
16015 * g_dbus_connection_call:
16016 * @connection: A #GDBusConnection.
16017 * @bus_name: A unique or well-known bus name or %NULL if @connection is not a message bus connection.
16018 * @object_path: Path of remote object.
16019 * @interface_name: D-Bus interface to invoke method on.
16020 * @method_name: The name of the method to invoke.
16021 * @parameters: A #GVariant tuple with parameters for the method or %NULL if not passing parameters.
16022 * @reply_type: The expected type of the reply, or %NULL.
16023 * @flags: Flags from the #GDBusCallFlags enumeration.
16024 * @timeout_msec: The timeout in milliseconds, -1 to use the default timeout or %G_MAXINT for no timeout.
16025 * @cancellable: A #GCancellable or %NULL.
16026 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
16027 * @user_data: The data to pass to @callback.
16029 * Asynchronously invokes the @method_name method on the
16030 * If @connection is closed then the operation will fail with
16031 * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will
16032 * fail with %G_IO_ERROR_CANCELLED. If @parameters contains a value
16033 * not compatible with the D-Bus protocol, the operation fails with
16034 * %G_IO_ERROR_INVALID_ARGUMENT.
16035 * If @reply_type is non-%NULL then the reply will be checked for having this type and an
16036 * error will be raised if it does not match. Said another way, if you give a @reply_type
16037 * then any non-%NULL return value will be of this type.
16038 * If the @parameters #GVariant is floating, it is consumed. This allows
16039 * convenient 'inline' use of g_variant_new(), e.g.:
16041 * g_dbus_connection_call (connection,
16042 * "org.freedesktop.StringThings",
16043 * "/org/freedesktop/StringThings",
16044 * "org.freedesktop.StringThings",
16046 * g_variant_new ("(ss)",
16050 * G_DBUS_CALL_FLAGS_NONE,
16053 * (GAsyncReadyCallback) two_strings_done,
16056 * This is an asynchronous method. When the operation is finished, @callback will be invoked
16057 * in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
16058 * of the thread you are calling this method from. You can then call
16059 * g_dbus_connection_call_finish() to get the result of the operation.
16060 * See g_dbus_connection_call_sync() for the synchronous version of this
16068 * g_dbus_connection_call_finish:
16069 * @connection: A #GDBusConnection.
16070 * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_call().
16071 * @error: Return location for error or %NULL.
16073 * Finishes an operation started with g_dbus_connection_call().
16074 * return values. Free with g_variant_unref().
16076 * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
16082 * g_dbus_connection_call_sync:
16083 * @connection: A #GDBusConnection.
16084 * @bus_name: A unique or well-known bus name.
16085 * @object_path: Path of remote object.
16086 * @interface_name: D-Bus interface to invoke method on.
16087 * @method_name: The name of the method to invoke.
16088 * @parameters: A #GVariant tuple with parameters for the method or %NULL if not passing parameters.
16089 * @reply_type: The expected type of the reply, or %NULL.
16090 * @flags: Flags from the #GDBusCallFlags enumeration.
16091 * @timeout_msec: The timeout in milliseconds, -1 to use the default timeout or %G_MAXINT for no timeout.
16092 * @cancellable: A #GCancellable or %NULL.
16093 * @error: Return location for error or %NULL.
16095 * Synchronously invokes the @method_name method on the
16096 * If @connection is closed then the operation will fail with
16097 * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the
16098 * operation will fail with %G_IO_ERROR_CANCELLED. If @parameters
16099 * contains a value not compatible with the D-Bus protocol, the operation
16100 * fails with %G_IO_ERROR_INVALID_ARGUMENT.
16101 * If @reply_type is non-%NULL then the reply will be checked for having
16102 * this type and an error will be raised if it does not match. Said
16103 * another way, if you give a @reply_type then any non-%NULL return
16104 * value will be of this type.
16105 * If the @parameters #GVariant is floating, it is consumed.
16106 * This allows convenient 'inline' use of g_variant_new(), e.g.:
16108 * g_dbus_connection_call_sync (connection,
16109 * "org.freedesktop.StringThings",
16110 * "/org/freedesktop/StringThings",
16111 * "org.freedesktop.StringThings",
16113 * g_variant_new ("(ss)",
16117 * G_DBUS_CALL_FLAGS_NONE,
16122 * The calling thread is blocked until a reply is received. See
16123 * g_dbus_connection_call() for the asynchronous version of
16125 * return values. Free with g_variant_unref().
16127 * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
16133 * g_dbus_connection_close:
16134 * @connection: A #GDBusConnection.
16135 * @cancellable: A #GCancellable or %NULL.
16136 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result.
16137 * @user_data: The data to pass to @callback.
16139 * Closes @connection. Note that this never causes the process to
16140 * exit (this might only happen if the other end of a shared message
16141 * bus connection disconnects, see #GDBusConnection:exit-on-close).
16142 * Once the connection is closed, operations such as sending a message
16143 * will return with the error %G_IO_ERROR_CLOSED. Closing a connection
16144 * will not automatically flush the connection so queued messages may
16145 * be lost. Use g_dbus_connection_flush() if you need such guarantees.
16146 * If @connection is already closed, this method fails with
16147 * %G_IO_ERROR_CLOSED.
16148 * When @connection has been closed, the #GDBusConnection::closed
16149 * signal is emitted in the <link
16150 * linkend="g-main-context-push-thread-default">thread-default main
16151 * loop</link> of the thread that @connection was constructed in.
16152 * This is an asynchronous method. When the operation is finished,
16153 * linkend="g-main-context-push-thread-default">thread-default main
16154 * loop</link> of the thread you are calling this method from. You can
16155 * then call g_dbus_connection_close_finish() to get the result of the
16156 * operation. See g_dbus_connection_close_sync() for the synchronous
16164 * g_dbus_connection_close_finish:
16165 * @connection: A #GDBusConnection.
16166 * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_close().
16167 * @error: Return location for error or %NULL.
16169 * Finishes an operation started with g_dbus_connection_close().
16171 * Returns: %TRUE if the operation succeeded, %FALSE if @error is set.
16177 * g_dbus_connection_close_sync:
16178 * @connection: A #GDBusConnection.
16179 * @cancellable: A #GCancellable or %NULL.
16180 * @error: Return location for error or %NULL.
16182 * Synchronously closees @connection. The calling thread is blocked
16183 * until this is done. See g_dbus_connection_close() for the
16184 * asynchronous version of this method and more details about what it
16187 * Returns: %TRUE if the operation succeeded, %FALSE if @error is set.
16193 * g_dbus_connection_emit_signal:
16194 * @connection: A #GDBusConnection.
16195 * @destination_bus_name: The unique bus name for the destination for the signal or %NULL to emit to all listeners.
16196 * @object_path: Path of remote object.
16197 * @interface_name: D-Bus interface to emit a signal on.
16198 * @signal_name: The name of the signal to emit.
16199 * @parameters: A #GVariant tuple with parameters for the signal or %NULL if not passing parameters.
16200 * @error: Return location for error or %NULL.
16203 * If the parameters GVariant is floating, it is consumed.
16204 * This can only fail if @parameters is not compatible with the D-Bus protocol.
16206 * Returns: %TRUE unless @error is set.
16212 * g_dbus_connection_flush:
16213 * @connection: A #GDBusConnection.
16214 * @cancellable: A #GCancellable or %NULL.
16215 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result.
16216 * @user_data: The data to pass to @callback.
16218 * Asynchronously flushes @connection, that is, writes all queued
16219 * outgoing message to the transport and then flushes the transport
16220 * (using g_output_stream_flush_async()). This is useful in programs
16221 * that wants to emit a D-Bus signal and then exit
16222 * immediately. Without flushing the connection, there is no guarantee
16223 * that the message has been sent to the networking buffers in the OS
16225 * This is an asynchronous method. When the operation is finished,
16226 * linkend="g-main-context-push-thread-default">thread-default main
16227 * loop</link> of the thread you are calling this method from. You can
16228 * then call g_dbus_connection_flush_finish() to get the result of the
16229 * operation. See g_dbus_connection_flush_sync() for the synchronous
16237 * g_dbus_connection_flush_finish:
16238 * @connection: A #GDBusConnection.
16239 * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_flush().
16240 * @error: Return location for error or %NULL.
16242 * Finishes an operation started with g_dbus_connection_flush().
16244 * Returns: %TRUE if the operation succeeded, %FALSE if @error is set.
16250 * g_dbus_connection_flush_sync:
16251 * @connection: A #GDBusConnection.
16252 * @cancellable: A #GCancellable or %NULL.
16253 * @error: Return location for error or %NULL.
16255 * Synchronously flushes @connection. The calling thread is blocked
16256 * until this is done. See g_dbus_connection_flush() for the
16257 * asynchronous version of this method and more details about what it
16260 * Returns: %TRUE if the operation succeeded, %FALSE if @error is set.
16266 * g_dbus_connection_get_capabilities:
16267 * @connection: A #GDBusConnection.
16269 * Gets the capabilities negotiated with the remote peer
16271 * Returns: Zero or more flags from the #GDBusCapabilityFlags enumeration.
16277 * g_dbus_connection_get_exit_on_close:
16278 * @connection: A #GDBusConnection.
16280 * Gets whether the process is terminated when @connection is
16281 * closed by the remote peer. See
16282 * #GDBusConnection:exit-on-close for more details.
16283 * closed by the remote peer.
16285 * Returns: Whether the process is terminated when @connection is
16291 * g_dbus_connection_get_guid:
16292 * @connection: A #GDBusConnection.
16294 * The GUID of the peer performing the role of server when
16295 * authenticating. See #GDBusConnection:guid for more details.
16297 * Returns: The GUID. Do not free this string, it is owned by
16303 * g_dbus_connection_get_peer_credentials:
16304 * @connection: A #GDBusConnection.
16306 * Gets the credentials of the authenticated peer. This will always
16307 * return %NULL unless @connection acted as a server
16308 * (e.g. %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER was passed)
16309 * when set up and the client passed credentials as part of the
16310 * authentication process.
16311 * In a message bus setup, the message bus is always the server and
16312 * each application is a client. So this method will always return
16313 * %NULL for message bus clients.
16314 * this object, it is owned by @connection.
16316 * Returns: (transfer none): A #GCredentials or %NULL if not available. Do not free
16322 * g_dbus_connection_get_stream:
16323 * @connection: a #GDBusConnection
16325 * Gets the underlying stream used for IO.
16327 * Returns: (transfer none): the stream used for IO
16333 * g_dbus_connection_get_unique_name:
16334 * @connection: A #GDBusConnection.
16336 * Gets the unique name of @connection as assigned by the message
16337 * bus. This can also be used to figure out if @connection is a
16338 * message bus connection.
16339 * bus connection. Do not free this string, it is owned by
16341 * Returns: The unique name or %NULL if @connection is not a message
16347 * g_dbus_connection_is_closed:
16348 * @connection: A #GDBusConnection.
16350 * Gets whether @connection is closed.
16352 * Returns: %TRUE if the connection is closed, %FALSE otherwise.
16358 * g_dbus_connection_new:
16359 * @stream: A #GIOStream.
16360 * @guid: The GUID to use if a authenticating as a server or %NULL.
16361 * @flags: Flags describing how to make the connection.
16362 * @observer: A #GDBusAuthObserver or %NULL.
16363 * @cancellable: A #GCancellable or %NULL.
16364 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
16365 * @user_data: The data to pass to @callback.
16367 * Asynchronously sets up a D-Bus connection for exchanging D-Bus messages
16368 * with the end represented by @stream.
16369 * If @observer is not %NULL it may be used to control the
16370 * authentication process.
16371 * When the operation is finished, @callback will be invoked. You can
16372 * then call g_dbus_connection_new_finish() to get the result of the
16374 * This is a asynchronous failable constructor. See
16375 * g_dbus_connection_new_sync() for the synchronous
16383 * g_dbus_connection_new_finish:
16384 * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_new().
16385 * @error: Return location for error or %NULL.
16387 * Finishes an operation started with g_dbus_connection_new().
16389 * Returns: A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
16395 * g_dbus_connection_new_for_address:
16396 * @address: A D-Bus address.
16397 * @flags: Flags describing how to make the connection.
16398 * @observer: A #GDBusAuthObserver or %NULL.
16399 * @cancellable: A #GCancellable or %NULL.
16400 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
16401 * @user_data: The data to pass to @callback.
16403 * Asynchronously connects and sets up a D-Bus client connection for
16404 * exchanging D-Bus messages with an endpoint specified by @address
16405 * which must be in the D-Bus address format.
16406 * This constructor can only be used to initiate client-side
16407 * connections - use g_dbus_connection_new() if you need to act as the
16408 * server. In particular, @flags cannot contain the
16409 * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER or
16410 * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS flags.
16411 * When the operation is finished, @callback will be invoked. You can
16412 * then call g_dbus_connection_new_finish() to get the result of the
16414 * If @observer is not %NULL it may be used to control the
16415 * authentication process.
16416 * This is a asynchronous failable constructor. See
16417 * g_dbus_connection_new_for_address_sync() for the synchronous
16425 * g_dbus_connection_new_for_address_finish:
16426 * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_new().
16427 * @error: Return location for error or %NULL.
16429 * Finishes an operation started with g_dbus_connection_new_for_address().
16431 * Returns: A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
16437 * g_dbus_connection_new_for_address_sync:
16438 * @address: A D-Bus address.
16439 * @flags: Flags describing how to make the connection.
16440 * @observer: A #GDBusAuthObserver or %NULL.
16441 * @cancellable: A #GCancellable or %NULL.
16442 * @error: Return location for error or %NULL.
16444 * Synchronously connects and sets up a D-Bus client connection for
16445 * exchanging D-Bus messages with an endpoint specified by @address
16446 * which must be in the D-Bus address format.
16447 * This constructor can only be used to initiate client-side
16448 * connections - use g_dbus_connection_new_sync() if you need to act
16449 * as the server. In particular, @flags cannot contain the
16450 * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER or
16451 * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS flags.
16452 * This is a synchronous failable constructor. See
16453 * g_dbus_connection_new_for_address() for the asynchronous version.
16454 * If @observer is not %NULL it may be used to control the
16455 * authentication process.
16457 * Returns: A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
16463 * g_dbus_connection_new_sync:
16464 * @stream: A #GIOStream.
16465 * @guid: The GUID to use if a authenticating as a server or %NULL.
16466 * @flags: Flags describing how to make the connection.
16467 * @observer: A #GDBusAuthObserver or %NULL.
16468 * @cancellable: A #GCancellable or %NULL.
16469 * @error: Return location for error or %NULL.
16471 * Synchronously sets up a D-Bus connection for exchanging D-Bus messages
16472 * with the end represented by @stream.
16473 * If @observer is not %NULL it may be used to control the
16474 * authentication process.
16475 * This is a synchronous failable constructor. See
16476 * g_dbus_connection_new() for the asynchronous version.
16478 * Returns: A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
16484 * g_dbus_connection_register_object:
16485 * @connection: A #GDBusConnection.
16486 * @object_path: The object path to register at.
16487 * @interface_info: Introspection data for the interface.
16488 * @vtable: A #GDBusInterfaceVTable to call into or %NULL.
16489 * @user_data: Data to pass to functions in @vtable.
16490 * @user_data_free_func: Function to call when the object path is unregistered.
16491 * @error: Return location for error or %NULL.
16493 * Registers callbacks for exported objects at @object_path with the
16494 * D-Bus interface that is described in @interface_info.
16495 * Calls to functions in @vtable (and @user_data_free_func) will
16496 * happen in the <link linkend="g-main-context-push-thread-default">thread-default main
16497 * loop</link> of the thread you are calling this method from.
16498 * Note that all #GVariant values passed to functions in @vtable will match
16499 * the signature given in @interface_info - if a remote caller passes
16500 * incorrect values, the <literal>org.freedesktop.DBus.Error.InvalidArgs</literal>
16501 * is returned to the remote caller.
16502 * Additionally, if the remote caller attempts to invoke methods or
16503 * access properties not mentioned in @interface_info the
16504 * <literal>org.freedesktop.DBus.Error.UnknownMethod</literal> resp.
16505 * <literal>org.freedesktop.DBus.Error.InvalidArgs</literal> errors
16506 * are returned to the caller.
16507 * It is considered a programming error if the
16508 * #GDBusInterfaceGetPropertyFunc function in @vtable returns a
16509 * #GVariant of incorrect type.
16510 * If an existing callback is already registered at @object_path and
16511 * GDBus automatically implements the standard D-Bus interfaces
16512 * org.freedesktop.DBus.Properties, org.freedesktop.DBus.Introspectable
16513 * and org.freedesktop.Peer, so you don't have to implement those for
16514 * the objects you export. You <emphasis>can</emphasis> implement
16515 * org.freedesktop.DBus.Properties yourself, e.g. to handle getting
16516 * and setting of properties asynchronously.
16517 * Note that the reference count on @interface_info will be
16518 * incremented by 1 (unless allocated statically, e.g. if the
16519 * reference count is -1, see g_dbus_interface_info_ref()) for as long
16520 * as the object is exported. Also note that @vtable will be copied.
16521 * See <xref linkend="gdbus-server"/> for an example of how to use this method.
16522 * that can be used with g_dbus_connection_unregister_object() .
16524 * Returns: 0 if @error is set, otherwise a registration id (never 0)
16530 * g_dbus_connection_register_subtree:
16531 * @connection: A #GDBusConnection.
16532 * @object_path: The object path to register the subtree at.
16533 * @vtable: A #GDBusSubtreeVTable to enumerate, introspect and dispatch nodes in the subtree.
16534 * @flags: Flags used to fine tune the behavior of the subtree.
16535 * @user_data: Data to pass to functions in @vtable.
16536 * @user_data_free_func: Function to call when the subtree is unregistered.
16537 * @error: Return location for error or %NULL.
16539 * Registers a whole subtree of <quote>dynamic</quote> objects.
16540 * The @enumerate and @introspection functions in @vtable are used to
16541 * convey, to remote callers, what nodes exist in the subtree rooted
16543 * When handling remote calls into any node in the subtree, first the
16544 * or the #G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES flag is set
16545 * the @introspection function is used to check if the node supports the
16546 * requested method. If so, the @dispatch function is used to determine
16547 * where to dispatch the call. The collected #GDBusInterfaceVTable and
16548 * #gpointer will be used to call into the interface vtable for processing
16550 * All calls into user-provided code will be invoked in the <link
16551 * linkend="g-main-context-push-thread-default">thread-default main
16552 * loop</link> of the thread you are calling this method from.
16553 * If an existing subtree is already registered at @object_path or
16554 * then @error is set to #G_IO_ERROR_EXISTS.
16555 * Note that it is valid to register regular objects (using
16556 * g_dbus_connection_register_object()) in a subtree registered with
16557 * g_dbus_connection_register_subtree() - if so, the subtree handler
16558 * is tried as the last resort. One way to think about a subtree
16559 * handler is to consider it a <quote>fallback handler</quote>
16560 * for object paths not registered via g_dbus_connection_register_object()
16561 * or other bindings.
16562 * Note that @vtable will be copied so you cannot change it after
16564 * See <xref linkend="gdbus-subtree-server"/> for an example of how to use this method.
16565 * that can be used with g_dbus_connection_unregister_subtree() .
16567 * Returns: 0 if @error is set, otherwise a subtree registration id (never 0)
16573 * g_dbus_connection_remove_filter:
16574 * @connection: a #GDBusConnection
16575 * @filter_id: an identifier obtained from g_dbus_connection_add_filter()
16577 * Removes a filter.
16584 * g_dbus_connection_send_message:
16585 * @connection: A #GDBusConnection.
16586 * @message: A #GDBusMessage
16587 * @flags: Flags affecting how the message is sent.
16588 * @out_serial: Return location for serial number assigned to @message when sending it or %NULL.
16589 * @error: Return location for error or %NULL.
16591 * Asynchronously sends @message to the peer represented by @connection.
16592 * Unless @flags contain the
16593 * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag, the serial number
16594 * will be assigned by @connection and set on @message via
16595 * g_dbus_message_set_serial(). If @out_serial is not %NULL, then the
16596 * serial number used will be written to this location prior to
16597 * submitting the message to the underlying transport.
16598 * If @connection is closed then the operation will fail with
16599 * %G_IO_ERROR_CLOSED. If @message is not well-formed,
16600 * the operation fails with %G_IO_ERROR_INVALID_ARGUMENT.
16601 * See <xref linkend="gdbus-server"/> and <xref
16602 * linkend="gdbus-unix-fd-client"/> for an example of how to use this
16603 * low-level API to send and receive UNIX file descriptors.
16604 * Note that @message must be unlocked, unless @flags contain the
16605 * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag.
16606 * transmission, %FALSE if @error is set.
16608 * Returns: %TRUE if the message was well-formed and queued for
16614 * g_dbus_connection_send_message_with_reply:
16615 * @connection: A #GDBusConnection.
16616 * @message: A #GDBusMessage.
16617 * @flags: Flags affecting how the message is sent.
16618 * @timeout_msec: The timeout in milliseconds, -1 to use the default timeout or %G_MAXINT for no timeout.
16619 * @out_serial: Return location for serial number assigned to @message when sending it or %NULL.
16620 * @cancellable: A #GCancellable or %NULL.
16621 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result.
16622 * @user_data: The data to pass to @callback.
16624 * Asynchronously sends @message to the peer represented by @connection.
16625 * Unless @flags contain the
16626 * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag, the serial number
16627 * will be assigned by @connection and set on @message via
16628 * g_dbus_message_set_serial(). If @out_serial is not %NULL, then the
16629 * serial number used will be written to this location prior to
16630 * submitting the message to the underlying transport.
16631 * If @connection is closed then the operation will fail with
16632 * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will
16633 * fail with %G_IO_ERROR_CANCELLED. If @message is not well-formed,
16634 * the operation fails with %G_IO_ERROR_INVALID_ARGUMENT.
16635 * This is an asynchronous method. When the operation is finished, @callback will be invoked
16636 * in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
16637 * of the thread you are calling this method from. You can then call
16638 * g_dbus_connection_send_message_with_reply_finish() to get the result of the operation.
16639 * See g_dbus_connection_send_message_with_reply_sync() for the synchronous version.
16640 * Note that @message must be unlocked, unless @flags contain the
16641 * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag.
16642 * See <xref linkend="gdbus-server"/> and <xref
16643 * linkend="gdbus-unix-fd-client"/> for an example of how to use this
16644 * low-level API to send and receive UNIX file descriptors.
16651 * g_dbus_connection_send_message_with_reply_finish:
16652 * @connection: a #GDBusConnection
16653 * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_send_message_with_reply().
16654 * @error: Return location for error or %NULL.
16656 * Finishes an operation started with g_dbus_connection_send_message_with_reply().
16657 * Note that @error is only set if a local in-process error
16658 * occured. That is to say that the returned #GDBusMessage object may
16659 * be of type %G_DBUS_MESSAGE_TYPE_ERROR. Use
16660 * g_dbus_message_to_gerror() to transcode this to a #GError.
16661 * See <xref linkend="gdbus-server"/> and <xref
16662 * linkend="gdbus-unix-fd-client"/> for an example of how to use this
16663 * low-level API to send and receive UNIX file descriptors.
16665 * Returns: (transfer full): A locked #GDBusMessage or %NULL if @error is set.
16671 * g_dbus_connection_send_message_with_reply_sync:
16672 * @connection: A #GDBusConnection.
16673 * @message: A #GDBusMessage.
16674 * @flags: Flags affecting how the message is sent.
16675 * @timeout_msec: The timeout in milliseconds, -1 to use the default timeout or %G_MAXINT for no timeout.
16676 * @out_serial: Return location for serial number assigned to @message when sending it or %NULL.
16677 * @cancellable: A #GCancellable or %NULL.
16678 * @error: Return location for error or %NULL.
16680 * Synchronously sends @message to the peer represented by @connection
16681 * and blocks the calling thread until a reply is received or the
16682 * timeout is reached. See g_dbus_connection_send_message_with_reply()
16683 * for the asynchronous version of this method.
16684 * Unless @flags contain the
16685 * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag, the serial number
16686 * will be assigned by @connection and set on @message via
16687 * g_dbus_message_set_serial(). If @out_serial is not %NULL, then the
16688 * serial number used will be written to this location prior to
16689 * submitting the message to the underlying transport.
16690 * If @connection is closed then the operation will fail with
16691 * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will
16692 * fail with %G_IO_ERROR_CANCELLED. If @message is not well-formed,
16693 * the operation fails with %G_IO_ERROR_INVALID_ARGUMENT.
16694 * Note that @error is only set if a local in-process error
16695 * occured. That is to say that the returned #GDBusMessage object may
16696 * be of type %G_DBUS_MESSAGE_TYPE_ERROR. Use
16697 * g_dbus_message_to_gerror() to transcode this to a #GError.
16698 * See <xref linkend="gdbus-server"/> and <xref
16699 * linkend="gdbus-unix-fd-client"/> for an example of how to use this
16700 * low-level API to send and receive UNIX file descriptors.
16701 * Note that @message must be unlocked, unless @flags contain the
16702 * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag.
16704 * Returns: (transfer full): A locked #GDBusMessage that is the reply to @message or %NULL if @error is set.
16710 * g_dbus_connection_set_exit_on_close:
16711 * @connection: A #GDBusConnection.
16712 * @exit_on_close: Whether the process should be terminated when @connection is closed by the remote peer.
16714 * Sets whether the process should be terminated when @connection is
16715 * closed by the remote peer. See #GDBusConnection:exit-on-close for
16723 * g_dbus_connection_signal_subscribe:
16724 * @connection: A #GDBusConnection.
16725 * @sender: Sender name to match on (unique or well-known name) or %NULL to listen from all senders.
16726 * @interface_name: D-Bus interface name to match on or %NULL to match on all interfaces.
16727 * @member: D-Bus signal name to match on or %NULL to match on all signals.
16728 * @object_path: Object path to match on or %NULL to match on all object paths.
16729 * @arg0: Contents of first string argument to match on or %NULL to match on all kinds of arguments.
16730 * @flags: Flags describing how to subscribe to the signal (currently unused).
16731 * @callback: Callback to invoke when there is a signal matching the requested data.
16732 * @user_data: User data to pass to @callback.
16733 * @user_data_free_func: Function to free @user_data with when subscription is removed or %NULL.
16735 * Subscribes to signals on @connection and invokes @callback with a
16736 * whenever the signal is received. Note that @callback
16737 * will be invoked in the <link
16738 * linkend="g-main-context-push-thread-default">thread-default main
16739 * loop</link> of the thread you are calling this method from.
16740 * If @connection is not a message bus connection, @sender must be
16742 * If @sender is a well-known name note that @callback is invoked with
16743 * the unique name for the owner of @sender, not the well-known name
16744 * as one would expect. This is because the message bus rewrites the
16745 * name. As such, to avoid certain race conditions, users should be
16746 * tracking the name owner of the well-known name and use that when
16747 * processing the received signal.
16749 * Returns: A subscription identifier that can be used with g_dbus_connection_signal_unsubscribe().
16755 * g_dbus_connection_signal_unsubscribe:
16756 * @connection: A #GDBusConnection.
16757 * @subscription_id: A subscription id obtained from g_dbus_connection_signal_subscribe().
16759 * Unsubscribes from signals.
16766 * g_dbus_connection_start_message_processing:
16767 * @connection: A #GDBusConnection.
16769 * If @connection was created with
16770 * %G_DBUS_CONNECTION_FLAGS_DELAY_MESSAGE_PROCESSING, this method
16771 * starts processing messages. Does nothing on if @connection wasn't
16772 * created with this flag or if the method has already been called.
16779 * g_dbus_connection_unregister_object:
16780 * @connection: A #GDBusConnection.
16781 * @registration_id: A registration id obtained from g_dbus_connection_register_object().
16783 * Unregisters an object.
16785 * Returns: %TRUE if the object was unregistered, %FALSE otherwise.
16791 * g_dbus_connection_unregister_subtree:
16792 * @connection: A #GDBusConnection.
16793 * @registration_id: A subtree registration id obtained from g_dbus_connection_register_subtree().
16795 * Unregisters a subtree.
16797 * Returns: %TRUE if the subtree was unregistered, %FALSE otherwise.
16803 * g_dbus_error_encode_gerror:
16804 * @error: A #GError.
16806 * Creates a D-Bus error name to use for @error. If @error matches
16807 * a registered error (cf. g_dbus_error_register_error()), the corresponding
16808 * D-Bus error name will be returned.
16809 * Otherwise the a name of the form
16810 * <literal>org.gtk.GDBus.UnmappedGError.Quark._ESCAPED_QUARK_NAME.Code_ERROR_CODE</literal>
16811 * will be used. This allows other GDBus applications to map the error
16812 * on the wire back to a #GError using g_dbus_error_new_for_dbus_error().
16813 * This function is typically only used in object mappings to put a
16814 * #GError on the wire. Regular applications should not use it.
16816 * Returns: A D-Bus error name (never %NULL). Free with g_free().
16822 * g_dbus_error_get_remote_error:
16823 * @error: A #GError.
16825 * Gets the D-Bus error name used for @error, if any.
16826 * This function is guaranteed to return a D-Bus error name for all
16827 * #GError<!-- -->s returned from functions handling remote method
16828 * calls (e.g. g_dbus_connection_call_finish()) unless
16829 * g_dbus_error_strip_remote_error() has been used on @error.
16831 * Returns: An allocated string or %NULL if the D-Bus error name could not be found. Free with g_free().
16837 * g_dbus_error_is_remote_error:
16838 * @error: A #GError.
16840 * Checks if @error represents an error received via D-Bus from a remote peer. If so,
16841 * use g_dbus_error_get_remote_error() to get the name of the error.
16842 * %FALSE otherwise.
16844 * Returns: %TRUE if @error represents an error from a remote peer,
16850 * g_dbus_error_new_for_dbus_error:
16851 * @dbus_error_name: D-Bus error name.
16852 * @dbus_error_message: D-Bus error message.
16854 * Creates a #GError based on the contents of @dbus_error_name and
16855 * Errors registered with g_dbus_error_register_error() will be looked
16856 * up using @dbus_error_name and if a match is found, the error domain
16857 * and code is used. Applications can use g_dbus_error_get_remote_error()
16858 * to recover @dbus_error_name.
16859 * If a match against a registered error is not found and the D-Bus
16860 * error name is in a form as returned by g_dbus_error_encode_gerror()
16861 * the error domain and code encoded in the name is used to
16862 * create the #GError. Also, @dbus_error_name is added to the error message
16863 * such that it can be recovered with g_dbus_error_get_remote_error().
16864 * Otherwise, a #GError with the error code %G_IO_ERROR_DBUS_ERROR
16865 * in the #G_IO_ERROR error domain is returned. Also, @dbus_error_name is
16866 * added to the error message such that it can be recovered with
16867 * g_dbus_error_get_remote_error().
16868 * In all three cases, @dbus_error_name can always be recovered from the
16869 * returned #GError using the g_dbus_error_get_remote_error() function
16870 * (unless g_dbus_error_strip_remote_error() hasn't been used on the returned error).
16871 * This function is typically only used in object mappings to prepare
16872 * #GError instances for applications. Regular applications should not use
16875 * Returns: An allocated #GError. Free with g_error_free().
16881 * g_dbus_error_register_error:
16882 * @error_domain: A #GQuark for a error domain.
16883 * @error_code: An error code.
16884 * @dbus_error_name: A D-Bus error name.
16886 * Creates an association to map between @dbus_error_name and
16887 * #GError<!-- -->s specified by @error_domain and @error_code.
16888 * This is typically done in the routine that returns the #GQuark for
16892 * Returns: %TRUE if the association was created, %FALSE if it already
16898 * g_dbus_error_register_error_domain:
16899 * @error_domain_quark_name: The error domain name.
16900 * @quark_volatile: A pointer where to store the #GQuark.
16901 * @entries: A pointer to @num_entries #GDBusErrorEntry struct items.
16902 * @num_entries: Number of items to register.
16904 * Helper function for associating a #GError error domain with D-Bus error names.
16911 * g_dbus_error_set_dbus_error:
16912 * @error: A pointer to a #GError or %NULL.
16913 * @dbus_error_name: D-Bus error name.
16914 * @dbus_error_message: D-Bus error message.
16915 * @format: printf()-style format to prepend to @dbus_error_message or %NULL.
16916 * @...: Arguments for @format.
16918 * Does nothing if @error is %NULL. Otherwise sets *@error to
16919 * a new #GError created with g_dbus_error_new_for_dbus_error()
16920 * with @dbus_error_message prepend with @format (unless %NULL).
16927 * g_dbus_error_set_dbus_error_valist:
16928 * @error: A pointer to a #GError or %NULL.
16929 * @dbus_error_name: D-Bus error name.
16930 * @dbus_error_message: D-Bus error message.
16931 * @format: printf()-style format to prepend to @dbus_error_message or %NULL.
16932 * @var_args: Arguments for @format.
16934 * Like g_dbus_error_set_dbus_error() but intended for language bindings.
16941 * g_dbus_error_strip_remote_error:
16942 * @error: A #GError.
16944 * Looks for extra information in the error message used to recover
16945 * the D-Bus error name and strips it if found. If stripped, the
16946 * message field in @error will correspond exactly to what was
16947 * received on the wire.
16948 * This is typically used when presenting errors to the end user.
16950 * Returns: %TRUE if information was stripped, %FALSE otherwise.
16956 * g_dbus_error_unregister_error:
16957 * @error_domain: A #GQuark for a error domain.
16958 * @error_code: An error code.
16959 * @dbus_error_name: A D-Bus error name.
16961 * Destroys an association previously set up with g_dbus_error_register_error().
16963 * Returns: %TRUE if the association was destroyed, %FALSE if it wasn't found.
16969 * g_dbus_generate_guid:
16971 * Generate a D-Bus GUID that can be used with
16972 * e.g. g_dbus_connection_new().
16973 * See the D-Bus specification regarding what strings are valid D-Bus
16974 * GUID (for example, D-Bus GUIDs are not RFC-4122 compliant).
16976 * Returns: A valid D-Bus GUID. Free with g_free().
16982 * g_dbus_interface_info_generate_xml:
16983 * @info: A #GDBusNodeInfo
16984 * @indent: Indentation level.
16985 * @string_builder: A #GString to to append XML data to.
16987 * Appends an XML representation of @info (and its children) to @string_builder.
16988 * This function is typically used for generating introspection XML
16989 * documents at run-time for handling the
16990 * <literal>org.freedesktop.DBus.Introspectable.Introspect</literal>
16998 * g_dbus_interface_info_lookup_method:
16999 * @info: A #GDBusInterfaceInfo.
17000 * @name: A D-Bus method name (typically in CamelCase)
17002 * Looks up information about a method.
17003 * This cost of this function is O(n) in number of methods.
17005 * Returns: A #GDBusMethodInfo or %NULL if not found. Do not free, it is owned by @info.
17011 * g_dbus_interface_info_lookup_property:
17012 * @info: A #GDBusInterfaceInfo.
17013 * @name: A D-Bus property name (typically in CamelCase).
17015 * Looks up information about a property.
17016 * This cost of this function is O(n) in number of properties.
17018 * Returns: A #GDBusPropertyInfo or %NULL if not found. Do not free, it is owned by @info.
17024 * g_dbus_interface_info_lookup_signal:
17025 * @info: A #GDBusInterfaceInfo.
17026 * @name: A D-Bus signal name (typically in CamelCase)
17028 * Looks up information about a signal.
17029 * This cost of this function is O(n) in number of signals.
17031 * Returns: A #GDBusSignalInfo or %NULL if not found. Do not free, it is owned by @info.
17037 * g_dbus_interface_info_ref:
17038 * @info: A #GDBusInterfaceInfo
17040 * If @info is statically allocated does nothing. Otherwise increases
17041 * the reference count.
17043 * Returns: The same @info.
17049 * g_dbus_interface_info_unref:
17050 * @info: A #GDBusInterfaceInfo.
17052 * If @info is statically allocated, does nothing. Otherwise decreases
17053 * the reference count of @info. When its reference count drops to 0,
17054 * the memory used is freed.
17061 * g_dbus_is_address:
17062 * @string: A string.
17064 * Checks if @string is a D-Bus address.
17065 * This doesn't check if @string is actually supported by #GDBusServer
17066 * or #GDBusConnection - use g_dbus_is_supported_address() to do more
17069 * Returns: %TRUE if @string is a valid D-Bus address, %FALSE otherwise.
17076 * @string: The string to check.
17078 * Checks if @string is a D-Bus GUID.
17079 * See the D-Bus specification regarding what strings are valid D-Bus
17080 * GUID (for example, D-Bus GUIDs are not RFC-4122 compliant).
17082 * Returns: %TRUE if @string is a guid, %FALSE otherwise.
17088 * g_dbus_is_interface_name:
17089 * @string: The string to check.
17091 * Checks if @string is a valid D-Bus interface name.
17093 * Returns: %TRUE if valid, %FALSE otherwise.
17099 * g_dbus_is_member_name:
17100 * @string: The string to check.
17102 * Checks if @string is a valid D-Bus member (e.g. signal or method) name.
17104 * Returns: %TRUE if valid, %FALSE otherwise.
17111 * @string: The string to check.
17113 * Checks if @string is a valid D-Bus bus name (either unique or well-known).
17115 * Returns: %TRUE if valid, %FALSE otherwise.
17121 * g_dbus_is_supported_address:
17122 * @string: A string.
17123 * @error: Return location for error or %NULL.
17125 * Like g_dbus_is_address() but also checks if the library suppors the
17126 * transports in @string and that key/value pairs for each transport
17128 * supported by this library, %FALSE if @error is set.
17130 * Returns: %TRUE if @string is a valid D-Bus address that is
17136 * g_dbus_is_unique_name:
17137 * @string: The string to check.
17139 * Checks if @string is a valid D-Bus unique bus name.
17141 * Returns: %TRUE if valid, %FALSE otherwise.
17147 * g_dbus_message_bytes_needed:
17148 * @blob: A blob represent a binary D-Bus message.
17149 * @blob_len: The length of @blob (must be at least 16).
17150 * @error: Return location for error or %NULL.
17152 * Utility function to calculate how many bytes are needed to
17153 * completely deserialize the D-Bus message stored at @blob.
17154 * determine the size).
17156 * Returns: Number of bytes needed or -1 if @error is set (e.g. if
17162 * g_dbus_message_copy:
17163 * @message: A #GDBusMessage.
17164 * @error: Return location for error or %NULL.
17166 * Copies @message. The copy is a deep copy and the returned
17167 * #GDBusMessage is completely identical except that it is guaranteed
17168 * to not be locked.
17169 * This operation can fail if e.g. @message contains file descriptors
17170 * and the per-process or system-wide open files limit is reached.
17171 * g_object_unref().
17173 * Returns: (transfer full): A new #GDBusMessage or %NULL if @error is set. Free with
17179 * g_dbus_message_get_arg0:
17180 * @message: A #GDBusMessage.
17182 * Convenience to get the first item in the body of @message.
17184 * Returns: The string item or %NULL if the first item in the body of
17190 * g_dbus_message_get_body:
17191 * @message: A #GDBusMessage.
17193 * Gets the body of a message.
17195 * Returns: A #GVariant or %NULL if the body is empty. Do not free, it is owned by @message.
17201 * g_dbus_message_get_byte_order:
17202 * @message: A #GDBusMessage.
17204 * Gets the byte order of @message.
17206 * Returns: The byte order.
17211 * g_dbus_message_get_destination:
17212 * @message: A #GDBusMessage.
17214 * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION header field.
17216 * Returns: The value.
17222 * g_dbus_message_get_error_name:
17223 * @message: A #GDBusMessage.
17225 * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field.
17227 * Returns: The value.
17233 * g_dbus_message_get_flags:
17234 * @message: A #GDBusMessage.
17236 * Gets the flags for @message.
17238 * Returns: Flags that are set (typically values from the #GDBusMessageFlags enumeration bitwise ORed together).
17244 * g_dbus_message_get_header:
17245 * @message: A #GDBusMessage.
17246 * @header_field: A 8-bit unsigned integer (typically a value from the #GDBusMessageHeaderField enumeration)
17248 * Gets a header field on @message.
17249 * otherwise. Do not free, it is owned by @message.
17251 * Returns: A #GVariant with the value if the header was found, %NULL
17257 * g_dbus_message_get_header_fields:
17258 * @message: A #GDBusMessage.
17260 * Gets an array of all header fields on @message that are set.
17261 * %G_DBUS_MESSAGE_HEADER_FIELD_INVALID. Each element is a
17262 * #guchar. Free with g_free().
17264 * Returns: An array of header fields terminated by
17270 * g_dbus_message_get_interface:
17271 * @message: A #GDBusMessage.
17273 * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE header field.
17275 * Returns: The value.
17281 * g_dbus_message_get_locked:
17282 * @message: A #GDBusMessage.
17284 * Checks whether @message is locked. To monitor changes to this
17285 * value, conncet to the #GObject::notify signal to listen for changes
17286 * on the #GDBusMessage:locked property.
17288 * Returns: %TRUE if @message is locked, %FALSE otherwise.
17294 * g_dbus_message_get_member:
17295 * @message: A #GDBusMessage.
17297 * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_MEMBER header field.
17299 * Returns: The value.
17305 * g_dbus_message_get_message_type:
17306 * @message: A #GDBusMessage.
17308 * Gets the type of @message.
17310 * Returns: A 8-bit unsigned integer (typically a value from the #GDBusMessageType enumeration).
17316 * g_dbus_message_get_num_unix_fds:
17317 * @message: A #GDBusMessage.
17319 * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header field.
17321 * Returns: The value.
17327 * g_dbus_message_get_path:
17328 * @message: A #GDBusMessage.
17330 * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_PATH header field.
17332 * Returns: The value.
17338 * g_dbus_message_get_reply_serial:
17339 * @message: A #GDBusMessage.
17341 * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL header field.
17343 * Returns: The value.
17349 * g_dbus_message_get_sender:
17350 * @message: A #GDBusMessage.
17352 * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_SENDER header field.
17354 * Returns: The value.
17360 * g_dbus_message_get_serial:
17361 * @message: A #GDBusMessage.
17363 * Gets the serial for @message.
17365 * Returns: A #guint32.
17371 * g_dbus_message_get_signature:
17372 * @message: A #GDBusMessage.
17374 * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field.
17376 * Returns: The value.
17382 * g_dbus_message_get_unix_fd_list:
17383 * @message: A #GDBusMessage.
17385 * Gets the UNIX file descriptors associated with @message, if any.
17386 * This method is only available on UNIX.
17387 * associated. Do not free, this object is owned by @message.
17389 * Returns: (transfer none): A #GUnixFDList or %NULL if no file descriptors are
17395 * g_dbus_message_lock:
17396 * @message: A #GDBusMessage.
17398 * If @message is locked, does nothing. Otherwise locks the message.
17405 * g_dbus_message_new:
17407 * Creates a new empty #GDBusMessage.
17409 * Returns: A #GDBusMessage. Free with g_object_unref().
17415 * g_dbus_message_new_from_blob:
17416 * @blob: A blob represent a binary D-Bus message.
17417 * @blob_len: The length of @blob.
17418 * @capabilities: A #GDBusCapabilityFlags describing what protocol features are supported.
17419 * @error: Return location for error or %NULL.
17421 * Creates a new #GDBusMessage from the data stored at @blob. The byte
17422 * order that the message was in can be retrieved using
17423 * g_dbus_message_get_byte_order().
17424 * g_object_unref().
17426 * Returns: A new #GDBusMessage or %NULL if @error is set. Free with
17432 * g_dbus_message_new_method_call:
17433 * @name: A valid D-Bus name or %NULL.
17434 * @path: A valid object path.
17435 * @interface_: A valid D-Bus interface name or %NULL.
17436 * @method: A valid method name.
17438 * Creates a new #GDBusMessage for a method call.
17440 * Returns: A #GDBusMessage. Free with g_object_unref().
17446 * g_dbus_message_new_method_error:
17447 * @method_call_message: A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to create a reply message to.
17448 * @error_name: A valid D-Bus error name.
17449 * @error_message_format: The D-Bus error message in a printf() format.
17450 * @...: Arguments for @error_message_format.
17452 * Creates a new #GDBusMessage that is an error reply to @method_call_message.
17454 * Returns: (transfer full): A #GDBusMessage. Free with g_object_unref().
17460 * g_dbus_message_new_method_error_literal:
17461 * @method_call_message: A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to create a reply message to.
17462 * @error_name: A valid D-Bus error name.
17463 * @error_message: The D-Bus error message.
17465 * Creates a new #GDBusMessage that is an error reply to @method_call_message.
17467 * Returns: (transfer full): A #GDBusMessage. Free with g_object_unref().
17473 * g_dbus_message_new_method_error_valist:
17474 * @method_call_message: A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to create a reply message to.
17475 * @error_name: A valid D-Bus error name.
17476 * @error_message_format: The D-Bus error message in a printf() format.
17477 * @var_args: Arguments for @error_message_format.
17479 * Like g_dbus_message_new_method_error() but intended for language bindings.
17481 * Returns: (transfer full): A #GDBusMessage. Free with g_object_unref().
17487 * g_dbus_message_new_method_reply:
17488 * @method_call_message: A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to create a reply message to.
17490 * Creates a new #GDBusMessage that is a reply to @method_call_message.
17492 * Returns: (transfer full): #GDBusMessage. Free with g_object_unref().
17498 * g_dbus_message_new_signal:
17499 * @path: A valid object path.
17500 * @interface_: A valid D-Bus interface name.
17501 * @signal: A valid signal name.
17503 * Creates a new #GDBusMessage for a signal emission.
17505 * Returns: A #GDBusMessage. Free with g_object_unref().
17511 * g_dbus_message_print:
17512 * @message: A #GDBusMessage.
17513 * @indent: Indentation level.
17515 * Produces a human-readable multi-line description of @message.
17516 * The contents of the description has no ABI guarantees, the contents
17517 * and formatting is subject to change at any time. Typical output
17518 * looks something like this:
17521 * path -> objectpath '/org/gtk/GDBus/TestObject'
17522 * interface -> 'org.gtk.GDBus.TestInterface'
17523 * member -> 'GimmeStdout'
17524 * destination -> ':1.146'
17525 * UNIX File Descriptors:
17527 * </programlisting>
17531 * reply-serial -> uint32 4
17532 * destination -> ':1.159'
17533 * sender -> ':1.146'
17534 * num-unix-fds -> uint32 1
17535 * UNIX File Descriptors:
17536 * </programlisting>
17538 * Type: method-return
17539 * Flags: no-reply-expected
17543 * Fd 12: dev=0:10,mode=020620,ino=5,uid=500,gid=5,rdev=136:2,size=0,atime=1273085037,mtime=1273085851,ctime=1272982635
17544 * Returns: A string that should be freed with g_free().
17550 * g_dbus_message_set_body:
17551 * @message: A #GDBusMessage.
17552 * @body: Either %NULL or a #GVariant that is a tuple.
17554 * Sets the body @message. As a side-effect the
17555 * %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field is set to the
17556 * type string of @body (or cleared if @body is %NULL).
17557 * If @body is floating, @message assumes ownership of @body.
17564 * g_dbus_message_set_byte_order:
17565 * @message: A #GDBusMessage.
17566 * @byte_order: The byte order.
17568 * Sets the byte order of @message.
17573 * g_dbus_message_set_destination:
17574 * @message: A #GDBusMessage.
17575 * @value: The value to set.
17577 * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION header field.
17584 * g_dbus_message_set_error_name:
17585 * @message: A #GDBusMessage.
17586 * @value: The value to set.
17588 * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field.
17595 * g_dbus_message_set_flags:
17596 * @message: A #GDBusMessage.
17597 * @flags: Flags for @message that are set (typically values from the #GDBusMessageFlags enumeration bitwise ORed together).
17599 * Sets the flags to set on @message.
17606 * g_dbus_message_set_header:
17607 * @message: A #GDBusMessage.
17608 * @header_field: A 8-bit unsigned integer (typically a value from the #GDBusMessageHeaderField enumeration)
17609 * @value: A #GVariant to set the header field or %NULL to clear the header field.
17611 * Sets a header field on @message.
17612 * If @value is floating, @message assumes ownership of @value.
17619 * g_dbus_message_set_interface:
17620 * @message: A #GDBusMessage.
17621 * @value: The value to set.
17623 * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE header field.
17630 * g_dbus_message_set_member:
17631 * @message: A #GDBusMessage.
17632 * @value: The value to set.
17634 * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_MEMBER header field.
17641 * g_dbus_message_set_message_type:
17642 * @message: A #GDBusMessage.
17643 * @type: A 8-bit unsigned integer (typically a value from the #GDBusMessageType enumeration).
17645 * Sets @message to be of @type.
17652 * g_dbus_message_set_num_unix_fds:
17653 * @message: A #GDBusMessage.
17654 * @value: The value to set.
17656 * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header field.
17663 * g_dbus_message_set_path:
17664 * @message: A #GDBusMessage.
17665 * @value: The value to set.
17667 * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_PATH header field.
17674 * g_dbus_message_set_reply_serial:
17675 * @message: A #GDBusMessage.
17676 * @value: The value to set.
17678 * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL header field.
17685 * g_dbus_message_set_sender:
17686 * @message: A #GDBusMessage.
17687 * @value: The value to set.
17689 * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_SENDER header field.
17696 * g_dbus_message_set_serial:
17697 * @message: A #GDBusMessage.
17698 * @serial: A #guint32.
17700 * Sets the serial for @message.
17707 * g_dbus_message_set_signature:
17708 * @message: A #GDBusMessage.
17709 * @value: The value to set.
17711 * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field.
17718 * g_dbus_message_set_unix_fd_list:
17719 * @message: A #GDBusMessage.
17720 * @fd_list: (allow-none): A #GUnixFDList or %NULL.
17722 * Sets the UNIX file descriptors associated with @message. As a
17723 * side-effect the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header
17724 * field is set to the number of fds in @fd_list (or cleared if
17725 * This method is only available on UNIX.
17732 * g_dbus_message_to_blob:
17733 * @message: A #GDBusMessage.
17734 * @out_size: Return location for size of generated blob.
17735 * @capabilities: A #GDBusCapabilityFlags describing what protocol features are supported.
17736 * @error: Return location for error.
17738 * Serializes @message to a blob. The byte order returned by
17739 * g_dbus_message_get_byte_order() will be used.
17740 * generated by @message or %NULL if @error is set. Free with g_free().
17742 * Returns: A pointer to a valid binary D-Bus message of @out_size bytes
17748 * g_dbus_message_to_gerror:
17749 * @message: A #GDBusMessage.
17750 * @error: The #GError to set.
17752 * If @message is not of type %G_DBUS_MESSAGE_TYPE_ERROR does
17753 * nothing and returns %FALSE.
17754 * Otherwise this method encodes the error in @message as a #GError
17755 * using g_dbus_error_set_dbus_error() using the information in the
17756 * %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field of @message as
17757 * well as the first string item in @message's body.
17759 * Returns: %TRUE if @error was set, %FALSE otherwise.
17765 * g_dbus_method_info_ref:
17766 * @info: A #GDBusMethodInfo
17768 * If @info is statically allocated does nothing. Otherwise increases
17769 * the reference count.
17771 * Returns: The same @info.
17777 * g_dbus_method_info_unref:
17778 * @info: A #GDBusMethodInfo.
17780 * If @info is statically allocated, does nothing. Otherwise decreases
17781 * the reference count of @info. When its reference count drops to 0,
17782 * the memory used is freed.
17789 * g_dbus_method_invocation_get_connection:
17790 * @invocation: A #GDBusMethodInvocation.
17792 * Gets the #GDBusConnection the method was invoked on.
17794 * Returns: (transfer none): A #GDBusConnection. Do not free, it is owned by @invocation.
17800 * g_dbus_method_invocation_get_interface_name:
17801 * @invocation: A #GDBusMethodInvocation.
17803 * Gets the name of the D-Bus interface the method was invoked on.
17805 * Returns: A string. Do not free, it is owned by @invocation.
17811 * g_dbus_method_invocation_get_message:
17812 * @invocation: A #GDBusMethodInvocation.
17814 * Gets the #GDBusMessage for the method invocation. This is useful if
17815 * you need to use low-level protocol features, such as UNIX file
17816 * descriptor passing, that cannot be properly expressed in the
17818 * See <xref linkend="gdbus-server"/> and <xref
17819 * linkend="gdbus-unix-fd-client"/> for an example of how to use this
17820 * low-level API to send and receive UNIX file descriptors.
17822 * Returns: (transfer none): #GDBusMessage. Do not free, it is owned by @invocation.
17828 * g_dbus_method_invocation_get_method_info:
17829 * @invocation: A #GDBusMethodInvocation.
17831 * Gets information about the method call, if any.
17833 * Returns: A #GDBusMethodInfo or %NULL. Do not free, it is owned by @invocation.
17839 * g_dbus_method_invocation_get_method_name:
17840 * @invocation: A #GDBusMethodInvocation.
17842 * Gets the name of the method that was invoked.
17844 * Returns: A string. Do not free, it is owned by @invocation.
17850 * g_dbus_method_invocation_get_object_path:
17851 * @invocation: A #GDBusMethodInvocation.
17853 * Gets the object path the method was invoked on.
17855 * Returns: A string. Do not free, it is owned by @invocation.
17861 * g_dbus_method_invocation_get_parameters:
17862 * @invocation: A #GDBusMethodInvocation.
17864 * Gets the parameters of the method invocation.
17866 * Returns: A #GVariant. Do not free, it is owned by @invocation.
17872 * g_dbus_method_invocation_get_sender:
17873 * @invocation: A #GDBusMethodInvocation.
17875 * Gets the bus name that invoked the method.
17877 * Returns: A string. Do not free, it is owned by @invocation.
17883 * g_dbus_method_invocation_get_user_data: (skip)
17884 * @invocation: A #GDBusMethodInvocation.
17886 * Gets the @user_data #gpointer passed to g_dbus_connection_register_object().
17888 * Returns: A #gpointer.
17894 * g_dbus_method_invocation_return_dbus_error:
17895 * @invocation: A #GDBusMethodInvocation.
17896 * @error_name: A valid D-Bus error name.
17897 * @error_message: A valid D-Bus error message.
17899 * Finishes handling a D-Bus method call by returning an error.
17900 * This method will free @invocation, you cannot use it afterwards.
17907 * g_dbus_method_invocation_return_error:
17908 * @invocation: A #GDBusMethodInvocation.
17909 * @domain: A #GQuark for the #GError error domain.
17910 * @code: The error code.
17911 * @format: printf()-style format.
17912 * @...: Parameters for @format.
17914 * Finishes handling a D-Bus method call by returning an error.
17915 * See g_dbus_error_encode_gerror() for details about what error name
17916 * will be returned on the wire. In a nutshell, if the given error is
17917 * registered using g_dbus_error_register_error() the name given
17918 * during registration is used. Otherwise, a name of the form
17919 * <literal>org.gtk.GDBus.UnmappedGError.Quark...</literal> is
17920 * used. This provides transparent mapping of #GError between
17921 * applications using GDBus.
17922 * If you are writing an application intended to be portable,
17923 * <emphasis>always</emphasis> register errors with g_dbus_error_register_error()
17924 * or use g_dbus_method_invocation_return_dbus_error().
17925 * This method will free @invocation, you cannot use it afterwards.
17932 * g_dbus_method_invocation_return_error_literal:
17933 * @invocation: A #GDBusMethodInvocation.
17934 * @domain: A #GQuark for the #GError error domain.
17935 * @code: The error code.
17936 * @message: The error message.
17938 * Like g_dbus_method_invocation_return_error() but without printf()-style formatting.
17939 * This method will free @invocation, you cannot use it afterwards.
17946 * g_dbus_method_invocation_return_error_valist:
17947 * @invocation: A #GDBusMethodInvocation.
17948 * @domain: A #GQuark for the #GError error domain.
17949 * @code: The error code.
17950 * @format: printf()-style format.
17951 * @var_args: #va_list of parameters for @format.
17953 * Like g_dbus_method_invocation_return_error() but intended for
17954 * language bindings.
17955 * This method will free @invocation, you cannot use it afterwards.
17962 * g_dbus_method_invocation_return_gerror:
17963 * @invocation: A #GDBusMethodInvocation.
17964 * @error: A #GError.
17966 * Like g_dbus_method_invocation_return_error() but takes a #GError
17967 * instead of the error domain, error code and message.
17968 * This method will free @invocation, you cannot use it afterwards.
17975 * g_dbus_method_invocation_return_value:
17976 * @invocation: A #GDBusMethodInvocation.
17977 * @parameters: A #GVariant tuple with out parameters for the method or %NULL if not passing any parameters.
17979 * Finishes handling a D-Bus method call by returning @parameters.
17980 * If the @parameters GVariant is floating, it is consumed.
17981 * It is an error if @parameters is not of the right format.
17982 * This method will free @invocation, you cannot use it afterwards.
17989 * g_dbus_node_info_generate_xml:
17990 * @info: A #GDBusNodeInfo.
17991 * @indent: Indentation level.
17992 * @string_builder: A #GString to to append XML data to.
17994 * Appends an XML representation of @info (and its children) to @string_builder.
17995 * This function is typically used for generating introspection XML documents at run-time for
17996 * handling the <literal>org.freedesktop.DBus.Introspectable.Introspect</literal> method.
18003 * g_dbus_node_info_lookup_interface:
18004 * @info: A #GDBusNodeInfo.
18005 * @name: A D-Bus interface name.
18007 * Looks up information about an interface.
18008 * This cost of this function is O(n) in number of interfaces.
18010 * Returns: A #GDBusInterfaceInfo or %NULL if not found. Do not free, it is owned by @info.
18016 * g_dbus_node_info_new_for_xml:
18017 * @xml_data: Valid D-Bus introspection XML.
18018 * @error: Return location for error.
18020 * Parses @xml_data and returns a #GDBusNodeInfo representing the data.
18021 * with g_dbus_node_info_unref().
18023 * Returns: A #GDBusNodeInfo structure or %NULL if @error is set. Free
18029 * g_dbus_node_info_ref:
18030 * @info: A #GDBusNodeInfo
18032 * If @info is statically allocated does nothing. Otherwise increases
18033 * the reference count.
18035 * Returns: The same @info.
18041 * g_dbus_node_info_unref:
18042 * @info: A #GDBusNodeInfo.
18044 * If @info is statically allocated, does nothing. Otherwise decreases
18045 * the reference count of @info. When its reference count drops to 0,
18046 * the memory used is freed.
18053 * g_dbus_property_info_ref:
18054 * @info: A #GDBusPropertyInfo
18056 * If @info is statically allocated does nothing. Otherwise increases
18057 * the reference count.
18059 * Returns: The same @info.
18065 * g_dbus_property_info_unref:
18066 * @info: A #GDBusPropertyInfo.
18068 * If @info is statically allocated, does nothing. Otherwise decreases
18069 * the reference count of @info. When its reference count drops to 0,
18070 * the memory used is freed.
18077 * g_dbus_proxy_call:
18078 * @proxy: A #GDBusProxy.
18079 * @method_name: Name of method to invoke.
18080 * @parameters: A #GVariant tuple with parameters for the signal or %NULL if not passing parameters.
18081 * @flags: Flags from the #GDBusCallFlags enumeration.
18082 * @timeout_msec: The timeout in milliseconds (with %G_MAXINT meaning "infinite") or -1 to use the proxy default timeout.
18083 * @cancellable: A #GCancellable or %NULL.
18084 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
18085 * @user_data: The data to pass to @callback.
18087 * Asynchronously invokes the @method_name method on @proxy.
18088 * If @method_name contains any dots, then @name is split into interface and
18089 * method name parts. This allows using @proxy for invoking methods on
18090 * other interfaces.
18091 * If the #GDBusConnection associated with @proxy is closed then
18092 * the operation will fail with %G_IO_ERROR_CLOSED. If
18093 * %G_IO_ERROR_CANCELLED. If @parameters contains a value not
18094 * compatible with the D-Bus protocol, the operation fails with
18095 * %G_IO_ERROR_INVALID_ARGUMENT.
18096 * If the @parameters #GVariant is floating, it is consumed. This allows
18097 * convenient 'inline' use of g_variant_new(), e.g.:
18099 * g_dbus_proxy_call (proxy,
18101 * g_variant_new ("(ss)",
18104 * G_DBUS_CALL_FLAGS_NONE,
18107 * (GAsyncReadyCallback) two_strings_done,
18110 * This is an asynchronous method. When the operation is finished,
18111 * <link linkend="g-main-context-push-thread-default">thread-default
18112 * main loop</link> of the thread you are calling this method from.
18113 * You can then call g_dbus_proxy_call_finish() to get the result of
18114 * the operation. See g_dbus_proxy_call_sync() for the synchronous
18115 * version of this method.
18122 * g_dbus_proxy_call_finish:
18123 * @proxy: A #GDBusProxy.
18124 * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_proxy_call().
18125 * @error: Return location for error or %NULL.
18127 * Finishes an operation started with g_dbus_proxy_call().
18128 * return values. Free with g_variant_unref().
18130 * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
18136 * g_dbus_proxy_call_sync:
18137 * @proxy: A #GDBusProxy.
18138 * @method_name: Name of method to invoke.
18139 * @parameters: A #GVariant tuple with parameters for the signal or %NULL if not passing parameters.
18140 * @flags: Flags from the #GDBusCallFlags enumeration.
18141 * @timeout_msec: The timeout in milliseconds (with %G_MAXINT meaning "infinite") or -1 to use the proxy default timeout.
18142 * @cancellable: A #GCancellable or %NULL.
18143 * @error: Return location for error or %NULL.
18145 * Synchronously invokes the @method_name method on @proxy.
18146 * If @method_name contains any dots, then @name is split into interface and
18147 * method name parts. This allows using @proxy for invoking methods on
18148 * other interfaces.
18149 * If the #GDBusConnection associated with @proxy is disconnected then
18150 * the operation will fail with %G_IO_ERROR_CLOSED. If
18151 * %G_IO_ERROR_CANCELLED. If @parameters contains a value not
18152 * compatible with the D-Bus protocol, the operation fails with
18153 * %G_IO_ERROR_INVALID_ARGUMENT.
18154 * If the @parameters #GVariant is floating, it is consumed. This allows
18155 * convenient 'inline' use of g_variant_new(), e.g.:
18157 * g_dbus_proxy_call_sync (proxy,
18159 * g_variant_new ("(ss)",
18162 * G_DBUS_CALL_FLAGS_NONE,
18167 * The calling thread is blocked until a reply is received. See
18168 * g_dbus_proxy_call() for the asynchronous version of this
18170 * return values. Free with g_variant_unref().
18172 * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
18178 * g_dbus_proxy_get_cached_property:
18179 * @proxy: A #GDBusProxy.
18180 * @property_name: Property name.
18182 * Looks up the value for a property from the cache. This call does no
18184 * If @proxy has an expected interface (see
18185 * #GDBusProxy:g-interface-info), then @property_name (for existence)
18186 * is checked against it.
18187 * for @property_name or %NULL if the value is not in the cache. The
18188 * returned reference must be freed with g_variant_unref().
18190 * Returns: A reference to the #GVariant instance that holds the value
18196 * g_dbus_proxy_get_cached_property_names:
18197 * @proxy: A #GDBusProxy.
18199 * Gets the names of all cached properties on @proxy.
18200 * no cached properties. Free the returned array with g_strfreev().
18202 * Returns: A %NULL-terminated array of strings or %NULL if @proxy has
18208 * g_dbus_proxy_get_connection:
18209 * @proxy: A #GDBusProxy.
18211 * Gets the connection @proxy is for.
18213 * Returns: (transfer none): A #GDBusConnection owned by @proxy. Do not free.
18219 * g_dbus_proxy_get_default_timeout:
18220 * @proxy: A #GDBusProxy.
18222 * Gets the timeout to use if -1 (specifying default timeout) is
18223 * passed as @timeout_msec in the g_dbus_proxy_call() and
18224 * g_dbus_proxy_call_sync() functions.
18225 * See the #GDBusProxy:g-default-timeout property for more details.
18227 * Returns: Timeout to use for @proxy.
18233 * g_dbus_proxy_get_flags:
18234 * @proxy: A #GDBusProxy.
18236 * Gets the flags that @proxy was constructed with.
18238 * Returns: Flags from the #GDBusProxyFlags enumeration.
18244 * g_dbus_proxy_get_interface_info:
18245 * @proxy: A #GDBusProxy
18247 * Returns the #GDBusInterfaceInfo, if any, specifying the minimal
18248 * interface that @proxy conforms to.
18249 * See the #GDBusProxy:g-interface-info property for more details.
18250 * object, it is owned by @proxy.
18252 * Returns: A #GDBusInterfaceInfo or %NULL. Do not unref the returned
18258 * g_dbus_proxy_get_interface_name:
18259 * @proxy: A #GDBusProxy.
18261 * Gets the D-Bus interface name @proxy is for.
18263 * Returns: A string owned by @proxy. Do not free.
18269 * g_dbus_proxy_get_name:
18270 * @proxy: A #GDBusProxy.
18272 * Gets the name that @proxy was constructed for.
18274 * Returns: A string owned by @proxy. Do not free.
18280 * g_dbus_proxy_get_name_owner:
18281 * @proxy: A #GDBusProxy.
18283 * The unique name that owns the name that @proxy is for or %NULL if
18284 * no-one currently owns that name. You may connect to the
18285 * #GObject::notify signal to track changes to the
18286 * #GDBusProxy:g-name-owner property.
18288 * Returns: The name owner or %NULL if no name owner exists. Free with g_free().
18294 * g_dbus_proxy_get_object_path:
18295 * @proxy: A #GDBusProxy.
18297 * Gets the object path @proxy is for.
18299 * Returns: A string owned by @proxy. Do not free.
18305 * g_dbus_proxy_new:
18306 * @connection: A #GDBusConnection.
18307 * @flags: Flags used when constructing the proxy.
18308 * @info: A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL.
18309 * @name: A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
18310 * @object_path: An object path.
18311 * @interface_name: A D-Bus interface name.
18312 * @cancellable: A #GCancellable or %NULL.
18313 * @callback: Callback function to invoke when the proxy is ready.
18314 * @user_data: User data to pass to @callback.
18316 * Creates a proxy for accessing @interface_name on the remote object
18317 * at @object_path owned by @name at @connection and asynchronously
18318 * loads D-Bus properties unless the
18319 * %G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES flag is used. Connect to
18320 * the #GDBusProxy::g-properties-changed signal to get notified about
18321 * property changes.
18322 * If the %G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS flag is not set, also sets up
18323 * match rules for signals. Connect to the #GDBusProxy::g-signal signal
18324 * to handle signals from the remote object.
18325 * If @name is a well-known name and the
18326 * %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag isn't set and no name
18327 * owner currently exists, the message bus will be requested to launch
18328 * a name owner for the name.
18329 * This is a failable asynchronous constructor - when the proxy is
18330 * ready, @callback will be invoked and you can use
18331 * g_dbus_proxy_new_finish() to get the result.
18332 * See g_dbus_proxy_new_sync() and for a synchronous version of this constructor.
18333 * See <xref linkend="gdbus-wellknown-proxy"/> for an example of how #GDBusProxy can be used.
18340 * g_dbus_proxy_new_finish:
18341 * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback function passed to g_dbus_proxy_new().
18342 * @error: Return location for error or %NULL.
18344 * Finishes creating a #GDBusProxy.
18346 * Returns: A #GDBusProxy or %NULL if @error is set. Free with g_object_unref().
18352 * g_dbus_proxy_new_for_bus:
18353 * @bus_type: A #GBusType.
18354 * @flags: Flags used when constructing the proxy.
18355 * @info: A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL.
18356 * @name: A bus name (well-known or unique).
18357 * @object_path: An object path.
18358 * @interface_name: A D-Bus interface name.
18359 * @cancellable: A #GCancellable or %NULL.
18360 * @callback: Callback function to invoke when the proxy is ready.
18361 * @user_data: User data to pass to @callback.
18363 * Like g_dbus_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
18364 * See <xref linkend="gdbus-wellknown-proxy"/> for an example of how #GDBusProxy can be used.
18371 * g_dbus_proxy_new_for_bus_finish:
18372 * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback function passed to g_dbus_proxy_new_for_bus().
18373 * @error: Return location for error or %NULL.
18375 * Finishes creating a #GDBusProxy.
18377 * Returns: A #GDBusProxy or %NULL if @error is set. Free with g_object_unref().
18383 * g_dbus_proxy_new_for_bus_sync:
18384 * @bus_type: A #GBusType.
18385 * @flags: Flags used when constructing the proxy.
18386 * @info: A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL.
18387 * @name: A bus name (well-known or unique).
18388 * @object_path: An object path.
18389 * @interface_name: A D-Bus interface name.
18390 * @cancellable: A #GCancellable or %NULL.
18391 * @error: Return location for error or %NULL.
18393 * Like g_dbus_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
18394 * See <xref linkend="gdbus-wellknown-proxy"/> for an example of how #GDBusProxy can be used.
18396 * Returns: A #GDBusProxy or %NULL if error is set. Free with g_object_unref().
18402 * g_dbus_proxy_new_sync:
18403 * @connection: A #GDBusConnection.
18404 * @flags: Flags used when constructing the proxy.
18405 * @info: (allow-none): A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL.
18406 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
18407 * @object_path: An object path.
18408 * @interface_name: A D-Bus interface name.
18409 * @cancellable: (allow-none): A #GCancellable or %NULL.
18410 * @error: (allow-none): Return location for error or %NULL.
18412 * Creates a proxy for accessing @interface_name on the remote object
18413 * at @object_path owned by @name at @connection and synchronously
18414 * loads D-Bus properties unless the
18415 * %G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES flag is used.
18416 * If the %G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS flag is not set, also sets up
18417 * match rules for signals. Connect to the #GDBusProxy::g-signal signal
18418 * to handle signals from the remote object.
18419 * If @name is a well-known name and the
18420 * %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag isn't set and no name
18421 * owner currently exists, the message bus will be requested to launch
18422 * a name owner for the name.
18423 * This is a synchronous failable constructor. See g_dbus_proxy_new()
18424 * and g_dbus_proxy_new_finish() for the asynchronous version.
18425 * See <xref linkend="gdbus-wellknown-proxy"/> for an example of how #GDBusProxy can be used.
18427 * Returns: A #GDBusProxy or %NULL if error is set. Free with g_object_unref().
18433 * g_dbus_proxy_set_cached_property:
18434 * @proxy: A #GDBusProxy
18435 * @property_name: Property name.
18436 * @value: Value for the property or %NULL to remove it from the cache.
18438 * If @value is not %NULL, sets the cached value for the property with
18439 * name @property_name to the value in @value.
18440 * If @value is %NULL, then the cached value is removed from the
18442 * If @proxy has an expected interface (see
18443 * #GDBusProxy:g-interface-info), then @property_name (for existence)
18444 * and @value (for the type) is checked against it.
18445 * If the @value #GVariant is floating, it is consumed. This allows
18446 * convenient 'inline' use of g_variant_new(), e.g.
18448 * g_dbus_proxy_set_cached_property (proxy,
18450 * g_variant_new ("(si)",
18454 * Normally you will not need to use this method since @proxy is
18455 * tracking changes using the
18456 * <literal>org.freedesktop.DBus.Properties.PropertiesChanged</literal>
18457 * D-Bus signal. However, for performance reasons an object may decide
18458 * to not use this signal for some properties and instead use a
18459 * proprietary out-of-band mechanism to transmit changes.
18460 * As a concrete example, consider an object with a property
18461 * <literal>ChatroomParticipants</literal> which is an array of
18462 * strings. Instead of transmitting the same (long) array every time
18463 * the property changes, it is more efficient to only transmit the
18464 * delta using e.g. signals <literal>ChatroomParticipantJoined(String
18465 * name)</literal> and <literal>ChatroomParticipantParted(String
18473 * g_dbus_proxy_set_default_timeout:
18474 * @proxy: A #GDBusProxy.
18475 * @timeout_msec: Timeout in milliseconds.
18477 * Sets the timeout to use if -1 (specifying default timeout) is
18478 * passed as @timeout_msec in the g_dbus_proxy_call() and
18479 * g_dbus_proxy_call_sync() functions.
18480 * See the #GDBusProxy:g-default-timeout property for more details.
18487 * g_dbus_proxy_set_interface_info:
18488 * @proxy: A #GDBusProxy
18489 * @info: Minimum interface this proxy conforms to or %NULL to unset.
18491 * Ensure that interactions with @proxy conform to the given
18492 * interface. For example, when completing a method call, if the type
18493 * signature of the message isn't what's expected, the given #GError
18494 * is set. Signals that have a type signature mismatch are simply
18496 * See the #GDBusProxy:g-interface-info property for more details.
18503 * g_dbus_server_get_client_address:
18504 * @server: A #GDBusServer.
18506 * Gets a D-Bus address string that can be used by clients to connect
18510 * Returns: A D-Bus address string. Do not free, the string is owned
18516 * g_dbus_server_get_flags:
18517 * @server: A #GDBusServer.
18519 * Gets the flags for @server.
18521 * Returns: A set of flags from the #GDBusServerFlags enumeration.
18527 * g_dbus_server_get_guid:
18528 * @server: A #GDBusServer.
18530 * Gets the GUID for @server.
18532 * Returns: A D-Bus GUID. Do not free this string, it is owned by @server.
18538 * g_dbus_server_is_active:
18539 * @server: A #GDBusServer.
18541 * Gets whether @server is active.
18543 * Returns: %TRUE if server is active, %FALSE otherwise.
18549 * g_dbus_server_new_sync:
18550 * @address: A D-Bus address.
18551 * @flags: Flags from the #GDBusServerFlags enumeration.
18552 * @guid: A D-Bus GUID.
18553 * @observer: A #GDBusAuthObserver or %NULL.
18554 * @cancellable: A #GCancellable or %NULL.
18555 * @error: Return location for server or %NULL.
18557 * Creates a new D-Bus server that listens on the first address in
18558 * Once constructed, you can use g_dbus_server_get_client_address() to
18559 * get a D-Bus address string that clients can use to connect.
18560 * Connect to the #GDBusServer::new-connection signal to handle
18561 * incoming connections.
18562 * The returned #GDBusServer isn't active - you have to start it with
18563 * g_dbus_server_start().
18564 * See <xref linkend="gdbus-peer-to-peer"/> for how #GDBusServer can
18566 * This is a synchronous failable constructor. See
18567 * g_dbus_server_new() for the asynchronous version.
18568 * g_object_unref().
18570 * Returns: A #GDBusServer or %NULL if @error is set. Free with
18576 * g_dbus_server_start:
18577 * @server: A #GDBusServer.
18586 * g_dbus_server_stop:
18587 * @server: A #GDBusServer.
18596 * g_dbus_signal_info_ref:
18597 * @info: A #GDBusSignalInfo
18599 * If @info is statically allocated does nothing. Otherwise increases
18600 * the reference count.
18602 * Returns: The same @info.
18608 * g_dbus_signal_info_unref:
18609 * @info: A #GDBusSignalInfo.
18611 * If @info is statically allocated, does nothing. Otherwise decreases
18612 * the reference count of @info. When its reference count drops to 0,
18613 * the memory used is freed.
18620 * g_desktop_app_info_get_filename:
18621 * @info: a #GDesktopAppInfo
18623 * When @info was created from a known filename, return it. In some
18624 * situations such as the #GDesktopAppInfo returned from
18625 * g_desktop_app_info_new_from_keyfile(), this function will return %NULL.
18627 * Returns: The full path to the file for @info, or %NULL if not known.
18633 * g_desktop_app_info_get_is_hidden:
18634 * @info: a #GDesktopAppInfo.
18636 * A desktop file is hidden if the Hidden key in it is
18639 * Returns: %TRUE if hidden, %FALSE otherwise.
18644 * g_desktop_app_info_launch_uris_as_manager:
18645 * @appinfo: a #GDesktopAppInfo
18646 * @uris: (element-type utf8): List of URIs
18647 * @launch_context: a #GAppLaunchContext
18648 * @spawn_flags: #GSpawnFlags, used for each process
18649 * @user_setup: (scope call): a #GSpawnChildSetupFunc, used once for each process.
18650 * @user_setup_data: (closure user_setup): User data for @user_setup
18651 * @pid_callback: (scope call): Callback for child processes
18652 * @pid_callback_data: (closure pid_callback): User data for @callback
18653 * @error: a #GError
18655 * This function performs the equivalent of g_app_info_launch_uris(),
18656 * but is intended primarily for operating system components that
18657 * launch applications. Ordinary applications should use
18658 * g_app_info_launch_uris().
18659 * In contrast to g_app_info_launch_uris(), all processes created will
18660 * always be run directly as children as if by the UNIX fork()/exec()
18662 * This guarantee allows additional control over the exact environment
18663 * of the child processes, which is provided via a setup function
18664 * semantics of the @setup function.
18669 * g_desktop_app_info_lookup_get_default_for_uri_scheme:
18670 * @lookup: a #GDesktopAppInfoLookup
18671 * @uri_scheme: a string containing a URI scheme.
18673 * Gets the default application for launching applications
18674 * using this URI scheme for a particular GDesktopAppInfoLookup
18676 * The GDesktopAppInfoLookup interface and this function is used
18677 * to implement g_app_info_get_default_for_uri_scheme() backends
18678 * in a GIO module. There is no reason for applications to use it
18679 * directly. Applications should use g_app_info_get_default_for_uri_scheme().
18681 * Returns: (transfer full): #GAppInfo for given @uri_scheme or %NULL on error.
18682 * Deprecated: The #GDesktopAppInfoLookup interface is deprecated and unused by gio.
18687 * g_desktop_app_info_new:
18688 * @desktop_id: the desktop file id
18690 * Creates a new #GDesktopAppInfo based on a desktop file id.
18691 * A desktop file id is the basename of the desktop file, including the
18692 * .desktop extension. GIO is looking for a desktop file with this name
18693 * in the <filename>applications</filename> subdirectories of the XDG data
18694 * directories (i.e. the directories specified in the
18695 * <envar>XDG_DATA_HOME</envar> and <envar>XDG_DATA_DIRS</envar> environment
18696 * variables). GIO also supports the prefix-to-subdirectory mapping that is
18697 * described in the <ulink url="http://standards.freedesktop.org/menu-spec/latest/">Menu Spec</ulink>
18698 * (i.e. a desktop id of kde-foo.desktop will match
18699 * <filename>/usr/share/applications/kde/foo.desktop</filename>).
18701 * Returns: a new #GDesktopAppInfo, or %NULL if no desktop file with that id
18706 * g_desktop_app_info_new_from_filename:
18707 * @filename: the path of a desktop file, in the GLib filename encoding
18709 * Creates a new #GDesktopAppInfo.
18711 * Returns: a new #GDesktopAppInfo or %NULL on error.
18716 * g_desktop_app_info_new_from_keyfile:
18717 * @key_file: an opened #GKeyFile
18719 * Creates a new #GDesktopAppInfo.
18721 * Returns: a new #GDesktopAppInfo or %NULL on error.
18727 * g_desktop_app_info_set_desktop_env:
18728 * @desktop_env: a string specifying what desktop this is
18730 * Sets the name of the desktop that the application is running in.
18731 * This is used by g_app_info_should_show() to evaluate the
18732 * <literal>OnlyShowIn</literal> and <literal>NotShowIn</literal>
18733 * desktop entry fields.
18734 * The <ulink url="http://standards.freedesktop.org/menu-spec/latest/">Desktop
18735 * Menu specification</ulink> recognizes the following:
18737 * <member>GNOME</member>
18738 * <member>KDE</member>
18739 * <member>ROX</member>
18740 * <member>XFCE</member>
18741 * <member>Old</member>
18743 * Should be called only once; subsequent calls are ignored.
18748 * g_drive_can_eject:
18749 * @drive: a #GDrive.
18751 * Checks if a drive can be ejected.
18753 * Returns: %TRUE if the @drive can be ejected, %FALSE otherwise.
18758 * g_drive_can_poll_for_media:
18759 * @drive: a #GDrive.
18761 * Checks if a drive can be polled for media changes.
18762 * %FALSE otherwise.
18764 * Returns: %TRUE if the @drive can be polled for media changes,
18769 * g_drive_can_start:
18770 * @drive: a #GDrive.
18772 * Checks if a drive can be started.
18774 * Returns: %TRUE if the @drive can be started, %FALSE otherwise.
18780 * g_drive_can_start_degraded:
18781 * @drive: a #GDrive.
18783 * Checks if a drive can be started degraded.
18785 * Returns: %TRUE if the @drive can be started degraded, %FALSE otherwise.
18791 * g_drive_can_stop:
18792 * @drive: a #GDrive.
18794 * Checks if a drive can be stopped.
18796 * Returns: %TRUE if the @drive can be stopped, %FALSE otherwise.
18803 * @drive: a #GDrive.
18804 * @flags: flags affecting the unmount if required for eject
18805 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
18806 * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
18807 * @user_data: user data to pass to @callback
18809 * Asynchronously ejects a drive.
18810 * When the operation is finished, @callback will be called.
18811 * You can then call g_drive_eject_finish() to obtain the
18812 * result of the operation.
18814 * Deprecated: 2.22: Use g_drive_eject_with_operation() instead.
18819 * g_drive_eject_finish:
18820 * @drive: a #GDrive.
18821 * @result: a #GAsyncResult.
18822 * @error: a #GError, or %NULL
18824 * Finishes ejecting a drive.
18825 * %FALSE otherwise.
18827 * Returns: %TRUE if the drive has been ejected successfully,
18828 * Deprecated: 2.22: Use g_drive_eject_with_operation_finish() instead.
18833 * g_drive_eject_with_operation:
18834 * @drive: a #GDrive.
18835 * @flags: flags affecting the unmount if required for eject
18836 * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
18837 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
18838 * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
18839 * @user_data: user data passed to @callback.
18841 * Ejects a drive. This is an asynchronous operation, and is
18842 * finished by calling g_drive_eject_with_operation_finish() with the @drive
18843 * and #GAsyncResult data returned in the @callback.
18850 * g_drive_eject_with_operation_finish:
18851 * @drive: a #GDrive.
18852 * @result: a #GAsyncResult.
18853 * @error: a #GError location to store the error occuring, or %NULL to ignore.
18855 * Finishes ejecting a drive. If any errors occurred during the operation,
18857 * Returns: %TRUE if the drive was successfully ejected. %FALSE otherwise.
18863 * g_drive_enumerate_identifiers:
18864 * @drive: a #GDrive
18866 * Gets the kinds of identifiers that @drive has.
18867 * Use g_drive_get_identifer() to obtain the identifiers
18869 * array of strings containing kinds of identifiers. Use g_strfreev()
18872 * Returns: (transfer full) (array zero-terminated=1): a %NULL-terminated
18877 * g_drive_get_icon:
18878 * @drive: a #GDrive.
18880 * Gets the icon for @drive.
18881 * Free the returned object with g_object_unref().
18883 * Returns: (transfer full): #GIcon for the @drive.
18888 * g_drive_get_identifier:
18889 * @drive: a #GDrive
18890 * @kind: the kind of identifier to return
18892 * Gets the identifier of the given kind for @drive.
18893 * requested identfier, or %NULL if the #GDrive
18894 * doesn't have this kind of identifier.
18896 * Returns: a newly allocated string containing the
18901 * g_drive_get_name:
18902 * @drive: a #GDrive.
18904 * Gets the name of @drive.
18905 * string should be freed when no longer needed.
18907 * Returns: a string containing @drive's name. The returned
18912 * g_drive_get_start_stop_type:
18913 * @drive: a #GDrive.
18915 * Gets a hint about how a drive can be started/stopped.
18917 * Returns: A value from the #GDriveStartStopType enumeration.
18923 * g_drive_get_volumes:
18924 * @drive: a #GDrive.
18926 * Get a list of mountable volumes for @drive.
18927 * The returned list should be freed with g_list_free(), after
18928 * its elements have been unreffed with g_object_unref().
18930 * Returns: (element-type GVolume) (transfer full): #GList containing any #GVolume objects on the given @drive.
18935 * g_drive_has_media:
18936 * @drive: a #GDrive.
18938 * Checks if the @drive has media. Note that the OS may not be polling
18939 * the drive for media changes; see g_drive_is_media_check_automatic()
18940 * for more details.
18942 * Returns: %TRUE if @drive has media, %FALSE otherwise.
18947 * g_drive_has_volumes:
18948 * @drive: a #GDrive.
18950 * Check if @drive has any mountable volumes.
18952 * Returns: %TRUE if the @drive contains volumes, %FALSE otherwise.
18957 * g_drive_is_media_check_automatic:
18958 * @drive: a #GDrive.
18960 * Checks if @drive is capabable of automatically detecting media changes.
18961 * media changes, %FALSE otherwise.
18963 * Returns: %TRUE if the @drive is capabable of automatically detecting
18968 * g_drive_is_media_removable:
18969 * @drive: a #GDrive.
18971 * Checks if the @drive supports removable media.
18973 * Returns: %TRUE if @drive supports removable media, %FALSE otherwise.
18978 * g_drive_poll_for_media:
18979 * @drive: a #GDrive.
18980 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
18981 * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
18982 * @user_data: user data to pass to @callback
18984 * Asynchronously polls @drive to see if media has been inserted or removed.
18985 * When the operation is finished, @callback will be called.
18986 * You can then call g_drive_poll_for_media_finish() to obtain the
18987 * result of the operation.
18992 * g_drive_poll_for_media_finish:
18993 * @drive: a #GDrive.
18994 * @result: a #GAsyncResult.
18995 * @error: a #GError, or %NULL
18997 * Finishes an operation started with g_drive_poll_for_media() on a drive.
18998 * %FALSE otherwise.
19000 * Returns: %TRUE if the drive has been poll_for_mediaed successfully,
19006 * @drive: a #GDrive.
19007 * @flags: flags affecting the start operation.
19008 * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
19009 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19010 * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
19011 * @user_data: user data to pass to @callback
19013 * Asynchronously starts a drive.
19014 * When the operation is finished, @callback will be called.
19015 * You can then call g_drive_start_finish() to obtain the
19016 * result of the operation.
19023 * g_drive_start_finish:
19024 * @drive: a #GDrive.
19025 * @result: a #GAsyncResult.
19026 * @error: a #GError, or %NULL
19028 * Finishes starting a drive.
19029 * %FALSE otherwise.
19031 * Returns: %TRUE if the drive has been started successfully,
19038 * @drive: a #GDrive.
19039 * @flags: flags affecting the unmount if required for stopping.
19040 * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
19041 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19042 * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
19043 * @user_data: user data to pass to @callback
19045 * Asynchronously stops a drive.
19046 * When the operation is finished, @callback will be called.
19047 * You can then call g_drive_stop_finish() to obtain the
19048 * result of the operation.
19055 * g_drive_stop_finish:
19056 * @drive: a #GDrive.
19057 * @result: a #GAsyncResult.
19058 * @error: a #GError, or %NULL
19060 * Finishes stopping a drive.
19061 * %FALSE otherwise.
19063 * Returns: %TRUE if the drive has been stopped successfully,
19069 * g_emblem_get_icon:
19070 * @emblem: a #GEmblem from which the icon should be extracted.
19072 * Gives back the icon from @emblem.
19073 * the emblem and should not be modified or freed.
19075 * Returns: (transfer none): a #GIcon. The returned object belongs to
19081 * g_emblem_get_origin:
19082 * @emblem: a #GEmblem
19084 * Gets the origin of the emblem.
19086 * Returns: (transfer none): the origin of the emblem
19093 * @icon: a GIcon containing the icon.
19095 * Creates a new emblem for @icon.
19097 * Returns: a new #GEmblem.
19103 * g_emblem_new_with_origin:
19104 * @icon: a GIcon containing the icon.
19105 * @origin: a GEmblemOrigin enum defining the emblem's origin
19107 * Creates a new emblem for @icon.
19109 * Returns: a new #GEmblem.
19115 * g_emblemed_icon_add_emblem:
19116 * @emblemed: a #GEmblemedIcon
19117 * @emblem: a #GEmblem
19119 * Adds @emblem to the #GList of #GEmblem <!-- -->s.
19126 * g_emblemed_icon_clear_emblems:
19127 * @emblemed: a #GEmblemedIcon
19129 * Removes all the emblems from @icon.
19136 * g_emblemed_icon_get_emblems:
19137 * @emblemed: a #GEmblemedIcon
19139 * Gets the list of emblems for the @icon.
19140 * #GEmblem <!-- -->s that is owned by @emblemed
19142 * Returns: (element-type Gio.Emblem) (transfer none): a #GList of
19148 * g_emblemed_icon_get_icon:
19149 * @emblemed: a #GEmblemedIcon
19151 * Gets the main icon for @emblemed.
19153 * Returns: (transfer none): a #GIcon that is owned by @emblemed
19159 * g_emblemed_icon_new:
19161 * @emblem: (allow-none): a #GEmblem, or %NULL
19163 * Creates a new emblemed icon for @icon with the emblem @emblem.
19165 * Returns: (transfer full): a new #GIcon
19171 * g_file_append_to:
19172 * @file: input #GFile.
19173 * @flags: a set of #GFileCreateFlags.
19174 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19175 * @error: a #GError, or %NULL
19177 * Gets an output stream for appending data to the file. If
19178 * the file doesn't already exist it is created.
19179 * By default files created are generally readable by everyone,
19180 * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file
19181 * will be made readable only to the current user, to the level that
19182 * is supported on the target filesystem.
19183 * If @cancellable is not %NULL, then the operation can be cancelled by
19184 * triggering the cancellable object from another thread. If the operation
19185 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
19186 * Some file systems don't allow all file names, and may
19187 * return an %G_IO_ERROR_INVALID_FILENAME error.
19188 * If the file is a directory the %G_IO_ERROR_IS_DIRECTORY error will be
19189 * returned. Other errors are possible too, and depend on what kind of
19190 * filesystem the file is on.
19191 * Free the returned object with g_object_unref().
19193 * Returns: (transfer full): a #GFileOutputStream, or %NULL on error.
19198 * g_file_append_to_async:
19199 * @file: input #GFile.
19200 * @flags: a set of #GFileCreateFlags.
19201 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
19202 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19203 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
19204 * @user_data: (closure): the data to pass to callback function
19206 * Asynchronously opens @file for appending.
19207 * For more details, see g_file_append_to() which is
19208 * the synchronous version of this call.
19209 * When the operation is finished, @callback will be called. You can then call
19210 * g_file_append_to_finish() to get the result of the operation.
19215 * g_file_append_to_finish:
19216 * @file: input #GFile.
19217 * @res: #GAsyncResult
19218 * @error: a #GError, or %NULL
19220 * Finishes an asynchronous file append operation started with
19221 * g_file_append_to_async().
19222 * Free the returned object with g_object_unref().
19224 * Returns: (transfer full): a valid #GFileOutputStream or %NULL on error.
19229 * g_file_attribute_info_list_add:
19230 * @list: a #GFileAttributeInfoList.
19231 * @name: the name of the attribute to add.
19232 * @type: the #GFileAttributeType for the attribute.
19233 * @flags: #GFileAttributeInfoFlags for the attribute.
19235 * Adds a new attribute with @name to the @list, setting
19236 * its @type and @flags.
19241 * g_file_attribute_info_list_dup:
19242 * @list: a #GFileAttributeInfoList to duplicate.
19244 * Makes a duplicate of a file attribute info list.
19246 * Returns: a copy of the given @list.
19251 * g_file_attribute_info_list_lookup:
19252 * @list: a #GFileAttributeInfoList.
19253 * @name: the name of the attribute to lookup.
19255 * Gets the file attribute with the name @name from @list.
19256 * attribute isn't found.
19258 * Returns: a #GFileAttributeInfo for the @name, or %NULL if an
19263 * g_file_attribute_info_list_new:
19265 * Creates a new file attribute info list.
19267 * Returns: a #GFileAttributeInfoList.
19272 * g_file_attribute_info_list_ref:
19273 * @list: a #GFileAttributeInfoList to reference.
19275 * References a file attribute info list.
19277 * Returns: #GFileAttributeInfoList or %NULL on error.
19282 * g_file_attribute_info_list_unref:
19283 * @list: The #GFileAttributeInfoList to unreference.
19285 * Removes a reference from the given @list. If the reference count
19286 * falls to zero, the @list is deleted.
19291 * g_file_attribute_matcher_enumerate_namespace:
19292 * @matcher: a #GFileAttributeMatcher.
19293 * @ns: a string containing a file attribute namespace.
19295 * Checks if the matcher will match all of the keys in a given namespace.
19296 * This will always return %TRUE if a wildcard character is in use (e.g. if
19297 * matcher was created with "standard::*" and @ns is "standard", or if matcher was created
19298 * using "*" and namespace is anything.)
19299 * in the given @ns, %FALSE otherwise.
19301 * Todo: this is awkwardly worded.
19302 * Returns: %TRUE if the matcher matches all of the entries
19307 * g_file_attribute_matcher_enumerate_next:
19308 * @matcher: a #GFileAttributeMatcher.
19310 * Gets the next matched attribute from a #GFileAttributeMatcher.
19311 * no more attribute exist.
19313 * Returns: a string containing the next attribute or %NULL if
19318 * g_file_attribute_matcher_matches:
19319 * @matcher: a #GFileAttributeMatcher.
19320 * @attribute: a file attribute key.
19322 * Checks if an attribute will be matched by an attribute matcher. If
19323 * the matcher was created with the "*" matching string, this function
19324 * will always return %TRUE.
19326 * Returns: %TRUE if @attribute matches @matcher. %FALSE otherwise.
19331 * g_file_attribute_matcher_matches_only:
19332 * @matcher: a #GFileAttributeMatcher.
19333 * @attribute: a file attribute key.
19335 * Checks if a attribute matcher only matches a given attribute. Always
19336 * returns %FALSE if "*" was used when creating the matcher.
19338 * Returns: %TRUE if the matcher only matches @attribute. %FALSE otherwise.
19343 * g_file_attribute_matcher_new:
19344 * @attributes: an attribute string to match.
19346 * Creates a new file attribute matcher, which matches attributes
19347 * against a given string. #GFileAttributeMatcher<!-- -->s are reference
19348 * counted structures, and are created with a reference count of 1. If
19349 * the number of references falls to 0, the #GFileAttributeMatcher is
19350 * automatically destroyed.
19351 * The @attribute string should be formatted with specific keys separated
19352 * from namespaces with a double colon. Several "namespace::key" strings may be
19353 * concatenated with a single comma (e.g. "standard::type,standard::is-hidden").
19354 * The wildcard "*" may be used to match all keys and namespaces, or
19355 * "namespace::*" will match all keys in a given namespace.
19356 * Examples of strings to use:
19358 * <title>File Attribute Matcher strings and results</title>
19359 * <tgroup cols='2' align='left'><thead>
19360 * <row><entry> Matcher String </entry><entry> Matches </entry></row></thead>
19362 * <row><entry>"*"</entry><entry>matches all attributes.</entry></row>
19363 * <row><entry>"standard::is-hidden"</entry><entry>matches only the key is-hidden in the standard namespace.</entry></row>
19364 * <row><entry>"standard::type,unix::*"</entry><entry>matches the type key in the standard namespace and
19365 * all keys in the unix namespace.</entry></row>
19366 * </tbody></tgroup>
19369 * Returns: a #GFileAttributeMatcher.
19374 * g_file_attribute_matcher_ref:
19375 * @matcher: a #GFileAttributeMatcher.
19377 * References a file attribute matcher.
19379 * Returns: a #GFileAttributeMatcher.
19384 * g_file_attribute_matcher_unref:
19385 * @matcher: a #GFileAttributeMatcher.
19387 * Unreferences @matcher. If the reference count falls below 1,
19388 * the @matcher is automatically freed.
19394 * @source: input #GFile.
19395 * @destination: destination #GFile
19396 * @flags: set of #GFileCopyFlags
19397 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19398 * @progress_callback: (scope call): function to callback with progress information
19399 * @progress_callback_data: (closure): user data to pass to @progress_callback
19400 * @error: #GError to set on error, or %NULL
19402 * Copies the file @source to the location specified by @destination.
19403 * Can not handle recursive copies of directories.
19404 * If the flag #G_FILE_COPY_OVERWRITE is specified an already
19405 * existing @destination file is overwritten.
19406 * If the flag #G_FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks
19407 * will be copied as symlinks, otherwise the target of the
19408 * If @cancellable is not %NULL, then the operation can be cancelled by
19409 * triggering the cancellable object from another thread. If the operation
19410 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
19411 * If @progress_callback is not %NULL, then the operation can be monitored by
19412 * setting this to a #GFileProgressCallback function. @progress_callback_data
19413 * will be passed to this function. It is guaranteed that this callback will
19414 * be called after all data has been transferred with the total number of bytes
19415 * copied during the operation.
19416 * If the @source file does not exist then the G_IO_ERROR_NOT_FOUND
19417 * error is returned, independent on the status of the @destination.
19418 * If #G_FILE_COPY_OVERWRITE is not specified and the target exists, then the
19419 * error G_IO_ERROR_EXISTS is returned.
19420 * If trying to overwrite a file over a directory the G_IO_ERROR_IS_DIRECTORY
19421 * error is returned. If trying to overwrite a directory with a directory the
19422 * G_IO_ERROR_WOULD_MERGE error is returned.
19423 * If the source is a directory and the target does not exist, or #G_FILE_COPY_OVERWRITE is
19424 * specified and the target is a file, then the G_IO_ERROR_WOULD_RECURSE error
19426 * If you are interested in copying the #GFile object itself (not the on-disk
19427 * file), see g_file_dup().
19429 * Returns: %TRUE on success, %FALSE otherwise.
19434 * g_file_copy_async: (skip)
19435 * @source: input #GFile.
19436 * @destination: destination #GFile
19437 * @flags: set of #GFileCopyFlags
19438 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
19439 * @cancellable: optional #GCancellable object, %NULL to ignore.
19440 * @progress_callback: function to callback with progress information
19441 * @progress_callback_data: user data to pass to @progress_callback
19442 * @callback: a #GAsyncReadyCallback to call when the request is satisfied
19443 * @user_data: the data to pass to callback function
19445 * Copies the file @source to the location specified by @destination
19446 * asynchronously. For details of the behaviour, see g_file_copy().
19447 * If @progress_callback is not %NULL, then that function that will be called
19448 * just like in g_file_copy(), however the callback will run in the main loop,
19449 * not in the thread that is doing the I/O operation.
19450 * When the operation is finished, @callback will be called. You can then call
19451 * g_file_copy_finish() to get the result of the operation.
19456 * g_file_copy_attributes:
19457 * @source: a #GFile with attributes.
19458 * @destination: a #GFile to copy attributes to.
19459 * @flags: a set of #GFileCopyFlags.
19460 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19461 * @error: a #GError, %NULL to ignore.
19463 * Copies the file attributes from @source to @destination.
19464 * Normally only a subset of the file attributes are copied,
19465 * those that are copies in a normal file copy operation
19466 * (which for instance does not include e.g. owner). However
19467 * if #G_FILE_COPY_ALL_METADATA is specified in @flags, then
19468 * all the metadata that is possible to copy is copied. This
19469 * is useful when implementing move by copy + delete source.
19471 * Returns: %TRUE if the attributes were copied successfully, %FALSE otherwise.
19476 * g_file_copy_finish:
19477 * @file: input #GFile.
19478 * @res: a #GAsyncResult.
19479 * @error: a #GError, or %NULL
19481 * Finishes copying the file started with
19482 * g_file_copy_async().
19484 * Returns: a %TRUE on success, %FALSE on error.
19490 * @file: input #GFile.
19491 * @flags: a set of #GFileCreateFlags.
19492 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19493 * @error: a #GError, or %NULL
19495 * Creates a new file and returns an output stream for writing to it.
19496 * The file must not already exist.
19497 * By default files created are generally readable by everyone,
19498 * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file
19499 * will be made readable only to the current user, to the level that
19500 * is supported on the target filesystem.
19501 * If @cancellable is not %NULL, then the operation can be cancelled by
19502 * triggering the cancellable object from another thread. If the operation
19503 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
19504 * If a file or directory with this name already exists the G_IO_ERROR_EXISTS
19505 * error will be returned.
19506 * Some file systems don't allow all file names, and may
19507 * return an G_IO_ERROR_INVALID_FILENAME error, and if the name
19508 * is to long G_IO_ERROR_FILENAME_TOO_LONG will be returned.
19509 * Other errors are possible too, and depend on what kind of
19510 * filesystem the file is on.
19512 * Free the returned object with g_object_unref().
19514 * Returns: (transfer full): a #GFileOutputStream for the newly created file, or
19519 * g_file_create_async:
19520 * @file: input #GFile.
19521 * @flags: a set of #GFileCreateFlags.
19522 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
19523 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19524 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
19525 * @user_data: (closure): the data to pass to callback function
19527 * Asynchronously creates a new file and returns an output stream for writing to it.
19528 * The file must not already exist.
19529 * For more details, see g_file_create() which is
19530 * the synchronous version of this call.
19531 * When the operation is finished, @callback will be called. You can then call
19532 * g_file_create_finish() to get the result of the operation.
19537 * g_file_create_finish:
19538 * @file: input #GFile.
19539 * @res: a #GAsyncResult.
19540 * @error: a #GError, or %NULL
19542 * Finishes an asynchronous file create operation started with
19543 * g_file_create_async().
19544 * Free the returned object with g_object_unref().
19546 * Returns: (transfer full): a #GFileOutputStream or %NULL on error.
19551 * g_file_create_readwrite:
19553 * @flags: a set of #GFileCreateFlags
19554 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
19555 * @error: return location for a #GError, or %NULL
19557 * Creates a new file and returns a stream for reading and writing to it.
19558 * The file must not already exist.
19559 * By default files created are generally readable by everyone,
19560 * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file
19561 * will be made readable only to the current user, to the level that
19562 * is supported on the target filesystem.
19563 * If @cancellable is not %NULL, then the operation can be cancelled by
19564 * triggering the cancellable object from another thread. If the operation
19565 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
19566 * If a file or directory with this name already exists the %G_IO_ERROR_EXISTS
19567 * error will be returned. Some file systems don't allow all file names,
19568 * and may return an %G_IO_ERROR_INVALID_FILENAME error, and if the name
19569 * is too long, %G_IO_ERROR_FILENAME_TOO_LONG will be returned. Other errors
19570 * are possible too, and depend on what kind of filesystem the file is on.
19571 * Note that in many non-local file cases read and write streams are not
19572 * supported, so make sure you really need to do read and write streaming,
19573 * rather than just opening for reading or writing.
19574 * Free the returned object with g_object_unref().
19576 * Returns: (transfer full): a #GFileIOStream for the newly created file, or %NULL on error.
19582 * g_file_create_readwrite_async:
19583 * @file: input #GFile
19584 * @flags: a set of #GFileCreateFlags
19585 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request
19586 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
19587 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
19588 * @user_data: (closure): the data to pass to callback function
19590 * Asynchronously creates a new file and returns a stream for reading and
19591 * writing to it. The file must not already exist.
19592 * For more details, see g_file_create_readwrite() which is
19593 * the synchronous version of this call.
19594 * When the operation is finished, @callback will be called. You can then
19595 * call g_file_create_readwrite_finish() to get the result of the operation.
19602 * g_file_create_readwrite_finish:
19603 * @file: input #GFile
19604 * @res: a #GAsyncResult
19605 * @error: a #GError, or %NULL
19607 * Finishes an asynchronous file create operation started with
19608 * g_file_create_readwrite_async().
19609 * Free the returned object with g_object_unref().
19611 * Returns: (transfer full): a #GFileIOStream or %NULL on error.
19618 * @file: input #GFile.
19619 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19620 * @error: a #GError, or %NULL
19622 * Deletes a file. If the @file is a directory, it will only be deleted if it
19624 * If @cancellable is not %NULL, then the operation can be cancelled by
19625 * triggering the cancellable object from another thread. If the operation
19626 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
19628 * Virtual: delete_file
19629 * Returns: %TRUE if the file was deleted. %FALSE otherwise.
19634 * g_file_descriptor_based_get_fd:
19635 * @fd_based: a #GFileDescriptorBased.
19637 * Gets the underlying file descriptor.
19639 * Returns: The file descriptor
19646 * @file: input #GFile.
19648 * Duplicates a #GFile handle. This operation does not duplicate
19649 * the actual file or directory represented by the #GFile; see
19650 * g_file_copy() if attempting to copy a file.
19651 * This call does no blocking i/o.
19653 * Returns: (transfer full): a new #GFile that is a duplicate of the given #GFile.
19658 * g_file_eject_mountable:
19659 * @file: input #GFile.
19660 * @flags: flags affecting the operation
19661 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19662 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
19663 * @user_data: (closure): the data to pass to callback function
19665 * Starts an asynchronous eject on a mountable.
19666 * When this operation has completed, @callback will be called with
19667 * g_file_eject_mountable_finish().
19668 * If @cancellable is not %NULL, then the operation can be cancelled by
19669 * triggering the cancellable object from another thread. If the operation
19670 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
19672 * Deprecated: 2.22: Use g_file_eject_mountable_with_operation() instead.
19677 * g_file_eject_mountable_finish:
19678 * @file: input #GFile.
19679 * @result: a #GAsyncResult.
19680 * @error: a #GError, or %NULL
19682 * Finishes an asynchronous eject operation started by
19683 * g_file_eject_mountable().
19686 * Returns: %TRUE if the @file was ejected successfully. %FALSE
19687 * Deprecated: 2.22: Use g_file_eject_mountable_with_operation_finish() instead.
19692 * g_file_eject_mountable_with_operation:
19693 * @file: input #GFile.
19694 * @flags: flags affecting the operation
19695 * @mount_operation: a #GMountOperation, or %NULL to avoid user interaction.
19696 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19697 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
19698 * @user_data: (closure): the data to pass to callback function
19700 * Starts an asynchronous eject on a mountable.
19701 * When this operation has completed, @callback will be called with
19702 * g_file_eject_mountable_with_operation_finish().
19703 * If @cancellable is not %NULL, then the operation can be cancelled by
19704 * triggering the cancellable object from another thread. If the operation
19705 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
19712 * g_file_eject_mountable_with_operation_finish:
19713 * @file: input #GFile.
19714 * @result: a #GAsyncResult.
19715 * @error: a #GError, or %NULL
19717 * Finishes an asynchronous eject operation started by
19718 * g_file_eject_mountable_with_operation().
19721 * Returns: %TRUE if the @file was ejected successfully. %FALSE
19727 * g_file_enumerate_children:
19728 * @file: input #GFile.
19729 * @attributes: an attribute query string.
19730 * @flags: a set of #GFileQueryInfoFlags.
19731 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19732 * @error: #GError for error reporting.
19734 * Gets the requested information about the files in a directory. The result
19735 * is a #GFileEnumerator object that will give out #GFileInfo objects for
19736 * all the files in the directory.
19737 * The @attributes value is a string that specifies the file attributes that
19738 * should be gathered. It is not an error if it's not possible to read a particular
19739 * requested attribute from a file - it just won't be set. @attributes should
19740 * be a comma-separated list of attributes or attribute wildcards. The wildcard "*"
19741 * means all attributes, and a wildcard like "standard::*" means all attributes in the standard
19742 * namespace. An example attribute query be "standard::*,owner::user".
19743 * The standard attributes are available as defines, like #G_FILE_ATTRIBUTE_STANDARD_NAME.
19744 * If @cancellable is not %NULL, then the operation can be cancelled by
19745 * triggering the cancellable object from another thread. If the operation
19746 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
19747 * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
19748 * If the file is not a directory, the G_FILE_ERROR_NOTDIR error will be returned.
19749 * Other errors are possible too.
19750 * Free the returned object with g_object_unref().
19752 * Returns: (transfer full): A #GFileEnumerator if successful, %NULL on error.
19757 * g_file_enumerate_children_async:
19758 * @file: input #GFile.
19759 * @attributes: an attribute query string.
19760 * @flags: a set of #GFileQueryInfoFlags.
19761 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
19762 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19763 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
19764 * @user_data: (closure): the data to pass to callback function
19766 * Asynchronously gets the requested information about the files in a directory. The result
19767 * is a #GFileEnumerator object that will give out #GFileInfo objects for
19768 * all the files in the directory.
19769 * For more details, see g_file_enumerate_children() which is
19770 * the synchronous version of this call.
19771 * When the operation is finished, @callback will be called. You can then call
19772 * g_file_enumerate_children_finish() to get the result of the operation.
19777 * g_file_enumerate_children_finish:
19778 * @file: input #GFile.
19779 * @res: a #GAsyncResult.
19780 * @error: a #GError.
19782 * Finishes an async enumerate children operation.
19783 * See g_file_enumerate_children_async().
19784 * Free the returned object with g_object_unref().
19786 * Returns: (transfer full): a #GFileEnumerator or %NULL if an error occurred.
19791 * g_file_enumerator_close:
19792 * @enumerator: a #GFileEnumerator.
19793 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19794 * @error: location to store the error occuring, or %NULL to ignore
19796 * Releases all resources used by this enumerator, making the
19797 * enumerator return %G_IO_ERROR_CLOSED on all calls.
19798 * This will be automatically called when the last reference
19799 * is dropped, but you might want to call this function to make
19800 * sure resources are released as early as possible.
19802 * Returns: #TRUE on success or #FALSE on error.
19807 * g_file_enumerator_close_async:
19808 * @enumerator: a #GFileEnumerator.
19809 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
19810 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19811 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
19812 * @user_data: (closure): the data to pass to callback function
19814 * Asynchronously closes the file enumerator.
19815 * If @cancellable is not %NULL, then the operation can be cancelled by
19816 * triggering the cancellable object from another thread. If the operation
19817 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned in
19818 * g_file_enumerator_close_finish().
19823 * g_file_enumerator_close_finish:
19824 * @enumerator: a #GFileEnumerator.
19825 * @result: a #GAsyncResult.
19826 * @error: a #GError location to store the error occuring, or %NULL to ignore.
19828 * Finishes closing a file enumerator, started from g_file_enumerator_close_async().
19829 * If the file enumerator was already closed when g_file_enumerator_close_async()
19830 * was called, then this function will report %G_IO_ERROR_CLOSED in @error, and
19831 * return %FALSE. If the file enumerator had pending operation when the close
19832 * operation was started, then this function will report %G_IO_ERROR_PENDING, and
19833 * return %FALSE. If @cancellable was not %NULL, then the operation may have been
19834 * cancelled by triggering the cancellable object from another thread. If the operation
19835 * was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %FALSE will be
19838 * Returns: %TRUE if the close operation has finished successfully.
19843 * g_file_enumerator_get_container:
19844 * @enumerator: a #GFileEnumerator
19846 * Get the #GFile container which is being enumerated.
19848 * Returns: (transfer full): the #GFile which is being enumerated.
19854 * g_file_enumerator_has_pending:
19855 * @enumerator: a #GFileEnumerator.
19857 * Checks if the file enumerator has pending operations.
19859 * Returns: %TRUE if the @enumerator has pending operations.
19864 * g_file_enumerator_is_closed:
19865 * @enumerator: a #GFileEnumerator.
19867 * Checks if the file enumerator has been closed.
19869 * Returns: %TRUE if the @enumerator is closed.
19874 * g_file_enumerator_next_file:
19875 * @enumerator: a #GFileEnumerator.
19876 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19877 * @error: location to store the error occuring, or %NULL to ignore
19879 * Returns information for the next file in the enumerated object.
19880 * Will block until the information is available. The #GFileInfo
19881 * returned from this function will contain attributes that match the
19882 * attribute string that was passed when the #GFileEnumerator was created.
19883 * On error, returns %NULL and sets @error to the error. If the
19884 * enumerator is at the end, %NULL will be returned and @error will
19886 * Free the returned object with g_object_unref() when no longer needed.
19888 * Returns: (transfer full): A #GFileInfo or %NULL on error or end of enumerator.
19893 * g_file_enumerator_next_files_async:
19894 * @enumerator: a #GFileEnumerator.
19895 * @num_files: the number of file info objects to request
19896 * @io_priority: the <link linkend="gioscheduler">io priority</link> of the request.
19897 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19898 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
19899 * @user_data: (closure): the data to pass to callback function
19901 * Request information for a number of files from the enumerator asynchronously.
19902 * When all i/o for the operation is finished the @callback will be called with
19903 * the requested information.
19904 * The callback can be called with less than @num_files files in case of error
19905 * or at the end of the enumerator. In case of a partial error the callback will
19906 * be called with any succeeding items and no error, and on the next request the
19907 * error will be reported. If a request is cancelled the callback will be called
19908 * with %G_IO_ERROR_CANCELLED.
19909 * During an async request no other sync and async calls are allowed, and will
19910 * result in %G_IO_ERROR_PENDING errors.
19911 * Any outstanding i/o request with higher priority (lower numerical value) will
19912 * be executed before an outstanding request with lower priority. Default
19913 * priority is %G_PRIORITY_DEFAULT.
19918 * g_file_enumerator_next_files_finish:
19919 * @enumerator: a #GFileEnumerator.
19920 * @result: a #GAsyncResult.
19921 * @error: a #GError location to store the error occuring, or %NULL to ignore.
19923 * Finishes the asynchronous operation started with g_file_enumerator_next_files_async().
19924 * g_list_free() and unref the infos with g_object_unref() when you're
19927 * Returns: (transfer full) (element-type Gio.FileInfo): a #GList of #GFileInfo<!---->s. You must free the list with
19932 * g_file_enumerator_set_pending:
19933 * @enumerator: a #GFileEnumerator.
19934 * @pending: a boolean value.
19936 * Sets the file enumerator as having pending operations.
19942 * @file1: the first #GFile.
19943 * @file2: the second #GFile.
19945 * Checks equality of two given #GFile<!-- -->s. Note that two
19946 * #GFile<!-- -->s that differ can still refer to the same
19947 * file on the filesystem due to various forms of filename
19949 * This call does no blocking i/o.
19950 * %FALSE if either is not a #GFile.
19952 * Returns: %TRUE if @file1 and @file2 are equal.
19957 * g_file_find_enclosing_mount:
19958 * @file: input #GFile.
19959 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19960 * @error: a #GError.
19962 * Gets a #GMount for the #GFile.
19963 * If the #GFileIface for @file does not have a mount (e.g. possibly a
19964 * remote share), @error will be set to %G_IO_ERROR_NOT_FOUND and %NULL
19965 * will be returned.
19966 * If @cancellable is not %NULL, then the operation can be cancelled by
19967 * triggering the cancellable object from another thread. If the operation
19968 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
19969 * Free the returned object with g_object_unref().
19971 * Returns: (transfer full): a #GMount where the @file is located or %NULL on error.
19976 * g_file_find_enclosing_mount_async:
19978 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
19979 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19980 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
19981 * @user_data: (closure): the data to pass to callback function
19983 * Asynchronously gets the mount for the file.
19984 * For more details, see g_file_find_enclosing_mount() which is
19985 * the synchronous version of this call.
19986 * When the operation is finished, @callback will be called. You can then call
19987 * g_file_find_enclosing_mount_finish() to get the result of the operation.
19992 * g_file_find_enclosing_mount_finish:
19994 * @res: a #GAsyncResult
19995 * @error: a #GError
19997 * Finishes an asynchronous find mount request.
19998 * See g_file_find_enclosing_mount_async().
19999 * Free the returned object with g_object_unref().
20001 * Returns: (transfer full): #GMount for given @file or %NULL on error.
20006 * g_file_get_basename:
20007 * @file: input #GFile.
20009 * Gets the base name (the last component of the path) for a given #GFile.
20010 * If called for the top level of a system (such as the filesystem root
20011 * or a uri like sftp://host/) it will return a single directory separator
20012 * (and on Windows, possibly a drive letter).
20013 * The base name is a byte string (*not* UTF-8). It has no defined encoding
20014 * or rules other than it may not contain zero bytes. If you want to use
20015 * filenames in a user interface you should use the display name that you
20016 * can get by requesting the %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME
20017 * attribute with g_file_query_info().
20018 * This call does no blocking i/o.
20019 * if given #GFile is invalid. The returned string should be
20020 * freed with g_free() when no longer needed.
20022 * Returns: string containing the #GFile's base name, or %NULL
20027 * g_file_get_child:
20028 * @file: input #GFile.
20029 * @name: string containing the child's basename.
20031 * Gets a child of @file with basename equal to @name.
20032 * Note that the file with that specific name might not exist, but
20033 * you can still have a #GFile that points to it. You can use this
20034 * for instance to create that file.
20035 * This call does no blocking i/o.
20036 * Free the returned object with g_object_unref().
20038 * Returns: (transfer full): a #GFile to a child specified by @name.
20043 * g_file_get_child_for_display_name:
20044 * @file: input #GFile.
20045 * @display_name: string to a possible child.
20048 * Gets the child of @file for a given @display_name (i.e. a UTF8
20049 * version of the name). If this function fails, it returns %NULL and @error will be
20050 * set. This is very useful when constructing a GFile for a new file
20051 * and the user entered the filename in the user interface, for instance
20052 * when you select a directory and type a filename in the file selector.
20053 * This call does no blocking i/o.
20054 * %NULL if the display name couldn't be converted.
20055 * Free the returned object with g_object_unref().
20057 * Returns: (transfer full): a #GFile to the specified child, or
20062 * g_file_get_parent:
20063 * @file: input #GFile.
20065 * Gets the parent directory for the @file.
20066 * If the @file represents the root directory of the
20067 * file system, then %NULL will be returned.
20068 * This call does no blocking i/o.
20069 * #GFile or %NULL if there is no parent.
20070 * Free the returned object with g_object_unref().
20072 * Returns: (transfer full): a #GFile structure to the parent of the given
20077 * g_file_get_parse_name:
20078 * @file: input #GFile.
20080 * Gets the parse name of the @file.
20081 * A parse name is a UTF-8 string that describes the
20082 * file such that one can get the #GFile back using
20083 * g_file_parse_name().
20084 * This is generally used to show the #GFile as a nice
20085 * full-pathname kind of string in a user interface,
20086 * like in a location entry.
20087 * For local files with names that can safely be converted
20088 * to UTF8 the pathname is used, otherwise the IRI is used
20089 * (a form of URI that allows UTF8 characters unescaped).
20090 * This call does no blocking i/o.
20091 * string should be freed with g_free() when no longer needed.
20093 * Returns: a string containing the #GFile's parse name. The returned
20099 * @file: input #GFile.
20101 * Gets the local pathname for #GFile, if one exists.
20102 * This call does no blocking i/o.
20103 * no such path exists. The returned string should be
20104 * freed with g_free() when no longer needed.
20106 * Returns: string containing the #GFile's path, or %NULL if
20111 * g_file_get_relative_path:
20112 * @parent: input #GFile.
20113 * @descendant: input #GFile.
20115 * Gets the path for @descendant relative to @parent.
20116 * This call does no blocking i/o.
20117 * to @parent, or %NULL if @descendant doesn't have @parent as prefix.
20118 * The returned string should be freed with g_free() when no longer needed.
20120 * Returns: string with the relative path from @descendant
20126 * @file: input #GFile.
20128 * Gets the URI for the @file.
20129 * This call does no blocking i/o.
20130 * The returned string should be freed with g_free() when no longer needed.
20132 * Returns: a string containing the #GFile's URI.
20137 * g_file_get_uri_scheme:
20138 * @file: input #GFile.
20140 * Gets the URI scheme for a #GFile.
20141 * RFC 3986 decodes the scheme as:
20143 * URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
20144 * </programlisting>
20145 * Common schemes include "file", "http", "ftp", etc.
20146 * This call does no blocking i/o.
20147 * #GFile. The returned string should be freed with g_free()
20148 * when no longer needed.
20150 * Returns: a string containing the URI scheme for the given
20155 * g_file_has_parent:
20156 * @file: input #GFile
20157 * @parent: the parent to check for, or %NULL
20159 * Checks if @file has a parent, and optionally, if it is @parent.
20160 * If @parent is %NULL then this function returns %TRUE if @file has any
20161 * parent at all. If @parent is non-%NULL then %TRUE is only returned
20162 * if @file is a child of @parent.
20163 * case that @parent is %NULL).
20165 * Returns: %TRUE if @file is a child of @parent (or any parent in the
20171 * g_file_has_prefix:
20172 * @file: input #GFile.
20173 * @prefix: input #GFile.
20175 * Checks whether @file has the prefix specified by @prefix. In other word,
20176 * if the names of inital elements of @file<!-- -->s pathname match @prefix.
20177 * Only full pathname elements are matched, so a path like /foo is not
20178 * considered a prefix of /foobar, only of /foo/bar.
20179 * This call does no i/o, as it works purely on names. As such it can
20180 * sometimes return %FALSE even if @file is inside a @prefix (from a
20181 * filesystem point of view), because the prefix of @file is an alias
20183 * %FALSE otherwise.
20185 * Virtual: prefix_matches
20186 * Returns: %TRUE if the @files's parent, grandparent, etc is @prefix.
20191 * g_file_has_uri_scheme:
20192 * @file: input #GFile.
20193 * @uri_scheme: a string containing a URI scheme.
20195 * Checks to see if a #GFile has a given URI scheme.
20196 * This call does no blocking i/o.
20197 * given URI scheme, %FALSE if URI scheme is %NULL,
20198 * not supported, or #GFile is invalid.
20200 * Returns: %TRUE if #GFile's backend supports the
20206 * @file: #gconstpointer to a #GFile.
20208 * Creates a hash value for a #GFile.
20209 * This call does no blocking i/o.
20210 * integer that can be used as hash value for the #GFile.
20211 * This function is intended for easily hashing a #GFile to
20212 * add to a #GHashTable or similar data structure.
20215 * Returns: 0 if @file is not a valid #GFile, otherwise an
20220 * g_file_icon_get_file:
20223 * Gets the #GFile associated with the given @icon.
20225 * Returns: (transfer none): a #GFile, or %NULL.
20233 * Creates a new icon for a file.
20235 * Returns: (transfer full): a #GIcon for the given @file, or %NULL on error.
20240 * g_file_info_clear_status:
20241 * @info: a #GFileInfo.
20243 * Clears the status information from @info.
20248 * g_file_info_copy_into:
20249 * @src_info: source to copy attributes from.
20250 * @dest_info: destination to copy attributes to.
20252 * Copies all of the #GFileAttribute<!-- -->s from @src_info to @dest_info.
20258 * @other: a #GFileInfo.
20260 * Duplicates a file info structure.
20262 * Returns: (transfer full): a duplicate #GFileInfo of @other.
20267 * g_file_info_get_attribute_as_string:
20268 * @info: a #GFileInfo.
20269 * @attribute: a file attribute key.
20271 * Gets the value of a attribute, formated as a string.
20272 * This escapes things as needed to make the string valid
20274 * When you're done with the string it must be freed with g_free().
20276 * Returns: a UTF-8 string associated with the given @attribute.
20281 * g_file_info_get_attribute_boolean:
20282 * @info: a #GFileInfo.
20283 * @attribute: a file attribute key.
20285 * Gets the value of a boolean attribute. If the attribute does not
20286 * contain a boolean value, %FALSE will be returned.
20288 * Returns: the boolean value contained within the attribute.
20293 * g_file_info_get_attribute_byte_string:
20294 * @info: a #GFileInfo.
20295 * @attribute: a file attribute key.
20297 * Gets the value of a byte string attribute. If the attribute does
20298 * not contain a byte string, %NULL will be returned.
20301 * Returns: the contents of the @attribute value as a byte string, or
20306 * g_file_info_get_attribute_data:
20307 * @info: a #GFileInfo
20308 * @attribute: a file attribute key
20309 * @type: (out) (allow-none): return location for the attribute type, or %NULL
20310 * @value_pp: (out) (allow-none): return location for the attribute value, or %NULL
20311 * @status: (out) (allow-none): return location for the attribute status, or %NULL
20313 * Gets the attribute type, value and status for an attribute key.
20314 * %FALSE otherwise.
20316 * Returns: (transfer none): %TRUE if @info has an attribute named @attribute,
20321 * g_file_info_get_attribute_int32:
20322 * @info: a #GFileInfo.
20323 * @attribute: a file attribute key.
20325 * Gets a signed 32-bit integer contained within the attribute. If the
20326 * attribute does not contain a signed 32-bit integer, or is invalid,
20327 * 0 will be returned.
20329 * Returns: a signed 32-bit integer from the attribute.
20334 * g_file_info_get_attribute_int64:
20335 * @info: a #GFileInfo.
20336 * @attribute: a file attribute key.
20338 * Gets a signed 64-bit integer contained within the attribute. If the
20339 * attribute does not contain an signed 64-bit integer, or is invalid,
20340 * 0 will be returned.
20342 * Returns: a signed 64-bit integer from the attribute.
20347 * g_file_info_get_attribute_object:
20348 * @info: a #GFileInfo.
20349 * @attribute: a file attribute key.
20351 * Gets the value of a #GObject attribute. If the attribute does
20352 * not contain a #GObject, %NULL will be returned.
20355 * Returns: (transfer none): a #GObject associated with the given @attribute, or
20360 * g_file_info_get_attribute_status:
20361 * @info: a #GFileInfo
20362 * @attribute: a file attribute key
20364 * Gets the attribute status for an attribute key.
20365 * %G_FILE_ATTRIBUTE_STATUS_UNSET if the key is invalid.
20367 * Returns: a #GFileAttributeStatus for the given @attribute, or
20372 * g_file_info_get_attribute_string:
20373 * @info: a #GFileInfo.
20374 * @attribute: a file attribute key.
20376 * Gets the value of a string attribute. If the attribute does
20377 * not contain a string, %NULL will be returned.
20380 * Returns: the contents of the @attribute value as a string, or
20385 * g_file_info_get_attribute_stringv:
20386 * @info: a #GFileInfo.
20387 * @attribute: a file attribute key.
20389 * Gets the value of a stringv attribute. If the attribute does
20390 * not contain a stringv, %NULL will be returned.
20391 * %NULL otherwise. Do not free.
20393 * Returns: (transfer none): the contents of the @attribute value as a stringv, or
20399 * g_file_info_get_attribute_type:
20400 * @info: a #GFileInfo.
20401 * @attribute: a file attribute key.
20403 * Gets the attribute type for an attribute key.
20404 * %G_FILE_ATTRIBUTE_TYPE_INVALID if the key is not set.
20406 * Returns: a #GFileAttributeType for the given @attribute, or
20411 * g_file_info_get_attribute_uint32:
20412 * @info: a #GFileInfo.
20413 * @attribute: a file attribute key.
20415 * Gets an unsigned 32-bit integer contained within the attribute. If the
20416 * attribute does not contain an unsigned 32-bit integer, or is invalid,
20417 * 0 will be returned.
20419 * Returns: an unsigned 32-bit integer from the attribute.
20424 * g_file_info_get_attribute_uint64:
20425 * @info: a #GFileInfo.
20426 * @attribute: a file attribute key.
20428 * Gets a unsigned 64-bit integer contained within the attribute. If the
20429 * attribute does not contain an unsigned 64-bit integer, or is invalid,
20430 * 0 will be returned.
20432 * Returns: a unsigned 64-bit integer from the attribute.
20437 * g_file_info_get_content_type:
20438 * @info: a #GFileInfo.
20440 * Gets the file's content type.
20442 * Returns: a string containing the file's content type.
20447 * g_file_info_get_display_name:
20448 * @info: a #GFileInfo.
20450 * Gets a display name for a file.
20452 * Returns: a string containing the display name.
20457 * g_file_info_get_edit_name:
20458 * @info: a #GFileInfo.
20460 * Gets the edit name for a file.
20462 * Returns: a string containing the edit name.
20467 * g_file_info_get_etag:
20468 * @info: a #GFileInfo.
20470 * Gets the <link linkend="gfile-etag">entity tag</link> for a given
20471 * #GFileInfo. See %G_FILE_ATTRIBUTE_ETAG_VALUE.
20473 * Returns: a string containing the value of the "etag:value" attribute.
20478 * g_file_info_get_file_type:
20479 * @info: a #GFileInfo.
20481 * Gets a file's type (whether it is a regular file, symlink, etc).
20482 * This is different from the file's content type, see g_file_info_get_content_type().
20484 * Returns: a #GFileType for the given file.
20489 * g_file_info_get_icon:
20490 * @info: a #GFileInfo.
20492 * Gets the icon for a file.
20494 * Returns: (transfer none): #GIcon for the given @info.
20499 * g_file_info_get_is_backup:
20500 * @info: a #GFileInfo.
20502 * Checks if a file is a backup file.
20504 * Returns: %TRUE if file is a backup file, %FALSE otherwise.
20509 * g_file_info_get_is_hidden:
20510 * @info: a #GFileInfo.
20512 * Checks if a file is hidden.
20514 * Returns: %TRUE if the file is a hidden file, %FALSE otherwise.
20519 * g_file_info_get_is_symlink:
20520 * @info: a #GFileInfo.
20522 * Checks if a file is a symlink.
20524 * Returns: %TRUE if the given @info is a symlink.
20529 * g_file_info_get_modification_time:
20530 * @info: a #GFileInfo.
20531 * @result: a #GTimeVal.
20533 * Gets the modification time of the current @info and sets it
20539 * g_file_info_get_name:
20540 * @info: a #GFileInfo.
20542 * Gets the name for a file.
20544 * Returns: a string containing the file name.
20549 * g_file_info_get_size:
20550 * @info: a #GFileInfo.
20552 * Gets the file's size.
20554 * Returns: a #goffset containing the file's size.
20559 * g_file_info_get_sort_order:
20560 * @info: a #GFileInfo.
20562 * Gets the value of the sort_order attribute from the #GFileInfo.
20563 * See %G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER.
20565 * Returns: a #gint32 containing the value of the "standard::sort_order" attribute.
20570 * g_file_info_get_symlink_target:
20571 * @info: a #GFileInfo.
20573 * Gets the symlink target for a given #GFileInfo.
20575 * Returns: a string containing the symlink target.
20580 * g_file_info_has_attribute:
20581 * @info: a #GFileInfo.
20582 * @attribute: a file attribute key.
20584 * Checks if a file info structure has an attribute named @attribute.
20585 * %FALSE otherwise.
20587 * Returns: %TRUE if @Ginfo has an attribute named @attribute,
20592 * g_file_info_has_namespace:
20593 * @info: a #GFileInfo.
20594 * @name_space: a file attribute namespace.
20596 * Checks if a file info structure has an attribute in the
20597 * specified @name_space.
20598 * %FALSE otherwise.
20600 * Returns: %TRUE if @Ginfo has an attribute in @name_space,
20606 * g_file_info_list_attributes:
20607 * @info: a #GFileInfo.
20608 * @name_space: a file attribute key's namespace.
20610 * Lists the file info structure's attributes.
20611 * possible attribute types for the given @name_space, or
20614 * Returns: (array zero-terminated=1) (transfer full): a null-terminated array of strings of all of the
20621 * Creates a new file info structure.
20623 * Returns: a #GFileInfo.
20628 * g_file_info_remove_attribute:
20629 * @info: a #GFileInfo.
20630 * @attribute: a file attribute key.
20632 * Removes all cases of @attribute from @info if it exists.
20637 * g_file_info_set_attribute:
20638 * @info: a #GFileInfo.
20639 * @attribute: a file attribute key.
20640 * @type: a #GFileAttributeType
20641 * @value_p: pointer to the value
20643 * Sets the @attribute to contain the given value, if possible.
20648 * g_file_info_set_attribute_boolean:
20649 * @info: a #GFileInfo.
20650 * @attribute: a file attribute key.
20651 * @attr_value: a boolean value.
20653 * Sets the @attribute to contain the given @attr_value,
20659 * g_file_info_set_attribute_byte_string:
20660 * @info: a #GFileInfo.
20661 * @attribute: a file attribute key.
20662 * @attr_value: a byte string.
20664 * Sets the @attribute to contain the given @attr_value,
20670 * g_file_info_set_attribute_int32:
20671 * @info: a #GFileInfo.
20672 * @attribute: a file attribute key.
20673 * @attr_value: a signed 32-bit integer
20675 * Sets the @attribute to contain the given @attr_value,
20681 * g_file_info_set_attribute_int64:
20682 * @info: a #GFileInfo.
20683 * @attribute: attribute name to set.
20684 * @attr_value: int64 value to set attribute to.
20686 * Sets the @attribute to contain the given @attr_value,
20692 * g_file_info_set_attribute_mask:
20693 * @info: a #GFileInfo.
20694 * @mask: a #GFileAttributeMatcher.
20696 * Sets @mask on @info to match specific attribute types.
20701 * g_file_info_set_attribute_object:
20702 * @info: a #GFileInfo.
20703 * @attribute: a file attribute key.
20704 * @attr_value: a #GObject.
20706 * Sets the @attribute to contain the given @attr_value,
20712 * g_file_info_set_attribute_status:
20713 * @info: a #GFileInfo
20714 * @attribute: a file attribute key
20715 * @status: a #GFileAttributeStatus
20717 * Sets the attribute status for an attribute key. This is only
20718 * needed by external code that implement g_file_set_attributes_from_info()
20719 * or similar functions.
20720 * The attribute must exist in @info for this to work. Otherwise %FALSE
20721 * is returned and @info is unchanged.
20723 * Returns: %TRUE if the status was changed, %FALSE if the key was not set.
20729 * g_file_info_set_attribute_string:
20730 * @info: a #GFileInfo.
20731 * @attribute: a file attribute key.
20732 * @attr_value: a string.
20734 * Sets the @attribute to contain the given @attr_value,
20740 * g_file_info_set_attribute_stringv:
20741 * @info: a #GFileInfo.
20742 * @attribute: a file attribute key.
20743 * @attr_value: a %NULL terminated string array
20745 * Sets the @attribute to contain the given @attr_value,
20753 * g_file_info_set_attribute_uint32:
20754 * @info: a #GFileInfo.
20755 * @attribute: a file attribute key.
20756 * @attr_value: an unsigned 32-bit integer.
20758 * Sets the @attribute to contain the given @attr_value,
20764 * g_file_info_set_attribute_uint64:
20765 * @info: a #GFileInfo.
20766 * @attribute: a file attribute key.
20767 * @attr_value: an unsigned 64-bit integer.
20769 * Sets the @attribute to contain the given @attr_value,
20775 * g_file_info_set_content_type:
20776 * @info: a #GFileInfo.
20777 * @content_type: a content type. See #GContentType.
20779 * Sets the content type attribute for a given #GFileInfo.
20780 * See %G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE.
20785 * g_file_info_set_display_name:
20786 * @info: a #GFileInfo.
20787 * @display_name: a string containing a display name.
20789 * Sets the display name for the current #GFileInfo.
20790 * See %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME.
20795 * g_file_info_set_edit_name:
20796 * @info: a #GFileInfo.
20797 * @edit_name: a string containing an edit name.
20799 * Sets the edit name for the current file.
20800 * See %G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME.
20805 * g_file_info_set_file_type:
20806 * @info: a #GFileInfo.
20807 * @type: a #GFileType.
20809 * Sets the file type in a #GFileInfo to @type.
20810 * See %G_FILE_ATTRIBUTE_STANDARD_TYPE.
20815 * g_file_info_set_icon:
20816 * @info: a #GFileInfo.
20819 * Sets the icon for a given #GFileInfo.
20820 * See %G_FILE_ATTRIBUTE_STANDARD_ICON.
20825 * g_file_info_set_is_hidden:
20826 * @info: a #GFileInfo.
20827 * @is_hidden: a #gboolean.
20829 * Sets the "is_hidden" attribute in a #GFileInfo according to @is_symlink.
20830 * See %G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN.
20835 * g_file_info_set_is_symlink:
20836 * @info: a #GFileInfo.
20837 * @is_symlink: a #gboolean.
20839 * Sets the "is_symlink" attribute in a #GFileInfo according to @is_symlink.
20840 * See %G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK.
20845 * g_file_info_set_modification_tim:
20846 * @info: a #GFileInfo.
20847 * @mtime: a #GTimeVal.
20849 * Sets the %G_FILE_ATTRIBUTE_TIME_MODIFIED attribute in the file
20850 * info to the given time value.
20855 * g_file_info_set_name:
20856 * @info: a #GFileInfo.
20857 * @name: a string containing a name.
20859 * Sets the name attribute for the current #GFileInfo.
20860 * See %G_FILE_ATTRIBUTE_STANDARD_NAME.
20865 * g_file_info_set_size:
20866 * @info: a #GFileInfo.
20867 * @size: a #goffset containing the file's size.
20869 * Sets the %G_FILE_ATTRIBUTE_STANDARD_SIZE attribute in the file info
20870 * to the given size.
20875 * g_file_info_set_sort_order:
20876 * @info: a #GFileInfo.
20877 * @sort_order: a sort order integer.
20879 * Sets the sort order attribute in the file info structure. See
20880 * %G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER.
20885 * g_file_info_set_symlink_target:
20886 * @info: a #GFileInfo.
20887 * @symlink_target: a static string containing a path to a symlink target.
20889 * Sets the %G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET attribute in the file info
20890 * to the given symlink target.
20895 * g_file_info_unset_attribute_mask:
20896 * @info: #GFileInfo.
20898 * Unsets a mask set by g_file_info_set_attribute_mask(), if one
20904 * g_file_input_stream_query_info:
20905 * @stream: a #GFileInputStream.
20906 * @attributes: a file attribute query string.
20907 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
20908 * @error: a #GError location to store the error occuring, or %NULL to ignore.
20910 * Queries a file input stream the given @attributes. This function blocks
20911 * while querying the stream. For the asynchronous (non-blocking) version
20912 * of this function, see g_file_input_stream_query_info_async(). While the
20913 * stream is blocked, the stream will set the pending flag internally, and
20914 * any other operations on the stream will fail with %G_IO_ERROR_PENDING.
20916 * Returns: (transfer full): a #GFileInfo, or %NULL on error.
20921 * g_file_input_stream_query_info_async:
20922 * @stream: a #GFileInputStream.
20923 * @attributes: a file attribute query string.
20924 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
20925 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
20926 * @callback: (scope async): callback to call when the request is satisfied
20927 * @user_data: (closure): the data to pass to callback function
20929 * Queries the stream information asynchronously.
20930 * When the operation is finished @callback will be called.
20931 * You can then call g_file_input_stream_query_info_finish()
20932 * to get the result of the operation.
20933 * For the synchronous version of this function,
20934 * see g_file_input_stream_query_info().
20935 * If @cancellable is not %NULL, then the operation can be cancelled by
20936 * triggering the cancellable object from another thread. If the operation
20937 * was cancelled, the error %G_IO_ERROR_CANCELLED will be set
20942 * g_file_input_stream_query_info_finish:
20943 * @stream: a #GFileInputStream.
20944 * @result: a #GAsyncResult.
20945 * @error: a #GError location to store the error occuring, or %NULL to ignore.
20947 * Finishes an asynchronous info query operation.
20949 * Returns: (transfer full): #GFileInfo.
20954 * g_file_io_stream_get_etag:
20955 * @stream: a #GFileIOStream.
20957 * Gets the entity tag for the file when it has been written.
20958 * This must be called after the stream has been written
20959 * and closed, as the etag can change while writing.
20961 * Returns: the entity tag for the stream.
20967 * g_file_io_stream_query_info:
20968 * @stream: a #GFileIOStream.
20969 * @attributes: a file attribute query string.
20970 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
20971 * @error: a #GError, %NULL to ignore.
20973 * Queries a file io stream for the given @attributes.
20974 * This function blocks while querying the stream. For the asynchronous
20975 * version of this function, see g_file_io_stream_query_info_async().
20976 * While the stream is blocked, the stream will set the pending flag
20977 * internally, and any other operations on the stream will fail with
20978 * %G_IO_ERROR_PENDING.
20979 * Can fail if the stream was already closed (with @error being set to
20980 * %G_IO_ERROR_CLOSED), the stream has pending operations (with @error being
20981 * set to %G_IO_ERROR_PENDING), or if querying info is not supported for
20982 * the stream's interface (with @error being set to %G_IO_ERROR_NOT_SUPPORTED). I
20983 * all cases of failure, %NULL will be returned.
20984 * If @cancellable is not %NULL, then the operation can be cancelled by
20985 * triggering the cancellable object from another thread. If the operation
20986 * was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %NULL will
20989 * Returns: (transfer full): a #GFileInfo for the @stream, or %NULL on error.
20995 * g_file_io_stream_query_info_async:
20996 * @stream: a #GFileIOStream.
20997 * @attributes: a file attribute query string.
20998 * @io_priority: the <link linkend="gio-GIOScheduler">I/O priority</link> of the request.
20999 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21000 * @callback: (scope async): callback to call when the request is satisfied
21001 * @user_data: (closure): the data to pass to callback function
21003 * Asynchronously queries the @stream for a #GFileInfo. When completed,
21004 * finish the operation with g_file_io_stream_query_info_finish().
21005 * For the synchronous version of this function, see
21006 * g_file_io_stream_query_info().
21013 * g_file_io_stream_query_info_finish:
21014 * @stream: a #GFileIOStream.
21015 * @result: a #GAsyncResult.
21016 * @error: a #GError, %NULL to ignore.
21018 * Finalizes the asynchronous query started
21019 * by g_file_io_stream_query_info_async().
21021 * Returns: (transfer full): A #GFileInfo for the finished query.
21027 * g_file_is_native:
21028 * @file: input #GFile.
21030 * Checks to see if a file is native to the platform.
21031 * A native file s one expressed in the platform-native filename format,
21032 * e.g. "C:\Windows" or "/usr/bin/". This does not mean the file is local,
21033 * as it might be on a locally mounted remote filesystem.
21034 * On some systems non-native files may be available using
21035 * the native filesystem via a userspace filesystem (FUSE), in
21036 * these cases this call will return %FALSE, but g_file_get_path()
21037 * will still return a native path.
21038 * This call does no blocking i/o.
21040 * Returns: %TRUE if file is native.
21045 * g_file_load_contents:
21046 * @file: input #GFile.
21047 * @cancellable: optional #GCancellable object, %NULL to ignore.
21048 * @contents: (out) (transfer full): a location to place the contents of the file.
21049 * @length: (out) (allow-none): a location to place the length of the contents of the file, or %NULL if the length is not needed
21050 * @etag_out: (out) (allow-none): a location to place the current entity tag for the file, or %NULL if the entity tag is not needed
21051 * @error: a #GError, or %NULL
21053 * Loads the content of the file into memory. The data is always
21054 * zero-terminated, but this is not included in the resultant @length.
21055 * The returned @content should be freed with g_free() when no longer
21057 * If @cancellable is not %NULL, then the operation can be cancelled by
21058 * triggering the cancellable object from another thread. If the operation
21059 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21060 * %FALSE if there were errors.
21062 * Returns: %TRUE if the @file's contents were successfully loaded.
21067 * g_file_load_contents_async:
21068 * @file: input #GFile.
21069 * @cancellable: optional #GCancellable object, %NULL to ignore.
21070 * @callback: a #GAsyncReadyCallback to call when the request is satisfied
21071 * @user_data: the data to pass to callback function
21073 * Starts an asynchronous load of the @file's contents.
21074 * For more details, see g_file_load_contents() which is
21075 * the synchronous version of this call.
21076 * When the load operation has completed, @callback will be called
21077 * with @user data. To finish the operation, call
21078 * g_file_load_contents_finish() with the #GAsyncResult returned by
21080 * If @cancellable is not %NULL, then the operation can be cancelled by
21081 * triggering the cancellable object from another thread. If the operation
21082 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21087 * g_file_load_contents_finish:
21088 * @file: input #GFile.
21089 * @res: a #GAsyncResult.
21090 * @contents: (out) (transfer full): a location to place the contents of the file.
21091 * @length: (out) (allow-none): a location to place the length of the contents of the file, or %NULL if the length is not needed
21092 * @etag_out: (out) (allow-none): a location to place the current entity tag for the file, or %NULL if the entity tag is not needed
21093 * @error: a #GError, or %NULL
21095 * Finishes an asynchronous load of the @file's contents.
21096 * The contents are placed in @contents, and @length is set to the
21097 * size of the @contents string. The @content should be freed with
21098 * g_free() when no longer needed. If @etag_out is present, it will be
21099 * set to the new entity tag for the @file.
21100 * present, it will be set appropriately.
21102 * Returns: %TRUE if the load was successful. If %FALSE and @error is
21107 * g_file_load_partial_contents_async: (skip)
21108 * @file: input #GFile.
21109 * @cancellable: optional #GCancellable object, %NULL to ignore.
21110 * @read_more_callback: a #GFileReadMoreCallback to receive partial data and to specify whether further data should be read.
21111 * @callback: a #GAsyncReadyCallback to call when the request is satisfied
21112 * @user_data: the data to pass to the callback functions.
21114 * Reads the partial contents of a file. A #GFileReadMoreCallback should be
21115 * used to stop reading from the file when appropriate, else this function
21116 * will behave exactly as g_file_load_contents_async(). This operation
21117 * can be finished by g_file_load_partial_contents_finish().
21118 * Users of this function should be aware that @user_data is passed to
21119 * both the @read_more_callback and the @callback.
21120 * If @cancellable is not %NULL, then the operation can be cancelled by
21121 * triggering the cancellable object from another thread. If the operation
21122 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21127 * g_file_load_partial_contents_finish:
21128 * @file: input #GFile.
21129 * @res: a #GAsyncResult.
21130 * @contents: (out) (transfer full): a location to place the contents of the file.
21131 * @length: (out) (allow-none): a location to place the length of the contents of the file, or %NULL if the length is not needed
21132 * @etag_out: (out) (allow-none): a location to place the current entity tag for the file, or %NULL if the entity tag is not needed
21133 * @error: a #GError, or %NULL
21135 * Finishes an asynchronous partial load operation that was started
21136 * with g_file_load_partial_contents_async(). The data is always
21137 * zero-terminated, but this is not included in the resultant @length.
21138 * The returned @content should be freed with g_free() when no longer
21140 * present, it will be set appropriately.
21142 * Returns: %TRUE if the load was successful. If %FALSE and @error is
21147 * g_file_make_director:
21148 * @file: input #GFile.
21149 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21150 * @error: a #GError, or %NULL
21152 * Creates a directory. Note that this will only create a child directory of
21153 * the immediate parent directory of the path or URI given by the #GFile. To
21154 * recursively create directories, see g_file_make_directory_with_parents().
21155 * This function will fail if the parent directory does not exist, setting
21156 * directories, this function will fail, setting @error to
21157 * %G_IO_ERROR_NOT_SUPPORTED.
21158 * For a local #GFile the newly created directory will have the default
21159 * (current) ownership and permissions of the current process.
21160 * If @cancellable is not %NULL, then the operation can be cancelled by
21161 * triggering the cancellable object from another thread. If the operation
21162 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21164 * Returns: %TRUE on successful creation, %FALSE otherwise.
21169 * g_file_make_directory_with_parents:
21170 * @file: input #GFile.
21171 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21172 * @error: a #GError, or %NULL
21174 * Creates a directory and any parent directories that may not exist similar to
21175 * 'mkdir -p'. If the file system does not support creating directories, this
21176 * function will fail, setting @error to %G_IO_ERROR_NOT_SUPPORTED.
21177 * For a local #GFile the newly created directories will have the default
21178 * (current) ownership and permissions of the current process.
21179 * If @cancellable is not %NULL, then the operation can be cancelled by
21180 * triggering the cancellable object from another thread. If the operation
21181 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21184 * Returns: %TRUE if all directories have been successfully created, %FALSE
21190 * g_file_make_symbolic_link:
21191 * @file: a #GFile with the name of the symlink to create
21192 * @symlink_value: a string with the path for the target of the new symlink
21193 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21194 * @error: a #GError.
21196 * Creates a symbolic link named @file which contains the string
21197 * If @cancellable is not %NULL, then the operation can be cancelled by
21198 * triggering the cancellable object from another thread. If the operation
21199 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21201 * Returns: %TRUE on the creation of a new symlink, %FALSE otherwise.
21207 * @file: input #GFile
21208 * @flags: a set of #GFileMonitorFlags
21209 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
21210 * @error: a #GError, or %NULL
21212 * Obtains a file or directory monitor for the given file, depending
21213 * on the type of the file.
21214 * If @cancellable is not %NULL, then the operation can be cancelled by
21215 * triggering the cancellable object from another thread. If the operation
21216 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21217 * Free the returned object with g_object_unref().
21219 * Returns: (transfer full): a #GFileMonitor for the given @file, or %NULL on error.
21225 * g_file_monitor_cancel:
21226 * @monitor: a #GFileMonitor.
21228 * Cancels a file monitor.
21230 * Returns: %TRUE if monitor was cancelled.
21235 * g_file_monitor_directory:
21236 * @file: input #GFile.
21237 * @flags: a set of #GFileMonitorFlags.
21238 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21239 * @error: a #GError, or %NULL.
21241 * Obtains a directory monitor for the given file.
21242 * This may fail if directory monitoring is not supported.
21243 * If @cancellable is not %NULL, then the operation can be cancelled by
21244 * triggering the cancellable object from another thread. If the operation
21245 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21246 * Free the returned object with g_object_unref().
21248 * Virtual: monitor_dir
21249 * Returns: (transfer full): a #GFileMonitor for the given @file, or %NULL on error.
21254 * g_file_monitor_emit_event:
21255 * @monitor: a #GFileMonitor.
21256 * @child: a #GFile.
21257 * @other_file: a #GFile.
21258 * @event_type: a set of #GFileMonitorEvent flags.
21260 * Emits the #GFileMonitor::changed signal if a change
21261 * has taken place. Should be called from file monitor
21262 * implementations only.
21263 * The signal will be emitted from an idle handler (in the <link
21264 * linkend="g-main-context-push-thread-default">thread-default main
21270 * g_file_monitor_file:
21271 * @file: input #GFile.
21272 * @flags: a set of #GFileMonitorFlags.
21273 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21274 * @error: a #GError, or %NULL.
21276 * Obtains a file monitor for the given file. If no file notification
21277 * mechanism exists, then regular polling of the file is used.
21278 * If @cancellable is not %NULL, then the operation can be cancelled by
21279 * triggering the cancellable object from another thread. If the operation
21280 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21281 * Free the returned object with g_object_unref().
21283 * Returns: (transfer full): a #GFileMonitor for the given @file, or %NULL on error.
21288 * g_file_monitor_is_cancelled:
21289 * @monitor: a #GFileMonitor
21291 * Returns whether the monitor is canceled.
21293 * Returns: %TRUE if monitor is canceled. %FALSE otherwise.
21298 * g_file_monitor_set_rate_limit:
21299 * @monitor: a #GFileMonitor.
21300 * @limit_msecs: a non-negative integer with the limit in milliseconds to poll for changes
21302 * Sets the rate limit to which the @monitor will report
21303 * consecutive change events to the same file.
21308 * g_file_mount_enclosing_volume:
21309 * @location: input #GFile.
21310 * @flags: flags affecting the operation
21311 * @mount_operation: a #GMountOperation or %NULL to avoid user interaction.
21312 * @cancellable: optional #GCancellable object, %NULL to ignore.
21313 * @callback: a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
21314 * @user_data: the data to pass to callback function
21316 * Starts a @mount_operation, mounting the volume that contains the file @location.
21317 * When this operation has completed, @callback will be called with
21318 * g_file_mount_enclosing_volume_finish().
21319 * If @cancellable is not %NULL, then the operation can be cancelled by
21320 * triggering the cancellable object from another thread. If the operation
21321 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21326 * g_file_mount_enclosing_volume_finish:
21327 * @location: input #GFile.
21328 * @result: a #GAsyncResult.
21329 * @error: a #GError, or %NULL
21331 * Finishes a mount operation started by g_file_mount_enclosing_volume().
21332 * has occurred, this function will return %FALSE and set @error
21333 * appropriately if present.
21335 * Returns: %TRUE if successful. If an error
21340 * g_file_mount_mountable:
21341 * @file: input #GFile.
21342 * @flags: flags affecting the operation
21343 * @mount_operation: a #GMountOperation, or %NULL to avoid user interaction.
21344 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21345 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
21346 * @user_data: (closure): the data to pass to callback function
21348 * Mounts a file of type G_FILE_TYPE_MOUNTABLE.
21349 * Using @mount_operation, you can request callbacks when, for instance,
21350 * passwords are needed during authentication.
21351 * If @cancellable is not %NULL, then the operation can be cancelled by
21352 * triggering the cancellable object from another thread. If the operation
21353 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21354 * When the operation is finished, @callback will be called. You can then call
21355 * g_file_mount_mountable_finish() to get the result of the operation.
21360 * g_file_mount_mountable_finish:
21361 * @file: input #GFile.
21362 * @result: a #GAsyncResult.
21363 * @error: a #GError, or %NULL
21365 * Finishes a mount operation. See g_file_mount_mountable() for details.
21366 * Finish an asynchronous mount operation that was started
21367 * with g_file_mount_mountable().
21368 * Free the returned object with g_object_unref().
21370 * Returns: (transfer full): a #GFile or %NULL on error.
21376 * @source: #GFile pointing to the source location.
21377 * @destination: #GFile pointing to the destination location.
21378 * @flags: set of #GFileCopyFlags.
21379 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21380 * @progress_callback: (scope call): #GFileProgressCallback function for updates.
21381 * @progress_callback_data: (closure): gpointer to user data for the callback function.
21382 * @error: #GError for returning error conditions, or %NULL
21384 * Tries to move the file or directory @source to the location specified by @destination.
21385 * If native move operations are supported then this is used, otherwise a copy + delete
21386 * fallback is used. The native implementation may support moving directories (for instance
21387 * on moves inside the same filesystem), but the fallback code does not.
21388 * If the flag #G_FILE_COPY_OVERWRITE is specified an already
21389 * existing @destination file is overwritten.
21390 * If the flag #G_FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks
21391 * will be copied as symlinks, otherwise the target of the
21392 * If @cancellable is not %NULL, then the operation can be cancelled by
21393 * triggering the cancellable object from another thread. If the operation
21394 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21395 * If @progress_callback is not %NULL, then the operation can be monitored by
21396 * setting this to a #GFileProgressCallback function. @progress_callback_data
21397 * will be passed to this function. It is guaranteed that this callback will
21398 * be called after all data has been transferred with the total number of bytes
21399 * copied during the operation.
21400 * If the @source file does not exist then the G_IO_ERROR_NOT_FOUND
21401 * error is returned, independent on the status of the @destination.
21402 * If #G_FILE_COPY_OVERWRITE is not specified and the target exists, then the
21403 * error G_IO_ERROR_EXISTS is returned.
21404 * If trying to overwrite a file over a directory the G_IO_ERROR_IS_DIRECTORY
21405 * error is returned. If trying to overwrite a directory with a directory the
21406 * G_IO_ERROR_WOULD_MERGE error is returned.
21407 * If the source is a directory and the target does not exist, or #G_FILE_COPY_OVERWRITE is
21408 * specified and the target is a file, then the G_IO_ERROR_WOULD_RECURSE error
21409 * may be returned (if the native move operation isn't available).
21411 * Returns: %TRUE on successful move, %FALSE otherwise.
21416 * g_file_new_for_commandline_arg:
21417 * @arg: a command line string.
21419 * Creates a #GFile with the given argument from the command line. The value of
21420 * relative to the current working directory.
21421 * This operation never fails, but the returned object might not support any
21422 * I/O operation if @arg points to a malformed path.
21424 * Returns: (transfer full): a new #GFile.
21429 * g_file_new_for_path:
21430 * @path: a string containing a relative or absolute path. The string must be encoded in the glib filename encoding.
21432 * Constructs a #GFile for a given path. This operation never
21433 * fails, but the returned object might not support any I/O
21434 * operation if @path is malformed.
21436 * Returns: (transfer full): a new #GFile for the given @path.
21441 * g_file_new_for_uri:
21442 * @uri: a UTF8 string containing a URI.
21444 * Constructs a #GFile for a given URI. This operation never
21445 * fails, but the returned object might not support any I/O
21446 * operation if @uri is malformed or if the uri type is
21449 * Returns: (transfer full): a #GFile for the given @uri.
21454 * g_file_open_readwrite:
21455 * @file: #GFile to open
21456 * @cancellable: (allow-none): a #GCancellable
21457 * @error: a #GError, or %NULL
21459 * Opens an existing file for reading and writing. The result is
21460 * a #GFileIOStream that can be used to read and write the contents of the file.
21461 * If @cancellable is not %NULL, then the operation can be cancelled by
21462 * triggering the cancellable object from another thread. If the operation
21463 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21464 * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
21465 * If the file is a directory, the G_IO_ERROR_IS_DIRECTORY error will be returned.
21466 * Other errors are possible too, and depend on what kind of filesystem the file is on.
21467 * Note that in many non-local file cases read and write streams are not supported,
21468 * so make sure you really need to do read and write streaming, rather than
21469 * just opening for reading or writing.
21470 * Free the returned object with g_object_unref().
21472 * Returns: (transfer full): #GFileIOStream or %NULL on error.
21478 * g_file_open_readwrite_async:
21479 * @file: input #GFile.
21480 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
21481 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21482 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
21483 * @user_data: (closure): the data to pass to callback function
21485 * Asynchronously opens @file for reading and writing.
21486 * For more details, see g_file_open_readwrite() which is
21487 * the synchronous version of this call.
21488 * When the operation is finished, @callback will be called. You can then call
21489 * g_file_open_readwrite_finish() to get the result of the operation.
21496 * g_file_open_readwrite_finish:
21497 * @file: input #GFile.
21498 * @res: a #GAsyncResult.
21499 * @error: a #GError, or %NULL
21501 * Finishes an asynchronous file read operation started with
21502 * g_file_open_readwrite_async().
21503 * Free the returned object with g_object_unref().
21505 * Returns: (transfer full): a #GFileIOStream or %NULL on error.
21511 * g_file_output_stream_get_etag:
21512 * @stream: a #GFileOutputStream.
21514 * Gets the entity tag for the file when it has been written.
21515 * This must be called after the stream has been written
21516 * and closed, as the etag can change while writing.
21518 * Returns: the entity tag for the stream.
21523 * g_file_output_stream_query_info:
21524 * @stream: a #GFileOutputStream.
21525 * @attributes: a file attribute query string.
21526 * @cancellable: optional #GCancellable object, %NULL to ignore.
21527 * @error: a #GError, %NULL to ignore.
21529 * Queries a file output stream for the given @attributes.
21530 * This function blocks while querying the stream. For the asynchronous
21531 * version of this function, see g_file_output_stream_query_info_async().
21532 * While the stream is blocked, the stream will set the pending flag
21533 * internally, and any other operations on the stream will fail with
21534 * %G_IO_ERROR_PENDING.
21535 * Can fail if the stream was already closed (with @error being set to
21536 * %G_IO_ERROR_CLOSED), the stream has pending operations (with @error being
21537 * set to %G_IO_ERROR_PENDING), or if querying info is not supported for
21538 * the stream's interface (with @error being set to %G_IO_ERROR_NOT_SUPPORTED). In
21539 * all cases of failure, %NULL will be returned.
21540 * If @cancellable is not %NULL, then the operation can be cancelled by
21541 * triggering the cancellable object from another thread. If the operation
21542 * was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %NULL will
21545 * Returns: (transfer full): a #GFileInfo for the @stream, or %NULL on error.
21550 * g_file_output_stream_query_info_async:
21551 * @stream: a #GFileOutputStream.
21552 * @attributes: a file attribute query string.
21553 * @io_priority: the <link linkend="gio-GIOScheduler">I/O priority</link> of the request.
21554 * @cancellable: optional #GCancellable object, %NULL to ignore.
21555 * @callback: callback to call when the request is satisfied
21556 * @user_data: the data to pass to callback function
21558 * Asynchronously queries the @stream for a #GFileInfo. When completed,
21559 * finish the operation with g_file_output_stream_query_info_finish().
21560 * For the synchronous version of this function, see
21561 * g_file_output_stream_query_info().
21566 * g_file_output_stream_query_info_finish:
21567 * @stream: a #GFileOutputStream.
21568 * @result: a #GAsyncResult.
21569 * @error: a #GError, %NULL to ignore.
21571 * Finalizes the asynchronous query started
21572 * by g_file_output_stream_query_info_async().
21574 * Returns: (transfer full): A #GFileInfo for the finished query.
21579 * g_file_parse_name:
21580 * @parse_name: a file name or path to be parsed.
21582 * Constructs a #GFile with the given @parse_name (i.e. something given by g_file_get_parse_name()).
21583 * This operation never fails, but the returned object might not support any I/O
21584 * operation if the @parse_name cannot be parsed.
21586 * Returns: (transfer full): a new #GFile.
21591 * g_file_poll_mountable:
21592 * @file: input #GFile.
21593 * @cancellable: optional #GCancellable object, %NULL to ignore.
21594 * @callback: a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
21595 * @user_data: the data to pass to callback function
21597 * Polls a file of type G_FILE_TYPE_MOUNTABLE.
21598 * If @cancellable is not %NULL, then the operation can be cancelled by
21599 * triggering the cancellable object from another thread. If the operation
21600 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21601 * When the operation is finished, @callback will be called. You can then call
21602 * g_file_mount_mountable_finish() to get the result of the operation.
21609 * g_file_poll_mountable_finish:
21610 * @file: input #GFile.
21611 * @result: a #GAsyncResult.
21612 * @error: a #GError, or %NULL
21614 * Finishes a poll operation. See g_file_poll_mountable() for details.
21615 * Finish an asynchronous poll operation that was polled
21616 * with g_file_poll_mountable().
21619 * Returns: %TRUE if the operation finished successfully. %FALSE
21625 * g_file_query_default_handler:
21626 * @file: a #GFile to open.
21627 * @cancellable: optional #GCancellable object, %NULL to ignore.
21628 * @error: a #GError, or %NULL
21630 * Returns the #GAppInfo that is registered as the default
21631 * application to handle the file specified by @file.
21632 * If @cancellable is not %NULL, then the operation can be cancelled by
21633 * triggering the cancellable object from another thread. If the operation
21634 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21635 * When you are done with it, release it with g_object_unref()
21637 * Returns: (transfer full): a #GAppInfo if the handle was found, %NULL if there were errors.
21642 * g_file_query_exists:
21643 * @file: input #GFile.
21644 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21646 * Utility function to check if a particular file exists. This is
21647 * implemented using g_file_query_info() and as such does blocking I/O.
21648 * Note that in many cases it is racy to first check for file existence
21649 * and then execute something based on the outcome of that, because the
21650 * file might have been created or removed in between the operations. The
21651 * general approach to handling that is to not check, but just do the
21652 * operation and handle the errors as they come.
21653 * As an example of race-free checking, take the case of reading a file, and
21654 * can both result in two processes creating the file (with perhaps a partially
21655 * written file as the result). The correct approach is to always try to create
21656 * the file with g_file_create() which will either atomically create the file
21657 * or fail with a G_IO_ERROR_EXISTS error.
21658 * However, in many cases an existence check is useful in a user
21659 * interface, for instance to make a menu item sensitive/insensitive, so that
21660 * you don't have to fool users that something is possible and then just show
21661 * and error dialog. If you do this, you should make sure to also handle the
21662 * errors that can happen due to races when you execute the operation.
21664 * If it doesn't exist, creating it. there are two racy versions: read it, and
21665 * On error create it; and: check if it exists, if not create it. These
21666 * Returns: %TRUE if the file exists (and can be detected without error), %FALSE otherwise (or if cancelled).
21671 * g_file_query_file_type:
21672 * @file: input #GFile.
21673 * @flags: a set of #GFileQueryInfoFlags passed to g_file_query_info().
21674 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21676 * Utility function to inspect the #GFileType of a file. This is
21677 * implemented using g_file_query_info() and as such does blocking I/O.
21678 * The primary use case of this method is to check if a file is a regular file,
21679 * directory, or symlink.
21682 * Returns: The #GFileType of the file and #G_FILE_TYPE_UNKNOWN if the file
21688 * g_file_query_filesystem_info:
21689 * @file: input #GFile.
21690 * @attributes: an attribute query string.
21691 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21692 * @error: a #GError.
21694 * Similar to g_file_query_info(), but obtains information
21695 * about the filesystem the @file is on, rather than the file itself.
21696 * For instance the amount of space available and the type of
21698 * The @attributes value is a string that specifies the file attributes that
21699 * should be gathered. It is not an error if it's not possible to read a particular
21700 * requested attribute from a file - it just won't be set. @attributes should
21701 * be a comma-separated list of attributes or attribute wildcards. The wildcard "*"
21702 * means all attributes, and a wildcard like "fs:*" means all attributes in the fs
21703 * namespace. The standard namespace for filesystem attributes is "fs".
21704 * Common attributes of interest are #G_FILE_ATTRIBUTE_FILESYSTEM_SIZE
21705 * (the total size of the filesystem in bytes), #G_FILE_ATTRIBUTE_FILESYSTEM_FREE (number of
21706 * bytes available), and #G_FILE_ATTRIBUTE_FILESYSTEM_TYPE (type of the filesystem).
21707 * If @cancellable is not %NULL, then the operation can be cancelled by
21708 * triggering the cancellable object from another thread. If the operation
21709 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21710 * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
21711 * Other errors are possible too, and depend on what kind of filesystem the file is on.
21712 * Free the returned object with g_object_unref().
21714 * Returns: (transfer full): a #GFileInfo or %NULL if there was an error.
21719 * g_file_query_filesystem_info_async:
21720 * @file: input #GFile.
21721 * @attributes: an attribute query string.
21722 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
21723 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21724 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
21725 * @user_data: (closure): the data to pass to callback function
21727 * Asynchronously gets the requested information about the filesystem
21728 * that the specified @file is on. The result is a #GFileInfo object
21729 * that contains key-value attributes (such as type or size for the
21731 * For more details, see g_file_query_filesystem_info() which is the
21732 * synchronous version of this call.
21733 * When the operation is finished, @callback will be called. You can
21734 * then call g_file_query_info_finish() to get the result of the
21740 * g_file_query_filesystem_info_finish:
21741 * @file: input #GFile.
21742 * @res: a #GAsyncResult.
21743 * @error: a #GError.
21745 * Finishes an asynchronous filesystem info query. See
21746 * g_file_query_filesystem_info_async().
21747 * Free the returned object with g_object_unref().
21749 * Returns: (transfer full): #GFileInfo for given @file or %NULL on error.
21754 * g_file_query_info:
21755 * @file: input #GFile.
21756 * @attributes: an attribute query string.
21757 * @flags: a set of #GFileQueryInfoFlags.
21758 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21759 * @error: a #GError.
21761 * Gets the requested information about specified @file. The result
21762 * is a #GFileInfo object that contains key-value attributes (such as
21763 * the type or size of the file).
21764 * The @attributes value is a string that specifies the file attributes that
21765 * should be gathered. It is not an error if it's not possible to read a particular
21766 * requested attribute from a file - it just won't be set. @attributes should
21767 * be a comma-separated list of attributes or attribute wildcards. The wildcard "*"
21768 * means all attributes, and a wildcard like "standard::*" means all attributes in the standard
21769 * namespace. An example attribute query be "standard::*,owner::user".
21770 * The standard attributes are available as defines, like #G_FILE_ATTRIBUTE_STANDARD_NAME.
21771 * If @cancellable is not %NULL, then the operation can be cancelled by
21772 * triggering the cancellable object from another thread. If the operation
21773 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21774 * For symlinks, normally the information about the target of the
21775 * symlink is returned, rather than information about the symlink itself.
21776 * However if you pass #G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS in @flags the
21777 * information about the symlink itself will be returned. Also, for symlinks
21778 * that point to non-existing files the information about the symlink itself
21779 * will be returned.
21780 * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
21781 * Other errors are possible too, and depend on what kind of filesystem the file is on.
21782 * Free the returned object with g_object_unref().
21784 * Returns: (transfer full): a #GFileInfo for the given @file, or %NULL on error.
21789 * g_file_query_info_async:
21790 * @file: input #GFile.
21791 * @attributes: an attribute query string.
21792 * @flags: a set of #GFileQueryInfoFlags.
21793 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
21794 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21795 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
21796 * @user_data: (closure): the data to pass to callback function
21798 * Asynchronously gets the requested information about specified @file. The result
21799 * is a #GFileInfo object that contains key-value attributes (such as type or size
21801 * For more details, see g_file_query_info() which is
21802 * the synchronous version of this call.
21803 * When the operation is finished, @callback will be called. You can then call
21804 * g_file_query_info_finish() to get the result of the operation.
21809 * g_file_query_info_finish:
21810 * @file: input #GFile.
21811 * @res: a #GAsyncResult.
21812 * @error: a #GError.
21814 * Finishes an asynchronous file info query.
21815 * See g_file_query_info_async().
21816 * Free the returned object with g_object_unref().
21818 * Returns: (transfer full): #GFileInfo for given @file or %NULL on error.
21823 * g_file_query_settable_attributes:
21824 * @file: input #GFile.
21825 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21826 * @error: a #GError, or %NULL
21828 * Obtain the list of settable attributes for the file.
21829 * Returns the type and full attribute name of all the attributes
21830 * that can be set on this file. This doesn't mean setting it will always
21831 * succeed though, you might get an access failure, or some specific
21832 * file may not support a specific attribute.
21833 * If @cancellable is not %NULL, then the operation can be cancelled by
21834 * triggering the cancellable object from another thread. If the operation
21835 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21836 * When you are done with it, release it with g_file_attribute_info_list_unref()
21838 * Returns: a #GFileAttributeInfoList describing the settable attributes.
21843 * g_file_query_writable_namespaces:
21844 * @file: input #GFile.
21845 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21846 * @error: a #GError, or %NULL
21848 * Obtain the list of attribute namespaces where new attributes
21849 * can be created by a user. An example of this is extended
21850 * attributes (in the "xattr" namespace).
21851 * If @cancellable is not %NULL, then the operation can be cancelled by
21852 * triggering the cancellable object from another thread. If the operation
21853 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21854 * When you are done with it, release it with g_file_attribute_info_list_unref()
21856 * Returns: a #GFileAttributeInfoList describing the writable namespaces.
21862 * @file: #GFile to read.
21863 * @cancellable: (allow-none): a #GCancellable
21864 * @error: a #GError, or %NULL
21866 * Opens a file for reading. The result is a #GFileInputStream that
21867 * can be used to read the contents of the file.
21868 * If @cancellable is not %NULL, then the operation can be cancelled by
21869 * triggering the cancellable object from another thread. If the operation
21870 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21871 * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
21872 * If the file is a directory, the G_IO_ERROR_IS_DIRECTORY error will be returned.
21873 * Other errors are possible too, and depend on what kind of filesystem the file is on.
21874 * Free the returned object with g_object_unref().
21877 * Returns: (transfer full): #GFileInputStream or %NULL on error.
21882 * g_file_read_async:
21883 * @file: input #GFile
21884 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
21885 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21886 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
21887 * @user_data: (closure): the data to pass to callback function
21889 * Asynchronously opens @file for reading.
21890 * For more details, see g_file_read() which is
21891 * the synchronous version of this call.
21892 * When the operation is finished, @callback will be called. You can then call
21893 * g_file_read_finish() to get the result of the operation.
21898 * g_file_read_finish:
21899 * @file: input #GFile.
21900 * @res: a #GAsyncResult.
21901 * @error: a #GError, or %NULL
21903 * Finishes an asynchronous file read operation started with
21904 * g_file_read_async().
21905 * Free the returned object with g_object_unref().
21907 * Returns: (transfer full): a #GFileInputStream or %NULL on error.
21913 * @file: input #GFile.
21914 * @etag: (allow-none): an optional <link linkend="gfile-etag">entity tag</link> for the current #GFile, or #NULL to ignore.
21915 * @make_backup: %TRUE if a backup should be created.
21916 * @flags: a set of #GFileCreateFlags.
21917 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21918 * @error: a #GError, or %NULL
21920 * Returns an output stream for overwriting the file, possibly
21921 * creating a backup copy of the file first. If the file doesn't exist,
21922 * it will be created.
21923 * This will try to replace the file in the safest way possible so
21924 * that any errors during the writing will not affect an already
21925 * existing copy of the file. For instance, for local files it
21926 * may write to a temporary file and then atomically rename over
21927 * the destination when the stream is closed.
21928 * By default files created are generally readable by everyone,
21929 * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file
21930 * will be made readable only to the current user, to the level that
21931 * is supported on the target filesystem.
21932 * If @cancellable is not %NULL, then the operation can be cancelled by
21933 * triggering the cancellable object from another thread. If the operation
21934 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21935 * If you pass in a non-#NULL @etag value, then this value is
21936 * compared to the current entity tag of the file, and if they differ
21937 * an G_IO_ERROR_WRONG_ETAG error is returned. This generally means
21938 * that the file has been changed since you last read it. You can get
21939 * the new etag from g_file_output_stream_get_etag() after you've
21940 * finished writing and closed the #GFileOutputStream. When you load
21941 * a new file you can use g_file_input_stream_query_info() to get
21942 * the etag of the file.
21943 * If @make_backup is %TRUE, this function will attempt to make a backup
21944 * of the current file before overwriting it. If this fails a G_IO_ERROR_CANT_CREATE_BACKUP
21945 * error will be returned. If you want to replace anyway, try again with
21946 * If the file is a directory the G_IO_ERROR_IS_DIRECTORY error will be returned,
21947 * and if the file is some other form of non-regular file then a
21948 * G_IO_ERROR_NOT_REGULAR_FILE error will be returned.
21949 * Some file systems don't allow all file names, and may
21950 * return an G_IO_ERROR_INVALID_FILENAME error, and if the name
21951 * is to long G_IO_ERROR_FILENAME_TOO_LONG will be returned.
21952 * Other errors are possible too, and depend on what kind of
21953 * filesystem the file is on.
21954 * Free the returned object with g_object_unref().
21956 * Returns: (transfer full): a #GFileOutputStream or %NULL on error.
21961 * g_file_replace_async:
21962 * @file: input #GFile.
21963 * @etag: (allow-none): an <link linkend="gfile-etag">entity tag</link> for the current #GFile, or NULL to ignore.
21964 * @make_backup: %TRUE if a backup should be created.
21965 * @flags: a set of #GFileCreateFlags.
21966 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
21967 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21968 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
21969 * @user_data: (closure): the data to pass to callback function
21971 * Asynchronously overwrites the file, replacing the contents, possibly
21972 * creating a backup copy of the file first.
21973 * For more details, see g_file_replace() which is
21974 * the synchronous version of this call.
21975 * When the operation is finished, @callback will be called. You can then call
21976 * g_file_replace_finish() to get the result of the operation.
21981 * g_file_replace_contents:
21982 * @file: input #GFile.
21983 * @contents: a string containing the new contents for @file.
21984 * @length: the length of @contents in bytes.
21985 * @etag: (allow-none): the old <link linkend="gfile-etag">entity tag</link> for the document, or %NULL
21986 * @make_backup: %TRUE if a backup should be created.
21987 * @flags: a set of #GFileCreateFlags.
21988 * @new_etag: (allow-none) (out): a location to a new <link linkend="gfile-etag">entity tag</link> for the document. This should be freed with g_free() when no longer needed, or %NULL
21989 * @cancellable: optional #GCancellable object, %NULL to ignore.
21990 * @error: a #GError, or %NULL
21992 * Replaces the contents of @file with @contents of @length bytes.
21993 * If @etag is specified (not %NULL) any existing file must have that etag, or
21994 * the error %G_IO_ERROR_WRONG_ETAG will be returned.
21995 * If @make_backup is %TRUE, this function will attempt to make a backup of @file.
21996 * If @cancellable is not %NULL, then the operation can be cancelled by
21997 * triggering the cancellable object from another thread. If the operation
21998 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21999 * The returned @new_etag can be used to verify that the file hasn't changed the
22000 * next time it is saved over.
22001 * has occurred, this function will return %FALSE and set @error
22002 * appropriately if present.
22004 * Returns: %TRUE if successful. If an error
22009 * g_file_replace_contents_async:
22010 * @file: input #GFile.
22011 * @contents: string of contents to replace the file with.
22012 * @length: the length of @contents in bytes.
22013 * @etag: (allow-none): a new <link linkend="gfile-etag">entity tag</link> for the @file, or %NULL
22014 * @make_backup: %TRUE if a backup should be created.
22015 * @flags: a set of #GFileCreateFlags.
22016 * @cancellable: optional #GCancellable object, %NULL to ignore.
22017 * @callback: a #GAsyncReadyCallback to call when the request is satisfied
22018 * @user_data: the data to pass to callback function
22020 * Starts an asynchronous replacement of @file with the given
22021 * current entity tag.
22022 * When this operation has completed, @callback will be called with
22023 * g_file_replace_contents_finish().
22024 * If @cancellable is not %NULL, then the operation can be cancelled by
22025 * triggering the cancellable object from another thread. If the operation
22026 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22027 * If @make_backup is %TRUE, this function will attempt to
22028 * make a backup of @file.
22033 * g_file_replace_contents_finish:
22034 * @file: input #GFile.
22035 * @res: a #GAsyncResult.
22036 * @new_etag: (out) (allow-none): a location of a new <link linkend="gfile-etag">entity tag</link> for the document. This should be freed with g_free() when it is no longer needed, or %NULL
22037 * @error: a #GError, or %NULL
22039 * Finishes an asynchronous replace of the given @file. See
22040 * g_file_replace_contents_async(). Sets @new_etag to the new entity
22041 * tag for the document, if present.
22043 * Returns: %TRUE on success, %FALSE on failure.
22048 * g_file_replace_finish:
22049 * @file: input #GFile.
22050 * @res: a #GAsyncResult.
22051 * @error: a #GError, or %NULL
22053 * Finishes an asynchronous file replace operation started with
22054 * g_file_replace_async().
22055 * Free the returned object with g_object_unref().
22057 * Returns: (transfer full): a #GFileOutputStream, or %NULL on error.
22062 * g_file_replace_readwrite:
22064 * @etag: (allow-none): an optional <link linkend="gfile-etag">entity tag</link> for the current #GFile, or #NULL to ignore
22065 * @make_backup: %TRUE if a backup should be created
22066 * @flags: a set of #GFileCreateFlags
22067 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
22068 * @error: return location for a #GError, or %NULL
22070 * Returns an output stream for overwriting the file in readwrite mode,
22071 * possibly creating a backup copy of the file first. If the file doesn't
22072 * exist, it will be created.
22073 * For details about the behaviour, see g_file_replace() which does the same
22074 * thing but returns an output stream only.
22075 * Note that in many non-local file cases read and write streams are not
22076 * supported, so make sure you really need to do read and write streaming,
22077 * rather than just opening for reading or writing.
22078 * Free the returned object with g_object_unref().
22080 * Returns: (transfer full): a #GFileIOStream or %NULL on error.
22086 * g_file_replace_readwrite_async:
22087 * @file: input #GFile.
22088 * @etag: (allow-none): an <link linkend="gfile-etag">entity tag</link> for the current #GFile, or NULL to ignore.
22089 * @make_backup: %TRUE if a backup should be created.
22090 * @flags: a set of #GFileCreateFlags.
22091 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
22092 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22093 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
22094 * @user_data: (closure): the data to pass to callback function
22096 * Asynchronously overwrites the file in read-write mode, replacing the
22097 * contents, possibly creating a backup copy of the file first.
22098 * For more details, see g_file_replace_readwrite() which is
22099 * the synchronous version of this call.
22100 * When the operation is finished, @callback will be called. You can then
22101 * call g_file_replace_readwrite_finish() to get the result of the operation.
22108 * g_file_replace_readwrite_finish:
22109 * @file: input #GFile.
22110 * @res: a #GAsyncResult.
22111 * @error: a #GError, or %NULL
22113 * Finishes an asynchronous file replace operation started with
22114 * g_file_replace_readwrite_async().
22115 * Free the returned object with g_object_unref().
22117 * Returns: (transfer full): a #GFileIOStream, or %NULL on error.
22123 * g_file_resolve_relative_path:
22124 * @file: input #GFile.
22125 * @relative_path: a given relative path string.
22127 * Resolves a relative path for @file to an absolute path.
22128 * This call does no blocking i/o.
22129 * is %NULL or if @file is invalid.
22130 * Free the returned object with g_object_unref().
22132 * Returns: (transfer full): #GFile to the resolved path. %NULL if @relative_path
22137 * g_file_set_attribute:
22138 * @file: input #GFile.
22139 * @attribute: a string containing the attribute's name.
22140 * @type: The type of the attribute
22141 * @value_p: a pointer to the value (or the pointer itself if the type is a pointer type)
22142 * @flags: a set of #GFileQueryInfoFlags.
22143 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22144 * @error: a #GError, or %NULL
22146 * Sets an attribute in the file with attribute name @attribute to @value.
22147 * If @cancellable is not %NULL, then the operation can be cancelled by
22148 * triggering the cancellable object from another thread. If the operation
22149 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22151 * Returns: %TRUE if the attribute was set, %FALSE otherwise.
22156 * g_file_set_attribute_byte_string:
22157 * @file: input #GFile.
22158 * @attribute: a string containing the attribute's name.
22159 * @value: a string containing the attribute's new value.
22160 * @flags: a #GFileQueryInfoFlags.
22161 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22162 * @error: a #GError, or %NULL
22164 * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING to @value.
22165 * If @attribute is of a different type, this operation will fail,
22166 * returning %FALSE.
22167 * If @cancellable is not %NULL, then the operation can be cancelled by
22168 * triggering the cancellable object from another thread. If the operation
22169 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22170 * in the @file, %FALSE otherwise.
22172 * Returns: %TRUE if the @attribute was successfully set to @value
22177 * g_file_set_attribute_int32:
22178 * @file: input #GFile.
22179 * @attribute: a string containing the attribute's name.
22180 * @value: a #gint32 containing the attribute's new value.
22181 * @flags: a #GFileQueryInfoFlags.
22182 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22183 * @error: a #GError, or %NULL
22185 * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_INT32 to @value.
22186 * If @attribute is of a different type, this operation will fail.
22187 * If @cancellable is not %NULL, then the operation can be cancelled by
22188 * triggering the cancellable object from another thread. If the operation
22189 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22190 * in the @file, %FALSE otherwise.
22192 * Returns: %TRUE if the @attribute was successfully set to @value
22197 * g_file_set_attribute_int64:
22198 * @file: input #GFile.
22199 * @attribute: a string containing the attribute's name.
22200 * @value: a #guint64 containing the attribute's new value.
22201 * @flags: a #GFileQueryInfoFlags.
22202 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22203 * @error: a #GError, or %NULL
22205 * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_INT64 to @value.
22206 * If @attribute is of a different type, this operation will fail.
22207 * If @cancellable is not %NULL, then the operation can be cancelled by
22208 * triggering the cancellable object from another thread. If the operation
22209 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22211 * Returns: %TRUE if the @attribute was successfully set, %FALSE otherwise.
22216 * g_file_set_attribute_string:
22217 * @file: input #GFile.
22218 * @attribute: a string containing the attribute's name.
22219 * @value: a string containing the attribute's value.
22220 * @flags: #GFileQueryInfoFlags.
22221 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22222 * @error: a #GError, or %NULL
22224 * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_STRING to @value.
22225 * If @attribute is of a different type, this operation will fail.
22226 * If @cancellable is not %NULL, then the operation can be cancelled by
22227 * triggering the cancellable object from another thread. If the operation
22228 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22230 * Returns: %TRUE if the @attribute was successfully set, %FALSE otherwise.
22235 * g_file_set_attribute_uint32:
22236 * @file: input #GFile.
22237 * @attribute: a string containing the attribute's name.
22238 * @value: a #guint32 containing the attribute's new value.
22239 * @flags: a #GFileQueryInfoFlags.
22240 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22241 * @error: a #GError, or %NULL
22243 * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_UINT32 to @value.
22244 * If @attribute is of a different type, this operation will fail.
22245 * If @cancellable is not %NULL, then the operation can be cancelled by
22246 * triggering the cancellable object from another thread. If the operation
22247 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22248 * in the @file, %FALSE otherwise.
22250 * Returns: %TRUE if the @attribute was successfully set to @value
22255 * g_file_set_attribute_uint64:
22256 * @file: input #GFile.
22257 * @attribute: a string containing the attribute's name.
22258 * @value: a #guint64 containing the attribute's new value.
22259 * @flags: a #GFileQueryInfoFlags.
22260 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22261 * @error: a #GError, or %NULL
22263 * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_UINT64 to @value.
22264 * If @attribute is of a different type, this operation will fail.
22265 * If @cancellable is not %NULL, then the operation can be cancelled by
22266 * triggering the cancellable object from another thread. If the operation
22267 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22268 * in the @file, %FALSE otherwise.
22270 * Returns: %TRUE if the @attribute was successfully set to @value
22275 * g_file_set_attributes_async:
22276 * @file: input #GFile.
22277 * @info: a #GFileInfo.
22278 * @flags: a #GFileQueryInfoFlags.
22279 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
22280 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22281 * @callback: (scope async): a #GAsyncReadyCallback.
22282 * @user_data: (closure): a #gpointer.
22284 * Asynchronously sets the attributes of @file with @info.
22285 * For more details, see g_file_set_attributes_from_info() which is
22286 * the synchronous version of this call.
22287 * When the operation is finished, @callback will be called. You can then call
22288 * g_file_set_attributes_finish() to get the result of the operation.
22293 * g_file_set_attributes_finish:
22294 * @file: input #GFile.
22295 * @result: a #GAsyncResult.
22296 * @info: (out) (transfer full): a #GFileInfo.
22297 * @error: a #GError, or %NULL
22299 * Finishes setting an attribute started in g_file_set_attributes_async().
22301 * Returns: %TRUE if the attributes were set correctly, %FALSE otherwise.
22306 * g_file_set_attributes_from_info:
22307 * @file: input #GFile.
22308 * @info: a #GFileInfo.
22309 * @flags: #GFileQueryInfoFlags
22310 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22311 * @error: a #GError, or %NULL
22313 * Tries to set all attributes in the #GFileInfo on the target values,
22314 * not stopping on the first error.
22315 * If there is any error during this operation then @error will be set to
22316 * the first error. Error on particular fields are flagged by setting
22317 * the "status" field in the attribute value to
22318 * %G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING, which means you can also detect
22320 * If @cancellable is not %NULL, then the operation can be cancelled by
22321 * triggering the cancellable object from another thread. If the operation
22322 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22324 * Returns: %TRUE if there was any error, %FALSE otherwise.
22329 * g_file_set_display_name:
22330 * @file: input #GFile.
22331 * @display_name: a string.
22332 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22333 * @error: a #GError, or %NULL
22335 * Renames @file to the specified display name.
22336 * The display name is converted from UTF8 to the correct encoding for the target
22337 * filesystem if possible and the @file is renamed to this.
22338 * If you want to implement a rename operation in the user interface the edit name
22339 * (#G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME) should be used as the initial value in the rename
22340 * widget, and then the result after editing should be passed to g_file_set_display_name().
22341 * On success the resulting converted filename is returned.
22342 * If @cancellable is not %NULL, then the operation can be cancelled by
22343 * triggering the cancellable object from another thread. If the operation
22344 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22345 * if there was an error.
22346 * Free the returned object with g_object_unref().
22348 * Returns: (transfer full): a #GFile specifying what @file was renamed to, or %NULL
22353 * g_file_set_display_name_async:
22354 * @file: input #GFile.
22355 * @display_name: a string.
22356 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
22357 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22358 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
22359 * @user_data: (closure): the data to pass to callback function
22361 * Asynchronously sets the display name for a given #GFile.
22362 * For more details, see g_file_set_display_name() which is
22363 * the synchronous version of this call.
22364 * When the operation is finished, @callback will be called. You can then call
22365 * g_file_set_display_name_finish() to get the result of the operation.
22370 * g_file_set_display_name_finish:
22371 * @file: input #GFile.
22372 * @res: a #GAsyncResult.
22373 * @error: a #GError, or %NULL
22375 * Finishes setting a display name started with
22376 * g_file_set_display_name_async().
22377 * Free the returned object with g_object_unref().
22379 * Returns: (transfer full): a #GFile or %NULL on error.
22384 * g_file_start_mountable:
22385 * @file: input #GFile.
22386 * @flags: flags affecting the operation
22387 * @start_operation: a #GMountOperation, or %NULL to avoid user interaction.
22388 * @cancellable: optional #GCancellable object, %NULL to ignore.
22389 * @callback: a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
22390 * @user_data: the data to pass to callback function
22392 * Starts a file of type G_FILE_TYPE_MOUNTABLE.
22393 * Using @start_operation, you can request callbacks when, for instance,
22394 * passwords are needed during authentication.
22395 * If @cancellable is not %NULL, then the operation can be cancelled by
22396 * triggering the cancellable object from another thread. If the operation
22397 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22398 * When the operation is finished, @callback will be called. You can then call
22399 * g_file_mount_mountable_finish() to get the result of the operation.
22406 * g_file_start_mountable_finish:
22407 * @file: input #GFile.
22408 * @result: a #GAsyncResult.
22409 * @error: a #GError, or %NULL
22411 * Finishes a start operation. See g_file_start_mountable() for details.
22412 * Finish an asynchronous start operation that was started
22413 * with g_file_start_mountable().
22416 * Returns: %TRUE if the operation finished successfully. %FALSE
22422 * g_file_stop_mountable:
22423 * @file: input #GFile.
22424 * @flags: flags affecting the operation
22425 * @mount_operation: a #GMountOperation, or %NULL to avoid user interaction.
22426 * @cancellable: optional #GCancellable object, %NULL to ignore.
22427 * @callback: a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
22428 * @user_data: the data to pass to callback function
22430 * Stops a file of type G_FILE_TYPE_MOUNTABLE.
22431 * If @cancellable is not %NULL, then the operation can be cancelled by
22432 * triggering the cancellable object from another thread. If the operation
22433 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22434 * When the operation is finished, @callback will be called. You can then call
22435 * g_file_stop_mountable_finish() to get the result of the operation.
22442 * g_file_stop_mountable_finish:
22443 * @file: input #GFile.
22444 * @result: a #GAsyncResult.
22445 * @error: a #GError, or %NULL
22447 * Finishes an stop operation, see g_file_stop_mountable() for details.
22448 * Finish an asynchronous stop operation that was started
22449 * with g_file_stop_mountable().
22452 * Returns: %TRUE if the operation finished successfully. %FALSE
22458 * g_file_supports_thread_contexts:
22461 * Checks if @file supports <link
22462 * linkend="g-main-context-push-thread-default-context">thread-default
22463 * contexts</link>. If this returns %FALSE, you cannot perform
22464 * asynchronous operations on @file in a thread that has a
22465 * thread-default context.
22467 * Returns: Whether or not @file supports thread-default contexts.
22474 * @file: #GFile to send to trash.
22475 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22476 * @error: a #GError, or %NULL
22478 * Sends @file to the "Trashcan", if possible. This is similar to
22479 * deleting it, but the user can recover it before emptying the trashcan.
22480 * Not all file systems support trashing, so this call can return the
22481 * %G_IO_ERROR_NOT_SUPPORTED error.
22482 * If @cancellable is not %NULL, then the operation can be cancelled by
22483 * triggering the cancellable object from another thread. If the operation
22484 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22486 * Returns: %TRUE on successful trash, %FALSE otherwise.
22491 * g_file_unmount_mountable:
22492 * @file: input #GFile.
22493 * @flags: flags affecting the operation
22494 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22495 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
22496 * @user_data: (closure): the data to pass to callback function
22498 * Unmounts a file of type G_FILE_TYPE_MOUNTABLE.
22499 * If @cancellable is not %NULL, then the operation can be cancelled by
22500 * triggering the cancellable object from another thread. If the operation
22501 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22502 * When the operation is finished, @callback will be called. You can then call
22503 * g_file_unmount_mountable_finish() to get the result of the operation.
22505 * Deprecated: 2.22: Use g_file_unmount_mountable_with_operation() instead.
22510 * g_file_unmount_mountable_finish:
22511 * @file: input #GFile.
22512 * @result: a #GAsyncResult.
22513 * @error: a #GError, or %NULL
22515 * Finishes an unmount operation, see g_file_unmount_mountable() for details.
22516 * Finish an asynchronous unmount operation that was started
22517 * with g_file_unmount_mountable().
22520 * Returns: %TRUE if the operation finished successfully. %FALSE
22521 * Deprecated: 2.22: Use g_file_unmount_mountable_with_operation_finish() instead.
22526 * g_file_unmount_mountable_with_operation:
22527 * @file: input #GFile.
22528 * @flags: flags affecting the operation
22529 * @mount_operation: a #GMountOperation, or %NULL to avoid user interaction.
22530 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22531 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
22532 * @user_data: (closure): the data to pass to callback function
22534 * Unmounts a file of type G_FILE_TYPE_MOUNTABLE.
22535 * If @cancellable is not %NULL, then the operation can be cancelled by
22536 * triggering the cancellable object from another thread. If the operation
22537 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22538 * When the operation is finished, @callback will be called. You can then call
22539 * g_file_unmount_mountable_finish() to get the result of the operation.
22546 * g_file_unmount_mountable_with_operation_finish:
22547 * @file: input #GFile.
22548 * @result: a #GAsyncResult.
22549 * @error: a #GError, or %NULL
22551 * Finishes an unmount operation, see g_file_unmount_mountable_with_operation() for details.
22552 * Finish an asynchronous unmount operation that was started
22553 * with g_file_unmount_mountable_with_operation().
22556 * Returns: %TRUE if the operation finished successfully. %FALSE
22562 * g_filename_completer_get_completion_suffix:
22563 * @completer: the filename completer.
22564 * @initial_text: text to be completed.
22566 * Obtains a completion for @initial_text from @completer.
22567 * This string is not owned by GIO, so remember to g_free() it
22570 * Returns: a completed string, or %NULL if no completion exists.
22575 * g_filename_completer_get_completions:
22576 * @completer: the filename completer.
22577 * @initial_text: text to be completed.
22579 * Gets an array of completion strings for a given initial text.
22580 * This array must be freed by g_strfreev() when finished.
22582 * Returns: (array zero-terminated=1) (transfer full): array of strings with possible completions for @initial_text.
22587 * g_filename_completer_new:
22589 * Creates a new filename completer.
22591 * Returns: a #GFilenameCompleter.
22596 * g_filename_completer_set_dirs_only:
22597 * @completer: the filename completer.
22598 * @dirs_only: a #gboolean.
22600 * If @dirs_only is %TRUE, @completer will only
22601 * complete directory names, and not file names.
22606 * g_filter_input_stream_get_base_stream:
22607 * @stream: a #GFilterInputStream.
22609 * Gets the base stream for the filter stream.
22611 * Returns: (transfer none): a #GInputStream.
22616 * g_filter_input_stream_get_close_base_stream:
22617 * @stream: a #GFilterInputStream.
22619 * Returns whether the base stream will be closed when @stream is
22622 * Returns: %TRUE if the base stream will be closed.
22627 * g_filter_input_stream_set_close_base_stream:
22628 * @stream: a #GFilterInputStream.
22629 * @close_base: %TRUE to close the base stream.
22631 * Sets whether the base stream will be closed when @stream is closed.
22636 * g_filter_output_stream_get_base_stream:
22637 * @stream: a #GFilterOutputStream.
22639 * Gets the base stream for the filter stream.
22641 * Returns: (transfer none): a #GOutputStream.
22646 * g_filter_output_stream_get_close_base_stream:
22647 * @stream: a #GFilterOutputStream.
22649 * Returns whether the base stream will be closed when @stream is
22652 * Returns: %TRUE if the base stream will be closed.
22657 * g_filter_output_stream_set_close_base_stream:
22658 * @stream: a #GFilterOutputStream.
22659 * @close_base: %TRUE to close the base stream.
22661 * Sets whether the base stream will be closed when @stream is closed.
22666 * g_hash_table_freeze:
22667 * @hash_table: a #GHashTable
22669 * This function is deprecated and will be removed in the next major
22670 * release of GLib. It does nothing.
22675 * g_hash_table_thaw:
22676 * @hash_table: a #GHashTable
22678 * This function is deprecated and will be removed in the next major
22679 * release of GLib. It does nothing.
22685 * @icon1: pointer to the first #GIcon.
22686 * @icon2: pointer to the second #GIcon.
22688 * Checks if two icons are equal.
22690 * Returns: %TRUE if @icon1 is equal to @icon2. %FALSE otherwise.
22696 * @icon: #gconstpointer to an icon object.
22698 * Gets a hash for an icon.
22699 * use in a #GHashTable or similar data structure.
22702 * Returns: a #guint containing a hash for the @icon, suitable for
22707 * g_icon_new_for_string:
22708 * @str: A string obtained via g_icon_to_string().
22709 * @error: Return location for error.
22711 * Generate a #GIcon instance from @str. This function can fail if
22712 * If your application or library provides one or more #GIcon
22713 * implementations you need to ensure that each #GType is registered
22714 * with the type system prior to calling g_icon_new_for_string().
22715 * interface or %NULL if @error is set.
22717 * Returns: (transfer full): An object implementing the #GIcon
22723 * g_icon_to_string:
22726 * Generates a textual representation of @icon that can be used for
22727 * serialization such as when passing @icon to a different process or
22728 * saving it to persistent storage. Use g_icon_new_for_string() to
22729 * get @icon back from the returned string.
22730 * The encoding of the returned string is proprietary to #GIcon except
22731 * in the following two cases
22734 * If @icon is a #GFileIcon, the returned string is a native path
22735 * (such as <literal>/path/to/my icon.png</literal>) without escaping
22736 * if the #GFile for @icon is a native file. If the file is not
22737 * native, the returned string is the result of g_file_get_uri()
22738 * (such as <literal>sftp://path/to/my%%20icon.png</literal>).
22739 * </para></listitem>
22741 * If @icon is a #GThemedIcon with exactly one name, the encoding is
22742 * simply the name (such as <literal>network-server</literal>).
22743 * </para></listitem>
22745 * be serialized. Use g_free() to free.
22747 * Virtual: to_tokens
22748 * Returns: An allocated NUL-terminated UTF8 string or %NULL if @icon can't
22754 * g_inet_address_get_family:
22755 * @address: a #GInetAddress
22757 * Gets @address's family
22759 * Returns: @address's family
22765 * g_inet_address_get_is_any:
22766 * @address: a #GInetAddress
22768 * Tests whether @address is the "any" address for its family.
22770 * Returns: %TRUE if @address is the "any" address for its family.
22776 * g_inet_address_get_is_link_local:
22777 * @address: a #GInetAddress
22779 * Tests whether @address is a link-local address (that is, if it
22780 * identifies a host on a local network that is not connected to the
22783 * Returns: %TRUE if @address is a link-local address.
22789 * g_inet_address_get_is_loopback:
22790 * @address: a #GInetAddress
22792 * Tests whether @address is the loopback address for its family.
22794 * Returns: %TRUE if @address is the loopback address for its family.
22800 * g_inet_address_get_is_mc_global:
22801 * @address: a #GInetAddress
22803 * Tests whether @address is a global multicast address.
22805 * Returns: %TRUE if @address is a global multicast address.
22811 * g_inet_address_get_is_mc_link_local:
22812 * @address: a #GInetAddress
22814 * Tests whether @address is a link-local multicast address.
22816 * Returns: %TRUE if @address is a link-local multicast address.
22822 * g_inet_address_get_is_mc_node_local:
22823 * @address: a #GInetAddress
22825 * Tests whether @address is a node-local multicast address.
22827 * Returns: %TRUE if @address is a node-local multicast address.
22833 * g_inet_address_get_is_mc_org_local:
22834 * @address: a #GInetAddress
22836 * Tests whether @address is an organization-local multicast address.
22838 * Returns: %TRUE if @address is an organization-local multicast address.
22844 * g_inet_address_get_is_mc_site_local:
22845 * @address: a #GInetAddress
22847 * Tests whether @address is a site-local multicast address.
22849 * Returns: %TRUE if @address is a site-local multicast address.
22855 * g_inet_address_get_is_multicast:
22856 * @address: a #GInetAddress
22858 * Tests whether @address is a multicast address.
22860 * Returns: %TRUE if @address is a multicast address.
22866 * g_inet_address_get_is_site_local:
22867 * @address: a #GInetAddress
22869 * Tests whether @address is a site-local address such as 10.0.0.1
22870 * (that is, the address identifies a host on a local network that can
22871 * not be reached directly from the Internet, but which may have
22872 * outgoing Internet connectivity via a NAT or firewall).
22874 * Returns: %TRUE if @address is a site-local address.
22880 * g_inet_address_get_native_size:
22881 * @address: a #GInetAddress
22883 * Gets the size of the native raw binary address for @address. This
22884 * is the size of the data that you get from g_inet_address_to_bytes().
22886 * Returns: the number of bytes used for the native version of @address.
22892 * g_inet_address_new_any:
22893 * @family: the address family
22895 * Creates a #GInetAddress for the "any" address (unassigned/"don't
22896 * care") for @family.
22899 * Returns: a new #GInetAddress corresponding to the "any" address
22905 * g_inet_address_new_from_bytes:
22906 * @bytes: raw address data
22907 * @family: the address family of @bytes
22909 * Creates a new #GInetAddress from the given @family and @bytes.
22910 * %G_INET_ADDRESS_IPV6.
22912 * Returns: a new #GInetAddress corresponding to @family and @bytes.
22918 * g_inet_address_new_from_string:
22919 * @string: a string representation of an IP address
22921 * Parses @string as an IP address and creates a new #GInetAddress.
22923 * Returns: a new #GInetAddress corresponding to @string, or %NULL if
22929 * g_inet_address_new_loopback:
22930 * @family: the address family
22932 * Creates a #GInetAddress for the loopback address for @family.
22935 * Returns: a new #GInetAddress corresponding to the loopback address
22941 * g_inet_address_to_bytes: (skip)
22942 * @address: a #GInetAddress
22944 * Gets the raw binary address data from @address.
22945 * which should not be modified, stored, or freed. The size of this
22946 * array can be gotten with g_inet_address_get_native_size().
22948 * Returns: a pointer to an internal array of the bytes in @address,
22954 * g_inet_address_to_string:
22955 * @address: a #GInetAddress
22957 * Converts @address to string form.
22960 * Returns: a representation of @address as a string, which should be
22966 * g_inet_socket_address_get_address:
22967 * @address: a #GInetSocketAddress
22969 * Gets @address's #GInetAddress.
22970 * g_object_ref()'d if it will be stored
22972 * Returns: (transfer none): the #GInetAddress for @address, which must be
22978 * g_inet_socket_address_get_port:
22979 * @address: a #GInetSocketAddress
22981 * Gets @address's port.
22983 * Returns: the port for @address
22989 * g_inet_socket_address_new:
22990 * @address: a #GInetAddress
22991 * @port: a port number
22993 * Creates a new #GInetSocketAddress for @address and @port.
22995 * Returns: a new #GInetSocketAddress
23002 * @initable: a #GInitable.
23003 * @cancellable: optional #GCancellable object, %NULL to ignore.
23004 * @error: a #GError location to store the error occuring, or %NULL to ignore.
23006 * Initializes the object implementing the interface. This must be
23007 * done before any real use of the object after initial construction.
23008 * Implementations may also support cancellation. If @cancellable is not %NULL,
23009 * then initialization can be cancelled by triggering the cancellable object
23010 * from another thread. If the operation was cancelled, the error
23011 * %G_IO_ERROR_CANCELLED will be returned. If @cancellable is not %NULL and
23012 * the object doesn't support cancellable initialization the error
23013 * %G_IO_ERROR_NOT_SUPPORTED will be returned.
23014 * If this function is not called, or returns with an error then all
23015 * operations on the object should fail, generally returning the
23016 * error %G_IO_ERROR_NOT_INITIALIZED.
23017 * Implementations of this method must be idempotent, i.e. multiple calls
23018 * to this function with the same argument should return the same results.
23019 * Only the first call initializes the object, further calls return the result
23020 * of the first call. This is so that its safe to implement the singleton
23021 * pattern in the GObject constructor function.
23022 * return %FALSE and set @error appropriately if present.
23024 * Returns: %TRUE if successful. If an error has occurred, this function will
23031 * @object_type: a #GType supporting #GInitable.
23032 * @cancellable: optional #GCancellable object, %NULL to ignore.
23033 * @error: a #GError location to store the error occuring, or %NULL to ignore.
23034 * @first_property_name: the name of the first property, or %NULL if no properties
23035 * @...: the value if the first property, followed by and other property value pairs, and ended by %NULL.
23037 * Helper function for constructing #GInitiable object. This is
23038 * similar to g_object_new() but also initializes the object
23039 * and returns %NULL, setting an error on failure.
23041 * Returns: (transfer full): a newly allocated #GObject, or %NULL on error
23047 * g_initable_new_valist:
23048 * @object_type: a #GType supporting #GInitable.
23049 * @first_property_name: the name of the first property, followed by the value, and other property value pairs, and ended by %NULL.
23050 * @var_args: The var args list generated from @first_property_name.
23051 * @cancellable: optional #GCancellable object, %NULL to ignore.
23052 * @error: a #GError location to store the error occuring, or %NULL to ignore.
23054 * Helper function for constructing #GInitiable object. This is
23055 * similar to g_object_new_valist() but also initializes the object
23056 * and returns %NULL, setting an error on failure.
23058 * Returns: (transfer full): a newly allocated #GObject, or %NULL on error
23065 * @object_type: a #GType supporting #GInitable.
23066 * @n_parameters: the number of parameters in @parameters
23067 * @parameters: the parameters to use to construct the object
23068 * @cancellable: optional #GCancellable object, %NULL to ignore.
23069 * @error: a #GError location to store the error occuring, or %NULL to ignore.
23071 * Helper function for constructing #GInitiable object. This is
23072 * similar to g_object_newv() but also initializes the object
23073 * and returns %NULL, setting an error on failure.
23075 * Returns: (transfer full): a newly allocated #GObject, or %NULL on error
23081 * g_input_stream_clear_pending:
23082 * @stream: input stream
23084 * Clears the pending flag on @stream.
23089 * g_input_stream_close:
23090 * @stream: A #GInputStream.
23091 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23092 * @error: location to store the error occuring, or %NULL to ignore
23094 * Closes the stream, releasing resources related to it.
23095 * Once the stream is closed, all other operations will return %G_IO_ERROR_CLOSED.
23096 * Closing a stream multiple times will not return an error.
23097 * Streams will be automatically closed when the last reference
23098 * is dropped, but you might want to call this function to make sure
23099 * resources are released as early as possible.
23100 * Some streams might keep the backing store of the stream (e.g. a file descriptor)
23101 * open after the stream is closed. See the documentation for the individual
23102 * stream for details.
23103 * On failure the first error that happened will be reported, but the close
23104 * operation will finish as much as possible. A stream that failed to
23105 * close will still return %G_IO_ERROR_CLOSED for all operations. Still, it
23106 * is important to check and report the error to the user.
23107 * If @cancellable is not NULL, then the operation can be cancelled by
23108 * triggering the cancellable object from another thread. If the operation
23109 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
23110 * Cancelling a close will still leave the stream closed, but some streams
23111 * can use a faster close that doesn't block to e.g. check errors.
23113 * Returns: %TRUE on success, %FALSE on failure
23118 * g_input_stream_close_async:
23119 * @stream: A #GInputStream.
23120 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
23121 * @cancellable: (allow-none): optional cancellable object
23122 * @callback: (scope async): callback to call when the request is satisfied
23123 * @user_data: (closure): the data to pass to callback function
23125 * Requests an asynchronous closes of the stream, releasing resources related to it.
23126 * When the operation is finished @callback will be called.
23127 * You can then call g_input_stream_close_finish() to get the result of the
23129 * For behaviour details see g_input_stream_close().
23130 * The asyncronous methods have a default fallback that uses threads to implement
23131 * asynchronicity, so they are optional for inheriting classes. However, if you
23132 * override one you must override all.
23137 * g_input_stream_close_finish:
23138 * @stream: a #GInputStream.
23139 * @result: a #GAsyncResult.
23140 * @error: a #GError location to store the error occuring, or %NULL to ignore.
23142 * Finishes closing a stream asynchronously, started from g_input_stream_close_async().
23144 * Returns: %TRUE if the stream was closed successfully.
23149 * g_input_stream_has_pending:
23150 * @stream: input stream.
23152 * Checks if an input stream has pending actions.
23154 * Returns: %TRUE if @stream has pending actions.
23159 * g_input_stream_is_closed:
23160 * @stream: input stream.
23162 * Checks if an input stream is closed.
23164 * Returns: %TRUE if the stream is closed.
23169 * g_input_stream_read:
23170 * @stream: a #GInputStream.
23171 * @buffer: a buffer to read data into (which should be at least count bytes long).
23172 * @count: the number of bytes that will be read from the stream
23173 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23174 * @error: location to store the error occuring, or %NULL to ignore
23176 * Tries to read @count bytes from the stream into the buffer starting at
23177 * If count is zero returns zero and does nothing. A value of @count
23178 * larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
23179 * On success, the number of bytes read into the buffer is returned.
23180 * It is not an error if this is not the same as the requested size, as it
23181 * can happen e.g. near the end of a file. Zero is returned on end of file
23182 * (or if @count is zero), but never otherwise.
23183 * If @cancellable is not NULL, then the operation can be cancelled by
23184 * triggering the cancellable object from another thread. If the operation
23185 * was cancelled, the error G_IO_ERROR_CANCELLED will be returned. If an
23186 * operation was partially finished when the operation was cancelled the
23187 * partial result will be returned, without an error.
23188 * On error -1 is returned and @error is set accordingly.
23190 * Returns: Number of bytes read, or -1 on error
23195 * g_input_stream_read_all:
23196 * @stream: a #GInputStream.
23197 * @buffer: a buffer to read data into (which should be at least count bytes long).
23198 * @count: the number of bytes that will be read from the stream
23199 * @bytes_read: (out): location to store the number of bytes that was read from the stream
23200 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23201 * @error: location to store the error occuring, or %NULL to ignore
23203 * Tries to read @count bytes from the stream into the buffer starting at
23204 * This function is similar to g_input_stream_read(), except it tries to
23205 * read as many bytes as requested, only stopping on an error or end of stream.
23206 * On a successful read of @count bytes, or if we reached the end of the
23207 * stream, %TRUE is returned, and @bytes_read is set to the number of bytes
23208 * read into @buffer.
23209 * If there is an error during the operation %FALSE is returned and @error
23210 * is set to indicate the error status, @bytes_read is updated to contain
23211 * the number of bytes read into @buffer before the error occurred.
23213 * Returns: %TRUE on success, %FALSE if there was an error
23218 * g_input_stream_read_async:
23219 * @stream: A #GInputStream.
23220 * @buffer: a buffer to read data into (which should be at least count bytes long).
23221 * @count: the number of bytes that will be read from the stream
23222 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
23223 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23224 * @callback: (scope async): callback to call when the request is satisfied
23225 * @user_data: (closure): the data to pass to callback function
23227 * Request an asynchronous read of @count bytes from the stream into the buffer
23228 * starting at @buffer. When the operation is finished @callback will be called.
23229 * You can then call g_input_stream_read_finish() to get the result of the
23231 * During an async request no other sync and async calls are allowed on @stream, and will
23232 * result in %G_IO_ERROR_PENDING errors.
23233 * A value of @count larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
23234 * On success, the number of bytes read into the buffer will be passed to the
23235 * callback. It is not an error if this is not the same as the requested size, as it
23236 * can happen e.g. near the end of a file, but generally we try to read
23237 * as many bytes as requested. Zero is returned on end of file
23238 * (or if @count is zero), but never otherwise.
23239 * Any outstanding i/o request with higher priority (lower numerical value) will
23240 * be executed before an outstanding request with lower priority. Default
23241 * priority is %G_PRIORITY_DEFAULT.
23242 * The asyncronous methods have a default fallback that uses threads to implement
23243 * asynchronicity, so they are optional for inheriting classes. However, if you
23244 * override one you must override all.
23249 * g_input_stream_read_finish:
23250 * @stream: a #GInputStream.
23251 * @result: a #GAsyncResult.
23252 * @error: a #GError location to store the error occuring, or %NULL to ignore.
23254 * Finishes an asynchronous stream read operation.
23256 * Returns: number of bytes read in, or -1 on error.
23261 * g_input_stream_set_pending:
23262 * @stream: input stream
23263 * @error: a #GError location to store the error occuring, or %NULL to ignore.
23265 * Sets @stream to have actions pending. If the pending flag is
23266 * already set or @stream is closed, it will return %FALSE and set
23268 * Returns: %TRUE if pending was previously unset and is now set.
23273 * g_input_stream_skip:
23274 * @stream: a #GInputStream.
23275 * @count: the number of bytes that will be skipped from the stream
23276 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23277 * @error: location to store the error occuring, or %NULL to ignore
23279 * Tries to skip @count bytes from the stream. Will block during the operation.
23280 * This is identical to g_input_stream_read(), from a behaviour standpoint,
23281 * but the bytes that are skipped are not returned to the user. Some
23282 * streams have an implementation that is more efficient than reading the data.
23283 * This function is optional for inherited classes, as the default implementation
23284 * emulates it using read.
23285 * If @cancellable is not %NULL, then the operation can be cancelled by
23286 * triggering the cancellable object from another thread. If the operation
23287 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
23288 * operation was partially finished when the operation was cancelled the
23289 * partial result will be returned, without an error.
23291 * Returns: Number of bytes skipped, or -1 on error
23296 * g_input_stream_skip_async:
23297 * @stream: A #GInputStream.
23298 * @count: the number of bytes that will be skipped from the stream
23299 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
23300 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23301 * @callback: (scope async): callback to call when the request is satisfied
23302 * @user_data: (closure): the data to pass to callback function
23304 * Request an asynchronous skip of @count bytes from the stream.
23305 * When the operation is finished @callback will be called.
23306 * You can then call g_input_stream_skip_finish() to get the result
23307 * of the operation.
23308 * During an async request no other sync and async calls are allowed,
23309 * and will result in %G_IO_ERROR_PENDING errors.
23310 * A value of @count larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
23311 * On success, the number of bytes skipped will be passed to the callback.
23312 * It is not an error if this is not the same as the requested size, as it
23313 * can happen e.g. near the end of a file, but generally we try to skip
23314 * as many bytes as requested. Zero is returned on end of file
23315 * (or if @count is zero), but never otherwise.
23316 * Any outstanding i/o request with higher priority (lower numerical value)
23317 * will be executed before an outstanding request with lower priority.
23318 * Default priority is %G_PRIORITY_DEFAULT.
23319 * The asynchronous methods have a default fallback that uses threads to
23320 * implement asynchronicity, so they are optional for inheriting classes.
23321 * However, if you override one, you must override all.
23326 * g_input_stream_skip_finish:
23327 * @stream: a #GInputStream.
23328 * @result: a #GAsyncResult.
23329 * @error: a #GError location to store the error occuring, or %NULL to ignore.
23331 * Finishes a stream skip operation.
23333 * Returns: the size of the bytes skipped, or %-1 on error.
23338 * g_io_error_from_errno:
23339 * @err_no: Error number as defined in errno.h.
23341 * Converts errno.h error codes into GIO error codes.
23343 * Returns: #GIOErrorEnum value for the given errno.h error number.
23348 * g_io_error_from_win32_error:
23349 * @error_code: Windows error number.
23351 * Converts some common error codes into GIO error codes. The
23352 * fallback value G_IO_ERROR_FAILED is returned for error codes not
23355 * Returns: #GIOErrorEnum value for the given error number.
23361 * g_io_error_quark:
23363 * Gets the GIO Error Quark.
23365 * Returns: a #GQuark.
23370 * g_io_extension_get_name:
23371 * @extension: a #GIOExtension
23373 * Gets the name under which @extension was registered.
23374 * Note that the same type may be registered as extension
23375 * for multiple extension points, under different names.
23377 * Returns: the name of @extension.
23382 * g_io_extension_get_priority:
23383 * @extension: a #GIOExtension
23385 * Gets the priority with which @extension was registered.
23387 * Returns: the priority of @extension
23392 * g_io_extension_get_type:
23393 * @extension: a #GIOExtension
23395 * Gets the type associated with @extension.
23397 * Returns: the type of @extension
23402 * g_io_extension_point_get_extension_by_name:
23403 * @extension_point: a #GIOExtensionPoint
23404 * @name: the name of the extension to get
23406 * Finds a #GIOExtension for an extension point by name.
23407 * given name, or %NULL if there is no extension with that name
23409 * Returns: (transfer none): the #GIOExtension for @extension_point that has the
23414 * g_io_extension_point_get_extensions:
23415 * @extension_point: a #GIOExtensionPoint
23417 * Gets a list of all extensions that implement this extension point.
23418 * The list is sorted by priority, beginning with the highest priority.
23419 * #GIOExtension<!-- -->s. The list is owned by GIO and should not be
23422 * Returns: (element-type GIOExtension) (transfer none): a #GList of
23427 * g_io_extension_point_get_required_type:
23428 * @extension_point: a #GIOExtensionPoint
23430 * Gets the required type for @extension_point.
23431 * or #G_TYPE_INVALID if the extension point has no required type
23433 * Returns: the #GType that all implementations must have,
23438 * g_io_extension_point_implement:
23439 * @extension_point_name: the name of the extension point
23440 * @type: the #GType to register as extension
23441 * @extension_name: the name for the extension
23442 * @priority: the priority for the extension
23444 * Registers @type as extension for the extension point with name
23445 * If @type has already been registered as an extension for this
23446 * extension point, the existing #GIOExtension object is returned.
23448 * Returns: a #GIOExtension object for #GType
23453 * g_io_extension_point_lookup:
23454 * @name: the name of the extension point
23456 * Looks up an existing extension point.
23457 * registered extension point with the given name
23459 * Returns: the #GIOExtensionPoint, or %NULL if there is no
23464 * g_io_extension_point_register:
23465 * @name: The name of the extension point
23467 * Registers an extension point.
23468 * and should not be freed
23470 * Returns: the new #GIOExtensionPoint. This object is owned by GIO
23475 * g_io_extension_point_set_required_type:
23476 * @extension_point: a #GIOExtensionPoint
23477 * @type: the #GType to require
23479 * Sets the required type for @extension_point to @type.
23480 * All implementations must henceforth have this type.
23485 * g_io_extension_ref_class:
23486 * @extension: a #GIOExtension
23488 * Gets a reference to the class for the type that is
23489 * associated with @extension.
23491 * Returns: (transfer full): the #GTypeClass for the type of @extension
23496 * g_io_module_load:
23497 * @module: a #GIOModule.
23499 * Required API for GIO modules to implement.
23500 * This function is ran after the module has been loaded into GIO,
23501 * to initialize the module.
23507 * @filename: filename of the shared library module.
23509 * Creates a new GIOModule that will load the specific
23510 * shared library when in use.
23511 * or %NULL on error.
23513 * Returns: a #GIOModule from given @filename,
23518 * g_io_module_query:
23520 * Optional API for GIO modules to implement.
23521 * Should return a list of all the extension points that may be
23522 * implemented in this module.
23523 * This method will not be called in normal use, however it may be
23524 * called when probing existing modules and recording which extension
23525 * points that this modle is used for. This means we won't have to
23526 * load and initialze this module unless its needed.
23527 * If this function is not implemented by the module the module will
23528 * always be loaded, initialized and then unloaded on application startup
23529 * so that it can register its extension points during init.
23530 * Note that a module need not actually implement all the extension points
23531 * that g_io_module_query returns, since the exact list of extension may
23532 * depend on runtime issues. However all extension points actually implemented
23533 * must be returned by g_io_module_query() (if defined).
23534 * When installing a module that implements g_io_module_query you must
23535 * run gio-querymodules in order to build the cache files required for
23537 * extension points of the module. The array must be suitable for
23538 * freeing with g_strfreev().
23540 * Returns: (transfer full): A %NULL-terminated array of strings, listing the supported
23546 * g_io_module_unload:
23547 * @module: a #GIOModule.
23549 * Required API for GIO modules to implement.
23550 * This function is ran when the module is being unloaded from GIO,
23551 * to finalize the module.
23556 * g_io_modules_load_all_in_directory:
23557 * @dirname: pathname for a directory containing modules to load.
23559 * Loads all the modules in the specified directory.
23560 * If don't require all modules to be initialized (and thus registering
23561 * all gtypes) then you can use g_io_modules_scan_all_in_directory()
23562 * which allows delayed/lazy loading of modules.
23563 * from the directory,
23564 * All the modules are loaded into memory, if you want to
23565 * unload them (enabling on-demand loading) you must call
23566 * g_type_module_unuse() on all the modules. Free the list
23567 * with g_list_free().
23569 * Returns: (element-type GIOModule) (transfer full): a list of #GIOModules loaded
23574 * g_io_modules_scan_all_in_directory:
23575 * @dirname: pathname for a directory containing modules to scan.
23577 * Scans all the modules in the specified directory, ensuring that
23578 * any extension point implemented by a module is registered.
23579 * This may not actually load and initialize all the types in each
23580 * module, some modules may be lazily loaded and initialized when
23581 * an extension point it implementes is used with e.g.
23582 * g_io_extension_point_get_extensions() or
23583 * g_io_extension_point_get_extension_by_name().
23584 * If you need to guarantee that all types are loaded in all the modules,
23585 * use g_io_modules_load_all_in_directory().
23592 * g_io_scheduler_cancel_all_jobs:
23594 * Cancels all cancellable I/O jobs.
23595 * A job is cancellable if a #GCancellable was passed into
23596 * g_io_scheduler_push_job().
23601 * g_io_scheduler_job_send_to_mainloop:
23602 * @job: a #GIOSchedulerJob
23603 * @func: a #GSourceFunc callback that will be called in the original thread
23604 * @user_data: data to pass to @func
23605 * @notify: a #GDestroyNotify for @user_data, or %NULL
23607 * Used from an I/O job to send a callback to be run in the thread
23608 * that the job was started from, waiting for the result (and thus
23609 * blocking the I/O job).
23611 * Returns: The return value of @func
23616 * g_io_scheduler_job_send_to_mainloop_async:
23617 * @job: a #GIOSchedulerJob
23618 * @func: a #GSourceFunc callback that will be called in the original thread
23619 * @user_data: data to pass to @func
23620 * @notify: a #GDestroyNotify for @user_data, or %NULL
23622 * Used from an I/O job to send a callback to be run asynchronously in
23623 * the thread that the job was started from. The callback will be run
23624 * when the main loop is available, but at that time the I/O job might
23625 * have finished. The return value from the callback is ignored.
23626 * Note that if you are passing the @user_data from g_io_scheduler_push_job()
23627 * on to this function you have to ensure that it is not freed before
23628 * g_io_scheduler_push_job() or by using refcounting for @user_data.
23633 * g_io_scheduler_push_job:
23634 * @job_func: a #GIOSchedulerJobFunc.
23635 * @user_data: data to pass to @job_func
23636 * @notify: a #GDestroyNotify for @user_data, or %NULL
23637 * @io_priority: the <link linkend="gioscheduler">I/O priority</link> of the request.
23638 * @cancellable: optional #GCancellable object, %NULL to ignore.
23640 * Schedules the I/O job to run.
23641 * regardless whether the job was cancelled or has run to completion.
23642 * If @cancellable is not %NULL, it can be used to cancel the I/O job
23643 * by calling g_cancellable_cancel() or by calling
23644 * g_io_scheduler_cancel_all_jobs().
23649 * g_io_stream_clear_pending:
23650 * @stream: a #GIOStream
23652 * Clears the pending flag on @stream.
23659 * g_io_stream_close:
23660 * @stream: a #GIOStream
23661 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
23662 * @error: location to store the error occuring, or %NULL to ignore
23664 * Closes the stream, releasing resources related to it. This will also
23665 * closes the individual input and output streams, if they are not already
23667 * Once the stream is closed, all other operations will return
23668 * %G_IO_ERROR_CLOSED. Closing a stream multiple times will not
23670 * Closing a stream will automatically flush any outstanding buffers
23672 * Streams will be automatically closed when the last reference
23673 * is dropped, but you might want to call this function to make sure
23674 * resources are released as early as possible.
23675 * Some streams might keep the backing store of the stream (e.g. a file
23676 * descriptor) open after the stream is closed. See the documentation for
23677 * the individual stream for details.
23678 * On failure the first error that happened will be reported, but the
23679 * close operation will finish as much as possible. A stream that failed
23680 * to close will still return %G_IO_ERROR_CLOSED for all operations.
23681 * Still, it is important to check and report the error to the user,
23682 * otherwise there might be a loss of data as all data might not be written.
23683 * If @cancellable is not NULL, then the operation can be cancelled by
23684 * triggering the cancellable object from another thread. If the operation
23685 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
23686 * Cancelling a close will still leave the stream closed, but some streams
23687 * can use a faster close that doesn't block to e.g. check errors.
23688 * The default implementation of this method just calls close on the
23689 * individual input/output streams.
23691 * Returns: %TRUE on success, %FALSE on failure
23697 * g_io_stream_close_async:
23698 * @stream: a #GIOStream
23699 * @io_priority: the io priority of the request
23700 * @cancellable: (allow-none): optional cancellable object
23701 * @callback: (scope async): callback to call when the request is satisfied
23702 * @user_data: (closure): the data to pass to callback function
23704 * Requests an asynchronous close of the stream, releasing resources
23705 * related to it. When the operation is finished @callback will be
23706 * called. You can then call g_io_stream_close_finish() to get
23707 * the result of the operation.
23708 * For behaviour details see g_io_stream_close().
23709 * The asynchronous methods have a default fallback that uses threads
23710 * to implement asynchronicity, so they are optional for inheriting
23711 * classes. However, if you override one you must override all.
23718 * g_io_stream_close_finish:
23719 * @stream: a #GIOStream
23720 * @result: a #GAsyncResult
23721 * @error: a #GError location to store the error occuring, or %NULL to ignore
23725 * Returns: %TRUE if stream was successfully closed, %FALSE otherwise.
23731 * g_io_stream_get_input_stream:
23732 * @stream: a #GIOStream
23734 * Gets the input stream for this object. This is used
23738 * Returns: (transfer none): a #GInputStream, owned by the #GIOStream.
23744 * g_io_stream_get_output_stream:
23745 * @stream: a #GIOStream
23747 * Gets the output stream for this object. This is used for
23751 * Returns: (transfer none): a #GOutputStream, owned by the #GIOStream.
23757 * g_io_stream_has_pending:
23758 * @stream: a #GIOStream
23760 * Checks if a stream has pending actions.
23762 * Returns: %TRUE if @stream has pending actions.
23768 * g_io_stream_is_closed:
23769 * @stream: a #GIOStream
23771 * Checks if a stream is closed.
23773 * Returns: %TRUE if the stream is closed.
23779 * g_io_stream_set_pending:
23780 * @stream: a #GIOStream
23781 * @error: a #GError location to store the error occuring, or %NULL to ignore
23783 * Sets @stream to have actions pending. If the pending flag is
23784 * already set or @stream is closed, it will return %FALSE and set
23786 * Returns: %TRUE if pending was previously unset and is now set.
23792 * g_io_stream_splice_async:
23793 * @stream1: a #GIOStream.
23794 * @stream2: a #GIOStream.
23795 * @flags: a set of #GIOStreamSpliceFlags.
23796 * @io_priority: the io priority of the request.
23797 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23798 * @callback: (scope async): a #GAsyncReadyCallback.
23799 * @user_data: (closure): user data passed to @callback.
23801 * Asyncronously splice the output stream of @stream1 to the input stream of
23802 * When the operation is finished @callback will be called.
23803 * You can then call g_io_stream_splice_finish() to get the
23804 * result of the operation.
23811 * g_io_stream_splice_finish:
23812 * @result: a #GAsyncResult.
23813 * @error: a #GError location to store the error occuring, or %NULL to ignore.
23815 * Finishes an asynchronous io stream splice operation.
23817 * Returns: %TRUE on success, %FALSE otherwise.
23823 * g_keyfile_settings_backend_new:
23824 * @filename: the filename of the keyfile
23825 * @root_path: the path under which all settings keys appear
23826 * @root_group: (allow-none): the group name corresponding to
23827 * @returns: (transfer full): a keyfile-backed #GSettingsBackend
23829 * Creates a keyfile-backed #GSettingsBackend.
23830 * The filename of the keyfile to use is given by @filename.
23831 * All settings read to or written from the backend must fall under the
23832 * path given in @root_path (which must start and end with a slash and
23833 * not contain two consecutive slashes). @root_path may be "/".
23834 * If @root_group is non-%NULL then it specifies the name of the keyfile
23835 * group used for keys that are written directly below @root_path. For
23836 * example, if @root_path is "/apps/example/" and @root_group is
23837 * "toplevel", then settings the key "/apps/example/enabled" to a value
23838 * of %TRUE will cause the following to appear in the keyfile:
23843 * If @root_group is %NULL then it is not permitted to store keys
23844 * directly below the @root_path.
23845 * the name of the subpath (with the final slash stripped) is used as
23846 * the name of the keyfile group. To continue the example, if
23847 * "/apps/example/profiles/default/font-size" were set to
23848 * 12 then the following would appear in the keyfile:
23850 * [profiles/default]
23853 * The backend will refuse writes (and return writability as being
23854 * %FALSE) for keys outside of @root_path and, in the event that
23855 * Writes will also be refused if the backend detects that it has the
23857 * There is no checking done for your key namespace clashing with the
23858 * syntax of the key file format. For example, if you have '[' or ']'
23859 * characters in your path names or '=' in your key names you may be in
23862 * For keys not stored directly below @root_path (ie: in a sub-path),
23863 * Inability to rewrite the keyfile (ie: the containing directory is not
23868 * g_loadable_icon_load:
23869 * @icon: a #GLoadableIcon.
23870 * @size: an integer.
23871 * @type: (out) (allow-none): a location to store the type of the loaded icon, %NULL to ignore.
23872 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23873 * @error: a #GError location to store the error occuring, or %NULL to ignore.
23875 * Loads a loadable icon. For the asynchronous version of this function,
23876 * see g_loadable_icon_load_async().
23878 * Returns: (transfer full): a #GInputStream to read the icon from.
23883 * g_loadable_icon_load_async:
23884 * @icon: a #GLoadableIcon.
23885 * @size: an integer.
23886 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23887 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
23888 * @user_data: (closure): the data to pass to callback function
23890 * Loads an icon asynchronously. To finish this function, see
23891 * g_loadable_icon_load_finish(). For the synchronous, blocking
23892 * version of this function, see g_loadable_icon_load().
23897 * g_loadable_icon_load_finish:
23898 * @icon: a #GLoadableIcon.
23899 * @res: a #GAsyncResult.
23900 * @type: a location to store the type of the loaded icon, %NULL to ignore.
23901 * @error: a #GError location to store the error occuring, or %NULL to ignore.
23903 * Finishes an asynchronous icon load started in g_loadable_icon_load_async().
23905 * Returns: (transfer full): a #GInputStream to read the icon from.
23912 * Returns a new #GVfs handle for a local vfs.
23914 * Returns: a new #GVfs handle.
23920 * @loop: a #GMainLoop
23922 * Frees the memory allocated for the #GMainLoop.
23924 * Deprecated: 2.2: Use g_main_loop_unref() instead
23929 * g_main_is_running:
23930 * @loop: a #GMainLoop
23932 * Checks if the main loop is running.
23934 * Returns: %TRUE if the main loop is running
23935 * Deprecated: 2.2: Use g_main_loop_is_running() instead
23940 * g_main_iteration:
23941 * @may_block: set to %TRUE if it should block (i.e. wait) until an event source becomes ready. It will return after an event source has been processed. If set to %FALSE it will return immediately if no event source is ready to be processed.
23943 * Runs a single iteration for the default #GMainContext.
23945 * Returns: %TRUE if more events are pending.
23946 * Deprecated: 2.2: Use g_main_context_iteration() instead.
23952 * @is_running: set to %TRUE to indicate that the loop is running. This is not very important since calling g_main_run() will set this to %TRUE anyway.
23954 * Creates a new #GMainLoop for th default main context.
23956 * Returns: a new #GMainLoop
23957 * Deprecated: 2.2: Use g_main_loop_new() instead
23964 * Checks if any events are pending for the default #GMainContext
23965 * (i.e. ready to be processed).
23967 * Returns: %TRUE if any events are pending.
23968 * Deprected: 2.2: Use g_main_context_pending() instead.
23974 * @loop: a #GMainLoop
23976 * Stops the #GMainLoop.
23977 * If g_main_run() was called to run the #GMainLoop, it will now return.
23979 * Deprecated: 2.2: Use g_main_loop_quit() instead
23985 * @loop: a #GMainLoop
23987 * Runs a main loop until it stops running.
23989 * Deprecated: 2.2: Use g_main_loop_run() instead
23994 * g_main_set_poll_func:
23995 * @func: the function to call to poll all file descriptors
23997 * Sets the function to use for the handle polling of file descriptors
23998 * for the default main context.
24000 * Deprecated: 2.2: Use g_main_context_set_poll_func() again
24005 * g_memory_input_stream_add_data:
24006 * @stream: a #GMemoryInputStream
24007 * @data: (array length=len) (element-type guint8): input data
24008 * @len: length of the data, may be -1 if @data is a nul-terminated string
24009 * @destroy: (allow-none): function that is called to free @data, or %NULL
24011 * Appends @data to data that can be read from the input stream
24016 * g_memory_input_stream_new:
24018 * Creates a new empty #GMemoryInputStream.
24020 * Returns: a new #GInputStream
24025 * g_memory_input_stream_new_from_data:
24026 * @data: (array length=len) (element-type guint8): input data
24027 * @len: length of the data, may be -1 if @data is a nul-terminated string
24028 * @destroy: (allow-none): function that is called to free @data, or %NULL
24030 * Creates a new #GMemoryInputStream with data in memory of a given size.
24032 * Returns: new #GInputStream read from @data of @len bytes.
24037 * g_memory_output_stream_get_data:
24038 * @ostream: a #GMemoryOutputStream
24040 * Gets any loaded data from the @ostream.
24041 * Note that the returned pointer may become invalid on the next
24042 * write or truncate operation on the stream.
24044 * Returns: (transfer none): pointer to the stream's data
24049 * g_memory_output_stream_get_data_size:
24050 * @ostream: a #GMemoryOutputStream
24052 * Returns the number of bytes from the start up
24053 * to including the last byte written in the stream
24054 * that has not been truncated away.
24056 * Returns: the number of bytes written to the stream
24062 * g_memory_output_stream_get_size:
24063 * @ostream: a #GMemoryOutputStream
24065 * Gets the size of the currently allocated data area (available from
24066 * g_memory_output_stream_get_data()). If the stream isn't
24067 * growable (no realloc was passed to g_memory_output_stream_new()) then
24068 * this is the maximum size of the stream and further writes
24069 * will return %G_IO_ERROR_NO_SPACE.
24070 * Note that for growable streams the returned size may become invalid on
24071 * the next write or truncate operation on the stream.
24072 * If you want the number of bytes currently written to the stream, use
24073 * g_memory_output_stream_get_data_size().
24075 * Returns: the number of bytes allocated for the data buffer
24080 * g_memory_output_stream_new: (skip)
24081 * @data: pointer to a chunk of memory to use, or %NULL
24082 * @size: the size of @data
24083 * @realloc_function: a function with realloc() semantics (like g_realloc()) to be called when @data needs to be grown, or %NULL
24084 * @destroy_function: a function to be called on @data when the stream is finalized, or %NULL
24086 * Creates a new #GMemoryOutputStream.
24087 * If @data is non-%NULL, the stream will use that for its internal storage.
24088 * If @realloc_fn is non-%NULL, it will be used for resizing the internal
24089 * storage when necessary. To construct a fixed-size output stream,
24090 * pass %NULL as @realloc_fn.
24092 * /* a stream that can grow */
24093 * stream = g_memory_output_stream_new (NULL, 0, realloc, free);
24094 * /* another stream that can grow */
24095 * stream2 = g_memory_output_stream_new (NULL, 0, g_realloc, g_free);
24096 * /* a fixed-size stream */
24097 * data = malloc (200);
24098 * stream3 = g_memory_output_stream_new (data, 200, NULL, free);
24101 * Returns: A newly created #GMemoryOutputStream object.
24106 * g_memory_output_stream_steal_data:
24107 * @ostream: a #GMemoryOutputStream
24109 * Gets any loaded data from the @ostream. Ownership of the data
24110 * is transferred to the caller; when no longer needed it must be
24111 * freed using the free function set in @ostream's
24112 * #GMemoryOutputStream:destroy-function property.
24114 * Returns: (transfer full): the stream's data
24120 * g_mount_can_eject:
24121 * @mount: a #GMount.
24123 * Checks if @mount can be eject.
24125 * Returns: %TRUE if the @mount can be ejected.
24130 * g_mount_can_unmount:
24131 * @mount: a #GMount.
24133 * Checks if @mount can be mounted.
24135 * Returns: %TRUE if the @mount can be unmounted.
24141 * @mount: a #GMount.
24142 * @flags: flags affecting the unmount if required for eject
24143 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24144 * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
24145 * @user_data: user data passed to @callback.
24147 * Ejects a mount. This is an asynchronous operation, and is
24148 * finished by calling g_mount_eject_finish() with the @mount
24149 * and #GAsyncResult data returned in the @callback.
24151 * Deprecated: 2.22: Use g_mount_eject_with_operation() instead.
24156 * g_mount_eject_finish:
24157 * @mount: a #GMount.
24158 * @result: a #GAsyncResult.
24159 * @error: a #GError location to store the error occuring, or %NULL to ignore.
24161 * Finishes ejecting a mount. If any errors occurred during the operation,
24163 * Returns: %TRUE if the mount was successfully ejected. %FALSE otherwise.
24164 * Deprecated: 2.22: Use g_mount_eject_with_operation_finish() instead.
24169 * g_mount_eject_with_operation:
24170 * @mount: a #GMount.
24171 * @flags: flags affecting the unmount if required for eject
24172 * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
24173 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24174 * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
24175 * @user_data: user data passed to @callback.
24177 * Ejects a mount. This is an asynchronous operation, and is
24178 * finished by calling g_mount_eject_with_operation_finish() with the @mount
24179 * and #GAsyncResult data returned in the @callback.
24186 * g_mount_eject_with_operation_finish:
24187 * @mount: a #GMount.
24188 * @result: a #GAsyncResult.
24189 * @error: a #GError location to store the error occuring, or %NULL to ignore.
24191 * Finishes ejecting a mount. If any errors occurred during the operation,
24193 * Returns: %TRUE if the mount was successfully ejected. %FALSE otherwise.
24199 * g_mount_get_default_location:
24200 * @mount: a #GMount.
24202 * Gets the default location of @mount. The default location of the given
24203 * the home directory, or the root of the volume).
24204 * The returned object should be unreffed with
24205 * g_object_unref() when no longer needed.
24207 * Returns: (transfer full): a #GFile.
24212 * g_mount_get_drive:
24213 * @mount: a #GMount.
24215 * Gets the drive for the @mount.
24216 * This is a convenience method for getting the #GVolume and then
24217 * using that object to get the #GDrive.
24218 * The returned object should be unreffed with
24219 * g_object_unref() when no longer needed.
24221 * Returns: (transfer full): a #GDrive or %NULL if @mount is not associated with a volume or a drive.
24226 * g_mount_get_icon:
24227 * @mount: a #GMount.
24229 * Gets the icon for @mount.
24230 * The returned object should be unreffed with
24231 * g_object_unref() when no longer needed.
24233 * Returns: (transfer full): a #GIcon.
24238 * g_mount_get_name:
24239 * @mount: a #GMount.
24241 * Gets the name of @mount.
24242 * The returned string should be freed with g_free()
24243 * when no longer needed.
24245 * Returns: the name for the given @mount.
24250 * g_mount_get_root:
24251 * @mount: a #GMount.
24253 * Gets the root directory on @mount.
24254 * The returned object should be unreffed with
24255 * g_object_unref() when no longer needed.
24257 * Returns: (transfer full): a #GFile.
24262 * g_mount_get_uuid:
24263 * @mount: a #GMount.
24265 * Gets the UUID for the @mount. The reference is typically based on
24266 * the file system UUID for the mount in question and should be
24267 * considered an opaque string. Returns %NULL if there is no UUID
24269 * The returned string should be freed with g_free()
24270 * when no longer needed.
24272 * Returns: the UUID for @mount or %NULL if no UUID can be computed.
24277 * g_mount_get_volume:
24278 * @mount: a #GMount.
24280 * Gets the volume for the @mount.
24281 * The returned object should be unreffed with
24282 * g_object_unref() when no longer needed.
24284 * Returns: (transfer full): a #GVolume or %NULL if @mount is not associated with a volume.
24289 * g_mount_guess_content_type:
24290 * @mount: a #GMount
24291 * @force_rescan: Whether to force a rescan of the content. Otherwise a cached result will be used if available
24292 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
24293 * @callback: a #GAsyncReadyCallback
24294 * @user_data: user data passed to @callback
24296 * Tries to guess the type of content stored on @mount. Returns one or
24297 * more textual identifiers of well-known content types (typically
24298 * prefixed with "x-content/"), e.g. x-content/image-dcf for camera
24299 * memory cards. See the <ulink url="http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec">shared-mime-info</ulink>
24300 * specification for more on x-content types.
24301 * This is an asynchronous operation (see
24302 * g_mount_guess_content_type_sync() for the synchronous version), and
24303 * is finished by calling g_mount_guess_content_type_finish() with the
24310 * g_mount_guess_content_type_finish:
24311 * @mount: a #GMount
24312 * @result: a #GAsyncResult
24313 * @error: a #GError location to store the error occuring, or %NULL to ignore
24315 * Finishes guessing content types of @mount. If any errors occured
24316 * during the operation, @error will be set to contain the errors and
24317 * %FALSE will be returned. In particular, you may get an
24318 * %G_IO_ERROR_NOT_SUPPORTED if the mount does not support content
24320 * Caller should free this array with g_strfreev() when done with it.
24322 * Returns: (transfer full) (element-type utf8): a %NULL-terminated array of content types or %NULL on error.
24328 * g_mount_guess_content_type_sync:
24329 * @mount: a #GMount
24330 * @force_rescan: Whether to force a rescan of the content. Otherwise a cached result will be used if available
24331 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
24332 * @error: a #GError location to store the error occuring, or %NULL to ignore
24334 * Tries to guess the type of content stored on @mount. Returns one or
24335 * more textual identifiers of well-known content types (typically
24336 * prefixed with "x-content/"), e.g. x-content/image-dcf for camera
24337 * memory cards. See the <ulink url="http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec">shared-mime-info</ulink>
24338 * specification for more on x-content types.
24339 * This is an synchronous operation and as such may block doing IO;
24340 * see g_mount_guess_content_type() for the asynchronous version.
24341 * Caller should free this array with g_strfreev() when done with it.
24343 * Returns: (transfer full) (element-type utf8): a %NULL-terminated array of content types or %NULL on error.
24349 * g_mount_is_shadowed:
24350 * @mount: A #GMount.
24352 * Determines if @mount is shadowed. Applications or libraries should
24353 * avoid displaying @mount in the user interface if it is shadowed.
24354 * A mount is said to be shadowed if there exists one or more user
24355 * visible objects (currently #GMount objects) with a root that is
24356 * inside the root of @mount.
24357 * One application of shadow mounts is when exposing a single file
24358 * system that is used to address several logical volumes. In this
24359 * situation, a #GVolumeMonitor implementation would create two
24360 * #GVolume objects (for example, one for the camera functionality of
24361 * the device and one for a SD card reader on the device) with
24362 * activation URIs <literal>gphoto2://[usb:001,002]/store1/</literal>
24363 * and <literal>gphoto2://[usb:001,002]/store2/</literal>. When the
24364 * underlying mount (with root
24365 * <literal>gphoto2://[usb:001,002]/</literal>) is mounted, said
24366 * #GVolumeMonitor implementation would create two #GMount objects
24367 * (each with their root matching the corresponding volume activation
24368 * root) that would shadow the original mount.
24369 * The proxy monitor in GVfs 2.26 and later, automatically creates and
24370 * manage shadow mounts (and shadows the underlying mount) if the
24371 * activation root on a #GVolume is set.
24373 * Returns: %TRUE if @mount is shadowed.
24379 * g_mount_operation_get_anonymous:
24380 * @op: a #GMountOperation.
24382 * Check to see whether the mount operation is being used
24383 * for an anonymous user.
24385 * Returns: %TRUE if mount operation is anonymous.
24390 * g_mount_operation_get_choice:
24391 * @op: a #GMountOperation.
24393 * Gets a choice from the mount operation.
24394 * the choice's list, or %0.
24396 * Returns: an integer containing an index of the user's choice from
24401 * g_mount_operation_get_domain:
24402 * @op: a #GMountOperation.
24404 * Gets the domain of the mount operation.
24406 * Returns: a string set to the domain.
24411 * g_mount_operation_get_password:
24412 * @op: a #GMountOperation.
24414 * Gets a password from the mount operation.
24416 * Returns: a string containing the password within @op.
24421 * g_mount_operation_get_password_save:
24422 * @op: a #GMountOperation.
24424 * Gets the state of saving passwords for the mount operation.
24426 * Returns: a #GPasswordSave flag.
24431 * g_mount_operation_get_usernam:
24432 * @op: a #GMountOperation.
24434 * Get the user name from the mount operation.
24436 * Returns: a string containing the user name.
24441 * g_mount_operation_new:
24443 * Creates a new mount operation.
24445 * Returns: a #GMountOperation.
24450 * g_mount_operation_reply:
24451 * @op: a #GMountOperation
24452 * @result: a #GMountOperationResult
24454 * Emits the #GMountOperation::reply signal.
24459 * g_mount_operation_set_anonymous:
24460 * @op: a #GMountOperation.
24461 * @anonymous: boolean value.
24463 * Sets the mount operation to use an anonymous user if @anonymous is %TRUE.
24468 * g_mount_operation_set_choice:
24469 * @op: a #GMountOperation.
24470 * @choice: an integer.
24472 * Sets a default choice for the mount operation.
24477 * g_mount_operation_set_domain:
24478 * @op: a #GMountOperation.
24479 * @domain: the domain to set.
24481 * Sets the mount operation's domain.
24486 * g_mount_operation_set_password:
24487 * @op: a #GMountOperation.
24488 * @password: password to set.
24490 * Sets the mount operation's password to @password.
24495 * g_mount_operation_set_password_save:
24496 * @op: a #GMountOperation.
24497 * @save: a set of #GPasswordSave flags.
24499 * Sets the state of saving passwords for the mount operation.
24504 * g_mount_operation_set_username:
24505 * @op: a #GMountOperation.
24506 * @username: input username.
24508 * Sets the user name within @op to @username.
24514 * @mount: a #GMount.
24515 * @flags: flags affecting the operation
24516 * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
24517 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24518 * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
24519 * @user_data: user data passed to @callback.
24521 * Remounts a mount. This is an asynchronous operation, and is
24522 * finished by calling g_mount_remount_finish() with the @mount
24523 * and #GAsyncResults data returned in the @callback.
24524 * Remounting is useful when some setting affecting the operation
24525 * of the volume has been changed, as these may need a remount to
24526 * take affect. While this is semantically equivalent with unmounting
24527 * and then remounting not all backends might need to actually be
24533 * g_mount_remount_finish:
24534 * @mount: a #GMount.
24535 * @result: a #GAsyncResult.
24536 * @error: a #GError location to store the error occuring, or %NULL to ignore.
24538 * Finishes remounting a mount. If any errors occurred during the operation,
24540 * Returns: %TRUE if the mount was successfully remounted. %FALSE otherwise.
24546 * @mount: A #GMount.
24548 * Increments the shadow count on @mount. Usually used by
24549 * #GVolumeMonitor implementations when creating a shadow mount for
24550 * will need to emit the #GMount::changed signal on @mount manually.
24558 * @mount: a #GMount.
24559 * @flags: flags affecting the operation
24560 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24561 * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
24562 * @user_data: user data passed to @callback.
24564 * Unmounts a mount. This is an asynchronous operation, and is
24565 * finished by calling g_mount_unmount_finish() with the @mount
24566 * and #GAsyncResult data returned in the @callback.
24568 * Deprecated: 2.22: Use g_mount_unmount_with_operation() instead.
24573 * g_mount_unmount_finish:
24574 * @mount: a #GMount.
24575 * @result: a #GAsyncResult.
24576 * @error: a #GError location to store the error occuring, or %NULL to ignore.
24578 * Finishes unmounting a mount. If any errors occurred during the operation,
24580 * Returns: %TRUE if the mount was successfully unmounted. %FALSE otherwise.
24581 * Deprecated: 2.22: Use g_mount_unmount_with_operation_finish() instead.
24586 * g_mount_unmount_with_operation:
24587 * @mount: a #GMount.
24588 * @flags: flags affecting the operation
24589 * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
24590 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24591 * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
24592 * @user_data: user data passed to @callback.
24594 * Unmounts a mount. This is an asynchronous operation, and is
24595 * finished by calling g_mount_unmount_with_operation_finish() with the @mount
24596 * and #GAsyncResult data returned in the @callback.
24603 * g_mount_unmount_with_operation_finish:
24604 * @mount: a #GMount.
24605 * @result: a #GAsyncResult.
24606 * @error: a #GError location to store the error occuring, or %NULL to ignore.
24608 * Finishes unmounting a mount. If any errors occurred during the operation,
24610 * Returns: %TRUE if the mount was successfully unmounted. %FALSE otherwise.
24616 * g_mount_unshadow:
24617 * @mount: A #GMount.
24619 * Decrements the shadow count on @mount. Usually used by
24620 * #GVolumeMonitor implementations when destroying a shadow mount for
24621 * will need to emit the #GMount::changed signal on @mount manually.
24628 * g_network_address_get_hostname:
24629 * @addr: a #GNetworkAddress
24631 * Gets @addr's hostname. This might be either UTF-8 or ASCII-encoded,
24632 * depending on what @addr was created with.
24634 * Returns: @addr's hostname
24640 * g_network_address_get_port:
24641 * @addr: a #GNetworkAddress
24643 * Gets @addr's port number
24645 * Returns: @addr's port (which may be 0)
24651 * g_network_address_get_scheme:
24652 * @addr: a #GNetworkAddress
24654 * Gets @addr's scheme
24656 * Returns: @addr's scheme (%NULL if not built from URI)
24662 * g_network_address_new:
24663 * @hostname: the hostname
24666 * Creates a new #GSocketConnectable for connecting to the given
24668 * Returns: (transfer full): the new #GNetworkAddress
24674 * g_network_address_parse:
24675 * @host_and_port: the hostname and optionally a port
24676 * @default_port: the default port if not in @host_and_port
24677 * @error: a pointer to a #GError, or %NULL
24679 * Creates a new #GSocketConnectable for connecting to the given
24680 * parsing @host_and_port fails.
24681 * address, an IPv4 address, or a domain name (in which case a DNS
24682 * lookup is performed). Quoting with [] is supported for all address
24683 * types. A port override may be specified in the usual way with a
24684 * colon. Ports may be given as decimal numbers or symbolic names (in
24685 * which case an /etc/services lookup is performed).
24686 * If no port is specified in @host_and_port then @default_port will be
24687 * used as the port number to connect to.
24688 * In general, @host_and_port is expected to be provided by the user
24689 * (allowing them to give the hostname, and a port overide if necessary)
24690 * and @default_port is expected to be provided by the application.
24692 * Returns: (transfer full): the new #GNetworkAddress, or %NULL on error
24698 * g_network_address_parse_uri:
24699 * @uri: the hostname and optionally a port
24700 * @default_port: The default port if none is found in the URI
24701 * @error: a pointer to a #GError, or %NULL
24703 * Creates a new #GSocketConnectable for connecting to the given
24704 * Using this rather than g_network_address_new() or
24705 * g_network_address_parse_host() allows #GSocketClient to determine
24706 * when to use application-specific proxy protocols.
24708 * Returns: (transfer full): the new #GNetworkAddress, or %NULL on error
24714 * g_network_service_get_domain:
24715 * @srv: a #GNetworkService
24717 * Gets the domain that @srv serves. This might be either UTF-8 or
24718 * ASCII-encoded, depending on what @srv was created with.
24720 * Returns: @srv's domain name
24726 * g_network_service_get_protocol:
24727 * @srv: a #GNetworkService
24729 * Gets @srv's protocol name (eg, "tcp").
24731 * Returns: @srv's protocol name
24737 * g_network_service_get_scheme:
24738 * @srv: a #GNetworkService
24740 * Get's the URI scheme used to resolve proxies. By default, the service name
24741 * is used as scheme.
24743 * Returns: @srv's scheme name
24749 * g_network_service_get_service:
24750 * @srv: a #GNetworkService
24752 * Gets @srv's service name (eg, "ldap").
24754 * Returns: @srv's service name
24760 * g_network_service_new:
24761 * @service: the service type to look up (eg, "ldap")
24762 * @protocol: the networking protocol to use for @service (eg, "tcp")
24763 * @domain: the DNS domain to look up the service in
24765 * Creates a new #GNetworkService representing the given @service,
24766 * #GSocketConnectable interface to resolve it.
24768 * Returns: (transfer full): a new #GNetworkService
24774 * g_network_service_set_scheme:
24775 * @srv: a #GNetworkService
24776 * @scheme: a URI scheme
24778 * Set's the URI scheme used to resolve proxies. By default, the service name
24779 * is used as scheme.
24787 * @struct_type: the type of the elements to allocate
24788 * @n_structs: the number of elements to allocate
24790 * Allocates @n_structs elements of type @struct_type.
24791 * The returned pointer is cast to a pointer to the given type.
24792 * If @n_structs is 0 it returns %NULL.
24793 * Care is taken to avoid overflow when calculating the size of the allocated block.
24794 * Since the returned pointer is already casted to the right type,
24795 * it is normally unnecessary to cast it explicitly, and doing
24796 * so might hide memory allocation errors.
24798 * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type
24804 * @struct_type: the type of the elements to allocate.
24805 * @n_structs: the number of elements to allocate.
24807 * Allocates @n_structs elements of type @struct_type, initialized to 0's.
24808 * The returned pointer is cast to a pointer to the given type.
24809 * If @n_structs is 0 it returns %NULL.
24810 * Care is taken to avoid overflow when calculating the size of the allocated block.
24811 * Since the returned pointer is already casted to the right type,
24812 * it is normally unnecessary to cast it explicitly, and doing
24813 * so might hide memory allocation errors.
24815 * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type.
24821 * @struct_type: Type of memory chunks to be allocated
24822 * @n_structs: Number of chunks to be allocated
24824 * Wraps g_alloca() in a more typesafe manner.
24826 * Returns: Pointer to stack space for @n_structs chunks of type @struct_type
24832 * @parent: the #GNode to place the new #GNode under
24833 * @node: the #GNode to insert
24835 * Inserts a #GNode as the last child of the given parent.
24837 * Returns: the inserted #GNode
24842 * g_node_append_data:
24843 * @parent: the #GNode to place the new #GNode under
24844 * @data: the data for the new #GNode
24846 * Inserts a new #GNode as the last child of the given parent.
24848 * Returns: the new #GNode
24853 * g_node_first_child:
24856 * Gets the first child of a #GNode.
24857 * or has no children
24859 * Returns: the first child of @node, or %NULL if @node is %NULL
24864 * g_node_insert_data:
24865 * @parent: the #GNode to place the new #GNode under
24866 * @position: the position to place the new #GNode at. If position is -1, the new #GNode is inserted as the last child of @parent
24867 * @data: the data for the new #GNode
24869 * Inserts a new #GNode at the given position.
24871 * Returns: the new #GNode
24876 * g_node_insert_data_before:
24877 * @parent: the #GNode to place the new #GNode under
24878 * @sibling: the sibling #GNode to place the new #GNode before
24879 * @data: the data for the new #GNode
24881 * Inserts a new #GNode before the given sibling.
24883 * Returns: the new #GNode
24888 * g_node_next_sibling:
24891 * Gets the next sibling of a #GNode.
24894 * Returns: the next sibling of @node, or %NULL if @node is the last node
24899 * g_node_prepend_data:
24900 * @parent: the #GNode to place the new #GNode under
24901 * @data: the data for the new #GNode
24903 * Inserts a new #GNode as the first child of the given parent.
24905 * Returns: the new #GNode
24910 * g_node_prev_sibling:
24913 * Gets the previous sibling of a #GNode.
24916 * Returns: the previous sibling of @node, or %NULL if @node is the first
24921 * g_output_stream_clear_pending:
24922 * @stream: output stream
24924 * Clears the pending flag on @stream.
24929 * g_output_stream_close:
24930 * @stream: A #GOutputStream.
24931 * @cancellable: (allow-none): optional cancellable object
24932 * @error: location to store the error occuring, or %NULL to ignore
24934 * Closes the stream, releasing resources related to it.
24935 * Once the stream is closed, all other operations will return %G_IO_ERROR_CLOSED.
24936 * Closing a stream multiple times will not return an error.
24937 * Closing a stream will automatically flush any outstanding buffers in the
24939 * Streams will be automatically closed when the last reference
24940 * is dropped, but you might want to call this function to make sure
24941 * resources are released as early as possible.
24942 * Some streams might keep the backing store of the stream (e.g. a file descriptor)
24943 * open after the stream is closed. See the documentation for the individual
24944 * stream for details.
24945 * On failure the first error that happened will be reported, but the close
24946 * operation will finish as much as possible. A stream that failed to
24947 * close will still return %G_IO_ERROR_CLOSED for all operations. Still, it
24948 * is important to check and report the error to the user, otherwise
24949 * there might be a loss of data as all data might not be written.
24950 * If @cancellable is not NULL, then the operation can be cancelled by
24951 * triggering the cancellable object from another thread. If the operation
24952 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
24953 * Cancelling a close will still leave the stream closed, but there some streams
24954 * can use a faster close that doesn't block to e.g. check errors. On
24955 * cancellation (as with any error) there is no guarantee that all written
24956 * data will reach the target.
24958 * Returns: %TRUE on success, %FALSE on failure
24963 * g_output_stream_close_async:
24964 * @stream: A #GOutputStream.
24965 * @io_priority: the io priority of the request.
24966 * @cancellable: (allow-none): optional cancellable object
24967 * @callback: (scope async): callback to call when the request is satisfied
24968 * @user_data: (closure): the data to pass to callback function
24970 * Requests an asynchronous close of the stream, releasing resources
24971 * related to it. When the operation is finished @callback will be
24972 * called. You can then call g_output_stream_close_finish() to get
24973 * the result of the operation.
24974 * For behaviour details see g_output_stream_close().
24975 * The asyncronous methods have a default fallback that uses threads
24976 * to implement asynchronicity, so they are optional for inheriting
24977 * classes. However, if you override one you must override all.
24982 * g_output_stream_close_finish:
24983 * @stream: a #GOutputStream.
24984 * @result: a #GAsyncResult.
24985 * @error: a #GError location to store the error occuring, or %NULL to ignore.
24987 * Closes an output stream.
24989 * Returns: %TRUE if stream was successfully closed, %FALSE otherwise.
24994 * g_output_stream_flush:
24995 * @stream: a #GOutputStream.
24996 * @cancellable: (allow-none): optional cancellable object
24997 * @error: location to store the error occuring, or %NULL to ignore
24999 * Flushed any outstanding buffers in the stream. Will block during
25000 * the operation. Closing the stream will implicitly cause a flush.
25001 * This function is optional for inherited classes.
25002 * If @cancellable is not %NULL, then the operation can be cancelled by
25003 * triggering the cancellable object from another thread. If the operation
25004 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
25006 * Returns: %TRUE on success, %FALSE on error
25011 * g_output_stream_flush_async:
25012 * @stream: a #GOutputStream.
25013 * @io_priority: the io priority of the request.
25014 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25015 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
25016 * @user_data: (closure): the data to pass to callback function
25018 * Flushes a stream asynchronously.
25019 * For behaviour details see g_output_stream_flush().
25020 * When the operation is finished @callback will be
25021 * called. You can then call g_output_stream_flush_finish() to get the
25022 * result of the operation.
25027 * g_output_stream_flush_finish:
25028 * @stream: a #GOutputStream.
25029 * @result: a GAsyncResult.
25030 * @error: a #GError location to store the error occuring, or %NULL to ignore.
25032 * Finishes flushing an output stream.
25034 * Returns: %TRUE if flush operation suceeded, %FALSE otherwise.
25039 * g_output_stream_has_pending:
25040 * @stream: a #GOutputStream.
25042 * Checks if an ouput stream has pending actions.
25044 * Returns: %TRUE if @stream has pending actions.
25049 * g_output_stream_is_closed:
25050 * @stream: a #GOutputStream.
25052 * Checks if an output stream has already been closed.
25054 * Returns: %TRUE if @stream is closed. %FALSE otherwise.
25059 * g_output_stream_is_closing:
25060 * @stream: a #GOutputStream.
25062 * Checks if an output stream is being closed. This can be
25063 * used inside e.g. a flush implementation to see if the
25064 * flush (or other i/o operation) is called from within
25065 * the closing operation.
25067 * Returns: %TRUE if @stream is being closed. %FALSE otherwise.
25073 * g_output_stream_set_pending:
25074 * @stream: a #GOutputStream.
25075 * @error: a #GError location to store the error occuring, or %NULL to ignore.
25077 * Sets @stream to have actions pending. If the pending flag is
25078 * already set or @stream is closed, it will return %FALSE and set
25080 * Returns: %TRUE if pending was previously unset and is now set.
25085 * g_output_stream_splice:
25086 * @stream: a #GOutputStream.
25087 * @source: a #GInputStream.
25088 * @flags: a set of #GOutputStreamSpliceFlags.
25089 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25090 * @error: a #GError location to store the error occuring, or %NULL to ignore.
25092 * Splices an input stream into an output stream.
25093 * -1 if an error occurred.
25095 * Returns: a #gssize containing the size of the data spliced, or
25100 * g_output_stream_splice_async:
25101 * @stream: a #GOutputStream.
25102 * @source: a #GInputStream.
25103 * @flags: a set of #GOutputStreamSpliceFlags.
25104 * @io_priority: the io priority of the request.
25105 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25106 * @callback: (scope async): a #GAsyncReadyCallback.
25107 * @user_data: (closure): user data passed to @callback.
25109 * Splices a stream asynchronously.
25110 * When the operation is finished @callback will be called.
25111 * You can then call g_output_stream_splice_finish() to get the
25112 * result of the operation.
25113 * For the synchronous, blocking version of this function, see
25114 * g_output_stream_splice().
25119 * g_output_stream_splice_finish:
25120 * @stream: a #GOutputStream.
25121 * @result: a #GAsyncResult.
25122 * @error: a #GError location to store the error occuring, or %NULL to ignore.
25124 * Finishes an asynchronous stream splice operation.
25126 * Returns: a #gssize of the number of bytes spliced.
25131 * g_output_stream_write:
25132 * @stream: a #GOutputStream.
25133 * @buffer: (array length=count) (element-type guint8): the buffer containing the data to write.
25134 * @count: the number of bytes to write
25135 * @cancellable: (allow-none): optional cancellable object
25136 * @error: location to store the error occuring, or %NULL to ignore
25138 * Tries to write @count bytes from @buffer into the stream. Will block
25139 * during the operation.
25140 * If count is 0, returns 0 and does nothing. A value of @count
25141 * larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
25142 * On success, the number of bytes written to the stream is returned.
25143 * It is not an error if this is not the same as the requested size, as it
25144 * can happen e.g. on a partial I/O error, or if there is not enough
25145 * storage in the stream. All writes block until at least one byte
25146 * is written or an error occurs; 0 is never returned (unless
25147 * If @cancellable is not NULL, then the operation can be cancelled by
25148 * triggering the cancellable object from another thread. If the operation
25149 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
25150 * operation was partially finished when the operation was cancelled the
25151 * partial result will be returned, without an error.
25152 * On error -1 is returned and @error is set accordingly.
25154 * Returns: Number of bytes written, or -1 on error
25159 * g_output_stream_write_all:
25160 * @stream: a #GOutputStream.
25161 * @buffer: (array length=count) (element-type guint8): the buffer containing the data to write.
25162 * @count: the number of bytes to write
25163 * @bytes_written: (out): location to store the number of bytes that was written to the stream
25164 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25165 * @error: location to store the error occuring, or %NULL to ignore
25167 * Tries to write @count bytes from @buffer into the stream. Will block
25168 * during the operation.
25169 * This function is similar to g_output_stream_write(), except it tries to
25170 * write as many bytes as requested, only stopping on an error.
25171 * On a successful write of @count bytes, %TRUE is returned, and @bytes_written
25172 * is set to @count.
25173 * If there is an error during the operation FALSE is returned and @error
25174 * is set to indicate the error status, @bytes_written is updated to contain
25175 * the number of bytes written into the stream before the error occurred.
25177 * Returns: %TRUE on success, %FALSE if there was an error
25182 * g_output_stream_write_async:
25183 * @stream: A #GOutputStream.
25184 * @buffer: (array length=count) (element-type guint8): the buffer containing the data to write.
25185 * @count: the number of bytes to write
25186 * @io_priority: the io priority of the request.
25187 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25188 * @callback: (scope async): callback to call when the request is satisfied
25189 * @user_data: (closure): the data to pass to callback function
25191 * Request an asynchronous write of @count bytes from @buffer into
25192 * the stream. When the operation is finished @callback will be called.
25193 * You can then call g_output_stream_write_finish() to get the result of the
25195 * During an async request no other sync and async calls are allowed,
25196 * and will result in %G_IO_ERROR_PENDING errors.
25197 * A value of @count larger than %G_MAXSSIZE will cause a
25198 * %G_IO_ERROR_INVALID_ARGUMENT error.
25199 * On success, the number of bytes written will be passed to the
25200 * requested size, as it can happen e.g. on a partial I/O error,
25201 * but generally we try to write as many bytes as requested.
25202 * You are guaranteed that this method will never fail with
25203 * %G_IO_ERROR_WOULD_BLOCK - if @stream can't accept more data, the
25204 * method will just wait until this changes.
25205 * Any outstanding I/O request with higher priority (lower numerical
25206 * value) will be executed before an outstanding request with lower
25207 * priority. Default priority is %G_PRIORITY_DEFAULT.
25208 * The asyncronous methods have a default fallback that uses threads
25209 * to implement asynchronicity, so they are optional for inheriting
25210 * classes. However, if you override one you must override all.
25211 * For the synchronous, blocking version of this function, see
25212 * g_output_stream_write().
25217 * g_output_stream_write_finish:
25218 * @stream: a #GOutputStream.
25219 * @result: a #GAsyncResult.
25220 * @error: a #GError location to store the error occuring, or %NULL to ignore.
25222 * Finishes a stream write operation.
25224 * Returns: a #gssize containing the number of bytes written to the stream.
25229 * g_permission_acquire:
25230 * @permission: a #GPermission instance
25231 * @cancellable: a #GCancellable, or %NULL
25232 * @error: a pointer to a %NULL #GError, or %NULL
25233 * @returns: %TRUE if the permission was successfully acquired
25235 * Attempts to acquire the permission represented by @permission.
25236 * The precise method by which this happens depends on the permission
25237 * and the underlying authentication mechanism. A simple example is
25238 * that a dialog may appear asking the user to enter their password.
25239 * You should check with g_permission_get_can_acquire() before calling
25241 * If the permission is acquired then %TRUE is returned. Otherwise,
25242 * %FALSE is returned and @error is set appropriately.
25243 * This call is blocking, likely for a very long time (in the case that
25244 * user interaction is required). See g_permission_acquire_async() for
25245 * the non-blocking version.
25252 * g_permission_acquire_async:
25253 * @permission: a #GPermission instance
25254 * @cancellable: a #GCancellable, or %NULL
25255 * @callback: the #GAsyncReadyCallback to call when done
25256 * @user_data: the user data to pass to @callback
25258 * Attempts to acquire the permission represented by @permission.
25259 * This is the first half of the asynchronous version of
25260 * g_permission_acquire().
25267 * g_permission_acquire_finish:
25268 * @permission: a #GPermission instance
25269 * @result: the #GAsyncResult given to the #GAsyncReadyCallback
25270 * @error: a pointer to a %NULL #GError, or %NULL
25271 * @returns: %TRUE if the permission was successfully acquired
25273 * Collects the result of attempting to acquire the permission
25274 * represented by @permission.
25275 * This is the second half of the asynchronous version of
25276 * g_permission_acquire().
25283 * g_permission_get_allowed:
25284 * @permission: a #GPermission instance
25285 * @returns: the value of the 'allowed' property
25287 * Gets the value of the 'allowed' property. This property is %TRUE if
25288 * the caller currently has permission to perform the action that
25295 * g_permission_get_can_acquire:
25296 * @permission: a #GPermission instance
25297 * @returns: the value of the 'can-acquire' property
25299 * Gets the value of the 'can-acquire' property. This property is %TRUE
25300 * if it is generally possible to acquire the permission by calling
25301 * g_permission_acquire().
25308 * g_permission_get_can_release:
25309 * @permission: a #GPermission instance
25310 * @returns: the value of the 'can-release' property
25312 * Gets the value of the 'can-release' property. This property is %TRUE
25313 * if it is generally possible to release the permission by calling
25314 * g_permission_release().
25321 * g_permission_impl_update:
25322 * @permission: a #GPermission instance
25323 * @allowed: the new value for the 'allowed' property
25324 * @can_acquire: the new value for the 'can-acquire' property
25325 * @can_release: the new value for the 'can-release' property
25327 * This function is called by the #GPermission implementation to update
25328 * the properties of the permission. You should never call this
25329 * function except from a #GPermission implementation.
25330 * GObject notify signals are generated, as appropriate.
25337 * g_permission_release:
25338 * @permission: a #GPermission instance
25339 * @cancellable: a #GCancellable, or %NULL
25340 * @error: a pointer to a %NULL #GError, or %NULL
25341 * @returns: %TRUE if the permission was successfully released
25343 * Attempts to release the permission represented by @permission.
25344 * The precise method by which this happens depends on the permission
25345 * and the underlying authentication mechanism. In most cases the
25346 * permission will be dropped immediately without further action.
25347 * You should check with g_permission_get_can_release() before calling
25349 * If the permission is released then %TRUE is returned. Otherwise,
25350 * %FALSE is returned and @error is set appropriately.
25351 * This call is blocking, likely for a very long time (in the case that
25352 * user interaction is required). See g_permission_release_async() for
25353 * the non-blocking version.
25360 * g_permission_release_async:
25361 * @permission: a #GPermission instance
25362 * @cancellable: a #GCancellable, or %NULL
25363 * @callback: the #GAsyncReadyCallback to call when done
25364 * @user_data: the user data to pass to @callback
25366 * Attempts to release the permission represented by @permission.
25367 * This is the first half of the asynchronous version of
25368 * g_permission_release().
25375 * g_permission_release_finish:
25376 * @permission: a #GPermission instance
25377 * @result: the #GAsyncResult given to the #GAsyncReadyCallback
25378 * @error: a pointer to a %NULL #GError, or %NULL
25379 * @returns: %TRUE if the permission was successfully released
25381 * Collects the result of attempting to release the permission
25382 * represented by @permission.
25383 * This is the second half of the asynchronous version of
25384 * g_permission_release().
25391 * g_poll_file_monitor_new:
25394 * Polls @file for changes.
25396 * Returns: a new #GFileMonitor for the given #GFile.
25401 * g_pollable_input_stream_can_poll:
25402 * @stream: a #GPollableInputStream.
25404 * Checks if @stream is actually pollable. Some classes may implement
25405 * #GPollableInputStream but have only certain instances of that class
25406 * be pollable. If this method returns %FALSE, then the behavior of
25407 * other #GPollableInputStream methods is undefined.
25408 * For any given stream, the value returned by this method is constant;
25409 * a stream cannot switch from pollable to non-pollable or vice versa.
25411 * Returns: %TRUE if @stream is pollable, %FALSE if not.
25417 * g_pollable_input_stream_create_source: (skip)
25418 * @stream: a #GPollableInputStream.
25419 * @cancellable: (allow-none): a #GCancellable, or %NULL
25421 * Creates a #GSource that triggers when @stream can be read, or
25422 * source is of the #GPollableSourceFunc type.
25423 * As with g_pollable_input_stream_is_readable(), it is possible that
25424 * the stream may not actually be readable even after the source
25425 * triggers, so you should use g_pollable_input_stream_read_nonblocking()
25426 * rather than g_input_stream_read() from the callback.
25428 * Returns: (transfer full): a new #GSource
25434 * g_pollable_input_stream_is_readable:
25435 * @stream: a #GPollableInputStream.
25437 * Checks if @stream can be read.
25438 * Note that some stream types may not be able to implement this 100%
25439 * reliably, and it is possible that a call to g_input_stream_read()
25440 * after this returns %TRUE would still block. To guarantee
25441 * non-blocking behavior, you should always use
25442 * g_pollable_input_stream_read_nonblocking(), which will return a
25443 * %G_IO_ERROR_WOULD_BLOCK error rather than blocking.
25444 * has occurred on @stream, this will result in
25445 * g_pollable_input_stream_is_readable() returning %TRUE, and the
25446 * next attempt to read will return the error.
25448 * Returns: %TRUE if @stream is readable, %FALSE if not. If an error
25454 * g_pollable_input_stream_read_nonblocking:
25455 * @stream: a #GPollableInputStream
25456 * @buffer: a buffer to read data into (which should be at least @size bytes long).
25457 * @size: the number of bytes you want to read
25458 * @cancellable: (allow-none): a #GCancellable, or %NULL
25459 * @error: #GError for error reporting, or %NULL to ignore.
25461 * Attempts to read up to @size bytes from @stream into @buffer, as
25462 * with g_input_stream_read(). If @stream is not currently readable,
25463 * this will immediately return %G_IO_ERROR_WOULD_BLOCK, and you can
25464 * use g_pollable_input_stream_create_source() to create a #GSource
25465 * that will be triggered when @stream is readable.
25466 * Note that since this method never blocks, you cannot actually
25467 * use @cancellable to cancel it. However, it will return an error
25468 * if @cancellable has already been cancelled when you call, which
25469 * may happen if you call this method after a source triggers due
25470 * to having been cancelled.
25471 * %G_IO_ERROR_WOULD_BLOCK).
25473 * Virtual: read_nonblocking
25474 * Returns: the number of bytes read, or -1 on error (including
25479 * g_pollable_output_stream_can_poll:
25480 * @stream: a #GPollableOutputStream.
25482 * Checks if @stream is actually pollable. Some classes may implement
25483 * #GPollableOutputStream but have only certain instances of that
25484 * class be pollable. If this method returns %FALSE, then the behavior
25485 * of other #GPollableOutputStream methods is undefined.
25486 * For any given stream, the value returned by this method is constant;
25487 * a stream cannot switch from pollable to non-pollable or vice versa.
25489 * Returns: %TRUE if @stream is pollable, %FALSE if not.
25495 * g_pollable_output_stream_create_source: (skip)
25496 * @stream: a #GPollableOutputStream.
25497 * @cancellable: (allow-none): a #GCancellable, or %NULL
25499 * Creates a #GSource that triggers when @stream can be written, or
25500 * source is of the #GPollableSourceFunc type.
25501 * As with g_pollable_output_stream_is_writable(), it is possible that
25502 * the stream may not actually be writable even after the source
25503 * triggers, so you should use g_pollable_output_stream_write_nonblocking()
25504 * rather than g_output_stream_write() from the callback.
25506 * Returns: (transfer full): a new #GSource
25512 * g_pollable_output_stream_is_writable:
25513 * @stream: a #GPollableOutputStream.
25515 * Checks if @stream can be written.
25516 * Note that some stream types may not be able to implement this 100%
25517 * reliably, and it is possible that a call to g_output_stream_write()
25518 * after this returns %TRUE would still block. To guarantee
25519 * non-blocking behavior, you should always use
25520 * g_pollable_output_stream_write_nonblocking(), which will return a
25521 * %G_IO_ERROR_WOULD_BLOCK error rather than blocking.
25522 * has occurred on @stream, this will result in
25523 * g_pollable_output_stream_is_writable() returning %TRUE, and the
25524 * next attempt to write will return the error.
25526 * Returns: %TRUE if @stream is writable, %FALSE if not. If an error
25532 * g_pollable_output_stream_write_nonblocking:
25533 * @stream: a #GPollableOutputStream
25534 * @buffer: (array length=size) (element-type guint8): a buffer to write data from
25535 * @size: the number of bytes you want to write
25536 * @cancellable: (allow-none): a #GCancellable, or %NULL
25537 * @error: #GError for error reporting, or %NULL to ignore.
25539 * Attempts to write up to @size bytes from @buffer to @stream, as
25540 * with g_output_stream_write(). If @stream is not currently writable,
25541 * this will immediately return %G_IO_ERROR_WOULD_BLOCK, and you can
25542 * use g_pollable_output_stream_create_source() to create a #GSource
25543 * that will be triggered when @stream is writable.
25544 * Note that since this method never blocks, you cannot actually
25545 * use @cancellable to cancel it. However, it will return an error
25546 * if @cancellable has already been cancelled when you call, which
25547 * may happen if you call this method after a source triggers due
25548 * to having been cancelled.
25549 * %G_IO_ERROR_WOULD_BLOCK).
25551 * Virtual: write_nonblocking
25552 * Returns: the number of bytes written, or -1 on error (including
25557 * g_pollable_source_new: (skip)
25558 * @pollable_stream: the stream associated with the new source
25560 * Utility method for #GPollableInputStream and #GPollableOutputStream
25561 * implementations. Creates a new #GSource that expects a callback of
25562 * type #GPollableSourceFunc. The new source does not actually do
25563 * anything on its own; use g_source_add_child_source() to add other
25564 * sources to it to cause it to trigger.
25566 * Returns: (transfer full): the new #GSource.
25572 * g_proxy_address_get_destination_hostnam:
25573 * @proxy: a #GProxyAddress
25575 * Gets @proxy's destination hostname.
25577 * Returns: the @proxy's destination hostname
25583 * g_proxy_address_get_destination_por:
25584 * @proxy: a #GProxyAddress
25586 * Gets @proxy's destination port.
25588 * Returns: the @proxy's destination port
25594 * g_proxy_address_get_passwor:
25595 * @proxy: a #GProxyAddress
25597 * Gets @proxy's password.
25599 * Returns: the @proxy's password
25605 * g_proxy_address_get_protocol:
25606 * @proxy: a #GProxyAddress
25608 * Gets @proxy's protocol.
25610 * Returns: the @proxy's protocol
25616 * g_proxy_address_get_usernam:
25617 * @proxy: a #GProxyAddress
25619 * Gets @proxy's username.
25621 * Returns: the @proxy's username
25627 * g_proxy_address_new:
25628 * @inetaddr: The proxy server #GInetAddress.
25629 * @port: The proxy server port.
25630 * @protocol: The proxy protocol to support, in lower case (e.g. socks, http).
25631 * @dest_hostname: The destination hostname the the proxy should tunnel to.
25632 * @dest_port: The destination port to tunnel to.
25633 * @username: (allow-none): The username to authenticate to the proxy server (or %NULL).
25634 * @password: (allow-none): The password to authenticate to the proxy server (or %NULL).
25636 * Creates a new #GProxyAddress for @inetaddr with @protocol that should
25637 * tunnel through @dest_hostname and @dest_port.
25639 * Returns: a new #GProxyAddress
25646 * @proxy: a #GProxy
25647 * @connection: a #GIOStream
25648 * @proxy_address: a #GProxyAddress
25649 * @cancellable: (allow-none): a #GCancellable
25650 * @error: return #GError
25652 * Given @connection to communicate with a proxy (eg, a
25653 * #GSocketConnection that is connected to the proxy server), this
25654 * does the necessary handshake to connect to @proxy_address, and if
25655 * required, wraps the #GIOStream to handle proxy payload.
25656 * be the same as @connection, in which case a reference
25659 * Returns: (transfer full): a #GIOStream that will replace @connection. This might
25665 * g_proxy_connect_async:
25666 * @proxy: a #GProxy
25667 * @connection: a #GIOStream
25668 * @proxy_address: a #GProxyAddress
25669 * @cancellable: (allow-none): a #GCancellable
25670 * @callback: (scope async): a #GAsyncReadyCallback
25671 * @user_data: (closure): callback data
25673 * Asynchronous version of g_proxy_connect().
25680 * g_proxy_connect_finish:
25681 * @proxy: a #GProxy
25682 * @result: a #GAsyncRetult
25683 * @error: return #GError
25685 * See g_proxy_connect().
25687 * Returns: (transfer full): a #GIOStream.
25693 * g_proxy_get_default_for_protocol:
25694 * @protocol: the proxy protocol name (e.g. http, socks, etc)
25696 * Lookup "gio-proxy" extension point for a proxy implementation that supports
25697 * specified protocol.
25698 * is not supported.
25700 * Returns: (transfer full): return a #GProxy or NULL if protocol
25706 * g_proxy_resolver_get_default:
25708 * Gets the default #GProxyResolver for the system.
25710 * Returns: (transfer none): the default #GProxyResolver.
25716 * g_proxy_resolver_is_supported:
25717 * @resolver: a #GProxyResolver
25719 * Checks if @resolver can be used on this system. (This is used
25720 * internally; g_proxy_resolver_get_default() will only return a proxy
25721 * resolver that returns %TRUE for this method.)
25723 * Returns: %TRUE if @resolver is supported.
25729 * g_proxy_resolver_lookup:
25730 * @resolver: a #GProxyResolver
25731 * @uri: a URI representing the destination to connect to
25732 * @cancellable: (allow-none): a #GCancellable, or %NULL
25733 * @error: return location for a #GError, or %NULL
25735 * Looks into the system proxy configuration to determine what proxy,
25736 * if any, to use to connect to @uri. The returned proxy URIs are of the
25737 * form <literal><protocol>://[user[:password]@]host:port</literal>
25738 * or <literal>direct://</literal>, where <protocol> could be
25739 * http, rtsp, socks or other proxying protocol.
25740 * If you don't know what network protocol is being used on the
25741 * socket, you should use <literal>none</literal> as the URI protocol.
25742 * In this case, the resolver might still return a generic proxy type
25743 * (such as SOCKS), but would not return protocol-specific proxy types
25745 * <literal>direct://</literal> is used when no proxy is needed.
25746 * Direct connection should not be attempted unless it is part of the
25747 * returned array of proxies.
25748 * NULL-terminated array of proxy URIs. Must be freed
25749 * with g_strfreev().
25751 * Returns: (transfer full) (array zero-terminated=1): A
25757 * g_proxy_resolver_lookup_async:
25758 * @resolver: a #GProxyResolver
25759 * @uri: a URI representing the destination to connect to
25760 * @cancellable: (allow-none): a #GCancellable, or %NULL
25761 * @callback: (scope async): callback to call after resolution completes
25762 * @user_data: (closure): data for @callback
25764 * Asynchronous lookup of proxy. See g_proxy_resolver_lookup() for more
25772 * g_proxy_resolver_lookup_finish:
25773 * @resolver: a #GProxyResolver
25774 * @result: the result passed to your #GAsyncReadyCallback
25775 * @error: return location for a #GError, or %NULL
25777 * Call this function to obtain the array of proxy URIs when
25778 * g_proxy_resolver_lookup_async() is complete. See
25779 * g_proxy_resolver_lookup() for more details.
25780 * NULL-terminated array of proxy URIs. Must be freed
25781 * with g_strfreev().
25783 * Returns: (transfer full) (array zero-terminated=1): A
25789 * g_proxy_supports_hostname:
25790 * @proxy: a #GProxy
25792 * Some proxy protocols expect to be passed a hostname, which they
25793 * will resolve to an IP address themselves. Others, like SOCKS4, do
25794 * not allow this. This function will return %FALSE if @proxy is
25795 * implementing such a protocol. When %FALSE is returned, the caller
25796 * should resolve the destination hostname first, and then pass a
25797 * #GProxyAddress containing the stringified IP address to
25798 * g_proxy_connect() or g_proxy_connect_async().
25800 * Returns: %TRUE if hostname resolution is supported.
25807 * @struct_type: the type of the elements to allocate
25808 * @mem: the currently allocated memory
25809 * @n_structs: the number of elements to allocate
25811 * Reallocates the memory pointed to by @mem, so that it now has space for
25812 * the memory, which may have been moved.
25813 * Care is taken to avoid overflow when calculating the size of the allocated block.
25815 * Returns: a pointer to the new allocated memory, cast to a pointer to @struct_type
25820 * g_resolver_error_quark:
25822 * Gets the #GResolver Error Quark.
25824 * Returns: a #GQuark.
25830 * g_resolver_free_addresses: (skip)
25831 * @addresses: a #GList of #GInetAddress
25833 * Frees @addresses (which should be the return value from
25834 * g_resolver_lookup_by_name() or g_resolver_lookup_by_name_finish()).
25835 * (This is a convenience method; you can also simply free the results
25843 * g_resolver_free_targets: (skip)
25844 * @targets: a #GList of #GSrvTarget
25846 * Frees @targets (which should be the return value from
25847 * g_resolver_lookup_service() or g_resolver_lookup_service_finish()).
25848 * (This is a convenience method; you can also simply free the
25849 * results by hand.)
25856 * g_resolver_get_default:
25858 * Gets the default #GResolver. You should unref it when you are done
25859 * with it. #GResolver may use its reference count as a hint about how
25860 * many threads/processes, etc it should allocate for concurrent DNS
25863 * Returns: (transfer full): the default #GResolver.
25869 * g_resolver_lookup_by_address:
25870 * @resolver: a #GResolver
25871 * @address: the address to reverse-resolve
25872 * @cancellable: (allow-none): a #GCancellable, or %NULL
25873 * @error: return location for a #GError, or %NULL
25875 * Synchronously reverse-resolves @address to determine its
25876 * associated hostname.
25877 * If the DNS resolution fails, @error (if non-%NULL) will be set to
25878 * a value from #GResolverError.
25879 * If @cancellable is non-%NULL, it can be used to cancel the
25880 * operation, in which case @error (if non-%NULL) will be set to
25881 * %G_IO_ERROR_CANCELLED.
25882 * form), or %NULL on error.
25884 * Returns: a hostname (either ASCII-only, or in ASCII-encoded
25890 * g_resolver_lookup_by_address_async:
25891 * @resolver: a #GResolver
25892 * @address: the address to reverse-resolve
25893 * @cancellable: (allow-none): a #GCancellable, or %NULL
25894 * @callback: (scope async): callback to call after resolution completes
25895 * @user_data: (closure): data for @callback
25897 * Begins asynchronously reverse-resolving @address to determine its
25898 * associated hostname, and eventually calls @callback, which must
25899 * call g_resolver_lookup_by_address_finish() to get the final result.
25906 * g_resolver_lookup_by_address_finish:
25907 * @resolver: a #GResolver
25908 * @result: the result passed to your #GAsyncReadyCallback
25909 * @error: return location for a #GError, or %NULL
25911 * Retrieves the result of a previous call to
25912 * g_resolver_lookup_by_address_async().
25913 * If the DNS resolution failed, @error (if non-%NULL) will be set to
25914 * a value from #GResolverError. If the operation was cancelled,
25915 * form), or %NULL on error.
25917 * Returns: a hostname (either ASCII-only, or in ASCII-encoded
25923 * g_resolver_lookup_by_name:
25924 * @resolver: a #GResolver
25925 * @hostname: the hostname to look up
25926 * @cancellable: (allow-none): a #GCancellable, or %NULL
25927 * @error: return location for a #GError, or %NULL
25929 * Synchronously resolves @hostname to determine its associated IP
25930 * address(es). @hostname may be an ASCII-only or UTF-8 hostname, or
25931 * the textual form of an IP address (in which case this just becomes
25932 * a wrapper around g_inet_address_new_from_string()).
25933 * On success, g_resolver_lookup_by_name() will return a #GList of
25934 * #GInetAddress, sorted in order of preference. (That is, you should
25935 * attempt to connect to the first address first, then the second if
25936 * the first fails, etc.)
25937 * If the DNS resolution fails, @error (if non-%NULL) will be set to a
25938 * value from #GResolverError.
25939 * If @cancellable is non-%NULL, it can be used to cancel the
25940 * operation, in which case @error (if non-%NULL) will be set to
25941 * %G_IO_ERROR_CANCELLED.
25942 * If you are planning to connect to a socket on the resolved IP
25943 * address, it may be easier to create a #GNetworkAddress and use its
25944 * #GSocketConnectable interface.
25945 * of #GInetAddress, or %NULL on error. You
25946 * must unref each of the addresses and free the list when you are
25947 * done with it. (You can use g_resolver_free_addresses() to do this.)
25949 * Returns: (element-type GInetAddress) (transfer full): a #GList
25955 * g_resolver_lookup_by_name_async:
25956 * @resolver: a #GResolver
25957 * @hostname: the hostname to look up the address of
25958 * @cancellable: (allow-none): a #GCancellable, or %NULL
25959 * @callback: (scope async): callback to call after resolution completes
25960 * @user_data: (closure): data for @callback
25962 * Begins asynchronously resolving @hostname to determine its
25963 * associated IP address(es), and eventually calls @callback, which
25964 * must call g_resolver_lookup_by_name_finish() to get the result.
25965 * See g_resolver_lookup_by_name() for more details.
25972 * g_resolver_lookup_by_name_finish:
25973 * @resolver: a #GResolver
25974 * @result: the result passed to your #GAsyncReadyCallback
25975 * @error: return location for a #GError, or %NULL
25977 * Retrieves the result of a call to
25978 * g_resolver_lookup_by_name_async().
25979 * If the DNS resolution failed, @error (if non-%NULL) will be set to
25980 * a value from #GResolverError. If the operation was cancelled,
25981 * of #GInetAddress, or %NULL on error. See g_resolver_lookup_by_name()
25982 * for more details.
25984 * Returns: (element-type GInetAddress) (transfer full): a #GList
25990 * g_resolver_lookup_service:
25991 * @resolver: a #GResolver
25992 * @service: the service type to look up (eg, "ldap")
25993 * @protocol: the networking protocol to use for @service (eg, "tcp")
25994 * @domain: the DNS domain to look up the service in
25995 * @cancellable: (allow-none): a #GCancellable, or %NULL
25996 * @error: return location for a #GError, or %NULL
25998 * Synchronously performs a DNS SRV lookup for the given @service and
25999 * include the leading underscore that appears in the actual DNS
26001 * On success, g_resolver_lookup_service() will return a #GList of
26002 * #GSrvTarget, sorted in order of preference. (That is, you should
26003 * attempt to connect to the first target first, then the second if
26004 * the first fails, etc.)
26005 * If the DNS resolution fails, @error (if non-%NULL) will be set to
26006 * a value from #GResolverError.
26007 * If @cancellable is non-%NULL, it can be used to cancel the
26008 * operation, in which case @error (if non-%NULL) will be set to
26009 * %G_IO_ERROR_CANCELLED.
26010 * If you are planning to connect to the service, it is usually easier
26011 * to create a #GNetworkService and use its #GSocketConnectable
26013 * or %NULL on error. You must free each of the targets and the list when you are
26014 * done with it. (You can use g_resolver_free_targets() to do this.)
26016 * Returns: (element-type GSrvTarget) (transfer full): a #GList of #GSrvTarget,
26022 * g_resolver_lookup_service_async:
26023 * @resolver: a #GResolver
26024 * @service: the service type to look up (eg, "ldap")
26025 * @protocol: the networking protocol to use for @service (eg, "tcp")
26026 * @domain: the DNS domain to look up the service in
26027 * @cancellable: (allow-none): a #GCancellable, or %NULL
26028 * @callback: (scope async): callback to call after resolution completes
26029 * @user_data: (closure): data for @callback
26031 * Begins asynchronously performing a DNS SRV lookup for the given
26032 * get the final result. See g_resolver_lookup_service() for more
26040 * g_resolver_lookup_service_finish:
26041 * @resolver: a #GResolver
26042 * @result: the result passed to your #GAsyncReadyCallback
26043 * @error: return location for a #GError, or %NULL
26045 * Retrieves the result of a previous call to
26046 * g_resolver_lookup_service_async().
26047 * If the DNS resolution failed, @error (if non-%NULL) will be set to
26048 * a value from #GResolverError. If the operation was cancelled,
26049 * or %NULL on error. See g_resolver_lookup_service() for more details.
26051 * Returns: (element-type GSrvTarget) (transfer full): a #GList of #GSrvTarget,
26057 * g_resolver_set_default:
26058 * @resolver: the new default #GResolver
26060 * Sets @resolver to be the application's default resolver (reffing
26061 * Future calls to g_resolver_get_default() will return this resolver.
26062 * This can be used if an application wants to perform any sort of DNS
26063 * caching or "pinning"; it can implement its own #GResolver that
26064 * calls the original default resolver for DNS operations, and
26065 * implements its own cache policies on top of that, and then set
26066 * itself as the default resolver for all later code to use.
26073 * g_seekable_can_seek:
26074 * @seekable: a #GSeekable.
26076 * Tests if the stream supports the #GSeekableIface.
26078 * Returns: %TRUE if @seekable can be seeked. %FALSE otherwise.
26083 * g_seekable_can_truncate:
26084 * @seekable: a #GSeekable.
26086 * Tests if the stream can be truncated.
26088 * Returns: %TRUE if the stream can be truncated, %FALSE otherwise.
26094 * @seekable: a #GSeekable.
26095 * @offset: a #goffset.
26096 * @type: a #GSeekType.
26097 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
26098 * @error: a #GError location to store the error occuring, or %NULL to ignore.
26100 * Seeks in the stream by the given @offset, modified by @type.
26101 * If @cancellable is not %NULL, then the operation can be cancelled by
26102 * triggering the cancellable object from another thread. If the operation
26103 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
26104 * has occurred, this function will return %FALSE and set @error
26105 * appropriately if present.
26107 * Returns: %TRUE if successful. If an error
26113 * @seekable: a #GSeekable.
26115 * Tells the current position within the stream.
26117 * Returns: the offset from the beginning of the buffer.
26122 * g_seekable_truncate:
26123 * @seekable: a #GSeekable.
26124 * @offset: a #goffset.
26125 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
26126 * @error: a #GError location to store the error occuring, or %NULL to ignore.
26128 * Truncates a stream with a given #offset.
26129 * If @cancellable is not %NULL, then the operation can be cancelled by
26130 * triggering the cancellable object from another thread. If the operation
26131 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
26132 * operation was partially finished when the operation was cancelled the
26133 * partial result will be returned, without an error.
26134 * has occurred, this function will return %FALSE and set @error
26135 * appropriately if present.
26137 * Virtual: truncate_fn
26138 * Returns: %TRUE if successful. If an error
26143 * g_settings_apply:
26144 * @settings: a #GSettings instance
26146 * Applies any changes that have been made to the settings. This
26147 * function does nothing unless @settings is in 'delay-apply' mode;
26148 * see g_settings_delay(). In the normal case settings are always
26149 * applied immediately.
26154 * g_settings_backend_changed:
26155 * @backend: a #GSettingsBackend implementation
26156 * @key: the name of the key
26157 * @origin_tag: the origin tag
26159 * Signals that a single key has possibly changed. Backend
26160 * implementations should call this if a key has possibly changed its
26162 * '//', and not ending with a slash).
26163 * The implementation must call this function during any call to
26164 * g_settings_backend_write(), before the call returns (except in the
26165 * case that no keys are actually changed and it cares to detect this
26166 * fact). It may not rely on the existence of a mainloop for
26167 * dispatching the signal later.
26168 * The implementation may call this function at any other time it likes
26169 * in response to other events (such as changes occuring outside of the
26170 * program). These calls may originate from a mainloop or may originate
26171 * in response to any other action (including from calls to
26172 * g_settings_backend_write()).
26173 * In the case that this call is in response to a call to
26174 * g_settings_backend_write() then @origin_tag must be set to the same
26175 * value that was passed to that call.
26182 * g_settings_backend_changed_tree:
26183 * @backend: a #GSettingsBackend implementation
26184 * @tree: a #GTree containing the changes
26185 * @origin_tag: the origin tag
26187 * This call is a convenience wrapper. It gets the list of changes from
26188 * g_settings_backend_changed().
26195 * g_settings_backend_flatten_tree:
26196 * @tree: a #GTree containing the changes
26197 * @path: (out): the location to save the path
26198 * @keys: (out) (transfer container) (array zero-terminated=1): the location to save the relative keys
26199 * @values: (out) (allow-none) (transfer container) (array zero-terminated=1): the location to save the values, or %NULL
26201 * Calculate the longest common prefix of all keys in a tree and write
26202 * out an array of the key names relative to that prefix and,
26203 * optionally, the value to store at each of those keys.
26204 * You must free the value returned in @path, @keys and @values using
26205 * g_free(). You should not attempt to free or unref the contents of
26212 * g_settings_backend_get_default:
26213 * @returns: (transfer full): the default #GSettingsBackend
26215 * Returns the default #GSettingsBackend. It is possible to override
26216 * the default by setting the <envar>GSETTINGS_BACKEND</envar>
26217 * environment variable to the name of a settings backend.
26218 * The user gets a reference to the backend.
26225 * g_settings_backend_keys_changed:
26226 * @backend: a #GSettingsBackend implementation
26227 * @path: the path containing the changes
26228 * @items: (array zero-terminated=1): the %NULL-terminated list of changed keys
26229 * @origin_tag: the origin tag
26231 * Signals that a list of keys have possibly changed. Backend
26232 * implementations should call this if keys have possibly changed their
26234 * not containing '//'). Each string in @items must form a valid key
26235 * end with '/' and must not contain '//').
26236 * The meaning of this signal is that any of the key names resulting
26237 * from the contatenation of @path with each item in @items may have
26239 * The same rules for when notifications must occur apply as per
26240 * g_settings_backend_changed(). These two calls can be used
26241 * interchangeably if exactly one item has changed (although in that
26242 * case g_settings_backend_changed() is definitely preferred).
26243 * For efficiency reasons, the implementation should strive for @path to
26244 * keys that were changed) but this is not strictly required.
26246 * Name when @path is prefixed to it (ie: each item must not start or
26247 * Be as long as possible (ie: the longest common prefix of all of the
26253 * g_settings_backend_path_changed:
26254 * @backend: a #GSettingsBackend implementation
26255 * @path: the path containing the changes
26256 * @origin_tag: the origin tag
26258 * Signals that all keys below a given path may have possibly changed.
26259 * Backend implementations should call this if an entire path of keys
26260 * have possibly changed their values.
26261 * not containing '//').
26262 * The meaning of this signal is that any of the key which has a name
26263 * starting with @path may have changed.
26264 * The same rules for when notifications must occur apply as per
26265 * g_settings_backend_changed(). This call might be an appropriate
26266 * reasponse to a 'reset' call but implementations are also free to
26267 * explicitly list the keys that were affected by that call if they can
26269 * For efficiency reasons, the implementation should strive for @path to
26270 * keys that were changed) but this is not strictly required. As an
26271 * example, if this function is called with the path of "/" then every
26272 * single key in the application will be notified of a possible change.
26274 * Be as long as possible (ie: the longest common prefix of all of the
26280 * g_settings_backend_path_writable_changed:
26281 * @backend: a #GSettingsBackend implementation
26282 * @path: the name of the path
26284 * Signals that the writability of all keys below a given path may have
26286 * Since GSettings performs no locking operations for itself, this call
26287 * will always be made in response to external events.
26294 * g_settings_backend_writable_changed:
26295 * @backend: a #GSettingsBackend implementation
26296 * @key: the name of the key
26298 * Signals that the writability of a single key has possibly changed.
26299 * Since GSettings performs no locking operations for itself, this call
26300 * will always be made in response to external events.
26308 * @settings: a #GSettings object
26309 * @key: the key to bind
26310 * @object: (type GObject.Object): a #GObject
26311 * @property: the name of the property to bind
26312 * @flags: flags for the binding
26314 * Create a binding between the @key in the @settings object
26315 * and the property @property of @object.
26316 * The binding uses the default GIO mapping functions to map
26317 * between the settings and property values. These functions
26318 * handle booleans, numeric types and string types in a
26319 * straightforward way. Use g_settings_bind_with_mapping() if
26320 * you need a custom mapping, or map between types that are not
26321 * supported by the default mapping functions.
26322 * Unless the @flags include %G_SETTINGS_BIND_NO_SENSITIVITY, this
26323 * function also establishes a binding between the writability of
26324 * a boolean property by that name). See g_settings_bind_writable()
26325 * for more details about writable bindings.
26326 * Note that the lifecycle of the binding is tied to the object,
26327 * and that you can have only one binding per object property.
26328 * If you bind the same property twice on the same object, the second
26329 * binding overrides the first one.
26336 * g_settings_bind_with_mapping: (skip)
26337 * @settings: a #GSettings object
26338 * @key: the key to bind
26339 * @object: (type GObject.Object): a #GObject
26340 * @property: the name of the property to bind
26341 * @flags: flags for the binding
26342 * @get_mapping: a function that gets called to convert values from @settings to @object, or %NULL to use the default GIO mapping
26343 * @set_mapping: a function that gets called to convert values from @object to @settings, or %NULL to use the default GIO mapping
26344 * @user_data: data that gets passed to @get_mapping and @set_mapping
26345 * @destroy: #GDestroyNotify function for @user_data
26347 * Create a binding between the @key in the @settings object
26348 * and the property @property of @object.
26349 * The binding uses the provided mapping functions to map between
26350 * settings and property values.
26351 * Note that the lifecycle of the binding is tied to the object,
26352 * and that you can have only one binding per object property.
26353 * If you bind the same property twice on the same object, the second
26354 * binding overrides the first one.
26361 * g_settings_bind_writable:
26362 * @settings: a #GSettings object
26363 * @key: the key to bind
26364 * @object: (type GObject.Object): a #GObject
26365 * @property: the name of a boolean property to bind
26366 * @inverted: whether to 'invert' the value
26368 * Create a binding between the writability of @key in the
26369 * The property must be boolean; "sensitive" or "visible"
26370 * properties of widgets are the most likely candidates.
26371 * Writable bindings are always uni-directional; changes of the
26372 * writability of the setting will be propagated to the object
26373 * property, not the other way.
26374 * When the @inverted argument is %TRUE, the binding inverts the
26375 * value as it passes from the setting to the object, i.e. @property
26376 * will be set to %TRUE if the key is <emphasis>not</emphasis>
26378 * Note that the lifecycle of the binding is tied to the object,
26379 * and that you can have only one binding per object property.
26380 * If you bind the same property twice on the same object, the second
26381 * binding overrides the first one.
26388 * g_settings_delay:
26389 * @settings: a #GSettings object
26391 * Changes the #GSettings object into 'delay-apply' mode. In this
26392 * mode, changes to @settings are not immediately propagated to the
26393 * backend, but kept locally until g_settings_apply() is called.
26401 * @settings: a #GSettings object
26402 * @key: the key to get the value for
26403 * @format: a #GVariant format string
26404 * @...: arguments as per @format
26406 * Gets the value that is stored at @key in @settings.
26407 * A convenience function that combines g_settings_get_value() with
26409 * It is a programmer error to give a @key that isn't contained in the
26410 * schema for @settings or for the #GVariantType of @format to mismatch
26411 * the type given in the schema.
26418 * g_settings_get_boolean:
26419 * @settings: a #GSettings object
26420 * @key: the key to get the value for
26421 * @returns: a boolean
26423 * Gets the value that is stored at @key in @settings.
26424 * A convenience variant of g_settings_get() for booleans.
26425 * It is a programmer error to give a @key that isn't specified as
26426 * having a boolean type in the schema for @settings.
26433 * g_settings_get_child:
26434 * @settings: a #GSettings object
26435 * @name: the name of the 'child' schema
26436 * @returns: (transfer full): a 'child' settings object
26438 * Creates a 'child' settings object which has a base path of
26439 * <replaceable>base-path</replaceable>/@name, where
26440 * <replaceable>base-path</replaceable> is the base path of @settings.
26441 * The schema for the child settings object must have been declared
26442 * in the schema of @settings using a <tag class="starttag">child</tag> element.
26449 * g_settings_get_double:
26450 * @settings: a #GSettings object
26451 * @key: the key to get the value for
26452 * @returns: a double
26454 * Gets the value that is stored at @key in @settings.
26455 * A convenience variant of g_settings_get() for doubles.
26456 * It is a programmer error to give a @key that isn't specified as
26457 * having a 'double' type in the schema for @settings.
26464 * g_settings_get_enum:
26465 * @settings: a #GSettings object
26466 * @key: the key to get the value for
26467 * @returns: the enum value
26469 * Gets the value that is stored in @settings for @key and converts it
26470 * to the enum value that it represents.
26471 * In order to use this function the type of the value must be a string
26472 * and it must be marked in the schema file as an enumerated type.
26473 * It is a programmer error to give a @key that isn't contained in the
26474 * schema for @settings or is not marked as an enumerated type.
26475 * If the value stored in the configuration database is not a valid
26476 * value for the enumerated type then this function will return the
26484 * g_settings_get_flags:
26485 * @settings: a #GSettings object
26486 * @key: the key to get the value for
26487 * @returns: the flags value
26489 * Gets the value that is stored in @settings for @key and converts it
26490 * to the flags value that it represents.
26491 * In order to use this function the type of the value must be an array
26492 * of strings and it must be marked in the schema file as an flags type.
26493 * It is a programmer error to give a @key that isn't contained in the
26494 * schema for @settings or is not marked as a flags type.
26495 * If the value stored in the configuration database is not a valid
26496 * value for the flags type then this function will return the default
26504 * g_settings_get_has_unapplied:
26505 * @settings: a #GSettings object
26506 * @returns: %TRUE if @settings has unapplied changes
26508 * Returns whether the #GSettings object has any unapplied
26509 * changes. This can only be the case if it is in 'delayed-apply' mode.
26516 * g_settings_get_int:
26517 * @settings: a #GSettings object
26518 * @key: the key to get the value for
26519 * @returns: an integer
26521 * Gets the value that is stored at @key in @settings.
26522 * A convenience variant of g_settings_get() for 32-bit integers.
26523 * It is a programmer error to give a @key that isn't specified as
26524 * having a int32 type in the schema for @settings.
26531 * g_settings_get_mapped:
26532 * @settings: a #GSettings object
26533 * @key: the key to get the value for
26534 * @mapping: (scope call): the function to map the value in the settings database to the value used by the application
26535 * @user_data: user data for @mapping
26536 * @returns: (transfer full): the result, which may be %NULL
26538 * Gets the value that is stored at @key in @settings, subject to
26539 * application-level validation/mapping.
26540 * You should use this function when the application needs to perform
26541 * some processing on the value of the key (for example, parsing). The
26542 * indicates that the processing was unsuccessful (due to a parse error,
26543 * for example) then the mapping is tried again with another value.
26544 * This allows a robust 'fall back to defaults' behaviour to be
26545 * implemented somewhat automatically.
26546 * The first value that is tried is the user's setting for the key. If
26547 * the mapping function fails to map this value, other values may be
26548 * tried in an unspecified order (system or site defaults, translated
26549 * schema default values, untranslated schema default values, etc).
26550 * If the mapping function fails for all possible values, one additional
26551 * If the mapping function still indicates failure at this point then
26552 * the application will be aborted.
26553 * The result parameter for the @mapping function is pointed to a
26554 * #gpointer which is initially set to %NULL. The same pointer is given
26555 * to each invocation of @mapping. The final value of that #gpointer is
26556 * what is returned by this function. %NULL is valid; it is returned
26557 * just as any other value would be.
26559 * Attempt is made: the mapping function is called with a %NULL value.
26564 * g_settings_get_range:
26565 * @settings: a #GSettings
26566 * @key: the key to query the range of
26567 * @returns: a #GVariant describing the range
26569 * Queries the range of a key.
26570 * This function will return a #GVariant that fully describes the range
26571 * of values that are valid for @key.
26572 * The type of #GVariant returned is <literal>(sv)</literal>. The
26573 * string describes the type of range restriction in effect. The type
26574 * and meaning of the value contained in the variant depends on the
26576 * If the string is <literal>'type'</literal> then the variant contains
26577 * an empty array. The element type of that empty array is the expected
26578 * type of value and all values of that type are valid.
26579 * If the string is <literal>'enum'</literal> then the variant contains
26580 * an array enumerating the possible values. Each item in the array is
26581 * a possible valid value and no other values are valid.
26582 * If the string is <literal>'flags'</literal> then the variant contains
26583 * an array. Each item in the array is a value that may appear zero or
26584 * one times in an array to be used as the value for this key. For
26585 * example, if the variant contained the array <literal>['x',
26586 * 'y']</literal> then the valid values for the key would be
26587 * <literal>[]</literal>, <literal>['x']</literal>,
26588 * <literal>['y']</literal>, <literal>['x', 'y']</literal> and
26589 * <literal>['y', 'x']</literal>.
26590 * Finally, if the string is <literal>'range'</literal> then the variant
26591 * contains a pair of like-typed values -- the minimum and maximum
26592 * permissible values for this key.
26593 * This information should not be used by normal programs. It is
26594 * considered to be a hint for introspection purposes. Normal programs
26595 * should already know what is permitted by their own schema. The
26596 * format may change in any way in the future -- but particularly, new
26597 * forms may be added to the possibilities described above.
26598 * It is a programmer error to give a @key that isn't contained in the
26599 * schema for @settings.
26600 * You should free the returned value with g_variant_unref() when it is
26601 * no longer needed.
26608 * g_settings_get_string:
26609 * @settings: a #GSettings object
26610 * @key: the key to get the value for
26611 * @returns: a newly-allocated string
26613 * Gets the value that is stored at @key in @settings.
26614 * A convenience variant of g_settings_get() for strings.
26615 * It is a programmer error to give a @key that isn't specified as
26616 * having a string type in the schema for @settings.
26623 * g_settings_get_strv:
26624 * @settings: a #GSettings object
26625 * @key: the key to get the value for
26626 * @returns: (array zero-terminated=1) (transfer full): a newly-allocated, %NULL-terminated array of strings, the value that is stored at @key in @settings.
26628 * A convenience variant of g_settings_get() for string arrays.
26629 * It is a programmer error to give a @key that isn't specified as
26630 * having an array of strings type in the schema for @settings.
26637 * g_settings_get_value:
26638 * @settings: a #GSettings object
26639 * @key: the key to get the value for
26640 * @returns: a new #GVariant
26642 * Gets the value that is stored in @settings for @key.
26643 * It is a programmer error to give a @key that isn't contained in the
26644 * schema for @settings.
26651 * g_settings_is_writable:
26652 * @settings: a #GSettings object
26653 * @name: the name of a key
26654 * @returns: %TRUE if the key @name is writable
26656 * Finds out if a key can be written or not
26663 * g_settings_list_children:
26664 * @settings: a #GSettings object
26665 * @returns: (transfer full) (element-type utf8): a list of the children on @settings
26667 * Gets the list of children on @settings.
26668 * The list is exactly the list of strings for which it is not an error
26669 * to call g_settings_get_child().
26670 * For GSettings objects that are lists, this value can change at any
26671 * time and you should connect to the "children-changed" signal to watch
26672 * request a child after listing it only for it to have been destroyed
26673 * in the meantime. For this reason, g_settings_get_child() may return
26674 * %NULL even for a child that was listed by this function.
26675 * For GSettings objects that are not lists, you should probably not be
26676 * calling this function from "normal" code (since you should already
26677 * know what children are in your schema). This function may still be
26678 * useful there for introspection reasons, however.
26679 * You should free the return value with g_strfreev() when you are done
26682 * For those changes. note that there is a race condition here: you may
26687 * g_settings_list_keys:
26688 * @settings: a #GSettings object
26689 * @returns: (transfer full) (element-type utf8): a list of the keys on @settings
26691 * Introspects the list of keys on @settings.
26692 * You should probably not be calling this function from "normal" code
26693 * (since you should already know what keys are in your schema). This
26694 * function is intended for introspection reasons.
26695 * You should free the return value with g_strfreev() when you are done
26701 * g_settings_list_relocatable_schemas:
26703 * Gets a list of the relocatable #GSettings schemas installed on the
26704 * system. These are schemas that do not provide their own path. It is
26705 * usual to instantiate these schemas directly, but if you want to you
26706 * can use g_settings_new_with_path() to specify the path.
26707 * The output of this function, tTaken together with the output of
26708 * g_settings_list_schemas() represents the complete list of all
26709 * installed schemas.
26710 * #GSettings schemas that are available. The list must not be
26711 * modified or freed.
26713 * Returns: (element-type utf8) (transfer none): a list of relocatable
26719 * g_settings_list_schemas:
26721 * Gets a list of the #GSettings schemas installed on the system. The
26722 * returned list is exactly the list of schemas for which you may call
26723 * g_settings_new() without adverse effects.
26724 * This function does not list the schemas that do not provide their own
26725 * g_settings_new_with_path()). See
26726 * g_settings_list_relocatable_schemas() for that.
26727 * schemas that are available. The list must not be modified or
26730 * Paths (ie: schemas for which you must use
26731 * Returns: (element-type utf8) (transfer none): a list of #GSettings
26738 * @schema: the name of the schema
26739 * @returns: a new #GSettings object
26741 * Creates a new #GSettings object with a given schema.
26742 * Signals on the newly created #GSettings object will be dispatched
26743 * via the thread-default #GMainContext in effect at the time of the
26744 * call to g_settings_new(). The new #GSettings will hold a reference
26745 * on the context. See g_main_context_push_thread_default().
26752 * g_settings_new_with_backend:
26753 * @schema: the name of the schema
26754 * @backend: the #GSettingsBackend to use
26755 * @returns: a new #GSettings object
26757 * Creates a new #GSettings object with a given schema and backend.
26758 * Creating settings objects with an different backend allows accessing settings
26759 * from a database other than the usual one. For example, it may make
26760 * sense to pass a backend corresponding to the "defaults" settings database on
26761 * the system to get a settings object that modifies the system default
26762 * settings instead of the settings for this user.
26769 * g_settings_new_with_backend_and_path:
26770 * @schema: the name of the schema
26771 * @backend: the #GSettingsBackend to use
26772 * @path: the path to use
26773 * @returns: a new #GSettings object
26775 * Creates a new #GSettings object with a given schema, backend and
26777 * This is a mix of g_settings_new_with_backend() and
26778 * g_settings_new_with_path().
26785 * g_settings_new_with_path:
26786 * @schema: the name of the schema
26787 * @path: the path to use
26788 * @returns: a new #GSettings object
26790 * Creates a new #GSettings object with a given schema and path.
26791 * You only need to do this if you want to directly create a settings
26792 * object with a schema that doesn't have a specified path of its own.
26793 * That's quite rare.
26794 * It is a programmer error to call this function for a schema that
26795 * has an explicitly specified path.
26802 * g_settings_range_check:
26803 * @settings: a #GSettings
26804 * @key: the key to check
26805 * @value: the value to check
26806 * @returns: %TRUE if @value is valid for @key
26808 * Checks if the given @value is of the correct type and within the
26809 * permitted range for @key.
26810 * This API is not intended to be used by normal programs -- they should
26811 * already know what is permitted by their own schemas. This API is
26812 * meant to be used by programs such as editors or commandline tools.
26813 * It is a programmer error to give a @key that isn't contained in the
26814 * schema for @settings.
26821 * g_settings_reset:
26822 * @settings: a #GSettings object
26823 * @key: the name of a key
26825 * Resets @key to its default value.
26826 * This call resets the key, as much as possible, to its default value.
26827 * That might the value specified in the schema or the one set by the
26833 * g_settings_revert:
26834 * @settings: a #GSettings instance
26836 * Reverts all non-applied changes to the settings. This function
26837 * does nothing unless @settings is in 'delay-apply' mode; see
26838 * g_settings_delay(). In the normal case settings are always applied
26840 * Change notifications will be emitted for affected keys.
26846 * @settings: a #GSettings object
26847 * @key: the name of the key to set
26848 * @format: a #GVariant format string
26849 * @...: arguments as per @format
26850 * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
26852 * Sets @key in @settings to @value.
26853 * A convenience function that combines g_settings_set_value() with
26855 * It is a programmer error to give a @key that isn't contained in the
26856 * schema for @settings or for the #GVariantType of @format to mismatch
26857 * the type given in the schema.
26864 * g_settings_set_boolean:
26865 * @settings: a #GSettings object
26866 * @key: the name of the key to set
26867 * @value: the value to set it to
26868 * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
26870 * Sets @key in @settings to @value.
26871 * A convenience variant of g_settings_set() for booleans.
26872 * It is a programmer error to give a @key that isn't specified as
26873 * having a boolean type in the schema for @settings.
26880 * g_settings_set_double:
26881 * @settings: a #GSettings object
26882 * @key: the name of the key to set
26883 * @value: the value to set it to
26884 * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
26886 * Sets @key in @settings to @value.
26887 * A convenience variant of g_settings_set() for doubles.
26888 * It is a programmer error to give a @key that isn't specified as
26889 * having a 'double' type in the schema for @settings.
26896 * g_settings_set_enum:
26897 * @settings: a #GSettings object
26898 * @key: a key, within @settings
26899 * @value: an enumerated value
26900 * @returns: %TRUE, if the set succeeds
26902 * Looks up the enumerated type nick for @value and writes it to @key,
26903 * within @settings.
26904 * It is a programmer error to give a @key that isn't contained in the
26905 * schema for @settings or is not marked as an enumerated type, or for
26906 * After performing the write, accessing @key directly with
26907 * g_settings_get_string() will return the 'nick' associated with
26912 * g_settings_set_flags:
26913 * @settings: a #GSettings object
26914 * @key: a key, within @settings
26915 * @value: a flags value
26916 * @returns: %TRUE, if the set succeeds
26918 * Looks up the flags type nicks for the bits specified by @value, puts
26919 * them in an array of strings and writes the array to @key, withing
26920 * It is a programmer error to give a @key that isn't contained in the
26921 * schema for @settings or is not marked as a flags type, or for @value
26922 * to contain any bits that are not value for the named type.
26923 * After performing the write, accessing @key directly with
26924 * g_settings_get_strv() will return an array of 'nicks'; one for each
26930 * g_settings_set_int:
26931 * @settings: a #GSettings object
26932 * @key: the name of the key to set
26933 * @value: the value to set it to
26934 * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
26936 * Sets @key in @settings to @value.
26937 * A convenience variant of g_settings_set() for 32-bit integers.
26938 * It is a programmer error to give a @key that isn't specified as
26939 * having a int32 type in the schema for @settings.
26946 * g_settings_set_string:
26947 * @settings: a #GSettings object
26948 * @key: the name of the key to set
26949 * @value: the value to set it to
26950 * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
26952 * Sets @key in @settings to @value.
26953 * A convenience variant of g_settings_set() for strings.
26954 * It is a programmer error to give a @key that isn't specified as
26955 * having a string type in the schema for @settings.
26962 * g_settings_set_strv:
26963 * @settings: a #GSettings object
26964 * @key: the name of the key to set
26965 * @value: (allow-none) (array zero-terminated=1): the value to set it to, or %NULL
26966 * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
26968 * Sets @key in @settings to @value.
26969 * A convenience variant of g_settings_set() for string arrays. If
26970 * It is a programmer error to give a @key that isn't specified as
26971 * having an array of strings type in the schema for @settings.
26978 * g_settings_set_value:
26979 * @settings: a #GSettings object
26980 * @key: the name of the key to set
26981 * @value: a #GVariant of the correct type
26982 * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
26984 * Sets @key in @settings to @value.
26985 * It is a programmer error to give a @key that isn't contained in the
26986 * schema for @settings or for @value to have the incorrect type, per
26988 * If @value is floating then this function consumes the reference.
26997 * Ensures that all pending operations for the given are complete for
26998 * the default backend.
26999 * Writes made to a #GSettings are handled asynchronously. For this
27000 * reason, it is very unlikely that the changes have it to disk by the
27001 * time g_settings_set() returns.
27002 * This call will block until all of the writes have made it to the
27003 * backend. Since the mainloop is not running, no change notifications
27004 * will be dispatched during this call (but some may be queued by the
27005 * time the call is done).
27010 * g_settings_unbind:
27011 * @object: the object
27012 * @property: the property whose binding is removed
27014 * Removes an existing binding for @property on @object.
27015 * Note that bindings are automatically removed when the
27016 * object is finalized, so it is rarely necessary to call this
27024 * g_signal_connect:
27025 * @instance: the instance to connect to.
27026 * @detailed_signal: a string of the form "signal-name::detail".
27027 * @c_handler: the #GCallback to connect.
27028 * @data: data to pass to @c_handler calls.
27030 * Connects a #GCallback function to a signal for a particular object.
27031 * The handler will be called before the default handler of the signal.
27033 * Returns: the handler id
27038 * g_signal_connect_after:
27039 * @instance: the instance to connect to.
27040 * @detailed_signal: a string of the form "signal-name::detail".
27041 * @c_handler: the #GCallback to connect.
27042 * @data: data to pass to @c_handler calls.
27044 * Connects a #GCallback function to a signal for a particular object.
27045 * The handler will be called after the default handler of the signal.
27047 * Returns: the handler id
27052 * g_signal_connect_swapped:
27053 * @instance: the instance to connect to.
27054 * @detailed_signal: a string of the form "signal-name::detail".
27055 * @c_handler: the #GCallback to connect.
27056 * @data: data to pass to @c_handler calls.
27058 * Connects a #GCallback function to a signal for a particular object.
27059 * The instance on which the signal is emitted and @data will be swapped when
27060 * calling the handler.
27062 * Returns: the handler id
27067 * g_signal_handlers_block_by_func:
27068 * @instance: The instance to block handlers from.
27069 * @func: The C closure callback of the handlers (useless for non-C closures).
27070 * @data: The closure data of the handlers' closures.
27072 * Blocks all handlers on an instance that match @func and @data.
27074 * Returns: The number of handlers that matched.
27079 * g_signal_handlers_disconnect_by_func:
27080 * @instance: The instance to remove handlers from.
27081 * @func: The C closure callback of the handlers (useless for non-C closures).
27082 * @data: The closure data of the handlers' closures.
27084 * Disconnects all handlers on an instance that match @func and @data.
27086 * Returns: The number of handlers that matched.
27091 * g_signal_handlers_unblock_by_func:
27092 * @instance: The instance to unblock handlers from.
27093 * @func: The C closure callback of the handlers (useless for non-C closures).
27094 * @data: The closure data of the handlers' closures.
27096 * Unblocks all handlers on an instance that match @func and @data.
27098 * Returns: The number of handlers that matched.
27103 * g_simple_action_group_insert:
27104 * @simple: a #GSimpleActionGroup
27105 * @action: a #GAction
27107 * Adds an action to the action group.
27108 * If the action group already contains an action with the same name as
27109 * The action group takes its own reference on @action.
27116 * g_simple_action_group_lookup:
27117 * @simple: a #GSimpleActionGroup
27118 * @action_name: the name of an action
27120 * Looks up the action with the name @action_name in the group.
27121 * If no such action exists, returns %NULL.
27123 * Returns: (transfer none): a #GAction, or %NULL
27129 * g_simple_action_group_new:
27131 * Creates a new, empty, #GSimpleActionGroup.
27133 * Returns: a new #GSimpleActionGroup
27139 * g_simple_action_group_remove:
27140 * @simple: a #GSimpleActionGroup
27141 * @action_name: the name of the action
27143 * Removes the named action from the action group.
27144 * If no action of this name is in the group then nothing happens.
27151 * g_simple_action_new:
27152 * @name: the name of the action
27153 * @parameter_type: (allow-none): the type of parameter to the activate function
27155 * Creates a new action.
27156 * The created action is stateless. See g_simple_action_new_stateful().
27158 * Returns: a new #GSimpleAction
27164 * g_simple_action_new_stateful:
27165 * @name: the name of the action
27166 * @parameter_type: (allow-none): the type of the parameter to the activate function
27167 * @state: the initial state of the action
27169 * Creates a new stateful action.
27170 * must have the same #GVariantType as the initial state.
27171 * If the @state GVariant is floating, it is consumed.
27173 * Returns: a new #GSimpleAction
27179 * g_simple_action_set_enabled:
27180 * @simple: a #GSimpleAction
27181 * @enabled: whether the action is enabled
27183 * Sets the action as enabled or not.
27184 * An action must be enabled in order to be activated or in order to
27185 * have its state changed from outside callers.
27192 * g_simple_async_report_error_in_idle: (skip)
27193 * @object: (allow-none): a #GObject, or %NULL.
27194 * @callback: a #GAsyncReadyCallback.
27195 * @user_data: user data passed to @callback.
27196 * @domain: a #GQuark containing the error domain (usually #G_IO_ERROR).
27197 * @code: a specific error code.
27198 * @format: a formatted error reporting string.
27199 * @...: a list of variables to fill in @format.
27201 * Reports an error in an asynchronous function in an idle function by
27202 * directly setting the contents of the #GAsyncResult with the given error
27208 * g_simple_async_report_gerror_in_idle:
27209 * @object: (allow-none): a #GObject, or %NULL
27210 * @callback: (scope async): a #GAsyncReadyCallback.
27211 * @user_data: (closure): user data passed to @callback.
27212 * @error: the #GError to report
27214 * Reports an error in an idle function. Similar to
27215 * g_simple_async_report_error_in_idle(), but takes a #GError rather
27216 * than building a new one.
27221 * g_simple_async_report_take_gerror_in_idle: (skip)
27222 * @object: (allow-none): a #GObject, or %NULL
27223 * @callback: a #GAsyncReadyCallback.
27224 * @user_data: user data passed to @callback.
27225 * @error: the #GError to report
27227 * Reports an error in an idle function. Similar to
27228 * g_simple_async_report_gerror_in_idle(), but takes over the caller's
27229 * ownership of @error, so the caller does not have to free it any more.
27236 * g_simple_async_result_complete:
27237 * @simple: a #GSimpleAsyncResult.
27239 * Completes an asynchronous I/O job immediately. Must be called in
27240 * the thread where the asynchronous result was to be delivered, as it
27241 * invokes the callback directly. If you are in a different thread use
27242 * g_simple_async_result_complete_in_idle().
27243 * Calling this function takes a reference to @simple for as long as
27244 * is needed to complete the call.
27249 * g_simple_async_result_complete_in_idle:
27250 * @simple: a #GSimpleAsyncResult.
27252 * Completes an asynchronous function in an idle handler in the <link
27253 * linkend="g-main-context-push-thread-default">thread-default main
27254 * loop</link> of the thread that @simple was initially created in.
27255 * Calling this function takes a reference to @simple for as long as
27256 * is needed to complete the call.
27261 * g_simple_async_result_get_op_res_gboolean:
27262 * @simple: a #GSimpleAsyncResult.
27264 * Gets the operation result boolean from within the asynchronous result.
27265 * if the operation's result was %FALSE.
27267 * Returns: %TRUE if the operation's result was %TRUE, %FALSE
27272 * g_simple_async_result_get_op_res_gpointer: (skip)
27273 * @simple: a #GSimpleAsyncResult.
27275 * Gets a pointer result as returned by the asynchronous function.
27277 * Returns: a pointer from the result.
27282 * g_simple_async_result_get_op_res_gssize:
27283 * @simple: a #GSimpleAsyncResult.
27285 * Gets a gssize from the asynchronous result.
27287 * Returns: a gssize returned from the asynchronous function.
27292 * g_simple_async_result_get_source_tag: (skip)
27293 * @simple: a #GSimpleAsyncResult.
27295 * Gets the source tag for the #GSimpleAsyncResult.
27297 * Returns: a #gpointer to the source object for the #GSimpleAsyncResult.
27302 * g_simple_async_result_is_valid:
27303 * @result: the #GAsyncResult passed to the _finish function.
27304 * @source: the #GObject passed to the _finish function.
27305 * @source_tag: the asynchronous function.
27307 * Ensures that the data passed to the _finish function of an async
27308 * operation is consistent. Three checks are performed.
27309 * First, @result is checked to ensure that it is really a
27310 * #GSimpleAsyncResult. Second, @source is checked to ensure that it
27311 * matches the source object of @result. Third, @source_tag is
27312 * checked to ensure that it is either %NULL (as it is when the result was
27313 * created by g_simple_async_report_error_in_idle() or
27314 * g_simple_async_report_gerror_in_idle()) or equal to the
27315 * convention, is a pointer to the _async function corresponding to the
27316 * _finish function from which this function is called).
27318 * Returns: #TRUE if all checks passed or #FALSE if any failed.
27324 * g_simple_async_result_new:
27325 * @source_object: (allow-none): a #GObject, or %NULL.
27326 * @callback: (scope async): a #GAsyncReadyCallback.
27327 * @user_data: (closure): user data passed to @callback.
27328 * @source_tag: the asynchronous function.
27330 * Creates a #GSimpleAsyncResult.
27332 * Returns: a #GSimpleAsyncResult.
27337 * g_simple_async_result_new_error:
27338 * @source_object: (allow-none): a #GObject, or %NULL.
27339 * @callback: (scope async): a #GAsyncReadyCallback.
27340 * @user_data: (closure): user data passed to @callback.
27341 * @domain: a #GQuark.
27342 * @code: an error code.
27343 * @format: a string with format characters.
27344 * @...: a list of values to insert into @format.
27346 * Creates a new #GSimpleAsyncResult with a set error.
27348 * Returns: a #GSimpleAsyncResult.
27353 * g_simple_async_result_new_from_error:
27354 * @source_object: (allow-none): a #GObject, or %NULL.
27355 * @callback: (scope async): a #GAsyncReadyCallback.
27356 * @user_data: (closure): user data passed to @callback.
27357 * @error: a #GError
27359 * Creates a #GSimpleAsyncResult from an error condition.
27361 * Returns: a #GSimpleAsyncResult.
27366 * g_simple_async_result_new_take_error: (skip)
27367 * @source_object: (allow-none): a #GObject, or %NULL
27368 * @callback: (scope async): a #GAsyncReadyCallback
27369 * @user_data: (closure): user data passed to @callback
27370 * @error: a #GError
27372 * Creates a #GSimpleAsyncResult from an error condition, and takes over the
27373 * caller's ownership of @error, so the caller does not need to free it anymore.
27375 * Returns: a #GSimpleAsyncResult
27381 * g_simple_async_result_propagate_error:
27382 * @simple: a #GSimpleAsyncResult.
27383 * @dest: (out): a location to propagate the error to.
27385 * Propagates an error from within the simple asynchronous result to
27386 * a given destination.
27388 * Returns: %TRUE if the error was propagated to @dest. %FALSE otherwise.
27393 * g_simple_async_result_run_in_thread: (skip)
27394 * @simple: a #GSimpleAsyncResult.
27395 * @func: a #GSimpleAsyncThreadFunc.
27396 * @io_priority: the io priority of the request.
27397 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27399 * Runs the asynchronous job in a separate thread and then calls
27400 * g_simple_async_result_complete_in_idle() on @simple to return
27401 * the result to the appropriate main loop.
27402 * Calling this function takes a reference to @simple for as long as
27403 * is needed to run the job and report its completion.
27408 * g_simple_async_result_set_error: (skip)
27409 * @simple: a #GSimpleAsyncResult.
27410 * @domain: a #GQuark (usually #G_IO_ERROR).
27411 * @code: an error code.
27412 * @format: a formatted error reporting string.
27413 * @...: a list of variables to fill in @format.
27415 * Sets an error within the asynchronous result without a #GError.
27420 * g_simple_async_result_set_error_va: (skip)
27421 * @simple: a #GSimpleAsyncResult.
27422 * @domain: a #GQuark (usually #G_IO_ERROR).
27423 * @code: an error code.
27424 * @format: a formatted error reporting string.
27425 * @args: va_list of arguments.
27427 * Sets an error within the asynchronous result without a #GError.
27428 * Unless writing a binding, see g_simple_async_result_set_error().
27433 * g_simple_async_result_set_from_error:
27434 * @simple: a #GSimpleAsyncResult.
27437 * Sets the result from a #GError.
27442 * g_simple_async_result_set_handle_cancellation:
27443 * @simple: a #GSimpleAsyncResult.
27444 * @handle_cancellation: a #gboolean.
27446 * Sets whether to handle cancellation within the asynchronous operation.
27451 * g_simple_async_result_set_op_res_gboolean:
27452 * @simple: a #GSimpleAsyncResult.
27453 * @op_res: a #gboolean.
27455 * Sets the operation result to a boolean within the asynchronous result.
27460 * g_simple_async_result_set_op_res_gpointer: (skip)
27461 * @simple: a #GSimpleAsyncResult.
27462 * @op_res: a pointer result from an asynchronous function.
27463 * @destroy_op_res: a #GDestroyNotify function.
27465 * Sets the operation result within the asynchronous result to a pointer.
27470 * g_simple_async_result_set_op_res_gssize:
27471 * @simple: a #GSimpleAsyncResult.
27472 * @op_res: a #gssize.
27474 * Sets the operation result within the asynchronous result to
27475 * the given @op_res.
27480 * g_simple_async_result_take_error: (skip)
27481 * @simple: a #GSimpleAsyncResult
27482 * @error: a #GError
27484 * Sets the result from @error, and takes over the caller's ownership
27485 * of @error, so the caller does not need to free it any more.
27492 * g_simple_permission_new:
27493 * @allowed: %TRUE if the action is allowed
27494 * @returns: the #GSimplePermission, as a #GPermission
27496 * Creates a new #GPermission instance that represents an action that is
27497 * either always or never allowed.
27505 * @socket: a #GSocket.
27506 * @cancellable: (allow-none): a %GCancellable or %NULL
27507 * @error: #GError for error reporting, or %NULL to ignore.
27509 * Accept incoming connections on a connection-based socket. This removes
27510 * the first outstanding connection request from the listening socket and
27511 * creates a #GSocket object for it.
27512 * The @socket must be bound to a local address with g_socket_bind() and
27513 * must be listening for incoming connections (g_socket_listen()).
27514 * If there are no outstanding connections then the operation will block
27515 * or return %G_IO_ERROR_WOULD_BLOCK if non-blocking I/O is enabled.
27516 * To be notified of an incoming connection, wait for the %G_IO_IN condition.
27517 * Free the returned object with g_object_unref().
27519 * Returns: (transfer full): a new #GSocket, or %NULL on error.
27525 * g_socket_address_enumerator_next:
27526 * @enumerator: a #GSocketAddressEnumerator
27527 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27528 * @error: a #GError.
27530 * Retrieves the next #GSocketAddress from @enumerator. Note that this
27531 * may block for some amount of time. (Eg, a #GNetworkAddress may need
27532 * to do a DNS lookup before it can return an address.) Use
27533 * g_socket_address_enumerator_next_async() if you need to avoid
27535 * If @enumerator is expected to yield addresses, but for some reason
27536 * is unable to (eg, because of a DNS error), then the first call to
27537 * g_socket_address_enumerator_next() will return an appropriate error
27538 * in *@error. However, if the first call to
27539 * g_socket_address_enumerator_next() succeeds, then any further
27540 * internal errors (other than @cancellable being triggered) will be
27542 * error (in which case *@error will be set) or if there are no
27545 * Returns: (transfer full): a #GSocketAddress (owned by the caller), or %NULL on
27550 * g_socket_address_enumerator_next_async:
27551 * @enumerator: a #GSocketAddressEnumerator
27552 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27553 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
27554 * @user_data: (closure): the data to pass to callback function
27556 * Asynchronously retrieves the next #GSocketAddress from @enumerator
27557 * and then calls @callback, which must call
27558 * g_socket_address_enumerator_next_finish() to get the result.
27563 * g_socket_address_enumerator_next_finish:
27564 * @enumerator: a #GSocketAddressEnumerator
27565 * @result: a #GAsyncResult
27566 * @error: a #GError
27568 * Retrieves the result of a completed call to
27569 * g_socket_address_enumerator_next_async(). See
27570 * g_socket_address_enumerator_next() for more information about
27572 * error (in which case *@error will be set) or if there are no
27575 * Returns: (transfer full): a #GSocketAddress (owned by the caller), or %NULL on
27580 * g_socket_address_get_family:
27581 * @address: a #GSocketAddress
27583 * Gets the socket family type of @address.
27585 * Returns: the socket family type of @address.
27591 * g_socket_address_get_native_size:
27592 * @address: a #GSocketAddress
27594 * Gets the size of @address's native <type>struct sockaddr</type>.
27595 * You can use this to allocate memory to pass to
27596 * g_socket_address_to_native().
27598 * Returns: the size of the native <type>struct sockaddr</type> that
27604 * g_socket_address_new_from_native:
27605 * @native: a pointer to a <type>struct sockaddr</type>
27606 * @len: the size of the memory location pointed to by @native
27608 * Creates a #GSocketAddress subclass corresponding to the native
27609 * <type>struct sockaddr</type> @native.
27612 * Returns: a new #GSocketAddress if @native could successfully be converted,
27618 * g_socket_address_to_native:
27619 * @address: a #GSocketAddress
27620 * @dest: a pointer to a memory location that will contain the native <type>struct sockaddr</type>.
27621 * @destlen: the size of @dest. Must be at least as large as g_socket_address_get_native_size().
27622 * @error: #GError for error reporting, or %NULL to ignore.
27624 * Converts a #GSocketAddress to a native <type>struct
27625 * sockaddr</type>, which can be passed to low-level functions like
27626 * connect() or bind().
27627 * If not enough space is availible, a %G_IO_ERROR_NO_SPACE error is
27628 * returned. If the address type is not known on the system
27629 * then a %G_IO_ERROR_NOT_SUPPORTED error is returned.
27631 * Returns: %TRUE if @dest was filled in, %FALSE on error
27638 * @socket: a #GSocket.
27639 * @address: a #GSocketAddress specifying the local address.
27640 * @allow_reuse: whether to allow reusing this address
27641 * @error: #GError for error reporting, or %NULL to ignore.
27643 * When a socket is created it is attached to an address family, but it
27644 * doesn't have an address in this family. g_socket_bind() assigns the
27645 * address (sometimes called name) of the socket.
27646 * It is generally required to bind to a local address before you can
27647 * receive connections. (See g_socket_listen() and g_socket_accept() ).
27648 * In certain situations, you may also want to bind a socket that will be
27649 * used to initiate connections, though this is not normally required.
27650 * eventually call g_socket_accept() on), and %FALSE for client sockets.
27651 * (Specifically, if it is %TRUE, then g_socket_bind() will set the
27652 * %SO_REUSEADDR flag on the socket, allowing it to bind @address even if
27653 * that address was previously used by another socket that has not yet been
27654 * fully cleaned-up by the kernel. Failing to set this flag on a server
27655 * socket may cause the bind call to return %G_IO_ERROR_ADDRESS_IN_USE if
27656 * the server program is stopped and then immediately restarted.)
27658 * Returns: %TRUE on success, %FALSE on error.
27664 * g_socket_check_connect_result:
27665 * @socket: a #GSocket
27666 * @error: #GError for error reporting, or %NULL to ignore.
27668 * Checks and resets the pending connect error for the socket.
27669 * This is used to check for errors when g_socket_connect() is
27670 * used in non-blocking mode.
27672 * Returns: %TRUE if no error, %FALSE otherwise, setting @error to the error
27678 * g_socket_client_add_application_proxy:
27679 * @client: a #GSocketClient
27680 * @protocol: The proxy protocol
27682 * Enable proxy protocols to be handled by the application. When the
27683 * indicated proxy protocol is returned by the #GProxyResolver,
27684 * #GSocketClient will consider this protocol as supported but will
27685 * not try find a #GProxy instance to handle handshaking. The
27686 * application must check for this case by calling
27687 * g_socket_connection_get_remote_address() on the returned
27688 * #GSocketConnection, and seeing if it's a #GProxyAddress of the
27689 * appropriate type, to determine whether or not it needs to handle
27690 * the proxy handshaking itself.
27691 * This should be used for proxy protocols that are dialects of
27692 * another protocol such as HTTP proxy. It also allows cohabitation of
27693 * proxy protocols that are reused between protocols. A good example
27694 * is HTTP. It can be used to proxy HTTP, FTP and Gopher and can also
27695 * be use as generic socket proxy through the HTTP CONNECT method.
27700 * g_socket_client_connect:
27701 * @client: a #GSocketClient.
27702 * @connectable: a #GSocketConnectable specifying the remote address.
27703 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27704 * @error: #GError for error reporting, or %NULL to ignore.
27706 * Tries to resolve the @connectable and make a network connection to it..
27707 * Upon a successful connection, a new #GSocketConnection is constructed
27708 * and returned. The caller owns this new object and must drop their
27709 * reference to it when finished with it.
27710 * The type of the #GSocketConnection object returned depends on the type of
27711 * the underlying socket that is used. For instance, for a TCP/IP connection
27712 * it will be a #GTcpConnection.
27713 * The socket created will be the same family as the the address that the
27714 * or indirectly via g_socket_client_set_local_address(). The socket type
27715 * defaults to %G_SOCKET_TYPE_STREAM but can be set with
27716 * g_socket_client_set_socket_type().
27717 * If a local address is specified with g_socket_client_set_local_address() the
27718 * socket will be bound to this address before connecting.
27720 * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
27726 * g_socket_client_connect_async:
27727 * @client: a #GTcpClient
27728 * @connectable: a #GSocketConnectable specifying the remote address.
27729 * @cancellable: (allow-none): a #GCancellable, or %NULL
27730 * @callback: (scope async): a #GAsyncReadyCallback
27731 * @user_data: (closure): user data for the callback
27733 * This is the asynchronous version of g_socket_client_connect().
27734 * When the operation is finished @callback will be
27735 * called. You can then call g_socket_client_connect_finish() to get
27736 * the result of the operation.
27743 * g_socket_client_connect_finish:
27744 * @client: a #GSocketClient.
27745 * @result: a #GAsyncResult.
27746 * @error: a #GError location to store the error occuring, or %NULL to ignore.
27748 * Finishes an async connect operation. See g_socket_client_connect_async()
27750 * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
27756 * g_socket_client_connect_to_host:
27757 * @client: a #GSocketClient
27758 * @host_and_port: the name and optionally port of the host to connect to
27759 * @default_port: the default port to connect to
27760 * @cancellable: (allow-none): a #GCancellable, or %NULL
27761 * @error: a pointer to a #GError, or %NULL
27763 * This is a helper function for g_socket_client_connect().
27764 * Attempts to create a TCP connection to the named host.
27765 * address, an IPv4 address, or a domain name (in which case a DNS
27766 * lookup is performed). Quoting with [] is supported for all address
27767 * types. A port override may be specified in the usual way with a
27768 * colon. Ports may be given as decimal numbers or symbolic names (in
27769 * which case an /etc/services lookup is performed).
27770 * If no port override is given in @host_and_port then @default_port will be
27771 * used as the port number to connect to.
27772 * In general, @host_and_port is expected to be provided by the user (allowing
27773 * them to give the hostname, and a port overide if necessary) and
27774 * In the case that an IP address is given, a single connection
27775 * attempt is made. In the case that a name is given, multiple
27776 * connection attempts may be made, in turn and according to the
27777 * number of address records in DNS, until a connection succeeds.
27778 * Upon a successful connection, a new #GSocketConnection is constructed
27779 * and returned. The caller owns this new object and must drop their
27780 * reference to it when finished with it.
27781 * In the event of any failure (DNS error, service not found, no hosts
27782 * connectable) %NULL is returned and @error (if non-%NULL) is set
27785 * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
27791 * g_socket_client_connect_to_host_async:
27792 * @client: a #GTcpClient
27793 * @host_and_port: the name and optionally the port of the host to connect to
27794 * @default_port: the default port to connect to
27795 * @cancellable: (allow-none): a #GCancellable, or %NULL
27796 * @callback: (scope async): a #GAsyncReadyCallback
27797 * @user_data: (closure): user data for the callback
27799 * This is the asynchronous version of g_socket_client_connect_to_host().
27800 * When the operation is finished @callback will be
27801 * called. You can then call g_socket_client_connect_to_host_finish() to get
27802 * the result of the operation.
27809 * g_socket_client_connect_to_host_finish:
27810 * @client: a #GSocketClient.
27811 * @result: a #GAsyncResult.
27812 * @error: a #GError location to store the error occuring, or %NULL to ignore.
27814 * Finishes an async connect operation. See g_socket_client_connect_to_host_async()
27816 * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
27822 * g_socket_client_connect_to_service:
27823 * @client: a #GSocketConnection
27824 * @domain: a domain name
27825 * @service: the name of the service to connect to
27826 * @cancellable: (allow-none): a #GCancellable, or %NULL
27827 * @error: a pointer to a #GError, or %NULL
27828 * @returns: (transfer full): a #GSocketConnection if successful, or %NULL on error
27830 * Attempts to create a TCP connection to a service.
27831 * This call looks up the SRV record for @service at @domain for the
27832 * "tcp" protocol. It then attempts to connect, in turn, to each of
27833 * the hosts providing the service until either a connection succeeds
27834 * or there are no hosts remaining.
27835 * Upon a successful connection, a new #GSocketConnection is constructed
27836 * and returned. The caller owns this new object and must drop their
27837 * reference to it when finished with it.
27838 * In the event of any failure (DNS error, service not found, no hosts
27839 * connectable) %NULL is returned and @error (if non-%NULL) is set
27845 * g_socket_client_connect_to_service_async:
27846 * @client: a #GSocketClient
27847 * @domain: a domain name
27848 * @service: the name of the service to connect to
27849 * @cancellable: (allow-none): a #GCancellable, or %NULL
27850 * @callback: (scope async): a #GAsyncReadyCallback
27851 * @user_data: (closure): user data for the callback
27853 * This is the asynchronous version of
27854 * g_socket_client_connect_to_service().
27861 * g_socket_client_connect_to_service_finish:
27862 * @client: a #GSocketClient.
27863 * @result: a #GAsyncResult.
27864 * @error: a #GError location to store the error occuring, or %NULL to ignore.
27866 * Finishes an async connect operation. See g_socket_client_connect_to_service_async()
27868 * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
27874 * g_socket_client_connect_to_uri:
27875 * @client: a #GSocketClient
27876 * @uri: A network URI
27877 * @default_port: the default port to connect to
27878 * @cancellable: (allow-none): a #GCancellable, or %NULL
27879 * @error: a pointer to a #GError, or %NULL
27881 * This is a helper function for g_socket_client_connect().
27882 * Attempts to create a TCP connection with a network URI.
27883 * component. If a port is not specified in the URI, @default_port
27884 * will be used. TLS will be negotiated if #GSocketClient:tls is %TRUE.
27885 * (#GSocketClient does not know to automatically assume TLS for
27886 * certain URI schemes.)
27887 * Using this rather than g_socket_client_connect() or
27888 * g_socket_client_connect_to_host() allows #GSocketClient to
27889 * determine when to use application-specific proxy protocols.
27890 * Upon a successful connection, a new #GSocketConnection is constructed
27891 * and returned. The caller owns this new object and must drop their
27892 * reference to it when finished with it.
27893 * In the event of any failure (DNS error, service not found, no hosts
27894 * connectable) %NULL is returned and @error (if non-%NULL) is set
27897 * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
27903 * g_socket_client_connect_to_uri_async:
27904 * @client: a #GSocketClient
27905 * @uri: a network uri
27906 * @default_port: the default port to connect to
27907 * @cancellable: (allow-none): a #GCancellable, or %NULL
27908 * @callback: (scope async): a #GAsyncReadyCallback
27909 * @user_data: (closure): user data for the callback
27911 * This is the asynchronous version of g_socket_client_connect_to_uri().
27912 * When the operation is finished @callback will be
27913 * called. You can then call g_socket_client_connect_to_uri_finish() to get
27914 * the result of the operation.
27921 * g_socket_client_connect_to_uri_finish:
27922 * @client: a #GSocketClient.
27923 * @result: a #GAsyncResult.
27924 * @error: a #GError location to store the error occuring, or %NULL to ignore.
27926 * Finishes an async connect operation. See g_socket_client_connect_to_uri_async()
27928 * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
27934 * g_socket_client_get_enable_proxy:
27935 * @client: a #GSocketClient.
27937 * Gets the proxy enable state; see g_socket_client_set_enable_proxy()
27939 * Returns: whether proxying is enabled
27945 * g_socket_client_get_family:
27946 * @client: a #GSocketClient.
27948 * Gets the socket family of the socket client.
27949 * See g_socket_client_set_family() for details.
27951 * Returns: a #GSocketFamily
27957 * g_socket_client_get_local_address:
27958 * @client: a #GSocketClient.
27960 * Gets the local address of the socket client.
27961 * See g_socket_client_set_local_address() for details.
27963 * Returns: (transfer none): a #GSocketAddres or %NULL. don't free
27969 * g_socket_client_get_protocol:
27970 * @client: a #GSocketClient
27972 * Gets the protocol name type of the socket client.
27973 * See g_socket_client_set_protocol() for details.
27975 * Returns: a #GSocketProtocol
27981 * g_socket_client_get_socket_type:
27982 * @client: a #GSocketClient.
27984 * Gets the socket type of the socket client.
27985 * See g_socket_client_set_socket_type() for details.
27987 * Returns: a #GSocketFamily
27993 * g_socket_client_get_timeout:
27994 * @client: a #GSocketClient
27996 * Gets the I/O timeout time for sockets created by @client.
27997 * See g_socket_client_set_timeout() for details.
27999 * Returns: the timeout in seconds
28005 * g_socket_client_get_tls:
28006 * @client: a #GSocketClient.
28008 * Gets whether @client creates TLS connections. See
28009 * g_socket_client_set_tls() for details.
28011 * Returns: whether @client uses TLS
28017 * g_socket_client_get_tls_validation_flags:
28018 * @client: a #GSocketClient.
28020 * Gets the TLS validation flags used creating TLS connections via
28022 * Returns: the TLS validation flags
28028 * g_socket_client_new:
28030 * Creates a new #GSocketClient with the default options.
28031 * Free the returned object with g_object_unref().
28033 * Returns: a #GSocketClient.
28039 * g_socket_client_set_enable_proxy:
28040 * @client: a #GSocketClient.
28041 * @enable: whether to enable proxies
28043 * Sets whether or not @client attempts to make connections via a
28044 * proxy server. When enabled (the default), #GSocketClient will use a
28045 * #GProxyResolver to determine if a proxy protocol such as SOCKS is
28046 * needed, and automatically do the necessary proxy negotiation.
28053 * g_socket_client_set_family:
28054 * @client: a #GSocketClient.
28055 * @family: a #GSocketFamily
28057 * Sets the socket family of the socket client.
28058 * If this is set to something other than %G_SOCKET_FAMILY_INVALID
28059 * then the sockets created by this object will be of the specified
28061 * This might be useful for instance if you want to force the local
28062 * connection to be an ipv4 socket, even though the address might
28063 * be an ipv6 mapped to ipv4 address.
28070 * g_socket_client_set_local_address:
28071 * @client: a #GSocketClient.
28072 * @address: a #GSocketAddress, or %NULL
28074 * Sets the local address of the socket client.
28075 * The sockets created by this object will bound to the
28076 * specified address (if not %NULL) before connecting.
28077 * This is useful if you want to ensure the the local
28078 * side of the connection is on a specific port, or on
28079 * a specific interface.
28086 * g_socket_client_set_protocol:
28087 * @client: a #GSocketClient.
28088 * @protocol: a #GSocketProtocol
28090 * Sets the protocol of the socket client.
28091 * The sockets created by this object will use of the specified
28093 * If @protocol is %0 that means to use the default
28094 * protocol for the socket family and type.
28101 * g_socket_client_set_socket_type:
28102 * @client: a #GSocketClient.
28103 * @type: a #GSocketType
28105 * Sets the socket type of the socket client.
28106 * The sockets created by this object will be of the specified
28108 * It doesn't make sense to specify a type of %G_SOCKET_TYPE_DATAGRAM,
28109 * as GSocketClient is used for connection oriented services.
28116 * g_socket_client_set_timeout:
28117 * @client: a #GSocketClient.
28118 * @timeout: the timeout
28120 * Sets the I/O timeout for sockets created by @client. @timeout is a
28121 * time in seconds, or 0 for no timeout (the default).
28122 * The timeout value affects the initial connection attempt as well,
28123 * so setting this may cause calls to g_socket_client_connect(), etc,
28124 * to fail with %G_IO_ERROR_TIMED_OUT.
28131 * g_socket_client_set_tls:
28132 * @client: a #GSocketClient.
28133 * @tls: whether to use TLS
28135 * Sets whether @client creates TLS (aka SSL) connections. If @tls is
28136 * %TRUE, @client will wrap its connections in a #GTlsClientConnection
28137 * and perform a TLS handshake when connecting.
28138 * Note that since #GSocketClient must return a #GSocketConnection,
28139 * but #GTlsClientConnection is not a #GSocketConnection, this
28140 * actually wraps the resulting #GTlsClientConnection in a
28141 * #GTcpWrapperConnection when returning it. You can use
28142 * g_tcp_wrapper_connection_get_base_io_stream() on the return value
28143 * to extract the #GTlsClientConnection.
28150 * g_socket_client_set_tls_validation_flags:
28151 * @client: a #GSocketClient.
28152 * @flags: the validation flags
28154 * Sets the TLS validation flags used when creating TLS connections
28155 * via @client. The default value is %G_TLS_CERTIFICATE_VALIDATE_ALL.
28163 * @socket: a #GSocket
28164 * @error: #GError for error reporting, or %NULL to ignore.
28166 * Closes the socket, shutting down any active connection.
28167 * Closing a socket does not wait for all outstanding I/O operations
28168 * to finish, so the caller should not rely on them to be guaranteed
28169 * to complete even if the close returns with no error.
28170 * Once the socket is closed, all other operations will return
28171 * %G_IO_ERROR_CLOSED. Closing a socket multiple times will not
28173 * Sockets will be automatically closed when the last reference
28174 * is dropped, but you might want to call this function to make sure
28175 * resources are released as early as possible.
28176 * Beware that due to the way that TCP works, it is possible for
28177 * recently-sent data to be lost if either you close a socket while the
28178 * %G_IO_IN condition is set, or else if the remote connection tries to
28179 * send something to you after you close the socket but before it has
28180 * finished reading all of the data you sent. There is no easy generic
28181 * way to avoid this problem; the easiest fix is to design the network
28182 * protocol such that the client will never send data "out of turn".
28183 * Another solution is for the server to half-close the connection by
28184 * calling g_socket_shutdown() with only the @shutdown_write flag set,
28185 * and then wait for the client to notice this and close its side of the
28186 * connection, after which the server can safely call g_socket_close().
28187 * (This is what #GTcpConnection does if you call
28188 * g_tcp_connection_set_graceful_disconnect(). But of course, this
28189 * only works if the client will close its connection after the server
28192 * Returns: %TRUE on success, %FALSE on error
28198 * g_socket_condition_check:
28199 * @socket: a #GSocket
28200 * @condition: a #GIOCondition mask to check
28202 * Checks on the readiness of @socket to perform operations.
28203 * The operations specified in @condition are checked for and masked
28204 * against the currently-satisfied conditions on @socket. The result
28206 * Note that on Windows, it is possible for an operation to return
28207 * %G_IO_ERROR_WOULD_BLOCK even immediately after
28208 * g_socket_condition_check() has claimed that the socket is ready for
28209 * writing. Rather than calling g_socket_condition_check() and then
28210 * writing to the socket if it succeeds, it is generally better to
28211 * simply try writing to the socket right away, and try again later if
28212 * the initial attempt returns %G_IO_ERROR_WOULD_BLOCK.
28213 * It is meaningless to specify %G_IO_ERR or %G_IO_HUP in condition;
28214 * these conditions will always be set in the output if they are true.
28215 * This call never blocks.
28217 * Returns: the @GIOCondition mask of the current state
28223 * g_socket_condition_wait:
28224 * @socket: a #GSocket
28225 * @condition: a #GIOCondition mask to wait for
28226 * @cancellable: (allow-none): a #GCancellable, or %NULL
28227 * @error: a #GError pointer, or %NULL
28229 * Waits for @condition to become true on @socket. When the condition
28230 * is met, %TRUE is returned.
28231 * If @cancellable is cancelled before the condition is met, or if the
28232 * socket has a timeout set and it is reached before the condition is
28233 * met, then %FALSE is returned and @error, if non-%NULL, is set to
28234 * the appropriate value (%G_IO_ERROR_CANCELLED or
28235 * %G_IO_ERROR_TIMED_OUT).
28237 * Returns: %TRUE if the condition was met, %FALSE otherwise
28243 * g_socket_connect:
28244 * @socket: a #GSocket.
28245 * @address: a #GSocketAddress specifying the remote address.
28246 * @cancellable: (allow-none): a %GCancellable or %NULL
28247 * @error: #GError for error reporting, or %NULL to ignore.
28249 * Connect the socket to the specified remote address.
28250 * For connection oriented socket this generally means we attempt to make
28251 * a connection to the @address. For a connection-less socket it sets
28252 * the default address for g_socket_send() and discards all incoming datagrams
28253 * from other sources.
28254 * Generally connection oriented sockets can only connect once, but
28255 * connection-less sockets can connect multiple times to change the
28257 * If the connect call needs to do network I/O it will block, unless
28258 * non-blocking I/O is enabled. Then %G_IO_ERROR_PENDING is returned
28259 * and the user can be notified of the connection finishing by waiting
28260 * for the G_IO_OUT condition. The result of the connection can then be
28261 * checked with g_socket_check_connect_result().
28263 * Returns: %TRUE if connected, %FALSE on error.
28269 * g_socket_connectable_enumerate:
28270 * @connectable: a #GSocketConnectable
28272 * Creates a #GSocketAddressEnumerator for @connectable.
28274 * Returns: (transfer full): a new #GSocketAddressEnumerator.
28280 * g_socket_connectable_proxy_enumerate:
28281 * @connectable: a #GSocketConnectable
28283 * Creates a #GSocketAddressEnumerator for @connectable that will
28284 * return #GProxyAddress<!-- -->es for addresses that you must connect
28286 * If @connectable does not implement
28287 * g_socket_connectable_proxy_enumerate(), this will fall back to
28288 * calling g_socket_connectable_enumerate().
28290 * Returns: (transfer full): a new #GSocketAddressEnumerator.
28296 * g_socket_connection_factory_create_connection:
28297 * @socket: a #GSocket
28299 * Creates a #GSocketConnection subclass of the right type for
28301 * Returns: (transfer full): a #GSocketConnection
28307 * g_socket_connection_factory_lookup_type:
28308 * @family: a #GSocketFamily
28309 * @type: a #GSocketType
28310 * @protocol_id: a protocol id
28312 * Looks up the #GType to be used when creating socket connections on
28313 * sockets with the specified @family,@type and @protocol_id.
28314 * If no type is registered, the #GSocketConnection base type is returned.
28316 * Returns: a #GType
28322 * g_socket_connection_factory_register_type:
28323 * @g_type: a #GType, inheriting from %G_TYPE_SOCKET_CONNECTION
28324 * @family: a #GSocketFamily
28325 * @type: a #GSocketType
28326 * @protocol: a protocol id
28328 * Looks up the #GType to be used when creating socket connections on
28329 * sockets with the specified @family,@type and @protocol.
28330 * If no type is registered, the #GSocketConnection base type is returned.
28337 * g_socket_connection_get_local_address:
28338 * @connection: a #GSocketConnection
28339 * @error: #GError for error reporting, or %NULL to ignore.
28341 * Try to get the local address of a socket connection.
28342 * Free the returned object with g_object_unref().
28344 * Returns: (transfer full): a #GSocketAddress or %NULL on error.
28350 * g_socket_connection_get_remote_address:
28351 * @connection: a #GSocketConnection
28352 * @error: #GError for error reporting, or %NULL to ignore.
28354 * Try to get the remote address of a socket connection.
28355 * Free the returned object with g_object_unref().
28357 * Returns: (transfer full): a #GSocketAddress or %NULL on error.
28363 * g_socket_connection_get_socket:
28364 * @connection: a #GSocketConnection
28366 * Gets the underlying #GSocket object of the connection.
28367 * This can be useful if you want to do something unusual on it
28368 * not supported by the #GSocketConnection APIs.
28370 * Returns: (transfer none): a #GSocketAddress or %NULL on error.
28376 * g_socket_control_message_deserialize:
28377 * @level: a socket level
28378 * @type: a socket control message type for the given @level
28379 * @size: the size of the data in bytes
28380 * @data: (array length=size) (element-type guint8): pointer to the message data
28382 * Tries to deserialize a socket control message of a given
28383 * of #GSocketControlMessage if they can understand this kind
28384 * of message and if so deserialize it into a #GSocketControlMessage.
28385 * If there is no implementation for this kind of control message, %NULL
28386 * will be returned.
28388 * Returns: (transfer full): the deserialized message or %NULL
28394 * g_socket_control_message_get_level:
28395 * @message: a #GSocketControlMessage
28397 * Returns the "level" (i.e. the originating protocol) of the control message.
28398 * This is often SOL_SOCKET.
28400 * Returns: an integer describing the level
28406 * g_socket_control_message_get_msg_type:
28407 * @message: a #GSocketControlMessage
28409 * Returns the protocol specific type of the control message.
28410 * For instance, for UNIX fd passing this would be SCM_RIGHTS.
28412 * Returns: an integer describing the type of control message
28418 * g_socket_control_message_get_size:
28419 * @message: a #GSocketControlMessage
28421 * Returns the space required for the control message, not including
28422 * headers or alignment.
28424 * Returns: The number of bytes required.
28430 * g_socket_control_message_serialize:
28431 * @message: a #GSocketControlMessage
28432 * @data: A buffer to write data to
28434 * Converts the data in the message to bytes placed in the
28436 * returned by g_socket_control_message_get_size() on this
28444 * g_socket_create_source: (skip)
28445 * @socket: a #GSocket
28446 * @condition: a #GIOCondition mask to monitor
28447 * @cancellable: (allow-none): a %GCancellable or %NULL
28449 * Creates a %GSource that can be attached to a %GMainContext to monitor
28450 * for the availibility of the specified @condition on the socket.
28451 * The callback on the source is of the #GSocketSourceFunc type.
28452 * It is meaningless to specify %G_IO_ERR or %G_IO_HUP in @condition;
28453 * these conditions will always be reported output if they are true.
28454 * cause the source to trigger, reporting the current condition (which
28455 * is likely 0 unless cancellation happened at the same time as a
28456 * condition change). You can check for this in the callback using
28457 * g_cancellable_is_cancelled().
28458 * If @socket has a timeout set, and it is reached before @condition
28459 * occurs, the source will then trigger anyway, reporting %G_IO_IN or
28460 * %G_IO_OUT depending on @condition. However, @socket will have been
28461 * marked as having had a timeout, and so the next #GSocket I/O method
28462 * you call will then fail with a %G_IO_ERROR_TIMED_OUT.
28464 * Returns: (transfer full): a newly allocated %GSource, free with g_source_unref().
28470 * g_socket_get_blocking:
28471 * @socket: a #GSocket.
28473 * Gets the blocking mode of the socket. For details on blocking I/O,
28474 * see g_socket_set_blocking().
28476 * Returns: %TRUE if blocking I/O is used, %FALSE otherwise.
28482 * g_socket_get_credentials:
28483 * @socket: a #GSocket.
28484 * @error: #GError for error reporting, or %NULL to ignore.
28486 * Returns the credentials of the foreign process connected to this
28487 * socket, if any (e.g. it is only supported for %G_SOCKET_FAMILY_UNIX
28489 * If this operation isn't supported on the OS, the method fails with
28490 * the %G_IO_ERROR_NOT_SUPPORTED error. On Linux this is implemented
28491 * by reading the %SO_PEERCRED option on the underlying socket.
28492 * Other ways to obtain credentials from a foreign peer includes the
28493 * #GUnixCredentialsMessage type and
28494 * g_unix_connection_send_credentials() /
28495 * g_unix_connection_receive_credentials() functions.
28496 * that must be freed with g_object_unref().
28498 * Returns: (transfer full): %NULL if @error is set, otherwise a #GCredentials object
28504 * g_socket_get_family:
28505 * @socket: a #GSocket.
28507 * Gets the socket family of the socket.
28509 * Returns: a #GSocketFamily
28516 * @socket: a #GSocket.
28518 * Returns the underlying OS socket object. On unix this
28519 * is a socket file descriptor, and on windows this is
28520 * a Winsock2 SOCKET handle. This may be useful for
28521 * doing platform specific or otherwise unusual operations
28524 * Returns: the file descriptor of the socket.
28530 * g_socket_get_keepalive:
28531 * @socket: a #GSocket.
28533 * Gets the keepalive mode of the socket. For details on this,
28534 * see g_socket_set_keepalive().
28536 * Returns: %TRUE if keepalive is active, %FALSE otherwise.
28542 * g_socket_get_listen_backlog:
28543 * @socket: a #GSocket.
28545 * Gets the listen backlog setting of the socket. For details on this,
28546 * see g_socket_set_listen_backlog().
28548 * Returns: the maximum number of pending connections.
28554 * g_socket_get_local_address:
28555 * @socket: a #GSocket.
28556 * @error: #GError for error reporting, or %NULL to ignore.
28558 * Try to get the local address of a bound socket. This is only
28559 * useful if the socket has been bound to a local address,
28560 * either explicitly or implicitly when connecting.
28561 * Free the returned object with g_object_unref().
28563 * Returns: (transfer full): a #GSocketAddress or %NULL on error.
28569 * g_socket_get_protocol:
28570 * @socket: a #GSocket.
28572 * Gets the socket protocol id the socket was created with.
28573 * In case the protocol is unknown, -1 is returned.
28575 * Returns: a protocol id, or -1 if unknown
28581 * g_socket_get_remote_address:
28582 * @socket: a #GSocket.
28583 * @error: #GError for error reporting, or %NULL to ignore.
28585 * Try to get the remove address of a connected socket. This is only
28586 * useful for connection oriented sockets that have been connected.
28587 * Free the returned object with g_object_unref().
28589 * Returns: (transfer full): a #GSocketAddress or %NULL on error.
28595 * g_socket_get_socket_type:
28596 * @socket: a #GSocket.
28598 * Gets the socket type of the socket.
28600 * Returns: a #GSocketType
28606 * g_socket_get_timeout:
28607 * @socket: a #GSocket.
28609 * Gets the timeout setting of the socket. For details on this, see
28610 * g_socket_set_timeout().
28612 * Returns: the timeout in seconds
28618 * g_socket_is_closed:
28619 * @socket: a #GSocket
28621 * Checks whether a socket is closed.
28623 * Returns: %TRUE if socket is closed, %FALSE otherwise
28629 * g_socket_is_connected:
28630 * @socket: a #GSocket.
28632 * Check whether the socket is connected. This is only useful for
28633 * connection-oriented sockets.
28635 * Returns: %TRUE if socket is connected, %FALSE otherwise.
28642 * @socket: a #GSocket.
28643 * @error: #GError for error reporting, or %NULL to ignore.
28645 * Marks the socket as a server socket, i.e. a socket that is used
28646 * to accept incoming requests using g_socket_accept().
28647 * Before calling this the socket must be bound to a local address using
28649 * To set the maximum amount of outstanding clients, use
28650 * g_socket_set_listen_backlog().
28652 * Returns: %TRUE on success, %FALSE on error.
28658 * g_socket_listener_accept:
28659 * @listener: a #GSocketListener
28660 * @source_object: (out) (transfer none) (allow-none): location where #GObject pointer will be stored, or %NULL
28661 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
28662 * @error: #GError for error reporting, or %NULL to ignore.
28664 * Blocks waiting for a client to connect to any of the sockets added
28665 * to the listener. Returns a #GSocketConnection for the socket that was
28667 * If @source_object is not %NULL it will be filled out with the source
28668 * object specified when the corresponding socket or address was added
28670 * If @cancellable is not %NULL, then the operation can be cancelled by
28671 * triggering the cancellable object from another thread. If the operation
28672 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
28674 * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
28680 * g_socket_listener_accept_async:
28681 * @listener: a #GSocketListener
28682 * @cancellable: (allow-none): a #GCancellable, or %NULL
28683 * @callback: (scope async): a #GAsyncReadyCallback
28684 * @user_data: (closure): user data for the callback
28686 * This is the asynchronous version of g_socket_listener_accept().
28687 * When the operation is finished @callback will be
28688 * called. You can then call g_socket_listener_accept_socket()
28689 * to get the result of the operation.
28696 * g_socket_listener_accept_finish:
28697 * @listener: a #GSocketListener
28698 * @result: a #GAsyncResult.
28699 * @source_object: (out) (transfer none) (allow-none): Optional #GObject identifying this source
28700 * @error: a #GError location to store the error occuring, or %NULL to ignore.
28702 * Finishes an async accept operation. See g_socket_listener_accept_async()
28704 * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
28710 * g_socket_listener_accept_socket:
28711 * @listener: a #GSocketListener
28712 * @source_object: (out) (transfer none) (allow-none): location where #GObject pointer will be stored, or %NULL.
28713 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
28714 * @error: #GError for error reporting, or %NULL to ignore.
28716 * Blocks waiting for a client to connect to any of the sockets added
28717 * to the listener. Returns the #GSocket that was accepted.
28718 * If you want to accept the high-level #GSocketConnection, not a #GSocket,
28719 * which is often the case, then you should use g_socket_listener_accept()
28721 * If @source_object is not %NULL it will be filled out with the source
28722 * object specified when the corresponding socket or address was added
28724 * If @cancellable is not %NULL, then the operation can be cancelled by
28725 * triggering the cancellable object from another thread. If the operation
28726 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
28728 * Returns: (transfer full): a #GSocket on success, %NULL on error.
28734 * g_socket_listener_accept_socket_async:
28735 * @listener: a #GSocketListener
28736 * @cancellable: (allow-none): a #GCancellable, or %NULL
28737 * @callback: (scope async): a #GAsyncReadyCallback
28738 * @user_data: (closure): user data for the callback
28740 * This is the asynchronous version of g_socket_listener_accept_socket().
28741 * When the operation is finished @callback will be
28742 * called. You can then call g_socket_listener_accept_socket_finish()
28743 * to get the result of the operation.
28750 * g_socket_listener_accept_socket_finish:
28751 * @listener: a #GSocketListener
28752 * @result: a #GAsyncResult.
28753 * @source_object: (out) (transfer none) (allow-none): Optional #GObject identifying this source
28754 * @error: a #GError location to store the error occuring, or %NULL to ignore.
28756 * Finishes an async accept operation. See g_socket_listener_accept_socket_async()
28758 * Returns: (transfer full): a #GSocket on success, %NULL on error.
28764 * g_socket_listener_add_address:
28765 * @listener: a #GSocketListener
28766 * @address: a #GSocketAddress
28767 * @type: a #GSocketType
28768 * @protocol: a #GSocketProtocol
28769 * @source_object: (allow-none): Optional #GObject identifying this source
28770 * @effective_address: (out) (allow-none): location to store the address that was bound to, or %NULL.
28771 * @error: #GError for error reporting, or %NULL to ignore.
28773 * Creates a socket of type @type and protocol @protocol, binds
28774 * it to @address and adds it to the set of sockets we're accepting
28776 * Note that adding an IPv6 address, depending on the platform,
28777 * may or may not result in a listener that also accepts IPv4
28778 * connections. For more determinstic behaviour, see
28779 * g_socket_listener_add_inet_port().
28780 * to accept to identify this particular source, which is
28781 * useful if you're listening on multiple addresses and do
28782 * different things depending on what address is connected to.
28783 * If successful and @effective_address is non-%NULL then it will
28784 * be set to the address that the binding actually occured at. This
28785 * is helpful for determining the port number that was used for when
28786 * requested, belongs to the caller and must be freed.
28788 * Requesting a binding to port 0 (ie: "any port"). This address, if
28789 * Returns: %TRUE on success, %FALSE on error.
28795 * g_socket_listener_add_any_inet_port:
28796 * @listener: a #GSocketListener
28797 * @source_object: (allow-none): Optional #GObject identifying this source
28798 * @error: a #GError location to store the error occuring, or %NULL to ignore.
28800 * Listens for TCP connections on any available port number for both
28801 * IPv6 and IPv4 (if each are available).
28802 * This is useful if you need to have a socket for incoming connections
28803 * but don't care about the specific port number.
28804 * to accept to identify this particular source, which is
28805 * useful if you're listening on multiple addresses and do
28806 * different things depending on what address is connected to.
28808 * Returns: the port number, or 0 in case of failure.
28814 * g_socket_listener_add_inet_port:
28815 * @listener: a #GSocketListener
28816 * @port: an IP port number (non-zero)
28817 * @source_object: (allow-none): Optional #GObject identifying this source
28818 * @error: #GError for error reporting, or %NULL to ignore.
28820 * Helper function for g_socket_listener_add_address() that
28821 * creates a TCP/IP socket listening on IPv4 and IPv6 (if
28822 * supported) on the specified port on all interfaces.
28823 * to accept to identify this particular source, which is
28824 * useful if you're listening on multiple addresses and do
28825 * different things depending on what address is connected to.
28827 * Returns: %TRUE on success, %FALSE on error.
28833 * g_socket_listener_add_socket:
28834 * @listener: a #GSocketListener
28835 * @socket: a listening #GSocket
28836 * @source_object: (allow-none): Optional #GObject identifying this source
28837 * @error: #GError for error reporting, or %NULL to ignore.
28839 * Adds @socket to the set of sockets that we try to accept
28840 * new clients from. The socket must be bound to a local
28841 * address and listened to.
28842 * to accept to identify this particular source, which is
28843 * useful if you're listening on multiple addresses and do
28844 * different things depending on what address is connected to.
28846 * Returns: %TRUE on success, %FALSE on error.
28852 * g_socket_listener_close:
28853 * @listener: a #GSocketListener
28855 * Closes all the sockets in the listener.
28862 * g_socket_listener_new:
28864 * Creates a new #GSocketListener with no sockets to listen for.
28865 * New listeners can be added with e.g. g_socket_listener_add_address()
28866 * or g_socket_listener_add_inet_port().
28868 * Returns: a new #GSocketListener.
28874 * g_socket_listener_set_backlog:
28875 * @listener: a #GSocketListener
28876 * @listen_backlog: an integer
28878 * Sets the listen backlog on the sockets in the listener.
28879 * See g_socket_set_listen_backlog() for details
28887 * @family: the socket family to use, e.g. %G_SOCKET_FAMILY_IPV4.
28888 * @type: the socket type to use.
28889 * @protocol: the id of the protocol to use, or 0 for default.
28890 * @error: #GError for error reporting, or %NULL to ignore.
28892 * Creates a new #GSocket with the defined family, type and protocol.
28893 * If @protocol is 0 (%G_SOCKET_PROTOCOL_DEFAULT) the default protocol type
28894 * for the family and type is used.
28895 * The @protocol is a family and type specific int that specifies what
28896 * kind of protocol to use. #GSocketProtocol lists several common ones.
28897 * Many families only support one protocol, and use 0 for this, others
28898 * support several and using 0 means to use the default protocol for
28899 * the family and type.
28900 * The protocol id is passed directly to the operating
28901 * system, so you can use protocols not listed in #GSocketProtocol if you
28902 * know the protocol number used for it.
28903 * Free the returned object with g_object_unref().
28905 * Returns: a #GSocket or %NULL on error.
28911 * g_socket_new_from_fd:
28912 * @fd: a native socket file descriptor.
28913 * @error: #GError for error reporting, or %NULL to ignore.
28915 * Creates a new #GSocket from a native file descriptor
28916 * or winsock SOCKET handle.
28917 * This reads all the settings from the file descriptor so that
28918 * all properties should work. Note that the file descriptor
28919 * will be set to non-blocking mode, independent on the blocking
28920 * mode of the #GSocket.
28921 * Free the returned object with g_object_unref().
28923 * Returns: a #GSocket or %NULL on error.
28929 * g_socket_receive:
28930 * @socket: a #GSocket
28931 * @buffer: a buffer to read data into (which should be at least @size bytes long).
28932 * @size: the number of bytes you want to read from the socket
28933 * @cancellable: (allow-none): a %GCancellable or %NULL
28934 * @error: #GError for error reporting, or %NULL to ignore.
28936 * Receive data (up to @size bytes) from a socket. This is mainly used by
28937 * connection-oriented sockets; it is identical to g_socket_receive_from()
28938 * with @address set to %NULL.
28939 * For %G_SOCKET_TYPE_DATAGRAM and %G_SOCKET_TYPE_SEQPACKET sockets,
28940 * g_socket_receive() will always read either 0 or 1 complete messages from
28941 * the socket. If the received message is too large to fit in @buffer, then
28942 * the data beyond @size bytes will be discarded, without any explicit
28943 * indication that this has occurred.
28944 * For %G_SOCKET_TYPE_STREAM sockets, g_socket_receive() can return any
28945 * number of bytes, up to @size. If more than @size bytes have been
28946 * received, the additional data will be returned in future calls to
28947 * g_socket_receive().
28948 * If the socket is in blocking mode the call will block until there is
28949 * some data to receive or there is an error. If there is no data available
28950 * and the socket is in non-blocking mode, a %G_IO_ERROR_WOULD_BLOCK error
28951 * will be returned. To be notified when data is available, wait for the
28952 * %G_IO_IN condition.
28953 * On error -1 is returned and @error is set accordingly.
28955 * Returns: Number of bytes read, or -1 on error
28961 * g_socket_receive_from:
28962 * @socket: a #GSocket
28963 * @address: a pointer to a #GSocketAddress pointer, or %NULL
28964 * @buffer: a buffer to read data into (which should be at least @size bytes long).
28965 * @size: the number of bytes you want to read from the socket
28966 * @cancellable: (allow-none): a %GCancellable or %NULL
28967 * @error: #GError for error reporting, or %NULL to ignore.
28969 * Receive data (up to @size bytes) from a socket.
28970 * If @address is non-%NULL then @address will be set equal to the
28971 * source address of the received packet.
28972 * See g_socket_receive() for additional information.
28974 * Returns: Number of bytes read, or -1 on error
28980 * g_socket_receive_message:
28981 * @socket: a #GSocket
28982 * @address: a pointer to a #GSocketAddress pointer, or %NULL
28983 * @vectors: (array length=num_vectors): an array of #GInputVector structs
28984 * @num_vectors: the number of elements in @vectors, or -1
28985 * @messages: (array length=num_messages) (allow-none): a pointer which may be filled with an array of #GSocketControlMessages, or %NULL
28986 * @num_messages: a pointer which will be filled with the number of elements in @messages, or %NULL
28987 * @flags: a pointer to an int containing #GSocketMsgFlags flags
28988 * @cancellable: (allow-none): a %GCancellable or %NULL
28989 * @error: a #GError pointer, or %NULL
28991 * Receive data from a socket. This is the most complicated and
28992 * fully-featured version of this call. For easier use, see
28993 * g_socket_receive() and g_socket_receive_from().
28994 * If @address is non-%NULL then @address will be set equal to the
28995 * source address of the received packet.
28996 * describe the buffers that received data will be scattered into.
28997 * If @num_vectors is -1, then @vectors is assumed to be terminated
28998 * by a #GInputVector with a %NULL buffer pointer.
28999 * As a special case, if @num_vectors is 0 (in which case, @vectors
29000 * may of course be %NULL), then a single byte is received and
29001 * discarded. This is to facilitate the common practice of sending a
29002 * single '\0' byte for the purposes of transferring ancillary data.
29003 * array of #GSocketControlMessage instances or %NULL if no such
29004 * messages was received. These correspond to the control messages
29005 * received from the kernel, one #GSocketControlMessage per message
29006 * from the kernel. This array is %NULL-terminated and must be freed
29007 * by the caller using g_free() after calling g_object_unref() on each
29008 * element. If @messages is %NULL, any control messages received will
29010 * messages received.
29011 * If both @messages and @num_messages are non-%NULL, then
29012 * for this are available in the #GSocketMsgFlags enum, but the
29013 * values there are the same as the system values, and the flags
29014 * are passed in as-is, so you can pass in system-specific flags too
29015 * (and g_socket_receive_message() may pass system-specific flags out).
29016 * As with g_socket_receive(), data may be discarded if @socket is
29017 * %G_SOCKET_TYPE_DATAGRAM or %G_SOCKET_TYPE_SEQPACKET and you do not
29018 * provide enough buffer space to read a complete message. You can pass
29019 * %G_SOCKET_MSG_PEEK in @flags to peek at the current message without
29020 * removing it from the receive queue, but there is no portable way to find
29021 * out the length of the message other than by reading it into a
29022 * sufficiently-large buffer.
29023 * If the socket is in blocking mode the call will block until there
29024 * is some data to receive or there is an error. If there is no data
29025 * available and the socket is in non-blocking mode, a
29026 * %G_IO_ERROR_WOULD_BLOCK error will be returned. To be notified when
29027 * data is available, wait for the %G_IO_IN condition.
29028 * On error -1 is returned and @error is set accordingly.
29030 * In @messages (ie: not including the %NULL terminator).
29031 * Returns: Number of bytes read, or -1 on error
29037 * g_socket_receive_with_blocking:
29038 * @socket: a #GSocket
29039 * @buffer: a buffer to read data into (which should be at least @size bytes long).
29040 * @size: the number of bytes you want to read from the socket
29041 * @blocking: whether to do blocking or non-blocking I/O
29042 * @cancellable: (allow-none): a %GCancellable or %NULL
29043 * @error: #GError for error reporting, or %NULL to ignore.
29045 * This behaves exactly the same as g_socket_receive(), except that
29046 * the choice of blocking or non-blocking behavior is determined by
29047 * the @blocking argument rather than by @socket's properties.
29049 * Returns: Number of bytes read, or -1 on error
29056 * @socket: a #GSocket
29057 * @buffer: (array length=size): the buffer containing the data to send.
29058 * @size: the number of bytes to send
29059 * @cancellable: (allow-none): a %GCancellable or %NULL
29060 * @error: #GError for error reporting, or %NULL to ignore.
29062 * Tries to send @size bytes from @buffer on the socket. This is
29063 * mainly used by connection-oriented sockets; it is identical to
29064 * g_socket_send_to() with @address set to %NULL.
29065 * If the socket is in blocking mode the call will block until there is
29066 * space for the data in the socket queue. If there is no space available
29067 * and the socket is in non-blocking mode a %G_IO_ERROR_WOULD_BLOCK error
29068 * will be returned. To be notified when space is available, wait for the
29069 * %G_IO_OUT condition. Note though that you may still receive
29070 * %G_IO_ERROR_WOULD_BLOCK from g_socket_send() even if you were previously
29071 * notified of a %G_IO_OUT condition. (On Windows in particular, this is
29072 * very common due to the way the underlying APIs work.)
29073 * On error -1 is returned and @error is set accordingly.
29076 * Returns: Number of bytes written (which may be less than @size), or -1
29082 * g_socket_send_message:
29083 * @socket: a #GSocket
29084 * @address: a #GSocketAddress, or %NULL
29085 * @vectors: (array length=num_vectors): an array of #GOutputVector structs
29086 * @num_vectors: the number of elements in @vectors, or -1
29087 * @messages: (array length=num_messages) (allow-none): a pointer to an array of #GSocketControlMessages, or %NULL.
29088 * @num_messages: number of elements in @messages, or -1.
29089 * @flags: an int containing #GSocketMsgFlags flags
29090 * @cancellable: (allow-none): a %GCancellable or %NULL
29091 * @error: #GError for error reporting, or %NULL to ignore.
29093 * Send data to @address on @socket. This is the most complicated and
29094 * fully-featured version of this call. For easier use, see
29095 * g_socket_send() and g_socket_send_to().
29096 * If @address is %NULL then the message is sent to the default receiver
29097 * (set by g_socket_connect()).
29098 * then @vectors is assumed to be terminated by a #GOutputVector with a
29099 * %NULL buffer pointer.) The #GOutputVector structs describe the buffers
29100 * that the sent data will be gathered from. Using multiple
29101 * #GOutputVector<!-- -->s is more memory-efficient than manually copying
29102 * data from multiple sources into a single buffer, and more
29103 * network-efficient than making multiple calls to g_socket_send().
29104 * #GSocketControlMessage instances. These correspond to the control
29105 * messages to be sent on the socket.
29106 * If @num_messages is -1 then @messages is treated as a %NULL-terminated
29108 * for this are available in the #GSocketMsgFlags enum, but the
29109 * values there are the same as the system values, and the flags
29110 * are passed in as-is, so you can pass in system-specific flags too.
29111 * If the socket is in blocking mode the call will block until there is
29112 * space for the data in the socket queue. If there is no space available
29113 * and the socket is in non-blocking mode a %G_IO_ERROR_WOULD_BLOCK error
29114 * will be returned. To be notified when space is available, wait for the
29115 * %G_IO_OUT condition. Note though that you may still receive
29116 * %G_IO_ERROR_WOULD_BLOCK from g_socket_send() even if you were previously
29117 * notified of a %G_IO_OUT condition. (On Windows in particular, this is
29118 * very common due to the way the underlying APIs work.)
29119 * On error -1 is returned and @error is set accordingly.
29122 * Returns: Number of bytes written (which may be less than @size), or -1
29128 * g_socket_send_to:
29129 * @socket: a #GSocket
29130 * @address: a #GSocketAddress, or %NULL
29131 * @buffer: (array length=size): the buffer containing the data to send.
29132 * @size: the number of bytes to send
29133 * @cancellable: (allow-none): a %GCancellable or %NULL
29134 * @error: #GError for error reporting, or %NULL to ignore.
29136 * Tries to send @size bytes from @buffer to @address. If @address is
29137 * %NULL then the message is sent to the default receiver (set by
29138 * g_socket_connect()).
29139 * See g_socket_send() for additional information.
29142 * Returns: Number of bytes written (which may be less than @size), or -1
29148 * g_socket_send_with_blocking:
29149 * @socket: a #GSocket
29150 * @buffer: (array length=size): the buffer containing the data to send.
29151 * @size: the number of bytes to send
29152 * @blocking: whether to do blocking or non-blocking I/O
29153 * @cancellable: (allow-none): a %GCancellable or %NULL
29154 * @error: #GError for error reporting, or %NULL to ignore.
29156 * This behaves exactly the same as g_socket_send(), except that
29157 * the choice of blocking or non-blocking behavior is determined by
29158 * the @blocking argument rather than by @socket's properties.
29161 * Returns: Number of bytes written (which may be less than @size), or -1
29167 * g_socket_service_is_active:
29168 * @service: a #GSocketService
29170 * Check whether the service is active or not. An active
29171 * service will accept new clients that connect, while
29172 * a non-active service will let connecting clients queue
29173 * up until the service is started.
29175 * Returns: %TRUE if the service is active, %FALSE otherwise
29181 * g_socket_service_new:
29183 * Creates a new #GSocketService with no sockets to listen for.
29184 * New listeners can be added with e.g. g_socket_listener_add_address()
29185 * or g_socket_listener_add_inet_port().
29187 * Returns: a new #GSocketService.
29193 * g_socket_service_start:
29194 * @service: a #GSocketService
29196 * Starts the service, i.e. start accepting connections
29197 * from the added sockets when the mainloop runs.
29198 * This call is threadsafe, so it may be called from a thread
29199 * handling an incomming client request.
29206 * g_socket_service_stop:
29207 * @service: a #GSocketService
29209 * Stops the service, i.e. stops accepting connections
29210 * from the added sockets when the mainloop runs.
29211 * This call is threadsafe, so it may be called from a thread
29212 * handling an incomming client request.
29219 * g_socket_set_blocking:
29220 * @socket: a #GSocket.
29221 * @blocking: Whether to use blocking I/O or not.
29223 * Sets the blocking mode of the socket. In blocking mode
29224 * all operations block until they succeed or there is an error. In
29225 * non-blocking mode all functions return results immediately or
29226 * with a %G_IO_ERROR_WOULD_BLOCK error.
29227 * All sockets are created in blocking mode. However, note that the
29228 * platform level socket is always non-blocking, and blocking mode
29229 * is a GSocket level feature.
29236 * g_socket_set_keepalive:
29237 * @socket: a #GSocket.
29238 * @keepalive: Value for the keepalive flag
29240 * Sets or unsets the %SO_KEEPALIVE flag on the underlying socket. When
29241 * this flag is set on a socket, the system will attempt to verify that the
29242 * remote socket endpoint is still present if a sufficiently long period of
29243 * time passes with no data being exchanged. If the system is unable to
29244 * verify the presence of the remote endpoint, it will automatically close
29246 * This option is only functional on certain kinds of sockets. (Notably,
29247 * %G_SOCKET_PROTOCOL_TCP sockets.)
29248 * The exact time between pings is system- and protocol-dependent, but will
29249 * normally be at least two hours. Most commonly, you would set this flag
29250 * on a server socket if you want to allow clients to remain idle for long
29251 * periods of time, but also want to ensure that connections are eventually
29252 * garbage-collected if clients crash or become unreachable.
29259 * g_socket_set_listen_backlog:
29260 * @socket: a #GSocket.
29261 * @backlog: the maximum number of pending connections.
29263 * Sets the maximum number of outstanding connections allowed
29264 * when listening on this socket. If more clients than this are
29265 * connecting to the socket and the application is not handling them
29266 * on time then the new connections will be refused.
29267 * Note that this must be called before g_socket_listen() and has no
29268 * effect if called after that.
29275 * g_socket_set_timeout:
29276 * @socket: a #GSocket.
29277 * @timeout: the timeout for @socket, in seconds, or 0 for none
29279 * Sets the time in seconds after which I/O operations on @socket will
29280 * time out if they have not yet completed.
29281 * On a blocking socket, this means that any blocking #GSocket
29282 * operation will time out after @timeout seconds of inactivity,
29283 * returning %G_IO_ERROR_TIMED_OUT.
29284 * On a non-blocking socket, calls to g_socket_condition_wait() will
29285 * also fail with %G_IO_ERROR_TIMED_OUT after the given time. Sources
29286 * created with g_socket_create_source() will trigger after
29287 * set, at which point calling g_socket_receive(), g_socket_send(),
29288 * g_socket_check_connect_result(), etc, will fail with
29289 * %G_IO_ERROR_TIMED_OUT.
29290 * If @timeout is 0 (the default), operations will never time out
29292 * Note that if an I/O operation is interrupted by a signal, this may
29293 * cause the timeout to be reset.
29300 * g_socket_shutdown:
29301 * @socket: a #GSocket
29302 * @shutdown_read: whether to shut down the read side
29303 * @shutdown_write: whether to shut down the write side
29304 * @error: #GError for error reporting, or %NULL to ignore.
29306 * Shut down part of a full-duplex connection.
29307 * If @shutdown_read is %TRUE then the recieving side of the connection
29308 * is shut down, and further reading is disallowed.
29309 * If @shutdown_write is %TRUE then the sending side of the connection
29310 * is shut down, and further writing is disallowed.
29311 * It is allowed for both @shutdown_read and @shutdown_write to be %TRUE.
29312 * One example where this is used is graceful disconnect for TCP connections
29313 * where you close the sending side, then wait for the other side to close
29314 * the connection, thus ensuring that the other side saw all sent data.
29316 * Returns: %TRUE on success, %FALSE on error
29322 * g_socket_speaks_ipv4:
29323 * @socket: a #GSocket
29325 * Checks if a socket is capable of speaking IPv4.
29326 * IPv4 sockets are capable of speaking IPv4. On some operating systems
29327 * and under some combinations of circumstances IPv6 sockets are also
29328 * capable of speaking IPv4. See RFC 3493 section 3.7 for more
29330 * No other types of sockets are currently considered as being capable
29331 * of speaking IPv4.
29333 * Returns: %TRUE if this socket can be used with IPv4.
29339 * g_srv_target_copy:
29340 * @target: a #GSrvTarget
29344 * Returns: a copy of @target
29350 * g_srv_target_free:
29351 * @target: a #GSrvTarget
29360 * g_srv_target_get_hostname:
29361 * @target: a #GSrvTarget
29363 * Gets @target's hostname (in ASCII form; if you are going to present
29364 * this to the user, you should use g_hostname_is_ascii_encoded() to
29365 * check if it contains encoded Unicode segments, and use
29366 * g_hostname_to_unicode() to convert it if it does.)
29368 * Returns: @target's hostname
29374 * g_srv_target_get_port:
29375 * @target: a #GSrvTarget
29377 * Gets @target's port
29379 * Returns: @target's port
29385 * g_srv_target_get_priority:
29386 * @target: a #GSrvTarget
29388 * Gets @target's priority. You should not need to look at this;
29389 * #GResolver already sorts the targets according to the algorithm in
29392 * Returns: @target's priority
29398 * g_srv_target_get_weight:
29399 * @target: a #GSrvTarget
29401 * Gets @target's weight. You should not need to look at this;
29402 * #GResolver already sorts the targets according to the algorithm in
29405 * Returns: @target's weight
29411 * g_srv_target_list_sort: (skip)
29412 * @targets: a #GList of #GSrvTarget
29414 * Sorts @targets in place according to the algorithm in RFC 2782.
29416 * Returns: (transfer full): the head of the sorted list.
29422 * g_srv_target_new:
29423 * @hostname: the host that the service is running on
29424 * @port: the port that the service is running on
29425 * @priority: the target's priority
29426 * @weight: the target's weight
29428 * Creates a new #GSrvTarget with the given parameters.
29429 * You should not need to use this; normally #GSrvTarget<!-- -->s are
29430 * created by #GResolver.
29432 * Returns: a new #GSrvTarget.
29438 * g_tcp_connection_get_graceful_disconnect:
29439 * @connection: a #GTcpConnection
29441 * Checks if graceful disconnects are used. See
29442 * g_tcp_connection_set_graceful_disconnect().
29444 * Returns: %TRUE if graceful disconnect is used on close, %FALSE otherwise
29450 * g_tcp_connection_set_graceful_disconnect:
29451 * @connection: a #GTcpConnection
29452 * @graceful_disconnect: Whether to do graceful disconnects or not
29454 * This enabled graceful disconnects on close. A graceful disconnect
29455 * means that we signal the recieving end that the connection is terminated
29456 * and wait for it to close the connection before closing the connection.
29457 * A graceful disconnect means that we can be sure that we successfully sent
29458 * all the outstanding data to the other end, or get an error reported.
29459 * However, it also means we have to wait for all the data to reach the
29460 * other side and for it to acknowledge this by closing the socket, which may
29461 * take a while. For this reason it is disabled by default.
29468 * g_tcp_wrapper_connection_get_base_io_stream:
29469 * @conn: a #GTcpWrapperConnection
29471 * Get's @conn's base #GIOStream
29473 * Returns: (transfer none): @conn's base #GIOStream
29478 * g_tcp_wrapper_connection_new:
29479 * @base_io_stream: the #GIOStream to wrap
29480 * @socket: the #GSocket associated with @base_io_stream
29482 * Wraps @base_io_stream and @socket together as a #GSocketConnection.
29484 * Returns: the new #GSocketConnection.
29490 * g_themed_icon_append_name:
29491 * @icon: a #GThemedIcon
29492 * @iconname: name of icon to append to list of icons from within @icon.
29494 * Append a name to the list of icons from within @icon.
29496 * Note that doing so invalidates the hash computed by prior calls
29497 * to g_icon_hash().
29503 * g_themed_icon_get_names:
29504 * @icon: a #GThemedIcon.
29506 * Gets the names of icons from within @icon.
29508 * Returns: (transfer none): a list of icon names.
29513 * g_themed_icon_new:
29514 * @iconname: a string containing an icon name.
29516 * Creates a new themed icon for @iconname.
29518 * Returns: (transfer full): a new #GThemedIcon.
29523 * g_themed_icon_new_from_names:
29524 * @iconnames: (array length=len): an array of strings containing icon names.
29525 * @len: the length of the @iconnames array, or -1 if @iconnames is %NULL-terminated
29527 * Creates a new themed icon for @iconnames.
29529 * Returns: (transfer full): a new #GThemedIcon
29534 * g_themed_icon_new_with_default_fallbacks:
29535 * @iconname: a string containing an icon name
29537 * Creates a new themed icon for @iconname, and all the names
29538 * that can be created by shortening @iconname at '-' characters.
29539 * In the following example, @icon1 and @icon2 are equivalent:
29541 * const char *names[] = {
29542 * "gnome-dev-cdrom-audio",
29543 * "gnome-dev-cdrom",
29547 * icon1 = g_themed_icon_new_from_names (names, 4);
29548 * icon2 = g_themed_icon_new_with_default_fallbacks ("gnome-dev-cdrom-audio");
29551 * Returns: (transfer full): a new #GThemedIcon.
29556 * g_themed_icon_prepend_name:
29557 * @icon: a #GThemedIcon
29558 * @iconname: name of icon to prepend to list of icons from within @icon.
29560 * Prepend a name to the list of icons from within @icon.
29562 * Note that doing so invalidates the hash computed by prior calls
29563 * to g_icon_hash().
29571 * g_threaded_socket_service_new:
29572 * @max_threads: the maximal number of threads to execute concurrently handling incoming clients, -1 means no limit
29574 * Creates a new #GThreadedSocketService with no listeners. Listeners
29575 * must be added with g_socket_service_add_listeners().
29577 * Returns: a new #GSocketService.
29583 * g_tls_backend_get_certificate_type:
29584 * @backend: the #GTlsBackend
29586 * Gets the #GType of @backend's #GTlsCertificate implementation.
29589 * Returns: the #GType of @backend's #GTlsCertificate
29595 * g_tls_backend_get_client_connection_type:
29596 * @backend: the #GTlsBackend
29598 * Gets the #GType of @backend's #GTlsClientConnection implementation.
29601 * Returns: the #GType of @backend's #GTlsClientConnection
29607 * g_tls_backend_get_default:
29609 * Gets the default #GTlsBackend for the system.
29611 * Returns: a #GTlsBackend
29617 * g_tls_backend_get_server_connection_type:
29618 * @backend: the #GTlsBackend
29620 * Gets the #GType of @backend's #GTlsServerConnection implementation.
29623 * Returns: the #GType of @backend's #GTlsServerConnection
29629 * g_tls_backend_supports_tls:
29630 * @backend: the #GTlsBackend
29632 * Checks if TLS is supported; if this returns %FALSE for the default
29633 * #GTlsBackend, it means no "real" TLS backend is available.
29635 * Returns: whether or not TLS is supported
29641 * g_tls_certificate_get_issuer:
29642 * @cert: a #GTlsCertificate
29644 * Gets the #GTlsCertificate representing @cert's issuer, if known
29645 * or %NULL if @cert is self-signed or signed with an unknown
29648 * Returns: (transfer none): The certificate of @cert's issuer,
29654 * g_tls_certificate_list_new_from_file:
29655 * @file: file containing PEM-encoded certificates to import
29656 * @error: #GError for error reporting, or %NULL to ignore.
29658 * Creates one or more #GTlsCertificate<!-- -->s from the PEM-encoded
29659 * data in @file. If @file cannot be read or parsed, the function will
29660 * return %NULL and set @error. If @file does not contain any
29661 * PEM-encoded certificates, this will return an empty list and not
29663 * #GList containing #GTlsCertificate objects. You must free the list
29664 * and its contents when you are done with it.
29666 * Returns: (element-type Gio.TlsCertificate) (transfer full): a
29672 * g_tls_certificate_new_from_file:
29673 * @file: file containing a PEM-encoded certificate to import
29674 * @error: #GError for error reporting, or %NULL to ignore.
29676 * Creates a #GTlsCertificate from the PEM-encoded data in @file. If
29677 * set @error. Otherwise, this behaves like g_tls_certificate_new().
29679 * Returns: the new certificate, or %NULL on error
29685 * g_tls_certificate_new_from_files:
29686 * @cert_file: file containing a PEM-encoded certificate to import
29687 * @key_file: file containing a PEM-encoded private key to import
29688 * @error: #GError for error reporting, or %NULL to ignore.
29690 * Creates a #GTlsCertificate from the PEM-encoded data in @cert_file
29691 * and @key_file. If either file cannot be read or parsed, the
29692 * function will return %NULL and set @error. Otherwise, this behaves
29693 * like g_tls_certificate_new().
29695 * Returns: the new certificate, or %NULL on error
29701 * g_tls_certificate_new_from_pem:
29702 * @data: PEM-encoded certificate data
29703 * @length: the length of @data, or -1 if it's 0-terminated.
29704 * @error: #GError for error reporting, or %NULL to ignore.
29706 * Creates a new #GTlsCertificate from the PEM-encoded data in @data.
29707 * If @data includes both a certificate and a private key, then the
29708 * returned certificate will include the private key data as well.
29709 * If @data includes multiple certificates, only the first one will be
29712 * Returns: the new certificate, or %NULL if @data is invalid
29718 * g_tls_certificate_verify:
29719 * @cert: a #GTlsCertificate
29720 * @identity: (allow-none): the expected peer identity
29721 * @trusted_ca: (allow-none): the certificate of a trusted authority
29723 * This verifies @cert and returns a set of #GTlsCertificateFlags
29724 * indicating any problems found with it. This can be used to verify a
29725 * certificate outside the context of making a connection, or to
29726 * check a certificate against a CA that is not part of the system
29728 * If @identity is not %NULL, @cert's name(s) will be compared against
29729 * it, and %G_TLS_CERTIFICATE_BAD_IDENTITY will be set in the return
29730 * value if it does not match. If @identity is %NULL, that bit will
29731 * never be set in the return value.
29732 * If @trusted_ca is not %NULL, then @cert (or one of the certificates
29733 * in its chain) must be signed by it, or else
29734 * %G_TLS_CERTIFICATE_UNKNOWN_CA will be set in the return value. If
29736 * (All other #GTlsCertificateFlags values will always be set or unset
29739 * Returns: the appropriate #GTlsCertificateFlags
29745 * g_tls_client_connection_get_accepted_cas:
29746 * @conn: the #GTlsClientConnection
29748 * Gets the list of distinguished names of the Certificate Authorities
29749 * that the server will accept certificates from. This will be set
29750 * during the TLS handshake if the server requests a certificate.
29751 * Otherwise, it will be %NULL.
29752 * Each item in the list is a #GByteArray which contains the complete
29753 * subject DN of the certificate authority.
29754 * CA DNs. You should unref each element with g_byte_array_unref() and then
29755 * the free the list with g_list_free().
29757 * Returns: (element-type GByteArray) (transfer full): the list of
29763 * g_tls_client_connection_get_server_identity:
29764 * @conn: the #GTlsClientConnection
29766 * Gets @conn's expected server identity
29767 * expected server identity, or %NULL if the expected identity is not
29770 * Returns: a #GSocketConnectable describing the
29776 * g_tls_client_connection_get_use_ssl3:
29777 * @conn: the #GTlsClientConnection
29779 * Gets whether @conn will use SSL 3.0 rather than the
29780 * highest-supported version of TLS; see
29781 * g_tls_client_connection_set_use_ssl3().
29783 * Returns: whether @conn will use SSL 3.0
29789 * g_tls_client_connection_get_validation_flags:
29790 * @conn: the #GTlsClientConnection
29792 * Gets @conn's validation flags
29794 * Returns: the validation flags
29800 * g_tls_client_connection_new:
29801 * @base_io_stream: the #GIOStream to wrap
29802 * @server_identity: (allow-none): the expected identity of the server
29803 * @error: #GError for error reporting, or %NULL to ignore.
29805 * Creates a new #GTlsClientConnection wrapping @base_io_stream (which
29806 * must have pollable input and output streams) which is assumed to
29807 * communicate with the server identified by @server_identity.
29809 * Returns: the new #GTlsClientConnection, or %NULL on error
29815 * g_tls_client_connection_set_server_identity:
29816 * @conn: the #GTlsClientConnection
29817 * @identity: a #GSocketConnectable describing the expected server identity
29819 * Sets @conn's expected server identity, which is used both to tell
29820 * servers on virtual hosts which certificate to present, and also
29821 * to let @conn know what name to look for in the certificate when
29822 * performing %G_TLS_CERTIFICATE_BAD_IDENTITY validation, if enabled.
29829 * g_tls_client_connection_set_use_ssl3:
29830 * @conn: the #GTlsClientConnection
29831 * @use_ssl3: whether to use SSL 3.0
29833 * If @use_ssl3 is %TRUE, this forces @conn to use SSL 3.0 rather than
29834 * trying to properly negotiate the right version of TLS or SSL to use.
29835 * This can be used when talking to servers that do not implement the
29836 * fallbacks correctly and which will therefore fail to handshake with
29837 * a "modern" TLS handshake attempt.
29844 * g_tls_client_connection_set_validation_flags:
29845 * @conn: the #GTlsClientConnection
29846 * @flags: the #GTlsCertificateFlags to use
29848 * Sets @conn's validation flags, to override the default set of
29849 * checks performed when validating a server certificate. By default,
29850 * %G_TLS_CERTIFICATE_VALIDATE_ALL is used.
29857 * g_tls_connection_emit_accept_certificate:
29858 * @conn: a #GTlsConnection
29859 * @peer_cert: the peer's #GTlsCertificate
29860 * @errors: the problems with @peer_cert
29862 * Used by #GTlsConnection implementations to emit the
29863 * #GTlsConnection::accept-certificate signal.
29864 * %TRUE to accept @peer_cert
29866 * Returns: %TRUE if one of the signal handlers has returned
29872 * g_tls_connection_get_certificate:
29873 * @conn: a #GTlsConnection
29875 * Gets @conn's certificate, as set by
29876 * g_tls_connection_set_certificate().
29878 * Returns: (transfer none): @conn's certificate, or %NULL
29884 * g_tls_connection_get_peer_certificate:
29885 * @conn: a #GTlsConnection
29887 * Gets @conn's peer's certificate after the handshake has completed.
29888 * (It is not set during the emission of
29889 * #GTlsConnection::accept-certificate.)
29891 * Returns: (transfer none): @conn's peer's certificate, or %NULL
29897 * g_tls_connection_get_peer_certificate_errors:
29898 * @conn: a #GTlsConnection
29900 * Gets the errors associated with validating @conn's peer's
29901 * certificate, after the handshake has completed. (It is not set
29902 * during the emission of #GTlsConnection::accept-certificate.)
29904 * Returns: @conn's peer's certificate errors
29910 * g_tls_connection_get_rehandshake_mode:
29911 * @conn: a #GTlsConnection
29913 * Gets @conn rehandshaking mode. See
29914 * g_tls_connection_set_rehandshake() for details.
29916 * Returns: @conn's rehandshaking mode
29922 * g_tls_connection_get_require_close_notify:
29923 * @conn: a #GTlsConnection
29925 * Tests whether or not @conn expects a proper TLS close notification
29926 * when the connection is closed. See
29927 * g_tls_connection_set_require_close_notify() for details.
29930 * Returns: %TRUE if @conn requires a proper TLS close
29936 * g_tls_connection_get_use_system_certdb:
29937 * @conn: a #GTlsConnection
29939 * Gets whether @conn uses the system certificate database to verify
29940 * peer certificates. See g_tls_connection_set_use_system_certdb().
29942 * Returns: whether @conn uses the system certificate database
29948 * g_tls_connection_handshake:
29949 * @conn: a #GTlsConnection
29950 * @cancellable: a #GCancellable, or %NULL
29951 * @error: a #GError, or %NULL
29953 * Attempts a TLS handshake on @conn.
29954 * On the client side, it is never necessary to call this method;
29955 * although the connection needs to perform a handshake after
29956 * connecting (or after sending a "STARTTLS"-type command) and may
29957 * need to rehandshake later if the server requests it,
29958 * #GTlsConnection will handle this for you automatically when you try
29959 * to send or receive data on the connection. However, you can call
29960 * g_tls_connection_handshake() manually if you want to know for sure
29961 * whether the initial handshake succeeded or failed (as opposed to
29962 * just immediately trying to write to @conn's output stream, in which
29963 * case if it fails, it may not be possible to tell if it failed
29964 * before or after completing the handshake).
29965 * Likewise, on the server side, although a handshake is necessary at
29966 * the beginning of the communication, you do not need to call this
29967 * function explicitly unless you want clearer error reporting.
29968 * However, you may call g_tls_connection_handshake() later on to
29969 * renegotiate parameters (encryption methods, etc) with the client.
29970 * #GTlsConnection::accept_certificate may be emitted during the
29973 * Returns: success or failure
29979 * g_tls_connection_handshake_async:
29980 * @conn: a #GTlsConnection
29981 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
29982 * @cancellable: a #GCancellable, or %NULL
29983 * @callback: callback to call when the handshake is complete
29984 * @user_data: the data to pass to the callback function
29986 * Asynchronously performs a TLS handshake on @conn. See
29987 * g_tls_connection_handshake() for more information.
29994 * g_tls_connection_handshake_finish:
29995 * @conn: a #GTlsConnection
29996 * @result: a #GAsyncResult.
29997 * @error: a #GError pointer, or %NULL
29999 * Finish an asynchronous TLS handshake operation. See
30000 * g_tls_connection_handshake() for more information.
30001 * case @error will be set.
30003 * Returns: %TRUE on success, %FALSE on failure, in which
30009 * g_tls_connection_set_certificate:
30010 * @conn: a #GTlsConnection
30011 * @certificate: the certificate to use for @conn
30013 * This sets the certificate that @conn will present to its peer
30014 * during the TLS handshake. For a #GTlsServerConnection, it is
30015 * mandatory to set this, and that will normally be done at construct
30017 * For a #GTlsClientConnection, this is optional. If a handshake fails
30018 * with %G_TLS_ERROR_CERTIFICATE_REQUIRED, that means that the server
30019 * requires a certificate, and if you try connecting again, you should
30020 * call this method first. You can call
30021 * g_tls_client_connection_get_accepted_cas() on the failed connection
30022 * to get a list of Certificate Authorities that the server will
30023 * accept certificates from.
30024 * (It is also possible that a server will allow the connection with
30025 * or without a certificate; in that case, if you don't provide a
30026 * certificate, you can tell that the server requested one by the fact
30027 * that g_tls_client_connection_get_accepted_cas() will return
30035 * g_tls_connection_set_rehandshake_mode:
30036 * @conn: a #GTlsConnection
30037 * @mode: the rehandshaking mode
30039 * Sets how @conn behaves with respect to rehandshaking requests.
30040 * %G_TLS_REHANDSHAKE_NEVER means that it will never agree to
30041 * rehandshake after the initial handshake is complete. (For a client,
30042 * this means it will refuse rehandshake requests from the server, and
30043 * for a server, this means it will close the connection with an error
30044 * if the client attempts to rehandshake.)
30045 * %G_TLS_REHANDSHAKE_SAFELY means that the connection will allow a
30046 * rehandshake only if the other end of the connection supports the
30047 * TLS <literal>renegotiation_info</literal> extension. This is the
30048 * default behavior, but means that rehandshaking will not work
30049 * against older implementations that do not support that extension.
30050 * %G_TLS_REHANDSHAKE_UNSAFELY means that the connection will allow
30051 * rehandshaking even without the
30052 * <literal>renegotiation_info</literal> extension. On the server side
30053 * in particular, this is not recommended, since it leaves the server
30054 * open to certain attacks. However, this mode is necessary if you
30055 * need to allow renegotiation with older client software.
30062 * g_tls_connection_set_require_close_notify:
30063 * @conn: a #GTlsConnection
30064 * @require_close_notify: whether or not to require close notification
30066 * Sets whether or not @conn expects a proper TLS close notification
30067 * before the connection is closed. If this is %TRUE (the default),
30068 * then @conn will expect to receive a TLS close notification from its
30069 * peer before the connection is closed, and will return a
30070 * %G_TLS_ERROR_EOF error if the connection is closed without proper
30071 * notification (since this may indicate a network error, or
30072 * man-in-the-middle attack).
30073 * In some protocols, the application will know whether or not the
30074 * connection was closed cleanly based on application-level data
30075 * (because the application-level data includes a length field, or is
30076 * somehow self-delimiting); in this case, the close notify is
30077 * redundant and sometimes omitted. (TLS 1.1 explicitly allows this;
30078 * in TLS 1.0 it is technically an error, but often done anyway.) You
30079 * can use g_tls_connection_set_require_close_notify() to tell @conn
30080 * to allow an "unannounced" connection close, in which case the close
30081 * will show up as a 0-length read, as in a non-TLS
30082 * #GSocketConnection, and it is up to the application to check that
30083 * the data has been fully received.
30084 * Note that this only affects the behavior when the peer closes the
30085 * connection; when the application calls g_io_stream_close() itself
30086 * on @conn, this will send a close notification regardless of the
30087 * setting of this property. If you explicitly want to do an unclean
30088 * close, you can close @conn's #GTlsConnection:base-io-stream rather
30089 * than closing @conn itself.
30096 * g_tls_connection_set_use_system_certdb:
30097 * @conn: a #GTlsConnection
30098 * @use_system_certdb: whether to use the system certificate database
30100 * Sets whether @conn uses the system certificate database to verify
30101 * peer certificates. This is %TRUE by default. If set to %FALSE, then
30102 * peer certificate validation will always set the
30103 * %G_TLS_CERTIFICATE_UNKNOWN_CA error (meaning
30104 * #GTlsConnection::accept-certificate will always be emitted on
30105 * client-side connections, unless that bit is not set in
30106 * #GTlsClientConnection:validation-flags).
30113 * g_tls_error_quark:
30115 * Gets the TLS error quark.
30117 * Returns: a #GQuark.
30123 * g_tls_server_connection_new:
30124 * @base_io_stream: the #GIOStream to wrap
30125 * @certificate: (allow-none): the default server certificate, or %NULL
30126 * @error: #GError for error reporting, or %NULL to ignore.
30128 * Creates a new #GTlsServerConnection wrapping @base_io_stream (which
30129 * must have pollable input and output streams).
30131 * Returns: the new #GTlsServerConnection, or %NULL on error
30138 * @struct_type: the type of the elements to allocate
30139 * @n_structs: the number of elements to allocate
30141 * Attempts to allocate @n_structs elements of type @struct_type, and returns
30142 * %NULL on failure. Contrast with g_new(), which aborts the program on failure.
30143 * The returned pointer is cast to a pointer to the given type.
30144 * The function returns %NULL when @n_structs is 0 of if an overflow occurs.
30147 * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type
30153 * @struct_type: the type of the elements to allocate
30154 * @n_structs: the number of elements to allocate
30156 * Attempts to allocate @n_structs elements of type @struct_type, initialized
30157 * to 0's, and returns %NULL on failure. Contrast with g_new0(), which aborts
30158 * the program on failure.
30159 * The returned pointer is cast to a pointer to the given type.
30160 * The function returns %NULL when @n_structs is 0 of if an overflow occurs.
30163 * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type
30169 * @struct_type: the type of the elements to allocate
30170 * @mem: the currently allocated memory
30171 * @n_structs: the number of elements to allocate
30173 * Attempts to reallocate the memory pointed to by @mem, so that it now has
30174 * space for @n_structs elements of type @struct_type, and returns %NULL on
30175 * failure. Contrast with g_renew(), which aborts the program on failure.
30176 * It returns the new address of the memory, which may have been moved.
30177 * The function returns %NULL if an overflow occurs.
30180 * Returns: a pointer to the new allocated memory, cast to a pointer to @struct_type
30185 * g_unix_connection_receive_credentials:
30186 * @connection: A #GUnixConnection.
30187 * @cancellable: (allow-none): A #GCancellable or %NULL.
30188 * @error: Return location for error or %NULL.
30190 * Receives credentials from the sending end of the connection. The
30191 * sending end has to call g_unix_connection_send_credentials() (or
30192 * similar) for this to work.
30193 * As well as reading the credentials this also reads (and discards) a
30194 * single byte from the stream, as this is required for credentials
30195 * passing to work on some implementations.
30196 * Other ways to exchange credentials with a foreign peer includes the
30197 * #GUnixCredentialsMessage type and g_socket_get_credentials() function.
30198 * g_object_unref()), %NULL if @error is set.
30200 * Returns: (transfer full): Received credentials on success (free with
30206 * g_unix_connection_receive_fd:
30207 * @connection: a #GUnixConnection
30208 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
30209 * @error: (allow-none): #GError for error reporting, or %NULL to ignore
30211 * Receives a file descriptor from the sending end of the connection.
30212 * The sending end has to call g_unix_connection_send_fd() for this
30214 * As well as reading the fd this also reads a single byte from the
30215 * stream, as this is required for fd passing to work on some
30218 * Returns: a file descriptor on success, -1 on error.
30224 * g_unix_connection_send_credentials:
30225 * @connection: A #GUnixConnection.
30226 * @cancellable: (allow-none): A #GCancellable or %NULL.
30227 * @error: Return location for error or %NULL.
30229 * Passes the credentials of the current user the receiving side
30230 * of the connection. The recieving end has to call
30231 * g_unix_connection_receive_credentials() (or similar) to accept the
30233 * As well as sending the credentials this also writes a single NUL
30234 * byte to the stream, as this is required for credentials passing to
30235 * work on some implementations.
30236 * Other ways to exchange credentials with a foreign peer includes the
30237 * #GUnixCredentialsMessage type and g_socket_get_credentials() function.
30239 * Returns: %TRUE on success, %FALSE if @error is set.
30245 * g_unix_connection_send_fd:
30246 * @connection: a #GUnixConnection
30247 * @fd: a file descriptor
30248 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
30249 * @error: (allow-none): #GError for error reporting, or %NULL to ignore.
30251 * Passes a file descriptor to the recieving side of the
30252 * connection. The recieving end has to call g_unix_connection_receive_fd()
30253 * to accept the file descriptor.
30254 * As well as sending the fd this also writes a single byte to the
30255 * stream, as this is required for fd passing to work on some
30258 * Returns: a %TRUE on success, %NULL on error.
30264 * g_unix_credentials_message_get_credentials:
30265 * @message: A #GUnixCredentialsMessage.
30267 * Gets the credentials stored in @message.
30269 * Returns: (transfer none): A #GCredentials instance. Do not free, it is owned by @message.
30275 * g_unix_credentials_message_is_supported:
30277 * Checks if passing a #GCredential on a #GSocket is supported on this platform.
30279 * Returns: %TRUE if supported, %FALSE otherwise
30285 * g_unix_credentials_message_new:
30287 * Creates a new #GUnixCredentialsMessage with credentials matching the current processes.
30289 * Returns: a new #GUnixCredentialsMessage
30295 * g_unix_credentials_message_new_with_credentials:
30296 * @credentials: A #GCredentials object.
30298 * Creates a new #GUnixCredentialsMessage holding @credentials.
30300 * Returns: a new #GUnixCredentialsMessage
30306 * g_unix_fd_list_append:
30307 * @list: a #GUnixFDList
30308 * @fd: a valid open file descriptor
30309 * @error: a #GError pointer
30311 * Adds a file descriptor to @list.
30312 * The file descriptor is duplicated using dup(). You keep your copy
30313 * of the descriptor and the copy contained in @list will be closed
30314 * when @list is finalized.
30315 * A possible cause of failure is exceeding the per-process or
30316 * system-wide file descriptor limit.
30317 * The index of the file descriptor in the list is returned. If you use
30318 * this index with g_unix_fd_list_get() then you will receive back a
30319 * duplicated copy of the same file descriptor.
30320 * (and @error is set)
30322 * Returns: the index of the appended fd in case of success, else -1
30328 * g_unix_fd_list_get:
30329 * @list: a #GUnixFDList
30330 * @index_: the index into the list
30331 * @error: a #GError pointer
30333 * Gets a file descriptor out of @list.
30334 * programmer error for @index_ to be out of range; see
30335 * g_unix_fd_list_get_length().
30336 * The file descriptor is duplicated using dup() and set as
30337 * close-on-exec before being returned. You must call close() on it
30338 * when you are done.
30339 * A possible cause of failure is exceeding the per-process or
30340 * system-wide file descriptor limit.
30342 * Returns: the file descriptor, or -1 in case of error
30348 * g_unix_fd_list_get_length:
30349 * @list: a #GUnixFDList
30351 * contained within).
30353 * Gets the length of @list (ie: the number of file descriptors
30354 * Returns: the length of @list
30360 * g_unix_fd_list_new:
30362 * Creates a new #GUnixFDList containing no file descriptors.
30364 * Returns: a new #GUnixFDList
30370 * g_unix_fd_list_new_from_array:
30371 * @fds: (array length=n_fds): the initial list of file descriptors
30372 * @n_fds: the length of #fds, or -1
30374 * Creates a new #GUnixFDList containing the file descriptors given in
30375 * may no longer be used by the caller. The array itself is owned by
30377 * Each file descriptor in the array should be set to close-on-exec.
30378 * If @n_fds is -1 then @fds must be terminated with -1.
30380 * Returns: a new #GUnixFDList
30386 * g_unix_fd_list_peek_fds:
30387 * @list: a #GUnixFDList
30388 * @length: (out) (allow-none): pointer to the length of the returned array, or %NULL
30390 * Returns the array of file descriptors that is contained in this
30392 * After this call, the descriptors remain the property of @list. The
30393 * caller must not close them and must not free the array. The array is
30394 * valid only until @list is changed in any way.
30395 * If @length is non-%NULL then it is set to the number of file
30396 * descriptors in the returned array. The returned array is also
30397 * terminated with -1.
30398 * This function never returns %NULL. In case there are no file
30399 * descriptors contained in @list, an empty array is returned.
30402 * Returns: (array length=length) (transfer none): an array of file
30408 * g_unix_fd_list_steal_fds:
30409 * @list: a #GUnixFDList
30410 * @length: (out) (allow-none): pointer to the length of the returned array, or %NULL
30412 * Returns the array of file descriptors that is contained in this
30414 * After this call, the descriptors are no longer contained in
30415 * descriptors have been added).
30416 * The return result of this function must be freed with g_free().
30417 * The caller is also responsible for closing all of the file
30418 * descriptors. The file descriptors in the array are set to
30420 * If @length is non-%NULL then it is set to the number of file
30421 * descriptors in the returned array. The returned array is also
30422 * terminated with -1.
30423 * This function never returns %NULL. In case there are no file
30424 * descriptors contained in @list, an empty array is returned.
30427 * Returns: (array length=length) (transfer full): an array of file
30433 * g_unix_fd_message_append_fd:
30434 * @message: a #GUnixFDMessage
30435 * @fd: a valid open file descriptor
30436 * @error: a #GError pointer
30438 * Adds a file descriptor to @message.
30439 * The file descriptor is duplicated using dup(). You keep your copy
30440 * of the descriptor and the copy contained in @message will be closed
30441 * when @message is finalized.
30442 * A possible cause of failure is exceeding the per-process or
30443 * system-wide file descriptor limit.
30445 * Returns: %TRUE in case of success, else %FALSE (and @error is set)
30451 * g_unix_fd_message_get_fd_list:
30452 * @message: a #GUnixFDMessage
30454 * Gets the #GUnixFDList contained in @message. This function does not
30455 * return a reference to the caller, but the returned list is valid for
30456 * the lifetime of @message.
30458 * Returns: (transfer none): the #GUnixFDList from @message
30464 * g_unix_fd_message_new:
30466 * Creates a new #GUnixFDMessage containing an empty file descriptor
30469 * Returns: a new #GUnixFDMessage
30475 * g_unix_fd_message_new_with_fd_list:
30476 * @fd_list: a #GUnixFDList
30478 * Creates a new #GUnixFDMessage containing @list.
30480 * Returns: a new #GUnixFDMessage
30486 * g_unix_fd_message_steal_fds:
30487 * @message: a #GUnixFDMessage
30488 * @length: (out) (allow-none): pointer to the length of the returned array, or %NULL
30490 * Returns the array of file descriptors that is contained in this
30492 * After this call, the descriptors are no longer contained in
30493 * descriptors have been added).
30494 * The return result of this function must be freed with g_free().
30495 * The caller is also responsible for closing all of the file
30497 * If @length is non-%NULL then it is set to the number of file
30498 * descriptors in the returned array. The returned array is also
30499 * terminated with -1.
30500 * This function never returns %NULL. In case there are no file
30501 * descriptors contained in @message, an empty array is returned.
30504 * Returns: (array length=length) (transfer full): an array of file
30510 * g_unix_input_stream_get_close_fd:
30511 * @stream: a #GUnixInputStream
30513 * Returns whether the file descriptor of @stream will be
30514 * closed when the stream is closed.
30516 * Returns: %TRUE if the file descriptor is closed when done
30522 * g_unix_input_stream_get_fd:
30523 * @stream: a #GUnixInputStream
30525 * Return the UNIX file descriptor that the stream reads from.
30527 * Returns: The file descriptor of @stream
30533 * g_unix_input_stream_new:
30534 * @fd: a UNIX file descriptor
30535 * @close_fd: %TRUE to close the file descriptor when done
30537 * Creates a new #GUnixInputStream for the given @fd.
30538 * If @close_fd is %TRUE, the file descriptor will be closed
30539 * when the stream is closed.
30541 * Returns: a new #GUnixInputStream
30546 * g_unix_input_stream_set_close_fd:
30547 * @stream: a #GUnixInputStream
30548 * @close_fd: %TRUE to close the file descriptor when done
30550 * Sets whether the file descriptor of @stream shall be closed
30551 * when the stream is closed.
30558 * g_unix_is_mount_path_system_internal:
30559 * @mount_path: a mount path, e.g. <filename>/media/disk</filename> or <filename>/usr</filename>
30561 * Determines if @mount_path is considered an implementation of the
30562 * OS. This is primarily used for hiding mountable and mounted volumes
30563 * that only are used in the OS and has little to no relevance to the
30567 * Returns: %TRUE if @mount_path is considered an implementation detail
30572 * g_unix_mount_at: (skip)
30573 * @mount_path: path for a possible unix mount.
30574 * @time_read: (out) (allow-none): guint64 to contain a timestamp.
30576 * Gets a #GUnixMountEntry for a given mount path. If @time_read
30577 * is set, it will be filled with a unix timestamp for checking
30578 * if the mounts have changed since with g_unix_mounts_changed_since().
30580 * Returns: (transfer full): a #GUnixMountEntry.
30585 * g_unix_mount_compare:
30586 * @mount1: first #GUnixMountEntry to compare.
30587 * @mount2: second #GUnixMountEntry to compare.
30589 * Compares two unix mounts.
30590 * or less than @mount2, respectively.
30592 * Returns: 1, 0 or -1 if @mount1 is greater than, equal to,
30597 * g_unix_mount_free:
30598 * @mount_entry: a #GUnixMount.
30600 * Frees a unix mount.
30605 * g_unix_mount_get_device_path:
30606 * @mount_entry: a #GUnixMount.
30608 * Gets the device path for a unix mount.
30610 * Returns: a string containing the device path.
30615 * g_unix_mount_get_fs_type:
30616 * @mount_entry: a #GUnixMount.
30618 * Gets the filesystem type for the unix mount.
30620 * Returns: a string containing the file system type.
30625 * g_unix_mount_get_mount_path:
30626 * @mount_entry: input #GUnixMountEntry to get the mount path for.
30628 * Gets the mount path for a unix mount.
30630 * Returns: the mount path for @mount_entry.
30635 * g_unix_mount_guess_can_eject:
30636 * @mount_entry: a #GUnixMountEntry
30638 * Guesses whether a Unix mount can be ejected.
30640 * Returns: %TRUE if @mount_entry is deemed to be ejectable.
30645 * g_unix_mount_guess_icon:
30646 * @mount_entry: a #GUnixMountEntry
30648 * Guesses the icon of a Unix mount.
30650 * Returns: (transfer full): a #GIcon
30655 * g_unix_mount_guess_name:
30656 * @mount_entry: a #GUnixMountEntry
30658 * Guesses the name of a Unix mount.
30659 * The result is a translated string.
30660 * be freed with g_free()
30662 * Returns: A newly allocated string that must
30667 * g_unix_mount_guess_should_display:
30668 * @mount_entry: a #GUnixMountEntry
30670 * Guesses whether a Unix mount should be displayed in the UI.
30672 * Returns: %TRUE if @mount_entry is deemed to be displayable.
30677 * g_unix_mount_is_readonly:
30678 * @mount_entry: a #GUnixMount.
30680 * Checks if a unix mount is mounted read only.
30682 * Returns: %TRUE if @mount_entry is read only.
30687 * g_unix_mount_is_system_internal:
30688 * @mount_entry: a #GUnixMount.
30690 * Checks if a unix mount is a system path.
30692 * Returns: %TRUE if the unix mount is for a system path.
30697 * g_unix_mount_monitor_new:
30699 * Gets a new #GUnixMountMonitor. The default rate limit for which the
30700 * monitor will report consecutive changes for the mount and mount
30701 * point entry files is the default for a #GFileMonitor. Use
30702 * g_unix_mount_monitor_set_rate_limit() to change this.
30704 * Returns: a #GUnixMountMonitor.
30709 * g_unix_mount_monitor_set_rate_limit:
30710 * @mount_monitor: a #GUnixMountMonitor
30711 * @limit_msec: a integer with the limit in milliseconds to poll for changes.
30713 * Sets the rate limit to which the @mount_monitor will report
30714 * consecutive change events to the mount and mount point entry files.
30721 * g_unix_mount_point_compare:
30722 * @mount1: a #GUnixMount.
30723 * @mount2: a #GUnixMount.
30725 * Compares two unix mount points.
30726 * or less than @mount2, respectively.
30728 * Returns: 1, 0 or -1 if @mount1 is greater than, equal to,
30733 * g_unix_mount_point_free:
30734 * @mount_point: unix mount point to free.
30736 * Frees a unix mount point.
30741 * g_unix_mount_point_get_device_path:
30742 * @mount_point: a #GUnixMountPoint.
30744 * Gets the device path for a unix mount point.
30746 * Returns: a string containing the device path.
30751 * g_unix_mount_point_get_fs_type:
30752 * @mount_point: a #GUnixMountPoint.
30754 * Gets the file system type for the mount point.
30756 * Returns: a string containing the file system type.
30761 * g_unix_mount_point_get_mount_path:
30762 * @mount_point: a #GUnixMountPoint.
30764 * Gets the mount path for a unix mount point.
30766 * Returns: a string containing the mount path.
30771 * g_unix_mount_point_guess_can_eject:
30772 * @mount_point: a #GUnixMountPoint
30774 * Guesses whether a Unix mount point can be ejected.
30776 * Returns: %TRUE if @mount_point is deemed to be ejectable.
30781 * g_unix_mount_point_guess_icon:
30782 * @mount_point: a #GUnixMountPoint
30784 * Guesses the icon of a Unix mount point.
30786 * Returns: (transfer full): a #GIcon
30791 * g_unix_mount_point_guess_name:
30792 * @mount_point: a #GUnixMountPoint
30794 * Guesses the name of a Unix mount point.
30795 * The result is a translated string.
30796 * be freed with g_free()
30798 * Returns: A newly allocated string that must
30803 * g_unix_mount_point_is_loopback:
30804 * @mount_point: a #GUnixMountPoint.
30806 * Checks if a unix mount point is a loopback device.
30808 * Returns: %TRUE if the mount point is a loopback. %FALSE otherwise.
30813 * g_unix_mount_point_is_readonly:
30814 * @mount_point: a #GUnixMountPoint.
30816 * Checks if a unix mount point is read only.
30818 * Returns: %TRUE if a mount point is read only.
30823 * g_unix_mount_point_is_user_mountable:
30824 * @mount_point: a #GUnixMountPoint.
30826 * Checks if a unix mount point is mountable by the user.
30828 * Returns: %TRUE if the mount point is user mountable.
30833 * g_unix_mount_points_changed_since:
30834 * @time: guint64 to contain a timestamp.
30836 * Checks if the unix mount points have changed since a given unix time.
30838 * Returns: %TRUE if the mount points have changed since @time.
30843 * g_unix_mount_points_get: (skip)
30844 * @time_read: (out) (allow-none): guint64 to contain a timestamp.
30846 * Gets a #GList of #GUnixMountPoint containing the unix mount points.
30847 * If @time_read is set, it will be filled with the mount timestamp,
30848 * allowing for checking if the mounts have changed with
30849 * g_unix_mounts_points_changed_since().
30850 * a #GList of the UNIX mountpoints.
30852 * Returns: (element-type GUnixMountPoint) (transfer full):
30857 * g_unix_mounts_changed_since:
30858 * @time: guint64 to contain a timestamp.
30860 * Checks if the unix mounts have changed since a given unix time.
30862 * Returns: %TRUE if the mounts have changed since @time.
30867 * g_unix_mounts_get: (skip)
30868 * @time_read: (out) (allow-none): guint64 to contain a timestamp, or %NULL
30870 * Gets a #GList of #GUnixMountEntry containing the unix mounts.
30871 * If @time_read is set, it will be filled with the mount
30872 * timestamp, allowing for checking if the mounts have changed
30873 * with g_unix_mounts_changed_since().
30874 * a #GList of the UNIX mounts.
30876 * Returns: (element-type GUnixMountEntry) (transfer full):
30881 * g_unix_output_stream_get_close_fd:
30882 * @stream: a #GUnixOutputStream
30884 * Returns whether the file descriptor of @stream will be
30885 * closed when the stream is closed.
30887 * Returns: %TRUE if the file descriptor is closed when done
30893 * g_unix_output_stream_get_fd:
30894 * @stream: a #GUnixOutputStream
30896 * Return the UNIX file descriptor that the stream writes to.
30898 * Returns: The file descriptor of @stream
30904 * g_unix_output_stream_new:
30905 * @fd: a UNIX file descriptor
30906 * @close_fd: %TRUE to close the file descriptor when done
30908 * Creates a new #GUnixOutputStream for the given @fd.
30909 * If @close_fd, is %TRUE, the file descriptor will be closed when
30910 * the output stream is destroyed.
30912 * Returns: a new #GOutputStream
30917 * g_unix_output_stream_set_close_fd:
30918 * @stream: a #GUnixOutputStream
30919 * @close_fd: %TRUE to close the file descriptor when done
30921 * Sets whether the file descriptor of @stream shall be closed
30922 * when the stream is closed.
30929 * g_unix_socket_address_abstract_names_supported:
30931 * Checks if abstract unix domain socket names are supported.
30933 * Returns: %TRUE if supported, %FALSE otherwise
30939 * g_unix_socket_address_get_address_type:
30940 * @address: a #GInetSocketAddress
30942 * Gets @address's type.
30944 * Returns: a #GUnixSocketAddressType
30950 * g_unix_socket_address_get_is_abstract:
30951 * @address: a #GInetSocketAddress
30953 * Tests if @address is abstract.
30955 * Returns: %TRUE if the address is abstract, %FALSE otherwise
30957 * Deprecated: Use g_unix_socket_address_get_address_type()
30962 * g_unix_socket_address_get_path:
30963 * @address: a #GInetSocketAddress
30965 * Gets @address's path, or for abstract sockets the "name".
30966 * Guaranteed to be zero-terminated, but an abstract socket
30967 * may contain embedded zeros, and thus you should use
30968 * g_unix_socket_address_get_path_len() to get the true length
30971 * Returns: the path for @address
30977 * g_unix_socket_address_get_path_len:
30978 * @address: a #GInetSocketAddress
30980 * Gets the length of @address's path.
30981 * For details, see g_unix_socket_address_get_path().
30983 * Returns: the length of the path
30989 * g_unix_socket_address_new:
30990 * @path: the socket path
30992 * Creates a new #GUnixSocketAddress for @path.
30993 * To create abstract socket addresses, on systems that support that,
30994 * use g_unix_socket_address_new_abstract().
30996 * Returns: a new #GUnixSocketAddress
31002 * g_unix_socket_address_new_abstract:
31003 * @path: (array length=path_len) (element-type gchar): the abstract name
31004 * @path_len: the length of @path, or -1
31006 * Creates a new %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED
31007 * #GUnixSocketAddress for @path.
31009 * Returns: a new #GUnixSocketAddress
31010 * Deprecated: Use g_unix_socket_address_new_with_type().
31015 * g_unix_socket_address_new_with_type:
31016 * @path: (array length=path_len) (element-type gchar): the name
31017 * @path_len: the length of @path, or -1
31018 * @type: a #GUnixSocketAddressType
31020 * Creates a new #GUnixSocketAddress of type @type with name @path.
31021 * If @type is %G_UNIX_SOCKET_ADDRESS_PATH, this is equivalent to
31022 * calling g_unix_socket_address_new().
31023 * If @path_type is %G_UNIX_SOCKET_ADDRESS_ABSTRACT, then @path_len
31024 * bytes of @path will be copied to the socket's path, and only those
31025 * bytes will be considered part of the name. (If @path_len is -1,
31026 * then @path is assumed to be NUL-terminated.) For example, if @path
31027 * was "test", then calling g_socket_address_get_native_size() on the
31028 * returned socket would return 7 (2 bytes of overhead, 1 byte for the
31029 * abstract-socket indicator byte, and 4 bytes for the name "test").
31030 * If @path_type is %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED, then
31031 * rest of the path will be padded with 0 bytes, and the entire
31032 * zero-padded buffer will be considered the name. (As above, if
31033 * this case, g_socket_address_get_native_size() will always return
31034 * the full size of a <literal>struct sockaddr_un</literal>, although
31035 * g_unix_socket_address_get_path_len() will still return just the
31037 * %G_UNIX_SOCKET_ADDRESS_ABSTRACT is preferred over
31038 * %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED for new programs. Of course,
31039 * when connecting to a server created by another process, you must
31040 * use the appropriate type corresponding to how that process created
31041 * its listening socket.
31043 * Returns: a new #GUnixSocketAddress
31049 * g_vfs_get_default:
31051 * Gets the default #GVfs for the system.
31053 * Returns: (transfer none): a #GVfs.
31058 * g_vfs_get_file_for_path:
31060 * @path: a string containing a VFS path.
31062 * Gets a #GFile for @path.
31063 * Free the returned object with g_object_unref().
31065 * Returns: (transfer full): a #GFile.
31070 * g_vfs_get_file_for_uri:
31072 * @uri: a string containing a URI
31074 * Gets a #GFile for @uri.
31075 * This operation never fails, but the returned object
31076 * might not support any I/O operation if the URI
31077 * is malformed or if the URI scheme is not supported.
31078 * Free the returned object with g_object_unref().
31080 * Returns: (transfer full): a #GFile.
31087 * Gets the local #GVfs for the system.
31089 * Returns: (transfer none): a #GVfs.
31094 * g_vfs_get_supported_uri_schemes:
31097 * Gets a list of URI schemes supported by @vfs.
31098 * The returned array belongs to GIO and must
31099 * not be freed or modified.
31101 * Returns: (transfer none): a %NULL-terminated array of strings.
31109 * Checks if the VFS is active.
31111 * Returns: %TRUE if construction of the @vfs was successful and it is now active.
31116 * g_vfs_parse_name:
31118 * @parse_name: a string to be parsed by the VFS module.
31120 * This operation never fails, but the returned object might
31121 * not support any I/O operations if the @parse_name cannot
31122 * be parsed by the #GVfs module.
31123 * Free the returned object with g_object_unref().
31125 * Returns: (transfer full): a #GFile for the given @parse_name.
31130 * g_volume_can_eject:
31131 * @volume: a #GVolume.
31133 * Checks if a volume can be ejected.
31135 * Returns: %TRUE if the @volume can be ejected. %FALSE otherwise.
31140 * g_volume_can_mount:
31141 * @volume: a #GVolume.
31143 * Checks if a volume can be mounted.
31145 * Returns: %TRUE if the @volume can be mounted. %FALSE otherwise.
31151 * @volume: a #GVolume.
31152 * @flags: flags affecting the unmount if required for eject
31153 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
31154 * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
31155 * @user_data: user data that gets passed to @callback
31157 * Ejects a volume. This is an asynchronous operation, and is
31158 * finished by calling g_volume_eject_finish() with the @volume
31159 * and #GAsyncResult returned in the @callback.
31161 * Deprecated: 2.22: Use g_volume_eject_with_operation() instead.
31166 * g_volume_eject_finish:
31167 * @volume: pointer to a #GVolume.
31168 * @result: a #GAsyncResult.
31169 * @error: a #GError location to store an error, or %NULL to ignore
31171 * Finishes ejecting a volume. If any errors occured during the operation,
31173 * Returns: %TRUE, %FALSE if operation failed.
31174 * Deprecated: 2.22: Use g_volume_eject_with_operation_finish() instead.
31179 * g_volume_eject_with_operation:
31180 * @volume: a #GVolume.
31181 * @flags: flags affecting the unmount if required for eject
31182 * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
31183 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
31184 * @callback: a #GAsyncReadyCallback, or %NULL.
31185 * @user_data: user data passed to @callback.
31187 * Ejects a volume. This is an asynchronous operation, and is
31188 * finished by calling g_volume_eject_with_operation_finish() with the @volume
31189 * and #GAsyncResult data returned in the @callback.
31196 * g_volume_eject_with_operation_finish:
31197 * @volume: a #GVolume.
31198 * @result: a #GAsyncResult.
31199 * @error: a #GError location to store the error occuring, or %NULL to ignore.
31201 * Finishes ejecting a volume. If any errors occurred during the operation,
31203 * Returns: %TRUE if the volume was successfully ejected. %FALSE otherwise.
31209 * g_volume_enumerate_identifiers:
31210 * @volume: a #GVolume
31212 * Gets the kinds of <link linkend="volume-identifier">identifiers</link>
31213 * that @volume has. Use g_volume_get_identifer() to obtain
31214 * the identifiers themselves.
31215 * of strings containing kinds of identifiers. Use g_strfreev() to free.
31217 * Returns: (array zero-terminated=1) (transfer full): a %NULL-terminated array
31222 * g_volume_get_activation_root:
31223 * @volume: a #GVolume
31225 * Gets the activation root for a #GVolume if it is known ahead of
31226 * mount time. Returns %NULL otherwise. If not %NULL and if @volume
31227 * is mounted, then the result of g_mount_get_root() on the
31228 * #GMount object obtained from g_volume_get_mount() will always
31229 * either be equal or a prefix of what this function returns. In
31230 * other words, in code
31233 * GFile *mount_root
31234 * GFile *volume_activation_root;
31235 * mount = g_volume_get_mount (volume); /* mounted, so never NULL */
31236 * mount_root = g_mount_get_root (mount);
31237 * volume_activation_root = g_volume_get_activation_root(volume); /* assume not NULL */
31238 * </programlisting>
31239 * then the expression
31241 * (g_file_has_prefix (volume_activation_root, mount_root) ||
31242 * </programlisting>
31243 * will always be %TRUE.
31244 * Activation roots are typically used in #GVolumeMonitor
31245 * implementations to find the underlying mount to shadow, see
31246 * g_mount_is_shadowed() for more details.
31247 * g_object_unref() to free.
31249 * Returns: (transfer full): the activation root of @volume or %NULL. Use
31255 * g_volume_get_drive:
31256 * @volume: a #GVolume.
31258 * Gets the drive for the @volume.
31259 * The returned object should be unreffed with g_object_unref()
31260 * when no longer needed.
31262 * Returns: (transfer full): a #GDrive or %NULL if @volume is not associated with a drive.
31267 * g_volume_get_icon:
31268 * @volume: a #GVolume.
31270 * Gets the icon for @volume.
31271 * The returned object should be unreffed with g_object_unref()
31272 * when no longer needed.
31274 * Returns: (transfer full): a #GIcon.
31279 * g_volume_get_identifier:
31280 * @volume: a #GVolume
31281 * @kind: the kind of identifier to return
31283 * Gets the identifier of the given kind for @volume.
31284 * See the <link linkend="volume-identifier">introduction</link>
31285 * for more information about volume identifiers.
31286 * requested identfier, or %NULL if the #GVolume
31287 * doesn't have this kind of identifier
31289 * Returns: a newly allocated string containing the
31294 * g_volume_get_mount:
31295 * @volume: a #GVolume.
31297 * Gets the mount for the @volume.
31298 * The returned object should be unreffed with g_object_unref()
31299 * when no longer needed.
31301 * Returns: (transfer full): a #GMount or %NULL if @volume isn't mounted.
31306 * g_volume_get_name:
31307 * @volume: a #GVolume.
31309 * Gets the name of @volume.
31310 * be freed with g_free() when no longer needed.
31312 * Returns: the name for the given @volume. The returned string should
31317 * g_volume_get_uuid:
31318 * @volume: a #GVolume.
31320 * Gets the UUID for the @volume. The reference is typically based on
31321 * the file system UUID for the volume in question and should be
31322 * considered an opaque string. Returns %NULL if there is no UUID
31324 * The returned string should be freed with g_free()
31325 * when no longer needed.
31327 * Returns: the UUID for @volume or %NULL if no UUID can be computed.
31332 * g_volume_monitor_adopt_orphan_mount:
31333 * @mount: a #GMount object to find a parent for
31335 * This function should be called by any #GVolumeMonitor
31336 * implementation when a new #GMount object is created that is not
31337 * associated with a #GVolume object. It must be called just before
31338 * emitting the @mount_added signal.
31339 * If the return value is not %NULL, the caller must associate the
31340 * returned #GVolume object with the #GMount. This involves returning
31341 * it in its g_mount_get_volume() implementation. The caller must
31342 * also listen for the "removed" signal on the returned object
31343 * and give up its reference when handling that signal
31344 * Similary, if implementing g_volume_monitor_adopt_orphan_mount(),
31345 * the implementor must take a reference to @mount and return it in
31346 * its g_volume_get_mount() implemented. Also, the implementor must
31347 * listen for the "unmounted" signal on @mount and give up its
31348 * reference upon handling that signal.
31349 * There are two main use cases for this function.
31350 * One is when implementing a user space file system driver that reads
31351 * blocks of a block device that is already represented by the native
31352 * volume monitor (for example a CD Audio file system driver). Such
31353 * a driver will generate its own #GMount object that needs to be
31354 * assoicated with the #GVolume object that represents the volume.
31355 * The other is for implementing a #GVolumeMonitor whose sole purpose
31356 * is to return #GVolume objects representing entries in the users
31357 * "favorite servers" list or similar.
31358 * if no wants to adopt the #GMount.
31359 * implementations should instead create shadow mounts with the URI of
31360 * the mount they intend to adopt. See the proxy volume monitor in
31361 * gvfs for an example of this. Also see g_mount_is_shadowed(),
31362 * g_mount_shadow() and g_mount_unshadow() functions.
31364 * Returns: (transfer full): the #GVolume object that is the parent for @mount or %NULL
31365 * Deprecated: 2.20: Instead of using this function, #GVolumeMonitor
31370 * g_volume_monitor_get:
31372 * Gets the volume monitor used by gio.
31373 * g_object_unref() when done with it.
31375 * Returns: (transfer full): a reference to the #GVolumeMonitor used by gio. Call
31380 * g_volume_monitor_get_connected_drives:
31381 * @volume_monitor: a #GVolumeMonitor.
31383 * Gets a list of drives connected to the system.
31384 * The returned list should be freed with g_list_free(), after
31385 * its elements have been unreffed with g_object_unref().
31387 * Returns: (element-type GDrive) (transfer full): a #GList of connected #GDrive objects.
31392 * g_volume_monitor_get_mount_for_uuid:
31393 * @volume_monitor: a #GVolumeMonitor.
31394 * @uuid: the UUID to look for
31396 * Finds a #GMount object by its UUID (see g_mount_get_uuid())
31397 * Free the returned object with g_object_unref().
31399 * Returns: (transfer full): a #GMount or %NULL if no such mount is available.
31404 * g_volume_monitor_get_mounts:
31405 * @volume_monitor: a #GVolumeMonitor.
31407 * Gets a list of the mounts on the system.
31408 * The returned list should be freed with g_list_free(), after
31409 * its elements have been unreffed with g_object_unref().
31411 * Returns: (element-type GMount) (transfer full): a #GList of #GMount objects.
31416 * g_volume_monitor_get_volume_for_uuid:
31417 * @volume_monitor: a #GVolumeMonitor.
31418 * @uuid: the UUID to look for
31420 * Finds a #GVolume object by its UUID (see g_volume_get_uuid())
31421 * Free the returned object with g_object_unref().
31423 * Returns: (transfer full): a #GVolume or %NULL if no such volume is available.
31428 * g_volume_monitor_get_volumes:
31429 * @volume_monitor: a #GVolumeMonitor.
31431 * Gets a list of the volumes on the system.
31432 * The returned list should be freed with g_list_free(), after
31433 * its elements have been unreffed with g_object_unref().
31435 * Returns: (element-type GVolume) (transfer full): a #GList of #GVolume objects.
31441 * @volume: a #GVolume.
31442 * @flags: flags affecting the operation
31443 * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
31444 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
31445 * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
31446 * @user_data: user data that gets passed to @callback
31448 * Mounts a volume. This is an asynchronous operation, and is
31449 * finished by calling g_volume_mount_finish() with the @volume
31450 * and #GAsyncResult returned in the @callback.
31452 * Virtual: mount_fn
31457 * g_volume_mount_finish:
31458 * @volume: a #GVolume
31459 * @result: a #GAsyncResult
31460 * @error: a #GError location to store an error, or %NULL to ignore
31462 * Finishes mounting a volume. If any errors occured during the operation,
31463 * If the mount operation succeeded, g_volume_get_mount() on @volume
31464 * is guaranteed to return the mount right after calling this
31465 * function; there's no need to listen for the 'mount-added' signal on
31468 * Returns: %TRUE, %FALSE if operation failed.
31473 * g_volume_should_automount:
31474 * @volume: a #GVolume
31476 * Returns whether the volume should be automatically mounted.
31478 * Returns: %TRUE if the volume should be automatically mounted.
31483 * g_win32_input_stream_get_close_handle:
31484 * @stream: a #GWin32InputStream
31486 * Returns whether the handle of @stream will be
31487 * closed when the stream is closed.
31489 * Returns: %TRUE if the handle is closed when done
31495 * g_win32_input_stream_get_handle:
31496 * @stream: a #GWin32InputStream
31498 * Return the Windows file handle that the stream reads from.
31500 * Returns: The file handle of @stream
31506 * g_win32_input_stream_new:
31507 * @handle: a Win32 file handle
31508 * @close_fd: %TRUE to close the handle when done
31510 * Creates a new #GWin32InputStream for the given @fd.
31511 * If @close_handle is %TRUE, the handle will be closed
31512 * when the stream is closed.
31513 * Note that "handle" here means a Win32 HANDLE, not a "file descriptor"
31514 * as used in the Windows C libraries.
31516 * Returns: a new #GWin32InputStream
31521 * g_win32_input_stream_set_close_handle:
31522 * @stream: a #GWin32InputStream
31523 * @close_handle: %TRUE to close the handle when done
31525 * Sets whether the handle of @stream shall be closed
31526 * when the stream is closed.
31533 * g_win32_output_stream_get_close_handle:
31534 * @stream: a #GWin32OutputStream
31536 * Returns whether the handle of @stream will be closed when the
31537 * stream is closed.
31539 * Returns: %TRUE if the handle is closed when done
31545 * g_win32_output_stream_get_handle:
31546 * @stream: a #GWin32OutputStream
31548 * Return the Windows handle that the stream writes to.
31550 * Returns: The handle descriptor of @stream
31556 * g_win32_output_stream_new:
31557 * @handle: a Win32 file handle
31558 * @close_handle: %TRUE to close the handle when done
31560 * Creates a new #GWin32OutputStream for the given @handle.
31561 * If @close_handle, is %TRUE, the handle will be closed when the
31562 * output stream is destroyed.
31564 * Returns: a new #GOutputStream
31570 * g_win32_output_stream_set_close_handle:
31571 * @stream: a #GWin32OutputStream
31572 * @close_handle: %TRUE to close the handle when done
31574 * Sets whether the handle of @stream shall be closed when the stream
31582 * g_zlib_compressor_get_file_info:
31583 * @compressor: a #GZlibCompressor
31585 * Returns the #GZlibCompressor:file-info property.
31587 * Returns: (transfer none): a #GFileInfo, or %NULL
31593 * g_zlib_compressor_new:
31594 * @format: The format to use for the compressed data
31595 * @level: compression level (0-9), -1 for default
31597 * Creates a new #GZlibCompressor.
31599 * Returns: a new #GZlibCompressor
31605 * g_zlib_compressor_set_file_info:
31606 * @compressor: a #GZlibCompressor
31607 * @file_info: (allow-none): a #GFileInfo
31609 * Sets @file_info in @compressor. If non-%NULL, and @compressor's
31610 * #GZlibCompressor:format property is %G_ZLIB_COMPRESSOR_FORMAT_GZIP,
31611 * it will be used to set the file name and modification time in
31612 * the GZIP header of the compressed data.
31613 * progress; it may only be called immediately after creation of @compressor,
31614 * or after resetting it with g_converter_reset().
31616 * Note: it is an error to call this function while a compression is in
31622 * g_zlib_decompressor_get_file_info:
31623 * @decompressor: a #GZlibDecompressor
31625 * Retrieves the #GFileInfo constructed from the GZIP header data
31626 * of compressed data processed by @compressor, or %NULL if @decompressor's
31627 * #GZlibDecompressor:format property is not %G_ZLIB_COMPRESSOR_FORMAT_GZIP,
31628 * or the header data was not fully processed yet, or it not present in the
31629 * data stream at all.
31631 * Returns: (transfer none): a #GFileInfo, or %NULL
31637 * g_zlib_decompressor_new:
31638 * @format: The format to use for the compressed data
31640 * Creates a new #GZlibDecompressor.
31642 * Returns: a new #GZlibDecompressor
31650 * A C representable type name for #G_TYPE_STRING.
31655 * get_all_desktop_entries_for_mime_type:
31656 * @mime_type: a mime type.
31657 * @except: NULL or a strv list
31659 * Returns all the desktop ids for @mime_type. The desktop files
31660 * are listed in an order so that default applications are listed before
31661 * non-default ones, and handlers for inherited mimetypes are listed
31662 * after the base ones.
31663 * Optionally doesn't list the desktop ids given in the @except
31664 * to handle @mime_type.
31666 * Returns: a #GList containing the desktop ids which claim
31671 * mime_info_cache_reload:
31672 * @dir: directory path which needs reloading.
31674 * Reload the mime information for the @dir.
31679 /************************************************************/
31680 /* THIS FILE IS GENERATED DO NOT EDIT */
31681 /************************************************************/