Enums

Details

class Gio.BusType(value)

Bases: GObject.GEnum

An enumeration for well-known message buses.

New in version 2.26.

STARTER = -1

An alias for the message bus that activated the process, if any.

NONE = 0

Not a message bus.

SYSTEM = 1

The system-wide message bus.

SESSION = 2

The login session message bus.

class Gio.ConverterResult(value)

Bases: GObject.GEnum

Results returned from Gio.Converter.convert().

New in version 2.24.

ERROR = 0

There was an error during conversion.

CONVERTED = 1

Some data was consumed or produced

FINISHED = 2

The conversion is finished

FLUSHED = 3

Flushing is finished

class Gio.CredentialsType(value)

Bases: GObject.GEnum

Enumeration describing different kinds of native credential types.

New in version 2.26.

INVALID = 0

Indicates an invalid native credential type.

LINUX_UCRED = 1

The native credentials type is a struct ucred.

FREEBSD_CMSGCRED = 2

The native credentials type is a struct cmsgcred.

OPENBSD_SOCKPEERCRED = 3

The native credentials type is a struct sockpeercred. Added in 2.30.

SOLARIS_UCRED = 4

The native credentials type is a ucred_t. Added in 2.40.

NETBSD_UNPCBID = 5

The native credentials type is a struct unpcbid. Added in 2.42.

APPLE_XUCRED = 6

The native credentials type is a struct xucred. Added in 2.66.

WIN32_PID = 7

The native credentials type is a PID DWORD. Added in 2.72.

class Gio.DBusError(value)

Bases: GObject.GEnum

Error codes for the %G_DBUS_ERROR error domain.

New in version 2.26.

classmethod encode_gerror(error)[source]
Parameters:

error (GLib.Error) – A GLib.Error.

Returns:

A D-Bus error name (never None). Free with GLib.free().

Return type:

str

Creates a D-Bus error name to use for error. If error matches a registered error (cf. Gio.DBusError.register_error()), the corresponding D-Bus error name will be returned.

Otherwise the a name of the form org.gtk.GDBus.UnmappedGError.Quark._ESCAPED_QUARK_NAME.Code_ERROR_CODE will be used. This allows other GDBus applications to map the error on the wire back to a GLib.Error using Gio.DBusError.new_for_dbus_error().

This function is typically only used in object mappings to put a GLib.Error on the wire. Regular applications should not use it.

New in version 2.26.

classmethod get_remote_error(error)[source]
Parameters:

error (GLib.Error) – a GLib.Error

Returns:

an allocated string or None if the D-Bus error name could not be found. Free with GLib.free().

Return type:

str or None

Gets the D-Bus error name used for error, if any.

This function is guaranteed to return a D-Bus error name for all GLib.Errors returned from functions handling remote method calls (e.g. Gio.DBusConnection.call_finish()) unless Gio.DBusError.strip_remote_error() has been used on error.

New in version 2.26.

classmethod is_remote_error(error)[source]
Parameters:

error (GLib.Error) – A GLib.Error.

Returns:

True if error represents an error from a remote peer, False otherwise.

Return type:

bool

Checks if error represents an error received via D-Bus from a remote peer. If so, use Gio.DBusError.get_remote_error() to get the name of the error.

New in version 2.26.

classmethod new_for_dbus_error(dbus_error_name, dbus_error_message)[source]
Parameters:
  • dbus_error_name (str) – D-Bus error name.

  • dbus_error_message (str) – D-Bus error message.

Returns:

An allocated GLib.Error. Free with GLib.Error.free().

Return type:

GLib.Error

Creates a GLib.Error based on the contents of dbus_error_name and dbus_error_message.

Errors registered with Gio.DBusError.register_error() will be looked up using dbus_error_name and if a match is found, the error domain and code is used. Applications can use Gio.DBusError.get_remote_error() to recover dbus_error_name.

If a match against a registered error is not found and the D-Bus error name is in a form as returned by Gio.DBusError.encode_gerror() the error domain and code encoded in the name is used to create the GLib.Error. Also, dbus_error_name is added to the error message such that it can be recovered with Gio.DBusError.get_remote_error().

Otherwise, a GLib.Error with the error code Gio.IOErrorEnum.DBUS_ERROR in the %G_IO_ERROR error domain is returned. Also, dbus_error_name is added to the error message such that it can be recovered with Gio.DBusError.get_remote_error().

In all three cases, dbus_error_name can always be recovered from the returned GLib.Error using the Gio.DBusError.get_remote_error() function (unless Gio.DBusError.strip_remote_error() hasn’t been used on the returned error).

This function is typically only used in object mappings to prepare GLib.Error instances for applications. Regular applications should not use it.

New in version 2.26.

classmethod quark()[source]
Return type:

int

