Functions¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- Dex.aio_close(aio_context, fd)¶
- Parameters:
aio_context (
Dex.AioContextorNone)fd (
int) – the file descriptor to close
- Returns:
a future that will resolve to
Truewhen the close completes or rejects with error.- Return type:
An asynchronous
close()wrapper.This function takes ownership of fd and will close it asynchronously.
Generally you want to provide
NULLfor the aio_context as that will get the default aio context for your scheduler.Added in version 1.2.
- Dex.aio_open(aio_context, path, flags, mode)¶
- Parameters:
aio_context (
Dex.AioContextorNone)path (
str) – the path to openflags (
int) – flags foropen()mode (
int) – permissions to use when creating the file
- Returns:
a future that will resolve when the open completes or rejects with error.
- Return type:
An asynchronous
open()wrapper.Generally you want to provide
NULLfor the aio_context as that will get the default aio context for your scheduler.The resulting future resolves to a file descriptor which can be consumed with [method`Dex`.Future.await_fd].
Added in version 1.2.
- Dex.aio_read(aio_context, fd, offset)¶
- Parameters:
aio_context (
Dex.AioContextorNone)fd (
int)offset (
int) – the positioned offset within fd to read from
- Returns:
a future that will resolve when the read completes or rejects with error.
- Return type:
(
Dex.Future, buffer:bytes)
An asynchronous
pread()wrapper.Generally you want to provide
NULLfor the aio_context as that will get the default aio context for your scheduler.
- Dex.aio_write(aio_context, fd, buffer, offset)¶
- Parameters:
aio_context (
Dex.AioContextorNone)fd (
int)buffer (
bytes)offset (
int) – the positioned offset within fd to write at
- Returns:
a future that will resolve when the write completes or rejects with error.
- Return type:
An asynchronous
pwrite()wrapper.Generally you want to provide
NULLfor the aio_context as that will get the default aio context for your scheduler.
- Dex.app_info_get_default_for_type(content_type, must_support_uris)¶
- Parameters:
- Returns:
a [class`Dex`.Future] that resolves to a [iface`Gio`.AppInfo] or rejects with error.
- Return type:
Wraps [func`Gio`.AppInfo.get_default_for_type_async].
Added in version 1.2.
- Dex.app_info_get_default_for_uri_scheme(uri_scheme)¶
- Parameters:
uri_scheme (
str) – a URI scheme- Returns:
a [class`Dex`.Future] that resolves to a [iface`Gio`.AppInfo] or rejects with error.
- Return type:
Wraps [func`Gio`.AppInfo.get_default_for_uri_scheme_async].
Added in version 1.2.
- Dex.app_info_launch_default_for_uri(uri, context)¶
- Parameters:
uri (
str) – a URI to launchcontext (
Gio.AppLaunchContextorNone) – a [class`Gio`.AppLaunchContext], orNone
- Returns:
a [class`Dex`.Future] that resolves to
Trueor rejects with error.- Return type:
Wraps [func`Gio`.AppInfo.launch_default_for_uri_async].
Added in version 1.2.
- Dex.app_info_launch_uris(appinfo, uris, context)¶
- Parameters:
appinfo (
Gio.AppInfo) – a [iface`Gio`.AppInfo]uris ([
str]) – URIs to launchcontext (
Gio.AppLaunchContextorNone) – a [class`Gio`.AppLaunchContext], orNone
- Returns:
a [class`Dex`.Future] that resolves to
Trueor rejects with error.- Return type:
Wraps [method`Gio`.AppInfo.launch_uris_async].
Added in version 1.2.
- Dex.async_initable_init(initable, io_priority)¶
- Parameters:
initable (
Gio.AsyncInitable) – a [iface`Gio`.AsyncInitable]io_priority (
int) – the ‘IO priority [iface@Gio.AsyncResult#io-priority]’ of the request
- Returns:
a [class`Dex`.Future] that resolves to the initable instance or rejects with error.
- Return type:
A helper for [method`Gio`.AsyncInitable.init_async].
Added in version 1.0.
- Dex.buffered_input_stream_fill(stream, count, io_priority)¶
- Parameters:
stream (
Gio.BufferedInputStream) – a [class`Gio`.BufferedInputStream]count (
int) – the number of bytes to fill, or -1io_priority (
int) – priority for the IO operation
- Returns:
a [class`Dex`.Future] that resolves to the number of bytes read as a
gint64, or rejects with error.- Return type:
Wraps [method`Gio`.BufferedInputStream.fill_async].
Added in version 1.2.
- Dex.bus_get(bus_type)¶
- Parameters:
bus_type (
Gio.BusType) – the [enum`Gio`.BusType]- Returns:
a [class`Dex`.Future] that resolves to a [class`Gio`.DBusConnection] or rejects with error.
- Return type:
Wrapper for [func`Gio`.bus_get].
Added in version 0.4.
- Dex.bus_own_name_on_connection(connection, name, flags)¶
- Parameters:
connection (
Gio.DBusConnection) – The [class`Gio`.DBusConnection] to own a name on.name (
str) – The well-known name to own.flags (
Gio.BusNameOwnerFlags) – a set of flags with ownership options.
- Returns:
- out_name_acquired_future:
a location for the name acquired future
- out_name_lost_future:
a location for the name lost future
- Return type:
(out_name_acquired_future:
Dex.Future, out_name_lost_future:Dex.Future)
Wrapper for [func`Gio`.bus_own_name].
Asks the D-Bus broker to own the well-known name name on the connection connection.
out_name_acquired_future is a future that awaits owning the name and either resolves to true, or rejects with an error.
out_name_lost_future is a future that rejects when the name was lost.
If either future is canceled, the name will be unowned.
Added in version 1.1.
- Dex.data_input_stream_read_line(stream, io_priority)¶
- Parameters:
stream (
Gio.DataInputStream) – a [class`Gio`.DataInputStream]io_priority (
int) – the ‘IO priority [iface@Gio.AsyncResult#io-priority]’ of the request
- Returns:
a [class`Dex`.Future] that resolves to a string containing the line (without the line terminator), or
Noneif the end of the stream is reached.- Return type:
Reads a line from the data input stream.
Wraps [method`Gio`.DataInputStream.read_line_async].
Added in version 1.1.
- Dex.data_input_stream_read_line_utf8(stream, io_priority)¶
- Parameters:
stream (
Gio.DataInputStream) – a [class`Gio`.DataInputStream]io_priority (
int) – the ‘IO priority [iface@Gio.AsyncResult#io-priority]’ of the request
- Returns:
a [class`Dex`.Future] that resolves to a string containing the line (without the line terminator), or
Noneif the end of the stream is reached.- Return type:
Reads a UTF-8 line from the data input stream.
Wraps [method`Gio`.DataInputStream.read_line_async] with [method`Gio`.DataInputStream.read_line_finish_utf8].
Added in version 1.2.
- Dex.data_input_stream_read_upto(stream, stop_chars, stop_chars_len, io_priority)¶
- Parameters:
stream (
Gio.DataInputStream) – a [class`Gio`.DataInputStream]stop_chars (
str) – characters to terminate the readstop_chars_len (
int) – length of stop_chars, or -1 if stop_chars is nul-terminatedio_priority (
int) – the ‘IO priority [iface@Gio.AsyncResult#io-priority]’ of the request
- Returns:
a [class`Dex`.Future] that resolves to a string containing the read data, not including the stop character, or
Noneif the end of the stream is reached.- Return type:
Reads data from the stream until one of stop_chars is found.
Wraps [method`Gio`.DataInputStream.read_upto_async].
Added in version 1.2.
- Dex.dbus_connection_call(connection, bus_name, object_path, interface_name, method_name, parameters, reply_type, flags, timeout_msec)¶
- Parameters:
connection (
Gio.DBusConnection) – a [class`Gio`.DBusConnection]bus_name (
strorNone) – a unique or well-known bus name orNoneif connection is not a message bus connectionobject_path (
str) – path of remote objectinterface_name (
str) – D-Bus interface to invoke method onmethod_name (
str) – the name of the method to invokeparameters (
GLib.VariantorNone) – a [struct`GLib`.Variant] tuple with parameters for the method orNoneif not passing parametersreply_type (
GLib.VariantTypeorNone) – the expected type of the reply (which will be a tuple), orNoneflags (
Gio.DBusCallFlags) – flags from the [flags`Gio`.DBusCallFlags] enumerationtimeout_msec (
int) – the timeout in milliseconds, -1 to use the default timeout orGObject.G_MAXINTfor no timeout
- Returns:
a [class`Dex`.Future] that resolves to a [struct`GLib`.Variant] or rejects with error.
- Return type:
Wrapper for [method`Gio`.DBusConnection.call].
Added in version 0.4.
- Dex.dbus_connection_call_with_unix_fd_list(connection, bus_name, object_path, interface_name, method_name, parameters, reply_type, flags, timeout_msec, fd_list)¶
- Parameters:
connection (
Gio.DBusConnection) – a [class`Gio`.DBusConnection]bus_name (
strorNone) – a unique or well-known bus name orNoneif connection is not a message bus connectionobject_path (
str) – path of remote objectinterface_name (
str) – D-Bus interface to invoke method onmethod_name (
str) – the name of the method to invokeparameters (
GLib.VariantorNone) – a [struct`GLib`.Variant] tuple with parameters for the method orNoneif not passing parametersreply_type (
GLib.VariantTypeorNone) – the expected type of the reply (which will be a tuple), orNoneflags (
Gio.DBusCallFlags) – flags from the [flags`Gio`.DBusCallFlags] enumerationtimeout_msec (
int) – the timeout in milliseconds, -1 to use the default timeout orGObject.G_MAXINTfor no timeoutfd_list (
Gio.UnixFDListorNone) – a [class`Gio`.UnixFDList]
- Returns:
a [class`Dex`.FutureSet] that resolves to a [struct`GLib`.Variant].
The [class`Dex`.Future] containing the resulting [class`Gio`.UnixFDList] can be retrieved with [method`Dex`.FutureSet.get_future_at] with an index of 1.
- Return type:
Wrapper for [method`Gio`.DBusConnection.call_with_unix_fd_list].
Added in version 0.4.
- Dex.dbus_connection_close(connection)¶
- Parameters:
connection (
Gio.DBusConnection) – a [class`Gio`.DBusConnection]- Returns:
a [class`Dex`.Future] that resolves to
trueor rejects with error.- Return type:
Asynchronously closes a connection.
Added in version 1.0.
- Dex.dbus_connection_send_message_with_reply(connection, message, flags, timeout_msec)¶
- Parameters:
connection (
Gio.DBusConnection) – a [class`Gio`.DBusConnection]message (
Gio.DBusMessage) – a [class`Gio`.DBusMessage]flags (
Gio.DBusSendMessageFlags) – a set of [flags`Gio`.DBusSendMessageFlags]timeout_msec (
int) – timeout in milliseconds, or -1 for default, orGObject.G_MAXINTfor no timeout.
- Returns:
a [class`Dex`.Future] that will resolve to a [class`Gio`.DBusMessage] or reject with failure.
- out_serial:
a location for the message serial number
- Return type:
(
Dex.Future, out_serial:int)
Wrapper for [method`Gio`.DBusConnection.send_message_with_reply].
Added in version 0.4.
- Dex.dtls_connection_close(dtls_connection, io_priority)¶
- Parameters:
dtls_connection (
Gio.DtlsConnection) – a [iface`Gio`.DtlsConnection]io_priority (
int) – priority for the IO operation
- Returns:
a [class`Dex`.Future] that resolves to
Trueor rejects with error.- Return type:
Wraps [method`Gio`.DtlsConnection.close_async].
Added in version 1.2.
- Dex.dtls_connection_handshake(dtls_connection, io_priority)¶
- Parameters:
dtls_connection (
Gio.DtlsConnection) – a [iface`Gio`.DtlsConnection]io_priority (
int) – priority for the IO operation
- Returns:
a [class`Dex`.Future] that resolves to
Trueor rejects with error.- Return type:
Wraps [method`Gio`.DtlsConnection.handshake_async].
Added in version 1.2.
- Dex.dtls_connection_shutdown(dtls_connection, shutdown_read, shutdown_write, io_priority)¶
- Parameters:
dtls_connection (
Gio.DtlsConnection) – a [iface`Gio`.DtlsConnection]shutdown_read (
bool) – whether to shut down the read sideshutdown_write (
bool) – whether to shut down the write sideio_priority (
int) – priority for the IO operation
- Returns:
a [class`Dex`.Future] that resolves to
Trueor rejects with error.- Return type:
Wraps [method`Gio`.DtlsConnection.shutdown_async].
Added in version 1.2.
- Dex.fd_watch(fd, events)¶
- Parameters:
- Returns:
a [class`Dex`.Future] that resolves to the revents value when events is satisfied.
- Return type:
Creates a new
GLib.Sourcethat will fire when events is satisfied.This is primarily useful when integrating with legacy systems on a fiber.
Added in version 1.1.
- Dex.file_append_to(file, flags, io_priority)¶
- Parameters:
file (
Gio.File) – a [iface`Gio`.File]flags (
Gio.FileCreateFlags) – flags for appending to the fileio_priority (
int) – priority for the IO operation
- Returns:
a [class`Dex`.Future] that resolves to a [class`Gio`.FileOutputStream] or rejects with error.
- Return type:
Wraps [method`Gio`.File.append_to_async] as a [class`Dex`.Future].
Added in version 1.2.
- Dex.file_copy(source, destination, flags, io_priority)¶
- Parameters:
source (
Gio.File) – a [iface`Gio`.File]destination (
Gio.File) – a [iface`Gio`.File]flags (
Gio.FileCopyFlags) – a set of [flags`Gio`.FileCopyFlags]io_priority (
int) – the ‘IO priority [iface@Gio.AsyncResult#io-priority]’ of the request
- Returns:
a [class`Dex`.Future] that resolves to true if successful otherwise rejects with error.
- Return type:
Asynchronously copies a file and returns a [class`Dex`.Future] which can be observed for the result.
- Dex.file_copy_with_progress(source, destination, flags, io_priority, progress_callback, *progress_callback_data)¶
- Parameters:
source (
Gio.File) – source [iface`Gio`.File]destination (
Gio.File) – destination [iface`Gio`.File]flags (
Gio.FileCopyFlags) – a set of [flags`Gio`.FileCopyFlags]io_priority (
int) – the ‘IO priority [iface@Gio.AsyncResult#io-priority]’ of the requestprogress_callback (
Gio.FileProgressCallbackorNone) – [callback`Gio`.FileProgressCallback] function for updatesprogress_callback_data (
objectorNone) –gpointerto user data for the callback function
- Returns:
a [class`Dex`.Future] that resolves to
Trueor rejects with error- Return type:
Wraps [method`Gio`.File.copy_async] with progress callback support.
Added in version 1.2.
- Dex.file_create(file, flags, io_priority)¶
- Parameters:
file (
Gio.File) – a [iface`Gio`.File]flags (
Gio.FileCreateFlags) – flags for creating the fileio_priority (
int) – priority for the IO operation
- Returns:
a [class`Dex`.Future] that resolves to a [class`Gio`.FileOutputStream] or rejects with error.
- Return type:
Wraps [method`Gio`.File.create] as a [class`Dex`.Future].
Added in version 1.1.
- Dex.file_create_readwrite(file, flags, io_priority)¶
- Parameters:
file (
Gio.File) – a [iface`Gio`.File]flags (
Gio.FileCreateFlags) – flags for creating the fileio_priority (
int) – priority for the IO operation
- Returns:
a [class`Dex`.Future] that resolves to a [class`Gio`.FileIOStream] or rejects with error.
- Return type:
Wraps [method`Gio`.File.create_readwrite_async] as a [class`Dex`.Future].
Added in version 1.2.
- Dex.file_delete(file, io_priority)¶
- Parameters:
file (
Gio.File) – a [iface`Gio`.File]io_priority (
int) – the ‘IO priority [iface@Gio.AsyncResult#io-priority]’ of the request
- Returns:
a [class`Dex`.Future] that resolves to true or rejects with error.
- Return type:
Asynchronously deletes a file and returns a [class`Dex`.Future] which can be observed for the result.
- Dex.file_enumerate_children(file, attributes, flags, io_priority)¶
- Parameters:
file (
Gio.File) – a [iface`Gio`.File]attributes (
str) – an attribute query string (see: GFile documentation)flags (
Gio.FileQueryInfoFlags) – a set of [flags`Gio`.FileQueryInfoFlags]io_priority (
int) – the ‘IO priority [iface@Gio.AsyncResult#io-priority]’ of the request
- Returns:
a [class`Dex`.Future] that resolves to a [class`Gio`.FileEnumerator] or rejects with error.
- Return type:
- Dex.file_enumerator_close(file_enumerator, io_priority)¶
- Parameters:
file_enumerator (
Gio.FileEnumerator) – a [class`Gio`.FileEnumerator]io_priority (
int) – priority for the IO operation
- Returns:
a [class`Dex`.Future] that resolves to
Trueor rejects with error.- Return type:
Wraps [method`Gio`.FileEnumerator.close_async].
Added in version 1.2.
- Dex.file_enumerator_next_files(file_enumerator, num_files, io_priority)¶
- Parameters:
file_enumerator (
Gio.FileEnumerator) – a [class`Gio`.FileEnumerator]num_files (
int) – the number of filesio_priority (
int) – the ‘IO priority [iface@Gio.AsyncResult#io-priority]’ of the request
- Returns:
a [class`Dex`.Future] that resolves to a [struct`GLib`.List] of [class`Gio`.FileInfo]
- Return type:
Wraps [method`Gio`.FileEnumerator.next_files_async].
Use [method`Dex`.Future.await_boxed] to await for the result of this function.
When on a fiber, you can do:
``c g_autolist(GFileInfo) infos = dex_await_boxed (dex_file_enumerator_next_files (enumerator, 100, 0), &error); ``
- Dex.file_find_enclosing_mount(file, io_priority)¶
- Parameters:
- Returns:
a [class`Dex`.Future] that resolves to a [iface`Gio`.Mount] or rejects with error.
- Return type:
Wraps [method`Gio`.File.find_enclosing_mount_async].
Added in version 1.2.
- Dex.file_input_stream_query_info(stream, attributes, io_priority)¶
- Parameters:
stream (
Gio.FileInputStream) – a [class`Gio`.FileInputStream]attributes (
str) – file attributes to queryio_priority (
int) – priority for the IO operation
- Returns:
a [class`Dex`.Future] that resolves to a [class`Gio`.FileInfo] or rejects with error.
- Return type:
Wraps [method`Gio`.FileInputStream.query_info_async].
Added in version 1.2.
- Dex.file_io_stream_query_info(stream, attributes, io_priority)¶
- Parameters:
stream (
Gio.FileIOStream) – a [class`Gio`.FileIOStream]attributes (
str) – file attributes to queryio_priority (
int) – priority for the IO operation
- Returns:
a [class`Dex`.Future] that resolves to a [class`Gio`.FileInfo] or rejects with error.
- Return type:
Wraps [method`Gio`.FileIOStream.query_info_async].
Added in version 1.2.
- Dex.file_load_bytes(file)¶
- Parameters:
file (
Gio.File) – a [iface`Gio`.File]- Returns:
a [class`Dex`.Future] that resolves to a [struct`GLib`.Bytes] or rejects with error.
- Return type:
Wraps [method`Gio`.File.load_bytes_async].
Added in version 1.2.
- Dex.file_load_contents_bytes(file)¶
- Parameters:
file (
Gio.File) – a [iface`Gio`.File]- Returns:
a [class`Dex`.Future] that resolves to a [struct`GLib`.Bytes].
- Return type:
- Dex.file_load_partial_contents_bytes(file, read_more_callback, *read_more_callback_data)¶
- Parameters:
file (
Gio.File) – a [iface`Gio`.File]read_more_callback (
Gio.FileReadMoreCallbackorNone) – callback to determine if more bytes should be loadedread_more_callback_data (
objectorNone) – user data for read_more_callback
- Returns:
a [class`Dex`.Future] that resolves to a [struct`GLib`.Bytes] or rejects with error.
- Return type:
Wraps [method`Gio`.File.load_partial_contents_async].
Added in version 1.2.
- Dex.file_make_directory(file, io_priority)¶
- Parameters:
file (
Gio.File) – a [iface`Gio`.File]io_priority (
int) – the ‘IO priority [iface@Gio.AsyncResult#io-priority]’ of the request
- Returns:
a [class`Dex`.Future]
- Return type:
Asynchronously creates a directory and returns [class`Dex`.Future] which can be observed for the result.
- Dex.file_make_directory_with_parents(file)¶
- Parameters:
file (
Gio.File) – a [iface`Gio`.File]- Returns:
a [class`Dex`.Future] that resolves to a boolean or rejects with error.
- Return type:
Creates a directory at file.
If file already exists and is a directory, then the future will resolve to
True.Added in version 1.0.
- Dex.file_make_symbolic_link(file, symlink_value, io_priority)¶
- Parameters:
- Returns:
a [class`Dex`.Future] that resolves to
Trueor rejects with error.- Return type:
Wraps [method`Gio`.File.make_symbolic_link_async].
Added in version 1.2.
- Dex.file_move(source, destination, flags, io_priority, progress_callback, *progress_callback_data)¶
- Parameters:
source (
Gio.File) – source [iface`Gio`.File]destination (
Gio.File) – destination [iface`Gio`.File]flags (
Gio.FileCopyFlags) – a set of [flags`Gio`.FileCopyFlags]io_priority (
int) – the ‘IO priority [iface@Gio.AsyncResult#io-priority]’ of the requestprogress_callback (
Gio.FileProgressCallback) – [callback`Gio`.FileProgressCallback] function for updatesprogress_callback_data (
objectorNone) –gpointerto user data for the callback function
- Returns:
a [class`Dex`.Future] that resolves to
Trueor rejects with error- Return type:
- Dex.file_new_tmp_dir(tmpl, io_priority)¶
- Parameters:
- Returns:
a [class`Dex`.Future] that resolves to a [iface`Gio`.File] or rejects with error.
- Return type:
Wraps [func`Gio`.File.new_tmp_dir_async] as a [class`Dex`.Future].
Added in version 1.2.
- Dex.file_open_readwrite(file, io_priority)¶
- Parameters:
- Returns:
a [class`Dex`.Future] that resolves to a [class`Gio`.FileIOStream] or rejects with error.
- Return type:
Wraps [method`Gio`.File.open_readwrite_async] as a [class`Dex`.Future].
Added in version 1.2.
- Dex.file_output_stream_query_info(stream, attributes, io_priority)¶
- Parameters:
stream (
Gio.FileOutputStream) – a [class`Gio`.FileOutputStream]attributes (
str) – file attributes to queryio_priority (
int) – priority for the IO operation
- Returns:
a [class`Dex`.Future] that resolves to a [class`Gio`.FileInfo] or rejects with error.
- Return type:
Wraps [method`Gio`.FileOutputStream.query_info_async].
Added in version 1.2.
- Dex.file_query_default_handler(file, io_priority)¶
- Parameters:
- Returns:
a [class`Dex`.Future] that resolves to a [iface`Gio`.AppInfo] or rejects with error.
- Return type:
Wraps [method`Gio`.File.query_default_handler_async].
Added in version 1.2.
- Dex.file_query_exists(file)¶
- Parameters:
file (
Gio.File) – a [iface`Gio`.File]- Returns:
a [class`Dex`.Future] that will resolve with
Trueif the file exists, otherwise reject with error.- Return type:
Queries to see if file exists asynchronously.
Added in version 0.6.
- Dex.file_query_file_type(file, flags, io_priority)¶
- Parameters:
file (
Gio.File) – a [iface`Gio`.File]flags (
Gio.FileQueryInfoFlags) – a set of [flags`Gio`.FileQueryInfoFlags]io_priority (
int) – the ‘IO priority [iface@Gio.AsyncResult#io-priority]’ of the request
- Returns:
a [class`Dex`.Future] that resolves to a [enum`Gio`.FileType].
- Return type:
- Dex.file_query_filesystem_info(file, attributes, io_priority)¶
- Parameters:
- Returns:
a [class`Dex`.Future] that resolves to a [class`Gio`.FileInfo] or rejects with error.
- Return type:
Wraps [method`Gio`.File.query_filesystem_info_async].
Added in version 1.2.
- Dex.file_query_info(file, attributes, flags, io_priority)¶
- Parameters:
file (
Gio.File) – a [iface`Gio`.File]attributes (
str) – an attribute query string (see: GFile documentation)flags (
Gio.FileQueryInfoFlags) – a set of [flags`Gio`.FileQueryInfoFlags]io_priority (
int) – the ‘IO priority [iface@Gio.AsyncResult#io-priority]’ of the request
- Returns:
a [class`Dex`.Future] that resolves to a [class`Gio`.FileInfo] or rejects with error.
- Return type:
- Dex.file_read(file, io_priority)¶
- Parameters:
file (
Gio.File) – a [iface`Gio`.File]io_priority (
int) – the ‘IO priority [iface@Gio.AsyncResult#io-priority]’ of the request
- Returns:
a [class`Dex`.Future] that resolves to a [class`Gio`.FileInputStream].
- Return type:
Asynchronously opens a file for reading.
- Dex.file_replace(file, etag, make_backup, flags, io_priority)¶
- Parameters:
- Returns:
a [class`Dex`.Future] that resolves to a [class`Gio`.FileInputStream].
- Return type:
Opens a stream that will replace file on disk when the input stream is closed.
- Dex.file_replace_contents(file, contents, etag, make_backup, flags)¶
- Parameters:
- Returns:
a [class`Dex`.Future] which resolves to the new etag, or
Noneif no etag is available.- Return type:
Wraps [method`Gio`.File.replace_contents_async].
This function copies contents into a [struct`GLib`.Bytes] so the caller does not need to keep the buffer alive for the duration of the operation.
Added in version 1.2.
- Dex.file_replace_contents_bytes(file, contents, etag, make_backup, flags)¶
- Parameters:
file (
Gio.File) – a [iface`Gio`.File]contents (
GLib.Bytes) – a [struct`GLib`.Bytes]make_backup (
bool) – if a backup file should be createdflags (
Gio.FileCreateFlags) – a set of [flags`Gio`.FileCreateFlags]
- Returns:
a [class`Dex`.Future] which resolves to the new etag. Therefore, it is possible to be
Nonewithout an error having occurred.- Return type:
Wraps [method`Gio`.File.replace_contents_bytes_async]
- Dex.file_replace_readwrite(file, etag, make_backup, flags, io_priority)¶
- Parameters:
- Returns:
a [class`Dex`.Future] that resolves to a [class`Gio`.FileIOStream] or rejects with error.
- Return type:
Wraps [method`Gio`.File.replace_readwrite_async] as a [class`Dex`.Future].
Added in version 1.2.
- Dex.file_set_attributes(file, file_info, flags, io_priority)¶
- Parameters:
file (
Gio.File) – a [iface`Gio`.File]file_info (
Gio.FileInfo) – a [class`Gio`.FileInfo]flags (
Gio.FileQueryInfoFlags) – a set of [flags`Gio`.FileQueryInfoFlags]io_priority (
int) – the ‘IO priority [iface@Gio.AsyncResult#io-priority]’ of the request
- Returns:
a [class`Dex`.Future] that resolves to a [class`Gio`.FileInfo] or rejects with error.
- Return type:
Added in version 1.0.
- Dex.file_set_display_name(file, display_name, io_priority)¶
- Parameters:
- Returns:
a [class`Dex`.Future] that resolves to the renamed [iface`Gio`.File] or rejects with error.
- Return type:
Wraps [method`Gio`.File.set_display_name_async].
Added in version 1.2.
- Dex.file_trash(file, io_priority)¶
- Parameters:
- Returns:
a [class`Dex`.Future] that resolves to
Trueor rejects with error.- Return type:
Wraps [method`Gio`.File.trash_async].
Added in version 1.2.
- Dex.find_program_in_path(program)¶
- Parameters:
program (
str) – the name of the executable such as “grep”- Returns:
a [class`Dex`.Future] that resolves to a string containing the path or rejects with error.
- Return type:
Locates the first executable named program in the user’s path.
This runs [func`GLib`.find_program_in_path] on a dedicated thread.
Added in version 1.1.
- Dex.get_major_version()¶
- Return type:
Gets the major version number equivalent to
DEX_MAJOR_VERSIONat compile time of libdex.Added in version 1.1.
- Dex.get_micro_version()¶
- Return type:
Gets the micro version number equivalent to
DEX_MICRO_VERSIONat compile time of libdex.Added in version 1.1.
- Dex.get_minor_version()¶
- Return type:
Gets the minor version number equivalent to
DEX_MINOR_VERSIONat compile time of libdex.Added in version 1.1.
- Dex.init()¶
- Dex.input_stream_close(self, io_priority)¶
- Parameters:
self (
Gio.InputStream) – a [class`Gio`.InputStream]io_priority (
int) – the ‘IO priority [iface@Gio.AsyncResult#io-priority]’ of the request
- Returns:
a [class`Dex`.Future] that resolves to true if successful or rejects with error.
- Return type:
- Dex.input_stream_read(self, io_priority)¶
- Parameters:
self (
Gio.InputStream) – a [class`Gio`.InputStream]io_priority (
int) – the ‘IO priority [iface@Gio.AsyncResult#io-priority]’ of the request
- Returns:
a [class`Dex`.Future] that reads counts bytes into buffer
- Return type:
(
Dex.Future, buffer:bytes)
Reads count bytes from an input stream into a pre-allocated buffer. The buffer must stay valid for the lifetime of this future.
- Dex.input_stream_read_bytes(stream, count, io_priority)¶
- Parameters:
stream (
Gio.InputStream) – a [class`Gio`.InputStream]count (
int) – size in bytes to read from the streamio_priority (
int) – the ‘IO priority [iface@Gio.AsyncResult#io-priority]’ of the request
- Returns:
a [class`Dex`.Future] that resolves to a [struct`GLib`.Bytes].
- Return type:
Reads count bytes from the stream.
- Dex.input_stream_skip(self, count, io_priority)¶
- Parameters:
self (
Gio.InputStream) – a [class`Gio`.InputStream]count (
int) – the number of bytes to skipio_priority (
int) – the ‘IO priority [iface@Gio.AsyncResult#io-priority]’ of the request
- Returns:
a [class`Dex`.Future] that resolves to the number of bytes skipped as a
gint64.- Return type:
- Dex.io_stream_close(io_stream, io_priority)¶
- Parameters:
io_stream (
Gio.IOStream) – a [class`Gio`.IOStream]io_priority (
int) – the ‘IO priority [iface@Gio.AsyncResult#io-priority]’ of the request
- Returns:
a [class`Dex`.Future] that resolves to true or rejects with error.
- Return type:
- Dex.io_stream_splice(stream1, stream2, flags, io_priority)¶
- Parameters:
stream1 (
Gio.IOStream) – a [class`Gio`.IOStream]stream2 (
Gio.IOStream) – a [class`Gio`.IOStream]flags (
Gio.IOStreamSpliceFlags) – splice flagsio_priority (
int) – priority for the IO operation
- Returns:
a [class`Dex`.Future] that resolves to
Trueor rejects with error.- Return type:
Wraps [method`Gio`.IOStream.splice_async].
Added in version 1.2.
- Dex.mkdir_with_parents(path, mode)¶
- Parameters:
- Returns:
a [class`Dex`.Future] that resolves to 0 if successful, otherwise rejects with error.
- Return type:
Similar to [func`GLib`.mkdir_with_parents] but runs on a dedicated thread.
Added in version 1.1.
- Dex.network_monitor_can_reach(monitor, connectable)¶
- Parameters:
monitor (
Gio.NetworkMonitor) – a [iface`Gio`.NetworkMonitor]connectable (
Gio.SocketConnectable) – a [iface`Gio`.SocketConnectable]
- Returns:
a [class`Dex`.Future] that resolves to
Trueor rejects with error.- Return type:
Wraps [method`Gio`.NetworkMonitor.can_reach_async].
Added in version 1.2.
- Dex.output_stream_close(self, io_priority)¶
- Parameters:
self (
Gio.OutputStream) – a [class`Gio`.OutputStream]io_priority (
int) – the ‘IO priority [iface@Gio.AsyncResult#io-priority]’ of the request
- Returns:
a [class`Dex`.Future] that resolves to true or rejects with error.
- Return type:
- Dex.output_stream_flush(self, io_priority)¶
- Parameters:
self (
Gio.OutputStream) – a [class`Gio`.OutputStream]io_priority (
int) – priority for the IO operation
- Returns:
a [class`Dex`.Future] that resolves to
Trueor rejects with error.- Return type:
Wraps [method`Gio`.OutputStream.flush_async].
Added in version 1.2.
- Dex.output_stream_splice(output, input, flags, io_priority)¶
- Parameters:
output (
Gio.OutputStream) – a [class`Gio`.OutputStream]input (
Gio.InputStream) – a [class`Gio`.InputStream]flags (
Gio.OutputStreamSpliceFlags) – a set of [flags`Gio`.OutputStreamSpliceFlags]io_priority (
int) – the ‘IO priority [iface@Gio.AsyncResult#io-priority]’ of the request
- Returns:
a [class`Dex`.Future] that resolves to the number of bytes spliced as a
gint64or rejects with error.- Return type:
- Dex.output_stream_write(self, buffer, io_priority)¶
- Parameters:
self (
Gio.OutputStream) – a [class`Gio`.OutputStream]buffer (
bytes)io_priority (
int) – the ‘IO priority [iface@Gio.AsyncResult#io-priority]’ of the request
- Returns:
a [class`Dex`.Future] that resolves to the number of bytes written as a
gint64- Return type:
- Dex.output_stream_write_bytes(stream, bytes, io_priority)¶
- Parameters:
stream (
Gio.OutputStream) – a [class`Gio`.InputStream]bytes (
GLib.Bytes) – the [struct`GLib`.Bytes] to write to the streamio_priority (
int) – the ‘IO priority [iface@Gio.AsyncResult#io-priority]’ of the request
- Returns:
a [class`Dex`.Future] that resolves to a
gint64.- Return type:
Writes bytes to stream.
This function takes a reference to bytes and may be released after calling this function.
- Dex.output_stream_writev_all(stream, vectors, io_priority)¶
- Parameters:
stream (
Gio.OutputStream) – a [class`Gio`.OutputStream]vectors ([
Gio.OutputVector]) – vectors to write to streamio_priority (
int) – the ‘IO priority [iface@Gio.AsyncResult#io-priority]’ of the request
- Returns:
a [class`Dex`.Future] that resolves to a
guint64containing the number of bytes written, or rejects with error.- Return type:
Writes all bytes in vectors to stream.
This function copies the vectors array before starting the operation, but the buffers referenced by the vectors must remain valid until the returned future completes.
Wraps [method`Gio`.OutputStream.writev_all_async].
Added in version 1.2.
- Dex.param_spec_object(name, nick, blurb, object_type, flags)¶
- Parameters:
name (
str) – canonical name of the property specifiedobject_type (
GObject.GType) – aDEX_TYPE_OBJECTderived type for this propertyflags (
GObject.ParamFlags) – flags for the property specified
- Returns:
a newly created parameter specification
- Return type:
Creates a new [class`GObject`.ParamSpec] instance specifying a
DEX_TYPE_OBJECTderived property.This is similar to [func`GObject`.param_spec_object], but for
DexObjectinstances such as [class`Dex`.Future].Added in version 1.2.
- Dex.permission_acquire(permission)¶
- Parameters:
permission (
Gio.Permission) – a [class`Gio`.Permission]- Returns:
a [class`Dex`.Future] that resolves to
Trueor rejects with error.- Return type:
Wraps [method`Gio`.Permission.acquire_async].
Added in version 1.2.
- Dex.permission_release(permission)¶
- Parameters:
permission (
Gio.Permission) – a [class`Gio`.Permission]- Returns:
a [class`Dex`.Future] that resolves to
Trueor rejects with error.- Return type:
Wraps [method`Gio`.Permission.release_async].
Added in version 1.2.
- Dex.proxy_connect(proxy, connection, proxy_address)¶
- Parameters:
proxy (
Gio.Proxy) – a [iface`Gio`.Proxy]connection (
Gio.IOStream) – a [class`Gio`.IOStream]proxy_address (
Gio.ProxyAddress) – a [class`Gio`.ProxyAddress]
- Returns:
a [class`Dex`.Future] that resolves to a [class`Gio`.IOStream] or rejects with error.
- Return type:
Wraps [method`Gio`.Proxy.connect_async].
Added in version 1.2.
- Dex.proxy_resolver_lookup(resolver, uri)¶
- Parameters:
resolver (
Gio.ProxyResolver) – a [iface`Gio`.ProxyResolver]uri (
str) – a URI
- Returns:
a [class`Dex`.Future] that resolves to a string vector of proxy URIs or rejects with error.
- Return type:
Wraps [method`Gio`.ProxyResolver.lookup_async].
Added in version 1.2.
- Dex.resolver_lookup_by_address(resolver, address)¶
- Parameters:
resolver (
Gio.Resolver) – a [class`Gio`.Resolver]address (
Gio.InetAddress) – a [class`Gio`.InetAddress]
- Returns:
a [class`Dex`.Future] that resolves to a hostname string or rejects with error.
- Return type:
Wraps [method`Gio`.Resolver.lookup_by_address_async].
Added in version 1.2.
- Dex.resolver_lookup_by_name(resolver, address)¶
- Parameters:
resolver (
Gio.Resolver) – a [class`Gio`.Resolver]address (
str) – the address to look up
- Returns:
a [class`Dex`.Future] that resolves to a [struct`GLib`.List] of [class`Gio`.InetAddress].
- Return type:
- Dex.resolver_lookup_by_name_with_flags(resolver, address, flags)¶
- Parameters:
resolver (
Gio.Resolver) – a [class`Gio`.Resolver]address (
str) – hostname to look upflags (
Gio.ResolverNameLookupFlags) – lookup flags
- Returns:
a [class`Dex`.Future] that resolves to a [struct`GLib`.List] of [class`Gio`.InetAddress] or rejects with error.
- Return type:
Wraps [method`Gio`.Resolver.lookup_by_name_with_flags_async].
Added in version 1.2.
- Dex.resolver_lookup_records(resolver, rrname, record_type)¶
- Parameters:
resolver (
Gio.Resolver) – a [class`Gio`.Resolver]rrname (
str) – DNS record namerecord_type (
Gio.ResolverRecordType) – DNS record type
- Returns:
a [class`Dex`.Future] that resolves to a [struct`GLib`.List] of [struct`GLib`.Variant] or rejects with error.
- Return type:
Wraps [method`Gio`.Resolver.lookup_records_async].
Added in version 1.2.
- Dex.resolver_lookup_service(resolver, service, protocol, domain)¶
- Parameters:
resolver (
Gio.Resolver) – a [class`Gio`.Resolver]service (
str) – service nameprotocol (
str) – protocol namedomain (
str) – domain name
- Returns:
a [class`Dex`.Future] that resolves to a [struct`GLib`.List] of [struct`Gio`.SrvTarget] or rejects with error.
- Return type:
Wraps [method`Gio`.Resolver.lookup_service_async].
Added in version 1.2.
- Dex.socket_address_enumerator_next(enumerator)¶
- Parameters:
enumerator (
Gio.SocketAddressEnumerator) – a [class`Gio`.SocketAddressEnumerator]- Returns:
a [class`Dex`.Future] that resolves to a [class`Gio`.SocketAddress],
Noneat the end of the enumeration, or rejects with error.- Return type:
Wraps [method`Gio`.SocketAddressEnumerator.next_async].
Added in version 1.2.
- Dex.socket_client_connect(socket_client, socket_connectable)¶
- Parameters:
socket_client (
Gio.SocketClient) – a [class`Gio`.SocketClient]socket_connectable (
Gio.SocketConnectable) – a [iface`Gio`.SocketConnectable]
- Returns:
a [class`Dex`.Future] that resolves to a [class`Gio`.SocketConnection] or rejects with error.
- Return type:
- Dex.socket_client_connect_to_host(socket_client, host_and_port, default_port)¶
- Parameters:
socket_client (
Gio.SocketClient) – a [class`Gio`.SocketClient]host_and_port (
str) – host and optional port to connect todefault_port (
int) – default port to use
- Returns:
a [class`Dex`.Future] that resolves to a [class`Gio`.SocketConnection] or rejects with error.
- Return type:
Wraps [method`Gio`.SocketClient.connect_to_host_async].
Added in version 1.2.
- Dex.socket_client_connect_to_service(socket_client, domain, service)¶
- Parameters:
socket_client (
Gio.SocketClient) – a [class`Gio`.SocketClient]domain (
str) – domain to connect toservice (
str) – service to connect to
- Returns:
a [class`Dex`.Future] that resolves to a [class`Gio`.SocketConnection] or rejects with error.
- Return type:
Wraps [method`Gio`.SocketClient.connect_to_service_async].
Added in version 1.2.
- Dex.socket_client_connect_to_uri(socket_client, uri, default_port)¶
- Parameters:
socket_client (
Gio.SocketClient) – a [class`Gio`.SocketClient]uri (
str) – URI to connect todefault_port (
int) – default port to use
- Returns:
a [class`Dex`.Future] that resolves to a [class`Gio`.SocketConnection] or rejects with error.
- Return type:
Wraps [method`Gio`.SocketClient.connect_to_uri_async].
Added in version 1.2.
- Dex.socket_connection_connect(connection, address)¶
- Parameters:
connection (
Gio.SocketConnection) – a [class`Gio`.SocketConnection]address (
Gio.SocketAddress) – a [class`Gio`.SocketAddress]
- Returns:
a [class`Dex`.Future] that resolves to
Trueor rejects with error.- Return type:
Wraps [method`Gio`.SocketConnection.connect_async].
Added in version 1.2.
- Dex.socket_listener_accept(listener)¶
- Parameters:
listener (
Gio.SocketListener) – a [class`Gio`.SocketListener]- Returns:
a [class`Dex`.Future] that resolves to a [class`Gio`.SocketConnection] or rejects with error.
- Return type:
- Dex.socket_wait(socket, condition)¶
- Parameters:
socket (
Gio.Socket) – a [class`Gio`.Socket]condition (
GLib.IOCondition) – a [flags`GLib`.IOCondition] to wait for
- Returns:
a [class`Dex`.Future] that resolves to a [flags`GLib`.IOCondition].
- Return type:
Creates a [class`Dex`.Future] that resolves when socket satisfies condition.
The future resolves to the [flags`GLib`.IOCondition] reported by the socket source. This may include additional conditions such as
GObject.IOCondition.HUPorGObject.IOCondition.ERR.Added in version 1.2.
- Dex.subprocess_wait(subprocess)¶
- Parameters:
subprocess (
Gio.Subprocess) – a [class`Gio`.Subprocess]- Returns:
a [class`Dex`.Future] that resolves to
Trueor rejects with error.- Return type:
Wraps [method`Gio`.Subprocess.wait_async].
Added in version 1.2.
- Dex.subprocess_wait_check(subprocess)¶
- Parameters:
subprocess (
Gio.Subprocess) – a [class`Gio`.Subprocess]- Returns:
a [class`Dex`.Future] that will resolve when subprocess exits cleanly or reject upon signal or non-successful exit.
- Return type:
Creates a future that awaits for subprocess to complete using [method`Gio`.Subprocess.wait_check_async].
Added in version 0.4.
- Dex.test_add_func(testpath, test_func)¶
- Parameters:
testpath (
str) – test case pathtest_func (
GLib.TestFunc) – test function to execute from a fiber
Adds a test function like
GLib.test_add_func(), but runs test_func from a [class`Dex`.Fiber]. The calling thread is given a thread-default [class`Dex`.Scheduler] if it does not already have one, allowing tests to useDex.Future.await_() and related APIs directly.After test_func completes, the scheduler’s main context is iterated until no immediately pending sources remain.
- Dex.thread_spawn(thread_name, thread_func, *user_data)¶
- Parameters:
thread_func (
Dex.ThreadFunc) – the function to call on a thread
- Returns:
a [class`Dex`.Future] that resolves or rejects the value or error returned from thread_func as a [class`Dex`.Future].
- Return type:
Spawns a new thread named thread_name running thread_func with user_data passed to it.
thread_func must return a [class`Dex`.Future].
If this function is called from a thread that is not running a [class`Dex`.Scheduler] then the default scheduler will be used to call user_data_destroy.
If the resulting [class`Dex`.Future] has not resolved or rejected, then the same scheduler used to call user_data_destroy will be used to propagate the result to the caller.
Added in version 1.0.
- Dex.thread_wait_for(future)¶
- Parameters:
future (
Dex.Future) – a [class`Dex`.Future]- Raises:
- Returns:
Trueif future resolved, otherwiseFalseand error is set to the rejection.- Return type:
Use this when running on a thread spawned with
dex_thread_spawn()and you need to block the thread until future has resolved or rejected.Added in version 1.0.
- Dex.tls_connection_handshake(tls_connection, io_priority)¶
- Parameters:
tls_connection (
Gio.TlsConnection) – a [class`Gio`.TlsConnection]io_priority (
int) – the ‘IO priority [iface@Gio.AsyncResult#io-priority]’ of the request
- Returns:
a [class`Dex`.Future] that resolves to true or rejects with error.
- Return type:
Added in version 1.2.
- Dex.tls_database_lookup_certificate_for_handle(database, handle, interaction, flags)¶
- Parameters:
database (
Gio.TlsDatabase) – a [class`Gio`.TlsDatabase]handle (
str) – certificate handleinteraction (
Gio.TlsInteractionorNone) – a [class`Gio`.TlsInteraction], orNoneflags (
Gio.TlsDatabaseLookupFlags) – lookup flags
- Returns:
a [class`Dex`.Future] that resolves to a [class`Gio`.TlsCertificate] or rejects with error.
- Return type:
Wraps [method`Gio`.TlsDatabase.lookup_certificate_for_handle_async].
Added in version 1.2.
- Dex.tls_database_lookup_certificate_issuer(database, certificate, interaction, flags)¶
- Parameters:
database (
Gio.TlsDatabase) – a [class`Gio`.TlsDatabase]certificate (
Gio.TlsCertificate) – a [class`Gio`.TlsCertificate]interaction (
Gio.TlsInteractionorNone) – a [class`Gio`.TlsInteraction], orNoneflags (
Gio.TlsDatabaseLookupFlags) – lookup flags
- Returns:
a [class`Dex`.Future] that resolves to a [class`Gio`.TlsCertificate] or rejects with error.
- Return type:
Wraps [method`Gio`.TlsDatabase.lookup_certificate_issuer_async].
Added in version 1.2.
- Dex.tls_database_lookup_certificates_issued_by(database, issuer_raw_dn, interaction, flags)¶
- Parameters:
database (
Gio.TlsDatabase) – a [class`Gio`.TlsDatabase]issuer_raw_dn (
bytes) – issuer distinguished name bytesinteraction (
Gio.TlsInteractionorNone) – a [class`Gio`.TlsInteraction], orNoneflags (
Gio.TlsDatabaseLookupFlags) – lookup flags
- Returns:
a [class`Dex`.Future] that resolves to a [struct`GLib`.List] of [class`Gio`.TlsCertificate] or rejects with error.
- Return type:
Wraps [method`Gio`.TlsDatabase.lookup_certificates_issued_by_async].
Added in version 1.2.
- Dex.tls_database_verify_chain(database, chain, purpose, identity, interaction, flags)¶
- Parameters:
database (
Gio.TlsDatabase) – a [class`Gio`.TlsDatabase]chain (
Gio.TlsCertificate) – a [class`Gio`.TlsCertificate]purpose (
str) – certificate purposeidentity (
Gio.SocketConnectableorNone) – expected peer identity, orNoneinteraction (
Gio.TlsInteractionorNone) – a [class`Gio`.TlsInteraction], orNoneflags (
Gio.TlsDatabaseVerifyFlags) – verification flags
- Returns:
a [class`Dex`.Future] that resolves to [flags`Gio`.TlsCertificateFlags] or rejects with error.
- Return type:
Wraps [method`Gio`.TlsDatabase.verify_chain_async].
Added in version 1.2.
- Dex.tls_interaction_ask_password(interaction, password)¶
- Parameters:
interaction (
Gio.TlsInteraction) – a [class`Gio`.TlsInteraction]password (
Gio.TlsPassword) – a [class`Gio`.TlsPassword]
- Returns:
a [class`Dex`.Future] that resolves to a [enum`Gio`.TlsInteractionResult] or rejects with error.
- Return type:
Wraps [method`Gio`.TlsInteraction.ask_password_async].
Added in version 1.2.
- Dex.tls_interaction_request_certificate(interaction, connection, flags)¶
- Parameters:
interaction (
Gio.TlsInteraction) – a [class`Gio`.TlsInteraction]connection (
Gio.TlsConnection) – a [class`Gio`.TlsConnection]flags (
Gio.TlsCertificateRequestFlags) – certificate request flags
- Returns:
a [class`Dex`.Future] that resolves to a [enum`Gio`.TlsInteractionResult] or rejects with error.
- Return type:
Wraps [method`Gio`.TlsInteraction.request_certificate_async].
Added in version 1.2.
- Dex.unix_connection_receive_credentials(connection)¶
- Parameters:
connection (
Gio.UnixConnection) – a [class`Gio`.UnixConnection]- Returns:
a [class`Dex`.Future] that resolves to a [class`Gio`.Credentials] or rejects with error.
- Return type:
Wraps
g_unix_connection_receive_credentials_async().Added in version 1.2.
- Dex.unix_connection_send_credentials(connection)¶
- Parameters:
connection (
Gio.UnixConnection) – a [class`Gio`.UnixConnection]- Returns:
a [class`Dex`.Future] that resolves to
Trueor rejects with error.- Return type:
Wraps
g_unix_connection_send_credentials_async().Added in version 1.2.
- Dex.unlink(path)¶
- Parameters:
path (
str) – the path to unlink- Returns:
a [class`Dex`.Future] that resolves to an int of 0 on success or rejects with error.
- Return type:
This runs [func`GLib`.unlink] on a dedicated thread.
Added in version 1.1.
- Dex.value_dup_object(value)¶
- Parameters:
value (
GObject.Value) – aGValueinitialized with typeDEX_TYPE_OBJECT- Returns:
a
DexObject- Return type:
Dex.ObjectorNone
Retrieves the
DexObjectstored inside the givenvalue.Added in version 1.0.
- Dex.value_get_object(value)¶
- Parameters:
value (
GObject.Value) – aGValueinitialized with typeDEX_TYPE_OBJECT- Returns:
a
DexObject- Return type:
Dex.ObjectorNone
Retrieves the
DexObjectstored inside the givenvalue.Added in version 0.4.
- Dex.value_set_object(value, object)¶
- Parameters:
value (
GObject.Value) – a [struct`GObject`.Value] initialized with typeDEX_TYPE_OBJECTobject (
Dex.ObjectorNone) – aDexObjectorNone
Stores the given
DexObjectinsidevalue.The [struct`GObject`.Value] will acquire a reference to the
object.Added in version 0.4.
- Dex.value_take_object(value, object)¶
- Parameters:
value (
GObject.Value) – a [struct`GObject`.Value] initialized with typeDEX_TYPE_OBJECTobject (
Dex.ObjectorNone) – aDexObject
Stores the given
DexObjectinsidevalue.This function transfers the ownership of the
objectto theGValue.Added in version 0.4.