Expand description
Rust GIO bindings
Rust bindings and wrappers for GIO, part of gtk-rs-core.
GIO 2.48 is the lowest supported version for the underlying library.
Minimum supported Rust version
Currently, the minimum supported Rust version is 1.56.0
.
Documentation
Using
We recommend using crates from crates.io, as demonstrated here.
If you want to track the bleeding edge, use the git dependency instead:
[dependencies]
gio = { git = "https://github.com/gtk-rs/gtk-rs-core.git", package = "gio" }
Avoid mixing versioned and git crates like this:
[dependencies]
gio = "0.13"
gio = { git = "https://github.com/gtk-rs/gtk-rs-core.git", package = "gio" }
See Also
License
gio is available under the MIT License, please refer to it.
Re-exports
Modules
Macros
Include gresources generated with compile_resources and register with glib. path
is
relative to OUTDIR
.
Structs
ActionGroup
represents a group of actions. Actions can be used to
expose functionality in a structured way, either from one part of a
program to another, or to the outside world. Action groups are often
used together with a MenuModel
that provides additional
representation data for displaying the actions to the user, e.g. in
a menu.
The GActionMap interface is implemented by ActionGroup
implementations that operate by containing a number of
named Action
instances, such as SimpleActionGroup
.
AppInfo
and AppLaunchContext
are used for describing and launching
applications installed on the system.
Flags used when creating a AppInfo
.
AppInfoMonitor
is a very simple object used for monitoring the app
info database for changes (ie: newly installed or removed
applications).
Integrating the launch with the launching application. This is used to handle for instance startup notification and launching the new application on the same screen as the launching window.
A Application
is the foundation of an application. It wraps some
low-level platform-specific services and is intended to act as the
foundation for higher-level application classes such as
GtkApplication
or MxApplication
. In general, you should not use
this class outside of a higher level framework.
ApplicationCommandLine
represents a command-line invocation of
an application. It is created by Application
and emitted
in the signal::Application::command-line
signal and virtual function.
Flags used to define the behaviour of a Application
.
AskPasswordFlags
are used to request specific information from the
user, or to notify the user of their choices in an authentication
situation.
Provides a base class for implementing asynchronous function results.
Buffered input stream implements FilterInputStream
and provides
for buffered reads.
Buffered output stream implements FilterOutputStream
and provides
for buffered writes.
Flags used in g_bus_own_name()
.
Flags used in g_bus_watch_name()
.
BytesIcon
specifies an image held in memory in a common format (usually
png) to be used as icon.
GCancellable is a thread-safe operation cancellation stack used throughout GIO to allow for cancellation of synchronous and asynchronous operations.
CharsetConverter
is an implementation of Converter
based on
GIConv.
Converter
is implemented by objects that convert
binary data in various ways. The conversion can be
stateful and may fail at any place.
Flags used when calling a ConverterExtManual::convert()
.
Converter input stream implements InputStream
and allows
conversion of data of various types during reading.
Converter output stream implements OutputStream
and allows
conversion of data of various types during reading.
The Credentials
type is a reference-counted wrapper for native
credentials. This information is typically used for identifying,
authenticating and authorizing other processes.
DBusActionGroup
is an implementation of the ActionGroup
interface that can be used as a proxy for an action group
that is exported over D-Bus with DBusConnection::export_action_group()
.
Information about an argument for a method or a signal.
The DBusAuthObserver
type provides a mechanism for participating
in how a DBusServer
(or a DBusConnection
) authenticates remote
peers. Simply instantiate a DBusAuthObserver
and connect to the
signals you are interested in. Note that new signals may be added
in the future
Flags used in DBusConnection::call()
and similar APIs.
Capabilities negotiated with the remote peer.
The DBusConnection
type is used for D-Bus connections to remote
peers such as a message buses. It is a low-level API that offers a
lot of flexibility. For instance, it lets you establish a connection
over any transport that can by represented as a IOStream
.
Flags used when creating a new DBusConnection
.
The DBusInterface
type is the base type for D-Bus interfaces both
on the service side (see DBusInterfaceSkeleton
) and client side
(see DBusProxy
).
Information about a D-Bus interface.
Abstract base class for D-Bus interfaces on the service side.
Flags describing the behavior of a DBusInterfaceSkeleton
instance.
DBusMenuModel
is an implementation of MenuModel
that can be used
as a proxy for a menu model that is exported over D-Bus with
DBusConnection::export_menu_model()
.
A type for representing D-Bus messages that can be sent or received
on a DBusConnection
.
Message flags used in DBusMessage
.
Information about a method on an D-Bus interface.
Instances of the DBusMethodInvocation
class are used when
handling D-Bus method calls. It provides a way to asynchronously
return results and errors.
Information about nodes in a remote object hierarchy.
The DBusObject
type is the base type for D-Bus objects on both
the service side (see GDBusObjectSkeleton
) and the client side
(see GDBusObjectProxy
). It is essentially just a container of
interfaces.
Information about a D-Bus property on a D-Bus interface.
Flags used when constructing an instance of a DBusProxy
derived class.
Flags used when sending GDBusMessages
on a DBusConnection
.
DBusServer
is a helper for listening to and accepting D-Bus
connections. This can be used to create a new D-Bus server, allowing two
peers to use the D-Bus protocol for their own specialized communication.
A server instance provided in this way will not perform message routing or
implement the org.freedesktop.DBus interface.
Flags used when creating a DBusServer
.
Flags used when subscribing to signals via DBusConnection::signal_subscribe()
.
Information about a signal on a D-Bus interface.
Data input stream implements InputStream
and includes functions for
reading structured data directly from a binary input stream.
Data output stream implements OutputStream
and includes functions for
writing data directly to an output stream.
DebugController
is an interface to expose control of debugging features and
debug output.
DebugControllerDBus
is an implementation of DebugController
which exposes
debug settings as a D-Bus object.
DesktopAppInfo
is an implementation of AppInfo
based on
desktop files.
Drive
- this represent a piece of hardware connected to the machine.
It’s generally only created for removable hardware or hardware with
removable media.
Flags used when starting a drive.
Emblem
is an implementation of Icon
that supports
having an emblem, which is an icon with additional properties.
It can than be added to a EmblemedIcon
.
EmblemedIcon
is an implementation of Icon
that supports
adding an emblem to an icon. Adding multiple emblems to an
icon is ensured via EmblemedIconExt::add_emblem()
.
File
is a high level abstraction for manipulating files on a
virtual file system. GFiles
are lightweight, immutable objects
that do no I/O upon creation. It is necessary to understand that
File
objects do not represent files, merely an identifier for a
file. All file content I/O is implemented as streaming operations
(see InputStream
and OutputStream
).
Information about a specific attribute.
Flags specifying the behaviour of an attribute.
Acts as a lightweight registry for possible valid file attributes.
The registry stores Key-Value pair formats as GFileAttributeInfos
.
Determines if a string matches a file attribute.
Flags used when copying or moving files.
Flags used when an operation may create a file.
FileEnumerator
allows you to operate on a set of GFiles
,
returning a FileInfo
structure for each file enumerated (e.g.
FileExt::enumerate_children()
will return a FileEnumerator
for each
of the children within a directory).
GFileIOStream provides io streams that both read and write to the same file handle.
Functionality for manipulating basic metadata for files. FileInfo
implements methods for getting information that all files should
contain, and allows for manipulation of extended attributes.
GFileInputStream provides input streams that take their content from a file.
Flags that can be used with FileExtManual::measure_disk_usage()
.
Monitors a file or directory for changes.
Flags used to set what a FileMonitor
will watch for.
GFileOutputStream provides output streams that write their content to a file.
Flags used when querying a FileInfo
.
Completes partial file and directory names given a partial string by looking in the file system for clues. Can return a list of possible completion strings for widget implementations.
Base class for input stream implementations that perform some kind of filtering operation on a base stream. Typical examples of filtering operations are character set conversion, compression and byte order flipping.
Base class for output stream implementations that perform some kind of filtering operation on a base stream. Typical examples of filtering operations are character set conversion, compression and byte order flipping.
The implementation of an IOExtensionPoint
.
IOExtension
is an opaque data structure and can only be accessed
using the following functions.
An extension point provides a mechanism to extend the functionality of a library or application.
Each extension point is identified by a name, and it may optionally require that any implementation
must be of a certain type.
IOExtensionPoint
is an opaque data structure and can only be accessed
using the following functions.
Builder for extension points.
GIOStream represents an object that has both read and write streams. Generally the two streams act as separate input and output streams, but they share some common resources and state. For instance, for seekable streams, both streams may use the same position.
GIOStreamSpliceFlags determine how streams should be spliced.
Icon
is a very minimal interface for icons. It provides functions
for checking the equality of two icons, hashing of icons and
serializing an icon to and from strings.
InetAddress
represents an IPv4 or IPv6 internet address. Use
ResolverExt::lookup_by_name()
or ResolverExt::lookup_by_name_async()
to
look up the InetAddress
for a hostname. Use
ResolverExt::lookup_by_address()
or
ResolverExt::lookup_by_address_async()
to look up the hostname for a
InetAddress
.
InetAddressMask
represents a range of IPv4 or IPv6 addresses
described by a base address and a length indicating how many bits
of the base address are relevant for matching purposes. These are
often given in string form. Eg, “10.0.0.0/8”, or “fe80::/10”.
An IPv4 or IPv6 socket address; that is, the combination of a
InetAddress
and a port number.
Initable
is implemented by objects that can fail during
initialization. If an object implements this interface then
it must be initialized as the first thing after construction,
either via InitableExt::init()
or AsyncInitableExt::init_async()
(the latter is only available if it also implements AsyncInitable
).
InputStream
has functions to read from a stream (InputStreamExtManual::read()
),
to close a stream (InputStreamExt::close()
) and to skip some content
(InputStreamExt::skip()
).
ListModel
is an interface that represents a mutable list of
GObjects
. Its main intention is as a model for various widgets in
user interfaces, such as list views, but it can also be used as a
convenient method of returning lists of data, with support for
updates.
Extends the Icon
interface and adds the ability to
load icons from streams.
LocalTask
provides idiomatic access to gio’s GTask
API, for
instance by being generic over their value type, while not completely departing
from the underlying C API. LocalTask
does not require its value to be Send
and Sync
and thus is useful to to implement gio style asynchronous
tasks that run in the glib main loop. If you need to run tasks in threads
see the Task
type.
MemoryInputStream
is a class for using arbitrary
memory chunks as input for GIO streaming input operations.
MemoryMonitor
will monitor system memory and suggest to the application
when to free memory so as to leave more room for other applications.
It is implemented on Linux using the Low Memory Monitor
(API documentation).
MemoryOutputStream
is a class for using arbitrary
memory chunks as output for GIO streaming output operations.
MenuAttributeIter
is an opaque structure type. You must access it
using the functions below.
MenuLinkIter
is an opaque structure type. You must access it using
the functions below.
MenuModel
represents the contents of a menu – an ordered list of
menu items. The items are associated with actions, which can be
activated through them. Items can be grouped in sections, and may
have submenus associated with them. Both items and sections usually
have some representation data, such as labels or icons. The type of
the associated action (ie whether it is stateful, and what kind of
state it has) can influence the representation of the item.
Flags used when mounting a mount.
MountOperation
provides a mechanism for interacting with the user.
It can be used for authenticating mountable operations, such as loop
mounting files, hard drive partitions or server locations. It can
also be used to ask the user questions or show a list of applications
preventing unmount or eject operations from completing.
Flags used when an unmounting a mount.
NetworkAddress
provides an easy way to resolve a hostname and
then attempt to connect to that host, handling the possibility of
multiple IP addresses and multiple address families.
NetworkMonitor
provides an easy-to-use cross-platform API
for monitoring network connectivity. On Linux, the available
implementations are based on the kernel’s netlink interface and
on NetworkManager.
Like NetworkAddress
does with hostnames, NetworkService
provides an easy way to resolve a SRV record, and then attempt to
connect to one of the hosts that implements that service, handling
service priority/weighting, multiple IP addresses, and multiple
address families.
Notification
is a mechanism for creating a notification to be shown
to the user – typically as a pop-up notification presented by the
desktop environment shell.
OutputStream
has functions to write to a stream (OutputStreamExt::write()
),
to close a stream (OutputStreamExt::close()
) and to flush pending writes
(OutputStreamExt::flush()
).
GOutputStreamSpliceFlags determine how streams should be spliced.
A Permission
represents the status of the caller’s permission to
perform a certain action.
PollableInputStream
is implemented by GInputStreams
that
can be polled for readiness to read. This can be used when
interfacing with a non-GIO API that expects
UNIX-file-descriptor-style asynchronous I/O rather than GIO-style.
PollableOutputStream
is implemented by GOutputStreams
that
can be polled for readiness to write. This can be used when
interfacing with a non-GIO API that expects
UNIX-file-descriptor-style asynchronous I/O rather than GIO-style.
PowerProfileMonitor
makes it possible for applications as well as OS components
to monitor system power profiles and act upon them. It currently only exports
whether the system is in “Power Saver” mode (known as “Low Power” mode on
some systems).
A PropertyAction
is a way to get a Action
with a state value
reflecting and controlling the value of a glib::Object
property.
A Proxy
handles connecting to a remote host via a given type of
proxy server. It is implemented by the ‘gio-proxy’ extension point.
The extensions are named after their proxy protocol name. As an
example, a SOCKS5 proxy implementation can be retrieved with the
name ‘socks5’ using the function
IOExtensionPoint::extension_by_name()
.
Support for proxied InetSocketAddress
.
ProxyResolver
provides synchronous and asynchronous network proxy
resolution. ProxyResolver
is used within SocketClient
through
the method SocketConnectableExt::proxy_enumerate()
.
The GRemoteActionGroup interface is implemented by ActionGroup
instances that either transmit action invocations to other processes
or receive action invocations in the local process from other
processes.
Resolver
provides cancellable synchronous and asynchronous DNS
resolution, for hostnames (ResolverExt::lookup_by_address()
,
ResolverExt::lookup_by_name()
and their async variants) and SRV
(service) records (ResolverExt::lookup_service()
).
Flags to modify lookup behavior.
Applications and libraries often contain binary or textual data that is
really part of the application, rather than user data. For instance
GtkBuilder
.ui files, splashscreen images, GMenu markup XML, CSS files,
icons, etc. These are often shipped as files in $datadir/appname
, or
manually included as literal strings in the code.
GResourceLookupFlags determine how resource path lookups are handled.
Seekable
is implemented by streams (implementations of
InputStream
or OutputStream
) that support seeking.
The Settings
class provides a convenient API for storing and retrieving
application settings.
The SettingsBackend
interface defines a generic interface for
non-strictly-typed data that is stored in a hierarchy. To implement
an alternative storage backend for Settings
, you need to implement
the SettingsBackend
interface and then make it implement the
extension point SETTINGS_BACKEND_EXTENSION_POINT_NAME
.
Flags used when creating a binding. These flags determine in which direction the binding works. The default is to synchronize in both directions.
The SettingsSchemaSource
and SettingsSchema
APIs provide a
mechanism for advanced control over the loading of schemas and a
mechanism for introspecting their content.
SettingsSchemaKey
is an opaque data structure and can only be accessed
using the following functions.
This is an opaque structure type. You may not access it directly.
A SimpleAction
is the obvious simple implementation of the Action
interface. This is the easiest way to create an action for purposes of
adding it to a SimpleActionGroup
.
SimpleActionGroup
is a hash table filled with Action
objects,
implementing the ActionGroup
and ActionMap
interfaces.
GSimpleIOStream creates a IOStream
from an arbitrary InputStream
and
OutputStream
. This allows any pair of input and output streams to be used
with IOStream
methods.
SimplePermission
is a trivial implementation of Permission
that
represents a permission that is either always or never allowed. The
value is given at construction and doesn’t change.
SimpleProxyResolver
is a simple ProxyResolver
implementation
that handles a single default proxy, multiple URI-scheme-specific
proxies, and a list of hosts that proxies should not be used for.
A Socket
is a low-level networking primitive. It is a more or less
direct mapping of the BSD socket API in a portable GObject based API.
It supports both the UNIX socket implementations and winsock2 on Windows.
SocketAddress
is the equivalent of struct sockaddr in the BSD
sockets API. This is an abstract class; use InetSocketAddress
for internet sockets, or UnixSocketAddress
for UNIX domain sockets.
SocketAddressEnumerator
is an enumerator type for SocketAddress
instances. It is returned by enumeration functions such as
SocketConnectableExt::enumerate()
, which returns a SocketAddressEnumerator
to list each SocketAddress
which could be used to connect to that
SocketConnectable
.
SocketClient
is a lightweight high-level utility class for connecting to
a network host using a connection oriented socket type.
Objects that describe one or more potential socket endpoints
implement SocketConnectable
. Callers can then use
SocketConnectableExt::enumerate()
to get a SocketAddressEnumerator
to try out each socket address in turn until one succeeds, as shown
in the sample code below.
SocketConnection
is a IOStream
for a connected socket. They
can be created either by SocketClient
when connecting to a host,
or by SocketListener
when accepting a new client.
A SocketListener
is an object that keeps track of a set
of server sockets and helps you accept sockets from any of the
socket, either sync or async.
A SocketService
is an object that represents a service that
is provided to the network or over local sockets. When a new
connection is made to the service the signal::SocketService::incoming
signal is emitted.
SRV (service) records are used by some network protocols to provide service-specific aliasing and load-balancing. For example, XMPP (Jabber) uses SRV records to locate the XMPP server for a domain; rather than connecting directly to “example.com” or assuming a specific server hostname like “xmpp.example.com”, an XMPP client would look up the “xmpp-client” SRV record for “example.com”, and then connect to whatever host was pointed to by that record.
Subprocess
allows the creation of and interaction with child
processes.
Flags to define the behaviour of a Subprocess
.
This class contains a set of options for launching child processes, such as where its standard input and output will be directed, the argument list, the environment, and more.
Task
provides idiomatic access to gio’s GTask
API, for
instance by being generic over their value type, while not completely departing
from the underlying C API. Task
is Send
and Sync
and requires its value to
also be Send
and Sync
, thus is useful to to implement gio style asynchronous
tasks that run in threads. If you need to only run tasks in glib main loop
see the LocalTask
type.
This is the subclass of SocketConnection
that is created
for TCP/IP sockets.
ThemedIcon
is an implementation of Icon
that supports icon themes.
ThemedIcon
contains a list of all of the icons present in an icon
theme, so that icons can be looked up quickly. ThemedIcon
does
not provide actual pixmaps for icons, just the icon names.
Ideally something like gtk_icon_theme_choose_icon()
should be used to
resolve the list of names so that fallback icons work nicely with
themes that inherit other themes.
A ThreadedSocketService
is a simple subclass of SocketService
that handles incoming connections by creating a worker thread and
dispatching the connection to it by emitting the
signal::ThreadedSocketService::run
signal in the new thread.
TLS (Transport Layer Security, aka SSL) and DTLS backend.
A certificate used for TLS authentication and encryption.
This can represent either a certificate only (eg, the certificate
received by a client from a server), or the combination of
a certificate and a private key (which is needed when acting as a
TlsServerConnection
).
A set of flags describing TLS certification validation. This can be
used to describe why a particular certificate was rejected (for
example, in signal::TlsConnection::accept-certificate
).
TlsClientConnection
is the client-side subclass of
TlsConnection
, representing a client-side TLS connection.
TlsConnection
is the base TLS connection class type, which wraps
a IOStream
and provides TLS encryption on top of it. Its
subclasses, TlsClientConnection
and TlsServerConnection
,
implement client-side and server-side TLS, respectively.
TlsDatabase
is used to look up certificates and other information
from a certificate or key store. It is an abstract base class which
TLS library specific subtypes override.
TlsFileDatabase
is implemented by TlsDatabase
objects which load
their certificate information from a file. It is an interface which
TLS library specific subtypes implement.
TlsInteraction
provides a mechanism for the TLS connection and database
code to interact with the user. It can be used to ask the user for passwords.
Holds a password used in TLS.
Various flags for the password.
TlsServerConnection
is the server-side subclass of TlsConnection
,
representing a server-side TLS connection.
A UnixFDList
contains a list of file descriptors. It owns the file
descriptors that it contains, closing them when finalized.
UnixInputStream
implements InputStream
for reading from a UNIX
file descriptor, including asynchronous operations. (If the file
descriptor refers to a socket or pipe, this will use poll()
to do
asynchronous I/O. If it refers to a regular file, it will fall back
to doing asynchronous I/O in another thread.)
Defines a Unix mount entry (e.g. <filename>
/media/cdrom</filename>
).
This corresponds roughly to a mtab entry.
Defines a Unix mount point (e.g. <filename>
/dev</filename>
).
This corresponds roughly to a fstab entry.
UnixOutputStream
implements OutputStream
for writing to a UNIX
file descriptor, including asynchronous operations. (If the file
descriptor refers to a socket or pipe, this will use poll()
to do
asynchronous I/O. If it refers to a regular file, it will fall back
to doing asynchronous I/O in another thread.)
Support for UNIX-domain (also known as local) sockets.
Entry point for using GIO functionality.
VolumeMonitor
is for listing the user interesting devices and volumes
on the computer. In other words, what a file selector or file manager
would show in a sidebar.
ZlibCompressor
is an implementation of Converter
that
compresses data using zlib.
ZlibDecompressor
is an implementation of Converter
that
decompresses data compressed with zlib.
Enums
An enumeration for well-known message buses.
Results returned from ConverterExtManual::convert()
.
Enumeration describing different kinds of native credential types.
Enumeration used to describe the byte order of a D-Bus message.
Header fields used in DBusMessage
.
Message types used in DBusMessage
.
DataStreamByteOrder
is used to ensure proper endianness of streaming data sources
across various machine architectures.
DataStreamNewlineType
is used when checking for or setting the line endings for a given file.
Enumeration describing how a drive can be started/stopped.
GEmblemOrigin is used to add information about the origin of the emblem
to Emblem
.
Used by FileExt::set_attributes_from_info()
when setting file attributes.
The data types for file attributes.
Specifies what type of event a monitor event is.
Indicates the file’s on-disk type.
Error codes returned by GIO functions.
Memory availability warning levels.
MountOperationResult
is returned as a result when a request for
information is send by the mounting operation.
The host’s network connectivity state, as reported by NetworkMonitor
.
Priority levels for GNotifications
.
PasswordSave
is used to indicate the lifespan of a saved password.
An error code used with G_RESOLVER_ERROR
in a glib::Error
returned
from a Resolver
routine.
The type of record that ResolverExt::lookup_records()
or
ResolverExt::lookup_records_async()
should retrieve. The records are returned
as lists of glib::Variant
tuples. Each record type has different values in
the variant tuples returned.
An error code used with G_RESOURCE_ERROR
in a glib::Error
returned
from a Resource
routine.
Describes an event occurring on a SocketClient
. See the
signal::SocketClient::event
signal for more details.
The protocol family of a SocketAddress
. (These values are
identical to the system defines AF_INET
, AF_INET6
and AF_UNIX
,
if available.)
Describes an event occurring on a SocketListener
. See the
signal::SocketListener::event
signal for more details.
A protocol identifier is specified when creating a Socket
, which is a
family/type specific identifier, where 0 means the default protocol for
the particular family/type.
Flags used when creating a Socket
. Some protocols may not implement
all the socket types.
The client authentication mode for a TlsServerConnection
.
The type of TLS channel binding data to retrieve from TlsConnection
or GDtlsConnection
, as documented by RFC 5929. The
tls-unique-for-telnet
binding type is not currently implemented.
An error code used with G_TLS_ERROR
in a glib::Error
returned from a
TLS-related routine.
TlsInteractionResult
is returned by various functions in TlsInteraction
when finishing an interaction request.
v2_70
The TLS or DTLS protocol version used by a TlsConnection
or
GDtlsConnection
. The integer values of these versions are sequential
to ensure newer known protocol versions compare greater than older
known versions. Any known DTLS protocol version will compare greater
than any SSL or TLS protocol version. The protocol version may be
Unknown
if the TLS backend supports a newer
protocol version that GLib does not yet know about. This means that
it’s possible for an unknown DTLS protocol version to compare less
than the TLS protocol versions.
When to allow rehandshaking. See
TlsConnectionExt::set_rehandshake_mode()
.
The type of name used by a UnixSocketAddress
.
Path
indicates a traditional unix domain
socket bound to a filesystem path. Anonymous
indicates a socket not bound to any name (eg, a client-side socket,
or a socket created with socketpair()
).
Used to select the type of data format to use for ZlibDecompressor
and ZlibCompressor
.
Statics
Extension point for debug control functionality. See [Extending GIO][extending-gio].
The string used to obtain a Unix device path with DriveExt::identifier()
.
A key in the “access” namespace for checking deletion privileges.
A key in the “access” namespace for getting execution privileges.
A key in the “access” namespace for getting read privileges.
A key in the “access” namespace for checking renaming privileges.
A key in the “access” namespace for checking trashing privileges.
A key in the “access” namespace for getting write privileges.
A key in the “dos” namespace for checking if the file’s archive flag is set.
A key in the “dos” namespace for checking if the file is a NTFS mount point (a volume mount or a junction point).
A key in the “dos” namespace for checking if the file’s backup flag is set.
A key in the “dos” namespace for getting the file NTFS reparse tag.
A key in the “etag” namespace for getting the value of the file’s entity tag.
A key in the “filesystem” namespace for getting the number of bytes of free space left on the file system.
A key in the “filesystem” namespace for checking if the file system is read only.
A key in the “filesystem” namespace for checking if the file system is remote.
A key in the “filesystem” namespace for getting the total size (in
bytes) of the file system, used in FileExt::query_filesystem_info()
.
A key in the “filesystem” namespace for getting the file system’s type.
A key in the “filesystem” namespace for getting the number of bytes used by data on the file system.
A key in the “filesystem” namespace for hinting a file manager application whether it should preview (e.g. thumbnail) files on the file system.
A key in the “gvfs” namespace that gets the name of the current GVFS backend in use.
A key in the “id” namespace for getting a file identifier.
A key in the “id” namespace for getting the file system identifier.
A key in the “mountable” namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be ejected.
A key in the “mountable” namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is mountable.
A key in the “mountable” namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be polled.
A key in the “mountable” namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be started.
A key in the “mountable” namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be started degraded.
A key in the “mountable” namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be stopped.
A key in the “mountable” namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is unmountable.
A key in the “mountable” namespace for getting the HAL UDI for the mountable file.
A key in the “mountable” namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is automatically polled for media.
A key in the “mountable” namespace for getting the DriveStartStopType
.
A key in the “mountable” namespace for getting the unix device.
A key in the “mountable” namespace for getting the unix device file.
A key in the “owner” namespace for getting the file owner’s group.
A key in the “owner” namespace for getting the user name of the file’s owner.
A key in the “owner” namespace for getting the real name of the user that owns the file.
A key in the “preview” namespace for getting a Icon
that can be
used to get preview of the file.
A key in the “recent” namespace for getting time, when the metadata for the
file in recent:///
was last changed.
A key in the “selinux” namespace for getting the file’s SELinux context.
A key in the “standard” namespace for getting the amount of disk space that is consumed by the file (in bytes).
A key in the “standard” namespace for getting the content type of the file.
A key in the “standard” namespace for getting the copy name of the file.
A key in the “standard” namespace for getting the description of the file.
A key in the “standard” namespace for getting the display name of the file.
A key in the “standard” namespace for edit name of the file.
A key in the “standard” namespace for getting the fast content type.
A key in the “standard” namespace for getting the icon for the file.
A key in the “standard” namespace for checking if a file is a backup file.
A key in the “standard” namespace for checking if a file is hidden.
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.
A key in the “standard” namespace for checking if a file is virtual.
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 FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET
for the persistent URI.
A key in the “standard” namespace for getting the name of the file.
A key in the “standard” namespace for getting the file’s size (in bytes).
A key in the “standard” namespace for setting the sort order of a file.
A key in the “standard” namespace for getting the symbolic icon for the file.
A key in the “standard” namespace for getting the symlink target, if the file is a symlink.
A key in the “standard” namespace for getting the target URI for the file, in
the case of FileType::Shortcut
or FileType::Mountable
files.
A key in the “standard” namespace for storing file types.
A key in the “thumbnail” namespace for checking if thumbnailing failed.
A key in the “thumbnail” namespace for checking whether the thumbnail is outdated.
A key in the “thumbnail” namespace for getting the path to the thumbnail image.
A key in the “time” namespace for getting the time the file was last accessed.
A key in the “time” namespace for getting the microseconds of the time the file was last accessed.
A key in the “time” namespace for getting the time the file was last changed.
A key in the “time” namespace for getting the microseconds of the time the file was last changed.
A key in the “time” namespace for getting the time the file was created.
A key in the “time” namespace for getting the microseconds of the time the file was created.
A key in the “time” namespace for getting the time the file was last modified.
A key in the “time” namespace for getting the microseconds of the time the file was last modified.
A key in the “trash” namespace for getting the deletion date and time
of a file inside the trash:///
folder.
A key in the “trash” namespace for getting the number of (toplevel) items
that are present in the trash:///
folder.
A key in the “trash” namespace for getting the original path of a file
inside the trash:///
folder before it was trashed.
A key in the “unix” namespace for getting the number of blocks allocated for the file.
A key in the “unix” namespace for getting the block size for the file system.
A key in the “unix” namespace for getting the device id of the device the
file is located on (see stat()
documentation).
A key in the “unix” namespace for getting the group ID for the file.
A key in the “unix” namespace for getting the inode of the file.
A key in the “unix” namespace for checking if the file represents a UNIX mount point.
A key in the “unix” namespace for getting the mode of the file (e.g. whether the file is a regular file, symlink, etc).
A key in the “unix” namespace for getting the number of hard links for a file.
A key in the “unix” namespace for getting the device ID for the file (if it is a special file).
A key in the “unix” namespace for getting the user ID for the file.
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.
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 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.
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.
The name of the link that associates a menu item with a submenu.
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 SettingsBackend
functionality.
Extension point for TLS functionality via TlsBackend
.
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 Vfs
functionality.
See [Extending GIO][extending-gio].
The string used to obtain the volume class with VolumeExt::identifier()
.
The string used to obtain a Hal UDI with VolumeExt::identifier()
.
The string used to obtain a filesystem label with VolumeExt::identifier()
.
The string used to obtain a NFS mount with VolumeExt::identifier()
.
The string used to obtain a Unix device path with VolumeExt::identifier()
.
The string used to obtain a UUID with VolumeExt::identifier()
.
Extension point for volume monitor functionality. See [Extending GIO][extending-gio].
Functions
Asynchronously connects to the message bus specified by bus_type
.
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.
Starts acquiring name
on the bus specified by bus_type
and calls
name_acquired_handler
and name_lost_handler
when the name is
acquired respectively lost. Callbacks will be invoked in the
[thread-default main context][g-main-context-push-thread-default]
of the thread you are calling this function from.
Like g_bus_own_name()
but takes a DBusConnection
instead of a
BusType
.
Starts watching name
on the bus specified by bus_type
and calls
name_appeared_handler
and name_vanished_handler
when the name is
known to have an owner respectively known to lose its
owner. Callbacks will be invoked in the
[thread-default main context][g-main-context-push-thread-default]
of the thread you are calling this function from.
Like g_bus_watch_name()
but takes a DBusConnection
instead of a
BusType
.
Call from build script to run glib-compile-resources
to generate compiled gresources to embed
in binary with resources_register_include. target
is relative to OUT_DIR
.
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).
Compares two content types for equality.
Tries to find a content type based on the mime type name.
Gets the human readable description of the content type.
Gets the generic icon name for a content type.
Gets the icon for a content type.
Get the list of directories which MIME data is loaded from. See
content_type_set_mime_dirs()
for details.
Gets the mime type for the content type, if one is registered.
Gets the symbolic icon for a content type.
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.
Determines if type_
is a subset of supertype
.
Determines if type_
is a subset of mime_type
.
Convenience wrapper around content_type_is_a()
.
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.
Set the list of directories used by GIO to load the MIME database.
If dirs
is None
, the directories used are the default:
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.
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.
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.
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.
This is a language binding friendly version of g_dbus_escape_object_path_bytestring()
.
Generate a D-Bus GUID that can be used with
e.g. DBusConnection::new()
.
Converts a glib::Value
to a glib::Variant
of the type indicated by the type_
parameter.
Converts a glib::Variant
to a glib::Value
. If value
is floating, it is consumed.
Checks if string
is a
D-Bus address.
v2_70
Check whether string
is a valid D-Bus error name.
Checks if string
is a D-Bus GUID.
Checks if string
is a valid D-Bus interface name.
Checks if string
is a valid D-Bus member (e.g. signal or method) name.
Checks if string
is a valid D-Bus bus name (either unique or well-known).
Like 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.
Checks if string
is a valid D-Bus unique bus name.
Converts errno.h error codes into GIO error codes. The fallback
value IOErrorEnum::Failed
is returned for error codes not currently
handled (but note that future GLib releases may return a more
specific value instead).
Scans all the modules in the specified directory, ensuring that any extension point implemented by a module is registered.
Creates a keyfile-backed SettingsBackend
.
Creates a memory-backed SettingsBackend
.
Creates a readonly SettingsBackend
.
Returns all the names of children at the specified path
in the set of
globally registered resources.
The return result is a None
terminated list of strings which should
be released with g_strfreev()
.
Looks for a file at the specified path
in the set of
globally registered resources and if found returns information about it.
Looks for a file at the specified path
in the set of
globally registered resources and returns a glib::Bytes
that
lets you directly access the data in memory.
Looks for a file at the specified path
in the set of
globally registered resources and returns a InputStream
that lets you read the data.
Registers the resource with the process-global set of resources.
Once a resource is registered the files in it can be accessed
with the global resource lookup functions like resources_lookup_data()
.
Unregisters the resource from the process-global set of resources.
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.
v2_56
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.
v2_56
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.