classmethod register_error(error_domain, error_code, dbus_error_name)[source]
Parameters:
  • error_domain (int) – A #GQuark for an error domain.

  • error_code (int) – An error code.

  • dbus_error_name (str) – A D-Bus error name.

Returns:

True if the association was created, False if it already exists.

Return type:

bool

Creates an association to map between dbus_error_name and GLib.Errors specified by error_domain and error_code.

This is typically done in the routine that returns the #GQuark for an error domain.

New in version 2.26.

classmethod register_error_domain(error_domain_quark_name, quark_volatile, entries)[source]
Parameters:
  • error_domain_quark_name (str) – The error domain name.

  • quark_volatile (int) – A pointer where to store the #GQuark.

  • entries ([Gio.DBusErrorEntry]) – A pointer to num_entries Gio.DBusErrorEntry struct items.

Helper function for associating a GLib.Error error domain with D-Bus error names.

While quark_volatile has a volatile qualifier, this is a historical artifact and the argument passed to it should not be volatile.

New in version 2.26.

classmethod strip_remote_error(error)[source]
Parameters:

error (GLib.Error) – A GLib.Error.

Returns:

True if information was stripped, False otherwise.

Return type:

bool

Looks for extra information in the error message used to recover the D-Bus error name and strips it if found. If stripped, the message field in error will correspond exactly to what was received on the wire.

This is typically used when presenting errors to the end user.

New in version 2.26.

classmethod unregister_error(error_domain, error_code, dbus_error_name)[source]
Parameters:
  • error_domain (int) – A #GQuark for an error domain.

  • error_code (int) – An error code.

  • dbus_error_name (str) – A D-Bus error name.

Returns:

True if the association was destroyed, False if it wasn’t found.

Return type:

bool

Destroys an association previously set up with Gio.DBusError.register_error().

New in version 2.26.

FAILED = 0

A generic error; “something went wrong” - see the error message for more.

NO_MEMORY = 1

There was not enough memory to complete an operation.

AUTH_FAILED = 10

Authentication didn’t work.

NO_SERVER = 11

Unable to connect to server (probably caused by ECONNREFUSED on a socket).

TIMEOUT = 12

Certain timeout errors, possibly ETIMEDOUT on a socket. Note that Gio.DBusError.NO_REPLY is used for message reply timeouts. Warning: this is confusingly-named given that Gio.DBusError.TIMED_OUT also exists. We can’t fix it for compatibility reasons so just be careful.

NO_NETWORK = 13

No network access (probably ENETUNREACH on a socket).

ADDRESS_IN_USE = 14

Can’t bind a socket since its address is in use (i.e. EADDRINUSE).

DISCONNECTED = 15

The connection is disconnected and you’re trying to use it.

INVALID_ARGS = 16

Invalid arguments passed to a method call.

FILE_NOT_FOUND = 17

Missing file.

FILE_EXISTS = 18

Existing file and the operation you’re using does not silently overwrite.

UNKNOWN_METHOD = 19

Method name you invoked isn’t known by the object you invoked it on.

SERVICE_UNKNOWN = 2

The bus doesn’t know how to launch a service to supply the bus name you wanted.

TIMED_OUT = 20

Certain timeout errors, e.g. while starting a service. Warning: this is confusingly-named given that Gio.DBusError.TIMEOUT also exists. We can’t fix it for compatibility reasons so just be careful.

MATCH_RULE_NOT_FOUND = 21

Tried to remove or modify a match rule that didn’t exist.

MATCH_RULE_INVALID = 22

The match rule isn’t syntactically valid.

SPAWN_EXEC_FAILED = 23

While starting a new process, the exec() call failed.

SPAWN_FORK_FAILED = 24

While starting a new process, the fork() call failed.

SPAWN_CHILD_EXITED = 25

While starting a new process, the child exited with a status code.

SPAWN_CHILD_SIGNALED = 26

While starting a new process, the child exited on a signal.

SPAWN_FAILED = 27

While starting a new process, something went wrong.

SPAWN_SETUP_FAILED = 28

We failed to setup the environment correctly.

SPAWN_CONFIG_INVALID = 29

We failed to setup the config parser correctly.

NAME_HAS_NO_OWNER = 3

The bus name you referenced doesn’t exist (i.e. no application owns it).

SPAWN_SERVICE_INVALID = 30

Bus name was not valid.

SPAWN_SERVICE_NOT_FOUND = 31

Service file not found in system-services directory.

SPAWN_PERMISSIONS_INVALID = 32

Permissions are incorrect on the setuid helper.

SPAWN_FILE_INVALID = 33

Service file invalid (Name, User or Exec missing).

SPAWN_NO_MEMORY = 34

Tried to get a UNIX process ID and it wasn’t available.

UNIX_PROCESS_ID_UNKNOWN = 35

Tried to get a UNIX process ID and it wasn’t available.

INVALID_SIGNATURE = 36

A type signature is not valid.

INVALID_FILE_CONTENT = 37

