set_power_state


Description:

[ Version ( since = "1.0" ) ]
public async bool set_power_state (ModemPowerState state, Cancellable? cancellable) throws Error

Asynchronously sets the power state of the device.

This method can only be used while the modem is in mm_modem_state_disabled state.

When the operation is finished, callback will be invoked in the <link linkend="g-main-context-push-thread-default"> thread-default main loop</link> of the thread you are calling this method from. You can then call set_power_state.end to get the result of the operation.

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

Parameters:

this

A Modem.

state

Either mm_modem_power_state_low or mm_modem_power_state_on. Every other ModemPowerState value is not allowed.

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.