## Ussd service Ussd service — Support for the Ussd service. |

## Functions

MbimMessage * | mbim_message_ussd_set_new ()
gboolean | mbim_message_ussd_response_parse ()
gboolean | mbim_message_ussd_notification_parse ()

## Description

This section implements support for requests, responses and notifications in the Ussd service.

## Functions

### 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.

#### Parameters

action | the 'Action' field, given as a MbimUssdAction. | [in]
data_coding_scheme | the 'DataCodingScheme' field, given as a guint32. | [in]
payload_size | size of the payload array. | [in]
payload | the 'Payload' field, given as an array of guint8 values. | [in][element-type guint8][array length=payload_size]
error | return location for error or `NULL`. |

#### Returns

a newly allocated MbimMessage, which should be freed with `mbim_message_unref()`.

Since: 1.4

### mbim_message_ussd_response_parse ()

    gboolean
    mbim_message_ussd_response_parse (const MbimMessage *message,
                                      MbimUssdResponse *out_response,
                                      MbimUssdSessionState *out_session_state,
                                      guint32 *out_data_coding_scheme,
                                      guint32 *out_payload_size,
                                      const guint8 **out_payload,
                                      GError **error);

Parses and returns parameters of the '' response command in the 'USSD' service.

#### Parameters

message | the MbimMessage. |
out_response | return location for a MbimUssdResponse, or `NULL` if the 'Response' field is not needed. | [out][optional][transfer none]
out_session_state | return location for a MbimUssdSessionState, or `NULL` if the 'SessionState' field is not needed. | [out][optional][transfer none]
out_data_coding_scheme | return location for a guint32, or `NULL` if the 'DataCodingScheme' field is not needed. | [out][optional][transfer none]
out_payload_size | return location for the size of the payload array. | [out][optional]
out_payload | return location for an array of guint8 values. Do not free the returned value, it is owned by `message` . | [out][optional][transfer none][element-type guint8][array length=out_payload_size]
error | return location for error or `NULL`. |

#### Returns

`TRUE` if the message was correctly parsed, `FALSE` if `error` is set.

Since: 1.4

### mbim_message_ussd_notification_parse ()

    gboolean
    mbim_message_ussd_notification_parse (const MbimMessage *message,
                                          MbimUssdResponse *out_response,
                                          MbimUssdSessionState *out_session_state,
                                          guint32 *out_data_coding_scheme,
                                          guint32 *out_payload_size,
                                          const guint8 **out_payload,
                                          GError **error);

Parses and returns parameters of the '' notification command in the 'USSD' service.

#### Parameters

message | the MbimMessage. |
out_response | return location for a MbimUssdResponse, or `NULL` if the 'Response' field is not needed. | [out][optional][transfer none]
out_session_state | return location for a MbimUssdSessionState, or `NULL` if the 'SessionState' field is not needed. | [out][optional][transfer none]
out_data_coding_scheme | return location for a guint32, or `NULL` if the 'DataCodingScheme' field is not needed. | [out][optional][transfer none]
out_payload_size | return location for the size of the payload array. | [out][optional]
out_payload | return location for an array of guint8 values. Do not free the returned value, it is owned by `message` . | [out][optional][transfer none][element-type guint8][array length=out_payload_size]
error | return location for error or `NULL`. |

#### Returns

`TRUE` if the message was correctly parsed, `FALSE` if `error` is set.

Since: 1.4