A file contains invalid syntax or is otherwise broken.

SELINUX_SECURITY_CONTEXT_UNKNOWN = 38

Asked for SELinux security context and it wasn’t available.

ADT_AUDIT_DATA_UNKNOWN = 39

Asked for ADT audit data and it wasn’t available.

NO_REPLY = 4

No reply to a message expecting one, usually means a timeout occurred.

OBJECT_PATH_IN_USE = 40

There’s already an object with the requested object path.

UNKNOWN_OBJECT = 41

Object you invoked a method on isn’t known.

New in version 2.42.

UNKNOWN_INTERFACE = 42

Interface you invoked a method on isn’t known by the object.

New in version 2.42.

UNKNOWN_PROPERTY = 43

Property you tried to access isn’t known by the object.

New in version 2.42.

PROPERTY_READ_ONLY = 44

Property you tried to set is read-only.

New in version 2.42.

IO_ERROR = 5

Something went wrong reading or writing to a socket, for example.

BAD_ADDRESS = 6

A D-Bus bus address was malformed.

NOT_SUPPORTED = 7

Requested operation isn’t supported (like ENOSYS on UNIX).

LIMITS_EXCEEDED = 8

Some limited resource is exhausted.

ACCESS_DENIED = 9

Security restrictions don’t allow doing what you’re trying to do.

class Gio.DBusMessageByteOrder(value)

Bases: GObject.GEnum

Enumeration used to describe the byte order of a D-Bus message.

New in version 2.26.

LITTLE_ENDIAN = 108

The byte order is little endian.

BIG_ENDIAN = 66

The byte order is big endian.

class Gio.DBusMessageHeaderField(value)

Bases: GObject.GEnum

Header fields used in Gio.DBusMessage.

New in version 2.26.

INVALID = 0

Not a valid header field.

PATH = 1

The object path.

INTERFACE = 2

The interface name.

MEMBER = 3

The method or signal name.

ERROR_NAME = 4

The name of the error that occurred.

REPLY_SERIAL = 5

The serial number the message is a reply to.

DESTINATION = 6

The name the message is intended for.

SENDER = 7

Unique name of the sender of the message (filled in by the bus).

SIGNATURE = 8

The signature of the message body.

NUM_UNIX_FDS = 9

The number of UNIX file descriptors that accompany the message.

class Gio.DBusMessageType(value)

Bases: GObject.GEnum

Message types used in Gio.DBusMessage.

New in version 2.26.

INVALID = 0

Message is of invalid type.

METHOD_CALL = 1

Method call.

METHOD_RETURN = 2

Method reply.

ERROR = 3

Error reply.

SIGNAL = 4

Signal emission.

class Gio.DataStreamByteOrder(value)

Bases: GObject.GEnum

Gio.DataStreamByteOrder is used to ensure proper endianness of streaming data sources across various machine architectures.

BIG_ENDIAN = 0

Selects Big Endian byte order.

LITTLE_ENDIAN = 1

Selects Little Endian byte order.

HOST_ENDIAN = 2

Selects endianness based on host machine’s architecture.

class Gio.DataStreamNewlineType(value)

Bases: GObject.GEnum

Gio.DataStreamNewlineType is used when checking for or setting the line endings for a given file.

LF = 0

Selects “LF” line endings, common on most modern UNIX platforms.

CR = 1

Selects “CR” line endings.

CR_LF = 2

Selects “CR, LF” line ending, common on Microsoft Windows.

ANY = 3

Automatically try to handle any line ending type.

class Gio.DriveStartStopType(value)

Bases: GObject.GEnum

Enumeration describing how a drive can be started/stopped.

New in version 2.22.

UNKNOWN = 0

Unknown or drive doesn’t support start/stop.

SHUTDOWN = 1

The stop method will physically shut down the drive and e.g. power down the port the drive is attached to.

NETWORK = 2

The start/stop methods are used for connecting/disconnect to the drive over the network.

MULTIDISK = 3

The start/stop methods will assemble/disassemble a virtual drive from several physical drives.

PASSWORD = 4

The start/stop methods will unlock/lock the disk (for example using the ATA SECURITY UNLOCK DEVICE command)

class Gio.EmblemOrigin(value)

Bases: GObject.GEnum

Gio.EmblemOrigin is used to add information about the origin of the emblem to Gio.Emblem.

New in version 2.18.

UNKNOWN = 0

Emblem of unknown origin

DEVICE = 1

Emblem adds device-specific information

LIVEMETADATA = 2

Emblem depicts live metadata, such as “readonly”

TAG = 3

Emblem comes from a user-defined tag, e.g. set by nautilus (in the future)

class Gio.FileAttributeStatus(value)

Bases: GObject.GEnum

Used by Gio.File.set_attributes_from_info() when setting file attributes.

UNSET = 0

Attribute value is unset (empty).

