Atds service

Atds service — Support for the Atds service.

Functions

Types and Values

Description

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

Functions

mbim_atds_provider_array_free ()

void
mbim_atds_provider_array_free (MbimAtdsProviderArray *array);

Frees the memory allocated for the array of MbimAtdsProvider structs.

Parameters

array

a NULL terminated array of MbimAtdsProvider structs.

 

Since: 1.16


mbim_message_atds_signal_query_new ()

MbimMessage *
mbim_message_atds_signal_query_new (GError **error);

Create a new request for the 'Signal' query command in the 'ATDS' service.

Parameters

error

return location for error or NULL.

 

Returns

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

Since: 1.16


mbim_message_atds_signal_response_parse ()

gboolean
mbim_message_atds_signal_response_parse
                               (const MbimMessage *message,
                                guint32 *out_rssi,
                                guint32 *out_error_rate,
                                guint32 *out_rscp,
                                guint32 *out_ecno,
                                guint32 *out_rsrq,
                                guint32 *out_rsrp,
                                guint32 *out_rssnr,
                                GError **error);

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

Parameters

message

the MbimMessage.

 

out_rssi

return location for a guint32, or NULL if the 'Rssi' field is not needed.

[out][optional][transfer none]

out_error_rate

return location for a guint32, or NULL if the 'ErrorRate' field is not needed.

[out][optional][transfer none]

out_rscp

return location for a guint32, or NULL if the 'Rscp' field is not needed.

[out][optional][transfer none]

out_ecno

return location for a guint32, or NULL if the 'Ecno' field is not needed.

[out][optional][transfer none]

out_rsrq

return location for a guint32, or NULL if the 'Rsrq' field is not needed.

[out][optional][transfer none]

out_rsrp

return location for a guint32, or NULL if the 'Rsrp' field is not needed.

[out][optional][transfer none]

out_rssnr

return location for a guint32, or NULL if the 'Rssnr' field is not needed.

[out][optional][transfer none]

error

return location for error or NULL.

 

Returns

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

Since: 1.16


mbim_message_atds_location_query_new ()

MbimMessage *
mbim_message_atds_location_query_new (GError **error);

Create a new request for the 'Location' query command in the 'ATDS' service.

Parameters

error

return location for error or NULL.

 

Returns

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

Since: 1.16


mbim_message_atds_location_response_parse ()

gboolean
mbim_message_atds_location_response_parse
                               (const MbimMessage *message,
                                guint32 *out_lac,
                                guint32 *out_tac,
                                guint32 *out_cell_id,
                                GError **error);

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

Parameters

message

the MbimMessage.

 

out_lac

return location for a guint32, or NULL if the 'Lac' field is not needed.

[out][optional][transfer none]

out_tac

return location for a guint32, or NULL if the 'Tac' field is not needed.

[out][optional][transfer none]

out_cell_id

return location for a guint32, or NULL if the 'CellId' field is not needed.

[out][optional][transfer none]

error

return location for error or NULL.

 

Returns

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

Since: 1.16


mbim_message_atds_operators_query_new ()

MbimMessage *
mbim_message_atds_operators_query_new (GError **error);

Create a new request for the 'Operators' query command in the 'ATDS' service.

Parameters

error

return location for error or NULL.

 

Returns

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

Since: 1.16


mbim_message_atds_operators_response_parse ()

gboolean
mbim_message_atds_operators_response_parse
                               (const MbimMessage *message,
                                guint32 *out_providers_count,
                                MbimAtdsProviderArray **out_providers,
                                GError **error);

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

Parameters

message

the MbimMessage.

 

out_providers_count

return location for a guint32, or NULL if the 'ProvidersCount' field is not needed.

[out][optional][transfer none]

out_providers

return location for a newly allocated array of MbimAtdsProvider items, or NULL if the 'Providers' field is not needed. Free the returned value with mbim_atds_provider_array_free().

[out][optional][transfer full][array zero-terminated=1][element-type MbimAtdsProvider]

error

return location for error or NULL.

 

Returns

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

Since: 1.16


mbim_message_atds_rat_query_new ()

MbimMessage *
mbim_message_atds_rat_query_new (GError **error);

