The value returned by handlers of the signals generated by
the gdbus-codegen
tool to indicate that a method call has not been
handled by an implementation. It is equal to %FALSE, but using
this macro is sometimes more readable.
In code that needs to be backwards-compatible with older GLib, use %FALSE instead.
Extension point for debug control functionality. See [Extending GIO][extending-gio].
Extension point for default handler to URI association. See [Extending GIO][extending-gio].
The string used to obtain a Unix device path with g_drive_get_identifier().
A key in the "access" namespace for checking deletion privileges.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
This attribute will be %TRUE if the user is able to delete the file.
A key in the "access" namespace for getting execution privileges.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
This attribute will be %TRUE if the user is able to execute the file.
A key in the "access" namespace for getting read privileges.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
This attribute will be %TRUE if the user is able to read the file.
A key in the "access" namespace for checking renaming privileges.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
This attribute will be %TRUE if the user is able to rename the file.
A key in the "access" namespace for checking trashing privileges.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
This attribute will be %TRUE if the user is able to move the file to the trash.
A key in the "access" namespace for getting write privileges.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
This attribute will be %TRUE if the user is able to write to the file.
A key in the "dos" namespace for checking if the file's archive flag is set.
This attribute is %TRUE if the archive flag is set.
This attribute is only available for DOS file systems.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
A key in the "dos" namespace for checking if the file is a NTFS mount point (a volume mount or a junction point).
This attribute is %TRUE if file is a reparse point of type IO_REPARSE_TAG_MOUNT_POINT.
This attribute is only available for DOS file systems.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
A key in the "dos" namespace for checking if the file's backup flag is set.
This attribute is %TRUE if the backup flag is set.
This attribute is only available for DOS file systems.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
A key in the "dos" namespace for getting the file NTFS reparse tag.
This value is 0 for files that are not reparse points.
See the Reparse Tags page for possible reparse tag values.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
A key in the "etag" namespace for getting the value of the file's entity tag.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
A key in the "filesystem" namespace for getting the number of bytes of free space left on the file system.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
A key in the "filesystem" namespace for checking if the file system is read only.
Is set to %TRUE if the file system is read only.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
A key in the "filesystem" namespace for checking if the file system is remote.
Is set to %TRUE if the file system is remote.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
A key in the "filesystem" namespace for getting the total size (in bytes) of the file system, used in g_file_query_filesystem_info().
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
A key in the "filesystem" namespace for getting the file system's type.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
A key in the "filesystem" namespace for getting the number of bytes used by data on the file system.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
A key in the "filesystem" namespace for hinting a file manager application whether it should preview (e.g. thumbnail) files on the file system.
The value for this key contain a #GFilesystemPreviewType.
A key in the "gvfs" namespace that gets the name of the current GVFS backend in use.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
A key in the "id" namespace for getting a file identifier.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
An example use would be during listing files, to avoid recursive directory scanning.
A key in the "id" namespace for getting the file system identifier.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
An example use would be during drag and drop to see if the source and target are on the same filesystem (default to move) or not (default to copy).
A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be ejected.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is mountable.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be polled.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be started.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be started degraded.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be stopped.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is unmountable.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
A key in the "mountable" namespace for getting the HAL UDI for the mountable file.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is automatically polled for media.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
A key in the "mountable" namespace for getting the #GDriveStartStopType.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
A key in the "mountable" namespace for getting the unix device.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
A key in the "mountable" namespace for getting the unix device file.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
A key in the "owner" namespace for getting the file owner's group.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
A key in the "owner" namespace for getting the user name of the file's owner.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
A key in the "owner" namespace for getting the real name of the user that owns the file.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
A key in the "preview" namespace for getting a #GIcon that can be used to get preview of the file.
For example, it may be a low resolution thumbnail without metadata.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT.
The value for this key should contain a #GIcon.
A key in the "recent" namespace for getting time, when the metadata for the
file in recent:///
was last changed.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_INT64.
A key in the "selinux" namespace for getting the file's SELinux context.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
Note that this attribute is only available if GLib has been built with SELinux support.
A key in the "standard" namespace for getting the amount of disk space that is consumed by the file (in bytes).
This will generally be larger than the file size (due to block size overhead) but can occasionally be smaller (for example, for sparse files).
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
A key in the "standard" namespace for getting the content type of the file.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
The value for this key should contain a valid content type.
A key in the "standard" namespace for getting the copy name of the file.
The copy name is an optional version of the name. If available it's always in UTF8, and corresponds directly to the original filename (only transcoded to UTF8). This is useful if you want to copy the file to another filesystem that might have a different encoding. If the filename is not a valid string in the encoding selected for the filesystem it is in then the copy name will not be set.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
A key in the "standard" namespace for getting the description of the file.
The description is a utf8 string that describes the file, generally containing the filename, but can also contain further information. Example descriptions could be "filename (on hostname)" for a remote file or "filename (in trash)" for a file in the trash. This is useful for instance as the window title when displaying a directory or for a bookmarks menu.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
A key in the "standard" namespace for getting the display name of the file.
A display name is guaranteed to be in UTF-8 and can thus be displayed in the UI. It is guaranteed to be set on every file.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
A key in the "standard" namespace for edit name of the file.
An edit name is similar to the display name, but it is meant to be used when you want to rename the file in the UI. The display name might contain information you don't want in the new filename (such as "(invalid unicode)" if the filename was in an invalid encoding).
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
A key in the "standard" namespace for getting the fast content type.
The fast content type isn't as reliable as the regular one, as it only uses the filename to guess it, but it is faster to calculate than the regular content type.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
A key in the "standard" namespace for getting the icon for the file.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT.
The value for this key should contain a #GIcon.
A key in the "standard" namespace for checking if a file is a backup file.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
A key in the "standard" namespace for checking if a file is hidden.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
A key in the "standard" namespace for checking if the file is a symlink. Typically the actual type is something else, if we followed the symlink to get the type.
On Windows NTFS mountpoints are considered to be symlinks as well.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
A key in the "standard" namespace for checking if a file is virtual.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
A key in the "standard" namespace for checking if a file is volatile. This is meant for opaque, non-POSIX-like backends to indicate that the URI is not persistent. Applications should look at %G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET for the persistent URI.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
A key in the "standard" namespace for getting the name of the file.
The name is the on-disk filename which may not be in any known encoding, and can thus not be generally displayed as is. It is guaranteed to be set on every file.
Use %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME if you need to display the name in a user interface.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
A key in the "standard" namespace for getting the file's size (in bytes).
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
A key in the "standard" namespace for setting the sort order of a file.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_INT32.
An example use would be in file managers, which would use this key to set the order files are displayed. Files with smaller sort order should be sorted first, and files without sort order as if sort order was zero.
A key in the "standard" namespace for getting the symbolic icon for the file.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT.
The value for this key should contain a #GIcon.
A key in the "standard" namespace for getting the symlink target, if the file is a symlink.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
A key in the "standard" namespace for getting the target URI for the file, in the case of %G_FILE_TYPE_SHORTCUT or %G_FILE_TYPE_MOUNTABLE files.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
A key in the "standard" namespace for storing file types.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
The value for this key should contain a #GFileType.
A key in the "thumbnail" namespace for checking if thumbnailing failed.
This attribute is %TRUE if thumbnailing failed.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
A key in the "thumbnail" namespace for checking whether the thumbnail is outdated.
This attribute is %TRUE if the thumbnail is up-to-date with the file it represents, and %FALSE if the file has been modified since the thumbnail was generated.
If %G_FILE_ATTRIBUTE_THUMBNAILING_FAILED is %TRUE and this attribute is %FALSE, it indicates that thumbnailing may be attempted again and may succeed.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
A key in the "thumbnail" namespace for getting the path to the thumbnail image.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
A key in the "time" namespace for getting the time the file was last accessed.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64, and contains the time since the file was last accessed, in seconds since the UNIX epoch.
A key in the "time" namespace for getting the microseconds of the time the file was last accessed.
This should be used in conjunction with %G_FILE_ATTRIBUTE_TIME_ACCESS.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
A key in the "time" namespace for getting the time the file was last changed.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64, and contains the time since the file was last changed, in seconds since the UNIX epoch.
This corresponds to the traditional UNIX ctime.
A key in the "time" namespace for getting the microseconds of the time the file was last changed.
This should be used in conjunction with %G_FILE_ATTRIBUTE_TIME_CHANGED.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
A key in the "time" namespace for getting the time the file was created.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64, and contains the time since the file was created, in seconds since the UNIX epoch.
This may correspond to Linux stx_btime
, FreeBSD st_birthtim
, NetBSD
st_birthtime
or NTFS ctime
.
A key in the "time" namespace for getting the microseconds of the time the file was created.
This should be used in conjunction with %G_FILE_ATTRIBUTE_TIME_CREATED.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
A key in the "time" namespace for getting the time the file was last modified.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64, and contains the time since the file was modified, in seconds since the UNIX epoch.
A key in the "time" namespace for getting the microseconds of the time the file was last modified.
This should be used in conjunction with %G_FILE_ATTRIBUTE_TIME_MODIFIED.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
A key in the "trash" namespace for getting the deletion date and time
of a file inside the trash:///
folder.
The format of the returned string is YYYY-MM-DDThh:mm:ss
.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
A key in the "trash" namespace for getting the number of (toplevel) items
that are present in the trash:///
folder.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
A key in the "trash" namespace for getting the original path of a file
inside the trash:///
folder before it was trashed.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
A key in the "unix" namespace for getting the number of blocks allocated for the file.
This attribute is only available for UNIX file systems.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
A key in the "unix" namespace for getting the block size for the file system.
This attribute is only available for UNIX file systems.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
A key in the "unix" namespace for getting the device id of the device the file is located on (see stat() documentation).
This attribute is only available for UNIX file systems.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
A key in the "unix" namespace for getting the group ID for the file.
This attribute is only available for UNIX file systems.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
A key in the "unix" namespace for getting the inode of the file.
This attribute is only available for UNIX file systems.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
A key in the "unix" namespace for checking if the file represents a UNIX mount point.
This attribute is %TRUE if the file is a UNIX mount point.
Since 2.58, /
is considered to be a mount point.
This attribute is only available for UNIX file systems.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
A key in the "unix" namespace for getting the mode of the file (e.g. whether the file is a regular file, symlink, etc).
See the documentation for lstat()
: this attribute is equivalent to
the st_mode
member of struct stat
, and includes both the file type
and permissions.
This attribute is only available for UNIX file systems.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
A key in the "unix" namespace for getting the number of hard links for a file.
See the documentation for lstat()
.
This attribute is only available for UNIX file systems.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
A key in the "unix" namespace for getting the device ID for the file (if it is a special file).
See the documentation for lstat()
.
This attribute is only available for UNIX file systems.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
A key in the "unix" namespace for getting the user ID for the file.
This attribute is only available for UNIX file systems.
Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
Extension point for memory usage monitoring functionality. See [Extending GIO][extending-gio].
The menu item attribute which holds the action name of the item. Action names are namespaced with an identifier for the action group in which the action resides. For example, "win." for window-specific actions and "app." for application-wide actions.
See also g_menu_model_get_item_attribute() and g_menu_item_set_attribute().
The menu item attribute that holds the namespace for all action names in menus that are linked from this item.
The menu item attribute which holds the icon of the item.
The icon is stored in the format returned by g_icon_serialize().
This attribute is intended only to represent 'noun' icons such as favicons for a webpage, or application icons. It should not be used for 'verbs' (ie: stock icons).
The menu item attribute which holds the label of the item.
The menu item attribute which holds the target with which the item's action will be activated.
See also g_menu_item_set_action_and_target()
The name of the link that associates a menu item with a section. The linked menu will usually be shown in place of the menu item, using the item's label as a header.
See also g_menu_item_set_link().
The name of the link that associates a menu item with a submenu.
See also g_menu_item_set_link().
Extension point for network status monitoring functionality. See [Extending GIO][extending-gio].
Extension point for power profile usage monitoring functionality. See [Extending GIO][extending-gio].
Extension point for proxy functionality. See [Extending GIO][extending-gio].
Extension point for proxy resolving functionality. See [Extending GIO][extending-gio].
Extension point for #GSettingsBackend functionality.
Extension point for TLS functionality via #GTlsBackend. See [Extending GIO][extending-gio].
The purpose used to verify the client certificate in a TLS connection. Used by TLS servers.
The purpose used to verify the server certificate in a TLS connection. This is the most common purpose in use. Used by TLS clients.
Extension point for #GVfs functionality. See [Extending GIO][extending-gio].
The string used to obtain the volume class with g_volume_get_identifier().
Known volume classes include device
, network
, and loop
. Other
classes may be added in the future.
This is intended to be used by applications to classify #GVolume
instances into different sections - for example a file manager or
file chooser can use this information to show network
volumes under
a "Network" heading and device
volumes under a "Devices" heading.
The string used to obtain a Hal UDI with g_volume_get_identifier().
The string used to obtain a filesystem label with g_volume_get_identifier().
The string used to obtain a NFS mount with g_volume_get_identifier().
The string used to obtain a Unix device path with g_volume_get_identifier().
The string used to obtain a UUID with g_volume_get_identifier().
Extension point for volume monitor functionality. See [Extending GIO][extending-gio].
Checks if action_name
is valid.
action_name
is valid if it consists only of alphanumeric characters,
plus '-' and '.'. The empty string is not a valid action name.
It is an error to call this function with a non-utf8 action_name
.
action_name
must not be %NULL.
a potential action name
Parses a detailed action name into its separate name and target components.
Detailed action names can have three formats.
The first format is used to represent an action name with no target value and consists of just an action name containing no whitespace nor the characters ':', '(' or ')'. For example: "app.action".
The second format is used to represent an action with a target value that is a non-empty string consisting only of alphanumerics, plus '-' and '.'. In that case, the action name and target value are separated by a double colon ("::"). For example: "app.action::target".
The third format is used to represent an action with any type of target value, including strings. The target value follows the action name, surrounded in parens. For example: "app.action(42)". The target value is parsed using g_variant_parse(). If a tuple-typed value is desired, it must be specified in the same way, resulting in two sets of parens, for example: "app.action((1,2,3))". A string target can be specified this way as well: "app.action('target')". For strings, this third format must be used if * target value is empty or contains characters other than alphanumerics, '-' and '.'.
a detailed action name
Formats a detailed action name from action_name
and target_value
.
It is an error to call this function with an invalid action name.
This function is the opposite of g_action_parse_detailed_name().
It will produce a string that can be parsed back to the action_name
and target_value
by that function.
See that function for the types of strings that will be printed by this function.
Creates a new #GAppInfo from the given information.
Note that for commandline,
the quoting rules of the Exec key of the
freedesktop.org Desktop Entry Specification
are applied. For example, if the commandline
contains
percent-encoded URIs, the percent-character must be doubled in order to prevent it from
being swallowed by Exec key unquoting. See the specification for exact quoting rules.
the commandline to use
the application name, or %NULL to use commandline
flags that can specify details of the created #GAppInfo
Gets a list of all of the applications currently registered on this system.
For desktop files, this includes applications that have
NoDisplay=true
set or are excluded from display by means
of OnlyShowIn
or NotShowIn
. See g_app_info_should_show().
The returned list does not include applications which have
the Hidden
key set.
Gets a list of all #GAppInfos for a given content type, including the recommended and fallback #GAppInfos. See g_app_info_get_recommended_for_type() and g_app_info_get_fallback_for_type().
the content type to find a #GAppInfo for
Gets the default #GAppInfo for a given content type.
the content type to find a #GAppInfo for
if %TRUE, the #GAppInfo is expected to support URIs
Gets the default application for handling URIs with the given URI scheme. A URI scheme is the initial part of the URI, up to but not including the ':', e.g. "http", "ftp" or "sip".
a string containing a URI scheme.
Gets a list of fallback #GAppInfos for a given content type, i.e. those applications which claim to support the given content type by MIME type subclassing and not directly.
the content type to find a #GAppInfo for
Gets a list of recommended #GAppInfos for a given content type, i.e. those applications which claim to support the given content type exactly, and not by MIME type subclassing. Note that the first application of the list is the last used one, i.e. the last one for which g_app_info_set_as_last_used_for_type() has been called.
the content type to find a #GAppInfo for
Utility function that launches the default application registered to handle the specified uri. Synchronous I/O is done on the uri to detect the type of the file if required.
The D-Bus–activated applications don't have to be started if your application terminates too soon after this function. To prevent this, use g_app_info_launch_default_for_uri_async() instead.
the uri to show
an optional #GAppLaunchContext
Async version of g_app_info_launch_default_for_uri().
This version is useful if you are interested in receiving error information in the case where the application is sandboxed and the portal may present an application chooser dialog to the user.
This is also useful if you want to be sure that the D-Bus–activated applications are really started before termination and if you are interested in receiving error information from their activation.
the uri to show
an optional #GAppLaunchContext
a #GCancellable
a #GAsyncReadyCallback to call when the request is done
Finishes an asynchronous launch-default-for-uri operation.
a #GAsyncResult
Removes all changes to the type associations done by g_app_info_set_as_default_for_type(), g_app_info_set_as_default_for_extension(), g_app_info_add_supports_type() or g_app_info_remove_supports_type().
a content type
Helper function for constructing #GAsyncInitable object. This is similar to g_object_newv() but also initializes the object asynchronously.
When the initialization is finished, callback
will be called. You can
then call g_async_initable_new_finish() to get the new object and check
for any errors.
a #GType supporting #GAsyncInitable.
the number of parameters in parameters
the parameters to use to construct the object
the [I/O priority][io-priority] of the operation
optional #GCancellable object, %NULL to ignore.
a #GAsyncReadyCallback to call when the initialization is finished
Asynchronously connects to the message bus specified by bus_type
.
When the operation is finished, callback
will be invoked. You can
then call g_bus_get_finish() to get the result of the operation.
This is an asynchronous failable function. See g_bus_get_sync() for the synchronous version.
a #GBusType
a #GCancellable or %NULL
a #GAsyncReadyCallback to call when the request is satisfied
Finishes an operation started with g_bus_get().
The returned object is a singleton, that is, shared with other
callers of g_bus_get() and g_bus_get_sync() for bus_type
. In the
event that you need a private message bus connection, use
g_dbus_address_get_for_bus_sync() and
g_dbus_connection_new_for_address() with
G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT and
G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION flags.
Note that the returned #GDBusConnection object will (usually) have the #GDBusConnection:exit-on-close property set to %TRUE.
a #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_bus_get()
Synchronously connects to the message bus specified by bus_type
.
Note that the returned object may shared with other callers,
e.g. if two separate parts of a process calls this function with
the same bus_type,
they will share the same object.
This is a synchronous failable function. See g_bus_get() and g_bus_get_finish() for the asynchronous version.
The returned object is a singleton, that is, shared with other
callers of g_bus_get() and g_bus_get_sync() for bus_type
. In the
event that you need a private message bus connection, use
g_dbus_address_get_for_bus_sync() and
g_dbus_connection_new_for_address() with
G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT and
G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION flags.
Note that the returned #GDBusConnection object will (usually) have the #GDBusConnection:exit-on-close property set to %TRUE.
a #GBusType
a #GCancellable or %NULL
Version of g_bus_own_name() using closures instead of callbacks for easier binding in other languages.
the type of bus to own a name on
the well-known name to own
a set of flags from the #GBusNameOwnerFlags enumeration
#GClosure to invoke when connected to the bus of type bus_type
or %NULL
#GClosure to invoke when name
is acquired or %NULL
#GClosure to invoke when name
is lost or %NULL
Version of g_bus_own_name_on_connection() using closures instead of callbacks for easier binding in other languages.
a #GDBusConnection
the well-known name to own
a set of flags from the #GBusNameOwnerFlags enumeration
#GClosure to invoke when name
is acquired or %NULL
#GClosure to invoke when name
is lost or %NULL
Stops owning a name.
Note that there may still be D-Bus traffic to process (relating to owning and unowning the name) in the current thread-default #GMainContext after this function has returned. You should continue to iterate the #GMainContext until the #GDestroyNotify function passed to g_bus_own_name() is called, in order to avoid memory leaks through callbacks queued on the #GMainContext after it’s stopped being iterated.
an identifier obtained from g_bus_own_name()
Stops watching a name.
Note that there may still be D-Bus traffic to process (relating to watching and unwatching the name) in the current thread-default #GMainContext after this function has returned. You should continue to iterate the #GMainContext until the #GDestroyNotify function passed to g_bus_watch_name() is called, in order to avoid memory leaks through callbacks queued on the #GMainContext after it’s stopped being iterated.
An identifier obtained from g_bus_watch_name()
Version of g_bus_watch_name() using closures instead of callbacks for easier binding in other languages.
The type of bus to watch a name on.
The name (well-known or unique) to watch.
Flags from the #GBusNameWatcherFlags enumeration.
#GClosure to invoke when name
is known to exist or %NULL.
#GClosure to invoke when name
is known to not exist or %NULL.
Version of g_bus_watch_name_on_connection() using closures instead of callbacks for easier binding in other languages.
A #GDBusConnection.
The name (well-known or unique) to watch.
Flags from the #GBusNameWatcherFlags enumeration.
#GClosure to invoke when name
is known to exist or %NULL.
#GClosure to invoke when name
is known to not exist or %NULL.
Checks if a content type can be executable. Note that for instance things like text files can be executables (i.e. scripts and batch files).
a content type string
Compares two content types for equality.
a content type string
a content type string
Tries to find a content type based on the mime type name.
a mime type string
Gets the human readable description of the content type.
a content type string
Gets the generic icon name for a content type.
See the shared-mime-info specification for more on the generic icon name.
a content type string
Get the list of directories which MIME data is loaded from. See g_content_type_set_mime_dirs() for details.
Gets the mime type for the content type, if one is registered.
a content type string
Guesses the content type based on example data. If the function is
uncertain, result_uncertain
will be set to %TRUE. Either filename
or data
may be %NULL, in which case the guess will be based solely
on the other argument.
a path, or %NULL
a stream of data, or %NULL
Tries to guess the type of the tree with root root,
by
looking at the files it contains. The result is an array
of content types, with the best guess coming first.
The types returned all have the form x-content/foo, e.g. x-content/audio-cdda (for audio CDs) or x-content/image-dcf (for a camera memory card). See the shared-mime-info specification for more on x-content types.
This function is useful in the implementation of g_mount_guess_content_type().
Determines if type
is a subset of supertype
.
a content type string
a content type string
Determines if type
is a subset of mime_type
.
Convenience wrapper around g_content_type_is_a().
a content type string
a mime type string
Checks if the content type is the generic "unknown" type. On UNIX this is the "application/octet-stream" mimetype, while on win32 it is "*" and on OSX it is a dynamic type or octet-stream.
a content type string
Set the list of directories used by GIO to load the MIME database.
If dirs
is %NULL, the directories used are the default:
mime
subdirectory of the directory in $XDG_DATA_HOME
mime
subdirectory of every directory in $XDG_DATA_DIRS
This function is intended to be used when writing tests that depend on information stored in the MIME database, in order to control the data.
Typically, in case your tests use %G_TEST_OPTION_ISOLATE_DIRS, but they
depend on the system’s MIME database, you should call this function
with dirs
set to %NULL before calling g_test_init(), for instance:
// Load MIME data from the system
g_content_type_set_mime_dirs (NULL);
// Isolate the environment
g_test_init (&argc, &argv, G_TEST_OPTION_ISOLATE_DIRS, NULL);
…
return g_test_run ();
%NULL-terminated list of directories to load MIME data from, including any mime/
subdirectory, and with the first directory to try listed first
Gets a list of strings containing all the registered content types
known to the system. The list and its data should be freed using
g_list_free_full (list, g_free)
.
Escape string
so it can appear in a D-Bus address as the value
part of a key-value pair.
For instance, if string
is /run/bus-for-:0
,
this function would return /run/bus-for-%3A0
,
which could be used in a D-Bus address like
unix:nonce-tcp:host=127.0.0.1,port=42,noncefile=/run/bus-for-%3A0
.
an unescaped string to be included in a D-Bus address as the value in a key-value pair
Synchronously looks up the D-Bus address for the well-known message
bus instance specified by bus_type
. This may involve using various
platform specific mechanisms.
The returned address will be in the D-Bus address format.
a #GBusType
a #GCancellable or %NULL
Asynchronously connects to an endpoint specified by address
and
sets up the connection so it is in a state to run the client-side
of the D-Bus authentication conversation. address
must be in the
D-Bus address format.
When the operation is finished, callback
will be invoked. You can
then call g_dbus_address_get_stream_finish() to get the result of
the operation.
This is an asynchronous failable function. See g_dbus_address_get_stream_sync() for the synchronous version.
A valid D-Bus address.
A #GCancellable or %NULL.
A #GAsyncReadyCallback to call when the request is satisfied.
Finishes an operation started with g_dbus_address_get_stream().
A server is not required to set a GUID, so out_guid
may be set to %NULL
even on success.
A #GAsyncResult obtained from the GAsyncReadyCallback passed to g_dbus_address_get_stream().
Synchronously connects to an endpoint specified by address
and
sets up the connection so it is in a state to run the client-side
of the D-Bus authentication conversation. address
must be in the
D-Bus address format.
A server is not required to set a GUID, so out_guid
may be set to %NULL
even on success.
This is a synchronous failable function. See g_dbus_address_get_stream() for the asynchronous version.
A valid D-Bus address.
A #GCancellable or %NULL.
Looks up the value of an annotation.
The cost of this function is O(n) in number of annotations.
A %NULL-terminated array of annotations or %NULL.
The name of the annotation to look up.
Creates a D-Bus error name to use for error
. If error
matches
a registered error (cf. g_dbus_error_register_error()), the corresponding
D-Bus error name will be returned.
Otherwise the a name of the form
org.gtk.GDBus.UnmappedGError.Quark._ESCAPED_QUARK_NAME.Code_ERROR_CODE
will be used. This allows other GDBus applications to map the error
on the wire back to a #GError using g_dbus_error_new_for_dbus_error().
This function is typically only used in object mappings to put a #GError on the wire. Regular applications should not use it.
Gets the D-Bus error name used for error,
if any.
This function is guaranteed to return a D-Bus error name for all
#GErrors returned from functions handling remote method calls
(e.g. g_dbus_connection_call_finish()) unless
g_dbus_error_strip_remote_error() has been used on error
.
Creates a #GError based on the contents of dbus_error_name
and
dbus_error_message
.
Errors registered with g_dbus_error_register_error() will be looked
up using dbus_error_name
and if a match is found, the error domain
and code is used. Applications can use g_dbus_error_get_remote_error()
to recover dbus_error_name
.
If a match against a registered error is not found and the D-Bus
error name is in a form as returned by g_dbus_error_encode_gerror()
the error domain and code encoded in the name is used to
create the #GError. Also, dbus_error_name
is added to the error message
such that it can be recovered with g_dbus_error_get_remote_error().
Otherwise, a #GError with the error code %G_IO_ERROR_DBUS_ERROR
in the %G_IO_ERROR error domain is returned. Also, dbus_error_name
is
added to the error message such that it can be recovered with
g_dbus_error_get_remote_error().
In all three cases, dbus_error_name
can always be recovered from the
returned #GError using the g_dbus_error_get_remote_error() function
(unless g_dbus_error_strip_remote_error() hasn't been used on the returned error).
This function is typically only used in object mappings to prepare #GError instances for applications. Regular applications should not use it.
D-Bus error name.
D-Bus error message.
Creates an association to map between dbus_error_name
and
#GErrors specified by error_domain
and error_code
.
This is typically done in the routine that returns the #GQuark for an error domain.
A #GQuark for an error domain.
An error code.
A D-Bus error name.
Helper function for associating a #GError error domain with D-Bus error names.
While quark_volatile
has a volatile
qualifier, this is a historical
artifact and the argument passed to it should not be volatile
.
The error domain name.
A pointer where to store the #GQuark.
A pointer to num_entries
#GDBusErrorEntry struct items.
Looks for extra information in the error message used to recover
the D-Bus error name and strips it if found. If stripped, the
message field in error
will correspond exactly to what was
received on the wire.
This is typically used when presenting errors to the end user.
Destroys an association previously set up with g_dbus_error_register_error().
A #GQuark for an error domain.
An error code.
A D-Bus error name.
This is a language binding friendly version of g_dbus_escape_object_path_bytestring().
the string to escape
Escapes bytes
for use in a D-Bus object path component.
bytes
is an array of zero or more nonzero bytes in an
unspecified encoding, followed by a single zero byte.
The escaping method consists of replacing all non-alphanumeric
characters (see g_ascii_isalnum()) with their hexadecimal value
preceded by an underscore (_
). For example:
foo.bar.baz
will become foo_2ebar_2ebaz
.
This method is appropriate to use when the input is nearly a valid object path component but is not when your input is far from being a valid object path component. Other escaping algorithms are also valid to use with D-Bus object paths.
This can be reversed with g_dbus_unescape_object_path().
the string of bytes to escape
Generate a D-Bus GUID that can be used with e.g. g_dbus_connection_new().
See the D-Bus specification regarding what strings are valid D-Bus GUIDs. The specification refers to these as ‘UUIDs’ whereas GLib (for historical reasons) refers to them as ‘GUIDs’. The terms are interchangeable.
Note that D-Bus GUIDs do not follow RFC 4122.
Converts a #GValue to a #GVariant of the type indicated by the type
parameter.
The conversion is using the following rules:
G_TYPE_STRING
: 's', 'o', 'g' or 'ay'G_TYPE_STRV
: 'as', 'ao' or 'aay'G_TYPE_BOOLEAN
: 'b'G_TYPE_UCHAR
: 'y'G_TYPE_INT
: 'i', 'n'G_TYPE_UINT
: 'u', 'q'G_TYPE_INT64
: 'x'G_TYPE_UINT64
: 't'G_TYPE_DOUBLE
: 'd'G_TYPE_VARIANT
: Any #GVariantTypeThis can fail if e.g. gvalue
is of type %G_TYPE_STRING and type
is 'i', i.e. %G_VARIANT_TYPE_INT32. It will also fail for any #GType
(including e.g. %G_TYPE_OBJECT and %G_TYPE_BOXED derived-types) not
in the table above.
Note that if gvalue
is of type %G_TYPE_VARIANT and its value is
%NULL, the empty #GVariant instance (never %NULL) for type
is
returned (e.g. 0 for scalar types, the empty string for string types,
'/' for object path types, the empty array for any array type and so on).
See the g_dbus_gvariant_to_gvalue() function for how to convert a #GVariant to a #GValue.
A #GValue to convert to a #GVariant
A #GVariantType
Converts a #GVariant to a #GValue. If value
is floating, it is consumed.
The rules specified in the g_dbus_gvalue_to_gvariant() function are used - this function is essentially its reverse form. So, a #GVariant containing any basic or string array type will be converted to a #GValue containing a basic value or string array. Any other #GVariant (handle, variant, tuple, dict entry) will be converted to a #GValue containing that #GVariant.
The conversion never fails - a valid #GValue is always returned in
out_gvalue
.
Checks if string
is a
D-Bus address.
This doesn't check if string
is actually supported by #GDBusServer
or #GDBusConnection - use g_dbus_is_supported_address() to do more
checks.
A string.
Check whether string
is a valid D-Bus error name.
This function returns the same result as g_dbus_is_interface_name(), because D-Bus error names are defined to have exactly the same syntax as interface names.
The string to check.
Checks if string
is a D-Bus GUID.
See the documentation for g_dbus_generate_guid() for more information about the format of a GUID.
The string to check.
Checks if string
is a valid D-Bus interface name.
The string to check.
Checks if string
is a valid D-Bus member (e.g. signal or method) name.
The string to check.
Checks if string
is a valid D-Bus bus name (either unique or well-known).
The string to check.
Like g_dbus_is_address() but also checks if the library supports the
transports in string
and that key/value pairs for each transport
are valid. See the specification of the
D-Bus address format.
A string.
Checks if string
is a valid D-Bus unique bus name.
The string to check.
Unescapes an string that was previously escaped with g_dbus_escape_object_path(). If the string is in a format that could not have been returned by g_dbus_escape_object_path(), this function returns %NULL.
Encoding alphanumeric characters which do not need to be
encoded is not allowed (e.g _63
is not valid, the string
should contain c
instead).
the string to unescape
Creates a new #GDtlsClientConnection wrapping base_socket
which is
assumed to communicate with the server identified by server_identity
.
the #GDatagramBased to wrap
the expected identity of the server
Creates a new #GDtlsServerConnection wrapping base_socket
.
the #GDatagramBased to wrap
the default server certificate, or %NULL
Creates a #GFile with the given argument from the command line.
The value of arg
can be either a URI, an absolute path or a
relative path resolved relative to the current working directory.
This operation never fails, but the returned object might not
support any I/O operation if arg
points to a malformed path.
Note that on Windows, this function expects its argument to be in UTF-8 -- not the system code page. This means that you should not use this function with string from argv as it is passed to main(). g_win32_get_command_line() will return a UTF-8 version of the commandline. #GApplication also uses UTF-8 but g_application_command_line_create_file_for_arg() may be more useful for you there. It is also always possible to use this function with #GOptionContext arguments of type %G_OPTION_ARG_FILENAME.
a command line string
Creates a #GFile with the given argument from the command line.
This function is similar to g_file_new_for_commandline_arg() except that it allows for passing the current working directory as an argument instead of using the current working directory of the process.
This is useful if the commandline argument was given in a context other than the invocation of the current process.
See also g_application_command_line_create_file_for_arg().
a command line string
the current working directory of the commandline
Opens a file in the preferred directory for temporary files (as returned by g_get_tmp_dir()) and returns a #GFile and #GFileIOStream pointing to it.
tmpl
should be a string in the GLib file name encoding
containing a sequence of six 'X' characters, and containing no
directory components. If it is %NULL, a default template is used.
Unlike the other #GFile constructors, this will return %NULL if a temporary file could not be created.
Template for the file name, as in g_file_open_tmp(), or %NULL for a default template
Gets a hash for an icon.
#gconstpointer to an icon object.
Generate a #GIcon instance from str
. This function can fail if
str
is not valid - see g_icon_to_string() for discussion.
If your application or library provides one or more #GIcon implementations you need to ensure that each #GType is registered with the type system prior to calling g_icon_new_for_string().
A string obtained via g_icon_to_string().
Helper function for constructing #GInitable object. This is similar to g_object_newv() but also initializes the object and returns %NULL, setting an error on failure.
a #GType supporting #GInitable.
the parameters to use to construct the object
optional #GCancellable object, %NULL to ignore.
Converts errno.h error codes into GIO error codes. The fallback value %G_IO_ERROR_FAILED is returned for error codes not currently handled (but note that future GLib releases may return a more specific value instead).
As %errno is global and may be modified by intermediate function calls, you should save its value as soon as the call which sets it
Error number as defined in errno.h.
Gets the GIO Error Quark.
Registers type
as extension for the extension point with name
extension_point_name
.
If type
has already been registered as an extension for this
extension point, the existing #GIOExtension object is returned.
the name of the extension point
the #GType to register as extension
the name for the extension
the priority for the extension
Looks up an existing extension point.
the name of the extension point
Registers an extension point.
The name of the extension point
Loads all the modules in the specified directory.
If don't require all modules to be initialized (and thus registering all gtypes) then you can use g_io_modules_scan_all_in_directory() which allows delayed/lazy loading of modules.
pathname for a directory containing modules to load.
Loads all the modules in the specified directory.
If don't require all modules to be initialized (and thus registering all gtypes) then you can use g_io_modules_scan_all_in_directory() which allows delayed/lazy loading of modules.
pathname for a directory containing modules to load.
a scope to use when scanning the modules.
Scans all the modules in the specified directory, ensuring that any extension point implemented by a module is registered.
This may not actually load and initialize all the types in each module, some modules may be lazily loaded and initialized when an extension point it implements is used with e.g. g_io_extension_point_get_extensions() or g_io_extension_point_get_extension_by_name().
If you need to guarantee that all types are loaded in all the modules, use g_io_modules_load_all_in_directory().
pathname for a directory containing modules to scan.
Scans all the modules in the specified directory, ensuring that any extension point implemented by a module is registered.
This may not actually load and initialize all the types in each module, some modules may be lazily loaded and initialized when an extension point it implements is used with e.g. g_io_extension_point_get_extensions() or g_io_extension_point_get_extension_by_name().
If you need to guarantee that all types are loaded in all the modules, use g_io_modules_load_all_in_directory().
pathname for a directory containing modules to scan.
a scope to use when scanning the modules
Cancels all cancellable I/O jobs.
A job is cancellable if a #GCancellable was passed into g_io_scheduler_push_job().
Schedules the I/O job to run in another thread.
notify
will be called on user_data
after job_func
has returned,
regardless whether the job was cancelled or has run to completion.
If cancellable
is not %NULL, it can be used to cancel the I/O job
by calling g_cancellable_cancel() or by calling
g_io_scheduler_cancel_all_jobs().
a #GIOSchedulerJobFunc.
the [I/O priority][io-priority] of the request.
optional #GCancellable object, %NULL to ignore.
Creates a keyfile-backed #GSettingsBackend.
The filename of the keyfile to use is given by filename
.
All settings read to or written from the backend must fall under the
path given in root_path
(which must start and end with a slash and
not contain two consecutive slashes). root_path
may be "/".
If root_group
is non-%NULL then it specifies the name of the keyfile
group used for keys that are written directly below root_path
. For
example, if root_path
is "/apps/example/" and root_group
is
"toplevel", then settings the key "/apps/example/enabled" to a value
of %TRUE will cause the following to appear in the keyfile:
|[ [toplevel] enabled=true
If `root_group` is %NULL then it is not permitted to store keys
directly below the `root_path`.
For keys not stored directly below `root_path` (ie: in a sub-path),
the name of the subpath (with the final slash stripped) is used as
the name of the keyfile group. To continue the example, if
"/apps/example/profiles/default/font-size" were set to
12 then the following would appear in the keyfile:
|[
[profiles/default]
font-size=12
The backend will refuse writes (and return writability as being
%FALSE) for keys outside of root_path
and, in the event that
root_group
is %NULL, also for keys directly under root_path
.
Writes will also be refused if the backend detects that it has the
inability to rewrite the keyfile (ie: the containing directory is not
writable).
There is no checking done for your key namespace clashing with the syntax of the key file format. For example, if you have '[' or ']' characters in your path names or '=' in your key names you may be in trouble.
The backend reads default values from a keyfile called defaults
in
the directory specified by the #GKeyfileSettingsBackend:defaults-dir property,
and a list of locked keys from a text file with the name locks
in
the same location.
the filename of the keyfile
the path under which all settings keys appear
the group name corresponding to root_path,
or %NULL
Gets a reference to the default #GMemoryMonitor for the system.
Creates a memory-backed #GSettingsBackend.
This backend allows changes to settings, but does not write them to any backing storage, so the next time you run your application, the memory backend will start out with the default values again.
Gets the default #GNetworkMonitor for the system.
Initializes the platform networking libraries (eg, on Windows, this calls WSAStartup()). GLib will call this itself if it is needed, so you only need to call it if you directly call system networking functions (without calling any GLib networking functions first).
Creates a readonly #GSettingsBackend.
This backend does not allow changes to settings, so all settings will always have their default values.
Utility method for #GPollableInputStream and #GPollableOutputStream implementations. Creates a new #GSource that expects a callback of type #GPollableSourceFunc. The new source does not actually do anything on its own; use g_source_add_child_source() to add other sources to it to cause it to trigger.
Utility method for #GPollableInputStream and #GPollableOutputStream
implementations. Creates a new #GSource, as with
g_pollable_source_new(), but also attaching child_source
(with a
dummy callback), and cancellable,
if they are non-%NULL.
the stream associated with the new source
optional child source to attach
optional #GCancellable to attach
Tries to read from stream,
as with g_input_stream_read() (if
blocking
is %TRUE) or g_pollable_input_stream_read_nonblocking()
(if blocking
is %FALSE). This can be used to more easily share
code between blocking and non-blocking implementations of a method.
If blocking
is %FALSE, then stream
must be a
#GPollableInputStream for which g_pollable_input_stream_can_poll()
returns %TRUE, or else the behavior is undefined. If blocking
is
%TRUE, then stream
does not need to be a #GPollableInputStream.
a #GInputStream
a buffer to read data into
whether to do blocking I/O
optional #GCancellable object, %NULL to ignore.
Tries to write to stream,
as with g_output_stream_write() (if
blocking
is %TRUE) or g_pollable_output_stream_write_nonblocking()
(if blocking
is %FALSE). This can be used to more easily share
code between blocking and non-blocking implementations of a method.
If blocking
is %FALSE, then stream
must be a
#GPollableOutputStream for which
g_pollable_output_stream_can_poll() returns %TRUE or else the
behavior is undefined. If blocking
is %TRUE, then stream
does not
need to be a #GPollableOutputStream.
a #GOutputStream.
the buffer containing the data to write.
whether to do blocking I/O
optional #GCancellable object, %NULL to ignore.
Tries to write count
bytes to stream,
as with
g_output_stream_write_all(), but using g_pollable_stream_write()
rather than g_output_stream_write().
On a successful write of count
bytes, %TRUE is returned, and
bytes_written
is set to count
.
If there is an error during the operation (including
%G_IO_ERROR_WOULD_BLOCK in the non-blocking case), %FALSE is
returned and error
is set to indicate the error status,
bytes_written
is updated to contain the number of bytes written
into the stream before the error occurred.
As with g_pollable_stream_write(), if blocking
is %FALSE, then
stream
must be a #GPollableOutputStream for which
g_pollable_output_stream_can_poll() returns %TRUE or else the
behavior is undefined. If blocking
is %TRUE, then stream
does not
need to be a #GPollableOutputStream.
a #GOutputStream.
the buffer containing the data to write.
whether to do blocking I/O
optional #GCancellable object, %NULL to ignore.
Gets a reference to the default #GPowerProfileMonitor for the system.
Gets the default #GProxyResolver for the system.
Gets the #GResolver Error Quark.
Gets the #GResource Error Quark.
Loads a binary resource bundle and creates a #GResource representation of it, allowing you to query it for data.
If you want to use this resource in the global resource namespace you need to register it with g_resources_register().
If filename
is empty or the data in it is corrupt,
%G_RESOURCE_ERROR_INTERNAL will be returned. If filename
doesn’t exist, or
there is an error in reading it, an error from g_mapped_file_new() will be
returned.
the path of a filename to load, in the GLib filename encoding
Returns all the names of children at the specified path
in the set of
globally registered resources.
The return result is a %NULL terminated list of strings which should
be released with g_strfreev().
lookup_flags
controls the behaviour of the lookup.
A pathname inside the resource
A #GResourceLookupFlags
Looks for a file at the specified path
in the set of
globally registered resources and if found returns information about it.
lookup_flags
controls the behaviour of the lookup.
A pathname inside the resource
A #GResourceLookupFlags
Looks for a file at the specified path
in the set of
globally registered resources and returns a #GBytes that
lets you directly access the data in memory.
The data is always followed by a zero byte, so you can safely use the data as a C string. However, that byte is not included in the size of the GBytes.
For uncompressed resource files this is a pointer directly into the resource bundle, which is typically in some readonly data section in the program binary. For compressed files we allocate memory on the heap and automatically uncompress the data.
lookup_flags
controls the behaviour of the lookup.
A pathname inside the resource
A #GResourceLookupFlags
Looks for a file at the specified path
in the set of
globally registered resources and returns a #GInputStream
that lets you read the data.
lookup_flags
controls the behaviour of the lookup.
A pathname inside the resource
A #GResourceLookupFlags
Gets the default system schema source.
This function is not required for normal uses of #GSettings but it may be useful to authors of plugin management systems or to those who want to introspect the content of schemas.
If no schemas are installed, %NULL will be returned.
The returned source may actually consist of multiple schema sources
from different directories, depending on which directories were given
in XDG_DATA_DIRS
and GSETTINGS_SCHEMA_DIR
. For this reason, all
lookups performed against the default source should probably be done
recursively.
Reports an error in an idle function. Similar to g_simple_async_report_error_in_idle(), but takes a #GError rather than building a new one.
a #GObject, or %NULL
a #GAsyncReadyCallback.
the #GError to report
Gets the default #GTlsBackend for the system.
Gets the TLS channel binding error quark.
Creates a new #GTlsClientConnection wrapping base_io_stream
(which
must have pollable input and output streams) which is assumed to
communicate with the server identified by server_identity
.
See the documentation for #GTlsConnection:base-io-stream for restrictions
on when application code can run operations on the base_io_stream
after
this function has returned.
the #GIOStream to wrap
the expected identity of the server
Gets the TLS error quark.
Creates a new #GTlsFileDatabase which uses anchor certificate authorities
in anchors
to verify certificate chains.
The certificates in anchors
must be PEM encoded.
filename of anchor certificate authorities.
Creates a new #GTlsServerConnection wrapping base_io_stream
(which
must have pollable input and output streams).
See the documentation for #GTlsConnection:base-io-stream for restrictions
on when application code can run operations on the base_io_stream
after
this function has returned.
the #GIOStream to wrap
the default server certificate, or %NULL
Determines if mount_path
is considered an implementation of the
OS. This is primarily used for hiding mountable and mounted volumes
that only are used in the OS and has little to no relevance to the
casual user.
a mount path, e.g. /media/disk
or /usr
Determines if device_path
is considered a block device path which is only
used in implementation of the OS. This is primarily used for hiding
mounted volumes that are intended as APIs for programs to read, and system
administrators at a shell; rather than something that should, for example,
appear in a GUI. For example, the Linux /proc
filesystem.
The list of device paths considered ‘system’ ones may change over time.
a device path, e.g. /dev/loop0
or nfsd
Determines if fs_type
is considered a type of file system which is only
used in implementation of the OS. This is primarily used for hiding
mounted volumes that are intended as APIs for programs to read, and system
administrators at a shell; rather than something that should, for example,
appear in a GUI. For example, the Linux /proc
filesystem.
The list of file system types considered ‘system’ ones may change over time.
a file system type, e.g. procfs
or tmpfs
Gets a #GUnixMountEntry for a given mount path. If time_read
is set, it will be filled with a unix timestamp for checking
if the mounts have changed since with g_unix_mounts_changed_since().
If more mounts have the same mount path, the last matching mount is returned.
This will return %NULL if there is no mount point at mount_path
.
path for a possible unix mount.
Compares two unix mounts.
first #GUnixMountEntry to compare.
second #GUnixMountEntry to compare.
Makes a copy of mount_entry
.
a #GUnixMountEntry.
Gets a #GUnixMountEntry for a given file path. If time_read
is set, it will be filled with a unix timestamp for checking
if the mounts have changed since with g_unix_mounts_changed_since().
If more mounts have the same mount path, the last matching mount is returned.
This will return %NULL if looking up the mount entry fails, if
file_path
doesn’t exist or there is an I/O error.
file path on some unix mount.
Frees a unix mount.
a #GUnixMountEntry.
Gets the device path for a unix mount.
a #GUnixMount.
Gets the filesystem type for the unix mount.
a #GUnixMount.
Gets the mount path for a unix mount.
input #GUnixMountEntry to get the mount path for.
Gets a comma-separated list of mount options for the unix mount. For example,
rw,relatime,seclabel,data=ordered
.
This is similar to g_unix_mount_point_get_options(), but it takes a #GUnixMountEntry as an argument.
a #GUnixMountEntry.
Gets the root of the mount within the filesystem. This is useful e.g. for mounts created by bind operation, or btrfs subvolumes.
For example, the root path is equal to "/" for mount created by "mount /dev/sda1 /mnt/foo" and "/bar" for "mount --bind /mnt/foo/bar /mnt/bar".
a #GUnixMountEntry.
Guesses whether a Unix mount can be ejected.
a #GUnixMountEntry
Guesses the icon of a Unix mount.
a #GUnixMountEntry
Guesses the name of a Unix mount. The result is a translated string.
a #GUnixMountEntry
Guesses whether a Unix mount should be displayed in the UI.
a #GUnixMountEntry
Guesses the symbolic icon of a Unix mount.
a #GUnixMountEntry
Checks if a unix mount is mounted read only.
a #GUnixMount.
Checks if a Unix mount is a system mount. This is the Boolean OR of
g_unix_is_system_fs_type(), g_unix_is_system_device_path() and
g_unix_is_mount_path_system_internal() on mount_entry’
s properties.
The definition of what a ‘system’ mount entry is may change over time as new file system types and device paths are ignored.
a #GUnixMount.
Gets a #GUnixMountPoint for a given mount path. If time_read
is set, it
will be filled with a unix timestamp for checking if the mount points have
changed since with g_unix_mount_points_changed_since().
If more mount points have the same mount path, the last matching mount point is returned.
path for a possible unix mount point.
Checks if the unix mount points have changed since a given unix time.
guint64 to contain a timestamp.
Gets a #GList of #GUnixMountPoint containing the unix mount points.
If time_read
is set, it will be filled with the mount timestamp,
allowing for checking if the mounts have changed with
g_unix_mount_points_changed_since().
Checks if the unix mounts have changed since a given unix time.
guint64 to contain a timestamp.
Gets a #GList of #GUnixMountEntry containing the unix mounts.
If time_read
is set, it will be filled with the mount
timestamp, allowing for checking if the mounts have changed
with g_unix_mounts_changed_since().
The value returned by handlers of the signals generated by the
gdbus-codegen
tool to indicate that a method call has been handled by an implementation. It is equal to %TRUE, but using this macro is sometimes more readable.In code that needs to be backwards-compatible with older GLib, use %TRUE instead, often written like this:
|[ g_dbus_method_invocation_return_error (invocation, ...); return TRUE; // handled