Expand description
Rust GIO bindings
Rust bindings and wrappers for GIO, part of gtk-rs-core.
GIO 2.56 is the lowest supported version for the underlying library.
Minimum supported Rust version
Currently, the minimum supported Rust version is 1.70.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:
# This will not compile
[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
- Traits and essential types intended for blanket imports.
Macros
- Include gresources generated with
glib_build_tools::compile_resources
and register with glib.path
is relative toOUTDIR
.
Structs
Action
represents a single named action.- This struct defines a single action. It is for use with
ActionMapExtManual::add_action_entries()
. 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 aMenuModel
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 namedAction
instances, such asSimpleActionGroup
. AppInfo
andAppLaunchContext
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 (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 asGtkApplication
orMxApplication
. 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 byApplication
and emitted in thecommand-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.
- A future which can be cancelled via
Cancellable
. - Indicator that the
CancellableFuture
was cancelled. CharsetConverter
is an implementation ofConverter
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 theActionGroup
interface that can be used as a proxy for an action group that is exported over D-Bus withDBusConnection::export_action_group()
.- Information about an argument for a method or a signal.
- The
DBusAuthObserver
type provides a mechanism for participating in how aDBusServer
(or aDBusConnection
) authenticates remote peers. Simply instantiate aDBusAuthObserver
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 aIOStream
. - Flags used when creating a new
DBusConnection
. - The
DBusInterface
type is the base type for D-Bus interfaces both on the service side (seeDBusInterfaceSkeleton
) and client side (seeDBusProxy
). - 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 ofMenuModel
that can be used as a proxy for a menu model that is exported over D-Bus withDBusConnection::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 (seeGDBusObjectSkeleton
) and the client side (seeGDBusObjectProxy
). It is essentially just a container of interfaces. - The
DBusObjectManager
type is the base type for service- and client-side implementations of the standardized org.freedesktop.DBus.ObjectManager interface. - Flags used when constructing a
GDBusObjectManagerClient
. - 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 aDBusConnection
. 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. - A
DatagramBased
is a networking interface for representing datagram-based communications. It is a more or less direct mapping of the core parts of the BSD socket API in a portable GObject interface. It is implemented bySocket
, which wraps the UNIX socket API on UNIX and winsock2 on Windows. - DebugController
v2_72
DebugController
is an interface to expose control of debugging features and debug output. - DebugControllerDBus
v2_72
DebugControllerDBus
is an implementation ofDebugController
which exposes debug settings as a D-Bus object. - DesktopAppInfoNon-Windows and non-macOS
DesktopAppInfo
is an implementation ofAppInfo
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 ofIcon
that supports having an emblem, which is an icon with additional properties. It can than be added to aEmblemedIcon
.EmblemedIcon
is an implementation ofIcon
that supports adding an emblem to an icon. Adding multiple emblems to an icon is ensured viaEmblemedIconExt::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 thatFile
objects do not represent files, merely an identifier for a file. All file content I/O is implemented as streaming operations (seeInputStream
andOutputStream
).- 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.
FileDescriptorBased
is implemented by streams (implementations ofInputStream
orOutputStream
) that are based on file descriptors.FileEnumerator
allows you to operate on a set ofGFiles
, returning aFileInfo
structure for each file enumerated (e.g.FileExt::enumerate_children()
will return aFileEnumerator
for each of the children within a directory).- A
Stream
used to enumerate files in directories. - GFileIOStream provides io streams that both read and write to the same file handle.
FileIcon
specifies an icon by pointing to an image file to be used as icon.- 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. UseResolverExt::lookup_by_name()
orResolverExt::lookup_by_name_async()
to look up theInetAddress
for a hostname. UseResolverExt::lookup_by_address()
orResolverExt::lookup_by_address_async()
to look up the hostname for aInetAddress
.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 viaInitableExt::init()
orAsyncInitableExt::init_async()
(the latter is only available if it also implementsAsyncInitable
).- Structure used for scatter/gather data input when receiving multiple messages or packets in one go. You generally pass in an array of empty
GInputVectors
and the operation will use all the buffers as if they were one buffer, and will setbytes_received
to the total number of bytes received across allGInputVectors
. InputStream
has functions to read from a stream (InputStreamExtManual::read()
), to close a stream (InputStreamExt::close()
) and to skip some content (InputStreamExt::skip()
).- A handle to a task running on the I/O thread pool.
ListModel
is an interface that represents a mutable list ofGObjects
. 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’sGTask
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 beSend
andSync
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 theTask
type.MemoryInputStream
is a class for using arbitrary memory chunks as input for GIO streaming input operations.- MemoryMonitor
v2_64
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.MenuItem
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.- Structure used for scatter/gather data output when sending multiple messages or packets in one go. You generally pass in an array of
GOutputVectors
and the operation will use all the buffers as if they were one buffer. 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 byGInputStreams
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 byGOutputStreams
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
v2_70
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 aAction
with a state value reflecting and controlling the value of aglib::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 functionIOExtensionPoint::extension_by_name()
. - Support for proxied
InetSocketAddress
. ProxyResolver
provides synchronous and asynchronous network proxy resolution.ProxyResolver
is used withinSocketClient
through the methodSocketConnectableExt::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 ofInputStream
orOutputStream
) 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 forSettings
, you need to implement theSettingsBackend
interface and then make it implement the extension pointSETTINGS_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
andSettingsSchema
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 theAction
interface. This is the easiest way to create an action for purposes of adding it to aSimpleActionGroup
. SimpleActionGroup
is a hash table filled withAction
objects, implementing theActionGroup
andActionMap
interfaces.- GSimpleIOStream creates a
IOStream
from an arbitraryInputStream
andOutputStream
. This allows any pair of input and output streams to be used withIOStream
methods. SimplePermission
is a trivial implementation ofPermission
that represents a permission that is either always or never allowed. The value is given at construction and doesn’t change.SimpleProxyResolver
is a simpleProxyResolver
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; useInetSocketAddress
for internet sockets, orUnixSocketAddress
for UNIX domain sockets.SocketAddressEnumerator
is an enumerator type forSocketAddress
instances. It is returned by enumeration functions such asSocketConnectableExt::enumerate()
, which returns aSocketAddressEnumerator
to list eachSocketAddress
which could be used to connect to thatSocketConnectable
.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 useSocketConnectableExt::enumerate()
to get aSocketAddressEnumerator
to try out each socket address in turn until one succeeds, as shown in the sample code below. SocketConnection
is aIOStream
for a connected socket. They can be created either bySocketClient
when connecting to a host, or bySocketListener
when accepting a new client.- A
SocketControlMessage
is a special-purpose utility message that can be sent to or received from aSocket
. These types of messages are often called “ancillary data”. - 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 theincoming
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’sGTask
API, for instance by being generic over their value type, while not completely departing from the underlying C API.Task
isSend
andSync
and requires its value to also beSend
andSync
, 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 theLocalTask
type.- This is the subclass of
SocketConnection
that is created for TCP/IP sockets. ThemedIcon
is an implementation ofIcon
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 likegtk_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 ofSocketService
that handles incoming connections by creating a worker thread and dispatching the connection to it by emitting therun
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
accept-certificate
). TlsClientConnection
is the client-side subclass ofTlsConnection
, representing a client-side TLS connection.TlsConnection
is the base TLS connection class type, which wraps aIOStream
and provides TLS encryption on top of it. Its subclasses,TlsClientConnection
andTlsServerConnection
, 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.- Flags for
TlsDatabaseExt::verify_chain()
. TlsFileDatabase
is implemented byTlsDatabase
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 ofTlsConnection
, representing a server-side TLS connection.- This
SocketControlMessage
contains aCredentials
instance. It may be sent usingSocketExtManual::send_message()
and received usingSocketExtManual::receive_message()
over UNIX sockets (ie: sockets in theSocketFamily::Unix
family). - UnixFDListUnixA
UnixFDList
contains a list of file descriptors. It owns the file descriptors that it contains, closing them when finalized. - UnixFDMessageUnixThis
SocketControlMessage
contains aUnixFDList
. It may be sent usingSocketExtManual::send_message()
and received usingSocketExtManual::receive_message()
over UNIX sockets (ie: sockets in theSocketFamily::Unix
family). The file descriptors are copied between processes by the kernel. - UnixInputStreamUnix
UnixInputStream
implementsInputStream
for reading from a UNIX file descriptor, including asynchronous operations. (If the file descriptor refers to a socket or pipe, this will usepoll()
to do asynchronous I/O. If it refers to a regular file, it will fall back to doing asynchronous I/O in another thread.) - UnixMountEntryUnixDefines a Unix mount entry (e.g.
<filename>
/media/cdrom</filename>
). This corresponds roughly to a mtab entry. - UnixMountPointUnixDefines a Unix mount point (e.g.
<filename>
/dev</filename>
). This corresponds roughly to a fstab entry. - UnixOutputStreamUnix
UnixOutputStream
implementsOutputStream
for writing to a UNIX file descriptor, including asynchronous operations. (If the file descriptor refers to a socket or pipe, this will usepoll()
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 ofConverter
that compresses data using zlib.ZlibDecompressor
is an implementation ofConverter
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.- PollableReturn
v2_60
Return value for various IO operations that signal errors via the return value and not necessarily via aglib::Error
. - The type of record that
ResolverExt::lookup_records()
orResolverExt::lookup_records_async()
should retrieve. The records are returned as lists ofglib::Variant
tuples. Each record type has different values in the variant tuples returned. - Describes an event occurring on a
SocketClient
. See theevent
signal for more details. - The protocol family of a
SocketAddress
. (These values are identical to the system definesAF_INET
,AF_INET6
andAF_UNIX
, if available.) - Describes an event occurring on a
SocketListener
. See theevent
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
orGDtlsConnection
, as documented by RFC 5929 or RFC 9266. Thetls-unique-for-telnet
binding type is not currently implemented. - An error code used with
G_TLS_ERROR
in aglib::Error
returned from a TLS-related routine. TlsInteractionResult
is returned by various functions inTlsInteraction
when finishing an interaction request.- TlsProtocolVersion
v2_70
The TLS or DTLS protocol version used by aTlsConnection
orGDtlsConnection
. 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 beUnknown
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. - TlsRehandshakeModeDeprecatedWhen 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 withsocketpair()
). - Used to select the type of data format to use for
ZlibDecompressor
andZlibCompressor
.
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
orFileType::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 if thumbnailing failed for the large image.
- A key in the “thumbnail” namespace for checking if thumbnailing failed for the normal image.
- A key in the “thumbnail” namespace for checking if thumbnailing failed for the x-large image.
- A key in the “thumbnail” namespace for checking if thumbnailing failed for the xx-large image.
- A key in the “thumbnail” namespace for checking whether the thumbnail is outdated.
- A key in the “thumbnail” namespace for checking whether the large thumbnail is outdated.
- A key in the “thumbnail” namespace for checking whether the normal thumbnail is outdated.
- A key in the “thumbnail” namespace for checking whether the x-large thumbnail is outdated.
- A key in the “thumbnail” namespace for checking whether the xx-large thumbnail is outdated.
- A key in the “thumbnail” namespace for getting the path to the thumbnail image with the biggest size available.
- A key in the “thumbnail” namespace for getting the path to the large thumbnail image.
- A key in the “thumbnail” namespace for getting the path to the normal thumbnail image.
- A key in the “thumbnail” namespace for getting the path to the x-large thumbnail image.
- A key in the “thumbnail” namespace for getting the path to the xx-large 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 nanoseconds of the time the file was last accessed. This should be used in conjunction with
FILE_ATTRIBUTE_TIME_ACCESS
. CorrespondingFileAttributeType
isFileAttributeType::Uint32
. - 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 nanoseconds of the time the file was last changed. This should be used in conjunction with
FILE_ATTRIBUTE_TIME_CHANGED
. CorrespondingFileAttributeType
isFileAttributeType::Uint32
. - 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 nanoseconds of the time the file was created. This should be used in conjunction with
FILE_ATTRIBUTE_TIME_CREATED
. CorrespondingFileAttributeType
isFileAttributeType::Uint32
. - 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 nanoseconds of the time the file was last modified. This should be used in conjunction with
FILE_ATTRIBUTE_TIME_MODIFIED
. CorrespondingFileAttributeType
isFileAttributeType::Uint32
. - 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()
. - VOLUME_IDENTIFIER_KIND_HAL_UDIDeprecatedThe 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 samebus_type
, they will share the same object. - Starts acquiring
name
on the bus specified bybus_type
and callsname_acquired_handler
andname_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. - Starts watching
name
on the bus specified bybus_type
and callsname_appeared_handler
andname_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. - 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 ofsupertype
. - 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
isNone
, 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()
. - Checks if
string
is a D-Bus address. - 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 instring
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 aNone
terminated list of strings which should be released withg_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 aglib::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 aInputStream
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.
- Runs a blocking I/O task on the I/O thread pool.
- 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. - 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. - 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.