Functions¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- Dex.aio_read(aio_context, fd, buffer, count, offset)¶
- Parameters:
- Returns:
a future that will resolve when the read completes or rejects with error.
- Return type:
An asynchronous
pread()
wrapper.
- Dex.aio_write(aio_context, fd, buffer, count, offset)¶
- Parameters:
- Returns:
a future that will resolve when the write completes or rejects with error.
- Return type:
An asynchronous
pwrite()
wrapper.
- Dex.bus_get(bus_type)¶
- Parameters:
bus_type (
Gio.BusType
) –- Returns:
a
Dex.Future
that resolves to aGio.DBusConnection
or rejects with error.- Return type:
Wrapper for
Gio.bus_get
().New in version 0.4.
- Dex.dbus_connection_call(connection, bus_name, object_path, interface_name, method_name, parameters, reply_type, flags, timeout_msec)¶
- Parameters:
connection (
Gio.DBusConnection
) –bus_name (
str
) –object_path (
str
) –interface_name (
str
) –method_name (
str
) –parameters (
GLib.Variant
) –reply_type (
GLib.VariantType
) –flags (
Gio.DBusCallFlags
) –timeout_msec (
int
) –
- Returns:
a
Dex.Future
that resolves to aGLib.Variant
or rejects with error.- Return type:
Wrapper for
Gio.DBusConnection.call
().New 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
) –bus_name (
str
) –object_path (
str
) –interface_name (
str
) –method_name (
str
) –parameters (
GLib.Variant
) –reply_type (
GLib.VariantType
) –flags (
Gio.DBusCallFlags
) –timeout_msec (
int
) –fd_list (
Gio.UnixFDList
orNone
) – aGio.UnixFDList
- Returns:
a
Dex.FutureSet
that resolves to aGLib.Variant
. TheDex.Future
containing the resultingGio.UnixFDList
can be retrieved withDex.FutureSet.get_future_at
() with an index of 1.- Return type:
Wrapper for
Gio.DBusConnection.call_with_unix_fd_list
().New in version 0.4.
- Dex.dbus_connection_send_message_with_reply(connection, message, flags, timeout_msec)¶
- Parameters:
connection (
Gio.DBusConnection
) – aGio.DBusConnection
message (
Gio.DBusMessage
) – aGio.DBusMessage
flags (
Gio.DBusSendMessageFlags
) – flags for messagetimeout_msec (
int
) – timeout in milliseconds, or -1 for default, orGObject.G_MAXINT
for no timeout.
- Returns:
a
Dex.Future
that will resolve to aGio.DBusMessage
or reject with failure.- out_serial:
a location for the message serial number
- Return type:
(
Dex.Future
, out_serial:int
)
Wrapper for
Gio.DBusConnection.send_message_with_reply
().New in version 0.4.
- Dex.file_copy(source, destination, flags, io_priority)¶
- Parameters:
flags (
Gio.FileCopyFlags
) – theGio.FileCopyFlags
io_priority (
int
) – IO priority such asGLib.PRIORITY_DEFAULT
- Returns:
- Return type:
Asynchronously copies a file and returns a
Dex.Future
which can be observed for the result.
- Dex.file_enumerate_children(file, attributes, flags, io_priority)¶
- Parameters:
file (
Gio.File
) –attributes (
str
) –flags (
Gio.FileQueryInfoFlags
) –io_priority (
int
) –
- Returns:
- Return type:
- Dex.file_enumerator_next_files(file_enumerator, num_files, io_priority)¶
- Parameters:
file_enumerator (
Gio.FileEnumerator
) –num_files (
int
) –io_priority (
int
) –
- Returns:
- Return type:
- Dex.file_make_directory(file, io_priority)¶
- Parameters:
io_priority (
int
) – IO priority such asGLib.PRIORITY_DEFAULT
- Returns:
- Return type:
Asynchronously creates a directory and returns
Dex.Future
which can be observed for the result.
- Dex.file_query_exists(file)¶
- Parameters:
- Returns:
a
Dex.Future
that will resolve withTrue
if the file exists, otherwise reject with error.- Return type:
Queries to see if file exists asynchronously.
New in version 0.6.
- Dex.file_query_info(file, attributes, flags, io_priority)¶
- Parameters:
file (
Gio.File
) –attributes (
str
) –flags (
Gio.FileQueryInfoFlags
) –io_priority (
int
) –
- Returns:
- Return type:
- Dex.file_read(file, io_priority)¶
- Parameters:
io_priority (
int
) – IO priority such asGLib.PRIORITY_DEFAULT
- Returns:
- Return type:
Asynchronously opens a file for reading.
- Dex.file_replace(file, etag, make_backup, flags, io_priority)¶
- Parameters:
file (
Gio.File
) –etag (
str
) –make_backup (
bool
) –flags (
Gio.FileCreateFlags
) –io_priority (
int
) –
- Returns:
- Return type:
- Dex.init()¶
- Dex.input_stream_close(self, io_priority)¶
- Parameters:
self (
Gio.InputStream
) –io_priority (
int
) –
- Returns:
- Return type:
- Dex.input_stream_read(self, buffer, count, io_priority)¶
- Parameters:
self (
Gio.InputStream
) –count (
int
) –io_priority (
int
) –
- Returns:
- Return type:
- Dex.input_stream_read_bytes(self, count, io_priority)¶
- Parameters:
self (
Gio.InputStream
) –count (
int
) –io_priority (
int
) –
- Returns:
- Return type:
- Dex.input_stream_skip(self, count, io_priority)¶
- Parameters:
self (
Gio.InputStream
) –count (
int
) – the number of bytes to skipio_priority (
int
) –GLib.PRIORITY_DEFAULT
or similar priority value
- Returns:
- Return type:
- Dex.io_stream_close(io_stream, io_priority)¶
- Parameters:
io_stream (
Gio.IOStream
) –io_priority (
int
) –
- Returns:
- Return type:
- Dex.output_stream_close(self, io_priority)¶
- Parameters:
self (
Gio.OutputStream
) –io_priority (
int
) –
- Returns:
- Return type:
- Dex.output_stream_splice(output, input, flags, io_priority)¶
- Parameters:
output (
Gio.OutputStream
) –input (
Gio.InputStream
) –flags (
Gio.OutputStreamSpliceFlags
) –io_priority (
int
) –
- Returns:
- Return type:
- Dex.output_stream_write(self, buffer, count, io_priority)¶
- Parameters:
self (
Gio.OutputStream
) –count (
int
) –io_priority (
int
) –
- Returns:
- Return type:
- Dex.output_stream_write_bytes(self, bytes, io_priority)¶
- Parameters:
self (
Gio.OutputStream
) –bytes (
GLib.Bytes
) –io_priority (
int
) –
- Returns:
- Return type:
- Dex.resolver_lookup_by_name(resolver, address)¶
- Parameters:
resolver (
Gio.Resolver
) –address (
str
) –
- Returns:
- Return type:
- Dex.socket_client_connect(socket_client, socket_connectable)¶
- Parameters:
socket_client (
Gio.SocketClient
) –socket_connectable (
Gio.SocketConnectable
) –
- Returns:
- Return type:
- Dex.socket_listener_accept(listener)¶
- Parameters:
listener (
Gio.SocketListener
) –- Returns:
- Return type:
- Dex.subprocess_wait_check(subprocess)¶
- Parameters:
subprocess (
Gio.Subprocess
) – aGio.Subprocess
- Returns:
a
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
Gio.Subprocess.wait_check_async
().New in version 0.4.
- Dex.value_get_object(value)¶
- Parameters:
value (
GObject.Value
) – aGValue
initialized with typeDEX_TYPE_OBJECT
- Returns:
a
DexObject
- Return type:
Dex.Object
orNone
Retrieves the
DexObject
stored inside the givenvalue
.New in version 0.4.
- Dex.value_set_object(value, object)¶
- Parameters:
value (
GObject.Value
) – a [struct`GObject`.Value] initialized with typeDEX_TYPE_OBJECT
object (
Dex.Object
orNone
) – aDexObject
orNone
Stores the given
DexObject
insidevalue
.The [struct`GObject`.Value] will acquire a reference to the
object
.New in version 0.4.
- Dex.value_take_object(value, object)¶
- Parameters:
value (
GObject.Value
) – a [struct`GObject`.Value] initialized with typeDEX_TYPE_OBJECT
object (
Dex.Object
orNone
) – aDexObject
Stores the given
DexObject
insidevalue
.This function transfers the ownership of the
object
to theGValue
.New in version 0.4.