Method

HitakiEfwProtocoltransaction

Declaration [src]

gboolean
hitaki_efw_protocol_transaction (
  HitakiEfwProtocol* self,
  guint category,
  guint command,
  const guint32* args,
  gsize arg_count,
  guint32* const* params,
  gsize* param_count,
  guint timeout_ms,
  GError** error
)

Description [src]

Transfer asynchronous transaction for request frame of Echo Efw protocol and wait for response matched to the command. The call results in HitakiEfwProtocol::responded signal with data of response.

Parameters

category guint
 

One of category for the transaction.

command guint
 

One of commands for the transaction.

args An array of guint32
 

An array with elements for quadlet data as arguments for command.

 The argument can be NULL.
 The length of the array is specified in the arg_count argument.
 The data is owned by the caller of the function.
arg_count gsize
 

The number of quadlets in the args array.

params An array of guint32*
 

An array with elements for quadlet data to save parameters in response. Callers should give it for buffer with enough space against the request since this library performs no reallocation. Due to the reason, the value of this argument should point to the pointer to the array and immutable. The content of array is mutable for parameters in response.

 The argument will be modified by the function.
 The argument can be set to NULL.
 The length of the array is specified in the param_count argument.
 The instance takes ownership of the data, and is responsible for freeing it.
param_count gsize*
 

The number of quadlets in the params array.

 The argument will be modified by the function.
timeout_ms guint
 

The timeout to wait for response.

error GError **
  The return location for a GError*, or NULL.

Return value

Returns: gboolean
 

TRUE if the overall operation finished successfully, else FALSE.