1 /************************************************************/
2 /* THIS FILE IS GENERATED DO NOT EDIT */
3 /************************************************************/
6 * g_mount_guess_content_type:
8 * @force_rescan: Whether to force a rescan of the content. Otherwise a cached result will be used if available
9 * @cancellable: optional #GCancellable object, %NULL to ignore
10 * @callback: a #GAsyncReadyCallback
11 * @user_data: user data passed to @callback
13 * Tries to guess the type of content stored on @mount. Returns one or
14 * more textual identifiers of well-known content types (typically
15 * prefixed with "x-content/"), e.g. x-content/image-dcf for camera
16 * memory cards. See the <ulink url="http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec">shared-mime-info</ulink>
17 * specification for more on x-content types.
18 * This is an asynchronous operation (see
19 * g_mount_guess_content_type_sync() for the synchronous version), and
20 * is finished by calling g_mount_guess_content_type_finish() with the
27 * g_output_stream_flush_async:
28 * @stream: a #GOutputStream.
29 * @io_priority: the io priority of the request.
30 * @cancellable: optional #GCancellable object, %NULL to ignore.
31 * @callback: a #GAsyncReadyCallback to call when the request is satisfied
32 * @user_data: the data to pass to callback function
34 * Flushes a stream asynchronously.
35 * For behaviour details see g_output_stream_flush().
36 * When the operation is finished @callback will be
37 * called. You can then call g_output_stream_flush_finish() to get the
38 * result of the operation.
43 * GZlibDecompressor:file-info:
45 * A #GFileInfo containing the information found in the GZIP header
46 * of the data stream processed, or %NULL if the header was not yet
47 * fully processed, is not present at all, or the compressor's
48 * #GZlibDecompressor:format property is not %G_ZLIB_COMPRESSOR_FORMAT_GZIP.
55 * g_file_attribute_info_list_ref:
56 * @list: a #GFileAttributeInfoList to reference.
58 * References a file attribute info list.
60 * Returns: #GFileAttributeInfoList or %NULL on error.
65 * g_drive_is_media_check_automatic:
68 * Checks if @drive is capabable of automatically detecting media changes.
69 * media changes, %FALSE otherwise.
71 * Returns: %TRUE if the @drive is capabable of automatically detecting
76 * g_dbus_message_set_header:
77 * @message: A #GDBusMessage.
78 * @header_field: A 8-bit unsigned integer (typically a value from the #GDBusMessageHeaderField enumeration)
79 * @value: A #GVariant to set the header field or %NULL to clear the header field.
81 * Sets a header field on @message.
82 * If @value is floating, @message assumes ownership of @value.
89 * g_app_info_add_supports_type:
90 * @appinfo: a #GAppInfo.
91 * @content_type: a string.
94 * Adds a content type to the application information to indicate the
95 * application is capable of opening files with the given content type.
97 * Returns: %TRUE on success, %FALSE on error.
102 * g_file_info_get_size:
103 * @info: a #GFileInfo.
105 * Gets the file's size.
107 * Returns: a #goffset containing the file's size.
112 * g_dbus_interface_info_lookup_signal:
113 * @info: A #GDBusInterfaceInfo.
114 * @name: A D-Bus signal name (typically in CamelCase)
116 * Looks up information about a signal.
117 * This cost of this function is O(n) in number of signals.
119 * Returns: A #GDBusSignalInfo or %NULL if not found. Do not free, it is owned by @info.
125 * g_dbus_connection_flush_sync:
126 * @connection: A #GDBusConnection.
127 * @cancellable: A #GCancellable or %NULL.
128 * @error: Return location for error or %NULL.
130 * Synchronously flushes @connection. The calling thread is blocked
131 * until this is done. See g_dbus_connection_flush() for the
132 * asynchronous version of this method and more details about what it
135 * Returns: %TRUE if the operation succeeded, %FALSE if @error is set.
141 * g_dbus_message_set_signature:
142 * @message: A #GDBusMessage.
143 * @value: The value to set.
145 * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field.
152 * g_file_make_symbolic_link:
153 * @file: a #GFile with the name of the symlink to create
154 * @symlink_value: a string with the path for the target of the new symlink
155 * @cancellable: optional #GCancellable object, %NULL to ignore.
158 * Creates a symbolic link named @file which contains the string
159 * If @cancellable is not %NULL, then the operation can be cancelled by
160 * triggering the cancellable object from another thread. If the operation
161 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
163 * Returns: %TRUE on the creation of a new symlink, %FALSE otherwise.
168 * g_io_stream_has_pending:
169 * @stream: a #GIOStream
171 * Checks if a stream has pending actions.
173 * Returns: %TRUE if @stream has pending actions.
179 * g_dbus_message_get_message_type:
180 * @message: A #GDBusMessage.
182 * Gets the type of @message.
184 * Returns: A 8-bit unsigned integer (typically a value from the #GDBusMessageType enumeration).
190 * SECTION:gdbusnamewatchin:
191 * @title: Watching Bus Names
192 * @short_description: Simple API for watching bus names
193 * @include: gio/gio.h
195 * Convenience API for watching bus names.
196 * <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>
201 * GDBusProxy:g-flags:
203 * Flags from the #GDBusProxyFlags enumeration.
210 * g_socket_listener_new:
212 * Creates a new #GSocketListener with no sockets to listen for.
213 * New listeners can be added with e.g. g_socket_listener_add_address()
214 * or g_socket_listener_add_inet_port().
216 * Returns: a new #GSocketListener.
222 * g_bus_watch_name_with_closures:
223 * @bus_type: The type of bus to watch a name on.
224 * @name: The name (well-known or unique) to watch.
225 * @flags: Flags from the #GBusNameWatcherFlags enumeration.
226 * @name_appeared_closure: (allow-none): #GClosure to invoke when @name is known to exist or %NULL.
227 * @name_vanished_closure: (allow-none): #GClosure to invoke when @name is known to not exist or %NULL.
229 * Version of g_bus_watch_name() using closures instead of callbacks for
230 * easier binding in other languages.
231 * g_bus_unwatch_name() to stop watching the name.
233 * Returns: An identifier (never 0) that an be used with
234 * Rename to: g_bus_watch_name
240 * g_converter_output_stream_new:
241 * @base_stream: a #GOutputStream
242 * @converter: a #GConverter
244 * Creates a new converter output stream for the @base_stream.
246 * Returns: a new #GOutputStream.
251 * g_async_result_get_user_data:
252 * @res: a #GAsyncResult.
254 * Gets the user data from a #GAsyncResult.
256 * Returns: (transfer full): the user data for @res.
261 * g_file_poll_mountable:
262 * @file: input #GFile.
263 * @cancellable: optional #GCancellable object, %NULL to ignore.
264 * @callback: a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
265 * @user_data: the data to pass to callback function
267 * Polls a file of type G_FILE_TYPE_MOUNTABLE.
268 * If @cancellable is not %NULL, then the operation can be cancelled by
269 * triggering the cancellable object from another thread. If the operation
270 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
271 * When the operation is finished, @callback will be called. You can then call
272 * g_file_mount_mountable_finish() to get the result of the operation.
279 * g_socket_check_connect_result:
280 * @socket: a #GSocket
281 * @error: #GError for error reporting, or %NULL to ignore.
283 * Checks and resets the pending connect error for the socket.
284 * This is used to check for errors when g_socket_connect() is
285 * used in non-blocking mode.
287 * Returns: %TRUE if no error, %FALSE otherwise, setting @error to the error
294 * @filename: filename of the shared library module.
296 * Creates a new GIOModule that will load the specific
297 * shared library when in use.
300 * Returns: a #GIOModule from given @filename,
306 * @application_id: the application id
307 * @flags: the application flags
308 * @returns: a new #GApplication instance
310 * Creates a new #GApplication instance.
311 * This function calls g_type_init() for you.
312 * The application id must be valid. See g_application_id_is_valid().
317 * g_dbus_connection_get_capabilities:
318 * @connection: A #GDBusConnection.
320 * Gets the capabilities negotiated with the remote peer
322 * Returns: Zero or more flags from the #GDBusCapabilityFlags enumeration.
330 * A single target host/port that a network service is running on.
335 * g_dbus_connection_close:
336 * @connection: A #GDBusConnection.
337 * @cancellable: A #GCancellable or %NULL.
338 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result.
339 * @user_data: The data to pass to @callback.
341 * Closes @connection. Note that this never causes the process to
342 * exit (this might only happen if the other end of a shared message
343 * bus connection disconnects, see #GDBusConnection:exit-on-close).
344 * Once the connection is closed, operations such as sending a message
345 * will return with the error %G_IO_ERROR_CLOSED. Closing a connection
346 * will not automatically flush the connection so queued messages may
347 * be lost. Use g_dbus_connection_flush() if you need such guarantees.
348 * If @connection is already closed, this method fails with
349 * %G_IO_ERROR_CLOSED.
350 * When @connection has been closed, the #GDBusConnection::closed
351 * signal is emitted in the <link
352 * linkend="g-main-context-push-thread-default">thread-default main
353 * loop</link> of the thread that @connection was constructed in.
354 * This is an asynchronous method. When the operation is finished,
355 * linkend="g-main-context-push-thread-default">thread-default main
356 * loop</link> of the thread you are calling this method from. You can
357 * then call g_dbus_connection_close_finish() to get the result of the
358 * operation. See g_dbus_connection_close_sync() for the synchronous
366 * g_resolver_lookup_by_address:
367 * @resolver: a #GResolver
368 * @address: the address to reverse-resolve
369 * @cancellable: a #GCancellable, or %NULL
370 * @error: return location for a #GError, or %NULL
372 * Synchronously reverse-resolves @address to determine its
373 * associated hostname.
374 * If the DNS resolution fails, @error (if non-%NULL) will be set to
375 * a value from #GResolverError.
376 * If @cancellable is non-%NULL, it can be used to cancel the
377 * operation, in which case @error (if non-%NULL) will be set to
378 * %G_IO_ERROR_CANCELLED.
379 * form), or %NULL on error.
381 * Returns: a hostname (either ASCII-only, or in ASCII-encoded
387 * GDataStream:newline-type:
389 * The :newline-type property determines what is considered
390 * as a line ending when reading complete lines from the stream.
395 * SECTION:gdbusnameownin:
396 * @title: Owning Bus Names
397 * @short_description: Simple API for owning bus names
398 * @include: gio/gio.h
400 * Convenience API for owning bus names.
401 * <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>
406 * GInetAddress:is-loopback:
408 * Whether this is the loopback address for its family.
409 * See g_inet_address_get_is_loopback().
418 * The path within the backend where the settings are stored.
423 * GDBusMethodInvocationClass:
425 * Class structure for #GDBusMethodInvocation.
432 * g_dbus_method_invocation_get_user_data: (skip)
433 * @invocation: A #GDBusMethodInvocation.
435 * Gets the @user_data #gpointer passed to g_dbus_connection_register_object().
437 * Returns: A #gpointer.
443 * g_unix_mount_point_guess_icon:
444 * @mount_point: a #GUnixMountPoint
446 * Guesses the icon of a Unix mount point.
448 * Returns: (transfer full): a #GIcon
454 * @settings: a #GSettings object
455 * @key: the key to get the value for
456 * @format: a #GVariant format string
457 * @...: arguments as per @format
459 * Gets the value that is stored at @key in @settings.
460 * A convenience function that combines g_settings_get_value() with
462 * It is a programmer error to give a @key that isn't contained in the
463 * schema for @settings or for the #GVariantType of @format to mismatch
464 * the type given in the schema.
471 * g_socket_control_message_get_size:
472 * @message: a #GSocketControlMessage
474 * Returns the space required for the control message, not including
475 * headers or alignment.
477 * Returns: The number of bytes required.
483 * g_settings_new_with_path:
484 * @schema: the name of the schema
485 * @path: the path to use
486 * @returns: a new #GSettings object
488 * Creates a new #GSettings object with a given schema and path.
489 * You only need to do this if you want to directly create a settings
490 * object with a schema that doesn't have a specified path of its own.
492 * It is a programmer error to call this function for a schema that
493 * has an explicitly specified path.
500 * g_file_info_set_edit_name:
501 * @info: a #GFileInfo.
502 * @edit_name: a string containing an edit name.
504 * Sets the edit name for the current file.
505 * See %G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME.
513 * Checks if a drive can be started.
515 * Returns: %TRUE if the @drive can be started, %FALSE otherwise.
521 * g_socket_service_is_active:
522 * @service: a #GSocketService
524 * Check whether the service is active or not. An active
525 * service will accept new clients that connect, while
526 * a non-active service will let connecting clients queue
527 * up until the service is started.
529 * Returns: %TRUE if the service is active, %FALSE otherwise
536 * @mount_path: path for a possible unix mount.
537 * @time_read: guint64 to contain a timestamp.
539 * Gets a #GUnixMountEntry for a given mount path. If @time_read
540 * is set, it will be filled with a unix timestamp for checking
541 * if the mounts have changed since with g_unix_mounts_changed_since().
543 * Returns: (transfer full): a #GUnixMount.
548 * g_proxy_address_get_usernam:
549 * @proxy: a #GProxyAddress
551 * Gets @proxy's username.
553 * Returns: the @proxy's username
560 * @initable: a #GInitable.
561 * @cancellable: optional #GCancellable object, %NULL to ignore.
562 * @error: a #GError location to store the error occuring, or %NULL to ignore.
564 * Initializes the object implementing the interface. This must be
565 * done before any real use of the object after initial construction.
566 * Implementations may also support cancellation. If @cancellable is not %NULL,
567 * then initialization can be cancelled by triggering the cancellable object
568 * from another thread. If the operation was cancelled, the error
569 * %G_IO_ERROR_CANCELLED will be returned. If @cancellable is not %NULL and
570 * the object doesn't support cancellable initialization the error
571 * %G_IO_ERROR_NOT_SUPPORTED will be returned.
572 * If this function is not called, or returns with an error then all
573 * operations on the object should fail, generally returning the
574 * error %G_IO_ERROR_NOT_INITIALIZED.
575 * Implementations of this method must be idempotent, i.e. multiple calls
576 * to this function with the same argument should return the same results.
577 * Only the first call initializes the object, further calls return the result
578 * of the first call. This is so that its safe to implement the singleton
579 * pattern in the GObject constructor function.
580 * return %FALSE and set @error appropriately if present.
582 * Returns: %TRUE if successful. If an error has occurred, this function will
588 * g_drive_enumerate_identifiers:
591 * Gets the kinds of identifiers that @drive has.
592 * Use g_drive_get_identifer() to obtain the identifiers
594 * kinds of identifiers. Use g_strfreev() to free.
596 * Returns: (transfer full): a %NULL-terminated array of strings containing
601 * g_volume_monitor_get_volumes:
602 * @volume_monitor: a #GVolumeMonitor.
604 * Gets a list of the volumes on the system.
605 * The returned list should be freed with g_list_free(), after
606 * its elements have been unreffed with g_object_unref().
608 * Returns: (element-type GVolume) (transfer full): a #GList of #GVolume objects.
613 * g_dbus_message_new_signal:
614 * @path: A valid object path.
615 * @interface_: A valid D-Bus interface name.
616 * @signal: A valid signal name.
618 * Creates a new #GDBusMessage for a signal emission.
620 * Returns: A #GDBusMessage. Free with g_object_unref().
626 * g_settings_bind_writable:
627 * @settings: a #GSettings object
628 * @key: the key to bind
629 * @object: a #GObject
630 * @property: the name of a boolean property to bind
631 * @inverted: whether to 'invert' the value
633 * Create a binding between the writability of @key in the
634 * The property must be boolean; "sensitive" or "visible"
635 * properties of widgets are the most likely candidates.
636 * Writable bindings are always uni-directional; changes of the
637 * writability of the setting will be propagated to the object
638 * property, not the other way.
639 * When the @inverted argument is %TRUE, the binding inverts the
640 * value as it passes from the setting to the object, i.e. @property
641 * will be set to %TRUE if the key is <emphasis>not</emphasis>
643 * Note that the lifecycle of the binding is tied to the object,
644 * and that you can have only one binding per object property.
645 * If you bind the same property twice on the same object, the second
646 * binding overrides the first one.
653 * g_memory_input_stream_new_from_data:
655 * @len: length of the data, may be -1 if @data is a nul-terminated string
656 * @destroy: function that is called to free @data, or %NULL
658 * Creates a new #GMemoryInputStream with data in memory of a given size.
660 * Returns: new #GInputStream read from @data of @len bytes.
665 * g_socket_connection_get_socket:
666 * @connection: a #GSocketConnection
668 * Gets the underlying #GSocket object of the connection.
669 * This can be useful if you want to do something unusual on it
670 * not supported by the #GSocketConnection APIs.
672 * Returns: (transfer none): a #GSocketAddress or %NULL on error.
678 * g_input_stream_is_closed:
679 * @stream: input stream.
681 * Checks if an input stream is closed.
683 * Returns: %TRUE if the stream is closed.
688 * g_credentials_get_native: (skip)
689 * @credentials: A #GCredentials.
690 * @native_type: The type of native credentials to get.
692 * Gets a pointer to native credentials of type @native_type from
693 * It is a programming error (which will cause an warning to be
694 * logged) to use this method if there is no #GCredentials support for
695 * the OS or if @native_type isn't supported by the OS.
696 * operation there is no #GCredentials support for the OS or if
697 * data, it is owned by @credentials.
699 * Returns: The pointer to native credentials or %NULL if the
705 * g_file_replace_contents:
706 * @file: input #GFile.
707 * @contents: a string containing the new contents for @file.
708 * @length: the length of @contents in bytes.
709 * @etag: (allow-none): the old <link linkend="gfile-etag">entity tag</link> for the document, or %NULL
710 * @make_backup: %TRUE if a backup should be created.
711 * @flags: a set of #GFileCreateFlags.
712 * @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
713 * @cancellable: optional #GCancellable object, %NULL to ignore.
714 * @error: a #GError, or %NULL
716 * Replaces the contents of @file with @contents of @length bytes.
717 * If @etag is specified (not %NULL) any existing file must have that etag, or
718 * the error %G_IO_ERROR_WRONG_ETAG will be returned.
719 * If @make_backup is %TRUE, this function will attempt to make a backup of @file.
720 * If @cancellable is not %NULL, then the operation can be cancelled by
721 * triggering the cancellable object from another thread. If the operation
722 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
723 * The returned @new_etag can be used to verify that the file hasn't changed the
724 * next time it is saved over.
725 * has occurred, this function will return %FALSE and set @error
726 * appropriately if present.
728 * Returns: %TRUE if successful. If an error
733 * g_inet_address_to_bytes:
734 * @address: a #GInetAddress
736 * Gets the raw binary address data from @address.
737 * which should not be modified, stored, or freed. The size of this
738 * array can be gotten with g_inet_address_get_native_size().
740 * Returns: a pointer to an internal array of the bytes in @address,
747 * @file: input #GFile.
749 * Gets the local pathname for #GFile, if one exists.
750 * This call does no blocking i/o.
751 * no such path exists. The returned string should be
752 * freed with g_free() when no longer needed.
754 * Returns: string containing the #GFile's path, or %NULL if
759 * g_file_input_stream_query_info:
760 * @stream: a #GFileInputStream.
761 * @attributes: a file attribute query string.
762 * @cancellable: optional #GCancellable object, %NULL to ignore.
763 * @error: a #GError location to store the error occuring, or %NULL to ignore.
765 * Queries a file input stream the given @attributes. This function blocks
766 * while querying the stream. For the asynchronous (non-blocking) version
767 * of this function, see g_file_input_stream_query_info_async(). While the
768 * stream is blocked, the stream will set the pending flag internally, and
769 * any other operations on the stream will fail with %G_IO_ERROR_PENDING.
771 * Returns: (transfer full): a #GFileInfo, or %NULL on error.
776 * g_permission_acquire_finish:
777 * @permission: a #GPermission instance
778 * @result: the #GAsyncResult given to the #GAsyncReadyCallback
779 * @error: a pointer to a %NULL #GError, or %NULL
780 * @returns: %TRUE if the permission was successfully acquired
782 * Collects the result of attempting to acquire the permission
783 * represented by @permission.
784 * This is the second half of the asynchronous version of
785 * g_permission_acquire().
792 * g_file_mount_enclosing_volume_finish:
793 * @location: input #GFile.
794 * @result: a #GAsyncResult.
795 * @error: a #GError, or %NULL
797 * Finishes a mount operation started by g_file_mount_enclosing_volume().
798 * has occurred, this function will return %FALSE and set @error
799 * appropriately if present.
801 * Returns: %TRUE if successful. If an error
806 * g_application_id_is_valid:
807 * @application_id: a potential application identifier
808 * @returns: %TRUE if @application_id is valid
810 * Checks if @application_id is a valid application identifier.
811 * A valid ID is required for calls to g_application_new() and
812 * g_application_set_application_id().
813 * For convenience, the restrictions on application identifiers are
816 * <listitem>Application identifiers must contain only the ASCII characters "[A-Z][a-z][0-9]_-" and must not begin with a digit.</listitem>
817 * <listitem>Application identifiers must contain at least one '.' (period) character (and thus at least two elements).</listitem>
818 * <listitem>Application identifiers must not begin with a '.' (period) character.</listitem>
819 * <listitem>Application identifiers must not contain consecutive '.' (period) characters.</listitem>
820 * <listitem>Application identifiers must not exceed 255 characters.</listitem>
826 * g_resolver_lookup_service_async:
827 * @resolver: a #GResolver
828 * @service: the service type to look up (eg, "ldap")
829 * @protocol: the networking protocol to use for @service (eg, "tcp")
830 * @domain: the DNS domain to look up the service in
831 * @cancellable: a #GCancellable, or %NULL
832 * @callback: callback to call after resolution completes
833 * @user_data: data for @callback
835 * Begins asynchronously performing a DNS SRV lookup for the given
836 * get the final result. See g_resolver_lookup_service() for more
844 * g_proxy_resolver_lookup:
845 * @resolver: a #GProxyResolver
846 * @uri: a URI representing the destination to connect to
847 * @cancellable: a #GCancellable, or %NULL
848 * @error: return location for a #GError, or %NULL
850 * Looks into the system proxy configuration to determine what proxy,
851 * if any, to use to connect to @uri. The returned proxy URIs are of the
852 * form <literal><protocol>://[user[:password]@]host:port</literal>
853 * or <literal>direct://</literal>, where <protocol> could be
854 * http, rtsp, socks or other proxying protocol.
855 * If you don't know what network protocol is being used on the
856 * socket, you should use <literal>none</literal> as the URI protocol.
857 * In this case, the resolver might still return a generic proxy type
858 * (such as SOCKS), but would not return protocol-specific proxy types
860 * <literal>direct://</literal> is used when no proxy is needed.
861 * Direct connection should not be attempted unless it is part of the
862 * returned array of proxies.
865 * Returns: (transfer full) (element-type utf8): A NULL-terminated array of proxy URIs. Must be freed with
871 * g_data_output_stream_new:
872 * @base_stream: a #GOutputStream.
874 * Creates a new data output stream for @base_stream.
876 * Returns: #GDataOutputStream.
881 * g_file_make_director:
882 * @file: input #GFile.
883 * @cancellable: optional #GCancellable object, %NULL to ignore.
884 * @error: a #GError, or %NULL
886 * Creates a directory. Note that this will only create a child directory of
887 * the immediate parent directory of the path or URI given by the #GFile. To
888 * recursively create directories, see g_file_make_directory_with_parents().
889 * This function will fail if the parent directory does not exist, setting
890 * directories, this function will fail, setting @error to
891 * %G_IO_ERROR_NOT_SUPPORTED.
892 * For a local #GFile the newly created directory will have the default
893 * (current) ownership and permissions of the current process.
894 * If @cancellable is not %NULL, then the operation can be cancelled by
895 * triggering the cancellable object from another thread. If the operation
896 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
898 * Returns: %TRUE on successful creation, %FALSE otherwise.
903 * g_zlib_compressor_set_file_info:
904 * @compressor: a #GZlibCompressor
905 * @file_info: (allow-none): a #GFileInfo
907 * Sets @file_info in @compressor. If non-%NULL, and @compressor's
908 * #GZlibCompressor:format property is %G_ZLIB_COMPRESSOR_FORMAT_GZIP,
909 * it will be used to set the file name and modification time in
910 * the GZIP header of the compressed data.
911 * progress; it may only be called immediately after creation of @compressor,
912 * or after resetting it with g_converter_reset().
914 * Note: it is an error to call this function while a compression is in
920 * g_cancellable_make_pollfd:
921 * @cancellable: a #GCancellable or %NULL
922 * @pollfd: a pointer to a #GPollFD
924 * Creates a #GPollFD corresponding to @cancellable; this can be passed
925 * to g_poll() and used to poll for cancellation. This is useful both
926 * for unix systems without a native poll and for portability to
928 * When this function returns %TRUE, you should use
929 * g_cancellable_release_fd() to free up resources allocated for the
930 * If this function returns %FALSE, either no @cancellable was given or
931 * resource limits prevent this function from allocating the necessary
932 * structures for polling. (On Linux, you will likely have reached
933 * the maximum number of file descriptors.) The suggested way to handle
934 * these cases is to ignore the @cancellable.
935 * You are not supposed to read from the fd yourself, just check for
936 * readable status. Reading to unset the readable status is done
937 * with g_cancellable_reset().
938 * failure to prepare the cancellable.
940 * Returns: %TRUE if @pollfd was successfully initialized, %FALSE on
946 * g_file_icon_get_file:
949 * Gets the #GFile associated with the given @icon.
951 * Returns: (transfer none): a #GFile, or %NULL.
957 * @seekable: a #GSeekable.
958 * @offset: a #goffset.
959 * @type: a #GSeekType.
960 * @cancellable: optional #GCancellable object, %NULL to ignore.
961 * @error: a #GError location to store the error occuring, or %NULL to ignore.
963 * Seeks in the stream by the given @offset, modified by @type.
964 * If @cancellable is not %NULL, then the operation can be cancelled by
965 * triggering the cancellable object from another thread. If the operation
966 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
967 * has occurred, this function will return %FALSE and set @error
968 * appropriately if present.
970 * Returns: %TRUE if successful. If an error
975 * SECTION:gcontenttyp:
976 * @short_description: Platform-specific content typing
977 * @include: gio/gio.h
979 * A content type is a platform specific string that defines the type
980 * of a file. On unix it is a mime type, on win32 it is an extension string
981 * like ".doc", ".txt" or a percieved string like "audio". Such strings
982 * can be looked up in the registry at HKEY_CLASSES_ROOT.
987 * GDBusConnection:locked:
989 * A boolean specifying whether the message is locked.
996 * g_dbus_proxy_call_finish:
997 * @proxy: A #GDBusProxy.
998 * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_proxy_call().
999 * @error: Return location for error or %NULL.
1001 * Finishes an operation started with g_dbus_proxy_call().
1002 * return values. Free with g_variant_unref().
1004 * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
1010 * g_socket_client_get_timeout:
1011 * @client: a #GSocketClient
1013 * Gets the I/O timeout time for sockets created by @client.
1014 * See g_socket_client_set_timeout() for details.
1016 * Returns: the timeout in seconds
1022 * g_socket_address_to_native:
1023 * @address: a #GSocketAddress
1024 * @dest: a pointer to a memory location that will contain the native <type>struct sockaddr</type>.
1025 * @destlen: the size of @dest. Must be at least as large as g_socket_address_get_native_size().
1026 * @error: #GError for error reporting, or %NULL to ignore.
1028 * Converts a #GSocketAddress to a native <type>struct
1029 * sockaddr</type>, which can be passed to low-level functions like
1030 * connect() or bind().
1031 * If not enough space is availible, a %G_IO_ERROR_NO_SPACE error is
1032 * returned. If the address type is not known on the system
1033 * then a %G_IO_ERROR_NOT_SUPPORTED error is returned.
1035 * Returns: %TRUE if @dest was filled in, %FALSE on error
1041 * g_bus_own_name_on_connection_with_closures:
1042 * @connection: A #GDBusConnection.
1043 * @name: The well-known name to own.
1044 * @flags: A set of flags from the #GBusNameOwnerFlags enumeration.
1045 * @name_acquired_closure: (allow-none): #GClosure to invoke when @name is acquired or %NULL.
1046 * @name_lost_closure: (allow-none): #GClosure to invoke when @name is lost or %NULL.
1048 * Version of g_bus_own_name_on_connection() using closures instead of callbacks for
1049 * easier binding in other languages.
1050 * g_bus_unown_name() to stop owning the name.
1052 * Returns: An identifier (never 0) that an be used with
1053 * Rename to: g_bus_own_name_on_connection
1059 * g_socket_client_connect:
1060 * @client: a #GSocketClient.
1061 * @connectable: a #GSocketConnectable specifying the remote address.
1062 * @cancellable: optional #GCancellable object, %NULL to ignore.
1063 * @error: #GError for error reporting, or %NULL to ignore.
1065 * Tries to resolve the @connectable and make a network connection to it..
1066 * Upon a successful connection, a new #GSocketConnection is constructed
1067 * and returned. The caller owns this new object and must drop their
1068 * reference to it when finished with it.
1069 * The type of the #GSocketConnection object returned depends on the type of
1070 * the underlying socket that is used. For instance, for a TCP/IP connection
1071 * it will be a #GTcpConnection.
1072 * The socket created will be the same family as the the address that the
1073 * or indirectly via g_socket_client_set_local_address(). The socket type
1074 * defaults to %G_SOCKET_TYPE_STREAM but can be set with
1075 * g_socket_client_set_socket_type().
1076 * If a local address is specified with g_socket_client_set_local_address() the
1077 * socket will be bound to this address before connecting.
1079 * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
1085 * g_settings_unbind:
1086 * @object: the object
1087 * @property: the property whose binding is removed
1089 * Removes an existing binding for @property on @object.
1090 * Note that bindings are automatically removed when the
1091 * object is finalized, so it is rarely necessary to call this
1099 * g_file_input_stream_query_info_finish:
1100 * @stream: a #GFileInputStream.
1101 * @result: a #GAsyncResult.
1102 * @error: a #GError location to store the error occuring, or %NULL to ignore.
1104 * Finishes an asynchronous info query operation.
1106 * Returns: (transfer full): #GFileInfo.
1111 * GInetAddress:is-mc-link-local:
1113 * Whether this is a link-local multicast address.
1114 * See g_inet_address_get_is_mc_link_local().
1121 * GUnixCredentialsMessage:credentials:
1123 * The credentials stored in the message.
1130 * g_mount_is_shadowed:
1131 * @mount: A #GMount.
1133 * Determines if @mount is shadowed. Applications or libraries should
1134 * avoid displaying @mount in the user interface if it is shadowed.
1135 * A mount is said to be shadowed if there exists one or more user
1136 * visible objects (currently #GMount objects) with a root that is
1137 * inside the root of @mount.
1138 * One application of shadow mounts is when exposing a single file
1139 * system that is used to address several logical volumes. In this
1140 * situation, a #GVolumeMonitor implementation would create two
1141 * #GVolume objects (for example, one for the camera functionality of
1142 * the device and one for a SD card reader on the device) with
1143 * activation URIs <literal>gphoto2://[usb:001,002]/store1/</literal>
1144 * and <literal>gphoto2://[usb:001,002]/store2/</literal>. When the
1145 * underlying mount (with root
1146 * <literal>gphoto2://[usb:001,002]/</literal>) is mounted, said
1147 * #GVolumeMonitor implementation would create two #GMount objects
1148 * (each with their root matching the corresponding volume activation
1149 * root) that would shadow the original mount.
1150 * The proxy monitor in GVfs 2.26 and later, automatically creates and
1151 * manage shadow mounts (and shadows the underlying mount) if the
1152 * activation root on a #GVolume is set.
1154 * Returns: %TRUE if @mount is shadowed.
1160 * g_io_scheduler_push_job:
1161 * @job_func: a #GIOSchedulerJobFunc.
1162 * @user_data: data to pass to @job_func
1163 * @notify: a #GDestroyNotify for @user_data, or %NULL
1164 * @io_priority: the <link linkend="gioscheduler">I/O priority</link> of the request.
1165 * @cancellable: optional #GCancellable object, %NULL to ignore.
1167 * Schedules the I/O job to run.
1168 * regardless whether the job was cancelled or has run to completion.
1169 * If @cancellable is not %NULL, it can be used to cancel the I/O job
1170 * by calling g_cancellable_cancel() or by calling
1171 * g_io_scheduler_cancel_all_jobs().
1176 * g_dbus_message_set_serial:
1177 * @message: A #GDBusMessage.
1178 * @serial: A #guint32.
1180 * Sets the serial for @message.
1187 * g_dbus_auth_observer_authorize_authenticated_peer:
1188 * @observer: A #GDBusAuthObserver.
1189 * @stream: A #GIOStream for the #GDBusConnection.
1190 * @credentials: Credentials received from the peer or %NULL.
1192 * Emits the #GDBusAuthObserver::authorize-authenticated-peer signal on @observer.
1194 * Returns: %TRUE if the peer is authorized, %FALSE if not.
1200 * g_io_stream_get_output_stream:
1201 * @stream: a #GIOStream
1203 * Gets the output stream for this object. This is used for
1207 * Returns: (transfer none): a #GOutputStream, owned by the #GIOStream.
1213 * g_file_query_settable_attributes:
1214 * @file: input #GFile.
1215 * @cancellable: optional #GCancellable object, %NULL to ignore.
1216 * @error: a #GError, or %NULL
1218 * Obtain the list of settable attributes for the file.
1219 * Returns the type and full attribute name of all the attributes
1220 * that can be set on this file. This doesn't mean setting it will always
1221 * succeed though, you might get an access failure, or some specific
1222 * file may not support a specific attribute.
1223 * If @cancellable is not %NULL, then the operation can be cancelled by
1224 * triggering the cancellable object from another thread. If the operation
1225 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
1226 * When you are done with it, release it with g_file_attribute_info_list_unref()
1228 * Returns: a #GFileAttributeInfoList describing the settable attributes.
1233 * GActionGroup::action-added:
1234 * @action_group: the #GActionGroup that changed
1235 * @action_name: the name of the action in @action_group
1237 * Signals that a new action was just added to the group. This signal
1238 * is emitted after the action has been added and is now visible.
1245 * GWin32InputStream:close-handle:
1247 * Whether to close the file handle when the stream is closed.
1254 * g_socket_listener_set_backlog:
1255 * @listener: a #GSocketListener
1256 * @listen_backlog: an integer
1258 * Sets the listen backlog on the sockets in the listener.
1259 * See g_socket_set_listen_backlog() for details
1266 * GFilenameCompleter::got-completion-data:
1268 * Emitted when the file name completion information comes available.
1273 * g_dbus_connection_flush_finish:
1274 * @connection: A #GDBusConnection.
1275 * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_flush().
1276 * @error: Return location for error or %NULL.
1278 * Finishes an operation started with g_dbus_connection_flush().
1280 * Returns: %TRUE if the operation succeeded, %FALSE if @error is set.
1286 * g_dbus_method_invocation_get_message:
1287 * @invocation: A #GDBusMethodInvocation.
1289 * Gets the #GDBusMessage for the method invocation. This is useful if
1290 * you need to use low-level protocol features, such as UNIX file
1291 * descriptor passing, that cannot be properly expressed in the
1293 * See <xref linkend="gdbus-server"/> and <xref
1294 * linkend="gdbus-unix-fd-client"/> for an example of how to use this
1295 * low-level API to send and receive UNIX file descriptors.
1297 * Returns: (transfer none): #GDBusMessage. Do not free, it is owned by @invocation.
1303 * g_socket_create_source:
1304 * @socket: a #GSocket
1305 * @condition: a #GIOCondition mask to monitor
1306 * @cancellable: a %GCancellable or %NULL
1308 * Creates a %GSource that can be attached to a %GMainContext to monitor
1309 * for the availibility of the specified @condition on the socket.
1310 * The callback on the source is of the #GSocketSourceFunc type.
1311 * It is meaningless to specify %G_IO_ERR or %G_IO_HUP in @condition;
1312 * these conditions will always be reported output if they are true.
1313 * cause the source to trigger, reporting the current condition (which
1314 * is likely 0 unless cancellation happened at the same time as a
1315 * condition change). You can check for this in the callback using
1316 * g_cancellable_is_cancelled().
1317 * If @socket has a timeout set, and it is reached before @condition
1318 * occurs, the source will then trigger anyway, reporting %G_IO_IN or
1319 * %G_IO_OUT depending on @condition. However, @socket will have been
1320 * marked as having had a timeout, and so the next #GSocket I/O method
1321 * you call will then fail with a %G_IO_ERROR_TIMED_OUT.
1323 * Returns: (transfer full): a newly allocated %GSource, free with g_source_unref().
1329 * g_file_attribute_matcher_enumerate_namespace:
1330 * @matcher: a #GFileAttributeMatcher.
1331 * @ns: a string containing a file attribute namespace.
1333 * Checks if the matcher will match all of the keys in a given namespace.
1334 * This will always return %TRUE if a wildcard character is in use (e.g. if
1335 * matcher was created with "standard::*" and @ns is "standard", or if matcher was created
1336 * using "*" and namespace is anything.)
1337 * in the given @ns, %FALSE otherwise.
1339 * Todo: this is awkwardly worded.
1340 * Returns: %TRUE if the matcher matches all of the entries
1345 * g_simple_async_result_get_op_res_gboolean:
1346 * @simple: a #GSimpleAsyncResult.
1348 * Gets the operation result boolean from within the asynchronous result.
1349 * if the operation's result was %FALSE.
1351 * Returns: %TRUE if the operation's result was %TRUE, %FALSE
1356 * SECTION:gnetworkaddres:
1357 * @short_description: A GSocketConnectable for resolving hostnames
1358 * @include: gio/gio.h
1360 * #GNetworkAddress provides an easy way to resolve a hostname and
1361 * then attempt to connect to that host, handling the possibility of
1362 * multiple IP addresses and multiple address families.
1363 * See #GSocketConnectable for and example of using the connectable
1369 * g_application_get_is_remote:
1370 * @application: a #GApplication
1371 * @returns: %TRUE if @application is remote
1373 * Checks if @application is remote.
1374 * If @application is remote then it means that another instance of
1375 * application already exists (the 'primary' instance). Calls to
1376 * perform actions on @application will result in the actions being
1377 * performed by the primary instance.
1378 * The value of this property can not be accessed before
1379 * g_application_register() has been called. See
1380 * g_application_get_is_registered().
1387 * GVolumeMonitor::drive-changed:
1388 * @volume_monitor: The volume monitor emitting the signal.
1389 * @drive: the drive that changed
1391 * Emitted when a drive changes.
1396 * g_credentials_get_unix_user:
1397 * @credentials: A #GCredentials
1398 * @error: Return location for error or %NULL.
1400 * Tries to get the UNIX user identifier from @credentials. This
1401 * method is only available on UNIX platforms.
1402 * This operation can fail if #GCredentials is not supported on the
1403 * OS or if the native credentials type does not contain information
1404 * about the UNIX user.
1406 * Returns: The UNIX user identifier or -1 if @error is set.
1412 * SECTION:gemblemedico:
1413 * @short_description: Icon with emblems
1414 * @include: gio/gio.h
1415 * @see_also: #GIcon, #GLoadableIcon, #GThemedIcon, #GEmblem
1417 * #GEmblemedIcon is an implementation of #GIcon that supports
1418 * adding an emblem to an icon. Adding multiple emblems to an
1419 * icon is ensured via g_emblemed_icon_add_emblem().
1420 * Note that #GEmblemedIcon allows no control over the position
1421 * of the emblems. See also #GEmblem for more information.
1426 * g_file_enumerator_set_pending:
1427 * @enumerator: a #GFileEnumerator.
1428 * @pending: a boolean value.
1430 * Sets the file enumerator as having pending operations.
1435 * g_dbus_proxy_get_default_timeout:
1436 * @proxy: A #GDBusProxy.
1438 * Gets the timeout to use if -1 (specifying default timeout) is
1439 * passed as @timeout_msec in the g_dbus_proxy_call() and
1440 * g_dbus_proxy_call_sync() functions.
1441 * See the #GDBusProxy:g-default-timeout property for more details.
1443 * Returns: Timeout to use for @proxy.
1449 * g_application_release:
1450 * @application: a #GApplication
1452 * Decrease the use count of @application.
1453 * When the use count reaches zero, the application will stop running.
1454 * Never call this function except to cancel the effect of a previous
1455 * call to g_application_hold().
1460 * GSocketService::incoming:
1461 * @service: the #GSocketService.
1462 * @connection: a new #GSocketConnection object.
1463 * @source_object: the source_object passed to g_socket_listener_add_address().
1465 * The ::incoming signal is emitted when a new incoming connection
1466 * to @service needs to be handled. The handler must initiate the
1467 * handling of @connection, but may not block; in essence,
1468 * asynchronous operations must be used.
1470 * Returns: %TRUE to stop other handlers from being called
1476 * g_io_error_from_errno:
1477 * @err_no: Error number as defined in errno.h.
1479 * Converts errno.h error codes into GIO error codes.
1481 * Returns: #GIOErrorEnum value for the given errno.h error number.
1486 * g_file_enumerator_get_container:
1487 * @enumerator: a #GFileEnumerator
1489 * Get the #GFile container which is being enumerated.
1491 * Returns: (transfer full): the #GFile which is being enumerated.
1497 * g_volume_monitor_adopt_orphan_mount:
1498 * @mount: a #GMount object to find a parent for
1500 * This function should be called by any #GVolumeMonitor
1501 * implementation when a new #GMount object is created that is not
1502 * associated with a #GVolume object. It must be called just before
1503 * emitting the @mount_added signal.
1504 * If the return value is not %NULL, the caller must associate the
1505 * returned #GVolume object with the #GMount. This involves returning
1506 * it in its g_mount_get_volume() implementation. The caller must
1507 * also listen for the "removed" signal on the returned object
1508 * and give up its reference when handling that signal
1509 * Similary, if implementing g_volume_monitor_adopt_orphan_mount(),
1510 * the implementor must take a reference to @mount and return it in
1511 * its g_volume_get_mount() implemented. Also, the implementor must
1512 * listen for the "unmounted" signal on @mount and give up its
1513 * reference upon handling that signal.
1514 * There are two main use cases for this function.
1515 * One is when implementing a user space file system driver that reads
1516 * blocks of a block device that is already represented by the native
1517 * volume monitor (for example a CD Audio file system driver). Such
1518 * a driver will generate its own #GMount object that needs to be
1519 * assoicated with the #GVolume object that represents the volume.
1520 * The other is for implementing a #GVolumeMonitor whose sole purpose
1521 * is to return #GVolume objects representing entries in the users
1522 * "favorite servers" list or similar.
1523 * if no wants to adopt the #GMount.
1524 * implementations should instead create shadow mounts with the URI of
1525 * the mount they intend to adopt. See the proxy volume monitor in
1526 * gvfs for an example of this. Also see g_mount_is_shadowed(),
1527 * g_mount_shadow() and g_mount_unshadow() functions.
1529 * Returns: (transfer full): the #GVolume object that is the parent for @mount or %NULL
1530 * Deprecated: 2.20: Instead of using this function, #GVolumeMonitor
1535 * g_action_get_state:
1536 * @action: a #GAction
1538 * Queries the current state of @action.
1539 * If the action is not stateful then %NULL will be returned. If the
1540 * action is stateful then the type of the return value is the type
1541 * given by g_action_get_state_type().
1542 * The return value (if non-%NULL) should be freed with
1543 * g_variant_unref() when it is no longer required.
1545 * Returns: (transfer full): the current state of the action
1551 * g_dbus_connection_emit_signal:
1552 * @connection: A #GDBusConnection.
1553 * @destination_bus_name: The unique bus name for the destination for the signal or %NULL to emit to all listeners.
1554 * @object_path: Path of remote object.
1555 * @interface_name: D-Bus interface to emit a signal on.
1556 * @signal_name: The name of the signal to emit.
1557 * @parameters: A #GVariant tuple with parameters for the signal or %NULL if not passing parameters.
1558 * @error: Return location for error or %NULL.
1561 * If the parameters GVariant is floating, it is consumed.
1562 * This can only fail if @parameters is not compatible with the D-Bus protocol.
1564 * Returns: %TRUE unless @error is set.
1570 * g_emblemed_icon_add_emblem:
1571 * @emblemed: a #GEmblemedIcon
1572 * @emblem: a #GEmblem
1574 * Adds @emblem to the #GList of #GEmblem <!-- -->s.
1581 * g_emblem_get_icon:
1582 * @emblem: a #GEmblem from which the icon should be extracted.
1584 * Gives back the icon from @emblem.
1585 * and should not be modified or freed.
1587 * Returns: (transfer full): a #GIcon. The returned object belongs to the emblem
1593 * SECTION:gfilemonito:
1594 * @short_description: File Monitor
1595 * @include: gio/gio.h
1597 * Monitors a file or directory for changes.
1598 * To obtain a #GFileMonitor for a file or directory, use
1599 * g_file_monitor(), g_file_monitor_file(), or
1600 * g_file_monitor_directory().
1601 * To get informed about changes to the file or directory you are
1602 * monitoring, connect to the #GFileMonitor::changed signal. The
1603 * signal will be emitted in the <link
1604 * linkend="g-main-context-push-thread-default">thread-default main
1605 * context</link> of the thread that the monitor was created in
1606 * (though if the global default main context is blocked, this may
1607 * cause notifications to be blocked even if the thread-default
1608 * context is still running).
1613 * g_dbus_node_info_ref:
1614 * @info: A #GDBusNodeInfo
1616 * If @info is statically allocated does nothing. Otherwise increases
1617 * the reference count.
1619 * Returns: The same @info.
1625 * g_action_get_enabled:
1626 * @action: a #GAction
1628 * Checks if @action is currently enabled.
1629 * An action must be enabled in order to be activated or in order to
1630 * have its state changed from outside callers.
1632 * Returns: whether the action is enabled
1638 * g_dbus_connection_new_for_address:
1639 * @address: A D-Bus address.
1640 * @flags: Flags describing how to make the connection.
1641 * @observer: A #GDBusAuthObserver or %NULL.
1642 * @cancellable: A #GCancellable or %NULL.
1643 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
1644 * @user_data: The data to pass to @callback.
1646 * Asynchronously connects and sets up a D-Bus client connection for
1647 * exchanging D-Bus messages with an endpoint specified by @address
1648 * which must be in the D-Bus address format.
1649 * This constructor can only be used to initiate client-side
1650 * connections - use g_dbus_connection_new() if you need to act as the
1651 * server. In particular, @flags cannot contain the
1652 * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER or
1653 * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS flags.
1654 * When the operation is finished, @callback will be invoked. You can
1655 * then call g_dbus_connection_new_finish() to get the result of the
1657 * If @observer is not %NULL it may be used to control the
1658 * authentication process.
1659 * This is a asynchronous failable constructor. See
1660 * g_dbus_connection_new_for_address_sync() for the synchronous
1668 * g_drive_get_identifier:
1670 * @kind: the kind of identifier to return
1672 * Gets the identifier of the given kind for @drive.
1673 * requested identfier, or %NULL if the #GDrive
1674 * doesn't have this kind of identifier.
1676 * Returns: a newly allocated string containing the
1681 * GMountOperation:password:
1683 * The password that is used for authentication when carrying out
1684 * the mount operation.
1689 * g_network_service_set_scheme:
1690 * @srv: a #GNetworkService
1691 * @scheme: a URI scheme
1693 * Set's the URI scheme used to resolve proxies. By default, the service name
1694 * is used as scheme.
1701 * g_win32_output_stream_new:
1702 * @handle: a Win32 file handle
1703 * @close_handle: %TRUE to close the handle when done
1705 * Creates a new #GWin32OutputStream for the given @handle.
1706 * If @close_handle, is %TRUE, the handle will be closed when the
1707 * output stream is destroyed.
1709 * Returns: a new #GOutputStream
1715 * g_volume_get_mount:
1716 * @volume: a #GVolume.
1718 * Gets the mount for the @volume.
1719 * The returned object should be unreffed with g_object_unref()
1720 * when no longer needed.
1722 * Returns: (transfer full): a #GMount or %NULL if @volume isn't mounted.
1727 * g_unix_socket_address_new:
1728 * @path: the socket path
1730 * Creates a new #GUnixSocketAddress for @path.
1731 * To create abstract socket addresses, on systems that support that,
1732 * use g_unix_socket_address_new_abstract().
1734 * Returns: a new #GUnixSocketAddress
1740 * GMountOperation:password-save:
1742 * Determines if and how the password information should be saved.
1747 * g_dbus_proxy_get_flags:
1748 * @proxy: A #GDBusProxy.
1750 * Gets the flags that @proxy was constructed with.
1752 * Returns: Flags from the #GDBusProxyFlags enumeration.
1758 * g_inet_address_get_is_mc_global:
1759 * @address: a #GInetAddress
1761 * Tests whether @address is a global multicast address.
1763 * Returns: %TRUE if @address is a global multicast address.
1769 * GPermission:can-acquire:
1771 * %TRUE if it is generally possible to acquire the permission by calling
1772 * g_permission_acquire().
1777 * GMemoryOutputStream:realloc-function:
1779 * Function with realloc semantics called to enlarge the buffer.
1786 * g_unix_input_stream_get_close_fd:
1787 * @stream: a #GUnixInputStream
1789 * Returns whether the file descriptor of @stream will be
1790 * closed when the stream is closed.
1792 * Returns: %TRUE if the file descriptor is closed when done
1798 * g_dbus_proxy_new_sync:
1799 * @connection: A #GDBusConnection.
1800 * @flags: Flags used when constructing the proxy.
1801 * @info: (allow-none): A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL.
1802 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
1803 * @object_path: An object path.
1804 * @interface_name: A D-Bus interface name.
1805 * @cancellable: (allow-none): A #GCancellable or %NULL.
1806 * @error: (allow-none): Return location for error or %NULL.
1808 * Creates a proxy for accessing @interface_name on the remote object
1809 * at @object_path owned by @name at @connection and synchronously
1810 * loads D-Bus properties unless the
1811 * %G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES flag is used.
1812 * If the %G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS flag is not set, also sets up
1813 * match rules for signals. Connect to the #GDBusProxy::g-signal signal
1814 * to handle signals from the remote object.
1815 * If @name is a well-known name and the
1816 * %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag isn't set and no name
1817 * owner currently exists, the message bus will be requested to launch
1818 * a name owner for the name.
1819 * This is a synchronous failable constructor. See g_dbus_proxy_new()
1820 * and g_dbus_proxy_new_finish() for the asynchronous version.
1821 * See <xref linkend="gdbus-wellknown-proxy"/> for an example of how #GDBusProxy can be used.
1823 * Returns: A #GDBusProxy or %NULL if error is set. Free with g_object_unref().
1829 * SECTION:gdbusconnectio:
1830 * @short_description: D-Bus Connections
1831 * @include: gio/gio.h
1833 * The #GDBusConnection type is used for D-Bus connections to remote
1834 * peers such as a message buses. It is a low-level API that offers a
1835 * lot of flexibility. For instance, it lets you establish a connection
1836 * over any transport that can by represented as an #GIOStream.
1837 * This class is rarely used directly in D-Bus clients. If you are writing
1838 * an D-Bus client, it is often easier to use the g_bus_own_name(),
1839 * g_bus_watch_name() or g_dbus_proxy_new_for_bus() APIs.
1840 * <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>
1841 * <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>
1842 * <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>
1843 * <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>
1848 * SECTION:gfileinputstrea:
1849 * @short_description: File input streaming operations
1850 * @include: gio/gio.h
1851 * @see_also: #GInputStream, #GDataInputStream, #GSeekable
1853 * GFileInputStream provides input streams that take their
1854 * content from a file.
1855 * GFileInputStream implements #GSeekable, which allows the input
1856 * stream to jump to arbitrary positions in the file, provided the
1857 * filesystem of the file allows it. To find the position of a file
1858 * input stream, use g_seekable_tell(). To find out if a file input
1859 * stream supports seeking, use g_seekable_stream_can_seek().
1860 * To position a file input stream, use g_seekable_seek().
1865 * g_socket_client_new:
1867 * Creates a new #GSocketClient with the default options.
1868 * Free the returned object with g_object_unref().
1870 * Returns: a #GSocketClient.
1876 * GDBusProxy:g-connection:
1878 * The #GDBusConnection the proxy is for.
1885 * g_file_enumerator_has_pending:
1886 * @enumerator: a #GFileEnumerator.
1888 * Checks if the file enumerator has pending operations.
1890 * Returns: %TRUE if the @enumerator has pending operations.
1896 * @socket: a #GSocket
1897 * @address: a #GSocketAddress, or %NULL
1898 * @buffer: the buffer containing the data to send.
1899 * @size: the number of bytes to send
1900 * @cancellable: a %GCancellable or %NULL
1901 * @error: #GError for error reporting, or %NULL to ignore.
1903 * Tries to send @size bytes from @buffer to @address. If @address is
1904 * %NULL then the message is sent to the default receiver (set by
1905 * g_socket_connect()).
1906 * See g_socket_send() for additional information.
1909 * Returns: Number of bytes written (which may be less than @size), or -1
1915 * g_file_new_for_uri:
1916 * @uri: a UTF8 string containing a URI.
1918 * Constructs a #GFile for a given URI. This operation never
1919 * fails, but the returned object might not support any I/O
1920 * operation if @uri is malformed or if the uri type is
1923 * Returns: (transfer full): a #GFile for the given @uri.
1928 * g_mount_operation_set_anonymous:
1929 * @op: a #GMountOperation.
1930 * @anonymous: boolean value.
1932 * Sets the mount operation to use an anonymous user if @anonymous is %TRUE.
1938 * @title: GUnixFDMessage
1939 * @short_description: A GSocketControlMessage containing a GUnixFDList
1940 * @include: gio/gunixfdmessage.h
1941 * @see_also: #GUnixConnection, #GUnixFDList, #GSocketControlMessage
1943 * This #GSocketControlMessage contains a #GUnixFDList.
1944 * It may be sent using g_socket_send_message() and received using
1945 * %G_SOCKET_ADDRESS_UNIX family). The file descriptors are copied
1946 * between processes by the kernel.
1947 * For an easier way to send and receive file descriptors over
1948 * stream-oriented UNIX sockets, see g_unix_connection_send_fd() and
1949 * g_unix_connection_receive_fd().
1950 * Note that <filename><gio/gunixfdmessage.h></filename> belongs to
1951 * the UNIX-specific GIO interfaces, thus you have to use the
1952 * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
1954 * G_socket_receive_message() over unix sockets (ie: sockets in the
1960 * @short_description: Drive management
1961 * @include: gio/gio.h
1963 * #GDrive - this represent a piece of hardware connected to the machine.
1964 * It's generally only created for removable hardware or hardware with
1966 * #GDrive is a container class for #GVolume objects that stem from
1967 * the same piece of media. As such, #GDrive abstracts a drive with
1968 * (or without) removable media and provides operations for querying
1969 * whether media is available, determing whether media change is
1970 * automatically detected and ejecting the media.
1971 * If the #GDrive reports that media isn't automatically detected, one
1972 * can poll for media; typically one should not do this periodically
1973 * as a poll for media operation is potententially expensive and may
1974 * spin up the drive creating noise.
1975 * #GDrive supports starting and stopping drives with authentication
1976 * support for the former. This can be used to support a diverse set
1977 * of use cases including connecting/disconnecting iSCSI devices,
1978 * powering down external disk enclosures and starting/stopping
1979 * multi-disk devices such as RAID devices. Note that the actual
1980 * semantics and side-effects of starting/stopping a #GDrive may vary
1981 * according to implementation. To choose the correct verbs in e.g. a
1982 * file manager, use g_drive_get_start_stop_type().
1983 * For porting from GnomeVFS note that there is no equivalent of
1984 * #GDrive in that API.
1990 * @periodic: a #GPeriodic clock
1991 * @callback: a #GPeriodicTickFunc function
1992 * @user_data: data for @callback
1993 * @notify: for freeing @user_data when it is no longer needed
1995 * Request periodic calls to @callback to start. The periodicity of the
1996 * calls is determined by the 'hz' property.
1997 * This function may not be called from a handler of the repair signal,
1998 * but it is perfectly reasonable to call it from a handler of the tick
2000 * The callback may be cancelled later by using g_periodic_remove() on
2001 * the return value of this function.
2003 * Returns: a non-zero tag identifying this callback
2009 * g_dbus_message_get_header_fields:
2010 * @message: A #GDBusMessage.
2012 * Gets an array of all header fields on @message that are set.
2013 * %G_DBUS_MESSAGE_HEADER_FIELD_INVALID. Each element is a
2014 * #guchar. Free with g_free().
2016 * Returns: An array of header fields terminated by
2022 * g_application_get_application_id:
2023 * @application: a #GApplication
2024 * @returns: the identifier for @application, owned by @application
2026 * Gets the unique identifier for @application.
2033 * g_socket_connection_factory_create_connection:
2034 * @socket: a #GSocket
2036 * Creates a #GSocketConnection subclass of the right type for
2038 * Returns: (transfer full): a #GSocketConnection
2044 * g_drive_poll_for_media:
2045 * @drive: a #GDrive.
2046 * @cancellable: optional #GCancellable object, %NULL to ignore.
2047 * @callback: a #GAsyncReadyCallback, or %NULL.
2048 * @user_data: user data to pass to @callback
2050 * Asynchronously polls @drive to see if media has been inserted or removed.
2051 * When the operation is finished, @callback will be called.
2052 * You can then call g_drive_poll_for_media_finish() to obtain the
2053 * result of the operation.
2059 * @file: #GFile to send to trash.
2060 * @cancellable: optional #GCancellable object, %NULL to ignore.
2061 * @error: a #GError, or %NULL
2063 * Sends @file to the "Trashcan", if possible. This is similar to
2064 * deleting it, but the user can recover it before emptying the trashcan.
2065 * Not all file systems support trashing, so this call can return the
2066 * %G_IO_ERROR_NOT_SUPPORTED error.
2067 * If @cancellable is not %NULL, then the operation can be cancelled by
2068 * triggering the cancellable object from another thread. If the operation
2069 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
2071 * Returns: %TRUE on successful trash, %FALSE otherwise.
2076 * g_unix_mounts_get:
2077 * @time_read: (allow-none): guint64 to contain a timestamp, or %NULL
2079 * Gets a #GList of #GUnixMountEntry containing the unix mounts.
2080 * If @time_read is set, it will be filled with the mount
2081 * timestamp, allowing for checking if the mounts have changed
2082 * with g_unix_mounts_changed_since().
2084 * Returns: (element-type utf8) (transfer full): a #GList of the UNIX mounts.
2090 * @short_description: Application information and launch contexts
2091 * @include: gio/gio.h
2093 * #GAppInfo and #GAppLaunchContext are used for describing and launching
2094 * applications installed on the system.
2095 * As of GLib 2.20, URIs will always be converted to POSIX paths
2096 * (using g_file_get_path()) when using g_app_info_launch() even if
2097 * the application requested an URI and not a POSIX path. For example
2098 * for an desktop-file based application with Exec key <literal>totem
2099 * %%U</literal> and a single URI,
2100 * <literal>sftp://foo/file.avi</literal>, then
2101 * <literal>/home/user/.gvfs/sftp on foo/file.avi</literal> will be
2102 * passed. This will only work if a set of suitable GIO extensions
2103 * (such as gvfs 2.26 compiled with FUSE support), is available and
2104 * operational; if this is not the case, the URI will be passed
2105 * unmodified to the application. Some URIs, such as
2106 * <literal>mailto:</literal>, of course cannot be mapped to a POSIX
2107 * path (in gvfs there's no FUSE mount for it); such URIs will be
2108 * passed unmodified to the application.
2109 * Specifically for gvfs 2.26 and later, the POSIX URI will be mapped
2110 * back to the GIO URI in the #GFile constructors (since gvfs
2111 * implements the #GVfs extension point). As such, if the application
2112 * needs to examine the URI, it needs to use g_file_get_uri() or
2113 * similar on #GFile. In other words, an application cannot assume
2114 * that the URI passed to e.g. g_file_new_for_commandline_arg() is
2115 * equal to the result of g_file_get_uri(). The following snippet
2120 * file = g_file_new_for_commandline_arg (uri_from_commandline);
2121 * uri = g_file_get_uri (file);
2122 * strcmp (uri, uri_from_commandline) == 0; // FALSE
2124 * if (g_file_has_uri_scheme (file, "cdda"))
2126 * // do something special with uri
2128 * g_object_unref (file);
2130 * This code will work when both <literal>cdda://sr0/Track
2131 * 1.wav</literal> and <literal>/home/user/.gvfs/cdda on sr0/Track
2132 * 1.wav</literal> is passed to the application. It should be noted
2133 * that it's generally not safe for applications to rely on the format
2134 * of a particular URIs. Different launcher applications (e.g. file
2135 * managers) may have different ideas of what a given URI means.
2140 * g_proxy_address_get_destination_por:
2141 * @proxy: a #GProxyAddress
2143 * Gets @proxy's destination port.
2145 * Returns: the @proxy's destination port
2151 * g_action_group_get_action_state_type:
2152 * @action_group: a #GActionGroup
2153 * @action_name: the name of the action to query
2155 * Queries the type of the state of the named action within
2156 * If the action is stateful then this function returns the
2157 * #GVariantType of the state. All calls to g_action_group_set_state()
2158 * must give a #GVariant of this type and g_action_group_get_state()
2159 * will return a #GVariant of the same type.
2160 * If the action is not stateful then this function will return %NULL.
2161 * In that case, g_action_group_get_state() will return %NULL and you
2162 * must not call g_action_group_set_state().
2163 * The state type of a particular action will never change but it is
2164 * possible for an action to be removed and for a new action to be added
2165 * with the same name but a different state type.
2167 * Returns: (transfer full): the state type, if the action is stateful
2173 * g_application_activate:
2174 * @application: a #GApplication
2176 * Activates the application.
2177 * In essence, this results in the #GApplication::activate() signal being
2178 * emitted in the primary instance.
2179 * The application must be registered before calling this function.
2186 * g_mount_unmount_with_operation:
2187 * @mount: a #GMount.
2188 * @flags: flags affecting the operation
2189 * @mount_operation: a #GMountOperation or %NULL to avoid user interaction.
2190 * @cancellable: optional #GCancellable object, %NULL to ignore.
2191 * @callback: a #GAsyncReadyCallback, or %NULL.
2192 * @user_data: user data passed to @callback.
2194 * Unmounts a mount. This is an asynchronous operation, and is
2195 * finished by calling g_mount_unmount_with_operation_finish() with the @mount
2196 * and #GAsyncResult data returned in the @callback.
2203 * g_dbus_connection_register_object:
2204 * @connection: A #GDBusConnection.
2205 * @object_path: The object path to register at.
2206 * @interface_info: Introspection data for the interface.
2207 * @vtable: A #GDBusInterfaceVTable to call into or %NULL.
2208 * @user_data: Data to pass to functions in @vtable.
2209 * @user_data_free_func: Function to call when the object path is unregistered.
2210 * @error: Return location for error or %NULL.
2212 * Registers callbacks for exported objects at @object_path with the
2213 * D-Bus interface that is described in @interface_info.
2214 * Calls to functions in @vtable (and @user_data_free_func) will
2215 * happen in the <link linkend="g-main-context-push-thread-default">thread-default main
2216 * loop</link> of the thread you are calling this method from.
2217 * Note that all #GVariant values passed to functions in @vtable will match
2218 * the signature given in @interface_info - if a remote caller passes
2219 * incorrect values, the <literal>org.freedesktop.DBus.Error.InvalidArgs</literal>
2220 * is returned to the remote caller.
2221 * Additionally, if the remote caller attempts to invoke methods or
2222 * access properties not mentioned in @interface_info the
2223 * <literal>org.freedesktop.DBus.Error.UnknownMethod</literal> resp.
2224 * <literal>org.freedesktop.DBus.Error.InvalidArgs</literal> errors
2225 * are returned to the caller.
2226 * It is considered a programming error if the
2227 * #GDBusInterfaceGetPropertyFunc function in @vtable returns a
2228 * #GVariant of incorrect type.
2229 * If an existing callback is already registered at @object_path and
2230 * GDBus automatically implements the standard D-Bus interfaces
2231 * org.freedesktop.DBus.Properties, org.freedesktop.DBus.Introspectable
2232 * and org.freedesktop.Peer, so you don't have to implement those for
2233 * the objects you export. You <emphasis>can</emphasis> implement
2234 * org.freedesktop.DBus.Properties yourself, e.g. to handle getting
2235 * and setting of properties asynchronously.
2236 * Note that the reference count on @interface_info will be
2237 * incremented by 1 (unless allocated statically, e.g. if the
2238 * reference count is -1, see g_dbus_interface_info_ref()) for as long
2239 * as the object is exported. Also note that @vtable will be copied.
2240 * See <xref linkend="gdbus-server"/> for an example of how to use this method.
2241 * that can be used with g_dbus_connection_unregister_object() .
2243 * Returns: 0 if @error is set, otherwise a registration id (never 0)
2249 * g_file_stop_mountable_finish:
2250 * @file: input #GFile.
2251 * @result: a #GAsyncResult.
2252 * @error: a #GError, or %NULL
2254 * Finishes an stop operation, see g_file_stop_mountable() for details.
2255 * Finish an asynchronous stop operation that was started
2256 * with g_file_stop_mountable().
2259 * Returns: %TRUE if the operation finished successfully. %FALSE
2265 * g_cancellable_get_current:
2267 * Gets the top cancellable from the stack.
2268 * if the stack is empty.
2270 * Returns: (transfer none): a #GCancellable from the top of the stack, or %NULL
2275 * g_file_replace_readwrite_async:
2276 * @file: input #GFile.
2277 * @etag: (allow-none): an <link linkend="gfile-etag">entity tag</link> for the current #GFile, or NULL to ignore.
2278 * @make_backup: %TRUE if a backup should be created.
2279 * @flags: a set of #GFileCreateFlags.
2280 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
2281 * @cancellable: optional #GCancellable object, %NULL to ignore.
2282 * @callback: a #GAsyncReadyCallback to call when the request is satisfied
2283 * @user_data: the data to pass to callback function
2285 * Asynchronously overwrites the file in read-write mode, replacing the
2286 * contents, possibly creating a backup copy of the file first.
2287 * For more details, see g_file_replace_readwrite() which is
2288 * the synchronous version of this call.
2289 * When the operation is finished, @callback will be called. You can then
2290 * call g_file_replace_readwrite_finish() to get the result of the operation.
2297 * g_dbus_server_new_sync:
2298 * @address: A D-Bus address.
2299 * @flags: Flags from the #GDBusServerFlags enumeration.
2300 * @guid: A D-Bus GUID.
2301 * @observer: A #GDBusAuthObserver or %NULL.
2302 * @cancellable: A #GCancellable or %NULL.
2303 * @error: Return location for server or %NULL.
2305 * Creates a new D-Bus server that listens on the first address in
2306 * Once constructed, you can use g_dbus_server_get_client_address() to
2307 * get a D-Bus address string that clients can use to connect.
2308 * Connect to the #GDBusServer::new-connection signal to handle
2309 * incoming connections.
2310 * The returned #GDBusServer isn't active - you have to start it with
2311 * g_dbus_server_start().
2312 * See <xref linkend="gdbus-peer-to-peer"/> for how #GDBusServer can
2314 * This is a synchronous failable constructor. See
2315 * g_dbus_server_new() for the asynchronous version.
2318 * Returns: A #GDBusServer or %NULL if @error is set. Free with
2324 * g_settings_backend_flatten_tree:
2325 * @tree: a #GTree containing the changes
2326 * @path: the location to save the path
2327 * @keys: the location to save the relative keys
2328 * @values: the location to save the values, or %NULL
2330 * Calculate the longest common prefix of all keys in a tree and write
2331 * out an array of the key names relative to that prefix and,
2332 * optionally, the value to store at each of those keys.
2333 * You must free the value returned in @path, @keys and @values using
2334 * g_free(). You should not attempt to free or unref the contents of
2341 * g_poll_file_monitor_new:
2344 * Polls @file for changes.
2346 * Returns: a new #GFileMonitor for the given #GFile.
2351 * g_filter_output_stream_get_base_stream:
2352 * @stream: a #GFilterOutputStream.
2354 * Gets the base stream for the filter stream.
2356 * Returns: (transfer none): a #GOutputStream.
2361 * g_unix_mount_compare:
2362 * @mount1: first #GUnixMountEntry to compare.
2363 * @mount2: second #GUnixMountEntry to compare.
2365 * Compares two unix mounts.
2366 * or less than @mount2, respectively.
2368 * Returns: 1, 0 or -1 if @mount1 is greater than, equal to,
2373 * g_resolver_free_addresses: (skip)
2374 * @addresses: a #GList of #GInetAddress
2376 * Frees @addresses (which should be the return value from
2377 * g_resolver_lookup_by_name() or g_resolver_lookup_by_name_finish()).
2378 * (This is a convenience method; you can also simply free the results
2386 * g_action_group_get_action_parameter_type:
2387 * @action_group: a #GActionGroup
2388 * @action_name: the name of the action to query
2390 * Queries the type of the parameter that must be given when activating
2391 * the named action within @action_group.
2392 * When activating the action using g_action_group_activate(), the
2393 * #GVariant given to that function must be of the type returned by this
2395 * In the case that this function returns %NULL, you must not give any
2396 * #GVariant, but %NULL instead.
2397 * The parameter type of a particular action will never change but it is
2398 * possible for an action to be removed and for a new action to be added
2399 * with the same name but a different parameter type.
2401 * Returns: the parameter type
2407 * g_dbus_property_info_unref:
2408 * @info: A #GDBusPropertyInfo.
2410 * If @info is statically allocated, does nothing. Otherwise decreases
2411 * the reference count of @info. When its reference count drops to 0,
2412 * the memory used is freed.
2419 * g_file_unmount_mountable_with_operation:
2420 * @file: input #GFile.
2421 * @flags: flags affecting the operation
2422 * @mount_operation: a #GMountOperation, or %NULL to avoid user interaction.
2423 * @cancellable: optional #GCancellable object, %NULL to ignore.
2424 * @callback: a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
2425 * @user_data: the data to pass to callback function
2427 * Unmounts a file of type G_FILE_TYPE_MOUNTABLE.
2428 * If @cancellable is not %NULL, then the operation can be cancelled by
2429 * triggering the cancellable object from another thread. If the operation
2430 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
2431 * When the operation is finished, @callback will be called. You can then call
2432 * g_file_unmount_mountable_finish() to get the result of the operation.
2439 * g_permission_acquire_async:
2440 * @permission: a #GPermission instance
2441 * @cancellable: a #GCancellable, or %NULL
2442 * @callback: the #GAsyncReadyCallback to call when done
2443 * @user_data: the user data to pass to @callback
2445 * Attempts to acquire the permission represented by @permission.
2446 * This is the first half of the asynchronous version of
2447 * g_permission_acquire().
2454 * SECTION:gdataoutputstrea:
2455 * @short_description: Data Output Stream
2456 * @include: gio/gio.h
2457 * @see_also: #GOutputStream
2459 * Data output stream implements #GOutputStream and includes functions for
2460 * writing data directly to an output stream.
2465 * g_output_stream_splice_async:
2466 * @stream: a #GOutputStream.
2467 * @source: a #GInputStream.
2468 * @flags: a set of #GOutputStreamSpliceFlags.
2469 * @io_priority: the io priority of the request.
2470 * @cancellable: optional #GCancellable object, %NULL to ignore.
2471 * @callback: a #GAsyncReadyCallback.
2472 * @user_data: user data passed to @callback.
2474 * Splices a stream asynchronously.
2475 * When the operation is finished @callback will be called.
2476 * You can then call g_output_stream_splice_finish() to get the
2477 * result of the operation.
2478 * For the synchronous, blocking version of this function, see
2479 * g_output_stream_splice().
2485 * @other: a #GFileInfo.
2487 * Duplicates a file info structure.
2489 * Returns: (transfer full): a duplicate #GFileInfo of @other.
2494 * g_simple_action_group_lookup:
2495 * @simple: a #GSimpleActionGroup
2496 * @action_name: the name of an action
2498 * Looks up the action with the name @action_name in the group.
2499 * If no such action exists, returns %NULL.
2501 * Returns: (transfer none): a #GAction, or %NULL
2507 * g_output_stream_flush:
2508 * @stream: a #GOutputStream.
2509 * @cancellable: optional cancellable object
2510 * @error: location to store the error occuring, or %NULL to ignore
2512 * Flushed any outstanding buffers in the stream. Will block during
2513 * the operation. Closing the stream will implicitly cause a flush.
2514 * This function is optional for inherited classes.
2515 * If @cancellable is not %NULL, then the operation can be cancelled by
2516 * triggering the cancellable object from another thread. If the operation
2517 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
2519 * Returns: %TRUE on success, %FALSE on error
2525 * @string: The string to check.
2527 * Checks if @string is a D-Bus GUID.
2528 * See the D-Bus specification regarding what strings are valid D-Bus
2529 * GUID (for example, D-Bus GUIDs are not RFC-4122 compliant).
2531 * Returns: %TRUE if @string is a guid, %FALSE otherwise.
2537 * g_file_io_stream_get_etag:
2538 * @stream: a #GFileIOStream.
2540 * Gets the entity tag for the file when it has been written.
2541 * This must be called after the stream has been written
2542 * and closed, as the etag can change while writing.
2544 * Returns: the entity tag for the stream.
2550 * g_buffered_input_stream_read_byte:
2551 * @stream: a #GBufferedInputStream
2552 * @cancellable: optional #GCancellable object, %NULL to ignore
2553 * @error: location to store the error occuring, or %NULL to ignore
2555 * Tries to read a single byte from the stream or the buffer. Will block
2557 * On success, the byte read from the stream is returned. On end of stream
2558 * -1 is returned but it's not an exceptional error and @error is not set.
2559 * If @cancellable is not %NULL, then the operation can be cancelled by
2560 * triggering the cancellable object from another thread. If the operation
2561 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
2562 * operation was partially finished when the operation was cancelled the
2563 * partial result will be returned, without an error.
2564 * On error -1 is returned and @error is set accordingly.
2566 * Returns: the byte read from the @stream, or -1 on end of stream or error.
2571 * g_socket_set_blocking:
2572 * @socket: a #GSocket.
2573 * @blocking: Whether to use blocking I/O or not.
2575 * Sets the blocking mode of the socket. In blocking mode
2576 * all operations block until they succeed or there is an error. In
2577 * non-blocking mode all functions return results immediately or
2578 * with a %G_IO_ERROR_WOULD_BLOCK error.
2579 * All sockets are created in blocking mode. However, note that the
2580 * platform level socket is always non-blocking, and blocking mode
2581 * is a GSocket level feature.
2588 * g_buffered_input_stream_get_buffer_size:
2589 * @stream: a #GBufferedInputStream
2591 * Gets the size of the input buffer.
2593 * Returns: the current buffer size.
2598 * g_unix_fd_list_peek_fds:
2599 * @list: a #GUnixFDList
2600 * @length: pointer to the length of the returned array, or %NULL
2602 * Returns the array of file descriptors that is contained in this
2604 * After this call, the descriptors remain the property of @list. The
2605 * caller must not close them and must not free the array. The array is
2606 * valid only until @list is changed in any way.
2607 * If @length is non-%NULL then it is set to the number of file
2608 * descriptors in the returned array. The returned array is also
2609 * terminated with -1.
2610 * This function never returns %NULL. In case there are no file
2611 * descriptors contained in @list, an empty array is returned.
2613 * Returns: an array of file descriptors
2619 * g_network_address_new:
2620 * @hostname: the hostname
2623 * Creates a new #GSocketConnectable for connecting to the given
2625 * Returns: (transfer full): the new #GNetworkAddress
2631 * g_file_info_has_namespace:
2632 * @info: a #GFileInfo.
2633 * @name_space: a file attribute namespace.
2635 * Checks if a file info structure has an attribute in the
2636 * specified @name_space.
2639 * Returns: %TRUE if @Ginfo has an attribute in @name_space,
2645 * g_data_output_stream_put_uint32:
2646 * @stream: a #GDataOutputStream.
2647 * @data: a #guint32.
2648 * @cancellable: optional #GCancellable object, %NULL to ignore.
2649 * @error: a #GError, %NULL to ignore.
2651 * Puts an unsigned 32-bit integer into the stream.
2653 * Returns: %TRUE if @data was successfully added to the @stream.
2658 * g_file_set_attribute:
2659 * @file: input #GFile.
2660 * @attribute: a string containing the attribute's name.
2661 * @type: The type of the attribute
2662 * @value_p: a pointer to the value (or the pointer itself if the type is a pointer type)
2663 * @flags: a set of #GFileQueryInfoFlags.
2664 * @cancellable: optional #GCancellable object, %NULL to ignore.
2665 * @error: a #GError, or %NULL
2667 * Sets an attribute in the file with attribute name @attribute to @value.
2668 * If @cancellable is not %NULL, then the operation can be cancelled by
2669 * triggering the cancellable object from another thread. If the operation
2670 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
2672 * Returns: %TRUE if the attribute was set, %FALSE otherwise.
2677 * g_filename_completer_get_completion_suffix:
2678 * @completer: the filename completer.
2679 * @initial_text: text to be completed.
2681 * Obtains a completion for @initial_text from @completer.
2682 * This string is not owned by GIO, so remember to g_free() it
2685 * Returns: a completed string, or %NULL if no completion exists.
2693 * Creates a new icon for a file.
2695 * Returns: (transfer full): a #GIcon for the given @file, or %NULL on error.
2700 * SECTION:gnetworkservic:
2701 * @short_description: A GSocketConnectable for resolving SRV records
2702 * @include: gio/gio.h
2704 * Like #GNetworkAddress does with hostnames, #GNetworkService
2705 * provides an easy way to resolve a SRV record, and then attempt to
2706 * connect to one of the hosts that implements that service, handling
2707 * service priority/weighting, multiple IP addresses, and multiple
2709 * See #GSrvTarget for more information about SRV records, and see
2710 * #GSocketConnectable for and example of using the connectable
2716 * g_file_start_mountable:
2717 * @file: input #GFile.
2718 * @flags: flags affecting the operation
2719 * @start_operation: a #GMountOperation, or %NULL to avoid user interaction.
2720 * @cancellable: optional #GCancellable object, %NULL to ignore.
2721 * @callback: a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
2722 * @user_data: the data to pass to callback function
2724 * Starts a file of type G_FILE_TYPE_MOUNTABLE.
2725 * Using @start_operation, you can request callbacks when, for instance,
2726 * passwords are needed during authentication.
2727 * If @cancellable is not %NULL, then the operation can be cancelled by
2728 * triggering the cancellable object from another thread. If the operation
2729 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
2730 * When the operation is finished, @callback will be called. You can then call
2731 * g_file_mount_mountable_finish() to get the result of the operation.
2738 * g_app_info_get_default_for_uri_scheme:
2739 * @uri_scheme: a string containing a URI scheme.
2741 * Gets the default application for launching applications
2742 * using this URI scheme. A URI scheme is the initial part
2743 * of the URI, up to but not including the ':', e.g. "http",
2746 * Returns: #GAppInfo for given @uri_scheme or %NULL on error.
2751 * g_file_set_attributes_finish:
2752 * @file: input #GFile.
2753 * @result: a #GAsyncResult.
2754 * @info: (out) (transfer full): a #GFileInfo.
2755 * @error: a #GError, or %NULL
2757 * Finishes setting an attribute started in g_file_set_attributes_async().
2759 * Returns: %TRUE if the attributes were set correctly, %FALSE otherwise.
2764 * g_socket_listener_accept:
2765 * @listener: a #GSocketListener
2766 * @source_object: (out) (transfer none) (allow-none): location where #GObject pointer will be stored, or %NULL
2767 * @cancellable: optional #GCancellable object, %NULL to ignore.
2768 * @error: #GError for error reporting, or %NULL to ignore.
2770 * Blocks waiting for a client to connect to any of the sockets added
2771 * to the listener. Returns a #GSocketConnection for the socket that was
2773 * If @source_object is not %NULL it will be filled out with the source
2774 * object specified when the corresponding socket or address was added
2776 * If @cancellable is not %NULL, then the operation can be cancelled by
2777 * triggering the cancellable object from another thread. If the operation
2778 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
2780 * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
2786 * g_dbus_node_info_unref:
2787 * @info: A #GDBusNodeInfo.
2789 * If @info is statically allocated, does nothing. Otherwise decreases
2790 * the reference count of @info. When its reference count drops to 0,
2791 * the memory used is freed.
2798 * g_unix_mount_point_guess_can_eject:
2799 * @mount_point: a #GUnixMountPoint
2801 * Guesses whether a Unix mount point can be ejected.
2803 * Returns: %TRUE if @mount_point is deemed to be ejectable.
2808 * g_file_enumerate_children_finish:
2809 * @file: input #GFile.
2810 * @res: a #GAsyncResult.
2811 * @error: a #GError.
2813 * Finishes an async enumerate children operation.
2814 * See g_file_enumerate_children_async().
2815 * Free the returned object with g_object_unref().
2817 * Returns: (transfer full): a #GFileEnumerator or %NULL if an error occurred.
2822 * g_dbus_connection_flush:
2823 * @connection: A #GDBusConnection.
2824 * @cancellable: A #GCancellable or %NULL.
2825 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result.
2826 * @user_data: The data to pass to @callback.
2828 * Asynchronously flushes @connection, that is, writes all queued
2829 * outgoing message to the transport and then flushes the transport
2830 * (using g_output_stream_flush_async()). This is useful in programs
2831 * that wants to emit a D-Bus signal and then exit
2832 * immediately. Without flushing the connection, there is no guarantee
2833 * that the message has been sent to the networking buffers in the OS
2835 * This is an asynchronous method. When the operation is finished,
2836 * linkend="g-main-context-push-thread-default">thread-default main
2837 * loop</link> of the thread you are calling this method from. You can
2838 * then call g_dbus_connection_flush_finish() to get the result of the
2839 * operation. See g_dbus_connection_flush_sync() for the synchronous
2847 * g_inet_address_new_any:
2848 * @family: the address family
2850 * Creates a #GInetAddress for the "any" address (unassigned/"don't
2851 * care") for @family.
2854 * Returns: a new #GInetAddress corresponding to the "any" address
2862 * A #GInetSocketAddress representing a connection via a proxy server
2869 * g_emblemed_icon_get_emblems:
2870 * @emblemed: a #GEmblemedIcon
2872 * Gets the list of emblems for the @icon.
2873 * is owned by @emblemed
2875 * Returns: (element-type utf8) (transfer none): a #GList of #GEmblem <!-- -->s that
2881 * g_file_io_stream_query_info_finish:
2882 * @stream: a #GFileIOStream.
2883 * @result: a #GAsyncResult.
2884 * @error: a #GError, %NULL to ignore.
2886 * Finalizes the asynchronous query started
2887 * by g_file_io_stream_query_info_async().
2889 * Returns: (transfer full): A #GFileInfo for the finished query.
2896 * @file: #gconstpointer to a #GFile.
2898 * Creates a hash value for a #GFile.
2899 * This call does no blocking i/o.
2900 * integer that can be used as hash value for the #GFile.
2901 * This function is intended for easily hashing a #GFile to
2902 * add to a #GHashTable or similar data structure.
2905 * Returns: 0 if @file is not a valid #GFile, otherwise an
2910 * g_inet_address_new_loopback:
2911 * @family: the address family
2913 * Creates a #GInetAddress for the loopback address for @family.
2916 * Returns: a new #GInetAddress corresponding to the loopback address
2922 * g_unix_mount_monitor_set_rate_limit:
2923 * @mount_monitor: a #GUnixMountMonitor
2924 * @limit_msec: a integer with the limit in milliseconds to poll for changes.
2926 * Sets the rate limit to which the @mount_monitor will report
2927 * consecutive change events to the mount and mount point entry files.
2935 * @source: input #GFile.
2936 * @destination: destination #GFile
2937 * @flags: set of #GFileCopyFlags
2938 * @cancellable: optional #GCancellable object, %NULL to ignore.
2939 * @progress_callback: (scope call): function to callback with progress information
2940 * @progress_callback_data: (closure): user data to pass to @progress_callback
2941 * @error: #GError to set on error, or %NULL
2943 * Copies the file @source to the location specified by @destination.
2944 * Can not handle recursive copies of directories.
2945 * If the flag #G_FILE_COPY_OVERWRITE is specified an already
2946 * existing @destination file is overwritten.
2947 * If the flag #G_FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks
2948 * will be copied as symlinks, otherwise the target of the
2949 * If @cancellable is not %NULL, then the operation can be cancelled by
2950 * triggering the cancellable object from another thread. If the operation
2951 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
2952 * If @progress_callback is not %NULL, then the operation can be monitored by
2953 * setting this to a #GFileProgressCallback function. @progress_callback_data
2954 * will be passed to this function. It is guaranteed that this callback will
2955 * be called after all data has been transferred with the total number of bytes
2956 * copied during the operation.
2957 * If the @source file does not exist then the G_IO_ERROR_NOT_FOUND
2958 * error is returned, independent on the status of the @destination.
2959 * If #G_FILE_COPY_OVERWRITE is not specified and the target exists, then the
2960 * error G_IO_ERROR_EXISTS is returned.
2961 * If trying to overwrite a file over a directory the G_IO_ERROR_IS_DIRECTORY
2962 * error is returned. If trying to overwrite a directory with a directory the
2963 * G_IO_ERROR_WOULD_MERGE error is returned.
2964 * If the source is a directory and the target does not exist, or #G_FILE_COPY_OVERWRITE is
2965 * specified and the target is a file, then the G_IO_ERROR_WOULD_RECURSE error
2967 * If you are interested in copying the #GFile object itself (not the on-disk
2968 * file), see g_file_dup().
2970 * Returns: %TRUE on success, %FALSE otherwise.
2975 * g_file_set_attribute_int64:
2976 * @file: input #GFile.
2977 * @attribute: a string containing the attribute's name.
2978 * @value: a #guint64 containing the attribute's new value.
2979 * @flags: a #GFileQueryInfoFlags.
2980 * @cancellable: optional #GCancellable object, %NULL to ignore.
2981 * @error: a #GError, or %NULL
2983 * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_INT64 to @value.
2984 * If @attribute is of a different type, this operation will fail.
2985 * If @cancellable is not %NULL, then the operation can be cancelled by
2986 * triggering the cancellable object from another thread. If the operation
2987 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
2989 * Returns: %TRUE if the @attribute was successfully set, %FALSE otherwise.
2994 * g_file_enumerator_next_files_finish:
2995 * @enumerator: a #GFileEnumerator.
2996 * @result: a #GAsyncResult.
2997 * @error: a #GError location to store the error occuring, or %NULL to ignore.
2999 * Finishes the asynchronous operation started with g_file_enumerator_next_files_async().
3000 * g_list_free() and unref the infos with g_object_unref() when you're
3003 * Returns: (transfer full) (element-type Gio.FileInfo): a #GList of #GFileInfo<!---->s. You must free the list with
3009 * @string: The string to check.
3011 * Checks if @string is a valid D-Bus bus name (either unique or well-known).
3013 * Returns: %TRUE if valid, %FALSE otherwise.
3020 * @drive: a #GDrive.
3022 * Gets the name of @drive.
3023 * string should be freed when no longer needed.
3025 * Returns: a string containing @drive's name. The returned
3030 * g_unix_fd_message_new_with_fd_list:
3031 * @fd_list: a #GUnixFDList
3033 * Creates a new #GUnixFDMessage containing @list.
3035 * Returns: a new #GUnixFDMessage
3041 * GDBusConnection:flags:
3043 * Flags from the #GDBusConnectionFlags enumeration.
3050 * g_application_run:
3051 * @application: a #GApplication
3052 * @argc: the argc from main()
3053 * @argv: the argv from main()
3054 * @returns: the exit status
3056 * Runs the application.
3057 * This function is intended to be run from main() and its return value
3058 * is intended to be returned by main().
3059 * First, the local_command_line() virtual function is invoked. This
3060 * function always runs on the local instance. If that function returns
3061 * %FALSE then the application is registered and the #GApplication::command-line
3062 * signal is emitted in the primary instance (which may or may not be
3064 * If the application has the %G_APPLICATION_HANDLES_COMMAND_LINE
3065 * flag set then the default implementation of local_command_line()
3066 * always returns %FALSE immediately, resulting in the commandline
3067 * always being handled in the primary instance.
3068 * Otherwise, the default implementation of local_command_line() tries
3069 * to do a couple of things that are probably reasonable for most
3070 * applications. First, g_application_register() is called to attempt
3071 * to register the application. If that works, then the command line
3072 * arguments are inspected. If no commandline arguments are given, then
3073 * g_application_activate() is called. If commandline arguments are
3074 * given and the %G_APPLICATION_HANDLES_OPEN flag is set then they
3075 * are assumed to be filenames and g_application_open() is called.
3076 * If you are interested in doing more complicated local handling of the
3077 * commandline then you should implement your own #GApplication subclass
3078 * and override local_command_line(). See
3079 * <xref linkend="gapplication-example-cmdline2"/> for an example.
3080 * If, after the above is done, the use count of the application is zero
3081 * then the exit status is returned immediately. If the use count is
3082 * non-zero then the mainloop is run until the use count falls to zero,
3083 * at which point 0 is returned.
3084 * If the %G_APPLICATION_IS_SERVICE flag is set, then the exiting at
3085 * around to provide its <emphasis>service</emphasis> to others).
3087 * Use count of zero is delayed for a while (ie: the instance stays
3093 * g_socket_service_new:
3095 * Creates a new #GSocketService with no sockets to listen for.
3096 * New listeners can be added with e.g. g_socket_listener_add_address()
3097 * or g_socket_listener_add_inet_port().
3099 * Returns: a new #GSocketService.
3105 * g_unix_connection_receive_fd:
3106 * @connection: a #GUnixConnection
3107 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
3108 * @error: (allow-none): #GError for error reporting, or %NULL to ignore
3110 * Receives a file descriptor from the sending end of the connection.
3111 * The sending end has to call g_unix_connection_send_fd() for this
3113 * As well as reading the fd this also reads a single byte from the
3114 * stream, as this is required for fd passing to work on some
3117 * Returns: a file descriptor on success, -1 on error.
3123 * GMountOperation::show-processes:
3124 * @op: a #GMountOperation.
3125 * @message: string containing a message to display to the user.
3126 * @processes: an array of #GPid for processes blocking the operation.
3127 * @choices: an array of strings for each possible choice.
3129 * Emitted when one or more processes are blocking an operation
3130 * e.g. unmounting/ejecting a #GMount or stopping a #GDrive.
3131 * Note that this signal may be emitted several times to update the
3132 * list of blocking processes as processes close files. The
3133 * application should only respond with g_mount_operation_reply() to
3134 * the latest signal (setting #GMountOperation:choice to the choice
3136 * If the message contains a line break, the first line should be
3137 * presented as a heading. For example, it may be used as the
3138 * primary text in a #GtkMessageDialog.
3145 * g_simple_async_result_set_error:
3146 * @simple: a #GSimpleAsyncResult.
3147 * @domain: a #GQuark (usually #G_IO_ERROR).
3148 * @code: an error code.
3149 * @format: a formatted error reporting string.
3150 * @...: a list of variables to fill in @format.
3152 * Sets an error within the asynchronous result without a #GError.
3157 * g_file_info_remove_attribute:
3158 * @info: a #GFileInfo.
3159 * @attribute: a file attribute key.
3161 * Removes all cases of @attribute from @info if it exists.
3166 * g_unix_input_stream_get_fd:
3167 * @stream: a #GUnixInputStream
3169 * Return the UNIX file descriptor that the stream reads from.
3171 * Returns: The file descriptor of @stream
3177 * g_dbus_connection_add_filter:
3178 * @connection: A #GDBusConnection.
3179 * @filter_function: A filter function.
3180 * @user_data: User data to pass to @filter_function.
3181 * @user_data_free_func: Function to free @user_data with when filter is removed or %NULL.
3183 * Adds a message filter. Filters are handlers that are run on all
3184 * incoming and outgoing messages, prior to standard dispatch. Filters
3185 * are run in the order that they were added. The same handler can be
3186 * added as a filter more than once, in which case it will be run more
3187 * than once. Filters added during a filter callback won't be run on
3188 * the message being processed. Filter functions are allowed to modify
3189 * and even drop messages - see the #GDBusMessageFilterResult
3190 * enumeration for details.
3191 * Note that filters are run in a dedicated message handling thread so
3192 * they can't block and, generally, can't do anything but signal a
3193 * worker thread. Also note that filters are rarely needed - use API
3194 * such as g_dbus_connection_send_message_with_reply(),
3195 * g_dbus_connection_signal_subscribe() or
3196 * g_dbus_connection_call() instead.
3197 * If a filter consumes an incoming message the message is not
3198 * dispatched anywhere else - not even the standard dispatch machinery
3199 * (that API such as g_dbus_connection_signal_subscribe() and
3200 * g_dbus_connection_send_message_with_reply() relies on) will see the
3201 * message. Similary, if a filter consumes an outgoing message, the
3202 * message will not be sent to the other peer.
3203 * g_dbus_connection_remove_filter().
3205 * Returns: A filter identifier that can be used with
3211 * g_dbus_method_invocation_return_dbus_error:
3212 * @invocation: A #GDBusMethodInvocation.
3213 * @error_name: A valid D-Bus error name.
3214 * @error_message: A valid D-Bus error message.
3216 * Finishes handling a D-Bus method call by returning an error.
3217 * This method will free @invocation, you cannot use it afterwards.
3224 * g_file_info_get_attribute_string:
3225 * @info: a #GFileInfo.
3226 * @attribute: a file attribute key.
3228 * Gets the value of a string attribute. If the attribute does
3229 * not contain a string, %NULL will be returned.
3232 * Returns: the contents of the @attribute value as a string, or
3237 * g_content_type_equals:
3238 * @type1: a content type string
3239 * @type2: a content type string
3241 * Compares two content types for equality.
3244 * Returns: %TRUE if the two strings are identical or equivalent,
3249 * g_file_info_set_size:
3250 * @info: a #GFileInfo.
3251 * @size: a #goffset containing the file's size.
3253 * Sets the %G_FILE_ATTRIBUTE_STANDARD_SIZE attribute in the file info
3254 * to the given size.
3259 * GApplication::startup:
3260 * @application: the application
3262 * The ::startup signal is emitted on the primary instance immediately
3263 * after registration. See g_activation_register().
3269 * @short_description: File Information and Attributes
3270 * @include: gio/gio.h
3271 * @see_also: #GFile, <link linkend="gio-GFileAttribute">GFileAttribute</link>
3273 * Functionality for manipulating basic metadata for files. #GFileInfo
3274 * implements methods for getting information that all files should
3275 * contain, and allows for manipulation of extended attributes.
3276 * See <link linkend="gio-GFileAttribute">GFileAttribute</link> for more
3277 * information on how GIO handles file attributes.
3278 * To obtain a #GFileInfo for a #GFile, use g_file_query_info() (or its
3279 * async variant). To obtain a #GFileInfo for a file input or output
3280 * stream, use g_file_input_stream_query_info() or
3281 * g_file_output_stream_query_info() (or their async variants).
3282 * To change the actual attributes of a file, you should then set the
3283 * attribute in the #GFileInfo and call g_file_set_attributes_from_info()
3284 * or g_file_set_attributes_async() on a GFile.
3285 * However, not all attributes can be changed in the file. For instance,
3286 * the actual size of a file cannot be changed via g_file_info_set_size().
3287 * You may call g_file_query_settable_attributes() and
3288 * g_file_query_writable_namespaces() to discover the settable attributes
3289 * of a particular file at runtime.
3290 * #GFileAttributeMatcher allows for searching through a #GFileInfo for
3297 * @socket: a #GSocket.
3298 * @address: a #GSocketAddress specifying the local address.
3299 * @allow_reuse: whether to allow reusing this address
3300 * @error: #GError for error reporting, or %NULL to ignore.
3302 * When a socket is created it is attached to an address family, but it
3303 * doesn't have an address in this family. g_socket_bind() assigns the
3304 * address (sometimes called name) of the socket.
3305 * It is generally required to bind to a local address before you can
3306 * receive connections. (See g_socket_listen() and g_socket_accept() ).
3307 * In certain situations, you may also want to bind a socket that will be
3308 * used to initiate connections, though this is not normally required.
3309 * eventually call g_socket_accept() on), and %FALSE for client sockets.
3310 * (Specifically, if it is %TRUE, then g_socket_bind() will set the
3311 * %SO_REUSEADDR flag on the socket, allowing it to bind @address even if
3312 * that address was previously used by another socket that has not yet been
3313 * fully cleaned-up by the kernel. Failing to set this flag on a server
3314 * socket may cause the bind call to return %G_IO_ERROR_ADDRESS_IN_USE if
3315 * the server program is stopped and then immediately restarted.)
3317 * Returns: %TRUE on success, %FALSE on error.
3323 * g_input_stream_read_all:
3324 * @stream: a #GInputStream.
3325 * @buffer: a buffer to read data into (which should be at least count bytes long).
3326 * @count: the number of bytes that will be read from the stream
3327 * @bytes_read: location to store the number of bytes that was read from the stream
3328 * @cancellable: optional #GCancellable object, %NULL to ignore.
3329 * @error: location to store the error occuring, or %NULL to ignore
3331 * Tries to read @count bytes from the stream into the buffer starting at
3332 * This function is similar to g_input_stream_read(), except it tries to
3333 * read as many bytes as requested, only stopping on an error or end of stream.
3334 * On a successful read of @count bytes, or if we reached the end of the
3335 * stream, %TRUE is returned, and @bytes_read is set to the number of bytes
3336 * read into @buffer.
3337 * If there is an error during the operation %FALSE is returned and @error
3338 * is set to indicate the error status, @bytes_read is updated to contain
3339 * the number of bytes read into @buffer before the error occurred.
3341 * Returns: %TRUE on success, %FALSE if there was an error
3346 * g_cancellable_pop_current:
3347 * @cancellable: a #GCancellable object
3349 * Pops @cancellable off the cancellable stack (verifying that @cancellable
3350 * is on the top of the stack).
3355 * SECTION:gthemedico:
3356 * @short_description: Icon theming support
3357 * @include: gio/gio.h
3358 * @see_also: #GIcon, #GLoadableIcon
3360 * #GThemedIcon is an implementation of #GIcon that supports icon themes.
3361 * #GThemedIcon contains a list of all of the icons present in an icon
3362 * theme, so that icons can be looked up quickly. #GThemedIcon does
3363 * not provide actual pixmaps for icons, just the icon names.
3364 * Ideally something like gtk_icon_theme_choose_icon() should be used to
3365 * resolve the list of names so that fallback icons work nicely with
3366 * themes that inherit other themes.
3371 * g_file_info_list_attributes:
3372 * @info: a #GFileInfo.
3373 * @name_space: a file attribute key's namespace.
3375 * Lists the file info structure's attributes.
3376 * possible attribute types for the given @name_space, or
3379 * Returns: (array zero-terminated=1) (transfer full): a null-terminated array of strings of all of the
3384 * GActionGroup::action-enabled-changed:
3385 * @action_group: the #GActionGroup that changed
3386 * @action_name: the name of the action in @action_group
3387 * @enabled: whether the action is enabled or not
3389 * Signals that the enabled status of the named action has changed.
3396 * g_dbus_connection_new_sync:
3397 * @stream: A #GIOStream.
3398 * @guid: The GUID to use if a authenticating as a server or %NULL.
3399 * @flags: Flags describing how to make the connection.
3400 * @observer: A #GDBusAuthObserver or %NULL.
3401 * @cancellable: A #GCancellable or %NULL.
3402 * @error: Return location for error or %NULL.
3404 * Synchronously sets up a D-Bus connection for exchanging D-Bus messages
3405 * with the end represented by @stream.
3406 * If @observer is not %NULL it may be used to control the
3407 * authentication process.
3408 * This is a synchronous failable constructor. See
3409 * g_dbus_connection_new() for the asynchronous version.
3411 * Returns: A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
3417 * SECTION:gbufferedinputstrea:
3418 * @short_description: Buffered Input Stream
3419 * @include: gio/gio.h
3420 * @see_also: #GFilterInputStream, #GInputStream
3422 * Buffered input stream implements #GFilterInputStream and provides
3423 * for buffered reads.
3424 * By default, #GBufferedInputStream's buffer size is set at 4 kilobytes.
3425 * To create a buffered input stream, use g_buffered_input_stream_new(),
3426 * or g_buffered_input_stream_new_sized() to specify the buffer's size at
3428 * To get the size of a buffer within a buffered input stream, use
3429 * g_buffered_input_stream_get_buffer_size(). To change the size of a
3430 * buffered input stream's buffer, use
3431 * g_buffered_input_stream_set_buffer_size(). Note that the buffer's size
3432 * cannot be reduced below the size of the data within the buffer.
3437 * g_proxy_connect_async:
3439 * @connection: a #GIOStream
3440 * @proxy_address: a #GProxyAddress
3441 * @cancellable: a #GCancellable
3442 * @callback: a #GAsyncReadyCallback
3443 * @user_data: callback data
3445 * Asynchronous version of g_proxy_connect().
3452 * g_resolver_lookup_service:
3453 * @resolver: a #GResolver
3454 * @service: the service type to look up (eg, "ldap")
3455 * @protocol: the networking protocol to use for @service (eg, "tcp")
3456 * @domain: the DNS domain to look up the service in
3457 * @cancellable: a #GCancellable, or %NULL
3458 * @error: return location for a #GError, or %NULL
3460 * Synchronously performs a DNS SRV lookup for the given @service and
3461 * include the leading underscore that appears in the actual DNS
3463 * On success, g_resolver_lookup_service() will return a #GList of
3464 * #GSrvTarget, sorted in order of preference. (That is, you should
3465 * attempt to connect to the first target first, then the second if
3466 * the first fails, etc.)
3467 * If the DNS resolution fails, @error (if non-%NULL) will be set to
3468 * a value from #GResolverError.
3469 * If @cancellable is non-%NULL, it can be used to cancel the
3470 * operation, in which case @error (if non-%NULL) will be set to
3471 * %G_IO_ERROR_CANCELLED.
3472 * If you are planning to connect to the service, it is usually easier
3473 * to create a #GNetworkService and use its #GSocketConnectable
3475 * or %NULL on error. You must free each of the targets and the list when you are
3476 * done with it. (You can use g_resolver_free_targets() to do this.)
3478 * Returns: (element-type GSrvTarget) (transfer full): a #GList of #GSrvTarget,
3485 * @file: input #GFile.
3486 * @flags: a set of #GFileCreateFlags.
3487 * @cancellable: optional #GCancellable object, %NULL to ignore.
3488 * @error: a #GError, or %NULL
3490 * Creates a new file and returns an output stream for writing to it.
3491 * The file must not already exist.
3492 * By default files created are generally readable by everyone,
3493 * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file
3494 * will be made readable only to the current user, to the level that
3495 * is supported on the target filesystem.
3496 * If @cancellable is not %NULL, then the operation can be cancelled by
3497 * triggering the cancellable object from another thread. If the operation
3498 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
3499 * If a file or directory with this name already exists the G_IO_ERROR_EXISTS
3500 * error will be returned.
3501 * Some file systems don't allow all file names, and may
3502 * return an G_IO_ERROR_INVALID_FILENAME error, and if the name
3503 * is to long G_IO_ERROR_FILENAME_TOO_LONG will be returned.
3504 * Other errors are possible too, and depend on what kind of
3505 * filesystem the file is on.
3507 * Free the returned object with g_object_unref().
3509 * Returns: (transfer full): a #GFileOutputStream for the newly created file, or
3514 * g_buffered_input_stream_fill:
3515 * @stream: a #GBufferedInputStream
3516 * @count: the number of bytes that will be read from the stream
3517 * @cancellable: optional #GCancellable object, %NULL to ignore
3518 * @error: location to store the error occuring, or %NULL to ignore
3520 * Tries to read @count bytes from the stream into the buffer.
3521 * Will block during this read.
3522 * If @count is zero, returns zero and does nothing. A value of @count
3523 * larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
3524 * On success, the number of bytes read into the buffer is returned.
3525 * It is not an error if this is not the same as the requested size, as it
3526 * can happen e.g. near the end of a file. Zero is returned on end of file
3527 * (or if @count is zero), but never otherwise.
3528 * If @count is -1 then the attempted read size is equal to the number of
3529 * bytes that are required to fill the buffer.
3530 * If @cancellable is not %NULL, then the operation can be cancelled by
3531 * triggering the cancellable object from another thread. If the operation
3532 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
3533 * operation was partially finished when the operation was cancelled the
3534 * partial result will be returned, without an error.
3535 * On error -1 is returned and @error is set accordingly.
3536 * For the asynchronous, non-blocking, version of this function, see
3537 * g_buffered_input_stream_fill_async().
3540 * Returns: the number of bytes read into @stream's buffer, up to @count,
3545 * g_settings_backend_writable_changed:
3546 * @backend: a #GSettingsBackend implementation
3547 * @key: the name of the key
3549 * Signals that the writability of a single key has possibly changed.
3550 * Since GSettings performs no locking operations for itself, this call
3551 * will always be made in response to external events.
3559 * @connection: A #GDBusConnection.
3560 * @flags: Flags used when constructing the proxy.
3561 * @info: A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL.
3562 * @name: A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
3563 * @object_path: An object path.
3564 * @interface_name: A D-Bus interface name.
3565 * @cancellable: A #GCancellable or %NULL.
3566 * @callback: Callback function to invoke when the proxy is ready.
3567 * @user_data: User data to pass to @callback.
3569 * Creates a proxy for accessing @interface_name on the remote object
3570 * at @object_path owned by @name at @connection and asynchronously
3571 * loads D-Bus properties unless the
3572 * %G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES flag is used. Connect to
3573 * the #GDBusProxy::g-properties-changed signal to get notified about
3575 * If the %G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS flag is not set, also sets up
3576 * match rules for signals. Connect to the #GDBusProxy::g-signal signal
3577 * to handle signals from the remote object.
3578 * If @name is a well-known name and the
3579 * %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag isn't set and no name
3580 * owner currently exists, the message bus will be requested to launch
3581 * a name owner for the name.
3582 * This is a failable asynchronous constructor - when the proxy is
3583 * ready, @callback will be invoked and you can use
3584 * g_dbus_proxy_new_finish() to get the result.
3585 * See g_dbus_proxy_new_sync() and for a synchronous version of this constructor.
3586 * See <xref linkend="gdbus-wellknown-proxy"/> for an example of how #GDBusProxy can be used.
3593 * g_unix_mount_point_free:
3594 * @mount_point: unix mount point to free.
3596 * Frees a unix mount point.
3601 * GInetSocketAddress:
3603 * An IPv4 or IPv6 socket address, corresponding to a <type>struct
3604 * sockaddr_in</type> or <type>struct sockaddr_in6</type>.
3609 * g_dbus_error_set_dbus_error_valist:
3610 * @error: A pointer to a #GError or %NULL.
3611 * @dbus_error_name: D-Bus error name.
3612 * @dbus_error_message: D-Bus error message.
3613 * @format: printf()-style format to prepend to @dbus_error_message or %NULL.
3614 * @var_args: Arguments for @format.
3616 * Like g_dbus_error_set_dbus_error() but intended for language bindings.
3624 * @drive: a #GDrive.
3625 * @flags: flags affecting the start operation.
3626 * @mount_operation: a #GMountOperation or %NULL to avoid user interaction.
3627 * @cancellable: optional #GCancellable object, %NULL to ignore.
3628 * @callback: a #GAsyncReadyCallback, or %NULL.
3629 * @user_data: user data to pass to @callback
3631 * Asynchronously starts a drive.
3632 * When the operation is finished, @callback will be called.
3633 * You can then call g_drive_start_finish() to obtain the
3634 * result of the operation.
3641 * g_unix_credentials_message_new_with_credentials:
3642 * @credentials: A #GCredentials object.
3644 * Creates a new #GUnixCredentialsMessage holding @credentials.
3646 * Returns: a new #GUnixCredentialsMessage
3652 * g_file_create_readwrite:
3654 * @flags: a set of #GFileCreateFlags
3655 * @cancellable: optional #GCancellable object, %NULL to ignore
3656 * @error: return location for a #GError, or %NULL
3658 * Creates a new file and returns a stream for reading and writing to it.
3659 * The file must not already exist.
3660 * By default files created are generally readable by everyone,
3661 * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file
3662 * will be made readable only to the current user, to the level that
3663 * is supported on the target filesystem.
3664 * If @cancellable is not %NULL, then the operation can be cancelled by
3665 * triggering the cancellable object from another thread. If the operation
3666 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
3667 * If a file or directory with this name already exists the %G_IO_ERROR_EXISTS
3668 * error will be returned. Some file systems don't allow all file names,
3669 * and may return an %G_IO_ERROR_INVALID_FILENAME error, and if the name
3670 * is too long, %G_IO_ERROR_FILENAME_TOO_LONG will be returned. Other errors
3671 * are possible too, and depend on what kind of filesystem the file is on.
3672 * Note that in many non-local file cases read and write streams are not
3673 * supported, so make sure you really need to do read and write streaming,
3674 * rather than just opening for reading or writing.
3675 * Free the returned object with g_object_unref().
3677 * Returns: (transfer full): a #GFileIOStream for the newly created file, or %NULL on error.
3683 * g_dbus_message_set_member:
3684 * @message: A #GDBusMessage.
3685 * @value: The value to set.
3687 * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_MEMBER header field.
3694 * g_socket_receive_from:
3695 * @socket: a #GSocket
3696 * @address: a pointer to a #GSocketAddress pointer, or %NULL
3697 * @buffer: a buffer to read data into (which should be at least @size bytes long).
3698 * @size: the number of bytes you want to read from the socket
3699 * @cancellable: a %GCancellable or %NULL
3700 * @error: #GError for error reporting, or %NULL to ignore.
3702 * Receive data (up to @size bytes) from a socket.
3703 * If @address is non-%NULL then @address will be set equal to the
3704 * source address of the received packet.
3705 * See g_socket_receive() for additional information.
3707 * Returns: Number of bytes read, or -1 on error
3713 * g_seekable_can_seek:
3714 * @seekable: a #GSeekable.
3716 * Tests if the stream supports the #GSeekableIface.
3718 * Returns: %TRUE if @seekable can be seeked. %FALSE otherwise.
3723 * GCredentialsClass:
3725 * Class structure for #GCredentials.
3734 * @short_description: an action
3736 * #GAction represents a single named action.
3737 * The main interface to an action is that it can be activated with
3738 * g_action_activate(). This results in the 'activate' signal being
3739 * emitted. An activation has a #GVariant parameter (which may be
3740 * %NULL). The correct type for the parameter is determined by a static
3741 * parameter type (which is given at construction time).
3742 * An action may optionally have a state, in which case the state may be
3743 * set with g_action_set_state(). This call takes a #GVariant. The
3744 * correct type for the state is determined by a static state type
3745 * (which is given at construction time).
3746 * The state may have a hint associated with it, specifying its valid
3748 * #GAction is merely the interface to the concept of an action, as
3749 * described above. Various implementations of actions exist, including
3750 * #GSimpleAction and #GtkAction.
3751 * In all cases, the implementing class is responsible for storing the
3752 * name of the action, the parameter type, the enabled state, the
3753 * optional state type and the state and emitting the appropriate
3754 * signals when these change. The implementor responsible for filtering
3755 * calls to g_action_activate() and g_action_set_state() for type safety
3756 * and for the state being enabled.
3757 * Probably the only useful thing to do with a #GAction is to put it
3758 * inside of a #GSimpleActionGroup.
3763 * g_file_attribute_matcher_new:
3764 * @attributes: an attribute string to match.
3766 * Creates a new file attribute matcher, which matches attributes
3767 * against a given string. #GFileAttributeMatcher<!-- -->s are reference
3768 * counted structures, and are created with a reference count of 1. If
3769 * the number of references falls to 0, the #GFileAttributeMatcher is
3770 * automatically destroyed.
3771 * The @attribute string should be formatted with specific keys separated
3772 * from namespaces with a double colon. Several "namespace::key" strings may be
3773 * concatenated with a single comma (e.g. "standard::type,standard::is-hidden").
3774 * The wildcard "*" may be used to match all keys and namespaces, or
3775 * "namespace::*" will match all keys in a given namespace.
3776 * Examples of strings to use:
3778 * <title>File Attribute Matcher strings and results</title>
3779 * <tgroup cols='2' align='left'><thead>
3780 * <row><entry> Matcher String </entry><entry> Matches </entry></row></thead>
3782 * <row><entry>"*"</entry><entry>matches all attributes.</entry></row>
3783 * <row><entry>"standard::is-hidden"</entry><entry>matches only the key is-hidden in the standard namespace.</entry></row>
3784 * <row><entry>"standard::type,unix::*"</entry><entry>matches the type key in the standard namespace and
3785 * all keys in the unix namespace.</entry></row>
3789 * Returns: a #GFileAttributeMatcher.
3794 * GDBusMethodInvocation:
3796 * The #GDBusMethodInvocation structure contains only private data and
3797 * should only be accessed using the provided API.
3806 * An IPv4 or IPv6 internet address.
3811 * g_file_info_get_attribute_type:
3812 * @info: a #GFileInfo.
3813 * @attribute: a file attribute key.
3815 * Gets the attribute type for an attribute key.
3816 * %G_FILE_ATTRIBUTE_TYPE_INVALID if the key is not set.
3818 * Returns: a #GFileAttributeType for the given @attribute, or
3823 * g_inet_socket_address_get_port:
3824 * @address: a #GInetSocketAddress
3826 * Gets @address's port.
3828 * Returns: the port for @address
3834 * g_dbus_message_get_destination:
3835 * @message: A #GDBusMessage.
3837 * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION header field.
3839 * Returns: The value.
3845 * g_file_load_contents:
3846 * @file: input #GFile.
3847 * @cancellable: optional #GCancellable object, %NULL to ignore.
3848 * @contents: (out) (transfer full): a location to place the contents of the file.
3849 * @length: (out) (allow-none): a location to place the length of the contents of the file, or %NULL if the length is not needed
3850 * @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
3851 * @error: a #GError, or %NULL
3853 * Loads the content of the file into memory. The data is always
3854 * zero-terminated, but this is not included in the resultant @length.
3855 * The returned @content should be freed with g_free() when no longer
3857 * If @cancellable is not %NULL, then the operation can be cancelled by
3858 * triggering the cancellable object from another thread. If the operation
3859 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
3860 * %FALSE if there were errors.
3862 * Returns: %TRUE if the @file's contents were successfully loaded.
3867 * g_inet_address_get_is_multicast:
3868 * @address: a #GInetAddress
3870 * Tests whether @address is a multicast address.
3872 * Returns: %TRUE if @address is a multicast address.
3878 * GDBusServer:flags:
3880 * Flags from the #GDBusServerFlags enumeration.
3889 * The name of the schema that describes the types of keys
3890 * for this #GSettings object.
3895 * g_volume_monitor_get_volume_for_uuid:
3896 * @volume_monitor: a #GVolumeMonitor.
3897 * @uuid: the UUID to look for
3899 * Finds a #GVolume object by its UUID (see g_volume_get_uuid())
3900 * Free the returned object with g_object_unref().
3902 * Returns: (transfer full): a #GVolume or %NULL if no such volume is available.
3907 * g_settings_set_enum:
3908 * @settings: a #GSettings object
3909 * @key: a key, within @settings
3910 * @value: an enumerated value
3911 * @returns: %TRUE, if the set succeeds
3913 * Looks up the enumerated type nick for @value and writes it to @key,
3915 * It is a programmer error to give a @key that isn't contained in the
3916 * schema for @settings or is not marked as an enumerated type, or for
3917 * After performing the write, accessing @key directly with
3918 * g_settings_get_string() will return the 'nick' associated with
3923 * g_network_address_parse:
3924 * @host_and_port: the hostname and optionally a port
3925 * @default_port: the default port if not in @host_and_port
3926 * @error: a pointer to a #GError, or %NULL
3928 * Creates a new #GSocketConnectable for connecting to the given
3929 * parsing @host_and_port fails.
3930 * address, an IPv4 address, or a domain name (in which case a DNS
3931 * lookup is performed). Quoting with [] is supported for all address
3932 * types. A port override may be specified in the usual way with a
3933 * colon. Ports may be given as decimal numbers or symbolic names (in
3934 * which case an /etc/services lookup is performed).
3935 * If no port is specified in @host_and_port then @default_port will be
3936 * used as the port number to connect to.
3937 * In general, @host_and_port is expected to be provided by the user
3938 * (allowing them to give the hostname, and a port overide if necessary)
3939 * and @default_port is expected to be provided by the application.
3941 * Returns: (transfer full): the new #GNetworkAddress, or %NULL on error
3947 * g_settings_backend_path_changed:
3948 * @backend: a #GSettingsBackend implementation
3949 * @path: the path containing the changes
3950 * @origin_tag: the origin tag
3952 * Signals that all keys below a given path may have possibly changed.
3953 * Backend implementations should call this if an entire path of keys
3954 * have possibly changed their values.
3955 * not containing '//').
3956 * The meaning of this signal is that any of the key which has a name
3957 * starting with @path may have changed.
3958 * The same rules for when notifications must occur apply as per
3959 * g_settings_backend_changed(). This call might be an appropriate
3960 * reasponse to a 'reset' call but implementations are also free to
3961 * explicitly list the keys that were affected by that call if they can
3963 * For efficiency reasons, the implementation should strive for @path to
3964 * keys that were changed) but this is not strictly required. As an
3965 * example, if this function is called with the path of "/" then every
3966 * single key in the application will be notified of a possible change.
3968 * Be as long as possible (ie: the longest common prefix of all of the
3974 * g_socket_listener_accept_socket:
3975 * @listener: a #GSocketListener
3976 * @source_object: (out) (transfer none) (allow-none): location where #GObject pointer will be stored, or %NULL.
3977 * @cancellable: optional #GCancellable object, %NULL to ignore.
3978 * @error: #GError for error reporting, or %NULL to ignore.
3980 * Blocks waiting for a client to connect to any of the sockets added
3981 * to the listener. Returns the #GSocket that was accepted.
3982 * If you want to accept the high-level #GSocketConnection, not a #GSocket,
3983 * which is often the case, then you should use g_socket_listener_accept()
3985 * If @source_object is not %NULL it will be filled out with the source
3986 * object specified when the corresponding socket or address was added
3988 * If @cancellable is not %NULL, then the operation can be cancelled by
3989 * triggering the cancellable object from another thread. If the operation
3990 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
3992 * Returns: (transfer full): a #GSocket on success, %NULL on error.
3998 * GVolumeMonitor::mount-removed:
3999 * @volume_monitor: The volume monitor emitting the signal.
4000 * @mount: a #GMount that was removed.
4002 * Emitted when a mount is removed.
4007 * g_socket_address_get_family:
4008 * @address: a #GSocketAddress
4010 * Gets the socket family type of @address.
4012 * Returns: the socket family type of @address.
4018 * g_simple_async_result_get_op_res_gssize:
4019 * @simple: a #GSimpleAsyncResult.
4021 * Gets a gssize from the asynchronous result.
4023 * Returns: a gssize returned from the asynchronous function.
4028 * g_vfs_get_default:
4030 * Gets the default #GVfs for the system.
4032 * Returns: (transfer none): a #GVfs.
4037 * g_simple_action_new_stateful:
4038 * @name: the name of the action
4039 * @parameter_type: (allow-none): the type of the parameter to the activate function
4040 * @state: the initial state of the action
4042 * Creates a new stateful action.
4043 * must have the same #GVariantType as the initial state.
4044 * If the @state GVariant is floating, it is consumed.
4046 * Returns: a new #GSimpleAction
4052 * g_file_mount_mountable_finish:
4053 * @file: input #GFile.
4054 * @result: a #GAsyncResult.
4055 * @error: a #GError, or %NULL
4057 * Finishes a mount operation. See g_file_mount_mountable() for details.
4058 * Finish an asynchronous mount operation that was started
4059 * with g_file_mount_mountable().
4060 * Free the returned object with g_object_unref().
4062 * Returns: (transfer full): a #GFile or %NULL on error.
4067 * g_drive_poll_for_media_finish:
4068 * @drive: a #GDrive.
4069 * @result: a #GAsyncResult.
4070 * @error: a #GError, or %NULL
4072 * Finishes an operation started with g_drive_poll_for_media() on a drive.
4075 * Returns: %TRUE if the drive has been poll_for_mediaed successfully,
4080 * g_dbus_message_set_reply_serial:
4081 * @message: A #GDBusMessage.
4082 * @value: The value to set.
4084 * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL header field.
4091 * SECTION:gdbusmethodinvocatio:
4092 * @short_description: Object for handling remote calls
4093 * @include: gio/gio.h
4095 * Instances of the #GDBusMethodInvocation class are used when
4096 * handling D-Bus method calls. It provides a way to asynchronously
4097 * return results and errors.
4098 * The normal way to obtain a #GDBusMethodInvocation object is to receive
4099 * it as an argument to the handle_method_call() function in a
4100 * #GDBusInterfaceVTable that was passed to g_dbus_connection_register_object().
4105 * g_async_initable_new_async:
4106 * @object_type: a #GType supporting #GAsyncInitable.
4107 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the operation.
4108 * @cancellable: optional #GCancellable object, %NULL to ignore.
4109 * @callback: a #GAsyncReadyCallback to call when the initialization is finished
4110 * @user_data: the data to pass to callback function
4111 * @first_property_name: the name of the first property, or %NULL if no properties
4112 * @...: the value of the first property, followed by other property value pairs, and ended by %NULL.
4114 * Helper function for constructing #GAsyncInitiable object. This is
4115 * similar to g_object_new() but also initializes the object asynchronously.
4116 * When the initialization is finished, @callback will be called. You can
4117 * then call g_async_initable_new_finish() to get the new object and check
4125 * GWin32OutputStream:handle:
4127 * The file handle that the stream writes to.
4134 * SECTION:gasyncresul:
4135 * @short_description: Asynchronous Function Results
4136 * @include: gio/gio.h
4137 * @see_also: #GSimpleAsyncResult
4139 * Provides a base class for implementing asynchronous function results.
4140 * Asynchronous operations are broken up into two separate operations
4141 * which are chained together by a #GAsyncReadyCallback. To begin
4142 * an asynchronous operation, provide a #GAsyncReadyCallback to the
4143 * asynchronous function. This callback will be triggered when the
4144 * operation has completed, and will be passed a #GAsyncResult instance
4145 * filled with the details of the operation's success or failure, the
4146 * object the asynchronous function was started for and any error codes
4147 * returned. The asynchronous callback function is then expected to call
4148 * the corresponding "_finish()" function, passing the object the
4149 * function was called for, the #GAsyncResult instance, and (optionally)
4150 * an @error to grab any error conditions that may have occurred.
4151 * The "_finish()" function for an operation takes the generic result
4152 * (of type #GAsyncResult) and returns the specific result that the
4153 * operation in question yields (e.g. a #GFileEnumerator for a
4154 * "enumerate children" operation). If the result or error status of the
4155 * operation is not needed, there is no need to call the "_finish()"
4156 * function; GIO will take care of cleaning up the result and error
4157 * information after the #GAsyncReadyCallback returns. Applications may
4158 * also take a reference to the #GAsyncResult and call "_finish()"
4159 * later; however, the "_finish()" function may be called at most once.
4160 * Example of a typical asynchronous operation flow:
4162 * void _theoretical_frobnitz_async (Theoretical *t,
4164 * GAsyncReadyCallback *cb,
4166 * gboolean _theoretical_frobnitz_finish (Theoretical *t,
4167 * GAsyncResult *res,
4170 * frobnitz_result_func (GObject *source_object,
4171 * GAsyncResult *res,
4172 * gpointer user_data)
4174 * gboolean success = FALSE;
4175 * success = _theoretical_frobnitz_finish (source_object, res, NULL);
4177 * g_printf ("Hurray!\n");
4179 * g_printf ("Uh oh!\n");
4180 * /<!-- -->* ... *<!-- -->/
4182 * int main (int argc, void *argv[])
4184 * /<!-- -->* ... *<!-- -->/
4185 * _theoretical_frobnitz_async (theoretical_data,
4187 * frobnitz_result_func,
4189 * /<!-- -->* ... *<!-- -->/
4192 * The callback for an asynchronous operation is called only once, and is
4193 * always called, even in the case of a cancelled operation. On cancellation
4194 * the result is a %G_IO_ERROR_CANCELLED error.
4195 * Some asynchronous operations are implemented using synchronous calls.
4196 * These are run in a separate thread, if #GThread has been initialized, but
4197 * otherwise they are sent to the Main Event Loop and processed in an idle
4198 * function. So, if you truly need asynchronous operations, make sure to
4199 * initialize #GThread.
4204 * g_icon_new_for_string:
4205 * @str: A string obtained via g_icon_to_string().
4206 * @error: Return location for error.
4208 * Generate a #GIcon instance from @str. This function can fail if
4209 * If your application or library provides one or more #GIcon
4210 * implementations you need to ensure that each #GType is registered
4211 * with the type system prior to calling g_icon_new_for_string().
4213 * Returns: An object implementing the #GIcon interface or %NULL if
4219 * g_app_info_supports_files:
4220 * @appinfo: a #GAppInfo.
4222 * Checks if the application accepts files as arguments.
4224 * Returns: %TRUE if the @appinfo supports files.
4229 * g_action_group_get_action_state:
4230 * @action_group: a #GActionGroup
4231 * @action_name: the name of the action to query
4233 * Queries the current state of the named action within @action_group.
4234 * If the action is not stateful then %NULL will be returned. If the
4235 * action is stateful then the type of the return value is the type
4236 * given by g_action_group_get_state_type().
4237 * The return value (if non-%NULL) should be freed with
4238 * g_variant_unref() when it is no longer required.
4240 * Returns: (allow-none): the current state of the action
4247 * @drive: a #GDrive.
4249 * Checks if a drive can be stopped.
4251 * Returns: %TRUE if the @drive can be stopped, %FALSE otherwise.
4257 * g_file_input_stream_query_info_async:
4258 * @stream: a #GFileInputStream.
4259 * @attributes: a file attribute query string.
4260 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
4261 * @cancellable: optional #GCancellable object, %NULL to ignore.
4262 * @callback: callback to call when the request is satisfied
4263 * @user_data: the data to pass to callback function
4265 * Queries the stream information asynchronously.
4266 * When the operation is finished @callback will be called.
4267 * You can then call g_file_input_stream_query_info_finish()
4268 * to get the result of the operation.
4269 * For the synchronous version of this function,
4270 * see g_file_input_stream_query_info().
4271 * If @cancellable is not %NULL, then the operation can be cancelled by
4272 * triggering the cancellable object from another thread. If the operation
4273 * was cancelled, the error %G_IO_ERROR_CANCELLED will be set
4278 * GSimplePermission:
4280 * #GSimplePermission is an opaque data structure. There are no methods
4281 * except for those defined by #GPermission.
4286 * g_data_input_stream_read_until:
4287 * @stream: a given #GDataInputStream.
4288 * @stop_chars: characters to terminate the read.
4289 * @length: a #gsize to get the length of the data read in.
4290 * @cancellable: optional #GCancellable object, %NULL to ignore.
4291 * @error: #GError for error reporting.
4293 * Reads a string from the data input stream, up to the first
4294 * occurrence of any of the stop characters.
4295 * Note that, in contrast to g_data_input_stream_read_until_async(),
4296 * this function consumes the stop character that it finds.
4297 * Don't use this function in new code. Its functionality is
4298 * inconsistent with g_data_input_stream_read_until_async(). Both
4299 * functions will be marked as deprecated in a future release. Use
4300 * g_data_input_stream_read_upto() instead, but note that that function
4301 * does not consume the stop character.
4302 * any of the stop characters. Set @length to a #gsize to get the length
4303 * of the string. This function will return %NULL on an error.
4305 * Returns: a string with the data that was read before encountering
4310 * g_cancellable_connect:
4311 * @cancellable: A #GCancellable.
4312 * @callback: The #GCallback to connect.
4313 * @data: Data to pass to @callback.
4314 * @data_destroy_func: Free function for @data or %NULL.
4316 * Convenience function to connect to the #GCancellable::cancelled
4317 * signal. Also handles the race condition that may happen
4318 * if the cancellable is cancelled right before connecting.
4319 * time of the connect if @cancellable is already cancelled,
4320 * or when @cancellable is cancelled in some thread.
4321 * disconnected, or immediately if the cancellable is already
4323 * See #GCancellable::cancelled for details on how to use this.
4326 * Returns: The id of the signal handler or 0 if @cancellable has already
4332 * GSimpleAction:enabled:
4334 * If @action is currently enabled.
4335 * If the action is disabled then calls to g_simple_action_activate() and
4336 * g_simple_action_set_state() have no effect.
4343 * g_app_launch_context_new:
4345 * Creates a new application launch context. This is not normally used,
4346 * instead you instantiate a subclass of this, such as #GdkAppLaunchContext.
4348 * Returns: a #GAppLaunchContext.
4353 * g_simple_async_result_set_op_res_gpointer:
4354 * @simple: a #GSimpleAsyncResult.
4355 * @op_res: a pointer result from an asynchronous function.
4356 * @destroy_op_res: a #GDestroyNotify function.
4358 * Sets the operation result within the asynchronous result to a pointer.
4363 * g_unix_mount_get_device_path:
4364 * @mount_entry: a #GUnixMount.
4366 * Gets the device path for a unix mount.
4368 * Returns: a string containing the device path.
4373 * g_dbus_error_strip_remote_error:
4374 * @error: A #GError.
4376 * Looks for extra information in the error message used to recover
4377 * the D-Bus error name and strips it if found. If stripped, the
4378 * message field in @error will correspond exactly to what was
4379 * received on the wire.
4380 * This is typically used when presenting errors to the end user.
4382 * Returns: %TRUE if information was stripped, %FALSE otherwise.
4388 * g_socket_control_message_deserialize:
4389 * @level: a socket level
4390 * @type: a socket control message type for the given @level
4391 * @size: the size of the data in bytes
4392 * @data: pointer to the message data
4394 * Tries to deserialize a socket control message of a given
4395 * of #GSocketControlMessage if they can understand this kind
4396 * of message and if so deserialize it into a #GSocketControlMessage.
4397 * If there is no implementation for this kind of control message, %NULL
4400 * Returns: (transfer full): the deserialized message or %NULL
4406 * g_file_enumerate_children:
4407 * @file: input #GFile.
4408 * @attributes: an attribute query string.
4409 * @flags: a set of #GFileQueryInfoFlags.
4410 * @cancellable: optional #GCancellable object, %NULL to ignore.
4411 * @error: #GError for error reporting.
4413 * Gets the requested information about the files in a directory. The result
4414 * is a #GFileEnumerator object that will give out #GFileInfo objects for
4415 * all the files in the directory.
4416 * The @attributes value is a string that specifies the file attributes that
4417 * should be gathered. It is not an error if it's not possible to read a particular
4418 * requested attribute from a file - it just won't be set. @attributes should
4419 * be a comma-separated list of attributes or attribute wildcards. The wildcard "*"
4420 * means all attributes, and a wildcard like "standard::*" means all attributes in the standard
4421 * namespace. An example attribute query be "standard::*,owner::user".
4422 * The standard attributes are available as defines, like #G_FILE_ATTRIBUTE_STANDARD_NAME.
4423 * If @cancellable is not %NULL, then the operation can be cancelled by
4424 * triggering the cancellable object from another thread. If the operation
4425 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
4426 * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
4427 * If the file is not a directory, the G_FILE_ERROR_NOTDIR error will be returned.
4428 * Other errors are possible too.
4429 * Free the returned object with g_object_unref().
4431 * Returns: (transfer full): A #GFileEnumerator if successful, %NULL on error.
4436 * g_output_stream_clear_pending:
4437 * @stream: output stream
4439 * Clears the pending flag on @stream.
4444 * g_permission_get_can_release:
4445 * @permission: a #GPermission instance
4446 * @returns: the value of the 'can-release' property
4448 * Gets the value of the 'can-release' property. This property is %TRUE
4449 * if it is generally possible to release the permission by calling
4450 * g_permission_release().
4457 * g_mount_get_default_location:
4458 * @mount: a #GMount.
4460 * Gets the default location of @mount. The default location of the given
4461 * the home directory, or the root of the volume).
4462 * The returned object should be unreffed with
4463 * g_object_unref() when no longer needed.
4465 * Returns: (transfer full): a #GFile.
4470 * g_io_scheduler_job_send_to_mainloop:
4471 * @job: a #GIOSchedulerJob
4472 * @func: a #GSourceFunc callback that will be called in the original thread
4473 * @user_data: data to pass to @func
4474 * @notify: a #GDestroyNotify for @user_data, or %NULL
4476 * Used from an I/O job to send a callback to be run in the thread
4477 * that the job was started from, waiting for the result (and thus
4478 * blocking the I/O job).
4480 * Returns: The return value of @func
4485 * SECTION:gdatainputstrea:
4486 * @short_description: Data Input Stream
4487 * @include: gio/gio.h
4488 * @see_also: #GInputStream
4490 * Data input stream implements #GInputStream and includes functions for
4491 * reading structured data directly from a binary input stream.
4496 * g_socket_client_get_family:
4497 * @client: a #GSocketClient.
4499 * Gets the socket family of the socket client.
4500 * See g_socket_client_set_family() for details.
4502 * Returns: a #GSocketFamily
4508 * g_simple_async_result_new:
4509 * @source_object: a #GObject the asynchronous function was called with, or %NULL.
4510 * @callback: a #GAsyncReadyCallback.
4511 * @user_data: user data passed to @callback.
4512 * @source_tag: the asynchronous function.
4514 * Creates a #GSimpleAsyncResult.
4516 * Returns: a #GSimpleAsyncResult.
4521 * g_content_type_get_mime_type:
4522 * @type: a content type string
4524 * Gets the mime type for the content type, if one is registered.
4525 * or %NULL if unknown.
4527 * Returns: (allow-none): the registered mime type for the given @type,
4532 * g_file_find_enclosing_mount_async:
4534 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
4535 * @cancellable: optional #GCancellable object, %NULL to ignore.
4536 * @callback: a #GAsyncReadyCallback to call when the request is satisfied
4537 * @user_data: the data to pass to callback function
4539 * Asynchronously gets the mount for the file.
4540 * For more details, see g_file_find_enclosing_mount() which is
4541 * the synchronous version of this call.
4542 * When the operation is finished, @callback will be called. You can then call
4543 * g_file_find_enclosing_mount_finish() to get the result of the operation.
4548 * g_file_open_readwrite_async:
4549 * @file: input #GFile.
4550 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
4551 * @cancellable: optional #GCancellable object, %NULL to ignore.
4552 * @callback: a #GAsyncReadyCallback to call when the request is satisfied
4553 * @user_data: the data to pass to callback function
4555 * Asynchronously opens @file for reading and writing.
4556 * For more details, see g_file_open_readwrite() which is
4557 * the synchronous version of this call.
4558 * When the operation is finished, @callback will be called. You can then call
4559 * g_file_open_readwrite_finish() to get the result of the operation.
4566 * SECTION:gproxyresolve:
4567 * @short_description: Asynchronous and cancellable network proxy resolver
4568 * @include: gio/gio.h
4570 * #GProxyResolver provides synchronous and asynchronous network proxy
4571 * resolution. #GProxyResolver is used within #GClientSocket through
4572 * the method g_socket_connectable_proxy_enumerate().
4577 * g_socket_client_set_enable_proxy:
4578 * @client: a #GSocketClient.
4579 * @enable: whether to enable proxies
4581 * Sets whether or not @client attempts to make connections via a
4582 * proxy server. When enabled (the default), #GSocketClient will use a
4583 * #GProxyResolver to determine if a proxy protocol such as SOCKS is
4584 * needed, and automatically do the necessary proxy negotiation.
4591 * g_file_attribute_matcher_matches:
4592 * @matcher: a #GFileAttributeMatcher.
4593 * @attribute: a file attribute key.
4595 * Checks if an attribute will be matched by an attribute matcher. If
4596 * the matcher was created with the "*" matching string, this function
4597 * will always return %TRUE.
4599 * Returns: %TRUE if @attribute matches @matcher. %FALSE otherwise.
4604 * g_resolver_lookup_service_finish:
4605 * @resolver: a #GResolver
4606 * @result: the result passed to your #GAsyncReadyCallback
4607 * @error: return location for a #GError, or %NULL
4609 * Retrieves the result of a previous call to
4610 * g_resolver_lookup_service_async().
4611 * If the DNS resolution failed, @error (if non-%NULL) will be set to
4612 * a value from #GResolverError. If the operation was cancelled,
4613 * or %NULL on error. See g_resolver_lookup_service() for more details.
4615 * Returns: (element-type GSrvTarget) (transfer full): a #GList of #GSrvTarget,
4621 * g_file_info_set_attribute_int32:
4622 * @info: a #GFileInfo.
4623 * @attribute: a file attribute key.
4624 * @attr_value: a signed 32-bit integer
4626 * Sets the @attribute to contain the given @attr_value,
4632 * g_socket_client_connect_to_service_finish:
4633 * @client: a #GSocketClient.
4634 * @result: a #GAsyncResult.
4635 * @error: a #GError location to store the error occuring, or %NULL to ignore.
4637 * Finishes an async connect operation. See g_socket_client_connect_to_service_async()
4639 * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
4645 * g_cancellable_cancel:
4646 * @cancellable: a #GCancellable object.
4648 * Will set @cancellable to cancelled, and will emit the
4649 * #GCancellable::cancelled signal. (However, see the warning about
4650 * race conditions in the documentation for that signal if you are
4651 * planning to connect to it.)
4652 * This function is thread-safe. In other words, you can safely call
4653 * it from a thread other than the one running the operation that was
4654 * passed the @cancellable.
4655 * The convention within gio is that cancelling an asynchronous
4656 * operation causes it to complete asynchronously. That is, if you
4657 * cancel the operation from the same thread in which it is running,
4658 * then the operation's #GAsyncReadyCallback will not be invoked until
4659 * the application returns to the main loop.
4664 * g_dbus_arg_info_ref:
4665 * @info: A #GDBusArgInfo
4667 * If @info is statically allocated does nothing. Otherwise increases
4668 * the reference count.
4670 * Returns: The same @info.
4676 * g_file_attribute_matcher_enumerate_next:
4677 * @matcher: a #GFileAttributeMatcher.
4679 * Gets the next matched attribute from a #GFileAttributeMatcher.
4680 * no more attribute exist.
4682 * Returns: a string containing the next attribute or %NULL if
4687 * g_file_enumerator_close:
4688 * @enumerator: a #GFileEnumerator.
4689 * @cancellable: optional #GCancellable object, %NULL to ignore.
4690 * @error: location to store the error occuring, or %NULL to ignore
4692 * Releases all resources used by this enumerator, making the
4693 * enumerator return %G_IO_ERROR_CLOSED on all calls.
4694 * This will be automatically called when the last reference
4695 * is dropped, but you might want to call this function to make
4696 * sure resources are released as early as possible.
4698 * Returns: #TRUE on success or #FALSE on error.
4703 * g_socket_control_message_get_msg_type:
4704 * @message: a #GSocketControlMessage
4706 * Returns the protocol specific type of the control message.
4707 * For instance, for UNIX fd passing this would be SCM_RIGHTS.
4709 * Returns: an integer describing the type of control message
4715 * g_file_io_stream_query_info_async:
4716 * @stream: a #GFileIOStream.
4717 * @attributes: a file attribute query string.
4718 * @io_priority: the <link linkend="gio-GIOScheduler">I/O priority</link> of the request.
4719 * @cancellable: optional #GCancellable object, %NULL to ignore.
4720 * @callback: callback to call when the request is satisfied
4721 * @user_data: the data to pass to callback function
4723 * Asynchronously queries the @stream for a #GFileInfo. When completed,
4724 * finish the operation with g_file_io_stream_query_info_finish().
4725 * For the synchronous version of this function, see
4726 * g_file_io_stream_query_info().
4733 * g_memory_output_stream_get_data: (skip)
4734 * @ostream: a #GMemoryOutputStream
4736 * Gets any loaded data from the @ostream.
4737 * Note that the returned pointer may become invalid on the next
4738 * write or truncate operation on the stream.
4740 * Returns: pointer to the stream's data
4745 * g_data_input_stream_read_upto_finish:
4746 * @stream: a #GDataInputStream
4747 * @result: the #GAsyncResult that was provided to the callback
4748 * @length: a #gsize to get the length of the data read in
4749 * @error: #GError for error reporting
4751 * Finish an asynchronous call started by
4752 * g_data_input_stream_read_upto_async().
4753 * Note that this function does <emphasis>not</emphasis> consume the
4754 * stop character. You have to use g_data_input_stream_read_byte() to
4755 * get it before calling g_data_input_stream_read_upto_async() again.
4756 * any of the stop characters. Set @length to a #gsize to get the length
4757 * of the string. This function will return %NULL on an error.
4759 * Returns: a string with the data that was read before encountering
4765 * g_simple_action_group_remove:
4766 * @simple: a #GSimpleActionGroup
4767 * @action_name: the name of the action
4769 * Removes the named action from the action group.
4770 * If no action of this name is in the group then nothing happens.
4777 * g_output_stream_splice:
4778 * @stream: a #GOutputStream.
4779 * @source: a #GInputStream.
4780 * @flags: a set of #GOutputStreamSpliceFlags.
4781 * @cancellable: optional #GCancellable object, %NULL to ignore.
4782 * @error: a #GError location to store the error occuring, or %NULL to ignore.
4784 * Splices an input stream into an output stream.
4785 * -1 if an error occurred.
4787 * Returns: a #gssize containing the size of the data spliced, or
4792 * g_socket_client_connect_to_uri:
4793 * @client: a #GSocketClient
4794 * @uri: A network URI
4795 * @default_port: the default port to connect to
4796 * @cancellable: a #GCancellable, or %NULL
4797 * @error: a pointer to a #GError, or %NULL
4799 * This is a helper function for g_socket_client_connect().
4800 * Attempts to create a TCP connection with a network URI.
4801 * component. If a port is not specified in the URI, @default_port
4803 * Using this rather than g_socket_client_connect() or
4804 * g_socket_client_connect_to_host() allows #GSocketClient to
4805 * determine when to use application-specific proxy protocols.
4806 * Upon a successful connection, a new #GSocketConnection is constructed
4807 * and returned. The caller owns this new object and must drop their
4808 * reference to it when finished with it.
4809 * In the event of any failure (DNS error, service not found, no hosts
4810 * connectable) %NULL is returned and @error (if non-%NULL) is set
4813 * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
4819 * g_unix_mount_points_get:
4820 * @time_read: (allow-none): guint64 to contain a timestamp.
4822 * Gets a #GList of #GUnixMountPoint containing the unix mount points.
4823 * If @time_read is set, it will be filled with the mount timestamp,
4824 * allowing for checking if the mounts have changed with
4825 * g_unix_mounts_points_changed_since().
4827 * Returns: (element-type utf8) (transfer full): a #GList of the UNIX mountpoints.
4832 * g_mount_guess_content_type_sync:
4834 * @force_rescan: Whether to force a rescan of the content. Otherwise a cached result will be used if available
4835 * @cancellable: optional #GCancellable object, %NULL to ignore
4836 * @error: a #GError location to store the error occuring, or %NULL to ignore
4838 * Tries to guess the type of content stored on @mount. Returns one or
4839 * more textual identifiers of well-known content types (typically
4840 * prefixed with "x-content/"), e.g. x-content/image-dcf for camera
4841 * memory cards. See the <ulink url="http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec">shared-mime-info</ulink>
4842 * specification for more on x-content types.
4843 * This is an synchronous operation and as such may block doing IO;
4844 * see g_mount_guess_content_type() for the asynchronous version.
4845 * Caller should free this array with g_strfreev() when done with it.
4847 * Returns: (transfer full) (element-type utf8): a %NULL-terminated array of content types or %NULL on error.
4853 * g_async_initable_init_async:
4854 * @initable: a #GAsyncInitable.
4855 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the operation.
4856 * @cancellable: optional #GCancellable object, %NULL to ignore.
4857 * @callback: a #GAsyncReadyCallback to call when the request is satisfied
4858 * @user_data: the data to pass to callback function
4860 * Starts asynchronous initialization of the object implementing the
4861 * interface. This must be done before any real use of the object after
4862 * initial construction. If the object also implements #GInitable you can
4863 * optionally call g_initable_init() instead.
4864 * When the initialization is finished, @callback will be called. You can
4865 * then call g_async_initable_init_finish() to get the result of the
4867 * Implementations may also support cancellation. If @cancellable is not
4868 * %NULL, then initialization can be cancelled by triggering the cancellable
4869 * object from another thread. If the operation was cancelled, the error
4870 * %G_IO_ERROR_CANCELLED will be returned. If @cancellable is not %NULL, and
4871 * the object doesn't support cancellable initialization, the error
4872 * %G_IO_ERROR_NOT_SUPPORTED will be returned.
4873 * If this function is not called, or returns with an error, then all
4874 * operations on the object should fail, generally returning the
4875 * error %G_IO_ERROR_NOT_INITIALIZED.
4876 * to this function with the same argument should return the same results.
4877 * Only the first call initializes the object; further calls return the result
4878 * of the first call. This is so that it's safe to implement the singleton
4879 * pattern in the GObject constructor function.
4880 * For classes that also support the #GInitable interface, the default
4881 * implementation of this method will run the g_initable_init() function
4882 * in a thread, so if you want to support asynchronous initialization via
4883 * threads, just implement the #GAsyncInitable interface without overriding
4884 * any interface methods.
4886 * Implementations of this method must be idempotent: i.e. multiple calls
4892 * g_file_new_for_path:
4893 * @path: a string containing a relative or absolute path. The string must be encoded in the glib filename encoding.
4895 * Constructs a #GFile for a given path. This operation never
4896 * fails, but the returned object might not support any I/O
4897 * operation if @path is malformed.
4899 * Returns: (transfer full): a new #GFile for the given @path.
4904 * g_file_copy_attributes:
4905 * @source: a #GFile with attributes.
4906 * @destination: a #GFile to copy attributes to.
4907 * @flags: a set of #GFileCopyFlags.
4908 * @cancellable: optional #GCancellable object, %NULL to ignore.
4909 * @error: a #GError, %NULL to ignore.
4911 * Copies the file attributes from @source to @destination.
4912 * Normally only a subset of the file attributes are copied,
4913 * those that are copies in a normal file copy operation
4914 * (which for instance does not include e.g. owner). However
4915 * if #G_FILE_COPY_ALL_METADATA is specified in @flags, then
4916 * all the metadata that is possible to copy is copied. This
4917 * is useful when implementing move by copy + delete source.
4919 * Returns: %TRUE if the attributes were copied successfully, %FALSE otherwise.
4924 * g_dbus_message_get_byte_order:
4925 * @message: A #GDBusMessage.
4927 * Gets the byte order of @message.
4929 * Returns: The byte order.
4934 * g_app_info_get_default_for_type:
4935 * @content_type: the content type to find a #GAppInfo for
4936 * @must_support_uris: if %TRUE, the #GAppInfo is expected to support URIs
4938 * Gets the #GAppInfo that corresponds to a given content type.
4940 * Returns: #GAppInfo for given @content_type or %NULL on error.
4946 * @settings: a #GSettings instance
4948 * Applies any changes that have been made to the settings. This
4949 * function does nothing unless @settings is in 'delay-apply' mode;
4950 * see g_settings_delay(). In the normal case settings are always
4951 * applied immediately.
4956 * g_file_info_get_symlink_target:
4957 * @info: a #GFileInfo.
4959 * Gets the symlink target for a given #GFileInfo.
4961 * Returns: a string containing the symlink target.
4966 * g_output_stream_is_closed:
4967 * @stream: a #GOutputStream.
4969 * Checks if an output stream has already been closed.
4971 * Returns: %TRUE if @stream is closed. %FALSE otherwise.
4976 * g_file_load_partial_contents_finish:
4977 * @file: input #GFile.
4978 * @res: a #GAsyncResult.
4979 * @contents: (out) (transfer full): a location to place the contents of the file.
4980 * @length: (out) (allow-none): a location to place the length of the contents of the file, or %NULL if the length is not needed
4981 * @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
4982 * @error: a #GError, or %NULL
4984 * Finishes an asynchronous partial load operation that was started
4985 * with g_file_load_partial_contents_async(). The data is always
4986 * zero-terminated, but this is not included in the resultant @length.
4987 * The returned @content should be freed with g_free() when no longer
4989 * present, it will be set appropriately.
4991 * Returns: %TRUE if the load was successful. If %FALSE and @error is
4996 * g_socket_listener_add_address:
4997 * @listener: a #GSocketListener
4998 * @address: a #GSocketAddress
4999 * @type: a #GSocketType
5000 * @protocol: a #GSocketProtocol
5001 * @source_object: Optional #GObject identifying this source
5002 * @effective_address: (out) (allow-none): location to store the address that was bound to, or %NULL.
5003 * @error: #GError for error reporting, or %NULL to ignore.
5005 * Creates a socket of type @type and protocol @protocol, binds
5006 * it to @address and adds it to the set of sockets we're accepting
5008 * Note that adding an IPv6 address, depending on the platform,
5009 * may or may not result in a listener that also accepts IPv4
5010 * connections. For more determinstic behaviour, see
5011 * g_socket_listener_add_inet_port().
5012 * to accept to identify this particular source, which is
5013 * useful if you're listening on multiple addresses and do
5014 * different things depending on what address is connected to.
5015 * If successful and @effective_address is non-%NULL then it will
5016 * be set to the address that the binding actually occured at. This
5017 * is helpful for determining the port number that was used for when
5018 * requested, belongs to the caller and must be freed.
5020 * Requesting a binding to port 0 (ie: "any port"). This address, if
5021 * Returns: %TRUE on success, %FALSE on error.
5027 * g_socket_get_socket_type:
5028 * @socket: a #GSocket.
5030 * Gets the socket type of the socket.
5032 * Returns: a #GSocketType
5038 * g_vfs_get_supported_uri_schemes:
5041 * Gets a list of URI schemes supported by @vfs.
5042 * The returned array belongs to GIO and must
5043 * not be freed or modified.
5045 * Returns: (transfer none): a %NULL-terminated array of strings.
5051 * @mount: the object on which the signal is emitted
5053 * Emitted when the mount has been changed.
5058 * g_action_get_state_hint:
5059 * @action: a #GAction
5061 * Requests a hint about the valid range of values for the state of
5062 * If %NULL is returned it either means that the action is not stateful
5063 * or that there is no hint about the valid range of values for the
5064 * state of the action.
5065 * If a #GVariant array is returned then each item in the array is a
5066 * returned then the tuple specifies the inclusive lower and upper bound
5067 * of valid values for the state.
5068 * In any case, the information is merely a hint. It may be possible to
5069 * have a state value outside of the hinted range and setting a value
5070 * within the range may fail.
5071 * The return value (if non-%NULL) should be freed with
5072 * g_variant_unref() when it is no longer required.
5074 * Possible value for the state. if a #gvariant pair (ie: two-tuple) is
5075 * Returns: (transfer full): the state range hint
5081 * g_action_group_activate_action:
5082 * @action_group: a #GActionGroup
5083 * @action_name: the name of the action to activate
5084 * @parameter: (allow-none): parameters to the activation
5086 * Activate the named action within @action_group.
5087 * If the action is expecting a parameter, then the correct type of
5088 * parameter must be given as @parameter. If the action is expecting no
5089 * parameters then @parameter must be %NULL. See
5090 * g_action_group_get_parameter_type().
5097 * g_file_info_get_edit_name:
5098 * @info: a #GFileInfo.
5100 * Gets the edit name for a file.
5102 * Returns: a string containing the edit name.
5107 * g_dbus_address_get_stream:
5108 * @address: A valid D-Bus address.
5109 * @cancellable: A #GCancellable or %NULL.
5110 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
5111 * @user_data: Data to pass to @callback.
5113 * Asynchronously connects to an endpoint specified by @address and
5114 * sets up the connection so it is in a state to run the client-side
5115 * of the D-Bus authentication conversation.
5116 * When the operation is finished, @callback will be invoked. You can
5117 * then call g_dbus_address_get_stream_finish() to get the result of
5119 * This is an asynchronous failable function. See
5120 * g_dbus_address_get_stream_sync() for the synchronous version.
5127 * g_simple_async_report_error_in_idle:
5128 * @object: a #GObject.
5129 * @callback: a #GAsyncReadyCallback.
5130 * @user_data: user data passed to @callback.
5131 * @domain: a #GQuark containing the error domain (usually #G_IO_ERROR).
5132 * @code: a specific error code.
5133 * @format: a formatted error reporting string.
5134 * @...: a list of variables to fill in @format.
5136 * Reports an error in an asynchronous function in an idle function by
5137 * directly setting the contents of the #GAsyncResult with the given error
5144 * @file: #GFile to read.
5145 * @cancellable: a #GCancellable
5146 * @error: a #GError, or %NULL
5148 * Opens a file for reading. The result is a #GFileInputStream that
5149 * can be used to read the contents of the file.
5150 * If @cancellable is not %NULL, then the operation can be cancelled by
5151 * triggering the cancellable object from another thread. If the operation
5152 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
5153 * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
5154 * If the file is a directory, the G_IO_ERROR_IS_DIRECTORY error will be returned.
5155 * Other errors are possible too, and depend on what kind of filesystem the file is on.
5156 * Free the returned object with g_object_unref().
5159 * Returns: (transfer full): #GFileInputStream or %NULL on error.
5164 * GVolumeMonitor::volume-added:
5165 * @volume_monitor: The volume monitor emitting the signal.
5166 * @volume: a #GVolume that was added.
5168 * Emitted when a mountable volume is added to the system.
5173 * g_volume_monitor_get_connected_drives:
5174 * @volume_monitor: a #GVolumeMonitor.
5176 * Gets a list of drives connected to the system.
5177 * The returned list should be freed with g_list_free(), after
5178 * its elements have been unreffed with g_object_unref().
5180 * Returns: (element-type GDrive) (transfer full): a #GList of connected #GDrive objects.
5185 * GDBusProxy::g-properties-changed:
5186 * @proxy: The #GDBusProxy emitting the signal.
5187 * @changed_properties: A #GVariant containing the properties that changed
5188 * @invalidated_properties: A %NULL terminated array of properties that was invalidated
5190 * Emitted when one or more D-Bus properties on @proxy changes. The
5191 * local cache has already been updated when this signal fires. Note
5192 * that both @changed_properties and @invalidated_properties are
5193 * guaranteed to never be %NULL (either may be empty though).
5194 * This signal corresponds to the
5195 * <literal>PropertiesChanged</literal> D-Bus signal on the
5196 * <literal>org.freedesktop.DBus.Properties</literal> interface.
5203 * g_simple_async_result_propagate_error:
5204 * @simple: a #GSimpleAsyncResult.
5205 * @dest: a location to propegate the error to.
5207 * Propagates an error from within the simple asynchronous result to
5208 * a given destination.
5210 * Returns: %TRUE if the error was propagated to @dest. %FALSE otherwise.
5215 * g_file_replace_readwrite_finish:
5216 * @file: input #GFile.
5217 * @res: a #GAsyncResult.
5218 * @error: a #GError, or %NULL
5220 * Finishes an asynchronous file replace operation started with
5221 * g_file_replace_readwrite_async().
5222 * Free the returned object with g_object_unref().
5224 * Returns: (transfer full): a #GFileIOStream, or %NULL on error.
5230 * GUnixInputStream:fd:
5232 * The file descriptor that the stream reads from.
5239 * GThemedIcon:names:
5241 * A %NULL-terminated array of icon names.
5246 * g_io_extension_point_register:
5247 * @name: The name of the extension point
5249 * Registers an extension point.
5250 * and should not be freed
5252 * Returns: the new #GIOExtensionPoint. This object is owned by GIO
5257 * g_async_initable_newv_async:
5258 * @object_type: a #GType supporting #GAsyncInitable.
5259 * @n_parameters: the number of parameters in @parameters
5260 * @parameters: the parameters to use to construct the object
5261 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the operation.
5262 * @cancellable: optional #GCancellable object, %NULL to ignore.
5263 * @callback: a #GAsyncReadyCallback to call when the initialization is finished
5264 * @user_data: the data to pass to callback function
5266 * Helper function for constructing #GAsyncInitiable object. This is
5267 * similar to g_object_newv() but also initializes the object asynchronously.
5268 * When the initialization is finished, @callback will be called. You can
5269 * then call g_async_initable_new_finish() to get the new object and check
5277 * g_simple_async_result_new_from_error:
5278 * @source_object: a #GObject, or %NULL.
5279 * @callback: a #GAsyncReadyCallback.
5280 * @user_data: user data passed to @callback.
5283 * Creates a #GSimpleAsyncResult from an error condition.
5285 * Returns: a #GSimpleAsyncResult.
5290 * g_file_info_get_sort_order:
5291 * @info: a #GFileInfo.
5293 * Gets the value of the sort_order attribute from the #GFileInfo.
5294 * See %G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER.
5296 * Returns: a #gint32 containing the value of the "standard::sort_order" attribute.
5301 * g_themed_icon_new:
5302 * @iconname: a string containing an icon name.
5304 * Creates a new themed icon for @iconname.
5306 * Returns: (transfer full): a new #GThemedIcon.
5311 * g_dbus_message_get_unix_fd_list:
5312 * @message: A #GDBusMessage.
5314 * Gets the UNIX file descriptors associated with @message, if any.
5315 * This method is only available on UNIX.
5316 * associated. Do not free, this object is owned by @message.
5318 * Returns: (transfer none): A #GUnixFDList or %NULL if no file descriptors are
5324 * GThreadedSocketService::run:
5325 * @service: the #GThreadedSocketService.
5326 * @connection: a new #GSocketConnection object.
5327 * @source_object: the source_object passed to g_socket_listener_add_address().
5329 * The ::run signal is emitted in a worker thread in response to an
5330 * incoming connection. This thread is dedicated to handling
5331 * not return until the connection is closed.
5333 * Returns: %TRUE to stope further signal handlers from being called
5338 * g_dbus_proxy_new_for_bus_finish:
5339 * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback function passed to g_dbus_proxy_new_for_bus().
5340 * @error: Return location for error or %NULL.
5342 * Finishes creating a #GDBusProxy.
5344 * Returns: A #GDBusProxy or %NULL if @error is set. Free with g_object_unref().
5350 * g_unix_mount_guess_can_eject:
5351 * @mount_entry: a #GUnixMountEntry
5353 * Guesses whether a Unix mount can be ejected.
5355 * Returns: %TRUE if @mount_entry is deemed to be ejectable.
5360 * g_drive_stop_finish:
5361 * @drive: a #GDrive.
5362 * @result: a #GAsyncResult.
5363 * @error: a #GError, or %NULL
5365 * Finishes stopping a drive.
5368 * Returns: %TRUE if the drive has been stopped successfully,
5374 * g_memory_output_stream_new:
5375 * @data: pointer to a chunk of memory to use, or %NULL
5376 * @size: the size of @data
5377 * @realloc_function: a function with realloc() semantics (like g_realloc()) to be called when @data needs to be grown, or %NULL
5378 * @destroy_function: a function to be called on @data when the stream is finalized, or %NULL
5380 * Creates a new #GMemoryOutputStream.
5381 * If @data is non-%NULL, the stream will use that for its internal storage.
5382 * If @realloc_fn is non-%NULL, it will be used for resizing the internal
5383 * storage when necessary. To construct a fixed-size output stream,
5384 * pass %NULL as @realloc_fn.
5386 * /* a stream that can grow */
5387 * stream = g_memory_output_stream_new (NULL, 0, realloc, free);
5388 * /* another stream that can grow */
5389 * stream2 = g_memory_output_stream_new (NULL, 0, g_realloc, g_free);
5390 * /* a fixed-size stream */
5391 * data = malloc (200);
5392 * stream3 = g_memory_output_stream_new (data, 200, NULL, free);
5395 * Returns: A newly created #GMemoryOutputStream object.
5400 * g_buffered_output_stream_set_buffer_size:
5401 * @stream: a #GBufferedOutputStream.
5404 * Sets the size of the internal buffer to @size.
5411 * The #GDBusConnection structure contains only private data and
5412 * should only be accessed using the provided API.
5419 * g_proxy_address_get_passwor:
5420 * @proxy: a #GProxyAddress
5422 * Gets @proxy's password.
5424 * Returns: the @proxy's password
5430 * g_periodic_unblock:
5431 * @periodic: a #GPeriodic clock
5432 * @unblock_time: the unblock time
5434 * Reverses the effect of a previous call to g_periodic_block().
5435 * If this call removes the last block, the tick signal is immediately
5436 * run. The repair signal may also be run if the clock is marked as
5438 * at which the event causing the unblock occured.
5439 * This function may not be called from handlers of any signal emitted
5447 * g_file_info_get_attribute_object:
5448 * @info: a #GFileInfo.
5449 * @attribute: a file attribute key.
5451 * Gets the value of a #GObject attribute. If the attribute does
5452 * not contain a #GObject, %NULL will be returned.
5455 * Returns: (transfer none): a #GObject associated with the given @attribute, or
5460 * g_action_set_state:
5461 * @action: a #GAction
5462 * @value: the new state
5464 * Request for the state of @action to be changed to @value.
5465 * The action must be stateful and @value must be of the correct type.
5466 * See g_action_get_state_type().
5467 * This call merely requests a change. The action may refuse to change
5468 * its state or may change its state to something other than @value.
5469 * See g_action_get_state_hint().
5470 * If the @value GVariant is floating, it is consumed.
5477 * g_file_replace_finish:
5478 * @file: input #GFile.
5479 * @res: a #GAsyncResult.
5480 * @error: a #GError, or %NULL
5482 * Finishes an asynchronous file replace operation started with
5483 * g_file_replace_async().
5484 * Free the returned object with g_object_unref().
5486 * Returns: (transfer full): a #GFileOutputStream, or %NULL on error.
5491 * g_file_has_parent:
5492 * @file: input #GFile
5493 * @parent: the parent to check for, or %NULL
5495 * Checks if @file has a parent, and optionally, if it is @parent.
5496 * If @parent is %NULL then this function returns %TRUE if @file has any
5497 * parent at all. If @parent is non-%NULL then %TRUE is only returned
5498 * if @file is a child of @parent.
5499 * case that @parent is %NULL).
5501 * Returns: %TRUE if @file is a child of @parent (or any parent in the
5507 * g_dbus_is_supported_address:
5508 * @string: A string.
5509 * @error: Return location for error or %NULL.
5511 * Like g_dbus_is_address() but also checks if the library suppors the
5512 * transports in @string and that key/value pairs for each transport
5514 * supported by this library, %FALSE if @error is set.
5516 * Returns: %TRUE if @string is a valid D-Bus address that is
5522 * g_socket_connection_get_remote_address:
5523 * @connection: a #GSocketConnection
5524 * @error: #GError for error reporting, or %NULL to ignore.
5526 * Try to get the remote address of a socket connection.
5527 * Free the returned object with g_object_unref().
5529 * Returns: (transfer full): a #GSocketAddress or %NULL on error.
5535 * g_dbus_message_new_method_call:
5536 * @name: A valid D-Bus name or %NULL.
5537 * @path: A valid object path.
5538 * @interface_: A valid D-Bus interface name or %NULL.
5539 * @method: A valid method name.
5541 * Creates a new #GDBusMessage for a method call.
5543 * Returns: A #GDBusMessage. Free with g_object_unref().
5549 * g_simple_async_result_new_error:
5550 * @source_object: a #GObject, or %NULL.
5551 * @callback: a #GAsyncReadyCallback.
5552 * @user_data: user data passed to @callback.
5553 * @domain: a #GQuark.
5554 * @code: an error code.
5555 * @format: a string with format characters.
5556 * @...: a list of values to insert into @format.
5558 * Creates a new #GSimpleAsyncResult with a set error.
5560 * Returns: a #GSimpleAsyncResult.
5565 * g_simple_async_report_take_gerror_in_idle:
5566 * @object: a #GObject.
5567 * @callback: a #GAsyncReadyCallback.
5568 * @user_data: user data passed to @callback.
5569 * @error: the #GError to report
5571 * Reports an error in an idle function. Similar to
5572 * g_simple_async_report_gerror_in_idle(), but takes over the caller's
5573 * ownership of @error, so the caller does not have to free it any more.
5580 * g_file_unmount_mountable_finish:
5581 * @file: input #GFile.
5582 * @result: a #GAsyncResult.
5583 * @error: a #GError, or %NULL
5585 * Finishes an unmount operation, see g_file_unmount_mountable() for details.
5586 * Finish an asynchronous unmount operation that was started
5587 * with g_file_unmount_mountable().
5590 * Returns: %TRUE if the operation finished successfully. %FALSE
5591 * Deprecated: 2.22: Use g_file_unmount_mountable_with_operation_finish() instead.
5596 * g_app_info_can_remove_supports_type:
5597 * @appinfo: a #GAppInfo.
5599 * Checks if a supported content type can be removed from an application.
5600 * content types from a given @appinfo, %FALSE if not.
5602 * Returns: %TRUE if it is possible to remove supported
5607 * g_input_stream_read_finish:
5608 * @stream: a #GInputStream.
5609 * @result: a #GAsyncResult.
5610 * @error: a #GError location to store the error occuring, or %NULL to ignore.
5612 * Finishes an asynchronous stream read operation.
5614 * Returns: number of bytes read in, or -1 on error.
5619 * g_dbus_signal_info_ref:
5620 * @info: A #GDBusSignalInfo
5622 * If @info is statically allocated does nothing. Otherwise increases
5623 * the reference count.
5625 * Returns: The same @info.
5631 * g_loadable_icon_load:
5632 * @icon: a #GLoadableIcon.
5633 * @size: an integer.
5634 * @type: a location to store the type of the loaded icon, %NULL to ignore.
5635 * @cancellable: optional #GCancellable object, %NULL to ignore.
5636 * @error: a #GError location to store the error occuring, or %NULL to ignore.
5638 * Loads a loadable icon. For the asynchronous version of this function,
5639 * see g_loadable_icon_load_async().
5641 * Returns: (transfer full): a #GInputStream to read the icon from.
5646 * GMountOperation:domain:
5648 * The domain to use for the mount operation.
5653 * g_socket_client_connect_to_uri_async:
5654 * @client: a #GSocketClient
5655 * @uri: a network uri
5656 * @default_port: the default port to connect to
5657 * @cancellable: a #GCancellable, or %NULL
5658 * @callback: a #GAsyncReadyCallback
5659 * @user_data: user data for the callback
5661 * This is the asynchronous version of g_socket_client_connect_to_uri().
5662 * When the operation is finished @callback will be
5663 * called. You can then call g_socket_client_connect_to_uri_finish() to get
5664 * the result of the operation.
5671 * g_app_info_delete:
5672 * @appinfo: a #GAppInfo
5674 * Tries to delete a #GAppInfo.
5675 * On some platforms, there may be a difference between user-defined
5676 * #GAppInfo<!-- -->s which can be deleted, and system-wide ones which
5677 * cannot. See g_app_info_can_delete().
5679 * Virtual: do_delete
5680 * Returns: %TRUE if @appinfo has been deleted
5686 * g_socket_control_message_get_level:
5687 * @message: a #GSocketControlMessage
5689 * Returns the "level" (i.e. the originating protocol) of the control message.
5690 * This is often SOL_SOCKET.
5692 * Returns: an integer describing the level
5698 * SECTION:gdbusutil:
5699 * @title: D-Bus Utilities
5700 * @short_description: Various utilities related to D-Bus.
5701 * @include: gio/gio.h
5703 * Various utility routines related to D-Bus.
5708 * g_file_info_get_attribute_boolean:
5709 * @info: a #GFileInfo.
5710 * @attribute: a file attribute key.
5712 * Gets the value of a boolean attribute. If the attribute does not
5713 * contain a boolean value, %FALSE will be returned.
5715 * Returns: the boolean value contained within the attribute.
5720 * g_mount_operation_set_domain:
5721 * @op: a #GMountOperation.
5722 * @domain: the domain to set.
5724 * Sets the mount operation's domain.
5729 * g_unix_mount_point_is_loopback:
5730 * @mount_point: a #GUnixMountPoint.
5732 * Checks if a unix mount point is a loopback device.
5734 * Returns: %TRUE if the mount point is a loopback. %FALSE otherwise.
5739 * g_mount_operation_get_password:
5740 * @op: a #GMountOperation.
5742 * Gets a password from the mount operation.
5744 * Returns: a string containing the password within @op.
5749 * SECTION:gfilenamecomplete:
5750 * @short_description: Filename Completer
5751 * @include: gio/gio.h
5753 * Completes partial file and directory names given a partial string by
5754 * looking in the file system for clues. Can return a list of possible
5755 * completion strings for widget implementations.
5760 * g_dbus_message_get_interface:
5761 * @message: A #GDBusMessage.
5763 * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE header field.
5765 * Returns: The value.
5771 * g_content_types_get_registered:
5773 * Gets a list of strings containing all the registered content types
5774 * known to the system. The list and its data should be freed using
5776 * g_list_foreach (list, g_free, NULL);
5777 * g_list_free (list);
5780 * Returns: (element-type utf8) (transfer full): #GList of the registered content types
5785 * g_dbus_interface_info_ref:
5786 * @info: A #GDBusInterfaceInfo
5788 * If @info is statically allocated does nothing. Otherwise increases
5789 * the reference count.
5791 * Returns: The same @info.
5797 * g_file_info_clear_status:
5798 * @info: a #GFileInfo.
5800 * Clears the status information from @info.
5805 * g_file_eject_mountable:
5806 * @file: input #GFile.
5807 * @flags: flags affecting the operation
5808 * @cancellable: optional #GCancellable object, %NULL to ignore.
5809 * @callback: a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
5810 * @user_data: the data to pass to callback function
5812 * Starts an asynchronous eject on a mountable.
5813 * When this operation has completed, @callback will be called with
5814 * g_file_eject_mountable_finish().
5815 * If @cancellable is not %NULL, then the operation can be cancelled by
5816 * triggering the cancellable object from another thread. If the operation
5817 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
5819 * Deprecated: 2.22: Use g_file_eject_mountable_with_operation() instead.
5824 * g_dbus_message_get_member:
5825 * @message: A #GDBusMessage.
5827 * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_MEMBER header field.
5829 * Returns: The value.
5835 * SECTION:gfilterinputstrea:
5836 * @short_description: Filter Input Stream
5837 * @include: gio/gio.h
5839 * Base class for input stream implementations that perform some
5840 * kind of filtering operation on a base stream. Typical examples
5841 * of filtering operations are character set conversion, compression
5842 * and byte order flipping.
5847 * g_file_replace_readwrite:
5849 * @etag: (allow-none): an optional <link linkend="gfile-etag">entity tag</link> for the current #GFile, or #NULL to ignore
5850 * @make_backup: %TRUE if a backup should be created
5851 * @flags: a set of #GFileCreateFlags
5852 * @cancellable: optional #GCancellable object, %NULL to ignore
5853 * @error: return location for a #GError, or %NULL
5855 * Returns an output stream for overwriting the file in readwrite mode,
5856 * possibly creating a backup copy of the file first. If the file doesn't
5857 * exist, it will be created.
5858 * For details about the behaviour, see g_file_replace() which does the same
5859 * thing but returns an output stream only.
5860 * Note that in many non-local file cases read and write streams are not
5861 * supported, so make sure you really need to do read and write streaming,
5862 * rather than just opening for reading or writing.
5863 * Free the returned object with g_object_unref().
5865 * Returns: (transfer full): a #GFileIOStream or %NULL on error.
5871 * g_simple_permission_new:
5872 * @allowed: %TRUE if the action is allowed
5873 * @returns: the #GSimplePermission, as a #GPermission
5875 * Creates a new #GPermission instance that represents an action that is
5876 * either always or never allowed.
5883 * g_file_query_filesystem_info_finish:
5884 * @file: input #GFile.
5885 * @res: a #GAsyncResult.
5886 * @error: a #GError.
5888 * Finishes an asynchronous filesystem info query. See
5889 * g_file_query_filesystem_info_async().
5890 * Free the returned object with g_object_unref().
5892 * Returns: (transfer full): #GFileInfo for given @file or %NULL on error.
5897 * GVolumeMonitor::mount-changed:
5898 * @volume_monitor: The volume monitor emitting the signal.
5899 * @mount: a #GMount that changed.
5901 * Emitted when a mount changes.
5906 * g_volume_get_identifier:
5907 * @volume: a #GVolume
5908 * @kind: the kind of identifier to return
5910 * Gets the identifier of the given kind for @volume.
5911 * See the <link linkend="volume-identifier">introduction</link>
5912 * for more information about volume identifiers.
5913 * requested identfier, or %NULL if the #GVolume
5914 * doesn't have this kind of identifier
5916 * Returns: a newly allocated string containing the
5921 * g_tcp_connection_get_graceful_disconnect:
5922 * @connection: a #GTcpConnection
5924 * Checks if graceful disconnects are used. See
5925 * g_tcp_connection_set_graceful_disconnect().
5927 * Returns: %TRUE if graceful disconnect is used on close, %FALSE otherwise
5933 * SECTION:gzdecompresso:
5934 * @short_description: Zlib decompressor
5935 * @include: gio/gio.h
5937 * #GZlibDecompressor is an implementation of #GConverter that
5938 * decompresses data compressed with zlib.
5943 * g_dbus_message_get_reply_serial:
5944 * @message: A #GDBusMessage.
5946 * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL header field.
5948 * Returns: The value.
5954 * g_emblem_get_origin:
5955 * @emblem: a #GEmblem
5957 * Gets the origin of the emblem.
5959 * Returns: the origin of the emblem
5965 * SECTION:gfiledescriptorbase:
5966 * @short_description: Interface for file descriptor based IO
5967 * @include: gio/gfiledescriptorbased.h
5968 * @see_also: #GInputStream, #GOutputStream
5970 * #GFileDescriptorBased is implemented by streams (implementations of
5971 * #GInputStream or #GOutputStream) that are based on file descriptors.
5972 * Note that <filename><gio/gfiledescriptorbased.h></filename> belongs to
5973 * the UNIX-specific GIO interfaces, thus you have to use the
5974 * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
5981 * g_file_find_enclosing_mount_finish:
5983 * @res: a #GAsyncResult
5986 * Finishes an asynchronous find mount request.
5987 * See g_file_find_enclosing_mount_async().
5988 * Free the returned object with g_object_unref().
5990 * Returns: (transfer full): #GMount for given @file or %NULL on error.
5995 * g_inet_address_get_is_site_local:
5996 * @address: a #GInetAddress
5998 * Tests whether @address is a site-local address such as 10.0.0.1
5999 * (that is, the address identifies a host on a local network that can
6000 * not be reached directly from the Internet, but which may have
6001 * outgoing Internet connectivity via a NAT or firewall).
6003 * Returns: %TRUE if @address is a site-local address.
6009 * g_dbus_message_set_num_unix_fds:
6010 * @message: A #GDBusMessage.
6011 * @value: The value to set.
6013 * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header field.
6020 * g_file_copy_async:
6021 * @source: input #GFile.
6022 * @destination: destination #GFile
6023 * @flags: set of #GFileCopyFlags
6024 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
6025 * @cancellable: optional #GCancellable object, %NULL to ignore.
6026 * @progress_callback: function to callback with progress information
6027 * @progress_callback_data: user data to pass to @progress_callback
6028 * @callback: a #GAsyncReadyCallback to call when the request is satisfied
6029 * @user_data: the data to pass to callback function
6031 * Copies the file @source to the location specified by @destination
6032 * asynchronously. For details of the behaviour, see g_file_copy().
6033 * If @progress_callback is not %NULL, then that function that will be called
6034 * just like in g_file_copy(), however the callback will run in the main loop,
6035 * not in the thread that is doing the I/O operation.
6036 * When the operation is finished, @callback will be called. You can then call
6037 * g_file_copy_finish() to get the result of the operation.
6042 * g_dbus_method_invocation_get_method_name:
6043 * @invocation: A #GDBusMethodInvocation.
6045 * Gets the name of the method that was invoked.
6047 * Returns: A string. Do not free, it is owned by @invocation.
6053 * g_io_extension_ref_class:
6054 * @extension: a #GIOExtension
6056 * Gets a reference to the class for the type that is
6057 * associated with @extension.
6059 * Returns: (transfer full): the #GTypeClass for the type of @extension
6064 * GVolumeMonitor::mount-pre-unmount:
6065 * @volume_monitor: The volume monitor emitting the signal.
6066 * @mount: a #GMount that is being unmounted.
6068 * Emitted when a mount is about to be removed.
6073 * g_desktop_app_info_new_from_keyfile:
6074 * @key_file: an opened #GKeyFile
6076 * Creates a new #GDesktopAppInfo.
6078 * Returns: a new #GDesktopAppInfo or %NULL on error.
6084 * g_file_info_get_attribute_uint32:
6085 * @info: a #GFileInfo.
6086 * @attribute: a file attribute key.
6088 * Gets an unsigned 32-bit integer contained within the attribute. If the
6089 * attribute does not contain an unsigned 32-bit integer, or is invalid,
6090 * 0 will be returned.
6092 * Returns: an unsigned 32-bit integer from the attribute.
6097 * g_dbus_server_is_active:
6098 * @server: A #GDBusServer.
6100 * Gets whether @server is active.
6102 * Returns: %TRUE if server is active, %FALSE otherwise.
6108 * g_application_set_inactivity_timeout:
6109 * @application: a #GApplication
6110 * @inactivity_timeout: the timeout, in milliseconds
6112 * Sets the current inactivity timeout for the application.
6113 * This is the amount of time (in milliseconds) after the last call to
6114 * g_application_release() before the application stops running.
6115 * This call has no side effects of its own. The value set here is only
6116 * used for next time g_application_release() drops the use count to
6117 * zero. Any timeouts currently in progress are not impacted.
6119 * Returns: the timeout, in milliseconds
6127 * This signal is emitted when the #GVolume have been removed. If
6128 * the recipient is holding references to the object they should
6129 * release them so the object can be finalized.
6134 * g_settings_set_flags:
6135 * @settings: a #GSettings object
6136 * @key: a key, within @settings
6137 * @value: a flags value
6138 * @returns: %TRUE, if the set succeeds
6140 * Looks up the flags type nicks for the bits specified by @value, puts
6141 * them in an array of strings and writes the array to @key, withing
6142 * It is a programmer error to give a @key that isn't contained in the
6143 * schema for @settings or is not marked as a flags type, or for @value
6144 * to contain any bits that are not value for the named type.
6145 * After performing the write, accessing @key directly with
6146 * g_settings_get_strv() will return an array of 'nicks'; one for each
6152 * g_drive_has_volumes:
6153 * @drive: a #GDrive.
6155 * Check if @drive has any mountable volumes.
6157 * Returns: %TRUE if the @drive contains volumes, %FALSE otherwise.
6162 * g_app_info_get_description:
6163 * @appinfo: a #GAppInfo.
6165 * Gets a human-readable description of an installed application.
6166 * application @appinfo, or %NULL if none.
6168 * Returns: a string containing a description of the
6173 * g_input_stream_close_async:
6174 * @stream: A #GInputStream.
6175 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
6176 * @cancellable: optional cancellable object
6177 * @callback: callback to call when the request is satisfied
6178 * @user_data: the data to pass to callback function
6180 * Requests an asynchronous closes of the stream, releasing resources related to it.
6181 * When the operation is finished @callback will be called.
6182 * You can then call g_input_stream_close_finish() to get the result of the
6184 * For behaviour details see g_input_stream_close().
6185 * The asyncronous methods have a default fallback that uses threads to implement
6186 * asynchronicity, so they are optional for inheriting classes. However, if you
6187 * override one you must override all.
6192 * g_file_descriptor_based_get_fd:
6193 * @fd_based: a #GFileDescriptorBased.
6195 * Gets the underlying file descriptor.
6197 * Returns: The file descriptor
6204 * @file: input #GFile.
6205 * @flags: a set of #GFileCreateFlags.
6206 * @cancellable: optional #GCancellable object, %NULL to ignore.
6207 * @error: a #GError, or %NULL
6209 * Gets an output stream for appending data to the file. If
6210 * the file doesn't already exist it is created.
6211 * By default files created are generally readable by everyone,
6212 * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file
6213 * will be made readable only to the current user, to the level that
6214 * is supported on the target filesystem.
6215 * If @cancellable is not %NULL, then the operation can be cancelled by
6216 * triggering the cancellable object from another thread. If the operation
6217 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
6218 * Some file systems don't allow all file names, and may
6219 * return an %G_IO_ERROR_INVALID_FILENAME error.
6220 * If the file is a directory the %G_IO_ERROR_IS_DIRECTORY error will be
6221 * returned. Other errors are possible too, and depend on what kind of
6222 * filesystem the file is on.
6223 * Free the returned object with g_object_unref().
6225 * Returns: (transfer full): a #GFileOutputStream, or %NULL on error.
6230 * g_data_input_stream_read_until_finish:
6231 * @stream: a given #GDataInputStream.
6232 * @result: the #GAsyncResult that was provided to the callback.
6233 * @length: a #gsize to get the length of the data read in.
6234 * @error: #GError for error reporting.
6236 * Finish an asynchronous call started by
6237 * g_data_input_stream_read_until_async().
6238 * any of the stop characters. Set @length to a #gsize to get the length
6239 * of the string. This function will return %NULL on an error.
6242 * Returns: a string with the data that was read before encountering
6247 * g_proxy_address_get_protocol:
6248 * @proxy: a #GProxyAddress
6250 * Gets @proxy's protocol.
6252 * Returns: the @proxy's protocol
6258 * g_input_stream_set_pending:
6259 * @stream: input stream
6260 * @error: a #GError location to store the error occuring, or %NULL to ignore.
6262 * Sets @stream to have actions pending. If the pending flag is
6263 * already set or @stream is closed, it will return %FALSE and set
6265 * Returns: %TRUE if pending was previously unset and is now set.
6270 * g_application_command_line_get_is_remote:
6271 * @cmdline: a #GApplicationCommandLine
6273 * Determines if @cmdline represents a remote invocation.
6275 * Returns: %TRUE if the invocation was remote
6281 * g_dbus_error_new_for_dbus_error:
6282 * @dbus_error_name: D-Bus error name.
6283 * @dbus_error_message: D-Bus error message.
6285 * Creates a #GError based on the contents of @dbus_error_name and
6286 * Errors registered with g_dbus_error_register_error() will be looked
6287 * up using @dbus_error_name and if a match is found, the error domain
6288 * and code is used. Applications can use g_dbus_error_get_remote_error()
6289 * to recover @dbus_error_name.
6290 * If a match against a registered error is not found and the D-Bus
6291 * error name is in a form as returned by g_dbus_error_encode_gerror()
6292 * the error domain and code encoded in the name is used to
6293 * create the #GError. Also, @dbus_error_name is added to the error message
6294 * such that it can be recovered with g_dbus_error_get_remote_error().
6295 * Otherwise, a #GError with the error code %G_IO_ERROR_DBUS_ERROR
6296 * in the #G_IO_ERROR error domain is returned. Also, @dbus_error_name is
6297 * added to the error message such that it can be recovered with
6298 * g_dbus_error_get_remote_error().
6299 * In all three cases, @dbus_error_name can always be recovered from the
6300 * returned #GError using the g_dbus_error_get_remote_error() function
6301 * (unless g_dbus_error_strip_remote_error() hasn't been used on the returned error).
6302 * This function is typically only used in object mappings to prepare
6303 * #GError instances for applications. Regular applications should not use
6306 * Returns: An allocated #GError. Free with g_error_free().
6312 * g_dbus_proxy_get_cached_property_names:
6313 * @proxy: A #GDBusProxy.
6315 * Gets the names of all cached properties on @proxy.
6316 * no cached properties. Free the returned array with g_strfreev().
6318 * Returns: A %NULL-terminated array of strings or %NULL if @proxy has
6324 * GZlibDecompressor:
6326 * Zlib decompression
6331 * GDrive::eject-button:
6332 * @drive: a #GDrive.
6334 * Emitted when the physical eject button (if any) of a drive has
6340 * g_application_set_flags:
6341 * @application: a #GApplication
6342 * @flags: the flags for @application
6344 * Sets the flags for @application.
6345 * The flags can only be modified if @application has not yet been
6347 * See #GApplicationFlags.
6354 * GSettings::changed:
6355 * @settings: the object on which the signal was emitted
6356 * @key: the name of the key that changed
6358 * The "changed" signal is emitted when a key has potentially changed.
6359 * You should call one of the g_settings_get() calls to check the new
6361 * This signal supports detailed connections. You can connect to the
6362 * detailed signal "changed::x" in order to only receive callbacks
6363 * when key "x" changes.
6369 * @file: input #GFile.
6370 * @cancellable: optional #GCancellable object, %NULL to ignore.
6371 * @error: a #GError, or %NULL
6373 * Deletes a file. If the @file is a directory, it will only be deleted if it
6375 * If @cancellable is not %NULL, then the operation can be cancelled by
6376 * triggering the cancellable object from another thread. If the operation
6377 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
6379 * Virtual: delete_file
6380 * Returns: %TRUE if the file was deleted. %FALSE otherwise.
6385 * GSettings:context:
6387 * The name of the context that the settings are stored in.
6392 * g_output_stream_is_closing:
6393 * @stream: a #GOutputStream.
6395 * Checks if an output stream is being closed. This can be
6396 * used inside e.g. a flush implementation to see if the
6397 * flush (or other i/o operation) is called from within
6398 * the closing operation.
6400 * Returns: %TRUE if @stream is being closed. %FALSE otherwise.
6406 * g_data_input_stream_read_line_async:
6407 * @stream: a given #GDataInputStream.
6408 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
6409 * @cancellable: optional #GCancellable object, %NULL to ignore.
6410 * @callback: callback to call when the request is satisfied.
6411 * @user_data: the data to pass to callback function.
6413 * The asynchronous version of g_data_input_stream_read_line(). It is
6414 * an error to have two outstanding calls to this function.
6415 * When the operation is finished, @callback will be called. You
6416 * can then call g_data_input_stream_read_line_finish() to get
6417 * the result of the operation.
6424 * g_output_stream_write_finish:
6425 * @stream: a #GOutputStream.
6426 * @result: a #GAsyncResult.
6427 * @error: a #GError location to store the error occuring, or %NULL to ignore.
6429 * Finishes a stream write operation.
6431 * Returns: a #gssize containing the number of bytes written to the stream.
6436 * g_file_create_readwrite_async:
6437 * @file: input #GFile
6438 * @flags: a set of #GFileCreateFlags
6439 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request
6440 * @cancellable: optional #GCancellable object, %NULL to ignore
6441 * @callback: a #GAsyncReadyCallback to call when the request is satisfied
6442 * @user_data: the data to pass to callback function
6444 * Asynchronously creates a new file and returns a stream for reading and
6445 * writing to it. The file must not already exist.
6446 * For more details, see g_file_create_readwrite() which is
6447 * the synchronous version of this call.
6448 * When the operation is finished, @callback will be called. You can then
6449 * call g_file_create_readwrite_finish() to get the result of the operation.
6456 * GDBusAuthObserver::authorize-authenticated-peer:
6457 * @observer: The #GDBusAuthObserver emitting the signal.
6458 * @stream: A #GIOStream for the #GDBusConnection.
6459 * @credentials: Credentials received from the peer or %NULL.
6461 * Emitted to check if a peer that is successfully authenticated
6464 * Returns: %TRUE if the peer is authorized, %FALSE if not.
6470 * GSimpleAction::activate:
6471 * @simple: the #GSimpleAction
6472 * @parameter: (allow-none): the parameter to the activation
6474 * Indicates that the action was just activated.
6475 * an incorrect type was given, no signal will be emitted.
6482 * g_data_input_stream_read_byte:
6483 * @stream: a given #GDataInputStream.
6484 * @cancellable: optional #GCancellable object, %NULL to ignore.
6485 * @error: #GError for error reporting.
6487 * Reads an unsigned 8-bit/1-byte value from @stream.
6488 * if an error occurred.
6490 * Returns: an unsigned 8-bit/1-byte value read from the @stream or %0
6495 * g_socket_client_connect_to_host_finish:
6496 * @client: a #GSocketClient.
6497 * @result: a #GAsyncResult.
6498 * @error: a #GError location to store the error occuring, or %NULL to ignore.
6500 * Finishes an async connect operation. See g_socket_client_connect_to_host_async()
6502 * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
6508 * GMountOperation::ask-question:
6509 * @op: a #GMountOperation asking a question.
6510 * @message: string containing a message to display to the user.
6511 * @choices: an array of strings for each possible choice.
6513 * Emitted when asking the user a question and gives a list of
6514 * choices for the user to choose from.
6515 * If the message contains a line break, the first line should be
6516 * presented as a heading. For example, it may be used as the
6517 * primary text in a #GtkMessageDialog.
6522 * SECTION:extensionpoint:
6523 * @short_description: Extension Points
6525 * @see_also: <link linkend="extending-gio">Extending GIO</link>
6527 * #GIOExtensionPoint provides a mechanism for modules to extend the
6528 * functionality of the library or application that loaded it in an
6529 * organized fashion.
6530 * An extension point is identified by a name, and it may optionally
6531 * require that any implementation must by of a certain type (or derived
6532 * thereof). Use g_io_extension_point_register() to register an
6533 * extension point, and g_io_extension_point_set_required_type() to
6534 * set a required type.
6535 * A module can implement an extension point by specifying the #GType
6536 * that implements the functionality. Additionally, each implementation
6537 * of an extension point has a name, and a priority. Use
6538 * g_io_extension_point_implement() to implement an extension point.
6540 * GIOExtensionPoint *ep;
6541 * /* Register an extension point */
6542 * ep = g_io_extension_point_register ("my-extension-point");
6543 * g_io_extension_point_set_required_type (ep, MY_TYPE_EXAMPLE);
6546 * /* Implement an extension point */
6547 * G_DEFINE_TYPE (MyExampleImpl, my_example_impl, MY_TYPE_EXAMPLE);
6548 * g_io_extension_point_implement ("my-extension-point",
6549 * my_example_impl_get_type (),
6553 * It is up to the code that registered the extension point how
6554 * it uses the implementations that have been associated with it.
6555 * Depending on the use case, it may use all implementations, or
6556 * only the one with the highest priority, or pick a specific
6558 * To avoid opening all modules just to find out what extension
6559 * points they implement, GIO makes use of a caching mechanism,
6560 * see <link linkend="gio-querymodules">gio-querymodules</link>.
6561 * You are expected to run this command after installing a
6567 * g_output_stream_write:
6568 * @stream: a #GOutputStream.
6569 * @buffer: (array length=count) (element-type guint8): the buffer containing the data to write.
6570 * @count: the number of bytes to write
6571 * @cancellable: optional cancellable object
6572 * @error: location to store the error occuring, or %NULL to ignore
6574 * Tries to write @count bytes from @buffer into the stream. Will block
6575 * during the operation.
6576 * If count is 0, returns 0 and does nothing. A value of @count
6577 * larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
6578 * On success, the number of bytes written to the stream is returned.
6579 * It is not an error if this is not the same as the requested size, as it
6580 * can happen e.g. on a partial I/O error, or if there is not enough
6581 * storage in the stream. All writes block until at least one byte
6582 * is written or an error occurs; 0 is never returned (unless
6583 * If @cancellable is not NULL, then the operation can be cancelled by
6584 * triggering the cancellable object from another thread. If the operation
6585 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
6586 * operation was partially finished when the operation was cancelled the
6587 * partial result will be returned, without an error.
6588 * On error -1 is returned and @error is set accordingly.
6590 * Returns: Number of bytes written, or -1 on error
6595 * g_dbus_connection_new:
6596 * @stream: A #GIOStream.
6597 * @guid: The GUID to use if a authenticating as a server or %NULL.
6598 * @flags: Flags describing how to make the connection.
6599 * @observer: A #GDBusAuthObserver or %NULL.
6600 * @cancellable: A #GCancellable or %NULL.
6601 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
6602 * @user_data: The data to pass to @callback.
6604 * Asynchronously sets up a D-Bus connection for exchanging D-Bus messages
6605 * with the end represented by @stream.
6606 * If @observer is not %NULL it may be used to control the
6607 * authentication process.
6608 * When the operation is finished, @callback will be invoked. You can
6609 * then call g_dbus_connection_new_finish() to get the result of the
6611 * This is a asynchronous failable constructor. See
6612 * g_dbus_connection_new_sync() for the synchronous
6620 * g_unix_credentials_message_get_credentials:
6621 * @message: A #GUnixCredentialsMessage.
6623 * Gets the credentials stored in @message.
6625 * Returns: (transfer none): A #GCredentials instance. Do not free, it is owned by @message.
6631 * SECTION:gfileenumerato:
6632 * @short_description: Enumerated Files Routines
6633 * @include: gio/gio.h
6635 * #GFileEnumerator allows you to operate on a set of #GFile<!-- -->s,
6636 * returning a #GFileInfo structure for each file enumerated (e.g.
6637 * g_file_enumerate_children() will return a #GFileEnumerator for each
6638 * of the children within a directory).
6639 * To get the next file's information from a #GFileEnumerator, use
6640 * g_file_enumerator_next_file() or its asynchronous version,
6641 * g_file_enumerator_next_files_async(). Note that the asynchronous
6642 * version will return a list of #GFileInfo<!---->s, whereas the
6643 * synchronous will only return the next file in the enumerator.
6644 * To close a #GFileEnumerator, use g_file_enumerator_close(), or
6645 * its asynchronous version, g_file_enumerator_close_async(). Once
6646 * a #GFileEnumerator is closed, no further actions may be performed
6647 * on it, and it should be freed with g_object_unref().
6652 * GThemedIcon:use-default-fallbacks:
6654 * Whether to use the default fallbacks found by shortening the icon name
6655 * at '-' characters. If the "names" array has more than one element,
6656 * ignores any past the first.
6657 * For example, if the icon name was "gnome-dev-cdrom-audio", the array
6661 * "gnome-dev-cdrom-audio",
6662 * "gnome-dev-cdrom",
6672 * g_mount_remount_finish:
6673 * @mount: a #GMount.
6674 * @result: a #GAsyncResult.
6675 * @error: a #GError location to store the error occuring, or %NULL to ignore.
6677 * Finishes remounting a mount. If any errors occurred during the operation,
6679 * Returns: %TRUE if the mount was successfully remounted. %FALSE otherwise.
6686 * Ensures that all pending operations for the given are complete for
6687 * the default backend.
6688 * Writes made to a #GSettings are handled asynchronously. For this
6689 * reason, it is very unlikely that the changes have it to disk by the
6690 * time g_settings_set() returns.
6691 * This call will block until all of the writes have made it to the
6692 * backend. Since the mainloop is not running, no change notifications
6693 * will be dispatched during this call (but some may be queued by the
6694 * time the call is done).
6701 * A #GSocketConnectable for resolving a hostname and connecting to
6707 * g_socket_address_enumerator_next_async:
6708 * @enumerator: a #GSocketAddressEnumerator
6709 * @cancellable: optional #GCancellable object, %NULL to ignore.
6710 * @callback: a #GAsyncReadyCallback to call when the request is satisfied
6711 * @user_data: the data to pass to callback function
6713 * Asynchronously retrieves the next #GSocketAddress from @enumerator
6714 * and then calls @callback, which must call
6715 * g_socket_address_enumerator_next_finish() to get the result.
6720 * g_settings_get_strv:
6721 * @settings: a #GSettings object
6722 * @key: the key to get the value for
6723 * @returns: (array zero-terminated=1) (transfer full): the value that is
6725 * A convenience variant of g_settings_get() for string arrays.
6726 * It is a programmer error to give a @key that isn't specified as
6727 * having an array of strings type in the schema for @settings.
6728 * stored at @key in @settings.
6735 * g_unix_output_stream_set_close_fd:
6736 * @stream: a #GUnixOutputStream
6737 * @close_fd: %TRUE to close the file descriptor when done
6739 * Sets whether the file descriptor of @stream shall be closed
6740 * when the stream is closed.
6747 * g_dbus_message_set_interface:
6748 * @message: A #GDBusMessage.
6749 * @value: The value to set.
6751 * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE header field.
6758 * g_charset_converter_new:
6759 * @to_charset: destination charset
6760 * @from_charset: source charset
6761 * @error: #GError for error reporting, or %NULL to ignore.
6763 * Creates a new #GCharsetConverter.
6765 * Returns: a new #GCharsetConverter or %NULL on error.
6771 * g_periodic_get_high_priority:
6772 * @periodic: a #GPeriodic clock
6774 * Gets the #GSource priority of the clock.
6776 * Returns: the high priority level
6782 * g_simple_async_result_set_op_res_gboolean:
6783 * @simple: a #GSimpleAsyncResult.
6784 * @op_res: a #gboolean.
6786 * Sets the operation result to a boolean within the asynchronous result.
6791 * g_unix_fd_list_get:
6792 * @list: a #GUnixFDList
6793 * @index_: the index into the list
6794 * @error: a #GError pointer
6796 * Gets a file descriptor out of @list.
6797 * programmer error for @index_ to be out of range; see
6798 * g_unix_fd_list_get_length().
6799 * The file descriptor is duplicated using dup() and set as
6800 * close-on-exec before being returned. You must call close() on it
6801 * when you are done.
6802 * A possible cause of failure is exceeding the per-process or
6803 * system-wide file descriptor limit.
6805 * Returns: the file descriptor, or -1 in case of error
6811 * g_simple_action_new:
6812 * @name: the name of the action
6813 * @parameter_type: (allow-none): the type of parameter to the activate function
6815 * Creates a new action.
6816 * The created action is stateless. See g_simple_action_new_stateful().
6818 * Returns: a new #GSimpleAction
6824 * g_inet_address_get_is_link_local:
6825 * @address: a #GInetAddress
6827 * Tests whether @address is a link-local address (that is, if it
6828 * identifies a host on a local network that is not connected to the
6831 * Returns: %TRUE if @address is a link-local address.
6837 * g_drive_has_media:
6838 * @drive: a #GDrive.
6840 * Checks if the @drive has media. Note that the OS may not be polling
6841 * the drive for media changes; see g_drive_is_media_check_automatic()
6844 * Returns: %TRUE if @drive has media, %FALSE otherwise.
6849 * g_simple_async_result_set_op_res_gssize:
6850 * @simple: a #GSimpleAsyncResult.
6851 * @op_res: a #gssize.
6853 * Sets the operation result within the asynchronous result to
6854 * the given @op_res.
6859 * g_loadable_icon_load_finish:
6860 * @icon: a #GLoadableIcon.
6861 * @res: a #GAsyncResult.
6862 * @type: a location to store the type of the loaded icon, %NULL to ignore.
6863 * @error: a #GError location to store the error occuring, or %NULL to ignore.
6865 * Finishes an asynchronous icon load started in g_loadable_icon_load_async().
6867 * Returns: (transfer full): a #GInputStream to read the icon from.
6872 * g_resolver_get_default:
6874 * Gets the default #GResolver. You should unref it when you are done
6875 * with it. #GResolver may use its reference count as a hint about how
6876 * many threads/processes, etc it should allocate for concurrent DNS
6879 * Returns: (transfer full): the default #GResolver.
6885 * g_application_command_line_print:
6886 * @cmdline: a #GApplicationCommandLine
6887 * @format: a printf-style format string
6888 * @...: arguments, as per @format
6890 * Formats a message and prints it using the stdout print handler in the
6892 * If @cmdline is a local invocation then this is exactly equivalent to
6893 * g_print(). If @cmdline is remote then this is equivalent to calling
6894 * g_print() in the invoking process.
6901 * g_file_info_has_attribute:
6902 * @info: a #GFileInfo.
6903 * @attribute: a file attribute key.
6905 * Checks if a file info structure has an attribute named @attribute.
6908 * Returns: %TRUE if @Ginfo has an attribute named @attribute,
6913 * g_drive_get_volumes:
6914 * @drive: a #GDrive.
6916 * Get a list of mountable volumes for @drive.
6917 * The returned list should be freed with g_list_free(), after
6918 * its elements have been unreffed with g_object_unref().
6920 * Returns: (element-type GVolume) (transfer full): #GList containing any #GVolume objects on the given @drive.
6925 * g_dbus_connection_start_message_processing:
6926 * @connection: A #GDBusConnection.
6928 * If @connection was created with
6929 * %G_DBUS_CONNECTION_FLAGS_DELAY_MESSAGE_PROCESSING, this method
6930 * starts processing messages. Does nothing on if @connection wasn't
6931 * created with this flag or if the method has already been called.
6938 * g_desktop_app_info_set_desktop_env:
6939 * @desktop_env: a string specifying what desktop this is
6941 * Sets the name of the desktop that the application is running in.
6942 * This is used by g_app_info_should_show() to evaluate the
6943 * <literal>OnlyShowIn</literal> and <literal>NotShowIn</literal>
6944 * desktop entry fields.
6945 * The <ulink url="http://standards.freedesktop.org/menu-spec/latest/">Desktop
6946 * Menu specification</ulink> recognizes the following:
6948 * <member>GNOME</member>
6949 * <member>KDE</member>
6950 * <member>ROX</member>
6951 * <member>XFCE</member>
6952 * <member>Old</member>
6954 * Should be called only once; subsequent calls are ignored.
6959 * g_cancellable_new:
6961 * Creates a new #GCancellable object.
6962 * Applications that want to start one or more operations
6963 * that should be cancellable should create a #GCancellable
6964 * and pass it to the operations.
6965 * One #GCancellable can be used in multiple consecutive
6966 * operations, but not in multiple concurrent operations.
6968 * Returns: a #GCancellable.
6973 * g_io_extension_get_priority:
6974 * @extension: a #GIOExtension
6976 * Gets the priority with which @extension was registered.
6978 * Returns: the priority of @extension
6983 * g_file_new_for_commandline_arg:
6984 * @arg: a command line string.
6986 * Creates a #GFile with the given argument from the command line. The value of
6987 * relative to the current working directory.
6988 * This operation never fails, but the returned object might not support any
6989 * I/O operation if @arg points to a malformed path.
6991 * Returns: (transfer full): a new #GFile.
6996 * g_app_info_get_display_name:
6997 * @appinfo: a #GAppInfo.
6999 * Gets the display name of the application. The display name is often more
7000 * descriptive to the user than the name itself.
7001 * no display name is available.
7003 * Returns: the display name of the application for @appinfo, or the name if
7009 * GApplication::activate:
7010 * @application: the application
7012 * The ::activate signal is emitted on the primary instance when an
7013 * activation occurs. See g_application_activate().
7018 * g_proxy_connect_finish:
7020 * @result: a #GAsyncRetult
7021 * @error: return #GError
7023 * See g_proxy_connect().
7025 * Returns: (transfer full): a #GIOStream.
7032 * @mount: a #GMount.
7034 * Gets the icon for @mount.
7035 * The returned object should be unreffed with
7036 * g_object_unref() when no longer needed.
7038 * Returns: (transfer full): a #GIcon.
7043 * g_mount_operation_reply:
7044 * @op: a #GMountOperation
7045 * @result: a #GMountOperationResult
7047 * Emits the #GMountOperation::reply signal.
7052 * g_dbus_property_info_ref:
7053 * @info: A #GDBusPropertyInfo
7055 * If @info is statically allocated does nothing. Otherwise increases
7056 * the reference count.
7058 * Returns: The same @info.
7064 * g_themed_icon_new_with_default_fallbacks:
7065 * @iconname: a string containing an icon name
7067 * Creates a new themed icon for @iconname, and all the names
7068 * that can be created by shortening @iconname at '-' characters.
7069 * In the following example, @icon1 and @icon2 are equivalent:
7071 * const char *names[] = {
7072 * "gnome-dev-cdrom-audio",
7073 * "gnome-dev-cdrom",
7077 * icon1 = g_themed_icon_new_from_names (names, 4);
7078 * icon2 = g_themed_icon_new_with_default_fallbacks ("gnome-dev-cdrom-audio");
7081 * Returns: (transfer full): a new #GThemedIcon.
7086 * g_action_group_has_action:
7087 * @action_group: a #GActionGroup
7088 * @action_name: the name of the action to check for
7090 * Checks if the named action exists within @action_group.
7092 * Returns: whether the named action exists
7098 * g_buffered_input_stream_fill_async:
7099 * @stream: a #GBufferedInputStream
7100 * @count: the number of bytes that will be read from the stream
7101 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request
7102 * @cancellable: optional #GCancellable object
7103 * @callback: a #GAsyncReadyCallback
7104 * @user_data: a #gpointer
7106 * Reads data into @stream's buffer asynchronously, up to @count size.
7107 * version of this function, see g_buffered_input_stream_fill().
7108 * If @count is -1 then the attempted read size is equal to the number
7109 * of bytes that are required to fill the buffer.
7114 * g_inet_address_get_is_mc_node_local:
7115 * @address: a #GInetAddress
7117 * Tests whether @address is a node-local multicast address.
7119 * Returns: %TRUE if @address is a node-local multicast address.
7126 * @short_description: Volume management
7127 * @include: gio/gio.h
7129 * The #GVolume interface represents user-visible objects that can be
7130 * mounted. Note, when porting from GnomeVFS, #GVolume is the moral
7131 * equivalent of #GnomeVFSDrive.
7132 * Mounting a #GVolume instance is an asynchronous operation. For more
7133 * information about asynchronous operations, see #GAsyncReady and
7134 * #GSimpleAsyncReady. To mount a #GVolume, first call
7135 * g_volume_mount() with (at least) the #GVolume instance, optionally
7136 * a #GMountOperation object and a #GAsyncReadyCallback.
7137 * Typically, one will only want to pass %NULL for the
7138 * #GMountOperation if automounting all volumes when a desktop session
7139 * starts since it's not desirable to put up a lot of dialogs asking
7141 * The callback will be fired when the operation has resolved (either
7142 * with success or failure), and a #GAsyncReady structure will be
7143 * passed to the callback. That callback should then call
7144 * g_volume_mount_finish() with the #GVolume instance and the
7145 * #GAsyncReady data to see if the operation was completed
7146 * successfully. If an @error is present when g_volume_mount_finish()
7147 * is called, then it will be filled with any error information.
7148 * <para id="volume-identifier">
7149 * It is sometimes necessary to directly access the underlying
7150 * operating system object behind a volume (e.g. for passing a volume
7151 * to an application via the commandline). For this purpose, GIO
7152 * allows to obtain an 'identifier' for the volume. There can be
7153 * different kinds of identifiers, such as Hal UDIs, filesystem labels,
7154 * traditional Unix devices (e.g. <filename>/dev/sda2</filename>),
7155 * uuids. GIO uses predefind strings as names for the different kinds
7156 * #G_VOLUME_IDENTIFIER_KIND_LABEL, etc. Use g_volume_get_identifier()
7157 * to obtain an identifier for a volume.
7159 * Note that #G_VOLUME_IDENTIFIER_KIND_HAL_UDI will only be available
7160 * when the gvfs hal volume monitor is in use. Other volume monitors
7161 * will generally be able to provide the #G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE
7162 * identifier, which can be used to obtain a hal device by means of
7163 * libhal_manger_find_device_string_match().
7165 * Of identifiers: #G_VOLUME_IDENTIFIER_KIND_HAL_UDI,
7170 * g_output_stream_write_async:
7171 * @stream: A #GOutputStream.
7172 * @buffer: (array length=count) (element-type guint8): the buffer containing the data to write.
7173 * @count: the number of bytes to write
7174 * @io_priority: the io priority of the request.
7175 * @cancellable: optional #GCancellable object, %NULL to ignore.
7176 * @callback: callback to call when the request is satisfied
7177 * @user_data: the data to pass to callback function
7179 * Request an asynchronous write of @count bytes from @buffer into
7180 * the stream. When the operation is finished @callback will be called.
7181 * You can then call g_output_stream_write_finish() to get the result of the
7183 * During an async request no other sync and async calls are allowed,
7184 * and will result in %G_IO_ERROR_PENDING errors.
7185 * A value of @count larger than %G_MAXSSIZE will cause a
7186 * %G_IO_ERROR_INVALID_ARGUMENT error.
7187 * On success, the number of bytes written will be passed to the
7188 * requested size, as it can happen e.g. on a partial I/O error,
7189 * but generally we try to write as many bytes as requested.
7190 * You are guaranteed that this method will never fail with
7191 * %G_IO_ERROR_WOULD_BLOCK - if @stream can't accept more data, the
7192 * method will just wait until this changes.
7193 * Any outstanding I/O request with higher priority (lower numerical
7194 * value) will be executed before an outstanding request with lower
7195 * priority. Default priority is %G_PRIORITY_DEFAULT.
7196 * The asyncronous methods have a default fallback that uses threads
7197 * to implement asynchronicity, so they are optional for inheriting
7198 * classes. However, if you override one you must override all.
7199 * For the synchronous, blocking version of this function, see
7200 * g_output_stream_write().
7205 * g_socket_condition_wait:
7206 * @socket: a #GSocket
7207 * @condition: a #GIOCondition mask to wait for
7208 * @cancellable: a #GCancellable, or %NULL
7209 * @error: a #GError pointer, or %NULL
7211 * Waits for @condition to become true on @socket. When the condition
7212 * is met, %TRUE is returned.
7213 * If @cancellable is cancelled before the condition is met, or if the
7214 * socket has a timeout set and it is reached before the condition is
7215 * met, then %FALSE is returned and @error, if non-%NULL, is set to
7216 * the appropriate value (%G_IO_ERROR_CANCELLED or
7217 * %G_IO_ERROR_TIMED_OUT).
7219 * Returns: %TRUE if the condition was met, %FALSE otherwise
7225 * g_dbus_message_to_gerror:
7226 * @message: A #GDBusMessage.
7227 * @error: The #GError to set.
7229 * If @message is not of type %G_DBUS_MESSAGE_TYPE_ERROR does
7230 * nothing and returns %FALSE.
7231 * Otherwise this method encodes the error in @message as a #GError
7232 * using g_dbus_error_set_dbus_error() using the information in the
7233 * %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field of @message as
7234 * well as the first string item in @message's body.
7236 * Returns: %TRUE if @error was set, %FALSE otherwise.
7242 * g_socket_client_connect_to_service_async:
7243 * @client: a #GSocketClient
7244 * @domain: a domain name
7245 * @service: the name of the service to connect to
7246 * @cancellable: a #GCancellable, or %NULL
7247 * @callback: a #GAsyncReadyCallback
7248 * @user_data: user data for the callback
7250 * This is the asynchronous version of
7251 * g_socket_client_connect_to_service().
7258 * g_mount_operation_get_domain:
7259 * @op: a #GMountOperation.
7261 * Gets the domain of the mount operation.
7263 * Returns: a string set to the domain.
7268 * g_file_info_get_display_name:
7269 * @info: a #GFileInfo.
7271 * Gets a display name for a file.
7273 * Returns: a string containing the display name.
7278 * g_dbus_server_get_client_address:
7279 * @server: A #GDBusServer.
7281 * Gets a D-Bus address string that can be used by clients to connect
7285 * Returns: A D-Bus address string. Do not free, the string is owned
7291 * g_socket_client_connect_to_service:
7292 * @client: a #GSocketConnection
7293 * @domain: a domain name
7294 * @service: the name of the service to connect to
7295 * @cancellable: a #GCancellable, or %NULL
7296 * @error: a pointer to a #GError, or %NULL
7297 * @returns: (transfer full): a #GSocketConnection if successful, or %NULL on error
7299 * Attempts to create a TCP connection to a service.
7300 * This call looks up the SRV record for @service at @domain for the
7301 * "tcp" protocol. It then attempts to connect, in turn, to each of
7302 * the hosts providing the service until either a connection succeeds
7303 * or there are no hosts remaining.
7304 * Upon a successful connection, a new #GSocketConnection is constructed
7305 * and returned. The caller owns this new object and must drop their
7306 * reference to it when finished with it.
7307 * In the event of any failure (DNS error, service not found, no hosts
7308 * connectable) %NULL is returned and @error (if non-%NULL) is set
7314 * g_dbus_connection_register_subtree:
7315 * @connection: A #GDBusConnection.
7316 * @object_path: The object path to register the subtree at.
7317 * @vtable: A #GDBusSubtreeVTable to enumerate, introspect and dispatch nodes in the subtree.
7318 * @flags: Flags used to fine tune the behavior of the subtree.
7319 * @user_data: Data to pass to functions in @vtable.
7320 * @user_data_free_func: Function to call when the subtree is unregistered.
7321 * @error: Return location for error or %NULL.
7323 * Registers a whole subtree of <quote>dynamic</quote> objects.
7324 * The @enumerate and @introspection functions in @vtable are used to
7325 * convey, to remote callers, what nodes exist in the subtree rooted
7327 * When handling remote calls into any node in the subtree, first the
7328 * or the #G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES flag is set
7329 * the @introspection function is used to check if the node supports the
7330 * requested method. If so, the @dispatch function is used to determine
7331 * where to dispatch the call. The collected #GDBusInterfaceVTable and
7332 * #gpointer will be used to call into the interface vtable for processing
7334 * All calls into user-provided code will be invoked in the <link
7335 * linkend="g-main-context-push-thread-default">thread-default main
7336 * loop</link> of the thread you are calling this method from.
7337 * If an existing subtree is already registered at @object_path or
7338 * then @error is set to #G_IO_ERROR_EXISTS.
7339 * Note that it is valid to register regular objects (using
7340 * g_dbus_connection_register_object()) in a subtree registered with
7341 * g_dbus_connection_register_subtree() - if so, the subtree handler
7342 * is tried as the last resort. One way to think about a subtree
7343 * handler is to consider it a <quote>fallback handler</quote>
7344 * for object paths not registered via g_dbus_connection_register_object()
7345 * or other bindings.
7346 * Note that @vtable will be copied so you cannot change it after
7348 * See <xref linkend="gdbus-subtree-server"/> for an example of how to use this method.
7349 * that can be used with g_dbus_connection_unregister_subtree() .
7351 * Returns: 0 if @error is set, otherwise a subtree registration id (never 0)
7358 * @short_description: Stream seeking interface
7359 * @include: gio/gio.h
7360 * @see_also: #GInputStream, #GOutputStream
7362 * #GSeekable is implemented by streams (implementations of
7363 * #GInputStream or #GOutputStream) that support seeking.
7368 * g_mount_get_drive:
7369 * @mount: a #GMount.
7371 * Gets the drive for the @mount.
7372 * This is a convenience method for getting the #GVolume and then
7373 * using that object to get the #GDrive.
7374 * The returned object should be unreffed with
7375 * g_object_unref() when no longer needed.
7377 * Returns: (transfer full): a #GDrive or %NULL if @mount is not associated with a volume or a drive.
7382 * g_file_get_parse_name:
7383 * @file: input #GFile.
7385 * Gets the parse name of the @file.
7386 * A parse name is a UTF-8 string that describes the
7387 * file such that one can get the #GFile back using
7388 * g_file_parse_name().
7389 * This is generally used to show the #GFile as a nice
7390 * full-pathname kind of string in a user interface,
7391 * like in a location entry.
7392 * For local files with names that can safely be converted
7393 * to UTF8 the pathname is used, otherwise the IRI is used
7394 * (a form of URI that allows UTF8 characters unescaped).
7395 * This call does no blocking i/o.
7396 * string should be freed with g_free() when no longer needed.
7398 * Returns: a string containing the #GFile's parse name. The returned
7403 * g_resolver_lookup_by_name_async:
7404 * @resolver: a #GResolver
7405 * @hostname: the hostname to look up the address of
7406 * @cancellable: a #GCancellable, or %NULL
7407 * @callback: callback to call after resolution completes
7408 * @user_data: data for @callback
7410 * Begins asynchronously resolving @hostname to determine its
7411 * associated IP address(es), and eventually calls @callback, which
7412 * must call g_resolver_lookup_by_name_finish() to get the result.
7413 * See g_resolver_lookup_by_name() for more details.
7420 * SECTION:gfilteroutputstrea:
7421 * @short_description: Filter Output Stream
7422 * @include: gio/gio.h
7424 * Base class for output stream implementations that perform some
7425 * kind of filtering operation on a base stream. Typical examples
7426 * of filtering operations are character set conversion, compression
7427 * and byte order flipping.
7433 * @file1: the first #GFile.
7434 * @file2: the second #GFile.
7436 * Checks equality of two given #GFile<!-- -->s. Note that two
7437 * #GFile<!-- -->s that differ can still refer to the same
7438 * file on the filesystem due to various forms of filename
7440 * This call does no blocking i/o.
7441 * %FALSE if either is not a #GFile.
7443 * Returns: %TRUE if @file1 and @file2 are equal.
7448 * g_file_set_attributes_async:
7449 * @file: input #GFile.
7450 * @info: a #GFileInfo.
7451 * @flags: a #GFileQueryInfoFlags.
7452 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
7453 * @cancellable: optional #GCancellable object, %NULL to ignore.
7454 * @callback: a #GAsyncReadyCallback.
7455 * @user_data: a #gpointer.
7457 * Asynchronously sets the attributes of @file with @info.
7458 * For more details, see g_file_set_attributes_from_info() which is
7459 * the synchronous version of this call.
7460 * When the operation is finished, @callback will be called. You can then call
7461 * g_file_set_attributes_finish() to get the result of the operation.
7466 * SECTION:gcharsetconverte:
7467 * @short_description: Convert between charsets
7468 * @include: gio/gio.h
7470 * #GCharsetConverter is an implementation of #GConverter based on
7476 * g_dbus_method_invocation_get_parameters:
7477 * @invocation: A #GDBusMethodInvocation.
7479 * Gets the parameters of the method invocation.
7481 * Returns: A #GVariant. Do not free, it is owned by @invocation.
7487 * g_output_stream_close_async:
7488 * @stream: A #GOutputStream.
7489 * @io_priority: the io priority of the request.
7490 * @callback: callback to call when the request is satisfied
7491 * @user_data: the data to pass to callback function
7492 * @cancellable: optional cancellable object
7494 * Requests an asynchronous close of the stream, releasing resources
7495 * related to it. When the operation is finished @callback will be
7496 * called. You can then call g_output_stream_close_finish() to get
7497 * the result of the operation.
7498 * For behaviour details see g_output_stream_close().
7499 * The asyncronous methods have a default fallback that uses threads
7500 * to implement asynchronicity, so they are optional for inheriting
7501 * classes. However, if you override one you must override all.
7506 * g_dbus_message_to_blob:
7507 * @message: A #GDBusMessage.
7508 * @out_size: Return location for size of generated blob.
7509 * @capabilities: A #GDBusCapabilityFlags describing what protocol features are supported.
7510 * @error: Return location for error.
7512 * Serializes @message to a blob. The byte order returned by
7513 * g_dbus_message_get_byte_order() will be used.
7514 * generated by @message or %NULL if @error is set. Free with g_free().
7516 * Returns: A pointer to a valid binary D-Bus message of @out_size bytes
7523 * @short_description: Base class for implementing read/write streams
7524 * @include: gio/gio.h
7525 * @see_also: #GInputStream, #GOutputStream
7527 * GIOStream represents an object that has both read and write streams.
7528 * Generally the two streams acts as separate input and output streams,
7529 * but they share some common resources and state. For instance, for
7530 * seekable streams they may use the same position in both streams.
7531 * Examples of #GIOStream objects are #GSocketConnection which represents
7532 * a two-way network connection, and #GFileIOStream which represent a
7533 * file handle opened in read-write mode.
7534 * To do the actual reading and writing you need to get the substreams
7535 * with g_io_stream_get_input_stream() and g_io_stream_get_output_stream().
7536 * The #GIOStream object owns the input and the output streams, not the other
7537 * way around, so keeping the substreams alive will not keep the #GIOStream
7538 * object alive. If the #GIOStream object is freed it will be closed, thus
7539 * closing the substream, so even if the substreams stay alive they will
7540 * always just return a %G_IO_ERROR_CLOSED for all operations.
7541 * To close a stream use g_io_stream_close() which will close the common
7542 * stream object and also the individual substreams. You can also close
7543 * the substreams themselves. In most cases this only marks the
7544 * substream as closed, so further I/O on it fails. However, some streams
7545 * may support "half-closed" states where one direction of the stream
7546 * is actually shut down.
7553 * g_socket_client_get_local_address:
7554 * @client: a #GSocketClient.
7556 * Gets the local address of the socket client.
7557 * See g_socket_client_set_local_address() for details.
7559 * Returns: (transfer none): a #GSocketAddres or %NULL. don't free
7565 * g_data_input_stream_read_uint64:
7566 * @stream: a given #GDataInputStream.
7567 * @cancellable: optional #GCancellable object, %NULL to ignore.
7568 * @error: #GError for error reporting.
7570 * Reads an unsigned 64-bit/8-byte value from @stream.
7571 * In order to get the correct byte order for this read operation,
7572 * see g_data_input_stream_get_byte_order().
7573 * If @cancellable is not %NULL, then the operation can be cancelled by
7574 * triggering the cancellable object from another thread. If the operation
7575 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
7576 * an error occurred.
7578 * Returns: an unsigned 64-bit/8-byte read from @stream or %0 if
7585 * @connection: a #GIOStream
7586 * @proxy_address: a #GProxyAddress
7587 * @cancellable: a #GCancellable
7588 * @error: return #GError
7590 * Given @connection to communicate with a proxy (eg, a
7591 * #GSocketConnection that is connected to the proxy server), this
7592 * does the necessary handshake to connect to @proxy_address, and if
7593 * required, wraps the #GIOStream to handle proxy payload.
7594 * be the same as @connection, in which case a reference
7597 * Returns: (transfer full): a #GIOStream that will replace @connection. This might
7603 * g_content_type_guess:
7604 * @filename: (allow-none): a string, or %NULL
7605 * @data: (allow-none) (array length=data_size): a stream of data, or %NULL
7606 * @data_size: the size of @data
7607 * @result_uncertain: (allow-none) (out): return location for the certainty of the result, or %NULL
7609 * Guesses the content type based on example data. If the function is
7610 * uncertain, @result_uncertain will be set to %TRUE. Either @filename
7611 * or @data may be %NULL, in which case the guess will be based solely
7612 * on the other argument.
7613 * given data. Free with g_free()
7615 * Returns: a string indicating a guessed content type for the
7620 * g_settings_backend_keys_changed:
7621 * @backend: a #GSettingsBackend implementation
7622 * @path: the path containing the changes
7623 * @items: the %NULL-terminated list of changed keys
7624 * @origin_tag: the origin tag
7626 * Signals that a list of keys have possibly changed. Backend
7627 * implementations should call this if keys have possibly changed their
7629 * not containing '//'). Each string in @items must form a valid key
7630 * end with '/' and must not contain '//').
7631 * The meaning of this signal is that any of the key names resulting
7632 * from the contatenation of @path with each item in @items may have
7634 * The same rules for when notifications must occur apply as per
7635 * g_settings_backend_changed(). These two calls can be used
7636 * interchangeably if exactly one item has changed (although in that
7637 * case g_settings_backend_changed() is definitely preferred).
7638 * For efficiency reasons, the implementation should strive for @path to
7639 * keys that were changed) but this is not strictly required.
7641 * Name when @path is prefixed to it (ie: each item must not start or
7642 * Be as long as possible (ie: the longest common prefix of all of the
7648 * g_file_query_writable_namespaces:
7649 * @file: input #GFile.
7650 * @cancellable: optional #GCancellable object, %NULL to ignore.
7651 * @error: a #GError, or %NULL
7653 * Obtain the list of attribute namespaces where new attributes
7654 * can be created by a user. An example of this is extended
7655 * attributes (in the "xattr" namespace).
7656 * If @cancellable is not %NULL, then the operation can be cancelled by
7657 * triggering the cancellable object from another thread. If the operation
7658 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
7659 * When you are done with it, release it with g_file_attribute_info_list_unref()
7661 * Returns: a #GFileAttributeInfoList describing the writable namespaces.
7666 * g_file_eject_mountable_with_operation:
7667 * @file: input #GFile.
7668 * @flags: flags affecting the operation
7669 * @mount_operation: a #GMountOperation, or %NULL to avoid user interaction.
7670 * @cancellable: optional #GCancellable object, %NULL to ignore.
7671 * @callback: a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
7672 * @user_data: the data to pass to callback function
7674 * Starts an asynchronous eject on a mountable.
7675 * When this operation has completed, @callback will be called with
7676 * g_file_eject_mountable_with_operation_finish().
7677 * If @cancellable is not %NULL, then the operation can be cancelled by
7678 * triggering the cancellable object from another thread. If the operation
7679 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
7686 * g_dbus_message_new_method_error_valist:
7687 * @method_call_message: A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to create a reply message to.
7688 * @error_name: A valid D-Bus error name.
7689 * @error_message_format: The D-Bus error message in a printf() format.
7690 * @var_args: Arguments for @error_message_format.
7692 * Like g_dbus_message_new_method_error() but intended for language bindings.
7694 * Returns: (transfer full): A #GDBusMessage. Free with g_object_unref().
7700 * g_socket_set_listen_backlog:
7701 * @socket: a #GSocket.
7702 * @backlog: the maximum number of pending connections.
7704 * Sets the maximum number of outstanding connections allowed
7705 * when listening on this socket. If more clients than this are
7706 * connecting to the socket and the application is not handling them
7707 * on time then the new connections will be refused.
7708 * Note that this must be called before g_socket_listen() and has no
7709 * effect if called after that.
7716 * g_proxy_resolver_get_default:
7718 * Gets the default #GProxyResolver for the system.
7720 * Returns: (transfer none): the default #GProxyResolver.
7727 * @settings: a #GSettings object
7729 * Changes the #GSettings object into 'delay-apply' mode. In this
7730 * mode, changes to @settings are not immediately propagated to the
7731 * backend, but kept locally until g_settings_apply() is called.
7738 * GMemoryOutputStream:destroy-function:
7740 * Function called with the buffer as argument when the stream is destroyed.
7747 * SECTION:gwin32outputstrea:
7748 * @short_description: Streaming output operations for Windows file handles
7749 * @include: gio/gwin32outputstream.h
7750 * @see_also: #GOutputStream
7752 * #GWin32OutputStream implements #GOutputStream for writing to a
7753 * Windows file handle.
7754 * Note that <filename><gio/gwin32outputstream.h></filename> belongs
7755 * to the Windows-specific GIO interfaces, thus you have to use the
7756 * <filename>gio-windows-2.0.pc</filename> pkg-config file when using it.
7761 * g_file_monitor_is_cancelled:
7762 * @monitor: a #GFileMonitor
7764 * Returns whether the monitor is canceled.
7766 * Returns: %TRUE if monitor is canceled. %FALSE otherwise.
7771 * g_periodic_get_low_priority:
7772 * @periodic: a #GPeriodic clock
7774 * Gets the priority level that #GPeriodic uses to check for mainloop
7775 * inactivity. Other sources scheduled below this level of priority are
7776 * effectively ignored by #GPeriodic and may be starved.
7778 * Returns: the low priority level
7784 * g_file_set_attributes_from_info:
7785 * @file: input #GFile.
7786 * @info: a #GFileInfo.
7787 * @flags: #GFileQueryInfoFlags
7788 * @cancellable: optional #GCancellable object, %NULL to ignore.
7789 * @error: a #GError, or %NULL
7791 * Tries to set all attributes in the #GFileInfo on the target values,
7792 * not stopping on the first error.
7793 * If there is any error during this operation then @error will be set to
7794 * the first error. Error on particular fields are flagged by setting
7795 * the "status" field in the attribute value to
7796 * %G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING, which means you can also detect
7798 * If @cancellable is not %NULL, then the operation can be cancelled by
7799 * triggering the cancellable object from another thread. If the operation
7800 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
7802 * Returns: %TRUE if there was any error, %FALSE otherwise.
7807 * g_settings_is_writable:
7808 * @settings: a #GSettings object
7809 * @name: the name of a key
7810 * @returns: %TRUE if the key @name is writable
7812 * Finds out if a key can be written or not
7819 * g_file_create_async:
7820 * @file: input #GFile.
7821 * @flags: a set of #GFileCreateFlags.
7822 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
7823 * @cancellable: optional #GCancellable object, %NULL to ignore.
7824 * @callback: a #GAsyncReadyCallback to call when the request is satisfied
7825 * @user_data: the data to pass to callback function
7827 * Asynchronously creates a new file and returns an output stream for writing to it.
7828 * The file must not already exist.
7829 * For more details, see g_file_create() which is
7830 * the synchronous version of this call.
7831 * When the operation is finished, @callback will be called. You can then call
7832 * g_file_create_finish() to get the result of the operation.
7837 * g_output_stream_splice_finish:
7838 * @stream: a #GOutputStream.
7839 * @result: a #GAsyncResult.
7840 * @error: a #GError location to store the error occuring, or %NULL to ignore.
7842 * Finishes an asynchronous stream splice operation.
7844 * Returns: a #gssize of the number of bytes spliced.
7849 * g_socket_shutdown:
7850 * @socket: a #GSocket
7851 * @shutdown_read: whether to shut down the read side
7852 * @shutdown_write: whether to shut down the write side
7853 * @error: #GError for error reporting, or %NULL to ignore.
7855 * Shut down part of a full-duplex connection.
7856 * If @shutdown_read is %TRUE then the recieving side of the connection
7857 * is shut down, and further reading is disallowed.
7858 * If @shutdown_write is %TRUE then the sending side of the connection
7859 * is shut down, and further writing is disallowed.
7860 * It is allowed for both @shutdown_read and @shutdown_write to be %TRUE.
7861 * One example where this is used is graceful disconnect for TCP connections
7862 * where you close the sending side, then wait for the other side to close
7863 * the connection, thus ensuring that the other side saw all sent data.
7865 * Returns: %TRUE on success, %FALSE on error
7871 * g_file_get_relative_path:
7872 * @parent: input #GFile.
7873 * @descendant: input #GFile.
7875 * Gets the path for @descendant relative to @parent.
7876 * This call does no blocking i/o.
7877 * to @parent, or %NULL if @descendant doesn't have @parent as prefix.
7878 * The returned string should be freed with g_free() when no longer needed.
7880 * Returns: string with the relative path from @descendant
7885 * g_simple_async_result_take_error:
7886 * @simple: a #GSimpleAsyncResult
7889 * Sets the result from @error, and takes over the caller's ownership
7890 * of @error, so the caller does not need to free it any more.
7897 * g_unix_is_mount_path_system_internal:
7898 * @mount_path: a mount path, e.g. <filename>/media/disk</filename> or <filename>/usr</filename>
7900 * Determines if @mount_path is considered an implementation of the
7901 * OS. This is primarily used for hiding mountable and mounted volumes
7902 * that only are used in the OS and has little to no relevance to the
7906 * Returns: %TRUE if @mount_path is considered an implementation detail
7911 * g_emblemed_icon_new:
7913 * @emblem: (allow-none): a #GEmblem, or %NULL
7915 * Creates a new emblemed icon for @icon with the emblem @emblem.
7917 * Returns: (transfer full): a new #GIcon
7923 * g_file_eject_mountable_finish:
7924 * @file: input #GFile.
7925 * @result: a #GAsyncResult.
7926 * @error: a #GError, or %NULL
7928 * Finishes an asynchronous eject operation started by
7929 * g_file_eject_mountable().
7932 * Returns: %TRUE if the @file was ejected successfully. %FALSE
7933 * Deprecated: 2.22: Use g_file_eject_mountable_with_operation_finish() instead.
7940 * Returns a new #GVfs handle for a local vfs.
7942 * Returns: a new #GVfs handle.
7947 * GDBusServer::new-connection:
7948 * @server: The #GDBusServer emitting the signal.
7949 * @connection: A #GDBusConnection for the new connection.
7951 * Emitted when a new authenticated connection has been made. Use
7952 * g_dbus_connection_get_peer_credentials() to figure out what
7953 * identity (if any), was authenticated.
7954 * If you want to accept the connection, take a reference to the
7955 * connection call g_dbus_connection_close() and give up your
7956 * reference. Note that the other peer may disconnect at any time -
7957 * a typical thing to do when accepting a connection is to listen to
7958 * the #GDBusConnection::closed signal.
7959 * If #GDBusServer:flags contains %G_DBUS_SERVER_FLAGS_RUN_IN_THREAD
7960 * then the signal is emitted in a new thread dedicated to the
7961 * connection. Otherwise the signal is emitted in the <link
7962 * linkend="g-main-context-push-thread-default">thread-default main
7963 * loop</link> of the thread that @server was constructed in.
7964 * You are guaranteed that signal handlers for this signal runs
7965 * before incoming messages on @connection are processed. This means
7966 * that it's suitable to call g_dbus_connection_register_object() or
7967 * similar from the signal handler.
7970 * Returns: %TRUE to claim @connection, %FALSE to let other handlers
7976 * g_action_group_action_added:
7977 * @action_group: a #GActionGroup
7978 * @action_name: the name of an action in the group
7980 * Emits the #GActionGroup::action-added signal on @action_group.
7981 * This function should only be called by #GActionGroup implementations.
7988 * g_output_stream_has_pending:
7989 * @stream: a #GOutputStream.
7991 * Checks if an ouput stream has pending actions.
7993 * Returns: %TRUE if @stream has pending actions.
7998 * GDBusConnection:capabilities:
8000 * Flags from the #GDBusCapabilityFlags enumeration
8001 * representing connection features negotiated with the other peer.
8008 * g_dbus_error_unregister_error:
8009 * @error_domain: A #GQuark for a error domain.
8010 * @error_code: An error code.
8011 * @dbus_error_name: A D-Bus error name.
8013 * Destroys an association previously set up with g_dbus_error_register_error().
8015 * Returns: %TRUE if the association was destroyed, %FALSE if it wasn't found.
8021 * SECTION:gcancellabl:
8022 * @short_description: Thread-safe Operation Cancellation Stack
8023 * @include: gio/gio.h
8025 * GCancellable is a thread-safe operation cancellation stack used
8026 * throughout GIO to allow for cancellation of synchronous and
8027 * asynchronous operations.
8032 * g_buffered_input_stream_peek:
8033 * @stream: a #GBufferedInputStream
8034 * @buffer: a pointer to an allocated chunk of memory
8038 * Peeks in the buffer, copying data of size @count into @buffer,
8039 * offset @offset bytes.
8041 * Returns: a #gsize of the number of bytes peeked, or -1 on error.
8047 * @file: input #GFile.
8049 * Checks to see if a file is native to the platform.
8050 * A native file s one expressed in the platform-native filename format,
8051 * e.g. "C:\Windows" or "/usr/bin/". This does not mean the file is local,
8052 * as it might be on a locally mounted remote filesystem.
8053 * On some systems non-native files may be available using
8054 * the native filesystem via a userspace filesystem (FUSE), in
8055 * these cases this call will return %FALSE, but g_file_get_path()
8056 * will still return a native path.
8057 * This call does no blocking i/o.
8059 * Returns: %TRUE if file is native.
8064 * g_file_set_attribute_uint64:
8065 * @file: input #GFile.
8066 * @attribute: a string containing the attribute's name.
8067 * @value: a #guint64 containing the attribute's new value.
8068 * @flags: a #GFileQueryInfoFlags.
8069 * @cancellable: optional #GCancellable object, %NULL to ignore.
8070 * @error: a #GError, or %NULL
8072 * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_UINT64 to @value.
8073 * If @attribute is of a different type, this operation will fail.
8074 * If @cancellable is not %NULL, then the operation can be cancelled by
8075 * triggering the cancellable object from another thread. If the operation
8076 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
8077 * in the @file, %FALSE otherwise.
8079 * Returns: %TRUE if the @attribute was successfully set to @value
8084 * g_output_stream_flush_finish:
8085 * @stream: a #GOutputStream.
8086 * @result: a GAsyncResult.
8087 * @error: a #GError location to store the error occuring, or %NULL to ignore.
8089 * Finishes flushing an output stream.
8091 * Returns: %TRUE if flush operation suceeded, %FALSE otherwise.
8096 * g_volume_get_icon:
8097 * @volume: a #GVolume.
8099 * Gets the icon for @volume.
8100 * The returned object should be unreffed with g_object_unref()
8101 * when no longer needed.
8103 * Returns: (transfer full): a #GIcon.
8108 * GMountOperation::aborted:
8110 * Emitted by the backend when e.g. a device becomes unavailable
8111 * while a mount operation is in progress.
8112 * Implementations of GMountOperation should handle this signal
8113 * by dismissing open password dialogs.
8120 * g_charset_converter_get_use_fallback:
8121 * @converter: a #GCharsetConverter
8123 * Gets the #GCharsetConverter:use-fallback property.
8125 * Returns: %TRUE if fallbacks are used by @converter
8131 * g_win32_output_stream_set_close_handle:
8132 * @stream: a #GWin32OutputStream
8133 * @close_handle: %TRUE to close the handle when done
8135 * Sets whether the handle of @stream shall be closed when the stream
8143 * g_converter_convert:
8144 * @converter: a #GConverter.
8145 * @inbuf: the buffer containing the data to convert.
8146 * @inbuf_size: the number of bytes in @inbuf
8147 * @outbuf: a buffer to write converted data in.
8148 * @outbuf_size: the number of bytes in @outbuf, must be at least one
8149 * @flags: a #GConvertFlags controlling the conversion details
8150 * @bytes_read: will be set to the number of bytes read from @inbuf on success
8151 * @bytes_written: will be set to the number of bytes written to @outbuf on success
8152 * @error: location to store the error occuring, or %NULL to ignore
8154 * This is the main operation used when converting data. It is to be called
8155 * multiple times in a loop, and each time it will do some work, i.e.
8156 * producing some output (in @outbuf) or consuming some input (from @inbuf) or
8157 * both. If its not possible to do any work an error is returned.
8158 * Note that a single call may not consume all input (or any input at all).
8159 * Also a call may produce output even if given no input, due to state stored
8160 * in the converter producing output.
8161 * If any data was either produced or consumed, and then an error happens, then
8162 * only the successful conversion is reported and the error is returned on the
8164 * A full conversion loop involves calling this method repeatedly, each time
8165 * giving it new input and space output space. When there is no more input
8166 * data after the data in @inbuf, the flag %G_CONVERTER_INPUT_AT_END must be set.
8167 * The loop will be (unless some error happens) returning %G_CONVERTER_CONVERTED
8168 * each time until all data is consumed and all output is produced, then
8169 * %G_CONVERTER_FINISHED is returned instead. Note, that %G_CONVERTER_FINISHED
8170 * may be returned even if %G_CONVERTER_INPUT_AT_END is not set, for instance
8171 * in a decompression converter where the end of data is detectable from the
8172 * data (and there might even be other data after the end of the compressed data).
8173 * When some data has successfully been converted @bytes_read and is set to
8174 * the number of bytes read from @inbuf, and @bytes_written is set to indicate
8175 * how many bytes was written to @outbuf. If there are more data to output
8176 * or consume (i.e. unless the G_CONVERTER_INPUT_AT_END is specified) then
8177 * G_CONVERTER_CONVERTED is returned, and if no more data is to be output
8178 * then G_CONVERTER_FINISHED is returned.
8179 * On error %G_CONVERTER_ERROR is returned and @error is set accordingly.
8180 * Some errors need special handling:
8181 * %G_IO_ERROR_NO_SPACE is returned if there is not enough space
8182 * to write the resulting converted data, the application should
8183 * call the function again with a larger @outbuf to continue.
8184 * %G_IO_ERROR_PARTIAL_INPUT is returned if there is not enough
8185 * input to fully determine what the conversion should produce,
8186 * and the %G_CONVERTER_INPUT_AT_END flag is not set. This happens for
8187 * example with an incomplete multibyte sequence when converting text,
8188 * or when a regexp matches up to the end of the input (and may match
8189 * further input). It may also happen when @inbuf_size is zero and
8190 * there is no more data to produce.
8191 * When this happens the application should read more input and then
8192 * call the function again. If further input shows that there is no
8193 * more data call the function again with the same data but with
8194 * the %G_CONVERTER_INPUT_AT_END flag set. This may cause the conversion
8195 * to finish as e.g. in the regexp match case (or, to fail again with
8196 * %G_IO_ERROR_PARTIAL_INPUT in e.g. a charset conversion where the
8197 * input is actually partial).
8198 * After g_converter_convert() has returned %G_CONVERTER_FINISHED the
8199 * converter object is in an invalid state where its not allowed
8200 * to call g_converter_convert() anymore. At this time you can only
8201 * free the object or call g_converter_reset() to reset it to the
8203 * If the flag %G_CONVERTER_FLUSH is set then conversion is modified
8204 * to try to write out all internal state to the output. The application
8205 * has to call the function multiple times with the flag set, and when
8206 * the availible input has been consumed and all internal state has
8207 * been produced then %G_CONVERTER_FLUSHED (or %G_CONVERTER_FINISHED if
8208 * really at the end) is returned instead of %G_CONVERTER_CONVERTED.
8209 * This is somewhat similar to what happens at the end of the input stream,
8210 * but done in the middle of the data.
8211 * This has different meanings for different conversions. For instance
8212 * in a compression converter it would mean that we flush all the
8213 * compression state into output such that if you uncompress the
8214 * compressed data you get back all the input data. Doing this may
8215 * make the final file larger due to padding though. Another example
8216 * is a regexp conversion, where if you at the end of the flushed data
8217 * have a match, but there is also a potential longer match. In the
8218 * non-flushed case we would ask for more input, but when flushing we
8219 * treat this as the end of input and do the match.
8220 * Flushing is not always possible (like if a charset converter flushes
8221 * at a partial multibyte sequence). Converters are supposed to try
8222 * to produce as much output as possible and then return an error
8223 * (typically %G_IO_ERROR_PARTIAL_INPUT).
8225 * Returns: a #GConverterResult, %G_CONVERTER_ERROR on error.
8231 * g_unix_mounts_changed_since:
8232 * @time: guint64 to contain a timestamp.
8234 * Checks if the unix mounts have changed since a given unix time.
8236 * Returns: %TRUE if the mounts have changed since @time.
8243 * The state of the action, or %NULL if the action is stateless.
8250 * g_file_info_get_attribute_int64:
8251 * @info: a #GFileInfo.
8252 * @attribute: a file attribute key.
8254 * Gets a signed 64-bit integer contained within the attribute. If the
8255 * attribute does not contain an signed 64-bit integer, or is invalid,
8256 * 0 will be returned.
8258 * Returns: a signed 64-bit integer from the attribute.
8263 * g_unix_socket_address_get_is_abstract:
8264 * @address: a #GInetSocketAddress
8266 * Tests if @address is abstract.
8268 * Returns: %TRUE if the address is abstract, %FALSE otherwise
8270 * Deprecated: Use g_unix_socket_address_get_address_type()
8275 * g_io_extension_get_name:
8276 * @extension: a #GIOExtension
8278 * Gets the name under which @extension was registered.
8279 * Note that the same type may be registered as extension
8280 * for multiple extension points, under different names.
8282 * Returns: the name of @extension.
8287 * g_settings_backend_changed_tree:
8288 * @backend: a #GSettingsBackend implementation
8289 * @tree: a #GTree containing the changes
8290 * @origin_tag: the origin tag
8292 * This call is a convenience wrapper. It gets the list of changes from
8293 * g_settings_backend_changed().
8300 * g_socket_client_connect_to_host:
8301 * @client: a #GSocketClient
8302 * @host_and_port: the name and optionally port of the host to connect to
8303 * @default_port: the default port to connect to
8304 * @cancellable: a #GCancellable, or %NULL
8305 * @error: a pointer to a #GError, or %NULL
8307 * This is a helper function for g_socket_client_connect().
8308 * Attempts to create a TCP connection to the named host.
8309 * address, an IPv4 address, or a domain name (in which case a DNS
8310 * lookup is performed). Quoting with [] is supported for all address
8311 * types. A port override may be specified in the usual way with a
8312 * colon. Ports may be given as decimal numbers or symbolic names (in
8313 * which case an /etc/services lookup is performed).
8314 * If no port override is given in @host_and_port then @default_port will be
8315 * used as the port number to connect to.
8316 * In general, @host_and_port is expected to be provided by the user (allowing
8317 * them to give the hostname, and a port overide if necessary) and
8318 * In the case that an IP address is given, a single connection
8319 * attempt is made. In the case that a name is given, multiple
8320 * connection attempts may be made, in turn and according to the
8321 * number of address records in DNS, until a connection succeeds.
8322 * Upon a successful connection, a new #GSocketConnection is constructed
8323 * and returned. The caller owns this new object and must drop their
8324 * reference to it when finished with it.
8325 * In the event of any failure (DNS error, service not found, no hosts
8326 * connectable) %NULL is returned and @error (if non-%NULL) is set
8329 * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
8336 * @hostname: the host that the service is running on
8337 * @port: the port that the service is running on
8338 * @priority: the target's priority
8339 * @weight: the target's weight
8341 * Creates a new #GSrvTarget with the given parameters.
8342 * You should not need to use this; normally #GSrvTarget<!-- -->s are
8343 * created by #GResolver.
8345 * Returns: a new #GSrvTarget.
8351 * SECTION:gunixsocketaddres:
8352 * @short_description: UNIX GSocketAddress
8353 * @include: gio/gunixsocketaddress.h
8355 * Support for UNIX-domain (also known as local) sockets.
8356 * UNIX domain sockets are generally visible in the filesystem.
8357 * However, some systems support abstract socket names which are not
8358 * visible in the filesystem and not affected by the filesystem
8359 * permissions, visibility, etc. Currently this is only supported
8360 * under Linux. If you attempt to use abstract sockets on other
8361 * systems, function calls may return %G_IO_ERROR_NOT_SUPPORTED
8362 * errors. You can use g_unix_socket_address_abstract_names_supported()
8363 * to see if abstract names are supported.
8364 * Note that <filename><gio/gunixsocketaddress.h></filename> belongs to
8365 * the UNIX-specific GIO interfaces, thus you have to use the
8366 * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
8371 * g_vfs_get_file_for_uri:
8373 * @uri: a string containing a URI
8375 * Gets a #GFile for @uri.
8376 * This operation never fails, but the returned object
8377 * might not support any I/O operation if the URI
8378 * is malformed or if the URI scheme is not supported.
8379 * Free the returned object with g_object_unref().
8381 * Returns: (transfer full): a #GFile.
8386 * SECTION:gbufferedoutputstrea:
8387 * @short_description: Buffered Output Stream
8388 * @include: gio/gio.h
8389 * @see_also: #GFilterOutputStream, #GOutputStream
8391 * Buffered output stream implements #GFilterOutputStream and provides
8392 * for buffered writes.
8393 * By default, #GBufferedOutputStream's buffer size is set at 4 kilobytes.
8394 * To create a buffered output stream, use g_buffered_output_stream_new(),
8395 * or g_buffered_output_stream_new_sized() to specify the buffer's size
8397 * To get the size of a buffer within a buffered input stream, use
8398 * g_buffered_output_stream_get_buffer_size(). To change the size of a
8399 * buffered output stream's buffer, use
8400 * g_buffered_output_stream_set_buffer_size(). Note that the buffer's
8401 * size cannot be reduced below the size of the data within the buffer.
8406 * g_action_group_change_action_state:
8407 * @action_group: a #GActionGroup
8408 * @action_name: the name of the action to request the change on
8409 * @value: the new state
8411 * Request for the state of the named action within @action_group to be
8412 * changed to @value.
8413 * The action must be stateful and @value must be of the correct type.
8414 * See g_action_group_get_state_type().
8415 * This call merely requests a change. The action may refuse to change
8416 * its state or may change its state to something other than @value.
8417 * See g_action_group_get_state_hint().
8418 * If the @value GVariant is floating, it is consumed.
8426 * @bus_type: A #GBusType.
8427 * @cancellable: A #GCancellable or %NULL.
8428 * @error: Return location for error or %NULL.
8430 * Synchronously connects to the message bus specified by @bus_type.
8431 * Note that the returned object may shared with other callers,
8432 * e.g. if two separate parts of a process calls this function with
8433 * the same @bus_type, they will share the same object.
8434 * This is a synchronous failable function. See g_bus_get() and
8435 * g_bus_get_finish() for the asynchronous version.
8436 * The returned object is a singleton, that is, shared with other
8437 * callers of g_bus_get() and g_bus_get_sync() for @bus_type. In the
8438 * event that you need a private message bus connection, use
8439 * g_dbus_address_get_for_bus_sync() and
8440 * g_dbus_connection_new_for_address().
8441 * Note that the returned #GDBusConnection object will (usually) have
8442 * the #GDBusConnection:exit-on-close property set to %TRUE.
8444 * Returns: (transfer full): A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
8450 * g_file_unmount_mountable:
8451 * @file: input #GFile.
8452 * @flags: flags affecting the operation
8453 * @cancellable: optional #GCancellable object, %NULL to ignore.
8454 * @callback: a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
8455 * @user_data: the data to pass to callback function
8457 * Unmounts a file of type G_FILE_TYPE_MOUNTABLE.
8458 * If @cancellable is not %NULL, then the operation can be cancelled by
8459 * triggering the cancellable object from another thread. If the operation
8460 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
8461 * When the operation is finished, @callback will be called. You can then call
8462 * g_file_unmount_mountable_finish() to get the result of the operation.
8464 * Deprecated: 2.22: Use g_file_unmount_mountable_with_operation() instead.
8469 * g_network_address_get_port:
8470 * @addr: a #GNetworkAddress
8472 * Gets @addr's port number
8474 * Returns: @addr's port (which may be 0)
8480 * g_dbus_proxy_call:
8481 * @proxy: A #GDBusProxy.
8482 * @method_name: Name of method to invoke.
8483 * @parameters: A #GVariant tuple with parameters for the signal or %NULL if not passing parameters.
8484 * @flags: Flags from the #GDBusCallFlags enumeration.
8485 * @timeout_msec: The timeout in milliseconds (with %G_MAXINT meaning "infinite") or -1 to use the proxy default timeout.
8486 * @cancellable: A #GCancellable or %NULL.
8487 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
8488 * @user_data: The data to pass to @callback.
8490 * Asynchronously invokes the @method_name method on @proxy.
8491 * If @method_name contains any dots, then @name is split into interface and
8492 * method name parts. This allows using @proxy for invoking methods on
8494 * If the #GDBusConnection associated with @proxy is closed then
8495 * the operation will fail with %G_IO_ERROR_CLOSED. If
8496 * %G_IO_ERROR_CANCELLED. If @parameters contains a value not
8497 * compatible with the D-Bus protocol, the operation fails with
8498 * %G_IO_ERROR_INVALID_ARGUMENT.
8499 * If the @parameters #GVariant is floating, it is consumed. This allows
8500 * convenient 'inline' use of g_variant_new(), e.g.:
8502 * g_dbus_proxy_call (proxy,
8504 * g_variant_new ("(ss)",
8507 * G_DBUS_CALL_FLAGS_NONE,
8510 * (GAsyncReadyCallback) two_strings_done,
8513 * This is an asynchronous method. When the operation is finished,
8514 * <link linkend="g-main-context-push-thread-default">thread-default
8515 * main loop</link> of the thread you are calling this method from.
8516 * You can then call g_dbus_proxy_call_finish() to get the result of
8517 * the operation. See g_dbus_proxy_call_sync() for the synchronous
8518 * version of this method.
8525 * GApplication::open:
8526 * @application: the application
8527 * @files: an array of #GFile objects
8528 * @n_files: the length of @files
8529 * @hint: a hint provided by the calling instance
8531 * The ::open signal is emitted on the primary instance when there are
8532 * files to open. See g_application_open() for more information.
8537 * g_dbus_proxy_new_finish:
8538 * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback function passed to g_dbus_proxy_new().
8539 * @error: Return location for error or %NULL.
8541 * Finishes creating a #GDBusProxy.
8543 * Returns: A #GDBusProxy or %NULL if @error is set. Free with g_object_unref().
8549 * g_socket_client_set_local_address:
8550 * @client: a #GSocketClient.
8551 * @address: a #GSocketAddress, or %NULL
8553 * Sets the local address of the socket client.
8554 * The sockets created by this object will bound to the
8555 * specified address (if not %NULL) before connecting.
8556 * This is useful if you want to ensure the the local
8557 * side of the connection is on a specific port, or on
8558 * a specific interface.
8565 * g_input_stream_has_pending:
8566 * @stream: input stream.
8568 * Checks if an input stream has pending actions.
8570 * Returns: %TRUE if @stream has pending actions.
8575 * g_dbus_connection_send_message_with_reply:
8576 * @connection: A #GDBusConnection.
8577 * @message: A #GDBusMessage.
8578 * @flags: Flags affecting how the message is sent.
8579 * @timeout_msec: The timeout in milliseconds, -1 to use the default timeout or %G_MAXINT for no timeout.
8580 * @out_serial: Return location for serial number assigned to @message when sending it or %NULL.
8581 * @cancellable: A #GCancellable or %NULL.
8582 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result.
8583 * @user_data: The data to pass to @callback.
8585 * Asynchronously sends @message to the peer represented by @connection.
8586 * Unless @flags contain the
8587 * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag, the serial number
8588 * will be assigned by @connection and set on @message via
8589 * g_dbus_message_set_serial(). If @out_serial is not %NULL, then the
8590 * serial number used will be written to this location prior to
8591 * submitting the message to the underlying transport.
8592 * If @connection is closed then the operation will fail with
8593 * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will
8594 * fail with %G_IO_ERROR_CANCELLED. If @message is not well-formed,
8595 * the operation fails with %G_IO_ERROR_INVALID_ARGUMENT.
8596 * This is an asynchronous method. When the operation is finished, @callback will be invoked
8597 * in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
8598 * of the thread you are calling this method from. You can then call
8599 * g_dbus_connection_send_message_with_reply_finish() to get the result of the operation.
8600 * See g_dbus_connection_send_message_with_reply_sync() for the synchronous version.
8601 * Note that @message must be unlocked, unless @flags contain the
8602 * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag.
8603 * See <xref linkend="gdbus-server"/> and <xref
8604 * linkend="gdbus-unix-fd-client"/> for an example of how to use this
8605 * low-level API to send and receive UNIX file descriptors.
8612 * g_file_info_get_attribute_byte_string:
8613 * @info: a #GFileInfo.
8614 * @attribute: a file attribute key.
8616 * Gets the value of a byte string attribute. If the attribute does
8617 * not contain a byte string, %NULL will be returned.
8620 * Returns: the contents of the @attribute value as a byte string, or
8625 * g_socket_get_credentials:
8626 * @socket: a #GSocket.
8627 * @error: #GError for error reporting, or %NULL to ignore.
8629 * Returns the credentials of the foreign process connected to this
8630 * socket, if any (e.g. it is only supported for %G_SOCKET_FAMILY_UNIX
8632 * If this operation isn't supported on the OS, the method fails with
8633 * the %G_IO_ERROR_NOT_SUPPORTED error. On Linux this is implemented
8634 * by reading the %SO_PEERCRED option on the underlying socket.
8635 * Other ways to obtain credentials from a foreign peer includes the
8636 * #GUnixCredentialsMessage type and
8637 * g_unix_connection_send_credentials() /
8638 * g_unix_connection_receive_credentials() functions.
8639 * that must be freed with g_object_unref().
8641 * Returns: (transfer full): %NULL if @error is set, otherwise a #GCredentials object
8647 * GVolumeMonitor::volume-changed:
8648 * @volume_monitor: The volume monitor emitting the signal.
8649 * @volume: a #GVolume that changed.
8651 * Emitted when mountable volume is changed.
8656 * g_dbus_proxy_new_for_bus_sync:
8657 * @bus_type: A #GBusType.
8658 * @flags: Flags used when constructing the proxy.
8659 * @info: A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL.
8660 * @name: A bus name (well-known or unique).
8661 * @object_path: An object path.
8662 * @interface_name: A D-Bus interface name.
8663 * @cancellable: A #GCancellable or %NULL.
8664 * @error: Return location for error or %NULL.
8666 * Like g_dbus_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
8667 * See <xref linkend="gdbus-wellknown-proxy"/> for an example of how #GDBusProxy can be used.
8669 * Returns: A #GDBusProxy or %NULL if error is set. Free with g_object_unref().
8677 * Emitted when the volume has been changed.
8682 * g_buffered_output_stream_set_auto_grow:
8683 * @stream: a #GBufferedOutputStream.
8684 * @auto_grow: a #gboolean.
8686 * Sets whether or not the @stream's buffer should automatically grow.
8687 * If @auto_grow is true, then each write will just make the buffer
8688 * larger, and you must manually flush the buffer to actually write out
8689 * the data to the underlying stream.
8694 * g_memory_output_stream_get_size:
8695 * @ostream: a #GMemoryOutputStream
8697 * Gets the size of the currently allocated data area (availible from
8698 * g_memory_output_stream_get_data()). If the stream isn't
8699 * growable (no realloc was passed to g_memory_output_stream_new()) then
8700 * this is the maximum size of the stream and further writes
8701 * will return %G_IO_ERROR_NO_SPACE.
8702 * Note that for growable streams the returned size may become invalid on
8703 * the next write or truncate operation on the stream.
8704 * If you want the number of bytes currently written to the stream, use
8705 * g_memory_output_stream_get_data_size().
8707 * Returns: the number of bytes allocated for the data buffer
8712 * GMount::unmounted:
8713 * @mount: the object on which the signal is emitted
8715 * This signal is emitted when the #GMount have been
8716 * unmounted. If the recipient is holding references to the
8717 * object they should release them so the object can be
8723 * GMount::pre-unmount:
8724 * @mount: the object on which the signal is emitted
8726 * This signal is emitted when the #GMount is about to be
8734 * g_dbus_connection_get_guid:
8735 * @connection: A #GDBusConnection.
8737 * The GUID of the peer performing the role of server when
8738 * authenticating. See #GDBusConnection:guid for more details.
8740 * Returns: The GUID. Do not free this string, it is owned by
8746 * g_socket_connection_factory_register_type:
8747 * @g_type: a #GType, inheriting from %G_TYPE_SOCKET_CONNECTION
8748 * @family: a #GSocketFamily
8749 * @type: a #GSocketType
8750 * @protocol: a protocol id
8752 * Looks up the #GType to be used when creating socket connections on
8753 * sockets with the specified @family,@type and @protocol.
8754 * If no type is registered, the #GSocketConnection base type is returned.
8761 * g_dbus_error_is_remote_error:
8762 * @error: A #GError.
8764 * Checks if @error represents an error received via D-Bus from a remote peer. If so,
8765 * use g_dbus_error_get_remote_error() to get the name of the error.
8768 * Returns: %TRUE if @error represents an error from a remote peer,
8774 * g_unix_mount_point_get_device_path:
8775 * @mount_point: a #GUnixMountPoint.
8777 * Gets the device path for a unix mount point.
8779 * Returns: a string containing the device path.
8784 * g_socket_get_family:
8785 * @socket: a #GSocket.
8787 * Gets the socket family of the socket.
8789 * Returns: a #GSocketFamily
8795 * g_app_info_get_executable:
8796 * @appinfo: a #GAppInfo
8798 * Gets the executable's name for the installed application.
8801 * Returns: a string containing the @appinfo's application
8806 * GDBusAuthObserver:
8808 * The #GDBusAuthObserver structure contains only private data and
8809 * should only be accessed using the provided API.
8816 * g_settings_get_value:
8817 * @settings: a #GSettings object
8818 * @key: the key to get the value for
8819 * @returns: a new #GVariant
8821 * Gets the value that is stored in @settings for @key.
8822 * It is a programmer error to give a @key that isn't contained in the
8823 * schema for @settings.
8830 * g_dbus_connection_close_finish:
8831 * @connection: A #GDBusConnection.
8832 * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_close().
8833 * @error: Return location for error or %NULL.
8835 * Finishes an operation started with g_dbus_connection_close().
8837 * Returns: %TRUE if the operation succeeded, %FALSE if @error is set.
8843 * g_settings_set_value:
8844 * @settings: a #GSettings object
8845 * @key: the name of the key to set
8846 * @value: a #GVariant of the correct type
8847 * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
8849 * Sets @key in @settings to @value.
8850 * It is a programmer error to give a @key that isn't contained in the
8851 * schema for @settings or for @value to have the incorrect type, per
8853 * If @value is floating then this function consumes the reference.
8860 * g_action_get_state_type:
8861 * @action: a #GAction
8863 * Queries the type of the state of @action.
8864 * g_action_new_stateful()) then this function returns the #GVariantType
8865 * of the state. This is the type of the initial value given as the
8866 * state. All calls to g_action_set_state() must give a #GVariant of
8867 * this type and g_action_get_state() will return a #GVariant of the
8869 * this function will return %NULL. In that case, g_action_get_state()
8870 * will return %NULL and you must not call g_action_set_state().
8872 * If the action is stateful (ie: was created with
8873 * If the action is not stateful (ie: created with g_action_new()) then
8874 * Returns: (allow-none): the state type, if the action is stateful
8880 * g_input_stream_close_finish:
8881 * @stream: a #GInputStream.
8882 * @result: a #GAsyncResult.
8883 * @error: a #GError location to store the error occuring, or %NULL to ignore.
8885 * Finishes closing a stream asynchronously, started from g_input_stream_close_async().
8887 * Returns: %TRUE if the stream was closed successfully.
8892 * g_resolver_lookup_by_address_finish:
8893 * @resolver: a #GResolver
8894 * @result: the result passed to your #GAsyncReadyCallback
8895 * @error: return location for a #GError, or %NULL
8897 * Retrieves the result of a previous call to
8898 * g_resolver_lookup_by_address_async().
8899 * If the DNS resolution failed, @error (if non-%NULL) will be set to
8900 * a value from #GResolverError. If the operation was cancelled,
8901 * form), or %NULL on error.
8903 * Returns: a hostname (either ASCII-only, or in ASCII-encoded
8909 * mime_info_cache_reload:
8910 * @dir: directory path which needs reloading.
8912 * Reload the mime information for the @dir.
8918 * @socket: a #GSocket.
8920 * Returns the underlying OS socket object. On unix this
8921 * is a socket file descriptor, and on windows this is
8922 * a Winsock2 SOCKET handle. This may be useful for
8923 * doing platform specific or otherwise unusual operations
8926 * Returns: the file descriptor of the socket.
8932 * GDBusConnection:address:
8934 * A D-Bus address specifying potential endpoints that can be used
8935 * when establishing the connection.
8942 * g_mount_operation_set_choice:
8943 * @op: a #GMountOperation.
8944 * @choice: an integer.
8946 * Sets a default choice for the mount operation.
8951 * g_dbus_message_set_body:
8952 * @message: A #GDBusMessage.
8953 * @body: Either %NULL or a #GVariant that is a tuple.
8955 * Sets the body @message. As a side-effect the
8956 * %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field is set to the
8957 * type string of @body (or cleared if @body is %NULL).
8958 * If @body is floating, @message assumes ownership of @body.
8965 * g_data_input_stream_read_upto_async:
8966 * @stream: a #GDataInputStream
8967 * @stop_chars: characters to terminate the read
8968 * @stop_chars_len: length of @stop_chars. May be -1 if @stop_chars is nul-terminated
8969 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
8970 * @cancellable: optional #GCancellable object, %NULL to ignore
8971 * @callback: callback to call when the request is satisfied
8972 * @user_data: the data to pass to callback function
8974 * The asynchronous version of g_data_input_stream_read_upto().
8975 * It is an error to have two outstanding calls to this function.
8976 * In contrast to g_data_input_stream_read_until(), this function
8977 * does <emphasis>not</emphasis> consume the stop character. You have
8978 * to use g_data_input_stream_read_byte() to get it before calling
8979 * g_data_input_stream_read_upto() again.
8980 * Note that @stop_chars may contain '\0' if @stop_chars_len is
8982 * When the operation is finished, @callback will be called. You
8983 * can then call g_data_input_stream_read_upto_finish() to get
8984 * the result of the operation.
8991 * g_application_set_application_id:
8992 * @application: a #GApplication
8993 * @application_id: the identifier for @application
8995 * Sets the unique identifier for @application.
8996 * The application id can only be modified if @application has not yet
8998 * The application id must be valid. See g_application_id_is_valid().
9005 * g_dbus_method_invocation_get_object_path:
9006 * @invocation: A #GDBusMethodInvocation.
9008 * Gets the object path the method was invoked on.
9010 * Returns: A string. Do not free, it is owned by @invocation.
9016 * g_application_open:
9017 * @application: a #GApplication
9018 * @files: an array of #GFiles to open
9019 * @n_files: the length of the @files array
9020 * @hint: a hint (or ""), but never %NULL
9022 * Opens the given files.
9023 * In essence, this results in the #GApplication::open signal being emitted
9024 * in the primary instance.
9025 * intended to be used by applications that have multiple modes for
9026 * for this functionality, you should use "".
9027 * The application must be registered before calling this function
9028 * and it must have the %G_APPLICATION_HANDLES_OPEN flag set.
9030 * Opening files (eg: "view" vs "edit", etc). Unless you have a need
9036 * g_file_append_to_finish:
9037 * @file: input #GFile.
9038 * @res: #GAsyncResult
9039 * @error: a #GError, or %NULL
9041 * Finishes an asynchronous file append operation started with
9042 * g_file_append_to_async().
9043 * Free the returned object with g_object_unref().
9045 * Returns: (transfer full): a valid #GFileOutputStream or %NULL on error.
9050 * g_dbus_is_address:
9051 * @string: A string.
9053 * Checks if @string is a D-Bus address.
9054 * This doesn't check if @string is actually supported by #GDBusServer
9055 * or #GDBusConnection - use g_dbus_is_supported_address() to do more
9058 * Returns: %TRUE if @string is a valid D-Bus address, %FALSE otherwise.
9064 * g_dbus_message_get_flags:
9065 * @message: A #GDBusMessage.
9067 * Gets the flags for @message.
9069 * Returns: Flags that are set (typically values from the #GDBusMessageFlags enumeration bitwise ORed together).
9075 * g_dbus_arg_info_unref:
9076 * @info: A #GDBusArgInfo.
9078 * If @info is statically allocated, does nothing. Otherwise decreases
9079 * the reference count of @info. When its reference count drops to 0,
9080 * the memory used is freed.
9087 * g_mount_operation_new:
9089 * Creates a new mount operation.
9091 * Returns: a #GMountOperation.
9096 * GSimpleAction:state-type:
9098 * The #GVariantType of the state that the action has, or %NULL if the
9099 * action is stateless.
9106 * g_io_modules_load_all_in_directory:
9107 * @dirname: pathname for a directory containing modules to load.
9109 * Loads all the modules in the specified directory.
9110 * If don't require all modules to be initialized (and thus registering
9111 * all gtypes) then you can use g_io_modules_scan_all_in_directory()
9112 * which allows delayed/lazy loading of modules.
9113 * from the directory,
9114 * All the modules are loaded into memory, if you want to
9115 * unload them (enabling on-demand loading) you must call
9116 * g_type_module_unuse() on all the modules. Free the list
9117 * with g_list_free().
9119 * Returns: (element-type GIOModule) (transfer full): a list of #GIOModules loaded
9124 * g_unix_connection_receive_credentials:
9125 * @connection: A #GUnixConnection.
9126 * @cancellable: A #GCancellable or %NULL.
9127 * @error: Return location for error or %NULL.
9129 * Receives credentials from the sending end of the connection. The
9130 * sending end has to call g_unix_connection_send_credentials() (or
9131 * similar) for this to work.
9132 * As well as reading the credentials this also reads (and discards) a
9133 * single byte from the stream, as this is required for credentials
9134 * passing to work on some implementations.
9135 * Other ways to exchange credentials with a foreign peer includes the
9136 * #GUnixCredentialsMessage type and g_socket_get_credentials() function.
9137 * g_object_unref()), %NULL if @error is set.
9139 * Returns: (transfer full): Received credentials on success (free with
9145 * g_proxy_resolver_lookup_finish:
9146 * @resolver: a #GProxyResolver
9147 * @result: the result passed to your #GAsyncReadyCallback
9148 * @error: return location for a #GError, or %NULL
9150 * Call this function to obtain the array of proxy URIs when
9151 * g_proxy_resolver_lookup_async() is complete. See
9152 * g_proxy_resolver_lookup() for more details.
9155 * Returns: (transfer full) (element-type utf8): A NULL-terminated array of proxy URIs. Must be freed with
9161 * g_dbus_message_set_error_name:
9162 * @message: A #GDBusMessage.
9163 * @value: The value to set.
9165 * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field.
9172 * g_socket_client_connect_async:
9173 * @client: a #GTcpClient
9174 * @connectable: a #GSocketConnectable specifying the remote address.
9175 * @cancellable: a #GCancellable, or %NULL
9176 * @callback: a #GAsyncReadyCallback
9177 * @user_data: user data for the callback
9179 * This is the asynchronous version of g_socket_client_connect().
9180 * When the operation is finished @callback will be
9181 * called. You can then call g_socket_client_connect_finish() to get
9182 * the result of the operation.
9191 * The object that handles DNS resolution. Use g_resolver_get_default()
9192 * to get the default resolver.
9197 * GDBusConnection:guid:
9199 * The GUID of the peer performing the role of server when
9201 * If you are constructing a #GDBusConnection and pass
9202 * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER in the
9203 * #GDBusConnection:flags property then you MUST also set this
9204 * property to a valid guid.
9205 * If you are constructing a #GDBusConnection and pass
9206 * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT in the
9207 * #GDBusConnection:flags property you will be able to read the GUID
9208 * of the other peer here after the connection has been successfully
9216 * g_inet_address_new_from_string:
9217 * @string: a string representation of an IP address
9219 * Parses @string as an IP address and creates a new #GInetAddress.
9221 * Returns: a new #GInetAddress corresponding to @string, or %NULL if
9227 * g_app_info_get_id:
9228 * @appinfo: a #GAppInfo.
9230 * Gets the ID of an application. An id is a string that
9231 * identifies the application. The exact format of the id is
9232 * platform dependent. For instance, on Unix this is the
9233 * desktop file id from the xdg menu specification.
9234 * Note that the returned ID may be %NULL, depending on how
9235 * the @appinfo has been constructed.
9237 * Returns: a string containing the application's ID.
9242 * g_dbus_message_new_method_error_literal:
9243 * @method_call_message: A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to create a reply message to.
9244 * @error_name: A valid D-Bus error name.
9245 * @error_message: The D-Bus error message.
9247 * Creates a new #GDBusMessage that is an error reply to @method_call_message.
9249 * Returns: (transfer full): A #GDBusMessage. Free with g_object_unref().
9255 * g_dbus_node_info_lookup_interface:
9256 * @info: A #GDBusNodeInfo.
9257 * @name: A D-Bus interface name.
9259 * Looks up information about an interface.
9260 * This cost of this function is O(n) in number of interfaces.
9262 * Returns: A #GDBusInterfaceInfo or %NULL if not found. Do not free, it is owned by @info.
9268 * g_data_output_stream_put_int64:
9269 * @stream: a #GDataOutputStream.
9271 * @cancellable: optional #GCancellable object, %NULL to ignore.
9272 * @error: a #GError, %NULL to ignore.
9274 * Puts a signed 64-bit integer into the stream.
9276 * Returns: %TRUE if @data was successfully added to the @stream.
9281 * g_output_stream_close:
9282 * @stream: A #GOutputStream.
9283 * @cancellable: optional cancellable object
9284 * @error: location to store the error occuring, or %NULL to ignore
9286 * Closes the stream, releasing resources related to it.
9287 * Once the stream is closed, all other operations will return %G_IO_ERROR_CLOSED.
9288 * Closing a stream multiple times will not return an error.
9289 * Closing a stream will automatically flush any outstanding buffers in the
9291 * Streams will be automatically closed when the last reference
9292 * is dropped, but you might want to call this function to make sure
9293 * resources are released as early as possible.
9294 * Some streams might keep the backing store of the stream (e.g. a file descriptor)
9295 * open after the stream is closed. See the documentation for the individual
9296 * stream for details.
9297 * On failure the first error that happened will be reported, but the close
9298 * operation will finish as much as possible. A stream that failed to
9299 * close will still return %G_IO_ERROR_CLOSED for all operations. Still, it
9300 * is important to check and report the error to the user, otherwise
9301 * there might be a loss of data as all data might not be written.
9302 * If @cancellable is not NULL, then the operation can be cancelled by
9303 * triggering the cancellable object from another thread. If the operation
9304 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
9305 * Cancelling a close will still leave the stream closed, but there some streams
9306 * can use a faster close that doesn't block to e.g. check errors. On
9307 * cancellation (as with any error) there is no guarantee that all written
9308 * data will reach the target.
9310 * Returns: %TRUE on success, %FALSE on failure
9315 * g_win32_output_stream_get_handle:
9316 * @stream: a #GWin32OutputStream
9318 * Return the Windows handle that the stream writes to.
9320 * Returns: The handle descriptor of @stream
9326 * g_socket_connectable_enumerate:
9327 * @connectable: a #GSocketConnectable
9329 * Creates a #GSocketAddressEnumerator for @connectable.
9331 * Returns: (transfer full): a new #GSocketAddressEnumerator.
9337 * The string info map is an efficient data structure designed to b:
9339 * used with a small set of items. It is used by GSettings schemas for
9341 * 1) Implement <choices> with a list of valid strings
9342 * 2) Implement <alias> by mapping one string to another
9343 * 3) Implement enumerated types by mapping strings to integer values
9345 * The map is made out of an array of uint32s. Each entry in the array
9346 * is an integer value, followed by a specially formatted string value:
9347 * The string starts with the byte 0xff or 0xfe, followed by the
9348 * content of the string, followed by a nul byte, followed by
9349 * additional nul bytes for padding, followed by a 0xff byte.
9350 * Padding is added so that the entire formatted string takes up a
9351 * multiple of 4 bytes, and not less than 8 bytes. The requirement
9352 * for a string to take up 8 bytes is so that the scanner doesn't lose
9353 * synch and mistake a string for an integer value.
9354 * The first byte of the formatted string depends on if the integer is
9355 * an enum value (0xff) or an alias (0xfe). If it is an alias then the
9356 * number refers to the word offset within the info map at which the
9357 * integer corresponding to the "target" value is stored.
9358 * For example, consider the case of the string info map representing an
9359 * enumerated type of 'foo' (value 1) and 'bar' (value 2) and 'baz'
9360 * (alias for 'bar'). Note that string info maps are always little
9362 * x01 x00 x00 x00 xff 'f' 'o' 'o' x00 x00 x00 xff x02 x00 x00 x00
9363 * xff 'b' 'a' 'r' x00 x00 x00 xff x03 x00 x00 x00 xfe 'b' 'a' 'z'
9365 * The operations that someone may want to perform with the map:
9366 * - lookup if a string is valid (and not an alias)
9367 * - lookup the integer value for a enum 'nick'
9368 * - lookup the integer value for the target of an alias
9369 * - lookup an alias and convert it to its target string
9370 * - lookup the enum nick for a given value
9371 * In order to lookup if a string is valid, it is padded on either side
9372 * (as described) and scanned for in the array. For example, you might
9374 * xff 'f' 'o' 'o' x00 x00 x00 xff
9375 * In order to lookup the integer value for a nick, the string is padded
9376 * on either side and scanned for in the array, as above. Instead of
9377 * merely succeeding, we look at the integer value to the left of the
9378 * match. This is the enum value.
9379 * In order to lookup an alias and convert it to its target enum value,
9380 * the string is padded on either side (as described, with 0xfe) and
9381 * scanned for. For example, you might look for "baz":
9382 * xfe 'b' 'a' 'z' x00 x00 x00 xff
9383 * The integer immediately preceeding the match then contains the offset
9384 * of the integer value of the target. In our example, that's '3'.
9385 * This index is dereferenced to find the enum value of '2'.
9386 * To convert the alias to its target string, 5 bytes just need to be
9387 * added past the start of the integer value to find the start of the
9389 * To lookup the enum nick for a given value, the value is searched for
9390 * in the array. To ensure that the value isn't matching the inside of a
9391 * string, we must check that it is either the first item in the array or
9392 * immediately preceeded by the byte 0xff. It must also be immediately
9393 * followed by the byte 0xff.
9394 * Because strings always take up a minimum of 2 words, because 0xff or
9395 * 0xfe never appear inside of a utf-8 string and because no two integer
9396 * values ever appear in sequence, the only way we can have the
9398 * xff __ __ __ __ xff (or 0xfe)
9399 * is in the event of an integer nested between two strings.
9400 * For implementation simplicity/efficiency, strings may not be more
9401 * the value of each choice is set to zero and ignored.
9403 * Than 65 characters in length (ie: 17 32bit words after padding).
9404 * In the event that we are doing <choices> (ie: not an enum type) then
9409 * g_settings_get_string:
9410 * @settings: a #GSettings object
9411 * @key: the key to get the value for
9412 * @returns: a newly-allocated string
9414 * Gets the value that is stored at @key in @settings.
9415 * A convenience variant of g_settings_get() for strings.
9416 * It is a programmer error to give a @key that isn't specified as
9417 * having a string type in the schema for @settings.
9424 * g_settings_get_boolean:
9425 * @settings: a #GSettings object
9426 * @key: the key to get the value for
9427 * @returns: a boolean
9429 * Gets the value that is stored at @key in @settings.
9430 * A convenience variant of g_settings_get() for booleans.
9431 * It is a programmer error to give a @key that isn't specified as
9432 * having a boolean type in the schema for @settings.
9439 * g_settings_list_schemas:
9441 * Gets a list of the #GSettings schemas installed on the system. The
9442 * returned list is exactly the list of schemas for which you may call
9443 * g_settings_new() without adverse effects.
9444 * This function does not list the schemas that do not provide their own
9445 * g_settings_new_with_path()). See
9446 * g_settings_list_relocatable_schemas() for that.
9447 * schemas that are available. The list must not be modified or
9450 * Paths (ie: schemas for which you must use
9451 * Returns: (element-type utf8) (transfer none): a list of #GSettings
9457 * g_dbus_connection_signal_unsubscribe:
9458 * @connection: A #GDBusConnection.
9459 * @subscription_id: A subscription id obtained from g_dbus_connection_signal_subscribe().
9461 * Unsubscribes from signals.
9468 * g_dbus_message_set_flags:
9469 * @message: A #GDBusMessage.
9470 * @flags: Flags for @message that are set (typically values from the #GDBusMessageFlags enumeration bitwise ORed together).
9472 * Sets the flags to set on @message.
9479 * g_file_append_to_async:
9480 * @file: input #GFile.
9481 * @flags: a set of #GFileCreateFlags.
9482 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
9483 * @cancellable: optional #GCancellable object, %NULL to ignore.
9484 * @callback: a #GAsyncReadyCallback to call when the request is satisfied
9485 * @user_data: the data to pass to callback function
9487 * Asynchronously opens @file for appending.
9488 * For more details, see g_file_append_to() which is
9489 * the synchronous version of this call.
9490 * When the operation is finished, @callback will be called. You can then call
9491 * g_file_append_to_finish() to get the result of the operation.
9496 * g_dbus_message_set_sender:
9497 * @message: A #GDBusMessage.
9498 * @value: The value to set.
9500 * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_SENDER header field.
9507 * g_dbus_proxy_call_sync:
9508 * @proxy: A #GDBusProxy.
9509 * @method_name: Name of method to invoke.
9510 * @parameters: A #GVariant tuple with parameters for the signal or %NULL if not passing parameters.
9511 * @flags: Flags from the #GDBusCallFlags enumeration.
9512 * @timeout_msec: The timeout in milliseconds (with %G_MAXINT meaning "infinite") or -1 to use the proxy default timeout.
9513 * @cancellable: A #GCancellable or %NULL.
9514 * @error: Return location for error or %NULL.
9516 * Synchronously invokes the @method_name method on @proxy.
9517 * If @method_name contains any dots, then @name is split into interface and
9518 * method name parts. This allows using @proxy for invoking methods on
9520 * If the #GDBusConnection associated with @proxy is disconnected then
9521 * the operation will fail with %G_IO_ERROR_CLOSED. If
9522 * %G_IO_ERROR_CANCELLED. If @parameters contains a value not
9523 * compatible with the D-Bus protocol, the operation fails with
9524 * %G_IO_ERROR_INVALID_ARGUMENT.
9525 * If the @parameters #GVariant is floating, it is consumed. This allows
9526 * convenient 'inline' use of g_variant_new(), e.g.:
9528 * g_dbus_proxy_call_sync (proxy,
9530 * g_variant_new ("(ss)",
9533 * G_DBUS_CALL_FLAGS_NONE,
9538 * The calling thread is blocked until a reply is received. See
9539 * g_dbus_proxy_call() for the asynchronous version of this
9541 * return values. Free with g_variant_unref().
9543 * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
9549 * GDBusProxy:g-object-path:
9551 * The object path the proxy is for.
9558 * g_file_info_set_is_symlink:
9559 * @info: a #GFileInfo.
9560 * @is_symlink: a #gboolean.
9562 * Sets the "is_symlink" attribute in a #GFileInfo according to @is_symlink.
9563 * See %G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK.
9568 * g_file_info_set_attribute_mask:
9569 * @info: a #GFileInfo.
9570 * @mask: a #GFileAttributeMatcher.
9572 * Sets @mask on @info to match specific attribute types.
9577 * g_dbus_is_member_name:
9578 * @string: The string to check.
9580 * Checks if @string is a valid D-Bus member (e.g. signal or method) name.
9582 * Returns: %TRUE if valid, %FALSE otherwise.
9588 * g_file_query_default_handler:
9589 * @file: a #GFile to open.
9590 * @cancellable: optional #GCancellable object, %NULL to ignore.
9591 * @error: a #GError, or %NULL
9593 * Returns the #GAppInfo that is registered as the default
9594 * application to handle the file specified by @file.
9595 * If @cancellable is not %NULL, then the operation can be cancelled by
9596 * triggering the cancellable object from another thread. If the operation
9597 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
9598 * When you are done with it, release it with g_object_unref()
9600 * Returns: (transfer full): a #GAppInfo if the handle was found, %NULL if there were errors.
9605 * GDBusProxy:g-bus-type:
9607 * If this property is not %G_BUS_TYPE_NONE, then
9608 * #GDBusProxy:g-connection must be %NULL and will be set to the
9609 * #GDBusConnection obtained by calling g_bus_get() with the value
9617 * g_dbus_connection_get_peer_credentials:
9618 * @connection: A #GDBusConnection.
9620 * Gets the credentials of the authenticated peer. This will always
9621 * return %NULL unless @connection acted as a server
9622 * (e.g. %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER was passed)
9623 * when set up and the client passed credentials as part of the
9624 * authentication process.
9625 * In a message bus setup, the message bus is always the server and
9626 * each application is a client. So this method will always return
9627 * %NULL for message bus clients.
9628 * this object, it is owned by @connection.
9630 * Returns: (transfer none): A #GCredentials or %NULL if not available. Do not free
9636 * g_file_info_set_icon:
9637 * @info: a #GFileInfo.
9640 * Sets the icon for a given #GFileInfo.
9641 * See %G_FILE_ATTRIBUTE_STANDARD_ICON.
9646 * g_socket_new_from_fd:
9647 * @fd: a native socket file descriptor.
9648 * @error: #GError for error reporting, or %NULL to ignore.
9650 * Creates a new #GSocket from a native file descriptor
9651 * or winsock SOCKET handle.
9652 * This reads all the settings from the file descriptor so that
9653 * all properties should work. Note that the file descriptor
9654 * will be set to non-blocking mode, independent on the blocking
9655 * mode of the #GSocket.
9656 * Free the returned object with g_object_unref().
9658 * Returns: a #GSocket or %NULL on error.
9664 * g_app_launch_context_launch_failed:
9665 * @context: a #GAppLaunchContext.
9666 * @startup_notify_id: the startup notification id that was returned by g_app_launch_context_get_startup_notify_id().
9668 * Called when an application has failed to launch, so that it can cancel
9669 * the application startup notification started in g_app_launch_context_get_startup_notify_id().
9674 * g_socket_get_blocking:
9675 * @socket: a #GSocket.
9677 * Gets the blocking mode of the socket. For details on blocking I/O,
9678 * see g_socket_set_blocking().
9680 * Returns: %TRUE if blocking I/O is used, %FALSE otherwise.
9686 * g_periodic_damaged:
9687 * @periodic: a #GPeriodic clock
9689 * Report damage and schedule the "repair" signal to be emitted during
9690 * the next repair phase.
9691 * You may not call this function during the repair phase.
9698 * g_buffered_input_stream_set_buffer_size:
9699 * @stream: a #GBufferedInputStream
9702 * Sets the size of the internal buffer of @stream to @size, or to the
9703 * size of the contents of the buffer. The buffer can never be resized
9704 * smaller than its current contents.
9709 * g_action_group_action_enabled_changed:
9710 * @action_group: a #GActionGroup
9711 * @action_name: the name of an action in the group
9712 * @enabled: whether or not the action is now enabled
9714 * Emits the #GActionGroup::action-enabled-changed signal on @action_group.
9715 * This function should only be called by #GActionGroup implementations.
9722 * g_input_stream_read:
9723 * @stream: a #GInputStream.
9724 * @buffer: a buffer to read data into (which should be at least count bytes long).
9725 * @count: the number of bytes that will be read from the stream
9726 * @cancellable: optional #GCancellable object, %NULL to ignore.
9727 * @error: location to store the error occuring, or %NULL to ignore
9729 * Tries to read @count bytes from the stream into the buffer starting at
9730 * If count is zero returns zero and does nothing. A value of @count
9731 * larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
9732 * On success, the number of bytes read into the buffer is returned.
9733 * It is not an error if this is not the same as the requested size, as it
9734 * can happen e.g. near the end of a file. Zero is returned on end of file
9735 * (or if @count is zero), but never otherwise.
9736 * If @cancellable is not NULL, then the operation can be cancelled by
9737 * triggering the cancellable object from another thread. If the operation
9738 * was cancelled, the error G_IO_ERROR_CANCELLED will be returned. If an
9739 * operation was partially finished when the operation was cancelled the
9740 * partial result will be returned, without an error.
9741 * On error -1 is returned and @error is set accordingly.
9743 * Returns: Number of bytes read, or -1 on error
9748 * g_themed_icon_prepend_name:
9749 * @icon: a #GThemedIcon
9750 * @iconname: name of icon to prepend to list of icons from within @icon.
9752 * Prepend a name to the list of icons from within @icon.
9754 * Note that doing so invalidates the hash computed by prior calls
9763 * SECTION:gconverte:
9764 * @short_description: Data conversion interface
9765 * @include: gio/gio.h
9766 * @see_also: #GInputStream, #GOutputStream
9768 * #GConverter is implemented by objects that convert
9769 * binary data in various ways. The conversion can be
9770 * stateful and may fail at any place.
9771 * compression, decompression and regular expression
9774 * Some example conversions are: character set conversion,
9780 * g_settings_get_enum:
9781 * @settings: a #GSettings object
9782 * @key: the key to get the value for
9783 * @returns: the enum value
9785 * Gets the value that is stored in @settings for @key and converts it
9786 * to the enum value that it represents.
9787 * In order to use this function the type of the value must be a string
9788 * and it must be marked in the schema file as an enumerated type.
9789 * It is a programmer error to give a @key that isn't contained in the
9790 * schema for @settings or is not marked as an enumerated type.
9791 * If the value stored in the configuration database is not a valid
9792 * value for the enumerated type then this function will return the
9800 * g_app_info_reset_type_associations:
9801 * @content_type: a content type
9803 * Removes all changes to the type associations done by
9804 * g_app_info_set_as_default_for_type(),
9805 * g_app_info_set_as_default_for_extension(),
9806 * g_app_info_add_supports_type() or g_app_info_remove_supports_type().
9813 * g_dbus_proxy_get_name:
9814 * @proxy: A #GDBusProxy.
9816 * Gets the name that @proxy was constructed for.
9818 * Returns: A string owned by @proxy. Do not free.
9824 * g_file_info_get_name:
9825 * @info: a #GFileInfo.
9827 * Gets the name for a file.
9829 * Returns: a string containing the file name.
9834 * g_mount_operation_get_anonymous:
9835 * @op: a #GMountOperation.
9837 * Check to see whether the mount operation is being used
9838 * for an anonymous user.
9840 * Returns: %TRUE if mount operation is anonymous.
9845 * g_socket_is_connected:
9846 * @socket: a #GSocket.
9848 * Check whether the socket is connected. This is only useful for
9849 * connection-oriented sockets.
9851 * Returns: %TRUE if socket is connected, %FALSE otherwise.
9857 * g_application_hold:
9858 * @application: a #GApplication
9860 * Increases the use count of @application.
9861 * Use this function to indicate that the application has a reason to
9862 * continue to run. For example, g_application_hold() is called by GTK+
9863 * when a toplevel window is on the screen.
9864 * To cancel the hold, call g_application_release().
9869 * g_socket_get_remote_address:
9870 * @socket: a #GSocket.
9871 * @error: #GError for error reporting, or %NULL to ignore.
9873 * Try to get the remove address of a connected socket. This is only
9874 * useful for connection oriented sockets that have been connected.
9875 * Free the returned object with g_object_unref().
9877 * Returns: (transfer full): a #GSocketAddress or %NULL on error.
9883 * g_dbus_message_new_method_reply:
9884 * @method_call_message: A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to create a reply message to.
9886 * Creates a new #GDBusMessage that is a reply to @method_call_message.
9888 * Returns: (transfer full): #GDBusMessage. Free with g_object_unref().
9894 * g_application_register:
9895 * @application: a #GApplication
9896 * @cancellable: a #GCancellable, or %NULL
9897 * @error: a pointer to a NULL #GError, or %NULL
9898 * @returns: %TRUE if registration succeeded
9900 * Attempts registration of the application.
9901 * This is the point at which the application discovers if it is the
9902 * primary instance or merely acting as a remote for an already-existing
9904 * If the application has already been registered then %TRUE is
9905 * returned with no work performed.
9906 * The #GApplication::startup signal is emitted if registration succeeds
9907 * and @application is the primary instance.
9908 * In the event of an error (such as @cancellable being cancelled, or a
9909 * failure to connect to the session bus), %FALSE is returned and @error
9910 * is set appropriately.
9911 * instance is or is not the primary instance of the application. See
9912 * g_application_get_is_remote() for that.
9914 * Note: the return value of this function is not an indicator that this
9920 * g_emblemed_icon_get_icon:
9921 * @emblemed: a #GEmblemedIcon
9923 * Gets the main icon for @emblemed.
9925 * Returns: (transfer full): a #GIcon that is owned by @emblemed
9931 * g_file_info_set_attribute_object:
9932 * @info: a #GFileInfo.
9933 * @attribute: a file attribute key.
9934 * @attr_value: a #GObject.
9936 * Sets the @attribute to contain the given @attr_value,
9942 * GDBusServer:authentication-observer:
9944 * A #GDBusAuthObserver object to assist in the authentication process or %NULL.
9951 * g_bus_watch_name_on_connection:
9952 * @connection: A #GDBusConnection.
9953 * @name: The name (well-known or unique) to watch.
9954 * @flags: Flags from the #GBusNameWatcherFlags enumeration.
9955 * @name_appeared_handler: Handler to invoke when @name is known to exist or %NULL.
9956 * @name_vanished_handler: Handler to invoke when @name is known to not exist or %NULL.
9957 * @user_data: User data to pass to handlers.
9958 * @user_data_free_func: Function for freeing @user_data or %NULL.
9960 * Like g_bus_watch_name() but takes a #GDBusConnection instead of a
9962 * g_bus_unwatch_name() to stop watching the name.
9964 * Returns: An identifier (never 0) that an be used with
9970 * g_action_group_get_action_enabled:
9971 * @action_group: a #GActionGroup
9972 * @action_name: the name of the action to query
9974 * Checks if the named action within @action_group is currently enabled.
9975 * An action must be enabled in order to be activated or in order to
9976 * have its state changed from outside callers.
9978 * Returns: whether or not the action is currently enabled
9984 * g_app_info_should_show:
9985 * @appinfo: a #GAppInfo.
9987 * Checks if the application info should be shown in menus that
9988 * list available applications.
9990 * Returns: %TRUE if the @appinfo should be shown, %FALSE otherwise.
9995 * g_proxy_get_default_for_protocol:
9996 * @protocol: the proxy protocol name (e.g. http, socks, etc)
9998 * Lookup "gio-proxy" extension point for a proxy implementation that supports
9999 * specified protocol.
10001 * Returns: return a #GProxy or NULL if protocol is not supported.
10007 * g_dbus_connection_send_message_with_reply_finish:
10008 * @connection: a #GDBusConnection
10009 * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_send_message_with_reply().
10010 * @error: Return location for error or %NULL.
10012 * Finishes an operation started with g_dbus_connection_send_message_with_reply().
10013 * Note that @error is only set if a local in-process error
10014 * occured. That is to say that the returned #GDBusMessage object may
10015 * be of type %G_DBUS_MESSAGE_TYPE_ERROR. Use
10016 * g_dbus_message_to_gerror() to transcode this to a #GError.
10017 * See <xref linkend="gdbus-server"/> and <xref
10018 * linkend="gdbus-unix-fd-client"/> for an example of how to use this
10019 * low-level API to send and receive UNIX file descriptors.
10021 * Returns: (transfer full): A locked #GDBusMessage or %NULL if @error is set.
10027 * SECTION:gunixinputstrea:
10028 * @short_description: Streaming input operations for UNIX file descriptors
10029 * @include: gio/gunixinputstream.h
10030 * @see_also: #GInputStream
10032 * #GUnixInputStream implements #GInputStream for reading from a
10033 * UNIX file descriptor, including asynchronous operations. The file
10034 * descriptor must be selectable, so it doesn't work with opened files.
10035 * Note that <filename><gio/gunixinputstream.h></filename> belongs
10036 * to the UNIX-specific GIO interfaces, thus you have to use the
10037 * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
10044 * Zlib decompression
10049 * g_dbus_server_get_guid:
10050 * @server: A #GDBusServer.
10052 * Gets the GUID for @server.
10054 * Returns: A D-Bus GUID. Do not free this string, it is owned by @server.
10060 * g_file_get_basename:
10061 * @file: input #GFile.
10063 * Gets the base name (the last component of the path) for a given #GFile.
10064 * If called for the top level of a system (such as the filesystem root
10065 * or a uri like sftp://host/) it will return a single directory separator
10066 * (and on Windows, possibly a drive letter).
10067 * The base name is a byte string (*not* UTF-8). It has no defined encoding
10068 * or rules other than it may not contain zero bytes. If you want to use
10069 * filenames in a user interface you should use the display name that you
10070 * can get by requesting the %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME
10071 * attribute with g_file_query_info().
10072 * This call does no blocking i/o.
10073 * if given #GFile is invalid. The returned string should be
10074 * freed with g_free() when no longer needed.
10076 * Returns: string containing the #GFile's base name, or %NULL
10081 * g_volume_get_drive:
10082 * @volume: a #GVolume.
10084 * Gets the drive for the @volume.
10085 * The returned object should be unreffed with g_object_unref()
10086 * when no longer needed.
10088 * Returns: (transfer full): a #GDrive or %NULL if @volume is not associated with a drive.
10093 * GUnixMountMonitor::mountpoints-changed:
10094 * @monitor: the object on which the signal is emitted
10096 * Emitted when the unix mount points have changed.
10101 * GDBusProxy:g-interface-name:
10103 * The D-Bus interface name the proxy is for.
10110 * g_icon_to_string:
10113 * Generates a textual representation of @icon that can be used for
10114 * serialization such as when passing @icon to a different process or
10115 * saving it to persistent storage. Use g_icon_new_for_string() to
10116 * get @icon back from the returned string.
10117 * The encoding of the returned string is proprietary to #GIcon except
10118 * in the following two cases
10121 * If @icon is a #GFileIcon, the returned string is a native path
10122 * (such as <literal>/path/to/my icon.png</literal>) without escaping
10123 * if the #GFile for @icon is a native file. If the file is not
10124 * native, the returned string is the result of g_file_get_uri()
10125 * (such as <literal>sftp://path/to/my%%20icon.png</literal>).
10126 * </para></listitem>
10128 * If @icon is a #GThemedIcon with exactly one name, the encoding is
10129 * simply the name (such as <literal>network-server</literal>).
10130 * </para></listitem>
10132 * be serialized. Use g_free() to free.
10134 * Virtual: to_tokens
10135 * Returns: An allocated NUL-terminated UTF8 string or %NULL if @icon can't
10141 * g_dbus_connection_unregister_subtree:
10142 * @connection: A #GDBusConnection.
10143 * @registration_id: A subtree registration id obtained from g_dbus_connection_register_subtree().
10145 * Unregisters a subtree.
10147 * Returns: %TRUE if the subtree was unregistered, %FALSE otherwise.
10153 * g_socket_listener_accept_socket_finish:
10154 * @listener: a #GSocketListener
10155 * @result: a #GAsyncResult.
10156 * @source_object: Optional #GObject identifying this source
10157 * @error: a #GError location to store the error occuring, or %NULL to ignore.
10159 * Finishes an async accept operation. See g_socket_listener_accept_socket_async()
10161 * Returns: (transfer full): a #GSocket on success, %NULL on error.
10167 * g_io_extension_point_get_required_type:
10168 * @extension_point: a #GIOExtensionPoint
10170 * Gets the required type for @extension_point.
10171 * or #G_TYPE_INVALID if the extension point has no required type
10173 * Returns: the #GType that all implementations must have,
10178 * GDBusProxy:g-default-timeout:
10180 * The timeout to use if -1 (specifying default timeout) is passed
10181 * as @timeout_msec in the g_dbus_proxy_call() and
10182 * g_dbus_proxy_call_sync() functions.
10183 * This allows applications to set a proxy-wide timeout for all
10184 * remote method invocations on the proxy. If this property is -1,
10185 * the default timeout (typically 25 seconds) is used. If set to
10186 * %G_MAXINT, then no timeout is used.
10193 * g_file_info_set_attribute_uint64:
10194 * @info: a #GFileInfo.
10195 * @attribute: a file attribute key.
10196 * @attr_value: an unsigned 64-bit integer.
10198 * Sets the @attribute to contain the given @attr_value,
10204 * g_socket_get_timeout:
10205 * @socket: a #GSocket.
10207 * Gets the timeout setting of the socket. For details on this, see
10208 * g_socket_set_timeout().
10210 * Returns: the timeout in seconds
10216 * g_dbus_connection_set_exit_on_close:
10217 * @connection: A #GDBusConnection.
10218 * @exit_on_close: Whether the process should be terminated when @connection is closed by the remote peer.
10220 * Sets whether the process should be terminated when @connection is
10221 * closed by the remote peer. See #GDBusConnection:exit-on-close for
10229 * SECTION:gsimpleasyncresul:
10230 * @short_description: Simple asynchronous results implementation
10231 * @include: gio/gio.h
10232 * @see_also: #GAsyncResult
10234 * Implements #GAsyncResult for simple cases. Most of the time, this
10235 * will be all an application needs, and will be used transparently.
10236 * Because of this, #GSimpleAsyncResult is used throughout GIO for
10237 * handling asynchronous functions.
10238 * GSimpleAsyncResult handles #GAsyncReadyCallback<!-- -->s, error
10239 * reporting, operation cancellation and the final state of an operation,
10240 * completely transparent to the application. Results can be returned
10241 * as a pointer e.g. for functions that return data that is collected
10242 * asynchronously, a boolean value for checking the success or failure
10243 * of an operation, or a #gssize for operations which return the number
10244 * of bytes modified by the operation; all of the simple return cases
10246 * Most of the time, an application will not need to know of the details
10247 * of this API; it is handled transparently, and any necessary operations
10248 * are handled by #GAsyncResult's interface. However, if implementing a
10249 * new GIO module, for writing language bindings, or for complex
10250 * applications that need better control of how asynchronous operations
10251 * are completed, it is important to understand this functionality.
10252 * GSimpleAsyncResults are tagged with the calling function to ensure
10253 * that asynchronous functions and their finishing functions are used
10254 * together correctly.
10255 * To create a new #GSimpleAsyncResult, call g_simple_async_result_new().
10256 * If the result needs to be created for a #GError, use
10257 * g_simple_async_result_new_from_error() or
10258 * g_simple_async_result_new_take_error(). If a #GError is not available
10259 * (e.g. the asynchronous operation's doesn't take a #GError argument),
10260 * but the result still needs to be created for an error condition, use
10261 * g_simple_async_result_new_error() (or g_simple_async_result_set_error_va()
10262 * if your application or binding requires passing a variable argument list
10263 * directly), and the error can then be propagated through the use of
10264 * g_simple_async_result_propagate_error().
10265 * An asynchronous operation can be made to ignore a cancellation event by
10266 * calling g_simple_async_result_set_handle_cancellation() with a
10267 * #GSimpleAsyncResult for the operation and %FALSE. This is useful for
10268 * operations that are dangerous to cancel, such as close (which would
10269 * cause a leak if cancelled before being run).
10270 * GSimpleAsyncResult can integrate into GLib's event loop, #GMainLoop,
10271 * or it can use #GThread<!-- -->s if available.
10272 * g_simple_async_result_complete() will finish an I/O task directly
10273 * from the point where it is called. g_simple_async_result_complete_in_idle()
10274 * will finish it from an idle handler in the <link
10275 * linkend="g-main-context-push-thread-default">thread-default main
10276 * context</link>. g_simple_async_result_run_in_thread() will run the
10277 * job in a separate thread and then deliver the result to the
10278 * thread-default main context.
10279 * To set the results of an asynchronous function,
10280 * g_simple_async_result_set_op_res_gpointer(),
10281 * g_simple_async_result_set_op_res_gboolean(), and
10282 * g_simple_async_result_set_op_res_gssize()
10283 * are provided, setting the operation's result to a gpointer, gboolean, or
10284 * gssize, respectively.
10285 * Likewise, to get the result of an asynchronous function,
10286 * g_simple_async_result_get_op_res_gpointer(),
10287 * g_simple_async_result_get_op_res_gboolean(), and
10288 * g_simple_async_result_get_op_res_gssize() are
10289 * provided, getting the operation's result as a gpointer, gboolean, and
10290 * gssize, respectively.
10291 * For the details of the requirements implementations must respect, see
10292 * #GAsyncResult. A typical implementation of an asynchronous operation
10293 * using GSimpleAsyncResult looks something like this:
10296 * baked_cb (Cake *cake,
10297 * gpointer user_data)
10299 * /* In this example, this callback is not given a reference to the cake, so
10300 * * the GSimpleAsyncResult has to take a reference to it.
10302 * GSimpleAsyncResult *result = user_data;
10303 * if (cake == NULL)
10304 * g_simple_async_result_set_error (result,
10306 * BAKER_ERROR_NO_FLOUR,
10307 * "Go to the supermarket");
10309 * g_simple_async_result_set_op_res_gpointer (result,
10310 * g_object_ref (cake),
10312 * /* In this example, we assume that baked_cb is called as a callback from
10313 * * the mainloop, so it's safe to complete the operation synchronously here.
10314 * * If, however, _baker_prepare_cake () might call its callback without
10315 * * first returning to the mainloop — inadvisable, but some APIs do so —
10316 * * we would need to use g_simple_async_result_complete_in_idle().
10318 * g_simple_async_result_complete (result);
10319 * g_object_unref (result);
10322 * baker_bake_cake_async (Baker *self,
10324 * GAsyncReadyCallback callback,
10325 * gpointer user_data)
10327 * GSimpleAsyncResult *simple;
10331 * g_simple_async_report_error_in_idle (G_OBJECT (self),
10335 * BAKER_ERROR_TOO_SMALL,
10336 * "%ucm radius cakes are silly",
10340 * simple = g_simple_async_result_new (G_OBJECT (self),
10343 * baker_bake_cake_async);
10344 * cake = _baker_get_cached_cake (self, radius);
10345 * if (cake != NULL)
10347 * g_simple_async_result_set_op_res_gpointer (simple,
10348 * g_object_ref (cake),
10350 * g_simple_async_result_complete_in_idle (simple);
10351 * g_object_unref (simple);
10352 * /* Drop the reference returned by _baker_get_cached_cake(); the
10353 * * GSimpleAsyncResult has taken its own reference.
10355 * g_object_unref (cake);
10358 * _baker_prepare_cake (self, radius, baked_cb, user_data);
10361 * baker_bake_cake_finish (Baker *self,
10362 * GAsyncResult *result,
10365 * GSimpleAsyncResult *simple;
10367 * g_return_val_if_fail (g_simple_async_result_is_valid (result,
10369 * baker_bake_cake_async),
10371 * simple = (GSimpleAsyncResult *) result;
10372 * if (g_simple_async_result_propagate_error (simple, error))
10374 * cake = CAKE (g_simple_async_result_get_op_res_gpointer (simple));
10375 * return g_object_ref (cake);
10382 * g_async_initable_init_finish:
10383 * @initable: a #GAsyncInitable.
10384 * @res: a #GAsyncResult.
10385 * @error: a #GError location to store the error occuring, or %NULL to ignore.
10387 * Finishes asynchronous initialization and returns the result.
10388 * See g_async_initable_init_async().
10389 * will return %FALSE and set @error appropriately if present.
10391 * Returns: %TRUE if successful. If an error has occurred, this function
10397 * g_input_stream_skip_async:
10398 * @stream: A #GInputStream.
10399 * @count: the number of bytes that will be skipped from the stream
10400 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
10401 * @cancellable: optional #GCancellable object, %NULL to ignore.
10402 * @callback: callback to call when the request is satisfied
10403 * @user_data: the data to pass to callback function
10405 * Request an asynchronous skip of @count bytes from the stream.
10406 * When the operation is finished @callback will be called.
10407 * You can then call g_input_stream_skip_finish() to get the result
10408 * of the operation.
10409 * During an async request no other sync and async calls are allowed,
10410 * and will result in %G_IO_ERROR_PENDING errors.
10411 * A value of @count larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
10412 * On success, the number of bytes skipped will be passed to the callback.
10413 * It is not an error if this is not the same as the requested size, as it
10414 * can happen e.g. near the end of a file, but generally we try to skip
10415 * as many bytes as requested. Zero is returned on end of file
10416 * (or if @count is zero), but never otherwise.
10417 * Any outstanding i/o request with higher priority (lower numerical value)
10418 * will be executed before an outstanding request with lower priority.
10419 * Default priority is %G_PRIORITY_DEFAULT.
10420 * The asynchronous methods have a default fallback that uses threads to
10421 * implement asynchronicity, so they are optional for inheriting classes.
10422 * However, if you override one, you must override all.
10427 * g_mount_guess_content_type_finish:
10428 * @mount: a #GMount
10429 * @result: a #GAsyncResult
10430 * @error: a #GError location to store the error occuring, or %NULL to ignore
10432 * Finishes guessing content types of @mount. If any errors occured
10433 * during the operation, @error will be set to contain the errors and
10434 * %FALSE will be returned. In particular, you may get an
10435 * %G_IO_ERROR_NOT_SUPPORTED if the mount does not support content
10437 * Caller should free this array with g_strfreev() when done with it.
10439 * Returns: (transfer full) (element-type utf8): a %NULL-terminated array of content types or %NULL on error.
10445 * g_cancellable_push_current:
10446 * @cancellable: a #GCancellable object
10448 * Pushes @cancellable onto the cancellable stack. The current
10449 * cancllable can then be recieved using g_cancellable_get_current().
10450 * This is useful when implementing cancellable operations in
10451 * code that does not allow you to pass down the cancellable object.
10452 * This is typically called automatically by e.g. #GFile operations,
10453 * so you rarely have to call this yourself.
10458 * g_file_query_exists:
10459 * @file: input #GFile.
10460 * @cancellable: optional #GCancellable object, %NULL to ignore.
10462 * Utility function to check if a particular file exists. This is
10463 * implemented using g_file_query_info() and as such does blocking I/O.
10464 * Note that in many cases it is racy to first check for file existence
10465 * and then execute something based on the outcome of that, because the
10466 * file might have been created or removed in between the operations. The
10467 * general approach to handling that is to not check, but just do the
10468 * operation and handle the errors as they come.
10469 * As an example of race-free checking, take the case of reading a file, and
10470 * can both result in two processes creating the file (with perhaps a partially
10471 * written file as the result). The correct approach is to always try to create
10472 * the file with g_file_create() which will either atomically create the file
10473 * or fail with a G_IO_ERROR_EXISTS error.
10474 * However, in many cases an existence check is useful in a user
10475 * interface, for instance to make a menu item sensitive/insensitive, so that
10476 * you don't have to fool users that something is possible and then just show
10477 * and error dialog. If you do this, you should make sure to also handle the
10478 * errors that can happen due to races when you execute the operation.
10480 * If it doesn't exist, creating it. there are two racy versions: read it, and
10481 * On error create it; and: check if it exists, if not create it. These
10482 * Returns: %TRUE if the file exists (and can be detected without error), %FALSE otherwise (or if cancelled).
10487 * g_inet_address_get_is_any:
10488 * @address: a #GInetAddress
10490 * Tests whether @address is the "any" address for its family.
10492 * Returns: %TRUE if @address is the "any" address for its family.
10498 * g_unix_socket_address_get_path:
10499 * @address: a #GInetSocketAddress
10501 * Gets @address's path, or for abstract sockets the "name".
10502 * Guaranteed to be zero-terminated, but an abstract socket
10503 * may contain embedded zeros, and thus you should use
10504 * g_unix_socket_address_get_path_len() to get the true length
10507 * Returns: the path for @address
10513 * SECTION:gdbusserve:
10514 * @short_description: Helper for accepting connections
10515 * @include: gio/gio.h
10517 * #GDBusServer is a helper for listening to and accepting D-Bus
10519 * <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>
10524 * SECTION:gdbusmessag:
10525 * @short_description: D-Bus Message
10526 * @include: gio/gio.h
10528 * A type for representing D-Bus messages that can be sent or received
10529 * on a #GDBusConnection.
10534 * g_inet_address_get_is_mc_link_local:
10535 * @address: a #GInetAddress
10537 * Tests whether @address is a link-local multicast address.
10539 * Returns: %TRUE if @address is a link-local multicast address.
10547 * The #GDBusMessage structure contains only private data and should
10548 * only be accessed using the provided API.
10555 * g_file_enumerator_close_async:
10556 * @enumerator: a #GFileEnumerator.
10557 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
10558 * @cancellable: optional #GCancellable object, %NULL to ignore.
10559 * @callback: a #GAsyncReadyCallback to call when the request is satisfied
10560 * @user_data: the data to pass to callback function
10562 * Asynchronously closes the file enumerator.
10563 * If @cancellable is not %NULL, then the operation can be cancelled by
10564 * triggering the cancellable object from another thread. If the operation
10565 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned in
10566 * g_file_enumerator_close_finish().
10571 * SECTION:gactiongrou:
10572 * @title: GActionGroup
10573 * @short_description: a group of actions
10575 * #GActionGroup represents a group of actions.
10576 * Each action in the group has a unique name (which is a string). All
10577 * method calls, except g_action_group_list_actions() take the name of
10578 * an action as an argument.
10579 * The #GActionGroup API is meant to be the 'public' API to the action
10580 * group. The calls here are exactly the interaction that 'external
10581 * the action group implementation) are found on subclasses. This is
10582 * why you will find -- for example -- g_action_group_get_enabled() but
10583 * not an equivalent <function>set()</function> call.
10584 * Signals are emitted on the action group in response to state changes
10585 * on individual actions.
10587 * Forces' (eg: UI, incoming D-Bus messages, etc.) are supposed to have
10588 * With actions. 'internal' apis (ie: ones meant only to be accessed by
10593 * GUnixOutputStream:close-fd:
10595 * Whether to close the file descriptor when the stream is closed.
10603 * @appinfo: a #GAppInfo.
10605 * Creates a duplicate of a #GAppInfo.
10607 * Returns: (transfer full): a duplicate of @appinfo.
10612 * g_srv_target_copy:
10613 * @target: a #GSrvTarget
10617 * Returns: a copy of @target
10623 * g_app_launch_context_get_display:
10624 * @context: a #GAppLaunchContext
10625 * @info: a #GAppInfo
10626 * @files: (element-type GFile): a #GList of #GFile objects
10628 * Gets the display string for the @context. This is used to ensure new
10629 * applications are started on the same display as the launching
10630 * application, by setting the <envvar>DISPLAY</envvar> environment variable.
10632 * Returns: a display string for the display.
10637 * g_desktop_app_info_get_is_hidden:
10638 * @info: a #GDesktopAppInfo.
10640 * A desktop file is hidden if the Hidden key in it is
10643 * Returns: %TRUE if hidden, %FALSE otherwise.
10648 * SECTION:gperiodi:
10649 * @title: GPeriodic
10650 * @short_description: a periodic event clock
10652 * #GPeriodic is a periodic event clock that fires a configurable number
10653 * of times per second and is capable of being put into synch with an
10654 * external time source.
10655 * A number of #GPeriodicTickFunc<!-- -->s are registered with
10656 * g_periodic_add() and are called each time the clock "ticks".
10657 * performed) that are handled in a "repair" phase that follows all the
10658 * tick functions having been run. It is also possible to report damage
10659 * while the clock is not running, in which case the rate of repairs
10660 * will be rate limited as if the clock were running.
10661 * #GPeriodic has a configurable priority range consisting of a high and
10662 * low value. Other sources with a priority higher than the high value
10663 * might starve #GPeriodic and sources with the priority lower than the
10664 * low value may be starved by #GPeriodic.
10665 * #GPeriodic will engage in dynamic scheduling with respect to sources
10666 * that have their priorities within the high to low range. A given
10667 * #GPeriodic will ensure that the events dispatched from itself are
10668 * generally using less than 50% of the CPU (on average) if other tasks
10669 * are pending. If no other sources within the range are pending then
10670 * #GPeriodic will use up to all of the available CPU (which can lead to
10671 * starvation of lower-priority sources, as mentioned above). The 50%
10672 * figure is entirely arbitrary and may change or become configurable in
10674 * For example, if a #GPeriodic has been set to run at 10Hz and a
10675 * particular iteration uses 140ms of time, then 2 ticks will be
10676 * "skipped" to give other sources a chance to run (ie: the next tick
10677 * will occur 300ms later rather than 100ms later, giving 160ms of time
10678 * for other sources).
10679 * This means that the high priority value for #GPeriodic should be set
10680 * quite high (above anything else) and the low priority value for
10681 * #GPeriodic should be set lower than everything except true "idle"
10683 * #GPeriodic generally assumes that although the things attached to it
10684 * may be poorly behaved in terms of non-yielding behaviour (either
10685 * individually or in aggregate), the other sources on the main loop
10686 * should be "well behaved". Other sources should try not to block the
10687 * CPU for a substantial portion of the periodic interval.
10688 * The sources attached to a #GPeriodic are permitted to be somewhat
10689 * less well-behaved because they are generally rendering the UI for the
10690 * user (which should be done smoothly) and also because they will be
10691 * throttled by #GPeriodic.
10692 * #GPeriodic is intended to be used as a paint clock for managing
10693 * geometry updates and painting of windows.
10695 * The tick functions can report "damage" (ie: updates that need to be
10696 * Handlers (ie: things that you want to run only when the program is
10702 * g_socket_send_message:
10703 * @socket: a #GSocket
10704 * @address: a #GSocketAddress, or %NULL
10705 * @vectors: an array of #GOutputVector structs
10706 * @num_vectors: the number of elements in @vectors, or -1
10707 * @messages: a pointer to an array of #GSocketControlMessages, or %NULL.
10708 * @num_messages: number of elements in @messages, or -1.
10709 * @flags: an int containing #GSocketMsgFlags flags
10710 * @cancellable: a %GCancellable or %NULL
10711 * @error: #GError for error reporting, or %NULL to ignore.
10713 * Send data to @address on @socket. This is the most complicated and
10714 * fully-featured version of this call. For easier use, see
10715 * g_socket_send() and g_socket_send_to().
10716 * If @address is %NULL then the message is sent to the default receiver
10717 * (set by g_socket_connect()).
10718 * then @vectors is assumed to be terminated by a #GOutputVector with a
10719 * %NULL buffer pointer.) The #GOutputVector structs describe the buffers
10720 * that the sent data will be gathered from. Using multiple
10721 * #GOutputVector<!-- -->s is more memory-efficient than manually copying
10722 * data from multiple sources into a single buffer, and more
10723 * network-efficient than making multiple calls to g_socket_send().
10724 * #GSocketControlMessage instances. These correspond to the control
10725 * messages to be sent on the socket.
10726 * If @num_messages is -1 then @messages is treated as a %NULL-terminated
10728 * for this are available in the #GSocketMsgFlags enum, but the
10729 * values there are the same as the system values, and the flags
10730 * are passed in as-is, so you can pass in system-specific flags too.
10731 * If the socket is in blocking mode the call will block until there is
10732 * space for the data in the socket queue. If there is no space available
10733 * and the socket is in non-blocking mode a %G_IO_ERROR_WOULD_BLOCK error
10734 * will be returned. To be notified when space is available, wait for the
10735 * %G_IO_OUT condition. Note though that you may still receive
10736 * %G_IO_ERROR_WOULD_BLOCK from g_socket_send() even if you were previously
10737 * notified of a %G_IO_OUT condition. (On Windows in particular, this is
10738 * very common due to the way the underlying APIs work.)
10739 * On error -1 is returned and @error is set accordingly.
10742 * Returns: Number of bytes written (which may be less than @size), or -1
10748 * g_permission_release:
10749 * @permission: a #GPermission instance
10750 * @cancellable: a #GCancellable, or %NULL
10751 * @error: a pointer to a %NULL #GError, or %NULL
10752 * @returns: %TRUE if the permission was successfully released
10754 * Attempts to release the permission represented by @permission.
10755 * The precise method by which this happens depends on the permission
10756 * and the underlying authentication mechanism. In most cases the
10757 * permission will be dropped immediately without further action.
10758 * You should check with g_permission_get_can_release() before calling
10760 * If the permission is released then %TRUE is returned. Otherwise,
10761 * %FALSE is returned and @error is set appropriately.
10762 * This call is blocking, likely for a very long time (in the case that
10763 * user interaction is required). See g_permission_release_async() for
10764 * the non-blocking version.
10771 * GSettings::change-event:
10772 * @settings: the object on which the signal was emitted
10773 * @keys: an array of #GQuark<!-- -->s for the changed keys, or %NULL
10774 * @n_keys: the length of the @keys array, or 0
10775 * @returns: %TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.
10777 * The "change-event" signal is emitted once per change event that
10778 * affects this settings object. You should connect to this signal
10779 * only if you are interested in viewing groups of changes before they
10780 * are split out into multiple emissions of the "changed" signal.
10781 * For most use cases it is more appropriate to use the "changed" signal.
10782 * In the event that the change event applies to one or more specified
10783 * keys, @keys will be an array of #GQuark of length @n_keys. In the
10784 * event that the change event applies to the #GSettings object as a
10785 * be %NULL and @n_keys will be 0.
10786 * The default handler for this signal invokes the "changed" signal
10787 * for each affected key. If any other connected handler returns
10788 * %TRUE then this default functionality will be supressed.
10790 * Whole (ie: potentially every key has been changed) then @keys will
10795 * GInetAddress:is-mc-org-local:
10797 * Whether this is an organization-local multicast address.
10798 * See g_inet_address_get_is_mc_org_local().
10805 * g_file_start_mountable_finish:
10806 * @file: input #GFile.
10807 * @result: a #GAsyncResult.
10808 * @error: a #GError, or %NULL
10810 * Finishes a start operation. See g_file_start_mountable() for details.
10811 * Finish an asynchronous start operation that was started
10812 * with g_file_start_mountable().
10815 * Returns: %TRUE if the operation finished successfully. %FALSE
10821 * g_input_stream_read_async:
10822 * @stream: A #GInputStream.
10823 * @buffer: a buffer to read data into (which should be at least count bytes long).
10824 * @count: the number of bytes that will be read from the stream
10825 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
10826 * @cancellable: optional #GCancellable object, %NULL to ignore.
10827 * @callback: callback to call when the request is satisfied
10828 * @user_data: the data to pass to callback function
10830 * Request an asynchronous read of @count bytes from the stream into the buffer
10831 * starting at @buffer. When the operation is finished @callback will be called.
10832 * You can then call g_input_stream_read_finish() to get the result of the
10834 * During an async request no other sync and async calls are allowed on @stream, and will
10835 * result in %G_IO_ERROR_PENDING errors.
10836 * A value of @count larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
10837 * On success, the number of bytes read into the buffer will be passed to the
10838 * callback. It is not an error if this is not the same as the requested size, as it
10839 * can happen e.g. near the end of a file, but generally we try to read
10840 * as many bytes as requested. Zero is returned on end of file
10841 * (or if @count is zero), but never otherwise.
10842 * Any outstanding i/o request with higher priority (lower numerical value) will
10843 * be executed before an outstanding request with lower priority. Default
10844 * priority is %G_PRIORITY_DEFAULT.
10845 * The asyncronous methods have a default fallback that uses threads to implement
10846 * asynchronicity, so they are optional for inheriting classes. However, if you
10847 * override one you must override all.
10852 * g_data_input_stream_new:
10853 * @base_stream: a #GInputStream.
10855 * Creates a new data input stream for the @base_stream.
10857 * Returns: a new #GDataInputStream.
10863 * @file: input #GFile.
10865 * Gets the URI for the @file.
10866 * This call does no blocking i/o.
10867 * The returned string should be freed with g_free() when no longer needed.
10869 * Returns: a string containing the #GFile's URI.
10874 * g_mount_get_volume:
10875 * @mount: a #GMount.
10877 * Gets the volume for the @mount.
10878 * The returned object should be unreffed with
10879 * g_object_unref() when no longer needed.
10881 * Returns: (transfer full): a #GVolume or %NULL if @mount is not associated with a volume.
10886 * g_buffered_input_stream_get_available:
10887 * @stream: #GBufferedInputStream
10889 * Gets the size of the available data within the stream.
10891 * Returns: size of the available stream.
10896 * g_settings_reset:
10897 * @settings: a #GSettings object
10898 * @key: the name of a key
10900 * Resets @key to its default value.
10901 * This call resets the key, as much as possible, to its default value.
10902 * That might the value specified in the schema or the one set by the
10908 * SECTION:gdbusaddres:
10909 * @title: D-Bus Addresses
10910 * @short_description: D-Bus connection endpoints
10911 * @include: gio/gio.h
10913 * Routines for working with D-Bus addresses. A D-Bus address is a string
10914 * like "unix:tmpdir=/tmp/my-app-name". The exact format of addresses
10915 * is explained in detail in the <link linkend="http://dbus.freedesktop.org/doc/dbus-specification.html#addresses">D-Bus specification</link>.
10920 * g_volume_eject_finish:
10921 * @volume: pointer to a #GVolume.
10922 * @result: a #GAsyncResult.
10923 * @error: a #GError location to store an error, or %NULL to ignore
10925 * Finishes ejecting a volume. If any errors occured during the operation,
10927 * Returns: %TRUE, %FALSE if operation failed.
10928 * Deprecated: 2.22: Use g_volume_eject_with_operation_finish() instead.
10934 * @volume: a #GVolume.
10935 * @flags: flags affecting the operation
10936 * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
10937 * @cancellable: optional #GCancellable object, %NULL to ignore.
10938 * @callback: a #GAsyncReadyCallback, or %NULL.
10939 * @user_data: user data that gets passed to @callback
10941 * Mounts a volume. This is an asynchronous operation, and is
10942 * finished by calling g_volume_mount_finish() with the @volume
10943 * and #GAsyncResult returned in the @callback.
10945 * Virtual: mount_fn
10950 * g_unix_mount_points_changed_since:
10951 * @time: guint64 to contain a timestamp.
10953 * Checks if the unix mount points have changed since a given unix time.
10955 * Returns: %TRUE if the mount points have changed since @time.
10960 * SECTION:gdbusauthobserve:
10961 * @short_description: Object used for authenticating connections
10962 * @include: gio/gio.h
10964 * The #GDBusAuthObserver type provides a mechanism for participating
10965 * in how a #GDBusServer (or a #GDBusConnection) authenticates remote
10966 * peers. Simply instantiate a #GDBusAuthObserver and connect to the
10967 * signals you are interested in. Note that new signals may be added
10969 * For example, if you only want to allow D-Bus connections from
10970 * processes owned by the same uid as the server, you would use a
10971 * signal handler like the following:
10972 * <example id="auth-observer"><title>Controlling Authentication</title><programlisting>
10974 * on_authorize_authenticated_peer (GDBusAuthObserver *observer,
10975 * GIOStream *stream,
10976 * GCredentials *credentials,
10977 * gpointer user_data)
10979 * gboolean authorized;
10980 * authorized = FALSE;
10981 * if (credentials != NULL)
10983 * GCredentials *own_credentials;
10984 * own_credentials = g_credentials_new ();
10985 * if (g_credentials_is_same_user (credentials, own_credentials, NULL))
10986 * authorized = TRUE;
10987 * g_object_unref (own_credentials);
10989 * return authorized;
10991 * </programlisting></example>
10996 * g_settings_set_string:
10997 * @settings: a #GSettings object
10998 * @key: the name of the key to set
10999 * @value: the value to set it to
11000 * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
11002 * Sets @key in @settings to @value.
11003 * A convenience variant of g_settings_set() for strings.
11004 * It is a programmer error to give a @key that isn't specified as
11005 * having a string type in the schema for @settings.
11012 * g_mount_unmount_finish:
11013 * @mount: a #GMount.
11014 * @result: a #GAsyncResult.
11015 * @error: a #GError location to store the error occuring, or %NULL to ignore.
11017 * Finishes unmounting a mount. If any errors occurred during the operation,
11019 * Returns: %TRUE if the mount was successfully unmounted. %FALSE otherwise.
11020 * Deprecated: 2.22: Use g_mount_unmount_with_operation_finish() instead.
11025 * g_buffered_output_stream_get_buffer_size:
11026 * @stream: a #GBufferedOutputStream.
11028 * Gets the size of the buffer in the @stream.
11030 * Returns: the current size of the buffer.
11035 * g_action_group_list_actions:
11036 * @action_group: a #GActionGroup
11038 * Lists the actions contained within @action_group.
11039 * The caller is responsible for freeing the list with g_strfreev() when
11040 * it is no longer required.
11041 * actions in the groupb
11043 * Returns: (transfer full): a %NULL-terminated array of the names of the
11049 * g_dbus_method_invocation_return_error_literal:
11050 * @invocation: A #GDBusMethodInvocation.
11051 * @domain: A #GQuark for the #GError error domain.
11052 * @code: The error code.
11053 * @message: The error message.
11055 * Like g_dbus_method_invocation_return_error() but without printf()-style formatting.
11056 * This method will free @invocation, you cannot use it afterwards.
11063 * g_dbus_message_get_serial:
11064 * @message: A #GDBusMessage.
11066 * Gets the serial for @message.
11068 * Returns: A #guint32.
11074 * g_file_attribute_matcher_ref:
11075 * @matcher: a #GFileAttributeMatcher.
11077 * References a file attribute matcher.
11079 * Returns: a #GFileAttributeMatcher.
11086 * Creates a new file info structure.
11088 * Returns: a #GFileInfo.
11093 * g_unix_output_stream_new:
11094 * @fd: a UNIX file descriptor
11095 * @close_fd: %TRUE to close the file descriptor when done
11097 * Creates a new #GUnixOutputStream for the given @fd.
11098 * If @close_fd, is %TRUE, the file descriptor will be closed when
11099 * the output stream is destroyed.
11101 * Returns: a new #GOutputStream
11106 * g_input_stream_close:
11107 * @stream: A #GInputStream.
11108 * @cancellable: optional #GCancellable object, %NULL to ignore.
11109 * @error: location to store the error occuring, or %NULL to ignore
11111 * Closes the stream, releasing resources related to it.
11112 * Once the stream is closed, all other operations will return %G_IO_ERROR_CLOSED.
11113 * Closing a stream multiple times will not return an error.
11114 * Streams will be automatically closed when the last reference
11115 * is dropped, but you might want to call this function to make sure
11116 * resources are released as early as possible.
11117 * Some streams might keep the backing store of the stream (e.g. a file descriptor)
11118 * open after the stream is closed. See the documentation for the individual
11119 * stream for details.
11120 * On failure the first error that happened will be reported, but the close
11121 * operation will finish as much as possible. A stream that failed to
11122 * close will still return %G_IO_ERROR_CLOSED for all operations. Still, it
11123 * is important to check and report the error to the user.
11124 * If @cancellable is not NULL, then the operation can be cancelled by
11125 * triggering the cancellable object from another thread. If the operation
11126 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
11127 * Cancelling a close will still leave the stream closed, but some streams
11128 * can use a faster close that doesn't block to e.g. check errors.
11130 * Returns: %TRUE on success, %FALSE on failure
11135 * g_dbus_annotation_info_lookup:
11136 * @annotations: A %NULL-terminated array of annotations or %NULL.
11137 * @name: The name of the annotation to look up.
11139 * Looks up the value of an annotation.
11140 * This cost of this function is O(n) in number of annotations.
11142 * Returns: The value or %NULL if not found. Do not free, it is owned by @annotations.
11148 * g_file_set_display_name_async:
11149 * @file: input #GFile.
11150 * @display_name: a string.
11151 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
11152 * @cancellable: optional #GCancellable object, %NULL to ignore.
11153 * @callback: a #GAsyncReadyCallback to call when the request is satisfied
11154 * @user_data: the data to pass to callback function
11156 * Asynchronously sets the display name for a given #GFile.
11157 * For more details, see g_file_set_display_name() which is
11158 * the synchronous version of this call.
11159 * When the operation is finished, @callback will be called. You can then call
11160 * g_file_set_display_name_finish() to get the result of the operation.
11165 * g_socket_listener_accept_finish:
11166 * @listener: a #GSocketListener
11167 * @result: a #GAsyncResult.
11168 * @source_object: Optional #GObject identifying this source
11169 * @error: a #GError location to store the error occuring, or %NULL to ignore.
11171 * Finishes an async accept operation. See g_socket_listener_accept_async()
11173 * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
11179 * GSimpleAction:parameter-type:
11181 * The type of the parameter that must be given when activating the
11189 * g_proxy_supports_hostname:
11190 * @proxy: a #GProxy
11192 * Some proxy protocols expect to be passed a hostname, which they
11193 * will resolve to an IP address themselves. Others, like SOCKS4, do
11194 * not allow this. This function will return %FALSE if @proxy is
11195 * implementing such a protocol. When %FALSE is returned, the caller
11196 * should resolve the destination hostname first, and then pass a
11197 * #GProxyAddress containing the stringified IP address to
11198 * g_proxy_connect() or g_proxy_connect_async().
11200 * Returns: %TRUE if hostname resolution is supported.
11206 * g_file_info_get_attribute_uint64:
11207 * @info: a #GFileInfo.
11208 * @attribute: a file attribute key.
11210 * Gets a unsigned 64-bit integer contained within the attribute. If the
11211 * attribute does not contain an unsigned 64-bit integer, or is invalid,
11212 * 0 will be returned.
11214 * Returns: a unsigned 64-bit integer from the attribute.
11219 * g_dbus_message_get_sender:
11220 * @message: A #GDBusMessage.
11222 * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_SENDER header field.
11224 * Returns: The value.
11230 * g_mount_operation_set_username:
11231 * @op: a #GMountOperation.
11232 * @username: input username.
11234 * Sets the user name within @op to @username.
11239 * GDBusProxy:g-name:
11241 * The well-known or unique name that the proxy is for.
11249 * @mount: A #GMount.
11251 * Increments the shadow count on @mount. Usually used by
11252 * #GVolumeMonitor implementations when creating a shadow mount for
11253 * will need to emit the #GMount::changed signal on @mount manually.
11260 * g_file_query_filesystem_info_async:
11261 * @file: input #GFile.
11262 * @attributes: an attribute query string.
11263 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
11264 * @cancellable: optional #GCancellable object, %NULL to ignore.
11265 * @callback: a #GAsyncReadyCallback to call when the request is satisfied
11266 * @user_data: the data to pass to callback function
11268 * Asynchronously gets the requested information about the filesystem
11269 * that the specified @file is on. The result is a #GFileInfo object
11270 * that contains key-value attributes (such as type or size for the
11272 * For more details, see g_file_query_filesystem_info() which is the
11273 * synchronous version of this call.
11274 * When the operation is finished, @callback will be called. You can
11275 * then call g_file_query_info_finish() to get the result of the
11281 * g_file_attribute_info_list_add:
11282 * @list: a #GFileAttributeInfoList.
11283 * @name: the name of the attribute to add.
11284 * @type: the #GFileAttributeType for the attribute.
11285 * @flags: #GFileAttributeInfoFlags for the attribute.
11287 * Adds a new attribute with @name to the @list, setting
11288 * its @type and @flags.
11293 * GUnixInputStream:close-fd:
11295 * Whether to close the file descriptor when the stream is closed.
11302 * g_content_type_from_mime_type:
11303 * @mime_type: a mime type string
11305 * Tries to find a content type based on the mime type name.
11306 * or %NULL. Free with g_free()
11308 * Returns: (allow-none): Newly allocated string with content type
11314 * g_srv_target_get_port:
11315 * @target: a #GSrvTarget
11317 * Gets @target's port
11319 * Returns: @target's port
11326 * @mount: a #GMount.
11327 * @flags: flags affecting the unmount if required for eject
11328 * @cancellable: optional #GCancellable object, %NULL to ignore.
11329 * @callback: a #GAsyncReadyCallback, or %NULL.
11330 * @user_data: user data passed to @callback.
11332 * Ejects a mount. This is an asynchronous operation, and is
11333 * finished by calling g_mount_eject_finish() with the @mount
11334 * and #GAsyncResult data returned in the @callback.
11336 * Deprecated: 2.22: Use g_mount_eject_with_operation() instead.
11341 * g_dbus_error_get_remote_error:
11342 * @error: A #GError.
11344 * Gets the D-Bus error name used for @error, if any.
11345 * This function is guaranteed to return a D-Bus error name for all
11346 * #GError<!-- -->s returned from functions handling remote method
11347 * calls (e.g. g_dbus_connection_call_finish()) unless
11348 * g_dbus_error_strip_remote_error() has been used on @error.
11350 * Returns: An allocated string or %NULL if the D-Bus error name could not be found. Free with g_free().
11356 * SECTION:gsettingsbacken:
11357 * @title: GSettingsBackend
11358 * @short_description: an interface for settings backend implementations
11359 * @include: gio/gsettingsbackend.h
11360 * @see_also: #GSettings, #GIOExtensionPoint
11362 * The #GSettingsBackend interface defines a generic interface for
11363 * non-strictly-typed data that is stored in a hierarchy. To implement
11364 * an alternative storage backend for #GSettings, you need to implement
11365 * the #GSettingsBackend interface and then make it implement the
11366 * extension point #G_SETTINGS_BACKEND_EXTENSION_POINT_NAME.
11367 * The interface defines methods for reading and writing values, a
11368 * method for determining if writing of certain values will fail
11369 * (lockdown) and a change notification mechanism.
11370 * The semantics of the interface are very precisely defined and
11371 * implementations must carefully adhere to the expectations of
11372 * callers that are documented on each of the interface methods.
11373 * Some of the GSettingsBackend functions accept or return a #GTree.
11374 * These trees always have strings as keys and #GVariant as values.
11375 * g_settings_backend_create_tree() is a convenience function to create
11378 * The #GSettingsBackend API is exported to allow third-party
11379 * implementations, but does not carry the same stability guarantees
11380 * as the public GIO API. For this reason, you have to define the
11381 * C preprocessor symbol #G_SETTINGS_ENABLE_BACKEND before including
11382 * <filename>gio/gsettingsbackend.h</filename>
11388 * g_dbus_interface_info_lookup_method:
11389 * @info: A #GDBusInterfaceInfo.
11390 * @name: A D-Bus method name (typically in CamelCase)
11392 * Looks up information about a method.
11393 * This cost of this function is O(n) in number of methods.
11395 * Returns: A #GDBusMethodInfo or %NULL if not found. Do not free, it is owned by @info.
11401 * GDBusConnection:closed:
11403 * A boolean specifying whether the connection has been closed.
11410 * g_zlib_compressor_new:
11411 * @format: The format to use for the compressed data
11412 * @level: compression level (0-9), -1 for default
11414 * Creates a new #GZlibCompressor.
11416 * Returns: a new #GZlibCompressor
11422 * g_cancellable_disconnect:
11423 * @cancellable: A #GCancellable or %NULL.
11424 * @handler_id: Handler id of the handler to be disconnected, or %0.
11426 * Disconnects a handler from a cancellable instance similar to
11427 * g_signal_handler_disconnect(). Additionally, in the event that a
11428 * signal handler is currently running, this call will block until the
11429 * handler has finished. Calling this function from a
11430 * #GCancellable::cancelled signal handler will therefore result in a
11432 * This avoids a race condition where a thread cancels at the
11433 * same time as the cancellable operation is finished and the
11434 * signal handler is removed. See #GCancellable::cancelled for
11435 * details on how to use this.
11436 * If @cancellable is %NULL or @handler_id is %0 this function does
11444 * g_input_stream_skip_finish:
11445 * @stream: a #GInputStream.
11446 * @result: a #GAsyncResult.
11447 * @error: a #GError location to store the error occuring, or %NULL to ignore.
11449 * Finishes a stream skip operation.
11451 * Returns: the size of the bytes skipped, or %-1 on error.
11456 * g_resolver_set_default:
11457 * @resolver: the new default #GResolver
11459 * Sets @resolver to be the application's default resolver (reffing
11460 * Future calls to g_resolver_get_default() will return this resolver.
11461 * This can be used if an application wants to perform any sort of DNS
11462 * caching or "pinning"; it can implement its own #GResolver that
11463 * calls the original default resolver for DNS operations, and
11464 * implements its own cache policies on top of that, and then set
11465 * itself as the default resolver for all later code to use.
11472 * g_dbus_annotation_info_unref:
11473 * @info: A #GDBusAnnotationInfo.
11475 * If @info is statically allocated, does nothing. Otherwise decreases
11476 * the reference count of @info. When its reference count drops to 0,
11477 * the memory used is freed.
11484 * g_file_info_set_sort_order:
11485 * @info: a #GFileInfo.
11486 * @sort_order: a sort order integer.
11488 * Sets the sort order attribute in the file info structure. See
11489 * %G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER.
11494 * SECTION:goutputstrea:
11495 * @short_description: Base class for implementing streaming output
11496 * @include: gio/gio.h
11498 * GOutputStream has functions to write to a stream (g_output_stream_write()),
11499 * to close a stream (g_output_stream_close()) and to flush pending writes
11500 * (g_output_stream_flush()).
11501 * To copy the content of an input stream to an output stream without
11502 * manually handling the reads and writes, use g_output_stream_splice().
11503 * All of these functions have async variants too.
11508 * SECTION:gmemoryinputstrea:
11509 * @short_description: Streaming input operations on memory chunks
11510 * @include: gio/gio.h
11511 * @see_also: #GMemoryOutputStream
11513 * #GMemoryInputStream is a class for using arbitrary
11514 * memory chunks as input for GIO streaming input operations.
11519 * g_action_get_name:
11520 * @action: a #GAction
11522 * Queries the name of @action.
11524 * Returns: the name of the action
11531 * @short_description: Virtual File System
11532 * @include: gio/gio.h
11534 * Entry point for using GIO functionality.
11539 * g_file_output_stream_query_info_async:
11540 * @stream: a #GFileOutputStream.
11541 * @attributes: a file attribute query string.
11542 * @io_priority: the <link linkend="gio-GIOScheduler">I/O priority</link> of the request.
11543 * @cancellable: optional #GCancellable object, %NULL to ignore.
11544 * @callback: callback to call when the request is satisfied
11545 * @user_data: the data to pass to callback function
11547 * Asynchronously queries the @stream for a #GFileInfo. When completed,
11548 * finish the operation with g_file_output_stream_query_info_finish().
11549 * For the synchronous version of this function, see
11550 * g_file_output_stream_query_info().
11555 * g_dbus_connection_remove_filter:
11556 * @connection: a #GDBusConnection
11557 * @filter_id: an identifier obtained from g_dbus_connection_add_filter()
11559 * Removes a filter.
11566 * g_resolver_lookup_by_name:
11567 * @resolver: a #GResolver
11568 * @hostname: the hostname to look up
11569 * @cancellable: a #GCancellable, or %NULL
11570 * @error: return location for a #GError, or %NULL
11572 * Synchronously resolves @hostname to determine its associated IP
11573 * address(es). @hostname may be an ASCII-only or UTF-8 hostname, or
11574 * the textual form of an IP address (in which case this just becomes
11575 * a wrapper around g_inet_address_new_from_string()).
11576 * On success, g_resolver_lookup_by_name() will return a #GList of
11577 * #GInetAddress, sorted in order of preference. (That is, you should
11578 * attempt to connect to the first address first, then the second if
11579 * the first fails, etc.)
11580 * If the DNS resolution fails, @error (if non-%NULL) will be set to a
11581 * value from #GResolverError.
11582 * If @cancellable is non-%NULL, it can be used to cancel the
11583 * operation, in which case @error (if non-%NULL) will be set to
11584 * %G_IO_ERROR_CANCELLED.
11585 * If you are planning to connect to a socket on the resolved IP
11586 * address, it may be easier to create a #GNetworkAddress and use its
11587 * #GSocketConnectable interface.
11588 * of #GInetAddress, or %NULL on error. You
11589 * must unref each of the addresses and free the list when you are
11590 * done with it. (You can use g_resolver_free_addresses() to do this.)
11592 * Returns: (element-type GInetAddress) (transfer full): a #GList
11598 * g_socket_listener_accept_async:
11599 * @listener: a #GSocketListener
11600 * @cancellable: a #GCancellable, or %NULL
11601 * @callback: a #GAsyncReadyCallback
11602 * @user_data: user data for the callback
11604 * This is the asynchronous version of g_socket_listener_accept().
11605 * When the operation is finished @callback will be
11606 * called. You can then call g_socket_listener_accept_socket()
11607 * to get the result of the operation.
11614 * g_mount_unshadow:
11615 * @mount: A #GMount.
11617 * Decrements the shadow count on @mount. Usually used by
11618 * #GVolumeMonitor implementations when destroying a shadow mount for
11619 * will need to emit the #GMount::changed signal on @mount manually.
11626 * g_file_info_get_is_backup:
11627 * @info: a #GFileInfo.
11629 * Checks if a file is a backup file.
11631 * Returns: %TRUE if file is a backup file, %FALSE otherwise.
11636 * g_dbus_connection_call:
11637 * @connection: A #GDBusConnection.
11638 * @bus_name: A unique or well-known bus name or %NULL if @connection is not a message bus connection.
11639 * @object_path: Path of remote object.
11640 * @interface_name: D-Bus interface to invoke method on.
11641 * @method_name: The name of the method to invoke.
11642 * @parameters: A #GVariant tuple with parameters for the method or %NULL if not passing parameters.
11643 * @reply_type: The expected type of the reply, or %NULL.
11644 * @flags: Flags from the #GDBusCallFlags enumeration.
11645 * @timeout_msec: The timeout in milliseconds, -1 to use the default timeout or %G_MAXINT for no timeout.
11646 * @cancellable: A #GCancellable or %NULL.
11647 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
11648 * @user_data: The data to pass to @callback.
11650 * Asynchronously invokes the @method_name method on the
11651 * If @connection is closed then the operation will fail with
11652 * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will
11653 * fail with %G_IO_ERROR_CANCELLED. If @parameters contains a value
11654 * not compatible with the D-Bus protocol, the operation fails with
11655 * %G_IO_ERROR_INVALID_ARGUMENT.
11656 * If @reply_type is non-%NULL then the reply will be checked for having this type and an
11657 * error will be raised if it does not match. Said another way, if you give a @reply_type
11658 * then any non-%NULL return value will be of this type.
11659 * If the @parameters #GVariant is floating, it is consumed. This allows
11660 * convenient 'inline' use of g_variant_new(), e.g.:
11662 * g_dbus_connection_call (connection,
11663 * "org.freedesktop.StringThings",
11664 * "/org/freedesktop/StringThings",
11665 * "org.freedesktop.StringThings",
11667 * g_variant_new ("(ss)",
11671 * G_DBUS_CALL_FLAGS_NONE,
11674 * (GAsyncReadyCallback) two_strings_done,
11677 * This is an asynchronous method. When the operation is finished, @callback will be invoked
11678 * in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
11679 * of the thread you are calling this method from. You can then call
11680 * g_dbus_connection_call_finish() to get the result of the operation.
11681 * See g_dbus_connection_call_sync() for the synchronous version of this
11689 * g_unix_fd_message_get_fd_list:
11690 * @message: a #GUnixFDMessage
11692 * Gets the #GUnixFDList contained in @message. This function does not
11693 * return a reference to the caller, but the returned list is valid for
11694 * the lifetime of @message.
11696 * Returns: (transfer none): the #GUnixFDList from @message
11702 * g_filter_input_stream_get_base_stream:
11703 * @stream: a #GFilterInputStream.
11705 * Gets the base stream for the filter stream.
11707 * Returns: (transfer none): a #GInputStream.
11712 * g_data_input_stream_get_byte_order:
11713 * @stream: a given #GDataInputStream.
11715 * Gets the byte order for the data input stream.
11717 * Returns: the @stream's current #GDataStreamByteOrder.
11722 * SECTION:gdbuserro:
11723 * @title: GDBusError
11724 * @short_description: Mapping D-Bus errors to and from GError
11725 * @include: gio/gio.h
11727 * All facilities that return errors from remote methods (such as
11728 * g_dbus_connection_call_sync()) use #GError to represent both D-Bus
11729 * errors (e.g. errors returned from the other peer) and locally
11730 * in-process generated errors.
11731 * To check if a returned #GError is an error from a remote peer, use
11732 * g_dbus_error_is_remote_error(). To get the actual D-Bus error name,
11733 * use g_dbus_error_get_remote_error(). Before presenting an error,
11734 * always use g_dbus_error_strip_remote_error().
11735 * In addition, facilities used to return errors to a remote peer also
11736 * use #GError. See g_dbus_method_invocation_return_error() for
11737 * discussion about how the D-Bus error name is set.
11738 * Applications can associate a #GError error domain with a set of D-Bus errors in order to
11739 * automatically map from D-Bus errors to #GError and back. This
11740 * is typically done in the function returning the #GQuark for the
11742 * <example id="error-registration"><title>Error Registration</title><programlisting>
11743 * /<!-- -->* foo-bar-error.h: *<!-- -->/
11744 * #define FOO_BAR_ERROR (foo_bar_error_quark ())
11745 * GQuark foo_bar_error_quark (void);
11748 * FOO_BAR_ERROR_FAILED,
11749 * FOO_BAR_ERROR_ANOTHER_ERROR,
11750 * FOO_BAR_ERROR_SOME_THIRD_ERROR,
11752 * /<!-- -->* foo-bar-error.c: *<!-- -->/
11753 * static const GDBusErrorEntry foo_bar_error_entries[] =
11755 * {FOO_BAR_ERROR_FAILED, "org.project.Foo.Bar.Error.Failed"},
11756 * {FOO_BAR_ERROR_ANOTHER_ERROR, "org.project.Foo.Bar.Error.AnotherError"},
11757 * {FOO_BAR_ERROR_SOME_THIRD_ERROR, "org.project.Foo.Bar.Error.SomeThirdError"},
11760 * foo_bar_error_quark (void)
11762 * static volatile gsize quark_volatile = 0;
11763 * g_dbus_error_register_error_domain ("foo-bar-error-quark",
11765 * foo_bar_error_entries,
11766 * G_N_ELEMENTS (foo_bar_error_entries));
11767 * G_STATIC_ASSERT (G_N_ELEMENTS (foo_bar_error_entries) - 1 == FOO_BAR_ERROR_SOME_THIRD_ERROR);
11768 * return (GQuark) quark_volatile;
11770 * </programlisting></example>
11771 * With this setup, a D-Bus peer can transparently pass e.g. %FOO_BAR_ERROR_ANOTHER_ERROR and
11772 * other peers will see the D-Bus error name <literal>org.project.Foo.Bar.Error.AnotherError</literal>.
11773 * If the other peer is using GDBus, the peer will see also %FOO_BAR_ERROR_ANOTHER_ERROR instead
11774 * of %G_IO_ERROR_DBUS_ERROR. Note that GDBus clients can still recover
11775 * <literal>org.project.Foo.Bar.Error.AnotherError</literal> using g_dbus_error_get_remote_error().
11776 * Note that errors in the %G_DBUS_ERROR error domain is intended only
11777 * for returning errors from a remote message bus process. Errors
11778 * generated locally in-process by e.g. #GDBusConnection is from the
11779 * %G_IO_ERROR domain.
11784 * g_seekable_truncate:
11785 * @seekable: a #GSeekable.
11786 * @offset: a #goffset.
11787 * @cancellable: optional #GCancellable object, %NULL to ignore.
11788 * @error: a #GError location to store the error occuring, or %NULL to ignore.
11790 * Truncates a stream with a given #offset.
11791 * If @cancellable is not %NULL, then the operation can be cancelled by
11792 * triggering the cancellable object from another thread. If the operation
11793 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
11794 * operation was partially finished when the operation was cancelled the
11795 * partial result will be returned, without an error.
11796 * has occurred, this function will return %FALSE and set @error
11797 * appropriately if present.
11799 * Virtual: truncate_fn
11800 * Returns: %TRUE if successful. If an error
11805 * g_dbus_message_new_method_error:
11806 * @method_call_message: A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to create a reply message to.
11807 * @error_name: A valid D-Bus error name.
11808 * @error_message_format: The D-Bus error message in a printf() format.
11809 * @...: Arguments for @error_message_format.
11811 * Creates a new #GDBusMessage that is an error reply to @method_call_message.
11813 * Returns: (transfer full): A #GDBusMessage. Free with g_object_unref().
11819 * g_volume_eject_with_operation:
11820 * @volume: a #GVolume.
11821 * @flags: flags affecting the unmount if required for eject
11822 * @mount_operation: a #GMountOperation or %NULL to avoid user interaction.
11823 * @cancellable: optional #GCancellable object, %NULL to ignore.
11824 * @callback: a #GAsyncReadyCallback, or %NULL.
11825 * @user_data: user data passed to @callback.
11827 * Ejects a volume. This is an asynchronous operation, and is
11828 * finished by calling g_volume_eject_with_operation_finish() with the @volume
11829 * and #GAsyncResult data returned in the @callback.
11837 * @settings: a #GSettings object
11838 * @key: the key to bind
11839 * @object: a #GObject
11840 * @property: the name of the property to bind
11841 * @flags: flags for the binding
11843 * Create a binding between the @key in the @settings object
11844 * and the property @property of @object.
11845 * The binding uses the default GIO mapping functions to map
11846 * between the settings and property values. These functions
11847 * handle booleans, numeric types and string types in a
11848 * straightforward way. Use g_settings_bind_with_mapping() if
11849 * you need a custom mapping, or map between types that are not
11850 * supported by the default mapping functions.
11851 * Unless the @flags include %G_SETTINGS_BIND_NO_SENSITIVITY, this
11852 * function also establishes a binding between the writability of
11853 * a boolean property by that name). See g_settings_bind_writable()
11854 * for more details about writable bindings.
11855 * Note that the lifecycle of the binding is tied to the object,
11856 * and that you can have only one binding per object property.
11857 * If you bind the same property twice on the same object, the second
11858 * binding overrides the first one.
11865 * g_socket_client_connect_to_host_async:
11866 * @client: a #GTcpClient
11867 * @host_and_port: the name and optionally the port of the host to connect to
11868 * @default_port: the default port to connect to
11869 * @cancellable: a #GCancellable, or %NULL
11870 * @callback: a #GAsyncReadyCallback
11871 * @user_data: user data for the callback
11873 * This is the asynchronous version of g_socket_client_connect_to_host().
11874 * When the operation is finished @callback will be
11875 * called. You can then call g_socket_client_connect_to_host_finish() to get
11876 * the result of the operation.
11883 * g_file_info_set_content_type:
11884 * @info: a #GFileInfo.
11885 * @content_type: a content type. See #GContentType.
11887 * Sets the content type attribute for a given #GFileInfo.
11888 * See %G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE.
11893 * g_loadable_icon_load_async:
11894 * @icon: a #GLoadableIcon.
11895 * @size: an integer.
11896 * @cancellable: optional #GCancellable object, %NULL to ignore.
11897 * @callback: a #GAsyncReadyCallback to call when the request is satisfied
11898 * @user_data: the data to pass to callback function
11900 * Loads an icon asynchronously. To finish this function, see
11901 * g_loadable_icon_load_finish(). For the synchronous, blocking
11902 * version of this function, see g_loadable_icon_load().
11907 * g_dbus_message_new_from_blob:
11908 * @blob: A blob represent a binary D-Bus message.
11909 * @blob_len: The length of @blob.
11910 * @capabilities: A #GDBusCapabilityFlags describing what protocol features are supported.
11911 * @error: Return location for error or %NULL.
11913 * Creates a new #GDBusMessage from the data stored at @blob. The byte
11914 * order that the message was in can be retrieved using
11915 * g_dbus_message_get_byte_order().
11916 * g_object_unref().
11918 * Returns: A new #GDBusMessage or %NULL if @error is set. Free with
11924 * g_dbus_error_set_dbus_error:
11925 * @error: A pointer to a #GError or %NULL.
11926 * @dbus_error_name: D-Bus error name.
11927 * @dbus_error_message: D-Bus error message.
11928 * @format: printf()-style format to prepend to @dbus_error_message or %NULL.
11929 * @...: Arguments for @format.
11931 * Does nothing if @error is %NULL. Otherwise sets *@error to
11932 * a new #GError created with g_dbus_error_new_for_dbus_error()
11933 * with @dbus_error_message prepend with @format (unless %NULL).
11940 * g_file_query_info_finish:
11941 * @file: input #GFile.
11942 * @res: a #GAsyncResult.
11943 * @error: a #GError.
11945 * Finishes an asynchronous file info query.
11946 * See g_file_query_info_async().
11947 * Free the returned object with g_object_unref().
11949 * Returns: (transfer full): #GFileInfo for given @file or %NULL on error.
11954 * GDBusConnection:unique-name:
11956 * The unique name as assigned by the message bus or %NULL if the
11957 * connection is not open or not a message bus connection.
11964 * g_file_attribute_info_list_lookup:
11965 * @list: a #GFileAttributeInfoList.
11966 * @name: the name of the attribute to lookup.
11968 * Gets the file attribute with the name @name from @list.
11969 * attribute isn't found.
11971 * Returns: a #GFileAttributeInfo for the @name, or %NULL if an
11976 * g_file_enumerator_close_finish:
11977 * @enumerator: a #GFileEnumerator.
11978 * @result: a #GAsyncResult.
11979 * @error: a #GError location to store the error occuring, or %NULL to ignore.
11981 * Finishes closing a file enumerator, started from g_file_enumerator_close_async().
11982 * If the file enumerator was already closed when g_file_enumerator_close_async()
11983 * was called, then this function will report %G_IO_ERROR_CLOSED in @error, and
11984 * return %FALSE. If the file enumerator had pending operation when the close
11985 * operation was started, then this function will report %G_IO_ERROR_PENDING, and
11986 * return %FALSE. If @cancellable was not %NULL, then the operation may have been
11987 * cancelled by triggering the cancellable object from another thread. If the operation
11988 * was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %FALSE will be
11991 * Returns: %TRUE if the close operation has finished successfully.
11996 * GSimpleAction:name:
11998 * The name of the action. This is mostly meaningful for identifying
11999 * the action once it has been added to a #GSimpleActionGroup.
12006 * g_app_info_set_as_default_for_type:
12007 * @appinfo: a #GAppInfo.
12008 * @content_type: the content type.
12009 * @error: a #GError.
12011 * Sets the application as the default handler for a given type.
12013 * Returns: %TRUE on success, %FALSE on error.
12018 * g_filter_input_stream_get_close_base_stream:
12019 * @stream: a #GFilterInputStream.
12021 * Returns whether the base stream will be closed when @stream is
12024 * Returns: %TRUE if the base stream will be closed.
12031 * #GPeriodic is an opaque structure type.
12038 * g_io_stream_clear_pending:
12039 * @stream: a #GIOStream
12041 * Clears the pending flag on @stream.
12048 * g_permission_release_async:
12049 * @permission: a #GPermission instance
12050 * @cancellable: a #GCancellable, or %NULL
12051 * @callback: the #GAsyncReadyCallback to call when done
12052 * @user_data: the user data to pass to @callback
12054 * Attempts to release the permission represented by @permission.
12055 * This is the first half of the asynchronous version of
12056 * g_permission_release().
12063 * g_unix_mount_guess_name:
12064 * @mount_entry: a #GUnixMountEntry
12066 * Guesses the name of a Unix mount.
12067 * The result is a translated string.
12068 * be freed with g_free()
12070 * Returns: A newly allocated string that must
12075 * GDBusConnection:exit-on-close:
12077 * A boolean specifying whether the process will be terminated (by
12078 * calling <literal>raise(SIGTERM)</literal>) if the connection
12079 * is closed by the remote peer.
12086 * g_simple_async_result_get_source_tag: (skip)
12087 * @simple: a #GSimpleAsyncResult.
12089 * Gets the source tag for the #GSimpleAsyncResult.
12091 * Returns: a #gpointer to the source object for the #GSimpleAsyncResult.
12097 * @short_description: An object for emblems
12098 * @include: gio/gio.h
12099 * @see_also: #GIcon, #GEmblemedIcon, #GLoadableIcon, #GThemedIcon
12101 * #GEmblem is an implementation of #GIcon that supports
12102 * having an emblem, which is an icon with additional properties.
12103 * It can than be added to a #GEmblemedIcon.
12104 * Currently, only metainformation about the emblem's origin is
12105 * supported. More may be added in the future.
12110 * g_threaded_socket_service_new:
12111 * @max_threads: the maximal number of threads to execute concurrently handling incoming clients, -1 means no limit
12113 * Creates a new #GThreadedSocketService with no listeners. Listeners
12114 * must be added with g_socket_service_add_listeners().
12116 * Returns: a new #GSocketService.
12122 * g_file_monitor_cancel:
12123 * @monitor: a #GFileMonitor.
12125 * Cancels a file monitor.
12127 * Returns: %TRUE if monitor was cancelled.
12132 * SECTION:gfileiostrea:
12133 * @short_description: File read and write streaming operations
12134 * @include: gio/gio.h
12135 * @see_also: #GIOStream, #GFileInputStream, #GFileOutputStream, #GSeekable
12137 * GFileIOStream provides io streams that both read and write to the same
12139 * GFileIOStream implements #GSeekable, which allows the io
12140 * stream to jump to arbitrary positions in the file and to truncate
12141 * the file, provided the filesystem of the file supports these
12143 * To find the position of a file io stream, use
12144 * g_seekable_tell().
12145 * To find out if a file io stream supports seeking, use g_seekable_can_seek().
12146 * To position a file io stream, use g_seekable_seek().
12147 * To find out if a file io stream supports truncating, use
12148 * g_seekable_can_truncate(). To truncate a file io
12149 * stream, use g_seekable_truncate().
12150 * The default implementation of all the #GFileIOStream operations
12151 * and the implementation of #GSeekable just call into the same operations
12152 * on the output stream.
12159 * g_mount_get_root:
12160 * @mount: a #GMount.
12162 * Gets the root directory on @mount.
12163 * The returned object should be unreffed with
12164 * g_object_unref() when no longer needed.
12166 * Returns: (transfer full): a #GFile.
12171 * SECTION:gunixmount:
12172 * @include: gio/gunixmounts.h
12173 * @short_description: UNIX mounts
12175 * Routines for managing mounted UNIX mount points and paths.
12176 * Note that <filename><gio/gunixmounts.h></filename> belongs to the
12177 * UNIX-specific GIO interfaces, thus you have to use the
12178 * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
12183 * g_mount_unmount_with_operation_finish:
12184 * @mount: a #GMount.
12185 * @result: a #GAsyncResult.
12186 * @error: a #GError location to store the error occuring, or %NULL to ignore.
12188 * Finishes unmounting a mount. If any errors occurred during the operation,
12190 * Returns: %TRUE if the mount was successfully unmounted. %FALSE otherwise.
12196 * g_app_info_launch:
12197 * @appinfo: a #GAppInfo
12198 * @files: (element-type GFile): a #GList of #GFile objects
12199 * @launch_context: (allow-none): a #GAppLaunchContext or %NULL
12200 * @error: a #GError
12202 * Launches the application. Passes @files to the launched application
12203 * as arguments, using the optional @launch_context to get information
12204 * about the details of the launcher (like what screen it is on).
12205 * On error, @error will be set accordingly.
12206 * To launch the application without arguments pass a %NULL @files list.
12207 * Note that even if the launch is successful the application launched
12208 * can fail to start if it runs into problems during startup. There is
12209 * no way to detect this.
12210 * Some URIs can be changed when passed through a GFile (for instance
12211 * unsupported uris with strange formats like mailto:), so if you have
12212 * a textual uri you want to pass in as argument, consider using
12213 * g_app_info_launch_uris() instead.
12214 * On UNIX, this function sets the <envar>GIO_LAUNCHED_DESKTOP_FILE</envar>
12215 * environment variable with the path of the launched desktop file and
12216 * <envar>GIO_LAUNCHED_DESKTOP_FILE_PID</envar> to the process
12217 * id of the launched process. This can be used to ignore
12218 * <envar>GIO_LAUNCHED_DESKTOP_FILE</envar>, should it be inherited
12219 * by further processes. The <envar>DISPLAY</envar> and
12220 * <envar>DESKTOP_STARTUP_ID</envar> environment variables are also
12221 * set, based on information provided in @launch_context.
12223 * Returns: %TRUE on successful launch, %FALSE otherwise.
12228 * GVolumeMonitor::drive-disconnected:
12229 * @volume_monitor: The volume monitor emitting the signal.
12230 * @drive: a #GDrive that was disconnected.
12232 * Emitted when a drive is disconnected from the system.
12237 * g_bus_watch_name:
12238 * @bus_type: The type of bus to watch a name on.
12239 * @name: The name (well-known or unique) to watch.
12240 * @flags: Flags from the #GBusNameWatcherFlags enumeration.
12241 * @name_appeared_handler: Handler to invoke when @name is known to exist or %NULL.
12242 * @name_vanished_handler: Handler to invoke when @name is known to not exist or %NULL.
12243 * @user_data: User data to pass to handlers.
12244 * @user_data_free_func: Function for freeing @user_data or %NULL.
12246 * Starts watching @name on the bus specified by @bus_type and calls
12247 * known to have a owner respectively known to lose its
12248 * owner. Callbacks will be invoked in the <link
12249 * linkend="g-main-context-push-thread-default">thread-default main
12250 * loop</link> of the thread you are calling this function from.
12251 * You are guaranteed that one of the handlers will be invoked after
12252 * calling this function. When you are done watching the name, just
12253 * call g_bus_unwatch_name() with the watcher id this function
12255 * If the name vanishes or appears (for example the application owning
12256 * the name could restart), the handlers are also invoked. If the
12257 * #GDBusConnection that is used for watching the name disconnects, then
12258 * possible to access the name.
12259 * Another guarantee is that invocations of @name_appeared_handler
12260 * and @name_vanished_handler are guaranteed to alternate; that
12261 * is, if @name_appeared_handler is invoked then you are
12262 * guaranteed that the next time one of the handlers is invoked, it
12263 * will be @name_vanished_handler. The reverse is also true.
12264 * This behavior makes it very simple to write applications that wants
12265 * to take action when a certain name exists, see <xref
12266 * linkend="gdbus-watching-names"/>. Basically, the application
12267 * should create object proxies in @name_appeared_handler and destroy
12268 * them again (if any) in @name_vanished_handler.
12269 * g_bus_unwatch_name() to stop watching the name.
12271 * Returns: An identifier (never 0) that an be used with
12277 * g_desktop_app_info_new_from_filename:
12278 * @filename: the path of a desktop file, in the GLib filename encoding
12280 * Creates a new #GDesktopAppInfo.
12282 * Returns: a new #GDesktopAppInfo or %NULL on error.
12287 * g_io_extension_point_get_extension_by_name:
12288 * @extension_point: a #GIOExtensionPoint
12289 * @name: the name of the extension to get
12291 * Finds a #GIOExtension for an extension point by name.
12292 * given name, or %NULL if there is no extension with that name
12294 * Returns: (transfer none): the #GIOExtension for @extension_point that has the
12299 * g_dbus_server_stop:
12300 * @server: A #GDBusServer.
12309 * g_volume_can_eject:
12310 * @volume: a #GVolume.
12312 * Checks if a volume can be ejected.
12314 * Returns: %TRUE if the @volume can be ejected. %FALSE otherwise.
12319 * g_app_info_create_from_commandline:
12320 * @commandline: the commandline to use
12321 * @application_name: (allow-none): the application name, or %NULL to use @commandline
12322 * @flags: flags that can specify details of the created #GAppInfo
12323 * @error: a #GError location to store the error occuring, %NULL to ignore.
12325 * Creates a new #GAppInfo from the given information.
12327 * Returns: (transfer full): new #GAppInfo for given command.
12332 * g_socket_client_get_protocol:
12333 * @client: a #GSocketClient
12335 * Gets the protocol name type of the socket client.
12336 * See g_socket_client_set_protocol() for details.
12338 * Returns: a #GSocketProtocol
12344 * g_dbus_message_get_body:
12345 * @message: A #GDBusMessage.
12347 * Gets the body of a message.
12349 * Returns: A #GVariant or %NULL if the body is empty. Do not free, it is owned by @message.
12355 * g_permission_get_can_acquire:
12356 * @permission: a #GPermission instance
12357 * @returns: the value of the 'can-acquire' property
12359 * Gets the value of the 'can-acquire' property. This property is %TRUE
12360 * if it is generally possible to acquire the permission by calling
12361 * g_permission_acquire().
12368 * g_desktop_app_info_new:
12369 * @desktop_id: the desktop file id
12371 * Creates a new #GDesktopAppInfo based on a desktop file id.
12372 * A desktop file id is the basename of the desktop file, including the
12373 * .desktop extension. GIO is looking for a desktop file with this name
12374 * in the <filename>applications</filename> subdirectories of the XDG data
12375 * directories (i.e. the directories specified in the
12376 * <envar>XDG_DATA_HOME</envar> and <envar>XDG_DATA_DIRS</envar> environment
12377 * variables). GIO also supports the prefix-to-subdirectory mapping that is
12378 * described in the <ulink url="http://standards.freedesktop.org/menu-spec/latest/">Menu Spec</ulink>
12379 * (i.e. a desktop id of kde-foo.desktop will match
12380 * <filename>/usr/share/applications/kde/foo.desktop</filename>).
12382 * Returns: a new #GDesktopAppInfo, or %NULL if no desktop file with that id
12387 * g_io_scheduler_job_send_to_mainloop_async:
12388 * @job: a #GIOSchedulerJob
12389 * @func: a #GSourceFunc callback that will be called in the original thread
12390 * @user_data: data to pass to @func
12391 * @notify: a #GDestroyNotify for @user_data, or %NULL
12393 * Used from an I/O job to send a callback to be run asynchronously in
12394 * the thread that the job was started from. The callback will be run
12395 * when the main loop is available, but at that time the I/O job might
12396 * have finished. The return value from the callback is ignored.
12397 * Note that if you are passing the @user_data from g_io_scheduler_push_job()
12398 * on to this function you have to ensure that it is not freed before
12399 * g_io_scheduler_push_job() or by using refcounting for @user_data.
12404 * g_application_command_line_getenv:
12405 * @cmdline: a #GApplicationCommandLine
12406 * @name: the environment variable to get
12408 * Gets the value of a particular environment variable of the command
12409 * line invocation, as would be returned by g_getenv(). The strings may
12410 * contain non-utf8 data.
12411 * The remote application usually does not send an environment. Use
12412 * %G_APPLICATION_SEND_ENVIRONMENT to affect that. Even with this flag
12413 * set it is possible that the environment is still not available (due
12414 * to invocation messages from other applications).
12415 * The return value should not be modified or freed and is valid for as
12416 * long as @cmdline exists.
12418 * Returns: the value of the variable, or %NULL if unset or unsent
12424 * g_simple_async_result_set_from_error:
12425 * @simple: a #GSimpleAsyncResult.
12428 * Sets the result from a #GError.
12433 * g_file_info_set_attribute_int64:
12434 * @info: a #GFileInfo.
12435 * @attribute: attribute name to set.
12436 * @attr_value: int64 value to set attribute to.
12438 * Sets the @attribute to contain the given @attr_value,
12444 * g_data_input_stream_read_uint16:
12445 * @stream: a given #GDataInputStream.
12446 * @cancellable: optional #GCancellable object, %NULL to ignore.
12447 * @error: #GError for error reporting.
12449 * Reads an unsigned 16-bit/2-byte value from @stream.
12450 * In order to get the correct byte order for this read operation,
12451 * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
12452 * an error occurred.
12454 * Returns: an unsigned 16-bit/2-byte value read from the @stream or %0 if
12459 * g_socket_client_set_socket_type:
12460 * @client: a #GSocketClient.
12461 * @type: a #GSocketType
12463 * Sets the socket type of the socket client.
12464 * The sockets created by this object will be of the specified
12466 * It doesn't make sense to specify a type of %G_SOCKET_TYPE_DATAGRAM,
12467 * as GSocketClient is used for connection oriented services.
12474 * GDBusAuthMechanism:credentials:
12476 * If authenticating as a server, this property contains the
12477 * received credentials, if any.
12478 * If authenticating as a client, the property contains the
12479 * credentials that were sent, if any.
12484 * g_io_extension_point_set_required_type:
12485 * @extension_point: a #GIOExtensionPoint
12486 * @type: the #GType to require
12488 * Sets the required type for @extension_point to @type.
12489 * All implementations must henceforth have this type.
12494 * g_converter_reset:
12495 * @converter: a #GConverter.
12497 * Resets all internal state in the converter, making it behave
12498 * as if it was just created. If the converter has any internal
12499 * state that would produce output then that output is lost.
12506 * g_buffered_output_stream_new_sized:
12507 * @base_stream: a #GOutputStream.
12510 * Creates a new buffered output stream with a given buffer size.
12512 * Returns: a #GOutputStream with an internal buffer set to @size.
12517 * GDBusServer:active:
12519 * Whether the server is currently active.
12526 * g_file_set_attribute_byte_string:
12527 * @file: input #GFile.
12528 * @attribute: a string containing the attribute's name.
12529 * @value: a string containing the attribute's new value.
12530 * @flags: a #GFileQueryInfoFlags.
12531 * @cancellable: optional #GCancellable object, %NULL to ignore.
12532 * @error: a #GError, or %NULL
12534 * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING to @value.
12535 * If @attribute is of a different type, this operation will fail,
12536 * returning %FALSE.
12537 * If @cancellable is not %NULL, then the operation can be cancelled by
12538 * triggering the cancellable object from another thread. If the operation
12539 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
12540 * in the @file, %FALSE otherwise.
12542 * Returns: %TRUE if the @attribute was successfully set to @value
12548 * @socket: a #GSocket.
12549 * @error: #GError for error reporting, or %NULL to ignore.
12551 * Marks the socket as a server socket, i.e. a socket that is used
12552 * to accept incoming requests using g_socket_accept().
12553 * Before calling this the socket must be bound to a local address using
12555 * To set the maximum amount of outstanding clients, use
12556 * g_socket_set_listen_backlog().
12558 * Returns: %TRUE on success, %FALSE on error.
12564 * g_simple_async_result_complete_in_idle:
12565 * @simple: a #GSimpleAsyncResult.
12567 * Completes an asynchronous function in an idle handler in the <link
12568 * linkend="g-main-context-push-thread-default">thread-default main
12569 * loop</link> of the thread that @simple was initially created in.
12570 * Calling this function takes a reference to @simple for as long as
12571 * is needed to complete the call.
12576 * g_file_info_set_attribute_byte_string:
12577 * @info: a #GFileInfo.
12578 * @attribute: a file attribute key.
12579 * @attr_value: a byte string.
12581 * Sets the @attribute to contain the given @attr_value,
12587 * g_data_output_stream_put_uint64:
12588 * @stream: a #GDataOutputStream.
12589 * @data: a #guint64.
12590 * @cancellable: optional #GCancellable object, %NULL to ignore.
12591 * @error: a #GError, %NULL to ignore.
12593 * Puts an unsigned 64-bit integer into the stream.
12595 * Returns: %TRUE if @data was successfully added to the @stream.
12600 * SECTION:gdbusprox:
12601 * @short_description: Client-side proxies
12602 * @include: gio/gio.h
12604 * #GDBusProxy is a base class used for proxies to access a D-Bus
12605 * interface on a remote object. A #GDBusProxy can be constructed for
12606 * both well-known and unique names.
12607 * By default, #GDBusProxy will cache all properties (and listen to
12608 * changes) of the remote object, and proxy all signals that gets
12609 * emitted. This behaviour can be changed by passing suitable
12610 * #GDBusProxyFlags when the proxy is created. If the proxy is for a
12611 * well-known name, the property cache is flushed when the name owner
12612 * vanishes and reloaded when a name owner appears.
12613 * If a #GDBusProxy is used for a well-known name, the owner of the
12614 * name is tracked and can be read from
12615 * #GDBusProxy:g-name-owner. Connect to the #GObject::notify signal to
12616 * get notified of changes. Additionally, only signals and property
12617 * changes emitted from the current name owner are considered and
12618 * calls are always sent to the current name owner. This avoids a
12619 * number of race conditions when the name is lost by one owner and
12620 * claimed by another. However, if no name owner currently exists,
12621 * then calls will be sent to the well-known name which may result in
12622 * the message bus launching an owner (unless
12623 * %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START is set).
12624 * The generic #GDBusProxy::g-properties-changed and #GDBusProxy::g-signal
12625 * signals are not very convenient to work with. Therefore, the recommended
12626 * way of working with proxies is to subclass #GDBusProxy, and have
12627 * more natural properties and signals in your derived class.
12628 * See <xref linkend="gdbus-example-proxy-subclass"/> for an example.
12629 * <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>
12634 * g_socket_get_local_address:
12635 * @socket: a #GSocket.
12636 * @error: #GError for error reporting, or %NULL to ignore.
12638 * Try to get the local address of a bound socket. This is only
12639 * useful if the socket has been bound to a local address,
12640 * either explicitly or implicitly when connecting.
12641 * Free the returned object with g_object_unref().
12643 * Returns: (transfer full): a #GSocketAddress or %NULL on error.
12649 * g_unix_output_stream_get_fd:
12650 * @stream: a #GUnixOutputStream
12652 * Return the UNIX file descriptor that the stream writes to.
12654 * Returns: The file descriptor of @stream
12660 * g_dbus_is_unique_name:
12661 * @string: The string to check.
12663 * Checks if @string is a valid D-Bus unique bus name.
12665 * Returns: %TRUE if valid, %FALSE otherwise.
12671 * g_inet_address_get_native_size:
12672 * @address: a #GInetAddress
12674 * Gets the size of the native raw binary address for @address. This
12675 * is the size of the data that you get from g_inet_address_to_bytes().
12677 * Returns: the number of bytes used for the native version of @address.
12683 * g_file_query_info:
12684 * @file: input #GFile.
12685 * @attributes: an attribute query string.
12686 * @flags: a set of #GFileQueryInfoFlags.
12687 * @cancellable: optional #GCancellable object, %NULL to ignore.
12688 * @error: a #GError.
12690 * Gets the requested information about specified @file. The result
12691 * is a #GFileInfo object that contains key-value attributes (such as
12692 * the type or size of the file).
12693 * The @attributes value is a string that specifies the file attributes that
12694 * should be gathered. It is not an error if it's not possible to read a particular
12695 * requested attribute from a file - it just won't be set. @attributes should
12696 * be a comma-separated list of attributes or attribute wildcards. The wildcard "*"
12697 * means all attributes, and a wildcard like "standard::*" means all attributes in the standard
12698 * namespace. An example attribute query be "standard::*,owner::user".
12699 * The standard attributes are available as defines, like #G_FILE_ATTRIBUTE_STANDARD_NAME.
12700 * If @cancellable is not %NULL, then the operation can be cancelled by
12701 * triggering the cancellable object from another thread. If the operation
12702 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
12703 * For symlinks, normally the information about the target of the
12704 * symlink is returned, rather than information about the symlink itself.
12705 * However if you pass #G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS in @flags the
12706 * information about the symlink itself will be returned. Also, for symlinks
12707 * that point to non-existing files the information about the symlink itself
12708 * will be returned.
12709 * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
12710 * Other errors are possible too, and depend on what kind of filesystem the file is on.
12711 * Free the returned object with g_object_unref().
12713 * Returns: (transfer full): a #GFileInfo for the given @file, or %NULL on error.
12718 * g_io_extension_point_implement:
12719 * @extension_point_name: the name of the extension point
12720 * @type: the #GType to register as extension
12721 * @extension_name: the name for the extension
12722 * @priority: the priority for the extension
12724 * Registers @type as extension for the extension point with name
12725 * If @type has already been registered as an extension for this
12726 * extension point, the existing #GIOExtension object is returned.
12728 * Returns: a #GIOExtension object for #GType
12733 * g_mount_eject_finish:
12734 * @mount: a #GMount.
12735 * @result: a #GAsyncResult.
12736 * @error: a #GError location to store the error occuring, or %NULL to ignore.
12738 * Finishes ejecting a mount. If any errors occurred during the operation,
12740 * Returns: %TRUE if the mount was successfully ejected. %FALSE otherwise.
12741 * Deprecated: 2.22: Use g_mount_eject_with_operation_finish() instead.
12746 * GUnixSocketAddress:
12748 * A UNIX-domain (local) socket address, corresponding to a
12749 * <type>struct sockaddr_un</type>.
12754 * g_file_info_get_attribute_status:
12755 * @info: a #GFileInfo
12756 * @attribute: a file attribute key
12758 * Gets the attribute status for an attribute key.
12759 * %G_FILE_ATTRIBUTE_STATUS_UNSET if the key is invalid.
12761 * Returns: a #GFileAttributeStatus for the given @attribute, or
12766 * g_cancellable_get_fd:
12767 * @cancellable: a #GCancellable.
12769 * Gets the file descriptor for a cancellable job. This can be used to
12770 * implement cancellable operations on Unix systems. The returned fd will
12771 * turn readable when @cancellable is cancelled.
12772 * You are not supposed to read from the fd yourself, just check for
12773 * readable status. Reading to unset the readable status is done
12774 * with g_cancellable_reset().
12775 * After a successful return from this function, you should use
12776 * g_cancellable_release_fd() to free up resources allocated for
12777 * the returned file descriptor.
12778 * See also g_cancellable_make_pollfd().
12779 * is not supported, or on errors.
12781 * Returns: A valid file descriptor. %-1 if the file descriptor
12788 * A #GSocketConnectable for resolving a SRV record and connecting to
12794 * g_dbus_message_get_path:
12795 * @message: A #GDBusMessage.
12797 * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_PATH header field.
12799 * Returns: The value.
12805 * g_file_attribute_matcher_matches_only:
12806 * @matcher: a #GFileAttributeMatcher.
12807 * @attribute: a file attribute key.
12809 * Checks if a attribute matcher only matches a given attribute. Always
12810 * returns %FALSE if "*" was used when creating the matcher.
12812 * Returns: %TRUE if the matcher only matches @attribute. %FALSE otherwise.
12817 * g_drive_can_eject:
12818 * @drive: a #GDrive.
12820 * Checks if a drive can be ejected.
12822 * Returns: %TRUE if the @drive can be ejected, %FALSE otherwise.
12827 * SECTION:ginetaddres:
12828 * @short_description: An IPv4/IPv6 address
12830 * #GInetAddress represents an IPv4 or IPv6 internet address. Use
12831 * g_resolver_lookup_by_name() or g_resolver_lookup_by_name_async() to
12832 * look up the #GInetAddress for a hostname. Use
12833 * g_resolver_lookup_by_address() or
12834 * g_resolver_lookup_by_address_async() to look up the hostname for a
12836 * To actually connect to a remote host, you will need a
12837 * #GInetSocketAddress (which includes a #GInetAddress as well as a
12843 * g_output_stream_close_finish:
12844 * @stream: a #GOutputStream.
12845 * @result: a #GAsyncResult.
12846 * @error: a #GError location to store the error occuring, or %NULL to ignore.
12848 * Closes an output stream.
12850 * Returns: %TRUE if stream was successfully closed, %FALSE otherwise.
12855 * g_dbus_message_bytes_needed:
12856 * @blob: A blob represent a binary D-Bus message.
12857 * @blob_len: The length of @blob (must be at least 16).
12858 * @error: Return location for error or %NULL.
12860 * Utility function to calculate how many bytes are needed to
12861 * completely deserialize the D-Bus message stored at @blob.
12862 * determine the size).
12864 * Returns: Number of bytes needed or -1 if @error is set (e.g. if
12870 * g_socket_listener_accept_socket_async:
12871 * @listener: a #GSocketListener
12872 * @cancellable: a #GCancellable, or %NULL
12873 * @callback: a #GAsyncReadyCallback
12874 * @user_data: user data for the callback
12876 * This is the asynchronous version of g_socket_listener_accept_socket().
12877 * When the operation is finished @callback will be
12878 * called. You can then call g_socket_listener_accept_socket_finish()
12879 * to get the result of the operation.
12886 * g_unix_credentials_message_new:
12888 * Creates a new #GUnixCredentialsMessage with credentials matching the current processes.
12890 * Returns: a new #GUnixCredentialsMessage
12896 * get_all_desktop_entries_for_mime_type:
12897 * @mime_type: a mime type.
12898 * @except: NULL or a strv list
12900 * Returns all the desktop ids for @mime_type. The desktop files
12901 * are listed in an order so that default applications are listed before
12902 * non-default ones, and handlers for inherited mimetypes are listed
12903 * after the base ones.
12904 * Optionally doesn't list the desktop ids given in the @except
12905 * to handle @mime_type.
12907 * Returns: a #GList containing the desktop ids which claim
12912 * GPermission:allowed:
12914 * %TRUE if the caller currently has permission to perform the action that
12919 * g_application_command_line_get_platform_data:
12920 * @cmdline: #GApplicationCommandLine
12922 * Gets the platform data associated with the invocation of @cmdline.
12923 * This is a #GVariant dictionary containing information about the
12924 * context in which the invocation occured. It typically contains
12925 * information like the current working directory and the startup
12927 * For local invocation, it will be %NULL.
12929 * Returns: the platform data, or %NULL
12935 * g_file_info_set_symlink_target:
12936 * @info: a #GFileInfo.
12937 * @symlink_target: a static string containing a path to a symlink target.
12939 * Sets the %G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET attribute in the file info
12940 * to the given symlink target.
12945 * g_unix_mount_point_compare:
12946 * @mount1: a #GUnixMount.
12947 * @mount2: a #GUnixMount.
12949 * Compares two unix mount points.
12950 * or less than @mount2, respectively.
12952 * Returns: 1, 0 or -1 if @mount1 is greater than, equal to,
12957 * g_file_info_get_attribute_int32:
12958 * @info: a #GFileInfo.
12959 * @attribute: a file attribute key.
12961 * Gets a signed 32-bit integer contained within the attribute. If the
12962 * attribute does not contain a signed 32-bit integer, or is invalid,
12963 * 0 will be returned.
12965 * Returns: a signed 32-bit integer from the attribute.
12970 * g_unix_fd_list_steal_fds:
12971 * @list: a #GUnixFDList
12972 * @length: pointer to the length of the returned array, or %NULL
12974 * Returns the array of file descriptors that is contained in this
12976 * After this call, the descriptors are no longer contained in
12977 * descriptors have been added).
12978 * The return result of this function must be freed with g_free().
12979 * The caller is also responsible for closing all of the file
12980 * descriptors. The file descriptors in the array are set to
12982 * If @length is non-%NULL then it is set to the number of file
12983 * descriptors in the returned array. The returned array is also
12984 * terminated with -1.
12985 * This function never returns %NULL. In case there are no file
12986 * descriptors contained in @list, an empty array is returned.
12988 * Returns: an array of file descriptors
12994 * g_dbus_message_set_byte_order:
12995 * @message: A #GDBusMessage.
12996 * @byte_order: The byte order.
12998 * Sets the byte order of @message.
13003 * GDrive::disconnected:
13004 * @drive: a #GDrive.
13006 * This signal is emitted when the #GDrive have been
13007 * disconnected. If the recipient is holding references to the
13008 * object they should release them so the object can be
13014 * g_file_set_attribute_uint32:
13015 * @file: input #GFile.
13016 * @attribute: a string containing the attribute's name.
13017 * @value: a #guint32 containing the attribute's new value.
13018 * @flags: a #GFileQueryInfoFlags.
13019 * @cancellable: optional #GCancellable object, %NULL to ignore.
13020 * @error: a #GError, or %NULL
13022 * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_UINT32 to @value.
13023 * If @attribute is of a different type, this operation will fail.
13024 * If @cancellable is not %NULL, then the operation can be cancelled by
13025 * triggering the cancellable object from another thread. If the operation
13026 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
13027 * in the @file, %FALSE otherwise.
13029 * Returns: %TRUE if the @attribute was successfully set to @value
13034 * g_file_has_prefix:
13035 * @file: input #GFile.
13036 * @prefix: input #GFile.
13038 * Checks whether @file has the prefix specified by @prefix. In other word,
13039 * if the names of inital elements of @file<!-- -->s pathname match @prefix.
13040 * Only full pathname elements are matched, so a path like /foo is not
13041 * considered a prefix of /foobar, only of /foo/bar.
13042 * This call does no i/o, as it works purely on names. As such it can
13043 * sometimes return %FALSE even if @file is inside a @prefix (from a
13044 * filesystem point of view), because the prefix of @file is an alias
13046 * %FALSE otherwise.
13048 * Virtual: prefix_matches
13049 * Returns: %TRUE if the @files's parent, grandparent, etc is @prefix.
13054 * SECTION:gfileattribut:
13055 * @short_description: Key-Value Paired File Attributes
13056 * @include: gio/gio.h
13057 * @see_also: #GFile, #GFileInfo
13059 * File attributes in GIO consist of a list of key-value pairs.
13060 * Keys are strings that contain a key namespace and a key name, separated
13061 * by a colon, e.g. "namespace:keyname". Namespaces are included to sort
13062 * key-value pairs by namespaces for relevance. Keys can be retrived
13063 * using wildcards, e.g. "standard::*" will return all of the keys in the
13064 * "standard" namespace.
13065 * Values are stored within the list in #GFileAttributeValue structures.
13066 * Values can store different types, listed in the enum #GFileAttributeType.
13067 * Upon creation of a #GFileAttributeValue, the type will be set to
13068 * %G_FILE_ATTRIBUTE_TYPE_INVALID.
13069 * The list of possible attributes for a filesystem (pointed to by a #GFile) is
13070 * availible as a #GFileAttributeInfoList. This list is queryable by key names
13071 * as indicated earlier.
13072 * Classes that implement #GFileIface will create a #GFileAttributeInfoList and
13073 * install default keys and values for their given file system, architecture,
13074 * and other possible implementation details (e.g., on a UNIX system, a file
13075 * attribute key will be registered for the user id for a given file).
13078 * <title>GFileAttributes Default Namespaces</title>
13079 * <tgroup cols='2' align='left'><thead>
13080 * <row><entry>Namspace</entry><entry>Description</entry></row>
13083 * <row><entry>"standard"</entry><entry>The "Standard" namespace. General file
13084 * information that any application may need should be put in this namespace.
13085 * Examples include the file's name, type, and size.</entry></row>
13086 * <row><entry>"etag"</entry><entry>The <link linkend="gfile-etag">"Entity Tag"</link>
13087 * namespace. Currently, the only key in this namespace is "value", which contains
13088 * the value of the current entity tag.</entry></row>
13089 * <row><entry>"id"</entry><entry>The "Identification" namespace. This
13090 * namespace is used by file managers and applications that list directories
13091 * to check for loops and to uniquely identify files.</entry></row>
13092 * <row><entry>"access"</entry><entry>The "Access" namespace. Used to check
13093 * if a user has the proper privilidges to access files and perform
13094 * file operations. Keys in this namespace are made to be generic
13095 * and easily understood, e.g. the "can_read" key is %TRUE if
13096 * the current user has permission to read the file. UNIX permissions and
13097 * NTFS ACLs in Windows should be mapped to these values.</entry></row>
13098 * <row><entry>"mountable"</entry><entry>The "Mountable" namespace. Includes
13099 * simple boolean keys for checking if a file or path supports mount operations, e.g.
13100 * mount, unmount, eject. These are used for files of type %G_FILE_TYPE_MOUNTABLE.</entry></row>
13101 * <row><entry>"time"</entry><entry>The "Time" namespace. Includes file
13102 * access, changed, created times. </entry></row>
13103 * <row><entry>"unix"</entry><entry>The "Unix" namespace. Includes UNIX-specific
13104 * information and may not be available for all files. Examples include
13105 * the UNIX "UID", "GID", etc.</entry></row>
13106 * <row><entry>"dos"</entry><entry>The "DOS" namespace. Includes DOS-specific
13107 * information and may not be available for all files. Examples include
13108 * "is_system" for checking if a file is marked as a system file, and "is_archive"
13109 * for checking if a file is marked as an archive file.</entry></row>
13110 * <row><entry>"owner"</entry><entry>The "Owner" namespace. Includes information
13111 * about who owns a file. May not be available for all file systems. Examples include
13112 * "user" for getting the user name of the file owner. This information is often mapped from
13113 * some backend specific data such as a unix UID.</entry></row>
13114 * <row><entry>"thumbnail"</entry><entry>The "Thumbnail" namespace. Includes
13115 * information about file thumbnails and their location within the file system. Exaples of
13116 * keys in this namespace include "path" to get the location of a thumbnail, and "failed"
13117 * to check if thumbnailing of the file failed.</entry></row>
13118 * <row><entry>"filesystem"</entry><entry>The "Filesystem" namespace. Gets information
13119 * about the file system where a file is located, such as its type, how much
13120 * space is left available, and the overall size of the file system.</entry></row>
13121 * <row><entry>"gvfs"</entry><entry>The "GVFS" namespace. Keys in this namespace
13122 * contain information about the current GVFS backend in use. </entry></row>
13123 * <row><entry>"xattr"</entry><entry>The "xattr" namespace. Gets information
13124 * about extended user attributes. See attr(5). The "user." prefix of the
13125 * extended user attribute name is stripped away when constructing keys in
13126 * this namespace, e.g. "xattr::mime_type" for the extended attribute with
13127 * the name "user.mime_type". Note that this information is only available
13128 * if GLib has been built with extended attribute support.</entry></row>
13129 * <row><entry>"xattr-sys"</entry><entry>The "xattr-sys" namespace.
13130 * Gets information about extended attributes which are not user-specific.
13131 * See attr(5). Note that this information is only available if GLib
13132 * has been built with extended attribute support.</entry></row>
13133 * <row><entry>"selinux"</entry><entry>The "SELinux" namespace. Includes
13134 * information about the SELinux context of files. Note that this information
13135 * is only available if GLib has been built with SELinux support.</entry></row>
13140 * Please note that these are not all of the possible namespaces.
13141 * More namespaces can be added from GIO modules or by individual applications.
13142 * For more information about writing GIO modules, see #GIOModule.
13143 * <!-- TODO: Implementation note about using extended attributes on supported
13146 * <title>GFileAttributes Built-in Keys and Value Types</title>
13147 * <tgroup cols='3' align='left'><thead>
13148 * <row><entry>Enum Value</entry><entry>Namespace:Key</entry><entry>Value Type</entry></row>
13150 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_TYPE</entry><entry>standard::type</entry><entry>uint32 (#GFileType)</entry></row>
13151 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN</entry><entry>standard::is-hidden</entry><entry>boolean</entry></row>
13152 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP</entry><entry>standard::is-backup</entry><entry>boolean</entry></row>
13153 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK</entry><entry>standard::is-symlink</entry><entry>boolean</entry></row>
13154 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL</entry><entry>standard::is-virtual</entry><entry>boolean</entry></row>
13155 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_NAME</entry><entry>standard::name</entry><entry>byte string</entry></row>
13156 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME</entry><entry>standard::display-name</entry><entry>string</entry></row>
13157 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME</entry><entry>standard::edit-name</entry><entry>string</entry></row>
13158 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_ICON</entry><entry>standard::icon</entry><entry>object (#GIcon)</entry></row>
13159 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE</entry><entry>standard::content-type</entry><entry>string</entry></row>
13160 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE</entry><entry>standard::fast-content-type</entry><entry>string</entry></row>
13161 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_SIZE</entry><entry>standard::size</entry><entry>uint64</entry></row>
13162 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE</entry><entry>standard::allocated-size</entry><entry>uint64</entry></row>
13163 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET</entry><entry>standard::symlink-target</entry><entry>byte string</entry></row>
13164 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_TARGET_URI</entry><entry>standard::target-uri</entry><entry>string</entry></row>
13165 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER</entry><entry>standard::sort-order</entry><entry>int32</entry></row>
13166 * <row><entry>%G_FILE_ATTRIBUTE_ETAG_VALUE</entry><entry>etag::value</entry><entry>string</entry></row>
13167 * <row><entry>%G_FILE_ATTRIBUTE_ID_FILE</entry><entry>id::file</entry><entry>string</entry></row>
13168 * <row><entry>%G_FILE_ATTRIBUTE_ID_FILESYSTEM</entry><entry>id::filesystem</entry><entry>string</entry></row>
13169 * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_READ</entry><entry>access::can-read</entry><entry>boolean</entry></row>
13170 * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE</entry><entry>access::can-write</entry><entry>boolean</entry></row>
13171 * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE</entry><entry>access::can-execute</entry><entry>boolean</entry></row>
13172 * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE</entry><entry>access::can-delete</entry><entry>boolean</entry></row>
13173 * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH</entry><entry>access::can-trash</entry><entry>boolean</entry></row>
13174 * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME</entry><entry>access::can-rename</entry><entry>boolean</entry></row>
13175 * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT</entry><entry>mountable::can-mount</entry><entry>boolean</entry></row>
13176 * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT</entry><entry>mountable::can-unmount</entry><entry>boolean</entry></row>
13177 * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT</entry><entry>mountable::can-eject</entry><entry>boolean</entry></row>
13178 * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE</entry><entry>mountable::unix-device</entry><entry>uint32</entry></row>
13179 * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE</entry><entry>mountable::unix-device-file</entry><entry>string</entry></row>
13180 * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI</entry><entry>mountable::hal-udi</entry><entry>string</entry></row>
13181 * <row><entry>%G_FILE_ATTRIBUTE_TIME_MODIFIED</entry><entry>time::modified</entry><entry>uint64</entry></row>
13182 * <row><entry>%G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC</entry><entry>time::modified-usec</entry><entry>uint32</entry></row>
13183 * <row><entry>%G_FILE_ATTRIBUTE_TIME_ACCESS</entry><entry>time::access</entry><entry>uint64</entry></row>
13184 * <row><entry>%G_FILE_ATTRIBUTE_TIME_ACCESS_USEC</entry><entry>time::access-usec</entry><entry>uint32</entry></row>
13185 * <row><entry>%G_FILE_ATTRIBUTE_TIME_CHANGED</entry><entry>time::changed</entry><entry>uint64</entry></row>
13186 * <row><entry>%G_FILE_ATTRIBUTE_TIME_CHANGED_USEC</entry><entry>time::changed-usec</entry><entry>uint32</entry></row>
13187 * <row><entry>%G_FILE_ATTRIBUTE_TIME_CREATED</entry><entry>time::created</entry><entry>uint64</entry></row>
13188 * <row><entry>%G_FILE_ATTRIBUTE_TIME_CREATED_USEC</entry><entry>time::created-usec</entry><entry>uint32</entry></row>
13189 * <row><entry>%G_FILE_ATTRIBUTE_UNIX_DEVICE</entry><entry>unix::device</entry><entry>uint32</entry></row>
13190 * <row><entry>%G_FILE_ATTRIBUTE_UNIX_INODE</entry><entry>unix::inode</entry><entry>uint64</entry></row>
13191 * <row><entry>%G_FILE_ATTRIBUTE_UNIX_MODE</entry><entry>unix::mode</entry><entry>uint32</entry></row>
13192 * <row><entry>%G_FILE_ATTRIBUTE_UNIX_NLINK</entry><entry>unix::nlink</entry><entry>uint32</entry></row>
13193 * <row><entry>%G_FILE_ATTRIBUTE_UNIX_UID</entry><entry>unix::uid</entry><entry>uint32</entry></row>
13194 * <row><entry>%G_FILE_ATTRIBUTE_UNIX_GID</entry><entry>unix::gid</entry><entry>uint32</entry></row>
13195 * <row><entry>%G_FILE_ATTRIBUTE_UNIX_RDEV</entry><entry>unix::rdev</entry><entry>uint32</entry></row>
13196 * <row><entry>%G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE</entry><entry>unix::block-size</entry><entry>uint32</entry></row>
13197 * <row><entry>%G_FILE_ATTRIBUTE_UNIX_BLOCKS</entry><entry>unix::blocks</entry><entry>uint64</entry></row>
13198 * <row><entry>%G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT</entry><entry>unix::is-mountpoint</entry><entry>boolean</entry></row>
13199 * <row><entry>%G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE</entry><entry>dos::is-archive</entry><entry>boolean</entry></row>
13200 * <row><entry>%G_FILE_ATTRIBUTE_DOS_IS_SYSTEM</entry><entry>dos::is-system</entry><entry>boolean</entry></row>
13201 * <row><entry>%G_FILE_ATTRIBUTE_OWNER_USER</entry><entry>owner::user</entry><entry>string</entry></row>
13202 * <row><entry>%G_FILE_ATTRIBUTE_OWNER_USER_REAL</entry><entry>owner::user-real</entry><entry>string</entry></row>
13203 * <row><entry>%G_FILE_ATTRIBUTE_OWNER_GROUP</entry><entry>owner::group</entry><entry>string</entry></row>
13204 * <row><entry>%G_FILE_ATTRIBUTE_THUMBNAIL_PATH</entry><entry>thumbnail::path</entry><entry>bytestring</entry></row>
13205 * <row><entry>%G_FILE_ATTRIBUTE_THUMBNAILING_FAILED</entry><entry>thumbnail::failed</entry><entry>boolean</entry></row>
13206 * <row><entry>%G_FILE_ATTRIBUTE_PREVIEW_ICON</entry><entry>preview::icon</entry><entry>object (#GIcon)</entry></row>
13207 * <row><entry>%G_FILE_ATTRIBUTE_FILESYSTEM_SIZE</entry><entry>filesystem::size</entry><entry>uint64</entry></row>
13208 * <row><entry>%G_FILE_ATTRIBUTE_FILESYSTEM_FREE</entry><entry>filesystem::free</entry><entry>uint64</entry></row>
13209 * <row><entry>%G_FILE_ATTRIBUTE_FILESYSTEM_TYPE</entry><entry>filesystem::type</entry><entry>string</entry></row>
13210 * <row><entry>%G_FILE_ATTRIBUTE_FILESYSTEM_READONLY</entry><entry>filesystem::readonly</entry><entry>boolean</entry></row>
13211 * <row><entry>%G_FILE_ATTRIBUTE_GVFS_BACKEND</entry><entry>gvfs::backend</entry><entry>string</entry></row>
13212 * <row><entry>%G_FILE_ATTRIBUTE_SELINUX_CONTEXT</entry><entry>selinux::context</entry><entry>string</entry></row>
13213 * </tbody></tgroup></table></para>
13214 * Note that there are no predefined keys in the "xattr" and "xattr-sys"
13215 * namespaces. Keys for the "xattr" namespace are constructed by stripping
13216 * away the "user." prefix from the extended user attribute, and prepending
13217 * "xattr::". Keys for the "xattr-sys" namespace are constructed by
13218 * concatenating "xattr-sys::" with the extended attribute name. All extended
13219 * attribute values are returned as hex-encoded strings in which bytes outside
13220 * the ASCII range are encoded as hexadecimal escape sequences of the form
13221 * \x<replaceable>nn</replaceable>.
13227 * @drive: a #GDrive.
13228 * @flags: flags affecting the unmount if required for eject
13229 * @cancellable: optional #GCancellable object, %NULL to ignore.
13230 * @callback: a #GAsyncReadyCallback, or %NULL.
13231 * @user_data: user data to pass to @callback
13233 * Asynchronously ejects a drive.
13234 * When the operation is finished, @callback will be called.
13235 * You can then call g_drive_eject_finish() to obtain the
13236 * result of the operation.
13238 * Deprecated: 2.22: Use g_drive_eject_with_operation() instead.
13243 * GVolumeMonitor::drive-stop-button:
13244 * @volume_monitor: The volume monitor emitting the signal.
13245 * @drive: the drive where the stop button was pressed
13247 * Emitted when the stop button is pressed on @drive.
13254 * SECTION:gasynchelpe:
13255 * @short_description: Asynchronous Helper Functions
13256 * @include: gio/gio.h
13257 * @see_also: #GAsyncReady
13259 * Provides helper functions for asynchronous operations.
13264 * g_drive_get_start_stop_type:
13265 * @drive: a #GDrive.
13267 * Gets a hint about how a drive can be started/stopped.
13269 * Returns: A value from the #GDriveStartStopType enumeration.
13275 * g_dbus_connection_new_finish:
13276 * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_new().
13277 * @error: Return location for error or %NULL.
13279 * Finishes an operation started with g_dbus_connection_new().
13281 * Returns: A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
13288 * @bus_type: The type of bus to own a name on.
13289 * @name: The well-known name to own.
13290 * @flags: A set of flags from the #GBusNameOwnerFlags enumeration.
13291 * @bus_acquired_handler: Handler to invoke when connected to the bus of type @bus_type or %NULL.
13292 * @name_acquired_handler: Handler to invoke when @name is acquired or %NULL.
13293 * @name_lost_handler: Handler to invoke when @name is lost or %NULL.
13294 * @user_data: User data to pass to handlers.
13295 * @user_data_free_func: Function for freeing @user_data or %NULL.
13297 * Starts acquiring @name on the bus specified by @bus_type and calls
13298 * acquired respectively lost. Callbacks will be invoked in the <link
13299 * linkend="g-main-context-push-thread-default">thread-default main
13300 * loop</link> of the thread you are calling this function from.
13301 * You are guaranteed that one of the @name_acquired_handler and @name_lost_handler
13302 * callbacks will be invoked after calling this function - there are three
13306 * </para></listitem>
13308 * </para></listitem>
13310 * </para></listitem>
13312 * When you are done owning the name, just call g_bus_unown_name()
13313 * with the owner id this function returns.
13314 * If the name is acquired or lost (for example another application
13315 * could acquire the name if you allow replacement or the application
13316 * currently owning the name exits), the handlers are also invoked. If the
13317 * #GDBusConnection that is used for attempting to own the name
13318 * closes, then @name_lost_handler is invoked since it is no
13319 * longer possible for other processes to access the process.
13320 * You cannot use g_bus_own_name() several times for the same name (unless
13321 * interleaved with calls to g_bus_unown_name()) - only the first call
13323 * Another guarantee is that invocations of @name_acquired_handler
13324 * and @name_lost_handler are guaranteed to alternate; that
13325 * is, if @name_acquired_handler is invoked then you are
13326 * guaranteed that the next time one of the handlers is invoked, it
13327 * will be @name_lost_handler. The reverse is also true.
13328 * If you plan on exporting objects (using e.g.
13329 * g_dbus_connection_register_object()), note that it is generally too late
13330 * to export the objects in @name_acquired_handler. Instead, you can do this
13331 * in @bus_acquired_handler since you are guaranteed that this will run
13332 * before @name is requested from the bus.
13333 * This behavior makes it very simple to write applications that wants
13334 * to own names and export objects, see <xref linkend="gdbus-owning-names"/>.
13335 * Simply register objects to be exported in @bus_acquired_handler and
13336 * unregister the objects (if any) in @name_lost_handler.
13337 * g_bus_unown_name() to stop owning the name.
13339 * Returns: An identifier (never 0) that an be used with
13345 * g_dbus_message_get_error_name:
13346 * @message: A #GDBusMessage.
13348 * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field.
13350 * Returns: The value.
13356 * GDBusProxy:g-name-owner:
13358 * The unique name that owns #GDBusProxy:name or %NULL if no-one
13359 * currently owns that name. You may connect to #GObject::notify signal to
13360 * track changes to this property.
13368 * @socket: a #GSocket
13369 * @error: #GError for error reporting, or %NULL to ignore.
13371 * Closes the socket, shutting down any active connection.
13372 * Closing a socket does not wait for all outstanding I/O operations
13373 * to finish, so the caller should not rely on them to be guaranteed
13374 * to complete even if the close returns with no error.
13375 * Once the socket is closed, all other operations will return
13376 * %G_IO_ERROR_CLOSED. Closing a socket multiple times will not
13378 * Sockets will be automatically closed when the last reference
13379 * is dropped, but you might want to call this function to make sure
13380 * resources are released as early as possible.
13381 * Beware that due to the way that TCP works, it is possible for
13382 * recently-sent data to be lost if either you close a socket while the
13383 * %G_IO_IN condition is set, or else if the remote connection tries to
13384 * send something to you after you close the socket but before it has
13385 * finished reading all of the data you sent. There is no easy generic
13386 * way to avoid this problem; the easiest fix is to design the network
13387 * protocol such that the client will never send data "out of turn".
13388 * Another solution is for the server to half-close the connection by
13389 * calling g_socket_shutdown() with only the @shutdown_write flag set,
13390 * and then wait for the client to notice this and close its side of the
13391 * connection, after which the server can safely call g_socket_close().
13392 * (This is what #GTcpConnection does if you call
13393 * g_tcp_connection_set_graceful_disconnect(). But of course, this
13394 * only works if the client will close its connection after the server
13397 * Returns: %TRUE on success, %FALSE on error
13403 * g_dbus_proxy_new_for_bus:
13404 * @bus_type: A #GBusType.
13405 * @flags: Flags used when constructing the proxy.
13406 * @info: A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL.
13407 * @name: A bus name (well-known or unique).
13408 * @object_path: An object path.
13409 * @interface_name: A D-Bus interface name.
13410 * @cancellable: A #GCancellable or %NULL.
13411 * @callback: Callback function to invoke when the proxy is ready.
13412 * @user_data: User data to pass to @callback.
13414 * Like g_dbus_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
13415 * See <xref linkend="gdbus-wellknown-proxy"/> for an example of how #GDBusProxy can be used.
13422 * g_dbus_message_print:
13423 * @message: A #GDBusMessage.
13424 * @indent: Indentation level.
13426 * Produces a human-readable multi-line description of @message.
13427 * The contents of the description has no ABI guarantees, the contents
13428 * and formatting is subject to change at any time. Typical output
13429 * looks something like this:
13432 * path -> objectpath '/org/gtk/GDBus/TestObject'
13433 * interface -> 'org.gtk.GDBus.TestInterface'
13434 * member -> 'GimmeStdout'
13435 * destination -> ':1.146'
13436 * UNIX File Descriptors:
13438 * </programlisting>
13442 * reply-serial -> uint32 4
13443 * destination -> ':1.159'
13444 * sender -> ':1.146'
13445 * num-unix-fds -> uint32 1
13446 * UNIX File Descriptors:
13447 * </programlisting>
13449 * Type: method-return
13450 * Flags: no-reply-expected
13454 * Fd 12: dev=0:10,mode=020620,ino=5,uid=500,gid=5,rdev=136:2,size=0,atime=1273085037,mtime=1273085851,ctime=1272982635
13455 * Returns: A string that should be freed with g_free().
13461 * g_simple_async_result_set_error_va:
13462 * @simple: a #GSimpleAsyncResult.
13463 * @domain: a #GQuark (usually #G_IO_ERROR).
13464 * @code: an error code.
13465 * @format: a formatted error reporting string.
13466 * @args: va_list of arguments.
13468 * Sets an error within the asynchronous result without a #GError.
13469 * Unless writing a binding, see g_simple_async_result_set_error().
13474 * g_permission_get_allowed:
13475 * @permission: a #GPermission instance
13476 * @returns: the value of the 'allowed' property
13478 * Gets the value of the 'allowed' property. This property is %TRUE if
13479 * the caller currently has permission to perform the action that
13486 * g_settings_get_mapped:
13487 * @settings: a #GSettings object
13488 * @key: the key to get the value for
13489 * @mapping: the function to map the value in the settings database to the value used by the application
13490 * @user_data: user data for @mapping
13491 * @returns: (transfer full): the result, which may be %NULL
13493 * Gets the value that is stored at @key in @settings, subject to
13494 * application-level validation/mapping.
13495 * You should use this function when the application needs to perform
13496 * some processing on the value of the key (for example, parsing). The
13497 * indicates that the processing was unsuccessful (due to a parse error,
13498 * for example) then the mapping is tried again with another value.
13499 * This allows a robust 'fall back to defaults' behaviour to be
13500 * implemented somewhat automatically.
13501 * The first value that is tried is the user's setting for the key. If
13502 * the mapping function fails to map this value, other values may be
13503 * tried in an unspecified order (system or site defaults, translated
13504 * schema default values, untranslated schema default values, etc).
13505 * If the mapping function fails for all possible values, one additional
13506 * If the mapping function still indicates failure at this point then
13507 * the application will be aborted.
13508 * The result parameter for the @mapping function is pointed to a
13509 * #gpointer which is initially set to %NULL. The same pointer is given
13510 * to each invocation of @mapping. The final value of that #gpointer is
13511 * what is returned by this function. %NULL is valid; it is returned
13512 * just as any other value would be.
13514 * Attempt is made: the mapping function is called with a %NULL value.
13519 * g_srv_target_get_priority:
13520 * @target: a #GSrvTarget
13522 * Gets @target's priority. You should not need to look at this;
13523 * #GResolver already sorts the targets according to the algorithm in
13526 * Returns: @target's priority
13532 * GActionGroup::action-state-changed:
13533 * @action_group: the #GActionGroup that changed
13534 * @action_name: the name of the action in @action_group
13535 * @value: the new value of the state
13537 * Signals that the state of the named action has changed.
13544 * g_mount_operation_get_choice:
13545 * @op: a #GMountOperation.
13547 * Gets a choice from the mount operation.
13548 * the choice's list, or %0.
13550 * Returns: an integer containing an index of the user's choice from
13555 * g_zlib_decompressor_new:
13556 * @format: The format to use for the compressed data
13558 * Creates a new #GZlibDecompressor.
13560 * Returns: a new #GZlibDecompressor
13566 * g_network_service_get_scheme:
13567 * @srv: a #GNetworkService
13569 * Get's the URI scheme used to resolve proxies. By default, the service name
13570 * is used as scheme.
13572 * Returns: @srv's scheme name
13578 * g_dbus_proxy_set_cached_property:
13579 * @proxy: A #GDBusProxy
13580 * @property_name: Property name.
13581 * @value: Value for the property or %NULL to remove it from the cache.
13583 * If @value is not %NULL, sets the cached value for the property with
13584 * name @property_name to the value in @value.
13585 * If @value is %NULL, then the cached value is removed from the
13587 * If @proxy has an expected interface (see
13588 * #GDBusProxy:g-interface-info), then @property_name (for existence)
13589 * and @value (for the type) is checked against it.
13590 * If the @value #GVariant is floating, it is consumed. This allows
13591 * convenient 'inline' use of g_variant_new(), e.g.
13593 * g_dbus_proxy_set_cached_property (proxy,
13595 * g_variant_new ("(si)",
13599 * Normally you will not need to use this method since @proxy is
13600 * tracking changes using the
13601 * <literal>org.freedesktop.DBus.Properties.PropertiesChanged</literal>
13602 * D-Bus signal. However, for performance reasons an object may decide
13603 * to not use this signal for some properties and instead use a
13604 * proprietary out-of-band mechanism to transmit changes.
13605 * As a concrete example, consider an object with a property
13606 * <literal>ChatroomParticipants</literal> which is an array of
13607 * strings. Instead of transmitting the same (long) array every time
13608 * the property changes, it is more efficient to only transmit the
13609 * delta using e.g. signals <literal>ChatroomParticipantJoined(String
13610 * name)</literal> and <literal>ChatroomParticipantParted(String
13618 * g_unix_fd_message_append_fd:
13619 * @message: a #GUnixFDMessage
13620 * @fd: a valid open file descriptor
13621 * @error: a #GError pointer
13623 * Adds a file descriptor to @message.
13624 * The file descriptor is duplicated using dup(). You keep your copy
13625 * of the descriptor and the copy contained in @message will be closed
13626 * when @message is finalized.
13627 * A possible cause of failure is exceeding the per-process or
13628 * system-wide file descriptor limit.
13630 * Returns: %TRUE in case of success, else %FALSE (and @error is set)
13636 * g_file_unmount_mountable_with_operation_finish:
13637 * @file: input #GFile.
13638 * @result: a #GAsyncResult.
13639 * @error: a #GError, or %NULL
13641 * Finishes an unmount operation, see g_file_unmount_mountable_with_operation() for details.
13642 * Finish an asynchronous unmount operation that was started
13643 * with g_file_unmount_mountable_with_operation().
13646 * Returns: %TRUE if the operation finished successfully. %FALSE
13652 * g_simple_async_result_set_handle_cancellation:
13653 * @simple: a #GSimpleAsyncResult.
13654 * @handle_cancellation: a #gboolean.
13656 * Sets whether to handle cancellation within the asynchronous operation.
13661 * g_dbus_method_invocation_return_value:
13662 * @invocation: A #GDBusMethodInvocation.
13663 * @parameters: A #GVariant tuple with out parameters for the method or %NULL if not passing any parameters.
13665 * Finishes handling a D-Bus method call by returning @parameters.
13666 * If the @parameters GVariant is floating, it is consumed.
13667 * It is an error if @parameters is not of the right format.
13668 * This method will free @invocation, you cannot use it afterwards.
13677 * A socket endpoint address, corresponding to <type>struct sockaddr</type>
13678 * or one of its subtypes.
13683 * g_io_stream_close_finish:
13684 * @stream: a #GIOStream
13685 * @result: a #GAsyncResult
13686 * @error: a #GError location to store the error occuring, or %NULL to ignore
13690 * Returns: %TRUE if stream was successfully closed, %FALSE otherwise.
13696 * g_socket_connection_factory_lookup_type:
13697 * @family: a #GSocketFamily
13698 * @type: a #GSocketType
13699 * @protocol_id: a protocol id
13701 * Looks up the #GType to be used when creating socket connections on
13702 * sockets with the specified @family,@type and @protocol_id.
13703 * If no type is registered, the #GSocketConnection base type is returned.
13705 * Returns: a #GType
13711 * g_file_load_partial_contents_async:
13712 * @file: input #GFile.
13713 * @cancellable: optional #GCancellable object, %NULL to ignore.
13714 * @read_more_callback: a #GFileReadMoreCallback to receive partial data and to specify whether further data should be read.
13715 * @callback: a #GAsyncReadyCallback to call when the request is satisfied
13716 * @user_data: the data to pass to the callback functions.
13718 * Reads the partial contents of a file. A #GFileReadMoreCallback should be
13719 * used to stop reading from the file when appropriate, else this function
13720 * will behave exactly as g_file_load_contents_async(). This operation
13721 * can be finished by g_file_load_partial_contents_finish().
13722 * Users of this function should be aware that @user_data is passed to
13723 * both the @read_more_callback and the @callback.
13724 * If @cancellable is not %NULL, then the operation can be cancelled by
13725 * triggering the cancellable object from another thread. If the operation
13726 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
13731 * g_io_stream_is_closed:
13732 * @stream: a #GIOStream
13734 * Checks if a stream is closed.
13736 * Returns: %TRUE if the stream is closed.
13742 * g_inet_address_get_is_loopback:
13743 * @address: a #GInetAddress
13745 * Tests whether @address is the loopback address for its family.
13747 * Returns: %TRUE if @address is the loopback address for its family.
13753 * g_file_get_parent:
13754 * @file: input #GFile.
13756 * Gets the parent directory for the @file.
13757 * If the @file represents the root directory of the
13758 * file system, then %NULL will be returned.
13759 * This call does no blocking i/o.
13760 * #GFile or %NULL if there is no parent.
13761 * Free the returned object with g_object_unref().
13763 * Returns: (transfer full): a #GFile structure to the parent of the given
13768 * g_application_get_is_registered:
13769 * @application: a #GApplication
13770 * @returns: %TRUE if @application is registered
13772 * Checks if @application is registered.
13773 * An application is registered if g_application_register() has been
13774 * successfully called.
13782 * @hz: the frequency of the new clock in Hz (between 1 and 120)
13783 * @priority: the #GSource priority to run at
13785 * Creates a new #GPeriodic clock.
13786 * The created clock is attached to the thread-default main context in
13787 * effect at the time of the call to this function. See
13788 * g_main_context_push_thread_default() for more information.
13789 * Due to the fact that #GMainContext is only accurate to the nearest
13790 * millisecond, the frequency can not meaningfully get too close to
13791 * 1000. For this reason, it is arbitrarily bounded at 120.
13793 * Returns: a new #GPeriodic
13799 * g_file_parse_name:
13800 * @parse_name: a file name or path to be parsed.
13802 * Constructs a #GFile with the given @parse_name (i.e. something given by g_file_get_parse_name()).
13803 * This operation never fails, but the returned object might not support any I/O
13804 * operation if the @parse_name cannot be parsed.
13806 * Returns: (transfer full): a new #GFile.
13811 * g_simple_async_result_is_valid:
13812 * @result: the #GAsyncResult passed to the _finish function.
13813 * @source: the #GObject passed to the _finish function.
13814 * @source_tag: the asynchronous function.
13816 * Ensures that the data passed to the _finish function of an async
13817 * operation is consistent. Three checks are performed.
13818 * First, @result is checked to ensure that it is really a
13819 * #GSimpleAsyncResult. Second, @source is checked to ensure that it
13820 * matches the source object of @result. Third, @source_tag is
13821 * checked to ensure that it is either %NULL (as it is when the result was
13822 * created by g_simple_async_report_error_in_idle() or
13823 * g_simple_async_report_gerror_in_idle()) or equal to the
13824 * convention, is a pointer to the _async function corresponding to the
13825 * _finish function from which this function is called).
13827 * Returns: #TRUE if all checks passed or #FALSE if any failed.
13832 * g_action_get_parameter_type:
13833 * @action: a #GAction
13835 * Queries the type of the parameter that must be given when activating
13836 * When activating the action using g_action_activate(), the #GVariant
13837 * given to that function must be of the type returned by this function.
13838 * In the case that this function returns %NULL, you must not give any
13839 * #GVariant, but %NULL instead.
13841 * Returns: (allow-none): the parameter type
13847 * g_dbus_connection_get_exit_on_close:
13848 * @connection: A #GDBusConnection.
13850 * Gets whether the process is terminated when @connection is
13851 * closed by the remote peer. See
13852 * #GDBusConnection:exit-on-close for more details.
13853 * closed by the remote peer.
13855 * Returns: Whether the process is terminated when @connection is
13863 * Gets the local #GVfs for the system.
13865 * Returns: (transfer none): a #GVfs.
13870 * g_dbus_message_get_signature:
13871 * @message: A #GDBusMessage.
13873 * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field.
13875 * Returns: The value.
13881 * g_file_info_get_attribute_data:
13882 * @info: a #GFileInfo
13883 * @attribute: a file attribute key
13884 * @type: (out) (allow-none): return location for the attribute type, or %NULL
13885 * @value_pp: (out) (allow-none): return location for the attribute value, or %NULL
13886 * @status: (out) (allow-none): return location for the attribute status, or %NULL
13888 * Gets the attribute type, value and status for an attribute key.
13889 * %FALSE otherwise.
13891 * Returns: (transfer none): %TRUE if @info has an attribute named @attribute,
13896 * SECTION:gsrvtarge:
13897 * @short_description: DNS SRV record target
13898 * @include: gio/gio.h
13900 * SRV (service) records are used by some network protocols to provide
13901 * service-specific aliasing and load-balancing. For example, XMPP
13902 * (Jabber) uses SRV records to locate the XMPP server for a domain;
13903 * rather than connecting directly to "example.com" or assuming a
13904 * specific server hostname like "xmpp.example.com", an XMPP client
13905 * would look up the "xmpp-client" SRV record for "example.com", and
13906 * then connect to whatever host was pointed to by that record.
13907 * You can use g_resolver_lookup_service() or
13908 * g_resolver_lookup_service_async() to find the #GSrvTarget<!-- -->s
13909 * for a given service. However, if you are simply planning to connect
13910 * to the remote service, you can use #GNetworkService's
13911 * #GSocketConnectable interface and not need to worry about
13912 * #GSrvTarget at all.
13917 * g_proxy_resolver_is_supported:
13918 * @resolver: a #GProxyResolver
13920 * Checks if @resolver can be used on this system. (This is used
13921 * internally; g_proxy_resolver_get_default() will only return a proxy
13922 * resolver that returns %TRUE for this method.)
13924 * Returns: %TRUE if @resolver is supported.
13930 * GSettings::writable-change-event:
13931 * @settings: the object on which the signal was emitted
13932 * @key: the quark of the key, or 0
13933 * @returns: %TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.
13935 * The "writable-change-event" signal is emitted once per writability
13936 * change event that affects this settings object. You should connect
13937 * to this signal if you are interested in viewing groups of changes
13938 * before they are split out into multiple emissions of the
13939 * "writable-changed" signal. For most use cases it is more
13940 * appropriate to use the "writable-changed" signal.
13941 * In the event that the writability change applies only to a single
13942 * key, @key will be set to the #GQuark for that key. In the event
13943 * that the writability change affects the entire settings object,
13944 * The default handler for this signal invokes the "writable-changed"
13945 * and "changed" signals for each affected key. This is done because
13946 * changes in writability might also imply changes in value (if for
13947 * example, a new mandatory setting is introduced). If any other
13948 * connected handler returns %TRUE then this default functionality
13949 * will be supressed.
13954 * g_socket_get_keepalive:
13955 * @socket: a #GSocket.
13957 * Gets the keepalive mode of the socket. For details on this,
13958 * see g_socket_set_keepalive().
13960 * Returns: %TRUE if keepalive is active, %FALSE otherwise.
13966 * g_dbus_generate_guid:
13968 * Generate a D-Bus GUID that can be used with
13969 * e.g. g_dbus_connection_new().
13970 * See the D-Bus specification regarding what strings are valid D-Bus
13971 * GUID (for example, D-Bus GUIDs are not RFC-4122 compliant).
13973 * Returns: A valid D-Bus GUID. Free with g_free().
13980 * @short_description: Interface for icons
13981 * @include: gio/gio.h
13983 * #GIcon is a very minimal interface for icons. It provides functions
13984 * for checking the equality of two icons, hashing of icons and
13985 * serializing an icon to and from strings.
13986 * #GIcon does not provide the actual pixmap for the icon as this is out
13987 * of GIO's scope, however implementations of #GIcon may contain the name
13988 * of an icon (see #GThemedIcon), or the path to an icon (see #GLoadableIcon).
13989 * To obtain a hash of a #GIcon, see g_icon_hash().
13990 * To check if two #GIcons are equal, see g_icon_equal().
13991 * For serializing a #GIcon, use g_icon_to_string() and
13992 * g_icon_new_for_string().
13993 * If your application or library provides one or more #GIcon
13994 * implementations you need to ensure that each #GType is registered
13995 * with the type system prior to calling g_icon_new_for_string().
14000 * g_socket_receive:
14001 * @socket: a #GSocket
14002 * @buffer: a buffer to read data into (which should be at least @size bytes long).
14003 * @size: the number of bytes you want to read from the socket
14004 * @cancellable: a %GCancellable or %NULL
14005 * @error: #GError for error reporting, or %NULL to ignore.
14007 * Receive data (up to @size bytes) from a socket. This is mainly used by
14008 * connection-oriented sockets; it is identical to g_socket_receive_from()
14009 * with @address set to %NULL.
14010 * For %G_SOCKET_TYPE_DATAGRAM and %G_SOCKET_TYPE_SEQPACKET sockets,
14011 * g_socket_receive() will always read either 0 or 1 complete messages from
14012 * the socket. If the received message is too large to fit in @buffer, then
14013 * the data beyond @size bytes will be discarded, without any explicit
14014 * indication that this has occurred.
14015 * For %G_SOCKET_TYPE_STREAM sockets, g_socket_receive() can return any
14016 * number of bytes, up to @size. If more than @size bytes have been
14017 * received, the additional data will be returned in future calls to
14018 * g_socket_receive().
14019 * If the socket is in blocking mode the call will block until there is
14020 * some data to receive or there is an error. If there is no data available
14021 * and the socket is in non-blocking mode, a %G_IO_ERROR_WOULD_BLOCK error
14022 * will be returned. To be notified when data is available, wait for the
14023 * %G_IO_IN condition.
14024 * On error -1 is returned and @error is set accordingly.
14026 * Returns: Number of bytes read, or -1 on error
14032 * g_dbus_message_set_unix_fd_list:
14033 * @message: A #GDBusMessage.
14034 * @fd_list: (allow-none): A #GUnixFDList or %NULL.
14036 * Sets the UNIX file descriptors associated with @message. As a
14037 * side-effect the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header
14038 * field is set to the number of fds in @fd_list (or cleared if
14039 * This method is only available on UNIX.
14046 * g_socket_connect:
14047 * @socket: a #GSocket.
14048 * @address: a #GSocketAddress specifying the remote address.
14049 * @cancellable: a %GCancellable or %NULL
14050 * @error: #GError for error reporting, or %NULL to ignore.
14052 * Connect the socket to the specified remote address.
14053 * For connection oriented socket this generally means we attempt to make
14054 * a connection to the @address. For a connection-less socket it sets
14055 * the default address for g_socket_send() and discards all incoming datagrams
14056 * from other sources.
14057 * Generally connection oriented sockets can only connect once, but
14058 * connection-less sockets can connect multiple times to change the
14060 * If the connect call needs to do network I/O it will block, unless
14061 * non-blocking I/O is enabled. Then %G_IO_ERROR_PENDING is returned
14062 * and the user can be notified of the connection finishing by waiting
14063 * for the G_IO_OUT condition. The result of the connection can then be
14064 * checked with g_socket_check_connect_result().
14066 * Returns: %TRUE if connected, %FALSE on error.
14072 * g_file_read_async:
14073 * @file: input #GFile
14074 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
14075 * @cancellable: optional #GCancellable object, %NULL to ignore.
14076 * @callback: a #GAsyncReadyCallback to call when the request is satisfied
14077 * @user_data: the data to pass to callback function
14079 * Asynchronously opens @file for reading.
14080 * For more details, see g_file_read() which is
14081 * the synchronous version of this call.
14082 * When the operation is finished, @callback will be called. You can then call
14083 * g_file_read_finish() to get the result of the operation.
14088 * g_dbus_server_get_flags:
14089 * @server: A #GDBusServer.
14091 * Gets the flags for @server.
14093 * Returns: A set of flags from the #GDBusServerFlags enumeration.
14099 * GMemoryOutputStream:data:
14101 * Pointer to buffer where data will be written.
14108 * g_settings_list_relocatable_schemas:
14110 * Gets a list of the relocatable #GSettings schemas installed on the
14111 * system. These are schemas that do not provide their own path. It is
14112 * usual to instantiate these schemas directly, but if you want to you
14113 * can use g_settings_new_with_path() to specify the path.
14114 * The output of this function, tTaken together with the output of
14115 * g_settings_list_schemas() represents the complete list of all
14116 * installed schemas.
14117 * #GSettings schemas that are available. The list must not be
14118 * modified or freed.
14120 * Returns: (element-type utf8) (transfer none): a list of relocatable
14127 * @short_description: Mount management
14128 * @include: gio/gio.h
14129 * @see_also: GVolume, GUnixMount
14131 * The #GMount interface represents user-visible mounts. Note, when
14132 * porting from GnomeVFS, #GMount is the moral equivalent of #GnomeVFSVolume.
14133 * #GMount is a "mounted" filesystem that you can access. Mounted is in
14134 * quotes because it's not the same as a unix mount, it might be a gvfs
14135 * mount, but you can still access the files on it if you use GIO. Might or
14136 * might not be related to a volume object.
14137 * Unmounting a #GMount instance is an asynchronous operation. For
14138 * more information about asynchronous operations, see #GAsyncReady
14139 * and #GSimpleAsyncReady. To unmount a #GMount instance, first call
14140 * g_mount_unmount_with_operation() with (at least) the #GMount instance and a
14141 * #GAsyncReadyCallback. The callback will be fired when the
14142 * operation has resolved (either with success or failure), and a
14143 * #GAsyncReady structure will be passed to the callback. That
14144 * callback should then call g_mount_unmount_with_operation_finish() with the #GMount
14145 * and the #GAsyncReady data to see if the operation was completed
14146 * successfully. If an @error is present when g_mount_unmount_with_operation_finish()
14147 * is called, then it will be filled with any error information.
14152 * g_drive_eject_with_operation:
14153 * @drive: a #GDrive.
14154 * @flags: flags affecting the unmount if required for eject
14155 * @mount_operation: a #GMountOperation or %NULL to avoid user interaction.
14156 * @cancellable: optional #GCancellable object, %NULL to ignore.
14157 * @callback: a #GAsyncReadyCallback, or %NULL.
14158 * @user_data: user data passed to @callback.
14160 * Ejects a drive. This is an asynchronous operation, and is
14161 * finished by calling g_drive_eject_with_operation_finish() with the @drive
14162 * and #GAsyncResult data returned in the @callback.
14169 * g_mount_can_unmount:
14170 * @mount: a #GMount.
14172 * Checks if @mount can be mounted.
14174 * Returns: %TRUE if the @mount can be unmounted.
14179 * g_io_error_from_win32_error:
14180 * @error_code: Windows error number.
14182 * Converts some common error codes into GIO error codes. The
14183 * fallback value G_IO_ERROR_FAILED is returned for error codes not
14186 * Returns: #GIOErrorEnum value for the given error number.
14193 * @icon: #gconstpointer to an icon object.
14195 * Gets a hash for an icon.
14196 * use in a #GHashTable or similar data structure.
14199 * Returns: a #guint containing a hash for the @icon, suitable for
14204 * g_application_command_line_get_exit_status:
14205 * @cmdline: a #GApplicationCommandLine
14207 * Gets the exit status of @cmdline. See
14208 * g_application_command_line_set_exit_status() for more information.
14210 * Returns: the exit status
14216 * g_socket_get_listen_backlog:
14217 * @socket: a #GSocket.
14219 * Gets the listen backlog setting of the socket. For details on this,
14220 * see g_socket_set_listen_backlog().
14222 * Returns: the maximum number of pending connections.
14228 * g_async_initable_new_valist_async:
14229 * @object_type: a #GType supporting #GAsyncInitable.
14230 * @first_property_name: the name of the first property, followed by the value, and other property value pairs, and ended by %NULL.
14231 * @var_args: The var args list generated from @first_property_name.
14232 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the operation.
14233 * @cancellable: optional #GCancellable object, %NULL to ignore.
14234 * @callback: a #GAsyncReadyCallback to call when the initialization is finished
14235 * @user_data: the data to pass to callback function
14237 * Helper function for constructing #GAsyncInitiable object. This is
14238 * similar to g_object_new_valist() but also initializes the object
14240 * When the initialization is finished, @callback will be called. You can
14241 * then call g_async_initable_new_finish() to get the new object and check
14249 * g_network_service_get_protocol:
14250 * @srv: a #GNetworkService
14252 * Gets @srv's protocol name (eg, "tcp").
14254 * Returns: @srv's protocol name
14260 * g_unix_fd_message_new:
14262 * Creates a new #GUnixFDMessage containing an empty file descriptor
14265 * Returns: a new #GUnixFDMessage
14271 * g_settings_get_child:
14272 * @settings: a #GSettings object
14273 * @name: the name of the 'child' schema
14274 * @returns: (transfer full): a 'child' settings object
14276 * Creates a 'child' settings object which has a base path of
14277 * <replaceable>base-path</replaceable>/@name", where
14278 * <replaceable>base-path</replaceable> is the base path of @settings.
14279 * The schema for the child settings object must have been declared
14280 * in the schema of @settings using a <tag class="starttag">child</tag> element.
14287 * g_simple_action_group_new:
14289 * Creates a new, empty, #GSimpleActionGroup.
14291 * Returns: a new #GSimpleActionGroup
14297 * g_resolver_lookup_by_address_async:
14298 * @resolver: a #GResolver
14299 * @address: the address to reverse-resolve
14300 * @cancellable: a #GCancellable, or %NULL
14301 * @callback: callback to call after resolution completes
14302 * @user_data: data for @callback
14304 * Begins asynchronously reverse-resolving @address to determine its
14305 * associated hostname, and eventually calls @callback, which must
14306 * call g_resolver_lookup_by_address_finish() to get the final result.
14313 * g_dbus_method_info_ref:
14314 * @info: A #GDBusMethodInfo
14316 * If @info is statically allocated does nothing. Otherwise increases
14317 * the reference count.
14319 * Returns: The same @info.
14325 * g_dbus_connection_signal_subscribe:
14326 * @connection: A #GDBusConnection.
14327 * @sender: Sender name to match on (unique or well-known name) or %NULL to listen from all senders.
14328 * @interface_name: D-Bus interface name to match on or %NULL to match on all interfaces.
14329 * @member: D-Bus signal name to match on or %NULL to match on all signals.
14330 * @object_path: Object path to match on or %NULL to match on all object paths.
14331 * @arg0: Contents of first string argument to match on or %NULL to match on all kinds of arguments.
14332 * @flags: Flags describing how to subscribe to the signal (currently unused).
14333 * @callback: Callback to invoke when there is a signal matching the requested data.
14334 * @user_data: User data to pass to @callback.
14335 * @user_data_free_func: Function to free @user_data with when subscription is removed or %NULL.
14337 * Subscribes to signals on @connection and invokes @callback with a
14338 * whenever the signal is received. Note that @callback
14339 * will be invoked in the <link
14340 * linkend="g-main-context-push-thread-default">thread-default main
14341 * loop</link> of the thread you are calling this method from.
14342 * If @connection is not a message bus connection, @sender must be
14344 * If @sender is a well-known name note that @callback is invoked with
14345 * the unique name for the owner of @sender, not the well-known name
14346 * as one would expect. This is because the message bus rewrites the
14347 * name. As such, to avoid certain race conditions, users should be
14348 * tracking the name owner of the well-known name and use that when
14349 * processing the received signal.
14351 * Returns: A subscription identifier that can be used with g_dbus_connection_signal_unsubscribe().
14357 * g_themed_icon_append_name:
14358 * @icon: a #GThemedIcon
14359 * @iconname: name of icon to append to list of icons from within @icon.
14361 * Append a name to the list of icons from within @icon.
14363 * Note that doing so invalidates the hash computed by prior calls
14364 * to g_icon_hash().
14370 * g_socket_listener_add_socket:
14371 * @listener: a #GSocketListener
14372 * @socket: a listening #GSocket
14373 * @source_object: Optional #GObject identifying this source
14374 * @error: #GError for error reporting, or %NULL to ignore.
14376 * Adds @socket to the set of sockets that we try to accept
14377 * new clients from. The socket must be bound to a local
14378 * address and listened to.
14379 * to accept to identify this particular source, which is
14380 * useful if you're listening on multiple addresses and do
14381 * different things depending on what address is connected to.
14383 * Returns: %TRUE on success, %FALSE on error.
14389 * g_file_info_set_is_hidden:
14390 * @info: a #GFileInfo.
14391 * @is_hidden: a #gboolean.
14393 * Sets the "is_hidden" attribute in a #GFileInfo according to @is_symlink.
14394 * See %G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN.
14399 * GUnixSocketAddress:abstract:
14401 * Whether or not this is an abstract address
14402 * distinguishes between zero-padded and non-zero-padded
14403 * abstract addresses.
14405 * Deprecated: Use #GUnixSocketAddress:address-type, which
14410 * g_io_extension_get_type:
14411 * @extension: a #GIOExtension
14413 * Gets the type associated with @extension.
14415 * Returns: the type of @extension
14420 * g_data_output_stream_put_int32:
14421 * @stream: a #GDataOutputStream.
14422 * @data: a #gint32.
14423 * @cancellable: optional #GCancellable object, %NULL to ignore.
14424 * @error: a #GError, %NULL to ignore.
14426 * Puts a signed 32-bit integer into the output stream.
14428 * Returns: %TRUE if @data was successfully added to the @stream.
14433 * g_buffered_input_stream_new_sized:
14434 * @base_stream: a #GInputStream
14437 * Creates a new #GBufferedInputStream from the given @base_stream,
14438 * with a buffer set to @size.
14440 * Returns: a #GInputStream.
14445 * g_socket_is_closed:
14446 * @socket: a #GSocket
14448 * Checks whether a socket is closed.
14450 * Returns: %TRUE if socket is closed, %FALSE otherwise
14456 * g_filter_output_stream_get_close_base_stream:
14457 * @stream: a #GFilterOutputStream.
14459 * Returns whether the base stream will be closed when @stream is
14462 * Returns: %TRUE if the base stream will be closed.
14467 * GDBusMessageClass:
14469 * Class structure for #GDBusMessage.
14476 * g_dbus_auth_observer_new:
14478 * Creates a new #GDBusAuthObserver object.
14480 * Returns: A #GDBusAuthObserver. Free with g_object_unref().
14486 * g_file_info_copy_into:
14487 * @src_info: source to copy attributes from.
14488 * @dest_info: destination to copy attributes to.
14490 * Copies all of the #GFileAttribute<!-- -->s from @src_info to @dest_info.
14495 * GVolumeMonitor::drive-connected:
14496 * @volume_monitor: The volume monitor emitting the signal.
14497 * @drive: a #GDrive that was connected.
14499 * Emitted when a drive is connected to the system.
14504 * g_settings_bind_with_mapping:
14505 * @settings: a #GSettings object
14506 * @key: the key to bind
14507 * @object: a #GObject
14508 * @property: the name of the property to bind
14509 * @flags: flags for the binding
14510 * @get_mapping: a function that gets called to convert values from @settings to @object, or %NULL to use the default GIO mapping
14511 * @set_mapping: a function that gets called to convert values from @object to @settings, or %NULL to use the default GIO mapping
14512 * @user_data: data that gets passed to @get_mapping and @set_mapping
14513 * @destroy: #GDestroyNotify function for @user_data
14515 * Create a binding between the @key in the @settings object
14516 * and the property @property of @object.
14517 * The binding uses the provided mapping functions to map between
14518 * settings and property values.
14519 * Note that the lifecycle of the binding is tied to the object,
14520 * and that you can have only one binding per object property.
14521 * If you bind the same property twice on the same object, the second
14522 * binding overrides the first one.
14529 * g_socket_client_get_socket_type:
14530 * @client: a #GSocketClient.
14532 * Gets the socket type of the socket client.
14533 * See g_socket_client_set_socket_type() for details.
14535 * Returns: a #GSocketFamily
14542 * @short_description: File and Directory Handling
14543 * @include: gio/gio.h
14544 * @see_also: #GFileInfo, #GFileEnumerator
14546 * #GFile is a high level abstraction for manipulating files on a
14547 * virtual file system. #GFile<!-- -->s are lightweight, immutable
14548 * objects that do no I/O upon creation. It is necessary to understand that
14549 * #GFile objects do not represent files, merely an identifier for a file. All
14550 * file content I/O is implemented as streaming operations (see #GInputStream and
14552 * g_file_new_for_path() if you have a path.
14553 * g_file_new_for_uri() if you have a URI.
14554 * g_file_new_for_commandline_arg() for a command line argument.
14555 * g_file_parse_name() from a utf8 string gotten from g_file_get_parse_name().
14556 * One way to think of a #GFile is as an abstraction of a pathname. For normal
14557 * files the system pathname is what is stored internally, but as #GFile<!-- -->s
14558 * are extensible it could also be something else that corresponds to a pathname
14559 * in a userspace implementation of a filesystem.
14560 * #GFile<!-- -->s make up hierarchies of directories and files that correspond to the
14561 * files on a filesystem. You can move through the file system with #GFile using
14562 * g_file_get_parent() to get an identifier for the parent directory, g_file_get_child()
14563 * to get a child within a directory, g_file_resolve_relative_path() to resolve a relative
14564 * path between two #GFile<!-- -->s. There can be multiple hierarchies, so you may not
14565 * end up at the same root if you repeatedly call g_file_get_parent() on two different
14567 * All #GFile<!-- -->s have a basename (get with g_file_get_basename()). These names
14568 * are byte strings that are used to identify the file on the filesystem (relative to
14569 * its parent directory) and there is no guarantees that they have any particular charset
14570 * encoding or even make any sense at all. If you want to use filenames in a user
14571 * interface you should use the display name that you can get by requesting the
14572 * %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME attribute with g_file_query_info().
14573 * This is guaranteed to be in utf8 and can be used in a user interface. But always
14574 * store the real basename or the #GFile to use to actually access the file, because
14575 * there is no way to go from a display name to the actual name.
14576 * Using #GFile as an identifier has the same weaknesses as using a path in that
14577 * there may be multiple aliases for the same file. For instance, hard or
14578 * soft links may cause two different #GFile<!-- -->s to refer to the same file.
14579 * and long names on Fat/NTFS, or bind mounts in Linux. If you want to check if
14580 * two #GFile<!-- -->s point to the same file you can query for the
14581 * %G_FILE_ATTRIBUTE_ID_FILE attribute. Note that #GFile does some trivial
14582 * canonicalization of pathnames passed in, so that trivial differences in the
14583 * path string used at creation (duplicated slashes, slash at end of path, "."
14584 * or ".." path segments, etc) does not create different #GFile<!-- -->s.
14585 * Many #GFile operations have both synchronous and asynchronous versions
14586 * to suit your application. Asynchronous versions of synchronous functions
14587 * simply have _async() appended to their function names. The asynchronous
14588 * I/O functions call a #GAsyncReadyCallback which is then used to finalize
14589 * the operation, producing a GAsyncResult which is then passed to the
14590 * function's matching _finish() operation.
14591 * Some #GFile operations do not have synchronous analogs, as they may
14592 * take a very long time to finish, and blocking may leave an application
14593 * unusable. Notable cases include:
14594 * g_file_mount_mountable() to mount a mountable file.
14595 * g_file_unmount_mountable_with_operation() to unmount a mountable file.
14596 * g_file_eject_mountable_with_operation() to eject a mountable file.
14597 * <para id="gfile-etag"><indexterm><primary>entity tag</primary></indexterm>
14598 * One notable feature of #GFile<!-- -->s are entity tags, or "etags" for
14599 * short. Entity tags are somewhat like a more abstract version of the
14600 * traditional mtime, and can be used to quickly determine if the file has
14601 * been modified from the version on the file system. See the HTTP 1.1
14602 * <ulink url="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html">specification</ulink>
14603 * for HTTP Etag headers, which are a very similar concept.
14606 * To construct a #gfile, you can use:
14607 * Other possible causes for aliases are: case insensitive filesystems, short
14612 * g_desktop_app_info_get_filename:
14613 * @info: a #GDesktopAppInfo
14615 * When @info was created from a known filename, return it. In some
14616 * situations such as the #GDesktopAppInfo returned from
14617 * g_desktop_app_info_new_from_keyfile(), this function will return %NULL.
14619 * Returns: The full path to the file for @info, or %NULL if not known.
14625 * g_settings_backend_path_writable_changed:
14626 * @backend: a #GSettingsBackend implementation
14627 * @path: the name of the path
14629 * Signals that the writability of all keys below a given path may have
14631 * Since GSettings performs no locking operations for itself, this call
14632 * will always be made in response to external events.
14639 * g_file_replace_contents_async:
14640 * @file: input #GFile.
14641 * @contents: string of contents to replace the file with.
14642 * @length: the length of @contents in bytes.
14643 * @etag: (allow-none): a new <link linkend="gfile-etag">entity tag</link> for the @file, or %NULL
14644 * @make_backup: %TRUE if a backup should be created.
14645 * @flags: a set of #GFileCreateFlags.
14646 * @cancellable: optional #GCancellable object, %NULL to ignore.
14647 * @callback: a #GAsyncReadyCallback to call when the request is satisfied
14648 * @user_data: the data to pass to callback function
14650 * Starts an asynchronous replacement of @file with the given
14651 * current entity tag.
14652 * When this operation has completed, @callback will be called with
14653 * g_file_replace_contents_finish().
14654 * If @cancellable is not %NULL, then the operation can be cancelled by
14655 * triggering the cancellable object from another thread. If the operation
14656 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
14657 * If @make_backup is %TRUE, this function will attempt to
14658 * make a backup of @file.
14663 * GActionGroup::action-removed:
14664 * @action_group: the #GActionGroup that changed
14665 * @action_name: the name of the action in @action_group
14667 * Signals that an action is just about to be removed from the group.
14668 * This signal is emitted before the action is removed, so the action
14669 * is still visible and can be queried from the signal handler.
14676 * g_socket_set_timeout:
14677 * @socket: a #GSocket.
14678 * @timeout: the timeout for @socket, in seconds, or 0 for none
14680 * Sets the time in seconds after which I/O operations on @socket will
14681 * time out if they have not yet completed.
14682 * On a blocking socket, this means that any blocking #GSocket
14683 * operation will time out after @timeout seconds of inactivity,
14684 * returning %G_IO_ERROR_TIMED_OUT.
14685 * On a non-blocking socket, calls to g_socket_condition_wait() will
14686 * also fail with %G_IO_ERROR_TIMED_OUT after the given time. Sources
14687 * created with g_socket_create_source() will trigger after
14688 * set, at which point calling g_socket_receive(), g_socket_send(),
14689 * g_socket_check_connect_result(), etc, will fail with
14690 * %G_IO_ERROR_TIMED_OUT.
14691 * If @timeout is 0 (the default), operations will never time out
14693 * Note that if an I/O operation is interrupted by a signal, this may
14694 * cause the timeout to be reset.
14701 * g_app_info_set_as_default_for_extension:
14702 * @appinfo: a #GAppInfo.
14703 * @extension: a string containing the file extension (without the dot).
14704 * @error: a #GError.
14706 * Sets the application as the default handler for the given file extension.
14708 * Returns: %TRUE on success, %FALSE on error.
14713 * g_unix_connection_send_fd:
14714 * @connection: a #GUnixConnection
14715 * @fd: a file descriptor
14716 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
14717 * @error: (allow-none): #GError for error reporting, or %NULL to ignore.
14719 * Passes a file descriptor to the recieving side of the
14720 * connection. The recieving end has to call g_unix_connection_receive_fd()
14721 * to accept the file descriptor.
14722 * As well as sending the fd this also writes a single byte to the
14723 * stream, as this is required for fd passing to work on some
14726 * Returns: a %TRUE on success, %NULL on error.
14732 * g_content_type_is_unknown:
14733 * @type: a content type string
14735 * Checks if the content type is the generic "unknown" type.
14736 * On UNIX this is the "application/octet-stream" mimetype,
14737 * while on win32 it is "*".
14739 * Returns: %TRUE if the type is the unknown type.
14744 * GZlibCompressor:file-info:
14746 * If set to a non-%NULL #GFileInfo object, and #GZlibCompressor:format is
14747 * %G_ZLIB_COMPRESSOR_FORMAT_GZIP, the compressor will write the file name
14748 * and modification time from the file info to the the GZIP header.
14755 * g_async_result_get_source_object:
14756 * @res: a #GAsyncResult
14758 * Gets the source object from a #GAsyncResult.
14759 * or %NULL if there is none.
14761 * Returns: (transfer full): a new reference to the source object for the @res,
14766 * g_file_replace_async:
14767 * @file: input #GFile.
14768 * @etag: (allow-none): an <link linkend="gfile-etag">entity tag</link> for the current #GFile, or NULL to ignore.
14769 * @make_backup: %TRUE if a backup should be created.
14770 * @flags: a set of #GFileCreateFlags.
14771 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
14772 * @cancellable: optional #GCancellable object, %NULL to ignore.
14773 * @callback: a #GAsyncReadyCallback to call when the request is satisfied
14774 * @user_data: the data to pass to callback function
14776 * Asynchronously overwrites the file, replacing the contents, possibly
14777 * creating a backup copy of the file first.
14778 * For more details, see g_file_replace() which is
14779 * the synchronous version of this call.
14780 * When the operation is finished, @callback will be called. You can then call
14781 * g_file_replace_finish() to get the result of the operation.
14786 * g_file_set_display_name_finish:
14787 * @file: input #GFile.
14788 * @res: a #GAsyncResult.
14789 * @error: a #GError, or %NULL
14791 * Finishes setting a display name started with
14792 * g_file_set_display_name_async().
14793 * Free the returned object with g_object_unref().
14795 * Returns: (transfer full): a #GFile or %NULL on error.
14800 * g_unix_mount_point_get_mount_path:
14801 * @mount_point: a #GUnixMountPoint.
14803 * Gets the mount path for a unix mount point.
14805 * Returns: a string containing the mount path.
14810 * g_mount_get_uuid:
14811 * @mount: a #GMount.
14813 * Gets the UUID for the @mount. The reference is typically based on
14814 * the file system UUID for the mount in question and should be
14815 * considered an opaque string. Returns %NULL if there is no UUID
14817 * The returned string should be freed with g_free()
14818 * when no longer needed.
14820 * Returns: the UUID for @mount or %NULL if no UUID can be computed.
14825 * g_settings_revert:
14826 * @settings: a #GSettings instance
14828 * Reverts all non-applied changes to the settings. This function
14829 * does nothing unless @settings is in 'delay-apply' mode; see
14830 * g_settings_delay(). In the normal case settings are always applied
14832 * Change notifications will be emitted for affected keys.
14837 * g_file_resolve_relative_path:
14838 * @file: input #GFile.
14839 * @relative_path: a given relative path string.
14841 * Resolves a relative path for @file to an absolute path.
14842 * This call does no blocking i/o.
14843 * is %NULL or if @file is invalid.
14844 * Free the returned object with g_object_unref().
14846 * Returns: (transfer full): #GFile to the resolved path. %NULL if @relative_path
14851 * g_application_get_flags:
14852 * @application: a #GApplication
14853 * @returns: the flags for @application
14855 * Gets the flags for @application.
14856 * See #GApplicationFlags.
14863 * g_file_info_set_display_name:
14864 * @info: a #GFileInfo.
14865 * @display_name: a string containing a display name.
14867 * Sets the display name for the current #GFileInfo.
14868 * See %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME.
14873 * SECTION:gloadableico:
14874 * @short_description: Loadable Icons
14875 * @include: gio/gio.h
14876 * @see_also: #GIcon, #GThemedIcon
14878 * Extends the #GIcon interface and adds the ability to
14879 * load icons from streams.
14885 * @file: input #GFile.
14886 * @etag: (allow-none): an optional <link linkend="gfile-etag">entity tag</link> for the current #GFile, or #NULL to ignore.
14887 * @make_backup: %TRUE if a backup should be created.
14888 * @flags: a set of #GFileCreateFlags.
14889 * @cancellable: optional #GCancellable object, %NULL to ignore.
14890 * @error: a #GError, or %NULL
14892 * Returns an output stream for overwriting the file, possibly
14893 * creating a backup copy of the file first. If the file doesn't exist,
14894 * it will be created.
14895 * This will try to replace the file in the safest way possible so
14896 * that any errors during the writing will not affect an already
14897 * existing copy of the file. For instance, for local files it
14898 * may write to a temporary file and then atomically rename over
14899 * the destination when the stream is closed.
14900 * By default files created are generally readable by everyone,
14901 * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file
14902 * will be made readable only to the current user, to the level that
14903 * is supported on the target filesystem.
14904 * If @cancellable is not %NULL, then the operation can be cancelled by
14905 * triggering the cancellable object from another thread. If the operation
14906 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
14907 * If you pass in a non-#NULL @etag value, then this value is
14908 * compared to the current entity tag of the file, and if they differ
14909 * an G_IO_ERROR_WRONG_ETAG error is returned. This generally means
14910 * that the file has been changed since you last read it. You can get
14911 * the new etag from g_file_output_stream_get_etag() after you've
14912 * finished writing and closed the #GFileOutputStream. When you load
14913 * a new file you can use g_file_input_stream_query_info() to get
14914 * the etag of the file.
14915 * If @make_backup is %TRUE, this function will attempt to make a backup
14916 * of the current file before overwriting it. If this fails a G_IO_ERROR_CANT_CREATE_BACKUP
14917 * error will be returned. If you want to replace anyway, try again with
14918 * If the file is a directory the G_IO_ERROR_IS_DIRECTORY error will be returned,
14919 * and if the file is some other form of non-regular file then a
14920 * G_IO_ERROR_NOT_REGULAR_FILE error will be returned.
14921 * Some file systems don't allow all file names, and may
14922 * return an G_IO_ERROR_INVALID_FILENAME error, and if the name
14923 * is to long G_IO_ERROR_FILENAME_TOO_LONG will be returned.
14924 * Other errors are possible too, and depend on what kind of
14925 * filesystem the file is on.
14926 * Free the returned object with g_object_unref().
14928 * Returns: (transfer full): a #GFileOutputStream or %NULL on error.
14933 * g_dbus_message_copy:
14934 * @message: A #GDBusMessage.
14935 * @error: Return location for error or %NULL.
14937 * Copies @message. The copy is a deep copy and the returned
14938 * #GDBusMessage is completely identical except that it is guaranteed
14939 * to not be locked.
14940 * This operation can fail if e.g. @message contains file descriptors
14941 * and the per-process or system-wide open files limit is reached.
14942 * g_object_unref().
14944 * Returns: (transfer full): A new #GDBusMessage or %NULL if @error is set. Free with
14950 * g_dbus_connection_new_for_address_sync:
14951 * @address: A D-Bus address.
14952 * @flags: Flags describing how to make the connection.
14953 * @observer: A #GDBusAuthObserver or %NULL.
14954 * @cancellable: A #GCancellable or %NULL.
14955 * @error: Return location for error or %NULL.
14957 * Synchronously connects and sets up a D-Bus client connection for
14958 * exchanging D-Bus messages with an endpoint specified by @address
14959 * which must be in the D-Bus address format.
14960 * This constructor can only be used to initiate client-side
14961 * connections - use g_dbus_connection_new_sync() if you need to act
14962 * as the server. In particular, @flags cannot contain the
14963 * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER or
14964 * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS flags.
14965 * This is a synchronous failable constructor. See
14966 * g_dbus_connection_new_for_address() for the asynchronous version.
14967 * If @observer is not %NULL it may be used to control the
14968 * authentication process.
14970 * Returns: A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
14976 * GMountOperation:anonymous:
14978 * Whether to use an anonymous user when authenticating.
14983 * g_socket_condition_check:
14984 * @socket: a #GSocket
14985 * @condition: a #GIOCondition mask to check
14987 * Checks on the readiness of @socket to perform operations.
14988 * The operations specified in @condition are checked for and masked
14989 * against the currently-satisfied conditions on @socket. The result
14991 * Note that on Windows, it is possible for an operation to return
14992 * %G_IO_ERROR_WOULD_BLOCK even immediately after
14993 * g_socket_condition_check() has claimed that the socket is ready for
14994 * writing. Rather than calling g_socket_condition_check() and then
14995 * writing to the socket if it succeeds, it is generally better to
14996 * simply try writing to the socket right away, and try again later if
14997 * the initial attempt returns %G_IO_ERROR_WOULD_BLOCK.
14998 * It is meaningless to specify %G_IO_ERR or %G_IO_HUP in condition;
14999 * these conditions will always be set in the output if they are true.
15000 * This call never blocks.
15002 * Returns: the @GIOCondition mask of the current state
15008 * g_bus_unown_name:
15009 * @owner_id: An identifier obtained from g_bus_own_name()
15011 * Stops owning a name.
15018 * g_dbus_proxy_get_interface_info:
15019 * @proxy: A #GDBusProxy
15021 * Returns the #GDBusInterfaceInfo, if any, specifying the minimal
15022 * interface that @proxy conforms to.
15023 * See the #GDBusProxy:g-interface-info property for more details.
15024 * object, it is owned by @proxy.
15026 * Returns: A #GDBusInterfaceInfo or %NULL. Do not unref the returned
15032 * g_proxy_address_get_destination_hostnam:
15033 * @proxy: a #GProxyAddress
15035 * Gets @proxy's destination hostname.
15037 * Returns: the @proxy's destination hostname
15043 * g_dbus_method_invocation_get_connection:
15044 * @invocation: A #GDBusMethodInvocation.
15046 * Gets the #GDBusConnection the method was invoked on.
15048 * Returns: (transfer none): A #GDBusConnection. Do not free, it is owned by @invocation.
15054 * g_srv_target_get_hostname:
15055 * @target: a #GSrvTarget
15057 * Gets @target's hostname (in ASCII form; if you are going to present
15058 * this to the user, you should use g_hostname_is_ascii_encoded() to
15059 * check if it contains encoded Unicode segments, and use
15060 * g_hostname_to_unicode() to convert it if it does.)
15062 * Returns: @target's hostname
15068 * g_io_extension_point_get_extensions:
15069 * @extension_point: a #GIOExtensionPoint
15071 * Gets a list of all extensions that implement this extension point.
15072 * The list is sorted by priority, beginning with the highest priority.
15073 * #GIOExtension<!-- -->s. The list is owned by GIO and should not be
15076 * Returns: (element-type GIOExtension) (transfer none): a #GList of
15081 * GSettings:has-unapplied:
15083 * If this property is %TRUE, the #GSettings object has outstanding
15084 * changes that will be applied when g_settings_apply() is called.
15089 * g_dbus_proxy_set_interface_info:
15090 * @proxy: A #GDBusProxy
15091 * @info: Minimum interface this proxy conforms to or %NULL to unset.
15093 * Ensure that interactions with @proxy conform to the given
15094 * interface. For example, when completing a method call, if the type
15095 * signature of the message isn't what's expected, the given #GError
15096 * is set. Signals that have a type signature mismatch are simply
15098 * See the #GDBusProxy:g-interface-info property for more details.
15105 * g_memory_input_stream_add_data:
15106 * @stream: a #GMemoryInputStream
15107 * @data: input data
15108 * @len: length of the data, may be -1 if @data is a nul-terminated string
15109 * @destroy: function that is called to free @data, or %NULL
15111 * Appends @data to data that can be read from the input stream
15116 * g_content_type_get_description:
15117 * @type: a content type string
15119 * Gets the human readable description of the content type.
15120 * returned string with g_free()
15122 * Returns: a short description of the content type @type. Free the
15127 * g_permission_release_finish:
15128 * @permission: a #GPermission instance
15129 * @result: the #GAsyncResult given to the #GAsyncReadyCallback
15130 * @error: a pointer to a %NULL #GError, or %NULL
15131 * @returns: %TRUE if the permission was successfully released
15133 * Collects the result of attempting to release the permission
15134 * represented by @permission.
15135 * This is the second half of the asynchronous version of
15136 * g_permission_release().
15143 * g_dbus_message_get_num_unix_fds:
15144 * @message: A #GDBusMessage.
15146 * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header field.
15148 * Returns: The value.
15154 * g_dbus_connection_unregister_object:
15155 * @connection: A #GDBusConnection.
15156 * @registration_id: A registration id obtained from g_dbus_connection_register_object().
15158 * Unregisters an object.
15160 * Returns: %TRUE if the object was unregistered, %FALSE otherwise.
15166 * SECTION:gmemoryoutputstrea:
15167 * @short_description: Streaming output operations on memory chunks
15168 * @include: gio/gio.h
15169 * @see_also: #GMemoryInputStream
15171 * #GMemoryOutputStream is a class for using arbitrary
15172 * memory chunks as output for GIO streaming output operations.
15177 * g_network_address_get_scheme:
15178 * @addr: a #GNetworkAddress
15180 * Gets @addr's scheme
15182 * Returns: @addr's scheme (%NULL if not built from URI)
15188 * g_unix_mount_guess_icon:
15189 * @mount_entry: a #GUnixMountEntry
15191 * Guesses the icon of a Unix mount.
15193 * Returns: (transfer full): a #GIcon
15199 * @drive: a #GDrive.
15201 * Emitted when the drive's state has changed.
15206 * g_file_info_unset_attribute_mask:
15207 * @info: #GFileInfo.
15209 * Unsets a mask set by g_file_info_set_attribute_mask(), if one
15215 * GAction:parameter-type:
15217 * The type of the parameter that must be given when activating the
15226 * @file: input #GFile
15227 * @flags: a set of #GFileMonitorFlags
15228 * @cancellable: optional #GCancellable object, %NULL to ignore
15229 * @error: a #GError, or %NULL
15231 * Obtains a file or directory monitor for the given file, depending
15232 * on the type of the file.
15233 * If @cancellable is not %NULL, then the operation can be cancelled by
15234 * triggering the cancellable object from another thread. If the operation
15235 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
15236 * Free the returned object with g_object_unref().
15238 * Returns: (transfer full): a #GFileMonitor for the given @file, or %NULL on error.
15244 * g_credentials_set_unix_user:
15245 * @credentials: A #GCredentials.
15246 * @uid: The UNIX user identifier to set.
15247 * @error: Return location for error or %NULL.
15249 * Tries to set the UNIX user identifier on @credentials. This method
15250 * 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: %TRUE if @uid was set, %FALSE if error is set.
15261 * SECTION:gsocketaddres:
15262 * @short_description: Abstract base class representing endpoints for socket communication
15264 * #GSocketAddress is the equivalent of <type>struct sockaddr</type>
15265 * in the BSD sockets API. This is an abstract class; use
15266 * #GInetSocketAddress for internet sockets, or #GUnixSocketAddress
15267 * for UNIX domain sockets.
15272 * g_drive_can_start_degraded:
15273 * @drive: a #GDrive.
15275 * Checks if a drive can be started degraded.
15277 * Returns: %TRUE if the @drive can be started degraded, %FALSE otherwise.
15283 * g_content_type_can_be_executable:
15284 * @type: a content type string
15286 * Checks if a content type can be executable. Note that for instance
15287 * things like text files can be executables (i.e. scripts and batch files).
15288 * can be executable, %FALSE otherwise.
15290 * Returns: %TRUE if the file type corresponds to a type that
15295 * g_file_info_get_attribute_as_string:
15296 * @info: a #GFileInfo.
15297 * @attribute: a file attribute key.
15299 * Gets the value of a attribute, formated as a string.
15300 * This escapes things as needed to make the string valid
15302 * When you're done with the string it must be freed with g_free().
15304 * Returns: a UTF-8 string associated with the given @attribute.
15309 * GResolver::reload:
15310 * @resolver: a #GResolver
15312 * Emitted when the resolver notices that the system resolver
15313 * configuration has changed.
15318 * g_settings_get_range:
15319 * @settings: a #GSettings
15320 * @key: the key to query the range of
15321 * @returns: a #GVariant describing the range
15323 * Queries the range of a key.
15324 * This function will return a #GVariant that fully describes the range
15325 * of values that are valid for @key.
15326 * The type of #GVariant returned is <literal>(sv)</literal>. The
15327 * string describes the type of range restriction in effect. The type
15328 * and meaning of the value contained in the variant depends on the
15330 * If the string is <literal>'type'</literal> then the variant contains
15331 * an empty array. The element type of that empty array is the expected
15332 * type of value and all values of that type are valid.
15333 * If the string is <literal>'enum'</literal> then the variant contains
15334 * an array enumerating the possible values. Each item in the array is
15335 * a possible valid value and no other values are valid.
15336 * If the string is <literal>'flags'</literal> then the variant contains
15337 * an array. Each item in the array is a value that may appear zero or
15338 * one times in an array to be used as the value for this key. For
15339 * example, if the variant contained the array <literal>['x',
15340 * 'y']</literal> then the valid values for the key would be
15341 * <literal>[]</literal>, <literal>['x']</literal>,
15342 * <literal>['y']</literal>, <literal>['x', 'y']</literal> and
15343 * <literal>['y', 'x']</literal>.
15344 * Finally, if the string is <literal>'range'</literal> then the variant
15345 * contains a pair of like-typed values -- the minimum and maximum
15346 * permissible values for this key.
15347 * This information should not be used by normal programs. It is
15348 * considered to be a hint for introspection purposes. Normal programs
15349 * should already know what is permitted by their own schema. The
15350 * format may change in any way in the future -- but particularly, new
15351 * forms may be added to the possibilities described above.
15352 * It is a programmer error to give a @key that isn't contained in the
15353 * schema for @settings.
15354 * You should free the returned value with g_variant_unref() when it is
15355 * no longer needed.
15362 * g_socket_client_set_protocol:
15363 * @client: a #GSocketClient.
15364 * @protocol: a #GSocketProtocol
15366 * Sets the protocol of the socket client.
15367 * The sockets created by this object will use of the specified
15369 * If @protocol is %0 that means to use the default
15370 * protocol for the socket family and type.
15378 * @mount: a #GMount.
15379 * @flags: flags affecting the operation
15380 * @cancellable: optional #GCancellable object, %NULL to ignore.
15381 * @callback: a #GAsyncReadyCallback, or %NULL.
15382 * @user_data: user data passed to @callback.
15384 * Unmounts a mount. This is an asynchronous operation, and is
15385 * finished by calling g_mount_unmount_finish() with the @mount
15386 * and #GAsyncResult data returned in the @callback.
15388 * Deprecated: 2.22: Use g_mount_unmount_with_operation() instead.
15393 * g_unix_mount_point_is_user_mountable:
15394 * @mount_point: a #GUnixMountPoint.
15396 * Checks if a unix mount point is mountable by the user.
15398 * Returns: %TRUE if the mount point is user mountable.
15403 * g_app_info_supports_uris:
15404 * @appinfo: a #GAppInfo.
15406 * Checks if the application supports reading files and directories from URIs.
15408 * Returns: %TRUE if the @appinfo supports URIs.
15413 * g_seekable_can_truncate:
15414 * @seekable: a #GSeekable.
15416 * Tests if the stream can be truncated.
15418 * Returns: %TRUE if the stream can be truncated, %FALSE otherwise.
15423 * g_dbus_interface_info_lookup_property:
15424 * @info: A #GDBusInterfaceInfo.
15425 * @name: A D-Bus property name (typically in CamelCase).
15427 * Looks up information about a property.
15428 * This cost of this function is O(n) in number of properties.
15430 * Returns: A #GDBusPropertyInfo or %NULL if not found. Do not free, it is owned by @info.
15436 * g_mount_can_eject:
15437 * @mount: a #GMount.
15439 * Checks if @mount can be eject.
15441 * Returns: %TRUE if the @mount can be ejected.
15446 * SECTION:gmountoperatio:
15447 * @short_description: Object used for authentication and user interaction
15448 * @include: gio/gio.h
15450 * #GMountOperation provides a mechanism for interacting with the user.
15451 * It can be used for authenticating mountable operations, such as loop
15452 * mounting files, hard drive partitions or server locations. It can
15453 * also be used to ask the user questions or show a list of applications
15454 * preventing unmount or eject operations from completing.
15455 * Note that #GMountOperation is used for more than just #GMount
15456 * objects – for example it is also used in g_drive_start() and
15458 * Users should instantiate a subclass of this that implements all the
15459 * various callbacks to show the required dialogs, such as
15460 * #GtkMountOperation. If no user interaction is desired (for example
15461 * when automounting filesystems at login time), usually %NULL can be
15462 * passed, see each method taking a #GMountOperation for details.
15467 * g_data_input_stream_read_int64:
15468 * @stream: a given #GDataInputStream.
15469 * @cancellable: optional #GCancellable object, %NULL to ignore.
15470 * @error: #GError for error reporting.
15472 * Reads a 64-bit/8-byte value from @stream.
15473 * In order to get the correct byte order for this read operation,
15474 * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
15475 * If @cancellable is not %NULL, then the operation can be cancelled by
15476 * triggering the cancellable object from another thread. If the operation
15477 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
15478 * an error occurred.
15480 * Returns: a signed 64-bit/8-byte value read from @stream or %0 if
15485 * SECTION:gunixoutputstrea:
15486 * @short_description: Streaming output operations for UNIX file descriptors
15487 * @include: gio/gunixoutputstream.h
15488 * @see_also: #GOutputStream
15490 * #GUnixOutputStream implements #GOutputStream for writing to a
15491 * UNIX file descriptor, including asynchronous operations. The file
15492 * descriptor must be selectable, so it doesn't work with opened files.
15493 * Note that <filename><gio/gunixoutputstream.h></filename> belongs
15494 * to the UNIX-specific GIO interfaces, thus you have to use the
15495 * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
15500 * g_simple_async_result_get_op_res_gpointer: (skip)
15501 * @simple: a #GSimpleAsyncResult.
15503 * Gets a pointer result as returned by the asynchronous function.
15505 * Returns: a pointer from the result.
15510 * g_memory_output_stream_steal_data:
15511 * @ostream: a #GMemoryOutputStream
15513 * Gets any loaded data from the @ostream. Ownership of the data
15514 * is transferred to the caller; when no longer needed it must be
15515 * freed using the free function set in @ostream's
15516 * #GMemoryOutputStream:destroy-function property.
15518 * Returns: (transfer full): the stream's data
15524 * g_unix_mount_get_fs_type:
15525 * @mount_entry: a #GUnixMount.
15527 * Gets the filesystem type for the unix mount.
15529 * Returns: a string containing the file system type.
15534 * g_data_input_stream_read_uint32:
15535 * @stream: a given #GDataInputStream.
15536 * @cancellable: optional #GCancellable object, %NULL to ignore.
15537 * @error: #GError for error reporting.
15539 * Reads an unsigned 32-bit/4-byte value from @stream.
15540 * In order to get the correct byte order for this read operation,
15541 * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
15542 * If @cancellable is not %NULL, then the operation can be cancelled by
15543 * triggering the cancellable object from another thread. If the operation
15544 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
15545 * an error occurred.
15547 * Returns: an unsigned 32-bit/4-byte value read from the @stream or %0 if
15552 * GInetAddress:is-any:
15554 * Whether this is the "any" address for its family.
15555 * See g_inet_address_get_is_any().
15562 * g_volume_get_uuid:
15563 * @volume: a #GVolume.
15565 * Gets the UUID for the @volume. The reference is typically based on
15566 * the file system UUID for the volume in question and should be
15567 * considered an opaque string. Returns %NULL if there is no UUID
15569 * The returned string should be freed with g_free()
15570 * when no longer needed.
15572 * Returns: the UUID for @volume or %NULL if no UUID can be computed.
15577 * GDataStream:byte-order:
15579 * The ::byte-order property determines the byte ordering that
15580 * is used when reading multi-byte entities (such as integers)
15586 * g_resolver_error_quark:
15588 * Gets the #GResolver Error Quark.
15590 * Returns: a #GQuark.
15596 * g_input_stream_clear_pending:
15597 * @stream: input stream
15599 * Clears the pending flag on @stream.
15604 * g_file_copy_finish:
15605 * @file: input #GFile.
15606 * @res: a #GAsyncResult.
15607 * @error: a #GError, or %NULL
15609 * Finishes copying the file started with
15610 * g_file_copy_async().
15612 * Returns: a %TRUE on success, %FALSE on error.
15617 * g_file_get_uri_scheme:
15618 * @file: input #GFile.
15620 * Gets the URI scheme for a #GFile.
15621 * RFC 3986 decodes the scheme as:
15623 * URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
15624 * </programlisting>
15625 * Common schemes include "file", "http", "ftp", etc.
15626 * This call does no blocking i/o.
15627 * #GFile. The returned string should be freed with g_free()
15628 * when no longer needed.
15630 * Returns: a string containing the URI scheme for the given
15635 * g_settings_set_boolean:
15636 * @settings: a #GSettings object
15637 * @key: the name of the key to set
15638 * @value: the value to set it to
15639 * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
15641 * Sets @key in @settings to @value.
15642 * A convenience variant of g_settings_set() for booleans.
15643 * It is a programmer error to give a @key that isn't specified as
15644 * having a boolean type in the schema for @settings.
15651 * SECTION:gsocketclien:
15652 * @short_description: Helper for connecting to a network service
15653 * @include: gio/gio.h
15654 * @see_also: #GSocketConnection, #GSocketListener
15656 * #GSocketClient is a high-level utility class for connecting to a
15657 * network host using a connection oriented socket type.
15658 * You create a #GSocketClient object, set any options you want, then
15659 * call a sync or async connect operation, which returns a #GSocketConnection
15660 * subclass on success.
15661 * The type of the #GSocketConnection object returned depends on the type of
15662 * the underlying socket that is in use. For instance, for a TCP/IP connection
15663 * it will be a #GTcpConnection.
15670 * g_app_info_get_all:
15672 * Gets a list of all of the applications currently registered
15674 * For desktop files, this includes applications that have
15675 * <literal>NoDisplay=true</literal> set or are excluded from
15676 * display by means of <literal>OnlyShowIn</literal> or
15677 * <literal>NotShowIn</literal>. See g_app_info_should_show().
15678 * The returned list does not include applications which have
15679 * the <literal>Hidden</literal> key set.
15681 * Returns: (element-type GAppInfo) (transfer full): a newly allocated #GList of references to #GAppInfo<!---->s.
15687 * @socket: a #GSocket
15688 * @buffer: the buffer containing the data to send.
15689 * @size: the number of bytes to send
15690 * @cancellable: a %GCancellable or %NULL
15691 * @error: #GError for error reporting, or %NULL to ignore.
15693 * Tries to send @size bytes from @buffer on the socket. This is
15694 * mainly used by connection-oriented sockets; it is identical to
15695 * g_socket_send_to() with @address set to %NULL.
15696 * If the socket is in blocking mode the call will block until there is
15697 * space for the data in the socket queue. If there is no space available
15698 * and the socket is in non-blocking mode a %G_IO_ERROR_WOULD_BLOCK error
15699 * will be returned. To be notified when space is available, wait for the
15700 * %G_IO_OUT condition. Note though that you may still receive
15701 * %G_IO_ERROR_WOULD_BLOCK from g_socket_send() even if you were previously
15702 * notified of a %G_IO_OUT condition. (On Windows in particular, this is
15703 * very common due to the way the underlying APIs work.)
15704 * On error -1 is returned and @error is set accordingly.
15707 * Returns: Number of bytes written (which may be less than @size), or -1
15713 * g_socket_client_set_timeout:
15714 * @client: a #GSocketClient.
15715 * @timeout: the timeout
15717 * Sets the I/O timeout for sockets created by @client. @timeout is a
15718 * time in seconds, or 0 for no timeout (the default).
15719 * The timeout value affects the initial connection attempt as well,
15720 * so setting this may cause calls to g_socket_client_connect(), etc,
15721 * to fail with %G_IO_ERROR_TIMED_OUT.
15728 * g_file_open_readwrite_finish:
15729 * @file: input #GFile.
15730 * @res: a #GAsyncResult.
15731 * @error: a #GError, or %NULL
15733 * Finishes an asynchronous file read operation started with
15734 * g_file_open_readwrite_async().
15735 * Free the returned object with g_object_unref().
15737 * Returns: (transfer full): a #GFileIOStream or %NULL on error.
15743 * GMountOperation:choice:
15745 * The index of the user's choice when a question is asked during the
15746 * mount operation. See the #GMountOperation::ask-question signal.
15751 * g_buffered_output_stream_get_auto_grow:
15752 * @stream: a #GBufferedOutputStream.
15754 * Checks if the buffer automatically grows as data is added.
15755 * %FALSE otherwise.
15757 * Returns: %TRUE if the @stream's buffer automatically grows,
15763 * @family: the socket family to use, e.g. %G_SOCKET_FAMILY_IPV4.
15764 * @type: the socket type to use.
15765 * @protocol: the id of the protocol to use, or 0 for default.
15766 * @error: #GError for error reporting, or %NULL to ignore.
15768 * Creates a new #GSocket with the defined family, type and protocol.
15769 * If @protocol is 0 (%G_SOCKET_PROTOCOL_DEFAULT) the default protocol type
15770 * for the family and type is used.
15771 * The @protocol is a family and type specific int that specifies what
15772 * kind of protocol to use. #GSocketProtocol lists several common ones.
15773 * Many families only support one protocol, and use 0 for this, others
15774 * support several and using 0 means to use the default protocol for
15775 * the family and type.
15776 * The protocol id is passed directly to the operating
15777 * system, so you can use protocols not listed in #GSocketProtocol if you
15778 * know the protocol number used for it.
15779 * Free the returned object with g_object_unref().
15781 * Returns: a #GSocket or %NULL on error.
15787 * g_converter_input_stream_get_converter:
15788 * @converter_stream: a #GConverterInputStream
15790 * Gets the #GConverter that is used by @converter_stream.
15792 * Returns: (transfer none): the converter of the converter input stream
15798 * g_file_info_set_attribute_stringv:
15799 * @info: a #GFileInfo.
15800 * @attribute: a file attribute key.
15801 * @attr_value: a %NULL terminated string array
15803 * Sets the @attribute to contain the given @attr_value,
15811 * g_themed_icon_get_names:
15812 * @icon: a #GThemedIcon.
15814 * Gets the names of icons from within @icon.
15816 * Returns: (transfer none): a list of icon names.
15821 * g_file_mount_mountable:
15822 * @file: input #GFile.
15823 * @flags: flags affecting the operation
15824 * @mount_operation: a #GMountOperation, or %NULL to avoid user interaction.
15825 * @cancellable: optional #GCancellable object, %NULL to ignore.
15826 * @callback: a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
15827 * @user_data: the data to pass to callback function
15829 * Mounts a file of type G_FILE_TYPE_MOUNTABLE.
15830 * Using @mount_operation, you can request callbacks when, for instance,
15831 * passwords are needed during authentication.
15832 * If @cancellable is not %NULL, then the operation can be cancelled by
15833 * triggering the cancellable object from another thread. If the operation
15834 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
15835 * When the operation is finished, @callback will be called. You can then call
15836 * g_file_mount_mountable_finish() to get the result of the operation.
15843 * The #GCredentials structure contains only private data and
15844 * should only be accessed using the provided API.
15851 * g_desktop_app_info_lookup_get_default_for_uri_scheme:
15852 * @lookup: a #GDesktopAppInfoLookup
15853 * @uri_scheme: a string containing a URI scheme.
15855 * Gets the default application for launching applications
15856 * using this URI scheme for a particular GDesktopAppInfoLookup
15858 * The GDesktopAppInfoLookup interface and this function is used
15859 * to implement g_app_info_get_default_for_uri_scheme() backends
15860 * in a GIO module. There is no reason for applications to use it
15861 * directly. Applications should use g_app_info_get_default_for_uri_scheme().
15863 * Returns: (transfer full): #GAppInfo for given @uri_scheme or %NULL on error.
15864 * Deprecated: The #GDesktopAppInfoLookup interface is deprecated and unused by gio.
15869 * g_application_get_inactivity_timeout:
15870 * @application: a #GApplication
15872 * Gets the current inactivity timeout for the application.
15873 * This is the amount of time (in milliseconds) after the last call to
15874 * g_application_release() before the application stops running.
15876 * Returns: the timeout, in milliseconds
15882 * g_periodic_get_hz:
15883 * @periodic: a #GPeriodic clock
15885 * Gets the frequency of the clock.
15887 * Returns: the frquency of the clock, in Hz
15893 * g_unix_mount_get_mount_path:
15894 * @mount_entry: input #GUnixMountEntry to get the mount path for.
15896 * Gets the mount path for a unix mount.
15898 * Returns: the mount path for @mount_entry.
15903 * g_app_info_get_all_for_type:
15904 * @content_type: the content type to find a #GAppInfo for
15906 * Gets a list of all #GAppInfo<!-- -->s for a given content type.
15907 * or %NULL on error.
15909 * Returns: (element-type GAppInfo) (transfer full): #GList of #GAppInfo<!-- -->s for given @content_type
15914 * g_win32_input_stream_get_handle:
15915 * @stream: a #GWin32InputStream
15917 * Return the Windows file handle that the stream reads from.
15919 * Returns: The file handle of @stream
15925 * GDataOutputStream:byte-order:
15927 * Determines the byte ordering that is used when writing
15928 * multi-byte entities (such as integers) to the stream.
15933 * g_dbus_method_invocation_get_method_info:
15934 * @invocation: A #GDBusMethodInvocation.
15936 * Gets information about the method call, if any.
15938 * Returns: A #GDBusMethodInfo or %NULL. Do not free, it is owned by @invocation.
15944 * g_inet_address_new_from_bytes:
15945 * @bytes: raw address data
15946 * @family: the address family of @bytes
15948 * Creates a new #GInetAddress from the given @family and @bytes.
15949 * %G_INET_ADDRESS_IPV6.
15951 * Returns: a new #GInetAddress corresponding to @family and @bytes.
15957 * g_file_attribute_info_list_unref:
15958 * @list: The #GFileAttributeInfoList to unreference.
15960 * Removes a reference from the given @list. If the reference count
15961 * falls to zero, the @list is deleted.
15966 * g_bus_own_name_on_connection:
15967 * @connection: A #GDBusConnection.
15968 * @name: The well-known name to own.
15969 * @flags: A set of flags from the #GBusNameOwnerFlags enumeration.
15970 * @name_acquired_handler: Handler to invoke when @name is acquired or %NULL.
15971 * @name_lost_handler: Handler to invoke when @name is lost or %NULL.
15972 * @user_data: User data to pass to handlers.
15973 * @user_data_free_func: Function for freeing @user_data or %NULL.
15975 * Like g_bus_own_name() but takes a #GDBusConnection instead of a
15977 * g_bus_unown_name() to stop owning the name.
15979 * Returns: An identifier (never 0) that an be used with
15985 * g_unix_input_stream_set_close_fd:
15986 * @stream: a #GUnixInputStream
15987 * @close_fd: %TRUE to close the file descriptor when done
15989 * Sets whether the file descriptor of @stream shall be closed
15990 * when the stream is closed.
15997 * GMountOperation::ask-password:
15998 * @op: a #GMountOperation requesting a password.
15999 * @message: string containing a message to display to the user.
16000 * @default_user: string containing the default user name.
16001 * @default_domain: string containing the default domain.
16002 * @flags: a set of #GAskPasswordFlags.
16004 * Emitted when a mount operation asks the user for a password.
16005 * If the message contains a line break, the first line should be
16006 * presented as a heading. For example, it may be used as the
16007 * primary text in a #GtkMessageDialog.
16012 * g_file_query_filesystem_info:
16013 * @file: input #GFile.
16014 * @attributes: an attribute query string.
16015 * @cancellable: optional #GCancellable object, %NULL to ignore.
16016 * @error: a #GError.
16018 * Similar to g_file_query_info(), but obtains information
16019 * about the filesystem the @file is on, rather than the file itself.
16020 * For instance the amount of space available and the type of
16022 * The @attributes value is a string that specifies the file attributes that
16023 * should be gathered. It is not an error if it's not possible to read a particular
16024 * requested attribute from a file - it just won't be set. @attributes should
16025 * be a comma-separated list of attributes or attribute wildcards. The wildcard "*"
16026 * means all attributes, and a wildcard like "fs:*" means all attributes in the fs
16027 * namespace. The standard namespace for filesystem attributes is "fs".
16028 * Common attributes of interest are #G_FILE_ATTRIBUTE_FILESYSTEM_SIZE
16029 * (the total size of the filesystem in bytes), #G_FILE_ATTRIBUTE_FILESYSTEM_FREE (number of
16030 * bytes available), and #G_FILE_ATTRIBUTE_FILESYSTEM_TYPE (type of the filesystem).
16031 * If @cancellable is not %NULL, then the operation can be cancelled by
16032 * triggering the cancellable object from another thread. If the operation
16033 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
16034 * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
16035 * Other errors are possible too, and depend on what kind of filesystem the file is on.
16036 * Free the returned object with g_object_unref().
16038 * Returns: (transfer full): a #GFileInfo or %NULL if there was an error.
16043 * g_socket_control_message_serialize:
16044 * @message: a #GSocketControlMessage
16045 * @data: A buffer to write data to
16047 * Converts the data in the message to bytes placed in the
16049 * returned by g_socket_control_message_get_size() on this
16057 * g_dbus_connection_get_unique_name:
16058 * @connection: A #GDBusConnection.
16060 * Gets the unique name of @connection as assigned by the message
16061 * bus. This can also be used to figure out if @connection is a
16062 * message bus connection.
16063 * bus connection. Do not free this string, it is owned by
16065 * Returns: The unique name or %NULL if @connection is not a message
16071 * g_unix_input_stream_new:
16072 * @fd: a UNIX file descriptor
16073 * @close_fd: %TRUE to close the file descriptor when done
16075 * Creates a new #GUnixInputStream for the given @fd.
16076 * If @close_fd is %TRUE, the file descriptor will be closed
16077 * when the stream is closed.
16079 * Returns: a new #GUnixInputStream
16084 * g_simple_async_result_run_in_thread:
16085 * @simple: a #GSimpleAsyncResult.
16086 * @func: a #GSimpleAsyncThreadFunc.
16087 * @io_priority: the io priority of the request.
16088 * @cancellable: optional #GCancellable object, %NULL to ignore.
16090 * Runs the asynchronous job in a separate thread and then calls
16091 * g_simple_async_result_complete_in_idle() on @simple to return
16092 * the result to the appropriate main loop.
16093 * Calling this function takes a reference to @simple for as long as
16094 * is needed to run the job and report its completion.
16099 * g_dbus_proxy_get_cached_property:
16100 * @proxy: A #GDBusProxy.
16101 * @property_name: Property name.
16103 * Looks up the value for a property from the cache. This call does no
16105 * If @proxy has an expected interface (see
16106 * #GDBusProxy:g-interface-info), then @property_name (for existence)
16107 * is checked against it.
16108 * for @property_name or %NULL if the value is not in the cache. The
16109 * returned reference must be freed with g_variant_unref().
16111 * Returns: A reference to the #GVariant instance that holds the value
16117 * g_file_io_stream_query_info:
16118 * @stream: a #GFileIOStream.
16119 * @attributes: a file attribute query string.
16120 * @cancellable: optional #GCancellable object, %NULL to ignore.
16121 * @error: a #GError, %NULL to ignore.
16123 * Queries a file io stream for the given @attributes.
16124 * This function blocks while querying the stream. For the asynchronous
16125 * version of this function, see g_file_io_stream_query_info_async().
16126 * While the stream is blocked, the stream will set the pending flag
16127 * internally, and any other operations on the stream will fail with
16128 * %G_IO_ERROR_PENDING.
16129 * Can fail if the stream was already closed (with @error being set to
16130 * %G_IO_ERROR_CLOSED), the stream has pending operations (with @error being
16131 * set to %G_IO_ERROR_PENDING), or if querying info is not supported for
16132 * the stream's interface (with @error being set to %G_IO_ERROR_NOT_SUPPORTED). I
16133 * all cases of failure, %NULL will be returned.
16134 * If @cancellable is not %NULL, then the operation can be cancelled by
16135 * triggering the cancellable object from another thread. If the operation
16136 * was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %NULL will
16139 * Returns: (transfer full): a #GFileInfo for the @stream, or %NULL on error.
16145 * g_mount_operation_get_usernam:
16146 * @op: a #GMountOperation.
16148 * Get the user name from the mount operation.
16150 * Returns: a string containing the user name.
16155 * SECTION:gproxyaddres:
16156 * @short_description: An internet address with proxy information
16158 * Support for proxied #GInetSocketAddress.
16163 * GWin32InputStream:handle:
16165 * The handle that the stream reads from.
16174 * The #GDBusServer structure contains only private data and
16175 * should only be accessed using the provided API.
16182 * g_win32_output_stream_get_close_handle:
16183 * @stream: a #GWin32OutputStream
16185 * Returns whether the handle of @stream will be closed when the
16186 * stream is closed.
16188 * Returns: %TRUE if the handle is closed when done
16194 * g_file_eject_mountable_with_operation_finish:
16195 * @file: input #GFile.
16196 * @result: a #GAsyncResult.
16197 * @error: a #GError, or %NULL
16199 * Finishes an asynchronous eject operation started by
16200 * g_file_eject_mountable_with_operation().
16203 * Returns: %TRUE if the @file was ejected successfully. %FALSE
16209 * g_socket_client_set_family:
16210 * @client: a #GSocketClient.
16211 * @family: a #GSocketFamily
16213 * Sets the socket family of the socket client.
16214 * If this is set to something other than %G_SOCKET_FAMILY_INVALID
16215 * then the sockets created by this object will be of the specified
16217 * This might be useful for instance if you want to force the local
16218 * connection to be an ipv4 socket, even though the address might
16219 * be an ipv6 mapped to ipv4 address.
16226 * g_vfs_parse_name:
16228 * @parse_name: a string to be parsed by the VFS module.
16230 * This operation never fails, but the returned object might
16231 * not support any I/O operations if the @parse_name cannot
16232 * be parsed by the #GVfs module.
16233 * Free the returned object with g_object_unref().
16235 * Returns: (transfer full): a #GFile for the given @parse_name.
16240 * g_application_command_line_get_environ:
16241 * @cmdline: a #GApplicationCommandLine
16243 * Gets the contents of the 'environ' variable of the command line
16244 * invocation, as would be returned by g_get_environ(). The strings may
16245 * contain non-utf8 data.
16246 * The remote application usually does not send an environment. Use
16247 * %G_APPLICATION_SEND_ENVIRONMENT to affect that. Even with this flag
16248 * set it is possible that the environment is still not available (due
16249 * to invocation messages from other applications).
16250 * The return value should not be modified or freed and is valid for as
16251 * long as @cmdline exists.
16253 * Returns: the environment strings, or %NULL if they were not sent
16259 * g_srv_target_free:
16260 * @target: a #GSrvTarget
16269 * g_content_type_guess_for_tree:
16270 * @root: the root of the tree to guess a type for
16272 * Tries to guess the type of the tree with root @root, by
16273 * looking at the files it contains. The result is an array
16274 * of content types, with the best guess coming first.
16275 * The types returned all have the form x-content/foo, e.g.
16276 * x-content/audio-cdda (for audio CDs) or x-content/image-dcf
16277 * (for a camera memory card). See the <ulink url="http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec">shared-mime-info</ulink>
16278 * specification for more on x-content types.
16279 * This function is useful in the implementation of
16280 * g_mount_guess_content_type().
16281 * or %NULL. Free with g_strfreev()
16283 * Returns: (transfer full): an %NULL-terminated array of zero or more content types,
16289 * g_drive_eject_with_operation_finish:
16290 * @drive: a #GDrive.
16291 * @result: a #GAsyncResult.
16292 * @error: a #GError location to store the error occuring, or %NULL to ignore.
16294 * Finishes ejecting a drive. If any errors occurred during the operation,
16296 * Returns: %TRUE if the drive was successfully ejected. %FALSE otherwise.
16302 * g_file_load_contents_finish:
16303 * @file: input #GFile.
16304 * @res: a #GAsyncResult.
16305 * @contents: (out) (transfer full): a location to place the contents of the file.
16306 * @length: (out) (allow-none): a location to place the length of the contents of the file, or %NULL if the length is not needed
16307 * @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
16308 * @error: a #GError, or %NULL
16310 * Finishes an asynchronous load of the @file's contents.
16311 * The contents are placed in @contents, and @length is set to the
16312 * size of the @contents string. The @content should be freed with
16313 * g_free() when no longer needed. If @etag_out is present, it will be
16314 * set to the new entity tag for the @file.
16315 * present, it will be set appropriately.
16317 * Returns: %TRUE if the load was successful. If %FALSE and @error is
16322 * g_dbus_address_get_stream_sync:
16323 * @address: A valid D-Bus address.
16324 * @out_guid: %NULL or return location to store the GUID extracted from @address, if any.
16325 * @cancellable: A #GCancellable or %NULL.
16326 * @error: Return location for error or %NULL.
16328 * Synchronously connects to an endpoint specified by @address and
16329 * sets up the connection so it is in a state to run the client-side
16330 * of the D-Bus authentication conversation.
16331 * This is a synchronous failable function. See
16332 * g_dbus_address_get_stream() for the asynchronous version.
16334 * Returns: (transfer full): A #GIOStream or %NULL if @error is set.
16340 * g_application_command_line_set_exit_status:
16341 * @cmdline: a #GApplicationCommandLine
16342 * @exit_status: the exit status
16344 * Sets the exit status that will be used when the invoking process
16346 * The return value of the #GApplication::command-line signal is
16347 * passed to this function when the handler returns. This is the usual
16348 * way of setting the exit status.
16349 * In the event that you want the remote invocation to continue running
16350 * and want to decide on the exit status in the future, you can use this
16351 * call. For the case of a remote invocation, the remote process will
16352 * typically exit when the last reference is dropped on @cmdline. The
16353 * exit status of the remote process will be equal to the last value
16354 * that was set with this function.
16355 * In the case that the commandline invocation is local, the situation
16356 * is slightly more complicated. If the commandline invocation results
16357 * increased to a non-zero value) then the application is considered to
16358 * have been 'successful' in a certain sense, and the exit status is
16359 * always zero. If the application use count is zero, though, the exit
16360 * status of the local #GApplicationCommandLine is used.
16362 * In the mainloop running (ie: because the use-count of the application
16368 * GDBusConnection:authentication-observer:
16370 * A #GDBusAuthObserver object to assist in the authentication process or %NULL.
16377 * g_zlib_compressor_get_file_info:
16378 * @compressor: a #GZlibCompressor
16380 * Returns the #GZlibCompressor:file-info property.
16382 * Returns: (transfer none): a #GFileInfo, or %NULL
16388 * GMemoryOutputStream:size:
16390 * Current size of the data buffer.
16397 * GApplication::command-line:
16398 * @application: the application
16399 * @command_line: a #GApplicationCommandLine representing the passed commandline
16401 * The ::command-line signal is emitted on the primary instance when
16402 * a commandline is not handled locally. See g_application_run() for
16403 * more information.
16408 * g_socket_client_connect_finish:
16409 * @client: a #GSocketClient.
16410 * @result: a #GAsyncResult.
16411 * @error: a #GError location to store the error occuring, or %NULL to ignore.
16413 * Finishes an async connect operation. See g_socket_client_connect_async()
16415 * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
16421 * g_socket_address_enumerator_next:
16422 * @enumerator: a #GSocketAddressEnumerator
16423 * @cancellable: optional #GCancellable object, %NULL to ignore.
16424 * @error: a #GError.
16426 * Retrieves the next #GSocketAddress from @enumerator. Note that this
16427 * may block for some amount of time. (Eg, a #GNetworkAddress may need
16428 * to do a DNS lookup before it can return an address.) Use
16429 * g_socket_address_enumerator_next_async() if you need to avoid
16431 * If @enumerator is expected to yield addresses, but for some reason
16432 * is unable to (eg, because of a DNS error), then the first call to
16433 * g_socket_address_enumerator_next() will return an appropriate error
16434 * in *@error. However, if the first call to
16435 * g_socket_address_enumerator_next() succeeds, then any further
16436 * internal errors (other than @cancellable being triggered) will be
16438 * error (in which case *@error will be set) or if there are no
16441 * Returns: (transfer full): a #GSocketAddress (owned by the caller), or %NULL on
16446 * g_app_info_launch_uris:
16447 * @appinfo: a #GAppInfo
16448 * @uris: (element-type char*): a #GList containing URIs to launch.
16449 * @launch_context: (allow-none): a #GAppLaunchContext or %NULL
16450 * @error: a #GError
16452 * Launches the application. Passes @uris to the launched application
16453 * as arguments, using the optional @launch_context to get information
16454 * about the details of the launcher (like what screen it is on).
16455 * On error, @error will be set accordingly.
16456 * To lauch the application without arguments pass a %NULL @uris list.
16457 * Note that even if the launch is successful the application launched
16458 * can fail to start if it runs into problems during startup. There is
16459 * no way to detect this.
16461 * Returns: %TRUE on successful launch, %FALSE otherwise.
16466 * GDBusProxy:g-interface-info:
16468 * Ensure that interactions with this proxy conform to the given
16469 * interface. For example, when completing a method call, if the
16470 * type signature of the message isn't what's expected, the given
16471 * #GError is set. Signals that have a type signature mismatch are
16479 * g_win32_input_stream_new:
16480 * @handle: a Win32 file handle
16481 * @close_fd: %TRUE to close the handle when done
16483 * Creates a new #GWin32InputStream for the given @fd.
16484 * If @close_handle is %TRUE, the handle will be closed
16485 * when the stream is closed.
16486 * Note that "handle" here means a Win32 HANDLE, not a "file descriptor"
16487 * as used in the Windows C libraries.
16489 * Returns: a new #GWin32InputStream
16494 * g_themed_icon_new_from_names:
16495 * @iconnames: an array of strings containing icon names.
16496 * @len: the length of the @iconnames array, or -1 if @iconnames is %NULL-terminated
16498 * Creates a new themed icon for @iconnames.
16500 * Returns: (transfer full): a new #GThemedIcon
16505 * GMountOperation::reply:
16506 * @op: a #GMountOperation.
16507 * @result: a #GMountOperationResult indicating how the request was handled
16509 * Emitted when the user has replied to the mount operation.
16514 * g_dbus_method_info_unref:
16515 * @info: A #GDBusMethodInfo.
16517 * If @info is statically allocated, does nothing. Otherwise decreases
16518 * the reference count of @info. When its reference count drops to 0,
16519 * the memory used is freed.
16526 * g_initable_new_valist:
16527 * @object_type: a #GType supporting #GInitable.
16528 * @first_property_name: the name of the first property, followed by the value, and other property value pairs, and ended by %NULL.
16529 * @var_args: The var args list generated from @first_property_name.
16530 * @cancellable: optional #GCancellable object, %NULL to ignore.
16531 * @error: a #GError location to store the error occuring, or %NULL to ignore.
16533 * Helper function for constructing #GInitiable object. This is
16534 * similar to g_object_new_valist() but also initializes the object
16535 * and returns %NULL, setting an error on failure.
16537 * Returns: (transfer full): a newly allocated #GObject, or %NULL on error
16544 * @socket: a #GSocket.
16545 * @cancellable: a %GCancellable or %NULL
16546 * @error: #GError for error reporting, or %NULL to ignore.
16548 * Accept incoming connections on a connection-based socket. This removes
16549 * the first outstanding connection request from the listening socket and
16550 * creates a #GSocket object for it.
16551 * The @socket must be bound to a local address with g_socket_bind() and
16552 * must be listening for incoming connections (g_socket_listen()).
16553 * If there are no outstanding connections then the operation will block
16554 * or return %G_IO_ERROR_WOULD_BLOCK if non-blocking I/O is enabled.
16555 * To be notified of an incoming connection, wait for the %G_IO_IN condition.
16556 * Free the returned object with g_object_unref().
16558 * Returns: (transfer full): a new #GSocket, or %NULL on error.
16564 * g_socket_address_get_native_size:
16565 * @address: a #GSocketAddress
16567 * Gets the size of @address's native <type>struct sockaddr</type>.
16568 * You can use this to allocate memory to pass to
16569 * g_socket_address_to_native().
16571 * Returns: the size of the native <type>struct sockaddr</type> that
16577 * g_file_stop_mountable:
16578 * @file: input #GFile.
16579 * @flags: flags affecting the operation
16580 * @mount_operation: a #GMountOperation, or %NULL to avoid user interaction.
16581 * @cancellable: optional #GCancellable object, %NULL to ignore.
16582 * @callback: a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
16583 * @user_data: the data to pass to callback function
16585 * Stops a file of type G_FILE_TYPE_MOUNTABLE.
16586 * If @cancellable is not %NULL, then the operation can be cancelled by
16587 * triggering the cancellable object from another thread. If the operation
16588 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
16589 * When the operation is finished, @callback will be called. You can then call
16590 * g_file_stop_mountable_finish() to get the result of the operation.
16597 * g_dbus_signal_info_unref:
16598 * @info: A #GDBusSignalInfo.
16600 * If @info is statically allocated, does nothing. Otherwise decreases
16601 * the reference count of @info. When its reference count drops to 0,
16602 * the memory used is freed.
16609 * g_file_info_get_modification_time:
16610 * @info: a #GFileInfo.
16611 * @result: a #GTimeVal.
16613 * Gets the modification time of the current @info and sets it
16619 * g_dbus_proxy_get_name_owner:
16620 * @proxy: A #GDBusProxy.
16622 * The unique name that owns the name that @proxy is for or %NULL if
16623 * no-one currently owns that name. You may connect to the
16624 * #GObject::notify signal to track changes to the
16625 * #GDBusProxy:g-name-owner property.
16627 * Returns: The name owner or %NULL if no name owner exists. Free with g_free().
16633 * GInetAddress:is-link-local:
16635 * Whether this is a link-local address.
16636 * See g_inet_address_get_is_link_local().
16643 * g_io_stream_close_async:
16644 * @stream: a #GIOStream
16645 * @io_priority: the io priority of the request
16646 * @callback: callback to call when the request is satisfied
16647 * @user_data: the data to pass to callback function
16648 * @cancellable: optional cancellable object
16650 * Requests an asynchronous close of the stream, releasing resources
16651 * related to it. When the operation is finished @callback will be
16652 * called. You can then call g_io_stream_close_finish() to get
16653 * the result of the operation.
16654 * For behaviour details see g_io_stream_close().
16655 * The asynchronous methods have a default fallback that uses threads
16656 * to implement asynchronicity, so they are optional for inheriting
16657 * classes. However, if you override one you must override all.
16664 * GVolumeMonitor::drive-eject-button:
16665 * @volume_monitor: The volume monitor emitting the signal.
16666 * @drive: the drive where the eject button was pressed
16668 * Emitted when the eject button is pressed on @drive.
16675 * SECTION:gresolve:
16676 * @short_description: Asynchronous and cancellable DNS resolver
16677 * @include: gio/gio.h
16679 * #GResolver provides cancellable synchronous and asynchronous DNS
16680 * resolution, for hostnames (g_resolver_lookup_by_address(),
16681 * g_resolver_lookup_by_name() and their async variants) and SRV
16682 * (service) records (g_resolver_lookup_service()).
16683 * #GNetworkAddress and #GNetworkService provide wrappers around
16684 * #GResolver functionality that also implement #GSocketConnectable,
16685 * making it easy to connect to a remote host/service.
16690 * g_action_activate:
16691 * @action: a #GAction
16692 * @parameter: (allow-none): the parameter to the activation
16694 * Activates the action.
16695 * the parameter type given at construction time). If the parameter
16696 * type was %NULL then @parameter must also be %NULL.
16703 * g_dbus_proxy_get_interface_name:
16704 * @proxy: A #GDBusProxy.
16706 * Gets the D-Bus interface name @proxy is for.
16708 * Returns: A string owned by @proxy. Do not free.
16714 * g_file_info_set_attribute_string:
16715 * @info: a #GFileInfo.
16716 * @attribute: a file attribute key.
16717 * @attr_value: a string.
16719 * Sets the @attribute to contain the given @attr_value,
16725 * g_dbus_proxy_set_default_timeout:
16726 * @proxy: A #GDBusProxy.
16727 * @timeout_msec: Timeout in milliseconds.
16729 * Sets the timeout to use if -1 (specifying default timeout) is
16730 * passed as @timeout_msec in the g_dbus_proxy_call() and
16731 * g_dbus_proxy_call_sync() functions.
16732 * See the #GDBusProxy:g-default-timeout property for more details.
16739 * GSettings::writable-changed:
16740 * @settings: the object on which the signal was emitted
16743 * The "writable-changed" signal is emitted when the writability of a
16744 * key has potentially changed. You should call
16745 * g_settings_is_writable() in order to determine the new status.
16746 * This signal supports detailed connections. You can connect to the
16747 * detailed signal "writable-changed::x" in order to only receive
16748 * callbacks when the writability of "x" changes.
16753 * g_cancellable_reset:
16754 * @cancellable: a #GCancellable object.
16756 * Resets @cancellable to its uncancelled state.
16761 * g_unix_mount_monitor_new:
16763 * Gets a new #GUnixMountMonitor. The default rate limit for which the
16764 * monitor will report consecutive changes for the mount and mount
16765 * point entry files is the default for a #GFileMonitor. Use
16766 * g_unix_mount_monitor_set_rate_limit() to change this.
16768 * Returns: a #GUnixMountMonitor.
16773 * g_unix_fd_list_new_from_array:
16774 * @fds: the initial list of file descriptors
16775 * @n_fds: the length of #fds, or -1
16777 * Creates a new #GUnixFDList containing the file descriptors given in
16778 * may no longer be used by the caller. The array itself is owned by
16780 * Each file descriptor in the array should be set to close-on-exec.
16781 * If @n_fds is -1 then @fds must be terminated with -1.
16783 * Returns: a new #GUnixFDList
16789 * GMountOperation:username:
16791 * The user name that is used for authentication when carrying out
16792 * the mount operation.
16797 * g_dbus_annotation_info_ref:
16798 * @info: A #GDBusNodeInfo
16800 * If @info is statically allocated does nothing. Otherwise increases
16801 * the reference count.
16803 * Returns: The same @info.
16809 * g_file_info_set_attribute:
16810 * @info: a #GFileInfo.
16811 * @attribute: a file attribute key.
16812 * @type: a #GFileAttributeType
16813 * @value_p: pointer to the value
16815 * Sets the @attribute to contain the given value, if possible.
16820 * SECTION:gpermissio:
16821 * @title: GPermission
16822 * @short_description: an object representing the permission to perform a certain action
16824 * A #GPermission represents the status of the caller's permission to
16825 * perform a certain action.
16826 * You can query if the action is currently allowed and if it is
16827 * possible to acquire the permission so that the action will be allowed
16829 * There is also an API to actually acquire the permission and one to
16831 * As an example, a #GPermission might represent the ability for the
16832 * user to write to a #GSettings object. This #GPermission object could
16833 * then be used to decide if it is appropriate to show a "Click here to
16834 * unlock" button in a dialog and to provide the mechanism to invoke
16835 * when that button is clicked.
16840 * g_permission_acquire:
16841 * @permission: a #GPermission instance
16842 * @cancellable: a #GCancellable, or %NULL
16843 * @error: a pointer to a %NULL #GError, or %NULL
16844 * @returns: %TRUE if the permission was successfully acquired
16846 * Attempts to acquire the permission represented by @permission.
16847 * The precise method by which this happens depends on the permission
16848 * and the underlying authentication mechanism. A simple example is
16849 * that a dialog may appear asking the user to enter their password.
16850 * You should check with g_permission_get_can_acquire() before calling
16852 * If the permission is acquired then %TRUE is returned. Otherwise,
16853 * %FALSE is returned and @error is set appropriately.
16854 * This call is blocking, likely for a very long time (in the case that
16855 * user interaction is required). See g_permission_acquire_async() for
16856 * the non-blocking version.
16863 * g_file_enumerator_next_files_async:
16864 * @enumerator: a #GFileEnumerator.
16865 * @num_files: the number of file info objects to request
16866 * @io_priority: the <link linkend="gioscheduler">io priority</link> of the request.
16867 * @cancellable: optional #GCancellable object, %NULL to ignore.
16868 * @callback: a #GAsyncReadyCallback to call when the request is satisfied
16869 * @user_data: the data to pass to callback function
16871 * Request information for a number of files from the enumerator asynchronously.
16872 * When all i/o for the operation is finished the @callback will be called with
16873 * the requested information.
16874 * The callback can be called with less than @num_files files in case of error
16875 * or at the end of the enumerator. In case of a partial error the callback will
16876 * be called with any succeeding items and no error, and on the next request the
16877 * error will be reported. If a request is cancelled the callback will be called
16878 * with %G_IO_ERROR_CANCELLED.
16879 * During an async request no other sync and async calls are allowed, and will
16880 * result in %G_IO_ERROR_PENDING errors.
16881 * Any outstanding i/o request with higher priority (lower numerical value) will
16882 * be executed before an outstanding request with lower priority. Default
16883 * priority is %G_PRIORITY_DEFAULT.
16888 * g_file_enumerate_children_async:
16889 * @file: input #GFile.
16890 * @attributes: an attribute query string.
16891 * @flags: a set of #GFileQueryInfoFlags.
16892 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
16893 * @cancellable: optional #GCancellable object, %NULL to ignore.
16894 * @callback: a #GAsyncReadyCallback to call when the request is satisfied
16895 * @user_data: the data to pass to callback function
16897 * Asynchronously gets the requested information about the files in a directory. The result
16898 * is a #GFileEnumerator object that will give out #GFileInfo objects for
16899 * all the files in the directory.
16900 * For more details, see g_file_enumerate_children() which is
16901 * the synchronous version of this call.
16902 * When the operation is finished, @callback will be called. You can then call
16903 * g_file_enumerate_children_finish() to get the result of the operation.
16908 * g_action_group_action_removed:
16909 * @action_group: a #GActionGroup
16910 * @action_name: the name of an action in the group
16912 * Emits the #GActionGroup::action-removed signal on @action_group.
16913 * This function should only be called by #GActionGroup implementations.
16920 * g_file_info_set_file_type:
16921 * @info: a #GFileInfo.
16922 * @type: a #GFileType.
16924 * Sets the file type in a #GFileInfo to @type.
16925 * See %G_FILE_ATTRIBUTE_STANDARD_TYPE.
16930 * g_data_input_stream_read_int16:
16931 * @stream: a given #GDataInputStream.
16932 * @cancellable: optional #GCancellable object, %NULL to ignore.
16933 * @error: #GError for error reporting.
16935 * Reads a 16-bit/2-byte value from @stream.
16936 * In order to get the correct byte order for this read operation,
16937 * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
16938 * an error occurred.
16940 * Returns: a signed 16-bit/2-byte value read from @stream or %0 if
16945 * SECTION:gdbusintrospectio:
16946 * @title: D-Bus Introspection Data
16947 * @short_description: Node and interface description data structures
16948 * @include: gio/gio.h
16950 * Various data structures and convenience routines to parse and
16951 * generate D-Bus introspection XML. Introspection information is
16952 * used when registering objects with g_dbus_connection_register_object().
16953 * The format of D-Bus introspection XML is specified in the
16954 * <link linkend="http://dbus.freedesktop.org/doc/dbus-specification.html#introspection-format">D-Bus specification</link>.
16959 * g_srv_target_list_sort: (skip)
16960 * @targets: a #GList of #GSrvTarget
16962 * Sorts @targets in place according to the algorithm in RFC 2782.
16964 * Returns: (transfer full): the head of the sorted list.
16970 * g_credentials_set_native:
16971 * @credentials: A #GCredentials.
16972 * @native_type: The type of native credentials to set.
16973 * @native: A pointer to native credentials.
16975 * Copies the native credentials of type @native_type from @native
16976 * into @credentials.
16977 * It is a programming error (which will cause an warning to be
16978 * logged) to use this method if there is no #GCredentials support for
16979 * the OS or if @native_type isn't supported by the OS.
16986 * g_dbus_connection_get_stream:
16987 * @connection: a #GDBusConnection
16989 * Gets the underlying stream used for IO.
16991 * Returns: (transfer none): the stream used for IO
16997 * g_network_service_new:
16998 * @service: the service type to look up (eg, "ldap")
16999 * @protocol: the networking protocol to use for @service (eg, "tcp")
17000 * @domain: the DNS domain to look up the service in
17002 * Creates a new #GNetworkService representing the given @service,
17003 * #GSocketConnectable interface to resolve it.
17005 * Returns: (transfer full): a new #GNetworkService
17011 * g_credentials_new:
17013 * Creates a new #GCredentials object with credentials matching the
17014 * the current process.
17016 * Returns: A #GCredentials. Free with g_object_unref().
17022 * SECTION:ginitabl:
17023 * @short_description: Failable object initialization interface
17024 * @include: gio/gio.h
17025 * @see_also: #GAsyncInitable
17027 * #GInitable is implemented by objects that can fail during
17028 * initialization. If an object implements this interface the
17029 * g_initable_init() function must be called as the first thing
17030 * after construction. If g_initable_init() is not called, or if
17031 * it returns an error, all further operations on the object
17032 * should fail, generally with a %G_IO_ERROR_NOT_INITIALIZED error.
17033 * Users of objects implementing this are not intended to use
17034 * the interface method directly, instead it will be used automatically
17035 * in various ways. For C applications you generally just call
17036 * g_initable_new() directly, or indirectly via a foo_thing_new() wrapper.
17037 * This will call g_initable_init() under the cover, returning %NULL and
17038 * setting a %GError on failure.
17039 * For bindings in languages where the native constructor supports
17040 * exceptions the binding could check for objects implemention %GInitable
17041 * during normal construction and automatically initialize them, throwing
17042 * an exception on failure.
17047 * g_file_info_get_file_type:
17048 * @info: a #GFileInfo.
17050 * Gets a file's type (whether it is a regular file, symlink, etc).
17051 * This is different from the file's content type, see g_file_info_get_content_type().
17053 * Returns: a #GFileType for the given file.
17058 * g_dbus_node_info_generate_xml:
17059 * @info: A #GDBusNodeInfo.
17060 * @indent: Indentation level.
17061 * @string_builder: A #GString to to append XML data to.
17063 * Appends an XML representation of @info (and its children) to @string_builder.
17064 * This function is typically used for generating introspection XML documents at run-time for
17065 * handling the <literal>org.freedesktop.DBus.Introspectable.Introspect</literal> method.
17072 * g_dbus_is_interface_name:
17073 * @string: The string to check.
17075 * Checks if @string is a valid D-Bus interface name.
17077 * Returns: %TRUE if valid, %FALSE otherwise.
17083 * GUnixMountMonitor::mounts-changed:
17084 * @monitor: the object on which the signal is emitted
17086 * Emitted when the unix mounts have changed.
17091 * g_dbus_address_get_for_bus_sync:
17092 * @bus_type: A #GBusType.
17093 * @cancellable: A #GCancellable or %NULL.
17094 * @error: Return location for error or %NULL.
17096 * Synchronously looks up the D-Bus address for the well-known message
17097 * bus instance specified by @bus_type. This may involve using various
17098 * platform specific mechanisms.
17100 * Returns: A valid D-Bus address string for @bus_type or %NULL if @error is set.
17106 * GInetAddress:is-multicast:
17108 * Whether this is a multicast address.
17109 * See g_inet_address_get_is_multicast().
17118 * #GPermission is an opaque data structure and can only be accessed
17119 * using the following functions.
17124 * g_filename_completer_new:
17126 * Creates a new filename completer.
17128 * Returns: a #GFilenameCompleter.
17133 * g_data_output_stream_put_int16:
17134 * @stream: a #GDataOutputStream.
17135 * @data: a #gint16.
17136 * @cancellable: optional #GCancellable object, %NULL to ignore.
17137 * @error: a #GError, %NULL to ignore.
17139 * Puts a signed 16-bit integer into the output stream.
17141 * Returns: %TRUE if @data was successfully added to the @stream.
17146 * g_io_extension_point_lookup:
17147 * @name: the name of the extension point
17149 * Looks up an existing extension point.
17150 * registered extension point with the given name
17152 * Returns: the #GIOExtensionPoint, or %NULL if there is no
17157 * g_dbus_connection_send_message_with_reply_sync:
17158 * @connection: A #GDBusConnection.
17159 * @message: A #GDBusMessage.
17160 * @flags: Flags affecting how the message is sent.
17161 * @timeout_msec: The timeout in milliseconds, -1 to use the default timeout or %G_MAXINT for no timeout.
17162 * @out_serial: Return location for serial number assigned to @message when sending it or %NULL.
17163 * @cancellable: A #GCancellable or %NULL.
17164 * @error: Return location for error or %NULL.
17166 * Synchronously sends @message to the peer represented by @connection
17167 * and blocks the calling thread until a reply is received or the
17168 * timeout is reached. See g_dbus_connection_send_message_with_reply()
17169 * for the asynchronous version of this method.
17170 * Unless @flags contain the
17171 * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag, the serial number
17172 * will be assigned by @connection and set on @message via
17173 * g_dbus_message_set_serial(). If @out_serial is not %NULL, then the
17174 * serial number used will be written to this location prior to
17175 * submitting the message to the underlying transport.
17176 * If @connection is closed then the operation will fail with
17177 * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will
17178 * fail with %G_IO_ERROR_CANCELLED. If @message is not well-formed,
17179 * the operation fails with %G_IO_ERROR_INVALID_ARGUMENT.
17180 * Note that @error is only set if a local in-process error
17181 * occured. That is to say that the returned #GDBusMessage object may
17182 * be of type %G_DBUS_MESSAGE_TYPE_ERROR. Use
17183 * g_dbus_message_to_gerror() to transcode this to a #GError.
17184 * See <xref linkend="gdbus-server"/> and <xref
17185 * linkend="gdbus-unix-fd-client"/> for an example of how to use this
17186 * low-level API to send and receive UNIX file descriptors.
17187 * Note that @message must be unlocked, unless @flags contain the
17188 * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag.
17190 * Returns: (transfer full): A locked #GDBusMessage that is the reply to @message or %NULL if @error is set.
17198 * Information about an installed application from a desktop file.
17203 * g_credentials_to_string:
17204 * @credentials: A #GCredentials object.
17206 * Creates a human-readable textual representation of @credentials
17207 * that can be used in logging and debug messages. The format of the
17208 * returned string may change in future GLib release.
17210 * Returns: A string that should be freed with g_free().
17216 * g_data_input_stream_set_byte_order:
17217 * @stream: a given #GDataInputStream.
17218 * @order: a #GDataStreamByteOrder to set.
17220 * This function sets the byte order for the given @stream. All subsequent
17221 * reads from the @stream will be read in the given @order.
17226 * g_dbus_message_get_locked:
17227 * @message: A #GDBusMessage.
17229 * Checks whether @message is locked. To monitor changes to this
17230 * value, conncet to the #GObject::notify signal to listen for changes
17231 * on the #GDBusMessage:locked property.
17233 * Returns: %TRUE if @message is locked, %FALSE otherwise.
17239 * GAction:state-type:
17241 * The #GVariantType of the state that the action has, or %NULL if the
17242 * action is stateless.
17249 * g_socket_send_with_blocking:
17250 * @socket: a #GSocket
17251 * @buffer: the buffer containing the data to send.
17252 * @size: the number of bytes to send
17253 * @blocking: whether to do blocking or non-blocking I/O
17254 * @cancellable: a %GCancellable or %NULL
17255 * @error: #GError for error reporting, or %NULL to ignore.
17257 * This behaves exactly the same as g_socket_send(), except that
17258 * the choice of blocking or non-blocking behavior is determined by
17259 * the @blocking argument rather than by @socket's properties.
17262 * Returns: Number of bytes written (which may be less than @size), or -1
17268 * g_unix_socket_address_abstract_names_supported:
17270 * Checks if abstract unix domain socket names are supported.
17272 * Returns: %TRUE if supported, %FALSE otherwise
17278 * g_bus_unwatch_name:
17279 * @watcher_id: An identifier obtained from g_bus_watch_name()
17281 * Stops watching a name.
17288 * g_socket_connectable_proxy_enumerate:
17289 * @connectable: a #GSocketConnectable
17291 * Creates a #GSocketAddressEnumerator for @connectable that will
17292 * return #GProxyAddress<!-- -->es for addresses that you must connect
17294 * If @connectable does not implement
17295 * g_socket_connectable_proxy_enumerate(), this will fall back to
17296 * calling g_socket_connectable_enumerate().
17298 * Returns: (transfer full): a new #GSocketAddressEnumerator.
17304 * g_dbus_method_invocation_get_interface_name:
17305 * @invocation: A #GDBusMethodInvocation.
17307 * Gets the name of the D-Bus interface the method was invoked on.
17309 * Returns: A string. Do not free, it is owned by @invocation.
17315 * g_memory_input_stream_new:
17317 * Creates a new empty #GMemoryInputStream.
17319 * Returns: a new #GInputStream
17324 * g_resolver_free_targets: (skip)
17325 * @targets: a #GList of #GSrvTarget
17327 * Frees @targets (which should be the return value from
17328 * g_resolver_lookup_service() or g_resolver_lookup_service_finish()).
17329 * (This is a convenience method; you can also simply free the
17330 * results by hand.)
17337 * g_cancellable_is_cancelled:
17338 * @cancellable: a #GCancellable or NULL.
17340 * Checks if a cancellable job has been cancelled.
17341 * FALSE if called with %NULL or if item is not cancelled.
17343 * Returns: %TRUE if @cancellable is cancelled,
17348 * g_file_info_get_is_hidden:
17349 * @info: a #GFileInfo.
17351 * Checks if a file is hidden.
17353 * Returns: %TRUE if the file is a hidden file, %FALSE otherwise.
17358 * g_dbus_server_start:
17359 * @server: A #GDBusServer.
17368 * SECTION:gsocketconnectabl:
17369 * @short_description: Interface for potential socket endpoints
17371 * Objects that describe one or more potential socket endpoints
17372 * implement #GSocketConnectable. Callers can then use
17373 * g_socket_connectable_enumerate() to get a #GSocketAddressEnumerator
17374 * to try out each socket address in turn until one succeeds, as shown
17375 * in the sample code below.
17377 * MyConnectionType *
17378 * connect_to_host (const char *hostname,
17380 * GCancellable *cancellable,
17383 * MyConnection *conn = NULL;
17384 * GSocketConnectable *addr;
17385 * GSocketAddressEnumerator *enumerator;
17386 * GSocketAddress *sockaddr;
17387 * GError *conn_error = NULL;
17388 * addr = g_network_address_new ("www.gnome.org", 80);
17389 * enumerator = g_socket_connectable_enumerate (addr);
17390 * g_object_unref (addr);
17391 * /<!-- -->* Try each sockaddr until we succeed. Record the first
17392 * * connection error, but not any further ones (since they'll probably
17393 * * be basically the same as the first).
17395 * while (!conn && (sockaddr = g_socket_address_enumerator_next (enumerator, cancellable, error))
17397 * g_object_unref (sockaddr);
17399 * g_object_unref (enumerator);
17404 * /<!-- -->* We couldn't connect to the first address, but we succeeded
17405 * * in connecting to a later address.
17407 * g_error_free (conn_error);
17413 * /<!-- -->* Either the initial lookup failed, or else the caller
17417 * g_error_free (conn_error);
17422 * g_error_propagate (error, conn_error);
17428 * Conn = connect_to_sockaddr (sockaddr, conn_error ? null : &conn_error);
17433 * g_dbus_connection_close_sync:
17434 * @connection: A #GDBusConnection.
17435 * @cancellable: A #GCancellable or %NULL.
17436 * @error: Return location for error or %NULL.
17438 * Synchronously closees @connection. The calling thread is blocked
17439 * until this is done. See g_dbus_connection_close() for the
17440 * asynchronous version of this method and more details about what it
17443 * Returns: %TRUE if the operation succeeded, %FALSE if @error is set.
17449 * g_settings_get_double:
17450 * @settings: a #GSettings object
17451 * @key: the key to get the value for
17452 * @returns: a double
17454 * Gets the value that is stored at @key in @settings.
17455 * A convenience variant of g_settings_get() for doubles.
17456 * It is a programmer error to give a @key that isn't specified as
17457 * having a 'double' type in the schema for @settings.
17464 * g_app_info_equal:
17465 * @appinfo1: the first #GAppInfo.
17466 * @appinfo2: the second #GAppInfo.
17468 * Checks if two #GAppInfo<!-- -->s are equal.
17470 * Returns: %TRUE if @appinfo1 is equal to @appinfo2. %FALSE otherwise.
17476 * @mount: a #GMount.
17477 * @flags: flags affecting the operation
17478 * @mount_operation: a #GMountOperation or %NULL to avoid user interaction.
17479 * @cancellable: optional #GCancellable object, %NULL to ignore.
17480 * @callback: a #GAsyncReadyCallback, or %NULL.
17481 * @user_data: user data passed to @callback.
17483 * Remounts a mount. This is an asynchronous operation, and is
17484 * finished by calling g_mount_remount_finish() with the @mount
17485 * and #GAsyncResults data returned in the @callback.
17486 * Remounting is useful when some setting affecting the operation
17487 * of the volume has been changed, as these may need a remount to
17488 * take affect. While this is semantically equivalent with unmounting
17489 * and then remounting not all backends might need to actually be
17495 * g_volume_can_mount:
17496 * @volume: a #GVolume.
17498 * Checks if a volume can be mounted.
17500 * Returns: %TRUE if the @volume can be mounted. %FALSE otherwise.
17505 * g_volume_monitor_get:
17507 * Gets the volume monitor used by gio.
17508 * g_object_unref() when done with it.
17510 * Returns: (transfer full): a reference to the #GVolumeMonitor used by gio. Call
17515 * g_file_make_directory_with_parents:
17516 * @file: input #GFile.
17517 * @cancellable: optional #GCancellable object, %NULL to ignore.
17518 * @error: a #GError, or %NULL
17520 * Creates a directory and any parent directories that may not exist similar to
17521 * 'mkdir -p'. If the file system does not support creating directories, this
17522 * function will fail, setting @error to %G_IO_ERROR_NOT_SUPPORTED.
17523 * For a local #GFile the newly created directories will have the default
17524 * (current) ownership and permissions of the current process.
17525 * If @cancellable is not %NULL, then the operation can be cancelled by
17526 * triggering the cancellable object from another thread. If the operation
17527 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
17530 * Returns: %TRUE if all directories have been successfully created, %FALSE
17536 * g_buffered_input_stream_peek_buffer:
17537 * @stream: a #GBufferedInputStream
17538 * @count: a #gsize to get the number of bytes available in the buffer
17540 * Returns the buffer with the currently available bytes. The returned
17541 * buffer must not be modified and will become invalid when reading from
17542 * the stream or filling the buffer.
17544 * Returns: read-only buffer
17549 * g_file_query_file_type:
17550 * @file: input #GFile.
17551 * @flags: a set of #GFileQueryInfoFlags passed to g_file_query_info().
17552 * @cancellable: optional #GCancellable object, %NULL to ignore.
17554 * Utility function to inspect the #GFileType of a file. This is
17555 * implemented using g_file_query_info() and as such does blocking I/O.
17556 * The primary use case of this method is to check if a file is a regular file,
17557 * directory, or symlink.
17560 * Returns: The #GFileType of the file and #G_FILE_TYPE_UNKNOWN if the file
17566 * SECTION:gasyncinitabl:
17567 * @short_description: Asynchronously failable object initialization interface
17568 * @include: gio/gio.h
17569 * @see_also: #GInitable
17571 * This is the asynchronous version of #GInitable; it behaves the same
17572 * in all ways except that initialization is asynchronous. For more details
17573 * see the descriptions on #GInitable.
17574 * A class may implement both the #GInitable and #GAsyncInitable interfaces.
17575 * Users of objects implementing this are not intended to use the interface
17576 * method directly; instead it will be used automatically in various ways.
17577 * For C applications you generally just call g_async_initable_new_async()
17578 * directly, or indirectly via a foo_thing_new_async() wrapper. This will call
17579 * g_async_initable_init_async() under the cover, calling back with %NULL and
17580 * a set %GError on failure.
17581 * A typical implementation might look something like this:
17589 * _foo_ready_cb (Foo *self)
17592 * self->priv->state = INITIALIZED;
17593 * for (l = self->priv->init_results; l != NULL; l = l->next)
17595 * GSimpleAsyncResult *simple = l->data;
17596 * if (!self->priv->success)
17597 * g_simple_async_result_set_error (simple, ...);
17598 * g_simple_async_result_complete (simple);
17599 * g_object_unref (simple);
17601 * g_list_free (self->priv->init_results);
17602 * self->priv->init_results = NULL;
17605 * foo_init_async (GAsyncInitable *initable,
17607 * GCancellable *cancellable,
17608 * GAsyncReadyCallback callback,
17609 * gpointer user_data)
17611 * Foo *self = FOO (initable);
17612 * GSimpleAsyncResult *simple;
17613 * simple = g_simple_async_result_new (G_OBJECT (initable)
17617 * switch (self->priv->state)
17619 * case NOT_INITIALIZED:
17620 * _foo_get_ready (self);
17621 * self->priv->init_results = g_list_append (self->priv->init_results,
17623 * self->priv->state = INITIALIZING;
17625 * case INITIALIZING:
17626 * self->priv->init_results = g_list_append (self->priv->init_results,
17629 * case INITIALIZED:
17630 * if (!self->priv->success)
17631 * g_simple_async_result_set_error (simple, ...);
17632 * g_simple_async_result_complete_in_idle (simple);
17633 * g_object_unref (simple);
17638 * foo_init_finish (GAsyncInitable *initable,
17639 * GAsyncResult *result,
17642 * g_return_val_if_fail (g_simple_async_result_is_valid (result,
17643 * G_OBJECT (initable), foo_init_async), FALSE);
17644 * if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (result),
17650 * foo_async_initable_iface_init (gpointer g_iface,
17653 * GAsyncInitableIface *iface = g_iface;
17654 * iface->init_async = foo_init_async;
17655 * iface->init_finish = foo_init_finish;
17662 * g_file_attribute_info_list_new:
17664 * Creates a new file attribute info list.
17666 * Returns: a #GFileAttributeInfoList.
17671 * g_resolver_lookup_by_name_finish:
17672 * @resolver: a #GResolver
17673 * @result: the result passed to your #GAsyncReadyCallback
17674 * @error: return location for a #GError, or %NULL
17676 * Retrieves the result of a call to
17677 * g_resolver_lookup_by_name_async().
17678 * If the DNS resolution failed, @error (if non-%NULL) will be set to
17679 * a value from #GResolverError. If the operation was cancelled,
17680 * of #GInetAddress, or %NULL on error. See g_resolver_lookup_by_name()
17681 * for more details.
17683 * Returns: (element-type GInetAddress) (transfer full): a #GList
17689 * g_data_input_stream_get_newline_type:
17690 * @stream: a given #GDataInputStream.
17692 * Gets the current newline type for the @stream.
17694 * Returns: #GDataStreamNewlineType for the given @stream.
17699 * g_volume_eject_with_operation_finish:
17700 * @volume: a #GVolume.
17701 * @result: a #GAsyncResult.
17702 * @error: a #GError location to store the error occuring, or %NULL to ignore.
17704 * Finishes ejecting a volume. If any errors occurred during the operation,
17706 * Returns: %TRUE if the volume was successfully ejected. %FALSE otherwise.
17712 * g_drive_can_poll_for_media:
17713 * @drive: a #GDrive.
17715 * Checks if a drive can be polled for media changes.
17716 * %FALSE otherwise.
17718 * Returns: %TRUE if the @drive can be polled for media changes,
17723 * g_dbus_error_register_error_domain:
17724 * @error_domain_quark_name: The error domain name.
17725 * @quark_volatile: A pointer where to store the #GQuark.
17726 * @entries: A pointer to @num_entries #GDBusErrorEntry struct items.
17727 * @num_entries: Number of items to register.
17729 * Helper function for associating a #GError error domain with D-Bus error names.
17736 * g_cancellable_release_fd:
17737 * @cancellable: a #GCancellable
17739 * Releases a resources previously allocated by g_cancellable_get_fd()
17740 * or g_cancellable_make_pollfd().
17741 * For compatibility reasons with older releases, calling this function
17742 * is not strictly required, the resources will be automatically freed
17743 * when the @cancellable is finalized. However, the @cancellable will
17744 * block scarce file descriptors until it is finalized if this function
17745 * is not called. This can cause the application to run out of file
17746 * descriptors when many #GCancellables are used at the same time.
17753 * g_data_input_stream_read_upto:
17754 * @stream: a #GDataInputStream
17755 * @stop_chars: characters to terminate the read
17756 * @stop_chars_len: length of @stop_chars. May be -1 if @stop_chars is nul-terminated
17757 * @length: a #gsize to get the length of the data read in
17758 * @cancellable: optional #GCancellable object, %NULL to ignore
17759 * @error: #GError for error reporting
17761 * Reads a string from the data input stream, up to the first
17762 * occurrence of any of the stop characters.
17763 * In contrast to g_data_input_stream_read_until(), this function
17764 * does <emphasis>not</emphasis> consume the stop character. You have
17765 * to use g_data_input_stream_read_byte() to get it before calling
17766 * g_data_input_stream_read_upto() again.
17767 * Note that @stop_chars may contain '\0' if @stop_chars_len is
17769 * any of the stop characters. Set @length to a #gsize to get the length
17770 * of the string. This function will return %NULL on an error
17772 * Returns: a string with the data that was read before encountering
17778 * g_inet_address_get_family:
17779 * @address: a #GInetAddress
17781 * Gets @address's family
17783 * Returns: @address's family
17789 * g_filename_completer_get_completions:
17790 * @completer: the filename completer.
17791 * @initial_text: text to be completed.
17793 * Gets an array of completion strings for a given initial text.
17794 * This array must be freed by g_strfreev() when finished.
17796 * Returns: (array zero-terminated=1) (transfer full): array of strings with possible completions for @initial_text.
17801 * g_data_output_stream_get_byte_order:
17802 * @stream: a #GDataOutputStream.
17804 * Gets the byte order for the stream.
17806 * Returns: the #GDataStreamByteOrder for the @stream.
17811 * g_file_info_get_icon:
17812 * @info: a #GFileInfo.
17814 * Gets the icon for a file.
17816 * Returns: (transfer none): #GIcon for the given @info.
17821 * g_filter_output_stream_set_close_base_stream:
17822 * @stream: a #GFilterOutputStream.
17823 * @close_base: %TRUE to close the base stream.
17825 * Sets whether the base stream will be closed when @stream is closed.
17830 * g_file_set_display_name:
17831 * @file: input #GFile.
17832 * @display_name: a string.
17833 * @cancellable: optional #GCancellable object, %NULL to ignore.
17834 * @error: a #GError, or %NULL
17836 * Renames @file to the specified display name.
17837 * The display name is converted from UTF8 to the correct encoding for the target
17838 * filesystem if possible and the @file is renamed to this.
17839 * If you want to implement a rename operation in the user interface the edit name
17840 * (#G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME) should be used as the initial value in the rename
17841 * widget, and then the result after editing should be passed to g_file_set_display_name().
17842 * On success the resulting converted filename is returned.
17843 * If @cancellable is not %NULL, then the operation can be cancelled by
17844 * triggering the cancellable object from another thread. If the operation
17845 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
17846 * if there was an error.
17847 * Free the returned object with g_object_unref().
17849 * Returns: (transfer full): a #GFile specifying what @file was renamed to, or %NULL
17854 * g_settings_get_has_unapplied:
17855 * @settings: a #GSettings object
17856 * @returns: %TRUE if @settings has unapplied changes
17858 * Returns whether the #GSettings object has any unapplied
17859 * changes. This can only be the case if it is in 'delayed-apply' mode.
17866 * SECTION:gconverteroutputstrea:
17867 * @short_description: Converter Output Stream
17868 * @include: gio/gio.h
17869 * @see_also: #GOutputStream, #GConverter
17871 * Converter output stream implements #GOutputStream and allows
17872 * conversion of data of various types during reading.
17877 * g_file_poll_mountable_finish:
17878 * @file: input #GFile.
17879 * @result: a #GAsyncResult.
17880 * @error: a #GError, or %NULL
17882 * Finishes a poll operation. See g_file_poll_mountable() for details.
17883 * Finish an asynchronous poll operation that was polled
17884 * with g_file_poll_mountable().
17887 * Returns: %TRUE if the operation finished successfully. %FALSE
17893 * g_io_error_quark:
17895 * Gets the GIO Error Quark.
17897 * Returns: a #GQuark.
17902 * g_network_service_get_domain:
17903 * @srv: a #GNetworkService
17905 * Gets the domain that @srv serves. This might be either UTF-8 or
17906 * ASCII-encoded, depending on what @srv was created with.
17908 * Returns: @srv's domain name
17914 * g_file_get_child_for_display_name:
17915 * @file: input #GFile.
17916 * @display_name: string to a possible child.
17919 * Gets the child of @file for a given @display_name (i.e. a UTF8
17920 * version of the name). If this function fails, it returns %NULL and @error will be
17921 * set. This is very useful when constructing a GFile for a new file
17922 * and the user entered the filename in the user interface, for instance
17923 * when you select a directory and type a filename in the file selector.
17924 * This call does no blocking i/o.
17925 * %NULL if the display name couldn't be converted.
17926 * Free the returned object with g_object_unref().
17928 * Returns: (transfer full): a #GFile to the specified child, or
17933 * g_file_info_set_modification_tim:
17934 * @info: a #GFileInfo.
17935 * @mtime: a #GTimeVal.
17937 * Sets the %G_FILE_ATTRIBUTE_TIME_MODIFIED attribute in the file
17938 * info to the given time value.
17943 * g_socket_get_protocol:
17944 * @socket: a #GSocket.
17946 * Gets the socket protocol id the socket was created with.
17947 * In case the protocol is unknown, -1 is returned.
17949 * Returns: a protocol id, or -1 if unknown
17955 * g_file_query_info_async:
17956 * @file: input #GFile.
17957 * @attributes: an attribute query string.
17958 * @flags: a set of #GFileQueryInfoFlags.
17959 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
17960 * @cancellable: optional #GCancellable object, %NULL to ignore.
17961 * @callback: a #GAsyncReadyCallback to call when the request is satisfied
17962 * @user_data: the data to pass to callback function
17964 * Asynchronously gets the requested information about specified @file. The result
17965 * is a #GFileInfo object that contains key-value attributes (such as type or size
17967 * For more details, see g_file_query_info() which is
17968 * the synchronous version of this call.
17969 * When the operation is finished, @callback will be called. You can then call
17970 * g_file_query_info_finish() to get the result of the operation.
17975 * g_app_info_remove_supports_type:
17976 * @appinfo: a #GAppInfo.
17977 * @content_type: a string.
17978 * @error: a #GError.
17980 * Removes a supported type from an application, if possible.
17982 * Returns: %TRUE on success, %FALSE on error.
17988 * @object_type: a #GType supporting #GInitable.
17989 * @n_parameters: the number of parameters in @parameters
17990 * @parameters: the parameters to use to construct the object
17991 * @cancellable: optional #GCancellable object, %NULL to ignore.
17992 * @error: a #GError location to store the error occuring, or %NULL to ignore.
17994 * Helper function for constructing #GInitiable object. This is
17995 * similar to g_object_newv() but also initializes the object
17996 * and returns %NULL, setting an error on failure.
17998 * Returns: (transfer full): a newly allocated #GObject, or %NULL on error
18004 * g_unix_output_stream_get_close_fd:
18005 * @stream: a #GUnixOutputStream
18007 * Returns whether the file descriptor of @stream will be
18008 * closed when the stream is closed.
18010 * Returns: %TRUE if the file descriptor is closed when done
18016 * g_settings_get_int:
18017 * @settings: a #GSettings object
18018 * @key: the key to get the value for
18019 * @returns: an integer
18021 * Gets the value that is stored at @key in @settings.
18022 * A convenience variant of g_settings_get() for 32-bit integers.
18023 * It is a programmer error to give a @key that isn't specified as
18024 * having a int32 type in the schema for @settings.
18031 * g_data_input_stream_set_newline_type:
18032 * @stream: a #GDataInputStream.
18033 * @type: the type of new line return as #GDataStreamNewlineType.
18035 * Sets the newline type for the @stream.
18036 * Note that using G_DATA_STREAM_NEWLINE_TYPE_ANY is slightly unsafe. If a read
18037 * chunk ends in "CR" we must read an additional byte to know if this is "CR" or
18038 * "CR LF", and this might block if there is no more data availible.
18043 * g_inet_socket_address_new:
18044 * @address: a #GInetAddress
18045 * @port: a port number
18047 * Creates a new #GInetSocketAddress for @address and @port.
18049 * Returns: a new #GInetSocketAddress
18055 * g_dbus_connection_new_for_address_finish:
18056 * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_new().
18057 * @error: Return location for error or %NULL.
18059 * Finishes an operation started with g_dbus_connection_new_for_address().
18061 * Returns: A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
18067 * g_srv_target_get_weight:
18068 * @target: a #GSrvTarget
18070 * Gets @target's weight. You should not need to look at this;
18071 * #GResolver already sorts the targets according to the algorithm in
18074 * Returns: @target's weight
18080 * g_application_command_line_get_cwd:
18081 * @cmdline: a #GApplicationCommandLine
18083 * Gets the working directory of the command line invocation. The
18084 * string may contain non-utf8 data.
18085 * It is possible that the remote application did not send a working
18086 * directory, so this may be %NULL.
18087 * The return value should not be modified or freed and is valid for as
18088 * long as @cmdline exists.
18090 * Returns: the current directory, or %NULL
18096 * g_mount_operation_set_password:
18097 * @op: a #GMountOperation.
18098 * @password: password to set.
18100 * Sets the mount operation's password to @password.
18106 * @object_type: a #GType supporting #GInitable.
18107 * @cancellable: optional #GCancellable object, %NULL to ignore.
18108 * @error: a #GError location to store the error occuring, or %NULL to ignore.
18109 * @first_property_name: the name of the first property, or %NULL if no properties
18110 * @...: the value if the first property, followed by and other property value pairs, and ended by %NULL.
18112 * Helper function for constructing #GInitiable object. This is
18113 * similar to g_object_new() but also initializes the object
18114 * and returns %NULL, setting an error on failure.
18116 * Returns: (transfer full): a newly allocated #GObject, or %NULL on error
18122 * g_file_info_set_attribute_uint32:
18123 * @info: a #GFileInfo.
18124 * @attribute: a file attribute key.
18125 * @attr_value: an unsigned 32-bit integer.
18127 * Sets the @attribute to contain the given @attr_value,
18133 * g_volume_get_name:
18134 * @volume: a #GVolume.
18136 * Gets the name of @volume.
18137 * be freed with g_free() when no longer needed.
18139 * Returns: the name for the given @volume. The returned string should
18144 * g_converter_input_stream_new:
18145 * @base_stream: a #GInputStream
18146 * @converter: a #GConverter
18148 * Creates a new converter input stream for the @base_stream.
18150 * Returns: a new #GInputStream.
18156 * @short_description: Low-level socket object
18157 * @include: gio/gio.h
18158 * @see_also: #GInitable
18160 * A #GSocket is a low-level networking primitive. It is a more or less
18161 * direct mapping of the BSD socket API in a portable GObject based API.
18162 * It supports both the UNIX socket implementations and winsock2 on Windows.
18163 * #GSocket is the platform independent base upon which the higher level
18164 * network primitives are based. Applications are not typically meant to
18165 * use it directly, but rather through classes like #GSocketClient,
18166 * #GSocketService and #GSocketConnection. However there may be cases where
18167 * direct use of #GSocket is useful.
18168 * #GSocket implements the #GInitable interface, so if it is manually constructed
18169 * by e.g. g_object_new() you must call g_initable_init() and check the
18170 * results before using the object. This is done automatically in
18171 * g_socket_new() and g_socket_new_from_fd(), so these functions can return
18173 * Sockets operate in two general modes, blocking or non-blocking. When
18174 * in blocking mode all operations block until the requested operation
18175 * is finished or there is an error. In non-blocking mode all calls that
18176 * would block return immediately with a %G_IO_ERROR_WOULD_BLOCK error.
18177 * To know when a call would successfully run you can call g_socket_condition_check(),
18178 * or g_socket_condition_wait(). You can also use g_socket_create_source() and
18179 * attach it to a #GMainContext to get callbacks when I/O is possible.
18180 * Note that all sockets are always set to non blocking mode in the system, and
18181 * blocking mode is emulated in GSocket.
18182 * When working in non-blocking mode applications should always be able to
18183 * handle getting a %G_IO_ERROR_WOULD_BLOCK error even when some other
18184 * function said that I/O was possible. This can easily happen in case
18185 * of a race condition in the application, but it can also happen for other
18186 * reasons. For instance, on Windows a socket is always seen as writable
18187 * until a write returns %G_IO_ERROR_WOULD_BLOCK.
18188 * #GSocket<!-- -->s can be either connection oriented or datagram based.
18189 * For connection oriented types you must first establish a connection by
18190 * either connecting to an address or accepting a connection from another
18191 * address. For connectionless socket types the target/source address is
18192 * specified or received in each I/O operation.
18193 * All socket file descriptors are set to be close-on-exec.
18194 * Note that creating a #GSocket causes the signal %SIGPIPE to be
18195 * ignored for the remainder of the program. If you are writing a
18196 * command-line utility that uses #GSocket, you may need to take into
18197 * account the fact that your program will not automatically be killed
18198 * if it tries to write to %stdout after it has been closed.
18207 * The file containing the icon.
18212 * g_emblem_new_with_origin:
18213 * @icon: a GIcon containing the icon.
18214 * @origin: a GEmblemOrigin enum defining the emblem's origin
18216 * Creates a new emblem for @icon.
18218 * Returns: a new #GEmblem.
18224 * GDBusServer:client-address:
18226 * The D-Bus address that clients can use.
18233 * g_dbus_node_info_new_for_xml:
18234 * @xml_data: Valid D-Bus introspection XML.
18235 * @error: Return location for error.
18237 * Parses @xml_data and returns a #GDBusNodeInfo representing the data.
18238 * with g_dbus_node_info_unref().
18240 * Returns: A #GDBusNodeInfo structure or %NULL if @error is set. Free
18246 * GMemoryOutputStream:data-size:
18248 * Size of data written to the buffer.
18255 * GDBusConnection:stream:
18257 * The underlying #GIOStream used for I/O.
18264 * g_output_stream_set_pending:
18265 * @stream: a #GOutputStream.
18266 * @error: a #GError location to store the error occuring, or %NULL to ignore.
18268 * Sets @stream to have actions pending. If the pending flag is
18269 * already set or @stream is closed, it will return %FALSE and set
18271 * Returns: %TRUE if pending was previously unset and is now set.
18276 * SECTION:gconverterinputstrea:
18277 * @short_description: Converter Input Stream
18278 * @include: gio/gio.h
18279 * @see_also: #GInputStream, #GConverter
18281 * Converter input stream implements #GInputStream and allows
18282 * conversion of data of various types during reading.
18287 * g_input_stream_skip:
18288 * @stream: a #GInputStream.
18289 * @count: the number of bytes that will be skipped from the stream
18290 * @cancellable: optional #GCancellable object, %NULL to ignore.
18291 * @error: location to store the error occuring, or %NULL to ignore
18293 * Tries to skip @count bytes from the stream. Will block during the operation.
18294 * This is identical to g_input_stream_read(), from a behaviour standpoint,
18295 * but the bytes that are skipped are not returned to the user. Some
18296 * streams have an implementation that is more efficient than reading the data.
18297 * This function is optional for inherited classes, as the default implementation
18298 * emulates it using read.
18299 * If @cancellable is not %NULL, then the operation can be cancelled by
18300 * triggering the cancellable object from another thread. If the operation
18301 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
18302 * operation was partially finished when the operation was cancelled the
18303 * partial result will be returned, without an error.
18305 * Returns: Number of bytes skipped, or -1 on error
18310 * g_mount_operation_set_password_save:
18311 * @op: a #GMountOperation.
18312 * @save: a set of #GPasswordSave flags.
18314 * Sets the state of saving passwords for the mount operation.
18319 * g_app_info_launch_default_for_uri:
18320 * @uri: the uri to show
18321 * @launch_context: an optional #GAppLaunchContext.
18322 * @error: a #GError.
18324 * Utility function that launches the default application
18325 * registered to handle the specified uri. Synchronous I/O
18326 * is done on the uri to detect the type of the file if
18329 * Returns: %TRUE on success, %FALSE on error.
18334 * g_buffered_input_stream_fill_finish:
18335 * @stream: a #GBufferedInputStream
18336 * @result: a #GAsyncResult
18337 * @error: a #GError
18339 * Finishes an asynchronous read.
18341 * Returns: a #gssize of the read stream, or %-1 on an error.
18346 * g_file_info_set_name:
18347 * @info: a #GFileInfo.
18348 * @name: a string containing a name.
18350 * Sets the name attribute for the current #GFileInfo.
18351 * See %G_FILE_ATTRIBUTE_STANDARD_NAME.
18356 * g_socket_address_new_from_native:
18357 * @native: a pointer to a <type>struct sockaddr</type>
18358 * @len: the size of the memory location pointed to by @native
18360 * Creates a #GSocketAddress subclass corresponding to the native
18361 * <type>struct sockaddr</type> @native.
18364 * Returns: a new #GSocketAddress if @native could successfully be converted,
18370 * g_drive_start_finish:
18371 * @drive: a #GDrive.
18372 * @result: a #GAsyncResult.
18373 * @error: a #GError, or %NULL
18375 * Finishes starting a drive.
18376 * %FALSE otherwise.
18378 * Returns: %TRUE if the drive has been started successfully,
18384 * g_settings_range_check:
18385 * @settings: a #GSettings
18386 * @key: the key to check
18387 * @value: the value to check
18388 * @returns: %TRUE if @value is valid for @key
18390 * Checks if the given @value is of the correct type and within the
18391 * permitted range for @key.
18392 * This API is not intended to be used by normal programs -- they should
18393 * already know what is permitted by their own schemas. This API is
18394 * meant to be used by programs such as editors or commandline tools.
18395 * It is a programmer error to give a @key that isn't contained in the
18396 * schema for @settings.
18403 * g_socket_set_keepalive:
18404 * @socket: a #GSocket.
18405 * @keepalive: Value for the keepalive flag
18407 * Sets or unsets the %SO_KEEPALIVE flag on the underlying socket. When
18408 * this flag is set on a socket, the system will attempt to verify that the
18409 * remote socket endpoint is still present if a sufficiently long period of
18410 * time passes with no data being exchanged. If the system is unable to
18411 * verify the presence of the remote endpoint, it will automatically close
18413 * This option is only functional on certain kinds of sockets. (Notably,
18414 * %G_SOCKET_PROTOCOL_TCP sockets.)
18415 * The exact time between pings is system- and protocol-dependent, but will
18416 * normally be at least two hours. Most commonly, you would set this flag
18417 * on a server socket if you want to allow clients to remain idle for long
18418 * periods of time, but also want to ensure that connections are eventually
18419 * garbage-collected if clients crash or become unreachable.
18427 * @short_description: Interface for proxy handling
18429 * A #GProxy handles connecting to a remote host via a given type of
18430 * proxy server. It is implemented by the 'gio-proxy' extension point.
18431 * The extensions are named after their proxy protocol name. As an
18432 * example, a SOCKS5 proxy implementation can be retrieved with the
18433 * name 'socks5' using the function
18434 * g_io_extension_point_get_extension_by_name().
18441 * g_unix_fd_message_steal_fds:
18442 * @message: a #GUnixFDMessage
18443 * @length: pointer to the length of the returned array, or %NULL
18445 * Returns the array of file descriptors that is contained in this
18447 * After this call, the descriptors are no longer contained in
18448 * descriptors have been added).
18449 * The return result of this function must be freed with g_free().
18450 * The caller is also responsible for closing all of the file
18452 * If @length is non-%NULL then it is set to the number of file
18453 * descriptors in the returned array. The returned array is also
18454 * terminated with -1.
18455 * This function never returns %NULL. In case there are no file
18456 * descriptors contained in @message, an empty array is returned.
18458 * Returns: an array of file descriptors
18464 * g_file_enumerator_next_file:
18465 * @enumerator: a #GFileEnumerator.
18466 * @cancellable: optional #GCancellable object, %NULL to ignore.
18467 * @error: location to store the error occuring, or %NULL to ignore
18469 * Returns information for the next file in the enumerated object.
18470 * Will block until the information is available. The #GFileInfo
18471 * returned from this function will contain attributes that match the
18472 * attribute string that was passed when the #GFileEnumerator was created.
18473 * On error, returns %NULL and sets @error to the error. If the
18474 * enumerator is at the end, %NULL will be returned and @error will
18476 * Free the returned object with g_object_unref() when no longer needed.
18478 * Returns: (transfer full): A #GFileInfo or %NULL on error or end of enumerator.
18483 * g_unix_fd_list_get_length:
18484 * @list: a #GUnixFDList
18486 * contained within).
18488 * Gets the length of @list (ie: the number of file descriptors
18489 * Returns: the length of @list
18495 * GDBusServerClass:
18496 * @new_connection: Signal class handler for the #GDBusServer::new-connection signal.
18498 * Class structure for #GDBusServer.
18505 * g_socket_speaks_ipv4:
18506 * @socket: a #GSocket
18508 * Checks if a socket is capable of speaking IPv4.
18509 * IPv4 sockets are capable of speaking IPv4. On some operating systems
18510 * and under some combinations of circumstances IPv6 sockets are also
18511 * capable of speaking IPv4. See RFC 3493 section 3.7 for more
18513 * No other types of sockets are currently considered as being capable
18514 * of speaking IPv4.
18516 * Returns: %TRUE if this socket can be used with IPv4.
18522 * g_dbus_message_set_message_type:
18523 * @message: A #GDBusMessage.
18524 * @type: A 8-bit unsigned integer (typically a value from the #GDBusMessageType enumeration).
18526 * Sets @message to be of @type.
18535 * If @action is currently enabled.
18536 * If the action is disabled then calls to g_action_activate() and
18537 * g_action_set_state() have no effect.
18546 * The name of the action. This is mostly meaningful for identifying
18547 * the action once it has been added to a #GActionGroup.
18554 * g_unix_mount_guess_should_display:
18555 * @mount_entry: a #GUnixMountEntry
18557 * Guesses whether a Unix mount should be displayed in the UI.
18559 * Returns: %TRUE if @mount_entry is deemed to be displayable.
18564 * g_volume_monitor_get_mount_for_uuid:
18565 * @volume_monitor: a #GVolumeMonitor.
18566 * @uuid: the UUID to look for
18568 * Finds a #GMount object by its UUID (see g_mount_get_uuid())
18569 * Free the returned object with g_object_unref().
18571 * Returns: (transfer full): a #GMount or %NULL if no such mount is available.
18576 * GFileMonitor::changed:
18577 * @monitor: a #GFileMonitor.
18579 * @other_file: a #GFile.
18580 * @event_type: a #GFileMonitorEvent.
18582 * Emitted when a file has been changed.
18587 * g_file_create_readwrite_finish:
18588 * @file: input #GFile
18589 * @res: a #GAsyncResult
18590 * @error: a #GError, or %NULL
18592 * Finishes an asynchronous file create operation started with
18593 * g_file_create_readwrite_async().
18594 * Free the returned object with g_object_unref().
18596 * Returns: (transfer full): a #GFileIOStream or %NULL on error.
18602 * g_converter_output_stream_get_converter:
18603 * @converter_stream: a #GConverterOutputStream
18605 * Gets the #GConverter that is used by @converter_stream.
18607 * Returns: (transfer none): the converter of the converter output stream
18613 * g_file_monitor_set_rate_limit:
18614 * @monitor: a #GFileMonitor.
18615 * @limit_msecs: a integer with the limit in milliseconds to poll for changes.
18617 * Sets the rate limit to which the @monitor will report
18618 * consecutive change events to the same file.
18623 * g_cancellable_set_error_if_cancelled:
18624 * @cancellable: a #GCancellable object.
18625 * @error: #GError to append error state to.
18627 * If the @cancellable is cancelled, sets the error to notify
18628 * that the operation was cancelled.
18630 * Returns: %TRUE if @cancellable was cancelled, %FALSE if it was not.
18635 * g_file_create_finish:
18636 * @file: input #GFile.
18637 * @res: a #GAsyncResult.
18638 * @error: a #GError, or %NULL
18640 * Finishes an asynchronous file create operation started with
18641 * g_file_create_async().
18642 * Free the returned object with g_object_unref().
18644 * Returns: (transfer full): a #GFileOutputStream or %NULL on error.
18649 * g_mount_operation_get_password_save:
18650 * @op: a #GMountOperation.
18652 * Gets the state of saving passwords for the mount operation.
18654 * Returns: a #GPasswordSave flag.
18659 * SECTION:gzcompresso:
18660 * @short_description: Zlib compressor
18661 * @include: gio/gio.h
18663 * #GZlibCompressor is an implementation of #GConverter that
18664 * compresses data using zlib.
18669 * g_buffered_input_stream_new:
18670 * @base_stream: a #GInputStream
18672 * Creates a new #GInputStream from the given @base_stream, with
18673 * a buffer set to the default size (4 kilobytes).
18675 * Returns: a #GInputStream for the given @base_stream.
18680 * g_unix_connection_send_credentials:
18681 * @connection: A #GUnixConnection.
18682 * @cancellable: A #GCancellable or %NULL.
18683 * @error: Return location for error or %NULL.
18685 * Passes the credentials of the current user the receiving side
18686 * of the connection. The recieving end has to call
18687 * g_unix_connection_receive_credentials() (or similar) to accept the
18689 * As well as sending the credentials this also writes a single NUL
18690 * byte to the stream, as this is required for credentials passing to
18691 * work on some implementations.
18692 * Other ways to exchange credentials with a foreign peer includes the
18693 * #GUnixCredentialsMessage type and g_socket_get_credentials() function.
18695 * Returns: %TRUE on success, %FALSE if @error is set.
18701 * g_settings_backend_changed:
18702 * @backend: a #GSettingsBackend implementation
18703 * @key: the name of the key
18704 * @origin_tag: the origin tag
18706 * Signals that a single key has possibly changed. Backend
18707 * implementations should call this if a key has possibly changed its
18709 * '//', and not ending with a slash).
18710 * The implementation must call this function during any call to
18711 * g_settings_backend_write(), before the call returns (except in the
18712 * case that no keys are actually changed and it cares to detect this
18713 * fact). It may not rely on the existence of a mainloop for
18714 * dispatching the signal later.
18715 * The implementation may call this function at any other time it likes
18716 * in response to other events (such as changes occuring outside of the
18717 * program). These calls may originate from a mainloop or may originate
18718 * in response to any other action (including from calls to
18719 * g_settings_backend_write()).
18720 * In the case that this call is in response to a call to
18721 * g_settings_backend_write() then @origin_tag must be set to the same
18722 * value that was passed to that call.
18729 * g_data_input_stream_read_line_finish:
18730 * @stream: a given #GDataInputStream.
18731 * @result: the #GAsyncResult that was provided to the callback.
18732 * @length: a #gsize to get the length of the data read in.
18733 * @error: #GError for error reporting.
18735 * Finish an asynchronous call started by
18736 * g_data_input_stream_read_line_async().
18737 * Set @length to a #gsize to get the length of the read line.
18738 * On an error, it will return %NULL and @error will be set. If there's no
18739 * content to read, it will still return %NULL, but @error won't be set.
18741 * Returns: a string with the line that was read in (without the newlines).
18747 * g_content_type_get_icon:
18748 * @type: a content type string
18750 * Gets the icon for a content type.
18751 * object with g_object_unref()
18753 * Returns: (transfer full): #GIcon corresponding to the content type. Free the returned
18758 * GInetAddress:is-mc-node-local:
18760 * Whether this is a node-local multicast address.
18761 * See g_inet_address_get_is_mc_node_local().
18768 * GInetAddress:is-site-local:
18770 * Whether this is a site-local address.
18771 * See g_inet_address_get_is_loopback().
18778 * g_periodic_remove:
18779 * @periodic: a #GPeriodic clock
18780 * @tag: the ID of the callback to remove
18782 * Reverse the effect of a previous call to g_periodic_start().
18783 * This function may not be called from a handler of the repair signal,
18784 * but it is perfectly reasonable to call it from a handler of the tick
18792 * g_io_scheduler_cancel_all_jobs:
18794 * Cancels all cancellable I/O jobs.
18795 * A job is cancellable if a #GCancellable was passed into
18796 * g_io_scheduler_push_job().
18801 * g_unix_fd_list_new:
18803 * Creates a new #GUnixFDList containing no file descriptors.
18805 * Returns: a new #GUnixFDList
18811 * g_network_address_get_hostname:
18812 * @addr: a #GNetworkAddress
18814 * Gets @addr's hostname. This might be either UTF-8 or ASCII-encoded,
18815 * depending on what @addr was created with.
18817 * Returns: @addr's hostname
18823 * SECTION:ginetsocketaddres:
18824 * @short_description: Internet GSocketAddress
18826 * An IPv4 or IPv6 socket address; that is, the combination of a
18827 * #GInetAddress and a port number.
18832 * GDrive::stop-button:
18833 * @drive: a #GDrive.
18835 * Emitted when the physical stop button (if any) of a drive has
18843 * SECTION:gsimplepermissio:
18844 * @title: GSimplePermission
18845 * @short_description: a GPermission that doesn't change value
18847 * #GSimplePermission is a trivial implementation of #GPermission that
18848 * represents a permission that is either always or never allowed. The
18849 * value is given at constuction and doesn't change.
18850 * Calling request or release will result in errors.
18855 * g_bus_get_finish:
18856 * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_bus_get().
18857 * @error: Return location for error or %NULL.
18859 * Finishes an operation started with g_bus_get().
18860 * The returned object is a singleton, that is, shared with other
18861 * callers of g_bus_get() and g_bus_get_sync() for @bus_type. In the
18862 * event that you need a private message bus connection, use
18863 * g_dbus_address_get_for_bus() and
18864 * g_dbus_connection_new_for_address().
18865 * Note that the returned #GDBusConnection object will (usually) have
18866 * the #GDBusConnection:exit-on-close property set to %TRUE.
18868 * Returns: (transfer full): A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
18874 * g_action_group_get_action_state_hint:
18875 * @action_group: a #GActionGroup
18876 * @action_name: the name of the action to query
18878 * Requests a hint about the valid range of values for the state of the
18879 * named action within @action_group.
18880 * If %NULL is returned it either means that the action is not stateful
18881 * or that there is no hint about the valid range of values for the
18882 * state of the action.
18883 * If a #GVariant array is returned then each item in the array is a
18884 * returned then the tuple specifies the inclusive lower and upper bound
18885 * of valid values for the state.
18886 * In any case, the information is merely a hint. It may be possible to
18887 * have a state value outside of the hinted range and setting a value
18888 * within the range may fail.
18889 * The return value (if non-%NULL) should be freed with
18890 * g_variant_unref() when it is no longer required.
18892 * Possible value for the state. if a #gvariant pair (ie: two-tuple) is
18893 * Returns: (transfer full): the state range hint
18899 * g_app_info_get_name:
18900 * @appinfo: a #GAppInfo.
18902 * Gets the installed name of the application.
18904 * Returns: the name of the application for @appinfo.
18909 * g_file_info_set_attribute_status:
18910 * @info: a #GFileInfo
18911 * @attribute: a file attribute key
18912 * @status: a #GFileAttributeStatus
18914 * Sets the attribute status for an attribute key. This is only
18915 * needed by external code that implement g_file_set_attributes_from_info()
18916 * or similar functions.
18917 * The attribute must exist in @info for this to work. Otherwise %FALSE
18918 * is returned and @info is unchanged.
18920 * Returns: %TRUE if the status was changed, %FALSE if the key was not set.
18926 * g_file_info_get_etag:
18927 * @info: a #GFileInfo.
18929 * Gets the <link linkend="gfile-etag">entity tag</link> for a given
18930 * #GFileInfo. See %G_FILE_ATTRIBUTE_ETAG_VALUE.
18932 * Returns: a string containing the value of the "etag:value" attribute.
18937 * g_app_info_get_icon:
18938 * @appinfo: a #GAppInfo.
18940 * Gets the icon for the application.
18942 * Returns: (transfer none): the default #GIcon for @appinfo.
18947 * g_volume_get_activation_root:
18948 * @volume: a #GVolume
18950 * Gets the activation root for a #GVolume if it is known ahead of
18951 * mount time. Returns %NULL otherwise. If not %NULL and if @volume
18952 * is mounted, then the result of g_mount_get_root() on the
18953 * #GMount object obtained from g_volume_get_mount() will always
18954 * either be equal or a prefix of what this function returns. In
18955 * other words, in code
18958 * GFile *mount_root
18959 * GFile *volume_activation_root;
18960 * mount = g_volume_get_mount (volume); /* mounted, so never NULL */
18961 * mount_root = g_mount_get_root (mount);
18962 * volume_activation_root = g_volume_get_activation_root(volume); /* assume not NULL */
18963 * </programlisting>
18964 * then the expression
18966 * (g_file_has_prefix (volume_activation_root, mount_root) ||
18967 * </programlisting>
18968 * will always be %TRUE.
18969 * Activation roots are typically used in #GVolumeMonitor
18970 * implementations to find the underlying mount to shadow, see
18971 * g_mount_is_shadowed() for more details.
18972 * g_object_unref() to free.
18974 * Returns: (transfer full): the activation root of @volume or %NULL. Use
18980 * g_dbus_message_set_destination:
18981 * @message: A #GDBusMessage.
18982 * @value: The value to set.
18984 * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION header field.
18992 * @volume: a #GVolume.
18993 * @flags: flags affecting the unmount if required for eject
18994 * @cancellable: optional #GCancellable object, %NULL to ignore.
18995 * @callback: a #GAsyncReadyCallback, or %NULL.
18996 * @user_data: user data that gets passed to @callback
18998 * Ejects a volume. This is an asynchronous operation, and is
18999 * finished by calling g_volume_eject_finish() with the @volume
19000 * and #GAsyncResult returned in the @callback.
19002 * Deprecated: 2.22: Use g_volume_eject_with_operation() instead.
19007 * g_dbus_message_new:
19009 * Creates a new empty #GDBusMessage.
19011 * Returns: A #GDBusMessage. Free with g_object_unref().
19017 * g_dbus_message_get_arg0:
19018 * @message: A #GDBusMessage.
19020 * Convenience to get the first item in the body of @message.
19022 * Returns: The string item or %NULL if the first item in the body of
19028 * g_drive_is_media_removable:
19029 * @drive: a #GDrive.
19031 * Checks if the @drive supports removable media.
19033 * Returns: %TRUE if @drive supports removable media, %FALSE otherwise.
19038 * g_unix_socket_address_get_address_type:
19039 * @address: a #GInetSocketAddress
19041 * Gets @address's type.
19043 * Returns: a #GUnixSocketAddressType
19049 * g_data_output_stream_put_byte:
19050 * @stream: a #GDataOutputStream.
19051 * @data: a #guchar.
19052 * @cancellable: optional #GCancellable object, %NULL to ignore.
19053 * @error: a #GError, %NULL to ignore.
19055 * Puts a byte into the output stream.
19057 * Returns: %TRUE if @data was successfully added to the @stream.
19062 * g_drive_eject_finish:
19063 * @drive: a #GDrive.
19064 * @result: a #GAsyncResult.
19065 * @error: a #GError, or %NULL
19067 * Finishes ejecting a drive.
19068 * %FALSE otherwise.
19070 * Returns: %TRUE if the drive has been ejected successfully,
19071 * Deprecated: 2.22: Use g_drive_eject_with_operation_finish() instead.
19076 * g_app_info_can_delete:
19077 * @appinfo: a #GAppInfo
19079 * Obtains the information whether the #GAppInfo can be deleted.
19080 * See g_app_info_delete().
19082 * Returns: %TRUE if @appinfo can be deleted
19088 * g_dbus_interface_info_generate_xml:
19089 * @info: A #GDBusNodeInfo
19090 * @indent: Indentation level.
19091 * @string_builder: A #GString to to append XML data to.
19093 * Appends an XML representation of @info (and its children) to @string_builder.
19094 * This function is typically used for generating introspection XML
19095 * documents at run-time for handling the
19096 * <literal>org.freedesktop.DBus.Introspectable.Introspect</literal>
19105 * @schema: the name of the schema
19106 * @returns: a new #GSettings object
19108 * Creates a new #GSettings object with a given schema.
19109 * Signals on the newly created #GSettings object will be dispatched
19110 * via the thread-default #GMainContext in effect at the time of the
19111 * call to g_settings_new(). The new #GSettings will hold a reference
19112 * on the context. See g_main_context_push_thread_default().
19119 * g_network_service_get_service:
19120 * @srv: a #GNetworkService
19122 * Gets @srv's service name (eg, "ldap").
19124 * Returns: @srv's service name
19130 * GPeriodicTickFunc:
19131 * @periodic: the #GPeriodic clock that is ticking
19132 * @timestamp: the timestamp at the time of the tick
19133 * @user_data: the user data given to g_periodic_add()
19135 * The signature of the callback function that is called when the
19136 * #GPeriodic clock ticks.
19137 * The @timestamp parameter is equal for all callbacks called during a
19138 * particular tick on a given clock.
19145 * g_vfs_get_file_for_path:
19147 * @path: a string containing a VFS path.
19149 * Gets a #GFile for @path.
19150 * Free the returned object with g_object_unref().
19152 * Returns: (transfer full): a #GFile.
19157 * GInetAddress:is-mc-global:
19159 * Whether this is a global multicast address.
19160 * See g_inet_address_get_is_mc_global().
19167 * g_unix_fd_list_append:
19168 * @list: a #GUnixFDList
19169 * @fd: a valid open file descriptor
19170 * @error: a #GError pointer
19172 * Adds a file descriptor to @list.
19173 * The file descriptor is duplicated using dup(). You keep your copy
19174 * of the descriptor and the copy contained in @list will be closed
19175 * when @list is finalized.
19176 * A possible cause of failure is exceeding the per-process or
19177 * system-wide file descriptor limit.
19178 * The index of the file descriptor in the list is returned. If you use
19179 * this index with g_unix_fd_list_get() then you will receive back a
19180 * duplicated copy of the same file descriptor.
19181 * (and @error is set)
19183 * Returns: the index of the appended fd in case of success, else -1
19189 * g_unix_mount_point_guess_name:
19190 * @mount_point: a #GUnixMountPoint
19192 * Guesses the name of a Unix mount point.
19193 * The result is a translated string.
19194 * be freed with g_free()
19196 * Returns: A newly allocated string that must
19201 * g_dbus_message_lock:
19202 * @message: A #GDBusMessage.
19204 * If @message is locked, does nothing. Otherwise locks the message.
19211 * g_filter_input_stream_set_close_base_stream:
19212 * @stream: a #GFilterInputStream.
19213 * @close_base: %TRUE to close the base stream.
19215 * Sets whether the base stream will be closed when @stream is closed.
19220 * g_simple_async_result_complete:
19221 * @simple: a #GSimpleAsyncResult.
19223 * Completes an asynchronous I/O job immediately. Must be called in
19224 * the thread where the asynchronous result was to be delivered, as it
19225 * invokes the callback directly. If you are in a different thread use
19226 * g_simple_async_result_complete_in_idle().
19227 * Calling this function takes a reference to @simple for as long as
19228 * is needed to complete the call.
19233 * g_drive_get_icon:
19234 * @drive: a #GDrive.
19236 * Gets the icon for @drive.
19237 * Free the returned object with g_object_unref().
19239 * Returns: (transfer full): #GIcon for the @drive.
19244 * g_unix_mount_free:
19245 * @mount_entry: a #GUnixMount.
19247 * Frees a unix mount.
19252 * g_socket_listener_add_any_inet_port:
19253 * @listener: a #GSocketListener
19254 * @source_object: Optional #GObject identifying this source
19255 * @error: a #GError location to store the error occuring, or %NULL to ignore.
19257 * Listens for TCP connections on any available port number for both
19258 * IPv6 and IPv4 (if each are available).
19259 * This is useful if you need to have a socket for incoming connections
19260 * but don't care about the specific port number.
19261 * to accept to identify this particular source, which is
19262 * useful if you're listening on multiple addresses and do
19263 * different things depending on what address is connected to.
19265 * Returns: the port number, or 0 in case of failure.
19271 * g_unix_mount_point_get_fs_type:
19272 * @mount_point: a #GUnixMountPoint.
19274 * Gets the file system type for the mount point.
19276 * Returns: a string containing the file system type.
19281 * g_file_output_stream_query_info:
19282 * @stream: a #GFileOutputStream.
19283 * @attributes: a file attribute query string.
19284 * @cancellable: optional #GCancellable object, %NULL to ignore.
19285 * @error: a #GError, %NULL to ignore.
19287 * Queries a file output stream for the given @attributes.
19288 * This function blocks while querying the stream. For the asynchronous
19289 * version of this function, see g_file_output_stream_query_info_async().
19290 * While the stream is blocked, the stream will set the pending flag
19291 * internally, and any other operations on the stream will fail with
19292 * %G_IO_ERROR_PENDING.
19293 * Can fail if the stream was already closed (with @error being set to
19294 * %G_IO_ERROR_CLOSED), the stream has pending operations (with @error being
19295 * set to %G_IO_ERROR_PENDING), or if querying info is not supported for
19296 * the stream's interface (with @error being set to %G_IO_ERROR_NOT_SUPPORTED). In
19297 * all cases of failure, %NULL will be returned.
19298 * If @cancellable is not %NULL, then the operation can be cancelled by
19299 * triggering the cancellable object from another thread. If the operation
19300 * was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %NULL will
19303 * Returns: (transfer full): a #GFileInfo for the @stream, or %NULL on error.
19308 * g_data_input_stream_read_until_async:
19309 * @stream: a given #GDataInputStream.
19310 * @stop_chars: characters to terminate the read.
19311 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
19312 * @cancellable: optional #GCancellable object, %NULL to ignore.
19313 * @callback: callback to call when the request is satisfied.
19314 * @user_data: the data to pass to callback function.
19316 * The asynchronous version of g_data_input_stream_read_until().
19317 * It is an error to have two outstanding calls to this function.
19318 * Note that, in contrast to g_data_input_stream_read_until(),
19319 * this function does not consume the stop character that it finds. You
19320 * must read it for yourself.
19321 * When the operation is finished, @callback will be called. You
19322 * can then call g_data_input_stream_read_until_finish() to get
19323 * the result of the operation.
19324 * Don't use this function in new code. Its functionality is
19325 * inconsistent with g_data_input_stream_read_until(). Both functions
19326 * will be marked as deprecated in a future release. Use
19327 * g_data_input_stream_read_upto_async() instead.
19334 * g_dbus_error_register_error:
19335 * @error_domain: A #GQuark for a error domain.
19336 * @error_code: An error code.
19337 * @dbus_error_name: A D-Bus error name.
19339 * Creates an association to map between @dbus_error_name and
19340 * #GError<!-- -->s specified by @error_domain and @error_code.
19341 * This is typically done in the routine that returns the #GQuark for
19345 * Returns: %TRUE if the association was created, %FALSE if it already
19351 * GDBusProxy::g-signal:
19352 * @proxy: The #GDBusProxy emitting the signal.
19353 * @sender_name: The sender of the signal or %NULL if the connection is not a bus connection.
19354 * @signal_name: The name of the signal.
19355 * @parameters: A #GVariant tuple with parameters for the signal.
19357 * Emitted when a signal from the remote object and interface that @proxy is for, has been received.
19364 * g_filename_completer_set_dirs_only:
19365 * @completer: the filename completer.
19366 * @dirs_only: a #gboolean.
19368 * If @dirs_only is %TRUE, @completer will only
19369 * complete directory names, and not file names.
19374 * g_simple_async_report_gerror_in_idle:
19375 * @object: a #GObject.
19376 * @callback: a #GAsyncReadyCallback.
19377 * @user_data: user data passed to @callback.
19378 * @error: the #GError to report
19380 * Reports an error in an idle function. Similar to
19381 * g_simple_async_report_error_in_idle(), but takes a #GError rather
19382 * than building a new one.
19387 * g_volume_monitor_get_mounts:
19388 * @volume_monitor: a #GVolumeMonitor.
19390 * Gets a list of the mounts on the system.
19391 * The returned list should be freed with g_list_free(), after
19392 * its elements have been unreffed with g_object_unref().
19394 * Returns: (element-type GMount) (transfer full): a #GList of #GMount objects.
19399 * g_dbus_proxy_get_connection:
19400 * @proxy: A #GDBusProxy.
19402 * Gets the connection @proxy is for.
19404 * Returns: (transfer none): A #GDBusConnection owned by @proxy. Do not free.
19410 * g_win32_input_stream_get_close_handle:
19411 * @stream: a #GWin32InputStream
19413 * Returns whether the handle of @stream will be
19414 * closed when the stream is closed.
19416 * Returns: %TRUE if the handle is closed when done
19422 * g_periodic_block:
19423 * @periodic: a #GPeriodic clock
19425 * Temporarily blocks @periodic from running in order to bring it in
19426 * synch with an external time source.
19427 * This function must be called from a handler of the "repair" signal.
19428 * If this function is called, emission of the tick signal will be
19429 * suspended until g_periodic_unblock() is called an equal number of
19430 * times. Once that happens, the "tick" signal will run immediately and
19431 * future "tick" signals will be emitted relative to the time at which
19432 * the last call to g_periodic_unblock() occured.
19439 * g_unix_mount_is_system_internal:
19440 * @mount_entry: a #GUnixMount.
19442 * Checks if a unix mount is a system path.
19444 * Returns: %TRUE if the unix mount is for a system path.
19449 * g_settings_list_keys:
19450 * @settings: a #GSettings object
19451 * @returns: (transfer full) (element-type utf8): a list of the keys on @settings
19453 * Introspects the list of keys on @settings.
19454 * You should probably not be calling this function from "normal" code
19455 * (since you should already know what keys are in your schema). This
19456 * function is intended for introspection reasons.
19457 * You should free the return value with g_strfreev() when you are done
19463 * g_file_info_get_content_type:
19464 * @info: a #GFileInfo.
19466 * Gets the file's content type.
19468 * Returns: a string containing the file's content type.
19473 * g_socket_address_enumerator_next_finish:
19474 * @enumerator: a #GSocketAddressEnumerator
19475 * @result: a #GAsyncResult
19476 * @error: a #GError
19478 * Retrieves the result of a completed call to
19479 * g_socket_address_enumerator_next_async(). See
19480 * g_socket_address_enumerator_next() for more information about
19482 * error (in which case *@error will be set) or if there are no
19485 * Returns: (transfer full): a #GSocketAddress (owned by the caller), or %NULL on
19490 * g_unix_socket_address_new_abstract:
19491 * @path: the abstract name
19492 * @path_len: the length of @path, or -1
19494 * Creates a new %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED
19495 * #GUnixSocketAddress for @path.
19497 * Returns: a new #GUnixSocketAddress
19498 * Deprecated: Use g_unix_socket_address_new_with_type().
19503 * g_file_get_child:
19504 * @file: input #GFile.
19505 * @name: string containing the child's basename.
19507 * Gets a child of @file with basename equal to @name.
19508 * Note that the file with that specific name might not exist, but
19509 * you can still have a #GFile that points to it. You can use this
19510 * for instance to create that file.
19511 * This call does no blocking i/o.
19512 * Free the returned object with g_object_unref().
19514 * Returns: (transfer full): a #GFile to a child specified by @name.
19520 * @settings: a #GSettings object
19521 * @key: the name of the key to set
19522 * @format: a #GVariant format string
19523 * @...: arguments as per @format
19524 * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
19526 * Sets @key in @settings to @value.
19527 * A convenience function that combines g_settings_set_value() with
19529 * It is a programmer error to give a @key that isn't contained in the
19530 * schema for @settings or for the #GVariantType of @format to mismatch
19531 * the type given in the schema.
19538 * g_application_set_action_group:
19539 * @application: a #GApplication
19540 * @action_group: a #GActionGroup, or %NULL
19542 * Sets or unsets the group of actions associated with the application.
19543 * These actions are the actions that can be remotely invoked.
19544 * It is an error to call this function after the application has been
19552 * g_volume_mount_finish:
19553 * @volume: a #GVolume
19554 * @result: a #GAsyncResult
19555 * @error: a #GError location to store an error, or %NULL to ignore
19557 * Finishes mounting a volume. If any errors occured during the operation,
19558 * If the mount operation succeeded, g_volume_get_mount() on @volume
19559 * is guaranteed to return the mount right after calling this
19560 * function; there's no need to listen for the 'mount-added' signal on
19563 * Returns: %TRUE, %FALSE if operation failed.
19568 * g_file_find_enclosing_mount:
19569 * @file: input #GFile.
19570 * @cancellable: optional #GCancellable object, %NULL to ignore.
19571 * @error: a #GError.
19573 * Gets a #GMount for the #GFile.
19574 * If the #GFileIface for @file does not have a mount (e.g. possibly a
19575 * remote share), @error will be set to %G_IO_ERROR_NOT_FOUND and %NULL
19576 * will be returned.
19577 * If @cancellable is not %NULL, then the operation can be cancelled by
19578 * triggering the cancellable object from another thread. If the operation
19579 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
19580 * Free the returned object with g_object_unref().
19582 * Returns: (transfer full): a #GMount where the @file is located or %NULL on error.
19587 * g_settings_set_double:
19588 * @settings: a #GSettings object
19589 * @key: the name of the key to set
19590 * @value: the value to set it to
19591 * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
19593 * Sets @key in @settings to @value.
19594 * A convenience variant of g_settings_set() for doubles.
19595 * It is a programmer error to give a @key that isn't specified as
19596 * having a 'double' type in the schema for @settings.
19603 * GThemedIcon:name:
19610 * g_data_output_stream_set_byte_order:
19611 * @stream: a #GDataOutputStream.
19612 * @order: a %GDataStreamByteOrder.
19614 * Sets the byte order of the data output stream to @order.
19619 * g_inet_address_to_string:
19620 * @address: a #GInetAddress
19622 * Converts @address to string form.
19625 * Returns: a representation of @address as a string, which should be
19631 * g_settings_set_strv:
19632 * @settings: a #GSettings object
19633 * @key: the name of the key to set
19634 * @value: (allow-none) (array zero-terminated=1): the value to set it to, or %NULL
19635 * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
19637 * Sets @key in @settings to @value.
19638 * A convenience variant of g_settings_set() for string arrays. If
19639 * It is a programmer error to give a @key that isn't specified as
19640 * having an array of strings type in the schema for @settings.
19647 * g_dbus_method_invocation_return_error_valist:
19648 * @invocation: A #GDBusMethodInvocation.
19649 * @domain: A #GQuark for the #GError error domain.
19650 * @code: The error code.
19651 * @format: printf()-style format.
19652 * @var_args: #va_list of parameters for @format.
19654 * Like g_dbus_method_invocation_return_error() but intended for
19655 * language bindings.
19656 * This method will free @invocation, you cannot use it afterwards.
19663 * g_action_group_action_state_changed:
19664 * @action_group: a #GActionGroup
19665 * @action_name: the name of an action in the group
19666 * @state: the new state of the named action
19668 * Emits the #GActionGroup::action-state-changed signal on @action_group.
19669 * This function should only be called by #GActionGroup implementations.
19676 * SECTION:gfileoutputstrea:
19677 * @short_description: File output streaming operations
19678 * @include: gio/gio.h
19679 * @see_also: #GOutputStream, #GDataOutputStream, #GSeekable
19681 * GFileOutputStream provides output streams that write their
19682 * content to a file.
19683 * GFileOutputStream implements #GSeekable, which allows the output
19684 * stream to jump to arbitrary positions in the file and to truncate
19685 * the file, provided the filesystem of the file supports these
19687 * To find the position of a file output stream, use g_seekable_tell().
19688 * To find out if a file output stream supports seeking, use
19689 * g_seekable_can_seek().To position a file output stream, use
19690 * g_seekable_seek(). To find out if a file output stream supports
19691 * truncating, use g_seekable_can_truncate(). To truncate a file output
19692 * stream, use g_seekable_truncate().
19697 * g_file_output_stream_query_info_finish:
19698 * @stream: a #GFileOutputStream.
19699 * @result: a #GAsyncResult.
19700 * @error: a #GError, %NULL to ignore.
19702 * Finalizes the asynchronous query started
19703 * by g_file_output_stream_query_info_async().
19705 * Returns: (transfer full): A #GFileInfo for the finished query.
19710 * g_simple_action_group_insert:
19711 * @simple: a #GSimpleActionGroup
19712 * @action: a #GAction
19714 * Adds an action to the action group.
19715 * If the action group already contains an action with the same name as
19716 * The action group takes its own reference on @action.
19723 * GUnixOutputStream:fd:
19725 * The file descriptor that the stream writes to.
19732 * GDBusAuthObserverClass:
19733 * @authorize_authenticated_peer: Signal class handler for the #GDBusAuthObserver::authorize-authenticated-peer signal.
19735 * Class structure for #GDBusAuthObserverClass.
19742 * g_application_command_line_printerr:
19743 * @cmdline: a #GApplicationCommandLine
19744 * @format: a printf-style format string
19745 * @...: arguments, as per @format
19747 * Formats a message and prints it using the stderr print handler in the
19748 * invoking process.
19749 * If @cmdline is a local invocation then this is exactly equivalent to
19750 * g_printerr(). If @cmdline is remote then this is equivalent to
19751 * calling g_printerr() in the invoking process.
19758 * g_data_input_stream_read_int32:
19759 * @stream: a given #GDataInputStream.
19760 * @cancellable: optional #GCancellable object, %NULL to ignore.
19761 * @error: #GError for error reporting.
19763 * Reads a signed 32-bit/4-byte value from @stream.
19764 * In order to get the correct byte order for this read operation,
19765 * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
19766 * If @cancellable is not %NULL, then the operation can be cancelled by
19767 * triggering the cancellable object from another thread. If the operation
19768 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
19769 * an error occurred.
19771 * Returns: a signed 32-bit/4-byte value read from the @stream or %0 if
19776 * SECTION:gioschedule:
19777 * @short_description: I/O Scheduler
19778 * @include: gio/gio.h
19780 * Schedules asynchronous I/O operations. #GIOScheduler integrates
19781 * into the main event loop (#GMainLoop) and may use threads if they
19783 * <para id="io-priority"><indexterm><primary>I/O priority</primary></indexterm>
19784 * Each I/O operation has a priority, and the scheduler uses the priorities
19785 * to determine the order in which operations are executed. They are
19786 * <emphasis>not</emphasis> used to determine system-wide I/O scheduling.
19787 * Priorities are integers, with lower numbers indicating higher priority.
19788 * It is recommended to choose priorities between %G_PRIORITY_LOW and
19789 * %G_PRIORITY_HIGH, with %G_PRIORITY_DEFAULT as a default.
19795 * SECTION:gsocketconnectio:
19796 * @short_description: A socket connection
19797 * @include: gio/gio.h
19798 * @see_also: #GIOStream, #GSocketClient, #GSocketListener
19800 * #GSocketConnection is a #GIOStream for a connected socket. They
19801 * can be created either by #GSocketClient when connecting to a host,
19802 * or by #GSocketListener when accepting a new client.
19803 * The type of the #GSocketConnection object returned from these calls
19804 * depends on the type of the underlying socket that is in use. For
19805 * instance, for a TCP/IP connection it will be a #GTcpConnection.
19806 * Chosing what type of object to construct is done with the socket
19807 * connection factory, and it is possible for 3rd parties to register
19808 * custom socket connection types for specific combination of socket
19809 * family/type/protocol using g_socket_connection_factory_register_type().
19816 * g_file_monitor_directory:
19817 * @file: input #GFile.
19818 * @flags: a set of #GFileMonitorFlags.
19819 * @cancellable: optional #GCancellable object, %NULL to ignore.
19820 * @error: a #GError, or %NULL.
19822 * Obtains a directory monitor for the given file.
19823 * This may fail if directory monitoring is not supported.
19824 * If @cancellable is not %NULL, then the operation can be cancelled by
19825 * triggering the cancellable object from another thread. If the operation
19826 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
19827 * Free the returned object with g_object_unref().
19829 * Virtual: monitor_dir
19830 * Returns: (transfer full): a #GFileMonitor for the given @file, or %NULL on error.
19835 * GCharsetConverter:
19837 * Conversions between character sets.
19842 * g_settings_new_with_backend:
19843 * @schema: the name of the schema
19844 * @backend: the #GSettingsBackend to use
19845 * @returns: a new #GSettings object
19847 * Creates a new #GSettings object with a given schema and backend.
19848 * Creating settings objects with an different backend allows accessing settings
19849 * from a database other than the usual one. For example, it may make
19850 * sense to pass a backend corresponding to the "defaults" settings database on
19851 * the system to get a settings object that modifies the system default
19852 * settings instead of the settings for this user.
19860 * @file: input #GFile.
19862 * Duplicates a #GFile handle. This operation does not duplicate
19863 * the actual file or directory represented by the #GFile; see
19864 * g_file_copy() if attempting to copy a file.
19865 * This call does no blocking i/o.
19867 * Returns: (transfer full): a new #GFile that is a duplicate of the given #GFile.
19872 * g_unix_mount_is_readonly:
19873 * @mount_entry: a #GUnixMount.
19875 * Checks if a unix mount is mounted read only.
19877 * Returns: %TRUE if @mount_entry is read only.
19882 * g_dbus_method_invocation_return_error:
19883 * @invocation: A #GDBusMethodInvocation.
19884 * @domain: A #GQuark for the #GError error domain.
19885 * @code: The error code.
19886 * @format: printf()-style format.
19887 * @...: Parameters for @format.
19889 * Finishes handling a D-Bus method call by returning an error.
19890 * See g_dbus_error_encode_gerror() for details about what error name
19891 * will be returned on the wire. In a nutshell, if the given error is
19892 * registered using g_dbus_error_register_error() the name given
19893 * during registration is used. Otherwise, a name of the form
19894 * <literal>org.gtk.GDBus.UnmappedGError.Quark...</literal> is
19895 * used. This provides transparent mapping of #GError between
19896 * applications using GDBus.
19897 * If you are writing an application intended to be portable,
19898 * <emphasis>always</emphasis> register errors with g_dbus_error_register_error()
19899 * or use g_dbus_method_invocation_return_dbus_error().
19900 * This method will free @invocation, you cannot use it afterwards.
19907 * GSimpleAction:state:
19909 * The state of the action, or %NULL if the action is stateless.
19916 * g_mount_eject_with_operation:
19917 * @mount: a #GMount.
19918 * @flags: flags affecting the unmount if required for eject
19919 * @mount_operation: a #GMountOperation or %NULL to avoid user interaction.
19920 * @cancellable: optional #GCancellable object, %NULL to ignore.
19921 * @callback: a #GAsyncReadyCallback, or %NULL.
19922 * @user_data: user data passed to @callback.
19924 * Ejects a mount. This is an asynchronous operation, and is
19925 * finished by calling g_mount_eject_with_operation_finish() with the @mount
19926 * and #GAsyncResult data returned in the @callback.
19933 * g_simple_action_set_enabled:
19934 * @simple: a #GSimpleAction
19935 * @enabled: whether the action is enabled
19937 * Sets the action as enabled or not.
19938 * An action must be enabled in order to be activated or in order to
19939 * have its state changed from outside callers.
19946 * GDBusConnection::closed:
19947 * @connection: The #GDBusConnection emitting the signal.
19948 * @remote_peer_vanished: %TRUE if @connection is closed because the remote peer closed its end of the connection.
19949 * @error: A #GError with more details about the event or %NULL.
19951 * Emitted when the connection is closed.
19952 * The cause of this event can be
19955 * If g_dbus_connection_close() is called. In this case
19956 * </para></listitem>
19958 * If the remote peer closes the connection. In this case
19959 * </para></listitem>
19961 * If the remote peer sends invalid or malformed data. In this
19962 * case @remote_peer_vanished is set to %FALSE and @error
19964 * </para></listitem>
19966 * Upon receiving this signal, you should give up your reference to
19974 * g_inet_socket_address_get_address:
19975 * @address: a #GInetSocketAddress
19977 * Gets @address's #GInetAddress.
19978 * g_object_ref()'d if it will be stored
19980 * Returns: (transfer full): the #GInetAddress for @address, which must be
19986 * SECTION:gcredential:
19987 * @short_description: An object containing credentials
19988 * @include: gio/gio.h
19990 * The #GCredentials type is a reference-counted wrapper for native
19991 * credentials. This information is typically used for identifying,
19992 * authenticating and authorizing other processes.
19993 * Some operating systems supports looking up the credentials of the
19994 * remote peer of a communication endpoint - see e.g.
19995 * g_socket_get_credentials().
19996 * Some operating systems supports securely sending and receiving
19997 * credentials over a Unix Domain Socket, see
19998 * #GUnixCredentialsMessage, g_unix_connection_send_credentials() and
19999 * g_unix_connection_receive_credentials() for details.
20000 * On Linux, the native credential type is a <type>struct ucred</type>
20002 * <citerefentry><refentrytitle>unix</refentrytitle><manvolnum>7</manvolnum></citerefentry>
20003 * man page for details. This corresponds to
20004 * %G_CREDENTIALS_TYPE_LINUX_UCRED.
20005 * On FreeBSD, the native credential type is a <type>struct cmsgcred</type>.
20006 * This corresponds to %G_CREDENTIALS_TYPE_FREEBSD_CMSGCRED.
20011 * GWin32OutputStream:close-handle:
20013 * Whether to close the file handle when the stream is closed.
20020 * g_file_open_readwrite:
20021 * @file: #GFile to open
20022 * @cancellable: a #GCancellable
20023 * @error: a #GError, or %NULL
20025 * Opens an existing file for reading and writing. The result is
20026 * a #GFileIOStream that can be used to read and write the contents of the file.
20027 * If @cancellable is not %NULL, then the operation can be cancelled by
20028 * triggering the cancellable object from another thread. If the operation
20029 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
20030 * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
20031 * If the file is a directory, the G_IO_ERROR_IS_DIRECTORY error will be returned.
20032 * Other errors are possible too, and depend on what kind of filesystem the file is on.
20033 * Note that in many non-local file cases read and write streams are not supported,
20034 * so make sure you really need to do read and write streaming, rather than
20035 * just opening for reading or writing.
20036 * Free the returned object with g_object_unref().
20038 * Returns: (transfer full): #GFileIOStream or %NULL on error.
20044 * GVolumeMonitor::volume-removed:
20045 * @volume_monitor: The volume monitor emitting the signal.
20046 * @volume: a #GVolume that was removed.
20048 * Emitted when a mountable volume is removed from the system.
20053 * g_dbus_error_encode_gerror:
20054 * @error: A #GError.
20056 * Creates a D-Bus error name to use for @error. If @error matches
20057 * a registered error (cf. g_dbus_error_register_error()), the corresponding
20058 * D-Bus error name will be returned.
20059 * Otherwise the a name of the form
20060 * <literal>org.gtk.GDBus.UnmappedGError.Quark._ESCAPED_QUARK_NAME.Code_ERROR_CODE</literal>
20061 * will be used. This allows other GDBus applications to map the error
20062 * on the wire back to a #GError using g_dbus_error_new_for_dbus_error().
20063 * This function is typically only used in object mappings to put a
20064 * #GError on the wire. Regular applications should not use it.
20066 * Returns: A D-Bus error name (never %NULL). Free with g_free().
20072 * g_file_set_attribute_int32:
20073 * @file: input #GFile.
20074 * @attribute: a string containing the attribute's name.
20075 * @value: a #gint32 containing the attribute's new value.
20076 * @flags: a #GFileQueryInfoFlags.
20077 * @cancellable: optional #GCancellable object, %NULL to ignore.
20078 * @error: a #GError, or %NULL
20080 * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_INT32 to @value.
20081 * If @attribute is of a different type, this operation will fail.
20082 * If @cancellable is not %NULL, then the operation can be cancelled by
20083 * triggering the cancellable object from another thread. If the operation
20084 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
20085 * in the @file, %FALSE otherwise.
20087 * Returns: %TRUE if the @attribute was successfully set to @value
20092 * GDBusServer:guid:
20094 * The guid of the server.
20101 * SECTION:gdesktopappinf:
20102 * @short_description: Application information from desktop files
20103 * @include: gio/gdesktopappinfo.h
20105 * #GDesktopAppInfo is an implementation of #GAppInfo based on
20107 * Note that <filename><gio/gdesktopappinfo.h></filename> belongs to
20108 * the UNIX-specific GIO interfaces, thus you have to use the
20109 * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
20114 * g_unix_socket_address_new_with_type:
20116 * @path_len: the length of @path, or -1
20117 * @type: a #GUnixSocketAddressType
20119 * Creates a new #GUnixSocketAddress of type @type with name @path.
20120 * If @type is %G_UNIX_SOCKET_ADDRESS_PATH, this is equivalent to
20121 * calling g_unix_socket_address_new().
20122 * If @path_type is %G_UNIX_SOCKET_ADDRESS_ABSTRACT, then @path_len
20123 * bytes of @path will be copied to the socket's path, and only those
20124 * bytes will be considered part of the name. (If @path_len is -1,
20125 * then @path is assumed to be NUL-terminated.) For example, if @path
20126 * was "test", then calling g_socket_address_get_native_size() on the
20127 * returned socket would return 7 (2 bytes of overhead, 1 byte for the
20128 * abstract-socket indicator byte, and 4 bytes for the name "test").
20129 * If @path_type is %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED, then
20130 * rest of the path will be padded with 0 bytes, and the entire
20131 * zero-padded buffer will be considered the name. (As above, if
20132 * this case, g_socket_address_get_native_size() will always return
20133 * the full size of a <literal>struct sockaddr_un</literal>, although
20134 * g_unix_socket_address_get_path_len() will still return just the
20136 * %G_UNIX_SOCKET_ADDRESS_ABSTRACT is preferred over
20137 * %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED for new programs. Of course,
20138 * when connecting to a server created by another process, you must
20139 * use the appropriate type corresponding to how that process created
20140 * its listening socket.
20142 * Returns: a new #GUnixSocketAddress
20148 * g_application_command_line_get_arguments:
20149 * @cmdline: a #GApplicationCommandLine
20150 * @argc: the length of the arguments array, or %NULL
20152 * Gets the list of arguments that was passed on the command line.
20153 * The strings in the array may contain non-utf8 data.
20154 * The return value is %NULL-terminated and should be freed using
20157 * Returns: the string array containing the arguments (the argv)
20163 * g_io_stream_get_input_stream:
20164 * @stream: a #GIOStream
20166 * Gets the input stream for this object. This is used
20170 * Returns: (transfer none): a #GInputStream, owned by the #GIOStream.
20176 * GDBusServer:address:
20178 * The D-Bus address to listen on.
20185 * g_unix_socket_address_get_path_len:
20186 * @address: a #GInetSocketAddress
20188 * Gets the length of @address's path.
20189 * For details, see g_unix_socket_address_get_path().
20191 * Returns: the length of the path
20197 * SECTION:gfileico:
20198 * @short_description: Icons pointing to an image file
20199 * @include: gio/gio.h
20200 * @see_also: #GIcon, #GLoadableIcon
20202 * #GFileIcon specifies an icon by pointing to an image file
20203 * to be used as icon.
20208 * g_socket_listener_close:
20209 * @listener: a #GSocketListener
20211 * Closes all the sockets in the listener.
20218 * g_data_input_stream_read_line:
20219 * @stream: a given #GDataInputStream.
20220 * @length: a #gsize to get the length of the data read in.
20221 * @cancellable: optional #GCancellable object, %NULL to ignore.
20222 * @error: #GError for error reporting.
20224 * Reads a line from the data input stream.
20225 * If @cancellable is not %NULL, then the operation can be cancelled by
20226 * triggering the cancellable object from another thread. If the operation
20227 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
20228 * Set @length to a #gsize to get the length of the read line.
20229 * On an error, it will return %NULL and @error will be set. If there's no
20230 * content to read, it will still return %NULL, but @error won't be set.
20232 * Returns: a string with the line that was read in (without the newlines).
20237 * SECTION:gvolumemonito:
20238 * @short_description: Volume Monitor
20239 * @include: gio/gio.h
20240 * @see_also: #GFileMonitor
20242 * #GVolumeMonitor is for listing the user interesting devices and volumes
20243 * on the computer. In other words, what a file selector or file manager
20244 * would show in a sidebar.
20245 * #GVolumeMonitor is not <link
20246 * linkend="g-main-context-push-thread-default">thread-default-context
20247 * aware</link>, and so should not be used other than from the main
20248 * thread, with no thread-default-context active.
20253 * g_dbus_connection_is_closed:
20254 * @connection: A #GDBusConnection.
20256 * Gets whether @connection is closed.
20258 * Returns: %TRUE if the connection is closed, %FALSE otherwise.
20264 * GCancellable::cancelled:
20265 * @cancellable: a #GCancellable.
20267 * Emitted when the operation has been cancelled.
20268 * Can be used by implementations of cancellable operations. If the
20269 * operation is cancelled from another thread, the signal will be
20270 * emitted in the thread that cancelled the operation, not the
20271 * thread that is running the operation.
20272 * Note that disconnecting from this signal (or any signal) in a
20273 * multi-threaded program is prone to race conditions. For instance
20274 * it is possible that a signal handler may be invoked even
20275 * <emphasis>after</emphasis> a call to
20276 * g_signal_handler_disconnect() for that handler has already
20278 * There is also a problem when cancellation happen
20279 * right before connecting to the signal. If this happens the
20280 * signal will unexpectedly not be emitted, and checking before
20281 * connecting to the signal leaves a race condition where this is
20283 * In order to make it safe and easy to connect handlers there
20284 * g_cancellable_disconnect() which protect against problems
20286 * An example of how to us this:
20288 * /<!-- -->* Make sure we don't do any unnecessary work if already cancelled *<!-- -->/
20289 * if (g_cancellable_set_error_if_cancelled (cancellable))
20291 * /<!-- -->* Set up all the data needed to be able to
20292 * * handle cancellation of the operation *<!-- -->/
20293 * my_data = my_data_new (...);
20296 * id = g_cancellable_connect (cancellable,
20297 * G_CALLBACK (cancelled_handler)
20299 * /<!-- -->* cancellable operation here... *<!-- -->/
20300 * g_cancellable_disconnect (cancellable, id);
20301 * /<!-- -->* cancelled_handler is never called after this, it
20302 * * is now safe to free the data *<!-- -->/
20303 * my_data_free (my_data);
20305 * Note that the cancelled signal is emitted in the thread that
20306 * the user cancelled from, which may be the main thread. So, the
20307 * cancellable signal should not do something that can block.
20309 * Are two helper functions: g_cancellable_connect() and
20314 * g_file_attribute_info_list_dup:
20315 * @list: a #GFileAttributeInfoList to duplicate.
20317 * Makes a duplicate of a file attribute info list.
20319 * Returns: a copy of the given @list.
20324 * g_app_info_get_commandline:
20325 * @appinfo: a #GAppInfo
20327 * Gets the commandline with which the application will be
20329 * or %NULL if this information is not available
20331 * Returns: a string containing the @appinfo's commandline,
20337 * g_dbus_interface_info_unref:
20338 * @info: A #GDBusInterfaceInfo.
20340 * If @info is statically allocated, does nothing. Otherwise decreases
20341 * the reference count of @info. When its reference count drops to 0,
20342 * the memory used is freed.
20349 * g_charset_converter_get_num_fallbacks:
20350 * @converter: a #GCharsetConverter
20352 * Gets the number of fallbacks that @converter has applied so far.
20354 * Returns: the number of fallbacks that @converter has applied
20360 * g_file_enumerator_is_closed:
20361 * @enumerator: a #GFileEnumerator.
20363 * Checks if the file enumerator has been closed.
20365 * Returns: %TRUE if the @enumerator is closed.
20371 * @icon: a GIcon containing the icon.
20373 * Creates a new emblem for @icon.
20375 * Returns: a new #GEmblem.
20381 * g_file_has_uri_scheme:
20382 * @file: input #GFile.
20383 * @uri_scheme: a string containing a URI scheme.
20385 * Checks to see if a #GFile has a given URI scheme.
20386 * This call does no blocking i/o.
20387 * given URI scheme, %FALSE if URI scheme is %NULL,
20388 * not supported, or #GFile is invalid.
20390 * Returns: %TRUE if #GFile's backend supports the
20395 * g_simple_async_result_new_take_error:
20396 * @source_object: (allow-none): a #GObject, or %NULL
20397 * @callback: a #GAsyncReadyCallback
20398 * @user_data: (allow-none): user data passed to @callback
20399 * @error: a #GError
20401 * Creates a #GSimpleAsyncResult from an error condition, and takes over the
20402 * caller's ownership of @error, so the caller does not need to free it anymore.
20404 * Returns: a #GSimpleAsyncResult
20410 * SECTION:gsimpleactiongrou:
20411 * @title: GSimpleActionGroup
20412 * @short_description: a simple GActionGroup implementation
20414 * #GSimpleActionGroup is a hash table filled with #GAction objects,
20415 * implementing the #GActionGroup interface.
20420 * GPermission:can-release:
20422 * %TRUE if it is generally possible to release the permission by calling
20423 * g_permission_release().
20428 * SECTION:gwin32inputstrea:
20429 * @short_description: Streaming input operations for Windows file handles
20430 * @include: gio/gwin32inputstream.h
20431 * @see_also: #GInputStream
20433 * #GWin32InputStream implements #GInputStream for reading from a
20434 * Windows file handle.
20435 * Note that <filename><gio/gwin32inputstream.h></filename> belongs
20436 * to the Windows-specific GIO interfaces, thus you have to use the
20437 * <filename>gio-windows-2.0.pc</filename> pkg-config file when using it.
20442 * g_bus_watch_name_on_connection_with_closures:
20443 * @connection: A #GDBusConnection.
20444 * @name: The name (well-known or unique) to watch.
20445 * @flags: Flags from the #GBusNameWatcherFlags enumeration.
20446 * @name_appeared_closure: (allow-none): #GClosure to invoke when @name is known to exist or %NULL.
20447 * @name_vanished_closure: (allow-none): #GClosure to invoke when @name is known to not exist or %NULL.
20449 * Version of g_bus_watch_name_on_connection() using closures instead of callbacks for
20450 * easier binding in other languages.
20451 * g_bus_unwatch_name() to stop watching the name.
20453 * Returns: An identifier (never 0) that an be used with
20454 * Rename to: g_bus_watch_name_on_connection
20460 * g_file_mount_enclosing_volume:
20461 * @location: input #GFile.
20462 * @flags: flags affecting the operation
20463 * @mount_operation: a #GMountOperation or %NULL to avoid user interaction.
20464 * @cancellable: optional #GCancellable object, %NULL to ignore.
20465 * @callback: a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
20466 * @user_data: the data to pass to callback function
20468 * Starts a @mount_operation, mounting the volume that contains the file @location.
20469 * When this operation has completed, @callback will be called with
20470 * g_file_mount_enclosing_volume_finish().
20471 * If @cancellable is not %NULL, then the operation can be cancelled by
20472 * triggering the cancellable object from another thread. If the operation
20473 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
20478 * GVolumeMonitor::mount-added:
20479 * @volume_monitor: The volume monitor emitting the signal.
20480 * @mount: a #GMount that was added.
20482 * Emitted when a mount is added.
20487 * g_settings_get_flags:
20488 * @settings: a #GSettings object
20489 * @key: the key to get the value for
20490 * @returns: the flags value
20492 * Gets the value that is stored in @settings for @key and converts it
20493 * to the flags value that it represents.
20494 * In order to use this function the type of the value must be an array
20495 * of strings and it must be marked in the schema file as an flags type.
20496 * It is a programmer error to give a @key that isn't contained in the
20497 * schema for @settings or is not marked as a flags type.
20498 * If the value stored in the configuration database is not a valid
20499 * value for the flags type then this function will return the default
20507 * g_file_info_get_attribute_stringv:
20508 * @info: a #GFileInfo.
20509 * @attribute: a file attribute key.
20511 * Gets the value of a stringv attribute. If the attribute does
20512 * not contain a stringv, %NULL will be returned.
20513 * %NULL otherwise. Do not free.
20515 * Returns: (transfer none): the contents of the @attribute value as a stringv, or
20521 * g_file_attribute_matcher_unref:
20522 * @matcher: a #GFileAttributeMatcher.
20524 * Unreferences @matcher. If the reference count falls below 1,
20525 * the @matcher is automatically freed.
20530 * g_proxy_address_new:
20531 * @inetaddr: The proxy server #GInetAddress.
20532 * @port: The proxy server port.
20533 * @protocol: The proxy protocol to support, in lower case (e.g. socks, http).
20534 * @dest_hostname: The destination hostname the the proxy should tunnel to.
20535 * @dest_port: The destination port to tunnel to.
20536 * @username: The username to authenticate to the proxy server (or %NULL).
20537 * @password: The password to authenticate to the proxy server (or %NULL).
20539 * Creates a new #GProxyAddress for @inetaddr with @protocol that should
20540 * tunnel through @dest_hostname and @dest_port.
20542 * Returns: a new #GProxyAddress
20548 * g_file_monitor_emit_event:
20549 * @monitor: a #GFileMonitor.
20550 * @child: a #GFile.
20551 * @other_file: a #GFile.
20552 * @event_type: a set of #GFileMonitorEvent flags.
20554 * Emits the #GFileMonitor::changed signal if a change
20555 * has taken place. Should be called from file monitor
20556 * implementations only.
20557 * The signal will be emitted from an idle handler (in the <link
20558 * linkend="g-main-context-push-thread-default">thread-default main
20564 * g_charset_converter_set_use_fallback:
20565 * @converter: a #GCharsetConverter
20566 * @use_fallback: %TRUE to use fallbacks
20568 * Sets the #GCharsetConverter:use-fallback property.
20575 * g_socket_receive_with_blocking:
20576 * @socket: a #GSocket
20577 * @buffer: a buffer to read data into (which should be at least @size bytes long).
20578 * @size: the number of bytes you want to read from the socket
20579 * @blocking: whether to do blocking or non-blocking I/O
20580 * @cancellable: a %GCancellable or %NULL
20581 * @error: #GError for error reporting, or %NULL to ignore.
20583 * This behaves exactly the same as g_socket_receive(), except that
20584 * the choice of blocking or non-blocking behavior is determined by
20585 * the @blocking argument rather than by @socket's properties.
20587 * Returns: Number of bytes read, or -1 on error
20593 * g_win32_input_stream_set_close_handle:
20594 * @stream: a #GWin32InputStream
20595 * @close_handle: %TRUE to close the handle when done
20597 * Sets whether the handle of @stream shall be closed
20598 * when the stream is closed.
20605 * g_mount_get_name:
20606 * @mount: a #GMount.
20608 * Gets the name of @mount.
20609 * The returned string should be freed with g_free()
20610 * when no longer needed.
20612 * Returns: the name for the given @mount.
20617 * g_file_info_set_attribute_boolean:
20618 * @info: a #GFileInfo.
20619 * @attribute: a file attribute key.
20620 * @attr_value: a boolean value.
20622 * Sets the @attribute to contain the given @attr_value,
20628 * g_mount_eject_with_operation_finish:
20629 * @mount: a #GMount.
20630 * @result: a #GAsyncResult.
20631 * @error: a #GError location to store the error occuring, or %NULL to ignore.
20633 * Finishes ejecting a mount. If any errors occurred during the operation,
20635 * Returns: %TRUE if the mount was successfully ejected. %FALSE otherwise.
20641 * SECTION:giomodul:
20642 * @short_description: Loadable GIO Modules
20643 * @include: gio/gio.h
20645 * Provides an interface and default functions for loading and unloading
20646 * modules. This is used internally to make GIO extensible, but can also
20647 * be used by others to implement module loading.
20653 * @bus_type: A #GBusType.
20654 * @cancellable: A #GCancellable or %NULL.
20655 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
20656 * @user_data: The data to pass to @callback.
20658 * Asynchronously connects to the message bus specified by @bus_type.
20659 * When the operation is finished, @callback will be invoked. You can
20660 * then call g_bus_get_finish() to get the result of the operation.
20661 * This is a asynchronous failable function. See g_bus_get_sync() for
20662 * the synchronous version.
20669 * GInetAddress:is-mc-site-local:
20671 * Whether this is a site-local multicast address.
20672 * See g_inet_address_get_is_mc_site_local().
20679 * g_dbus_method_invocation_get_sender:
20680 * @invocation: A #GDBusMethodInvocation.
20682 * Gets the bus name that invoked the method.
20684 * Returns: A string. Do not free, it is owned by @invocation.
20690 * g_credentials_is_same_user:
20691 * @credentials: A #GCredentials.
20692 * @other_credentials: A #GCredentials.
20693 * @error: Return location for error or %NULL.
20695 * Checks if @credentials and @other_credentials is the same user.
20696 * This operation can fail if #GCredentials is not supported on the
20698 * user, %FALSE otherwise or if @error is set.
20700 * Returns: %TRUE if @credentials and @other_credentials has the same
20706 * g_data_output_stream_put_uint16:
20707 * @stream: a #GDataOutputStream.
20708 * @data: a #guint16.
20709 * @cancellable: optional #GCancellable object, %NULL to ignore.
20710 * @error: a #GError, %NULL to ignore.
20712 * Puts an unsigned 16-bit integer into the output stream.
20714 * Returns: %TRUE if @data was successfully added to the @stream.
20719 * g_dbus_connection_send_message:
20720 * @connection: A #GDBusConnection.
20721 * @message: A #GDBusMessage
20722 * @flags: Flags affecting how the message is sent.
20723 * @out_serial: Return location for serial number assigned to @message when sending it or %NULL.
20724 * @error: Return location for error or %NULL.
20726 * Asynchronously sends @message to the peer represented by @connection.
20727 * Unless @flags contain the
20728 * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag, the serial number
20729 * will be assigned by @connection and set on @message via
20730 * g_dbus_message_set_serial(). If @out_serial is not %NULL, then the
20731 * serial number used will be written to this location prior to
20732 * submitting the message to the underlying transport.
20733 * If @connection is closed then the operation will fail with
20734 * %G_IO_ERROR_CLOSED. If @message is not well-formed,
20735 * the operation fails with %G_IO_ERROR_INVALID_ARGUMENT.
20736 * See <xref linkend="gdbus-server"/> and <xref
20737 * linkend="gdbus-unix-fd-client"/> for an example of how to use this
20738 * low-level API to send and receive UNIX file descriptors.
20739 * Note that @message must be unlocked, unless @flags contain the
20740 * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag.
20741 * transmission, %FALSE if @error is set.
20743 * Returns: %TRUE if the message was well-formed and queued for
20750 * @icon1: pointer to the first #GIcon.
20751 * @icon2: pointer to the second #GIcon.
20753 * Checks if two icons are equal.
20755 * Returns: %TRUE if @icon1 is equal to @icon2. %FALSE otherwise.
20760 * g_volume_should_automount:
20761 * @volume: a #GVolume
20763 * Returns whether the volume should be automatically mounted.
20765 * Returns: %TRUE if the volume should be automatically mounted.
20771 * @seekable: a #GSeekable.
20773 * Tells the current position within the stream.
20775 * Returns: the offset from the beginning of the buffer.
20780 * SECTION:gsimpleactio:
20781 * @title: GSimpleAction
20782 * @short_description: a simple GSimpleAction
20784 * A #GSimpleAction is the obvious simple implementation of the #GSimpleAction
20785 * interface. This is the easiest way to create an action for purposes of
20786 * adding it to a #GSimpleActionGroup.
20787 * See also #GtkAction.
20792 * g_socket_listener_add_inet_port:
20793 * @listener: a #GSocketListener
20794 * @port: an IP port number (non-zero)
20795 * @source_object: Optional #GObject identifying this source
20796 * @error: #GError for error reporting, or %NULL to ignore.
20798 * Helper function for g_socket_listener_add_address() that
20799 * creates a TCP/IP socket listening on IPv4 and IPv6 (if
20800 * supported) on the specified port on all interfaces.
20801 * to accept to identify this particular source, which is
20802 * useful if you're listening on multiple addresses and do
20803 * different things depending on what address is connected to.
20805 * Returns: %TRUE on success, %FALSE on error.
20811 * g_dbus_connection_call_finish:
20812 * @connection: A #GDBusConnection.
20813 * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_call().
20814 * @error: Return location for error or %NULL.
20816 * Finishes an operation started with g_dbus_connection_call().
20817 * return values. Free with g_variant_unref().
20819 * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
20825 * g_proxy_resolver_lookup_async:
20826 * @resolver: a #GProxyResolver
20827 * @uri: a URI representing the destination to connect to
20828 * @cancellable: a #GCancellable, or %NULL
20829 * @callback: callback to call after resolution completes
20830 * @user_data: data for @callback
20832 * Asynchronous lookup of proxy. See g_proxy_resolver_lookup() for more
20840 * SECTION:gsetting:
20841 * @short_description: a high-level API for application settings
20843 * The #GSettings class provides a convenient API for storing and retrieving
20844 * application settings.
20845 * When creating a GSettings instance, you have to specify a schema
20846 * that describes the keys in your settings and their types and default
20847 * values, as well as some other information.
20848 * Normally, a schema has as fixed path that determines where the settings
20849 * are stored in the conceptual global tree of settings. However, schemas
20850 * can also be 'relocatable', i.e. not equipped with a fixed path. This is
20851 * useful e.g. when the schema describes an 'account', and you want to be
20852 * able to store a arbitrary number of accounts.
20853 * Unlike other configuration systems (like GConf), GSettings does not
20854 * restrict keys to basic types like strings and numbers. GSettings stores
20855 * values as #GVariant, and allows any #GVariantType for keys. Key names
20856 * are restricted to lowercase characters, numbers and '-'. Furthermore,
20857 * the names must begin with a lowercase character, must not end
20858 * with a '-', and must not contain consecutive dashes. Key names can
20859 * be up to 32 characters long.
20860 * Similar to GConf, the default values in GSettings schemas can be
20861 * localized, but the localized values are stored in gettext catalogs
20862 * and looked up with the domain that is specified in the
20863 * <tag class="attribute">gettext-domain</tag> attribute of the
20864 * <tag class="starttag">schemalist</tag> or <tag class="starttag">schema</tag>
20865 * elements and the category that is specified in the l10n attribute of the
20866 * <tag class="starttag">key</tag> element.
20867 * GSettings uses schemas in a compact binary form that is created
20868 * by the <link linkend="glib-compile-schemas">glib-compile-schemas</link>
20869 * utility. The input is a schema description in an XML format that can be
20870 * described by the following DTD:
20871 * |[<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>]|
20872 * At runtime, schemas are identified by their id (as specified
20873 * in the <tag class="attribute">id</tag> attribute of the
20874 * <tag class="starttag">schema</tag> element). The
20875 * convention for schema ids is to use a dotted name, similar in
20876 * style to a DBus bus name, e.g. "org.gnome.font-rendering".
20877 * In addition to #GVariant types, keys can have types that have enumerated
20878 * types. These can be described by a <tag class="starttag">choice</tag>,
20879 * <tag class="starttag">enum</tag> or <tag class="starttag">flags</tag> element, see
20880 * <xref linkend="schema-enumerated"/>. The underlying type of
20881 * such a key is string, but you can use g_settings_get_enum(),
20882 * g_settings_set_enum(), g_settings_get_flags(), g_settings_set_flags()
20883 * access the numeric values corresponding to the string value of enum
20885 * <example id="schema-default-values"><title>Default values</title>
20886 * <programlisting><![CDATA[
20888 * <schema id="org.gtk.test" path="/tests/" gettext-domain="test">
20889 * <key name="greeting" type="s">
20890 * <default l10n="messages">"Hello, earthlings"</default>
20891 * <summary>A greeting</summary>
20893 * Greeting of the invading martians
20896 * <key name="box" type="(ii)">
20897 * <default>(20,30)</default>
20901 * ]]></programlisting></example>
20902 * <example id="schema-enumerated"><title>Ranges, choices and enumerated types</title>
20903 * <programlisting><![CDATA[
20905 * <enum id="myenum">
20906 * <value nick="first" value="1"/>
20907 * <value nick="second" value="2"/>
20909 * <enum id="myflags">
20910 * <value nick="flag1" value="1"/>
20911 * <value nick="flag2" value="2"/>
20912 * <value nick="flag3" value="4"/>
20914 * <schema id="org.gtk.test">
20915 * <key name="key-with-range" type="i">
20916 * <range min="1" max="100"/>
20917 * <default>10</default>
20919 * <key name="key-with-choices" type="s">
20921 * <choice value='Elisabeth'/>
20922 * <choice value='Annabeth'/>
20923 * <choice value='Joe'/>
20926 * <alias value='Anna' target='Annabeth'/>
20927 * <alias value='Beth' target='Elisabeth'/>
20929 * <default>'Joe'</default>
20931 * <key name='enumerated-key' enum='myenum'>
20932 * <default>'first'</default>
20934 * <key name='flags-key' flags='myflags'>
20935 * <default>["flag1",flag2"]</default>
20939 * ]]></programlisting></example>
20941 * <title>Vendor overrides</title>
20943 * Default values are defined in the schemas that get installed by
20944 * an application. Sometimes, it is necessary for a vendor or distributor
20945 * to adjust these defaults. Since patching the XML source for the schema
20946 * is inconvenient and error-prone,
20947 * <link linkend="glib-compile-schemas">glib-compile-schemas</link> reads
20948 * so-called 'vendor override' files. These are keyfiles in the same
20949 * directory as the XML schema sources which can override default values.
20950 * The schema id serves as the group name in the key file, and the values
20951 * are expected in serialized GVariant form, as in the following example:
20952 * <informalexample><programlisting>
20953 * [org.gtk.Example]
20956 * </programlisting></informalexample>
20960 * <title>Binding</title>
20962 * A very convenient feature of GSettings lets you bind #GObject properties
20963 * directly to settings, using g_settings_bind(). Once a GObject property
20964 * has been bound to a setting, changes on either side are automatically
20965 * propagated to the other side. GSettings handles details like
20966 * mapping between GObject and GVariant types, and preventing infinite
20970 * This makes it very easy to hook up a preferences dialog to the
20971 * underlying settings. To make this even more convenient, GSettings
20972 * looks for a boolean property with the name "sensitivity" and
20973 * automatically binds it to the writability of the bound setting.
20974 * If this 'magic' gets in the way, it can be suppressed with the
20975 * #G_SETTINGS_BIND_NO_SENSITIVITY flag.
20982 * g_volume_enumerate_identifiers:
20983 * @volume: a #GVolume
20985 * Gets the kinds of <link linkend="volume-identifier">identifiers</link>
20986 * that @volume has. Use g_volume_get_identifer() to obtain
20987 * the identifiers themselves.
20988 * of strings containing kinds of identifiers. Use g_strfreev() to free.
20990 * Returns: (array zero-terminated=1) (transfer full): a %NULL-terminated array
20995 * g_zlib_decompressor_get_file_info:
20996 * @decompressor: a #GZlibDecompressor
20998 * Retrieves the #GFileInfo constructed from the GZIP header data
20999 * of compressed data processed by @compressor, or %NULL if @decompressor's
21000 * #GZlibDecompressor:format property is not %G_ZLIB_COMPRESSOR_FORMAT_GZIP,
21001 * or the header data was not fully processed yet, or it not present in the
21002 * data stream at all.
21004 * Returns: (transfer none): a #GFileInfo, or %NULL
21010 * SECTION:ginputstrea:
21011 * @short_description: Base class for implementing streaming input
21012 * @include: gio/gio.h
21014 * GInputStream has functions to read from a stream (g_input_stream_read()),
21015 * to close a stream (g_input_stream_close()) and to skip some content
21016 * (g_input_stream_skip()).
21017 * To copy the content of an input stream to an output stream without
21018 * manually handling the reads and writes, use g_output_stream_splice().
21019 * All of these functions have async variants too.
21024 * g_permission_impl_update:
21025 * @permission: a #GPermission instance
21026 * @allowed: the new value for the 'allowed' property
21027 * @can_acquire: the new value for the 'can-acquire' property
21028 * @can_release: the new value for the 'can-release' property
21030 * This function is called by the #GPermission implementation to update
21031 * the properties of the permission. You should never call this
21032 * function except from a #GPermission implementation.
21033 * GObject notify signals are generated, as appropriate.
21040 * g_dbus_method_invocation_return_gerror:
21041 * @invocation: A #GDBusMethodInvocation.
21042 * @error: A #GError.
21044 * Like g_dbus_method_invocation_return_error() but takes a #GError
21045 * instead of the error domain, error code and message.
21046 * This method will free @invocation, you cannot use it afterwards.
21053 * g_settings_list_children:
21054 * @settings: a #GSettings object
21055 * @returns: (transfer full) (element-type utf8): a list of the children on @settings
21057 * Gets the list of children on @settings.
21058 * The list is exactly the list of strings for which it is not an error
21059 * to call g_settings_get_child().
21060 * For GSettings objects that are lists, this value can change at any
21061 * time and you should connect to the "children-changed" signal to watch
21062 * request a child after listing it only for it to have been destroyed
21063 * in the meantime. For this reason, g_settings_get_chuld() may return
21064 * %NULL even for a child that was listed by this function.
21065 * For GSettings objects that are not lists, you should probably not be
21066 * calling this function from "normal" code (since you should already
21067 * know what children are in your schema). This function may still be
21068 * useful there for introspection reasons, however.
21069 * You should free the return value with g_strfreev() when you are done
21072 * For those changes. note that there is a race condition here: you may
21077 * g_app_launch_context_get_startup_notify_id:
21078 * @context: a #GAppLaunchContext
21079 * @info: a #GAppInfo
21080 * @files: (element-type GFile): a #GList of of #GFile objects
21082 * Initiates startup notification for the application and returns the
21083 * <envvar>DESKTOP_STARTUP_ID</envvar> for the launched operation,
21085 * Startup notification IDs are defined in the <ulink
21086 * url="http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt">
21087 * FreeDesktop.Org Startup Notifications standard</ulink>.
21090 * Returns: a startup notification ID for the application, or %NULL if
21095 * g_dbus_address_get_stream_finish:
21096 * @res: A #GAsyncResult obtained from the GAsyncReadyCallback passed to g_dbus_address_get_stream().
21097 * @out_guid: %NULL or return location to store the GUID extracted from @address, if any.
21098 * @error: Return location for error or %NULL.
21100 * Finishes an operation started with g_dbus_address_get_stream().
21102 * Returns: (transfer full): A #GIOStream or %NULL if @error is set.
21108 * g_file_set_attribute_string:
21109 * @file: input #GFile.
21110 * @attribute: a string containing the attribute's name.
21111 * @value: a string containing the attribute's value.
21112 * @flags: #GFileQueryInfoFlags.
21113 * @cancellable: optional #GCancellable object, %NULL to ignore.
21114 * @error: a #GError, or %NULL
21116 * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_STRING to @value.
21117 * If @attribute is of a different type, this operation will fail.
21118 * If @cancellable is not %NULL, then the operation can be cancelled by
21119 * triggering the cancellable object from another thread. If the operation
21120 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21122 * Returns: %TRUE if the @attribute was successfully set, %FALSE otherwise.
21127 * g_file_read_finish:
21128 * @file: input #GFile.
21129 * @res: a #GAsyncResult.
21130 * @error: a #GError, or %NULL
21132 * Finishes an asynchronous file read operation started with
21133 * g_file_read_async().
21134 * Free the returned object with g_object_unref().
21136 * Returns: (transfer full): a #GFileInputStream or %NULL on error.
21141 * g_socket_client_connect_to_uri_finish:
21142 * @client: a #GSocketClient.
21143 * @result: a #GAsyncResult.
21144 * @error: a #GError location to store the error occuring, or %NULL to ignore.
21146 * Finishes an async connect operation. See g_socket_client_connect_to_uri_async()
21148 * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
21154 * g_file_load_contents_async:
21155 * @file: input #GFile.
21156 * @cancellable: optional #GCancellable object, %NULL to ignore.
21157 * @callback: a #GAsyncReadyCallback to call when the request is satisfied
21158 * @user_data: the data to pass to callback function
21160 * Starts an asynchronous load of the @file's contents.
21161 * For more details, see g_file_load_contents() which is
21162 * the synchronous version of this call.
21163 * When the load operation has completed, @callback will be called
21164 * with @user data. To finish the operation, call
21165 * g_file_load_contents_finish() with the #GAsyncResult returned by
21167 * If @cancellable is not %NULL, then the operation can be cancelled by
21168 * triggering the cancellable object from another thread. If the operation
21169 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21174 * g_dbus_connection_call_sync:
21175 * @connection: A #GDBusConnection.
21176 * @bus_name: A unique or well-known bus name.
21177 * @object_path: Path of remote object.
21178 * @interface_name: D-Bus interface to invoke method on.
21179 * @method_name: The name of the method to invoke.
21180 * @parameters: A #GVariant tuple with parameters for the method or %NULL if not passing parameters.
21181 * @reply_type: The expected type of the reply, or %NULL.
21182 * @flags: Flags from the #GDBusCallFlags enumeration.
21183 * @timeout_msec: The timeout in milliseconds, -1 to use the default timeout or %G_MAXINT for no timeout.
21184 * @cancellable: A #GCancellable or %NULL.
21185 * @error: Return location for error or %NULL.
21187 * Synchronously invokes the @method_name method on the
21188 * If @connection is closed then the operation will fail with
21189 * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the
21190 * operation will fail with %G_IO_ERROR_CANCELLED. If @parameters
21191 * contains a value not compatible with the D-Bus protocol, the operation
21192 * fails with %G_IO_ERROR_INVALID_ARGUMENT.
21193 * If @reply_type is non-%NULL then the reply will be checked for having
21194 * this type and an error will be raised if it does not match. Said
21195 * another way, if you give a @reply_type then any non-%NULL return
21196 * value will be of this type.
21197 * If the @parameters #GVariant is floating, it is consumed.
21198 * This allows convenient 'inline' use of g_variant_new(), e.g.:
21200 * g_dbus_connection_call_sync (connection,
21201 * "org.freedesktop.StringThings",
21202 * "/org/freedesktop/StringThings",
21203 * "org.freedesktop.StringThings",
21205 * g_variant_new ("(ss)",
21209 * G_DBUS_CALL_FLAGS_NONE,
21214 * The calling thread is blocked until a reply is received. See
21215 * g_dbus_connection_call() for the asynchronous version of
21217 * return values. Free with g_variant_unref().
21219 * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
21225 * g_output_stream_write_all:
21226 * @stream: a #GOutputStream.
21227 * @buffer: (array length=count) (element-type guint8): the buffer containing the data to write.
21228 * @count: the number of bytes to write
21229 * @bytes_written: location to store the number of bytes that was written to the stream
21230 * @cancellable: optional #GCancellable object, %NULL to ignore.
21231 * @error: location to store the error occuring, or %NULL to ignore
21233 * Tries to write @count bytes from @buffer into the stream. Will block
21234 * during the operation.
21235 * This function is similar to g_output_stream_write(), except it tries to
21236 * write as many bytes as requested, only stopping on an error.
21237 * On a successful write of @count bytes, %TRUE is returned, and @bytes_written
21238 * is set to @count.
21239 * If there is an error during the operation FALSE is returned and @error
21240 * is set to indicate the error status, @bytes_written is updated to contain
21241 * the number of bytes written into the stream before the error occurred.
21243 * Returns: %TRUE on success, %FALSE if there was an error
21248 * g_file_monitor_file:
21249 * @file: input #GFile.
21250 * @flags: a set of #GFileMonitorFlags.
21251 * @cancellable: optional #GCancellable object, %NULL to ignore.
21252 * @error: a #GError, or %NULL.
21254 * Obtains a file monitor for the given file. If no file notification
21255 * mechanism exists, then regular polling of the file is used.
21256 * If @cancellable is not %NULL, then the operation can be cancelled by
21257 * triggering the cancellable object from another thread. If the operation
21258 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21259 * Free the returned object with g_object_unref().
21261 * Returns: (transfer full): a #GFileMonitor for the given @file, or %NULL on error.
21266 * SECTION:gapplicationcommandlin:
21267 * @title: GApplicationCommandLine
21268 * @short_description: A class representing a command-line invocation of an application
21269 * @see_also: #GApplication
21271 * #GApplicationCommandLine represents a command-line invocation of
21272 * an application. It is created by #GApplication and emitted
21273 * in the #GApplication::command-line signal and virtual function.
21274 * The class contains the list of arguments that the program was invoked
21275 * with. It is also possible to query if the commandline invocation was
21276 * commandline to this process).
21277 * The exit status of the originally-invoked process may be set and
21278 * messages can be printed to stdout or stderr of that process. The
21279 * lifecycle of the originally-invoked process is tied to the lifecycle
21281 * <example id="gapplication-example-cmdline"><title>Handling commandline arguments with GApplication</title>
21283 * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gapplication-example-cmdline.c">
21284 * <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
21286 * </programlisting>
21288 * <example id="gapplication-example-cmdline2"><title>Complicated commandline handling</title>
21290 * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gapplication-example-cmdline2.c">
21291 * <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
21293 * </programlisting>
21296 * Local (ie: the current process is running in direct response to the
21297 * Invocation) or remote (ie: some other process forwarded the
21298 * Of this object (ie: the process exits when the last reference is
21303 * g_async_initable_new_finish:
21304 * @initable: the #GAsyncInitable from the callback
21305 * @res: the #GAsyncResult.from the callback
21306 * @error: a #GError location to store the error occuring, or %NULL to ignore.
21308 * Finishes the async construction for the various g_async_initable_new calls,
21309 * returning the created object or %NULL on error.
21310 * g_object_unref().
21312 * Returns: (transfer full): a newly created #GObject, or %NULL on error. Free with
21318 * g_file_output_stream_get_etag:
21319 * @stream: a #GFileOutputStream.
21321 * Gets the entity tag for the file when it has been written.
21322 * This must be called after the stream has been written
21323 * and closed, as the etag can change while writing.
21325 * Returns: the entity tag for the stream.
21330 * g_file_supports_thread_contexts:
21333 * Checks if @file supports <link
21334 * linkend="g-main-context-push-thread-default-context">thread-default
21335 * contexts</link>. If this returns %FALSE, you cannot perform
21336 * asynchronous operations on @file in a thread that has a
21337 * thread-default context.
21339 * Returns: Whether or not @file supports thread-default contexts.
21346 * @source: #GFile pointing to the source location.
21347 * @destination: #GFile pointing to the destination location.
21348 * @flags: set of #GFileCopyFlags.
21349 * @cancellable: optional #GCancellable object, %NULL to ignore.
21350 * @progress_callback: (scope call): #GFileProgressCallback function for updates.
21351 * @progress_callback_data: (closure): gpointer to user data for the callback function.
21352 * @error: #GError for returning error conditions, or %NULL
21354 * Tries to move the file or directory @source to the location specified by @destination.
21355 * If native move operations are supported then this is used, otherwise a copy + delete
21356 * fallback is used. The native implementation may support moving directories (for instance
21357 * on moves inside the same filesystem), but the fallback code does not.
21358 * If the flag #G_FILE_COPY_OVERWRITE is specified an already
21359 * existing @destination file is overwritten.
21360 * If the flag #G_FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks
21361 * will be copied as symlinks, otherwise the target of the
21362 * If @cancellable is not %NULL, then the operation can be cancelled by
21363 * triggering the cancellable object from another thread. If the operation
21364 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21365 * If @progress_callback is not %NULL, then the operation can be monitored by
21366 * setting this to a #GFileProgressCallback function. @progress_callback_data
21367 * will be passed to this function. It is guaranteed that this callback will
21368 * be called after all data has been transferred with the total number of bytes
21369 * copied during the operation.
21370 * If the @source file does not exist then the G_IO_ERROR_NOT_FOUND
21371 * error is returned, independent on the status of the @destination.
21372 * If #G_FILE_COPY_OVERWRITE is not specified and the target exists, then the
21373 * error G_IO_ERROR_EXISTS is returned.
21374 * If trying to overwrite a file over a directory the G_IO_ERROR_IS_DIRECTORY
21375 * error is returned. If trying to overwrite a directory with a directory the
21376 * G_IO_ERROR_WOULD_MERGE error is returned.
21377 * If the source is a directory and the target does not exist, or #G_FILE_COPY_OVERWRITE is
21378 * specified and the target is a file, then the G_IO_ERROR_WOULD_RECURSE error
21379 * may be returned (if the native move operation isn't available).
21381 * Returns: %TRUE on successful move, %FALSE otherwise.
21386 * g_socket_connection_get_local_address:
21387 * @connection: a #GSocketConnection
21388 * @error: #GError for error reporting, or %NULL to ignore.
21390 * Try to get the local address of a socket connection.
21391 * Free the returned object with g_object_unref().
21393 * Returns: (transfer full): a #GSocketAddress or %NULL on error.
21399 * g_buffered_output_stream_new:
21400 * @base_stream: a #GOutputStream.
21402 * Creates a new buffered output stream for a base stream.
21404 * Returns: a #GOutputStream for the given @base_stream.
21409 * g_dbus_proxy_get_object_path:
21410 * @proxy: A #GDBusProxy.
21412 * Gets the object path @proxy is for.
21414 * Returns: A string owned by @proxy. Do not free.
21420 * g_unix_mount_point_is_readonly:
21421 * @mount_point: a #GUnixMountPoint.
21423 * Checks if a unix mount point is read only.
21425 * Returns: %TRUE if a mount point is read only.
21432 * The timeout in seconds on socket I/O
21439 * g_dbus_message_get_header:
21440 * @message: A #GDBusMessage.
21441 * @header_field: A 8-bit unsigned integer (typically a value from the #GDBusMessageHeaderField enumeration)
21443 * Gets a header field on @message.
21444 * otherwise. Do not free, it is owned by @message.
21446 * Returns: A #GVariant with the value if the header was found, %NULL
21452 * g_socket_receive_message:
21453 * @socket: a #GSocket
21454 * @address: a pointer to a #GSocketAddress pointer, or %NULL
21455 * @vectors: an array of #GInputVector structs
21456 * @num_vectors: the number of elements in @vectors, or -1
21457 * @messages: a pointer which may be filled with an array of #GSocketControlMessages, or %NULL
21458 * @num_messages: a pointer which will be filled with the number of elements in @messages, or %NULL
21459 * @flags: a pointer to an int containing #GSocketMsgFlags flags
21460 * @cancellable: a %GCancellable or %NULL
21461 * @error: a #GError pointer, or %NULL
21463 * Receive data from a socket. This is the most complicated and
21464 * fully-featured version of this call. For easier use, see
21465 * g_socket_receive() and g_socket_receive_from().
21466 * If @address is non-%NULL then @address will be set equal to the
21467 * source address of the received packet.
21468 * describe the buffers that received data will be scattered into.
21469 * If @num_vectors is -1, then @vectors is assumed to be terminated
21470 * by a #GInputVector with a %NULL buffer pointer.
21471 * As a special case, if @num_vectors is 0 (in which case, @vectors
21472 * may of course be %NULL), then a single byte is received and
21473 * discarded. This is to facilitate the common practice of sending a
21474 * single '\0' byte for the purposes of transferring ancillary data.
21475 * array of #GSocketControlMessage instances or %NULL if no such
21476 * messages was received. These correspond to the control messages
21477 * received from the kernel, one #GSocketControlMessage per message
21478 * from the kernel. This array is %NULL-terminated and must be freed
21479 * by the caller using g_free() after calling g_object_unref() on each
21480 * element. If @messages is %NULL, any control messages received will
21482 * messages received.
21483 * If both @messages and @num_messages are non-%NULL, then
21484 * for this are available in the #GSocketMsgFlags enum, but the
21485 * values there are the same as the system values, and the flags
21486 * are passed in as-is, so you can pass in system-specific flags too
21487 * (and g_socket_receive_message() may pass system-specific flags out).
21488 * As with g_socket_receive(), data may be discarded if @socket is
21489 * %G_SOCKET_TYPE_DATAGRAM or %G_SOCKET_TYPE_SEQPACKET and you do not
21490 * provide enough buffer space to read a complete message. You can pass
21491 * %G_SOCKET_MSG_PEEK in @flags to peek at the current message without
21492 * removing it from the receive queue, but there is no portable way to find
21493 * out the length of the message other than by reading it into a
21494 * sufficiently-large buffer.
21495 * If the socket is in blocking mode the call will block until there
21496 * is some data to receive or there is an error. If there is no data
21497 * available and the socket is in non-blocking mode, a
21498 * %G_IO_ERROR_WOULD_BLOCK error will be returned. To be notified when
21499 * data is available, wait for the %G_IO_IN condition.
21500 * On error -1 is returned and @error is set accordingly.
21502 * In @messages (ie: not including the %NULL terminator).
21503 * Returns: Number of bytes read, or -1 on error
21509 * g_inet_address_get_is_mc_site_local:
21510 * @address: a #GInetAddress
21512 * Tests whether @address is a site-local multicast address.
21514 * Returns: %TRUE if @address is a site-local multicast address.
21520 * g_io_modules_scan_all_in_directory:
21521 * @dirname: pathname for a directory containing modules to scan.
21523 * Scans all the modules in the specified directory, ensuring that
21524 * any extension point implemented by a module is registered.
21525 * This may not actually load and initialize all the types in each
21526 * module, some modules may be lazily loaded and initialized when
21527 * an extension point it implementes is used with e.g.
21528 * g_io_extension_point_get_extensions() or
21529 * g_io_extension_point_get_extension_by_name().
21530 * If you need to guarantee that all types are loaded in all the modules,
21531 * use g_io_modules_scan_all_in_directory().
21538 * g_socket_service_stop:
21539 * @service: a #GSocketService
21541 * Stops the service, i.e. stops accepting connections
21542 * from the added sockets when the mainloop runs.
21543 * This call is threadsafe, so it may be called from a thread
21544 * handling an incomming client request.
21551 * g_settings_new_with_backend_and_path:
21552 * @schema: the name of the schema
21553 * @backend: the #GSettingsBackend to use
21554 * @path: the path to use
21555 * @returns: a new #GSettings object
21557 * Creates a new #GSettings object with a given schema, backend and
21559 * This is a mix of g_settings_new_with_backend() and
21560 * g_settings_new_with_path().
21567 * g_bus_own_name_with_closures:
21568 * @bus_type: The type of bus to own a name on.
21569 * @name: The well-known name to own.
21570 * @flags: A set of flags from the #GBusNameOwnerFlags enumeration.
21571 * @bus_acquired_closure: (allow-none): #GClosure to invoke when connected to the bus of type @bus_type or %NULL.
21572 * @name_acquired_closure: (allow-none): #GClosure to invoke when @name is acquired or %NULL.
21573 * @name_lost_closure: (allow-none): #GClosure to invoke when @name is lost or %NULL.
21575 * Version of g_bus_own_name() using closures instead of callbacks for
21576 * easier binding in other languages.
21577 * g_bus_unown_name() to stop owning the name.
21579 * Returns: An identifier (never 0) that an be used with
21580 * Rename to: g_bus_own_name
21589 * Checks if the VFS is active.
21591 * Returns: %TRUE if construction of the @vfs was successful and it is now active.
21596 * g_settings_set_int:
21597 * @settings: a #GSettings object
21598 * @key: the name of the key to set
21599 * @value: the value to set it to
21600 * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
21602 * Sets @key in @settings to @value.
21603 * A convenience variant of g_settings_set() for 32-bit integers.
21604 * It is a programmer error to give a @key that isn't specified as
21605 * having a int32 type in the schema for @settings.
21612 * g_file_replace_contents_finish:
21613 * @file: input #GFile.
21614 * @res: a #GAsyncResult.
21615 * @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
21616 * @error: a #GError, or %NULL
21618 * Finishes an asynchronous replace of the given @file. See
21619 * g_file_replace_contents_async(). Sets @new_etag to the new entity
21620 * tag for the document, if present.
21622 * Returns: %TRUE on success, %FALSE on failure.
21627 * GDBusConnectionClass:
21628 * @closed: Signal class handler for the #GDBusConnection::closed signal.
21630 * Class structure for #GDBusConnection.
21637 * g_network_address_parse_uri:
21638 * @uri: the hostname and optionally a port
21639 * @default_port: The default port if none is found in the URI
21640 * @error: a pointer to a #GError, or %NULL
21642 * Creates a new #GSocketConnectable for connecting to the given
21643 * Using this rather than g_network_address_new() or
21644 * g_network_address_parse_host() allows #GSocketClient to determine
21645 * when to use application-specific proxy protocols.
21647 * Returns: (transfer full): the new #GNetworkAddress, or %NULL on error
21653 * g_inet_address_get_is_mc_org_local:
21654 * @address: a #GInetAddress
21656 * Tests whether @address is an organization-local multicast address.
21658 * Returns: %TRUE if @address is an organization-local multicast address.
21664 * g_keyfile_settings_backend_new:
21665 * @filename: the filename of the keyfile
21666 * @root_path: the path under which all settings keys appear
21667 * @root_group: (allow-none): the group name corresponding to
21668 * @returns: (transfer full): a keyfile-backed #GSettingsBackend
21670 * Creates a keyfile-backed #GSettingsBackend.
21671 * The filename of the keyfile to use is given by @filename.
21672 * All settings read to or written from the backend must fall under the
21673 * path given in @root_path (which must start and end with a slash and
21674 * not contain two consecutive slashes). @root_path may be "/".
21675 * If @root_group is non-%NULL then it specifies the name of the keyfile
21676 * group used for keys that are written directly below @root_path. For
21677 * example, if @root_path is "/apps/example/" and @root_group is
21678 * "toplevel", then settings the key "/apps/example/enabled" to a value
21679 * of %TRUE will cause the following to appear in the keyfile:
21684 * If @root_group is %NULL then it is not permitted to store keys
21685 * directly below the @root_path.
21686 * the name of the subpath (with the final slash stripped) is used as
21687 * the name of the keyfile group. To continue the example, if
21688 * "/apps/example/profiles/default/font-size" were set to
21689 * 12 then the following would appear in the keyfile:
21691 * [profiles/default]
21694 * The backend will refuse writes (and return writability as being
21695 * %FALSE) for keys outside of @root_path and, in the event that
21696 * Writes will also be refused if the backend detects that it has the
21698 * There is no checking done for your key namespace clashing with the
21699 * syntax of the key file format. For example, if you have '[' or ']'
21700 * characters in your path names or '=' in your key names you may be in
21703 * For keys not stored directly below @root_path (ie: in a sub-path),
21704 * Inability to rewrite the keyfile (ie: the containing directory is not
21709 * g_socket_client_add_application_proxy:
21710 * @client: a #GSocketClient
21711 * @protocol: The proxy protocol
21713 * Enable proxy protocols to be handled by the application. When the
21714 * indicated proxy protocol is returned by the #GProxyResolver,
21715 * #GSocketClient will consider this protocol as supported but will
21716 * not try find a #GProxy instance to handle handshaking. The
21717 * application must check for this case by calling
21718 * g_socket_connection_get_remote_address() on the returned
21719 * #GSocketConnection, and seeing if it's a #GProxyAddress of the
21720 * appropriate type, to determine whether or not it needs to handle
21721 * the proxy handshaking itself.
21722 * This should be used for proxy protocols that are dialects of
21723 * another protocol such as HTTP proxy. It also allows cohabitation of
21724 * proxy protocols that are reused between protocols. A good example
21725 * is HTTP. It can be used to proxy HTTP, FTP and Gopher and can also
21726 * be use as generic socket proxy through the HTTP CONNECT method.
21732 * @drive: a #GDrive.
21733 * @flags: flags affecting the unmount if required for stopping.
21734 * @mount_operation: a #GMountOperation or %NULL to avoid user interaction.
21735 * @cancellable: optional #GCancellable object, %NULL to ignore.
21736 * @callback: a #GAsyncReadyCallback, or %NULL.
21737 * @user_data: user data to pass to @callback
21739 * Asynchronously stops a drive.
21740 * When the operation is finished, @callback will be called.
21741 * You can then call g_drive_stop_finish() to obtain the
21742 * result of the operation.
21749 * g_memory_output_stream_get_data_size:
21750 * @ostream: a #GMemoryOutputStream
21752 * Returns the number of bytes from the start up
21753 * to including the last byte written in the stream
21754 * that has not been truncated away.
21756 * Returns: the number of bytes written to the stream
21762 * g_file_info_get_is_symlink:
21763 * @info: a #GFileInfo.
21765 * Checks if a file is a symlink.
21767 * Returns: %TRUE if the given @info is a symlink.
21772 * g_dbus_message_set_path:
21773 * @message: A #GDBusMessage.
21774 * @value: The value to set.
21776 * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_PATH header field.
21783 * g_io_stream_set_pending:
21784 * @stream: a #GIOStream
21785 * @error: a #GError location to store the error occuring, or %NULL to ignore
21787 * Sets @stream to have actions pending. If the pending flag is
21788 * already set or @stream is closed, it will return %FALSE and set
21790 * Returns: %TRUE if pending was previously unset and is now set.
21796 * g_socket_service_start:
21797 * @service: a #GSocketService
21799 * Starts the service, i.e. start accepting connections
21800 * from the added sockets when the mainloop runs.
21801 * This call is threadsafe, so it may be called from a thread
21802 * handling an incomming client request.
21809 * g_socket_client_get_enable_proxy:
21810 * @client: a #GSocketClient.
21812 * Gets the proxy enable state; see g_socket_client_set_enable_proxy()
21814 * Returns: whether proxying is enabled
21820 * g_io_stream_close:
21821 * @stream: a #GIOStream
21822 * @cancellable: optional #GCancellable object, %NULL to ignore
21823 * @error: location to store the error occuring, or %NULL to ignore
21825 * Closes the stream, releasing resources related to it. This will also
21826 * closes the individual input and output streams, if they are not already
21828 * Once the stream is closed, all other operations will return
21829 * %G_IO_ERROR_CLOSED. Closing a stream multiple times will not
21831 * Closing a stream will automatically flush any outstanding buffers
21833 * Streams will be automatically closed when the last reference
21834 * is dropped, but you might want to call this function to make sure
21835 * resources are released as early as possible.
21836 * Some streams might keep the backing store of the stream (e.g. a file
21837 * descriptor) open after the stream is closed. See the documentation for
21838 * the individual stream for details.
21839 * On failure the first error that happened will be reported, but the
21840 * close operation will finish as much as possible. A stream that failed
21841 * to close will still return %G_IO_ERROR_CLOSED for all operations.
21842 * Still, it is important to check and report the error to the user,
21843 * otherwise there might be a loss of data as all data might not be written.
21844 * If @cancellable is not NULL, then the operation can be cancelled by
21845 * triggering the cancellable object from another thread. If the operation
21846 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21847 * Cancelling a close will still leave the stream closed, but some streams
21848 * can use a faster close that doesn't block to e.g. check errors.
21849 * The default implementation of this method just calls close on the
21850 * individual input/output streams.
21852 * Returns: %TRUE on success, %FALSE on failure
21858 * g_tcp_connection_set_graceful_disconnect:
21859 * @connection: a #GTcpConnection
21860 * @graceful_disconnect: Whether to do graceful disconnects or not
21862 * This enabled graceful disconnects on close. A graceful disconnect
21863 * means that we signal the recieving end that the connection is terminated
21864 * and wait for it to close the connection before closing the connection.
21865 * A graceful disconnect means that we can be sure that we successfully sent
21866 * all the outstanding data to the other end, or get an error reported.
21867 * However, it also means we have to wait for all the data to reach the
21868 * other side and for it to acknowledge this by closing the socket, which may
21869 * take a while. For this reason it is disabled by default.
21876 * g_data_output_stream_put_string:
21877 * @stream: a #GDataOutputStream.
21879 * @cancellable: optional #GCancellable object, %NULL to ignore.
21880 * @error: a #GError, %NULL to ignore.
21882 * Puts a string into the output stream.
21884 * Returns: %TRUE if @string was successfully added to the @stream.
21890 * @short_description: Error helper functions
21891 * @include: gio/gio.h
21893 * Contains helper functions for reporting errors to the user.
21898 * g_unix_credentials_message_is_supported:
21900 * Checks if passing a #GCredential on a #GSocket is supported on this platform.
21902 * Returns: %TRUE if supported, %FALSE otherwise
21908 * g_content_type_is_a:
21909 * @type: a content type string
21910 * @supertype: a content type string
21912 * Determines if @type is a subset of @supertype.
21913 * %FALSE otherwise.
21915 * Returns: %TRUE if @type is a kind of @supertype,
21920 /************************************************************/
21921 /* THIS FILE IS GENERATED DO NOT EDIT */
21922 /************************************************************/