USSD

## USSD USSD |

## Synopsis

    MbimMessage *       mbim_message_ussd_set_new           (MbimUssdAction action,
                                                             guint32 data_coding_scheme,
                                                             const guint32 payload_size,
                                                             const guint8 *payload,
                                                             GError **error);
    gboolean            mbim_message_ussd_response_parse    (const MbimMessage *message,
                                                             MbimUssdResponse *response,
                                                             MbimUssdSessionState *session_state,
                                                             guint32 *data_coding_scheme,
                                                             guint32 *payload_size,
                                                             const guint8 **payload,
                                                             GError **error);
    gboolean            mbim_message_ussd_notification_parse
                                                            (const MbimMessage *message,
                                                             MbimUssdResponse *response,
                                                             MbimUssdSessionState *session_state,
                                                             guint32 *data_coding_scheme,
                                                             guint32 *payload_size,
                                                             const guint8 **payload,
                                                             GError **error);

## Description

## Details

### mbim_message_ussd_set_new ()

    MbimMessage *       mbim_message_ussd_set_new           (MbimUssdAction action,
                                                             guint32 data_coding_scheme,
                                                             const guint32 payload_size,
                                                             const guint8 *payload,
                                                             GError **error);

Create a new request for the '' set command in the 'USSD' service.

`action` : | the 'Action' field, given as a MbimUssdAction.
`data_coding_scheme` : | the 'DataCodingScheme' field, given as a guint32.
`payload_size` : | size of the payload array.
`payload` : | the 'Payload' field, given as an array of guint8 values.
`error` : | return location for error or `NULL`.
Returns : | a newly allocated MbimMessage, which should be freed with `mbim_message_unref()`.

### mbim_message_ussd_response_parse ()

    gboolean            mbim_message_ussd_response_parse    (const MbimMessage *message,
                                                             MbimUssdResponse *response,
                                                             MbimUssdSessionState *session_state,
                                                             guint32 *data_coding_scheme,
                                                             guint32 *payload_size,
                                                             const guint8 **payload,
                                                             GError **error);

Create a new request for the 'Payload' response command in the 'USSD' service.

`message` : | the MbimMessage.
`response` : | return location for a MbimUssdResponse, or `NULL` if the 'Response' field is not needed.
`session_state` : | return location for a MbimUssdSessionState, or `NULL` if the 'SessionState' field is not needed.
`data_coding_scheme` : | return location for a guint32, or `NULL` if the 'DataCodingScheme' field is not needed.
`payload_size` : | return location for the size of the payload array.
`payload` : | return location for an array of guint8 values. Do not free the returned value, it is owned by `message`.
`error` : | return location for error or `NULL`.
Returns : | `TRUE` if the message was correctly parsed, `FALSE` if `error` is set.

### mbim_message_ussd_notification_parse ()

    gboolean            mbim_message_ussd_notification_parse
                                                            (const MbimMessage *message,
                                                             MbimUssdResponse *response,
                                                             MbimUssdSessionState *session_state,
                                                             guint32 *data_coding_scheme,
                                                             guint32 *payload_size,
                                                             const guint8 **payload,
                                                             GError **error);

Create a new request for the 'Payload' notification command in the 'USSD' service.

`message` : | the MbimMessage.
`response` : | return location for a MbimUssdResponse, or `NULL` if the 'Response' field is not needed.
`session_state` : | return location for a MbimUssdSessionState, or `NULL` if the 'SessionState' field is not needed.
`data_coding_scheme` : | return location for a guint32, or `NULL` if the 'DataCodingScheme' field is not needed.
`payload_size` : | return location for the size of the payload array.
`payload` : | return location for an array of guint8 values. Do not free the returned value, it is owned by `message`.
`error` : | return location for error or `NULL`.
Returns : | `TRUE` if the message was correctly parsed, `FALSE` if `error` is set.