Create a new request for the 'RAT' query command in the 'ATDS' service.

Parameters

error

return location for error or NULL.

 

Returns

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

Since: 1.16


mbim_message_atds_rat_set_new ()

MbimMessage *
mbim_message_atds_rat_set_new (MbimAtdsRatMode mode,
                               GError **error);

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

Parameters

mode

the 'Mode' field, given as a MbimAtdsRatMode.

[in]

error

return location for error or NULL.

 

Returns

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

Since: 1.16


mbim_message_atds_rat_response_parse ()

gboolean
mbim_message_atds_rat_response_parse (const MbimMessage *message,
                                      MbimAtdsRatMode *out_mode,
                                      GError **error);

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

Parameters

message

the MbimMessage.

 

out_mode

return location for a MbimAtdsRatMode, or NULL if the 'Mode' field is not needed.

[out][optional][transfer none]

error

return location for error or NULL.

 

Returns

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

Since: 1.16


mbim_message_atds_register_state_query_new ()

MbimMessage *
mbim_message_atds_register_state_query_new
                               (GError **error);

Create a new request for the 'Register State' query command in the 'ATDS' service.

Parameters

error

return location for error or NULL.

 

Returns

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

Since: 1.16


mbim_message_atds_register_state_response_parse ()

gboolean
mbim_message_atds_register_state_response_parse
                               (const MbimMessage *message,
                                MbimNwError *out_nw_error,
                                MbimRegisterState *out_register_state,
                                MbimRegisterMode *out_register_mode,
                                MbimDataClass *out_available_data_classes,
                                MbimCellularClass *out_current_cellular_class,
                                gchar **out_provider_id,
                                gchar **out_provider_name,
                                gchar **out_roaming_text,
                                MbimRegistrationFlag *out_registration_flag,
                                GError **error);

Parses and returns parameters of the 'Register State' response command in the 'ATDS' service.

Parameters

message

the MbimMessage.

 

out_nw_error

return location for a MbimNwError, or NULL if the 'NwError' field is not needed.

[out][optional][transfer none]

out_register_state

return location for a MbimRegisterState, or NULL if the 'RegisterState' field is not needed.

[out][optional][transfer none]

out_register_mode

return location for a MbimRegisterMode, or NULL if the 'RegisterMode' field is not needed.

[out][optional][transfer none]

out_available_data_classes

return location for a MbimDataClass, or NULL if the 'AvailableDataClasses' field is not needed.

[out][optional][transfer none]

out_current_cellular_class

return location for a MbimCellularClass, or NULL if the 'CurrentCellularClass' field is not needed.

[out][optional][transfer none]

out_provider_id

return location for a newly allocated string, or NULL if the 'ProviderId' field is not needed. Free the returned value with g_free().

[out][optional][transfer full]

out_provider_name

return location for a newly allocated string, or NULL if the 'ProviderName' field is not needed. Free the returned value with g_free().

[out][optional][transfer full]

out_roaming_text

return location for a newly allocated string, or NULL if the 'RoamingText' field is not needed. Free the returned value with g_free().

[out][optional][transfer full]

out_registration_flag

return location for a MbimRegistrationFlag, or NULL if the 'RegistrationFlag' field is not needed.

[out][optional][transfer none]

error

return location for error or NULL.

 

Returns

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

Since: 1.16

Types and Values

MbimAtdsProvider

typedef struct {
    gchar *provider_id;
    guint32 provider_state;
    gchar *provider_name;
    guint32 plmn_mode;
    guint32 rssi;
    guint32 error_rate;
} MbimAtdsProvider;

A MbimAtdsProvider element.

Members

gchar *provider_id;

a string.

 

guint32 provider_state;

a MbimProviderState given as a guint32.

 

gchar *provider_name;

a string.

 

guint32 plmn_mode;

a MbimAtdsProviderPlmnMode given as a guint32.

 

guint32 rssi;

a guint32.

 

guint32 error_rate;

a guint32.

 

Since: 1.16


MbimAtdsProviderArray

typedef MbimAtdsProvider *MbimAtdsProviderArray;

A NULL-terminated array of MbimAtdsProvider elements.

Since: 1.24