SET = 1

Attribute value is set.

ERROR_SETTING = 2

Indicates an error in setting the value.

class Gio.FileAttributeType(value)

Bases: GObject.GEnum

The data types for file attributes.

INVALID = 0

indicates an invalid or uninitialized type.

STRING = 1

a null terminated UTF8 string.

BYTE_STRING = 2

a zero terminated string of non-zero bytes.

BOOLEAN = 3

a boolean value.

UINT32 = 4

an unsigned 4-byte/32-bit integer.

INT32 = 5

a signed 4-byte/32-bit integer.

UINT64 = 6

an unsigned 8-byte/64-bit integer.

INT64 = 7

a signed 8-byte/64-bit integer.

OBJECT = 8

a GObject.Object.

STRINGV = 9

a None terminated str **.

New in version 2.22.

class Gio.FileMonitorEvent(value)

Bases: GObject.GEnum

Specifies what type of event a monitor event is.

CHANGED = 0

a file changed.

CHANGES_DONE_HINT = 1

a hint that this was probably the last change in a set of changes.

MOVED_OUT = 10

the file was moved out of the monitored directory to another location – only sent if the Gio.FileMonitorFlags.WATCH_MOVES flag is set.

New in version 2.46.

DELETED = 2

a file was deleted.

CREATED = 3

a file was created.

ATTRIBUTE_CHANGED = 4

a file attribute was changed.

PRE_UNMOUNT = 5

the file location will soon be unmounted.

UNMOUNTED = 6

the file location was unmounted.

MOVED = 7

the file was moved – only sent if the (deprecated) Gio.FileMonitorFlags.SEND_MOVED flag is set

RENAMED = 8

the file was renamed within the current directory – only sent if the Gio.FileMonitorFlags.WATCH_MOVES flag is set.

New in version 2.46.

MOVED_IN = 9

the file was moved into the monitored directory from another location – only sent if the Gio.FileMonitorFlags.WATCH_MOVES flag is set.

New in version 2.46.

class Gio.FileType(value)

Bases: GObject.GEnum

Indicates the file’s on-disk type.

On Windows systems a file will never have Gio.FileType.SYMBOLIC_LINK type; use Gio.FileInfo and Gio.FILE_ATTRIBUTE_STANDARD_IS_SYMLINK to determine whether a file is a symlink or not. This is due to the fact that NTFS does not have a single filesystem object type for symbolic links - it has files that symlink to files, and directories that symlink to directories. Gio.FileType enumeration cannot precisely represent this important distinction, which is why all Windows symlinks will continue to be reported as Gio.FileType.REGULAR or Gio.FileType.DIRECTORY.

UNKNOWN = 0

File’s type is unknown.

REGULAR = 1

File handle represents a regular file.

DIRECTORY = 2

File handle represents a directory.

File handle represents a symbolic link (Unix systems).

SPECIAL = 4

File is a “special” file, such as a socket, fifo, block device, or character device.

SHORTCUT = 5

File is a shortcut (Windows systems).

MOUNTABLE = 6

File is a mountable location.

class Gio.FilesystemPreviewType(value)

Bases: GObject.GEnum

Indicates a hint from the file system whether files should be previewed in a file manager. Returned as the value of the key Gio.FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW.

IF_ALWAYS = 0

Only preview files if user has explicitly requested it.

IF_LOCAL = 1

Preview files if user has requested preview of “local” files.

NEVER = 2

Never preview files.

class Gio.IOErrorEnum(value)

Bases: GObject.GEnum

Error codes returned by GIO functions.

Note that this domain may be extended in future GLib releases. In general, new error codes either only apply to new APIs, or else replace Gio.IOErrorEnum.FAILED in cases that were not explicitly distinguished before. You should therefore avoid writing code like

if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_FAILED))
{
  // Assume that this is EPRINTERONFIRE
  ...
}

but should instead treat all unrecognized error codes the same as Gio.IOErrorEnum.FAILED.

See also Gio.PollableReturn for a cheaper way of returning Gio.IOErrorEnum.WOULD_BLOCK to callers without allocating a GLib.Error.

FAILED = 0

Generic error condition for when an operation fails and no more specific Gio.IOErrorEnum value is defined.

NOT_FOUND = 1

File not found.

INVALID_FILENAME = 10

Filename is invalid or contains invalid characters.

File contains too many symbolic links.

NO_SPACE = 12

No space left on drive.

INVALID_ARGUMENT = 13

Invalid argument.

PERMISSION_DENIED = 14

Permission denied.

NOT_SUPPORTED = 15

Operation (or one of its parameters) not supported

NOT_MOUNTED = 16

File isn’t mounted.

ALREADY_MOUNTED = 17

File is already mounted.

CLOSED = 18

File was closed.

CANCELLED = 19

Operation was cancelled. See Gio.Cancellable.

EXISTS = 2

