### Class

# Qmi Device

since: 1.0

#### Description [src]

    class Qmi.Device : GObject.Object
      implements Gio.AsyncInitable {
      /* No available fields */
    }

Generic QMI device handling routines

`QmiDevice` is a generic type in charge of controlling the access of multiple `QmiClient` objects to the managed QMI port.

A `QmiDevice` can only handle one single QMI port.

The `QmiDevice` structure contains private data and should only be accessed using the provided API.

Available since: 1.0

#### Ancestors

- GObject

#### Implements

- GAsyncInitable

#### Constructors

###### qmi_device_new_finish

Finishes an operation started with qmi_device_new().

since: 1.0

###### qmi_device_new_from_node_finish

Finishes an operation started with qmi_device_new_from_node().

since: 1.28

#### Functions

###### qmi_device_new

Asynchronously creates a `QmiDevice` object to manage `file`. When the operation is finished, `callback` will be invoked. You can then call `qmi_device_new_finish()` to get the result of the operation.

since: 1.0

###### qmi_device_new_from_node

Asynchronously creates a `QmiDevice` object to manage `node`. When the operation is finished, `callback` will be invoked. You can then call `qmi_device_new_finish()` to get the result of the operation.

since: 1.28

#### Instance methods

###### qmi_device_add_link

Asynchronously creates a new virtual network device node with a custom prefix on top of `base_ifname`. This allows having multiple net interfaces running on top of another using multiplexing.

since: 1.28

###### qmi_device_add_link_finish

Finishes an operation started with qmi_device_add_link().

since: 1.28

###### qmi_device_add_link_with_flags

Asynchronously creates a new virtual network device in the same way as `qmi_device_add_link()` does, but passing the additional `flags` to the kernel during the operation.

since: 1.30

###### qmi_device_add_link_with_flags_and_initial_mux_id

Asynchronously creates a new virtual network device in the same way as `qmi_device_add_link_with_flags()` does, but passing the additional `initial_mux_id` value from which the first available mux id interface should be looked for.

since: 1.30

###### qmi_device_add_link_with_flags_and_initial_mux_id_finish

Finishes an operation started with qmi_device_add_link_with_flags_and_initial_mux_id().

since: 1.30

###### qmi_device_add_link_with_flags_finish

Finishes an operation started with qmi_device_add_link_with_flags().

since: 1.30

###### qmi_device_allocate_client

Asynchronously allocates a new `QmiClient` in `self`.

since: 1.0

###### qmi_device_allocate_client_finish

Finishes an operation started with qmi_device_allocate_client().

since: 1.0

###### qmi_device_check_expected_data_format_supported

Checks whether the given data format is supported by the kernel. interface.

since: 1.28

###### qmi_device_check_link_supported

Checks whether link management is supported by the kernel.

since: 1.28

###### qmi_device_close_async

Asynchronously closes a `QmiDevice`, preventing any further I/O.

since: 1.18

###### qmi_device_close_finish

Finishes an operation started with qmi_device_close_async().

since: 1.18

###### qmi_device_command_abortable

Asynchronously sends a `QmiMessage` to the device.

since: 1.24

###### qmi_device_command_abortable_finish

Finishes an operation started with qmi_device_command_abortable().

since: 1.24

###### qmi_device_command_full

Asynchronously sends a `QmiMessage` to the device.

since: 1.18

###### qmi_device_command_full_finish

Finishes an operation started with qmi_device_command_full().

since: 1.18

###### qmi_device_delete_all_links

Asynchronously deletes all virtual network interfaces that have been previously created with `qmi_device_add_link()` in `base_ifname`.

since: 1.28

###### qmi_device_delete_all_links_finish

Finishes an operation started with qmi_device_delete_all_links().

since: 1.28

###### qmi_device_delete_link

Asynchronously deletes a virtual network interface that has been previously created with qmi_device_add_link().

since: 1.28

###### qmi_device_delete_link_finish

Finishes an operation started with qmi_device_delete_link().

since: 1.28

###### qmi_device_get_consecutive_timeouts

Gets the number of consecutive transaction timeouts in the device.

since: 1.32

###### qmi_device_get_expected_data_format

Retrieves the data format currently expected by the kernel in the network interface.

since: 1.14

###### qmi_device_get_file

Get the `GFile` associated with this `QmiDevice`.

since: 1.0

###### qmi_device_get_node

Get the `QrtrNode` associated with this `QmiDevice`.

since: 1.28

###### qmi_device_get_path

Get the system path of the underlying QMI device.

since: 1.0

###### qmi_device_get_path_display

Get the system path of the underlying QMI device in UTF-8.

since: 1.0

###### qmi_device_get_service_version_info

Asynchronously requests the service version information of the device.

since: 1.6

###### qmi_device_get_service_version_info_finish

Finishes an operation started with qmi_device_get_service_version_info().

since: 1.6

###### qmi_device_get_wwan_iface

Get the WWAN interface name associated with the QMI control port. This value will be loaded every time it’s asked for it.

since: 1.14

###### qmi_device_is_open

Checks whether the `QmiDevice` is open for I/O.

since: 1.0

###### qmi_device_list_links

Synchronously lists all virtual network interfaces that have been previously created with `qmi_device_add_link()` in `base_ifname`.

since: 1.28

###### qmi_device_open

Asynchronously opens a `QmiDevice` for I/O.

since: 1.0

###### qmi_device_open_finish

Finishes an asynchronous open operation started with qmi_device_open().

since: 1.0

###### qmi_device_peek_file

Get the `GFile` associated with this `QmiDevice`, without increasing the reference count on the returned object.

since: 1.0

###### qmi_device_peek_node

Get the `QrtrNode` associated with this `QmiDevice`, without increasing the reference count on the returned object.

since: 1.28

###### qmi_device_release_client

Asynchronously releases the `QmiClient` from the `QmiDevice`.

since: 1.0

###### qmi_device_release_client_finish

Finishes an operation started with qmi_device_release_client().

since: 1.0

###### qmi_device_set_expected_data_format

Configures the data format currently expected by the kernel in the network interface.

since: 1.14

###### qmi_device_set_instance_id

Sets the instance ID of the `QmiDevice`.

since: 1.0

###### qmi_device_set_instance_id_finish

Finishes an operation started with qmi_device_set_instance_id().

since: 1.0

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

##### Methods inherited from GAsyncInitable (3)

###### g_async_initable_init_async

Starts asynchronous initialization of the object implementing the interface. This must be done before any real use of the object after initial construction. If the object also implements `GInitable` you can optionally call `g_initable_init()` instead.

###### g_async_initable_init_finish

Finishes asynchronous initialization and returns the result. See g_async_initable_init_async().

###### g_async_initable_new_finish

Finishes the async construction for the various g_async_initable_new calls, returning the created object or `NULL` on error.

#### Properties

###### Qmi.Device:device-consecutive-timeouts

No description available.

since: 1.32

###### Qmi.Device:device-file

No description available.

since: 1.0

###### Qmi.Device:device-no-file-check

No description available.

since: 1.12

###### Qmi.Device:device-node

No description available.

since: 1.24

###### Qmi.Device:device-proxy-path

No description available.

since: 1.12

###### Qmi.Device:device-wwan-iface

No description available.

since: 1.14

#### Signals

###### Qmi.Device::device-removed

The ::device-removed signal is emitted when an unexpected port hang-up is received.

since: 1.20

###### Qmi.Device::indication

The ::indication signal gets emitted when a QMI indication is received.

since: 1.8

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

#### Class structure

    struct QmiDeviceClass {
      /* no available fields */
    }

No description available.