inhibit_device


Description:

[ Version ( since = "1.10" ) ]
public async bool inhibit_device (string uid, Cancellable? cancellable) throws Error

Asynchronously requests to add an inhibition on the device identified by uid.

The uid must be the unique ID retrieved from an existing Modem using get_device. The caller should keep track of this uid and use it in the uninhibit_device call when the inhibition is no longer required.

The inhibition added with this method may also be automatically removed when the caller program disappears from the bus (e.g. if the program ends before having called uninhibit_device explicitly).

When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from. You can then call inhibit_device.end to get the result of the operation.

See inhibit_device_sync for the synchronous, blocking version of this method.

Parameters:

this

A Manager.

uid

the unique ID of the physical device.

cancellable

A Cancellable or null.

callback

A TaskReadyCallback to call when the request is satisfied or null.

user_data

User data to pass to callback.




2022 vala-language.org