File already exists.

PENDING = 20

Operations are still pending.

READ_ONLY = 21

File is read only.

CANT_CREATE_BACKUP = 22

Backup couldn’t be created.

WRONG_ETAG = 23

File’s Entity Tag was incorrect.

TIMED_OUT = 24

Operation timed out.

WOULD_RECURSE = 25

Operation would be recursive.

BUSY = 26

File is busy.

WOULD_BLOCK = 27

Operation would block.

HOST_NOT_FOUND = 28

Host couldn’t be found (remote operations).

WOULD_MERGE = 29

Operation would merge files.

IS_DIRECTORY = 3

File is a directory.

FAILED_HANDLED = 30

Operation failed and a helper program has already interacted with the user. Do not display any error dialog.

TOO_MANY_OPEN_FILES = 31

The current process has too many files open and can’t open any more. Duplicate descriptors do count toward this limit.

New in version 2.20.

NOT_INITIALIZED = 32

The object has not been initialized.

New in version 2.22.

ADDRESS_IN_USE = 33

The requested address is already in use.

New in version 2.22.

PARTIAL_INPUT = 34

Need more input to finish operation.

New in version 2.24.

INVALID_DATA = 35

The input data was invalid.

New in version 2.24.

DBUS_ERROR = 36

A remote object generated an error that doesn’t correspond to a locally registered GLib.Error error domain. Use Gio.DBusError.get_remote_error() to extract the D-Bus error name and Gio.DBusError.strip_remote_error() to fix up the message so it matches what was received on the wire.

New in version 2.26.

HOST_UNREACHABLE = 37

Host unreachable.

New in version 2.26.

NETWORK_UNREACHABLE = 38

Network unreachable.

New in version 2.26.

CONNECTION_REFUSED = 39

Connection refused.

New in version 2.26.

NOT_DIRECTORY = 4

File is not a directory.

PROXY_FAILED = 40

Connection to proxy server failed.

New in version 2.26.

PROXY_AUTH_FAILED = 41

Proxy authentication failed.

New in version 2.26.

PROXY_NEED_AUTH = 42

Proxy server needs authentication.

New in version 2.26.

PROXY_NOT_ALLOWED = 43

Proxy connection is not allowed by ruleset.

New in version 2.26.

BROKEN_PIPE = 44

Broken pipe.

New in version 2.36.

CONNECTION_CLOSED = 44

Connection closed by peer. Note that this is the same code as Gio.IOErrorEnum.BROKEN_PIPE; before 2.44 some “connection closed” errors returned Gio.IOErrorEnum.BROKEN_PIPE, but others returned Gio.IOErrorEnum.FAILED. Now they should all return the same value, which has this more logical name.

New in version 2.44.

NOT_CONNECTED = 45

Transport endpoint is not connected.

New in version 2.44.

MESSAGE_TOO_LARGE = 46

Message too large.

New in version 2.48.

NO_SUCH_DEVICE = 47

No such device found.

New in version 2.74.

DESTINATION_UNSET = 48

Destination address unset.

New in version 2.80.

NOT_EMPTY = 5

File is a directory that isn’t empty.

NOT_REGULAR_FILE = 6

File is not a regular file.

File is not a symbolic link.

NOT_MOUNTABLE_FILE = 8

File cannot be mounted.

FILENAME_TOO_LONG = 9

Filename is too many characters.

class Gio.IOModuleScopeFlags(value)

Bases: GObject.GEnum

Flags for use with g_io_module_scope_new().

New in version 2.30.

NONE = 0

No module scan flags

BLOCK_DUPLICATES = 1

When using this scope to load or scan modules, automatically block a modules which has the same base basename as previously loaded module.

class Gio.MemoryMonitorWarningLevel(value)

Bases: GObject.GEnum

Memory availability warning levels.

Note that because new values might be added, it is recommended that applications check Gio.MemoryMonitorWarningLevel as ranges, for example:

if (warning_level > G_MEMORY_MONITOR_WARNING_LEVEL_LOW)
drop_caches ();

New in version 2.64.

MEDIUM = 100

Same as Gio.MemoryMonitorWarningLevel.LOW but the device has even less free memory, so processes should try harder to free up unneeded resources. If your process does not need to stay running, it is a good time for it to quit.

CRITICAL = 255

The system will soon start terminating processes to reclaim memory, including background processes.

LOW = 50

Memory on the device is low, processes should free up unneeded resources (for example, in-memory caches) so they can be used elsewhere.

class Gio.MountOperationResult(value)

Bases: GObject.GEnum

Gio.MountOperationResult is returned as a result when a request for information is send by the mounting operation.

HANDLED = 0

The request was fulfilled and the user specified data is now available

ABORTED = 1

The user requested the mount operation to be aborted

UNHANDLED = 2

The request was unhandled (i.e. not implemented)

class Gio.NetworkConnectivity(value)

