DMS Get Power State response

DMS Get Power State response — Methods to manage the DMS Get Power State response.

Functions

Types and Values

Object Hierarchy

    GBoxed
    ╰── QmiMessageDmsGetPowerStateOutput

Description

Collection of methods to create requests and parse responses of the DMS Get Power State message.

Functions

qmi_message_dms_get_power_state_output_ref ()

QmiMessageDmsGetPowerStateOutput *
qmi_message_dms_get_power_state_output_ref
                               (QmiMessageDmsGetPowerStateOutput *self);

Atomically increments the reference count of self by one.

Parameters

Returns

the new reference to self .

Since: 1.0


qmi_message_dms_get_power_state_output_unref ()

void
qmi_message_dms_get_power_state_output_unref
                               (QmiMessageDmsGetPowerStateOutput *self);

Atomically decrements the reference count of self by one. If the reference count drops to 0, self is completely disposed.

Parameters

Since: 1.0


qmi_message_dms_get_power_state_output_get_result ()

gboolean
qmi_message_dms_get_power_state_output_get_result
                               (QmiMessageDmsGetPowerStateOutput *self,
                                GError **error);

Get the result of the QMI operation.

Parameters

self

a QmiMessageDmsGetPowerStateOutput.

 

error

Return location for error or NULL.

 

Returns

TRUE if the QMI operation succeeded, FALSE if error is set.

[skip]

Since: 1.0


qmi_message_dms_get_power_state_output_get_info ()

gboolean
qmi_message_dms_get_power_state_output_get_info
                               (QmiMessageDmsGetPowerStateOutput *self,
                                guint8 *value_info_power_state_flags,
                                guint8 *value_info_battery_level,
                                GError **error);

Get the 'Info' field from self .

Parameters

self

a QmiMessageDmsGetPowerStateOutput.

 

value_info_power_state_flags

a placeholder for the output guint8, or NULL if not required.

[out][optional]

value_info_battery_level

a placeholder for the output guint8, or NULL if not required.

[out][optional]

error

Return location for error or NULL.

 

Returns

TRUE if the field is found, FALSE otherwise.

[skip]

Since: 1.0


qmi_message_dms_get_power_state_response_parse ()

QmiMessageDmsGetPowerStateOutput *
qmi_message_dms_get_power_state_response_parse
                               (QmiMessage *message,
                                GError **error);

Parses a QmiMessage and builds a QmiMessageDmsGetPowerStateOutput out of it. The operation fails if the message is of the wrong type.

Parameters

message

a QmiMessage.

 

error

return location for error or NULL.

 

Returns

a QmiMessageDmsGetPowerStateOutput, or NULL if error is set. The returned value should be freed with qmi_message_dms_get_power_state_output_unref().

Since: 1.34


qmi_client_dms_get_power_state ()

void
qmi_client_dms_get_power_state (QmiClientDms *self,
                                gpointer unused,
                                guint timeout,
                                GCancellable *cancellable,
                                GAsyncReadyCallback callback,
                                gpointer user_data);

Asynchronously sends a Get Power State request to the device.

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 qmi_client_dms_get_power_state_finish() to get the result of the operation.

Parameters

self

a QmiClientDms.

 

unused

NULL. This message doesn't have any input bundle.

 

timeout

maximum time to wait for the method to complete, in seconds.

 

cancellable

a GCancellable or NULL.

 

callback

a GAsyncReadyCallback to call when the request is satisfied.

 

user_data

user data to pass to callback .

 

Since: 1.0


qmi_client_dms_get_power_state_finish ()

QmiMessageDmsGetPowerStateOutput *
qmi_client_dms_get_power_state_finish (QmiClientDms *self,
                                       GAsyncResult *res,
                                       GError **error);

Finishes an async operation started with qmi_client_dms_get_power_state().

Parameters

self

a QmiClientDms.

 

res

the GAsyncResult obtained from the GAsyncReadyCallback passed to qmi_client_dms_get_power_state().

 

error

Return location for error or NULL.

 

Returns

a QmiMessageDmsGetPowerStateOutput, or NULL if error is set. The returned value should be freed with qmi_message_dms_get_power_state_output_unref().

Since: 1.0

Types and Values

QmiMessageDmsGetPowerStateOutput

typedef struct _QmiMessageDmsGetPowerStateOutput QmiMessageDmsGetPowerStateOutput;

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

Since: 1.0