Bases: GObject.GEnum

The host’s network connectivity state, as reported by Gio.NetworkMonitor.

New in version 2.44.

LOCAL = 1

The host is not configured with a route to the Internet; it may or may not be connected to a local network.

LIMITED = 2

The host is connected to a network, but does not appear to be able to reach the full Internet, perhaps due to upstream network problems.

PORTAL = 3

The host is behind a captive portal and cannot reach the full Internet.

FULL = 4

The host is connected to a network, and appears to be able to reach the full Internet.

class Gio.NotificationPriority(value)

Bases: GObject.GEnum

Priority levels for Gio.Notifications.

New in version 2.42.

NORMAL = 0

the default priority, to be used for the majority of notifications (for example email messages, software updates, completed download/sync operations)

LOW = 1

for notifications that do not require immediate attention - typically used for contextual background information, such as contact birthdays or local weather

HIGH = 2

for events that require more attention, usually because responses are time-sensitive (for example chat and SMS messages or alarms)

URGENT = 3

for urgent notifications, or notifications that require a response in a short space of time (for example phone calls or emergency warnings)

class Gio.PasswordSave(value)

Bases: GObject.GEnum

Gio.PasswordSave is used to indicate the lifespan of a saved password.

#Gvfs stores passwords in the Gnome keyring when this flag allows it to, and later retrieves it again from there.

NEVER = 0

never save a password.

FOR_SESSION = 1

save a password for the session.

PERMANENTLY = 2

save a password permanently.

class Gio.PollableReturn(value)

Bases: GObject.GEnum

Return value for various IO operations that signal errors via the return value and not necessarily via a GLib.Error.

This enum exists to be able to return errors to callers without having to allocate a GLib.Error. Allocating GLib.Errors can be quite expensive for regularly happening errors like Gio.IOErrorEnum.WOULD_BLOCK.

In case of Gio.PollableReturn.FAILED a GLib.Error should be set for the operation to give details about the error that happened.

New in version 2.60.

WOULD_BLOCK = -27

The operation would block.

FAILED = 0

Generic error condition for when an operation fails.

OK = 1

The operation was successfully finished.

class Gio.ResolverError(value)

Bases: GObject.GEnum

An error code used with %G_RESOLVER_ERROR in a GLib.Error returned from a Gio.Resolver routine.

New in version 2.22.

classmethod quark()[source]
Returns:

a #GQuark.

Return type:

int

Gets the Gio.Resolver Error Quark.

New in version 2.22.

NOT_FOUND = 0

the requested name/address/service was not found

TEMPORARY_FAILURE = 1

the requested information could not be looked up due to a network error or similar problem

INTERNAL = 2

unknown error

class Gio.ResolverRecordType(value)

Bases: GObject.GEnum

The type of record that Gio.Resolver.lookup_records() or Gio.Resolver.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.

Gio.ResolverRecordType.SRV records are returned as variants with the signature (qqqs), containing a guint16 with the priority, a guint16 with the weight, a guint16 with the port, and a string of the hostname.

Gio.ResolverRecordType.MX records are returned as variants with the signature (qs), representing a guint16 with the preference, and a string containing the mail exchanger hostname.

Gio.ResolverRecordType.TXT records are returned as variants with the signature (as), representing an array of the strings in the text record. Note: Most TXT records only contain a single string, but RFC 1035 does allow a record to contain multiple strings. The RFC which defines the interpretation of a specific TXT record will likely require concatenation of multiple strings if they are present, as with RFC 7208.

Gio.ResolverRecordType.SOA records are returned as variants with the signature (ssuuuuu), representing a string containing the primary name server, a string containing the administrator, the serial as a guint32, the refresh interval as a guint32, the retry interval as a guint32, the expire timeout as a guint32, and the TTL as a guint32.

Gio.ResolverRecordType.NS records are returned as variants with the signature (s), representing a string of the hostname of the name server.

New in version 2.34.

SRV = 1

look up DNS SRV records for a domain

MX = 2

look up DNS MX records for a domain

TXT = 3

look up DNS TXT records for a name

SOA = 4

look up DNS SOA records for a zone

NS = 5

look up DNS NS records for a domain

class Gio.ResourceError(value)

Bases: GObject.GEnum

An error code used with %G_RESOURCE_ERROR in a GLib.Error returned from a Gio.Resource routine.

New in version 2.32.

classmethod quark()[source]
Returns:

a #GQuark

Return type:

int

Gets the Gio.Resource Error Quark.

New in version 2.32.

NOT_FOUND = 0

no file was found at the requested path

INTERNAL = 1

unknown error

class Gio.SocketClientEvent(value)

Bases: GObject.GEnum

Describes an event occurring on a Gio.SocketClient. See the Gio.SocketClient ::event signal for more details.

Additional values may be added to this type in the future.

New in version 2.32.

RESOLVING = 0

The client is doing a DNS lookup.

RESOLVED = 1

The client has completed a DNS lookup.

CONNECTING = 2

The client is connecting to a remote host (either a proxy or the destination server).

CONNECTED = 3

The client has connected to a remote host.

PROXY_NEGOTIATING = 4

The client is negotiating with a proxy to connect to the destination server.

PROXY_NEGOTIATED = 5

The client has negotiated with the proxy server.

TLS_HANDSHAKING = 6

The client is performing a TLS handshake.

TLS_HANDSHAKED = 7

The client has performed a TLS handshake.

COMPLETE = 8

The client is done with a particular Gio.SocketConnectable.

class Gio.SocketFamily(value)

Bases: GObject.GEnum

The protocol family of a Gio.SocketAddress. (These values are identical to the system defines %AF_INET, %AF_INET6 and %AF_UNIX, if available.)

New in version 2.22.

INVALID = 0

no address family

UNIX = 1

the UNIX domain family

IPV6 = 10

the IPv6 family

IPV4 = 2

the IPv4 family

class Gio.SocketListenerEvent(value)

Bases: GObject.GEnum

Describes an event occurring on a Gio.SocketListener. See the Gio.SocketListener ::event signal for more details.

Additional values may be added to this type in the future.

New in version 2.46.

BINDING = 0

The listener is about to bind a socket.

BOUND = 1

The listener has bound a socket.

LISTENING = 2

The listener is about to start listening on this socket.

LISTENED = 3

The listener is now listening on this socket.

class Gio.SocketProtocol(value)

Bases: GObject.GEnum

A protocol identifier is specified when creating a Gio.Socket, which is a family/type specific identifier, where 0 means the default protocol for the particular family/type.

This enum contains a set of commonly available and used protocols. You can also pass any other identifiers handled by the platform in order to use protocols not listed here.

New in version 2.22.

UNKNOWN = -1

The protocol type is unknown

DEFAULT = 0

The default protocol for the family/type

SCTP = 132

SCTP over IP

UDP = 17

UDP over IP

TCP = 6

TCP over IP

class Gio.SocketType(value)

Bases: GObject.GEnum

Flags used when creating a Gio.Socket. Some protocols may not implement all the socket types.

New in version 2.22.

INVALID = 0

Type unknown or wrong

STREAM = 1

Reliable connection-based byte streams (e.g. TCP).

DATAGRAM = 2

Connectionless, unreliable datagram passing. (e.g. UDP)

SEQPACKET = 3

Reliable connection-based passing of datagrams of fixed maximum length (e.g. SCTP).

class Gio.TlsAuthenticationMode(value)

Bases: GObject.GEnum

The client authentication mode for a Gio.TlsServerConnection.

New in version 2.28.

NONE = 0

client authentication not required

REQUESTED = 1

client authentication is requested

REQUIRED = 2

client authentication is required

class Gio.TlsCertificateRequestFlags(value)

Bases: GObject.GEnum

Flags for Gio.TlsInteraction.request_certificate(), Gio.TlsInteraction.request_certificate_async(), and Gio.TlsInteraction.invoke_request_certificate().

New in version 2.40.

NONE = 0

No flags

class Gio.TlsChannelBindingError(value)

Bases: GObject.GEnum

An error code used with %G_TLS_CHANNEL_BINDING_ERROR in a GLib.Error to indicate a TLS channel binding retrieval error.

New in version 2.66.

classmethod quark()[source]
Returns:

a #GQuark.

Return type:

int

Gets the TLS channel binding error quark.

New in version 2.66.

NOT_IMPLEMENTED = 0

Either entire binding retrieval facility or specific binding type is not implemented in the TLS backend.

INVALID_STATE = 1

The handshake is not yet complete on the connection which is a strong requirement for any existing binding type.

NOT_AVAILABLE = 2

Handshake is complete but binding data is not available. That normally indicates the TLS implementation failed to provide the binding data. For example, some implementations do not provide a peer certificate for resumed connections.

NOT_SUPPORTED = 3

Binding type is not supported on the current connection. This error could be triggered when requesting tls-server-end-point binding data for a certificate which has no hash function or uses multiple hash functions.

GENERAL_ERROR = 4

Any other backend error preventing binding data retrieval.

class Gio.TlsChannelBindingType(value)

Bases: GObject.GEnum

The type of TLS channel binding data to retrieve from Gio.TlsConnection or Gio.DtlsConnection, as documented by RFC 5929 or RFC 9266. The tls-unique-for-telnet binding type is not currently implemented.

New in version 2.66.

UNIQUE = 0

tls-unique binding type

SERVER_END_POINT = 1

tls-server-end-point binding type

EXPORTER = 2

tls-exporter binding type.

New in version 2.74.

class Gio.TlsDatabaseLookupFlags(value)

Bases: GObject.GEnum

Flags for Gio.TlsDatabase.lookup_certificate_for_handle(), Gio.TlsDatabase.lookup_certificate_issuer(), and Gio.TlsDatabase.lookup_certificates_issued_by().

New in version 2.30.

NONE = 0

No lookup flags

KEYPAIR = 1

Restrict lookup to certificates that have a private key.

class Gio.TlsError(value)

Bases: GObject.GEnum

An error code used with %G_TLS_ERROR in a GLib.Error returned from a TLS-related routine.

New in version 2.28.

classmethod quark()[source]
Returns:

a #GQuark.

Return type:

int

Gets the TLS error quark.

New in version 2.28.

UNAVAILABLE = 0

No TLS provider is available

MISC = 1

Miscellaneous TLS error

BAD_CERTIFICATE = 2

The certificate presented could not be parsed or failed validation.

NOT_TLS = 3

The TLS handshake failed because the peer does not seem to be a TLS server.

HANDSHAKE = 4

The TLS handshake failed because the peer’s certificate was not acceptable.

CERTIFICATE_REQUIRED = 5

The TLS handshake failed because the server requested a client-side certificate, but none was provided. See Gio.TlsConnection.set_certificate().

EOF = 6

The TLS connection was closed without proper notice, which may indicate an attack. See Gio.TlsConnection.set_require_close_notify().

INAPPROPRIATE_FALLBACK = 7

The TLS handshake failed because the client sent the fallback SCSV, indicating a protocol downgrade attack.

New in version 2.60.

BAD_CERTIFICATE_PASSWORD = 8

The certificate failed to load because a password was incorrect.

New in version 2.72.

class Gio.TlsInteractionResult(value)

Bases: GObject.GEnum

Gio.TlsInteractionResult is returned by various functions in Gio.TlsInteraction when finishing an interaction request.

New in version 2.30.

UNHANDLED = 0

The interaction was unhandled (i.e. not implemented).

HANDLED = 1

The interaction completed, and resulting data is available.

FAILED = 2

The interaction has failed, or was cancelled. and the operation should be aborted.

class Gio.TlsProtocolVersion(value)

Bases: GObject.GEnum

The TLS or DTLS protocol version used by a Gio.TlsConnection or Gio.DtlsConnection. 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 Gio.TlsProtocolVersion.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.

New in version 2.70.

UNKNOWN = 0

No protocol version or unknown protocol version

SSL_3_0 = 1

SSL 3.0, which is insecure and should not be used

TLS_1_0 = 2

TLS 1.0, which is insecure and should not be used

DTLS_1_0 = 201

DTLS 1.0, which is insecure and should not be used

DTLS_1_2 = 202

DTLS 1.2, defined by RFC 6347

TLS_1_1 = 3

TLS 1.1, which is insecure and should not be used

TLS_1_2 = 4

TLS 1.2, defined by RFC 5246

TLS_1_3 = 5

TLS 1.3, defined by RFC 8446

class Gio.TlsRehandshakeMode(value)

Bases: GObject.GEnum

When to allow rehandshaking. See Gio.TlsConnection.set_rehandshake_mode().

New in version 2.28.

Deprecated since version 2.60.: Changing the rehandshake mode is no longer required for compatibility. Also, rehandshaking has been removed from the TLS protocol in TLS 1.3.

NEVER = 0

Never allow rehandshaking

SAFELY = 1

Allow safe rehandshaking only

UNSAFELY = 2

Allow unsafe rehandshaking

class Gio.UnixSocketAddressType(value)

Bases: GObject.GEnum

The type of name used by a Gio.UnixSocketAddress. Gio.UnixSocketAddressType.PATH indicates a traditional unix domain socket bound to a filesystem path. Gio.UnixSocketAddressType.ANONYMOUS indicates a socket not bound to any name (eg, a client-side socket, or a socket created with socketpair()).

For abstract sockets, there are two incompatible ways of naming them; the man pages suggest using the entire struct sockaddr_un as the name, padding the unused parts of the %sun_path field with zeroes; this corresponds to Gio.UnixSocketAddressType.ABSTRACT_PADDED. However, many programs instead just use a portion of %sun_path, and pass an appropriate smaller length to bind() or connect(). This is Gio.UnixSocketAddressType.ABSTRACT.

New in version 2.26.

INVALID = 0

invalid

ANONYMOUS = 1

anonymous

PATH = 2

a filesystem path

ABSTRACT = 3

an abstract name

ABSTRACT_PADDED = 4

an abstract name, 0-padded to the full length of a unix socket name

class Gio.ZlibCompressorFormat(value)

Bases: GObject.GEnum

Used to select the type of data format to use for Gio.ZlibDecompressor and Gio.ZlibCompressor.

New in version 2.24.

ZLIB = 0

deflate compression with zlib header

GZIP = 1

gzip file format

RAW = 2

deflate compression with no header