In preparation to add support for uqmid.
Move uqmi specific parts into directory uqmi/.
Move common parts used by both uqmid and uqmi into common/ directory.
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
-SET(SOURCES qmi-message.c mbim.c utils.c)
-SET(UQMI uqmi.c dev.c commands.c ${SOURCES})
-
FIND_PATH(ubox_include_dir libubox/usock.h)
FIND_PATH(blobmsg_json_include_dir libubox/blobmsg_json.h)
FIND_PATH(json_include_dir json-c/json.h json/json.h json.h)
ADD_CUSTOM_TARGET(gen-errors DEPENDS qmi-errors.c)
ADD_CUSTOM_TARGET(gen-headers DEPENDS ${service_headers})
-ADD_EXECUTABLE(uqmi ${UQMI} ${service_sources})
-ADD_DEPENDENCIES(uqmi gen-headers gen-errors)
-
-TARGET_LINK_LIBRARIES(uqmi ${LIBS})
-TARGET_INCLUDE_DIRECTORIES(uqmi PRIVATE ${ubox_include_dir} ${blobmsg_json_include_dir} ${json_include_dir} ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR})
+INCLUDE_DIRECTORIES(common ${CMAKE_BINARY_DIR})
+ADD_LIBRARY(qmigen ${service_sources})
+ADD_DEPENDENCIES(qmigen gen-headers gen-errors)
-INSTALL(TARGETS uqmi
- RUNTIME DESTINATION sbin
-)
+ADD_SUBDIRECTORY(common)
+ADD_SUBDIRECTORY(uqmi)
+++ /dev/null
-/*
- * uqmi -- tiny QMI support implementation
- *
- * Copyright (C) 2014-2015 Felix Fietkau <nbd@openwrt.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA.
- */
-#include "qmi-message.h"
-
-static struct {
- QmiDmsUimPinId pin_id;
- char* pin;
- char* new_pin;
- char* puk;
-} dms_req_data;
-
-const char *oper_modes[] = {
- [QMI_DMS_OPERATING_MODE_ONLINE] = "online",
- [QMI_DMS_OPERATING_MODE_LOW_POWER] = "low_power",
- [QMI_DMS_OPERATING_MODE_FACTORY_TEST] = "factory_test",
- [QMI_DMS_OPERATING_MODE_OFFLINE] = "offline",
- [QMI_DMS_OPERATING_MODE_RESET] = "reset",
- [QMI_DMS_OPERATING_MODE_SHUTTING_DOWN] = "shutting_down",
- [QMI_DMS_OPERATING_MODE_PERSISTENT_LOW_POWER] = "persistent_low_power",
- [QMI_DMS_OPERATING_MODE_MODE_ONLY_LOW_POWER] = "mode_only_low_power",
-};
-
-static void cmd_dms_get_capabilities_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
-{
- void *t, *networks;
- int i;
- struct qmi_dms_get_capabilities_response res;
- const char *radio_cap[] = {
- [QMI_DMS_RADIO_INTERFACE_CDMA20001X] = "cdma1x",
- [QMI_DMS_RADIO_INTERFACE_EVDO] = "cdma1xevdo",
- [QMI_DMS_RADIO_INTERFACE_GSM] = "gsm",
- [QMI_DMS_RADIO_INTERFACE_UMTS] = "umts",
- [QMI_DMS_RADIO_INTERFACE_LTE] = "lte",
- };
- const char *service_cap[] = {
- [QMI_DMS_DATA_SERVICE_CAPABILITY_NONE] = "none",
- [QMI_DMS_DATA_SERVICE_CAPABILITY_CS] = "cs",
- [QMI_DMS_DATA_SERVICE_CAPABILITY_PS] = "ps",
- [QMI_DMS_DATA_SERVICE_CAPABILITY_SIMULTANEOUS_CS_PS] = "simultaneous_cs_ps",
- [QMI_DMS_DATA_SERVICE_CAPABILITY_NON_SIMULTANEOUS_CS_PS] = "non_simultaneous_cs_ps",
- };
-
- qmi_parse_dms_get_capabilities_response(msg, &res);
-
- t = blobmsg_open_table(&status, NULL);
-
- blobmsg_add_u32(&status, "max_tx_channel_rate", (int32_t) res.data.info.max_tx_channel_rate);
- blobmsg_add_u32(&status, "max_rx_channel_rate", (int32_t) res.data.info.max_rx_channel_rate);
- if ((int)res.data.info.data_service_capability >= 0 && res.data.info.data_service_capability < ARRAY_SIZE(service_cap))
- blobmsg_add_string(&status, "data_service", service_cap[res.data.info.data_service_capability]);
-
- if(res.data.info.sim_capability == QMI_DMS_SIM_CAPABILITY_NOT_SUPPORTED)
- blobmsg_add_string(&status, "sim", "not supported");
- else if(res.data.info.sim_capability == QMI_DMS_SIM_CAPABILITY_SUPPORTED)
- blobmsg_add_string(&status, "sim", "supported");
-
- networks = blobmsg_open_array(&status, "networks");
- for (i = 0; i < res.data.info.radio_interface_list_n; i++) {
- if ((int)res.data.info.radio_interface_list[i] >= 0 && res.data.info.radio_interface_list[i] < ARRAY_SIZE(radio_cap))
- blobmsg_add_string(&status, NULL, radio_cap[res.data.info.radio_interface_list[i]]);
- else
- blobmsg_add_string(&status, NULL, "unknown");
- }
- blobmsg_close_array(&status, networks);
-
- blobmsg_close_table(&status, t);
-}
-
-static enum qmi_cmd_result
-cmd_dms_get_capabilities_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- qmi_set_dms_get_capabilities_request(msg);
- return QMI_CMD_REQUEST;
-}
-
-const char *get_pin_status(int status)
-{
- static const char *pin_status[] = {
- [QMI_DMS_UIM_PIN_STATUS_NOT_INITIALIZED] = "not_initialized",
- [QMI_DMS_UIM_PIN_STATUS_ENABLED_NOT_VERIFIED] = "not_verified",
- [QMI_DMS_UIM_PIN_STATUS_ENABLED_VERIFIED] = "verified",
- [QMI_DMS_UIM_PIN_STATUS_DISABLED] = "disabled",
- [QMI_DMS_UIM_PIN_STATUS_BLOCKED] = "blocked",
- [QMI_DMS_UIM_PIN_STATUS_PERMANENTLY_BLOCKED] = "permanently_blocked",
- [QMI_DMS_UIM_PIN_STATUS_UNBLOCKED] = "unblocked",
- [QMI_DMS_UIM_PIN_STATUS_CHANGED] = "changed",
- };
- const char *res = "Unknown";
-
- if (status < ARRAY_SIZE(pin_status) && pin_status[status])
- res = pin_status[status];
-
- return res;
-}
-
-static void cmd_dms_get_pin_status_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
-{
- struct qmi_dms_uim_get_pin_status_response res;
- void *c;
-
- qmi_parse_dms_uim_get_pin_status_response(msg, &res);
- c = blobmsg_open_table(&status, NULL);
- if (res.set.pin1_status) {
- blobmsg_add_string(&status, "pin1_status", get_pin_status(res.data.pin1_status.current_status));
- blobmsg_add_u32(&status, "pin1_verify_tries", (int32_t) res.data.pin1_status.verify_retries_left);
- blobmsg_add_u32(&status, "pin1_unblock_tries", (int32_t) res.data.pin1_status.unblock_retries_left);
- }
- if (res.set.pin2_status) {
- blobmsg_add_string(&status, "pin2_status", get_pin_status(res.data.pin2_status.current_status));
- blobmsg_add_u32(&status, "pin2_verify_tries", (int32_t) res.data.pin2_status.verify_retries_left);
- blobmsg_add_u32(&status, "pin2_unblock_tries", (int32_t) res.data.pin2_status.unblock_retries_left);
- }
- blobmsg_close_table(&status, c);
-}
-
-static enum qmi_cmd_result
-cmd_dms_get_pin_status_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- qmi_set_dms_uim_get_pin_status_request(msg);
- return QMI_CMD_REQUEST;
-}
-
-#define cmd_dms_verify_pin1_cb no_cb
-static enum qmi_cmd_result
-cmd_dms_verify_pin1_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- struct qmi_dms_uim_verify_pin_request data = {
- QMI_INIT_SEQUENCE(info,
- .pin_id = QMI_DMS_UIM_PIN_ID_PIN,
- .pin = arg
- )
- };
- qmi_set_dms_uim_verify_pin_request(msg, &data);
- return QMI_CMD_REQUEST;
-}
-
-#define cmd_dms_verify_pin2_cb no_cb
-static enum qmi_cmd_result
-cmd_dms_verify_pin2_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- struct qmi_dms_uim_verify_pin_request data = {
- QMI_INIT_SEQUENCE(info,
- .pin_id = QMI_DMS_UIM_PIN_ID_PIN2,
- .pin = arg
- )
- };
- qmi_set_dms_uim_verify_pin_request(msg, &data);
- return QMI_CMD_REQUEST;
-}
-
-#define cmd_dms_set_pin_cb no_cb
-static enum qmi_cmd_result
-cmd_dms_set_pin_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- dms_req_data.pin = arg;
- return QMI_CMD_DONE;
-}
-
-static enum qmi_cmd_result
-cmd_dms_set_pin_protection_prepare(struct qmi_msg *msg, char *arg)
-{
- if (!dms_req_data.pin) {
- uqmi_add_error("Missing argument");
- return QMI_CMD_EXIT;
- }
-
- int is_enabled;
- if (strcasecmp(arg, "disabled") == 0)
- is_enabled = false;
- else if (strcasecmp(arg, "enabled") == 0)
- is_enabled = true;
- else {
- uqmi_add_error("Invalid value (valid: disabled, enabled)");
- return QMI_CMD_EXIT;
- }
-
- struct qmi_dms_uim_set_pin_protection_request dms_pin_protection_req = {
- QMI_INIT_SEQUENCE(info,
- .pin_id = dms_req_data.pin_id
- ),
- QMI_INIT_PTR(info.pin, dms_req_data.pin),
- QMI_INIT_PTR(info.protection_enabled, is_enabled)
- };
-
- qmi_set_dms_uim_set_pin_protection_request(msg, &dms_pin_protection_req);
- return QMI_CMD_REQUEST;
-}
-
-#define cmd_dms_set_pin1_protection_cb no_cb
-static enum qmi_cmd_result
-cmd_dms_set_pin1_protection_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- dms_req_data.pin_id = QMI_DMS_UIM_PIN_ID_PIN;
- return cmd_dms_set_pin_protection_prepare(msg, arg);
-}
-
-#define cmd_dms_set_pin2_protection_cb no_cb
-static enum qmi_cmd_result
-cmd_dms_set_pin2_protection_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- dms_req_data.pin_id = QMI_DMS_UIM_PIN_ID_PIN2;
- return cmd_dms_set_pin_protection_prepare(msg, arg);
-}
-
-static enum qmi_cmd_result
-cmd_dms_change_pin_prepare(struct qmi_msg *msg, char *arg)
-{
- if (!dms_req_data.pin || !dms_req_data.new_pin) {
- uqmi_add_error("Missing argument");
- return QMI_CMD_EXIT;
- }
-
- struct qmi_dms_uim_change_pin_request dms_change_pin_req = {
- QMI_INIT_SEQUENCE(info,
- .pin_id = dms_req_data.pin_id
- ),
- QMI_INIT_PTR(info.old_pin, dms_req_data.pin),
- QMI_INIT_PTR(info.new_pin, dms_req_data.new_pin)
- };
-
- qmi_set_dms_uim_change_pin_request(msg, &dms_change_pin_req);
- return QMI_CMD_REQUEST;
-}
-
-#define cmd_dms_change_pin1_cb no_cb
-static enum qmi_cmd_result
-cmd_dms_change_pin1_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- dms_req_data.pin_id = QMI_DMS_UIM_PIN_ID_PIN;
- return cmd_dms_change_pin_prepare(msg, arg);
-}
-
-#define cmd_dms_change_pin2_cb no_cb
-static enum qmi_cmd_result
-cmd_dms_change_pin2_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- dms_req_data.pin_id = QMI_DMS_UIM_PIN_ID_PIN2;
- return cmd_dms_change_pin_prepare(msg, arg);
-}
-
-#define cmd_dms_set_new_pin_cb no_cb
-static enum qmi_cmd_result
-cmd_dms_set_new_pin_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- dms_req_data.new_pin = arg;
- return QMI_CMD_DONE;
-}
-
-#define cmd_dms_set_puk_cb no_cb
-static enum qmi_cmd_result
-cmd_dms_set_puk_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- dms_req_data.puk = arg;
- return QMI_CMD_DONE;
-}
-
-#define cmd_dms_unblock_pin1_cb no_cb
-static enum qmi_cmd_result
-cmd_dms_unblock_pin1_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- if (!dms_req_data.puk || !dms_req_data.new_pin) {
- uqmi_add_error("Missing argument");
- return QMI_CMD_EXIT;
- }
-
- struct qmi_dms_uim_unblock_pin_request dms_unlock_pin_req = {
- QMI_INIT_SEQUENCE(info,
- .pin_id = QMI_DMS_UIM_PIN_ID_PIN
- ),
- QMI_INIT_PTR(info.puk, dms_req_data.puk),
- QMI_INIT_PTR(info.new_pin, dms_req_data.new_pin)
- };
-
- qmi_set_dms_uim_unblock_pin_request(msg, &dms_unlock_pin_req);
- return QMI_CMD_REQUEST;
-}
-
-#define cmd_dms_unblock_pin2_cb no_cb
-static enum qmi_cmd_result
-cmd_dms_unblock_pin2_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- if (!dms_req_data.puk || !dms_req_data.new_pin) {
- uqmi_add_error("Missing argument");
- return QMI_CMD_EXIT;
- }
-
- struct qmi_dms_uim_unblock_pin_request dms_unlock_pin_req = {
- QMI_INIT_SEQUENCE(info,
- .pin_id = QMI_DMS_UIM_PIN_ID_PIN2
- ),
- QMI_INIT_PTR(info.puk, dms_req_data.puk),
- QMI_INIT_PTR(info.new_pin, dms_req_data.new_pin)
- };
-
- qmi_set_dms_uim_unblock_pin_request(msg, &dms_unlock_pin_req);
- return QMI_CMD_REQUEST;
-}
-
-static void cmd_dms_get_iccid_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
-{
- struct qmi_dms_uim_get_iccid_response res;
-
- qmi_parse_dms_uim_get_iccid_response(msg, &res);
- if (res.data.iccid)
- blobmsg_add_string(&status, NULL, res.data.iccid);
-}
-
-static enum qmi_cmd_result
-cmd_dms_get_iccid_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- qmi_set_dms_uim_get_iccid_request(msg);
- return QMI_CMD_REQUEST;
-}
-
-static void cmd_dms_get_imsi_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
-{
- struct qmi_dms_uim_get_imsi_response res;
-
- qmi_parse_dms_uim_get_imsi_response(msg, &res);
- if (res.data.imsi)
- blobmsg_add_string(&status, NULL, res.data.imsi);
-}
-
-static enum qmi_cmd_result
-cmd_dms_get_imsi_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- qmi_set_dms_uim_get_imsi_request(msg);
- return QMI_CMD_REQUEST;
-}
-
-static void cmd_dms_get_msisdn_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
-{
- struct qmi_dms_get_msisdn_response res;
-
- qmi_parse_dms_get_msisdn_response(msg, &res);
- if (res.data.msisdn)
- blobmsg_add_string(&status, NULL, res.data.msisdn);
-}
-
-static enum qmi_cmd_result
-cmd_dms_get_msisdn_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- qmi_set_dms_get_msisdn_request(msg);
- return QMI_CMD_REQUEST;
-}
-
-static void cmd_dms_get_imei_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
-{
- struct qmi_dms_get_ids_response res;
-
- qmi_parse_dms_get_ids_response(msg, &res);
- if (res.data.imei)
- blobmsg_add_string(&status, NULL, res.data.imei);
-}
-
-static enum qmi_cmd_result
-cmd_dms_get_imei_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- qmi_set_dms_get_ids_request(msg);
- return QMI_CMD_REQUEST;
-}
-
-#define cmd_dms_reset_cb no_cb
-static enum qmi_cmd_result
-cmd_dms_reset_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- qmi_set_dms_reset_request(msg);
- return QMI_CMD_REQUEST;
-}
-
-static void
-cmd_dms_get_operating_mode_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
-{
- struct qmi_dms_get_operating_mode_response res;
-
- qmi_parse_dms_get_operating_mode_response(msg, &res);
- if (res.data.mode < ARRAY_SIZE(oper_modes))
- blobmsg_add_string(&status, NULL, oper_modes[res.data.mode]);
- else
- blobmsg_add_string(&status, NULL, "unknown");
-}
-
-static enum qmi_cmd_result
-cmd_dms_get_operating_mode_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- qmi_set_dms_get_operating_mode_request(msg);
- return QMI_CMD_REQUEST;
-}
-
-#define cmd_dms_set_operating_mode_cb no_cb
-static enum qmi_cmd_result
-cmd_dms_set_operating_mode_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- static struct qmi_dms_set_operating_mode_request sreq = {
- QMI_INIT(mode, QMI_DMS_OPERATING_MODE_ONLINE),
- };
- int i;
-
- for (i = 0; i < ARRAY_SIZE(oper_modes); i++) {
- if (!oper_modes[i])
- continue;
-
- if (strcmp(arg, oper_modes[i]) != 0)
- continue;
-
- sreq.data.mode = i;
- qmi_set_dms_set_operating_mode_request(msg, &sreq);
- return QMI_CMD_REQUEST;
- }
-
- return uqmi_add_error("Invalid argument");
-}
-
-#define cmd_dms_set_fcc_authentication_cb no_cb
-static enum qmi_cmd_result
-cmd_dms_set_fcc_authentication_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- qmi_set_dms_set_fcc_authentication_request(msg);
- return QMI_CMD_REQUEST;
-}
+++ /dev/null
-/*
- * uqmi -- tiny QMI support implementation
- *
- * Copyright (C) 2014-2015 Felix Fietkau <nbd@openwrt.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA.
- */
-
-#define __uqmi_dms_commands \
- __uqmi_command(dms_get_capabilities, get-capabilities, no, QMI_SERVICE_DMS), \
- __uqmi_command(dms_get_pin_status, get-pin-status, no, QMI_SERVICE_DMS), \
- __uqmi_command(dms_verify_pin1, verify-pin1, required, QMI_SERVICE_DMS), \
- __uqmi_command(dms_verify_pin2, verify-pin2, required, QMI_SERVICE_DMS), \
- __uqmi_command(dms_set_pin1_protection, set-pin1-protection, required, QMI_SERVICE_DMS), \
- __uqmi_command(dms_set_pin2_protection, set-pin2-protection, required, QMI_SERVICE_DMS), \
- __uqmi_command(dms_set_pin, pin, required, CMD_TYPE_OPTION), \
- __uqmi_command(dms_change_pin1, change-pin1, no, QMI_SERVICE_DMS), \
- __uqmi_command(dms_change_pin2, change-pin2, no, QMI_SERVICE_DMS), \
- __uqmi_command(dms_unblock_pin1, unblock-pin1, no, QMI_SERVICE_DMS), \
- __uqmi_command(dms_unblock_pin2, unblock-pin2, no, QMI_SERVICE_DMS), \
- __uqmi_command(dms_set_puk, puk, required, CMD_TYPE_OPTION), \
- __uqmi_command(dms_set_new_pin, new-pin, required, CMD_TYPE_OPTION), \
- __uqmi_command(dms_get_iccid, get-iccid, no, QMI_SERVICE_DMS), \
- __uqmi_command(dms_get_imsi, get-imsi, no, QMI_SERVICE_DMS), \
- __uqmi_command(dms_get_imei, get-imei, no, QMI_SERVICE_DMS), \
- __uqmi_command(dms_get_msisdn, get-msisdn, no, QMI_SERVICE_DMS), \
- __uqmi_command(dms_get_operating_mode, get-device-operating-mode, no, QMI_SERVICE_DMS), \
- __uqmi_command(dms_set_operating_mode, set-device-operating-mode, required, QMI_SERVICE_DMS), \
- __uqmi_command(dms_reset, reset-dms, no, QMI_SERVICE_DMS), \
- __uqmi_command(dms_set_fcc_authentication, fcc-auth, no, QMI_SERVICE_DMS) \
-
-#define dms_helptext \
- " --get-capabilities: List device capabilities\n" \
- " --get-pin-status: Get PIN verification status\n" \
- " --verify-pin1 <pin>: Verify PIN1\n" \
- " --verify-pin2 <pin>: Verify PIN2\n" \
- " --set-pin1-protection <state>: Set PIN1 protection state (disabled, enabled)\n" \
- " --pin <pin>: PIN1 needed to change state\n" \
- " --set-pin2-protection <state>: Set PIN2 protection state (disabled, enabled)\n" \
- " --pin <pin2>: PIN2 needed to change state\n" \
- " --change-pin1: Change PIN1\n" \
- " --pin <old pin>: Current PIN1\n" \
- " --new-pin <new pin>: New pin\n" \
- " --change-pin2: Change PIN2\n" \
- " --pin <old pin>: Current PIN2\n" \
- " --new-pin <new pin>: New pin\n" \
- " --unblock-pin1: Unblock PIN1\n" \
- " --puk <puk>: PUK needed to unblock\n" \
- " --new-pin <new pin>: New pin\n" \
- " --unblock-pin2: Unblock PIN2\n" \
- " --puk <puk>: PUK needed to unblock\n" \
- " --new-pin <new pin>: New pin\n" \
- " --get-iccid: Get the ICCID\n" \
- " --get-imsi: Get International Mobile Subscriber ID\n" \
- " --get-imei: Get International Mobile Equipment ID\n" \
- " --get-msisdn: Get the MSISDN (telephone number)\n" \
- " --reset-dms: Reset the DMS service\n" \
- " --get-device-operating-mode Get the device operating mode\n" \
- " --set-device-operating-mode <m> Set the device operating mode\n" \
- " (modes: online, low_power, factory_test, offline\n" \
- " reset, shutting_down, persistent_low_power,\n" \
- " mode_only_low_power)\n" \
- " --fcc-auth: Set FCC authentication\n" \
-
-const char *get_pin_status(int status);
+++ /dev/null
-/*
- * uqmi -- tiny QMI support implementation
- *
- * Copyright (C) 2014-2015 Felix Fietkau <nbd@openwrt.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA.
- */
-
-#include "uqmi.h"
-#include "qmi-message.h"
-#include "commands.h"
-
-#include <libubox/blobmsg.h>
-
-static struct qmi_nas_get_tx_rx_info_request tx_rx_req;
-static struct qmi_nas_set_system_selection_preference_request sel_req;
-static struct {
- bool mcc_is_set;
- bool mnc_is_set;
-} plmn_code_flag;
-
-static void
-print_earfcn_info(uint32_t earfcn)
-{
- /* https://www.sqimway.com/lte_band.php */
- static const struct {
- uint32_t min;
- uint32_t max;
- uint16_t band;
- uint16_t freq;
- const char *duplex;
- } earfcn_ranges[] = {
- { 0, 599, 1, 2100, "FDD" },
- { 600, 1199, 2, 1800, "FDD" },
- { 1200, 1949, 3, 1800, "FDD" },
- { 1950, 2399, 4, 1700, "FDD" },
- { 2400, 2649, 5, 850, "FDD" },
- { 2650, 2749, 6, 800, "FDD" },
- { 2750, 3449, 7, 2600, "FDD" },
- { 3450, 3799, 8, 900, "FDD" },
- { 3800, 4149, 9, 1800, "FDD" },
- { 4150, 4749, 10, 1700, "FDD" },
- { 4750, 4999, 11, 1500, "FDD" },
- { 5000, 5179, 12, 700, "FDD" },
- { 5180, 5279, 13, 700, "FDD" },
- { 5280, 5379, 14, 700, "FDD" },
- { 5730, 5849, 17, 700, "FDD" },
- { 5850, 5999, 18, 850, "FDD" },
- { 6000, 6149, 19, 850, "FDD" },
- { 6150, 6449, 20, 800, "FDD" },
- { 6450, 6599, 21, 1500, "FDD" },
- { 6600, 7399, 22, 3500, "FDD" },
- { 7500, 7699, 23, 2000, "FDD" },
- { 7700, 8039, 24, 1600, "FDD" },
- { 8040, 8689, 25, 1900, "FDD" },
- { 8690, 9039, 26, 850, "FDD" },
- { 9040, 9209, 27, 800, "FDD" },
- { 9210, 9659, 28, 700, "FDD" },
- { 9660, 9769, 29, 700, "SDL" },
- { 9770, 9869, 30, 2300, "FDD" },
- { 9870, 9919, 31, 450, "FDD" },
- { 9920, 10359, 32, 1500, "SDL" },
- { 36000, 36199, 33, 1900, "TDD" },
- { 36200, 36349, 34, 2000, "TDD" },
- { 36350, 36949, 35, 1900, "TDD" },
- { 36950, 37549, 36, 1900, "TDD" },
- { 37550, 37749, 37, 1900, "TDD" },
- { 37750, 38249, 38, 2600, "TDD" },
- { 38250, 38649, 39, 1900, "TDD" },
- { 38650, 39649, 40, 2300, "TDD" },
- { 39650, 41589, 41, 2500, "TDD" },
- { 41590, 43589, 42, 3500, "TDD" },
- { 43590, 45589, 43, 3700, "TDD" },
- { 45590, 46589, 44, 700, "TDD" },
- };
-
- for (int i = 0; i < (sizeof(earfcn_ranges) / sizeof(*earfcn_ranges)); i++) {
- if (earfcn <= earfcn_ranges[i].max && earfcn >= earfcn_ranges[i].min) {
- blobmsg_add_u32(&status, "band", earfcn_ranges[i].band);
- blobmsg_add_u32(&status, "frequency", earfcn_ranges[i].freq);
- blobmsg_add_string(&status, "duplex", earfcn_ranges[i].duplex);
- return;
- }
- }
-}
-
-#define cmd_nas_do_set_system_selection_cb no_cb
-static enum qmi_cmd_result
-cmd_nas_do_set_system_selection_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- qmi_set_nas_set_system_selection_preference_request(msg, &sel_req);
- return QMI_CMD_REQUEST;
-}
-
-static enum qmi_cmd_result
-do_sel_network(void)
-{
- static bool use_sel_req = false;
-
- if (!use_sel_req) {
- use_sel_req = true;
- uqmi_add_command(NULL, __UQMI_COMMAND_nas_do_set_system_selection);
- }
-
- return QMI_CMD_DONE;
-}
-
-#define cmd_nas_set_network_modes_cb no_cb
-static enum qmi_cmd_result
-cmd_nas_set_network_modes_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- static const struct {
- const char *name;
- QmiNasRatModePreference val;
- } modes[] = {
- { "cdma", QMI_NAS_RAT_MODE_PREFERENCE_CDMA_1X | QMI_NAS_RAT_MODE_PREFERENCE_CDMA_1XEVDO },
- { "td-scdma", QMI_NAS_RAT_MODE_PREFERENCE_TD_SCDMA },
- { "gsm", QMI_NAS_RAT_MODE_PREFERENCE_GSM },
- { "umts", QMI_NAS_RAT_MODE_PREFERENCE_UMTS },
- { "lte", QMI_NAS_RAT_MODE_PREFERENCE_LTE },
- };
- QmiNasRatModePreference val = 0;
- char *word;
- int i;
-
- for (word = strtok(arg, ",");
- word;
- word = strtok(NULL, ",")) {
- bool found = false;
-
- for (i = 0; i < ARRAY_SIZE(modes); i++) {
- if (strcmp(word, modes[i].name) != 0 &&
- strcmp(word, "all") != 0)
- continue;
-
- val |= modes[i].val;
- found = true;
- }
-
- if (!found) {
- uqmi_add_error("Invalid network mode");
- return QMI_CMD_EXIT;
- }
- }
-
- qmi_set(&sel_req, mode_preference, val);
- return do_sel_network();
-}
-
-#define cmd_nas_set_network_preference_cb no_cb
-static enum qmi_cmd_result
-cmd_nas_set_network_preference_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- QmiNasGsmWcdmaAcquisitionOrderPreference pref = QMI_NAS_GSM_WCDMA_ACQUISITION_ORDER_PREFERENCE_AUTOMATIC;
-
- if (!strcmp(arg, "gsm"))
- pref = QMI_NAS_GSM_WCDMA_ACQUISITION_ORDER_PREFERENCE_GSM;
- else if (!strcmp(arg, "wcdma"))
- pref = QMI_NAS_GSM_WCDMA_ACQUISITION_ORDER_PREFERENCE_WCDMA;
-
- qmi_set(&sel_req, gsm_wcdma_acquisition_order_preference, pref);
- return do_sel_network();
-}
-
-#define cmd_nas_set_roaming_cb no_cb
-static enum qmi_cmd_result
-cmd_nas_set_roaming_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- QmiNasRoamingPreference pref;
-
- if (!strcmp(arg, "any"))
- pref = QMI_NAS_ROAMING_PREFERENCE_ANY;
- else if (!strcmp(arg, "only"))
- pref = QMI_NAS_ROAMING_PREFERENCE_NOT_OFF;
- else if (!strcmp(arg, "off"))
- pref = QMI_NAS_ROAMING_PREFERENCE_OFF;
- else
- return uqmi_add_error("Invalid argument");
-
- qmi_set(&sel_req, roaming_preference, pref);
- return do_sel_network();
-}
-
-#define cmd_nas_set_mcc_cb no_cb
-static enum qmi_cmd_result
-cmd_nas_set_mcc_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- char *err;
- int value = strtoul(arg, &err, 10);
- if (err && *err) {
- uqmi_add_error("Invalid MCC value");
- return QMI_CMD_EXIT;
- }
-
- sel_req.data.network_selection_preference.mcc = value;
- plmn_code_flag.mcc_is_set = true;
- return QMI_CMD_DONE;
-}
-
-#define cmd_nas_set_mnc_cb no_cb
-static enum qmi_cmd_result
-cmd_nas_set_mnc_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- char *err;
- int value = strtoul(arg, &err, 10);
- if (err && *err) {
- uqmi_add_error("Invalid MNC value");
- return QMI_CMD_EXIT;
- }
-
- sel_req.data.network_selection_preference.mnc = value;
- plmn_code_flag.mnc_is_set = true;
- return QMI_CMD_DONE;
-}
-
-#define cmd_nas_set_plmn_cb no_cb
-static enum qmi_cmd_result
-cmd_nas_set_plmn_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- sel_req.set.network_selection_preference = 1;
- sel_req.data.network_selection_preference.mode = QMI_NAS_NETWORK_SELECTION_PREFERENCE_AUTOMATIC;
-
- if (!plmn_code_flag.mcc_is_set && plmn_code_flag.mnc_is_set) {
- uqmi_add_error("No MCC value");
- return QMI_CMD_EXIT;
- }
-
- if (plmn_code_flag.mcc_is_set && sel_req.data.network_selection_preference.mcc) {
- if (!plmn_code_flag.mnc_is_set) {
- uqmi_add_error("No MNC value");
- return QMI_CMD_EXIT;
- } else {
- sel_req.data.network_selection_preference.mode = QMI_NAS_NETWORK_SELECTION_PREFERENCE_MANUAL;
- }
- }
-
- return do_sel_network();
-}
-
-#define cmd_nas_initiate_network_register_cb no_cb
-static enum qmi_cmd_result
-cmd_nas_initiate_network_register_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- static struct qmi_nas_initiate_network_register_request register_req = {
- QMI_INIT(action, QMI_NAS_NETWORK_REGISTER_TYPE_AUTOMATIC)
- };
-
- qmi_set_nas_initiate_network_register_request(msg, ®ister_req);
- return QMI_CMD_REQUEST;
-}
-
-static void
-cmd_nas_get_signal_info_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
-{
- struct qmi_nas_get_signal_info_response res;
- void *c;
-
- qmi_parse_nas_get_signal_info_response(msg, &res);
-
- c = blobmsg_open_table(&status, NULL);
- if (res.set.cdma_signal_strength) {
- blobmsg_add_string(&status, "type", "cdma");
- blobmsg_add_u32(&status, "rssi", (int32_t) res.data.cdma_signal_strength.rssi);
- blobmsg_add_u32(&status, "ecio", (int32_t) res.data.cdma_signal_strength.ecio);
- }
-
- if (res.set.hdr_signal_strength) {
- blobmsg_add_string(&status, "type", "hdr");
- blobmsg_add_u32(&status, "rssi", (int32_t) res.data.hdr_signal_strength.rssi);
- blobmsg_add_u32(&status, "ecio", (int32_t) res.data.hdr_signal_strength.ecio);
- blobmsg_add_u32(&status, "io", res.data.hdr_signal_strength.io);
- }
-
- if (res.set.gsm_signal_strength) {
- blobmsg_add_string(&status, "type", "gsm");
- blobmsg_add_u32(&status, "signal", (int32_t) res.data.gsm_signal_strength);
- }
-
- if (res.set.wcdma_signal_strength) {
- blobmsg_add_string(&status, "type", "wcdma");
- blobmsg_add_u32(&status, "rssi", (int32_t) res.data.wcdma_signal_strength.rssi);
- blobmsg_add_u32(&status, "ecio", (int32_t) res.data.wcdma_signal_strength.ecio);
- }
-
- if (res.set.lte_signal_strength) {
- blobmsg_add_string(&status, "type", "lte");
- blobmsg_add_u32(&status, "rssi", (int32_t) res.data.lte_signal_strength.rssi);
- blobmsg_add_u32(&status, "rsrq", (int32_t) res.data.lte_signal_strength.rsrq);
- blobmsg_add_u32(&status, "rsrp", (int32_t) res.data.lte_signal_strength.rsrp);
- blobmsg_add_double(&status, "snr", (double) res.data.lte_signal_strength.snr*0.1);
- }
-
- if (res.set.tdma_signal_strength) {
- blobmsg_add_string(&status, "type", "tdma");
- blobmsg_add_u32(&status, "signal", (int32_t) res.data.tdma_signal_strength);
- }
-
- blobmsg_close_table(&status, c);
-}
-
-static void
-print_system_info(uint8_t svc_status, uint8_t tsvc_status, bool preferred, bool system_info,
- bool domain_valid, uint8_t domain,
- bool service_cap_valid, uint8_t service_cap,
- bool roaming_status_valid, uint8_t roaming_status,
- bool forbidden_valid, bool forbidden,
- bool network_id_valid, char *mcc, char *mnc,
- bool lac_valid, uint16_t lac)
-{
- static const char *map_service[] = {
- [QMI_NAS_SERVICE_STATUS_NONE] = "none",
- [QMI_NAS_SERVICE_STATUS_LIMITED] = "limited",
- [QMI_NAS_SERVICE_STATUS_AVAILABLE] = "available",
- [QMI_NAS_SERVICE_STATUS_LIMITED_REGIONAL] = "limited regional",
- [QMI_NAS_SERVICE_STATUS_POWER_SAVE] = "power save",
- };
-
- static const char *map_roaming[] = {
- [QMI_NAS_ROAMING_STATUS_OFF] = "off",
- [QMI_NAS_ROAMING_STATUS_ON] = "on",
- [QMI_NAS_ROAMING_STATUS_BLINK] = "blink",
- [QMI_NAS_ROAMING_STATUS_OUT_OF_NEIGHBORHOOD] = "out of neighborhood",
- [QMI_NAS_ROAMING_STATUS_OUT_OF_BUILDING] = "out of building",
- [QMI_NAS_ROAMING_STATUS_PREFERRED_SYSTEM] = "preferred system",
- [QMI_NAS_ROAMING_STATUS_AVAILABLE_SYSTEM] = "available system",
- [QMI_NAS_ROAMING_STATUS_ALLIANCE_PARTNER] = "alliance partner",
- [QMI_NAS_ROAMING_STATUS_PREMIUM_PARTNER] = "premium partner",
- [QMI_NAS_ROAMING_STATUS_FULL_SERVICE] = "full service",
- [QMI_NAS_ROAMING_STATUS_PARTIAL_SERVICE] = "partial service",
- [QMI_NAS_ROAMING_STATUS_BANNER_ON] = "banner on",
- [QMI_NAS_ROAMING_STATUS_BANNER_OFF] = "banner off",
- };
-
- static const char *map_network[] = {
- [QMI_NAS_NETWORK_SERVICE_DOMAIN_NONE] = "none",
- [QMI_NAS_NETWORK_SERVICE_DOMAIN_CS] = "cs",
- [QMI_NAS_NETWORK_SERVICE_DOMAIN_PS] = "ps",
- [QMI_NAS_NETWORK_SERVICE_DOMAIN_CS_PS] = "cs-ps",
- [QMI_NAS_NETWORK_SERVICE_DOMAIN_UNKNOWN] = "unknown",
- };
-
- blobmsg_add_string(&status, "service_status", map_service[svc_status]);
- blobmsg_add_string(&status, "true_service_status", map_service[tsvc_status]);
- blobmsg_add_u8(&status, "preferred_data_path", preferred);
-
- if (system_info) {
- if (domain_valid)
- blobmsg_add_string(&status, "domain", map_network[domain]);
- if (service_cap_valid)
- blobmsg_add_string(&status, "service", map_network[service_cap]);
- if (roaming_status_valid)
- blobmsg_add_string(&status, "roaming_status", map_roaming[roaming_status]);
- if (forbidden_valid)
- blobmsg_add_u8(&status, "forbidden", forbidden);
- if (network_id_valid) {
- blobmsg_add_string(&status, "mcc", mcc);
- if ((uint8_t)mnc[2] == 255)
- mnc[2] = 0;
- blobmsg_add_string(&status, "mnc", mnc);
- }
- if (lac_valid)
- blobmsg_add_u32(&status, "location_area_code", (int32_t) lac);
- }
-}
-
-static void
-cmd_nas_get_system_info_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
-{
- static const char *cell_status[] = {
- [QMI_NAS_CELL_ACCESS_STATUS_NORMAL_ONLY] = "normal",
- [QMI_NAS_CELL_ACCESS_STATUS_EMERGENCY_ONLY] = "emergency",
- [QMI_NAS_CELL_ACCESS_STATUS_NO_CALLS] = "no calls",
- [QMI_NAS_CELL_ACCESS_STATUS_ALL_CALLS] = "all calls",
- [QMI_NAS_CELL_ACCESS_STATUS_UNKNOWN] = "unknown",
- };
-
- struct qmi_nas_get_system_info_response res;
- void *c, *t;
-
- qmi_parse_nas_get_system_info_response(msg, &res);
- t = blobmsg_open_table(&status, NULL);
- if (res.set.gsm_service_status) {
- c = blobmsg_open_table(&status, "gsm");
- print_system_info(res.data.gsm_service_status.service_status,
- res.data.gsm_service_status.true_service_status,
- res.data.gsm_service_status.preferred_data_path,
- res.set.gsm_system_info_v2,
- res.data.gsm_system_info_v2.domain_valid,
- res.data.gsm_system_info_v2.domain,
- res.data.gsm_system_info_v2.service_capability_valid,
- res.data.gsm_system_info_v2.service_capability,
- res.data.gsm_system_info_v2.roaming_status_valid,
- res.data.gsm_system_info_v2.roaming_status,
- res.data.gsm_system_info_v2.forbidden_valid,
- res.data.gsm_system_info_v2.forbidden,
- res.data.gsm_system_info_v2.network_id_valid,
- res.data.gsm_system_info_v2.mcc,
- res.data.gsm_system_info_v2.mnc,
- res.data.gsm_system_info_v2.lac_valid,
- res.data.gsm_system_info_v2.lac);
- if (res.set.gsm_system_info_v2 && res.data.gsm_system_info_v2.cid_valid)
- blobmsg_add_u32(&status, "cell_id",
- res.data.gsm_system_info_v2.cid);
- if (res.set.additional_gsm_system_info &&
- res.data.additional_gsm_system_info.geo_system_index != 0xFFFF)
- blobmsg_add_u32(&status, "geo_system_index",
- res.data.additional_gsm_system_info.geo_system_index);
- blobmsg_close_table(&status, c);
- }
-
- if (res.set.wcdma_service_status) {
- c = blobmsg_open_table(&status, "wcdma");
- print_system_info(res.data.wcdma_service_status.service_status,
- res.data.wcdma_service_status.true_service_status,
- res.data.wcdma_service_status.preferred_data_path,
- res.set.wcdma_system_info_v2,
- res.data.wcdma_system_info_v2.domain_valid,
- res.data.wcdma_system_info_v2.domain,
- res.data.wcdma_system_info_v2.service_capability_valid,
- res.data.wcdma_system_info_v2.service_capability,
- res.data.wcdma_system_info_v2.roaming_status_valid,
- res.data.wcdma_system_info_v2.roaming_status,
- res.data.wcdma_system_info_v2.forbidden_valid,
- res.data.wcdma_system_info_v2.forbidden,
- res.data.wcdma_system_info_v2.network_id_valid,
- res.data.wcdma_system_info_v2.mcc,
- res.data.wcdma_system_info_v2.mnc,
- res.data.wcdma_system_info_v2.lac_valid,
- res.data.wcdma_system_info_v2.lac);
- if (res.set.wcdma_system_info_v2 && res.data.wcdma_system_info_v2.cid_valid) {
- blobmsg_add_u32(&status, "rnc_id",res.data.wcdma_system_info_v2.cid/65536);
- blobmsg_add_u32(&status, "cell_id",res.data.wcdma_system_info_v2.cid%65536);
- }
- if (res.set.additional_wcdma_system_info &&
- res.data.additional_wcdma_system_info.geo_system_index != 0xFFFF)
- blobmsg_add_u32(&status, "geo_system_index",
- res.data.additional_wcdma_system_info.geo_system_index);
- blobmsg_close_table(&status, c);
- }
-
- if (res.set.lte_service_status) {
- c = blobmsg_open_table(&status, "lte");
- print_system_info(res.data.lte_service_status.service_status,
- res.data.lte_service_status.true_service_status,
- res.data.lte_service_status.preferred_data_path,
- res.set.lte_system_info_v2,
- res.data.lte_system_info_v2.domain_valid,
- res.data.lte_system_info_v2.domain,
- res.data.lte_system_info_v2.service_capability_valid,
- res.data.lte_system_info_v2.service_capability,
- res.data.lte_system_info_v2.roaming_status_valid,
- res.data.lte_system_info_v2.roaming_status,
- res.data.lte_system_info_v2.forbidden_valid,
- res.data.lte_system_info_v2.forbidden,
- res.data.lte_system_info_v2.network_id_valid,
- res.data.lte_system_info_v2.mcc,
- res.data.lte_system_info_v2.mnc,
- res.data.lte_system_info_v2.lac_valid,
- res.data.lte_system_info_v2.lac);
- if (res.set.lte_system_info_v2 && res.data.lte_system_info_v2.tac_valid)
- blobmsg_add_u32(&status, "tracking_area_code",
- res.data.lte_system_info_v2.tac);
- if (res.set.lte_system_info_v2 && res.data.lte_system_info_v2.cid_valid) {
- blobmsg_add_u32(&status, "enodeb_id",res.data.lte_system_info_v2.cid/256);
- blobmsg_add_u32(&status, "cell_id",res.data.lte_system_info_v2.cid%256);
- }
- if (res.set.additional_lte_system_info &&
- res.data.additional_lte_system_info.geo_system_index != 0xFFFF)
- blobmsg_add_u32(&status, "geo_system_index",
- res.data.additional_lte_system_info.geo_system_index);
- if (res.set.lte_voice_support)
- blobmsg_add_u8(&status, "voice_support", res.data.lte_voice_support);
- if (res.set.ims_voice_support)
- blobmsg_add_u8(&status, "ims_voice_support", res.data.ims_voice_support);
- if (res.set.lte_cell_access_status)
- blobmsg_add_string(&status, "cell_access_status",
- cell_status[res.data.lte_cell_access_status]);
- if (res.set.network_selection_registration_restriction)
- blobmsg_add_u32(&status, "registration_restriction",
- res.data.network_selection_registration_restriction);
- if (res.set.lte_registration_domain)
- blobmsg_add_u32(&status, "registration_domain",
- res.data.lte_registration_domain);
- if (res.set.eutra_with_nr5g_availability)
- blobmsg_add_u8(&status, "5g_nsa_available",
- res.data.eutra_with_nr5g_availability);
- if (res.set.dcnr_restriction_info)
- blobmsg_add_u8(&status, "dcnr_restriction", res.data.dcnr_restriction_info);
-
- blobmsg_close_table(&status, c);
- }
- blobmsg_close_table(&status, t);
-}
-
-static enum qmi_cmd_result
-cmd_nas_get_system_info_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- qmi_set_nas_get_system_info_request(msg);
- return QMI_CMD_REQUEST;
-}
-
-static void
-print_channel_info(int32_t cell_id, int32_t channel, uint32_t bw)
-{
- static const char *map_bandwidth[] = {
- [QMI_NAS_DL_BANDWIDTH_1_4] = "1.4",
- [QMI_NAS_DL_BANDWIDTH_3] = "3",
- [QMI_NAS_DL_BANDWIDTH_5] = "5",
- [QMI_NAS_DL_BANDWIDTH_10] = "10",
- [QMI_NAS_DL_BANDWIDTH_15] = "15",
- [QMI_NAS_DL_BANDWIDTH_20] = "20",
- [QMI_NAS_DL_BANDWIDTH_INVALID] = "invalid",
- [QMI_NAS_DL_BANDWIDTH_UNKNOWN] = "unknown",
- };
-
- blobmsg_add_u32(&status, "cell_id", cell_id);
- blobmsg_add_u32(&status, "channel", channel);
- print_earfcn_info(channel);
- blobmsg_add_string(&status, "bandwidth", map_bandwidth[bw]);
-}
-
-static void
-cmd_nas_get_lte_cphy_ca_info_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
-{
- struct qmi_nas_get_lte_cphy_ca_info_response res;
- static const char *scell_state[] = {
- [QMI_NAS_SCELL_STATE_DECONFIGURED] = "deconfigured",
- [QMI_NAS_SCELL_STATE_DEACTIVATED] = "deactivated",
- [QMI_NAS_SCELL_STATE_ACTIVATED] = "activated",
- };
- char idx_buf[16];
- void *t, *c;
- int i;
-
- qmi_parse_nas_get_lte_cphy_ca_info_response(msg, &res);
- t = blobmsg_open_table(&status, NULL);
- if (res.set.phy_ca_agg_pcell_info) {
- c = blobmsg_open_table(&status, "primary");
- print_channel_info(res.data.phy_ca_agg_pcell_info.physical_cell_id,
- res.data.phy_ca_agg_pcell_info.rx_channel,
- res.data.phy_ca_agg_pcell_info.dl_bandwidth);
- blobmsg_close_table(&status, c);
- }
- if (res.set.phy_ca_agg_scell_info && res.data.phy_ca_agg_secondary_cells_n) {
- for (i = 0; i < res.data.phy_ca_agg_secondary_cells_n; i++) {
- if (res.data.phy_ca_agg_secondary_cells[i].rx_channel == 0)
- break;
- sprintf(idx_buf, "secondary_%d",
- res.data.phy_ca_agg_secondary_cells[i].cell_index);
- c = blobmsg_open_table(&status, idx_buf);
- print_channel_info(res.data.phy_ca_agg_secondary_cells[i].physical_cell_id,
- res.data.phy_ca_agg_secondary_cells[i].rx_channel,
- res.data.phy_ca_agg_secondary_cells[i].dl_bandwidth);
- blobmsg_add_string(&status, "state",
- scell_state[res.data.phy_ca_agg_secondary_cells[i].state]);
- blobmsg_close_table(&status, c);
- }
- } else {
- if (res.set.scell_index)
- sprintf(idx_buf, "secondary_%d", res.data.scell_index);
- else
- sprintf(idx_buf, "secondary");
- if (res.set.phy_ca_agg_scell_info && res.data.phy_ca_agg_scell_info.rx_channel != 0) {
- c = blobmsg_open_table(&status, idx_buf);
- print_channel_info(res.data.phy_ca_agg_scell_info.physical_cell_id,
- res.data.phy_ca_agg_scell_info.rx_channel,
- res.data.phy_ca_agg_scell_info.dl_bandwidth);
- blobmsg_add_string(&status, "state",
- scell_state[res.data.phy_ca_agg_scell_info.state]);
- blobmsg_close_table(&status, c);
- }
- }
- blobmsg_close_table(&status, t);
-}
-
-static enum qmi_cmd_result
-cmd_nas_get_lte_cphy_ca_info_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- qmi_set_nas_get_lte_cphy_ca_info_request(msg);
- return QMI_CMD_REQUEST;
-}
-
-static void
-print_chain_info(int8_t radio, bool tuned, int32_t rssi, int32_t ecio, int32_t rsrp, int32_t rscp, uint32_t phase)
-{
- blobmsg_add_u8(&status, "tuned", tuned);
- blobmsg_add_double(&status, "rssi", (double) rssi*0.1);
- if (radio == QMI_NAS_RADIO_INTERFACE_LTE) {
- blobmsg_add_double(&status, "rsrq", (double) ecio*-0.1);
- blobmsg_add_double(&status, "rsrp", (double) rsrp*-0.1);
- }
- if (radio == QMI_NAS_RADIO_INTERFACE_UMTS) {
- blobmsg_add_double(&status, "ecio", (double) ecio*-0.1);
- blobmsg_add_double(&status, "rscp", (double) rscp*-0.1);
- }
- if (phase != 0xFFFFFFFF)
- blobmsg_add_double(&status, "phase", (double) phase*0.01);
-}
-
-static void
-cmd_nas_get_tx_rx_info_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
-{
- struct qmi_nas_get_tx_rx_info_response res;
- void *c, *t;
-
- qmi_parse_nas_get_tx_rx_info_response(msg, &res);
- t = blobmsg_open_table(&status, NULL);
- if (res.set.rx_chain_0_info) {
- c = blobmsg_open_table(&status, "rx_chain_0");
- print_chain_info(tx_rx_req.data.radio_interface,
- res.data.rx_chain_0_info.is_radio_tuned,
- res.data.rx_chain_0_info.rx_power,
- res.data.rx_chain_0_info.ecio,
- res.data.rx_chain_0_info.rsrp,
- res.data.rx_chain_0_info.rscp,
- res.data.rx_chain_0_info.phase);
- blobmsg_close_table(&status, c);
- }
- if (res.set.rx_chain_1_info) {
- c = blobmsg_open_table(&status, "rx_chain_1");
- print_chain_info(tx_rx_req.data.radio_interface,
- res.data.rx_chain_1_info.is_radio_tuned,
- res.data.rx_chain_1_info.rx_power,
- res.data.rx_chain_1_info.ecio,
- res.data.rx_chain_1_info.rsrp,
- res.data.rx_chain_1_info.rscp,
- res.data.rx_chain_1_info.phase);
- blobmsg_close_table(&status, c);
- }
- if (res.set.rx_chain_2_info) {
- c = blobmsg_open_table(&status, "rx_chain_2");
- print_chain_info(tx_rx_req.data.radio_interface,
- res.data.rx_chain_2_info.is_radio_tuned,
- res.data.rx_chain_2_info.rx_power,
- res.data.rx_chain_2_info.ecio,
- res.data.rx_chain_2_info.rsrp,
- res.data.rx_chain_2_info.rscp,
- res.data.rx_chain_2_info.phase);
- blobmsg_close_table(&status, c);
- }
- if (res.set.rx_chain_3_info) {
- c = blobmsg_open_table(&status, "rx_chain_3");
- print_chain_info(tx_rx_req.data.radio_interface,
- res.data.rx_chain_3_info.is_radio_tuned,
- res.data.rx_chain_3_info.rx_power,
- res.data.rx_chain_3_info.ecio,
- res.data.rx_chain_3_info.rsrp,
- res.data.rx_chain_3_info.rscp,
- res.data.rx_chain_3_info.phase);
- blobmsg_close_table(&status, c);
- }
- if (res.set.tx_info) {
- c = blobmsg_open_table(&status, "tx");
- blobmsg_add_u8(&status, "traffic", res.data.tx_info.is_in_traffic);
- if (res.data.tx_info.is_in_traffic)
- blobmsg_add_double(&status, "tx_power",
- (double) res.data.tx_info.tx_power*0.1);
- blobmsg_close_table(&status, c);
- }
- blobmsg_close_table(&status, t);
-}
-
-
-static enum qmi_cmd_result
-cmd_nas_get_tx_rx_info_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- int radio = 0;
-
- if (!strcmp(arg, "lte"))
- radio = QMI_NAS_RADIO_INTERFACE_LTE;
- else if (!strcmp(arg, "umts"))
- radio = QMI_NAS_RADIO_INTERFACE_UMTS;
- else if (!strcmp(arg, "gsm"))
- radio = QMI_NAS_RADIO_INTERFACE_GSM;
- else
- return uqmi_add_error("Invalid argument");
-
- qmi_set(&tx_rx_req, radio_interface, radio);
- qmi_set_nas_get_tx_rx_info_request(msg, &tx_rx_req);
- return QMI_CMD_REQUEST;
-}
-
-static void
-print_lte_info(int32_t cell_id, int16_t rsrp, int16_t rsrq, int16_t rssi)
-{
- blobmsg_add_u32(&status, "physical_cell_id", cell_id);
- blobmsg_add_double(&status, "rsrq", ((double)rsrq)/10);
- blobmsg_add_double(&status, "rsrp", ((double)rsrp)/10);
- blobmsg_add_double(&status, "rssi", ((double)rssi)/10);
-}
-
-static void
-print_sel_info(int32_t priority, int32_t high, int32_t low)
-{
- blobmsg_add_u32(&status, "cell_reselection_priority", priority);
- blobmsg_add_u32(&status, "cell_reselection_low", low);
- blobmsg_add_u32(&status, "cell_reselection_high", high);
-}
-
-static void
-cmd_nas_get_cell_location_info_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
-{
- struct qmi_nas_get_cell_location_info_response res;
- void *c = NULL, *t, *cell, *freq;
- int i, j;
-
- qmi_parse_nas_get_cell_location_info_response(msg, &res);
- t = blobmsg_open_table(&status, NULL);
-
- if (res.set.umts_info_v2) {
- c = blobmsg_open_table(&status, "umts_info");
- blobmsg_add_u32(&status, "location_area_code", res.data.umts_info_v2.lac);
- blobmsg_add_u32(&status, "cell_id", res.data.umts_info_v2.cell_id);
- blobmsg_add_u32(&status, "channel",
- res.data.umts_info_v2.utra_absolute_rf_channel_number);
- blobmsg_add_u32(&status, "primary_scrambling_code",
- res.data.umts_info_v2.primary_scrambling_code);
- blobmsg_add_u32(&status, "rscp", res.data.umts_info_v2.rscp);
- blobmsg_add_u32(&status, "ecio", res.data.umts_info_v2.ecio);
- for (j = 0; j < res.data.umts_info_v2.cell_n; j++) {
- cell = blobmsg_open_table(&status, NULL);
- blobmsg_add_u32(&status, "channel",
- res.data.umts_info_v2.cell[j].utra_absolute_rf_channel_number);
- blobmsg_add_u32(&status, "primary_scrambling_code",
- res.data.umts_info_v2.cell[j].primary_scrambling_code);
- blobmsg_add_u32(&status, "rscp", res.data.umts_info_v2.cell[j].rscp);
- blobmsg_add_u32(&status, "ecio", res.data.umts_info_v2.cell[j].ecio);
- blobmsg_close_table(&status, cell);
- }
- for (j = 0; j < res.data.umts_info_v2.neighboring_geran_n; j++) {
- cell = blobmsg_open_table(&status, "neighboring_geran");
- blobmsg_add_u32(&status, "channel",
- res.data.umts_info_v2.neighboring_geran[j].geran_absolute_rf_channel_number);
- blobmsg_add_u8(&status, "network_color_code",
- res.data.umts_info_v2.neighboring_geran[j].network_color_code);
- blobmsg_add_u8(&status, "base_station_color_code",
- res.data.umts_info_v2.neighboring_geran[j].base_station_color_code);
- blobmsg_add_u32(&status, "rssi",
- res.data.umts_info_v2.neighboring_geran[j].rssi);
- blobmsg_close_table(&status, cell);
- }
- blobmsg_close_table(&status, c);
- }
- if (res.set.intrafrequency_lte_info_v2) {
- c = blobmsg_open_table(&status, "intrafrequency_lte_info");
- blobmsg_add_u32(&status, "tracking_area_code",
- res.data.intrafrequency_lte_info_v2.tracking_area_code);
- blobmsg_add_u32(&status, "enodeb_id",
- res.data.intrafrequency_lte_info_v2.global_cell_id/256);
- blobmsg_add_u32(&status, "cell_id",
- res.data.intrafrequency_lte_info_v2.global_cell_id%256);
- blobmsg_add_u32(&status, "channel",
- res.data.intrafrequency_lte_info_v2.eutra_absolute_rf_channel_number);
- print_earfcn_info(res.data.intrafrequency_lte_info_v2.eutra_absolute_rf_channel_number);
- blobmsg_add_u32(&status, "serving_cell_id",
- res.data.intrafrequency_lte_info_v2.serving_cell_id);
- if (res.data.intrafrequency_lte_info_v2.ue_in_idle) {
- blobmsg_add_u32(&status, "cell_reselection_priority",
- res.data.intrafrequency_lte_info_v2.cell_reselection_priority);
- blobmsg_add_u32(&status, "s_non_intra_search_threshold",
- res.data.intrafrequency_lte_info_v2.s_non_intra_search_threshold);
- blobmsg_add_u32(&status, "serving_cell_low_threshold",
- res.data.intrafrequency_lte_info_v2.serving_cell_low_threshold);
- blobmsg_add_u32(&status, "s_intra_search_threshold",
- res.data.intrafrequency_lte_info_v2.s_intra_search_threshold);
- }
- for (i = 0; i < res.data.intrafrequency_lte_info_v2.cell_n; i++) {
- cell = blobmsg_open_table(&status, NULL);
- print_lte_info(res.data.intrafrequency_lte_info_v2.cell[i].physical_cell_id,
- res.data.intrafrequency_lte_info_v2.cell[i].rsrq,
- res.data.intrafrequency_lte_info_v2.cell[i].rsrp,
- res.data.intrafrequency_lte_info_v2.cell[i].rssi);
- if (res.data.intrafrequency_lte_info_v2.ue_in_idle)
- blobmsg_add_u32(&status, "cell_selection_rx_level",
- res.data.intrafrequency_lte_info_v2.cell[i].cell_selection_rx_level);
- blobmsg_close_table(&status, cell);
- }
- blobmsg_close_table(&status, c);
- }
- if (res.set.interfrequency_lte_info) {
- if (res.data.interfrequency_lte_info.frequency_n > 0)
- c = blobmsg_open_table(&status, "interfrequency_lte_info");
- for (i = 0; i < res.data.interfrequency_lte_info.frequency_n; i++) {
- freq = blobmsg_open_table(&status, NULL);
- blobmsg_add_u32(&status, "channel",
- res.data.interfrequency_lte_info.frequency[i].eutra_absolute_rf_channel_number);
- print_earfcn_info(res.data.interfrequency_lte_info.frequency[i].eutra_absolute_rf_channel_number);
- if (res.data.interfrequency_lte_info.ue_in_idle) {
- print_sel_info(res.data.interfrequency_lte_info.frequency[i].cell_reselection_priority,
- res.data.interfrequency_lte_info.frequency[i].cell_selection_rx_level_high_threshold,
- res.data.interfrequency_lte_info.frequency[i].cell_selection_rx_level_low_threshold);
- }
- for (j = 0; j < res.data.interfrequency_lte_info.frequency[i].cell_n; j++) {
- cell = blobmsg_open_table(&status, NULL);
- print_lte_info(res.data.interfrequency_lte_info.frequency[i].cell[j].physical_cell_id,
- res.data.interfrequency_lte_info.frequency[i].cell[j].rsrq,
- res.data.interfrequency_lte_info.frequency[i].cell[j].rsrp,
- res.data.interfrequency_lte_info.frequency[i].cell[j].rssi);
- if (res.data.interfrequency_lte_info.ue_in_idle)
- blobmsg_add_u32(&status, "cell_selection_rx_level",
- res.data.interfrequency_lte_info.frequency[i].cell[j].cell_selection_rx_level);
- blobmsg_close_table(&status, cell);
- }
- blobmsg_close_table(&status, freq);
- }
- if (res.data.interfrequency_lte_info.frequency_n > 0)
- blobmsg_close_table(&status, c);
- }
- if (res.set.lte_info_neighboring_gsm) {
- if (res.data.lte_info_neighboring_gsm.frequency_n > 0)
- c = blobmsg_open_table(&status, "lte_info_neighboring_gsm");
- for (i = 0; i < res.data.lte_info_neighboring_gsm.frequency_n; i++) {
- freq = blobmsg_open_table(&status, NULL);
- blobmsg_add_u32(&status, "ncc_permitted",
- res.data.lte_info_neighboring_gsm.frequency[i].ncc_permitted);
- if (res.data.lte_info_neighboring_gsm.ue_in_idle) {
- print_sel_info(res.data.lte_info_neighboring_gsm.frequency[i].cell_reselection_priority,
- res.data.lte_info_neighboring_gsm.frequency[i].cell_reselection_high_threshold,
- res.data.lte_info_neighboring_gsm.frequency[i].cell_reselection_low_threshold);
- }
- for (j = 0; j < res.data.lte_info_neighboring_gsm.frequency[i].cell_n; j++) {
- cell = blobmsg_open_table(&status, NULL);
- blobmsg_add_u32(&status, "channel",
- res.data.lte_info_neighboring_gsm.frequency[i].cell[j].geran_absolute_rf_channel_number);
- blobmsg_add_u32(&status, "base_station_identity_code",
- res.data.lte_info_neighboring_gsm.frequency[i].cell[j].base_station_identity_code);
- blobmsg_add_double(&status, "rssi",
- ((double)res.data.lte_info_neighboring_gsm.frequency[i].cell[j].rssi)/10);
- if (res.data.lte_info_neighboring_gsm.ue_in_idle)
- blobmsg_add_u32(&status, "cell_selection_rx_level",
- res.data.lte_info_neighboring_gsm.frequency[i].cell[j].cell_selection_rx_level);
- blobmsg_close_table(&status, cell);
- }
- blobmsg_close_table(&status, freq);
- }
- if (res.data.lte_info_neighboring_gsm.frequency_n > 0)
- blobmsg_close_table(&status, c);
- }
- if (res.set.lte_info_neighboring_wcdma) {
- if (res.data.lte_info_neighboring_wcdma.frequency_n > 0)
- c = blobmsg_open_table(&status, "lte_info_neighboring_wcdma");
- for (i = 0; i < res.data.lte_info_neighboring_wcdma.frequency_n; i++) {
- freq = blobmsg_open_table(&status, NULL);
- blobmsg_add_u32(&status, "channel",
- res.data.lte_info_neighboring_wcdma.frequency[i].utra_absolute_rf_channel_number);
- if (res.data.lte_info_neighboring_wcdma.ue_in_idle) {
- print_sel_info(res.data.lte_info_neighboring_wcdma.frequency[i].cell_reselection_priority,
- res.data.lte_info_neighboring_wcdma.frequency[i].cell_reselection_high_threshold,
- res.data.lte_info_neighboring_wcdma.frequency[i].cell_reselection_low_threshold);
- }
- for (j = 0; j < res.data.lte_info_neighboring_wcdma.frequency[i].cell_n; j++) {
- cell = blobmsg_open_table(&status, NULL);
- blobmsg_add_u32(&status, "primary_scrambling_code",
- res.data.lte_info_neighboring_wcdma.frequency[i].cell[j].primary_scrambling_code);
- blobmsg_add_double(&status, "rscp",
- ((double)res.data.lte_info_neighboring_wcdma.frequency[i].cell[j].cpich_rscp)/10);
- blobmsg_add_double(&status, "ecno",
- ((double)res.data.lte_info_neighboring_wcdma.frequency[i].cell[j].cpich_ecno)/10);
- if (res.data.lte_info_neighboring_wcdma.ue_in_idle)
- blobmsg_add_u32(&status, "cell_selection_rx_level",
- res.data.lte_info_neighboring_wcdma.frequency[i].cell[j].cell_selection_rx_level);
- blobmsg_close_table(&status, cell);
- }
- blobmsg_close_table(&status, freq);
- }
- if (res.data.lte_info_neighboring_wcdma.frequency_n > 0)
- blobmsg_close_table(&status, c);
- }
- if (res.set.umts_info_neighboring_lte) {
- if (res.data.umts_info_neighboring_lte.frequency_n > 0)
- c = blobmsg_open_table(&status, "umts_info_neighboring_lte");
- for (i = 0; i < res.data.umts_info_neighboring_lte.frequency_n; i++) {
- freq = blobmsg_open_table(&status, NULL);
- blobmsg_add_u32(&status, "channel",
- res.data.umts_info_neighboring_lte.frequency[i].eutra_absolute_rf_channel_number);
- print_earfcn_info(res.data.umts_info_neighboring_lte.frequency[i].eutra_absolute_rf_channel_number);
- blobmsg_add_u32(&status, "physical_cell_id",
- res.data.umts_info_neighboring_lte.frequency[i].physical_cell_id);
- blobmsg_add_double(&status, "rsrp",
- (double) res.data.umts_info_neighboring_lte.frequency[i].rsrp);
- blobmsg_add_double(&status, "rsrq",
- (double) res.data.umts_info_neighboring_lte.frequency[i].rsrq);
- blobmsg_add_u32(&status, "cell_selection_rx_level",
- res.data.umts_info_neighboring_lte.frequency[i].cell_selection_rx_level);
- blobmsg_close_table(&status, freq);
- }
- if (res.data.umts_info_neighboring_lte.frequency_n > 0)
- blobmsg_close_table(&status, c);
- }
- blobmsg_close_table(&status, t);
-}
-
-static enum qmi_cmd_result
-cmd_nas_get_cell_location_info_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- qmi_set_nas_get_cell_location_info_request(msg);
- return QMI_CMD_REQUEST;
-}
-
-static enum qmi_cmd_result
-cmd_nas_get_signal_info_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- qmi_set_nas_get_signal_info_request(msg);
- return QMI_CMD_REQUEST;
-}
-
-static void
-cmd_nas_get_serving_system_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
-{
- struct qmi_nas_get_serving_system_response res;
- static const char *reg_states[] = {
- [QMI_NAS_REGISTRATION_STATE_NOT_REGISTERED] = "not_registered",
- [QMI_NAS_REGISTRATION_STATE_REGISTERED] = "registered",
- [QMI_NAS_REGISTRATION_STATE_NOT_REGISTERED_SEARCHING] = "searching",
- [QMI_NAS_REGISTRATION_STATE_REGISTRATION_DENIED] = "registering_denied",
- [QMI_NAS_REGISTRATION_STATE_UNKNOWN] = "unknown",
- };
- void *c;
-
- qmi_parse_nas_get_serving_system_response(msg, &res);
-
- c = blobmsg_open_table(&status, NULL);
- if (res.set.serving_system) {
- int state = res.data.serving_system.registration_state;
-
- if (state > QMI_NAS_REGISTRATION_STATE_UNKNOWN)
- state = QMI_NAS_REGISTRATION_STATE_UNKNOWN;
-
- blobmsg_add_string(&status, "registration", reg_states[state]);
- }
- if (res.set.current_plmn) {
- blobmsg_add_u32(&status, "plmn_mcc", res.data.current_plmn.mcc);
- blobmsg_add_u32(&status, "plmn_mnc", res.data.current_plmn.mnc);
- if (res.data.current_plmn.description)
- blobmsg_add_string(&status, "plmn_description", res.data.current_plmn.description);
- }
-
- if (res.set.roaming_indicator)
- blobmsg_add_u8(&status, "roaming", !res.data.roaming_indicator);
-
- blobmsg_close_table(&status, c);
-}
-
-static enum qmi_cmd_result
-cmd_nas_get_serving_system_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- qmi_set_nas_get_serving_system_request(msg);
- return QMI_CMD_REQUEST;
-}
-
-static void
-cmd_nas_get_plmn_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
-{
- struct qmi_nas_get_system_selection_preference_response res;
- static const char *modes[] = {
- [QMI_NAS_NETWORK_SELECTION_PREFERENCE_AUTOMATIC] = "automatic",
- [QMI_NAS_NETWORK_SELECTION_PREFERENCE_MANUAL] = "manual",
- };
- void *c;
-
- qmi_parse_nas_get_system_selection_preference_response(msg, &res);
-
- c = blobmsg_open_table(&status, NULL);
- if (res.set.network_selection_preference) {
- blobmsg_add_string(&status, "mode", modes[res.data.network_selection_preference]);
- }
- if (res.set.manual_network_selection) {
- blobmsg_add_u32(&status, "mcc", res.data.manual_network_selection.mcc);
- blobmsg_add_u32(&status, "mnc", res.data.manual_network_selection.mnc);
- }
-
- blobmsg_close_table(&status, c);
-}
-
-static enum qmi_cmd_result
-cmd_nas_get_plmn_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- qmi_set_nas_get_system_selection_preference_request(msg);
- return QMI_CMD_REQUEST;
-}
-
-static void
-cmd_nas_network_scan_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
-{
- static struct qmi_nas_network_scan_response res;
- const char *network_status[] = {
- "current_serving",
- "available",
- "home",
- "roaming",
- "forbidden",
- "not_forbidden",
- "preferred",
- "not_preferred",
- };
- const char *radio[] = {
- [QMI_NAS_RADIO_INTERFACE_NONE] = "none",
- [QMI_NAS_RADIO_INTERFACE_CDMA_1X] = "cdma-1x",
- [QMI_NAS_RADIO_INTERFACE_CDMA_1XEVDO] = "cdma-1x_evdo",
- [QMI_NAS_RADIO_INTERFACE_AMPS] = "amps",
- [QMI_NAS_RADIO_INTERFACE_GSM] = "gsm",
- [QMI_NAS_RADIO_INTERFACE_UMTS] = "umts",
- [QMI_NAS_RADIO_INTERFACE_LTE] = "lte",
- [QMI_NAS_RADIO_INTERFACE_TD_SCDMA] = "td-scdma",
- };
- void *t, *c, *info, *stat;
- int i, j;
-
- qmi_parse_nas_network_scan_response(msg, &res);
-
- t = blobmsg_open_table(&status, NULL);
-
- c = blobmsg_open_array(&status, "network_info");
- for (i = 0; i < res.data.network_information_n; i++) {
- info = blobmsg_open_table(&status, NULL);
- blobmsg_add_u32(&status, "mcc", res.data.network_information[i].mcc);
- blobmsg_add_u32(&status, "mnc", res.data.network_information[i].mnc);
- if (res.data.network_information[i].description)
- blobmsg_add_string(&status, "description", res.data.network_information[i].description);
- stat = blobmsg_open_array(&status, "status");
- for (j = 0; j < ARRAY_SIZE(network_status); j++) {
- if (!(res.data.network_information[i].network_status & (1 << j)))
- continue;
-
- blobmsg_add_string(&status, NULL, network_status[j]);
- }
- blobmsg_close_array(&status, stat);
- blobmsg_close_table(&status, info);
- }
- blobmsg_close_array(&status, c);
-
- c = blobmsg_open_array(&status, "radio_access_technology");
- for (i = 0; i < res.data.radio_access_technology_n; i++) {
- const char *r = "unknown";
- int r_i = res.data.radio_access_technology[i].radio_interface;
-
- info = blobmsg_open_table(&status, NULL);
- blobmsg_add_u32(&status, "mcc", res.data.radio_access_technology[i].mcc);
- blobmsg_add_u32(&status, "mnc", res.data.radio_access_technology[i].mnc);
- if (r_i >= 0 && r_i < ARRAY_SIZE(radio))
- r = radio[r_i];
-
- blobmsg_add_string(&status, "radio", r);
- blobmsg_close_table(&status, info);
- }
- blobmsg_close_array(&status, c);
-
- blobmsg_close_table(&status, t);
-}
-
-static enum qmi_cmd_result
-cmd_nas_network_scan_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- struct qmi_nas_network_scan_request sreq = {
- QMI_INIT(network_type,
- QMI_NAS_NETWORK_SCAN_TYPE_GSM |
- QMI_NAS_NETWORK_SCAN_TYPE_UMTS |
- QMI_NAS_NETWORK_SCAN_TYPE_LTE |
- QMI_NAS_NETWORK_SCAN_TYPE_TD_SCDMA),
- };
-
- qmi_set_nas_network_scan_request(msg, &sreq);
- return QMI_CMD_REQUEST;
-}
+++ /dev/null
-/*
- * uqmi -- tiny QMI support implementation
- *
- * Copyright (C) 2014-2015 Felix Fietkau <nbd@openwrt.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA.
- */
-
-#define __uqmi_nas_commands \
- __uqmi_command(nas_do_set_system_selection, __set-system-selection, no, QMI_SERVICE_NAS), \
- __uqmi_command(nas_set_network_modes, set-network-modes, required, CMD_TYPE_OPTION), \
- __uqmi_command(nas_initiate_network_register, network-register, no, QMI_SERVICE_NAS), \
- __uqmi_command(nas_set_plmn, set-plmn, no, QMI_SERVICE_NAS), \
- __uqmi_command(nas_get_plmn, get-plmn, no, QMI_SERVICE_NAS), \
- __uqmi_command(nas_set_mcc, mcc, required, CMD_TYPE_OPTION), \
- __uqmi_command(nas_set_mnc, mnc, required, CMD_TYPE_OPTION), \
- __uqmi_command(nas_network_scan, network-scan, no, QMI_SERVICE_NAS), \
- __uqmi_command(nas_get_signal_info, get-signal-info, no, QMI_SERVICE_NAS), \
- __uqmi_command(nas_get_serving_system, get-serving-system, no, QMI_SERVICE_NAS), \
- __uqmi_command(nas_set_network_preference, set-network-preference, required, CMD_TYPE_OPTION), \
- __uqmi_command(nas_set_roaming, set-network-roaming, required, CMD_TYPE_OPTION), \
- __uqmi_command(nas_get_system_info, get-system-info, no, QMI_SERVICE_NAS), \
- __uqmi_command(nas_get_lte_cphy_ca_info, get-lte-cphy-ca-info, no, QMI_SERVICE_NAS), \
- __uqmi_command(nas_get_cell_location_info, get-cell-location-info, no, QMI_SERVICE_NAS), \
- __uqmi_command(nas_get_tx_rx_info, get-tx-rx-info, required, QMI_SERVICE_NAS) \
-
-#define nas_helptext \
- " --set-network-modes <modes>: Set usable network modes (Syntax: <mode1>[,<mode2>,...])\n" \
- " Available modes: all, lte, umts, gsm, cdma, td-scdma\n" \
- " --set-network-preference <mode>: Set preferred network mode to <mode>\n" \
- " Available modes: auto, gsm, wcdma\n" \
- " --set-network-roaming <mode>: Set roaming preference:\n" \
- " Available modes: any, off, only\n" \
- " --network-scan: Initiate network scan\n" \
- " --network-register: Initiate network register\n" \
- " --set-plmn: Register at specified network\n" \
- " --mcc <mcc>: Mobile Country Code (0 - auto)\n" \
- " --mnc <mnc>: Mobile Network Code\n" \
- " --get-plmn: Get preferred network selection info\n" \
- " --get-signal-info: Get signal strength info\n" \
- " --get-serving-system: Get serving system info\n" \
- " --get-system-info: Get system info\n" \
- " --get-lte-cphy-ca-info: Get LTE Cphy CA Info\n" \
- " --get-cell-location-info: Get Cell Location Info\n" \
- " --get-tx-rx-info <radio>: Get TX/RX Info (gsm, umts, lte)\n" \
-
+++ /dev/null
-/*
- * uqmi -- tiny QMI support implementation
- *
- * Copyright (C) 2016 Felix Fietkau <nbd@nbd.name>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA.
- */
-
-static int uim_slot = 0;
-
-#define cmd_uim_verify_pin1_cb no_cb
-static enum qmi_cmd_result
-cmd_uim_verify_pin1_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- struct qmi_uim_verify_pin_request data = {
- QMI_INIT_SEQUENCE(session,
- .session_type = QMI_UIM_SESSION_TYPE_CARD_SLOT_1,
- .application_identifier_n = 0
- ),
- QMI_INIT_SEQUENCE(info,
- .pin_id = QMI_UIM_PIN_ID_PIN1,
- .pin_value = arg
- )
- };
- qmi_set_uim_verify_pin_request(msg, &data);
- return QMI_CMD_REQUEST;
-}
-
-#define cmd_uim_verify_pin2_cb no_cb
-static enum qmi_cmd_result
-cmd_uim_verify_pin2_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- struct qmi_uim_verify_pin_request data = {
- QMI_INIT_SEQUENCE(session,
- .session_type = QMI_UIM_SESSION_TYPE_CARD_SLOT_1,
- .application_identifier_n = 0
- ),
- QMI_INIT_SEQUENCE(info,
- .pin_id = QMI_UIM_PIN_ID_PIN2,
- .pin_value = arg
- )
- };
- qmi_set_uim_verify_pin_request(msg, &data);
- return QMI_CMD_REQUEST;
-}
-
-static void cmd_uim_get_sim_state_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
-{
- struct qmi_uim_get_card_status_response res;
- void * const card_table = blobmsg_open_table(&status, NULL);
- static const char *card_application_states[] = {
- [QMI_UIM_CARD_APPLICATION_STATE_UNKNOWN] = "unknown",
- [QMI_UIM_CARD_APPLICATION_STATE_DETECTED] = "detected",
- [QMI_UIM_CARD_APPLICATION_STATE_PIN1_OR_UPIN_PIN_REQUIRED] = "pin-required",
- [QMI_UIM_CARD_APPLICATION_STATE_PUK1_OR_UPIN_PUK_REQUIRED] = "puk-required",
- [QMI_UIM_CARD_APPLICATION_STATE_CHECK_PERSONALIZATION_STATE] = "check-personalization-state",
- [QMI_UIM_CARD_APPLICATION_STATE_PIN1_BLOCKED] = "pin1-blocked",
- [QMI_UIM_CARD_APPLICATION_STATE_ILLEGAL] = "illegal",
- [QMI_UIM_CARD_APPLICATION_STATE_READY] = "ready",
- };
-
- qmi_parse_uim_get_card_status_response(msg, &res);
-
- for (int i = 0; i < res.data.card_status.cards_n; ++i) {
- if (res.data.card_status.cards[i].card_state != QMI_UIM_CARD_STATE_PRESENT)
- continue;
-
- uint8_t card_application_state = QMI_UIM_CARD_APPLICATION_STATE_UNKNOWN;
- uint8_t pin1_state = res.data.card_status.cards[i].upin_state;
- uint8_t pin1_retries = res.data.card_status.cards[i].upin_retries;
- uint8_t puk1_retries = res.data.card_status.cards[i].upuk_retries;
- uint8_t pin2_state;
- uint8_t pin2_retries;
- uint8_t puk2_retries;
- bool has_pin2 = false;
-
- for (int j = 0; j < res.data.card_status.cards[i].applications_n; ++j) {
- if (res.data.card_status.cards[i].applications[j].type == QMI_UIM_CARD_APPLICATION_TYPE_UNKNOWN)
- continue;
-
- card_application_state = pin1_state = res.data.card_status.cards[i].applications[j].state;
-
- if (!res.data.card_status.cards[i].applications[j].upin_replaces_pin1) {
- pin1_state = res.data.card_status.cards[i].applications[j].pin1_state;
- pin1_retries = res.data.card_status.cards[i].applications[j].pin1_retries;
- puk1_retries = res.data.card_status.cards[i].applications[j].puk1_retries;
- }
-
- pin2_state = res.data.card_status.cards[i].applications[j].pin2_state;
- pin2_retries = res.data.card_status.cards[i].applications[j].pin2_retries;
- puk2_retries = res.data.card_status.cards[i].applications[j].puk2_retries;
- has_pin2 = true;
-
- break; /* handle first application only for now */
- }
-
- if (card_application_state > QMI_UIM_CARD_APPLICATION_STATE_READY)
- card_application_state = QMI_UIM_CARD_APPLICATION_STATE_UNKNOWN;
-
- blobmsg_add_u32(&status, "card_slot", i + 1); /* Slot is idx + 1 */
- blobmsg_add_string(&status, "card_application_state", card_application_states[card_application_state]);
- blobmsg_add_string(&status, "pin1_status", get_pin_status(pin1_state));
- blobmsg_add_u32(&status, "pin1_verify_tries", pin1_retries);
- blobmsg_add_u32(&status, "pin1_unlock_tries", puk1_retries);
- if (has_pin2) {
- blobmsg_add_string(&status, "pin2_status", get_pin_status(pin2_state));
- blobmsg_add_u32(&status, "pin2_verify_tries", pin2_retries);
- blobmsg_add_u32(&status, "pin2_unlock_tries", puk2_retries);
- }
-
- break; /* handle only first preset SIM card for now */
- }
-
- blobmsg_close_table(&status, card_table);
-}
-
-static enum qmi_cmd_result
-cmd_uim_get_sim_state_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- qmi_set_uim_get_card_status_request(msg);
- return QMI_CMD_REQUEST;
-}
-
-#define cmd_uim_slot_cb no_cb
-static enum qmi_cmd_result
-cmd_uim_slot_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- char *err;
- int value = strtoul(arg, &err, 10);
- if ((err && *err) || value < 1 || value > 2) {
- uqmi_add_error("Invalid UIM-Slot value. Allowed: [1,2]");
- return QMI_CMD_EXIT;
- }
-
- uim_slot = value;
-
- return QMI_CMD_DONE;
-}
-
-#define cmd_uim_power_off_cb no_cb
-static enum qmi_cmd_result
-cmd_uim_power_off_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- struct qmi_uim_power_off_sim_request data = {
- QMI_INIT(slot, uim_slot)
- };
-
- if (!uim_slot) {
- uqmi_add_error("UIM-Slot not set. Use --uim-slot <slot> to set it.");
- return QMI_CMD_EXIT;
- }
-
- qmi_set_uim_power_off_sim_request(msg, &data);
- return QMI_CMD_REQUEST;
-}
-
-#define cmd_uim_power_on_cb no_cb
-static enum qmi_cmd_result
-cmd_uim_power_on_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- struct qmi_uim_power_on_sim_request data = {
- QMI_INIT(slot, uim_slot)
- };
-
- if (!uim_slot) {
- uqmi_add_error("UIM-Slot not set. Use --uim-slot <slot> to set it.");
- return QMI_CMD_EXIT;
- }
-
- qmi_set_uim_power_on_sim_request(msg, &data);
- return QMI_CMD_REQUEST;
-}
+++ /dev/null
-/*
- * uqmi -- tiny QMI support implementation
- *
- * Copyright (C) 2016 Felix Fietkau <nbd@nbd.name>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA.
- */
-
-#define __uqmi_uim_commands \
- __uqmi_command(uim_slot, uim-slot, required, CMD_TYPE_OPTION), \
- __uqmi_command(uim_verify_pin1, uim-verify-pin1, required, QMI_SERVICE_UIM), \
- __uqmi_command(uim_verify_pin2, uim-verify-pin2, required, QMI_SERVICE_UIM), \
- __uqmi_command(uim_get_sim_state, uim-get-sim-state, no, QMI_SERVICE_UIM), \
- __uqmi_command(uim_power_off, uim-power-off, no, QMI_SERVICE_UIM), \
- __uqmi_command(uim_power_on, uim-power-on, no, QMI_SERVICE_UIM) \
-
-
-#define uim_helptext \
- " --uim-verify-pin1 <pin>: Verify PIN1 (new devices)\n" \
- " --uim-verify-pin2 <pin>: Verify PIN2 (new devices)\n" \
- " --uim-get-sim-state: Get current SIM state\n" \
- " --uim-power-off: Power off SIM card\n" \
- " --uim-slot: SIM slot [1-2]\n" \
- " --uim-power-on: Power on SIM card\n" \
- " --uim-slot: SIM slot [1-2]\n" \
-
+++ /dev/null
-/*
- * uqmi -- tiny QMI support implementation
- *
- * Copyright (C) 2014-2015 Felix Fietkau <nbd@openwrt.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA.
- */
-
-#include <stdlib.h>
-
-#include "qmi-message.h"
-
-static const struct {
- const char *name;
- QmiWdaLinkLayerProtocol val;
-} link_modes[] = {
- { "802.3", QMI_WDA_LINK_LAYER_PROTOCOL_802_3 },
- { "raw-ip", QMI_WDA_LINK_LAYER_PROTOCOL_RAW_IP },
-};
-
-#define cmd_wda_set_data_format_cb no_cb
-
-static enum qmi_cmd_result
-cmd_wda_set_data_format_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- struct qmi_wda_set_data_format_request data_req = {};
- int i;
-
- for (i = 0; i < ARRAY_SIZE(link_modes); i++) {
- if (strcasecmp(link_modes[i].name, arg) != 0)
- continue;
-
- qmi_set(&data_req, link_layer_protocol, link_modes[i].val);
- qmi_set_wda_set_data_format_request(msg, &data_req);
- return QMI_CMD_REQUEST;
- }
-
- uqmi_add_error("Invalid auth mode (valid: 802.3, raw-ip)");
- return QMI_CMD_EXIT;
-}
-
-static void
-cmd_wda_get_data_format_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
-{
- struct qmi_wda_get_data_format_response res;
- const char *name = "unknown";
- int i;
-
- qmi_parse_wda_get_data_format_response(msg, &res);
- for (i = 0; i < ARRAY_SIZE(link_modes); i++) {
- if (link_modes[i].val != res.data.link_layer_protocol)
- continue;
-
- name = link_modes[i].name;
- break;
- }
-
- blobmsg_add_string(&status, NULL, name);
-}
-
-static enum qmi_cmd_result
-cmd_wda_get_data_format_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- struct qmi_wda_get_data_format_request data_req = {};
- qmi_set_wda_get_data_format_request(msg, &data_req);
- return QMI_CMD_REQUEST;
-}
+++ /dev/null
-/*
- * uqmi -- tiny QMI support implementation
- *
- * Copyright (C) 2014-2015 Felix Fietkau <nbd@openwrt.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA.
- */
-
-#define __uqmi_wda_commands \
- __uqmi_command(wda_set_data_format, wda-set-data-format, required, QMI_SERVICE_WDA), \
- __uqmi_command(wda_get_data_format, wda-get-data-format, no, QMI_SERVICE_WDA)
-
-
-#define wda_helptext \
- " --wda-set-data-format <type>: Set data format (type: 802.3|raw-ip)\n" \
- " --wda-get-data-format: Get data format\n" \
-
+++ /dev/null
-/*
- * uqmi -- tiny QMI support implementation
- *
- * Copyright (C) 2014-2015 Felix Fietkau <nbd@openwrt.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA.
- */
-
-#include <stdlib.h>
-#include <arpa/inet.h>
-
-#include "qmi-message.h"
-
-static const struct {
- const char *auth_name;
- QmiWdsAuthentication auth;
-} auth_modes[] = {
- { "none", QMI_WDS_AUTHENTICATION_NONE },
- { "pap", QMI_WDS_AUTHENTICATION_PAP },
- { "chap", QMI_WDS_AUTHENTICATION_CHAP },
- { "both", QMI_WDS_AUTHENTICATION_PAP | QMI_WDS_AUTHENTICATION_CHAP },
-};
-
-static const struct {
- const char *ipfam_name;
- const QmiWdsIpFamily mode;
-} ipfam_modes[] = {
- { "ipv4", QMI_WDS_IP_FAMILY_IPV4 },
- { "ipv6", QMI_WDS_IP_FAMILY_IPV6 },
- { "unspecified", QMI_WDS_IP_FAMILY_UNSPECIFIED },
-};
-
-static const struct {
- const char *pdp_name;
- const QmiWdsPdpType type;
-} pdp_types[] = {
- { "ipv4", QMI_WDS_PDP_TYPE_IPV4 },
- { "ppp", QMI_WDS_PDP_TYPE_PPP },
- { "ipv6", QMI_WDS_PDP_TYPE_IPV6 },
- { "ipv4v6", QMI_WDS_PDP_TYPE_IPV4_OR_IPV6 },
-};
-
-static const struct {
- const char *profile_name;
- const QmiWdsProfileType profile;
-} profile_types[] = {
- { "3gpp", QMI_WDS_PROFILE_TYPE_3GPP },
- { "3gpp2", QMI_WDS_PROFILE_TYPE_3GPP2 },
-};
-
-static struct qmi_wds_start_network_request wds_sn_req = {
- QMI_INIT(authentication_preference,
- QMI_WDS_AUTHENTICATION_PAP | QMI_WDS_AUTHENTICATION_CHAP),
-};
-
-static struct qmi_wds_stop_network_request wds_stn_req;
-
-static struct qmi_wds_modify_profile_request wds_mp_req = {
- QMI_INIT_SEQUENCE(profile_identifier,
- .profile_type = QMI_WDS_PROFILE_TYPE_3GPP,
- .profile_index = 1,
- ),
- QMI_INIT(apn_disabled_flag, false),
-};
-
-static struct qmi_wds_create_profile_request wds_cp_req = {
- QMI_INIT(profile_type,QMI_WDS_PROFILE_TYPE_3GPP),
- QMI_INIT(apn_disabled_flag, false),
-};
-
-#define cmd_wds_set_apn_cb no_cb
-static enum qmi_cmd_result
-cmd_wds_set_apn_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- qmi_set_ptr(&wds_sn_req, apn, arg);
- qmi_set_ptr(&wds_mp_req, apn_name, arg);
- qmi_set_ptr(&wds_cp_req, apn_name, arg);
- return QMI_CMD_DONE;
-}
-
-#define cmd_wds_set_auth_cb no_cb
-static enum qmi_cmd_result
-cmd_wds_set_auth_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- int i;
- for (i = 0; i < ARRAY_SIZE(auth_modes); i++) {
- if (strcasecmp(auth_modes[i].auth_name, arg) != 0)
- continue;
-
- qmi_set(&wds_sn_req, authentication_preference, auth_modes[i].auth);
- qmi_set(&wds_mp_req, authentication, auth_modes[i].auth);
- qmi_set(&wds_cp_req, authentication, auth_modes[i].auth);
- return QMI_CMD_DONE;
- }
-
- uqmi_add_error("Invalid auth mode (valid: pap, chap, both, none)");
- return QMI_CMD_EXIT;
-}
-
-#define cmd_wds_set_username_cb no_cb
-static enum qmi_cmd_result
-cmd_wds_set_username_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- qmi_set_ptr(&wds_sn_req, username, arg);
- qmi_set_ptr(&wds_mp_req, username, arg);
- qmi_set_ptr(&wds_cp_req, username, arg);
- return QMI_CMD_DONE;
-}
-
-#define cmd_wds_set_password_cb no_cb
-static enum qmi_cmd_result
-cmd_wds_set_password_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- qmi_set_ptr(&wds_sn_req, password, arg);
- qmi_set_ptr(&wds_mp_req, password, arg);
- qmi_set_ptr(&wds_cp_req, password, arg);
- return QMI_CMD_DONE;
-}
-
-#define cmd_wds_set_autoconnect_cb no_cb
-static enum qmi_cmd_result
-cmd_wds_set_autoconnect_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- qmi_set(&wds_sn_req, enable_autoconnect, true);
- qmi_set(&wds_stn_req, disable_autoconnect, true);
- return QMI_CMD_DONE;
-}
-
-#define cmd_wds_set_ip_family_pref_cb no_cb
-static enum qmi_cmd_result
-cmd_wds_set_ip_family_pref_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- int i;
- for (i = 0; i < ARRAY_SIZE(ipfam_modes); i++) {
- if (strcasecmp(ipfam_modes[i].ipfam_name, arg) != 0)
- continue;
-
- qmi_set(&wds_sn_req, ip_family_preference, ipfam_modes[i].mode);
- return QMI_CMD_DONE;
- }
-
- uqmi_add_error("Invalid value (valid: ipv4, ipv6, unspecified)");
- return QMI_CMD_EXIT;
-}
-
-#define cmd_wds_set_pdp_type_cb no_cb
-static enum qmi_cmd_result
-cmd_wds_set_pdp_type_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- int i;
-
- for (i = 0; i < ARRAY_SIZE(pdp_types); i++) {
- if (strcasecmp(pdp_types[i].pdp_name, arg) != 0)
- continue;
-
- qmi_set(&wds_mp_req, pdp_type, pdp_types[i].type);
- qmi_set(&wds_cp_req, pdp_type, pdp_types[i].type);
- return QMI_CMD_DONE;
- }
-
- uqmi_add_error("Invalid value (valid: ipv4, ipv6, ipv4v6)");
- return QMI_CMD_EXIT;
-}
-
-#define cmd_wds_no_roaming_cb no_cb
-static enum qmi_cmd_result
-cmd_wds_no_roaming_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- if (strcmp(arg, "true") == 0) {
- qmi_set(&wds_mp_req, roaming_disallowed_flag, true);
- qmi_set(&wds_cp_req, roaming_disallowed_flag, true);
- } else if (strcmp(arg, "false") == 0) {
- qmi_set(&wds_mp_req, roaming_disallowed_flag, false);
- qmi_set(&wds_cp_req, roaming_disallowed_flag, false);
- } else {
- uqmi_add_error("Invalid value (true or false)");
- return QMI_CMD_EXIT;
- }
- return QMI_CMD_DONE;
-}
-
-#define cmd_wds_set_profile_cb no_cb
-static enum qmi_cmd_result
-cmd_wds_set_profile_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- uint32_t idx = strtoul(arg, NULL, 10);
-
- qmi_set(&wds_sn_req, profile_index_3gpp, idx);
- return QMI_CMD_DONE;
-}
-
-static void
-cmd_wds_start_network_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
-{
- struct qmi_wds_start_network_response res;
-
- qmi_parse_wds_start_network_response(msg, &res);
- if (res.set.packet_data_handle)
- blobmsg_add_u32(&status, NULL, res.data.packet_data_handle);
-}
-
-static enum qmi_cmd_result
-cmd_wds_start_network_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- qmi_set_wds_start_network_request(msg, &wds_sn_req);
- return QMI_CMD_REQUEST;
-}
-
-#define cmd_wds_stop_network_cb no_cb
-static enum qmi_cmd_result
-cmd_wds_stop_network_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- uint32_t pdh = strtoul(arg, NULL, 0);
-
- qmi_set(&wds_stn_req, packet_data_handle, pdh);
- qmi_set_wds_stop_network_request(msg, &wds_stn_req);
- return QMI_CMD_REQUEST;
-}
-
-static void
-cmd_wds_modify_profile_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
-{
- struct qmi_wds_modify_profile_response res;
- qmi_parse_wds_modify_profile_response(msg, &res);
-}
-
-static enum qmi_cmd_result
-cmd_wds_modify_profile_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- int id;
- char *s;
- char *p_type;
-
- s = strchr(arg, ',');
- if (!s) {
- fprintf(stderr, "Invalid argument\n");
- return QMI_CMD_EXIT;
- }
- *s = 0;
- s++;
-
- id = strtoul(s, &s, 0);
- if (s && *s) {
- fprintf(stderr, "Invalid argument\n");
- return QMI_CMD_EXIT;
- }
-
- p_type = strtok(arg, ",");
-
- int i;
- for (i = 0; i < ARRAY_SIZE(profile_types); i++) {
- if (strcasecmp(profile_types[i].profile_name, p_type) != 0)
- continue;
-
- qmi_set_ptr(&wds_mp_req, profile_identifier.profile_type, profile_types[i].profile);
- qmi_set_ptr(&wds_mp_req, profile_identifier.profile_index, id);
- qmi_set_wds_modify_profile_request(msg, &wds_mp_req);
- return QMI_CMD_REQUEST;
- }
-
- uqmi_add_error("Invalid value (valid: 3gpp or 3gpp2)");
- return QMI_CMD_EXIT;
-}
-
-static void
-cmd_wds_create_profile_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
-{
- struct qmi_wds_create_profile_response res;
- void *p;
-
- qmi_parse_wds_create_profile_response(msg, &res);
-
- if (res.set.profile_identifier) {
- p = blobmsg_open_table(&status, NULL);
- blobmsg_add_u32(&status, "created-profile", res.data.profile_identifier.profile_index);
- blobmsg_close_table(&status, p);
- }
-}
-
-static enum qmi_cmd_result
-cmd_wds_create_profile_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- int i;
- for (i = 0; i < ARRAY_SIZE(profile_types); i++) {
- if (strcasecmp(profile_types[i].profile_name, arg) != 0)
- continue;
-
- qmi_set_ptr(&wds_cp_req, profile_type, profile_types[i].profile);
-
- qmi_set_wds_create_profile_request(msg, &wds_cp_req);
- return QMI_CMD_REQUEST;
- }
-
- uqmi_add_error("Invalid value (valid: 3gpp or 3gpp2)");
- return QMI_CMD_EXIT;
-}
-
-static void
-cmd_wds_get_packet_service_status_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
-{
- struct qmi_wds_get_packet_service_status_response res;
- const char *data_status[] = {
- [QMI_WDS_CONNECTION_STATUS_UNKNOWN] = "unknown",
- [QMI_WDS_CONNECTION_STATUS_DISCONNECTED] = "disconnected",
- [QMI_WDS_CONNECTION_STATUS_CONNECTED] = "connected",
- [QMI_WDS_CONNECTION_STATUS_SUSPENDED] = "suspended",
- [QMI_WDS_CONNECTION_STATUS_AUTHENTICATING] = "authenticating",
- };
- int s = 0;
-
- qmi_parse_wds_get_packet_service_status_response(msg, &res);
- if (res.set.connection_status &&
- res.data.connection_status < ARRAY_SIZE(data_status))
- s = res.data.connection_status;
-
- blobmsg_add_string(&status, NULL, data_status[s]);
-}
-
-static enum qmi_cmd_result
-cmd_wds_get_packet_service_status_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- qmi_set_wds_get_packet_service_status_request(msg);
- return QMI_CMD_REQUEST;
-}
-
-#define cmd_wds_set_autoconnect_settings_cb no_cb
-static enum qmi_cmd_result
-cmd_wds_set_autoconnect_settings_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- struct qmi_wds_set_autoconnect_settings_request ac_req;
- const char *modes[] = {
- [QMI_WDS_AUTOCONNECT_SETTING_DISABLED] = "disabled",
- [QMI_WDS_AUTOCONNECT_SETTING_ENABLED] = "enabled",
- [QMI_WDS_AUTOCONNECT_SETTING_PAUSED] = "paused",
- };
- int i;
-
- for (i = 0; i < ARRAY_SIZE(modes); i++) {
- if (strcasecmp(modes[i], arg) != 0)
- continue;
-
- qmi_set(&ac_req, status, i);
- qmi_set_wds_set_autoconnect_settings_request(msg, &ac_req);
- return QMI_CMD_DONE;
- }
-
- uqmi_add_error("Invalid value (valid: disabled, enabled, paused)");
- return QMI_CMD_EXIT;
-}
-
-#define cmd_wds_reset_cb no_cb
-static enum qmi_cmd_result
-cmd_wds_reset_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- qmi_set_wds_reset_request(msg);
- return QMI_CMD_REQUEST;
-}
-
-#define cmd_wds_set_ip_family_cb no_cb
-static enum qmi_cmd_result
-cmd_wds_set_ip_family_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- struct qmi_wds_set_ip_family_request ipf_req;
-
- int i;
- for (i = 0; i < ARRAY_SIZE(ipfam_modes); i++) {
- if (strcasecmp(ipfam_modes[i].ipfam_name, arg) != 0)
- continue;
-
- qmi_set(&ipf_req, preference, ipfam_modes[i].mode);
- qmi_set_wds_set_ip_family_request(msg, &ipf_req);
- return QMI_CMD_REQUEST;
- }
-
- uqmi_add_error("Invalid value (valid: ipv4, ipv6, unspecified)");
- return QMI_CMD_EXIT;
-}
-
-static void wds_to_ipv4(const char *name, const uint32_t addr)
-{
- struct in_addr ip_addr;
- char buf[INET_ADDRSTRLEN];
-
- ip_addr.s_addr = htonl(addr);
- blobmsg_add_string(&status, name, inet_ntop(AF_INET, &ip_addr, buf, sizeof(buf)));
-}
-
-static void wds_to_ipv6(const char *name, const uint16_t *addr)
-{
- char buf[INET6_ADDRSTRLEN];
- uint16_t ip_addr[8];
- int i;
-
- for (i = 0; i < ARRAY_SIZE(ip_addr); i++)
- ip_addr[i] = htons(addr[i]);
-
- blobmsg_add_string(&status, name, inet_ntop(AF_INET6, &ip_addr, buf, sizeof(buf)));
-}
-
-static enum qmi_cmd_result
-cmd_wds_get_profile_settings_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- int id;
- char *s;
- char *p_type;
-
- s = strchr(arg, ',');
- if (!s) {
- fprintf(stderr, "Invalid argument\n");
- return QMI_CMD_EXIT;
- }
- *s = 0;
- s++;
-
- id = strtoul(s, &s, 0);
- if (s && *s) {
- fprintf(stderr, "Invalid argument\n");
- return QMI_CMD_EXIT;
- }
-
- p_type = strtok(arg, ",");
-
- int i;
- for (i = 0; i < ARRAY_SIZE(profile_types); i++) {
- if (strcasecmp(profile_types[i].profile_name, p_type) != 0)
- continue;
-
- struct qmi_wds_get_profile_settings_request p_num = {
- QMI_INIT_SEQUENCE(profile_id,
- .profile_type = profile_types[i].profile,
- .profile_index = id,
- )
- };
- qmi_set_wds_get_profile_settings_request(msg, &p_num);
- return QMI_CMD_REQUEST;
- }
-
- uqmi_add_error("Invalid value (valid: 3gpp or 3gpp2)");
- return QMI_CMD_EXIT;
-}
-
-static void
-cmd_wds_get_profile_settings_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
-{
- struct qmi_wds_get_profile_settings_response res;
-
- void *p;
-
- qmi_parse_wds_get_profile_settings_response(msg, &res);
-
- p = blobmsg_open_table(&status, NULL);
-
- blobmsg_add_string(&status, "apn", res.data.apn_name);
- if (res.set.pdp_type && (int) res.data.pdp_type < ARRAY_SIZE(pdp_types))
- blobmsg_add_string(&status, "pdp-type", pdp_types[res.data.pdp_type].pdp_name);
- blobmsg_add_string(&status, "username", res.data.username);
- blobmsg_add_string(&status, "password", res.data.password);
- if (res.set.authentication && (int) res.data.authentication < ARRAY_SIZE(auth_modes))
- blobmsg_add_string(&status, "auth", auth_modes[res.data.authentication].auth_name);
- blobmsg_add_u8(&status, "no-roaming", res.data.roaming_disallowed_flag);
- blobmsg_add_u8(&status, "apn-disabled", res.data.apn_disabled_flag);
- blobmsg_close_table(&status, p);
-}
-
-static void
-cmd_wds_get_current_settings_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
-{
- void *v4, *v6, *d, *t;
- struct qmi_wds_get_current_settings_response res;
- int i;
-
- qmi_parse_wds_get_current_settings_response(msg, &res);
-
- t = blobmsg_open_table(&status, NULL);
-
- if (res.set.pdp_type && (int) res.data.pdp_type < ARRAY_SIZE(pdp_types))
- blobmsg_add_string(&status, "pdp-type", pdp_types[res.data.pdp_type].pdp_name);
-
- if (res.set.ip_family) {
- for (i = 0; i < ARRAY_SIZE(ipfam_modes); i++) {
- if (ipfam_modes[i].mode != res.data.ip_family)
- continue;
- blobmsg_add_string(&status, "ip-family", ipfam_modes[i].ipfam_name);
- break;
- }
- }
-
- if (res.set.mtu)
- blobmsg_add_u32(&status, "mtu", res.data.mtu);
-
- /* IPV4 */
- v4 = blobmsg_open_table(&status, "ipv4");
-
- if (res.set.ipv4_address)
- wds_to_ipv4("ip", res.data.ipv4_address);
- if (res.set.primary_ipv4_dns_address)
- wds_to_ipv4("dns1", res.data.primary_ipv4_dns_address);
- if (res.set.secondary_ipv4_dns_address)
- wds_to_ipv4("dns2", res.data.secondary_ipv4_dns_address);
- if (res.set.ipv4_gateway_address)
- wds_to_ipv4("gateway", res.data.ipv4_gateway_address);
- if (res.set.ipv4_gateway_subnet_mask)
- wds_to_ipv4("subnet", res.data.ipv4_gateway_subnet_mask);
- blobmsg_close_table(&status, v4);
-
- /* IPV6 */
- v6 = blobmsg_open_table(&status, "ipv6");
-
- if (res.set.ipv6_address) {
- wds_to_ipv6("ip", res.data.ipv6_address.address);
- blobmsg_add_u32(&status, "ip-prefix-length", res.data.ipv6_address.prefix_length);
- }
- if (res.set.ipv6_gateway_address) {
- wds_to_ipv6("gateway", res.data.ipv6_gateway_address.address);
- blobmsg_add_u32(&status, "gw-prefix-length", res.data.ipv6_gateway_address.prefix_length);
- }
- if (res.set.ipv6_primary_dns_address)
- wds_to_ipv6("dns1", res.data.ipv6_primary_dns_address);
- if (res.set.ipv6_secondary_dns_address)
- wds_to_ipv6("dns2", res.data.ipv6_secondary_dns_address);
-
- blobmsg_close_table(&status, v6);
-
- d = blobmsg_open_table(&status, "domain-names");
- for (i = 0; i < res.data.domain_name_list_n; i++) {
- blobmsg_add_string(&status, NULL, res.data.domain_name_list[i]);
- }
- blobmsg_close_table(&status, d);
-
- blobmsg_close_table(&status, t);
-}
-
-static enum qmi_cmd_result
-cmd_wds_get_current_settings_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- struct qmi_wds_get_current_settings_request gcs_req;
- memset(&gcs_req, '\0', sizeof(struct qmi_wds_get_current_settings_request));
- qmi_set(&gcs_req, requested_settings,
- QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_PDP_TYPE |
- QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_DNS_ADDRESS |
- QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_GRANTED_QOS |
- QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_IP_ADDRESS |
- QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_GATEWAY_INFO |
- QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_MTU |
- QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_DOMAIN_NAME_LIST |
- QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_IP_FAMILY);
- qmi_set_wds_get_current_settings_request(msg, &gcs_req);
- return QMI_CMD_REQUEST;
-}
-
-static enum qmi_cmd_result
-cmd_wds_get_default_profile_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- int i;
- for (i = 0; i < ARRAY_SIZE(profile_types); i++) {
- if (strcasecmp(profile_types[i].profile_name, arg) != 0)
- continue;
-
- struct qmi_wds_get_default_profile_number_request type_family = {
- QMI_INIT_SEQUENCE(profile_type,
- .type = profile_types[i].profile,
- .family = QMI_WDS_PROFILE_FAMILY_TETHERED,
- )
- };
-
- qmi_set_wds_get_default_profile_number_request(msg, &type_family);
- return QMI_CMD_REQUEST;
- }
-
- uqmi_add_error("Invalid value (valid: 3gpp or 3gpp2)");
- return QMI_CMD_EXIT;
-}
-
-static void
-cmd_wds_get_default_profile_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
-{
- struct qmi_wds_get_default_profile_number_response res;
- void *p;
- qmi_parse_wds_get_default_profile_number_response(msg, &res);
-
- p = blobmsg_open_table(&status, NULL);
-
- blobmsg_add_u32(&status, "default-profile", res.data.index);
-
- blobmsg_close_table(&status, p);
-}
+++ /dev/null
-/*
- * uqmi -- tiny QMI support implementation
- *
- * Copyright (C) 2014-2015 Felix Fietkau <nbd@openwrt.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA.
- */
-
-#define __uqmi_wds_commands \
- __uqmi_command(wds_start_network, start-network, no, QMI_SERVICE_WDS), \
- __uqmi_command(wds_set_apn, apn, required, CMD_TYPE_OPTION), \
- __uqmi_command(wds_set_auth, auth-type, required, CMD_TYPE_OPTION), \
- __uqmi_command(wds_set_username, username, required, CMD_TYPE_OPTION), \
- __uqmi_command(wds_set_password, password, required, CMD_TYPE_OPTION), \
- __uqmi_command(wds_set_ip_family_pref, ip-family, required, CMD_TYPE_OPTION), \
- __uqmi_command(wds_set_autoconnect, autoconnect, no, CMD_TYPE_OPTION), \
- __uqmi_command(wds_set_profile, profile, required, CMD_TYPE_OPTION), \
- __uqmi_command(wds_stop_network, stop-network, required, QMI_SERVICE_WDS), \
- __uqmi_command(wds_get_packet_service_status, get-data-status, no, QMI_SERVICE_WDS), \
- __uqmi_command(wds_set_ip_family, set-ip-family, required, QMI_SERVICE_WDS), \
- __uqmi_command(wds_set_autoconnect_settings, set-autoconnect, required, QMI_SERVICE_WDS), \
- __uqmi_command(wds_reset, reset-wds, no, QMI_SERVICE_WDS), \
- __uqmi_command(wds_get_profile_settings, get-profile-settings, required, QMI_SERVICE_WDS), \
- __uqmi_command(wds_get_default_profile, get-default-profile, required, QMI_SERVICE_WDS), \
- __uqmi_command(wds_create_profile, create-profile, required, QMI_SERVICE_WDS), \
- __uqmi_command(wds_modify_profile, modify-profile, required, QMI_SERVICE_WDS), \
- __uqmi_command(wds_set_pdp_type, pdp-type, required, CMD_TYPE_OPTION), \
- __uqmi_command(wds_no_roaming, no-roaming, required, CMD_TYPE_OPTION), \
- __uqmi_command(wds_get_current_settings, get-current-settings, no, QMI_SERVICE_WDS) \
-
-
-#define wds_helptext \
- " --start-network: Start network connection (use with options below)\n" \
- " --apn <apn>: Use APN\n" \
- " --auth-type pap|chap|both|none: Use network authentication type\n" \
- " --username <name>: Use network username\n" \
- " --password <password>: Use network password\n" \
- " --ip-family <family>: Use ip-family for the connection (ipv4, ipv6, unspecified)\n" \
- " --autoconnect: Enable automatic connect/reconnect\n" \
- " --profile <index>: Use connection profile\n" \
- " --stop-network <pdh>: Stop network connection (use with option below)\n" \
- " --autoconnect: Disable automatic connect/reconnect\n" \
- " --get-data-status: Get current data access status\n" \
- " --set-ip-family <val>: Set ip-family (ipv4, ipv6, unspecified)\n" \
- " --set-autoconnect <val>: Set automatic connect/reconnect (disabled, enabled, paused)\n" \
- " --get-profile-settings <val,#>: Get APN profile settings (3gpp, 3gpp2),#\n" \
- " --get-default-profile <val>: Get default profile number (3gpp, 3gpp2)\n" \
- " --create-profile <val> Create profile (3gpp, 3gpp2)\n" \
- " --apn <apn>: Use APN\n" \
- " --pdp-type ipv4|ipv6|ipv4v6>: Use pdp-type for the connection\n" \
- " --username <name>: Use network username\n" \
- " --password <password>: Use network password\n" \
- " --auth-type pap|chap|both|none: Use network authentication type\n" \
- " --no-roaming false|true To allow roaming, set to false\n" \
- " --modify-profile <val>,# Modify profile number (3gpp, 3gpp2)\n" \
- " --apn <apn>: Use APN\n" \
- " --pdp-type ipv4|ipv6|ipv4v6>: Use pdp-type for the connection\n" \
- " --username <name>: Use network username\n" \
- " --password <password>: Use network password\n" \
- " --auth-type pap|chap|both|none: Use network authentication type\n" \
- " --no-roaming false|true To allow roaming, set to false\n" \
- " --get-current-settings: Get current connection settings\n" \
-
+++ /dev/null
-/*
- * uqmi -- tiny QMI support implementation
- *
- * Copyright (C) 2014-2015 Felix Fietkau <nbd@openwrt.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA.
- */
-
-#include "qmi-message.h"
-
-#define MIN(a,b) (((a)<(b))?(a):(b))
-#define CEILDIV(x,y) (((x) + (y) - 1) / (y))
-
-static struct qmi_wms_list_messages_request lmreq = {
- QMI_INIT(storage_type, QMI_WMS_STORAGE_TYPE_UIM),
- QMI_INIT(message_tag, QMI_WMS_MESSAGE_TAG_TYPE_MT_NOT_READ),
-};
-
-static struct qmi_wms_delete_request dmreq = {
- QMI_INIT(memory_storage, QMI_WMS_STORAGE_TYPE_UIM),
- QMI_INIT(message_mode, QMI_WMS_MESSAGE_MODE_GSM_WCDMA),
-};
-
-static struct qmi_wms_raw_read_request gmreq = {
- QMI_INIT_SEQUENCE(message_memory_storage_id,
- .storage_type = QMI_WMS_STORAGE_TYPE_UIM,
- ),
- QMI_INIT(message_mode, QMI_WMS_MESSAGE_MODE_GSM_WCDMA),
-};
-
-
-#define cmd_wms_storage_cb no_cb
-static enum qmi_cmd_result
-cmd_wms_storage_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- if (strcmp(arg, "sim") == 0) {
- } else if (strcmp(arg, "me") == 0) {
- qmi_set_ptr(&lmreq, storage_type, QMI_WMS_STORAGE_TYPE_NV);
- qmi_set_ptr(&dmreq, memory_storage, QMI_WMS_STORAGE_TYPE_NV);
- qmi_set_ptr(&gmreq, message_memory_storage_id.storage_type, QMI_WMS_STORAGE_TYPE_NV);
- } else {
- uqmi_add_error("Invalid value (sim or me)");
- return QMI_CMD_EXIT;
- }
- return QMI_CMD_DONE;
-}
-
-static void cmd_wms_list_messages_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
-{
- struct qmi_wms_list_messages_response res;
- void *c;
- int i;
-
- qmi_parse_wms_list_messages_response(msg, &res);
- c = blobmsg_open_array(&status, NULL);
- for (i = 0; i < res.data.message_list_n; i++)
- blobmsg_add_u32(&status, NULL, res.data.message_list[i].memory_index);
-
- blobmsg_close_array(&status, c);
-}
-
-static enum qmi_cmd_result
-cmd_wms_list_messages_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- qmi_set_wms_list_messages_request(msg, &lmreq);
-
- return QMI_CMD_REQUEST;
-}
-
-static int
-put_unicode_char(char *dest, uint16_t c)
-{
- if (c < 0x80) {
- *dest = c;
- return 1;
- } else if (c < 0x800) {
- *(dest++) = 0xc0 | ((c >> 6) & 0x1f);
- *dest = 0x80 | (c & 0x3f);
- return 2;
- } else {
- *(dest++) = 0xe0 | ((c >> 12) & 0xf);
- *(dest++) = 0x80 | ((c >> 6) & 0x3f);
- *dest = 0x80 | (c & 0x3f);
- return 3;
- }
-}
-
-
-static int
-pdu_decode_7bit_char(char *dest, int len, unsigned char c, bool *escape)
-{
- uint16_t conv_0x20[] = {
- 0x0040, 0x00A3, 0x0024, 0x00A5, 0x00E8, 0x00E9, 0x00F9, 0x00EC,
- 0x00F2, 0x00E7, 0x000A, 0x00D8, 0x00F8, 0x000D, 0x00C5, 0x00E5,
- 0x0394, 0x005F, 0x03A6, 0x0393, 0x039B, 0x03A9, 0x03A0, 0x03A8,
- 0x03A3, 0x0398, 0x039E, 0x00A0, 0x00C6, 0x00E6, 0x00DF, 0x00C9,
- };
- uint16_t conv_0x5b[] = {
- 0x00C4, 0x00D6, 0x00D1, 0x00DC, 0x00A7, 0x00BF,
- };
- uint16_t conv_0x7b[] = {
- 0x00E4, 0x00F6, 0x00F1, 0x00FC, 0x00E0
- };
- int cur_len = 0;
- uint16_t outc;
-
- fprintf(stderr, " %02x", c);
- dest += len;
- if (*escape) {
- *escape = false;
- switch(c) {
- case 0x0A:
- *dest = 0x0C;
- return 1;
- case 0x14:
- *dest = 0x5E;
- return 1;
- case 0x28:
- *dest = 0x7B;
- return 1;
- case 0x29:
- *dest = 0x7D;
- return 1;
- case 0x2F:
- *dest = 0x5C;
- return 1;
- case 0x3C:
- *dest = 0x5B;
- return 1;
- case 0x3D:
- *dest = 0x7E;
- return 1;
- case 0x3E:
- *dest = 0x5D;
- return 1;
- case 0x40:
- *dest = 0x7C;
- return 1;
- case 0x65:
- outc = 0x20AC;
- goto out;
- case 0x1B:
- goto normal;
- default:
- /* invalid */
- *(dest++) = conv_0x20[0x1B];
- cur_len++;
- goto normal;
- }
- }
-
- if (c == 0x1b) {
- *escape = true;
- return 0;
- }
-
-normal:
- if (c < 0x20)
- outc = conv_0x20[(int) c];
- else if (c == 0x40)
- outc = 0x00A1;
- else if (c >= 0x5b && c <= 0x60)
- outc = conv_0x5b[c - 0x5b];
- else if (c >= 0x7b && c <= 0x7f)
- outc = conv_0x7b[c - 0x7b];
- else
- outc = c;
-
-out:
- return cur_len + put_unicode_char(dest, outc);
-}
-
-static int
-pdu_decode_7bit_str(char *dest, const unsigned char *data, int data_len, int bit_offset)
-{
- bool escape = false;
- int len = 0;
- int i;
-
- fprintf(stderr, "Raw text:");
- for (i = 0; i < data_len; i++) {
- int pos = (i + bit_offset) % 7;
-
- if (pos == 0) {
- len += pdu_decode_7bit_char(dest, len, data[i] & 0x7f, &escape);
- } else {
- if (i)
- len += pdu_decode_7bit_char(dest, len,
- (data[i - 1] >> (7 + 1 - pos)) |
- ((data[i] << pos) & 0x7f), &escape);
-
- if (pos == 6)
- len += pdu_decode_7bit_char(dest, len, (data[i] >> 1) & 0x7f,
- &escape);
- }
- }
- dest[len] = 0;
- fprintf(stderr, "\n");
- return len;
-}
-
-static int decode_udh(const unsigned char *data)
-{
- const unsigned char *end;
- unsigned int type, len, udh_len;
-
- udh_len = *(data++);
- end = data + udh_len;
- while (data < end) {
- const unsigned char *val;
-
- type = data[0];
- len = data[1];
- val = &data[2];
- data += 2 + len;
- if (data > end)
- break;
-
- switch (type) {
- case 0x00:
- blobmsg_add_u32(&status, "concat_ref", (uint32_t) val[0]);
- blobmsg_add_u32(&status, "concat_part", (uint32_t) val[2]);
- blobmsg_add_u32(&status, "concat_parts", (uint32_t) val[1]);
- break;
- case 0x08:
- blobmsg_add_u32(&status, "concat_ref", (uint32_t) (val[0] << 8 | val[1]));
- blobmsg_add_u32(&status, "concat_part", (uint32_t) val[3]);
- blobmsg_add_u32(&status, "concat_parts", (uint32_t) val[2]);
- break;
- default:
- break;
- }
- }
-
- return udh_len + 1;
-}
-
-static void decode_7bit_field(char *name, const unsigned char *data, int data_len, int bit_offset)
-{
- char *dest = blobmsg_alloc_string_buffer(&status, name, 3 * data_len + 2);
- int out_len = pdu_decode_7bit_str(dest, data, CEILDIV(data_len * 7, 8), bit_offset);
- dest[out_len] = 0;
- blobmsg_add_string_buffer(&status);
-}
-
-static char *pdu_add_semioctet(char *str, char val)
-{
- *str = '0' + (val & 0xf);
- if (*str <= '9')
- str++;
-
- *str = '0' + ((val >> 4) & 0xf);
- if (*str <= '9')
- str++;
-
- return str;
-}
-
-static void
-pdu_decode_address(char *str, unsigned char *data, int len)
-{
- unsigned char toa;
-
- toa = *(data++);
- switch (toa & 0x70) {
- case 0x50:
- pdu_decode_7bit_str(str, data, len, 0);
- return;
- case 0x10:
- *(str++) = '+';
- /* fall through */
- default:
- while (len--) {
- str = pdu_add_semioctet(str, *data);
- data++;
- }
- }
-
- *str = 0;
-}
-
-static void wms_decode_address(char *name, unsigned char *data, int len)
-{
- char *str = blobmsg_alloc_string_buffer(&status, name, len * 2 + 2);
- pdu_decode_address(str, data, len);
- blobmsg_add_string_buffer(&status);
-}
-
-static void blobmsg_add_hex(struct blob_buf *buf, const char *name, unsigned const char *data, int len)
-{
- char* str = blobmsg_alloc_string_buffer(buf, name, len * 2 + 1);
- for (int i = 0; i < len; i++) {
- str += sprintf(str, "%02x", data[i]);
- }
- blobmsg_add_string_buffer(buf);
-}
-
-#define cmd_wms_delete_message_cb no_cb
-static enum qmi_cmd_result
-cmd_wms_delete_message_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- char *err;
- int id;
-
- id = strtoul(arg, &err, 10);
- if (err && *err) {
- uqmi_add_error("Invalid message ID");
- return QMI_CMD_EXIT;
- }
-
- dmreq.set.memory_index = 1;
- dmreq.data.memory_index = id;
-
- qmi_set_wms_delete_request(msg, &dmreq);
-
- return QMI_CMD_REQUEST;
-}
-
-
-static void cmd_wms_get_message_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
-{
- struct qmi_wms_raw_read_response res;
- unsigned char *data, *end;
- char *str;
- int cur_len;
- bool sent;
- unsigned char first, dcs;
- void *c;
-
- qmi_parse_wms_raw_read_response(msg, &res);
- c = blobmsg_open_table(&status, NULL);
- data = (unsigned char *) res.data.raw_message_data.raw_data;
- end = data + res.data.raw_message_data.raw_data_n;
-
- cur_len = *(data++);
- if (data + cur_len >= end)
- goto error;
-
- if (cur_len) {
- wms_decode_address("smsc", data, cur_len - 1);
- data += cur_len;
- }
-
- if (data + 3 >= end)
- goto error;
-
- first = *(data++);
- sent = (first & 0x3) == 1;
- if (sent)
- data++;
-
- cur_len = *(data++);
- if (data + cur_len >= end)
- goto error;
-
- if (cur_len) {
- cur_len = (cur_len + 1) / 2;
- wms_decode_address(sent ? "receiver" : "sender", data, cur_len);
- data += cur_len + 1;
- }
-
- if (data + 3 >= end)
- goto error;
-
- /* Protocol ID */
- if (*(data++) != 0)
- goto error;
-
- /* Data Encoding */
- dcs = *(data++);
-
- if (dcs & 0x10)
- blobmsg_add_u32(&status, "class", (dcs & 3));
-
- if (sent) {
- /* Message validity */
- data++;
- } else {
- if (data + 6 >= end)
- goto error;
-
- str = blobmsg_alloc_string_buffer(&status, "timestamp", 32);
-
- /* year */
- *(str++) = '2';
- *(str++) = '0';
- str = pdu_add_semioctet(str, data[0]);
- /* month */
- *(str++) = '-';
- str = pdu_add_semioctet(str, data[1]);
- /* day */
- *(str++) = '-';
- str = pdu_add_semioctet(str, data[2]);
-
- /* hour */
- *(str++) = ' ';
- str = pdu_add_semioctet(str, data[3]);
- /* minute */
- *(str++) = ':';
- str = pdu_add_semioctet(str, data[4]);
- /* second */
- *(str++) = ':';
- str = pdu_add_semioctet(str, data[5]);
- *str = 0;
-
- blobmsg_add_string_buffer(&status);
-
- data += 7;
- }
-
- int message_len = *(data++);
- int udh_len = 0;
- int bit_offset = 0;
-
- /* User Data Header */
- if (first & 0x40) {
- udh_len = decode_udh(data);
- data += udh_len;
- bit_offset = udh_len % 7;
- }
-
- if (data >= end)
- goto error;
-
- switch(dcs & 0x0c) {
- case 0x00:
- /* 7 bit GSM alphabet */
- message_len = message_len - CEILDIV(udh_len * 8, 7);
- message_len = MIN(message_len, CEILDIV((end - data) * 8, 7));
- decode_7bit_field("text", data, message_len, bit_offset);
- break;
- case 0x04:
- /* 8 bit data */
- message_len = MIN(message_len - udh_len, end - data);
- blobmsg_add_hex(&status, "data", data, message_len);
- break;
- case 0x08:
- /* 16 bit UCS-2 string */
- message_len = MIN(message_len - udh_len, end - data);
- blobmsg_add_hex(&status, "ucs-2", data, message_len);
- break;
- default:
- goto error;
- }
-
- blobmsg_close_table(&status, c);
- return;
-
-error:
- blobmsg_close_table(&status, c);
- fprintf(stderr, "There was an error reading message.\n");
-}
-
-static enum qmi_cmd_result
-cmd_wms_get_message_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- char *err;
- int id;
-
- id = strtoul(arg, &err, 10);
- if (err && *err) {
- uqmi_add_error("Invalid message ID");
- return QMI_CMD_EXIT;
- }
-
- gmreq.data.message_memory_storage_id.memory_index = id;
- qmi_set_wms_raw_read_request(msg, &gmreq);
-
- return QMI_CMD_REQUEST;
-}
-
-
-static void cmd_wms_get_raw_message_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
-{
- struct qmi_wms_raw_read_response res;
- unsigned char *data;
- char *str;
- int i;
-
- qmi_parse_wms_raw_read_response(msg, &res);
- data = (unsigned char *) res.data.raw_message_data.raw_data;
- str = blobmsg_alloc_string_buffer(&status, NULL, res.data.raw_message_data.raw_data_n * 3);
- for (i = 0; i < res.data.raw_message_data.raw_data_n; i++) {
- str += sprintf(str, &" %02x"[i ? 0 : 1], data[i]);
- }
- blobmsg_add_string_buffer(&status);
-}
-
-#define cmd_wms_get_raw_message_prepare cmd_wms_get_message_prepare
-
-
-static struct {
- const char *smsc;
- const char *target;
- bool flash;
-} _send;
-
-
-#define cmd_wms_send_message_smsc_cb no_cb
-static enum qmi_cmd_result
-cmd_wms_send_message_smsc_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- _send.smsc = arg;
- return QMI_CMD_DONE;
-}
-
-#define cmd_wms_send_message_target_cb no_cb
-static enum qmi_cmd_result
-cmd_wms_send_message_target_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- _send.target = arg;
- return QMI_CMD_DONE;
-}
-
-#define cmd_wms_send_message_flash_cb no_cb
-static enum qmi_cmd_result
-cmd_wms_send_message_flash_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- _send.flash = true;
- return QMI_CMD_DONE;
-}
-
-static int
-pdu_encode_semioctet(unsigned char *dest, const char *str)
-{
- int len = 0;
- bool lower = true;
-
- while (*str) {
- char digit = *str - '0';
-
- if (lower)
- dest[len] = 0xf0 | digit;
- else
- dest[len++] &= (digit << 4) | 0xf;
-
- lower = !lower;
- str++;
- }
-
- return lower ? len : (len + 1);
-}
-
-static int
-pdu_encode_7bit_str(unsigned char *data, const char *str)
-{
- unsigned char c;
- int len = 0;
- int ofs = 0;
-
- while(1) {
- c = *(str++) & 0x7f;
- if (!c)
- break;
-
- switch(ofs) {
- case 0:
- data[len] = c;
- break;
- default:
- data[len++] |= c << (8 - ofs);
- data[len] = c >> ofs;
- break;
- }
-
- ofs = (ofs + 1) % 8;
- }
-
- return len + 1;
-}
-
-static int
-pdu_encode_number(unsigned char *dest, const char *str, bool smsc)
-{
- unsigned char format;
- bool ascii = false;
- int len = 0;
- int i;
-
- dest[len++] = 0;
- if (*str == '+') {
- str++;
- format = 0x91;
- } else {
- format = 0x81;
- }
-
- for (i = 0; str[i]; i++) {
- if (str[i] >= '0' && str[i] <= '9')
- continue;
-
- ascii = true;
- break;
- }
-
- if (ascii)
- format |= 0x40;
-
- dest[len++] = format;
- if (!ascii)
- len += pdu_encode_semioctet(&dest[len], str);
- else
- len += pdu_encode_7bit_str(&dest[len], str);
-
- if (smsc)
- dest[0] = len - 1;
- else
- dest[0] = strlen(str);
-
- return len;
-}
-
-static int
-pdu_encode_data(unsigned char *dest, const char *str)
-{
- int len = 0;
-
- dest[len++] = 0;
- len += pdu_encode_7bit_str(&dest[len], str);
- dest[0] = strlen(str);
-
- return len;
-}
-
-#define cmd_wms_send_message_cb no_cb
-static enum qmi_cmd_result
-cmd_wms_send_message_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- static unsigned char buf[512];
- static struct qmi_wms_raw_send_request mreq = {
- QMI_INIT_SEQUENCE(raw_message_data,
- .format = QMI_WMS_MESSAGE_FORMAT_GSM_WCDMA_POINT_TO_POINT,
- .raw_data = buf,
- ),
- };
- unsigned char *cur = buf;
- unsigned char first_octet = 0x11;
- unsigned char protocol_id = 0x00;
- unsigned char dcs = 0x00;
-
- if (!_send.target || !*_send.target) {
- uqmi_add_error("Missing argument");
- return QMI_CMD_EXIT;
- }
-
- if ((_send.smsc && strlen(_send.smsc) > 16) || strlen(_send.target) > 16 || strlen(arg) > 160) {
- uqmi_add_error("Argument too long");
- return QMI_CMD_EXIT;
- }
-
- if (_send.flash)
- dcs |= 0x10;
-
- if (!_send.smsc || !*_send.smsc)
- *(cur++) = 0;
- else
- cur += pdu_encode_number(cur, _send.smsc, true);
-
- *(cur++) = first_octet;
- *(cur++) = 0; /* reference */
-
- cur += pdu_encode_number(cur, _send.target, false);
- *(cur++) = protocol_id;
- *(cur++) = dcs;
-
- *(cur++) = 0xff; /* validity */
- cur += pdu_encode_data(cur, arg);
-
- mreq.data.raw_message_data.raw_data_n = cur - buf;
- qmi_set_wms_raw_send_request(msg, &mreq);
-
- return QMI_CMD_REQUEST;
-}
+++ /dev/null
-/*
- * uqmi -- tiny QMI support implementation
- *
- * Copyright (C) 2014-2015 Felix Fietkau <nbd@openwrt.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA.
- */
-
-#define __uqmi_wms_commands \
- __uqmi_command(wms_storage, storage, required, CMD_TYPE_OPTION), \
- __uqmi_command(wms_list_messages, list-messages, no, QMI_SERVICE_WMS), \
- __uqmi_command(wms_delete_message, delete-message, required, QMI_SERVICE_WMS), \
- __uqmi_command(wms_get_message, get-message, required, QMI_SERVICE_WMS), \
- __uqmi_command(wms_get_raw_message, get-raw-message, required, QMI_SERVICE_WMS), \
- __uqmi_command(wms_send_message_smsc, send-message-smsc, required, CMD_TYPE_OPTION), \
- __uqmi_command(wms_send_message_target, send-message-target, required, CMD_TYPE_OPTION), \
- __uqmi_command(wms_send_message_flash, send-message-flash, no, CMD_TYPE_OPTION), \
- __uqmi_command(wms_send_message, send-message, required, QMI_SERVICE_WMS)
-
-#define wms_helptext \
- " --list-messages: List SMS messages\n" \
- " --storage <mem>: Messages storage (sim (default), me)\n" \
- " --delete-message <id>: Delete SMS message at index <id>\n" \
- " --storage <mem>: Messages storage (sim (default), me)\n" \
- " --get-message <id>: Get SMS message at index <id>\n" \
- " --storage <mem>: Messages storage (sim (default), me)\n" \
- " --get-raw-message <id>: Get SMS raw message contents at index <id>\n" \
- " --storage <mem>: Messages storage (sim (default), me)\n" \
- " --send-message <data>: Send SMS message (use options below)\n" \
- " --send-message-smsc <nr>: SMSC number\n" \
- " --send-message-target <nr>: Destination number (required)\n" \
- " --send-message-flash: Send as Flash SMS\n" \
-
+++ /dev/null
-/*
- * uqmi -- tiny QMI support implementation
- *
- * Copyright (C) 2014-2015 Felix Fietkau <nbd@openwrt.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <strings.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-#include <libubox/blobmsg.h>
-#include <libubox/blobmsg_json.h>
-
-#include "uqmi.h"
-#include "utils.h"
-#include "commands.h"
-
-struct blob_buf status;
-bool single_line = false;
-
-static void no_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
-{
-}
-
-static void cmd_version_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
-{
- struct qmi_ctl_get_version_info_response res;
- void *c;
- char name_buf[16];
- int i;
-
- qmi_parse_ctl_get_version_info_response(msg, &res);
-
- c = blobmsg_open_table(&status, NULL);
- for (i = 0; i < res.data.service_list_n; i++) {
- sprintf(name_buf, "service_%d", res.data.service_list[i].service);
- blobmsg_printf(&status, name_buf, "%d,%d",
- res.data.service_list[i].major_version,
- res.data.service_list[i].minor_version);
- }
- blobmsg_close_table(&status, c);
-}
-
-static enum qmi_cmd_result
-cmd_version_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- qmi_set_ctl_get_version_info_request(msg);
- return QMI_CMD_REQUEST;
-}
-
-#define cmd_sync_cb no_cb
-static enum qmi_cmd_result
-cmd_sync_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- qmi_set_ctl_sync_request(msg);
- return QMI_CMD_REQUEST;
-}
-
-#define cmd_get_client_id_cb no_cb
-static enum qmi_cmd_result
-cmd_get_client_id_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- QmiService svc = qmi_service_get_by_name(arg);
-
- if (svc < 0) {
- fprintf(stderr, "Invalid service name '%s'\n", arg);
- return QMI_CMD_EXIT;
- }
-
- if (qmi_service_connect(qmi, svc, -1)) {
- fprintf(stderr, "Failed to connect to service\n");
- return QMI_CMD_EXIT;
- }
-
- printf("%d\n", qmi_service_get_client_id(qmi, svc));
- return QMI_CMD_DONE;
-}
-
-#define cmd_set_client_id_cb no_cb
-static enum qmi_cmd_result
-cmd_set_client_id_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- QmiService svc;
- int id;
- char *s;
-
- s = strchr(arg, ',');
- if (!s) {
- fprintf(stderr, "Invalid argument\n");
- return QMI_CMD_EXIT;
- }
- *s = 0;
- s++;
-
- id = strtoul(s, &s, 0);
- if (s && *s) {
- fprintf(stderr, "Invalid argument\n");
- return QMI_CMD_EXIT;
- }
-
- svc = qmi_service_get_by_name(arg);
- if (svc < 0) {
- fprintf(stderr, "Invalid service name '%s'\n", arg);
- return QMI_CMD_EXIT;
- }
-
- if (qmi_service_connect(qmi, svc, id)) {
- fprintf(stderr, "Failed to connect to service\n");
- return QMI_CMD_EXIT;
- }
-
- return QMI_CMD_DONE;
-}
-
-static int
-qmi_get_array_idx(const char **array, int size, const char *str)
-{
- int i;
-
- for (i = 0; i < size; i++) {
- if (!array[i])
- continue;
-
- if (!strcmp(array[i], str))
- return i;
- }
-
- return -1;
-}
-
-#define cmd_ctl_set_data_format_cb no_cb
-static enum qmi_cmd_result
-cmd_ctl_set_data_format_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
-{
- struct qmi_ctl_set_data_format_request sreq = {};
- const char *modes[] = {
- [QMI_CTL_DATA_LINK_PROTOCOL_802_3] = "802.3",
- [QMI_CTL_DATA_LINK_PROTOCOL_RAW_IP] = "raw-ip",
- };
- int mode = qmi_get_array_idx(modes, ARRAY_SIZE(modes), arg);
-
- if (mode < 0) {
- uqmi_add_error("Invalid mode (modes: 802.3, raw-ip)");
- return QMI_CMD_EXIT;
- }
-
- qmi_set_ctl_set_data_format_request(msg, &sreq);
- return QMI_CMD_DONE;
-}
-
-#include "commands-wds.c"
-#include "commands-dms.c"
-#include "commands-nas.c"
-#include "commands-wms.c"
-#include "commands-wda.c"
-#include "commands-uim.c"
-
-#define __uqmi_command(_name, _optname, _arg, _type) \
- [__UQMI_COMMAND_##_name] = { \
- .name = #_optname, \
- .type = _type, \
- .prepare = cmd_##_name##_prepare, \
- .cb = cmd_##_name##_cb, \
- }
-
-const struct uqmi_cmd_handler uqmi_cmd_handler[__UQMI_COMMAND_LAST] = {
- __uqmi_commands
-};
-#undef __uqmi_command
-
-static struct uqmi_cmd *cmds;
-static int n_cmds;
-
-void uqmi_add_command(char *arg, int cmd)
-{
- int idx = n_cmds++;
-
- cmds = realloc(cmds, n_cmds * sizeof(*cmds));
- cmds[idx].handler = &uqmi_cmd_handler[cmd];
- cmds[idx].arg = arg;
-}
-
-static void uqmi_print_result(struct blob_attr *data)
-{
- char *str;
-
- if (!blob_len(data))
- return;
-
- str = blobmsg_format_json_indent(blob_data(data), false, single_line ? -1 : 0);
- if (!str)
- return;
-
- printf("%s\n", str);
- free(str);
-}
-
-static bool __uqmi_run_commands(struct qmi_dev *qmi, bool option)
-{
- static struct qmi_request req;
- char *buf = qmi->buf;
- int i;
-
- for (i = 0; i < n_cmds; i++) {
- enum qmi_cmd_result res;
- bool cmd_option = cmds[i].handler->type == CMD_TYPE_OPTION;
- bool do_break = false;
-
- if (cmd_option != option)
- continue;
-
- blob_buf_init(&status, 0);
- if (cmds[i].handler->type > QMI_SERVICE_CTL &&
- qmi_service_connect(qmi, cmds[i].handler->type, -1)) {
- uqmi_add_error("Failed to connect to service");
- res = QMI_CMD_EXIT;
- } else {
- res = cmds[i].handler->prepare(qmi, &req, (void *) buf, cmds[i].arg);
- }
-
- if (res == QMI_CMD_REQUEST) {
- qmi_request_start(qmi, &req, cmds[i].handler->cb);
- req.no_error_cb = true;
- if (qmi_request_wait(qmi, &req)) {
- uqmi_add_error(qmi_get_error_str(req.ret));
- do_break = true;
- }
- } else if (res == QMI_CMD_EXIT) {
- do_break = true;
- }
-
- uqmi_print_result(status.head);
- if (do_break)
- return false;
- }
- return true;
-}
-
-int uqmi_add_error(const char *msg)
-{
- blobmsg_add_string(&status, NULL, msg);
- return QMI_CMD_EXIT;
-}
-
-bool uqmi_run_commands(struct qmi_dev *qmi)
-{
- bool ret;
-
- ret = __uqmi_run_commands(qmi, true) &&
- __uqmi_run_commands(qmi, false);
-
- free(cmds);
- cmds = NULL;
- n_cmds = 0;
-
- return ret;
-}
+++ /dev/null
-/*
- * uqmi -- tiny QMI support implementation
- *
- * Copyright (C) 2014-2015 Felix Fietkau <nbd@openwrt.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA.
- */
-
-#ifndef __UQMI_COMMANDS_H
-#define __UQMI_COMMANDS_H
-
-#include <stdbool.h>
-#include <libubox/blob.h>
-
-#include "commands-wds.h"
-#include "commands-dms.h"
-#include "commands-nas.h"
-#include "commands-wms.h"
-#include "commands-wda.h"
-#include "commands-uim.h"
-
-enum qmi_cmd_result {
- QMI_CMD_DONE,
- QMI_CMD_REQUEST,
- QMI_CMD_EXIT,
-};
-
-enum {
- CMD_TYPE_OPTION = -1,
-};
-
-struct uqmi_cmd_handler {
- const char *name;
- int type;
-
- enum qmi_cmd_result (*prepare)(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg);
- void (*cb)(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg);
-};
-
-struct uqmi_cmd {
- const struct uqmi_cmd_handler *handler;
- char *arg;
-};
-
-#define __uqmi_commands \
- __uqmi_command(version, get-versions, no, QMI_SERVICE_CTL), \
- __uqmi_command(sync, sync, no, QMI_SERVICE_CTL), \
- __uqmi_command(set_client_id, set-client-id, required, CMD_TYPE_OPTION), \
- __uqmi_command(get_client_id, get-client-id, required, QMI_SERVICE_CTL), \
- __uqmi_command(ctl_set_data_format, set-data-format, required, QMI_SERVICE_CTL), \
- __uqmi_wds_commands, \
- __uqmi_dms_commands, \
- __uqmi_nas_commands, \
- __uqmi_wms_commands, \
- __uqmi_wda_commands, \
- __uqmi_uim_commands
-
-#define __uqmi_command(_name, _optname, _arg, _option) __UQMI_COMMAND_##_name
-enum uqmi_command {
- __uqmi_commands,
- __UQMI_COMMAND_LAST
-};
-#undef __uqmi_command
-
-extern bool single_line;
-extern const struct uqmi_cmd_handler uqmi_cmd_handler[];
-extern struct blob_buf status;
-void uqmi_add_command(char *arg, int longidx);
-bool uqmi_run_commands(struct qmi_dev *qmi);
-int uqmi_add_error(const char *msg);
-
-#endif
--- /dev/null
+
+SET(COMMON_SOURCES qmi-message.c mbim.c utils.c)
+
+ADD_LIBRARY(common ${COMMON_SOURCES})
+ADD_DEPENDENCIES(common gen-headers gen-errors)
+TARGET_INCLUDE_DIRECTORIES(common PRIVATE ${ubox_include_dir} ${blobmsg_json_include_dir} ${json_include_dir} ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR})
--- /dev/null
+/*
+ * Copyright (C) 2016 Bjørn Mork <bjorn@mork.no>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ */
+
+#include <stdbool.h>
+#include <stdint.h>
+#include <string.h>
+
+#include <stdio.h>
+
+#include "mbim.h"
+
+static const uint8_t qmiuuid[16] = { 0xd1, 0xa3, 0x0b, 0xc2, 0xf9, 0x7a, 0x6e, 0x43,
+ 0xbf, 0x65, 0xc7, 0xe2, 0x4f, 0xb0, 0xf0, 0xd3 };
+
+bool is_mbim_qmi(struct mbim_command_message *msg)
+{
+ return msg->header.type == cpu_to_le32(MBIM_MESSAGE_TYPE_COMMAND_DONE) &&
+ msg->command_id == cpu_to_le32(MBIM_CID_QMI_MSG) &&
+ !msg->command_type && /* actually 'status' here */
+ !memcmp(msg->service_id, qmiuuid, 16);
+ }
+
+void mbim_qmi_cmd(struct mbim_command_message *msg, int len, uint16_t tid)
+{
+ msg->header.type = cpu_to_le32(MBIM_MESSAGE_TYPE_COMMAND);
+ msg->header.length = cpu_to_le32(sizeof(*msg) + len);
+ msg->header.transaction_id = cpu_to_le32(tid);
+ msg->fragment_header.total = cpu_to_le32(1);
+ msg->fragment_header.current = 0;
+ memcpy(msg->service_id, qmiuuid, 16);
+ msg->command_id = cpu_to_le32(MBIM_CID_QMI_MSG);
+ msg->command_type = cpu_to_le32(MBIM_MESSAGE_COMMAND_TYPE_SET);
+ msg->buffer_length = cpu_to_le32(len);
+}
--- /dev/null
+/*
+ * Copyright (C) 2014 John Crispin <blogic@openwrt.org>
+ * Copyright (C) 2016 Bjørn Mork <bjorn@mork.no>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ */
+
+#ifndef _MBIM_H__
+#define _MBIM_H__
+
+#include <libubox/utils.h>
+#include <stdbool.h>
+#include <stdint.h>
+
+#define MBIM_MESSAGE_TYPE_COMMAND 0x00000003
+#define MBIM_MESSAGE_TYPE_COMMAND_DONE 0x80000003
+#define MBIM_MESSAGE_COMMAND_TYPE_SET 1
+#define MBIM_CID_QMI_MSG 1
+
+struct mbim_message_header {
+ uint32_t type;
+ uint32_t length;
+ uint32_t transaction_id;
+} __packed;
+
+struct mbim_fragment_header {
+ uint32_t total;
+ uint32_t current;
+} __packed;
+
+struct mbim_command_message {
+ struct mbim_message_header header;
+ struct mbim_fragment_header fragment_header;
+ uint8_t service_id[16];
+ uint32_t command_id;
+ uint32_t command_type;
+ uint32_t buffer_length;
+} __packed;
+
+bool is_mbim_qmi(struct mbim_command_message *msg);
+void mbim_qmi_cmd(struct mbim_command_message *msg, int len, uint16_t tid);
+
+#endif
--- /dev/null
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * uqmi -- tiny QMI support implementation
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2012 Lanedo GmbH.
+ * Copyright (C) 2012-2017 Aleksander Morgado <aleksander@aleksander.es>
+ */
+
+#ifndef _LIBQMI_GLIB_QMI_ENUMS_DMS_H_
+#define _LIBQMI_GLIB_QMI_ENUMS_DMS_H_
+
+/**
+ * SECTION: qmi-enums-dms
+ *
+ * This section defines enumerations and flags used in the DMS service
+ * interface.
+ */
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI DMS Get Capabilities' message */
+
+/**
+ * QmiDmsDataServiceCapability:
+ * @QMI_DMS_DATA_SERVICE_CAPABILITY_NONE: No data services supported.
+ * @QMI_DMS_DATA_SERVICE_CAPABILITY_CS: Only CS supported.
+ * @QMI_DMS_DATA_SERVICE_CAPABILITY_PS: Only PS supported.
+ * @QMI_DMS_DATA_SERVICE_CAPABILITY_SIMULTANEOUS_CS_PS: Simultaneous CS and PS supported.
+ * @QMI_DMS_DATA_SERVICE_CAPABILITY_NON_SIMULTANEOUS_CS_PS: Non simultaneous CS and PS supported.
+ *
+ * Data service capability.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_DMS_DATA_SERVICE_CAPABILITY_NONE = 0,
+ QMI_DMS_DATA_SERVICE_CAPABILITY_CS = 1,
+ QMI_DMS_DATA_SERVICE_CAPABILITY_PS = 2,
+ QMI_DMS_DATA_SERVICE_CAPABILITY_SIMULTANEOUS_CS_PS = 3,
+ QMI_DMS_DATA_SERVICE_CAPABILITY_NON_SIMULTANEOUS_CS_PS = 4
+} QmiDmsDataServiceCapability;
+
+/**
+ * QmiDmsSimCapability:
+ * @QMI_DMS_SIM_CAPABILITY_NOT_SUPPORTED: SIM not supported.
+ * @QMI_DMS_SIM_CAPABILITY_SUPPORTED: SIM is supported.
+ *
+ * SIM capability.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_DMS_SIM_CAPABILITY_NOT_SUPPORTED = 1,
+ QMI_DMS_SIM_CAPABILITY_SUPPORTED = 2
+} QmiDmsSimCapability;
+
+/**
+ * QmiDmsRadioInterface:
+ * @QMI_DMS_RADIO_INTERFACE_CDMA20001X: CDMA2000 1x.
+ * @QMI_DMS_RADIO_INTERFACE_EVDO: CDMA2000 HRPD (1xEV-DO)
+ * @QMI_DMS_RADIO_INTERFACE_GSM: GSM.
+ * @QMI_DMS_RADIO_INTERFACE_UMTS: UMTS.
+ * @QMI_DMS_RADIO_INTERFACE_LTE: LTE.
+ * @QMI_DMS_RADIO_INTERFACE_TDS: TDS. Since 1.32.
+ * @QMI_DMS_RADIO_INTERFACE_5GNR: 5G NR. Since 1.26.
+ *
+ * Radio interface type.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_DMS_RADIO_INTERFACE_CDMA20001X = 1,
+ QMI_DMS_RADIO_INTERFACE_EVDO = 2,
+ QMI_DMS_RADIO_INTERFACE_GSM = 4,
+ QMI_DMS_RADIO_INTERFACE_UMTS = 5,
+ QMI_DMS_RADIO_INTERFACE_LTE = 8,
+ QMI_DMS_RADIO_INTERFACE_TDS = 9,
+ QMI_DMS_RADIO_INTERFACE_5GNR = 10,
+} QmiDmsRadioInterface;
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI DMS Get Power State' message */
+
+/**
+ * QmiDmsPowerState:
+ * @QMI_DMS_POWER_STATE_EXTERNAL_SOURCE: Powered by an external source.
+ * @QMI_DMS_POWER_STATE_BATTERY_CONNECTED: Battery is connected.
+ * @QMI_DMS_POWER_STATE_BATTERY_CHARGING: Battery is currently being charged.
+ * @QMI_DMS_POWER_STATE_FAULT: Recognized power fault.
+ *
+ * Flags specifying the current power state.
+ *
+ * If @QMI_DMS_POWER_STATE_EXTERNAL_SOURCE is set, the device is powerered by an
+ * external source; otherwise it is powered by a battery.
+ *
+ * If @QMI_DMS_POWER_STATE_BATTERY_CONNECTED is set, the battery is connected;
+ * otherwise the battery is not connected.
+ *
+ * If @QMI_DMS_POWER_STATE_BATTERY_CHARGING is set, the battery is being charged;
+ * otherwise the battery is not being charged.
+ *
+ * If @QMI_DMS_POWER_STATE_FAULT is set, a power fault has been detected.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_DMS_POWER_STATE_EXTERNAL_SOURCE = 1 << 0,
+ QMI_DMS_POWER_STATE_BATTERY_CONNECTED = 1 << 1,
+ QMI_DMS_POWER_STATE_BATTERY_CHARGING = 1 << 2,
+ QMI_DMS_POWER_STATE_FAULT = 1 << 3,
+} QmiDmsPowerState;
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI DMS UIM Set PIN Protection' message */
+
+/**
+ * QmiDmsUimPinId:
+ * @QMI_DMS_UIM_PIN_ID_PIN: PIN.
+ * @QMI_DMS_UIM_PIN_ID_PIN2: PIN2.
+ *
+ * The PIN identifier.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_DMS_UIM_PIN_ID_PIN = 1,
+ QMI_DMS_UIM_PIN_ID_PIN2 = 2
+} QmiDmsUimPinId;
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI DMS UIM Get PIN Status' message */
+
+/**
+ * QmiDmsUimPinStatus:
+ * @QMI_DMS_UIM_PIN_STATUS_NOT_INITIALIZED: Not initialized.
+ * @QMI_DMS_UIM_PIN_STATUS_ENABLED_NOT_VERIFIED: Enabled, not verified.
+ * @QMI_DMS_UIM_PIN_STATUS_ENABLED_VERIFIED: Enabled, verified.
+ * @QMI_DMS_UIM_PIN_STATUS_DISABLED: Disabled.
+ * @QMI_DMS_UIM_PIN_STATUS_BLOCKED: Blocked.
+ * @QMI_DMS_UIM_PIN_STATUS_PERMANENTLY_BLOCKED: Permanently Blocked.
+ * @QMI_DMS_UIM_PIN_STATUS_UNBLOCKED: Unblocked.
+ * @QMI_DMS_UIM_PIN_STATUS_CHANGED: Changed.
+ *
+ * The PIN status.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_DMS_UIM_PIN_STATUS_NOT_INITIALIZED = 0,
+ QMI_DMS_UIM_PIN_STATUS_ENABLED_NOT_VERIFIED = 1,
+ QMI_DMS_UIM_PIN_STATUS_ENABLED_VERIFIED = 2,
+ QMI_DMS_UIM_PIN_STATUS_DISABLED = 3,
+ QMI_DMS_UIM_PIN_STATUS_BLOCKED = 4,
+ QMI_DMS_UIM_PIN_STATUS_PERMANENTLY_BLOCKED = 5,
+ QMI_DMS_UIM_PIN_STATUS_UNBLOCKED = 6,
+ QMI_DMS_UIM_PIN_STATUS_CHANGED = 7,
+} QmiDmsUimPinStatus;
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI DMS Get Operating Mode' message */
+
+/**
+ * QmiDmsOperatingMode:
+ * @QMI_DMS_OPERATING_MODE_ONLINE: Device can acquire a system and make calls.
+ * @QMI_DMS_OPERATING_MODE_LOW_POWER: Device has temporarily disabled RF.
+ * @QMI_DMS_OPERATING_MODE_PERSISTENT_LOW_POWER: Device has disabled RF and state persists even after a reset.
+ * @QMI_DMS_OPERATING_MODE_FACTORY_TEST: Special mode for manufacturer tests.
+ * @QMI_DMS_OPERATING_MODE_OFFLINE: Device has deactivated RF and is partially shutdown.
+ * @QMI_DMS_OPERATING_MODE_RESET: Device is in the process of power cycling.
+ * @QMI_DMS_OPERATING_MODE_SHUTTING_DOWN: Device is in the process of shutting down.
+ * @QMI_DMS_OPERATING_MODE_MODE_ONLY_LOW_POWER: Mode-only Low Power.
+ * @QMI_DMS_OPERATING_MODE_UNKNOWN: Unknown.
+ *
+ * Operating mode of the device.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_DMS_OPERATING_MODE_ONLINE = 0,
+ QMI_DMS_OPERATING_MODE_LOW_POWER = 1,
+ QMI_DMS_OPERATING_MODE_FACTORY_TEST = 2,
+ QMI_DMS_OPERATING_MODE_OFFLINE = 3,
+ QMI_DMS_OPERATING_MODE_RESET = 4,
+ QMI_DMS_OPERATING_MODE_SHUTTING_DOWN = 5,
+ QMI_DMS_OPERATING_MODE_PERSISTENT_LOW_POWER = 6,
+ QMI_DMS_OPERATING_MODE_MODE_ONLY_LOW_POWER = 7,
+ QMI_DMS_OPERATING_MODE_UNKNOWN = 0xFF
+} QmiDmsOperatingMode;
+
+/**
+ * QmiDmsOfflineReason:
+ * @QMI_DMS_OFFLINE_REASON_HOST_IMAGE_MISCONFIGURATION: Host image misconfiguration.
+ * @QMI_DMS_OFFLINE_REASON_PRI_IMAGE_MISCONFIGURATION: PRI image misconfiguration.
+ * @QMI_DMS_OFFLINE_REASON_PRI_VERSION_INCOMPATIBLE: PRI version incompatible.
+ * @QMI_DMS_OFFLINE_REASON_DEVICE_MEMORY_FULL: Memory full, cannot copy PRI information.
+ *
+ * Reasons for being in Offline (@QMI_DMS_OPERATING_MODE_OFFLINE) state.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_DMS_OFFLINE_REASON_HOST_IMAGE_MISCONFIGURATION = 1 << 0,
+ QMI_DMS_OFFLINE_REASON_PRI_IMAGE_MISCONFIGURATION = 1 << 1,
+ QMI_DMS_OFFLINE_REASON_PRI_VERSION_INCOMPATIBLE = 1 << 2,
+ QMI_DMS_OFFLINE_REASON_DEVICE_MEMORY_FULL = 1 << 3
+} QmiDmsOfflineReason;
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI DMS Get Time' message */
+
+/**
+ * QmiDmsTimeSource:
+ * @QMI_DMS_TIME_SOURCE_DEVICE: 32 kHz device clock.
+ * @QMI_DMS_TIME_SOURCE_CDMA_NETWORK: CDMA network.
+ * @QMI_DMS_TIME_SOURCE_HDR_NETWORK: HDR network.
+ *
+ * Source of the timestamp.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_DMS_TIME_SOURCE_DEVICE = 0,
+ QMI_DMS_TIME_SOURCE_CDMA_NETWORK = 1,
+ QMI_DMS_TIME_SOURCE_HDR_NETWORK = 2,
+} QmiDmsTimeSource;
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI DMS Get Activation State' message */
+
+/**
+ * QmiDmsActivationState:
+ * @QMI_DMS_ACTIVATION_STATE_NOT_ACTIVATED: Service not activated.
+ * @QMI_DMS_ACTIVATION_STATE_ACTIVATED: Service is activated.
+ * @QMI_DMS_ACTIVATION_STATE_CONNECTING: Connection in progress for automatic activation.
+ * @QMI_DMS_ACTIVATION_STATE_CONNECTED: Connection connected for automatic activation.
+ * @QMI_DMS_ACTIVATION_STATE_OTASP_AUTHENTICATED: OTASP security authenticated.
+ * @QMI_DMS_ACTIVATION_STATE_OTASP_NAM: OTASP NAM downloaded.
+ * @QMI_DMS_ACTIVATION_STATE_OTASP_MDN: OTASP MDN downloaded.
+ * @QMI_DMS_ACTIVATION_STATE_OTASP_IMSI: OTASP IMSI downloaded.
+ * @QMI_DMS_ACTIVATION_STATE_OTASP_PRL: OTASP PRL downloaded.
+ * @QMI_DMS_ACTIVATION_STATE_OTASP_SPC: OTASP SPC downloaded.
+ * @QMI_DMS_ACTIVATION_STATE_OTASP_COMMITED: OTASP settings committed.
+ *
+ * State of the service activation.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_DMS_ACTIVATION_STATE_NOT_ACTIVATED = 0x00,
+ QMI_DMS_ACTIVATION_STATE_ACTIVATED = 0x01,
+ QMI_DMS_ACTIVATION_STATE_CONNECTING = 0x02,
+ QMI_DMS_ACTIVATION_STATE_CONNECTED = 0x03,
+ QMI_DMS_ACTIVATION_STATE_OTASP_AUTHENTICATED = 0x04,
+ QMI_DMS_ACTIVATION_STATE_OTASP_NAM = 0x05,
+ QMI_DMS_ACTIVATION_STATE_OTASP_MDN = 0x06,
+ QMI_DMS_ACTIVATION_STATE_OTASP_IMSI = 0x07,
+ QMI_DMS_ACTIVATION_STATE_OTASP_PRL = 0x08,
+ QMI_DMS_ACTIVATION_STATE_OTASP_SPC = 0x09,
+ QMI_DMS_ACTIVATION_STATE_OTASP_COMMITED = 0x0A
+} QmiDmsActivationState;
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI DMS UIM Get CK Status' message */
+
+/**
+ * QmiDmsUimFacility:
+ * @QMI_DMS_UIM_FACILITY_PN: Network personalization facility.
+ * @QMI_DMS_UIM_FACILITY_PU: Network subset personalization facility.
+ * @QMI_DMS_UIM_FACILITY_PP: Service provider facility.
+ * @QMI_DMS_UIM_FACILITY_PC: Corporate personalization facility.
+ * @QMI_DMS_UIM_FACILITY_PF: UIM personalization facility.
+ *
+ * UIM personalization facilities.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_DMS_UIM_FACILITY_PN = 0,
+ QMI_DMS_UIM_FACILITY_PU = 1,
+ QMI_DMS_UIM_FACILITY_PP = 2,
+ QMI_DMS_UIM_FACILITY_PC = 3,
+ QMI_DMS_UIM_FACILITY_PF = 4
+} QmiDmsUimFacility;
+
+/**
+ * QmiDmsUimFacilityState:
+ * @QMI_DMS_UIM_FACILITY_STATE_DEACTIVATED: Facility is deactivated.
+ * @QMI_DMS_UIM_FACILITY_STATE_ACTIVATED: Facility is activated.
+ * @QMI_DMS_UIM_FACILITY_STATE_BLOCKED: Facility is blocked.
+ *
+ * State of the UIM facility.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_DMS_UIM_FACILITY_STATE_DEACTIVATED = 0,
+ QMI_DMS_UIM_FACILITY_STATE_ACTIVATED = 1,
+ QMI_DMS_UIM_FACILITY_STATE_BLOCKED = 2
+} QmiDmsUimFacilityState;
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI DMS UIM Get State' message */
+
+/**
+ * QmiDmsUimState:
+ * @QMI_DMS_UIM_STATE_INITIALIZATION_COMPLETED: UIM initialization completed.
+ * @QMI_DMS_UIM_STATE_LOCKED_OR_FAILED: UIM is locked or failed.
+ * @QMI_DMS_UIM_STATE_NOT_PRESENT: No UIM in the device.
+ * @QMI_DMS_UIM_STATE_RESERVED: Reserved, unknown.
+ * @QMI_DMS_UIM_STATE_UNKNOWN: UIM state currently unavailable.
+ *
+ * State of the UIM.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_DMS_UIM_STATE_INITIALIZATION_COMPLETED = 0x00,
+ QMI_DMS_UIM_STATE_LOCKED_OR_FAILED = 0x01,
+ QMI_DMS_UIM_STATE_NOT_PRESENT = 0x02,
+ QMI_DMS_UIM_STATE_RESERVED = 0x03,
+ QMI_DMS_UIM_STATE_UNKNOWN = 0xFF
+} QmiDmsUimState;
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI DMS Set Time' message */
+
+/**
+ * QmiDmsTimeReferenceType:
+ * @QMI_DMS_TIME_REFERENCE_TYPE_USER: User time.
+ *
+ * Time reference type.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_DMS_TIME_REFERENCE_TYPE_USER = 0
+} QmiDmsTimeReferenceType;
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI DMS Get Firmware Preference' message */
+
+/**
+ * QmiDmsFirmwareImageType:
+ * @QMI_DMS_FIRMWARE_IMAGE_TYPE_MODEM: Modem image.
+ * @QMI_DMS_FIRMWARE_IMAGE_TYPE_PRI: PRI image.
+ *
+ * Type of firmware image.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_DMS_FIRMWARE_IMAGE_TYPE_MODEM = 0,
+ QMI_DMS_FIRMWARE_IMAGE_TYPE_PRI = 1
+} QmiDmsFirmwareImageType;
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI DMS Get Boot Image Download Mode' message */
+
+/**
+ * QmiDmsBootImageDownloadMode:
+ * @QMI_DMS_BOOT_IMAGE_DOWNLOAD_MODE_NORMAL: Normal operation.
+ * @QMI_DMS_BOOT_IMAGE_DOWNLOAD_MODE_BOOT_AND_RECOVERY: Boot and recovery image download mode.
+ *
+ * Specifies the mode for the next boot.
+ *
+ * Since: 1.18
+ */
+typedef enum { /*< since=1.18 >*/
+ QMI_DMS_BOOT_IMAGE_DOWNLOAD_MODE_NORMAL = 0,
+ QMI_DMS_BOOT_IMAGE_DOWNLOAD_MODE_BOOT_AND_RECOVERY = 1,
+} QmiDmsBootImageDownloadMode;
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI DMS Get MAC Address' message */
+
+/**
+ * QmiDmsMacType:
+ * @QMI_DMS_MAC_TYPE_WLAN: WLAN MAC address.
+ * @QMI_DMS_MAC_TYPE_BT: Bluetooth MAC address.
+ *
+ * Specifies the device from which the MAC address should be queried.
+ *
+ * Since: 1.26
+ */
+typedef enum { /*< since=1.26 >*/
+ QMI_DMS_MAC_TYPE_WLAN = 0,
+ QMI_DMS_MAC_TYPE_BT = 1,
+} QmiDmsMacType;
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI DMS HP Change Device Mode' message */
+
+/**
+ * QmiDmsHpDeviceMode:
+ * @QMI_DMS_HP_DEVICE_MODE_FASTBOOT: Fastboot download mode.
+ *
+ * HP specific device modes.
+ *
+ * Since: 1.18
+ */
+typedef enum { /*< since=1.18 >*/
+ QMI_DMS_HP_DEVICE_MODE_FASTBOOT = 5,
+} QmiDmsHpDeviceMode;
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI DMS Swi Get USB Composition' message */
+
+/**
+ * QmiDmsSwiUsbComposition:
+ * @QMI_DMS_SWI_USB_COMPOSITION_UNKNOWN: Unknown.
+ * @QMI_DMS_SWI_USB_COMPOSITION_0: HIP, DM, NMEA, AT, MDM1, MDM2, MDM3, MS.
+ * @QMI_DMS_SWI_USB_COMPOSITION_1: HIP, DM, NMEA, AT, MDM1, MS.
+ * @QMI_DMS_SWI_USB_COMPOSITION_2: HIP, DM, NMEA, AT, NIC1, MS.
+ * @QMI_DMS_SWI_USB_COMPOSITION_3: HIP, DM, NMEA, AT, MDM1, NIC1, MS.
+ * @QMI_DMS_SWI_USB_COMPOSITION_4: HIP, DM, NMEA, AT, NIC1, NIC2, NIC3, MS.
+ * @QMI_DMS_SWI_USB_COMPOSITION_5: HIP, DM, NMEA, AT, ECM1, MS.
+ * @QMI_DMS_SWI_USB_COMPOSITION_6: DM, NMEA, AT, QMI.
+ * @QMI_DMS_SWI_USB_COMPOSITION_7: DM, NMEA, AT, RMNET1, RMNET2, RMNET3.
+ * @QMI_DMS_SWI_USB_COMPOSITION_8: DM, NMEA, AT, MBIM.
+ * @QMI_DMS_SWI_USB_COMPOSITION_9: MBIM.
+ * @QMI_DMS_SWI_USB_COMPOSITION_10: NMEA, MBIM.
+ * @QMI_DMS_SWI_USB_COMPOSITION_11: DM, MBIM.
+ * @QMI_DMS_SWI_USB_COMPOSITION_12: DM, NMEA, MBIM.
+ * @QMI_DMS_SWI_USB_COMPOSITION_13: Dual configuration: USB composition 6 and USB composition 8.
+ * @QMI_DMS_SWI_USB_COMPOSITION_14: Dual configuration: USB composition 6 and USB composition 9.
+ * @QMI_DMS_SWI_USB_COMPOSITION_15: Dual configuration: USB composition 6 and USB composition 10.
+ * @QMI_DMS_SWI_USB_COMPOSITION_16: Dual configuration: USB composition 6 and USB composition 11.
+ * @QMI_DMS_SWI_USB_COMPOSITION_17: Dual configuration: USB composition 6 and USB composition 12.
+ * @QMI_DMS_SWI_USB_COMPOSITION_18: Dual configuration: USB composition 7 and USB composition 8.
+ * @QMI_DMS_SWI_USB_COMPOSITION_19: Dual configuration: USB composition 7 and USB composition 9.
+ * @QMI_DMS_SWI_USB_COMPOSITION_20: Dual configuration: USB composition 7 and USB composition 10.
+ * @QMI_DMS_SWI_USB_COMPOSITION_21: Dual configuration: USB composition 7 and USB composition 11.
+ * @QMI_DMS_SWI_USB_COMPOSITION_22: Dual configuration: USB composition 7 and USB composition 12.
+ *
+ * Sierra Wireless USB composition modes.
+ *
+ * Since: 1.20
+ */
+typedef enum { /*< since=1.20 >*/
+ QMI_DMS_SWI_USB_COMPOSITION_UNKNOWN = -1,
+ QMI_DMS_SWI_USB_COMPOSITION_0 = 0,
+ QMI_DMS_SWI_USB_COMPOSITION_1 = 1,
+ QMI_DMS_SWI_USB_COMPOSITION_2 = 2,
+ QMI_DMS_SWI_USB_COMPOSITION_3 = 3,
+ QMI_DMS_SWI_USB_COMPOSITION_4 = 4,
+ QMI_DMS_SWI_USB_COMPOSITION_5 = 5,
+ QMI_DMS_SWI_USB_COMPOSITION_6 = 6,
+ QMI_DMS_SWI_USB_COMPOSITION_7 = 7,
+ QMI_DMS_SWI_USB_COMPOSITION_8 = 8,
+ QMI_DMS_SWI_USB_COMPOSITION_9 = 9,
+ QMI_DMS_SWI_USB_COMPOSITION_10 = 10,
+ QMI_DMS_SWI_USB_COMPOSITION_11 = 11,
+ QMI_DMS_SWI_USB_COMPOSITION_12 = 12,
+ QMI_DMS_SWI_USB_COMPOSITION_13 = 13,
+ QMI_DMS_SWI_USB_COMPOSITION_14 = 14,
+ QMI_DMS_SWI_USB_COMPOSITION_15 = 15,
+ QMI_DMS_SWI_USB_COMPOSITION_16 = 16,
+ QMI_DMS_SWI_USB_COMPOSITION_17 = 17,
+ QMI_DMS_SWI_USB_COMPOSITION_18 = 18,
+ QMI_DMS_SWI_USB_COMPOSITION_19 = 19,
+ QMI_DMS_SWI_USB_COMPOSITION_20 = 20,
+ QMI_DMS_SWI_USB_COMPOSITION_21 = 21,
+ QMI_DMS_SWI_USB_COMPOSITION_22 = 22,
+} QmiDmsSwiUsbComposition;
+
+/**
+ * qmi_dms_swi_usb_composition_get_description:
+ * @value: a #QmiDmsSwiUsbComposition.
+ *
+ * Gets a text description of the Sierra Wireless USB composition.
+ *
+ * Since: 1.20
+ * Returns: a string.
+ */
+const char *qmi_dms_swi_usb_composition_get_description (QmiDmsSwiUsbComposition value);
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI DMS Foxconn Change Device Mode' message */
+
+/**
+ * QmiDmsFoxconnDeviceMode:
+ * @QMI_DMS_FOXCONN_DEVICE_MODE_UNKNOWN: Unknown mode.
+ * @QMI_DMS_FOXCONN_DEVICE_MODE_FASTBOOT_ONLINE: Fastboot download mode for full partition files.
+ * @QMI_DMS_FOXCONN_DEVICE_MODE_FASTBOOT_OTA: Fastboot download mode for OTA files.
+ *
+ * Foxconn specific device modes.
+ *
+ * Since: 1.26
+ */
+typedef enum { /*< since=1.26 >*/
+ QMI_DMS_FOXCONN_DEVICE_MODE_UNKNOWN = 0,
+ QMI_DMS_FOXCONN_DEVICE_MODE_FASTBOOT_ONLINE = 0x05,
+ QMI_DMS_FOXCONN_DEVICE_MODE_FASTBOOT_OTA = 0x0A,
+} QmiDmsFoxconnDeviceMode;
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI DMS Foxconn Get Firmware Version' message */
+
+/**
+ * QmiDmsFoxconnFirmwareVersionType:
+ * @QMI_DMS_FOXCONN_FIRMWARE_VERSION_TYPE_FIRMWARE_MCFG: E.g. T77W968.F0.0.0.2.3.GC.004.
+ * @QMI_DMS_FOXCONN_FIRMWARE_VERSION_TYPE_FIRMWARE_MCFG_APPS: E.g. T77W968.F0.0.0.2.3.GC.004.011.
+ * @QMI_DMS_FOXCONN_FIRMWARE_VERSION_TYPE_APPS: E.g. 011.
+ *
+ * Foxconn specific firmware version types.
+ *
+ * Since: 1.26
+ */
+typedef enum { /*< since=1.26 >*/
+ QMI_DMS_FOXCONN_FIRMWARE_VERSION_TYPE_FIRMWARE_MCFG = 0x00,
+ QMI_DMS_FOXCONN_FIRMWARE_VERSION_TYPE_FIRMWARE_MCFG_APPS = 0x01,
+ QMI_DMS_FOXCONN_FIRMWARE_VERSION_TYPE_APPS = 0x02,
+} QmiDmsFoxconnFirmwareVersionType;
+
+#endif /* _LIBQMI_GLIB_QMI_ENUMS_DMS_H_ */
--- /dev/null
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * uqmi -- tiny QMI support implementation
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2012 Google Inc.
+ * Copyright (C) 2012-2017 Aleksander Morgado <aleksander@aleksander.es>
+ */
+
+#ifndef _LIBQMI_GLIB_QMI_ENUMS_NAS_H_
+#define _LIBQMI_GLIB_QMI_ENUMS_NAS_H_
+
+/**
+ * SECTION: qmi-enums-nas
+ *
+ * This section defines enumerations and flags used in the NAS service
+ * interface.
+ */
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI NAS Event Report' indication */
+
+/**
+ * QmiNasRadioInterface:
+ * @QMI_NAS_RADIO_INTERFACE_UNKNOWN: Not known or not needed.
+ * @QMI_NAS_RADIO_INTERFACE_NONE: None, no service.
+ * @QMI_NAS_RADIO_INTERFACE_CDMA_1X: CDMA2000 1X.
+ * @QMI_NAS_RADIO_INTERFACE_CDMA_1XEVDO: CDMA2000 HRPD (1xEV-DO).
+ * @QMI_NAS_RADIO_INTERFACE_AMPS: AMPS.
+ * @QMI_NAS_RADIO_INTERFACE_GSM: GSM.
+ * @QMI_NAS_RADIO_INTERFACE_UMTS: UMTS.
+ * @QMI_NAS_RADIO_INTERFACE_LTE: LTE.
+ * @QMI_NAS_RADIO_INTERFACE_TD_SCDMA: TD-SCDMA.
+ * @QMI_NAS_RADIO_INTERFACE_5GNR: 5G NR. Since 1.26.
+ *
+ * Radio interface technology.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_NAS_RADIO_INTERFACE_UNKNOWN = -1,
+ QMI_NAS_RADIO_INTERFACE_NONE = 0x00,
+ QMI_NAS_RADIO_INTERFACE_CDMA_1X = 0x01,
+ QMI_NAS_RADIO_INTERFACE_CDMA_1XEVDO = 0x02,
+ QMI_NAS_RADIO_INTERFACE_AMPS = 0x03,
+ QMI_NAS_RADIO_INTERFACE_GSM = 0x04,
+ QMI_NAS_RADIO_INTERFACE_UMTS = 0x05,
+ QMI_NAS_RADIO_INTERFACE_LTE = 0x08,
+ QMI_NAS_RADIO_INTERFACE_TD_SCDMA = 0x09,
+ QMI_NAS_RADIO_INTERFACE_5GNR = 0x0C,
+} QmiNasRadioInterface;
+
+/**
+ * QmiNasActiveBand:
+ * @QMI_NAS_ACTIVE_BAND_BC_0: Band class 0.
+ * @QMI_NAS_ACTIVE_BAND_BC_1: Band class 1.
+ * @QMI_NAS_ACTIVE_BAND_BC_2: Band class 2.
+ * @QMI_NAS_ACTIVE_BAND_BC_3: Band class 3.
+ * @QMI_NAS_ACTIVE_BAND_BC_4: Band class 4.
+ * @QMI_NAS_ACTIVE_BAND_BC_5: Band class 5.
+ * @QMI_NAS_ACTIVE_BAND_BC_6: Band class 6.
+ * @QMI_NAS_ACTIVE_BAND_BC_7: Band class 7.
+ * @QMI_NAS_ACTIVE_BAND_BC_8: Band class 8.
+ * @QMI_NAS_ACTIVE_BAND_BC_9: Band class 9.
+ * @QMI_NAS_ACTIVE_BAND_BC_10: Band class 10.
+ * @QMI_NAS_ACTIVE_BAND_BC_11: Band class 11.
+ * @QMI_NAS_ACTIVE_BAND_BC_12: Band class 12.
+ * @QMI_NAS_ACTIVE_BAND_BC_13: Band class 13.
+ * @QMI_NAS_ACTIVE_BAND_BC_14: Band class 14.
+ * @QMI_NAS_ACTIVE_BAND_BC_15: Band class 15.
+ * @QMI_NAS_ACTIVE_BAND_BC_16: Band class 16.
+ * @QMI_NAS_ACTIVE_BAND_BC_17: Band class 17.
+ * @QMI_NAS_ACTIVE_BAND_BC_18: Band class 18.
+ * @QMI_NAS_ACTIVE_BAND_BC_19: Band class 19.
+ * @QMI_NAS_ACTIVE_BAND_GSM_450: GSM 450.
+ * @QMI_NAS_ACTIVE_BAND_GSM_480: GSM 480.
+ * @QMI_NAS_ACTIVE_BAND_GSM_750: GSM 750.
+ * @QMI_NAS_ACTIVE_BAND_GSM_850: GSM 850.
+ * @QMI_NAS_ACTIVE_BAND_GSM_900_EXTENDED: GSM 900 (Extended).
+ * @QMI_NAS_ACTIVE_BAND_GSM_900_PRIMARY: GSM 900 (Primary).
+ * @QMI_NAS_ACTIVE_BAND_GSM_900_RAILWAYS: GSM 900 (Railways).
+ * @QMI_NAS_ACTIVE_BAND_GSM_DCS_1800: GSM 1800.
+ * @QMI_NAS_ACTIVE_BAND_GSM_PCS_1900: GSM 1900.
+ * @QMI_NAS_ACTIVE_BAND_WCDMA_2100: WCDMA 2100.
+ * @QMI_NAS_ACTIVE_BAND_WCDMA_PCS_1900: WCDMA PCS 1900.
+ * @QMI_NAS_ACTIVE_BAND_WCDMA_DCS_1800: WCDMA DCS 1800.
+ * @QMI_NAS_ACTIVE_BAND_WCDMA_1700_US: WCDMA 1700 (U.S.).
+ * @QMI_NAS_ACTIVE_BAND_WCDMA_850: WCDMA 850.
+ * @QMI_NAS_ACTIVE_BAND_WCDMA_800: WCDMA 800.
+ * @QMI_NAS_ACTIVE_BAND_WCDMA_2600: WCDMA 2600.
+ * @QMI_NAS_ACTIVE_BAND_WCDMA_900: WCDMA 900.
+ * @QMI_NAS_ACTIVE_BAND_WCDMA_1700_JAPAN: WCDMA 1700 (Japan).
+ * @QMI_NAS_ACTIVE_BAND_WCDMA_1500_JAPAN: WCDMA 1500 (Japan).
+ * @QMI_NAS_ACTIVE_BAND_WCDMA_850_JAPAN: WCDMA 850 (Japan).
+ * @QMI_NAS_ACTIVE_BAND_EUTRAN_1: EUTRAN band 1.
+ * @QMI_NAS_ACTIVE_BAND_EUTRAN_2: EUTRAN band 2.
+ * @QMI_NAS_ACTIVE_BAND_EUTRAN_3: EUTRAN band 3.
+ * @QMI_NAS_ACTIVE_BAND_EUTRAN_4: EUTRAN band 4.
+ * @QMI_NAS_ACTIVE_BAND_EUTRAN_5: EUTRAN band 5.
+ * @QMI_NAS_ACTIVE_BAND_EUTRAN_6: EUTRAN band 6.
+ * @QMI_NAS_ACTIVE_BAND_EUTRAN_7: EUTRAN band 7.
+ * @QMI_NAS_ACTIVE_BAND_EUTRAN_8: EUTRAN band 8.
+ * @QMI_NAS_ACTIVE_BAND_EUTRAN_9: EUTRAN band 9.
+ * @QMI_NAS_ACTIVE_BAND_EUTRAN_10: EUTRAN band 10.
+ * @QMI_NAS_ACTIVE_BAND_EUTRAN_11: EUTRAN band 11.
+ * @QMI_NAS_ACTIVE_BAND_EUTRAN_12: EUTRAN band 12.
+ * @QMI_NAS_ACTIVE_BAND_EUTRAN_13: EUTRAN band 13.
+ * @QMI_NAS_ACTIVE_BAND_EUTRAN_14: EUTRAN band 14.
+ * @QMI_NAS_ACTIVE_BAND_EUTRAN_17: EUTRAN band 17.
+ * @QMI_NAS_ACTIVE_BAND_EUTRAN_18: EUTRAN band 18.
+ * @QMI_NAS_ACTIVE_BAND_EUTRAN_19: EUTRAN band 19.
+ * @QMI_NAS_ACTIVE_BAND_EUTRAN_20: EUTRAN band 20.
+ * @QMI_NAS_ACTIVE_BAND_EUTRAN_21: EUTRAN band 21.
+ * @QMI_NAS_ACTIVE_BAND_EUTRAN_23: EUTRAN band 23.
+ * @QMI_NAS_ACTIVE_BAND_EUTRAN_24: EUTRAN band 24.
+ * @QMI_NAS_ACTIVE_BAND_EUTRAN_25: EUTRAN band 25.
+ * @QMI_NAS_ACTIVE_BAND_EUTRAN_26: EUTRAN band 26.
+ * @QMI_NAS_ACTIVE_BAND_EUTRAN_27: EUTRAN band 27.
+ * @QMI_NAS_ACTIVE_BAND_EUTRAN_28: EUTRAN band 28.
+ * @QMI_NAS_ACTIVE_BAND_EUTRAN_29: EUTRAN band 29.
+ * @QMI_NAS_ACTIVE_BAND_EUTRAN_30: EUTRAN band 30.
+ * @QMI_NAS_ACTIVE_BAND_EUTRAN_31: EUTRAN band 31.
+ * @QMI_NAS_ACTIVE_BAND_EUTRAN_32: EUTRAN band 32.
+ * @QMI_NAS_ACTIVE_BAND_EUTRAN_33: EUTRAN band 33.
+ * @QMI_NAS_ACTIVE_BAND_EUTRAN_34: EUTRAN band 34.
+ * @QMI_NAS_ACTIVE_BAND_EUTRAN_35: EUTRAN band 35.
+ * @QMI_NAS_ACTIVE_BAND_EUTRAN_36: EUTRAN band 36.
+ * @QMI_NAS_ACTIVE_BAND_EUTRAN_37: EUTRAN band 37.
+ * @QMI_NAS_ACTIVE_BAND_EUTRAN_38: EUTRAN band 38.
+ * @QMI_NAS_ACTIVE_BAND_EUTRAN_39: EUTRAN band 39.
+ * @QMI_NAS_ACTIVE_BAND_EUTRAN_40: EUTRAN band 40.
+ * @QMI_NAS_ACTIVE_BAND_EUTRAN_41: EUTRAN band 41.
+ * @QMI_NAS_ACTIVE_BAND_EUTRAN_42: EUTRAN band 42.
+ * @QMI_NAS_ACTIVE_BAND_EUTRAN_43: EUTRAN band 43.
+ * @QMI_NAS_ACTIVE_BAND_EUTRAN_46: EUTRAN band 46.
+ * @QMI_NAS_ACTIVE_BAND_EUTRAN_47: EUTRAN band 47.
+ * @QMI_NAS_ACTIVE_BAND_EUTRAN_48: EUTRAN band 48.
+ * @QMI_NAS_ACTIVE_BAND_EUTRAN_66: EUTRAN band 66.
+ * @QMI_NAS_ACTIVE_BAND_EUTRAN_71: EUTRAN band 71.
+ * @QMI_NAS_ACTIVE_BAND_EUTRAN_125: EUTRAN band 125.
+ * @QMI_NAS_ACTIVE_BAND_EUTRAN_126: EUTRAN band 126.
+ * @QMI_NAS_ACTIVE_BAND_EUTRAN_127: EUTRAN band 127.
+ * @QMI_NAS_ACTIVE_BAND_EUTRAN_250: EUTRAN band 250.
+ * @QMI_NAS_ACTIVE_BAND_TDSCDMA_A: TD-SCDMA Band A.
+ * @QMI_NAS_ACTIVE_BAND_TDSCDMA_B: TD-SCDMA Band B.
+ * @QMI_NAS_ACTIVE_BAND_TDSCDMA_C: TD-SCDMA Band C.
+ * @QMI_NAS_ACTIVE_BAND_TDSCDMA_D: TD-SCDMA Band D.
+ * @QMI_NAS_ACTIVE_BAND_TDSCDMA_E: TD-SCDMA Band E.
+ * @QMI_NAS_ACTIVE_BAND_TDSCDMA_F: TD-SCDMA Band F.
+ *
+ * Band classes.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_NAS_ACTIVE_BAND_BC_0 = 0,
+ QMI_NAS_ACTIVE_BAND_BC_1 = 1,
+ QMI_NAS_ACTIVE_BAND_BC_2 = 2,
+ QMI_NAS_ACTIVE_BAND_BC_3 = 3,
+ QMI_NAS_ACTIVE_BAND_BC_4 = 4,
+ QMI_NAS_ACTIVE_BAND_BC_5 = 5,
+ QMI_NAS_ACTIVE_BAND_BC_6 = 6,
+ QMI_NAS_ACTIVE_BAND_BC_7 = 7,
+ QMI_NAS_ACTIVE_BAND_BC_8 = 8,
+ QMI_NAS_ACTIVE_BAND_BC_9 = 9,
+ QMI_NAS_ACTIVE_BAND_BC_10 = 10,
+ QMI_NAS_ACTIVE_BAND_BC_11 = 11,
+ QMI_NAS_ACTIVE_BAND_BC_12 = 12,
+ QMI_NAS_ACTIVE_BAND_BC_13 = 13,
+ QMI_NAS_ACTIVE_BAND_BC_14 = 14,
+ QMI_NAS_ACTIVE_BAND_BC_15 = 15,
+ QMI_NAS_ACTIVE_BAND_BC_16 = 16,
+ QMI_NAS_ACTIVE_BAND_BC_17 = 17,
+ QMI_NAS_ACTIVE_BAND_BC_18 = 18,
+ QMI_NAS_ACTIVE_BAND_BC_19 = 19,
+ QMI_NAS_ACTIVE_BAND_GSM_450 = 40,
+ QMI_NAS_ACTIVE_BAND_GSM_480 = 41,
+ QMI_NAS_ACTIVE_BAND_GSM_750 = 42,
+ QMI_NAS_ACTIVE_BAND_GSM_850 = 43,
+ QMI_NAS_ACTIVE_BAND_GSM_900_EXTENDED = 44,
+ QMI_NAS_ACTIVE_BAND_GSM_900_PRIMARY = 45,
+ QMI_NAS_ACTIVE_BAND_GSM_900_RAILWAYS = 46,
+ QMI_NAS_ACTIVE_BAND_GSM_DCS_1800 = 47,
+ QMI_NAS_ACTIVE_BAND_GSM_PCS_1900 = 48,
+ QMI_NAS_ACTIVE_BAND_WCDMA_2100 = 80,
+ QMI_NAS_ACTIVE_BAND_WCDMA_PCS_1900 = 81,
+ QMI_NAS_ACTIVE_BAND_WCDMA_DCS_1800 = 82,
+ QMI_NAS_ACTIVE_BAND_WCDMA_1700_US = 83,
+ QMI_NAS_ACTIVE_BAND_WCDMA_850 = 84,
+ QMI_NAS_ACTIVE_BAND_WCDMA_800 = 85,
+ QMI_NAS_ACTIVE_BAND_WCDMA_2600 = 86,
+ QMI_NAS_ACTIVE_BAND_WCDMA_900 = 87,
+ QMI_NAS_ACTIVE_BAND_WCDMA_1700_JAPAN = 88,
+ QMI_NAS_ACTIVE_BAND_WCDMA_1500_JAPAN = 90,
+ QMI_NAS_ACTIVE_BAND_WCDMA_850_JAPAN = 91,
+ QMI_NAS_ACTIVE_BAND_EUTRAN_1 = 120,
+ QMI_NAS_ACTIVE_BAND_EUTRAN_2 = 121,
+ QMI_NAS_ACTIVE_BAND_EUTRAN_3 = 122,
+ QMI_NAS_ACTIVE_BAND_EUTRAN_4 = 123,
+ QMI_NAS_ACTIVE_BAND_EUTRAN_5 = 124,
+ QMI_NAS_ACTIVE_BAND_EUTRAN_6 = 125,
+ QMI_NAS_ACTIVE_BAND_EUTRAN_7 = 126,
+ QMI_NAS_ACTIVE_BAND_EUTRAN_8 = 127,
+ QMI_NAS_ACTIVE_BAND_EUTRAN_9 = 128,
+ QMI_NAS_ACTIVE_BAND_EUTRAN_10 = 129,
+ QMI_NAS_ACTIVE_BAND_EUTRAN_11 = 130,
+ QMI_NAS_ACTIVE_BAND_EUTRAN_12 = 131,
+ QMI_NAS_ACTIVE_BAND_EUTRAN_13 = 132,
+ QMI_NAS_ACTIVE_BAND_EUTRAN_14 = 133,
+ QMI_NAS_ACTIVE_BAND_EUTRAN_17 = 134,
+ QMI_NAS_ACTIVE_BAND_EUTRAN_18 = 143,
+ QMI_NAS_ACTIVE_BAND_EUTRAN_19 = 144,
+ QMI_NAS_ACTIVE_BAND_EUTRAN_20 = 145,
+ QMI_NAS_ACTIVE_BAND_EUTRAN_21 = 146,
+ QMI_NAS_ACTIVE_BAND_EUTRAN_23 = 152,
+ QMI_NAS_ACTIVE_BAND_EUTRAN_24 = 147,
+ QMI_NAS_ACTIVE_BAND_EUTRAN_25 = 148,
+ QMI_NAS_ACTIVE_BAND_EUTRAN_26 = 153,
+ QMI_NAS_ACTIVE_BAND_EUTRAN_27 = 164,
+ QMI_NAS_ACTIVE_BAND_EUTRAN_28 = 158,
+ QMI_NAS_ACTIVE_BAND_EUTRAN_29 = 159,
+ QMI_NAS_ACTIVE_BAND_EUTRAN_30 = 160,
+ QMI_NAS_ACTIVE_BAND_EUTRAN_31 = 165,
+ QMI_NAS_ACTIVE_BAND_EUTRAN_32 = 154,
+ QMI_NAS_ACTIVE_BAND_EUTRAN_33 = 135,
+ QMI_NAS_ACTIVE_BAND_EUTRAN_34 = 136,
+ QMI_NAS_ACTIVE_BAND_EUTRAN_35 = 137,
+ QMI_NAS_ACTIVE_BAND_EUTRAN_36 = 138,
+ QMI_NAS_ACTIVE_BAND_EUTRAN_37 = 139,
+ QMI_NAS_ACTIVE_BAND_EUTRAN_38 = 140,
+ QMI_NAS_ACTIVE_BAND_EUTRAN_39 = 141,
+ QMI_NAS_ACTIVE_BAND_EUTRAN_40 = 142,
+ QMI_NAS_ACTIVE_BAND_EUTRAN_41 = 149,
+ QMI_NAS_ACTIVE_BAND_EUTRAN_42 = 150,
+ QMI_NAS_ACTIVE_BAND_EUTRAN_43 = 151,
+ QMI_NAS_ACTIVE_BAND_EUTRAN_46 = 163,
+ QMI_NAS_ACTIVE_BAND_EUTRAN_47 = 166,
+ QMI_NAS_ACTIVE_BAND_EUTRAN_48 = 167,
+ QMI_NAS_ACTIVE_BAND_EUTRAN_66 = 161,
+ QMI_NAS_ACTIVE_BAND_EUTRAN_71 = 168,
+ QMI_NAS_ACTIVE_BAND_EUTRAN_125 = 155,
+ QMI_NAS_ACTIVE_BAND_EUTRAN_126 = 156,
+ QMI_NAS_ACTIVE_BAND_EUTRAN_127 = 157,
+ QMI_NAS_ACTIVE_BAND_EUTRAN_250 = 162,
+ QMI_NAS_ACTIVE_BAND_TDSCDMA_A = 200,
+ QMI_NAS_ACTIVE_BAND_TDSCDMA_B = 201,
+ QMI_NAS_ACTIVE_BAND_TDSCDMA_C = 202,
+ QMI_NAS_ACTIVE_BAND_TDSCDMA_D = 203,
+ QMI_NAS_ACTIVE_BAND_TDSCDMA_E = 204,
+ QMI_NAS_ACTIVE_BAND_TDSCDMA_F = 205
+} QmiNasActiveBand;
+
+/**
+ * QmiNasNetworkServiceDomain:
+ * @QMI_NAS_NETWORK_SERVICE_DOMAIN_NONE: No service.
+ * @QMI_NAS_NETWORK_SERVICE_DOMAIN_CS: Circuit switched.
+ * @QMI_NAS_NETWORK_SERVICE_DOMAIN_PS: Packet switched.
+ * @QMI_NAS_NETWORK_SERVICE_DOMAIN_CS_PS: Circuit and packet switched.
+ * @QMI_NAS_NETWORK_SERVICE_DOMAIN_UNKNOWN: Unknown service.
+ *
+ * Network Service Domain.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_NAS_NETWORK_SERVICE_DOMAIN_NONE = 0x00,
+ QMI_NAS_NETWORK_SERVICE_DOMAIN_CS = 0x01,
+ QMI_NAS_NETWORK_SERVICE_DOMAIN_PS = 0x02,
+ QMI_NAS_NETWORK_SERVICE_DOMAIN_CS_PS = 0x03,
+ QMI_NAS_NETWORK_SERVICE_DOMAIN_UNKNOWN = 0x04,
+} QmiNasNetworkServiceDomain;
+
+/**
+ * QmiNasEvdoSinrLevel:
+ * @QMI_NAS_EVDO_SINR_LEVEL_0: -9 dB.
+ * @QMI_NAS_EVDO_SINR_LEVEL_1: -6 dB.
+ * @QMI_NAS_EVDO_SINR_LEVEL_2: -4.5 dB.
+ * @QMI_NAS_EVDO_SINR_LEVEL_3: -3 dB.
+ * @QMI_NAS_EVDO_SINR_LEVEL_4: -2 dB.
+ * @QMI_NAS_EVDO_SINR_LEVEL_5: +1 dB.
+ * @QMI_NAS_EVDO_SINR_LEVEL_6: +3 dB.
+ * @QMI_NAS_EVDO_SINR_LEVEL_7: +6 dB.
+ * @QMI_NAS_EVDO_SINR_LEVEL_8: +9 dB.
+ *
+ * EV-DO SINR level.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_NAS_EVDO_SINR_LEVEL_0 = 0,
+ QMI_NAS_EVDO_SINR_LEVEL_1 = 1,
+ QMI_NAS_EVDO_SINR_LEVEL_2 = 2,
+ QMI_NAS_EVDO_SINR_LEVEL_3 = 3,
+ QMI_NAS_EVDO_SINR_LEVEL_4 = 4,
+ QMI_NAS_EVDO_SINR_LEVEL_5 = 5,
+ QMI_NAS_EVDO_SINR_LEVEL_6 = 6,
+ QMI_NAS_EVDO_SINR_LEVEL_7 = 7,
+ QMI_NAS_EVDO_SINR_LEVEL_8 = 8
+} QmiNasEvdoSinrLevel;
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI NAS Get Signal Strength' request/response */
+
+/**
+ * QmiNasSignalStrengthRequest:
+ * @QMI_NAS_SIGNAL_STRENGTH_REQUEST_NONE: None.
+ * @QMI_NAS_SIGNAL_STRENGTH_REQUEST_RSSI: Request RSSI information.
+ * @QMI_NAS_SIGNAL_STRENGTH_REQUEST_ECIO: Request ECIO information.
+ * @QMI_NAS_SIGNAL_STRENGTH_REQUEST_IO: Request IO information.
+ * @QMI_NAS_SIGNAL_STRENGTH_REQUEST_SINR: Request SINR information.
+ * @QMI_NAS_SIGNAL_STRENGTH_REQUEST_ERROR_RATE: Request error rate information.
+ * @QMI_NAS_SIGNAL_STRENGTH_REQUEST_RSRQ: Request RSRQ information.
+ * @QMI_NAS_SIGNAL_STRENGTH_REQUEST_LTE_SNR: Request LTE SNR information.
+ * @QMI_NAS_SIGNAL_STRENGTH_REQUEST_LTE_RSRP: Request LTE RSRP information.
+ *
+ * Extra information to request when gathering Signal Strength.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_NAS_SIGNAL_STRENGTH_REQUEST_NONE = 0,
+ QMI_NAS_SIGNAL_STRENGTH_REQUEST_RSSI = 1 << 0,
+ QMI_NAS_SIGNAL_STRENGTH_REQUEST_ECIO = 1 << 1,
+ QMI_NAS_SIGNAL_STRENGTH_REQUEST_IO = 1 << 2,
+ QMI_NAS_SIGNAL_STRENGTH_REQUEST_SINR = 1 << 3,
+ QMI_NAS_SIGNAL_STRENGTH_REQUEST_ERROR_RATE = 1 << 4,
+ QMI_NAS_SIGNAL_STRENGTH_REQUEST_RSRQ = 1 << 5,
+ QMI_NAS_SIGNAL_STRENGTH_REQUEST_LTE_SNR = 1 << 6,
+ QMI_NAS_SIGNAL_STRENGTH_REQUEST_LTE_RSRP = 1 << 7
+} QmiNasSignalStrengthRequest;
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI NAS Network Scan' request/response */
+
+/**
+ * QmiNasNetworkScanType:
+ * @QMI_NAS_NETWORK_SCAN_TYPE_GSM: GSM network.
+ * @QMI_NAS_NETWORK_SCAN_TYPE_UMTS: UMTS network.
+ * @QMI_NAS_NETWORK_SCAN_TYPE_LTE: LTE network.
+ * @QMI_NAS_NETWORK_SCAN_TYPE_TD_SCDMA: TD-SCDMA network.
+ *
+ * Flags to use when specifying which networks to scan.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_NAS_NETWORK_SCAN_TYPE_GSM = 1 << 0,
+ QMI_NAS_NETWORK_SCAN_TYPE_UMTS = 1 << 1,
+ QMI_NAS_NETWORK_SCAN_TYPE_LTE = 1 << 2,
+ QMI_NAS_NETWORK_SCAN_TYPE_TD_SCDMA = 1 << 3
+} QmiNasNetworkScanType;
+
+/**
+ * QmiNasNetworkScanResult:
+ * @QMI_NAS_NETWORK_SCAN_RESULT_SUCCESS: Success.
+ * @QMI_NAS_NETWORK_SCAN_RESULT_ABORT: Abort.
+ * @QMI_NAS_NETWORK_SCAN_RESULT_RADIO_LINK_FAILURE: Radio link failure.
+ *
+ * Network scan result.
+ *
+ * Since: 1.24
+ */
+typedef enum { /*< since=1.24 >*/
+ QMI_NAS_NETWORK_SCAN_RESULT_SUCCESS = 0,
+ QMI_NAS_NETWORK_SCAN_RESULT_ABORT = 1,
+ QMI_NAS_NETWORK_SCAN_RESULT_RADIO_LINK_FAILURE = 2,
+} QmiNasNetworkScanResult;
+
+/**
+ * QmiNasNetworkStatus:
+ * @QMI_NAS_NETWORK_STATUS_CURRENT_SERVING: Network is in use, current serving.
+ * @QMI_NAS_NETWORK_STATUS_AVAILABLE: Network is vailable.
+ * @QMI_NAS_NETWORK_STATUS_HOME: Network is home network.
+ * @QMI_NAS_NETWORK_STATUS_ROAMING: Network is a roaming network.
+ * @QMI_NAS_NETWORK_STATUS_FORBIDDEN: Network is forbidden.
+ * @QMI_NAS_NETWORK_STATUS_NOT_FORBIDDEN: Network is not forbidden.
+ * @QMI_NAS_NETWORK_STATUS_PREFERRED: Network is preferred.
+ * @QMI_NAS_NETWORK_STATUS_NOT_PREFERRED: Network is not preferred.
+ *
+ * Flags to specify the status of a given network.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_NAS_NETWORK_STATUS_CURRENT_SERVING = 1 << 0,
+ QMI_NAS_NETWORK_STATUS_AVAILABLE = 1 << 1,
+ QMI_NAS_NETWORK_STATUS_HOME = 1 << 2,
+ QMI_NAS_NETWORK_STATUS_ROAMING = 1 << 3,
+ QMI_NAS_NETWORK_STATUS_FORBIDDEN = 1 << 4,
+ QMI_NAS_NETWORK_STATUS_NOT_FORBIDDEN = 1 << 5,
+ QMI_NAS_NETWORK_STATUS_PREFERRED = 1 << 6,
+ QMI_NAS_NETWORK_STATUS_NOT_PREFERRED = 1 << 7
+} QmiNasNetworkStatus;
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI NAS Initiate Network Register' request/response */
+
+/**
+ * QmiNasNetworkRegisterType:
+ * @QMI_NAS_NETWORK_REGISTER_TYPE_AUTOMATIC: Automatic network registration.
+ * @QMI_NAS_NETWORK_REGISTER_TYPE_MANUAL: Manual network registration.
+ *
+ * Type of network registration.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_NAS_NETWORK_REGISTER_TYPE_AUTOMATIC = 0x01,
+ QMI_NAS_NETWORK_REGISTER_TYPE_MANUAL = 0x02
+} QmiNasNetworkRegisterType;
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI NAS Attach Detach' request/response */
+
+/**
+ * QmiNasPsAttachAction:
+ * @QMI_NAS_PS_ATTACH_ACTION_ATTACH: Attach the PS domain.
+ * @QMI_NAS_PS_ATTACH_ACTION_DETACH: Detach the PS domain.
+ *
+ * Packet Switched domain attach/detach action.
+ *
+ * Since: 1.20
+ */
+typedef enum { /*< since=1.20 >*/
+ QMI_NAS_PS_ATTACH_ACTION_ATTACH = 0x01,
+ QMI_NAS_PS_ATTACH_ACTION_DETACH = 0x02
+} QmiNasPsAttachAction;
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI NAS Get Serving System' request/response */
+
+/**
+ * QmiNasRegistrationState:
+ * @QMI_NAS_REGISTRATION_STATE_NOT_REGISTERED: Not registered.
+ * @QMI_NAS_REGISTRATION_STATE_REGISTERED: Registered.
+ * @QMI_NAS_REGISTRATION_STATE_NOT_REGISTERED_SEARCHING: Searching.
+ * @QMI_NAS_REGISTRATION_STATE_REGISTRATION_DENIED: Registration denied.
+ * @QMI_NAS_REGISTRATION_STATE_UNKNOWN: Unknown.
+ *
+ * Status of the network registration.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_NAS_REGISTRATION_STATE_NOT_REGISTERED = 0x00,
+ QMI_NAS_REGISTRATION_STATE_REGISTERED = 0x01,
+ QMI_NAS_REGISTRATION_STATE_NOT_REGISTERED_SEARCHING = 0x02,
+ QMI_NAS_REGISTRATION_STATE_REGISTRATION_DENIED = 0x03,
+ QMI_NAS_REGISTRATION_STATE_UNKNOWN = 0x04
+} QmiNasRegistrationState;
+
+/**
+ * QmiNasAttachState:
+ * @QMI_NAS_ATTACH_STATE_UNKNOWN: Unknown attach state.
+ * @QMI_NAS_ATTACH_STATE_ATTACHED: Attached.
+ * @QMI_NAS_ATTACH_STATE_DETACHED: Detached.
+ *
+ * Domain attach state.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_NAS_ATTACH_STATE_UNKNOWN = 0x00,
+ QMI_NAS_ATTACH_STATE_ATTACHED = 0x01,
+ QMI_NAS_ATTACH_STATE_DETACHED = 0x02,
+} QmiNasAttachState;
+
+/**
+ * QmiNasNetworkType:
+ * @QMI_NAS_NETWORK_TYPE_UNKNOWN: Unknown.
+ * @QMI_NAS_NETWORK_TYPE_3GPP2: 3GPP2 network.
+ * @QMI_NAS_NETWORK_TYPE_3GPP: 3GPP network.
+ *
+ * Type of network.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_NAS_NETWORK_TYPE_UNKNOWN = 0x00,
+ QMI_NAS_NETWORK_TYPE_3GPP2 = 0x01,
+ QMI_NAS_NETWORK_TYPE_3GPP = 0x02,
+} QmiNasNetworkType;
+
+/**
+ * QmiNasRoamingIndicatorStatus:
+ * @QMI_NAS_ROAMING_INDICATOR_STATUS_ON: Roaming.
+ * @QMI_NAS_ROAMING_INDICATOR_STATUS_OFF: Home.
+ *
+ * Status of the roaming indication.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_NAS_ROAMING_INDICATOR_STATUS_ON = 0x00,
+ QMI_NAS_ROAMING_INDICATOR_STATUS_OFF = 0x01,
+ /* next values only for 3GPP2 */
+} QmiNasRoamingIndicatorStatus;
+
+/**
+ * QmiNasDataCapability:
+ * @QMI_NAS_DATA_CAPABILITY_NONE: None or unknown.
+ * @QMI_NAS_DATA_CAPABILITY_GPRS: GPRS.
+ * @QMI_NAS_DATA_CAPABILITY_EDGE: EDGE.
+ * @QMI_NAS_DATA_CAPABILITY_HSDPA: HSDPA.
+ * @QMI_NAS_DATA_CAPABILITY_HSUPA: HSUPA.
+ * @QMI_NAS_DATA_CAPABILITY_WCDMA: WCDMA.
+ * @QMI_NAS_DATA_CAPABILITY_CDMA: CDMA.
+ * @QMI_NAS_DATA_CAPABILITY_EVDO_REV_0: EV-DO revision 0.
+ * @QMI_NAS_DATA_CAPABILITY_EVDO_REV_A: EV-DO revision A.
+ * @QMI_NAS_DATA_CAPABILITY_GSM: GSM.
+ * @QMI_NAS_DATA_CAPABILITY_EVDO_REV_B: EV-DO revision B.
+ * @QMI_NAS_DATA_CAPABILITY_LTE: LTE.
+ * @QMI_NAS_DATA_CAPABILITY_HSDPA_PLUS: HSDPA+.
+ * @QMI_NAS_DATA_CAPABILITY_DC_HSDPA_PLUS: DC-HSDPA+.
+ *
+ * Data capability of the network.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_NAS_DATA_CAPABILITY_NONE = 0x00,
+ QMI_NAS_DATA_CAPABILITY_GPRS = 0x01,
+ QMI_NAS_DATA_CAPABILITY_EDGE = 0x02,
+ QMI_NAS_DATA_CAPABILITY_HSDPA = 0x03,
+ QMI_NAS_DATA_CAPABILITY_HSUPA = 0x04,
+ QMI_NAS_DATA_CAPABILITY_WCDMA = 0x05,
+ QMI_NAS_DATA_CAPABILITY_CDMA = 0x06,
+ QMI_NAS_DATA_CAPABILITY_EVDO_REV_0 = 0x07,
+ QMI_NAS_DATA_CAPABILITY_EVDO_REV_A = 0x08,
+ QMI_NAS_DATA_CAPABILITY_GSM = 0x09,
+ QMI_NAS_DATA_CAPABILITY_EVDO_REV_B = 0x0A,
+ QMI_NAS_DATA_CAPABILITY_LTE = 0x0B,
+ QMI_NAS_DATA_CAPABILITY_HSDPA_PLUS = 0x0C,
+ QMI_NAS_DATA_CAPABILITY_DC_HSDPA_PLUS = 0x0D
+} QmiNasDataCapability;
+
+/**
+ * QmiNasServiceStatus:
+ * @QMI_NAS_SERVICE_STATUS_NONE: No service.
+ * @QMI_NAS_SERVICE_STATUS_LIMITED: Limited service.
+ * @QMI_NAS_SERVICE_STATUS_AVAILABLE: Service available.
+ * @QMI_NAS_SERVICE_STATUS_LIMITED_REGIONAL: Limited regional service.
+ * @QMI_NAS_SERVICE_STATUS_POWER_SAVE: Device in power save mode.
+ *
+ * Status of the service.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_NAS_SERVICE_STATUS_NONE = 0x00,
+ QMI_NAS_SERVICE_STATUS_LIMITED = 0x01,
+ QMI_NAS_SERVICE_STATUS_AVAILABLE = 0x02,
+ QMI_NAS_SERVICE_STATUS_LIMITED_REGIONAL = 0x03,
+ QMI_NAS_SERVICE_STATUS_POWER_SAVE = 0x04
+} QmiNasServiceStatus;
+
+/**
+ * QmiNasHdrPersonality:
+ * @QMI_NAS_HDR_PERSONALITY_UNKNOWN: Unknown.
+ * @QMI_NAS_HDR_PERSONALITY_HRPD: HRPD.
+ * @QMI_NAS_HDR_PERSONALITY_EHRPD: eHRPD.
+ *
+ * HDR personality type.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_NAS_HDR_PERSONALITY_UNKNOWN = 0x00,
+ QMI_NAS_HDR_PERSONALITY_HRPD = 0x01,
+ QMI_NAS_HDR_PERSONALITY_EHRPD = 0x02,
+} QmiNasHdrPersonality;
+
+/**
+ * QmiNasCallBarringStatus:
+ * @QMI_NAS_CALL_BARRING_STATUS_NORMAL_ONLY: Normal calls only.
+ * @QMI_NAS_CALL_BARRING_STATUS_EMERGENCY_ONLY: Emergency calls only.
+ * @QMI_NAS_CALL_BARRING_STATUS_NO_CALLS: No calls allowed.
+ * @QMI_NAS_CALL_BARRING_STATUS_ALL_CALLS: All calls allowed.
+ * @QMI_NAS_CALL_BARRING_STATUS_UNKNOWN: Unknown.
+ *
+ * Status of the call barring functionality.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_NAS_CALL_BARRING_STATUS_NORMAL_ONLY = 0x00,
+ QMI_NAS_CALL_BARRING_STATUS_EMERGENCY_ONLY = 0x01,
+ QMI_NAS_CALL_BARRING_STATUS_NO_CALLS = 0x02,
+ QMI_NAS_CALL_BARRING_STATUS_ALL_CALLS = 0x03,
+ QMI_NAS_CALL_BARRING_STATUS_UNKNOWN = -1
+} QmiNasCallBarringStatus;
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI NAS Get Home Network' request/response */
+
+/**
+ * QmiNasNetworkDescriptionDisplay:
+ * @QMI_NAS_NETWORK_DESCRIPTION_DISPLAY_NO: Don't display.
+ * @QMI_NAS_NETWORK_DESCRIPTION_DISPLAY_YES: Display.
+ * @QMI_NAS_NETWORK_DESCRIPTION_DISPLAY_UNKNOWN: Unknown.
+ *
+ * Setup to define whether the network description should be displayed.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_NAS_NETWORK_DESCRIPTION_DISPLAY_NO = 0x00,
+ QMI_NAS_NETWORK_DESCRIPTION_DISPLAY_YES = 0x01,
+ QMI_NAS_NETWORK_DESCRIPTION_DISPLAY_UNKNOWN = 0xFF
+} QmiNasNetworkDescriptionDisplay;
+
+/**
+ * QmiNasNetworkDescriptionEncoding:
+ * @QMI_NAS_NETWORK_DESCRIPTION_ENCODING_UNSPECIFIED: Unspecified.
+ * @QMI_NAS_NETWORK_DESCRIPTION_ENCODING_ASCII7: ASCII-7.
+ * @QMI_NAS_NETWORK_DESCRIPTION_ENCODING_UNICODE: Unicode.
+ * @QMI_NAS_NETWORK_DESCRIPTION_ENCODING_GSM: GSM 7-bit.
+ *
+ * Type of encoding used in the network description.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_NAS_NETWORK_DESCRIPTION_ENCODING_UNSPECIFIED = 0x00,
+ QMI_NAS_NETWORK_DESCRIPTION_ENCODING_ASCII7 = 0x01,
+ QMI_NAS_NETWORK_DESCRIPTION_ENCODING_UNICODE = 0x04,
+ QMI_NAS_NETWORK_DESCRIPTION_ENCODING_GSM = 0x09
+} QmiNasNetworkDescriptionEncoding;
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI NAS Get Preferred Networks' request/response */
+
+/**
+ * QmiNasPlmnAccessTechnologyIdentifier:
+ * @QMI_NAS_PLMN_ACCESS_TECHNOLOGY_IDENTIFIER_UNSPECIFIED: Unspecified.
+ * @QMI_NAS_PLMN_ACCESS_TECHNOLOGY_IDENTIFIER_GSM_COMPACT: GSM Compact.
+ * @QMI_NAS_PLMN_ACCESS_TECHNOLOGY_IDENTIFIER_GSM: GSM.
+ * @QMI_NAS_PLMN_ACCESS_TECHNOLOGY_IDENTIFIER_NGRAN: NG-RAN.
+ * @QMI_NAS_PLMN_ACCESS_TECHNOLOGY_IDENTIFIER_EUTRAN: E-UTRAN.
+ * @QMI_NAS_PLMN_ACCESS_TECHNOLOGY_IDENTIFIER_UTRAN: UTRAN.
+ * @QMI_NAS_PLMN_ACCESS_TECHNOLOGY_IDENTIFIER_ALL: All technologies.
+ *
+ * Preferred networks access technology identifier as specified in
+ * ETSI TS 131 102, chapter 4.2.5.
+ *
+ * Since: 1.30
+ */
+typedef enum { /*< since=1.30 >*/
+ QMI_NAS_PLMN_ACCESS_TECHNOLOGY_IDENTIFIER_UNSPECIFIED = 0x0000,
+ QMI_NAS_PLMN_ACCESS_TECHNOLOGY_IDENTIFIER_GSM_COMPACT = 1 << 6,
+ QMI_NAS_PLMN_ACCESS_TECHNOLOGY_IDENTIFIER_GSM = 1 << 7,
+ QMI_NAS_PLMN_ACCESS_TECHNOLOGY_IDENTIFIER_NGRAN = 1 << 11,
+ QMI_NAS_PLMN_ACCESS_TECHNOLOGY_IDENTIFIER_EUTRAN = 1 << 14,
+ QMI_NAS_PLMN_ACCESS_TECHNOLOGY_IDENTIFIER_UTRAN = 1 << 15,
+ QMI_NAS_PLMN_ACCESS_TECHNOLOGY_IDENTIFIER_ALL = 0xFFFF
+} QmiNasPlmnAccessTechnologyIdentifier;
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI NAS Get Technology Preference' request/response */
+
+/**
+ * QmiNasRadioTechnologyPreference:
+ * @QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_AUTO: Automatic selection.
+ * @QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_3GPP2: 3GPP2 technology.
+ * @QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_3GPP: 3GPP technology.
+ * @QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_AMPS_OR_GSM: AMPS if 3GPP2, GSM if 3GPP.
+ * @QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_CDMA_OR_WCDMA: CDMA if 3GPP2, WCDMA if 3GPP.
+ * @QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_HDR: CDMA EV-DO.
+ * @QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_LTE: LTE.
+ *
+ * Flags to specify the radio technology preference.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_AUTO = 0,
+ QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_3GPP2 = 1 << 0,
+ QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_3GPP = 1 << 1,
+ QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_AMPS_OR_GSM = 1 << 2,
+ QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_CDMA_OR_WCDMA = 1 << 3,
+ QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_HDR = 1 << 4,
+ QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_LTE = 1 << 5
+} QmiNasRadioTechnologyPreference;
+
+/**
+ * QmiNasPreferenceDuration:
+ * @QMI_NAS_PREFERENCE_DURATION_PERMANENT: Permanent.
+ * @QMI_NAS_PREFERENCE_DURATION_POWER_CYCLE: Until the next power cycle.
+ * @QMI_NAS_PREFERENCE_DURATION_ONE_CALL: Until end of call.
+ * @QMI_NAS_PREFERENCE_DURATION_ONE_CALL_OR_TIME: Until end of call or a specified time.
+ * @QMI_NAS_PREFERENCE_DURATION_INTERNAL_ONE_CALL_1: Internal reason 1, one call.
+ * @QMI_NAS_PREFERENCE_DURATION_INTERNAL_ONE_CALL_2: Internal reason 2, one call.
+ * @QMI_NAS_PREFERENCE_DURATION_INTERNAL_ONE_CALL_3: Internal reason 3, one call.
+ *
+ * Duration of the preference setting.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_NAS_PREFERENCE_DURATION_PERMANENT = 0x00,
+ QMI_NAS_PREFERENCE_DURATION_POWER_CYCLE = 0x01,
+ QMI_NAS_PREFERENCE_DURATION_ONE_CALL = 0x02,
+ QMI_NAS_PREFERENCE_DURATION_ONE_CALL_OR_TIME = 0x03,
+ QMI_NAS_PREFERENCE_DURATION_INTERNAL_ONE_CALL_1 = 0x04,
+ QMI_NAS_PREFERENCE_DURATION_INTERNAL_ONE_CALL_2 = 0x05,
+ QMI_NAS_PREFERENCE_DURATION_INTERNAL_ONE_CALL_3 = 0x06
+} QmiNasPreferenceDuration;
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI NAS Get/Set System Selection Preference'
+ * requests/responses */
+
+/**
+ * QmiNasRatModePreference:
+ * @QMI_NAS_RAT_MODE_PREFERENCE_CDMA_1X: CDMA2000 1X.
+ * @QMI_NAS_RAT_MODE_PREFERENCE_CDMA_1XEVDO: CDMA2000 HRPD (1xEV-DO).
+ * @QMI_NAS_RAT_MODE_PREFERENCE_GSM: GSM.
+ * @QMI_NAS_RAT_MODE_PREFERENCE_UMTS: UMTS.
+ * @QMI_NAS_RAT_MODE_PREFERENCE_LTE: LTE.
+ * @QMI_NAS_RAT_MODE_PREFERENCE_TD_SCDMA: TD-SCDMA.
+ * @QMI_NAS_RAT_MODE_PREFERENCE_5GNR: 5GNR. Since 1.26.
+ *
+ * Flags specifying radio access technology mode preference.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_NAS_RAT_MODE_PREFERENCE_CDMA_1X = 1 << 0,
+ QMI_NAS_RAT_MODE_PREFERENCE_CDMA_1XEVDO = 1 << 1,
+ QMI_NAS_RAT_MODE_PREFERENCE_GSM = 1 << 2,
+ QMI_NAS_RAT_MODE_PREFERENCE_UMTS = 1 << 3,
+ QMI_NAS_RAT_MODE_PREFERENCE_LTE = 1 << 4,
+ QMI_NAS_RAT_MODE_PREFERENCE_TD_SCDMA = 1 << 5,
+ QMI_NAS_RAT_MODE_PREFERENCE_5GNR = 1 << 6,
+} QmiNasRatModePreference;
+
+/**
+ * QmiNasCdmaPrlPreference:
+ * @QMI_NAS_CDMA_PRL_PREFERENCE_A_SIDE_ONLY: System A only.
+ * @QMI_NAS_CDMA_PRL_PREFERENCE_B_SIDE_ONLY: System B only.
+ * @QMI_NAS_CDMA_PRL_PREFERENCE_ANY: Any system.
+ *
+ * Flags specifying the preference when using CDMA Band Class 0.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_NAS_CDMA_PRL_PREFERENCE_A_SIDE_ONLY = 0x0001,
+ QMI_NAS_CDMA_PRL_PREFERENCE_B_SIDE_ONLY = 0x0002,
+ QMI_NAS_CDMA_PRL_PREFERENCE_ANY = 0x3FFF
+} QmiNasCdmaPrlPreference;
+
+/**
+ * QmiNasRoamingPreference:
+ * @QMI_NAS_ROAMING_PREFERENCE_OFF: Only non-roaming networks.
+ * @QMI_NAS_ROAMING_PREFERENCE_NOT_OFF: Only roaming networks.
+ * @QMI_NAS_ROAMING_PREFERENCE_NOT_FLASHING: Only non-roaming networks or not flashing.
+ * @QMI_NAS_ROAMING_PREFERENCE_ANY: Don't filter by roaming when acquiring networks.
+ *
+ * Roaming preference.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_NAS_ROAMING_PREFERENCE_OFF = 0x01,
+ QMI_NAS_ROAMING_PREFERENCE_NOT_OFF = 0x02,
+ QMI_NAS_ROAMING_PREFERENCE_NOT_FLASHING = 0x03,
+ QMI_NAS_ROAMING_PREFERENCE_ANY = 0xFF
+} QmiNasRoamingPreference;
+
+/**
+ * QmiNasNetworkSelectionPreference:
+ * @QMI_NAS_NETWORK_SELECTION_PREFERENCE_AUTOMATIC: Automatic.
+ * @QMI_NAS_NETWORK_SELECTION_PREFERENCE_MANUAL: Manual.
+ *
+ * Network selection preference.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_NAS_NETWORK_SELECTION_PREFERENCE_AUTOMATIC = 0x00,
+ QMI_NAS_NETWORK_SELECTION_PREFERENCE_MANUAL = 0x01
+} QmiNasNetworkSelectionPreference;
+
+/**
+ * QmiNasChangeDuration:
+ * @QMI_NAS_CHANGE_DURATION_PERMANENT: Permanent.
+ * @QMI_NAS_CHANGE_DURATION_POWER_CYCLE: Until the next power cycle.
+ *
+ * Duration of the change setting.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_NAS_CHANGE_DURATION_POWER_CYCLE = 0x00,
+ QMI_NAS_CHANGE_DURATION_PERMANENT = 0x01
+} QmiNasChangeDuration;
+
+/**
+ * QmiNasServiceDomainPreference:
+ * @QMI_NAS_SERVICE_DOMAIN_PREFERENCE_CS_ONLY: Circuit-switched only.
+ * @QMI_NAS_SERVICE_DOMAIN_PREFERENCE_PS_ONLY: Packet-switched only.
+ * @QMI_NAS_SERVICE_DOMAIN_PREFERENCE_CS_PS: Circuit-switched and packet-switched.
+ * @QMI_NAS_SERVICE_DOMAIN_PREFERENCE_PS_ATTACH: Packet-switched attach.
+ * @QMI_NAS_SERVICE_DOMAIN_PREFERENCE_PS_DETACH:Packet-switched dettach.
+ *
+ * Service domain preference.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_NAS_SERVICE_DOMAIN_PREFERENCE_CS_ONLY = 0x00,
+ QMI_NAS_SERVICE_DOMAIN_PREFERENCE_PS_ONLY = 0x01,
+ QMI_NAS_SERVICE_DOMAIN_PREFERENCE_CS_PS = 0x02,
+ QMI_NAS_SERVICE_DOMAIN_PREFERENCE_PS_ATTACH = 0x03,
+ QMI_NAS_SERVICE_DOMAIN_PREFERENCE_PS_DETACH = 0x04,
+} QmiNasServiceDomainPreference;
+
+/**
+ * QmiNasGsmWcdmaAcquisitionOrderPreference:
+ * @QMI_NAS_GSM_WCDMA_ACQUISITION_ORDER_PREFERENCE_AUTOMATIC: Automatic.
+ * @QMI_NAS_GSM_WCDMA_ACQUISITION_ORDER_PREFERENCE_GSM: GSM first, then WCDMA.
+ * @QMI_NAS_GSM_WCDMA_ACQUISITION_ORDER_PREFERENCE_WCDMA: WCDMA first, then GSM.
+ *
+ * GSM/WCDMA acquisition order preference.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_NAS_GSM_WCDMA_ACQUISITION_ORDER_PREFERENCE_AUTOMATIC = 0x00,
+ QMI_NAS_GSM_WCDMA_ACQUISITION_ORDER_PREFERENCE_GSM = 0x01,
+ QMI_NAS_GSM_WCDMA_ACQUISITION_ORDER_PREFERENCE_WCDMA = 0x02
+} QmiNasGsmWcdmaAcquisitionOrderPreference;
+
+/**
+ * QmiNasTdScdmaBandPreference:
+ * @QMI_NAS_TD_SCDMA_BAND_PREFERENCE_A: Band A.
+ * @QMI_NAS_TD_SCDMA_BAND_PREFERENCE_B: Band B.
+ * @QMI_NAS_TD_SCDMA_BAND_PREFERENCE_C: Band C.
+ * @QMI_NAS_TD_SCDMA_BAND_PREFERENCE_D: Band D.
+ * @QMI_NAS_TD_SCDMA_BAND_PREFERENCE_E: Band E.
+ * @QMI_NAS_TD_SCDMA_BAND_PREFERENCE_F: Band F.
+ *
+ * Flags to specify TD-SCDMA-specific frequency band preferences.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_NAS_TD_SCDMA_BAND_PREFERENCE_A = 1 << 0,
+ QMI_NAS_TD_SCDMA_BAND_PREFERENCE_B = 1 << 1,
+ QMI_NAS_TD_SCDMA_BAND_PREFERENCE_C = 1 << 2,
+ QMI_NAS_TD_SCDMA_BAND_PREFERENCE_D = 1 << 3,
+ QMI_NAS_TD_SCDMA_BAND_PREFERENCE_E = 1 << 4,
+ QMI_NAS_TD_SCDMA_BAND_PREFERENCE_F = 1 << 5
+} QmiNasTdScdmaBandPreference;
+
+/**
+ * QmiNasVoiceDomainPreference:
+ * @QMI_NAS_VOICE_DOMAIN_PREFERENCE_CS_ONLY: Circuit-switched voice only
+ * @QMI_NAS_VOICE_DOMAIN_PREFERENCE_PS_ONLY: Packet-switched voice only.
+ * @QMI_NAS_VOICE_DOMAIN_PREFERENCE_CS_PREFERRED: Circuit-switched voice is preferred.
+ * @QMI_NAS_VOICE_DOMAIN_PREFERENCE_PS_PREFERRED: Packet-switched voice is preferred.
+ *
+ * Voice domain preference.
+ *
+ * Since: 1.24
+ */
+typedef enum { /*< since=1.24 >*/
+ QMI_NAS_VOICE_DOMAIN_PREFERENCE_CS_ONLY = 0x00,
+ QMI_NAS_VOICE_DOMAIN_PREFERENCE_PS_ONLY = 0x01,
+ QMI_NAS_VOICE_DOMAIN_PREFERENCE_CS_PREFERRED = 0x02,
+ QMI_NAS_VOICE_DOMAIN_PREFERENCE_PS_PREFERRED = 0x03,
+} QmiNasVoiceDomainPreference;
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI NAS Get System Info' request/response */
+
+/**
+ * QmiNasNetworkSelectionRegistrationRestriction:
+ * @QMI_NAS_NETWORK_SELECTION_REGISTRATION_RESTRICTION_UNRESTRICTED: Device follows the normal registration process.
+ * @QMI_NAS_NETWORK_SELECTION_REGISTRATION_RESTRICTION_CAMPED_ONLY: Device camps on the network according to its provisioning, but does not register.
+ * @QMI_NAS_NETWORK_SELECTION_REGISTRATION_RESTRICTION_LIMITED: Device selects the network for limited service.
+ *
+ * Registration restriction.
+ *
+ * Since: 1.24
+ */
+typedef enum { /*< since=1.24 >*/
+ QMI_NAS_NETWORK_SELECTION_REGISTRATION_RESTRICTION_UNRESTRICTED = 0x00,
+ QMI_NAS_NETWORK_SELECTION_REGISTRATION_RESTRICTION_CAMPED_ONLY = 0x01,
+ QMI_NAS_NETWORK_SELECTION_REGISTRATION_RESTRICTION_LIMITED = 0x02,
+} QmiNasNetworkSelectionRegistrationRestriction;
+
+/**
+ * QmiNasLteRegistrationDomain:
+ * @QMI_NAS_LTE_REGISTRATION_DOMAIN_NOT_APPLICABLE: Not applicable since the UE is not in "Camp Only" mode.
+ * @QMI_NAS_LTE_REGISTRATION_DOMAIN_CS_ONLY: UE is in "Camp Only" mode and the PLMN can provide CS service only.
+ * @QMI_NAS_LTE_REGISTRATION_DOMAIN_PS_ONLY: UE is in "Camp Only" mode and the PLMN can provide PS service only.
+ * @QMI_NAS_LTE_REGISTRATION_DOMAIN_CS_PS: UE is in "Camp Only" mode and the PLMN can provide CS and PS service.
+ * @QMI_NAS_LTE_REGISTRATION_DOMAIN_LIMITED_SERVICE: UE is in "Camp Only" mode but the PLMN cannot provide any service.
+ *
+ * LTE registration domain.
+ *
+ * Since: 1.24
+ */
+typedef enum { /*< since=1.24 >*/
+ QMI_NAS_LTE_REGISTRATION_DOMAIN_NOT_APPLICABLE = 0x00,
+ QMI_NAS_LTE_REGISTRATION_DOMAIN_CS_ONLY = 0x01,
+ QMI_NAS_LTE_REGISTRATION_DOMAIN_PS_ONLY = 0x02,
+ QMI_NAS_LTE_REGISTRATION_DOMAIN_CS_PS = 0x03,
+ QMI_NAS_LTE_REGISTRATION_DOMAIN_LIMITED_SERVICE = 0x04,
+} QmiNasLteRegistrationDomain;
+
+/**
+ * QmiNasRoamingStatus:
+ * @QMI_NAS_ROAMING_STATUS_OFF: Off.
+ * @QMI_NAS_ROAMING_STATUS_ON: On.
+ * @QMI_NAS_ROAMING_STATUS_BLINK: Blinking.
+ * @QMI_NAS_ROAMING_STATUS_OUT_OF_NEIGHBORHOOD: Out of neighborhood.
+ * @QMI_NAS_ROAMING_STATUS_OUT_OF_BUILDING: Out of building.
+ * @QMI_NAS_ROAMING_STATUS_PREFERRED_SYSTEM: Preferred system.
+ * @QMI_NAS_ROAMING_STATUS_AVAILABLE_SYSTEM: Available system.
+ * @QMI_NAS_ROAMING_STATUS_ALLIANCE_PARTNER: Alliance partner.
+ * @QMI_NAS_ROAMING_STATUS_PREMIUM_PARTNER: Premium partner.
+ * @QMI_NAS_ROAMING_STATUS_FULL_SERVICE: Full service.
+ * @QMI_NAS_ROAMING_STATUS_PARTIAL_SERVICE: Partial service.
+ * @QMI_NAS_ROAMING_STATUS_BANNER_ON: Banner on.
+ * @QMI_NAS_ROAMING_STATUS_BANNER_OFF: Banner off.
+ *
+ * Roaming status.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_NAS_ROAMING_STATUS_OFF = 0x00,
+ QMI_NAS_ROAMING_STATUS_ON = 0x01,
+ /* Next ones only for 3GPP2 */
+ QMI_NAS_ROAMING_STATUS_BLINK = 0x02,
+ QMI_NAS_ROAMING_STATUS_OUT_OF_NEIGHBORHOOD = 0x03,
+ QMI_NAS_ROAMING_STATUS_OUT_OF_BUILDING = 0x04,
+ QMI_NAS_ROAMING_STATUS_PREFERRED_SYSTEM = 0x05,
+ QMI_NAS_ROAMING_STATUS_AVAILABLE_SYSTEM = 0x06,
+ QMI_NAS_ROAMING_STATUS_ALLIANCE_PARTNER = 0x07,
+ QMI_NAS_ROAMING_STATUS_PREMIUM_PARTNER = 0x08,
+ QMI_NAS_ROAMING_STATUS_FULL_SERVICE = 0x09,
+ QMI_NAS_ROAMING_STATUS_PARTIAL_SERVICE = 0x0A,
+ QMI_NAS_ROAMING_STATUS_BANNER_ON = 0x0B,
+ QMI_NAS_ROAMING_STATUS_BANNER_OFF = 0x0C
+} QmiNasRoamingStatus;
+
+/**
+ * QmiNasLteCellAccessStatus:
+ * @QMI_NAS_CELL_ACCESS_STATUS_NORMAL_ONLY: Access is allowed for normal calls only.
+ * @QMI_NAS_CELL_ACCESS_STATUS_EMERGENCY_ONLY: Access is allowed for emergency calls only.
+ * @QMI_NAS_CELL_ACCESS_STATUS_NO_CALLS: Access is not allowed for any call type.
+ * @QMI_NAS_CELL_ACCESS_STATUS_ALL_CALLS: Access is allowed for all call types.
+ * @QMI_NAS_CELL_ACCESS_STATUS_UNKNOWN: Unknown.
+ *
+ * Cell access status for LTE calls.
+ *
+ * Since: 1.24
+ */
+typedef enum { /*< since=1.24 >*/
+ QMI_NAS_CELL_ACCESS_STATUS_NORMAL_ONLY = 0x00,
+ QMI_NAS_CELL_ACCESS_STATUS_EMERGENCY_ONLY = 0x01,
+ QMI_NAS_CELL_ACCESS_STATUS_NO_CALLS = 0x02,
+ QMI_NAS_CELL_ACCESS_STATUS_ALL_CALLS = 0x03,
+ QMI_NAS_CELL_ACCESS_STATUS_UNKNOWN = 0xFF,
+} QmiNasLteCellAccessStatus;
+
+/**
+ * QmiNasHdrProtocolRevision:
+ * @QMI_NAS_HDR_PROTOCOL_REVISION_NONE: None.
+ * @QMI_NAS_HDR_PROTOCOL_REVISION_REL_0: HDR Rel 0.
+ * @QMI_NAS_HDR_PROTOCOL_REVISION_REL_A: HDR Rel A.
+ * @QMI_NAS_HDR_PROTOCOL_REVISION_REL_B: HDR Rel B.
+ *
+ * HDR protocol revision.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_NAS_HDR_PROTOCOL_REVISION_NONE = 0x00,
+ QMI_NAS_HDR_PROTOCOL_REVISION_REL_0 = 0x01,
+ QMI_NAS_HDR_PROTOCOL_REVISION_REL_A = 0x02,
+ QMI_NAS_HDR_PROTOCOL_REVISION_REL_B = 0x03
+} QmiNasHdrProtocolRevision;
+
+/**
+ * QmiNasWcdmaHsService:
+ * @QMI_NAS_WCDMA_HS_SERVICE_HSDPA_HSUPA_UNSUPPORTED: HSDPA and HSUPA not supported.
+ * @QMI_NAS_WCDMA_HS_SERVICE_HSDPA_SUPPORTED: HSDPA supported.
+ * @QMI_NAS_WCDMA_HS_SERVICE_HSUPA_SUPPORTED: HSUPA supported.
+ * @QMI_NAS_WCDMA_HS_SERVICE_HSDPA_HSUPA_SUPPORTED: HSDPA and HSUPA supported.
+ * @QMI_NAS_WCDMA_HS_SERVICE_HSDPA_PLUS_SUPPORTED: HSDPA+ supported.
+ * @QMI_NAS_WCDMA_HS_SERVICE_HSDPA_PLUS_HSUPA_SUPPORTED: HSDPA+ and HSUPA supported.
+ * @QMI_NAS_WCDMA_HS_SERVICE_DC_HSDPA_PLUS_SUPPORTED: DC-HSDPA+ supported.
+ * @QMI_NAS_WCDMA_HS_SERVICE_DC_HSDPA_PLUS_HSUPA_SUPPORTED: DC-HSDPA+ and HSUPA supported.
+ *
+ * Call status on high speed.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_NAS_WCDMA_HS_SERVICE_HSDPA_HSUPA_UNSUPPORTED = 0x00,
+ QMI_NAS_WCDMA_HS_SERVICE_HSDPA_SUPPORTED = 0x01,
+ QMI_NAS_WCDMA_HS_SERVICE_HSUPA_SUPPORTED = 0x02,
+ QMI_NAS_WCDMA_HS_SERVICE_HSDPA_HSUPA_SUPPORTED = 0x03,
+ QMI_NAS_WCDMA_HS_SERVICE_HSDPA_PLUS_SUPPORTED = 0x04,
+ QMI_NAS_WCDMA_HS_SERVICE_HSDPA_PLUS_HSUPA_SUPPORTED = 0x05,
+ QMI_NAS_WCDMA_HS_SERVICE_DC_HSDPA_PLUS_SUPPORTED = 0x06,
+ QMI_NAS_WCDMA_HS_SERVICE_DC_HSDPA_PLUS_HSUPA_SUPPORTED = 0x07
+} QmiNasWcdmaHsService;
+
+/**
+ * QmiNasCellBroadcastCapability:
+ * @QMI_NAS_CELL_BROADCAST_CAPABILITY_UNKNOWN: Unknown.
+ * @QMI_NAS_CELL_BROADCAST_CAPABILITY_OFF: Cell broadcast not supported.
+ * @QMI_NAS_CELL_BROADCAST_CAPABILITY_ON: Cell broadcast supported.
+ *
+ * Cell broadcast support.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_NAS_CELL_BROADCAST_CAPABILITY_UNKNOWN = 0x00,
+ QMI_NAS_CELL_BROADCAST_CAPABILITY_OFF = 0x01,
+ QMI_NAS_CELL_BROADCAST_CAPABILITY_ON = 0x02
+} QmiNasCellBroadcastCapability;
+
+/**
+ * QmiNasSimRejectState:
+ * @QMI_NAS_SIM_REJECT_STATE_SIM_UNAVAILABLE: SIM not available.
+ * @QMI_NAS_SIM_REJECT_STATE_SIM_AVAILABLE: SIM available.
+ * @QMI_NAS_SIM_REJECT_STATE_SIM_CS_INVALID: SIM invalid for circuit-switched connections.
+ * @QMI_NAS_SIM_REJECT_STATE_SIM_PS_INVALID: SIM invalid for packet-switched connections.
+ * @QMI_NAS_SIM_REJECT_STATE_SIM_CS_PS_INVALID: SIM invalid for circuit-switched and packet-switched connections.
+ *
+ * Reject information of the SIM.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_NAS_SIM_REJECT_STATE_SIM_UNAVAILABLE = 0,
+ QMI_NAS_SIM_REJECT_STATE_SIM_AVAILABLE = 1,
+ QMI_NAS_SIM_REJECT_STATE_SIM_CS_INVALID = 2,
+ QMI_NAS_SIM_REJECT_STATE_SIM_PS_INVALID = 3,
+ QMI_NAS_SIM_REJECT_STATE_SIM_CS_PS_INVALID = 4
+} QmiNasSimRejectState;
+
+/**
+ * QmiNasCdmaPilotType:
+ * @QMI_NAS_CDMA_PILOT_TYPE_ACTIVE: the pilot is part of the active set.
+ * @QMI_NAS_CDMA_PILOT_TYPE_NEIGHBOR: the pilot is part of the neighbor set.
+ *
+ * The pilot set the pilot belongs to.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_NAS_CDMA_PILOT_TYPE_ACTIVE = 0,
+ QMI_NAS_CDMA_PILOT_TYPE_NEIGHBOR = 1,
+} QmiNasCdmaPilotType;
+
+/**
+ * QmiNasDayOfWeek:
+ * @QMI_NAS_DAY_OF_WEEK_MONDAY: Monday
+ * @QMI_NAS_DAY_OF_WEEK_TUESDAY: Tuesday
+ * @QMI_NAS_DAY_OF_WEEK_WEDNESDAY: Wednesday
+ * @QMI_NAS_DAY_OF_WEEK_THURSDAY: Thursday
+ * @QMI_NAS_DAY_OF_WEEK_FRIDAY: Friday
+ * @QMI_NAS_DAY_OF_WEEK_SATURDAY: Saturday
+ * @QMI_NAS_DAY_OF_WEEK_SUNDAY: Sunday
+ *
+ * The day of the week.
+ *
+ * Since: 1.4
+ */
+typedef enum { /*< since=1.4 >*/
+ QMI_NAS_DAY_OF_WEEK_MONDAY = 0,
+ QMI_NAS_DAY_OF_WEEK_TUESDAY = 1,
+ QMI_NAS_DAY_OF_WEEK_WEDNESDAY = 2,
+ QMI_NAS_DAY_OF_WEEK_THURSDAY = 3,
+ QMI_NAS_DAY_OF_WEEK_FRIDAY = 4,
+ QMI_NAS_DAY_OF_WEEK_SATURDAY = 5,
+ QMI_NAS_DAY_OF_WEEK_SUNDAY = 6
+} QmiNasDayOfWeek;
+
+/**
+ * QmiNasDaylightSavingsAdjustment:
+ * @QMI_NAS_DAYLIGHT_SAVINGS_ADJUSTMENT_NONE: no adjustment
+ * @QMI_NAS_DAYLIGHT_SAVINGS_ADJUSTMENT_ONE_HOUR: one hour adjustment
+ * @QMI_NAS_DAYLIGHT_SAVINGS_ADJUSTMENT_TWO_HOURS: two hours adjustment
+ *
+ * The number of hours a time is adjusted for daylight savings.
+ *
+ * Since: 1.4
+ */
+typedef enum { /*< since=1.4 >*/
+ QMI_NAS_DAYLIGHT_SAVINGS_ADJUSTMENT_NONE = 0,
+ QMI_NAS_DAYLIGHT_SAVINGS_ADJUSTMENT_ONE_HOUR = 1,
+ QMI_NAS_DAYLIGHT_SAVINGS_ADJUSTMENT_TWO_HOURS = 2
+} QmiNasDaylightSavingsAdjustment;
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI NAS Get Cell Location Info' request/response */
+
+/**
+ * QmiNasWcdmaRrcState:
+ * @QMI_NAS_WCDMA_RRC_STATE_DISCONNECTED: Disconnected.
+ * @QMI_NAS_WCDMA_RRC_STATE_CELL_PCH: WCDMA RRC state is CELL_PCH.
+ * @QMI_NAS_WCDMA_RRC_STATE_URA_PCH: WCDMA RRC state is URA_PCH.
+ * @QMI_NAS_WCDMA_RRC_STATE_CELL_FACH: WCDMA RRC state is CELL_FACH.
+ * @QMI_NAS_WCDMA_RRC_STATE_CELL_DCH: WCDMA RRC state is CELL_DCH.
+ *
+ * RRC state.
+ *
+ * Since: 1.10
+ */
+typedef enum { /*< since=1.10 >*/
+ QMI_NAS_WCDMA_RRC_STATE_DISCONNECTED = 0,
+ QMI_NAS_WCDMA_RRC_STATE_CELL_PCH = 1,
+ QMI_NAS_WCDMA_RRC_STATE_URA_PCH = 2,
+ QMI_NAS_WCDMA_RRC_STATE_CELL_FACH = 3,
+ QMI_NAS_WCDMA_RRC_STATE_CELL_DCH = 4
+} QmiNasWcdmaRrcState;
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI NAS Get LTE Cphy CA Info' request/response */
+
+/**
+ * QmiNasDLBandwidth:
+ * @QMI_NAS_DL_BANDWIDTH_1_4: 1.4 MHz
+ * @QMI_NAS_DL_BANDWIDTH_3: 3 MHz
+ * @QMI_NAS_DL_BANDWIDTH_5: 5 MHz
+ * @QMI_NAS_DL_BANDWIDTH_10: 10 MHz
+ * @QMI_NAS_DL_BANDWIDTH_15: 15 MHz
+ * @QMI_NAS_DL_BANDWIDTH_20: 20 MHz
+ * @QMI_NAS_DL_BANDWIDTH_INVALID: Invalid
+ * @QMI_NAS_DL_BANDWIDTH_UNKNOWN: Unknown
+ *
+ * DL Bandwidth.
+ *
+ * Since: 1.16
+ */
+typedef enum { /*< since=1.16 >*/
+ QMI_NAS_DL_BANDWIDTH_1_4 = 0,
+ QMI_NAS_DL_BANDWIDTH_3 = 1,
+ QMI_NAS_DL_BANDWIDTH_5 = 2,
+ QMI_NAS_DL_BANDWIDTH_10 = 3,
+ QMI_NAS_DL_BANDWIDTH_15 = 4,
+ QMI_NAS_DL_BANDWIDTH_20 = 5,
+ QMI_NAS_DL_BANDWIDTH_INVALID = 6,
+ QMI_NAS_DL_BANDWIDTH_UNKNOWN = 0xFF
+} QmiNasDLBandwidth;
+
+/**
+ * QmiNasScellState:
+ * @QMI_NAS_SCELL_STATE_DECONFIGURED: Deconfigured
+ * @QMI_NAS_SCELL_STATE_DEACTIVATED: Deactivated
+ * @QMI_NAS_SCELL_STATE_ACTIVATED: Activated
+ *
+ * SCell State.
+ *
+ * Since: 1.16
+ */
+typedef enum { /*< since=1.16 >*/
+ QMI_NAS_SCELL_STATE_DECONFIGURED = 0,
+ QMI_NAS_SCELL_STATE_DEACTIVATED = 1,
+ QMI_NAS_SCELL_STATE_ACTIVATED = 2
+} QmiNasScellState;
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI NAS Get Operator Name' request/response */
+/**
+ * QmiNasPlmnEncodingScheme:
+ * @QMI_NAS_PLMN_ENCODING_SCHEME_GSM: GSM default alphabet packed encoding (ETSI GSM 03.38)
+ * @QMI_NAS_PLMN_ENCODING_SCHEME_UCS2LE: UCS-2 little-endian
+ *
+ * PLMN name encoding schemes. See 3GPP TS 24.008 section "Network Name
+ * information element".
+ *
+ * Since: 1.18
+ */
+typedef enum { /*< since=1.18 >*/
+ QMI_NAS_PLMN_ENCODING_SCHEME_GSM = 0,
+ QMI_NAS_PLMN_ENCODING_SCHEME_UCS2LE = 1,
+} QmiNasPlmnEncodingScheme;
+
+/**
+ * QmiNasNetworkNameDisplayCondition:
+ * @QMI_NAS_NETWORK_NAME_DISPLAY_CONDITION_DISPLAY_REGISTERED_PLMN_IF_KNOWN_NETWORK: if
+ * set, display of the registered PLMN is required when the registered PLMN is either
+ * the HPLMN or a PLMN in the Service Provider PLMN List (see EFspdi). Otherwise
+ * display of the registered PLMN is not required in this case.
+ * @QMI_NAS_NETWORK_NAME_DISPLAY_CONDITION_DISPLAY_SPN_NOT_REQUIRED_IF_UNKNOWN_NETWORK: if
+ * set, display of the Service Provider Name is not required when registered PLMN is
+ * neither HPLMN nor a PLMN in the service provider PLMN list (see EFspdi). If not set,
+ * SPN display is required in this case.
+ *
+ * Flags used to control display of the PLMN name and Service Provider Name. See
+ * 3GPP TS 51.011 descripton of the EFspn SIM file for more details.
+ *
+ * Since: 1.18
+ */
+typedef enum { /*< since=1.18 >*/
+ QMI_NAS_NETWORK_NAME_DISPLAY_CONDITION_DISPLAY_REGISTERED_PLMN_IF_KNOWN_NETWORK = 1 << 0,
+ QMI_NAS_NETWORK_NAME_DISPLAY_CONDITION_DISPLAY_SPN_NOT_REQUIRED_IF_UNKNOWN_NETWORK = 1 << 1,
+} QmiNasNetworkNameDisplayCondition;
+
+/**
+ * QmiNasPlmnNameCountryInitials:
+ * @QMI_NAS_PLMN_NAME_COUNTRY_INITIALS_DO_NOT_ADD: don't add country initials
+ * @QMI_NAS_PLMN_NAME_COUNTRY_INIITALS_ADD: add country initials
+ * @QMI_NAS_PLMN_NAME_COUNTRY_INIITALS_UNSPECIFIED: unspecified
+ *
+ * PLMN name country initials options. See 3GPP TS 24.008
+ * section "Network Name information element".
+ *
+ * Since: 1.18
+ */
+typedef enum { /*< since=1.18 >*/
+ QMI_NAS_PLMN_NAME_COUNTRY_INITIALS_DO_NOT_ADD = 0,
+ QMI_NAS_PLMN_NAME_COUNTRY_INIITALS_ADD = 1,
+ QMI_NAS_PLMN_NAME_COUNTRY_INIITALS_UNSPECIFIED = 0xFF,
+} QmiNasPlmnNameCountryInitials;
+
+/**
+ * QmiNasNetworkNameSource:
+ * @QMI_NAS_NETWORK_NAME_SOURCE_UNKNOWN: Unknown.
+ * @QMI_NAS_NETWORK_NAME_SOURCE_OPERATOR_PLMN_LIST_AND_PLMN_NETWORK_NAME: Operator PLMN list and PLMN network name.
+ * @QMI_NAS_NETWORK_NAME_SOURCE_COMMON_PCN_HANDSET_SPECIFICATION_AND_OPERATOR_NAME_STRING: Common PCN handset specification and operator name string.
+ * @QMI_NAS_NETWORK_NAME_SOURCE_NITZ: Network identity and time zone.
+ * @QMI_NAS_NETWORK_NAME_SOURCE_SE13: GSMA SE13 table.
+ * @QMI_NAS_NETWORK_NAME_SOURCE_MCC_MNC: MCC and MNC.
+ * @QMI_NAS_NETWORK_NAME_SOURCE_SERVICE_PROVIDER_NAME: Service provider name.
+ *
+ * Network name source.
+ *
+ * Since: 1.24
+ */
+typedef enum { /*< since=1.24 >*/
+ QMI_NAS_NETWORK_NAME_SOURCE_UNKNOWN = 0x00,
+ QMI_NAS_NETWORK_NAME_SOURCE_OPERATOR_PLMN_LIST_AND_PLMN_NETWORK_NAME = 0x01,
+ QMI_NAS_NETWORK_NAME_SOURCE_COMMON_PCN_HANDSET_SPECIFICATION_AND_OPERATOR_NAME_STRING = 0x02,
+ QMI_NAS_NETWORK_NAME_SOURCE_NITZ = 0x03,
+ QMI_NAS_NETWORK_NAME_SOURCE_SE13 = 0x04,
+ QMI_NAS_NETWORK_NAME_SOURCE_MCC_MNC = 0x05,
+ QMI_NAS_NETWORK_NAME_SOURCE_SERVICE_PROVIDER_NAME = 0x06,
+} QmiNasNetworkNameSource;
+
+/**
+ * QmiNasPlmnNameSpareBits:
+ * @QMI_NAS_PLMN_NAME_SPARE_BITS_UNKNOWN: unknown
+ * @QMI_NAS_PLMN_NAME_SPARE_BITS_BIT_8: bit 8 is spare
+ * @QMI_NAS_PLMN_NAME_SPARE_BITS_BITS_78: bits 7 - 8 are spare
+ * @QMI_NAS_PLMN_NAME_SPARE_BITS_BITS_68: bits 6 - 8 are spare
+ * @QMI_NAS_PLMN_NAME_SPARE_BITS_BITS_58: bits 5 - 8 are spare
+ * @QMI_NAS_PLMN_NAME_SPARE_BITS_BITS_48: bits 4 - 8 are spare
+ * @QMI_NAS_PLMN_NAME_SPARE_BITS_BITS_38: bits 3 - 8 are spare
+ * @QMI_NAS_PLMN_NAME_SPARE_BITS_BITS_28: bits 2 - 8 are spare
+ *
+ * PLMN name spare bits in last octet of a network name. See 3GPP TS 24.008
+ * section "Network Name information element".
+ *
+ * Since: 1.18
+ */
+typedef enum { /*< since=1.18 >*/
+ QMI_NAS_PLMN_NAME_SPARE_BITS_UNKNOWN = 0,
+ QMI_NAS_PLMN_NAME_SPARE_BITS_BIT_8 = 1,
+ QMI_NAS_PLMN_NAME_SPARE_BITS_BITS_78 = 2,
+ QMI_NAS_PLMN_NAME_SPARE_BITS_BITS_68 = 3,
+ QMI_NAS_PLMN_NAME_SPARE_BITS_BITS_58 = 4,
+ QMI_NAS_PLMN_NAME_SPARE_BITS_BITS_48 = 5,
+ QMI_NAS_PLMN_NAME_SPARE_BITS_BITS_38 = 6,
+ QMI_NAS_PLMN_NAME_SPARE_BITS_BITS_28 = 7,
+} QmiNasPlmnNameSpareBits;
+
+/**
+ * QmiNasUsagePreference:
+ * @QMI_NAS_USAGE_PREFERENCE_UNKNOWN: Unknown.
+ * @QMI_NAS_USAGE_PREFERENCE_VOICE_CENTRIC: Voice centric.
+ * @QMI_NAS_USAGE_PREFERENCE_DATA_CENTRIC: Data centric.
+ *
+ * Modem usage preference.
+ *
+ * Since: 1.24
+ */
+typedef enum { /*< since=1.24 >*/
+ QMI_NAS_USAGE_PREFERENCE_UNKNOWN = 0x00,
+ QMI_NAS_USAGE_PREFERENCE_VOICE_CENTRIC = 0x01,
+ QMI_NAS_USAGE_PREFERENCE_DATA_CENTRIC = 0x02
+} QmiNasUsagePreference;
+
+/**
+ * QmiNasSwiModemMode:
+ * @QMI_NAS_SWI_MODEM_MODE_POWERING_OFF: Powering off
+ * @QMI_NAS_SWI_MODEM_MODE_FACTORY_TEST: Factory test
+ * @QMI_NAS_SWI_MODEM_MODE_OFFLINE: Offline
+ * @QMI_NAS_SWI_MODEM_MODE_OFFLINE_AMPS: Offline AMPS
+ * @QMI_NAS_SWI_MODEM_MODE_OFFLINE_CDMA: Offline CDMA
+ * @QMI_NAS_SWI_MODEM_MODE_ONLINE: Online
+ * @QMI_NAS_SWI_MODEM_MODE_LOW_POWER: Low power
+ * @QMI_NAS_SWI_MODEM_MODE_RESETTING: Resetting
+ * @QMI_NAS_SWI_MODEM_MODE_NETWORK_TEST: Network test
+ * @QMI_NAS_SWI_MODEM_MODE_OFFLINE_REQUEST: Offline request
+ * @QMI_NAS_SWI_MODEM_MODE_PSEUDO_ONLINE: Pseudo online
+ * @QMI_NAS_SWI_MODEM_MODE_RESETTING_MODEM: Resetting modem
+ * @QMI_NAS_SWI_MODEM_MODE_UNKNOWN: Unknown
+ *
+ * Modem mode (Sierra Wireless specific).
+ *
+ * Since: 1.24
+ */
+typedef enum { /*< since=1.24 >*/
+ QMI_NAS_SWI_MODEM_MODE_POWERING_OFF = 0x00,
+ QMI_NAS_SWI_MODEM_MODE_FACTORY_TEST = 0x01,
+ QMI_NAS_SWI_MODEM_MODE_OFFLINE = 0x02,
+ QMI_NAS_SWI_MODEM_MODE_OFFLINE_AMPS = 0x03,
+ QMI_NAS_SWI_MODEM_MODE_OFFLINE_CDMA = 0x04,
+ QMI_NAS_SWI_MODEM_MODE_ONLINE = 0x05,
+ QMI_NAS_SWI_MODEM_MODE_LOW_POWER = 0x06,
+ QMI_NAS_SWI_MODEM_MODE_RESETTING = 0x07,
+ QMI_NAS_SWI_MODEM_MODE_NETWORK_TEST = 0x08,
+ QMI_NAS_SWI_MODEM_MODE_OFFLINE_REQUEST = 0x09,
+ QMI_NAS_SWI_MODEM_MODE_PSEUDO_ONLINE = 0x0a,
+ QMI_NAS_SWI_MODEM_MODE_RESETTING_MODEM = 0x0b,
+ QMI_NAS_SWI_MODEM_MODE_UNKNOWN = 0xff
+} QmiNasSwiModemMode;
+
+/**
+ * QmiNasSwiSystemMode:
+ * @QMI_NAS_SWI_SYSTEM_MODE_NO_SERVICE: No service
+ * @QMI_NAS_SWI_SYSTEM_MODE_AMPS: AMPS
+ * @QMI_NAS_SWI_SYSTEM_MODE_CDMA: CDMA
+ * @QMI_NAS_SWI_SYSTEM_MODE_GSM: GSM
+ * @QMI_NAS_SWI_SYSTEM_MODE_HDR: HDR
+ * @QMI_NAS_SWI_SYSTEM_MODE_WCDMA: WCDMA
+ * @QMI_NAS_SWI_SYSTEM_MODE_GPS: GPS
+ * @QMI_NAS_SWI_SYSTEM_MODE_WLAN: WLAN
+ * @QMI_NAS_SWI_SYSTEM_MODE_LTE: LTE
+ * @QMI_NAS_SWI_SYSTEM_MODE_UNKNOWN: Unknown
+ *
+ * System mode (Sierra Wireless specific).
+ *
+ * Since: 1.24
+ */
+typedef enum { /*< since=1.24 >*/
+ QMI_NAS_SWI_SYSTEM_MODE_NO_SERVICE = 0x00,
+ QMI_NAS_SWI_SYSTEM_MODE_AMPS = 0x01,
+ QMI_NAS_SWI_SYSTEM_MODE_CDMA = 0x02,
+ QMI_NAS_SWI_SYSTEM_MODE_GSM = 0x03,
+ QMI_NAS_SWI_SYSTEM_MODE_HDR = 0x04,
+ QMI_NAS_SWI_SYSTEM_MODE_WCDMA = 0x05,
+ QMI_NAS_SWI_SYSTEM_MODE_GPS = 0x06,
+ QMI_NAS_SWI_SYSTEM_MODE_WLAN = 0x08,
+ QMI_NAS_SWI_SYSTEM_MODE_LTE = 0x09,
+ QMI_NAS_SWI_SYSTEM_MODE_UNKNOWN = 0xff
+} QmiNasSwiSystemMode;
+
+/**
+ * QmiNasSwiImsRegState:
+ * @QMI_NAS_SWI_IMS_REG_NO_SRV: No service
+ * @QMI_NAS_SWI_IMS_REG_IN_PROG: In prog
+ * @QMI_NAS_SWI_IMS_REG_FAILED: Failed
+ * @QMI_NAS_SWI_IMS_REG_LIMITED: Limited
+ * @QMI_NAS_SWI_IMS_REG_FULL_SRV: Full service
+ * @QMI_NAS_SWI_IMS_REG__UNKNOWN: Unknown
+ *
+ * IMS registration state. (Sierra Wireless specific).
+ *
+ * Since: 1.24
+ */
+typedef enum { /*< since=1.24 >*/
+ QMI_NAS_SWI_IMS_REG_NO_SRV = 0x00,
+ QMI_NAS_SWI_IMS_REG_IN_PROG = 0x01,
+ QMI_NAS_SWI_IMS_REG_FAILED = 0x02,
+ QMI_NAS_SWI_IMS_REG_LIMITED = 0x03,
+ QMI_NAS_SWI_IMS_REG_FULL_SRV = 0x04,
+ QMI_NAS_SWI_IMS_REG__UNKNOWN = 0xff
+} QmiNasSwiImsRegState;
+
+/**
+ * QmiNasSwiPsState:
+ * @QMI_NAS_SWI_PS_STATE_ATTACHED: Attached
+ * @QMI_NAS_SWI_PS_STATE_DETACHED: Detached
+ * @QMI_NAS_SWI_PS_STATE_UNKNOWN: Unknown
+ *
+ * PS registration state. (Sierra Wireless specific).
+ *
+ * Since: 1.24
+ */
+typedef enum { /*< since=1.24 >*/
+ QMI_NAS_SWI_PS_STATE_ATTACHED = 0x00,
+ QMI_NAS_SWI_PS_STATE_DETACHED = 0x01,
+ QMI_NAS_SWI_PS_STATE_UNKNOWN = 0xff
+} QmiNasSwiPsState;
+
+/**
+ * QmiNasSwiEmmState:
+ * @QMI_NAS_SWI_EMM_STATE_DEREGISTERED: Deregistered
+ * @QMI_NAS_SWI_EMM_STATE_REG_INITIATED: Registration initiated
+ * @QMI_NAS_SWI_EMM_STATE_REGISTERED: Registered
+ * @QMI_NAS_SWI_EMM_STATE_TAU_INITIATED: TAU initiated
+ * @QMI_NAS_SWI_EMM_STATE_SR_INITIATED: SR initiated
+ * @QMI_NAS_SWI_EMM_STATE_DEREG_INITIATED: Deregistration initiated
+ * @QMI_NAS_SWI_EMM_STATE_INVALID: Invalid
+ * @QMI_NAS_SWI_EMM_STATE_UNKNOWN: Unknown
+ *
+ * EMM registration state. (Sierra Wireless specific).
+ *
+ * Since: 1.24
+ */
+typedef enum { /*< since=1.24 >*/
+ QMI_NAS_SWI_EMM_STATE_DEREGISTERED = 0x00,
+ QMI_NAS_SWI_EMM_STATE_REG_INITIATED = 0x01,
+ QMI_NAS_SWI_EMM_STATE_REGISTERED = 0x02,
+ QMI_NAS_SWI_EMM_STATE_TAU_INITIATED = 0x03,
+ QMI_NAS_SWI_EMM_STATE_SR_INITIATED = 0x04,
+ QMI_NAS_SWI_EMM_STATE_DEREG_INITIATED = 0x05,
+ QMI_NAS_SWI_EMM_STATE_INVALID = 0x06,
+ QMI_NAS_SWI_EMM_STATE_UNKNOWN = 0xff
+} QmiNasSwiEmmState;
+
+/**
+ * QmiNasSwiEmmConnectionState:
+ * @QMI_NAS_SWI_EMM_CONN_STATE_RRC_IDLE: RRC idle
+ * @QMI_NAS_SWI_EMM_CONN_STATE_WAITING_RRC_CFM: Waiting RRC Cfm
+ * @QMI_NAS_SWI_EMM_CONN_STATE_RRC_CONNECTING: RRC connecting
+ * @QMI_NAS_SWI_EMM_CONN_STATE_RRC_RELEASING: RRC releasing
+ * @QMI_NAS_SWI_EMM_CONN_STATE_UNKNOWN: Unknown
+ *
+ * EMM connection state state. (Sierra Wireless specific).
+ *
+ * Since: 1.24
+ */
+typedef enum { /*< since=1.24 >*/
+ QMI_NAS_SWI_EMM_CONN_STATE_RRC_IDLE = 0x00,
+ QMI_NAS_SWI_EMM_CONN_STATE_WAITING_RRC_CFM = 0x01,
+ QMI_NAS_SWI_EMM_CONN_STATE_RRC_CONNECTING = 0x02,
+ QMI_NAS_SWI_EMM_CONN_STATE_RRC_RELEASING = 0x03,
+ QMI_NAS_SWI_EMM_CONN_STATE_UNKNOWN = 0xff
+} QmiNasSwiEmmConnectionState;
+
+/**
+ * QmiNasDrx:
+ * @QMI_NAS_DRX_UNKNOWN: Unknown or not specified.
+ * @QMI_NAS_DRX_CN6_T32: CN=6, T=32.
+ * @QMI_NAS_DRX_CN7_T64: CN=7, T=64.
+ * @QMI_NAS_DRX_CN8_T128: CN=8, T=128.
+ * @QMI_NAS_DRX_CN9_T256: CN=9, T=256.
+ *
+ * DRX setting of the device.
+ *
+ * Since: 1.28
+ */
+typedef enum { /*< since=1.28 >*/
+ QMI_NAS_DRX_UNKNOWN = 0x00,
+ QMI_NAS_DRX_CN6_T32 = 0x06,
+ QMI_NAS_DRX_CN7_T64 = 0x07,
+ QMI_NAS_DRX_CN8_T128 = 0x08,
+ QMI_NAS_DRX_CN9_T256 = 0x09,
+} QmiNasDrx;
+
+/**
+ * QmiNasBoolean:
+ * @QMI_NAS_BOOLEAN_FALSE: Status FALSE.
+ * @QMI_NAS_BOOLEAN_TRUE: Status TRUE.
+ * @QMI_NAS_BOOLEAN_UNKNOWN: Status Unknown.
+ *
+ * Boolean flag with validity info.
+ *
+ * Since: 1.28
+ */
+typedef enum { /*< since=1.28 >*/
+ QMI_NAS_BOOLEAN_FALSE = 0x00,
+ QMI_NAS_BOOLEAN_TRUE = 0x01,
+ QMI_NAS_BOOLEAN_UNKNOWN = 0x02
+} QmiNasBoolean;
+
+/**
+ * QmiNasPlmnLanguageId:
+ * @QMI_NAS_PLMN_LANGUAGE_ID_UNKNOWN: Language Unknown.
+ * @QMI_NAS_PLMN_LANGUAGE_ID_ZH_TRAD: Traditional Chinese.
+ * @QMI_NAS_PLMN_LANGUAGE_ID_ZH_SIMP: Simplified Chinese.
+ *
+ * Language ID used when encoding the PLMN.
+ *
+ * Since: 1.28
+ */
+typedef enum { /*< since=1.28 >*/
+ QMI_NAS_PLMN_LANGUAGE_ID_UNKNOWN = 0x00,
+ QMI_NAS_PLMN_LANGUAGE_ID_ZH_TRAD = 0x01,
+ QMI_NAS_PLMN_LANGUAGE_ID_ZH_SIMP = 0x02
+} QmiNasPlmnLanguageId;
+
+/**
+ * QmiNasLteVoiceDomain:
+ * @QMI_NAS_LTE_VOICE_DOMAIN_NONE: No voice.
+ * @QMI_NAS_LTE_VOICE_DOMAIN_IMS: Voice is supported over IMS network.
+ * @QMI_NAS_LTE_VOICE_DOMAIN_1X: Voice is supported over the 1X network.
+ * @QMI_NAS_LTE_VOICE_DOMAIN_3GPP: Voice is supported over the 3GPP network.
+ *
+ * LTE voice domain.
+ *
+ * Since: 1.28
+ */
+typedef enum { /*< since=1.28 >*/
+ QMI_NAS_LTE_VOICE_DOMAIN_NONE = 0x00,
+ QMI_NAS_LTE_VOICE_DOMAIN_IMS = 0x01,
+ QMI_NAS_LTE_VOICE_DOMAIN_1X = 0x02,
+ QMI_NAS_LTE_VOICE_DOMAIN_3GPP = 0x03
+} QmiNasLteVoiceDomain;
+
+/**
+ * QmiNasRejectCause:
+ * @QMI_NAS_REJECT_CAUSE_NONE: None.
+ * @QMI_NAS_REJECT_CAUSE_IMSI_UNKNOWN_IN_HLR: IMSI unknown in HLR/HSS.
+ * @QMI_NAS_REJECT_CAUSE_ILLEGAL_UE: Illegal MS/UE.
+ * @QMI_NAS_REJECT_CAUSE_IMSI_UNKNOWN_IN_VLR: IMSI unknown in VLR.
+ * @QMI_NAS_REJECT_CAUSE_IMEI_NOT_ACCEPTED: IMEI not accepted.
+ * @QMI_NAS_REJECT_CAUSE_ILLEGAL_ME: Illegal ME.
+ * @QMI_NAS_REJECT_CAUSE_PS_SERVICES_NOT_ALLOWED: GPRS/EPS services not allowed.
+ * @QMI_NAS_REJECT_CAUSE_PS_AND_NON_PS_SERVICES_NOT_ALLOWED: GPRS/EPS and non-GPRS/EPS services not allowed.
+ * @QMI_NAS_REJECT_CAUSE_UE_IDENTITY_NOT_DERIVED_BY_NETWORK: MS/UE identity not derived by network.
+ * @QMI_NAS_REJECT_CAUSE_IMPLICITLY_DETACHED: Implicitly detached.
+ * @QMI_NAS_REJECT_CAUSE_PLMN_NOT_ALLOWED: PLMN not allowed.
+ * @QMI_NAS_REJECT_CAUSE_LOCATION_AREA_NOT_ALLOWED: Location/tracking area not allowed.
+ * @QMI_NAS_REJECT_CAUSE_ROAMING_IN_LOCATION_AREA_NOT_ALLOWED: Roaming in location/tracking area not allowed.
+ * @QMI_NAS_REJECT_CAUSE_PS_SERVICES_IN_LOCATION_AREA_NOT_ALLOWED: GPRS/EPS services in location/tracking area not allowed.
+ * @QMI_NAS_REJECT_CAUSE_NO_SUITABLE_CELLS_IN_LOCATION_AREA: No suitable cells in location/tracking area.
+ * @QMI_NAS_REJECT_CAUSE_MSC_TEMPORARILY_NOT_REACHABLE: MSC temporarily not reachable.
+ * @QMI_NAS_REJECT_CAUSE_NETWORK_FAILURE: Network failure.
+ * @QMI_NAS_REJECT_CAUSE_CS_DOMAIN_NOT_AVAILABLE: CS domain not available.
+ * @QMI_NAS_REJECT_CAUSE_ESM_FAILURE: ESM failure.
+ * @QMI_NAS_REJECT_CAUSE_MAC_FAILURE: MAC failure.
+ * @QMI_NAS_REJECT_CAUSE_SYNCH_FAILURE: Synch failure.
+ * @QMI_NAS_REJECT_CAUSE_CONGESTION: Congestion.
+ * @QMI_NAS_REJECT_CAUSE_UE_SECURITY_CAPABILITIES_MISMATCH: GSM authentication unacceptable, UE security capabilities mismatch.
+ * @QMI_NAS_REJECT_CAUSE_SECURITY_MODE_REJECTED_UNSPECIFIED: Security mode rejected or unspecified.
+ * @QMI_NAS_REJECT_CAUSE_CSG_NOT_AUTHORIZED: CSG not authorized.
+ * @QMI_NAS_REJECT_CAUSE_NON_EPS_AUTHENTICATION_UNACCEPTABLE: Non-EPS authentication unacceptable.
+ * @QMI_NAS_REJECT_CAUSE_SMS_PROVIDED_BY_GPRS_IN_ROUTING_AREA: SMS provided by GPRS in routing area.
+ * @QMI_NAS_REJECT_CAUSE_REDIRECTION_TO_5GCN_REQUIRED: Redirection to 5GCN required.
+ * @QMI_NAS_REJECT_CAUSE_SERVICE_OPTION_NOT_SUPPORTED: Service option not supported.
+ * @QMI_NAS_REJECT_CAUSE_REQUESTED_SERVICE_OPTION_NOT_SUBSCRIBED: Requested service option not subscribed.
+ * @QMI_NAS_REJECT_CAUSE_SERVICE_OPTION_TEMPORARILY_OUT_OF_ORDER: Service option temporarily out of order.
+ * @QMI_NAS_REJECT_CAUSE_REQUESTED_SERVICE_OPTION_NOT_AUTHORIZED: Requested service option not authorized.
+ * @QMI_NAS_REJECT_CAUSE_CALL_CANNOT_BE_IDENTIFIED: Call cannot be identified.
+ * @QMI_NAS_REJECT_CAUSE_CS_SERVICE_TEMPORARILY_NOT_AVAILABLE: CS service temporarily not available.
+ * @QMI_NAS_REJECT_CAUSE_NO_EPS_BEARER_CONTEXT_ACTIVATED: No EPS bearer context activated.
+ * @QMI_NAS_REJECT_CAUSE_SEVERE_NETWORK_FAILURE: Severe network failure.
+ * @QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_0: Retry upon entry 0.
+ * @QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_1: Retry upon entry 1.
+ * @QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_2: Retry upon entry 2.
+ * @QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_3: Retry upon entry 3.
+ * @QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_4: Retry upon entry 4.
+ * @QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_5: Retry upon entry 5.
+ * @QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_6: Retry upon entry 6.
+ * @QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_7: Retry upon entry 7.
+ * @QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_8: Retry upon entry 8.
+ * @QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_9: Retry upon entry 9.
+ * @QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_10: Retry upon entry 10.
+ * @QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_11: Retry upon entry 11.
+ * @QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_12: Retry upon entry 12.
+ * @QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_13: Retry upon entry 13.
+ * @QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_14: Retry upon entry 14.
+ * @QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_15: Retry upon entry 15.
+ * @QMI_NAS_REJECT_CAUSE_SEMANTICALLY_INCORRECT_MESSAGE: Semantically incorrect message.
+ * @QMI_NAS_REJECT_CAUSE_INVALID_MANDATORY_INFORMATION: Invalid mandatory information.
+ * @QMI_NAS_REJECT_CAUSE_MESSAGE_TYPE_NON_EXISTENT: Message type non existent.
+ * @QMI_NAS_REJECT_CAUSE_MESSAGE_TYPE_NOT_COMPATIBLE: Message type not compatible.
+ * @QMI_NAS_REJECT_CAUSE_INFORMATION_ELEMENT_NON_EXISTENT: Information element non existent.
+ * @QMI_NAS_REJECT_CAUSE_CONDITIONAL_INFORMATION_ELEMENT_ERROR: Conditional information element error.
+ * @QMI_NAS_REJECT_CAUSE_MESSAGE_NOT_COMPATIBLE: Message not compatible.
+ * @QMI_NAS_REJECT_CAUSE_UNSPECIFIED_PROTOCOL_ERROR: Unspecified protocol error.
+ *
+ * Reason why a request from the mobile station is rejected by the network.
+ *
+ * Defined in 3GPP TS 24.008 in sections 10.5.3.6 and 10.5.5.14 (detailed in
+ * annex G) and in 3GPP TS 24.301 in section 9.9.3.9.
+ *
+ * Since: 1.30
+ */
+typedef enum { /*< since=1.30 >*/
+ QMI_NAS_REJECT_CAUSE_NONE = 0x00,
+ QMI_NAS_REJECT_CAUSE_IMSI_UNKNOWN_IN_HLR = 0x02,
+ QMI_NAS_REJECT_CAUSE_ILLEGAL_UE = 0x03,
+ QMI_NAS_REJECT_CAUSE_IMSI_UNKNOWN_IN_VLR = 0x04,
+ QMI_NAS_REJECT_CAUSE_IMEI_NOT_ACCEPTED = 0x05,
+ QMI_NAS_REJECT_CAUSE_ILLEGAL_ME = 0x06,
+ QMI_NAS_REJECT_CAUSE_PS_SERVICES_NOT_ALLOWED = 0x07,
+ QMI_NAS_REJECT_CAUSE_PS_AND_NON_PS_SERVICES_NOT_ALLOWED = 0x08,
+ QMI_NAS_REJECT_CAUSE_UE_IDENTITY_NOT_DERIVED_BY_NETWORK = 0x09,
+ QMI_NAS_REJECT_CAUSE_IMPLICITLY_DETACHED = 0x0A,
+ QMI_NAS_REJECT_CAUSE_PLMN_NOT_ALLOWED = 0x0B,
+ QMI_NAS_REJECT_CAUSE_LOCATION_AREA_NOT_ALLOWED = 0x0C,
+ QMI_NAS_REJECT_CAUSE_ROAMING_IN_LOCATION_AREA_NOT_ALLOWED = 0x0D,
+ QMI_NAS_REJECT_CAUSE_PS_SERVICES_IN_LOCATION_AREA_NOT_ALLOWED = 0x0E,
+ QMI_NAS_REJECT_CAUSE_NO_SUITABLE_CELLS_IN_LOCATION_AREA = 0x0F,
+ QMI_NAS_REJECT_CAUSE_MSC_TEMPORARILY_NOT_REACHABLE = 0x10,
+ QMI_NAS_REJECT_CAUSE_NETWORK_FAILURE = 0x11,
+ QMI_NAS_REJECT_CAUSE_CS_DOMAIN_NOT_AVAILABLE = 0x12,
+ QMI_NAS_REJECT_CAUSE_ESM_FAILURE = 0x13,
+ QMI_NAS_REJECT_CAUSE_MAC_FAILURE = 0x14,
+ QMI_NAS_REJECT_CAUSE_SYNCH_FAILURE = 0x15,
+ QMI_NAS_REJECT_CAUSE_CONGESTION = 0x16,
+ QMI_NAS_REJECT_CAUSE_UE_SECURITY_CAPABILITIES_MISMATCH = 0x17,
+ QMI_NAS_REJECT_CAUSE_SECURITY_MODE_REJECTED_UNSPECIFIED = 0x18,
+ QMI_NAS_REJECT_CAUSE_CSG_NOT_AUTHORIZED = 0x19,
+ QMI_NAS_REJECT_CAUSE_NON_EPS_AUTHENTICATION_UNACCEPTABLE = 0x1A,
+ QMI_NAS_REJECT_CAUSE_SMS_PROVIDED_BY_GPRS_IN_ROUTING_AREA = 0x1C,
+ QMI_NAS_REJECT_CAUSE_REDIRECTION_TO_5GCN_REQUIRED = 0x1F,
+ QMI_NAS_REJECT_CAUSE_SERVICE_OPTION_NOT_SUPPORTED = 0x20,
+ QMI_NAS_REJECT_CAUSE_REQUESTED_SERVICE_OPTION_NOT_SUBSCRIBED = 0x21,
+ QMI_NAS_REJECT_CAUSE_SERVICE_OPTION_TEMPORARILY_OUT_OF_ORDER = 0x22,
+ QMI_NAS_REJECT_CAUSE_REQUESTED_SERVICE_OPTION_NOT_AUTHORIZED = 0x23,
+ QMI_NAS_REJECT_CAUSE_CALL_CANNOT_BE_IDENTIFIED = 0x26,
+ QMI_NAS_REJECT_CAUSE_CS_SERVICE_TEMPORARILY_NOT_AVAILABLE = 0x27,
+ QMI_NAS_REJECT_CAUSE_NO_EPS_BEARER_CONTEXT_ACTIVATED = 0x28,
+ QMI_NAS_REJECT_CAUSE_SEVERE_NETWORK_FAILURE = 0x2A,
+ QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_0 = 0x30,
+ QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_1 = 0x31,
+ QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_2 = 0x32,
+ QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_3 = 0x33,
+ QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_4 = 0x34,
+ QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_5 = 0x35,
+ QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_6 = 0x36,
+ QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_7 = 0x37,
+ QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_8 = 0x38,
+ QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_9 = 0x39,
+ QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_10 = 0x3A,
+ QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_11 = 0x3B,
+ QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_12 = 0x3C,
+ QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_13 = 0x3D,
+ QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_14 = 0x3E,
+ QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_15 = 0x3F,
+ QMI_NAS_REJECT_CAUSE_SEMANTICALLY_INCORRECT_MESSAGE = 0x5F,
+ QMI_NAS_REJECT_CAUSE_INVALID_MANDATORY_INFORMATION = 0x60,
+ QMI_NAS_REJECT_CAUSE_MESSAGE_TYPE_NON_EXISTENT = 0x61,
+ QMI_NAS_REJECT_CAUSE_MESSAGE_TYPE_NOT_COMPATIBLE = 0x62,
+ QMI_NAS_REJECT_CAUSE_INFORMATION_ELEMENT_NON_EXISTENT = 0x63,
+ QMI_NAS_REJECT_CAUSE_CONDITIONAL_INFORMATION_ELEMENT_ERROR = 0x64,
+ QMI_NAS_REJECT_CAUSE_MESSAGE_NOT_COMPATIBLE = 0x65,
+ QMI_NAS_REJECT_CAUSE_UNSPECIFIED_PROTOCOL_ERROR = 0x6F,
+} QmiNasRejectCause;
+
+#endif /* _LIBQMI_GLIB_QMI_ENUMS_NAS_H_ */
--- /dev/null
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * uqmi -- tiny QMI support implementation
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2012 Google Inc.
+ * Copyright (C) 2012-2017 Aleksander Morgado <aleksander@aleksander.es>
+ */
+
+#ifndef _LIBQMI_GLIB_QMI_ENUMS_PDS_H_
+#define _LIBQMI_GLIB_QMI_ENUMS_PDS_H_
+
+/**
+ * SECTION: qmi-enums-pds
+ *
+ * This section defines enumerations and flags used in the PDS service
+ * interface.
+ */
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI PDS Event Report' indication */
+
+/**
+ * QmiPdsOperationMode:
+ * @QMI_PDS_OPERATION_MODE_UNKNOWN: Unknown (position not fixed yet).
+ * @QMI_PDS_OPERATION_MODE_STANDALONE: Standalone.
+ * @QMI_PDS_OPERATION_MODE_MS_BASED: Mobile Station Based (MSB) A-GPS.
+ * @QMI_PDS_OPERATION_MODE_MS_ASSISTED: Mobile Station Assisted (MSA) A-GPS.
+ *
+ * Operation mode used to compute the position.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_PDS_OPERATION_MODE_UNKNOWN = -1,
+ QMI_PDS_OPERATION_MODE_STANDALONE = 0,
+ QMI_PDS_OPERATION_MODE_MS_BASED = 1,
+ QMI_PDS_OPERATION_MODE_MS_ASSISTED = 2
+} QmiPdsOperationMode;
+
+/**
+ * QmiPdsPositionSessionStatus:
+ * @QMI_PDS_POSITION_SESSION_STATUS_SUCCESS: Success.
+ * @QMI_PDS_POSITION_SESSION_STATUS_IN_PROGRESS: In progress.
+ * @QMI_PDS_POSITION_SESSION_STATUS_GENERAL_FAILURE: General failure.
+ * @QMI_PDS_POSITION_SESSION_STATUS_TIMEOUT: Timeout.
+ * @QMI_PDS_POSITION_SESSION_STATUS_USER_ENDED_SESSION: User ended session.
+ * @QMI_PDS_POSITION_SESSION_STATUS_BAD_PARAMETER: Bad parameter.
+ * @QMI_PDS_POSITION_SESSION_STATUS_PHONE_OFFLINE: Phone is offline.
+ * @QMI_PDS_POSITION_SESSION_STATUS_ENGINE_LOCKED: Engine locked.
+ * @QMI_PDS_POSITION_SESSION_STATUS_E911_SESSION_IN_PROGRESS: Emergency call in progress.
+ *
+ * Status of the positioning session.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_PDS_POSITION_SESSION_STATUS_SUCCESS = 0x00,
+ QMI_PDS_POSITION_SESSION_STATUS_IN_PROGRESS = 0x01,
+ QMI_PDS_POSITION_SESSION_STATUS_GENERAL_FAILURE = 0x02,
+ QMI_PDS_POSITION_SESSION_STATUS_TIMEOUT = 0x03,
+ QMI_PDS_POSITION_SESSION_STATUS_USER_ENDED_SESSION = 0x04,
+ QMI_PDS_POSITION_SESSION_STATUS_BAD_PARAMETER = 0x05,
+ QMI_PDS_POSITION_SESSION_STATUS_PHONE_OFFLINE = 0x06,
+ QMI_PDS_POSITION_SESSION_STATUS_ENGINE_LOCKED = 0x07,
+ QMI_PDS_POSITION_SESSION_STATUS_E911_SESSION_IN_PROGRESS = 0x08
+} QmiPdsPositionSessionStatus;
+
+/**
+ * QmiPdsDataValid:
+ * @QMI_PDS_DATA_VALID_TIMESTAMP_CALENDAR: Timestamp calendar (GPS time).
+ * @QMI_PDS_DATA_VALID_TIMESTAMP_UTC: Timestamp (UTC).
+ * @QMI_PDS_DATA_VALID_LEAP_SECONDS: Leap seconds.
+ * @QMI_PDS_DATA_VALID_TIME_UNCERTAINTY: Time uncertainty.
+ * @QMI_PDS_DATA_VALID_LATITUDE: Latitude.
+ * @QMI_PDS_DATA_VALID_LONGITUDE: Longitude.
+ * @QMI_PDS_DATA_VALID_ELLIPSOID_ALTITUDE: Ellipsoid altitude.
+ * @QMI_PDS_DATA_VALID_MEAN_SEA_LEVEL_ALTITUDE: Mean sea level altitude.
+ * @QMI_PDS_DATA_VALID_HORIZONTAL_SPEED: Horizontal speed.
+ * @QMI_PDS_DATA_VALID_VERTICAL_SPEED: Vertical speed.
+ * @QMI_PDS_DATA_VALID_HEADING: Heading.
+ * @QMI_PDS_DATA_VALID_HORIZONTAL_UNCERTAINTY_CIRCULAR: Horizontal uncertainty circular.
+ * @QMI_PDS_DATA_VALID_HORIZONTAL_UNCERTAINTY_ELLIPSE_SEMI_MAJOR: Horizontal uncertainty ellipse semi-major.
+ * @QMI_PDS_DATA_VALID_HORIZONTAL_UNCERTAINTY_ELLIPSE_SEMI_MINOR: Horizontal uncertainty ellipse semi-minor.
+ * @QMI_PDS_DATA_VALID_HORIZONTAL_UNCERTAINTY_ELLIPSE_ORIENT_AZIMUTH: Horizontal uncertainty ellipse orient azimuth.
+ * @QMI_PDS_DATA_VALID_VERTICAL_UNCERTAINTY: Vertical uncertainty.
+ * @QMI_PDS_DATA_VALID_HORIZONTAL_VELOCITY_UNCERTAINTY: Horizontal velocity uncertainty.
+ * @QMI_PDS_DATA_VALID_VERTICAL_VELOCITY_UNCERTAINTY: Vertical velocity uncertainty.
+ * @QMI_PDS_DATA_VALID_HORIZONTAL_CONFIDENCE: Horizontal confidence.
+ * @QMI_PDS_DATA_VALID_POSITION_DOP: Position dillution of precision.
+ * @QMI_PDS_DATA_VALID_HORIZONTAL_DOP: Horizontal dillution of precision.
+ * @QMI_PDS_DATA_VALID_VERTICAL_DOP: Vertical dillution of precision.
+ * @QMI_PDS_DATA_VALID_OPERATING_MODE: Operating mode.
+ *
+ * Flags to indicate which position data parameters are valid.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_PDS_DATA_VALID_TIMESTAMP_CALENDAR = 1 << 0,
+ QMI_PDS_DATA_VALID_TIMESTAMP_UTC = 1 << 1,
+ QMI_PDS_DATA_VALID_LEAP_SECONDS = 1 << 2,
+ QMI_PDS_DATA_VALID_TIME_UNCERTAINTY = 1 << 3,
+ QMI_PDS_DATA_VALID_LATITUDE = 1 << 4,
+ QMI_PDS_DATA_VALID_LONGITUDE = 1 << 5,
+ QMI_PDS_DATA_VALID_ELLIPSOID_ALTITUDE = 1 << 6,
+ QMI_PDS_DATA_VALID_MEAN_SEA_LEVEL_ALTITUDE = 1 << 7,
+ QMI_PDS_DATA_VALID_HORIZONTAL_SPEED = 1 << 8,
+ QMI_PDS_DATA_VALID_VERTICAL_SPEED = 1 << 9,
+ QMI_PDS_DATA_VALID_HEADING = 1 << 10,
+ QMI_PDS_DATA_VALID_HORIZONTAL_UNCERTAINTY_CIRCULAR = 1 << 11,
+ QMI_PDS_DATA_VALID_HORIZONTAL_UNCERTAINTY_ELLIPSE_SEMI_MAJOR = 1 << 12,
+ QMI_PDS_DATA_VALID_HORIZONTAL_UNCERTAINTY_ELLIPSE_SEMI_MINOR = 1 << 13,
+ QMI_PDS_DATA_VALID_HORIZONTAL_UNCERTAINTY_ELLIPSE_ORIENT_AZIMUTH = 1 << 14,
+ QMI_PDS_DATA_VALID_VERTICAL_UNCERTAINTY = 1 << 15,
+ QMI_PDS_DATA_VALID_HORIZONTAL_VELOCITY_UNCERTAINTY = 1 << 16,
+ QMI_PDS_DATA_VALID_VERTICAL_VELOCITY_UNCERTAINTY = 1 << 17,
+ QMI_PDS_DATA_VALID_HORIZONTAL_CONFIDENCE = 1 << 18,
+ QMI_PDS_DATA_VALID_POSITION_DOP = 1 << 19,
+ QMI_PDS_DATA_VALID_HORIZONTAL_DOP = 1 << 20,
+ QMI_PDS_DATA_VALID_VERTICAL_DOP = 1 << 21,
+ QMI_PDS_DATA_VALID_OPERATING_MODE = 1 << 22
+} QmiPdsDataValid;
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI PDS Get GPS Service State' request/response */
+
+/**
+ * QmiPdsTrackingSessionState:
+ * @QMI_PDS_TRACKING_SESSION_STATE_UNKNOWN: Unknown state.
+ * @QMI_PDS_TRACKING_SESSION_STATE_INACTIVE: Session inactive.
+ * @QMI_PDS_TRACKING_SESSION_STATE_ACTIVE: Session active.
+ *
+ * State of the tracking session.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_PDS_TRACKING_SESSION_STATE_UNKNOWN = 0,
+ QMI_PDS_TRACKING_SESSION_STATE_INACTIVE = 1,
+ QMI_PDS_TRACKING_SESSION_STATE_ACTIVE = 2
+} QmiPdsTrackingSessionState;
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI PDS Get Default Tracking Session' request/response */
+
+/**
+ * QmiPdsOperatingMode:
+ * @QMI_PDS_OPERATING_MODE_STANDALONE: Standalone (GPS only).
+ * @QMI_PDS_OPERATING_MODE_MS_BASED: Mobile Station Based (MSB) A-GPS
+ * @QMI_PDS_OPERATING_MODE_MS_ASSISTED: Mobile Station Assisted (MSA) A-GPS.
+ *
+ * GPS operating mode.
+ *
+ * Since: 1.12
+ */
+typedef enum { /*< since=1.12 >*/
+ QMI_PDS_OPERATING_MODE_STANDALONE = 0,
+ QMI_PDS_OPERATING_MODE_MS_BASED = 1,
+ QMI_PDS_OPERATING_MODE_MS_ASSISTED = 2,
+} QmiPdsOperatingMode;
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI PDS Get AGPS Config' request/response */
+
+/**
+ * QmiPdsNetworkMode:
+ * @QMI_PDS_NETWORK_MODE_UMTS: UMTS.
+ * @QMI_PDS_NETWORK_MODE_CDMA: CDMA.
+ *
+ * Network mode used during the A-GPS setup.
+ *
+ * Since: 1.12
+ */
+typedef enum { /*< since=1.12 >*/
+ QMI_PDS_NETWORK_MODE_UMTS = 0,
+ QMI_PDS_NETWORK_MODE_CDMA = 1,
+} QmiPdsNetworkMode;
+
+#endif /* _LIBQMI_GLIB_QMI_ENUMS_PDS_H_ */
--- /dev/null
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * uqmi -- tiny QMI support implementation
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2012 Google Inc.
+ * Copyright (C) 2012-2017 Aleksander Morgado <aleksander@aleksander.es>
+ */
+
+#ifndef _LIBQMI_GLIB_QMI_ENUMS_PRIVATE_H_
+#define _LIBQMI_GLIB_QMI_ENUMS_PRIVATE_H_
+
+/*****************************************************************************/
+/* QMI Control */
+
+/**
+ * QmiCtlDataFormat:
+ * @QMI_CTL_DATA_FORMAT_QOS_FLOW_HEADER_ABSENT: QoS header absent
+ * @QMI_CTL_DATA_FORMAT_QOS_FLOW_HEADER_PRESENT: QoS header present
+ *
+ * Controls whether the network port data format includes a QoS header or not.
+ * Should normally be set to ABSENT.
+ */
+typedef enum {
+ QMI_CTL_DATA_FORMAT_QOS_FLOW_HEADER_ABSENT = 0,
+ QMI_CTL_DATA_FORMAT_QOS_FLOW_HEADER_PRESENT = 1,
+} QmiCtlDataFormat;
+
+/**
+ * QmiCtlDataLinkProtocol:
+ * @QMI_CTL_DATA_LINK_PROTOCOL_802_3: data frames formatted as 802.3 Ethernet
+ * @QMI_CTL_DATA_LINK_PROTOCOL_RAW_IP: data frames are raw IP packets
+ *
+ * Determines the network port data format.
+ */
+typedef enum {
+ QMI_CTL_DATA_LINK_PROTOCOL_UNKNOWN = 0,
+ QMI_CTL_DATA_LINK_PROTOCOL_802_3 = 1,
+ QMI_CTL_DATA_LINK_PROTOCOL_RAW_IP = 2,
+} QmiCtlDataLinkProtocol;
+
+/**
+ * QmiCtlFlag:
+ * @QMI_CTL_FLAG_NONE: None.
+ * @QMI_CTL_FLAG_RESPONSE: Message is a response.
+ * @QMI_CTL_FLAG_INDICATION: Message is an indication.
+ *
+ * QMI flags in messages of the %QMI_SERVICE_CTL service.
+ */
+typedef enum {
+ QMI_CTL_FLAG_NONE = 0,
+ QMI_CTL_FLAG_RESPONSE = 1 << 0,
+ QMI_CTL_FLAG_INDICATION = 1 << 1
+} QmiCtlFlag;
+
+/**
+ * QmiServiceFlag:
+ * @QMI_SERVICE_FLAG_NONE: None.
+ * @QMI_SERVICE_FLAG_COMPOUND: Message is compound.
+ * @QMI_SERVICE_FLAG_RESPONSE: Message is a response.
+ * @QMI_SERVICE_FLAG_INDICATION: Message is an indication.
+ *
+ * QMI flags in messages which are not of the %QMI_SERVICE_CTL service.
+ */
+typedef enum {
+ QMI_SERVICE_FLAG_NONE = 0,
+ QMI_SERVICE_FLAG_COMPOUND = 1 << 0,
+ QMI_SERVICE_FLAG_RESPONSE = 1 << 1,
+ QMI_SERVICE_FLAG_INDICATION = 1 << 2
+} QmiServiceFlag;
+
+
+
+#endif /* _LIBQMI_GLIB_QMI_ENUMS_PRIVATE_H_ */
--- /dev/null
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * libqmi-glib -- GLib/GIO based library to control QMI devices
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2012 Google Inc.
+ * Copyright (C) 2012-2017 Aleksander Morgado <aleksander@aleksander.es>
+ */
+
+#ifndef _LIBQMI_GLIB_QMI_ENUMS_UIM_H_
+#define _LIBQMI_GLIB_QMI_ENUMS_UIM_H_
+
+/**
+ * SECTION: qmi-enums-uim
+ *
+ * This section defines enumerations and flags used in the UIM service
+ * interface.
+ */
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI UIM Indication Register' indication */
+
+/**
+ * QmiUimEventRegistrationFlag:
+ * @QMI_UIM_EVENT_REGISTRATION_FLAG_CARD_STATUS: Card status.
+ * @QMI_UIM_EVENT_REGISTRATION_FLAG_SAP_CONNECTION: SAP connection.
+ * @QMI_UIM_EVENT_REGISTRATION_FLAG_EXTENDED_CARD_STATUS: Extended card status.
+ * @QMI_UIM_EVENT_REGISTRATION_FLAG_PHYSICAL_SLOT_STATUS: Physical slot status. Since 1.26.
+ *
+ * Flags to use to register to UIM indications.
+ *
+ * Since: 1.22.4
+ */
+typedef enum { /*< since=1.22.4 >*/
+ QMI_UIM_EVENT_REGISTRATION_FLAG_CARD_STATUS = 1 << 0,
+ QMI_UIM_EVENT_REGISTRATION_FLAG_SAP_CONNECTION = 1 << 1,
+ QMI_UIM_EVENT_REGISTRATION_FLAG_EXTENDED_CARD_STATUS = 1 << 2,
+ QMI_UIM_EVENT_REGISTRATION_FLAG_PHYSICAL_SLOT_STATUS = 1 << 4,
+} QmiUimEventRegistrationFlag;
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI UIM Read Record' request/response */
+
+/**
+ * QmiUimSessionType:
+ * @QMI_UIM_SESSION_TYPE_PRIMARY_GW_PROVISIONING: Primary GSM/WCDMA provisioning.
+ * @QMI_UIM_SESSION_TYPE_PRIMARY_1X_PROVISIONING: Primary CDMA1x provisioning.
+ * @QMI_UIM_SESSION_TYPE_SECONDARY_GW_PROVISIONING: Secondary GSM/WCDMA provisioning.
+ * @QMI_UIM_SESSION_TYPE_SECONDARY_1X_PROVISIONING: Secondary CDMA1x provisioning.
+ * @QMI_UIM_SESSION_TYPE_NONPROVISIONING_SLOT_1: Nonprovisioning on slot 1.
+ * @QMI_UIM_SESSION_TYPE_NONPROVISIONING_SLOT_2: Nonprovisioning on slot 2.
+ * @QMI_UIM_SESSION_TYPE_CARD_SLOT_1: Card on slot 1.
+ * @QMI_UIM_SESSION_TYPE_CARD_SLOT_2: Card on slot 2.
+ * @QMI_UIM_SESSION_TYPE_LOGICAL_CHANNEL_SLOT_1: Logical channel on slot 1.
+ * @QMI_UIM_SESSION_TYPE_LOGICAL_CHANNEL_SLOT_2: Logical channel on slot 2.
+ * @QMI_UIM_SESSION_TYPE_TERTIARY_GW_PROVISIONING: Tertiary GSM/WCDMA provisioning. Since 1.28.
+ * @QMI_UIM_SESSION_TYPE_TERTIARY_1X_PROVISIONING: Tertiary CDMA1x provisioning. Since 1.28.
+ * @QMI_UIM_SESSION_TYPE_QUATERNARY_GW_PROVISIONING: Quaternary GSM/WCDMA provisioning. Since 1.28.
+ * @QMI_UIM_SESSION_TYPE_QUATERNARY_1X_PROVISIONING: Quaternary CDMA1x provisioning. Since 1.28.
+ * @QMI_UIM_SESSION_TYPE_QUINARY_GW_PROVISIONING: Quinary GSM/WCDMA provisioning. Since 1.28.
+ * @QMI_UIM_SESSION_TYPE_QUINARY_1X_PROVISIONING: Quinary CDMA1x provisioning. Since 1.28.
+ * @QMI_UIM_SESSION_TYPE_NONPROVISIONING_SLOT_3: Nonprovisioning on slot 3. Since 1.28.
+ * @QMI_UIM_SESSION_TYPE_NONPROVISIONING_SLOT_4: Nonprovisioning on slot 4. Since 1.28.
+ * @QMI_UIM_SESSION_TYPE_NONPROVISIONING_SLOT_5: Nonprovisioning on slot 5. Since 1.28.
+ * @QMI_UIM_SESSION_TYPE_CARD_SLOT_3: Card on slot 3. Since 1.28.
+ * @QMI_UIM_SESSION_TYPE_CARD_SLOT_4: Card on slot 4. Since 1.28.
+ * @QMI_UIM_SESSION_TYPE_CARD_SLOT_5: Card on slot 5. Since 1.28.
+ * @QMI_UIM_SESSION_TYPE_LOGICAL_CHANNEL_SLOT_3: Logical channel on slot 3. Since 1.28.
+ * @QMI_UIM_SESSION_TYPE_LOGICAL_CHANNEL_SLOT_4: Logical channel on slot 4. Since 1.28.
+ * @QMI_UIM_SESSION_TYPE_LOGICAL_CHANNEL_SLOT_5: Logical channel on slot 5. Since 1.28.
+ *
+ * Type of UIM session.
+ *
+ * Since: 1.6
+ */
+typedef enum { /*< since=1.6 >*/
+ QMI_UIM_SESSION_TYPE_PRIMARY_GW_PROVISIONING = 0,
+ QMI_UIM_SESSION_TYPE_PRIMARY_1X_PROVISIONING = 1,
+ QMI_UIM_SESSION_TYPE_SECONDARY_GW_PROVISIONING = 2,
+ QMI_UIM_SESSION_TYPE_SECONDARY_1X_PROVISIONING = 3,
+ QMI_UIM_SESSION_TYPE_NONPROVISIONING_SLOT_1 = 4,
+ QMI_UIM_SESSION_TYPE_NONPROVISIONING_SLOT_2 = 5,
+ QMI_UIM_SESSION_TYPE_CARD_SLOT_1 = 6,
+ QMI_UIM_SESSION_TYPE_CARD_SLOT_2 = 7,
+ QMI_UIM_SESSION_TYPE_LOGICAL_CHANNEL_SLOT_1 = 8,
+ QMI_UIM_SESSION_TYPE_LOGICAL_CHANNEL_SLOT_2 = 9,
+ QMI_UIM_SESSION_TYPE_TERTIARY_GW_PROVISIONING = 10,
+ QMI_UIM_SESSION_TYPE_TERTIARY_1X_PROVISIONING = 11,
+ QMI_UIM_SESSION_TYPE_QUATERNARY_GW_PROVISIONING = 12,
+ QMI_UIM_SESSION_TYPE_QUATERNARY_1X_PROVISIONING = 13,
+ QMI_UIM_SESSION_TYPE_QUINARY_GW_PROVISIONING = 14,
+ QMI_UIM_SESSION_TYPE_QUINARY_1X_PROVISIONING = 15,
+ QMI_UIM_SESSION_TYPE_NONPROVISIONING_SLOT_3 = 16,
+ QMI_UIM_SESSION_TYPE_NONPROVISIONING_SLOT_4 = 17,
+ QMI_UIM_SESSION_TYPE_NONPROVISIONING_SLOT_5 = 18,
+ QMI_UIM_SESSION_TYPE_CARD_SLOT_3 = 19,
+ QMI_UIM_SESSION_TYPE_CARD_SLOT_4 = 20,
+ QMI_UIM_SESSION_TYPE_CARD_SLOT_5 = 21,
+ QMI_UIM_SESSION_TYPE_LOGICAL_CHANNEL_SLOT_3 = 22,
+ QMI_UIM_SESSION_TYPE_LOGICAL_CHANNEL_SLOT_4 = 23,
+ QMI_UIM_SESSION_TYPE_LOGICAL_CHANNEL_SLOT_5 = 24,
+} QmiUimSessionType;
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI UIM Get File Attributes' request/response */
+
+/**
+ * QmiUimFileType:
+ * @QMI_UIM_FILE_TYPE_TRANSPARENT: Transparent.
+ * @QMI_UIM_FILE_TYPE_CYCLIC: Cyclic.
+ * @QMI_UIM_FILE_TYPE_LINEAR_FIXED: Linear fixed.
+ * @QMI_UIM_FILE_TYPE_DEDICATED_FILE: Dedicated file.
+ * @QMI_UIM_FILE_TYPE_MASTER_FILE: Master file.
+ *
+ * Type of UIM file.
+ *
+ * Since: 1.6
+ */
+typedef enum { /*< since=1.6 >*/
+ QMI_UIM_FILE_TYPE_TRANSPARENT = 0,
+ QMI_UIM_FILE_TYPE_CYCLIC = 1,
+ QMI_UIM_FILE_TYPE_LINEAR_FIXED = 2,
+ QMI_UIM_FILE_TYPE_DEDICATED_FILE = 3,
+ QMI_UIM_FILE_TYPE_MASTER_FILE = 4
+} QmiUimFileType;
+
+/**
+ * QmiUimSecurityAttributeLogic:
+ * @QMI_UIM_SECURITY_ATTRIBUTE_LOGIC_ALWAYS: Always.
+ * @QMI_UIM_SECURITY_ATTRIBUTE_LOGIC_NEVER: Never.
+ * @QMI_UIM_SECURITY_ATTRIBUTE_LOGIC_AND: And.
+ * @QMI_UIM_SECURITY_ATTRIBUTE_LOGIC_OR: Or.
+ * @QMI_UIM_SECURITY_ATTRIBUTE_LOGIC_SINGLE: Single.
+ *
+ * Logic applicable to security attributes.
+ *
+ * Since: 1.6
+ */
+typedef enum { /*< since=1.6 >*/
+ QMI_UIM_SECURITY_ATTRIBUTE_LOGIC_ALWAYS = 0,
+ QMI_UIM_SECURITY_ATTRIBUTE_LOGIC_NEVER = 1,
+ QMI_UIM_SECURITY_ATTRIBUTE_LOGIC_AND = 2,
+ QMI_UIM_SECURITY_ATTRIBUTE_LOGIC_OR = 3,
+ QMI_UIM_SECURITY_ATTRIBUTE_LOGIC_SINGLE = 4
+} QmiUimSecurityAttributeLogic;
+
+/**
+ * QmiUimSecurityAttribute:
+ * @QMI_UIM_SECURITY_ATTRIBUTE_PIN1: PIN1.
+ * @QMI_UIM_SECURITY_ATTRIBUTE_PIN2: PIN2.
+ * @QMI_UIM_SECURITY_ATTRIBUTE_UPIN: UPIN.
+ * @QMI_UIM_SECURITY_ATTRIBUTE_ADM: ADM.
+ *
+ * Security Attributes.
+ *
+ * Since: 1.6
+ */
+typedef enum { /*< since=1.6 >*/
+ QMI_UIM_SECURITY_ATTRIBUTE_PIN1 = 1 << 0,
+ QMI_UIM_SECURITY_ATTRIBUTE_PIN2 = 1 << 1,
+ QMI_UIM_SECURITY_ATTRIBUTE_UPIN = 1 << 2,
+ QMI_UIM_SECURITY_ATTRIBUTE_ADM = 1 << 3
+} QmiUimSecurityAttribute;
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI UIM Set PIN Protection' */
+
+/**
+ * QmiUimPinId:
+ * @QMI_UIM_PIN_ID_UNKNOWN: Unknown.
+ * @QMI_UIM_PIN_ID_PIN1: PIN1.
+ * @QMI_UIM_PIN_ID_PIN2: PIN2.
+ * @QMI_UIM_PIN_ID_UPIN: UPIN.
+ * @QMI_UIM_PIN_ID_HIDDEN_KEY: Hidden key.
+ *
+ * PIN ID.
+ *
+ * Since: 1.14
+ */
+typedef enum { /*< since=1.14 >*/
+ QMI_UIM_PIN_ID_UNKNOWN = 0,
+ QMI_UIM_PIN_ID_PIN1 = 1,
+ QMI_UIM_PIN_ID_PIN2 = 2,
+ QMI_UIM_PIN_ID_UPIN = 3,
+ QMI_UIM_PIN_ID_HIDDEN_KEY = 4
+} QmiUimPinId;
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI UIM Get Card Status' request/response */
+
+/**
+ * QmiUimCardState:
+ * @QMI_UIM_CARD_STATE_ABSENT: Absent.
+ * @QMI_UIM_CARD_STATE_PRESENT: Present.
+ * @QMI_UIM_CARD_STATE_ERROR: Error.
+ *
+ * State of the card.
+ *
+ * Since: 1.10
+ */
+typedef enum { /*< since=1.10 >*/
+ QMI_UIM_CARD_STATE_ABSENT = 0,
+ QMI_UIM_CARD_STATE_PRESENT = 1,
+ QMI_UIM_CARD_STATE_ERROR = 2
+} QmiUimCardState;
+
+/**
+ * QmiUimPinState:
+ * @QMI_UIM_PIN_STATE_NOT_INITIALIZED: Not initialized.
+ * @QMI_UIM_PIN_STATE_ENABLED_NOT_VERIFIED: Enabled, not verified.
+ * @QMI_UIM_PIN_STATE_ENABLED_VERIFIED: Enabled, verified.
+ * @QMI_UIM_PIN_STATE_DISABLED: Disabled.
+ * @QMI_UIM_PIN_STATE_BLOCKED: Blocked.
+ * @QMI_UIM_PIN_STATE_PERMANENTLY_BLOCKED: Permanently Blocked.
+ *
+ * The PIN state.
+ *
+ * Since: 1.10
+ */
+typedef enum { /*< since=1.10 >*/
+ QMI_UIM_PIN_STATE_NOT_INITIALIZED = 0,
+ QMI_UIM_PIN_STATE_ENABLED_NOT_VERIFIED = 1,
+ QMI_UIM_PIN_STATE_ENABLED_VERIFIED = 2,
+ QMI_UIM_PIN_STATE_DISABLED = 3,
+ QMI_UIM_PIN_STATE_BLOCKED = 4,
+ QMI_UIM_PIN_STATE_PERMANENTLY_BLOCKED = 5,
+} QmiUimPinState;
+
+/**
+ * QmiUimCardError:
+ * @QMI_UIM_CARD_ERROR_UNKNOWN: Unknown error.
+ * @QMI_UIM_CARD_ERROR_POWER_DOWN: Power down.
+ * @QMI_UIM_CARD_ERROR_POLL: Poll error.
+ * @QMI_UIM_CARD_ERROR_NO_ATR_RECEIVED: No ATR received.
+ * @QMI_UIM_CARD_ERROR_VOLTAGE_MISMATCH: Voltage mismatch.
+ * @QMI_UIM_CARD_ERROR_PARITY: Parity error.
+ * @QMI_UIM_CARD_ERROR_POSSIBLY_REMOVED: Unknown error, possibly removed.
+ * @QMI_UIM_CARD_ERROR_TECHNICAL: Technical problem.
+ *
+ * Card error.
+ *
+ * Since: 1.10
+ */
+typedef enum { /*< since=1.10 >*/
+ QMI_UIM_CARD_ERROR_UNKNOWN = 0,
+ QMI_UIM_CARD_ERROR_POWER_DOWN = 1,
+ QMI_UIM_CARD_ERROR_POLL = 2,
+ QMI_UIM_CARD_ERROR_NO_ATR_RECEIVED = 3,
+ QMI_UIM_CARD_ERROR_VOLTAGE_MISMATCH = 4,
+ QMI_UIM_CARD_ERROR_PARITY = 5,
+ QMI_UIM_CARD_ERROR_POSSIBLY_REMOVED = 6,
+ QMI_UIM_CARD_ERROR_TECHNICAL = 7
+} QmiUimCardError;
+
+/**
+ * QmiUimCardApplicationType:
+ * @QMI_UIM_CARD_APPLICATION_TYPE_UNKNOWN: Unknown.
+ * @QMI_UIM_CARD_APPLICATION_TYPE_SIM: SIM.
+ * @QMI_UIM_CARD_APPLICATION_TYPE_USIM: USIM.
+ * @QMI_UIM_CARD_APPLICATION_TYPE_RUIM: RUIM.
+ * @QMI_UIM_CARD_APPLICATION_TYPE_CSIM: CSIM.
+ * @QMI_UIM_CARD_APPLICATION_TYPE_ISIM: ISIM.
+ *
+ * Card application type.
+ *
+ * Since: 1.10
+ */
+typedef enum { /*< since=1.10 >*/
+ QMI_UIM_CARD_APPLICATION_TYPE_UNKNOWN = 0,
+ QMI_UIM_CARD_APPLICATION_TYPE_SIM = 1,
+ QMI_UIM_CARD_APPLICATION_TYPE_USIM = 2,
+ QMI_UIM_CARD_APPLICATION_TYPE_RUIM = 3,
+ QMI_UIM_CARD_APPLICATION_TYPE_CSIM = 4,
+ QMI_UIM_CARD_APPLICATION_TYPE_ISIM = 5,
+} QmiUimCardApplicationType;
+
+/**
+ * QmiUimCardApplicationState:
+ * @QMI_UIM_CARD_APPLICATION_STATE_UNKNOWN: Unknown.
+ * @QMI_UIM_CARD_APPLICATION_STATE_DETECTED: Detected.
+ * @QMI_UIM_CARD_APPLICATION_STATE_PIN1_OR_UPIN_PIN_REQUIRED: PIN1 or UPIN PIN required.
+ * @QMI_UIM_CARD_APPLICATION_STATE_PUK1_OR_UPIN_PUK_REQUIRED: PUK1 or UPIN PUK required.
+ * @QMI_UIM_CARD_APPLICATION_STATE_CHECK_PERSONALIZATION_STATE: Personalization state must be checked.
+ * @QMI_UIM_CARD_APPLICATION_STATE_PIN1_BLOCKED: PIN1 blocked.
+ * @QMI_UIM_CARD_APPLICATION_STATE_ILLEGAL: Illegal.
+ * @QMI_UIM_CARD_APPLICATION_STATE_READY: Ready
+ *
+ * Card application state.
+ *
+ * Since: 1.10
+ */
+typedef enum { /*< since=1.10 >*/
+ QMI_UIM_CARD_APPLICATION_STATE_UNKNOWN = 0,
+ QMI_UIM_CARD_APPLICATION_STATE_DETECTED = 1,
+ QMI_UIM_CARD_APPLICATION_STATE_PIN1_OR_UPIN_PIN_REQUIRED = 2,
+ QMI_UIM_CARD_APPLICATION_STATE_PUK1_OR_UPIN_PUK_REQUIRED = 3,
+ QMI_UIM_CARD_APPLICATION_STATE_CHECK_PERSONALIZATION_STATE = 4,
+ QMI_UIM_CARD_APPLICATION_STATE_PIN1_BLOCKED = 5,
+ QMI_UIM_CARD_APPLICATION_STATE_ILLEGAL = 6,
+ QMI_UIM_CARD_APPLICATION_STATE_READY = 7,
+} QmiUimCardApplicationState;
+
+/**
+ * QmiUimCardApplicationPersonalizationState:
+ * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_STATE_UNKNOWN: Unknown.
+ * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_STATE_IN_PROGRESS: Operation in progress.
+ * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_STATE_READY: Ready.
+ * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_STATE_CODE_REQUIRED: Code required.
+ * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_STATE_PUK_CODE_REQUIRED: PUK code required.
+ * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_STATE_PERMANENTLY_BLOCKED: Permanently blocked-
+ *
+ * Card application personalization state.
+ *
+ * Since: 1.10
+ */
+typedef enum { /*< since=1.10 >*/
+ QMI_UIM_CARD_APPLICATION_PERSONALIZATION_STATE_UNKNOWN = 0,
+ QMI_UIM_CARD_APPLICATION_PERSONALIZATION_STATE_IN_PROGRESS = 1,
+ QMI_UIM_CARD_APPLICATION_PERSONALIZATION_STATE_READY = 2,
+ QMI_UIM_CARD_APPLICATION_PERSONALIZATION_STATE_CODE_REQUIRED = 3,
+ QMI_UIM_CARD_APPLICATION_PERSONALIZATION_STATE_PUK_CODE_REQUIRED = 4,
+ QMI_UIM_CARD_APPLICATION_PERSONALIZATION_STATE_PERMANENTLY_BLOCKED = 5,
+} QmiUimCardApplicationPersonalizationState;
+
+/**
+ * QmiUimCardApplicationPersonalizationFeature:
+ * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_GW_NETWORK: GW network.
+ * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_GW_NETWORK_SUBSET: GW network subset.
+ * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_GW_SERVICE_PROVIDER: GW service provider.
+ * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_GW_CORPORATE: GW corporate.
+ * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_GW_UIM: UIM.
+ * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_1X_NETWORK_TYPE_1: 1X network type 1.
+ * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_1X_NETWORK_TYPE_2: 1X network type 2.
+ * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_1X_HRPD: 1X HRPD.
+ * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_1X_SERVICE_PROVIDER: 1X service provider.
+ * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_1X_CORPORATE: 1X corporate.
+ * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_1X_RUIM: 1X R-UIM.
+ * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_UNKNOWN: Unknown.
+ *
+ * Card application personalization feature, when a code is required.
+ *
+ * Since: 1.10
+ */
+typedef enum { /*< since=1.10 >*/
+ QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_GW_NETWORK = 0,
+ QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_GW_NETWORK_SUBSET = 1,
+ QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_GW_SERVICE_PROVIDER = 2,
+ QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_GW_CORPORATE = 3,
+ QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_GW_UIM = 4,
+ QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_1X_NETWORK_TYPE_1 = 5,
+ QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_1X_NETWORK_TYPE_2 = 6,
+ QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_1X_HRPD = 7,
+ QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_1X_SERVICE_PROVIDER = 8,
+ QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_1X_CORPORATE = 9,
+ QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_1X_RUIM = 10,
+ QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_UNKNOWN = 11
+} QmiUimCardApplicationPersonalizationFeature;
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI UIM Refresh' indication */
+
+/**
+ * QmiUimRefreshStage:
+ * @QMI_UIM_REFRESH_STAGE_WAIT_FOR_OK: Waiting for REFRESH OK message.
+ * @QMI_UIM_REFRESH_STAGE_START: Refresh started.
+ * @QMI_UIM_REFRESH_STAGE_END_WITH_SUCCESS: Refresh completed successfully.
+ * @QMI_UIM_REFRESH_STAGE_END_WITH_FAILURE: Refresh has failed.
+ *
+ * Current stage of the refresh procedure.
+ *
+ * Since: 1.28
+ */
+typedef enum { /*< since=1.28 >*/
+ QMI_UIM_REFRESH_STAGE_WAIT_FOR_OK = 0,
+ QMI_UIM_REFRESH_STAGE_START = 1,
+ QMI_UIM_REFRESH_STAGE_END_WITH_SUCCESS = 2,
+ QMI_UIM_REFRESH_STAGE_END_WITH_FAILURE = 3
+} QmiUimRefreshStage;
+
+/**
+ * QmiUimRefreshMode:
+ * @QMI_UIM_REFRESH_MODE_RESET: Reset.
+ * @QMI_UIM_REFRESH_MODE_INIT: Init.
+ * @QMI_UIM_REFRESH_MODE_INIT_FCN: Init & FCN.
+ * @QMI_UIM_REFRESH_MODE_FCN: FCN.
+ * @QMI_UIM_REFRESH_MODE_INIT_FULL_FCN: Init & full FCN.
+ * @QMI_UIM_REFRESH_MODE_APP_RESET: Application reset.
+ * @QMI_UIM_REFRESH_MODE_3G_RESET: 3G session reset.
+ *
+ * Refresh mode
+ *
+ * Since: 1.28
+ */
+typedef enum { /*< since=1.28 >*/
+ QMI_UIM_REFRESH_MODE_RESET = 0,
+ QMI_UIM_REFRESH_MODE_INIT = 1,
+ QMI_UIM_REFRESH_MODE_INIT_FCN = 2,
+ QMI_UIM_REFRESH_MODE_FCN = 3,
+ QMI_UIM_REFRESH_MODE_INIT_FULL_FCN = 4,
+ QMI_UIM_REFRESH_MODE_APP_RESET = 5,
+ QMI_UIM_REFRESH_MODE_3G_RESET = 6
+} QmiUimRefreshMode;
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI UIM Get Slot Status' request/response */
+
+/**
+ * QmiUimPhysicalCardState:
+ * @QMI_UIM_PHYSICAL_CARD_STATE_UNKNOWN: Unknown.
+ * @QMI_UIM_PHYSICAL_CARD_STATE_ABSENT: Absent.
+ * @QMI_UIM_PHYSICAL_CARD_STATE_PRESENT: Present.
+ *
+ * State of the physical card.
+ *
+ * Since: 1.26
+ */
+typedef enum { /*< since=1.26 >*/
+ QMI_UIM_PHYSICAL_CARD_STATE_UNKNOWN = 0,
+ QMI_UIM_PHYSICAL_CARD_STATE_ABSENT = 1,
+ QMI_UIM_PHYSICAL_CARD_STATE_PRESENT = 2,
+} QmiUimPhysicalCardState;
+
+/**
+ * QmiUimSlotState:
+ * @QMI_UIM_SLOT_STATE_INACTIVE: Inactive.
+ * @QMI_UIM_SLOT_STATE_ACTIVE: Active.
+ *
+ * State of the slot.
+ *
+ * Since: 1.26
+ */
+typedef enum { /*< since=1.26 >*/
+ QMI_UIM_SLOT_STATE_INACTIVE = 0,
+ QMI_UIM_SLOT_STATE_ACTIVE = 1,
+} QmiUimSlotState;
+
+/**
+ * QmiUimCardProtocol:
+ * @QMI_UIM_CARD_PROTOCOL_UNKNOWN: Unknown.
+ * @QMI_UIM_CARD_PROTOCOL_ICC: ICC protocol.
+ * @QMI_UIM_CARD_PROTOCOL_UICC: UICC protocol.
+ *
+ * Protocol for the card.
+ *
+ * Since: 1.26
+ */
+typedef enum { /*< since=1.26 >*/
+ QMI_UIM_CARD_PROTOCOL_UNKNOWN = 0,
+ QMI_UIM_CARD_PROTOCOL_ICC = 1,
+ QMI_UIM_CARD_PROTOCOL_UICC = 2,
+} QmiUimCardProtocol;
+
+/**
+ * QmiUimConfiguration:
+ * @QMI_UIM_CONFIGURATION_AUTOMATIC_SELECTION: Automatic selection.
+ * @QMI_UIM_CONFIGURATION_PERSONALIZATION_STATUS: Personalization status.
+ * @QMI_UIM_CONFIGURATION_HALT_SUBSCRIPTION: Halt publication of subscription.
+ *
+ * Requested configurations. If none explicitly requested, all configuration
+ * items are returned.
+ *
+ * Since: 1.30
+ */
+typedef enum { /*< since=1.30 >*/
+ QMI_UIM_CONFIGURATION_AUTOMATIC_SELECTION = 1 << 0,
+ QMI_UIM_CONFIGURATION_PERSONALIZATION_STATUS = 1 << 1,
+ QMI_UIM_CONFIGURATION_HALT_SUBSCRIPTION = 1 << 2,
+} QmiUimConfiguration;
+
+/**
+ * QmiUimDepersonalizationOperation:
+ * @QMI_UIM_DEPERSONALIZATION_OPERATION_DEACTIVATE: Deactivate personalization
+ * @QMI_UIM_DEPERSONALIZATION_OPERATION_UNBLOCK: Unblock personalization
+ *
+ * Depersonalization operation to perform.
+ *
+ * Since: 1.30
+ */
+typedef enum { /*< since=1.30 >*/
+ QMI_UIM_DEPERSONALIZATION_OPERATION_DEACTIVATE = 0,
+ QMI_UIM_DEPERSONALIZATION_OPERATION_UNBLOCK = 1,
+} QmiUimDepersonalizationOperation;
+
+#endif /* _LIBQMI_GLIB_QMI_ENUMS_UIM_H_ */
--- /dev/null
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * libqmi-glib -- GLib/GIO based library to control QMI devices
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2014-2017 Aleksander Morgado <aleksander@aleksander.es>
+ */
+
+#ifndef _LIBQMI_GLIB_QMI_ENUMS_WDA_H_
+#define _LIBQMI_GLIB_QMI_ENUMS_WDA_H_
+
+/**
+ * SECTION: qmi-enums-wda
+ *
+ * This section defines enumerations and flags used in the WDA service
+ * interface.
+ */
+
+/**
+ * QmiWdaLinkLayerProtocol:
+ * @QMI_WDA_LINK_LAYER_PROTOCOL_UNKNOWN: Unknown.
+ * @QMI_WDA_LINK_LAYER_PROTOCOL_802_3: 802.3 ethernet mode.
+ * @QMI_WDA_LINK_LAYER_PROTOCOL_RAW_IP: Raw IP mode.
+ *
+ * Link layer protocol.
+ *
+ * Since: 1.10
+ */
+typedef enum { /*< since=1.10 >*/
+ QMI_WDA_LINK_LAYER_PROTOCOL_UNKNOWN = 0x00,
+ QMI_WDA_LINK_LAYER_PROTOCOL_802_3 = 0x01,
+ QMI_WDA_LINK_LAYER_PROTOCOL_RAW_IP = 0x02,
+} QmiWdaLinkLayerProtocol;
+
+/**
+ * QmiWdaDataAggregationProtocol:
+ * @QMI_WDA_DATA_AGGREGATION_PROTOCOL_DISABLED: Disabled.
+ * @QMI_WDA_DATA_AGGREGATION_PROTOCOL_TLP: TLP enabled.
+ * @QMI_WDA_DATA_AGGREGATION_PROTOCOL_QC_NCM: QC NCM enabled.
+ * @QMI_WDA_DATA_AGGREGATION_PROTOCOL_MBIM: MBIM enabled.
+ * @QMI_WDA_DATA_AGGREGATION_PROTOCOL_RNDIS: RNDIS enabled.
+ * @QMI_WDA_DATA_AGGREGATION_PROTOCOL_QMAP: QMAP enabled.
+ * @QMI_WDA_DATA_AGGREGATION_PROTOCOL_QMAPV2: QMAPV2 enabled. Since: 1.30.
+ * @QMI_WDA_DATA_AGGREGATION_PROTOCOL_QMAPV3: QMAPV3 enabled. Since: 1.30.
+ * @QMI_WDA_DATA_AGGREGATION_PROTOCOL_QMAPV4: QMAPV4 enabled. Since: 1.30.
+ * @QMI_WDA_DATA_AGGREGATION_PROTOCOL_QMAPV5: QMAPV5 enabled. Since: 1.28.
+ *
+ * Data aggregation protocol in uplink or downlink.
+ *
+ * Since: 1.10
+ */
+typedef enum { /*< since=1.10 >*/
+ QMI_WDA_DATA_AGGREGATION_PROTOCOL_DISABLED = 0x00,
+ QMI_WDA_DATA_AGGREGATION_PROTOCOL_TLP = 0x01,
+ QMI_WDA_DATA_AGGREGATION_PROTOCOL_QC_NCM = 0x02,
+ QMI_WDA_DATA_AGGREGATION_PROTOCOL_MBIM = 0x03,
+ QMI_WDA_DATA_AGGREGATION_PROTOCOL_RNDIS = 0x04,
+ QMI_WDA_DATA_AGGREGATION_PROTOCOL_QMAP = 0x05,
+ QMI_WDA_DATA_AGGREGATION_PROTOCOL_QMAPV2 = 0x06,
+ QMI_WDA_DATA_AGGREGATION_PROTOCOL_QMAPV3 = 0x07,
+ QMI_WDA_DATA_AGGREGATION_PROTOCOL_QMAPV4 = 0x08,
+ QMI_WDA_DATA_AGGREGATION_PROTOCOL_QMAPV5 = 0x09,
+} QmiWdaDataAggregationProtocol;
+
+#endif /* _LIBQMI_GLIB_QMI_ENUMS_WDA_H_ */
--- /dev/null
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * uqmi -- tiny QMI support implementation
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2012 Lanedo GmbH
+ * Copyright (C) 2015 Velocloud Inc.
+ * Copyright (C) 2012-2017 Aleksander Morgado <aleksander@aleksander.es>
+ */
+
+#ifndef _LIBQMI_GLIB_QMI_ENUMS_WDS_H_
+#define _LIBQMI_GLIB_QMI_ENUMS_WDS_H_
+
+/**
+ * SECTION: qmi-enums-wds
+ *
+ * This section defines enumerations and flags used in the WDS service
+ * interface.
+ */
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI WDS Start Network' message */
+
+/**
+ * QmiWdsIpFamily:
+ * @QMI_WDS_IP_FAMILY_UNKNOWN: unknown. Since: 1.18.
+ * @QMI_WDS_IP_FAMILY_IPV4: IPv4.
+ * @QMI_WDS_IP_FAMILY_IPV6: IPv6.
+ * @QMI_WDS_IP_FAMILY_UNSPECIFIED: None specified.
+ *
+ * Type of IP family.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_WDS_IP_FAMILY_UNKNOWN = 0,
+ QMI_WDS_IP_FAMILY_IPV4 = 4,
+ QMI_WDS_IP_FAMILY_IPV6 = 6,
+ QMI_WDS_IP_FAMILY_UNSPECIFIED = 8
+} QmiWdsIpFamily;
+
+/**
+ * QmiWdsTechnologyPreference:
+ * @QMI_WDS_TECHNOLOGY_PREFERENCE_ALLOW_3GPP: 3GPP allowed.
+ * @QMI_WDS_TECHNOLOGY_PREFERENCE_ALLOW_3GPP2: 3GPP2 allowed.
+ *
+ * Type of network allowed when trying to connect.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_WDS_TECHNOLOGY_PREFERENCE_ALLOW_3GPP = 1 << 0,
+ QMI_WDS_TECHNOLOGY_PREFERENCE_ALLOW_3GPP2 = 1 << 1
+} QmiWdsTechnologyPreference;
+
+/**
+ * QmiWdsExtendedTechnologyPreference:
+ * @QMI_WDS_EXTENDED_TECHNOLOGY_PREFERENCE_CDMA: Use CDMA.
+ * @QMI_WDS_EXTENDED_TECHNOLOGY_PREFERENCE_UMTS: Use UMTS.
+ * @QMI_WDS_EXTENDED_TECHNOLOGY_PREFERENCE_EPC: Use EPC, LTE.
+ * @QMI_WDS_EXTENDED_TECHNOLOGY_PREFERENCE_EMBMS: Use eMBMS.
+ * @QMI_WDS_EXTENDED_TECHNOLOGY_PREFERENCE_MODEM_LINK_LOCAL: Use modem link-local.
+ *
+ * Type of network allowed when trying to connect.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_WDS_EXTENDED_TECHNOLOGY_PREFERENCE_CDMA = 32769,
+ QMI_WDS_EXTENDED_TECHNOLOGY_PREFERENCE_UMTS = 32772,
+ QMI_WDS_EXTENDED_TECHNOLOGY_PREFERENCE_EPC = 34944,
+ QMI_WDS_EXTENDED_TECHNOLOGY_PREFERENCE_EMBMS = 34946,
+ QMI_WDS_EXTENDED_TECHNOLOGY_PREFERENCE_MODEM_LINK_LOCAL = 34952,
+} QmiWdsExtendedTechnologyPreference;
+
+/**
+ * QmiWdsCallType:
+ * @QMI_WDS_CALL_TYPE_LAPTOP: Laptop call.
+ * @QMI_WDS_CALL_TYPE_EMBEDDED: Embedded call.
+ *
+ * Type of call to originate.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_WDS_CALL_TYPE_LAPTOP = 0,
+ QMI_WDS_CALL_TYPE_EMBEDDED = 1
+} QmiWdsCallType;
+
+/**
+ * QmiWdsCallEndReason:
+ * @QMI_WDS_CALL_END_REASON_GENERIC_UNSPECIFIED: Unspecified reason.
+ * @QMI_WDS_CALL_END_REASON_GENERIC_CLIENT_END: Client end.
+ * @QMI_WDS_CALL_END_REASON_GENERIC_NO_SERVICE: No service.
+ * @QMI_WDS_CALL_END_REASON_GENERIC_FADE: Fade.
+ * @QMI_WDS_CALL_END_REASON_GENERIC_RELEASE_NORMAL: Release normal.
+ * @QMI_WDS_CALL_END_REASON_GENERIC_ACCESS_ATTEMPT_IN_PROGRESS: Access attempt in progress.
+ * @QMI_WDS_CALL_END_REASON_GENERIC_ACCESS_FAILURE: Access Failure.
+ * @QMI_WDS_CALL_END_REASON_GENERIC_REDIRECTION_OR_HANDOFF: Redirection or handoff.
+ * @QMI_WDS_CALL_END_REASON_GENERIC_CLOSE_IN_PROGRESS: Close in progress.
+ * @QMI_WDS_CALL_END_REASON_GENERIC_AUTHENTICATION_FAILED: Authentication failed.
+ * @QMI_WDS_CALL_END_REASON_GENERIC_INTERNAL_ERROR: Internal error.
+ * @QMI_WDS_CALL_END_REASON_CDMA_LOCK: CDMA specific. Phone is CDMA-locked.
+ * @QMI_WDS_CALL_END_REASON_CDMA_INTERCEPT: CDMA specific. Received intercept from the BS.
+ * @QMI_WDS_CALL_END_REASON_CDMA_REORDER: CDMA specific. Received reorder from the BS.
+ * @QMI_WDS_CALL_END_REASON_CDMA_RELEASE_SO_REJECT: CDMA specific. Received release from the BS, SO reject.
+ * @QMI_WDS_CALL_END_REASON_CDMA_INCOMING_CALL: CDMA specific. Received incoming call from the BS.
+ * @QMI_WDS_CALL_END_REASON_CDMA_ALERT_STOP: CDMA specific. Received alert stop from the BS.
+ * @QMI_WDS_CALL_END_REASON_CDMA_ACTIVATION: CDMA specific. Received end activation.
+ * @QMI_WDS_CALL_END_REASON_CDMA_MAX_ACCESS_PROBES: CDMA specific. Maximum access probes transmitted.
+ * @QMI_WDS_CALL_END_REASON_CDMA_CCS_NOT_SUPPORTED_BY_BS: CDMA specific. Concurrent service not supported by the BS.
+ * @QMI_WDS_CALL_END_REASON_CDMA_NO_RESPONSE_FROM_BS: CDMA specific. No response received from the BS.
+ * @QMI_WDS_CALL_END_REASON_CDMA_REJECTED_BY_BS: CDMA specific. Rejected by the BS.
+ * @QMI_WDS_CALL_END_REASON_CDMA_INCOMPATIBLE: CDMA specific. Concurrent services requested are incompatible.
+ * @QMI_WDS_CALL_END_REASON_CDMA_ALREADY_IN_TC: CDMA specific. Already in TC.
+ * @QMI_WDS_CALL_END_REASON_CDMA_USER_CALL_ORIGINATED_DURING_GPS: CDMA specific. Call originated during GPS.
+ * @QMI_WDS_CALL_END_REASON_CDMA_USER_CALL_ORIGINATED_DURING_SMS: CDMA specific. Call originated during SMS.
+ * @QMI_WDS_CALL_END_REASON_CDMA_NO_SERVICE: CDMA specific. No service.
+ * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_CONFERENCE_FAILED: GSM/WCDMA specific. Call origination request failed.
+ * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_INCOMING_REJECTED: GSM/WCDMA specific. Client rejected incoming call.
+ * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_NO_SERVICE: GSM/WCDMA specific. No service.
+ * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_NETWORK_END: GSM/WCDMA specific. Network ended the call.
+ * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_LLC_SNDCP_FAILURE: GSM/WCDMA specific. LLC or SNDCP failure.
+ * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_INSUFFICIENT_RESOURCES: GSM/WCDMA specific. Insufficient resources.
+ * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_OPTION_TEMPORARILY_OUT_OF_ORDER: GSM/WCDMA specific. Service option temporarily out of order.
+ * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_NSAPI_ALREADY_USED: GSM/WCDMA specific. NSAPI already used.
+ * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_REGULAR_DEACTIVATION: GSM/WCDMA specific. Regular PDP context deactivation.
+ * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_NETWORK_FAILURE: GSM/WCDMA specific. Network failure.
+ * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_REATTACH_REQUIRED: GSM/WCDMA specific. Reattach required.
+ * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_PROTOCOL_ERROR: GSM/WCDMA specific. Protocol error.
+ * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_OPERATOR_DETERMINED_BARRING: GSM/WCDMA specific. Operator-determined barring.
+ * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_UNKNOWN_APN: GSM/WCDMA specific. Unknown or missing APN.
+ * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_UNKNOWN_PDP: GSM/WCDMA specific. Unknown PDP address or type.
+ * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_GGSN_REJECT: GSM/WCDMA specific. Activation rejected by GGSN.
+ * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_ACTIVATION_REJECT: GSM/WCDMA specific. Activation rejected.
+ * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_OPTION_NOT_SUPPORTED: GSM/WCDMA specific. Service option not supported.
+ * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_OPTION_UNSUBSCRIBED: GSM/WCDMA specific. Service option not subscribed.
+ * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_QOS_NOT_ACCEPTED: GSM/WCDMA specific. QoS not accepted.
+ * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_TFT_SEMANTIC_ERROR: GSM/WCDMA specific. Semantic error in TFT operation.
+ * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_TFT_SYNTAX_ERROR: GSM/WCDMA specific. Syntax error in TFT operation.
+ * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_UNKNOWN_PDP_CONTEXT: GSM/WCDMA specific. Unknown PDP context.
+ * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_FILTER_SEMANTIC_ERROR: GSM/WCDMA specific. Semantic error in packet filters.
+ * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_FILTER_SYNTAX_ERROR: GSM/WCDMA specific. Syntax error in packet filters.
+ * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_PDP_WITHOUT_ACTIVE_TFT: GSM/WCDMA specific. PDP context without TFT activated.
+ * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_INVALID_TRANSACTION_ID: GSM/WCDMA specific. Invalid transaction ID.
+ * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_MESSAGE_INCORRECT_SEMANTIC: GSM/WCDMA specific. Message incorrect semantically.
+ * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_INVALID_MANDATORY_INFO: GSM/WCDMA specific. Invalid mandatory information.
+ * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_MESSAGE_TYPE_UNSUPPORTED: GSM/WCDMA specific. Message type not implemented.
+ * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_MESSAGE_TYPE_NONCOMPATIBLE_STATE: GSM/WCDMA specific. Message not compatible with state.
+ * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_UNKNOWN_INFO_ELEMENT: GSM/WCDMA specific. Information element unknown.
+ * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_CONDITIONAL_IE_ERROR: GSM/WCDMA specific. Conditional IE error.
+ * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_MESSAGE_AND_PROTOCOL_STATE_UNCOMPATIBLE: GSM/WCDMA specific. Message and protocol state uncompatible.
+ * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_APN_TYPE_CONFLICT: GSM/WCDMA specific. APN type conflict.
+ * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_NO_GPRS_CONTEXT: GSM/WCDMA specific. No GPRS context.
+ * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_FEATURE_NOT_SUPPORTED: GSM/WCDMA specific. Feature not supported.
+ * @QMI_WDS_CALL_END_REASON_EVDO_CONNECTION_DENY_GENERAL_OR_BUSY: CDMA/EVDO specific. Received Connection Deny: General or Network busy.
+ * @QMI_WDS_CALL_END_REASON_EVDO_CONNECTION_DENY_BILLING_OR_AUTHENTICATION_FAILURE: CDMA/EVDO specific. Received Connection Deny: Billing or Authentication failure.
+ * @QMI_WDS_CALL_END_REASON_EVDO_HDR_CHANGE: CDMA/EVDO specific. Change HDR.
+ * @QMI_WDS_CALL_END_REASON_EVDO_HDR_EXIT: CDMA/EVDO specific. Exit HDR.
+ * @QMI_WDS_CALL_END_REASON_EVDO_HDR_NO_SESSION: CDMA/EVDO specific. No HDR session.
+ * @QMI_WDS_CALL_END_REASON_EVDO_HDR_ORIGINATION_DURING_GPS_FIX: CDMA/EVDO specific. HDR call ended in favor of a GPS fix.
+ * @QMI_WDS_CALL_END_REASON_EVDO_HDR_CONNECTION_SETUP_TIMEOUT: CDMA/EVDO specific. Connection setup timeout.
+ * @QMI_WDS_CALL_END_REASON_EVDO_HDR_RELEASED_BY_CM: CDMA/EVDO specific. Released HDR call by call manager.
+ *
+ * Reason for ending the call.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ /* Generic reasons */
+ QMI_WDS_CALL_END_REASON_GENERIC_UNSPECIFIED = 1,
+ QMI_WDS_CALL_END_REASON_GENERIC_CLIENT_END = 2,
+ QMI_WDS_CALL_END_REASON_GENERIC_NO_SERVICE = 3,
+ QMI_WDS_CALL_END_REASON_GENERIC_FADE = 4,
+ QMI_WDS_CALL_END_REASON_GENERIC_RELEASE_NORMAL = 5,
+ QMI_WDS_CALL_END_REASON_GENERIC_ACCESS_ATTEMPT_IN_PROGRESS = 6,
+ QMI_WDS_CALL_END_REASON_GENERIC_ACCESS_FAILURE = 7,
+ QMI_WDS_CALL_END_REASON_GENERIC_REDIRECTION_OR_HANDOFF = 8,
+ QMI_WDS_CALL_END_REASON_GENERIC_CLOSE_IN_PROGRESS = 9,
+ QMI_WDS_CALL_END_REASON_GENERIC_AUTHENTICATION_FAILED = 10,
+ QMI_WDS_CALL_END_REASON_GENERIC_INTERNAL_ERROR = 11,
+
+ /* CDMA specific reasons */
+ QMI_WDS_CALL_END_REASON_CDMA_LOCK = 500,
+ QMI_WDS_CALL_END_REASON_CDMA_INTERCEPT = 501,
+ QMI_WDS_CALL_END_REASON_CDMA_REORDER = 502,
+ QMI_WDS_CALL_END_REASON_CDMA_RELEASE_SO_REJECT = 503,
+ QMI_WDS_CALL_END_REASON_CDMA_INCOMING_CALL = 504,
+ QMI_WDS_CALL_END_REASON_CDMA_ALERT_STOP = 505,
+ QMI_WDS_CALL_END_REASON_CDMA_ACTIVATION = 506,
+ QMI_WDS_CALL_END_REASON_CDMA_MAX_ACCESS_PROBES = 507,
+ QMI_WDS_CALL_END_REASON_CDMA_CCS_NOT_SUPPORTED_BY_BS = 508,
+ QMI_WDS_CALL_END_REASON_CDMA_NO_RESPONSE_FROM_BS = 509,
+ QMI_WDS_CALL_END_REASON_CDMA_REJECTED_BY_BS = 510,
+ QMI_WDS_CALL_END_REASON_CDMA_INCOMPATIBLE = 511,
+ QMI_WDS_CALL_END_REASON_CDMA_ALREADY_IN_TC = 512,
+ QMI_WDS_CALL_END_REASON_CDMA_USER_CALL_ORIGINATED_DURING_GPS = 513,
+ QMI_WDS_CALL_END_REASON_CDMA_USER_CALL_ORIGINATED_DURING_SMS = 514,
+ QMI_WDS_CALL_END_REASON_CDMA_NO_SERVICE = 515,
+
+ /* GSM/WCDMA specific reasons */
+ QMI_WDS_CALL_END_REASON_GSM_WCDMA_CONFERENCE_FAILED = 1000,
+ QMI_WDS_CALL_END_REASON_GSM_WCDMA_INCOMING_REJECTED = 1001,
+ QMI_WDS_CALL_END_REASON_GSM_WCDMA_NO_SERVICE = 1002,
+ QMI_WDS_CALL_END_REASON_GSM_WCDMA_NETWORK_END = 1003,
+ QMI_WDS_CALL_END_REASON_GSM_WCDMA_LLC_SNDCP_FAILURE = 1004,
+ QMI_WDS_CALL_END_REASON_GSM_WCDMA_INSUFFICIENT_RESOURCES = 1005,
+ QMI_WDS_CALL_END_REASON_GSM_WCDMA_OPTION_TEMPORARILY_OUT_OF_ORDER = 1006,
+ QMI_WDS_CALL_END_REASON_GSM_WCDMA_NSAPI_ALREADY_USED = 1007,
+ QMI_WDS_CALL_END_REASON_GSM_WCDMA_REGULAR_DEACTIVATION = 1008,
+ QMI_WDS_CALL_END_REASON_GSM_WCDMA_NETWORK_FAILURE = 1009,
+ QMI_WDS_CALL_END_REASON_GSM_WCDMA_REATTACH_REQUIRED = 1010,
+ QMI_WDS_CALL_END_REASON_GSM_WCDMA_PROTOCOL_ERROR = 1011,
+ QMI_WDS_CALL_END_REASON_GSM_WCDMA_OPERATOR_DETERMINED_BARRING = 1012,
+ QMI_WDS_CALL_END_REASON_GSM_WCDMA_UNKNOWN_APN = 1013,
+ QMI_WDS_CALL_END_REASON_GSM_WCDMA_UNKNOWN_PDP = 1014,
+ QMI_WDS_CALL_END_REASON_GSM_WCDMA_GGSN_REJECT = 1015,
+ QMI_WDS_CALL_END_REASON_GSM_WCDMA_ACTIVATION_REJECT = 1016,
+ QMI_WDS_CALL_END_REASON_GSM_WCDMA_OPTION_NOT_SUPPORTED = 1017,
+ QMI_WDS_CALL_END_REASON_GSM_WCDMA_OPTION_UNSUBSCRIBED = 1018,
+ QMI_WDS_CALL_END_REASON_GSM_WCDMA_QOS_NOT_ACCEPTED = 1019,
+ QMI_WDS_CALL_END_REASON_GSM_WCDMA_TFT_SEMANTIC_ERROR = 1020,
+ QMI_WDS_CALL_END_REASON_GSM_WCDMA_TFT_SYNTAX_ERROR = 1021,
+ QMI_WDS_CALL_END_REASON_GSM_WCDMA_UNKNOWN_PDP_CONTEXT = 1022,
+ QMI_WDS_CALL_END_REASON_GSM_WCDMA_FILTER_SEMANTIC_ERROR = 1023,
+ QMI_WDS_CALL_END_REASON_GSM_WCDMA_FILTER_SYNTAX_ERROR = 1024,
+ QMI_WDS_CALL_END_REASON_GSM_WCDMA_PDP_WITHOUT_ACTIVE_TFT = 1025,
+ QMI_WDS_CALL_END_REASON_GSM_WCDMA_INVALID_TRANSACTION_ID = 1026,
+ QMI_WDS_CALL_END_REASON_GSM_WCDMA_MESSAGE_INCORRECT_SEMANTIC = 1027,
+ QMI_WDS_CALL_END_REASON_GSM_WCDMA_INVALID_MANDATORY_INFO = 1028,
+ QMI_WDS_CALL_END_REASON_GSM_WCDMA_MESSAGE_TYPE_UNSUPPORTED = 1029,
+ QMI_WDS_CALL_END_REASON_GSM_WCDMA_MESSAGE_TYPE_NONCOMPATIBLE_STATE = 1030,
+ QMI_WDS_CALL_END_REASON_GSM_WCDMA_UNKNOWN_INFO_ELEMENT = 1031,
+ QMI_WDS_CALL_END_REASON_GSM_WCDMA_CONDITIONAL_IE_ERROR = 1032,
+ QMI_WDS_CALL_END_REASON_GSM_WCDMA_MESSAGE_AND_PROTOCOL_STATE_UNCOMPATIBLE = 1033,
+ QMI_WDS_CALL_END_REASON_GSM_WCDMA_APN_TYPE_CONFLICT = 1034,
+ QMI_WDS_CALL_END_REASON_GSM_WCDMA_NO_GPRS_CONTEXT = 1035,
+ QMI_WDS_CALL_END_REASON_GSM_WCDMA_FEATURE_NOT_SUPPORTED = 1036,
+
+ /* EVDO specific reasons */
+ QMI_WDS_CALL_END_REASON_EVDO_CONNECTION_DENY_GENERAL_OR_BUSY = 1500,
+ QMI_WDS_CALL_END_REASON_EVDO_CONNECTION_DENY_BILLING_OR_AUTHENTICATION_FAILURE = 1501,
+ QMI_WDS_CALL_END_REASON_EVDO_HDR_CHANGE = 1502,
+ QMI_WDS_CALL_END_REASON_EVDO_HDR_EXIT = 1503,
+ QMI_WDS_CALL_END_REASON_EVDO_HDR_NO_SESSION = 1504,
+ QMI_WDS_CALL_END_REASON_EVDO_HDR_ORIGINATION_DURING_GPS_FIX = 1505,
+ QMI_WDS_CALL_END_REASON_EVDO_HDR_CONNECTION_SETUP_TIMEOUT = 1506,
+ QMI_WDS_CALL_END_REASON_EVDO_HDR_RELEASED_BY_CM = 1507
+} QmiWdsCallEndReason;
+
+/**
+ * QmiWdsVerboseCallEndReasonType:
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_MIP: Mobile IP.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_INTERNAL: Internal.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_CM: Call manager.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_3GPP: 3GPP.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_PPP: PPP.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_EHRPD: eHRPD.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_IPV6: IPv6.
+ *
+ * Type of verbose call end reason.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_MIP = 1,
+ QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_INTERNAL = 2,
+ QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_CM = 3,
+ QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_3GPP = 6,
+ QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_PPP = 7,
+ QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_EHRPD = 8,
+ QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_IPV6 = 9
+} QmiWdsVerboseCallEndReasonType;
+
+/**
+ * QmiWdsVerboseCallEndReasonMip:
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_ERROR_REASON_UNKNOWN: Unknown reason.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_REASON_UNSPECIFIED: FA error. Reason unspecified.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_ADMINISTRATIVELY_PROHIBITED: FA error. Administratively prohibited.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_INSUFFICIENT_RESOURCES: FA error. Insufficient resources.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_MOBILE_NODE_AUTHENTICATION_FAILURE: FA error. Mobile node authenticatin failure.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_HA_AUTHENTICATION_FAILURE: FA error. HA authentication failure.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_REQUESTED_LIFETIME_TOO_LONG: FA error. Requested lifetime too long.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_MALFORMED_REQUEST: FA error. Malformed request.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_MALFORMED_REPLY: FA error. Malformed reply.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_ENCAPSULATION_UNAVAILABLE: FA error. Encapsulation unavailable.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_VJHC_UNAVAILABLE: FA error. VJHC unavailable.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_REVERSE_TUNNEL_UNAVAILABLE: FA error. Reverse tunnel unavailable.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_REVERSE_TUNNEL_MANDATORY_AND_T_BIT_NOT_SET: FA error. Reverse tunnel mandatory and T bit not set.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_DELIVERY_STYLE_NOT_SUPPORTED: FA error. Delivery style not supported.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_MISSING_NAI: FA error. Missing NAI.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_MISSING_HA: FA error. Missing HA.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_MISSING_HOME_ADDRESS: FA error. Missing home address.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_UNKNOWN_CHALLENGE: FA error. Unknown challenge.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_MISSING_CHALLENGE: FA error. Missing challenge.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_STALE_CHALLENGE: FA error. Stale challenge.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_REASON_UNSPECIFIED: HA error. Reason unspecified.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_ADMINISTRATIVELY_PROHIBITED: HA error. Administratively prohibited.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_INSUFFICIENT_RESOURCES: HA error. Insufficient resources.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_MOBILE_NODE_AUTHENTICATION_FAILURE: HA error. Mobile node authentication failure.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_FA_AUTHENTICATION_FAILURE: HA error. FA authentication failure.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_REGISTRATION_ID_MISMATCH: HA error. Registration ID mismatch.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_MALFORMED_REQUEST: HA error. Malformed request.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_UNKNOWN_HA_ADDRESS: HA error. Unknown HA address.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_REVERSE_TUNNEL_UNAVAILABLE: HA error. Reverse tunnel unavailable.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_REVERSE_TUNNEL_MANDATORY_AND_T_BIT_NOT_SET: HA error. Reverse tunnel mandatory and T bit not set.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_ENCAPSULATION_UNAVAILABLE: HA error. Encapsulation unavailable.
+ *
+ * Mobile IP specific call end reasons, given when the @QmiWdsVerboseCallEndReasonType is #QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_MIP.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_WDS_VERBOSE_CALL_END_REASON_MIP_ERROR_REASON_UNKNOWN = -1,
+
+ QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_REASON_UNSPECIFIED = 64,
+ QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_ADMINISTRATIVELY_PROHIBITED = 65,
+ QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_INSUFFICIENT_RESOURCES = 66,
+ QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_MOBILE_NODE_AUTHENTICATION_FAILURE = 67,
+ QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_HA_AUTHENTICATION_FAILURE = 68,
+ QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_REQUESTED_LIFETIME_TOO_LONG = 69,
+ QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_MALFORMED_REQUEST = 70,
+ QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_MALFORMED_REPLY = 71,
+ QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_ENCAPSULATION_UNAVAILABLE = 72,
+ QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_VJHC_UNAVAILABLE = 73,
+ QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_REVERSE_TUNNEL_UNAVAILABLE = 74,
+ QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_REVERSE_TUNNEL_MANDATORY_AND_T_BIT_NOT_SET = 75,
+ QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_DELIVERY_STYLE_NOT_SUPPORTED = 79,
+
+ QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_MISSING_NAI = 97,
+ QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_MISSING_HA = 98,
+ QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_MISSING_HOME_ADDRESS = 99,
+
+ QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_UNKNOWN_CHALLENGE = 104,
+ QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_MISSING_CHALLENGE = 105,
+ QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_STALE_CHALLENGE = 106,
+
+ QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_REASON_UNSPECIFIED = 128,
+ QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_ADMINISTRATIVELY_PROHIBITED = 129,
+ QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_INSUFFICIENT_RESOURCES = 130,
+ QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_MOBILE_NODE_AUTHENTICATION_FAILURE = 131,
+ QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_FA_AUTHENTICATION_FAILURE = 132,
+ QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_REGISTRATION_ID_MISMATCH = 133,
+ QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_MALFORMED_REQUEST = 134,
+ QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_UNKNOWN_HA_ADDRESS = 136,
+ QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_REVERSE_TUNNEL_UNAVAILABLE = 137,
+ QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_REVERSE_TUNNEL_MANDATORY_AND_T_BIT_NOT_SET = 138,
+ QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_ENCAPSULATION_UNAVAILABLE = 139
+} QmiWdsVerboseCallEndReasonMip;
+
+/**
+ * QmiWdsVerboseCallEndReasonInternal:
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_ERROR: Internal error.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_CALL_ENDED: Call ended.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_UNKNOWN_INTERNAL_CAUSE: Unknown internal cause.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_UNKNOWN_CAUSE: Unknown cause.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_CLOSE_IN_PROGRESS: Close in progress.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_NETWORK_INITIATED_TERMINATION: Network initiated termination.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_APP_PREEMPTED: App preempted.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_PDN_IPV4_CALL_DISALLOWED: PDN IPv4 call disallowed. Since: 1.14.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_PDN_IPV4_CALL_THROTTLED: PDN IPv4 call throttled. Since: 1.14.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_PDN_IPV6_CALL_DISALLOWED: PDN IPv6 call disallowed. Since: 1.14.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_PDN_IPV6_CALL_THROTTLED: PDN IPv6 call throttled. Since: 1.14.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_MODEM_RESTART: Modem restart. Since: 1.14.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_PDP_PPP_NOT_SUPPORTED: PDP PPP not supported. Since: 1.14.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_UNPREFERRED_RAT: Unpreferred RAT. Since: 1.14.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_PHYSICAL_LINK_CLOSE_IN_PROGRESS: Physical link close in progress. Since: 1.14.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_APN_PENDING_HANDOVER: APN pending handover. Since: 1.14.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_PROFILE_BEARER_INCOMPATIBLE: Profile bearer incompatible. Since: 1.14.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_MMGDSI_CARD_EVENT: MMGDSI Card event. Since: 1.14.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_LPM_OR_POWER_DOWN: LPM or power down. Since: 1.14.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_APN_DISABLED: APN disabled. Since: 1.14.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_MPIT_EXPIRED: MPIT expired. Since: 1.14.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_IPV6_ADDRESS_TRANSFER_FAILED: IPv6 address transfer failed. Since: 1.14.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_TRAT_SWAP_FAILED: TRAT swap failed. Since: 1.14.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_EHRPD_TO_HRPD_FALLBACK: eHRPD to HRPD fallback. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_MANDATORY_APN_DISABLED: Mandatory APN disabled. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_MIP_CONFIG_FAILURE: MIP config failure. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_PDN_INACTIVITY_TIMER_EXPIRED: PDN inactivity timeout expired. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_MAX_V4_CONNECTIONS: Max IPv4 connections. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_MAX_V6_CONNECTIONS: Max IPv6 connections. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_APN_MISMATCH: APN mismatch. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_IP_VERSION_MISMATCH: IP version mismatch. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_DUN_CALL_DISALLOWED: DUN call disallowed. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_INVALID_PROFILE: Invalid profile. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_EPC_NONEPC_TRANSITION: EPC to non-EPC transition. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_INVALID_PROFILE_ID: Invalid profile ID. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_CALL_ALREADY_PRESENT: Call already present. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_INTERFACE_IN_USE: Interface in use. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_IP_PDP_MISMATCH: IP PDP mismatch. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_APN_DISALLOWED_ON_ROAMING: APN disallowed on roaming. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_APN_PARAMETER_CHANGE: APN parameter change. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_INTERFACE_IN_USE_CONFIG_MATCH: Interface in use config match. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_NULL_APN_DISALLOWED: NULL APN disallowed. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_THERMAL_MITIGATION: Thermal mitigation. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_SUBS_ID_MISMATCH: Subs ID mismatch Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_DATA_SETTINGS_DISABLED: Data settings disabled. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_DATA_ROAMING_SETTINGS_DISABLED: Data roaming settings disabled. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_APN_FORMAT_INVALID: APN format invalid. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_DDS_CALL_ABORT: DDS call abort. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_VALIDATION_FAILURE: Validation failure. Since 1.24.10.
+ *
+ * Internal call end reasons, given when the @QmiWdsVerboseCallEndReasonType is #QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_INTERNAL.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_ERROR = 201,
+ QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_CALL_ENDED = 202,
+ QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_UNKNOWN_INTERNAL_CAUSE = 203,
+ QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_UNKNOWN_CAUSE = 204,
+ QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_CLOSE_IN_PROGRESS = 205,
+ QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_NETWORK_INITIATED_TERMINATION = 206,
+ QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_APP_PREEMPTED = 207,
+ QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_PDN_IPV4_CALL_DISALLOWED = 208,
+ QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_PDN_IPV4_CALL_THROTTLED = 209,
+ QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_PDN_IPV6_CALL_DISALLOWED = 210,
+ QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_PDN_IPV6_CALL_THROTTLED = 211,
+ QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_MODEM_RESTART = 212,
+ QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_PDP_PPP_NOT_SUPPORTED = 213,
+ QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_UNPREFERRED_RAT = 214,
+ QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_PHYSICAL_LINK_CLOSE_IN_PROGRESS = 215,
+ QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_APN_PENDING_HANDOVER = 216,
+ QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_PROFILE_BEARER_INCOMPATIBLE = 217,
+ QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_MMGDSI_CARD_EVENT = 218,
+ QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_LPM_OR_POWER_DOWN = 219,
+ QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_APN_DISABLED = 220,
+ QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_MPIT_EXPIRED = 221,
+ QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_IPV6_ADDRESS_TRANSFER_FAILED = 222,
+ QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_TRAT_SWAP_FAILED = 223,
+ QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_EHRPD_TO_HRPD_FALLBACK = 224,
+ QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_MANDATORY_APN_DISABLED = 225,
+ QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_MIP_CONFIG_FAILURE = 226,
+ QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_PDN_INACTIVITY_TIMER_EXPIRED = 227,
+ QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_MAX_V4_CONNECTIONS = 228,
+ QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_MAX_V6_CONNECTIONS = 229,
+ QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_APN_MISMATCH = 230,
+ QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_IP_VERSION_MISMATCH = 231,
+ QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_DUN_CALL_DISALLOWED = 232,
+ QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_INVALID_PROFILE = 233,
+ QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_EPC_NONEPC_TRANSITION = 234,
+ QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_INVALID_PROFILE_ID = 235,
+ QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_CALL_ALREADY_PRESENT = 236,
+ QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_INTERFACE_IN_USE = 237,
+ QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_IP_PDP_MISMATCH = 238,
+ QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_APN_DISALLOWED_ON_ROAMING = 239,
+ QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_APN_PARAMETER_CHANGE = 240,
+ QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_INTERFACE_IN_USE_CONFIG_MATCH = 241,
+ QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_NULL_APN_DISALLOWED = 242,
+ QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_THERMAL_MITIGATION = 243,
+ QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_SUBS_ID_MISMATCH = 244,
+ QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_DATA_SETTINGS_DISABLED = 245,
+ QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_DATA_ROAMING_SETTINGS_DISABLED = 246,
+ QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_APN_FORMAT_INVALID = 247,
+ QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_DDS_CALL_ABORT = 248,
+ QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_VALIDATION_FAILURE = 249,
+} QmiWdsVerboseCallEndReasonInternal;
+
+/**
+ * QmiWdsVerboseCallEndReasonCm:
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_CDMA_LOCK: CDMA specific. Phone is CDMA-locked.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_INTERCEPT: CDMA specific. Received intercept from the BS.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_REORDER: CDMA specific. Received reorder from the BS.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_RELEASE_SO_REJECT: CDMA specific. Received release from the BS, SO reject.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_INCOMING_CALL: CDMA specific. Received incoming call from the BS.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ALERT_STOP: CDMA specific. Received alert stop from the BS.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ACTIVATION: CDMA specific. Received end activation.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_MAX_ACCESS_PROBES: CDMA specific. Maximum access probes transmitted.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_CCS_NOT_SUPPORTED_BY_BS: CDMA specific. Concurrent service not supported by the BS.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_NO_RESPONSE_FROM_BS: CDMA specific. No response received from the BS.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_REJECTED_BY_BS: CDMA specific. Rejected by the BS.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_INCOMPATIBLE: CDMA specific. Concurrent services requested are incompatible.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ALREADY_IN_TC: CDMA specific. Already in TC.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_USER_CALL_ORIGINATED_DURING_GPS: CDMA specific. Call originated during GPS.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_USER_CALL_ORIGINATED_DURING_SMS: CDMA specific. Call originated during SMS.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_NO_CDMA_SERVICE: CDMA specific. No service.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_MC_ABORT: MC abort. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_PSIST_NG: Persistence test failure. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_UIM_NOT_PRESENT: UIM not present. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_RETRY_ORDER: Retry order.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ACCESS_BLOCK: Access blocked. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ACCESS_BLOCK_ALL: Access blocked for all. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_IS707B_MAX_ACCESS_PROBES: Maximum access probes for IS-707B call. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_THERMAL_EMERGENCY: Thermal emergency. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_CALL_ORIGINATION_THROTTLED: Call origination throttled. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_USER_CALL_ORIGINATED: Voice call originated and concurrent voice/data not supported. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_CONFERENCE_FAILED: Conference failed. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_INCOMING_REJECTED: Incoming rejected.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_NO_GATEWAY_SERVICE: No gateway service.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_NO_GPRS_CONTEXT: No GPRS context.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ILLEGAL_MS: Illegal MS.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ILLEGAL_ME: Illegal ME.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_GPRS_AND_NON_GPRS_SERVICES_NOT_ALLOWED: GPRS and non GPRS services not allowed.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_GPRS_SERVICES_NOT_ALLOWED: GPRS services not allowed.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_MS_IDENTITY_NOT_DERIVED_BY_THE_NETWORK: MS identity not derived by the network.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_IMPLICITLY_DETACHED: Implicitly detached.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_PLMN_NOT_ALLOWED: PLMN not allowed.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LA_NOT_ALLOWED: LA not allowed.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_GPRS_SERVICES_NOT_ALLOWED_IN_PLMN: GPRS services not allowed in PLMN.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_PDP_DUPLICATE: PDP duplicate.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_UE_RAT_CHANGE: UE radio access technology change.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_CONGESTION: Congestion.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_NO_PDP_CONTEXT_ACTIVATED: No PDP context activated.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ACCESS_CLASS_DSAC_REJECTION: Access class DSAC rejection.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_PDP_ACTIVATE_MAX_RETRY_FAILED: Maximum retries failed to activate PDP context. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_RAB_FAILURE: RAB failure. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_EPS_SERVICE_NOT_ALLOWED: EPS service not allowed. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_TRACKING_AREA_NOT_ALLOWED: Tracking area not allowed. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ROAMING_NOT_ALLOWED_IN_TRACKING_AREA: Roaming not allowed in tracking area. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_NO_SUITABLE_CELLS_IN_TRACKING_AREA: No suitable cells in tracking area. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_NOT_AUTHORIZED_CLOSED_SUBSCRIBER_GROUP: Not authorized in closed subscriber group. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_UNKNOWN_EPS_BEARER_CONTEXT: EPS Session Management, unknown EPS bearer context. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_DRB_RELEASED_AT_RRC: DRB released at RRC. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_NAS_SIGNAL_CONNECTION_RELEASED: NAS signal connection released. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_EMM_DETACHED: EPS Mobility Management, detached. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_EMM_ATTACH_FAILED: EPS Mobility Management, attach failed. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_EMM_ATTACH_STARTED: EPS Mobility Management, attach started. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LTE_NAS_SERVICE_REQUEST_FAILED: LTE NAS service request failed. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_ACTIVE_DEDICATED_BEARER_REACTIVATED_BY_NW: EPS Session Management, active dedicated bearer reactivated by network. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_LOWER_LAYER_FAILURE: EPS Session Management, lower layer failure. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_SYNC_UP_WITH_NW: EPS Session Management, sync up with network. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_NW_ACTIVATED_DEDICATED_BEARER_WITH_ID_OF_DEFAULT_BEARER: EPS Session Management, network activated dedicated bearer with id of default bearer. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_BAD_OTA_MESSAGE: EPS Session Management, bad OTA message. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_DS_REJECTED_CALL: EPS Session Management, DS rejected call. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_CONTEXT_TRANSFERRED_DUE_TO_IRAT: EPS Session Management, context transferred due to IRAT. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_DS_EXPLICIT_DEACT: DS explicit deactivation. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_LOCAL_CAUSE_NONE: EPS Session Management, local cause none. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LTE_NAS_SERVICE_REQUEST_FAILED_NO_THROTTLE: LTE NAS service request failed, no throttle. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ACL_FAILURE: ACL failure. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LTE_NAS_SERVICE_REQUEST_FAILED_DS_DISALLOW: LTE NAS service request failed, DS disallow. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_EMM_T3417_EXPIRED: EPS Mobility Management, T3417 expired. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_EMM_T3417_EXT_EXPIRED: EPS Mobility Management, T3417 ext expired. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_UL_DATA_CONFIRMATION_FAILURE_TXN: LTE Radio Resource Control, UL data confirmation failure, txn. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_UL_DATA_CONFIRMATION_FAILURE_HANDOVER: LTE Radio Resource Control, UL data confirmation failure, handover. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_UL_DATA_CONFIRMATION_FAILURE_CONN_REL: LTE Radio Resource Control, UL data confirmation failure, connection release. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_UL_DATA_CONFIRMATION_FAILURE_RLF: LTE Radio Resource Control, UL data confirmation failure, radio link failure. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_UL_DATA_CONFIRMATION_FAILURE_CTRL_NOT_CONN: LTE Radio Resource Control, UL data confirmation failure, ctrl not conn. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE: LTE Radio Resource Control, connection establishment failure. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_ABORTED: LTE Radio Resource Control, connection establishment failure, aborted. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_ACCESS_BARRED: LTE Radio Resource Control, connection establishment failure, access barred. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_CELL_RESELECTION: LTE Radio Resource Control, connection establishment failure, cell reselection. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_CONFIG_FAILURE: LTE Radio Resource Control, connection establishment failure, config failure. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_TIMER_EXPIRED: LTE Radio Resource Control, connection establishment failure, timer expired. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_LINK_FAILURE: LTE Radio Resource Control, connection establishment failure, link failure. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_NOT_CAMPED: LTE Radio Resource Control, connection establishment failure, not camped. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_SI_FAILURE: LTE Radio Resource Control, connection establishment failure, SI failure. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_REJECTED: LTE Radio Resource Control, connection establishment failure, rejected. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_RELEASE_NORMAL: LTE Radio Resource Control, connection release, normal. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_RELEASE_RLF: LTE Radio Resource Control, connection release, radio link failure. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_RELEASE_CRE_FAILURE: LTE Radio Resource Control, connection release, cre failure. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_RELEASE_OOS_DURING_CRE: LTE Radio Resource Control, connection release, oos during cre. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_RELEASE_ABORTED: LTE Radio Resource Control, connection release, aborted. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_RELEASE_SIB_READ_ERROR: LTE Radio Resource Control, connection release, SIB read error. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_DETACH_WITH_REATTACH_LTE_NW_DETACH: Detach with reattach LTE network detach. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_DETACH_WITHOUT_REATTACH_LTE_NW_DETACH: Detach without reattach LTE network detach. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_PROC_TIMEOUT: EPS Session Management, proc timeout. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_MESSAGE_EXCEED_MAX_L2_LIMIT: Message exceed max L2 limit. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_CONNECTION_DENY_GENERAL_OR_BUSY: CDMA/EVDO specific. Received Connection Deny. General or Network busy.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_CONNECTION_DENY_BILLING_OR_AUTHENTICATION_FAILURE: CDMA/EVDO specific. Received Connection Deny. Billing or Authentication failure.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_CHANGE: CDMA/EVDO specific. Change HDR.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_EXIT: CDMA/EVDO specific. Exit HDR.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_NO_SESSION: CDMA/EVDO specific. No HDR session.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_ORIGINATION_DURING_GPS_FIX: CDMA/EVDO specific. HDR call ended in favor of a GPS fix.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_CONNECTION_SETUP_TIMEOUT: CDMA/EVDO specific. Connection setup timeout.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_RELEASED_BY_CM: CDMA/EVDO specific. Released HDR call by call manager.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_COLLOCATED_ACQUISITION_FAILED: Failed to acquire co-located HDR for origination. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_OTASP_COMMIT_IN_PROGRESS: CDMA/EVDO specific. OTASP commit in progress. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_NO_HYBRID_SERVICE: CDMA/EVDO specific. No hybrid HDR service.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_NO_LOCK_GRANTED: CDMA/EVDO specific. No lock granted. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_HOLD_OTHER_IN_PROGRESS: CDMA/EVDO specific. hold other in progress. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_FADE: CDMA/EVDO specific. Fade. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_ACCESS_FAILURE: CDMA/EVDO specific. Access failure. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_CLIENT_END: Client end.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_NO_SERVICE: No service.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_FADE: Fade.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_RELEASE_NORMAL: Release normal.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ACCESS_ATTEMPT_IN_PROGRESS: Access attempt in progress.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ACCESS_FAILURE: Access Failure.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_REDIRECTION_OR_HANDOFF: Redirection or handoff.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_OFFLINE: Offline. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_EMERGENCY_MODE: Emergency mode. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_PHONE_IN_USE: Phone in use. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_INVALID_MODE: Invalid mode. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_INVALID_SIM_STATE: Invalid SIM state. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_NO_COLLOCATED_HDR: No collocated HDR. Since 1.24.10.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_CALL_CONTROL_REJECTED: Call control rejected. Since 1.24.10.
+ *
+ * Call manager specific call end reasons, given when the @QmiWdsVerboseCallEndReasonType is #QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_CM.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_CDMA_LOCK = 500,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_INTERCEPT = 501,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_REORDER = 502,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_RELEASE_SO_REJECT = 503,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_INCOMING_CALL = 504,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_ALERT_STOP = 505,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_ACTIVATION = 506,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_MAX_ACCESS_PROBES = 507,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_CCS_NOT_SUPPORTED_BY_BS = 508,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_NO_RESPONSE_FROM_BS = 509,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_REJECTED_BY_BS = 510,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_INCOMPATIBLE = 511,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_ALREADY_IN_TC = 512,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_USER_CALL_ORIGINATED_DURING_GPS = 513,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_USER_CALL_ORIGINATED_DURING_SMS = 514,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_NO_CDMA_SERVICE = 515,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_MC_ABORT = 516,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_PSIST_NG = 517,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_UIM_NOT_PRESENT = 518,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_RETRY_ORDER = 519,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_ACCESS_BLOCK = 520,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_ACCESS_BLOCK_ALL = 521,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_IS707B_MAX_ACCESS_PROBES = 522,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_THERMAL_EMERGENCY = 523,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_CALL_ORIGINATION_THROTTLED = 524,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_USER_CALL_ORIGINATED = 525,
+
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_CONFERENCE_FAILED = 1000,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_INCOMING_REJECTED = 1001,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_NO_GATEWAY_SERVICE = 1002,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_NO_GPRS_CONTEXT = 1003,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_ILLEGAL_MS = 1004,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_ILLEGAL_ME = 1005,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_GPRS_AND_NON_GPRS_SERVICES_NOT_ALLOWED = 1006,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_GPRS_SERVICES_NOT_ALLOWED = 1007,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_MS_IDENTITY_NOT_DERIVED_BY_THE_NETWORK = 1008,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_IMPLICITLY_DETACHED = 1009,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_PLMN_NOT_ALLOWED = 1010,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_LA_NOT_ALLOWED = 1011,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_GPRS_SERVICES_NOT_ALLOWED_IN_PLMN = 1012,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_PDP_DUPLICATE = 1013,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_UE_RAT_CHANGE = 1014,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_CONGESTION = 1015,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_NO_PDP_CONTEXT_ACTIVATED = 1016,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_ACCESS_CLASS_DSAC_REJECTION = 1017,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_PDP_ACTIVATE_MAX_RETRY_FAILED = 1018,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_RAB_FAILURE = 1019,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_EPS_SERVICE_NOT_ALLOWED = 1020,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_TRACKING_AREA_NOT_ALLOWED = 1021,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_ROAMING_NOT_ALLOWED_IN_TRACKING_AREA = 1022,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_NO_SUITABLE_CELLS_IN_TRACKING_AREA = 1023,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_NOT_AUTHORIZED_CLOSED_SUBSCRIBER_GROUP = 1024,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_UNKNOWN_EPS_BEARER_CONTEXT = 1025,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_DRB_RELEASED_AT_RRC = 1026,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_NAS_SIGNAL_CONNECTION_RELEASED = 1027,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_EMM_DETACHED = 1028,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_EMM_ATTACH_FAILED = 1029,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_EMM_ATTACH_STARTED = 1030,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_LTE_NAS_SERVICE_REQUEST_FAILED = 1031,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_ACTIVE_DEDICATED_BEARER_REACTIVATED_BY_NW = 1032,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_LOWER_LAYER_FAILURE = 1033,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_SYNC_UP_WITH_NW = 1034,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_NW_ACTIVATED_DEDICATED_BEARER_WITH_ID_OF_DEFAULT_BEARER = 1035,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_BAD_OTA_MESSAGE = 1036,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_DS_REJECTED_CALL = 1037,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_CONTEXT_TRANSFERRED_DUE_TO_IRAT = 1038,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_DS_EXPLICIT_DEACT = 1039,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_LOCAL_CAUSE_NONE = 1040,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_LTE_NAS_SERVICE_REQUEST_FAILED_NO_THROTTLE = 1041,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_ACL_FAILURE = 1042,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_LTE_NAS_SERVICE_REQUEST_FAILED_DS_DISALLOW = 1043,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_EMM_T3417_EXPIRED = 1044,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_EMM_T3417_EXT_EXPIRED = 1045,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_UL_DATA_CONFIRMATION_FAILURE_TXN = 1046,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_UL_DATA_CONFIRMATION_FAILURE_HANDOVER = 1047,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_UL_DATA_CONFIRMATION_FAILURE_CONN_REL = 1048,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_UL_DATA_CONFIRMATION_FAILURE_RLF = 1049,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_UL_DATA_CONFIRMATION_FAILURE_CTRL_NOT_CONN = 1050,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE = 1051,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_ABORTED = 1052,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_ACCESS_BARRED = 1053,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_CELL_RESELECTION = 1054,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_CONFIG_FAILURE = 1055,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_TIMER_EXPIRED = 1056,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_LINK_FAILURE = 1057,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_NOT_CAMPED = 1058,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_SI_FAILURE = 1059,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_REJECTED = 1060,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_RELEASE_NORMAL = 1061,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_RELEASE_RLF = 1062,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_RELEASE_CRE_FAILURE = 1063,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_RELEASE_OOS_DURING_CRE = 1064,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_RELEASE_ABORTED = 1065,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_RELEASE_SIB_READ_ERROR = 1066,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_DETACH_WITH_REATTACH_LTE_NW_DETACH = 1067,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_DETACH_WITHOUT_REATTACH_LTE_NW_DETACH = 1068,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_PROC_TIMEOUT = 1069,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_MESSAGE_EXCEED_MAX_L2_LIMIT = 1070,
+
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_CONNECTION_DENY_GENERAL_OR_BUSY = 1500,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_CONNECTION_DENY_BILLING_OR_AUTHENTICATION_FAILURE = 1501,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_CHANGE = 1502,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_EXIT = 1503,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_NO_SESSION = 1504,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_ORIGINATION_DURING_GPS_FIX = 1505,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_CONNECTION_SETUP_TIMEOUT = 1506,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_RELEASED_BY_CM = 1507,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_COLLOCATED_ACQUISITION_FAILED = 1508,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_OTASP_COMMIT_IN_PROGRESS = 1509,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_NO_HYBRID_SERVICE = 1510,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_NO_LOCK_GRANTED = 1511,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_HOLD_OTHER_IN_PROGRESS = 1512,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_FADE = 1513,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_ACCESS_FAILURE = 1514,
+
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_CLIENT_END = 2000,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_NO_SERVICE = 2001,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_FADE = 2002,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_RELEASE_NORMAL = 2003,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_ACCESS_ATTEMPT_IN_PROGRESS = 2004,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_ACCESS_FAILURE = 2005,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_REDIRECTION_OR_HANDOFF = 2006,
+
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_OFFLINE = 2500,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_EMERGENCY_MODE = 2501,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_PHONE_IN_USE = 2502,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_INVALID_MODE = 2503,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_INVALID_SIM_STATE = 2504,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_NO_COLLOCATED_HDR = 2505,
+ QMI_WDS_VERBOSE_CALL_END_REASON_CM_CALL_CONTROL_REJECTED = 2506,
+} QmiWdsVerboseCallEndReasonCm;
+
+/**
+ * QmiWdsVerboseCallEndReason3gpp:
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_OPERATOR_DETERMINED_BARRING: Operator-determined barring.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_LLC_SNDCP_FAILURE: LLC or SNDCP failure.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_INSUFFICIENT_RESOURCES: Insufficient resources.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_UNKNOWN_APN: Unknown or missing APN.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_UNKNOWN_PDP: Unknown PDP address or type.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_AUTHENTICATION_FAILED: Authentication failed.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_GGSN_REJECT: Activation rejected by GGSN.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_ACTIVATION_REJECT: Activation rejected.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_OPTION_NOT_SUPPORTED: Service option not supported.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_OPTION_UNSUBSCRIBED: Service option not subscribed.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_OPTION_TEMPORARILY_OUT_OF_ORDER: Service option temporarily out of order.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_NSAPI_ALREADY_USED: NSAPI already used.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_REGULAR_DEACTIVATION: Regular PDP context deactivation.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_QOS_NOT_ACCEPTED: QoS not accepted.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_NETWORK_FAILURE: Network failure.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_REATTACH_REQUIRED: Reattach required.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_FEATURE_NOT_SUPPORTED: Feature not supported.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_TFT_SEMANTIC_ERROR: Semantic error in TFT operation.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_TFT_SYNTAX_ERROR: Syntax error in TFT operation.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_UNKNOWN_PDP_CONTEXT: Unknown PDP context.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_FILTER_SEMANTIC_ERROR: Semantic error in packet filters.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_FILTER_SYNTAX_ERROR: Syntax error in packet filters.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_PDP_WITHOUT_ACTIVE_TFT: PDP context without TFT activated.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_IPV4_ONLY_ALLOWED: IPv4 only allowed.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_IPV6_ONLY_ALLOWED: IPv6 only allowed.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_SINGLE_ADDRESS_BEARER_ONLY: Single address bearer only.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_ESM_INFO_NOT_RECEIVED: ESM information not received.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_PDN_CONNECTION_DOES_NOT_EXIST: PDN connection does not exist.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_MULTIPLE_CONNECTION_TO_SAME_PDN_NOT_ALLOWED: Multiple connection to same PDN not allowed.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_INVALID_TRANSACTION_ID: Invalid transaction ID.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_MESSAGE_INCORRECT_SEMANTIC: Message incorrect semantically.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_INVALID_MANDATORY_INFO: Invalid mandatory information.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_MESSAGE_TYPE_UNSUPPORTED: Message type not implemented.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_MESSAGE_TYPE_NONCOMPATIBLE_STATE: Message not compatible with state.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_UNKNOWN_INFO_ELEMENT: Information element unknown.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_CONDITIONAL_IE_ERROR: Conditional IE error.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_MESSAGE_AND_PROTOCOL_STATE_UNCOMPATIBLE: Message and protocol state uncompatible.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_PROTOCOL_ERROR: Protocol error.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_APN_TYPE_CONFLICT: APN type conflict.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_INVALID_PROXY_CALL_SESSION_CONTROL_FUNCTION_ADDRESS: Invalid proxy call session control function address. Since 1.24.10.
+ *
+ * 3GPP-specific call end reasons, given when the @QmiWdsVerboseCallEndReasonType is #QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_3GPP.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< underscore_name=qmi_wds_verbose_call_end_reason_3gpp,since=1.0 >*/
+ QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_OPERATOR_DETERMINED_BARRING = 8,
+
+ QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_LLC_SNDCP_FAILURE = 25,
+ QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_INSUFFICIENT_RESOURCES = 26,
+ QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_UNKNOWN_APN = 27,
+ QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_UNKNOWN_PDP = 28,
+ QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_AUTHENTICATION_FAILED = 29,
+ QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_GGSN_REJECT = 30,
+ QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_ACTIVATION_REJECT = 31,
+ QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_OPTION_NOT_SUPPORTED = 32,
+ QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_OPTION_UNSUBSCRIBED = 33,
+ QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_OPTION_TEMPORARILY_OUT_OF_ORDER = 34,
+ QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_NSAPI_ALREADY_USED = 35,
+ QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_REGULAR_DEACTIVATION = 36,
+ QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_QOS_NOT_ACCEPTED = 37,
+ QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_NETWORK_FAILURE = 38,
+ QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_REATTACH_REQUIRED = 39,
+ QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_FEATURE_NOT_SUPPORTED = 40,
+ QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_TFT_SEMANTIC_ERROR = 41,
+ QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_TFT_SYNTAX_ERROR = 42,
+ QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_UNKNOWN_PDP_CONTEXT = 43,
+ QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_FILTER_SEMANTIC_ERROR = 44,
+ QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_FILTER_SYNTAX_ERROR = 45,
+ QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_PDP_WITHOUT_ACTIVE_TFT = 46,
+
+ QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_IPV4_ONLY_ALLOWED = 50,
+ QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_IPV6_ONLY_ALLOWED = 51,
+ QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_SINGLE_ADDRESS_BEARER_ONLY = 52,
+ QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_ESM_INFO_NOT_RECEIVED = 53,
+ QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_PDN_CONNECTION_DOES_NOT_EXIST = 54,
+ QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_MULTIPLE_CONNECTION_TO_SAME_PDN_NOT_ALLOWED = 55,
+
+ QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_INVALID_TRANSACTION_ID = 81,
+
+ QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_MESSAGE_INCORRECT_SEMANTIC = 95,
+ QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_INVALID_MANDATORY_INFO = 96,
+ QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_MESSAGE_TYPE_UNSUPPORTED = 97,
+ QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_MESSAGE_TYPE_NONCOMPATIBLE_STATE = 98,
+ QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_UNKNOWN_INFO_ELEMENT = 99,
+ QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_CONDITIONAL_IE_ERROR = 100,
+ QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_MESSAGE_AND_PROTOCOL_STATE_UNCOMPATIBLE = 101,
+
+ QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_PROTOCOL_ERROR = 111,
+ QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_APN_TYPE_CONFLICT = 112,
+ QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_INVALID_PROXY_CALL_SESSION_CONTROL_FUNCTION_ADDRESS = 113,
+} QmiWdsVerboseCallEndReason3gpp;
+
+/**
+ * QmiWdsVerboseCallEndReasonPpp:
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_PPP_UNKNOWN: Unknown error.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_PPP_TIMEOUT: Timeout.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_PPP_AUTHENTICATION_FAILURE: Authentication failure.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_PPP_OPTION_MISMATCH: Option mismatch.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_PPP_PAP_FAILURE: PAP failure.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_PPP_CHAP_FAILURE: CHAP failure.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_PPP_CLOSE_IN_PROGRESS: Close in progress. Since 1.24.10.
+ *
+ * PPP-specific call end reasons, given when the @QmiWdsVerboseCallEndReasonType is #QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_PPP.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_WDS_VERBOSE_CALL_END_REASON_PPP_UNKNOWN = -1,
+
+ QMI_WDS_VERBOSE_CALL_END_REASON_PPP_TIMEOUT = 1,
+ QMI_WDS_VERBOSE_CALL_END_REASON_PPP_AUTHENTICATION_FAILURE = 2,
+ QMI_WDS_VERBOSE_CALL_END_REASON_PPP_OPTION_MISMATCH = 3,
+
+ QMI_WDS_VERBOSE_CALL_END_REASON_PPP_PAP_FAILURE = 31,
+ QMI_WDS_VERBOSE_CALL_END_REASON_PPP_CHAP_FAILURE = 32,
+ QMI_WDS_VERBOSE_CALL_END_REASON_PPP_CLOSE_IN_PROGRESS = 33,
+
+} QmiWdsVerboseCallEndReasonPpp;
+
+/**
+ * QmiWdsVerboseCallEndReasonEhrpd:
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_SUBSCRIPTION_LIMITED_TO_IPV4: Subscription limited to IPv4.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_SUBSCRIPTION_LIMITED_TO_IPV6: Subscription limited to IPv6.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_TIMEOUT: VSNCP specific. timeout.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_FAILURE: VSNCP specific. failure.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_GENERAL_ERROR: VSNCP specific. 3GPP2 general error.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_UNAUTHENTICATED_APN: VSNCP specific. 3GPP2 unauthenticated APN.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_PDN_LIMIT_EXCEEDED: VSNCP specific. 3GPP2 PDN limit exceeded.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_NO_PDN_GATEWAY: VSNCP specific. 3GPP2 no PDN gateway.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_PDN_GATEWAY_UNREACHABLE: VSNCP specific. 3GPP2 PDN gateway unreachable.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_PDN_GATEWAY_REJECTED: VSNCP specific. 3GPP2 PDN gateway rejected.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_INSUFFICIENT_PARAMETERS: VSNCP specific. 3GPP2 insufficient parameters.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_RESOURCE_UNAVAILABLE: VSNCP specific. 3GPP2 resource unavailable.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_ADMINISTRATIVELY_PROHIBITED: VSNCP specific. 3GPP2 administratively prohibited.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_PDN_ID_IN_USE: VSNCP specific. 3GPP2 PDN ID in use.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_SUBSCRIPTION_LIMITATION: VSNCP specific. 3GPP2 subscription limitation.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_PDN_EXISTS_FOR_THIS_APN: VSNCP specific. 3GPP2 PDN exists for this APN.
+ *
+ * eHRPD-specific call end reasons, given when the @QmiWdsVerboseCallEndReasonType is #QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_EHRPD.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_SUBSCRIPTION_LIMITED_TO_IPV4 = 1,
+ QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_SUBSCRIPTION_LIMITED_TO_IPV6 = 2,
+
+ QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_TIMEOUT = 4,
+ QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_FAILURE = 5,
+ QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_GENERAL_ERROR = 6,
+ QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_UNAUTHENTICATED_APN = 7,
+ QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_PDN_LIMIT_EXCEEDED = 8,
+ QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_NO_PDN_GATEWAY = 9,
+ QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_PDN_GATEWAY_UNREACHABLE = 10,
+ QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_PDN_GATEWAY_REJECTED = 11,
+ QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_INSUFFICIENT_PARAMETERS = 12,
+ QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_RESOURCE_UNAVAILABLE = 13,
+ QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_ADMINISTRATIVELY_PROHIBITED = 14,
+ QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_PDN_ID_IN_USE = 15,
+ QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_SUBSCRIPTION_LIMITATION = 16,
+ QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_PDN_EXISTS_FOR_THIS_APN = 17
+} QmiWdsVerboseCallEndReasonEhrpd;
+
+/**
+ * QmiWdsVerboseCallEndReasonIpv6:
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_IPV6_PREFIX_UNAVAILABLE: Prefix unavailable.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_IPV6_HRPD_IPV6_DISABLED: HRDP IPv6 disabled.
+ * @QMI_WDS_VERBOSE_CALL_END_REASON_IPV6_DISABLED: IPv6 disabled. Since 1.24.10.
+ *
+ * IPv6-specific call end reasons, given when the @QmiWdsVerboseCallEndReasonType is #QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_IPV6.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_WDS_VERBOSE_CALL_END_REASON_IPV6_PREFIX_UNAVAILABLE = 1,
+ QMI_WDS_VERBOSE_CALL_END_REASON_IPV6_HRPD_IPV6_DISABLED = 2,
+ QMI_WDS_VERBOSE_CALL_END_REASON_IPV6_DISABLED = 3,
+} QmiWdsVerboseCallEndReasonIpv6;
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI WDS Get Packet Service Status' message */
+
+/**
+ * QmiWdsConnectionStatus:
+ * @QMI_WDS_CONNECTION_STATUS_UNKNOWN: Unknown status.
+ * @QMI_WDS_CONNECTION_STATUS_DISCONNECTED: Network is disconnected
+ * @QMI_WDS_CONNECTION_STATUS_CONNECTED: Network is connected.
+ * @QMI_WDS_CONNECTION_STATUS_SUSPENDED: Network connection is suspended.
+ * @QMI_WDS_CONNECTION_STATUS_AUTHENTICATING: Network authentication is ongoing.
+ *
+ * Status of the network connection.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_WDS_CONNECTION_STATUS_UNKNOWN = 0,
+ QMI_WDS_CONNECTION_STATUS_DISCONNECTED = 1,
+ QMI_WDS_CONNECTION_STATUS_CONNECTED = 2,
+ QMI_WDS_CONNECTION_STATUS_SUSPENDED = 3,
+ QMI_WDS_CONNECTION_STATUS_AUTHENTICATING = 4
+} QmiWdsConnectionStatus;
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI WDS Get Data Bearer Technology' message */
+
+/**
+ * QmiWdsDataBearerTechnology:
+ * @QMI_WDS_DATA_BEARER_TECHNOLOGY_UNKNOWN: Unknown.
+ * @QMI_WDS_DATA_BEARER_TECHNOLOGY_CDMA20001X: CDMA2000 1x.
+ * @QMI_WDS_DATA_BEARER_TECHNOLOGY_1xEVDO: CDMA2000 HRPD 1xEVDO.
+ * @QMI_WDS_DATA_BEARER_TECHNOLOGY_GSM: GSM.
+ * @QMI_WDS_DATA_BEARER_TECHNOLOGY_UMTS: UMTS.
+ * @QMI_WDS_DATA_BEARER_TECHNOLOGY_1xEVDO_REVA: CDMA2000 HRPD 1xEVDO RevA.
+ * @QMI_WDS_DATA_BEARER_TECHNOLOGY_EDGE: EDGE.
+ * @QMI_WDS_DATA_BEARER_TECHNOLOGY_HSDPA: HSDPA and WCDMA.
+ * @QMI_WDS_DATA_BEARER_TECHNOLOGY_HSUPA: WCDMA and HSUPA.
+ * @QMI_WDS_DATA_BEARER_TECHNOLOGY_HSDPA_HSUPDA: HSDPA and HSUPA.
+ * @QMI_WDS_DATA_BEARER_TECHNOLOGY_LTE: LTE.
+ * @QMI_WDS_DATA_BEARER_TECHNOLOGY_EHRPD: CDMA2000 eHRPD.
+ * @QMI_WDS_DATA_BEARER_TECHNOLOGY_HSDPAPLUS: HSDPA+ and WCDMA.
+ * @QMI_WDS_DATA_BEARER_TECHNOLOGY_HSDPAPLUS_HSUPA: HSDPA+ and HSUPA.
+ * @QMI_WDS_DATA_BEARER_TECHNOLOGY_DCHSDPAPLUS: DC-HSDPA+ and WCDMA.
+ * @QMI_WDS_DATA_BEARER_TECHNOLOGY_DCHSDPAPLUS_HSUPA: DC-HSDPA+ and HSUPA.
+ * @QMI_WDS_DATA_BEARER_TECHNOLOGY_HSDPAPLUS_PLUS_64QAM: HSDPA+ with 64QAM. Since: 1.18.
+ * @QMI_WDS_DATA_BEARER_TECHNOLOGY_HSDPAPLUS_PLUS_64QAM_HSUPA: HSDPA+ with 64QAM and HSUPA. Since: 1.18.
+ * @QMI_WDS_DATA_BEARER_TECHNOLOGY_TDSCDMA: TD-SCDMA. Since: 1.18.
+ * @QMI_WDS_DATA_BEARER_TECHNOLOGY_TDSCDMA_HSDPA: TD-SCDMA and HSDPA. Since: 1.18.
+ * @QMI_WDS_DATA_BEARER_TECHNOLOGY_TDSCDMA_HSUPA: TD-SCDMA and HSUPA. Since: 1.18.
+ *
+ * Data bearer technology.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_WDS_DATA_BEARER_TECHNOLOGY_UNKNOWN = -1,
+ QMI_WDS_DATA_BEARER_TECHNOLOGY_CDMA20001X = 0x01,
+ QMI_WDS_DATA_BEARER_TECHNOLOGY_1xEVDO = 0x02,
+ QMI_WDS_DATA_BEARER_TECHNOLOGY_GSM = 0x03,
+ QMI_WDS_DATA_BEARER_TECHNOLOGY_UMTS = 0x04,
+ QMI_WDS_DATA_BEARER_TECHNOLOGY_1xEVDO_REVA = 0x05,
+ QMI_WDS_DATA_BEARER_TECHNOLOGY_EDGE = 0x06,
+ QMI_WDS_DATA_BEARER_TECHNOLOGY_HSDPA = 0x07,
+ QMI_WDS_DATA_BEARER_TECHNOLOGY_HSUPA = 0x08,
+ QMI_WDS_DATA_BEARER_TECHNOLOGY_HSDPA_HSUPDA = 0x09,
+ QMI_WDS_DATA_BEARER_TECHNOLOGY_LTE = 0x0A,
+ QMI_WDS_DATA_BEARER_TECHNOLOGY_EHRPD = 0x0B,
+ QMI_WDS_DATA_BEARER_TECHNOLOGY_HSDPAPLUS = 0x0C,
+ QMI_WDS_DATA_BEARER_TECHNOLOGY_HSDPAPLUS_HSUPA = 0x0D,
+ QMI_WDS_DATA_BEARER_TECHNOLOGY_DCHSDPAPLUS = 0x0E,
+ QMI_WDS_DATA_BEARER_TECHNOLOGY_DCHSDPAPLUS_HSUPA = 0x0F,
+ QMI_WDS_DATA_BEARER_TECHNOLOGY_HSDPAPLUS_PLUS_64QAM = 0x10,
+ QMI_WDS_DATA_BEARER_TECHNOLOGY_HSDPAPLUS_PLUS_64QAM_HSUPA = 0x11,
+ QMI_WDS_DATA_BEARER_TECHNOLOGY_TDSCDMA = 0x12,
+ QMI_WDS_DATA_BEARER_TECHNOLOGY_TDSCDMA_HSDPA = 0x13,
+ QMI_WDS_DATA_BEARER_TECHNOLOGY_TDSCDMA_HSUPA = 0x14,
+} QmiWdsDataBearerTechnology;
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI WDS Get Current Data Bearer Technology' message */
+
+/**
+ * QmiWdsNetworkType:
+ * @QMI_WDS_NETWORK_TYPE_UNKNOWN: Unknown.
+ * @QMI_WDS_NETWORK_TYPE_3GPP2: 3GPP2 network type.
+ * @QMI_WDS_NETWORK_TYPE_3GPP: 3GPP network type.
+ *
+ * Network type of the data bearer.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_WDS_NETWORK_TYPE_UNKNOWN = 0,
+ QMI_WDS_NETWORK_TYPE_3GPP2 = 1,
+ QMI_WDS_NETWORK_TYPE_3GPP = 2
+} QmiWdsNetworkType;
+
+/**
+ * QmiWdsDataSystemNetworkType:
+ * @QMI_WDS_DATA_SYSTEM_NETWORK_TYPE_3GPP2: 3GPP2 network type.
+ * @QMI_WDS_DATA_SYSTEM_NETWORK_TYPE_3GPP: 3GPP network type.
+ *
+ * Network type of the data system.
+ *
+ * Since: 1.14
+ */
+typedef enum { /*< since=1.14 >*/
+ QMI_WDS_DATA_SYSTEM_NETWORK_TYPE_3GPP = 0,
+ QMI_WDS_DATA_SYSTEM_NETWORK_TYPE_3GPP2 = 1,
+} QmiWdsDataSystemNetworkType;
+
+/**
+ * QmiWdsDataSystem:
+ * @QMI_WDS_DATA_SYSTEM_UNKNOWN: unknown
+ * @QMI_WDS_DATA_SYSTEM_CDMA1X: CDMA 1x
+ * @QMI_WDS_DATA_SYSTEM_CDMA1X_EVDO: CDMA 1x EVDO
+ * @QMI_WDS_DATA_SYSTEM_GPRS: GPRS
+ * @QMI_WDS_DATA_SYSTEM_WCDMA: WCDMA
+ * @QMI_WDS_DATA_SYSTEM_LTE: LTE
+ * @QMI_WDS_DATA_SYSTEM_TDSCDMA: TD-SCDMA.
+ *
+ * Data system type.
+ *
+ * Since: 1.18
+ */
+typedef enum { /*< since=1.18 >*/
+ QMI_WDS_DATA_SYSTEM_UNKNOWN = 0,
+ QMI_WDS_DATA_SYSTEM_CDMA1X = 1,
+ QMI_WDS_DATA_SYSTEM_CDMA1X_EVDO = 2,
+ QMI_WDS_DATA_SYSTEM_GPRS = 3,
+ QMI_WDS_DATA_SYSTEM_WCDMA = 4,
+ QMI_WDS_DATA_SYSTEM_LTE = 5,
+ QMI_WDS_DATA_SYSTEM_TDSCDMA = 6,
+} QmiWdsDataSystem;
+
+/**
+ * QmiWdsRat3gpp2:
+ * @QMI_WDS_RAT_3GPP2_NONE: Unknown, to be ignored.
+ * @QMI_WDS_RAT_3GPP2_CDMA1X: CDMA 1x.
+ * @QMI_WDS_RAT_3GPP2_EVDO_REV0: EVDO Rev0.
+ * @QMI_WDS_RAT_3GPP2_EVDO_REVA: EVDO RevA.
+ * @QMI_WDS_RAT_3GPP2_EVDO_REVB: EVDO RevB.
+ * @QMI_WDS_RAT_3GPP2_EHRPD: eHRPD. Since: 1.18.
+ * @QMI_WDS_RAT_3GPP2_FMC: FMC. Since: 1.18.
+ * @QMI_WDS_RAT_3GPP2_NULL_BEARER: No bearer.
+ *
+ * Flags specifying the 3GPP2-specific Radio Access Technology, when the data
+ * bearer network type is @QMI_WDS_NETWORK_TYPE_3GPP2.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< underscore_name=qmi_wds_rat_3gpp2,since=1.0 >*/
+ QMI_WDS_RAT_3GPP2_NONE = 0,
+ QMI_WDS_RAT_3GPP2_CDMA1X = 1 << 0,
+ QMI_WDS_RAT_3GPP2_EVDO_REV0 = 1 << 1,
+ QMI_WDS_RAT_3GPP2_EVDO_REVA = 1 << 2,
+ QMI_WDS_RAT_3GPP2_EVDO_REVB = 1 << 3,
+ QMI_WDS_RAT_3GPP2_EHRPD = 1 << 4,
+ QMI_WDS_RAT_3GPP2_FMC = 1 << 5,
+ QMI_WDS_RAT_3GPP2_NULL_BEARER = 1 << 15
+} QmiWdsRat3gpp2;
+
+/**
+ * QmiWdsRat3gpp:
+ * @QMI_WDS_RAT_3GPP_NONE: Unknown, to be ignored.
+ * @QMI_WDS_RAT_3GPP_WCDMA: WCDMA.
+ * @QMI_WDS_RAT_3GPP_GPRS: GPRS.
+ * @QMI_WDS_RAT_3GPP_HSDPA: HSDPA.
+ * @QMI_WDS_RAT_3GPP_HSUPA: HSUPA.
+ * @QMI_WDS_RAT_3GPP_EDGE: EDGE.
+ * @QMI_WDS_RAT_3GPP_LTE: LTE.
+ * @QMI_WDS_RAT_3GPP_HSDPAPLUS: HSDPA+.
+ * @QMI_WDS_RAT_3GPP_DCHSDPAPLUS: DC-HSDPA+.
+ * @QMI_WDS_RAT_3GPP_64QAM: 64QAM. Since: 1.18.
+ * @QMI_WDS_RAT_3GPP_TDSCDMA: TD-SCDMA. Since: 1.18.
+ * @QMI_WDS_RAT_3GPP_NULL_BEARER: No bearer.
+ *
+ * Flags specifying the 3GPP-specific Radio Access Technology, when the data
+ * bearer network type is @QMI_WDS_NETWORK_TYPE_3GPP.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< underscore_name=qmi_wds_rat_3gpp,since=1.0 >*/
+ QMI_WDS_RAT_3GPP_NONE = 0,
+ QMI_WDS_RAT_3GPP_WCDMA = 1 << 0,
+ QMI_WDS_RAT_3GPP_GPRS = 1 << 1,
+ QMI_WDS_RAT_3GPP_HSDPA = 1 << 2,
+ QMI_WDS_RAT_3GPP_HSUPA = 1 << 3,
+ QMI_WDS_RAT_3GPP_EDGE = 1 << 4,
+ QMI_WDS_RAT_3GPP_LTE = 1 << 5,
+ QMI_WDS_RAT_3GPP_HSDPAPLUS = 1 << 6,
+ QMI_WDS_RAT_3GPP_DCHSDPAPLUS = 1 << 7,
+ QMI_WDS_RAT_3GPP_64QAM = 1 << 8,
+ QMI_WDS_RAT_3GPP_TDSCDMA = 1 << 9,
+ QMI_WDS_RAT_3GPP_NULL_BEARER = 1 << 15
+} QmiWdsRat3gpp;
+
+/**
+ * QmiWdsSoCdma1x:
+ * @QMI_WDS_SO_CDMA1X_NONE: Unknown, to be ignored.
+ * @QMI_WDS_SO_CDMA1X_IS95: IS95.
+ * @QMI_WDS_SO_CDMA1X_IS2000: IS2000.
+ * @QMI_WDS_SO_CDMA1X_IS2000_REL_A: IS2000 RelA.
+ *
+ * Flags specifying the Service Option when the bearer network type is
+ * @QMI_WDS_NETWORK_TYPE_3GPP2 and when the Radio Access Technology mask
+ * contains @QMI_WDS_RAT_3GPP2_CDMA1X.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_WDS_SO_CDMA1X_NONE = 0,
+ QMI_WDS_SO_CDMA1X_IS95 = 1 << 0,
+ QMI_WDS_SO_CDMA1X_IS2000 = 1 << 1,
+ QMI_WDS_SO_CDMA1X_IS2000_REL_A = 1 << 2
+} QmiWdsSoCdma1x;
+
+/**
+ * QmiWdsSoEvdoRev0:
+ * @QMI_WDS_SO_EVDO_REV0_NONE: Unknown, to be ignored.
+ * @QMI_WDS_SO_EVDO_REV0_DPA: DPA.
+ *
+ * Flags specifying the Service Option when the bearer network type is
+ * @QMI_WDS_NETWORK_TYPE_3GPP2 and when the Radio Access Technology mask
+ * contains @QMI_WDS_RAT_3GPP2_EVDO_REV0.
+ *
+ * Since: 1.18
+ */
+typedef enum { /*< since=1.18 >*/
+ QMI_WDS_SO_EVDO_REV0_NONE = 0,
+ QMI_WDS_SO_EVDO_REV0_DPA = 1 << 0,
+} QmiWdsSoEvdoRev0;
+
+/**
+ * QmiWdsSoEvdoRevA:
+ * @QMI_WDS_SO_EVDO_REVA_NONE: Unknown, to be ignored.
+ * @QMI_WDS_SO_EVDO_REVA_DPA: DPA.
+ * @QMI_WDS_SO_EVDO_REVA_MFPA: MFPA.
+ * @QMI_WDS_SO_EVDO_REVA_EMPA: EMPA.
+ * @QMI_WDS_SO_EVDO_REVA_EMPA_EHRPD: EMPA eHRPD.
+ *
+ * Flags specifying the Service Option when the bearer network type is
+ * @QMI_WDS_NETWORK_TYPE_3GPP2 and when the Radio Access Technology mask
+ * contains @QMI_WDS_RAT_3GPP2_EVDO_REVA.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< underscore_name=qmi_wds_so_evdo_reva,since=1.0 >*/
+ QMI_WDS_SO_EVDO_REVA_NONE = 0,
+ QMI_WDS_SO_EVDO_REVA_DPA = 1 << 0,
+ QMI_WDS_SO_EVDO_REVA_MFPA = 1 << 1,
+ QMI_WDS_SO_EVDO_REVA_EMPA = 1 << 2,
+ QMI_WDS_SO_EVDO_REVA_EMPA_EHRPD = 1 << 3,
+} QmiWdsSoEvdoRevA;
+
+/**
+ * QmiWdsSoEvdoRevB:
+ * @QMI_WDS_SO_EVDO_REVB_NONE: Unknown, to be ignored.
+ * @QMI_WDS_SO_EVDO_REVB_DPA: DPA.
+ * @QMI_WDS_SO_EVDO_REVB_MFPA: MFPA.
+ * @QMI_WDS_SO_EVDO_REVB_EMPA: EMPA.
+ * @QMI_WDS_SO_EVDO_REVB_EMPA_EHRPD: EMPA eHRPD.
+ * @QMI_WDS_SO_EVDO_REVB_MMPA: MMPA.
+ * @QMI_WDS_SO_EVDO_REVB_MMPA_EHRPD: MMPA eHRPD.
+ *
+ * Flags specifying the Service Option when the bearer network type is
+ * @QMI_WDS_NETWORK_TYPE_3GPP2 and when the Radio Access Technology mask
+ * contains @QMI_WDS_RAT_3GPP2_EVDO_REVB.
+ *
+ * Since: 1.18
+ */
+typedef enum { /*< underscore_name=qmi_wds_so_evdo_revb,since=1.18 >*/
+ QMI_WDS_SO_EVDO_REVB_NONE = 0,
+ QMI_WDS_SO_EVDO_REVB_DPA = 1 << 0,
+ QMI_WDS_SO_EVDO_REVB_MFPA = 1 << 1,
+ QMI_WDS_SO_EVDO_REVB_EMPA = 1 << 2,
+ QMI_WDS_SO_EVDO_REVB_EMPA_EHRPD = 1 << 3,
+ QMI_WDS_SO_EVDO_REVB_MMPA = 1 << 4,
+ QMI_WDS_SO_EVDO_REVB_MMPA_EHRPD = 1 << 5,
+} QmiWdsSoEvdoRevB;
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI WDS Get Current Settings' message */
+
+/**
+ * QmiWdsGetCurrentSettingsRequestedSettings:
+ * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_NONE: no settings requested
+ * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_PROFILE_ID: request profile ID
+ * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_PROFILE_NAME: request profile name
+ * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_PDP_TYPE: request PDP context type
+ * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_APN_NAME: request APN name
+ * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_DNS_ADDRESS: request DNS server addresses
+ * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_GRANTED_QOS: request granted QoS
+ * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_USERNAME: request username
+ * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_AUTH_PROTOCOL: request authentication protocol, ie PAP/CHAP/none.
+ * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_IP_ADDRESS: request IP address
+ * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_GATEWAY_INFO: request gateway address
+ * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_PCSCF_ADDRESS: request PCSCF address
+ * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_PCSCF_SERVER_ADDRESS_LIST: request PCSCF server address list
+ * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_PCSCF_DOMAIN_NAME_LIST: request PCSCF domain name list
+ * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_MTU: request MTU
+ * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_DOMAIN_NAME_LIST: request domain name list
+ * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_IP_FAMILY: request IP family, ie IPv4 or IPv6.
+ * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_IMCN_FLAG: request IMCN flag
+ * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_EXTENDED_TECHNOLOGY: request extended technology info
+ *
+ * Flags specifying which specific settings to return when requesting the
+ * current WDS bearer settings.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_NONE = 0,
+ QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_PROFILE_ID = 1 << 0,
+ QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_PROFILE_NAME = 1 << 1,
+ QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_PDP_TYPE = 1 << 2,
+ QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_APN_NAME = 1 << 3,
+ QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_DNS_ADDRESS = 1 << 4,
+ QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_GRANTED_QOS = 1 << 5,
+ QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_USERNAME = 1 << 6,
+ QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_AUTH_PROTOCOL = 1 << 7,
+ QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_IP_ADDRESS = 1 << 8,
+ QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_GATEWAY_INFO = 1 << 9,
+ QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_PCSCF_ADDRESS = 1 << 10,
+ QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_PCSCF_SERVER_ADDRESS_LIST = 1 << 11,
+ QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_PCSCF_DOMAIN_NAME_LIST = 1 << 12,
+ QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_MTU = 1 << 13,
+ QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_DOMAIN_NAME_LIST = 1 << 14,
+ QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_IP_FAMILY = 1 << 15,
+ QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_IMCN_FLAG = 1 << 16,
+ QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_EXTENDED_TECHNOLOGY = 1 << 17,
+} QmiWdsGetCurrentSettingsRequestedSettings;
+
+/**
+ * QmiWdsPdpType:
+ * @QMI_WDS_PDP_TYPE_IPV4: IPv4
+ * @QMI_WDS_PDP_TYPE_PPP: PPP
+ * @QMI_WDS_PDP_TYPE_IPV6: IPv6
+ * @QMI_WDS_PDP_TYPE_IPV4_OR_IPV6: IPv4 and IPv6 combined context
+ *
+ * PDP context type.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_WDS_PDP_TYPE_IPV4 = 0,
+ QMI_WDS_PDP_TYPE_PPP = 1,
+ QMI_WDS_PDP_TYPE_IPV6 = 2,
+ QMI_WDS_PDP_TYPE_IPV4_OR_IPV6 = 3
+} QmiWdsPdpType;
+
+/**
+ * QmiWdsTrafficClass:
+ * @QMI_WDS_TRAFFIC_CLASS_SUBSCRIBED: default class, best-effort
+ * @QMI_WDS_TRAFFIC_CLASS_CONVERSATIONAL: two-way video/voice, most delay sensitive
+ * @QMI_WDS_TRAFFIC_CLASS_STREAMING: one-way video/audio, delay sensitive
+ * @QMI_WDS_TRAFFIC_CLASS_INTERACTIVE: delay-sensitive, e.g. browsing, SSH.
+ * @QMI_WDS_TRAFFIC_CLASS_BACKGROUND: delay-insensitive, e.g. downloads, email.
+ *
+ * QoS Traffic Classes.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_WDS_TRAFFIC_CLASS_SUBSCRIBED = 0,
+ QMI_WDS_TRAFFIC_CLASS_CONVERSATIONAL = 1,
+ QMI_WDS_TRAFFIC_CLASS_STREAMING = 2,
+ QMI_WDS_TRAFFIC_CLASS_INTERACTIVE = 3,
+ QMI_WDS_TRAFFIC_CLASS_BACKGROUND = 4
+} QmiWdsTrafficClass;
+
+/**
+ * QmiWdsAuthentication:
+ * @QMI_WDS_AUTHENTICATION_NONE: no authentication
+ * @QMI_WDS_AUTHENTICATION_PAP: PAP authentication
+ * @QMI_WDS_AUTHENTICATION_CHAP: CHAP authentication
+ *
+ * PDP context authentication protocols.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_WDS_AUTHENTICATION_NONE = 0,
+ QMI_WDS_AUTHENTICATION_PAP = 1 << 0,
+ QMI_WDS_AUTHENTICATION_CHAP = 1 << 1
+} QmiWdsAuthentication;
+
+/**
+ * QmiWdsProfileType:
+ * @QMI_WDS_PROFILE_TYPE_3GPP: 3GPP profile type.
+ * @QMI_WDS_PROFILE_TYPE_3GPP2: 3GPP2 profile type.
+ *
+ * Profile network type family.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_WDS_PROFILE_TYPE_3GPP = 0,
+ QMI_WDS_PROFILE_TYPE_3GPP2 = 1
+} QmiWdsProfileType;
+
+ /**
+ * QmiWdsProfileFamily:
+ * @QMI_WDS_PROFILE_FAMILY_EMBEDDED: Embedded profile family.
+ * @QMI_WDS_PROFILE_FAMILY_TETHERED: Tethered profile family.
+ *
+ * Profile family.
+ *
+ * Since: 1.22
+ */
+ typedef enum { /*< since=1.22 >*/
+ QMI_WDS_PROFILE_FAMILY_EMBEDDED = 0,
+ QMI_WDS_PROFILE_FAMILY_TETHERED = 1
+ } QmiWdsProfileFamily;
+
+/**
+ * QmiWdsDeliveryOrder:
+ * @QMI_WDS_QOS_DELIVERY_ORDER_SUBSCRIBE: Subscribe.
+ * @QMI_WDS_QOS_DELIVERY_ORDER_ON: On.
+ * @QMI_WDS_QOS_DELIVERY_ORDER_OFF: Off.
+ *
+ * QoS delivery order.
+ *
+ * Since: 1.14
+ */
+typedef enum { /*< since=1.14 >*/
+ QMI_WDS_QOS_DELIVERY_ORDER_SUBSCRIBE = 0,
+ QMI_WDS_QOS_DELIVERY_ORDER_ON = 1,
+ QMI_WDS_QOS_DELIVERY_ORDER_OFF = 2
+} QmiWdsDeliveryOrder;
+
+/**
+ * QmiWdsSduErrorRatio:
+ * @QMI_WDS_SDU_ERROR_RATIO_SUBSCRIBE: Subscribe.
+ * @QMI_WDS_SDU_ERROR_RATIO_1E2: 1x10^2.
+ * @QMI_WDS_SDU_ERROR_RATIO_7E3: 7x10^3.
+ * @QMI_WDS_SDU_ERROR_RATIO_1E3: 1x10^3.
+ * @QMI_WDS_SDU_ERROR_RATIO_1E4: 1x10^4.
+ * @QMI_WDS_SDU_ERROR_RATIO_1E5: 1x10^5.
+ * @QMI_WDS_SDU_ERROR_RATIO_1E6: 1x10^6.
+ * @QMI_WDS_SDU_ERROR_RATIO_1E1: 1x10^7.
+ *
+ * Target value for the fraction of SDUs lost or detected as erroneous.
+ *
+ * Since: 1.14
+ */
+typedef enum { /*< since=1.14 >*/
+ QMI_WDS_SDU_ERROR_RATIO_SUBSCRIBE = 0,
+ QMI_WDS_SDU_ERROR_RATIO_1E2 = 1,
+ QMI_WDS_SDU_ERROR_RATIO_7E3 = 2,
+ QMI_WDS_SDU_ERROR_RATIO_1E3 = 3,
+ QMI_WDS_SDU_ERROR_RATIO_1E4 = 4,
+ QMI_WDS_SDU_ERROR_RATIO_1E5 = 5,
+ QMI_WDS_SDU_ERROR_RATIO_1E6 = 6,
+ QMI_WDS_SDU_ERROR_RATIO_1E1 = 7
+} QmiWdsSduErrorRatio;
+
+/**
+ * QmiWdsSduResidualBitErrorRatio:
+ * @QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_SUBSCRIBE: Subscribe.
+ * @QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_5E2: 5x10^2.
+ * @QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_1E2: 1x10^2.
+ * @QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_5E3: 5x10^3.
+ * @QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_4E3: 4x10^3.
+ * @QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_1E3: 1x10^3.
+ * @QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_1E4: 1x10^4.
+ * @QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_1E5: 1x10^5.
+ * @QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_1E6: 1x10^6.
+ * @QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_6E8: 6x10^8.
+ *
+ * Target value for the undetected bit error ratio in the delivered SDUs.
+ *
+ * Since: 1.14
+ */
+typedef enum { /*< since=1.14 >*/
+ QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_SUBSCRIBE = 0,
+ QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_5E2 = 1,
+ QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_1E2 = 2,
+ QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_5E3 = 3,
+ QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_4E3 = 4,
+ QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_1E3 = 5,
+ QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_1E4 = 6,
+ QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_1E5 = 7,
+ QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_1E6 = 8,
+ QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_6E8 = 9
+} QmiWdsSduResidualBitErrorRatio;
+
+/**
+ * QmiWdsSduErroneousDelivery:
+ * @QMI_WDS_SDU_ERRONEOUS_DELIVERY_SUBSCRIBE: Subscribe.
+ * @QMI_WDS_SDU_ERRONEOUS_DELIVERY_NO_DETECTION: No detection.
+ * @QMI_WDS_SDU_ERRONEOUS_DELIVERY_ENABLED: Erroneous SDUs are delivered.
+ * @QMI_WDS_SDU_ERRONEOUS_DELIVERY_DISABLED: Erroneous SDUs are delivered.
+ *
+ * Whether SDUs detected as erroneous are delivered or not.
+ *
+ * Since: 1.14
+ */
+typedef enum { /*< since=1.14 >*/
+ QMI_WDS_SDU_ERRONEOUS_DELIVERY_SUBSCRIBE = 0,
+ QMI_WDS_SDU_ERRONEOUS_DELIVERY_NO_DETECTION = 1,
+ QMI_WDS_SDU_ERRONEOUS_DELIVERY_ENABLED = 2,
+ QMI_WDS_SDU_ERRONEOUS_DELIVERY_DISABLED = 3
+} QmiWdsSduErroneousDelivery;
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI WDS Get Packet Statistics' message */
+
+/**
+ * QmiWdsPacketStatisticsMaskFlag:
+ * @QMI_WDS_PACKET_STATISTICS_MASK_FLAG_TX_PACKETS_OK: Request count of correctly sent packets.
+ * @QMI_WDS_PACKET_STATISTICS_MASK_FLAG_RX_PACKETS_OK: Request count of correctly received packets.
+ * @QMI_WDS_PACKET_STATISTICS_MASK_FLAG_TX_PACKETS_ERROR: Request count of sent packets with error.
+ * @QMI_WDS_PACKET_STATISTICS_MASK_FLAG_RX_PACKETS_ERROR: Request count of received packets with error.
+ * @QMI_WDS_PACKET_STATISTICS_MASK_FLAG_TX_OVERFLOWS: Request count of transmitter overflows.
+ * @QMI_WDS_PACKET_STATISTICS_MASK_FLAG_RX_OVERFLOWS: Request count of receiver overflows.
+ * @QMI_WDS_PACKET_STATISTICS_MASK_FLAG_TX_BYTES_OK: Request count of correctly sent bytes.
+ * @QMI_WDS_PACKET_STATISTICS_MASK_FLAG_RX_BYTES_OK: Request count of correctly received bytes.
+ * @QMI_WDS_PACKET_STATISTICS_MASK_FLAG_TX_PACKETS_DROPPED: Request count of dropped packets in transmission.
+ * @QMI_WDS_PACKET_STATISTICS_MASK_FLAG_RX_PACKETS_DROPPED: Request count of dropped packets in reception.
+ *
+ * Mask to use when requesting packet statistics.
+ *
+ * Since: 1.6
+ */
+typedef enum { /*< since=1.6 >*/
+ QMI_WDS_PACKET_STATISTICS_MASK_FLAG_TX_PACKETS_OK = 1 << 0,
+ QMI_WDS_PACKET_STATISTICS_MASK_FLAG_RX_PACKETS_OK = 1 << 1,
+ QMI_WDS_PACKET_STATISTICS_MASK_FLAG_TX_PACKETS_ERROR = 1 << 2,
+ QMI_WDS_PACKET_STATISTICS_MASK_FLAG_RX_PACKETS_ERROR = 1 << 3,
+ QMI_WDS_PACKET_STATISTICS_MASK_FLAG_TX_OVERFLOWS = 1 << 4,
+ QMI_WDS_PACKET_STATISTICS_MASK_FLAG_RX_OVERFLOWS = 1 << 5,
+ QMI_WDS_PACKET_STATISTICS_MASK_FLAG_TX_BYTES_OK = 1 << 6,
+ QMI_WDS_PACKET_STATISTICS_MASK_FLAG_RX_BYTES_OK = 1 << 7,
+ QMI_WDS_PACKET_STATISTICS_MASK_FLAG_TX_PACKETS_DROPPED = 1 << 8,
+ QMI_WDS_PACKET_STATISTICS_MASK_FLAG_RX_PACKETS_DROPPED = 1 << 9
+} QmiWdsPacketStatisticsMaskFlag;
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI WDS Get Profile List' message */
+
+/**
+ * QmiWdsDsProfileError:
+ * @QMI_WDS_DS_PROFILE_ERROR_UNKNOWN: Unknown DS profile error.
+ * @QMI_WDS_DS_PROFILE_ERROR_FAIL: General failure.
+ * @QMI_WDS_DS_PROFILE_ERROR_INVALID_HANDLE: Invalid handle.
+ * @QMI_WDS_DS_PROFILE_ERROR_INVALID_OPERATION: Invalid operation.
+ * @QMI_WDS_DS_PROFILE_ERROR_INVALID_PROFILE_TYPE: Invalid profile type.
+ * @QMI_WDS_DS_PROFILE_ERROR_INVALID_PROFILE_NUMBER: Invalid profile number.
+ * @QMI_WDS_DS_PROFILE_ERROR_INVALID_PROFILE_ID: Invalid profile identifier.
+ * @QMI_WDS_DS_PROFILE_ERROR_INVALID_ARGUMENT: Invalid argument.
+ * @QMI_WDS_DS_PROFILE_ERROR_REGISTRY_NOT_INITIALIZED: Registry not initialized.
+ * @QMI_WDS_DS_PROFILE_ERROR_INVALID_PARAMETER_LENGTH: Invalid parameter length.
+ * @QMI_WDS_DS_PROFILE_ERROR_LIST_END: List end, profile not found.
+ * @QMI_WDS_DS_PROFILE_ERROR_INVALID_SUBSCRIPTION_ID: Invalid subscription identifier.
+ * @QMI_WDS_DS_PROFILE_ERROR_INVALID_PROFILE_FAMILY: Invalid profile family.
+ * @QMI_WDS_DS_PROFILE_ERROR_3GPP_INVALID_PROFILE_FAMILY: Invalid 3GPP profile family.
+ * @QMI_WDS_DS_PROFILE_ERROR_3GPP_ACCESS_ERROR: Error accessing 3GPP profiles.
+ * @QMI_WDS_DS_PROFILE_ERROR_3GPP_CONTEXT_NOT_DEFINED: 3GPP profile doesn't have a valid context.
+ * @QMI_WDS_DS_PROFILE_ERROR_3GPP_VALID_FLAG_NOT_SET: 3GPP profile doesn't have valid flag set.
+ * @QMI_WDS_DS_PROFILE_ERROR_3GPP_READ_ONLY_FLAG_SET: 3GPP profile has read-only flag set.
+ * @QMI_WDS_DS_PROFILE_ERROR_3GPP_OUT_OF_PROFILES: Out of 3GPP profiles.
+ * @QMI_WDS_DS_PROFILE_ERROR_3GPP2_INVALID_PROFILE_ID: Invalid 3GPP2 profile identifier.
+ *
+ * Extended DS profile errors.
+ *
+ * Since: 1.8
+ */
+typedef enum { /*< since=1.8 >*/
+ QMI_WDS_DS_PROFILE_ERROR_UNKNOWN = 0,
+ QMI_WDS_DS_PROFILE_ERROR_FAIL = 1,
+ QMI_WDS_DS_PROFILE_ERROR_INVALID_HANDLE = 2,
+ QMI_WDS_DS_PROFILE_ERROR_INVALID_OPERATION = 3,
+ QMI_WDS_DS_PROFILE_ERROR_INVALID_PROFILE_TYPE = 4,
+ QMI_WDS_DS_PROFILE_ERROR_INVALID_PROFILE_NUMBER = 5,
+ QMI_WDS_DS_PROFILE_ERROR_INVALID_PROFILE_ID = 6,
+ QMI_WDS_DS_PROFILE_ERROR_INVALID_ARGUMENT = 7,
+ QMI_WDS_DS_PROFILE_ERROR_REGISTRY_NOT_INITIALIZED = 8,
+ QMI_WDS_DS_PROFILE_ERROR_INVALID_PARAMETER_LENGTH = 9,
+ QMI_WDS_DS_PROFILE_ERROR_LIST_END = 10,
+ QMI_WDS_DS_PROFILE_ERROR_INVALID_SUBSCRIPTION_ID = 11,
+ QMI_WDS_DS_PROFILE_ERROR_INVALID_PROFILE_FAMILY = 12,
+ QMI_WDS_DS_PROFILE_ERROR_3GPP_INVALID_PROFILE_FAMILY = 1001,
+ QMI_WDS_DS_PROFILE_ERROR_3GPP_ACCESS_ERROR = 1002,
+ QMI_WDS_DS_PROFILE_ERROR_3GPP_CONTEXT_NOT_DEFINED = 1003,
+ QMI_WDS_DS_PROFILE_ERROR_3GPP_VALID_FLAG_NOT_SET = 1004,
+ QMI_WDS_DS_PROFILE_ERROR_3GPP_READ_ONLY_FLAG_SET = 1005,
+ QMI_WDS_DS_PROFILE_ERROR_3GPP_OUT_OF_PROFILES = 1006,
+ QMI_WDS_DS_PROFILE_ERROR_3GPP2_INVALID_PROFILE_ID = 1101,
+} QmiWdsDsProfileError;
+
+/**
+ * QmiWdsAutoconnectSetting:
+ * @QMI_WDS_AUTOCONNECT_SETTING_DISABLED: Disabled.
+ * @QMI_WDS_AUTOCONNECT_SETTING_ENABLED: Enabled.
+ * @QMI_WDS_AUTOCONNECT_SETTING_PAUSED: Paused, resume on power cycle.
+ *
+ * Status of the autoconnect setting.
+ *
+ * Since: 1.14
+ */
+typedef enum { /*< since=1.14 >*/
+ QMI_WDS_AUTOCONNECT_SETTING_DISABLED = 0,
+ QMI_WDS_AUTOCONNECT_SETTING_ENABLED = 1,
+ QMI_WDS_AUTOCONNECT_SETTING_PAUSED = 2,
+} QmiWdsAutoconnectSetting;
+
+/**
+ * QmiWdsAutoconnectSettingRoaming:
+ * @QMI_WDS_AUTOCONNECT_SETTING_ROAMING_ALLOWED: Autoconnect always allowed, even when roaming.
+ * @QMI_WDS_AUTOCONNECT_SETTING_ROAMING_HOME_ONLY: Autoconnect allowed only in home network.
+ *
+ * Status of the autoconnect setting while roaming.
+ *
+ * Since: 1.14
+ */
+typedef enum { /*< since=1.14 >*/
+ QMI_WDS_AUTOCONNECT_SETTING_ROAMING_ALLOWED = 0,
+ QMI_WDS_AUTOCONNECT_SETTING_ROAMING_HOME_ONLY = 1,
+} QmiWdsAutoconnectSettingRoaming;
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI WDS Set Event Report' message */
+
+/**
+ * QmiWdsSetEventReportTransferStatistics:
+ * @QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_TX_PACKETS_OK: report TX packet successes.
+ * @QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_RX_PACKETS_OK: report RX packet successes.
+ * @QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_TX_PACKETS_ERROR: report TX packet errors.
+ * @QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_RX_PACKETS_ERROR: report RX packet errors.
+ * @QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_TX_OVERFLOWS: report TX overflows.
+ * @QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_RX_OVERFLOWS: report RX overflows.
+ * @QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_TX_BYTES_OK: report TX byte total.
+ * @QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_RX_BYTES_OK: report RX byte total.
+ * @QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_TX_PACKETS_DROPPED: report TX packets dropped.
+ * @QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_RX_PACKETS_DROPPED: report RX packets dropped.
+ *
+ * Flags indicating which WDS Set Event Report Transfer Statistics indicators
+ * should be emitted.
+ *
+ * Since: 1.18
+ */
+typedef enum { /*< since=1.18 >*/
+ QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_TX_PACKETS_OK = 1 << 0,
+ QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_RX_PACKETS_OK = 1 << 1,
+ QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_TX_PACKETS_ERROR = 1 << 2,
+ QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_RX_PACKETS_ERROR = 1 << 3,
+ QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_TX_OVERFLOWS = 1 << 4,
+ QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_RX_OVERFLOWS = 1 << 5,
+ QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_TX_BYTES_OK = 1 << 6,
+ QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_RX_BYTES_OK = 1 << 7,
+ QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_TX_PACKETS_DROPPED = 1 << 8,
+ QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_RX_PACKETS_DROPPED = 1 << 9,
+} QmiWdsSetEventReportTransferStatistics;
+
+/**
+ * QmiWdsDormancyStatus:
+ * @QMI_WDS_DORMANCY_STATUS_UNKNOWN: dormancy status unknown.
+ * @QMI_WDS_DORMANCY_STATUS_TRAFFIC_CHANNEL_DORMANT: traffic channel is dormant.
+ * @QMI_WDS_DORMANCY_STATUS_TRAFFIC_CHANNEL_ACTIVE: traffic channel is active.
+ *
+ * Dormancy status.
+ *
+ * Since: 1.18
+ */
+typedef enum { /*< since=1.18 >*/
+ QMI_WDS_DORMANCY_STATUS_UNKNOWN = 0,
+ QMI_WDS_DORMANCY_STATUS_TRAFFIC_CHANNEL_DORMANT = 1,
+ QMI_WDS_DORMANCY_STATUS_TRAFFIC_CHANNEL_ACTIVE = 2,
+} QmiWdsDormancyStatus;
+
+/**
+ * QmiWdsDataCallStatus:
+ * @QMI_WDS_DATA_CALL_STATUS_UNKNOWN: data call status unknown.
+ * @QMI_WDS_DATA_CALL_STATUS_ACTIVATED: data call status activated.
+ * @QMI_WDS_DATA_CALL_STATUS_TERMINATED: data call status terminated.
+ *
+ * Data call status.
+ *
+ * Since: 1.18
+ */
+typedef enum { /*< since=1.18 >*/
+ QMI_WDS_DATA_CALL_STATUS_UNKNOWN = 0,
+ QMI_WDS_DATA_CALL_STATUS_ACTIVATED = 1,
+ QMI_WDS_DATA_CALL_STATUS_TERMINATED = 2,
+} QmiWdsDataCallStatus;
+
+/**
+ * QmiWdsDataCallType:
+ * @QMI_WDS_DATA_CALL_TYPE_UNKNOWN: data call type unknown.
+ * @QMI_WDS_DATA_CALL_TYPE_EMBEDDED: embedded data call.
+ * @QMI_WDS_DATA_CALL_TYPE_TETHERED: tethered data call.
+ * @QMI_WDS_DATA_CALL_TYPE_MODEM_EMBEDDED: modem embedded data call.
+ *
+ * Data call type.
+ *
+ * Since: 1.18
+ */
+typedef enum { /*< since=1.18 >*/
+ QMI_WDS_DATA_CALL_TYPE_UNKNOWN = 0,
+ QMI_WDS_DATA_CALL_TYPE_EMBEDDED = 1,
+ QMI_WDS_DATA_CALL_TYPE_TETHERED = 2,
+ QMI_WDS_DATA_CALL_TYPE_MODEM_EMBEDDED = 3,
+} QmiWdsDataCallType;
+
+/**
+ * QmiWdsTetheredCallType:
+ * @QMI_WDS_TETHERED_CALL_TYPE_NON_TETHERED: non-tethered.
+ * @QMI_WDS_TETHERED_CALL_TYPE_RMNET: RmNet.
+ * @QMI_WDS_TETHERED_CALL_TYPE_DUN: DUN.
+ *
+ * Tethered call type.
+ *
+ * Since: 1.18
+ */
+typedef enum { /*< since=1.18 >*/
+ QMI_WDS_TETHERED_CALL_TYPE_NON_TETHERED = 0,
+ QMI_WDS_TETHERED_CALL_TYPE_RMNET = 1,
+ QMI_WDS_TETHERED_CALL_TYPE_DUN = 2,
+} QmiWdsTetheredCallType;
+
+/**
+ * QmiWdsRadioAccessTechnology:
+ * @QMI_WDS_RADIO_ACCESS_TECHNOLOGY_NULL_BEARER: null bearer
+ * @QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP_WCDMA: WCDMA.
+ * @QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP_GERAN: GERAN.
+ * @QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP_LTE: LTE.
+ * @QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP_TDSCDMA: TD-SDCMA.
+ * @QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP_WLAN: 3GPP WLAN.
+ * @QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP_MAXIMUM: 3GPP maximum.
+ * @QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP2_1X: CDMA 1x.
+ * @QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP2_HRPD: CDMA EVDO, HRPD.
+ * @QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP2_EHRPD: CDMA EVDO with eHRPD.
+ * @QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP2_WLAN: 3GPP2 WLAN.
+ * @QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP2_MAXIMUM: 3GPP2 maximum.
+ *
+ * Radio access technology.
+ *
+ * Since: 1.18
+ */
+typedef enum { /*< since=1.18 >*/
+ QMI_WDS_RADIO_ACCESS_TECHNOLOGY_NULL_BEARER = 0,
+ QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP_WCDMA = 1,
+ QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP_GERAN = 2,
+ QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP_LTE = 3,
+ QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP_TDSCDMA = 4,
+ QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP_WLAN = 5,
+ QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP_MAXIMUM = 100,
+ QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP2_1X = 101,
+ QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP2_HRPD = 102,
+ QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP2_EHRPD = 103,
+ QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP2_WLAN = 104,
+ QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP2_MAXIMUM = 200,
+} QmiWdsRadioAccessTechnology;
+
+/**
+ * QmiWdsExtendedDataBearerTechnology3gpp:
+ * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_UNKNOWN: unknown.
+ * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_WCDMA: WCDMA.
+ * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_HSDPA: HSDPA.
+ * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_HSUPA: HSUPA.
+ * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_HSDPA_PLUS: HSDPA+.
+ * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_DC_HSDPA_PLUS: Dual-cell HSDPA+.
+ * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_64QAM: 64-QAM.
+ * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_HSPA: HSPA.
+ * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_GPRS: GPRS.
+ * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_EDGE: EDGE.
+ * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_GSM: GSM.
+ * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_S2B: S2B.
+ * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_LTE_LIMITED_SERVICE: LTE limited service.
+ * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_LTE_FDD: LTE FDD.
+ * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_LTE_TDD: LTE TDD.
+ *
+ * 3GPP extended data bearer technologies.
+ *
+ * Since: 1.18
+ */
+typedef enum { /*< underscore_name=qmi_wds_extended_data_bearer_technology_3gpp,since=1.18 >*/
+ QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_UNKNOWN = 0,
+ QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_WCDMA = 1 << 0,
+ QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_HSDPA = 1 << 1,
+ QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_HSUPA = 1 << 2,
+ QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_HSDPA_PLUS = 1 << 3,
+ QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_DC_HSDPA_PLUS = 1 << 4,
+ QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_64QAM = 1 << 5,
+ QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_HSPA = 1 << 6,
+ QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_GPRS = 1 << 7,
+ QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_EDGE = 1 << 8,
+ QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_GSM = 1 << 9,
+ QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_S2B = 1 << 10,
+ QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_LTE_LIMITED_SERVICE = 1 << 11,
+ QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_LTE_FDD = 1 << 12,
+ QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_LTE_TDD = 1 << 13,
+} QmiWdsExtendedDataBearerTechnology3gpp;
+
+/**
+ * QmiWdsExtendedDataBearerTechnology3gpp2:
+ * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_UNKNOWN: unknown.
+ * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_RESERVED: reserved.
+ * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_CDMA1X_IS95: CDMA1x IS-95.
+ * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_CDMA1X_IS2000: CDMA1x IS-2000.
+ * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_CDMA1X_IS2000_REL_A: CDMA1x IS-2000 Release A.
+ * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_REV_0_DPA: HDR EVDO Rev 0 DPA.
+ * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_REV_A_DPA: HDR EVDO Rev A DPA.
+ * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_REV_B_DPA: HDR EVDO Rev B DPA.
+ * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_REV_A_MPA: HDR EVDO Rev A MPA.
+ * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_REV_B_MPA: HDR EVDO Rev B MPA.
+ * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_REV_A_EMPA: HDR EVDO Rev A EMPA.
+ * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_REV_B_EMPA: HDR EVDO Rev B EMPA.
+ * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_REV_B_MMPA: HDR EVDO Rev B MMPA.
+ * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_EVDO_FMC: HDR EVDO FMC.
+ *
+ * 3GPP2 extended data bearer technologies.
+ *
+ * Since: 1.18
+ */
+typedef enum { /*< underscore_name=qmi_wds_extended_data_bearer_technology_3gpp2,since=1.18 >*/
+ QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_UNKNOWN = 0,
+ QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_RESERVED = 1 << 0,
+ QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_CDMA1X_IS95 = 1 << 1,
+ QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_CDMA1X_IS2000 = 1 << 2,
+ QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_CDMA1X_IS2000_REL_A = 1 << 3,
+ QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_REV_0_DPA = 1 << 4,
+ QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_REV_A_DPA = 1 << 5,
+ QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_REV_B_DPA = 1 << 6,
+ QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_REV_A_MPA = 1 << 7,
+ QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_REV_B_MPA = 1 << 8,
+ QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_REV_A_EMPA = 1 << 9,
+ QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_REV_B_EMPA = 1 << 10,
+ QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_REV_B_MMPA = 1 << 11,
+ QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_EVDO_FMC = 1 << 12,
+} QmiWdsExtendedDataBearerTechnology3gpp2;
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI WDS Profile'-related messages */
+
+/**
+ * QmiWdsPdpHeaderCompressionType:
+ * @QMI_WDS_PDP_HEADER_COMPRESSION_TYPE_OFF: no header compression
+ * @QMI_WDS_PDP_HEADER_COMPRESSION_TYPE_MANUFACTURER_PREFERRED: manufacturer preferred
+ * @QMI_WDS_PDP_HEADER_COMPRESSION_TYPE_RFC1144: RFC1144
+ * @QMI_WDS_PDP_HEADER_COMPRESSION_TYPE_RFC2507: RFC2507
+ * @QMI_WDS_PDP_HEADER_COMPRESSION_TYPE_RFC3095: RFC3095
+ *
+ * PDP header compression types.
+ *
+ * Since: 1.18
+ */
+typedef enum { /*< since=1.18 >*/
+ QMI_WDS_PDP_HEADER_COMPRESSION_TYPE_OFF = 0,
+ QMI_WDS_PDP_HEADER_COMPRESSION_TYPE_MANUFACTURER_PREFERRED = 1,
+ QMI_WDS_PDP_HEADER_COMPRESSION_TYPE_RFC1144 = 2,
+ QMI_WDS_PDP_HEADER_COMPRESSION_TYPE_RFC2507 = 3,
+ QMI_WDS_PDP_HEADER_COMPRESSION_TYPE_RFC3095 = 4,
+} QmiWdsPdpHeaderCompressionType;
+
+/**
+ * QmiWdsPdpDataCompressionType:
+ * @QMI_WDS_PDP_DATA_COMPRESSION_TYPE_OFF: no data compression
+ * @QMI_WDS_PDP_DATA_COMPRESSION_TYPE_MANUFACTURER_PREFERRED: manufacturer preferred
+ * @QMI_WDS_PDP_DATA_COMPRESSION_TYPE_V42BIS: V42bis
+ * @QMI_WDS_PDP_DATA_COMPRESSION_TYPE_V44: V44
+ *
+ * PDP data compression types.
+ *
+ * Since: 1.18
+ */
+typedef enum { /*< since=1.18 >*/
+ QMI_WDS_PDP_DATA_COMPRESSION_TYPE_OFF = 0,
+ QMI_WDS_PDP_DATA_COMPRESSION_TYPE_MANUFACTURER_PREFERRED = 1,
+ QMI_WDS_PDP_DATA_COMPRESSION_TYPE_V42BIS = 2,
+ QMI_WDS_PDP_DATA_COMPRESSION_TYPE_V44 = 3,
+} QmiWdsPdpDataCompressionType;
+
+/**
+ * QmiWdsQosClassIdentifier:
+ * @QMI_WDS_QOS_CLASS_IDENTIFIER_NETWORK_ASSIGN: network assigned
+ * @QMI_WDS_QOS_CLASS_IDENTIFIER_GUARANTEED_BITRATE1: guaranteed bitrate 1
+ * @QMI_WDS_QOS_CLASS_IDENTIFIER_GUARANTEED_BITRATE2: guaranteed bitrate 2
+ * @QMI_WDS_QOS_CLASS_IDENTIFIER_GUARANTEED_BITRATE3: guaranteed bitrate 3
+ * @QMI_WDS_QOS_CLASS_IDENTIFIER_GUARANTEED_BITRATE4: guaranteed bitrate 4
+ * @QMI_WDS_QOS_CLASS_IDENTIFIER_NON_GUARANTEED_BITRATE5: non-guaranteed bitrate 5
+ * @QMI_WDS_QOS_CLASS_IDENTIFIER_NON_GUARANTEED_BITRATE6: non-guaranteed bitrate 6
+ * @QMI_WDS_QOS_CLASS_IDENTIFIER_NON_GUARANTEED_BITRATE7: non-guaranteed bitrate 7
+ * @QMI_WDS_QOS_CLASS_IDENTIFIER_NON_GUARANTEED_BITRATE8: non-guaranteed bitrate 8
+ *
+ * QoS Class Identifier.
+ *
+ * Since: 1.18
+ */
+typedef enum { /*< since=1.18 >*/
+ QMI_WDS_QOS_CLASS_IDENTIFIER_NETWORK_ASSIGN = 0,
+ QMI_WDS_QOS_CLASS_IDENTIFIER_GUARANTEED_BITRATE1 = 1,
+ QMI_WDS_QOS_CLASS_IDENTIFIER_GUARANTEED_BITRATE2 = 2,
+ QMI_WDS_QOS_CLASS_IDENTIFIER_GUARANTEED_BITRATE3 = 3,
+ QMI_WDS_QOS_CLASS_IDENTIFIER_GUARANTEED_BITRATE4 = 4,
+ QMI_WDS_QOS_CLASS_IDENTIFIER_NON_GUARANTEED_BITRATE5 = 5,
+ QMI_WDS_QOS_CLASS_IDENTIFIER_NON_GUARANTEED_BITRATE6 = 6,
+ QMI_WDS_QOS_CLASS_IDENTIFIER_NON_GUARANTEED_BITRATE7 = 7,
+ QMI_WDS_QOS_CLASS_IDENTIFIER_NON_GUARANTEED_BITRATE8 = 8,
+} QmiWdsQosClassIdentifier;
+
+/**
+ * QmiWdsAttachPdnListAction:
+ * @QMI_WDS_ATTACH_PDN_LIST_ACTION_NONE: No action (default)
+ * @QMI_WDS_ATTACH_PDN_LIST_ACTION_DETACH_OR_PDN_DISCONNECT: PS detach or PDN disconnect based on the modem configuration
+ *
+ * Action when setting the attach PDN list.
+ *
+ * Since: 1.28
+ */
+typedef enum { /*< since=1.28 >*/
+ QMI_WDS_ATTACH_PDN_LIST_ACTION_NONE = 0x01,
+ QMI_WDS_ATTACH_PDN_LIST_ACTION_DETACH_OR_PDN_DISCONNECT = 0x02,
+} QmiWdsAttachPdnListAction;
+
+/**
+ * QmiWdsClientType:
+ * @QMI_WDS_CLIENT_TYPE_TETHERED: client type tethered
+ * @QMI_WDS_CLIENT_TYPE_UNDEFINED: no client type defined
+ *
+ * Client Type
+ *
+ * Since: 1.18
+ */
+typedef enum { /*< since=1.18 >*/
+ QMI_WDS_CLIENT_TYPE_TETHERED = 0x01,
+ QMI_WDS_CLIENT_TYPE_UNDEFINED = 0xFF,
+} QmiWdsClientType;
+
+/**
+ * QMI_WDS_RATE_UNAVAILABLE:
+ *
+ * The TX/RX rate information is unavailable or cannot be measured.
+ *
+ * Since: 1.22.4
+ */
+#define QMI_WDS_RATE_UNAVAILABLE 0xFFFFFFFF
+
+/**
+ * QmiWdsIpSupportType:
+ * @QMI_WDS_IP_SUPPORT_TYPE_IPV4: IPv4 type.
+ * @QMI_WDS_IP_SUPPORT_TYPE_IPV6: IPv6 type.
+ * @QMI_WDS_IP_SUPPORT_TYPE_IPV4V6: IPv4v6 type.
+ *
+ * IP support type.
+ *
+ * Since: 1.28
+ */
+typedef enum { /*< since=1.28 >*/
+ QMI_WDS_IP_SUPPORT_TYPE_IPV4 = 0,
+ QMI_WDS_IP_SUPPORT_TYPE_IPV6 = 1,
+ QMI_WDS_IP_SUPPORT_TYPE_IPV4V6 = 2,
+} QmiWdsIpSupportType;
+
+#endif /* _LIBQMI_GLIB_QMI_ENUMS_WDS_H_ */
--- /dev/null
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * uqmi -- tiny QMI support implementation
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2012 Google Inc.
+ * Copyright (C) 2012-2017 Aleksander Morgado <aleksander@aleksander.es>
+ */
+
+#ifndef _LIBQMI_GLIB_QMI_ENUMS_WMS_H_
+#define _LIBQMI_GLIB_QMI_ENUMS_WMS_H_
+
+/**
+ * SECTION: qmi-enums-wms
+ *
+ * This section defines enumerations and flags used in the WMS service
+ * interface.
+ */
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI WMS Event Report' indication */
+
+/**
+ * QmiWmsStorageType:
+ * @QMI_WMS_STORAGE_TYPE_UIM: Message stored in UIM.
+ * @QMI_WMS_STORAGE_TYPE_NV: Message stored in non-volatile memory.
+ * @QMI_WMS_STORAGE_TYPE_NONE: None.
+ *
+ * Type of messaging storage.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_WMS_STORAGE_TYPE_UIM = 0x00,
+ QMI_WMS_STORAGE_TYPE_NV = 0x01,
+ QMI_WMS_STORAGE_TYPE_NONE = 0xFF
+} QmiWmsStorageType;
+
+/**
+ * QmiWmsAckIndicator:
+ * @QMI_WMS_ACK_INDICATOR_SEND: ACK needs to be sent.
+ * @QMI_WMS_ACK_INDICATOR_DO_NOT_SEND: ACK doesn't need to be sent.
+ *
+ * Indication of whether ACK needs to be sent or not.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_WMS_ACK_INDICATOR_SEND = 0x00,
+ QMI_WMS_ACK_INDICATOR_DO_NOT_SEND = 0x01
+} QmiWmsAckIndicator;
+
+/**
+ * QmiWmsMessageFormat:
+ * @QMI_WMS_MESSAGE_FORMAT_CDMA: CDMA message.
+ * @QMI_WMS_MESSAGE_FORMAT_GSM_WCDMA_POINT_TO_POINT: Point-to-point 3GPP message.
+ * @QMI_WMS_MESSAGE_FORMAT_GSM_WCDMA_BROADCAST: Broadcast 3GPP message.
+ * @QMI_WMS_MESSAGE_FORMAT_MWI: Message Waiting Indicator.
+ *
+ * Type of message.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_WMS_MESSAGE_FORMAT_CDMA = 0x00,
+ QMI_WMS_MESSAGE_FORMAT_GSM_WCDMA_POINT_TO_POINT = 0x06,
+ QMI_WMS_MESSAGE_FORMAT_GSM_WCDMA_BROADCAST = 0x07,
+ QMI_WMS_MESSAGE_FORMAT_MWI = 0x08
+} QmiWmsMessageFormat;
+
+/**
+ * QmiWmsMessageMode:
+ * @QMI_WMS_MESSAGE_MODE_CDMA: Message sent using 3GPP2 technologies.
+ * @QMI_WMS_MESSAGE_MODE_GSM_WCDMA: Message sent using 3GPP technologies.
+ *
+ * Message mode.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_WMS_MESSAGE_MODE_CDMA = 0x00,
+ QMI_WMS_MESSAGE_MODE_GSM_WCDMA = 0x01
+} QmiWmsMessageMode;
+
+/**
+ * QmiWmsNotificationType:
+ * @QMI_WMS_NOTIFICATION_TYPE_PRIMARY: Primary.
+ * @QMI_WMS_NOTIFICATION_TYPE_SECONDARY_GSM: Secondary GSM.
+ * @QMI_WMS_NOTIFICATION_TYPE_SECONDARY_UMTS: Secondary UMTS.
+ *
+ * Type of notification.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_WMS_NOTIFICATION_TYPE_PRIMARY = 0x00,
+ QMI_WMS_NOTIFICATION_TYPE_SECONDARY_GSM = 0x01,
+ QMI_WMS_NOTIFICATION_TYPE_SECONDARY_UMTS = 0x02
+} QmiWmsNotificationType;
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI WMS Raw Send' request/response */
+
+/**
+ * QmiWmsCdmaServiceOption:
+ * @QMI_WMS_CDMA_SERVICE_OPTION_AUTO: Automatic selection of service option.
+ * @QMI_WMS_CDMA_SERVICE_OPTION_6: Use service option 6.
+ * @QMI_WMS_CDMA_SERVICE_OPTION_14: Use service option 14.
+ *
+ * CDMA service option selection.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_WMS_CDMA_SERVICE_OPTION_AUTO = 0x00,
+ QMI_WMS_CDMA_SERVICE_OPTION_6 = 0x06,
+ QMI_WMS_CDMA_SERVICE_OPTION_14 = 0x0E
+} QmiWmsCdmaServiceOption;
+
+/**
+ * QmiWmsCdmaCauseCode:
+ * @QMI_WMS_CDMA_CAUSE_CODE_NETWORK_ADDRESS_VACANT: Address is valid but not yet allocated. Since 1.18.
+ * @QMI_WMS_CDMA_CAUSE_CODE_NETWORK_ADDRESS_TRANSLATION_FAILURE: Address is invalid. Since 1.18.
+ * @QMI_WMS_CDMA_CAUSE_CODE_NETWORK_RESOURCE_SHORTAGE: Network resource shortage. Since 1.18.
+ * @QMI_WMS_CDMA_CAUSE_CODE_NETWORK_FAILURE: Network failed. Since 1.18.
+ * @QMI_WMS_CDMA_CAUSE_CODE_NETWORK_INVALID_TELESERVICE_ID: SMS teleservice ID is invalid. Since 1.18.
+ * @QMI_WMS_CDMA_CAUSE_CODE_NETWORK_OTHER: Other network error. Since 1.18.
+ * @QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_NO_PAGE_RESPONSE: No page response from destination. Since 1.18.
+ * @QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_BUSY: Destination is busy. Since 1.18.
+ * @QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_NO_ACK: No acknowledge from destination. Since 1.18.
+ * @QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_RESOURCE_SHORTAGE: Destination resource shortage. Since 1.18.
+ * @QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_SMS_DELIVERY_POSTPONED: SMS delivery postponed. Since 1.18.
+ * @QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_OUT_OF_SERVICE: Destination out of service. Since 1.18.
+ * @QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_NOT_AT_ADDRESS: Destination not at address. Since 1.18.
+ * @QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_OTHER: Other destination error. Since 1.18.
+ * @QMI_WMS_CDMA_CAUSE_CODE_RADIO_INTERFACE_RESOURCE_SHORTAGE: Radio interface resource shortage. Since 1.18.
+ * @QMI_WMS_CDMA_CAUSE_CODE_RADIO_INTERFACE_INCOMPATIBILITY: Radio interface incompatibility. Since 1.18.
+ * @QMI_WMS_CDMA_CAUSE_CODE_RADIO_INTERFACE_OTHER: Other radio interface error. Since 1.18.
+ * @QMI_WMS_CDMA_CAUSE_CODE_GENERAL_ENCODING: Encoding error. Since 1.18.
+ * @QMI_WMS_CDMA_CAUSE_CODE_GENERAL_SMS_ORIGIN_DENIED: SMS origin denied. Since 1.18.
+ * @QMI_WMS_CDMA_CAUSE_CODE_GENERAL_SMS_DESTINATION_DENIED: SMS destination denied. Since 1.18.
+ * @QMI_WMS_CDMA_CAUSE_CODE_GENERAL_SUPPLEMENTARY_SERVICE_NOT_SUPPORTED: Supplementary service not supported. Since 1.18.
+ * @QMI_WMS_CDMA_CAUSE_CODE_GENERAL_SMS_NOT_SUPPORTED: SMS not supported. Since 1.18.
+ * @QMI_WMS_CDMA_CAUSE_CODE_GENERAL_MISSING_EXPECTED_PARAMETER: Missing optional expected parameter. Since 1.18.
+ * @QMI_WMS_CDMA_CAUSE_CODE_GENERAL_MISSING_MANDATORY_PARAMETER: Missing mandatory parameter. Since 1.18.
+ * @QMI_WMS_CDMA_CAUSE_CODE_GENERAL_UNRECOGNIZED_PARAMETER_VALUE: Unrecognized parameter value. Since 1.18.
+ * @QMI_WMS_CDMA_CAUSE_CODE_GENERAL_UNEXPECTED_PARAMETER_VALUE: Unexpected parameter value. Since 1.18.
+ * @QMI_WMS_CDMA_CAUSE_CODE_GENERAL_USER_DATA_SIZE_ERROR: User data size error. Since 1.18.
+ * @QMI_WMS_CDMA_CAUSE_CODE_GENERAL_OTHER: Other general error. Since 1.18.
+ *
+ * Cause codes when failed to send an SMS in CDMA.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ /* Network errors */
+ QMI_WMS_CDMA_CAUSE_CODE_NETWORK_ADDRESS_VACANT = 0x00,
+ QMI_WMS_CDMA_CAUSE_CODE_NETWORK_ADDRESS_TRANSLATION_FAILURE = 0x01,
+ QMI_WMS_CDMA_CAUSE_CODE_NETWORK_RESOURCE_SHORTAGE = 0x02,
+ QMI_WMS_CDMA_CAUSE_CODE_NETWORK_FAILURE = 0x03,
+ QMI_WMS_CDMA_CAUSE_CODE_NETWORK_INVALID_TELESERVICE_ID = 0x04,
+ QMI_WMS_CDMA_CAUSE_CODE_NETWORK_OTHER = 0x05,
+
+ /* Destination errors */
+ QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_NO_PAGE_RESPONSE = 0x20,
+ QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_BUSY = 0x21,
+ QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_NO_ACK = 0x22,
+ QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_RESOURCE_SHORTAGE = 0x23,
+ QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_SMS_DELIVERY_POSTPONED = 0x24,
+ QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_OUT_OF_SERVICE = 0x25,
+ QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_NOT_AT_ADDRESS = 0x26,
+ QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_OTHER = 0x27,
+
+ /* Radio Interface errors */
+ QMI_WMS_CDMA_CAUSE_CODE_RADIO_INTERFACE_RESOURCE_SHORTAGE = 0x40,
+ QMI_WMS_CDMA_CAUSE_CODE_RADIO_INTERFACE_INCOMPATIBILITY = 0x41,
+ QMI_WMS_CDMA_CAUSE_CODE_RADIO_INTERFACE_OTHER = 0x42,
+
+ /* General errors */
+ QMI_WMS_CDMA_CAUSE_CODE_GENERAL_ENCODING = 0x60,
+ QMI_WMS_CDMA_CAUSE_CODE_GENERAL_SMS_ORIGIN_DENIED = 0x61,
+ QMI_WMS_CDMA_CAUSE_CODE_GENERAL_SMS_DESTINATION_DENIED = 0x62,
+ QMI_WMS_CDMA_CAUSE_CODE_GENERAL_SUPPLEMENTARY_SERVICE_NOT_SUPPORTED = 0x63,
+ QMI_WMS_CDMA_CAUSE_CODE_GENERAL_SMS_NOT_SUPPORTED = 0x64,
+ QMI_WMS_CDMA_CAUSE_CODE_GENERAL_MISSING_EXPECTED_PARAMETER = 0x65,
+ QMI_WMS_CDMA_CAUSE_CODE_GENERAL_MISSING_MANDATORY_PARAMETER = 0x66,
+ QMI_WMS_CDMA_CAUSE_CODE_GENERAL_UNRECOGNIZED_PARAMETER_VALUE = 0x67,
+ QMI_WMS_CDMA_CAUSE_CODE_GENERAL_UNEXPECTED_PARAMETER_VALUE = 0x68,
+ QMI_WMS_CDMA_CAUSE_CODE_GENERAL_USER_DATA_SIZE_ERROR = 0x69,
+ QMI_WMS_CDMA_CAUSE_CODE_GENERAL_OTHER = 0x6A
+} QmiWmsCdmaCauseCode;
+
+/**
+ * QmiWmsCdmaErrorClass:
+ * @QMI_WMS_CDMA_ERROR_CLASS_TEMPORARY: Temporary error reported by network.
+ * @QMI_WMS_CDMA_ERROR_CLASS_PERMANENT: Permanent error reported by network.
+ * @QMI_WMS_CDMA_ERROR_CLASS_TEMPORARY_DEVICE: Temporary error reported by device. Since 1.28.
+ * @QMI_WMS_CDMA_ERROR_CLASS_PERMANENT_DEVICE: Permanent error reported by device. Since 1.28.
+ *
+ * Error class reported from the network when failed to send an SMS in CDMA,
+ * or reported by the device when failed to process a transfer-only CDMA message.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_WMS_CDMA_ERROR_CLASS_TEMPORARY = 0x00,
+ QMI_WMS_CDMA_ERROR_CLASS_PERMANENT = 0x01,
+ QMI_WMS_CDMA_ERROR_CLASS_TEMPORARY_DEVICE = 0x02,
+ QMI_WMS_CDMA_ERROR_CLASS_PERMANENT_DEVICE = 0x03,
+} QmiWmsCdmaErrorClass;
+
+/**
+ * QmiWmsGsmUmtsRpCause:
+ * @QMI_WMS_GSM_UMTS_RP_CAUSE_UNASSIGNED_NUMBER: Unassigned number.
+ * @QMI_WMS_GSM_UMTS_RP_CAUSE_OPERATOR_DETERMINED_BARRING: Operator determined barring.
+ * @QMI_WMS_GSM_UMTS_RP_CAUSE_CALL_BARRED: Call barred.
+ * @QMI_WMS_GSM_UMTS_RP_CAUSE_RESERVED: Reserved.
+ * @QMI_WMS_GSM_UMTS_RP_CAUSE_SMS_TRANSFER_REJECTED: SMS transfer rejected.
+ * @QMI_WMS_GSM_UMTS_RP_CAUSE_MEMORY_CAPACITY_EXCEEDED: Memory capacity exceeded.
+ * @QMI_WMS_GSM_UMTS_RP_CAUSE_DESTINATION_OUT_OF_ORDER: Destination out of order.
+ * @QMI_WMS_GSM_UMTS_RP_CAUSE_UNIDENTIFIED_SUBSCRIBER: Unidentified subscriber.
+ * @QMI_WMS_GSM_UMTS_RP_CAUSE_FACILITY_REJECTED: Facility rejected.
+ * @QMI_WMS_GSM_UMTS_RP_CAUSE_UNKNOWN_SUBSCRIBER: Unknown subscriber.
+ * @QMI_WMS_GSM_UMTS_RP_CAUSE_NETWORK_OUF_OF_ORDER: Network out of order.
+ * @QMI_WMS_GSM_UMTS_RP_CAUSE_TEMPORARY_FAILURE: Temporary failure.
+ * @QMI_WMS_GSM_UMTS_RP_CAUSE_CONGESTION: Congestion.
+ * @QMI_WMS_GSM_UMTS_RP_CAUSE_RESOURCES_UNAVAILABLE: Resources unavailable.
+ * @QMI_WMS_GSM_UMTS_RP_CAUSE_FACILITY_NOT_SUBSCRIBED: Facility not subscribed.
+ * @QMI_WMS_GSM_UMTS_RP_CAUSE_FACILITY_NOT_IMPLEMENTED: Facility not implemented.
+ * @QMI_WMS_GSM_UMTS_RP_CAUSE_INVALID_SMS_TRANSFER_REFERENCE_VALUE: Invalid SMS transfer reference value.
+ * @QMI_WMS_GSM_UMTS_RP_CAUSE_SEMANTICALLY_INCORRECT_MESSAGE: Semantically incorrect message.
+ * @QMI_WMS_GSM_UMTS_RP_CAUSE_INVALID_MANDATORY_INFO: Invalid mandatory info.
+ * @QMI_WMS_GSM_UMTS_RP_CAUSE_MESSAGE_TYPE_NOT_IMPLEMENTED: Message type not implemented.
+ * @QMI_WMS_GSM_UMTS_RP_CAUSE_MESSAGE_NOT_COMPATIBLE_WITH_SMS: Message not compatible with SMS.
+ * @QMI_WMS_GSM_UMTS_RP_CAUSE_INFORMATION_ELEMENT_NOT_IMPLEMENTED: Information element not implemented.
+ * @QMI_WMS_GSM_UMTS_RP_CAUSE_PROTOCOL_ERROR: Protocol error.
+ * @QMI_WMS_GSM_UMTS_RP_CAUSE_INTERWORKING: Interworking error.
+ *
+ * RP cause codes when failed to send an SMS in GSM/WCDMA.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_WMS_GSM_UMTS_RP_CAUSE_UNASSIGNED_NUMBER = 0x01,
+ QMI_WMS_GSM_UMTS_RP_CAUSE_OPERATOR_DETERMINED_BARRING = 0x08,
+ QMI_WMS_GSM_UMTS_RP_CAUSE_CALL_BARRED = 0x0A,
+ QMI_WMS_GSM_UMTS_RP_CAUSE_RESERVED = 0x0B,
+ QMI_WMS_GSM_UMTS_RP_CAUSE_SMS_TRANSFER_REJECTED = 0x15,
+ QMI_WMS_GSM_UMTS_RP_CAUSE_MEMORY_CAPACITY_EXCEEDED = 0x16,
+ QMI_WMS_GSM_UMTS_RP_CAUSE_DESTINATION_OUT_OF_ORDER = 0x1B,
+ QMI_WMS_GSM_UMTS_RP_CAUSE_UNIDENTIFIED_SUBSCRIBER = 0x1C,
+ QMI_WMS_GSM_UMTS_RP_CAUSE_FACILITY_REJECTED = 0x1D,
+ QMI_WMS_GSM_UMTS_RP_CAUSE_UNKNOWN_SUBSCRIBER = 0x1E,
+ QMI_WMS_GSM_UMTS_RP_CAUSE_NETWORK_OUF_OF_ORDER = 0x20,
+ QMI_WMS_GSM_UMTS_RP_CAUSE_TEMPORARY_FAILURE = 0x21,
+ QMI_WMS_GSM_UMTS_RP_CAUSE_CONGESTION = 0x2A,
+ QMI_WMS_GSM_UMTS_RP_CAUSE_RESOURCES_UNAVAILABLE = 0x2F,
+ QMI_WMS_GSM_UMTS_RP_CAUSE_FACILITY_NOT_SUBSCRIBED = 0x32,
+ QMI_WMS_GSM_UMTS_RP_CAUSE_FACILITY_NOT_IMPLEMENTED = 0x45,
+ QMI_WMS_GSM_UMTS_RP_CAUSE_INVALID_SMS_TRANSFER_REFERENCE_VALUE = 0x51,
+ QMI_WMS_GSM_UMTS_RP_CAUSE_SEMANTICALLY_INCORRECT_MESSAGE = 0x5F,
+ QMI_WMS_GSM_UMTS_RP_CAUSE_INVALID_MANDATORY_INFO = 0x60,
+ QMI_WMS_GSM_UMTS_RP_CAUSE_MESSAGE_TYPE_NOT_IMPLEMENTED = 0x61,
+ QMI_WMS_GSM_UMTS_RP_CAUSE_MESSAGE_NOT_COMPATIBLE_WITH_SMS = 0x62,
+ QMI_WMS_GSM_UMTS_RP_CAUSE_INFORMATION_ELEMENT_NOT_IMPLEMENTED = 0x63,
+ QMI_WMS_GSM_UMTS_RP_CAUSE_PROTOCOL_ERROR = 0x6F,
+ QMI_WMS_GSM_UMTS_RP_CAUSE_INTERWORKING = 0x7F
+} QmiWmsGsmUmtsRpCause;
+
+/**
+ * QmiWmsGsmUmtsTpCause:
+ * @QMI_WMS_GSM_UMTS_TP_CAUSE_TELE_INTERWORKING_NOT_SUPPORTED: Tele interworking not supported.
+ * @QMI_WMS_GSM_UMTS_TP_CAUSE_SHORT_MESSAGE_TYPE_0_NOT_SUPPORTED: Short message type 0 not supported.
+ * @QMI_WMS_GSM_UMTS_TP_CAUSE_SHORT_MESSAGE_CANNOT_BE_REPLACED: Short message cannot be replaced.
+ * @QMI_WMS_GSM_UMTS_TP_CAUSE_UNSPECIFIED_PID_ERROR: Unspecified TP-PID error.
+ * @QMI_WMS_GSM_UMTS_TP_CAUSE_DCS_NOT_SUPPORTED: Data coding scheme not supported.
+ * @QMI_WMS_GSM_UMTS_TP_CAUSE_MESSAGE_CLASS_NOT_SUPPORTED: Message class not supported.
+ * @QMI_WMS_GSM_UMTS_TP_CAUSE_UNSPECIFIED_DCS_ERROR: Unspecified data coding scheme error.
+ * @QMI_WMS_GSM_UMTS_TP_CAUSE_COMMAND_CANNOT_BE_ACTIONED: Command cannot be actioned.
+ * @QMI_WMS_GSM_UMTS_TP_CAUSE_COMMAND_UNSUPPORTED: Command unsupported.
+ * @QMI_WMS_GSM_UMTS_TP_CAUSE_UNSPECIFIED_COMMAND_ERROR: Unspecified command error.
+ * @QMI_WMS_GSM_UMTS_TP_CAUSE_TPDU_NOT_SUPPORTED: TPDU not supported.
+ * @QMI_WMS_GSM_UMTS_TP_CAUSE_SC_BUSY: SC busy.
+ * @QMI_WMS_GSM_UMTS_TP_CAUSE_NO_SC_SUBSCRIPTION: No SC subscription.
+ * @QMI_WMS_GSM_UMTS_TP_CAUSE_SC_SYSTEM_FAILURE: SC system failure.
+ * @QMI_WMS_GSM_UMTS_TP_CAUSE_INVALID_SME_ADDRESS: Invalid SME address.
+ * @QMI_WMS_GSM_UMTS_TP_CAUSE_DESTINATION_SME_BARRED: Destination SME barred.
+ * @QMI_WMS_GSM_UMTS_TP_CAUSE_SM_REJECTED_OR_DUPLICATE: SM rejected or duplicate.
+ * @QMI_WMS_GSM_UMTS_TP_CAUSE_VPF_NOT_SUPPORTED: TP-VPF not supported.
+ * @QMI_WMS_GSM_UMTS_TP_CAUSE_VP_NOT_SUPPORTED: TP-VP not supported.
+ * @QMI_WMS_GSM_UMTS_TP_CAUSE_SIM_SMS_STORAGE_FULL: SIM SMS storage full.
+ * @QMI_WMS_GSM_UMTS_TP_CAUSE_NO_SMS_STORAGE_CAPABILITY_IN_SIM: No SMS storage capability in SIM.
+ * @QMI_WMS_GSM_UMTS_TP_CAUSE_MS_ERROR: MS error.
+ * @QMI_WMS_GSM_UMTS_TP_CAUSE_MEMORY_CAPACITY_EXCEEDED: Memory capacity exceeded.
+ * @QMI_WMS_GSM_UMTS_TP_CAUSE_SIM_APPLICATION_TOOLKIT_BUSY: SIM application toolkit busy.
+ * @QMI_WMS_GSM_UMTS_TP_CAUSE_SIM_DATA_DOWNLOAD_ERROR: SIM data download error.
+ * @QMI_WMS_GSM_UMTS_TP_CAUSE_UNSPECIFIED_ERROR: Unspecified error.
+ *
+ * RT cause codes when failed to send an SMS in GSM/WCDMA.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_WMS_GSM_UMTS_TP_CAUSE_TELE_INTERWORKING_NOT_SUPPORTED = 0x80,
+ QMI_WMS_GSM_UMTS_TP_CAUSE_SHORT_MESSAGE_TYPE_0_NOT_SUPPORTED = 0x81,
+ QMI_WMS_GSM_UMTS_TP_CAUSE_SHORT_MESSAGE_CANNOT_BE_REPLACED = 0x82,
+ QMI_WMS_GSM_UMTS_TP_CAUSE_UNSPECIFIED_PID_ERROR = 0x8F,
+ QMI_WMS_GSM_UMTS_TP_CAUSE_DCS_NOT_SUPPORTED = 0x90,
+ QMI_WMS_GSM_UMTS_TP_CAUSE_MESSAGE_CLASS_NOT_SUPPORTED = 0x91,
+ QMI_WMS_GSM_UMTS_TP_CAUSE_UNSPECIFIED_DCS_ERROR = 0x9F,
+ QMI_WMS_GSM_UMTS_TP_CAUSE_COMMAND_CANNOT_BE_ACTIONED = 0xA0,
+ QMI_WMS_GSM_UMTS_TP_CAUSE_COMMAND_UNSUPPORTED = 0xA1,
+ QMI_WMS_GSM_UMTS_TP_CAUSE_UNSPECIFIED_COMMAND_ERROR = 0xAF,
+ QMI_WMS_GSM_UMTS_TP_CAUSE_TPDU_NOT_SUPPORTED = 0xB0,
+ QMI_WMS_GSM_UMTS_TP_CAUSE_SC_BUSY = 0xC0,
+ QMI_WMS_GSM_UMTS_TP_CAUSE_NO_SC_SUBSCRIPTION = 0xC1,
+ QMI_WMS_GSM_UMTS_TP_CAUSE_SC_SYSTEM_FAILURE = 0xC2,
+ QMI_WMS_GSM_UMTS_TP_CAUSE_INVALID_SME_ADDRESS = 0xC3,
+ QMI_WMS_GSM_UMTS_TP_CAUSE_DESTINATION_SME_BARRED = 0xC4,
+ QMI_WMS_GSM_UMTS_TP_CAUSE_SM_REJECTED_OR_DUPLICATE = 0xC5,
+ QMI_WMS_GSM_UMTS_TP_CAUSE_VPF_NOT_SUPPORTED = 0xC6,
+ QMI_WMS_GSM_UMTS_TP_CAUSE_VP_NOT_SUPPORTED = 0xC7,
+ QMI_WMS_GSM_UMTS_TP_CAUSE_SIM_SMS_STORAGE_FULL = 0xD0,
+ QMI_WMS_GSM_UMTS_TP_CAUSE_NO_SMS_STORAGE_CAPABILITY_IN_SIM = 0xD1,
+ QMI_WMS_GSM_UMTS_TP_CAUSE_MS_ERROR = 0xD2,
+ QMI_WMS_GSM_UMTS_TP_CAUSE_MEMORY_CAPACITY_EXCEEDED = 0xD3,
+ QMI_WMS_GSM_UMTS_TP_CAUSE_SIM_APPLICATION_TOOLKIT_BUSY = 0xD4,
+ QMI_WMS_GSM_UMTS_TP_CAUSE_SIM_DATA_DOWNLOAD_ERROR = 0xD5,
+ QMI_WMS_GSM_UMTS_TP_CAUSE_UNSPECIFIED_ERROR = 0xFF
+} QmiWmsGsmUmtsTpCause;
+
+/**
+ * QmiWmsMessageDeliveryFailureType:
+ * @QMI_WMS_MESSAGE_DELIVERY_FAILURE_TYPE_TEMPORARY: Temporary failure.
+ * @QMI_WMS_MESSAGE_DELIVERY_FAILURE_TYPE_PERMANENT: Permanent failure.
+ *
+ * Type of message delivery failure.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_WMS_MESSAGE_DELIVERY_FAILURE_TYPE_TEMPORARY = 0x00,
+ QMI_WMS_MESSAGE_DELIVERY_FAILURE_TYPE_PERMANENT = 0x01
+} QmiWmsMessageDeliveryFailureType;
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI WMS Read Raw' request/response */
+
+/**
+ * QmiWmsMessageTagType:
+ * @QMI_WMS_MESSAGE_TAG_TYPE_MT_READ: Received SMS, already read.
+ * @QMI_WMS_MESSAGE_TAG_TYPE_MT_NOT_READ: Received SMS, not read.
+ * @QMI_WMS_MESSAGE_TAG_TYPE_MO_SENT: Sent SMS.
+ * @QMI_WMS_MESSAGE_TAG_TYPE_MO_NOT_SENT: Not yet sent SMS.
+ *
+ * Type of message tag.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_WMS_MESSAGE_TAG_TYPE_MT_READ = 0x00,
+ QMI_WMS_MESSAGE_TAG_TYPE_MT_NOT_READ = 0x01,
+ QMI_WMS_MESSAGE_TAG_TYPE_MO_SENT = 0x02,
+ QMI_WMS_MESSAGE_TAG_TYPE_MO_NOT_SENT = 0x03
+} QmiWmsMessageTagType;
+
+/**
+ * QmiWmsMessageProtocol:
+ * @QMI_WMS_MESSAGE_PROTOCOL_CDMA: CDMA.
+ * @QMI_WMS_MESSAGE_PROTOCOL_WCDMA: WCDMA.
+ *
+ * Type of message protocol.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_WMS_MESSAGE_PROTOCOL_CDMA = 0x00,
+ QMI_WMS_MESSAGE_PROTOCOL_WCDMA = 0x01
+} QmiWmsMessageProtocol;
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI WMS Set Routes' request/response */
+
+/**
+ * QmiWmsMessageType:
+ * @QMI_WMS_MESSAGE_TYPE_POINT_TO_POINT: Point to point message.
+ *
+ * Type of message.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_WMS_MESSAGE_TYPE_POINT_TO_POINT = 0x00
+} QmiWmsMessageType;
+
+/**
+ * QmiWmsMessageClass:
+ * @QMI_WMS_MESSAGE_CLASS_0: Class 0.
+ * @QMI_WMS_MESSAGE_CLASS_1: Class 1.
+ * @QMI_WMS_MESSAGE_CLASS_2: Class 2.
+ * @QMI_WMS_MESSAGE_CLASS_3: Class 3.
+ * @QMI_WMS_MESSAGE_CLASS_NONE: Class none.
+ * @QMI_WMS_MESSAGE_CLASS_CDMA: Class CDMA.
+ *
+ * Message class.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_WMS_MESSAGE_CLASS_0 = 0x00,
+ QMI_WMS_MESSAGE_CLASS_1 = 0x01,
+ QMI_WMS_MESSAGE_CLASS_2 = 0x02,
+ QMI_WMS_MESSAGE_CLASS_3 = 0x03,
+ QMI_WMS_MESSAGE_CLASS_NONE = 0x04,
+ QMI_WMS_MESSAGE_CLASS_CDMA = 0x05
+} QmiWmsMessageClass;
+
+/**
+ * QmiWmsReceiptAction:
+ * @QMI_WMS_RECEIPT_ACTION_DISCARD: Discard message.
+ * @QMI_WMS_RECEIPT_ACTION_STORE_AND_NOTIFY: Store and notify to client.
+ * @QMI_WMS_RECEIPT_ACTION_TRANSFER_ONLY: Notify to client, which should send back ACK.
+ * @QMI_WMS_RECEIPT_ACTION_TRANSFER_AND_ACK: Notify to client and send back ACK.
+ * @QMI_WMS_RECEIPT_ACTION_UNKNOWN: Unknown action.
+ *
+ * Action to perform when a message is received.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_WMS_RECEIPT_ACTION_DISCARD = 0x00,
+ QMI_WMS_RECEIPT_ACTION_STORE_AND_NOTIFY = 0x01,
+ QMI_WMS_RECEIPT_ACTION_TRANSFER_ONLY = 0x02,
+ QMI_WMS_RECEIPT_ACTION_TRANSFER_AND_ACK = 0x03,
+ QMI_WMS_RECEIPT_ACTION_UNKNOWN = 0xFF
+} QmiWmsReceiptAction;
+
+/**
+ * QmiWmsTransferIndication:
+ * @QMI_WMS_TRANSFER_INDICATION_CLIENT: Status reports transferred to the client.
+ *
+ * Transfer indication actions.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_WMS_TRANSFER_INDICATION_CLIENT = 0x01
+} QmiWmsTransferIndication;
+
+/**
+ * QmiWmsAckFailureCause:
+ * @QMI_WMS_ACK_FAILURE_CAUSE_NO_NETWORK_RESPONSE: No network response.
+ * @QMI_WMS_ACK_FAILURE_CAUSE_NETWORK_RELEASED_LINK: Network released link.
+ * @QMI_WMS_ACK_FAILURE_CAUSE_NOT_SENT: Not sent.
+ *
+ * Ack failure cause.
+ *
+ * Since: 1.28
+ */
+typedef enum { /*< since=1.28 >*/
+ QMI_WMS_ACK_FAILURE_CAUSE_NO_NETWORK_RESPONSE = 0x00,
+ QMI_WMS_ACK_FAILURE_CAUSE_NETWORK_RELEASED_LINK = 0x01,
+ QMI_WMS_ACK_FAILURE_CAUSE_NOT_SENT = 0x02,
+} QmiWmsAckFailureCause;
+
+#endif /* _LIBQMI_GLIB_QMI_ENUMS_WMS_H_ */
--- /dev/null
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * uqmi -- tiny QMI support implementation
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2012 Google, Inc.
+ * Copyright (C) 2012-2017 Aleksander Morgado <aleksander@aleksander.es>
+ */
+
+#ifndef _LIBQMI_GLIB_QMI_ENUMS_H_
+#define _LIBQMI_GLIB_QMI_ENUMS_H_
+
+/**
+ * SECTION: qmi-enums
+ *
+ * This section defines common enumerations and flags used in the interface.
+ */
+
+/**
+ * QmiService:
+ * @QMI_SERVICE_UNKNOWN: Unknown service.
+ * @QMI_SERVICE_CTL: Control service.
+ * @QMI_SERVICE_WDS: Wireless Data Service.
+ * @QMI_SERVICE_DMS: Device Management Service.
+ * @QMI_SERVICE_NAS: Network Access Service.
+ * @QMI_SERVICE_QOS: Quality Of Service service.
+ * @QMI_SERVICE_WMS: Wireless Messaging Service.
+ * @QMI_SERVICE_PDS: Position Determination Service.
+ * @QMI_SERVICE_AUTH: Authentication service.
+ * @QMI_SERVICE_AT: AT service.
+ * @QMI_SERVICE_VOICE: Voice service.
+ * @QMI_SERVICE_CAT2: Card Application Toolkit service (v2).
+ * @QMI_SERVICE_UIM: User Identity Module service.
+ * @QMI_SERVICE_PBM: Phonebook Management service.
+ * @QMI_SERVICE_QCHAT: QCHAT service. Since: 1.8.
+ * @QMI_SERVICE_RMTFS: Remote file system service.
+ * @QMI_SERVICE_TEST: Test service. Since: 1.8.
+ * @QMI_SERVICE_LOC: Location service (~ PDS v2).
+ * @QMI_SERVICE_SAR: Service access proxy service.
+ * @QMI_SERVICE_IMS: IMS settings service. Since: 1.8.
+ * @QMI_SERVICE_ADC: Analog to digital converter driver service. Since: 1.8.
+ * @QMI_SERVICE_CSD: Core sound driver service. Since: 1.8.
+ * @QMI_SERVICE_MFS: Modem embedded file system service. Since: 1.8.
+ * @QMI_SERVICE_TIME: Time service. Since: 1.8.
+ * @QMI_SERVICE_TS: Thermal sensors service. Since: 1.8.
+ * @QMI_SERVICE_TMD: Thermal mitigation device service. Since: 1.8.
+ * @QMI_SERVICE_SAP: Service access proxy service. Since: 1.8.
+ * @QMI_SERVICE_WDA: Wireless data administrative service. Since: 1.8.
+ * @QMI_SERVICE_TSYNC: TSYNC control service. Since: 1.8.
+ * @QMI_SERVICE_RFSA: Remote file system access service. Since: 1.8.
+ * @QMI_SERVICE_CSVT: Circuit switched videotelephony service. Since: 1.8.
+ * @QMI_SERVICE_QCMAP: Qualcomm mobile access point service. Since: 1.8.
+ * @QMI_SERVICE_IMSP: IMS presence service. Since: 1.8.
+ * @QMI_SERVICE_IMSVT: IMS videotelephony service. Since: 1.8.
+ * @QMI_SERVICE_IMSA: IMS application service. Since: 1.8.
+ * @QMI_SERVICE_COEX: Coexistence service. Since: 1.8.
+ * @QMI_SERVICE_PDC: Persistent device configuration service. Since: 1.8.
+ * @QMI_SERVICE_STX: Simultaneous transmit service. Since: 1.8.
+ * @QMI_SERVICE_BIT: Bearer independent transport service. Since: 1.8.
+ * @QMI_SERVICE_IMSRTP: IMS RTP service. Since: 1.8.
+ * @QMI_SERVICE_RFRPE: RF radiated performance enhancement service. Since: 1.8.
+ * @QMI_SERVICE_DSD: Data system determination service. Since: 1.8.
+ * @QMI_SERVICE_SSCTL: Subsystem control service. Since: 1.8.
+ * @QMI_SERVICE_DPM: Data Port Mapper service. Since: 1.30.
+ * @QMI_SERVICE_CAT: Card Application Toolkit service (v1).
+ * @QMI_SERVICE_RMS: Remote Management Service.
+ * @QMI_SERVICE_OMA: Open Mobile Alliance device management service.
+ * @QMI_SERVICE_FOTA: Firmware Over The Air service. Since: 1.24.
+ * @QMI_SERVICE_GMS: Telit General Modem Service. Since: 1.24.
+ * @QMI_SERVICE_GAS: Telit General Application Service. Since: 1.24.
+ *
+ * QMI services.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_SERVICE_UNKNOWN = -1,
+ QMI_SERVICE_CTL = 0x00,
+ QMI_SERVICE_WDS = 0x01,
+ QMI_SERVICE_DMS = 0x02,
+ QMI_SERVICE_NAS = 0x03,
+ QMI_SERVICE_QOS = 0x04,
+ QMI_SERVICE_WMS = 0x05,
+ QMI_SERVICE_PDS = 0x06,
+ QMI_SERVICE_AUTH = 0x07,
+ QMI_SERVICE_AT = 0x08,
+ QMI_SERVICE_VOICE = 0x09,
+ QMI_SERVICE_CAT2 = 0x0A,
+ QMI_SERVICE_UIM = 0x0B,
+ QMI_SERVICE_PBM = 0x0C,
+ QMI_SERVICE_QCHAT = 0x0D,
+ QMI_SERVICE_RMTFS = 0x0E,
+ QMI_SERVICE_TEST = 0x0F,
+ QMI_SERVICE_LOC = 0x10,
+ QMI_SERVICE_SAR = 0x11,
+ QMI_SERVICE_IMS = 0x12,
+ QMI_SERVICE_ADC = 0x13,
+ QMI_SERVICE_CSD = 0x14,
+ QMI_SERVICE_MFS = 0x15,
+ QMI_SERVICE_TIME = 0x16,
+ QMI_SERVICE_TS = 0x17,
+ QMI_SERVICE_TMD = 0x18,
+ QMI_SERVICE_SAP = 0x19,
+ QMI_SERVICE_WDA = 0x1A,
+ QMI_SERVICE_TSYNC = 0x1B,
+ QMI_SERVICE_RFSA = 0x1C,
+ QMI_SERVICE_CSVT = 0x1D,
+ QMI_SERVICE_QCMAP = 0x1E,
+ QMI_SERVICE_IMSP = 0x1F,
+ QMI_SERVICE_IMSVT = 0x20,
+ QMI_SERVICE_IMSA = 0x21,
+ QMI_SERVICE_COEX = 0x22,
+ /* 0x23, reserved */
+ QMI_SERVICE_PDC = 0x24,
+ /* 0x25, reserved */
+ QMI_SERVICE_STX = 0x26,
+ QMI_SERVICE_BIT = 0x27,
+ QMI_SERVICE_IMSRTP = 0x28,
+ QMI_SERVICE_RFRPE = 0x29,
+ QMI_SERVICE_DSD = 0x2A,
+ QMI_SERVICE_SSCTL = 0x2B,
+ QMI_SERVICE_DPM = 0x2F,
+ QMI_SERVICE_CAT = 0xE0,
+ QMI_SERVICE_RMS = 0xE1,
+ QMI_SERVICE_OMA = 0xE2,
+ QMI_SERVICE_FOTA = 0xE6,
+ QMI_SERVICE_GMS = 0xE7,
+ QMI_SERVICE_GAS = 0xE8,
+} QmiService;
+
+/**
+ * QmiEndian:
+ * @QMI_ENDIAN_LITTLE: Little endian.
+ * @QMI_ENDIAN_BIG: Big endian.
+ *
+ * Type of endianness.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.28 >*/ /* the get_string() helper and QmiEndian type added in 1.28 */
+ QMI_ENDIAN_LITTLE = 0,
+ QMI_ENDIAN_BIG = 1
+} QmiEndian;
+
+/**
+ * QmiDataEndpointType:
+ * @QMI_DATA_ENDPOINT_TYPE_UNKNOWN: Unknown. Since 1.30.
+ * @QMI_DATA_ENDPOINT_TYPE_HSIC: High-speed inter-chip interface. Since 1.30.
+ * @QMI_DATA_ENDPOINT_TYPE_HSUSB: High-speed USB.
+ * @QMI_DATA_ENDPOINT_TYPE_PCIE: PCIe. Since: 1.28.
+ * @QMI_DATA_ENDPOINT_TYPE_EMBEDDED: Embedded. Since 1.28.
+ * @QMI_DATA_ENDPOINT_TYPE_BAM_DMUX: BAM/DMUX. Since 1.30.
+ * @QMI_DATA_ENDPOINT_TYPE_UNDEFINED: Undefined.
+ *
+ * Data Endpoint Type.
+ *
+ * Since: 1.18
+ */
+typedef enum { /*< since=1.18 >*/
+ QMI_DATA_ENDPOINT_TYPE_UNKNOWN = 0x00,
+ QMI_DATA_ENDPOINT_TYPE_HSIC = 0x01,
+ QMI_DATA_ENDPOINT_TYPE_HSUSB = 0x02,
+ QMI_DATA_ENDPOINT_TYPE_PCIE = 0x03,
+ QMI_DATA_ENDPOINT_TYPE_EMBEDDED = 0x04,
+ QMI_DATA_ENDPOINT_TYPE_BAM_DMUX = 0x05,
+ QMI_DATA_ENDPOINT_TYPE_UNDEFINED = 0xFF,
+} QmiDataEndpointType;
+
+/**
+ * QmiSioPort:
+ * @QMI_SIO_PORT_NONE: Invalid port number.
+ * @QMI_SIO_PORT_A2_MUX_RMNET0: A2 MUX (BAM-DMUX) port for rmnet0.
+ * @QMI_SIO_PORT_A2_MUX_RMNET1: A2 MUX (BAM-DMUX) port for rmnet1.
+ * @QMI_SIO_PORT_A2_MUX_RMNET2: A2 MUX (BAM-DMUX) port for rmnet2.
+ * @QMI_SIO_PORT_A2_MUX_RMNET3: A2 MUX (BAM-DMUX) port for rmnet3.
+ * @QMI_SIO_PORT_A2_MUX_RMNET4: A2 MUX (BAM-DMUX) port for rmnet4.
+ * @QMI_SIO_PORT_A2_MUX_RMNET5: A2 MUX (BAM-DMUX) port for rmnet5.
+ * @QMI_SIO_PORT_A2_MUX_RMNET6: A2 MUX (BAM-DMUX) port for rmnet6.
+ * @QMI_SIO_PORT_A2_MUX_RMNET7: A2 MUX (BAM-DMUX) port for rmnet7.
+ *
+ * SIO (serial I/O) port numbers. All ports available in the modem have a SIO
+ * port number. This enum is incomplete, only few port numbers are publicly
+ * known.
+ *
+ * Since: 1.28
+ */
+typedef enum { /*< since=1.28 >*/
+ QMI_SIO_PORT_NONE = 0x0000,
+ QMI_SIO_PORT_A2_MUX_RMNET0 = 0x0e04,
+ QMI_SIO_PORT_A2_MUX_RMNET1 = 0x0e05,
+ QMI_SIO_PORT_A2_MUX_RMNET2 = 0x0e06,
+ QMI_SIO_PORT_A2_MUX_RMNET3 = 0x0e07,
+ QMI_SIO_PORT_A2_MUX_RMNET4 = 0x0e08,
+ QMI_SIO_PORT_A2_MUX_RMNET5 = 0x0e09,
+ QMI_SIO_PORT_A2_MUX_RMNET6 = 0x0e0a,
+ QMI_SIO_PORT_A2_MUX_RMNET7 = 0x0e0b,
+} QmiSioPort;
+
+#endif /* _LIBQMI_GLIB_QMI_ENUMS_H_ */
--- /dev/null
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * libqmi-glib -- GLib/GIO based library to control QMI devices
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2012 Lanedo GmbH.
+ * Copyright (C) 2012 Google, Inc.
+ * Copyright (C) 2012-2017 Aleksander Morgado <aleksander@aleksander.es>
+ */
+
+#ifndef _LIBQMI_GLIB_QMI_FLAGS64_DMS_H_
+#define _LIBQMI_GLIB_QMI_FLAGS64_DMS_H_
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI DMS Get Band Capability' message */
+
+/**
+ * QmiDmsBandCapability:
+ * @QMI_DMS_BAND_CAPABILITY_BC_0_A_SYSTEM: Band class 0, A-system.
+ * @QMI_DMS_BAND_CAPABILITY_BC_0_B_SYSTEM: Band class 0, B-system.
+ * @QMI_DMS_BAND_CAPABILITY_BC_1_ALL_BLOCKS: Band class 1, all blocks.
+ * @QMI_DMS_BAND_CAPABILITY_BC_2: Band class 2.
+ * @QMI_DMS_BAND_CAPABILITY_BC_3_A_SYSTEM: Band class 3, A-system.
+ * @QMI_DMS_BAND_CAPABILITY_BC_4_ALL_BLOCKS: Band class 4, all blocks.
+ * @QMI_DMS_BAND_CAPABILITY_BC_5_ALL_BLOCKS: Band class 5, all blocks.
+ * @QMI_DMS_BAND_CAPABILITY_BC_6: Band class 6.
+ * @QMI_DMS_BAND_CAPABILITY_BC_7: Band class 7.
+ * @QMI_DMS_BAND_CAPABILITY_BC_8: Band class 8.
+ * @QMI_DMS_BAND_CAPABILITY_BC_9: Band class 9.
+ * @QMI_DMS_BAND_CAPABILITY_BC_10: Band class 10.
+ * @QMI_DMS_BAND_CAPABILITY_BC_11: Band class 11.
+ * @QMI_DMS_BAND_CAPABILITY_BC_12: Band class 12.
+ * @QMI_DMS_BAND_CAPABILITY_BC_14: Band class 14.
+ * @QMI_DMS_BAND_CAPABILITY_BC_15: Band class 15.
+ * @QMI_DMS_BAND_CAPABILITY_BC_16: Band class 16.
+ * @QMI_DMS_BAND_CAPABILITY_BC_17: Band class 17.
+ * @QMI_DMS_BAND_CAPABILITY_BC_18: Band class 18.
+ * @QMI_DMS_BAND_CAPABILITY_BC_19: Band class 19.
+ * @QMI_DMS_BAND_CAPABILITY_GSM_DCS_1800: GSM DCS band.
+ * @QMI_DMS_BAND_CAPABILITY_GSM_900_EXTENDED: GSM Extended GSM band (900).
+ * @QMI_DMS_BAND_CAPABILITY_GSM_900_PRIMARY: GSM Primary GSM band (900).
+ * @QMI_DMS_BAND_CAPABILITY_GSM_450: GSM 450 band.
+ * @QMI_DMS_BAND_CAPABILITY_GSM_480: GSM 480 band.
+ * @QMI_DMS_BAND_CAPABILITY_GSM_750: GSM 750 band.
+ * @QMI_DMS_BAND_CAPABILITY_GSM_850: GSM 850 band.
+ * @QMI_DMS_BAND_CAPABILITY_GSM_900_RAILWAYS: GSM railways band (900).
+ * @QMI_DMS_BAND_CAPABILITY_GSM_PCS_1900: GSM PCS band (1900).
+ * @QMI_DMS_BAND_CAPABILITY_WCDMA_2100: WCDMA 2100 band (Europe, Japan, China).
+ * @QMI_DMS_BAND_CAPABILITY_WCDMA_PCS_1900: WCDMA PCS 1900 band (US).
+ * @QMI_DMS_BAND_CAPABILITY_WCDMA_DCS_1800: WCDMA DCS 1800 band (Europe, China).
+ * @QMI_DMS_BAND_CAPABILITY_WCDMA_1700_US: WCDMA 1700 band (US).
+ * @QMI_DMS_BAND_CAPABILITY_WCDMA_850_US: WCDMA 850 band (US).
+ * @QMI_DMS_BAND_CAPABILITY_WCDMA_800: QWCDMA 850 band (Japan).
+ * @QMI_DMS_BAND_CAPABILITY_WCDMA_2600: WCDMA 2600 band (Europe).
+ * @QMI_DMS_BAND_CAPABILITY_WCDMA_900: WCDMA 900 band (Europe, Japan).
+ * @QMI_DMS_BAND_CAPABILITY_WCDMA_1700_JAPAN: WCDMA 1700 band (Japan).
+ * @QMI_DMS_BAND_CAPABILITY_WCDMA_850_JAPAN: WCDMA 850 band (Japan)
+ * @QMI_DMS_BAND_CAPABILITY_WCDMA_1500: WCDMA 1500 band.
+ *
+ * Frequency band capabilities.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_DMS_BAND_CAPABILITY_BC_0_A_SYSTEM = 1 << 0,
+ QMI_DMS_BAND_CAPABILITY_BC_0_B_SYSTEM = 1 << 1,
+ QMI_DMS_BAND_CAPABILITY_BC_1_ALL_BLOCKS = 1 << 2,
+ QMI_DMS_BAND_CAPABILITY_BC_2 = 1 << 3,
+ QMI_DMS_BAND_CAPABILITY_BC_3_A_SYSTEM = 1 << 4,
+ QMI_DMS_BAND_CAPABILITY_BC_4_ALL_BLOCKS = 1 << 5,
+ QMI_DMS_BAND_CAPABILITY_BC_5_ALL_BLOCKS = 1 << 6,
+ QMI_DMS_BAND_CAPABILITY_GSM_DCS_1800 = 1 << 7,
+ QMI_DMS_BAND_CAPABILITY_GSM_900_EXTENDED = 1 << 8,
+ QMI_DMS_BAND_CAPABILITY_GSM_900_PRIMARY = 1 << 9,
+ QMI_DMS_BAND_CAPABILITY_BC_6 = 1 << 10,
+ QMI_DMS_BAND_CAPABILITY_BC_7 = 1 << 11,
+ QMI_DMS_BAND_CAPABILITY_BC_8 = 1 << 12,
+ QMI_DMS_BAND_CAPABILITY_BC_9 = 1 << 13,
+ QMI_DMS_BAND_CAPABILITY_BC_10 = 1 << 14,
+ QMI_DMS_BAND_CAPABILITY_BC_11 = 1 << 15,
+ QMI_DMS_BAND_CAPABILITY_GSM_450 = 1 << 16,
+ QMI_DMS_BAND_CAPABILITY_GSM_480 = 1 << 17,
+ QMI_DMS_BAND_CAPABILITY_GSM_750 = 1 << 18,
+ QMI_DMS_BAND_CAPABILITY_GSM_850 = 1 << 19,
+ QMI_DMS_BAND_CAPABILITY_GSM_900_RAILWAYS = 1 << 20,
+ QMI_DMS_BAND_CAPABILITY_GSM_PCS_1900 = 1 << 21,
+ QMI_DMS_BAND_CAPABILITY_WCDMA_2100 = 1 << 22,
+ QMI_DMS_BAND_CAPABILITY_WCDMA_PCS_1900 = 1 << 23,
+ QMI_DMS_BAND_CAPABILITY_WCDMA_DCS_1800 = 1 << 24,
+ QMI_DMS_BAND_CAPABILITY_WCDMA_1700_US = 1 << 25,
+ QMI_DMS_BAND_CAPABILITY_WCDMA_850_US = 1 << 26,
+ QMI_DMS_BAND_CAPABILITY_WCDMA_800 = 1 << 27,
+ QMI_DMS_BAND_CAPABILITY_BC_12 = 1 << 28,
+ QMI_DMS_BAND_CAPABILITY_BC_14 = 1 << 29,
+ /* Bit 30 reserved */
+ QMI_DMS_BAND_CAPABILITY_BC_15 = ((uint64_t) 1) << 31,
+ /* Bits 32-47 reserved */
+ QMI_DMS_BAND_CAPABILITY_WCDMA_2600 = ((uint64_t) 1) << 48,
+ QMI_DMS_BAND_CAPABILITY_WCDMA_900 = ((uint64_t) 1) << 49,
+ QMI_DMS_BAND_CAPABILITY_WCDMA_1700_JAPAN = ((uint64_t) 1) << 50,
+ /* Bits 51-55 reserved */
+ QMI_DMS_BAND_CAPABILITY_BC_16 = ((uint64_t) 1) << 56,
+ QMI_DMS_BAND_CAPABILITY_BC_17 = ((uint64_t) 1) << 57,
+ QMI_DMS_BAND_CAPABILITY_BC_18 = ((uint64_t) 1) << 58,
+ QMI_DMS_BAND_CAPABILITY_BC_19 = ((uint64_t) 1) << 59,
+ QMI_DMS_BAND_CAPABILITY_WCDMA_850_JAPAN = ((uint64_t) 1) << 60,
+ QMI_DMS_BAND_CAPABILITY_WCDMA_1500 = ((uint64_t) 1) << 61
+ /* Bits 62-63 reserved */
+} QmiDmsBandCapability;
+
+/**
+ * QmiDmsLteBandCapability:
+ * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_1: LTE EUTRAN Band 1
+ * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_2: LTE EUTRAN Band 2.
+ * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_3: LTE EUTRAN Band 3.
+ * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_4: LTE EUTRAN Band 4.
+ * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_5: LTE EUTRAN Band 5.
+ * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_6: LTE EUTRAN Band 6.
+ * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_7: LTE EUTRAN Band 7.
+ * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_8: LTE EUTRAN Band 8.
+ * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_9: LTE EUTRAN Band 9.
+ * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_10: LTE EUTRAN Band 10.
+ * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_11: LTE EUTRAN Band 11.
+ * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_12: LTE EUTRAN Band 12.
+ * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_13: LTE EUTRAN Band 13.
+ * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_14: LTE EUTRAN Band 14.
+ * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_17: LTE EUTRAN Band 17.
+ * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_18: LTE EUTRAN Band 18.
+ * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_19: LTE EUTRAN Band 19.
+ * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_20: LTE EUTRAN Band 20.
+ * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_21: LTE EUTRAN Band 21.
+ * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_24: LTE EUTRAN Band 24.
+ * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_25: LTE EUTRAN Band 25.
+ * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_26: LTE EUTRAN Band 26.
+ * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_27: LTE EUTRAN Band 27.
+ * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_28: LTE EUTRAN Band 28.
+ * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_29: LTE EUTRAN Band 29.
+ * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_30: LTE EUTRAN Band 30.
+ * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_31: LTE EUTRAN Band 31.
+ * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_32: LTE EUTRAN Band 32.
+ * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_33: LTE EUTRAN Band 33.
+ * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_34: LTE EUTRAN Band 34.
+ * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_35: LTE EUTRAN Band 35.
+ * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_36: LTE EUTRAN Band 36.
+ * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_37: LTE EUTRAN Band 37.
+ * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_38: LTE EUTRAN Band 38.
+ * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_39: LTE EUTRAN Band 39.
+ * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_40: LTE EUTRAN Band 40.
+ * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_41: LTE EUTRAN Band 41.
+ * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_42: LTE EUTRAN Band 42.
+ * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_43: LTE EUTRAN Band 43.
+ *
+ * LTE-specific Frequency bands.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_1 = 1 << 0,
+ QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_2 = 1 << 1,
+ QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_3 = 1 << 2,
+ QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_4 = 1 << 3,
+ QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_5 = 1 << 4,
+ QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_6 = 1 << 5,
+ QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_7 = 1 << 6,
+ QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_8 = 1 << 7,
+ QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_9 = 1 << 8,
+ QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_10 = 1 << 9,
+ QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_11 = 1 << 10,
+ QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_12 = 1 << 11,
+ QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_13 = 1 << 12,
+ QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_14 = 1 << 13,
+ /* Bit 14-15 reserved */
+ QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_17 = 1 << 16,
+ QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_18 = 1 << 17,
+ QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_19 = 1 << 18,
+ QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_20 = 1 << 19,
+ QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_21 = 1 << 20,
+ /* Bit 21-22 reserved */
+ QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_24 = 1 << 23,
+ QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_25 = 1 << 24,
+ QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_26 = 1 << 25,
+ QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_27 = 1 << 26,
+ QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_28 = 1 << 27,
+ QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_29 = 1 << 28,
+ QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_30 = 1 << 29,
+ QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_31 = 1 << 30,
+ QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_32 = ((uint64_t) 1) << 31,
+ QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_33 = ((uint64_t) 1) << 32,
+ QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_34 = ((uint64_t) 1) << 33,
+ QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_35 = ((uint64_t) 1) << 34,
+ QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_36 = ((uint64_t) 1) << 35,
+ QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_37 = ((uint64_t) 1) << 36,
+ QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_38 = ((uint64_t) 1) << 37,
+ QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_39 = ((uint64_t) 1) << 38,
+ QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_40 = ((uint64_t) 1) << 39,
+ QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_41 = ((uint64_t) 1) << 40,
+ QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_42 = ((uint64_t) 1) << 41,
+ QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_43 = ((uint64_t) 1) << 42
+ /* Bit 43-64 reserved */
+} QmiDmsLteBandCapability;
+
+#endif /* _LIBQMI_GLIB_QMI_FLAGS64_DMS_H_ */
--- /dev/null
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * libqmi-glib -- GLib/GIO based library to control QMI devices
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2012 Google Inc.
+ * Copyright (C) 2012-2017 Aleksander Morgado <aleksander@aleksander.es>
+ */
+
+#ifndef _LIBQMI_GLIB_QMI_FLAGS64_NAS_H_
+#define _LIBQMI_GLIB_QMI_FLAGS64_NAS_H_
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI NAS Get System Selection Preference'
+ * request/response */
+
+/**
+ * QmiNasBandPreference:
+ * @QMI_NAS_BAND_PREFERENCE_BC_0_A_SYSTEM: Band class 0, A system.
+ * @QMI_NAS_BAND_PREFERENCE_BC_0_B_SYSTEM: Band class 0, B system.
+ * @QMI_NAS_BAND_PREFERENCE_BC_1_ALL_BLOCKS: Band class 1.
+ * @QMI_NAS_BAND_PREFERENCE_BC_2: Band class 2.
+ * @QMI_NAS_BAND_PREFERENCE_BC_3_A_SYSTEM: Band class 3, A system.
+ * @QMI_NAS_BAND_PREFERENCE_BC_4_ALL_BLOCKS: Band class 4, all blocks.
+ * @QMI_NAS_BAND_PREFERENCE_BC_5_ALL_BLOCKS: Band class 5, all blocks.
+ * @QMI_NAS_BAND_PREFERENCE_BC_6: Band class 6.
+ * @QMI_NAS_BAND_PREFERENCE_BC_7: Band class 7.
+ * @QMI_NAS_BAND_PREFERENCE_BC_8: Band class 8.
+ * @QMI_NAS_BAND_PREFERENCE_BC_9: Band class 9.
+ * @QMI_NAS_BAND_PREFERENCE_BC_10: Band class 10.
+ * @QMI_NAS_BAND_PREFERENCE_BC_11: Band class 11.
+ * @QMI_NAS_BAND_PREFERENCE_BC_12: Band class 12.
+ * @QMI_NAS_BAND_PREFERENCE_BC_14: Band class 14.
+ * @QMI_NAS_BAND_PREFERENCE_BC_15: Band class 15.
+ * @QMI_NAS_BAND_PREFERENCE_BC_16: Band class 16.
+ * @QMI_NAS_BAND_PREFERENCE_BC_17: Band class 17.
+ * @QMI_NAS_BAND_PREFERENCE_BC_18: Band class 18.
+ * @QMI_NAS_BAND_PREFERENCE_BC_19: Band class 19.
+ * @QMI_NAS_BAND_PREFERENCE_GSM_DCS_1800: GSM DCS 1800 band.
+ * @QMI_NAS_BAND_PREFERENCE_GSM_900_EXTENDED: Extended GSM 900 band.
+ * @QMI_NAS_BAND_PREFERENCE_GSM_900_PRIMARY: Primary GSM 900 band.
+ * @QMI_NAS_BAND_PREFERENCE_GSM_450: GSM 450.
+ * @QMI_NAS_BAND_PREFERENCE_GSM_480: GSM 480.
+ * @QMI_NAS_BAND_PREFERENCE_GSM_750: GSM 750.
+ * @QMI_NAS_BAND_PREFERENCE_GSM_850: GSM 850.
+ * @QMI_NAS_BAND_PREFERENCE_GSM_900_RAILWAYS: GSM 900 (Railways).
+ * @QMI_NAS_BAND_PREFERENCE_GSM_PCS_1900: GSM 1900.
+ * @QMI_NAS_BAND_PREFERENCE_WCDMA_2100: WCDMA 2100.
+ * @QMI_NAS_BAND_PREFERENCE_WCDMA_PCS_1900: WCDMA PCS 1900.
+ * @QMI_NAS_BAND_PREFERENCE_WCDMA_DCS_1800: WCDMA DCS 1800.
+ * @QMI_NAS_BAND_PREFERENCE_WCDMA_1700_US: WCDMA 1700 (U.S.).
+ * @QMI_NAS_BAND_PREFERENCE_WCDMA_850_US: WCDMA 850.
+ * @QMI_NAS_BAND_PREFERENCE_WCDMA_800: WCDMA 800.
+ * @QMI_NAS_BAND_PREFERENCE_WCDMA_2600: WCDMA 2600.
+ * @QMI_NAS_BAND_PREFERENCE_WCDMA_900: WCDMA 900.
+ * @QMI_NAS_BAND_PREFERENCE_WCDMA_1700_JAPAN: WCDMA 1700 (Japan).
+ * @QMI_NAS_BAND_PREFERENCE_WCDMA_850_JAPAN: WCDMA 850 (Japan). Since: 1.22.
+ * @QMI_NAS_BAND_PREFERENCE_WCDMA_1500: WCDMA 1500. Since: 1.22.
+ *
+ * Flags to specify frequency band preferences.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_NAS_BAND_PREFERENCE_BC_0_A_SYSTEM = 1 << 0,
+ QMI_NAS_BAND_PREFERENCE_BC_0_B_SYSTEM = 1 << 1,
+ QMI_NAS_BAND_PREFERENCE_BC_1_ALL_BLOCKS = 1 << 2,
+ QMI_NAS_BAND_PREFERENCE_BC_2 = 1 << 3,
+ QMI_NAS_BAND_PREFERENCE_BC_3_A_SYSTEM = 1 << 4,
+ QMI_NAS_BAND_PREFERENCE_BC_4_ALL_BLOCKS = 1 << 5,
+ QMI_NAS_BAND_PREFERENCE_BC_5_ALL_BLOCKS = 1 << 6,
+ QMI_NAS_BAND_PREFERENCE_GSM_DCS_1800 = 1 << 7,
+ QMI_NAS_BAND_PREFERENCE_GSM_900_EXTENDED = 1 << 8,
+ QMI_NAS_BAND_PREFERENCE_GSM_900_PRIMARY = 1 << 9,
+ QMI_NAS_BAND_PREFERENCE_BC_6 = 1 << 10,
+ QMI_NAS_BAND_PREFERENCE_BC_7 = 1 << 11,
+ QMI_NAS_BAND_PREFERENCE_BC_8 = 1 << 12,
+ QMI_NAS_BAND_PREFERENCE_BC_9 = 1 << 13,
+ QMI_NAS_BAND_PREFERENCE_BC_10 = 1 << 14,
+ QMI_NAS_BAND_PREFERENCE_BC_11 = 1 << 15,
+ QMI_NAS_BAND_PREFERENCE_GSM_450 = 1 << 16,
+ QMI_NAS_BAND_PREFERENCE_GSM_480 = 1 << 17,
+ QMI_NAS_BAND_PREFERENCE_GSM_750 = 1 << 18,
+ QMI_NAS_BAND_PREFERENCE_GSM_850 = 1 << 19,
+ QMI_NAS_BAND_PREFERENCE_GSM_900_RAILWAYS = 1 << 20,
+ QMI_NAS_BAND_PREFERENCE_GSM_PCS_1900 = 1 << 21,
+ QMI_NAS_BAND_PREFERENCE_WCDMA_2100 = 1 << 22,
+ QMI_NAS_BAND_PREFERENCE_WCDMA_PCS_1900 = 1 << 23,
+ QMI_NAS_BAND_PREFERENCE_WCDMA_DCS_1800 = 1 << 24,
+ QMI_NAS_BAND_PREFERENCE_WCDMA_1700_US = 1 << 25,
+ QMI_NAS_BAND_PREFERENCE_WCDMA_850_US = 1 << 26,
+ QMI_NAS_BAND_PREFERENCE_WCDMA_800 = 1 << 27,
+ QMI_NAS_BAND_PREFERENCE_BC_12 = 1 << 28,
+ QMI_NAS_BAND_PREFERENCE_BC_14 = 1 << 29,
+ /* Bit 30 reserved */
+ QMI_NAS_BAND_PREFERENCE_BC_15 = ((uint64_t) 1) << 31,
+ /* Bits 32-47 reserved */
+ QMI_NAS_BAND_PREFERENCE_WCDMA_2600 = ((uint64_t) 1) << 48,
+ QMI_NAS_BAND_PREFERENCE_WCDMA_900 = ((uint64_t) 1) << 49,
+ QMI_NAS_BAND_PREFERENCE_WCDMA_1700_JAPAN = ((uint64_t) 1) << 50,
+ /* Bits 51-55 reserved */
+ QMI_NAS_BAND_PREFERENCE_BC_16 = ((uint64_t) 1) << 56,
+ QMI_NAS_BAND_PREFERENCE_BC_17 = ((uint64_t) 1) << 57,
+ QMI_NAS_BAND_PREFERENCE_BC_18 = ((uint64_t) 1) << 58,
+ QMI_NAS_BAND_PREFERENCE_BC_19 = ((uint64_t) 1) << 59,
+ QMI_NAS_BAND_PREFERENCE_WCDMA_850_JAPAN = ((uint64_t) 1) << 60,
+ QMI_NAS_BAND_PREFERENCE_WCDMA_1500 = ((uint64_t) 1) << 61
+ /* Bits 62-63 reserved */
+} QmiNasBandPreference;
+
+/**
+ * QmiNasLteBandPreference:
+ * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_1: LTE EUTRAN Band 1
+ * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_2: LTE EUTRAN Band 2.
+ * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_3: LTE EUTRAN Band 3.
+ * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_4: LTE EUTRAN Band 4.
+ * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_5: LTE EUTRAN Band 5.
+ * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_6: LTE EUTRAN Band 6.
+ * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_7: LTE EUTRAN Band 7.
+ * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_8: LTE EUTRAN Band 8.
+ * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_9: LTE EUTRAN Band 9.
+ * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_10: LTE EUTRAN Band 10.
+ * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_11: LTE EUTRAN Band 11.
+ * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_12: LTE EUTRAN Band 12.
+ * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_13: LTE EUTRAN Band 13.
+ * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_14: LTE EUTRAN Band 14.
+ * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_17: LTE EUTRAN Band 17.
+ * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_18: LTE EUTRAN Band 18.
+ * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_19: LTE EUTRAN Band 19.
+ * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_20: LTE EUTRAN Band 20.
+ * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_21: LTE EUTRAN Band 21.
+ * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_24: LTE EUTRAN Band 24.
+ * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_25: LTE EUTRAN Band 25.
+ * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_26: LTE EUTRAN Band 26.
+ * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_27: LTE EUTRAN Band 27.
+ * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_28: LTE EUTRAN Band 28.
+ * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_29: LTE EUTRAN Band 29.
+ * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_30: LTE EUTRAN Band 30.
+ * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_31: LTE EUTRAN Band 31.
+ * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_32: LTE EUTRAN Band 32.
+ * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_33: LTE EUTRAN Band 33.
+ * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_34: LTE EUTRAN Band 34.
+ * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_35: LTE EUTRAN Band 35.
+ * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_36: LTE EUTRAN Band 36.
+ * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_37: LTE EUTRAN Band 37.
+ * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_38: LTE EUTRAN Band 38.
+ * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_39: LTE EUTRAN Band 39.
+ * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_40: LTE EUTRAN Band 40.
+ * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_41: LTE EUTRAN Band 41.
+ * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_42: LTE EUTRAN Band 42.
+ * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_43: LTE EUTRAN Band 43.
+ *
+ * Flags to specify LTE-specific frequency band preferences.
+ *
+ * Since: 1.0
+ */
+typedef enum { /*< since=1.0 >*/
+ QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_1 = 1 << 0,
+ QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_2 = 1 << 1,
+ QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_3 = 1 << 2,
+ QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_4 = 1 << 3,
+ QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_5 = 1 << 4,
+ QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_6 = 1 << 5,
+ QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_7 = 1 << 6,
+ QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_8 = 1 << 7,
+ QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_9 = 1 << 8,
+ QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_10 = 1 << 9,
+ QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_11 = 1 << 10,
+ QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_12 = 1 << 11,
+ QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_13 = 1 << 12,
+ QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_14 = 1 << 13,
+ /* Bit 14-15 reserved */
+ QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_17 = 1 << 16,
+ QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_18 = 1 << 17,
+ QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_19 = 1 << 18,
+ QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_20 = 1 << 19,
+ QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_21 = 1 << 20,
+ /* Bit 21-22 reserved */
+ QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_24 = 1 << 23,
+ QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_25 = 1 << 24,
+ QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_26 = 1 << 25,
+ QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_27 = 1 << 26,
+ QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_28 = 1 << 27,
+ QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_29 = 1 << 28,
+ QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_30 = 1 << 29,
+ QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_31 = 1 << 30,
+ QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_32 = ((uint64_t) 1) << 31,
+ QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_33 = ((uint64_t) 1) << 32,
+ QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_34 = ((uint64_t) 1) << 33,
+ QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_35 = ((uint64_t) 1) << 34,
+ QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_36 = ((uint64_t) 1) << 35,
+ QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_37 = ((uint64_t) 1) << 36,
+ QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_38 = ((uint64_t) 1) << 37,
+ QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_39 = ((uint64_t) 1) << 38,
+ QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_40 = ((uint64_t) 1) << 39,
+ QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_41 = ((uint64_t) 1) << 40,
+ QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_42 = ((uint64_t) 1) << 41,
+ QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_43 = ((uint64_t) 1) << 42
+ /* Bit 43-64 reserved */
+} QmiNasLteBandPreference;
+
+#endif /* _LIBQMI_GLIB_QMI_FLAGS64_NAS_H_ */
--- /dev/null
+/*
+ * uqmi -- tiny QMI support implementation
+ *
+ * Copyright (C) 2014-2015 Felix Fietkau <nbd@openwrt.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include "qmi-message.h"
+
+static uint8_t buf[QMI_BUFFER_LEN];
+static unsigned int buf_ofs;
+
+uint8_t *__qmi_get_buf(unsigned int *ofs)
+{
+ *ofs = buf_ofs;
+ return buf;
+}
+
+void __qmi_alloc_reset(void)
+{
+ buf_ofs = 0;
+}
+
+void *__qmi_alloc_static(unsigned int len)
+{
+ void *ret;
+
+ if (buf_ofs + len > sizeof(buf)) {
+ fprintf(stderr, "ERROR: static buffer for message data too small\n");
+ abort();
+ }
+
+ ret = &buf[buf_ofs];
+ buf_ofs += len;
+ memset(ret, 0, len);
+ return ret;
+}
+
+char *__qmi_copy_string(void *data, unsigned int len)
+{
+ char *res;
+
+ res = (char *) &buf[buf_ofs];
+ buf_ofs += len + 1;
+ memcpy(res, data, len);
+ res[len] = 0;
+ return res;
+}
+
+struct tlv *tlv_get_next(void **buf, unsigned int *buflen)
+{
+ struct tlv *tlv = NULL;
+ unsigned int tlv_len;
+
+ if (*buflen < sizeof(*tlv))
+ return NULL;
+
+ tlv = *buf;
+ tlv_len = le16_to_cpu(tlv->len) + sizeof(*tlv);
+ if (tlv_len > *buflen)
+ return NULL;
+
+ *buflen -= tlv_len;
+ *buf += tlv_len;
+ return tlv;
+}
+
+static struct tlv *qmi_msg_next_tlv(struct qmi_msg *qm, int add)
+{
+ int tlv_len;
+ void *tlv;
+
+ if (qm->qmux.service == QMI_SERVICE_CTL) {
+ tlv = qm->ctl.tlv;
+ tlv_len = le16_to_cpu(qm->ctl.tlv_len);
+ qm->ctl.tlv_len = cpu_to_le16(tlv_len + add);
+ } else {
+ tlv = qm->svc.tlv;
+ tlv_len = le16_to_cpu(qm->svc.tlv_len);
+ qm->svc.tlv_len = cpu_to_le16(tlv_len + add);
+ }
+
+ tlv += tlv_len;
+
+ return tlv;
+}
+
+void tlv_new(struct qmi_msg *qm, uint8_t type, uint16_t len, void *data)
+{
+ struct tlv *tlv;
+
+ tlv = qmi_msg_next_tlv(qm, sizeof(*tlv) + len);
+ tlv->type = type;
+ tlv->len = cpu_to_le16(len);
+ memcpy(tlv->data, data, len);
+}
+
+void qmi_init_request_message(struct qmi_msg *qm, QmiService service)
+{
+ memset(qm, 0, sizeof(*qm));
+ qm->marker = 1;
+ qm->qmux.service = service;
+}
+
+int qmi_complete_request_message(struct qmi_msg *qm)
+{
+ void *tlv_end = qmi_msg_next_tlv(qm, 0);
+ void *msg_start = &qm->qmux;
+
+ qm->qmux.len = cpu_to_le16(tlv_end - msg_start);
+ return tlv_end - msg_start + 1;
+}
+
+int qmi_check_message_status(void *tlv_buf, unsigned int len)
+{
+ struct tlv *tlv;
+ struct {
+ uint16_t status;
+ uint16_t code;
+ } __packed *status;
+
+ while ((tlv = tlv_get_next(&tlv_buf, &len)) != NULL) {
+ if (tlv->type != 2)
+ continue;
+
+ if (tlv_data_len(tlv) != sizeof(*status))
+ return QMI_ERROR_INVALID_DATA;
+
+ status = (void *) tlv->data;
+ if (!status->status)
+ return 0;
+
+ return le16_to_cpu(status->code);
+ }
+
+ return QMI_ERROR_NO_DATA;
+}
+
+void *qmi_msg_get_tlv_buf(struct qmi_msg *qm, int *tlv_len)
+{
+ void *ptr;
+ int len;
+
+ if (qm->qmux.service == QMI_SERVICE_CTL) {
+ ptr = qm->ctl.tlv;
+ len = qm->ctl.tlv_len;
+ } else {
+ ptr = qm->svc.tlv;
+ len = qm->svc.tlv_len;
+ }
+
+ if (tlv_len)
+ *tlv_len = len;
+
+ return ptr;
+}
+
+
--- /dev/null
+/*
+ * uqmi -- tiny QMI support implementation
+ *
+ * Copyright (C) 2014-2015 Felix Fietkau <nbd@openwrt.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ */
+
+#ifndef __UQMI_MESSAGE_H
+#define __UQMI_MESSAGE_H
+
+#include <libubox/utils.h>
+#include <stdbool.h>
+
+#include "qmi-struct.h"
+#include "qmi-enums.h"
+
+#include "qmi-enums-private.h"
+#include "qmi-message-ctl.h"
+
+#include "qmi-enums-dms.h"
+#include "qmi-flags64-dms.h"
+#include "qmi-message-dms.h"
+
+#include "qmi-enums-nas.h"
+#include "qmi-flags64-nas.h"
+#include "qmi-message-nas.h"
+
+#include "qmi-enums-pds.h"
+#include "qmi-message-pds.h"
+
+#include "qmi-enums-wds.h"
+#include "qmi-message-wds.h"
+
+#include "qmi-enums-wms.h"
+#include "qmi-message-wms.h"
+
+#include "qmi-enums-wda.h"
+#include "qmi-message-wda.h"
+
+#include "qmi-enums-uim.h"
+#include "qmi-message-uim.h"
+
+#define qmi_set(_data, _field, _val) \
+ do { \
+ (_data)->set._field = 1; \
+ (_data)->data._field = _val; \
+ } while (0)
+
+#define qmi_set_ptr(_data, _field, _val) \
+ do { \
+ (_data)->data._field = _val; \
+ } while (0)
+
+#define qmi_set_static_array(_data, _field, _val) \
+ do { \
+ (_data)->data._field##_n = ARRAY_SIZE(_val); \
+ (_data)->data._field = _val; \
+ } while (0);
+
+#define qmi_set_array(_data, _field, _val, _n) \
+ do { \
+ (_data)->data.n_##_field = _n; \
+ (_data)->data._field = _val; \
+ } while (0);
+
+#define QMI_INIT(_field, _val) \
+ .set._field = 1, \
+ .data._field = (_val)
+
+#define QMI_INIT_SEQUENCE(_field, ...) \
+ .set._field = 1, \
+ .data._field = { __VA_ARGS__ }
+
+#define QMI_INIT_PTR(_field, _val) \
+ .data._field = (_val)
+
+#define QMI_INIT_STATIC_ARRAY(_field, _val) \
+ .data._field##_n = ARRAY_SIZE(_val), \
+ .data._field = (_val)
+
+#define QMI_INIT_ARRAY(_field, _val, _n) \
+ .data._field##_n = (_n), \
+ .data._field = (_val)
+
+
+enum {
+ QMI_ERROR_NO_DATA = -1,
+ QMI_ERROR_INVALID_DATA = -2,
+ QMI_ERROR_CANCELLED = -3,
+};
+
+#define QMI_BUFFER_LEN 2048
+
+void __qmi_alloc_reset(void);
+void *__qmi_alloc_static(unsigned int len);
+char *__qmi_copy_string(void *data, unsigned int len);
+uint8_t *__qmi_get_buf(unsigned int *ofs);
+
+static inline int tlv_data_len(struct tlv *tlv)
+{
+ return le16_to_cpu(tlv->len);
+}
+
+struct tlv *tlv_get_next(void **buf, unsigned int *buflen);
+void tlv_new(struct qmi_msg *qm, uint8_t type, uint16_t len, void *data);
+
+void qmi_init_request_message(struct qmi_msg *qm, QmiService service);
+int qmi_complete_request_message(struct qmi_msg *qm);
+int qmi_check_message_status(void *buf, unsigned int len);
+void *qmi_msg_get_tlv_buf(struct qmi_msg *qm, int *len);
+
+#endif
--- /dev/null
+/*
+ * uqmi -- tiny QMI support implementation
+ *
+ * Copyright (C) 2014-2015 Felix Fietkau <nbd@openwrt.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ */
+
+#ifndef __QMI_STRUCT_H
+#define __QMI_STRUCT_H
+
+#include <libubox/utils.h>
+#include <stdint.h>
+
+struct qmux {
+ uint16_t len;
+ uint8_t flags;
+ uint8_t service;
+ uint8_t client;
+} __packed;
+
+struct tlv {
+ uint8_t type;
+ uint16_t len;
+ uint8_t data[];
+} __packed;
+
+struct qmi_ctl {
+ uint8_t transaction;
+ uint16_t message;
+ uint16_t tlv_len;
+ struct tlv tlv[];
+} __packed;
+
+struct qmi_svc {
+ uint16_t transaction;
+ uint16_t message;
+ uint16_t tlv_len;
+ struct tlv tlv[];
+} __packed;
+
+struct qmi_msg {
+ uint8_t marker;
+ struct qmux qmux;
+ uint8_t flags;
+ union {
+ struct qmi_ctl ctl;
+ struct qmi_svc svc;
+ };
+} __packed;
+
+#endif
--- /dev/null
+/*
+ * uqmi -- tiny QMI support implementation
+ *
+ * Copyright (C) 2014-2015 Felix Fietkau <nbd@openwrt.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ */
+
+#include "utils.h"
+#include "qmi-errors.h"
+#include <qmi-errors.c>
+
+#include <libubox/utils.h>
+
+const char *qmi_get_error_str(int code)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(qmi_errors); i++) {
+ if (qmi_errors[i].code == code)
+ return qmi_errors[i].text;
+ }
+
+ return "Unknown error";
+}
--- /dev/null
+/*
+ * uqmi -- tiny QMI support implementation
+ *
+ * Copyright (C) 2014-2015 Felix Fietkau <nbd@openwrt.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ */
+
+
+#ifndef __UTILS_H
+#define __UTILS_H
+
+const char *qmi_get_error_str(int code);
+
+#endif /* __UTILS_H */
+++ /dev/null
-/*
- * uqmi -- tiny QMI support implementation
- *
- * Copyright (C) 2014-2015 Felix Fietkau <nbd@openwrt.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA.
- */
-
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <strings.h>
-#include "uqmi.h"
-#include "qmi-errors.h"
-#include "qmi-errors.c"
-#include "mbim.h"
-
-bool cancel_all_requests = false;
-
-#define __qmi_service(_n) [__##_n] = _n
-static const uint8_t qmi_services[__QMI_SERVICE_LAST] = {
- __qmi_services
-};
-#undef __qmi_service
-
-#ifdef DEBUG_PACKET
-void dump_packet(const char *prefix, void *ptr, int len)
-{
- unsigned char *data = ptr;
- int i;
-
- fprintf(stderr, "%s:", prefix);
- for (i = 0; i < len; i++)
- fprintf(stderr, " %02x", data[i]);
- fprintf(stderr, "\n");
-}
-#endif
-
-static int
-qmi_get_service_idx(QmiService svc)
-{
- int i;
-
- for (i = 0; i < ARRAY_SIZE(qmi_services); i++)
- if (qmi_services[i] == svc)
- return i;
-
- return -1;
-}
-
-static bool qmi_message_is_response(struct qmi_msg *msg)
-{
- if (msg->qmux.service == QMI_SERVICE_CTL) {
- if (msg->flags & QMI_CTL_FLAG_RESPONSE)
- return true;
- }
- else {
- if (msg->flags & QMI_SERVICE_FLAG_RESPONSE)
- return true;
- }
-
- return false;
-}
-
-static bool qmi_message_is_indication(struct qmi_msg *msg)
-{
- if (msg->qmux.service == QMI_SERVICE_CTL) {
- if (msg->flags & QMI_CTL_FLAG_INDICATION)
- return true;
- }
- else {
- if (msg->flags & QMI_SERVICE_FLAG_INDICATION)
- return true;
- }
-
- return false;
-}
-
-static void __qmi_request_complete(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
-{
- void *tlv_buf;
- int tlv_len;
-
- if (!req->pending)
- return;
-
- req->pending = false;
- list_del(&req->list);
-
- if (msg) {
- tlv_buf = qmi_msg_get_tlv_buf(msg, &tlv_len);
- req->ret = qmi_check_message_status(tlv_buf, tlv_len);
- if (req->ret)
- msg = NULL;
- } else {
- req->ret = QMI_ERROR_CANCELLED;
- }
-
- if (req->cb && (msg || !req->no_error_cb))
- req->cb(qmi, req, msg);
-
- if (req->complete) {
- *req->complete = true;
- uloop_cancelled = true;
- }
-}
-
-static void qmi_process_msg(struct qmi_dev *qmi, struct qmi_msg *msg)
-{
- struct qmi_request *req;
- uint16_t tid;
-
- if (qmi_message_is_indication(msg)) {
- if (msg->qmux.service == QMI_SERVICE_CTL) {
- struct qmi_msg sync_msg = {0};
- qmi_set_ctl_sync_request(&sync_msg);
- /* A SYNC indication might be sent on boot in order to indicate
- * that all Client IDs have been deallocated by the modem:
- * cancel all requests, as they will not be answered. */
- if (msg->ctl.message == sync_msg.ctl.message) {
- while (!list_empty(&qmi->req)) {
- req = list_first_entry(&qmi->req, struct qmi_request, list);
- qmi_request_cancel(qmi, req);
- }
- }
- }
-
- return;
- }
-
- if (!qmi_message_is_response(msg))
- return;
-
- if (msg->qmux.service == QMI_SERVICE_CTL)
- tid = msg->ctl.transaction;
- else
- tid = le16_to_cpu(msg->svc.transaction);
-
- list_for_each_entry(req, &qmi->req, list) {
- if (req->service != msg->qmux.service)
- continue;
-
- if (req->tid != tid)
- continue;
-
- __qmi_request_complete(qmi, req, msg);
- return;
- }
-}
-
-static void qmi_notify_read(struct ustream *us, int bytes)
-{
- struct qmi_dev *qmi = container_of(us, struct qmi_dev, sf.stream);
- struct qmi_msg *msg;
- char *buf;
- int len, msg_len;
-
-
- while (1) {
- buf = ustream_get_read_buf(us, &len);
- if (!buf || !len)
- return;
-
- dump_packet("Received packet", buf, len);
- if (qmi->is_mbim) {
- struct mbim_command_message *mbim = (void *) buf;
-
- if (len < sizeof(*mbim))
- return;
- msg = (struct qmi_msg *) (buf + sizeof(*mbim));
- msg_len = le32_to_cpu(mbim->header.length);
- if (!is_mbim_qmi(mbim)) {
- /* must consume other MBIM packets */
- ustream_consume(us, msg_len);
- return;
- }
- } else {
- if (len < offsetof(struct qmi_msg, flags))
- return;
- msg = (struct qmi_msg *) buf;
- msg_len = le16_to_cpu(msg->qmux.len) + 1;
- }
-
- if (len < msg_len)
- return;
-
- qmi_process_msg(qmi, msg);
- ustream_consume(us, msg_len);
- }
-}
-
-int qmi_request_start(struct qmi_dev *qmi, struct qmi_request *req, request_cb cb)
-{
- struct qmi_msg *msg = qmi->buf;
- int len = qmi_complete_request_message(msg);
- uint16_t tid;
- void *buf = (void *) qmi->buf;
-
- memset(req, 0, sizeof(*req));
- req->ret = -1;
- req->service = msg->qmux.service;
- if (req->service == QMI_SERVICE_CTL) {
- tid = qmi->ctl_tid++;
- msg->ctl.transaction = tid;
- } else {
- int idx = qmi_get_service_idx(req->service);
-
- if (idx < 0)
- return -1;
-
- tid = qmi->service_data[idx].tid++;
- msg->svc.transaction = cpu_to_le16(tid);
- msg->qmux.client = qmi->service_data[idx].client_id;
- }
-
- req->tid = tid;
- req->cb = cb;
- req->pending = true;
- list_add(&req->list, &qmi->req);
-
- if (qmi->is_mbim) {
- buf -= sizeof(struct mbim_command_message);
- mbim_qmi_cmd((struct mbim_command_message *) buf, len, tid);
- len += sizeof(struct mbim_command_message);
- }
-
- dump_packet("Send packet", buf, len);
- ustream_write(&qmi->sf.stream, buf, len, false);
- return 0;
-}
-
-void qmi_request_cancel(struct qmi_dev *qmi, struct qmi_request *req)
-{
- req->cb = NULL;
- __qmi_request_complete(qmi, req, NULL);
-}
-
-/*! Run uloop until the request has been completed
- *
- * \param qmi the qmi device
- * \param req the request to wait for
- * \return req->ret (0 on success)
- */
-int qmi_request_wait(struct qmi_dev *qmi, struct qmi_request *req)
-{
- bool complete = false;
- bool cancelled;
-
- if (!req->pending)
- return req->ret;
-
- if (req->complete)
- *req->complete = true;
-
- req->complete = &complete;
- while (!complete) {
- cancelled = uloop_cancelled;
- uloop_cancelled = false;
- uloop_run();
-
- if (cancel_all_requests)
- qmi_request_cancel(qmi, req);
-
- uloop_cancelled = cancelled;
- }
-
- if (req->complete == &complete)
- req->complete = NULL;
-
- return req->ret;
-}
-
-struct qmi_connect_request {
- struct qmi_request req;
- int cid;
-};
-
-static void qmi_connect_service_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
-{
- struct qmi_ctl_allocate_cid_response res;
- struct qmi_connect_request *creq = container_of(req, struct qmi_connect_request, req);
-
- if (!msg)
- return;
-
- qmi_parse_ctl_allocate_cid_response(msg, &res);
- creq->cid = res.data.allocation_info.cid;
-}
-
-int qmi_service_connect(struct qmi_dev *qmi, QmiService svc, int client_id)
-{
- struct qmi_ctl_allocate_cid_request creq = {
- QMI_INIT(service, svc)
- };
- struct qmi_connect_request req;
- int idx = qmi_get_service_idx(svc);
- struct qmi_msg *msg = qmi->buf;
-
- if (idx < 0)
- return -1;
-
- if (qmi->service_connected & (1 << idx))
- return 0;
-
- if (client_id < 0) {
- qmi_set_ctl_allocate_cid_request(msg, &creq);
- qmi_request_start(qmi, &req.req, qmi_connect_service_cb);
- qmi_request_wait(qmi, &req.req);
-
- if (req.req.ret)
- return req.req.ret;
-
- client_id = req.cid;
- } else {
- qmi->service_keep_cid |= (1 << idx);
- }
-
- qmi->service_data[idx].connected = true;
- qmi->service_data[idx].client_id = client_id;
- qmi->service_data[idx].tid = 1;
- qmi->service_connected |= (1 << idx);
-
- return 0;
-}
-
-static void __qmi_service_disconnect(struct qmi_dev *qmi, int idx)
-{
- int client_id = qmi->service_data[idx].client_id;
- struct qmi_ctl_release_cid_request creq = {
- QMI_INIT_SEQUENCE(release_info,
- .service = qmi_services[idx],
- .cid = client_id,
- )
- };
- struct qmi_request req;
- struct qmi_msg *msg = qmi->buf;
-
- qmi->service_connected &= ~(1 << idx);
- qmi->service_data[idx].client_id = -1;
- qmi->service_data[idx].tid = 0;
-
- qmi_set_ctl_release_cid_request(msg, &creq);
- qmi_request_start(qmi, &req, NULL);
- qmi_request_wait(qmi, &req);
-}
-
-int qmi_service_release_client_id(struct qmi_dev *qmi, QmiService svc)
-{
- int idx = qmi_get_service_idx(svc);
- qmi->service_release_cid |= 1 << idx;
- return 0;
-}
-
-static void qmi_close_all_services(struct qmi_dev *qmi)
-{
- uint32_t connected = qmi->service_connected;
- int idx;
-
- qmi->service_keep_cid &= ~qmi->service_release_cid;
- for (idx = 0; connected; idx++, connected >>= 1) {
- if (!(connected & 1))
- continue;
-
- if (qmi->service_keep_cid & (1 << idx))
- continue;
-
- __qmi_service_disconnect(qmi, idx);
- }
-}
-
-int qmi_service_get_client_id(struct qmi_dev *qmi, QmiService svc)
-{
- int idx = qmi_get_service_idx(svc);
-
- if (idx < 0)
- return -1;
-
- qmi->service_keep_cid |= (1 << idx);
- return qmi->service_data[idx].client_id;
-}
-
-int qmi_device_open(struct qmi_dev *qmi, const char *path)
-{
- static struct {
- struct mbim_command_message mbim;
- union {
- char buf[2048];
- struct qmi_msg msg;
- } u;
- } __packed msgbuf;
- struct ustream *us = &qmi->sf.stream;
- int fd;
-
- uloop_init();
-
- fd = open(path, O_RDWR | O_EXCL | O_NONBLOCK | O_NOCTTY);
- if (fd < 0)
- return -1;
-
- us->notify_read = qmi_notify_read;
- ustream_fd_init(&qmi->sf, fd);
- INIT_LIST_HEAD(&qmi->req);
- qmi->ctl_tid = 1;
- qmi->buf = msgbuf.u.buf;
-
- return 0;
-}
-
-void qmi_device_close(struct qmi_dev *qmi)
-{
- struct qmi_request *req;
-
- qmi_close_all_services(qmi);
- ustream_free(&qmi->sf.stream);
- close(qmi->sf.fd.fd);
-
- while (!list_empty(&qmi->req)) {
- req = list_first_entry(&qmi->req, struct qmi_request, list);
- qmi_request_cancel(qmi, req);
- }
-}
-
-QmiService qmi_service_get_by_name(const char *str)
-{
- static const struct {
- const char *name;
- QmiService svc;
- } services[] = {
- { "dms", QMI_SERVICE_DMS },
- { "nas", QMI_SERVICE_NAS },
- { "pds", QMI_SERVICE_PDS },
- { "wds", QMI_SERVICE_WDS },
- { "wms", QMI_SERVICE_WMS },
- { "wda", QMI_SERVICE_WDA },
- { "uim", QMI_SERVICE_UIM },
- };
- int i;
-
- for (i = 0; i < ARRAY_SIZE(services); i++) {
- if (!strcasecmp(str, services[i].name))
- return services[i].svc;
- }
-
- return -1;
-}
+++ /dev/null
-/*
- * Copyright (C) 2016 Bjørn Mork <bjorn@mork.no>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA.
- */
-
-#include <stdbool.h>
-#include <stdint.h>
-#include <string.h>
-
-#include <stdio.h>
-
-#include "mbim.h"
-
-static const uint8_t qmiuuid[16] = { 0xd1, 0xa3, 0x0b, 0xc2, 0xf9, 0x7a, 0x6e, 0x43,
- 0xbf, 0x65, 0xc7, 0xe2, 0x4f, 0xb0, 0xf0, 0xd3 };
-
-bool is_mbim_qmi(struct mbim_command_message *msg)
-{
- return msg->header.type == cpu_to_le32(MBIM_MESSAGE_TYPE_COMMAND_DONE) &&
- msg->command_id == cpu_to_le32(MBIM_CID_QMI_MSG) &&
- !msg->command_type && /* actually 'status' here */
- !memcmp(msg->service_id, qmiuuid, 16);
- }
-
-void mbim_qmi_cmd(struct mbim_command_message *msg, int len, uint16_t tid)
-{
- msg->header.type = cpu_to_le32(MBIM_MESSAGE_TYPE_COMMAND);
- msg->header.length = cpu_to_le32(sizeof(*msg) + len);
- msg->header.transaction_id = cpu_to_le32(tid);
- msg->fragment_header.total = cpu_to_le32(1);
- msg->fragment_header.current = 0;
- memcpy(msg->service_id, qmiuuid, 16);
- msg->command_id = cpu_to_le32(MBIM_CID_QMI_MSG);
- msg->command_type = cpu_to_le32(MBIM_MESSAGE_COMMAND_TYPE_SET);
- msg->buffer_length = cpu_to_le32(len);
-}
+++ /dev/null
-/*
- * Copyright (C) 2014 John Crispin <blogic@openwrt.org>
- * Copyright (C) 2016 Bjørn Mork <bjorn@mork.no>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA.
- */
-
-#ifndef _MBIM_H__
-#define _MBIM_H__
-
-#include <libubox/utils.h>
-#include <stdbool.h>
-#include <stdint.h>
-
-#define MBIM_MESSAGE_TYPE_COMMAND 0x00000003
-#define MBIM_MESSAGE_TYPE_COMMAND_DONE 0x80000003
-#define MBIM_MESSAGE_COMMAND_TYPE_SET 1
-#define MBIM_CID_QMI_MSG 1
-
-struct mbim_message_header {
- uint32_t type;
- uint32_t length;
- uint32_t transaction_id;
-} __packed;
-
-struct mbim_fragment_header {
- uint32_t total;
- uint32_t current;
-} __packed;
-
-struct mbim_command_message {
- struct mbim_message_header header;
- struct mbim_fragment_header fragment_header;
- uint8_t service_id[16];
- uint32_t command_id;
- uint32_t command_type;
- uint32_t buffer_length;
-} __packed;
-
-bool is_mbim_qmi(struct mbim_command_message *msg);
-void mbim_qmi_cmd(struct mbim_command_message *msg, int len, uint16_t tid);
-
-#endif
+++ /dev/null
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * uqmi -- tiny QMI support implementation
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA.
- *
- * Copyright (C) 2012 Lanedo GmbH.
- * Copyright (C) 2012-2017 Aleksander Morgado <aleksander@aleksander.es>
- */
-
-#ifndef _LIBQMI_GLIB_QMI_ENUMS_DMS_H_
-#define _LIBQMI_GLIB_QMI_ENUMS_DMS_H_
-
-/**
- * SECTION: qmi-enums-dms
- *
- * This section defines enumerations and flags used in the DMS service
- * interface.
- */
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI DMS Get Capabilities' message */
-
-/**
- * QmiDmsDataServiceCapability:
- * @QMI_DMS_DATA_SERVICE_CAPABILITY_NONE: No data services supported.
- * @QMI_DMS_DATA_SERVICE_CAPABILITY_CS: Only CS supported.
- * @QMI_DMS_DATA_SERVICE_CAPABILITY_PS: Only PS supported.
- * @QMI_DMS_DATA_SERVICE_CAPABILITY_SIMULTANEOUS_CS_PS: Simultaneous CS and PS supported.
- * @QMI_DMS_DATA_SERVICE_CAPABILITY_NON_SIMULTANEOUS_CS_PS: Non simultaneous CS and PS supported.
- *
- * Data service capability.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_DMS_DATA_SERVICE_CAPABILITY_NONE = 0,
- QMI_DMS_DATA_SERVICE_CAPABILITY_CS = 1,
- QMI_DMS_DATA_SERVICE_CAPABILITY_PS = 2,
- QMI_DMS_DATA_SERVICE_CAPABILITY_SIMULTANEOUS_CS_PS = 3,
- QMI_DMS_DATA_SERVICE_CAPABILITY_NON_SIMULTANEOUS_CS_PS = 4
-} QmiDmsDataServiceCapability;
-
-/**
- * QmiDmsSimCapability:
- * @QMI_DMS_SIM_CAPABILITY_NOT_SUPPORTED: SIM not supported.
- * @QMI_DMS_SIM_CAPABILITY_SUPPORTED: SIM is supported.
- *
- * SIM capability.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_DMS_SIM_CAPABILITY_NOT_SUPPORTED = 1,
- QMI_DMS_SIM_CAPABILITY_SUPPORTED = 2
-} QmiDmsSimCapability;
-
-/**
- * QmiDmsRadioInterface:
- * @QMI_DMS_RADIO_INTERFACE_CDMA20001X: CDMA2000 1x.
- * @QMI_DMS_RADIO_INTERFACE_EVDO: CDMA2000 HRPD (1xEV-DO)
- * @QMI_DMS_RADIO_INTERFACE_GSM: GSM.
- * @QMI_DMS_RADIO_INTERFACE_UMTS: UMTS.
- * @QMI_DMS_RADIO_INTERFACE_LTE: LTE.
- * @QMI_DMS_RADIO_INTERFACE_TDS: TDS. Since 1.32.
- * @QMI_DMS_RADIO_INTERFACE_5GNR: 5G NR. Since 1.26.
- *
- * Radio interface type.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_DMS_RADIO_INTERFACE_CDMA20001X = 1,
- QMI_DMS_RADIO_INTERFACE_EVDO = 2,
- QMI_DMS_RADIO_INTERFACE_GSM = 4,
- QMI_DMS_RADIO_INTERFACE_UMTS = 5,
- QMI_DMS_RADIO_INTERFACE_LTE = 8,
- QMI_DMS_RADIO_INTERFACE_TDS = 9,
- QMI_DMS_RADIO_INTERFACE_5GNR = 10,
-} QmiDmsRadioInterface;
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI DMS Get Power State' message */
-
-/**
- * QmiDmsPowerState:
- * @QMI_DMS_POWER_STATE_EXTERNAL_SOURCE: Powered by an external source.
- * @QMI_DMS_POWER_STATE_BATTERY_CONNECTED: Battery is connected.
- * @QMI_DMS_POWER_STATE_BATTERY_CHARGING: Battery is currently being charged.
- * @QMI_DMS_POWER_STATE_FAULT: Recognized power fault.
- *
- * Flags specifying the current power state.
- *
- * If @QMI_DMS_POWER_STATE_EXTERNAL_SOURCE is set, the device is powerered by an
- * external source; otherwise it is powered by a battery.
- *
- * If @QMI_DMS_POWER_STATE_BATTERY_CONNECTED is set, the battery is connected;
- * otherwise the battery is not connected.
- *
- * If @QMI_DMS_POWER_STATE_BATTERY_CHARGING is set, the battery is being charged;
- * otherwise the battery is not being charged.
- *
- * If @QMI_DMS_POWER_STATE_FAULT is set, a power fault has been detected.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_DMS_POWER_STATE_EXTERNAL_SOURCE = 1 << 0,
- QMI_DMS_POWER_STATE_BATTERY_CONNECTED = 1 << 1,
- QMI_DMS_POWER_STATE_BATTERY_CHARGING = 1 << 2,
- QMI_DMS_POWER_STATE_FAULT = 1 << 3,
-} QmiDmsPowerState;
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI DMS UIM Set PIN Protection' message */
-
-/**
- * QmiDmsUimPinId:
- * @QMI_DMS_UIM_PIN_ID_PIN: PIN.
- * @QMI_DMS_UIM_PIN_ID_PIN2: PIN2.
- *
- * The PIN identifier.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_DMS_UIM_PIN_ID_PIN = 1,
- QMI_DMS_UIM_PIN_ID_PIN2 = 2
-} QmiDmsUimPinId;
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI DMS UIM Get PIN Status' message */
-
-/**
- * QmiDmsUimPinStatus:
- * @QMI_DMS_UIM_PIN_STATUS_NOT_INITIALIZED: Not initialized.
- * @QMI_DMS_UIM_PIN_STATUS_ENABLED_NOT_VERIFIED: Enabled, not verified.
- * @QMI_DMS_UIM_PIN_STATUS_ENABLED_VERIFIED: Enabled, verified.
- * @QMI_DMS_UIM_PIN_STATUS_DISABLED: Disabled.
- * @QMI_DMS_UIM_PIN_STATUS_BLOCKED: Blocked.
- * @QMI_DMS_UIM_PIN_STATUS_PERMANENTLY_BLOCKED: Permanently Blocked.
- * @QMI_DMS_UIM_PIN_STATUS_UNBLOCKED: Unblocked.
- * @QMI_DMS_UIM_PIN_STATUS_CHANGED: Changed.
- *
- * The PIN status.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_DMS_UIM_PIN_STATUS_NOT_INITIALIZED = 0,
- QMI_DMS_UIM_PIN_STATUS_ENABLED_NOT_VERIFIED = 1,
- QMI_DMS_UIM_PIN_STATUS_ENABLED_VERIFIED = 2,
- QMI_DMS_UIM_PIN_STATUS_DISABLED = 3,
- QMI_DMS_UIM_PIN_STATUS_BLOCKED = 4,
- QMI_DMS_UIM_PIN_STATUS_PERMANENTLY_BLOCKED = 5,
- QMI_DMS_UIM_PIN_STATUS_UNBLOCKED = 6,
- QMI_DMS_UIM_PIN_STATUS_CHANGED = 7,
-} QmiDmsUimPinStatus;
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI DMS Get Operating Mode' message */
-
-/**
- * QmiDmsOperatingMode:
- * @QMI_DMS_OPERATING_MODE_ONLINE: Device can acquire a system and make calls.
- * @QMI_DMS_OPERATING_MODE_LOW_POWER: Device has temporarily disabled RF.
- * @QMI_DMS_OPERATING_MODE_PERSISTENT_LOW_POWER: Device has disabled RF and state persists even after a reset.
- * @QMI_DMS_OPERATING_MODE_FACTORY_TEST: Special mode for manufacturer tests.
- * @QMI_DMS_OPERATING_MODE_OFFLINE: Device has deactivated RF and is partially shutdown.
- * @QMI_DMS_OPERATING_MODE_RESET: Device is in the process of power cycling.
- * @QMI_DMS_OPERATING_MODE_SHUTTING_DOWN: Device is in the process of shutting down.
- * @QMI_DMS_OPERATING_MODE_MODE_ONLY_LOW_POWER: Mode-only Low Power.
- * @QMI_DMS_OPERATING_MODE_UNKNOWN: Unknown.
- *
- * Operating mode of the device.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_DMS_OPERATING_MODE_ONLINE = 0,
- QMI_DMS_OPERATING_MODE_LOW_POWER = 1,
- QMI_DMS_OPERATING_MODE_FACTORY_TEST = 2,
- QMI_DMS_OPERATING_MODE_OFFLINE = 3,
- QMI_DMS_OPERATING_MODE_RESET = 4,
- QMI_DMS_OPERATING_MODE_SHUTTING_DOWN = 5,
- QMI_DMS_OPERATING_MODE_PERSISTENT_LOW_POWER = 6,
- QMI_DMS_OPERATING_MODE_MODE_ONLY_LOW_POWER = 7,
- QMI_DMS_OPERATING_MODE_UNKNOWN = 0xFF
-} QmiDmsOperatingMode;
-
-/**
- * QmiDmsOfflineReason:
- * @QMI_DMS_OFFLINE_REASON_HOST_IMAGE_MISCONFIGURATION: Host image misconfiguration.
- * @QMI_DMS_OFFLINE_REASON_PRI_IMAGE_MISCONFIGURATION: PRI image misconfiguration.
- * @QMI_DMS_OFFLINE_REASON_PRI_VERSION_INCOMPATIBLE: PRI version incompatible.
- * @QMI_DMS_OFFLINE_REASON_DEVICE_MEMORY_FULL: Memory full, cannot copy PRI information.
- *
- * Reasons for being in Offline (@QMI_DMS_OPERATING_MODE_OFFLINE) state.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_DMS_OFFLINE_REASON_HOST_IMAGE_MISCONFIGURATION = 1 << 0,
- QMI_DMS_OFFLINE_REASON_PRI_IMAGE_MISCONFIGURATION = 1 << 1,
- QMI_DMS_OFFLINE_REASON_PRI_VERSION_INCOMPATIBLE = 1 << 2,
- QMI_DMS_OFFLINE_REASON_DEVICE_MEMORY_FULL = 1 << 3
-} QmiDmsOfflineReason;
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI DMS Get Time' message */
-
-/**
- * QmiDmsTimeSource:
- * @QMI_DMS_TIME_SOURCE_DEVICE: 32 kHz device clock.
- * @QMI_DMS_TIME_SOURCE_CDMA_NETWORK: CDMA network.
- * @QMI_DMS_TIME_SOURCE_HDR_NETWORK: HDR network.
- *
- * Source of the timestamp.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_DMS_TIME_SOURCE_DEVICE = 0,
- QMI_DMS_TIME_SOURCE_CDMA_NETWORK = 1,
- QMI_DMS_TIME_SOURCE_HDR_NETWORK = 2,
-} QmiDmsTimeSource;
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI DMS Get Activation State' message */
-
-/**
- * QmiDmsActivationState:
- * @QMI_DMS_ACTIVATION_STATE_NOT_ACTIVATED: Service not activated.
- * @QMI_DMS_ACTIVATION_STATE_ACTIVATED: Service is activated.
- * @QMI_DMS_ACTIVATION_STATE_CONNECTING: Connection in progress for automatic activation.
- * @QMI_DMS_ACTIVATION_STATE_CONNECTED: Connection connected for automatic activation.
- * @QMI_DMS_ACTIVATION_STATE_OTASP_AUTHENTICATED: OTASP security authenticated.
- * @QMI_DMS_ACTIVATION_STATE_OTASP_NAM: OTASP NAM downloaded.
- * @QMI_DMS_ACTIVATION_STATE_OTASP_MDN: OTASP MDN downloaded.
- * @QMI_DMS_ACTIVATION_STATE_OTASP_IMSI: OTASP IMSI downloaded.
- * @QMI_DMS_ACTIVATION_STATE_OTASP_PRL: OTASP PRL downloaded.
- * @QMI_DMS_ACTIVATION_STATE_OTASP_SPC: OTASP SPC downloaded.
- * @QMI_DMS_ACTIVATION_STATE_OTASP_COMMITED: OTASP settings committed.
- *
- * State of the service activation.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_DMS_ACTIVATION_STATE_NOT_ACTIVATED = 0x00,
- QMI_DMS_ACTIVATION_STATE_ACTIVATED = 0x01,
- QMI_DMS_ACTIVATION_STATE_CONNECTING = 0x02,
- QMI_DMS_ACTIVATION_STATE_CONNECTED = 0x03,
- QMI_DMS_ACTIVATION_STATE_OTASP_AUTHENTICATED = 0x04,
- QMI_DMS_ACTIVATION_STATE_OTASP_NAM = 0x05,
- QMI_DMS_ACTIVATION_STATE_OTASP_MDN = 0x06,
- QMI_DMS_ACTIVATION_STATE_OTASP_IMSI = 0x07,
- QMI_DMS_ACTIVATION_STATE_OTASP_PRL = 0x08,
- QMI_DMS_ACTIVATION_STATE_OTASP_SPC = 0x09,
- QMI_DMS_ACTIVATION_STATE_OTASP_COMMITED = 0x0A
-} QmiDmsActivationState;
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI DMS UIM Get CK Status' message */
-
-/**
- * QmiDmsUimFacility:
- * @QMI_DMS_UIM_FACILITY_PN: Network personalization facility.
- * @QMI_DMS_UIM_FACILITY_PU: Network subset personalization facility.
- * @QMI_DMS_UIM_FACILITY_PP: Service provider facility.
- * @QMI_DMS_UIM_FACILITY_PC: Corporate personalization facility.
- * @QMI_DMS_UIM_FACILITY_PF: UIM personalization facility.
- *
- * UIM personalization facilities.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_DMS_UIM_FACILITY_PN = 0,
- QMI_DMS_UIM_FACILITY_PU = 1,
- QMI_DMS_UIM_FACILITY_PP = 2,
- QMI_DMS_UIM_FACILITY_PC = 3,
- QMI_DMS_UIM_FACILITY_PF = 4
-} QmiDmsUimFacility;
-
-/**
- * QmiDmsUimFacilityState:
- * @QMI_DMS_UIM_FACILITY_STATE_DEACTIVATED: Facility is deactivated.
- * @QMI_DMS_UIM_FACILITY_STATE_ACTIVATED: Facility is activated.
- * @QMI_DMS_UIM_FACILITY_STATE_BLOCKED: Facility is blocked.
- *
- * State of the UIM facility.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_DMS_UIM_FACILITY_STATE_DEACTIVATED = 0,
- QMI_DMS_UIM_FACILITY_STATE_ACTIVATED = 1,
- QMI_DMS_UIM_FACILITY_STATE_BLOCKED = 2
-} QmiDmsUimFacilityState;
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI DMS UIM Get State' message */
-
-/**
- * QmiDmsUimState:
- * @QMI_DMS_UIM_STATE_INITIALIZATION_COMPLETED: UIM initialization completed.
- * @QMI_DMS_UIM_STATE_LOCKED_OR_FAILED: UIM is locked or failed.
- * @QMI_DMS_UIM_STATE_NOT_PRESENT: No UIM in the device.
- * @QMI_DMS_UIM_STATE_RESERVED: Reserved, unknown.
- * @QMI_DMS_UIM_STATE_UNKNOWN: UIM state currently unavailable.
- *
- * State of the UIM.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_DMS_UIM_STATE_INITIALIZATION_COMPLETED = 0x00,
- QMI_DMS_UIM_STATE_LOCKED_OR_FAILED = 0x01,
- QMI_DMS_UIM_STATE_NOT_PRESENT = 0x02,
- QMI_DMS_UIM_STATE_RESERVED = 0x03,
- QMI_DMS_UIM_STATE_UNKNOWN = 0xFF
-} QmiDmsUimState;
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI DMS Set Time' message */
-
-/**
- * QmiDmsTimeReferenceType:
- * @QMI_DMS_TIME_REFERENCE_TYPE_USER: User time.
- *
- * Time reference type.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_DMS_TIME_REFERENCE_TYPE_USER = 0
-} QmiDmsTimeReferenceType;
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI DMS Get Firmware Preference' message */
-
-/**
- * QmiDmsFirmwareImageType:
- * @QMI_DMS_FIRMWARE_IMAGE_TYPE_MODEM: Modem image.
- * @QMI_DMS_FIRMWARE_IMAGE_TYPE_PRI: PRI image.
- *
- * Type of firmware image.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_DMS_FIRMWARE_IMAGE_TYPE_MODEM = 0,
- QMI_DMS_FIRMWARE_IMAGE_TYPE_PRI = 1
-} QmiDmsFirmwareImageType;
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI DMS Get Boot Image Download Mode' message */
-
-/**
- * QmiDmsBootImageDownloadMode:
- * @QMI_DMS_BOOT_IMAGE_DOWNLOAD_MODE_NORMAL: Normal operation.
- * @QMI_DMS_BOOT_IMAGE_DOWNLOAD_MODE_BOOT_AND_RECOVERY: Boot and recovery image download mode.
- *
- * Specifies the mode for the next boot.
- *
- * Since: 1.18
- */
-typedef enum { /*< since=1.18 >*/
- QMI_DMS_BOOT_IMAGE_DOWNLOAD_MODE_NORMAL = 0,
- QMI_DMS_BOOT_IMAGE_DOWNLOAD_MODE_BOOT_AND_RECOVERY = 1,
-} QmiDmsBootImageDownloadMode;
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI DMS Get MAC Address' message */
-
-/**
- * QmiDmsMacType:
- * @QMI_DMS_MAC_TYPE_WLAN: WLAN MAC address.
- * @QMI_DMS_MAC_TYPE_BT: Bluetooth MAC address.
- *
- * Specifies the device from which the MAC address should be queried.
- *
- * Since: 1.26
- */
-typedef enum { /*< since=1.26 >*/
- QMI_DMS_MAC_TYPE_WLAN = 0,
- QMI_DMS_MAC_TYPE_BT = 1,
-} QmiDmsMacType;
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI DMS HP Change Device Mode' message */
-
-/**
- * QmiDmsHpDeviceMode:
- * @QMI_DMS_HP_DEVICE_MODE_FASTBOOT: Fastboot download mode.
- *
- * HP specific device modes.
- *
- * Since: 1.18
- */
-typedef enum { /*< since=1.18 >*/
- QMI_DMS_HP_DEVICE_MODE_FASTBOOT = 5,
-} QmiDmsHpDeviceMode;
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI DMS Swi Get USB Composition' message */
-
-/**
- * QmiDmsSwiUsbComposition:
- * @QMI_DMS_SWI_USB_COMPOSITION_UNKNOWN: Unknown.
- * @QMI_DMS_SWI_USB_COMPOSITION_0: HIP, DM, NMEA, AT, MDM1, MDM2, MDM3, MS.
- * @QMI_DMS_SWI_USB_COMPOSITION_1: HIP, DM, NMEA, AT, MDM1, MS.
- * @QMI_DMS_SWI_USB_COMPOSITION_2: HIP, DM, NMEA, AT, NIC1, MS.
- * @QMI_DMS_SWI_USB_COMPOSITION_3: HIP, DM, NMEA, AT, MDM1, NIC1, MS.
- * @QMI_DMS_SWI_USB_COMPOSITION_4: HIP, DM, NMEA, AT, NIC1, NIC2, NIC3, MS.
- * @QMI_DMS_SWI_USB_COMPOSITION_5: HIP, DM, NMEA, AT, ECM1, MS.
- * @QMI_DMS_SWI_USB_COMPOSITION_6: DM, NMEA, AT, QMI.
- * @QMI_DMS_SWI_USB_COMPOSITION_7: DM, NMEA, AT, RMNET1, RMNET2, RMNET3.
- * @QMI_DMS_SWI_USB_COMPOSITION_8: DM, NMEA, AT, MBIM.
- * @QMI_DMS_SWI_USB_COMPOSITION_9: MBIM.
- * @QMI_DMS_SWI_USB_COMPOSITION_10: NMEA, MBIM.
- * @QMI_DMS_SWI_USB_COMPOSITION_11: DM, MBIM.
- * @QMI_DMS_SWI_USB_COMPOSITION_12: DM, NMEA, MBIM.
- * @QMI_DMS_SWI_USB_COMPOSITION_13: Dual configuration: USB composition 6 and USB composition 8.
- * @QMI_DMS_SWI_USB_COMPOSITION_14: Dual configuration: USB composition 6 and USB composition 9.
- * @QMI_DMS_SWI_USB_COMPOSITION_15: Dual configuration: USB composition 6 and USB composition 10.
- * @QMI_DMS_SWI_USB_COMPOSITION_16: Dual configuration: USB composition 6 and USB composition 11.
- * @QMI_DMS_SWI_USB_COMPOSITION_17: Dual configuration: USB composition 6 and USB composition 12.
- * @QMI_DMS_SWI_USB_COMPOSITION_18: Dual configuration: USB composition 7 and USB composition 8.
- * @QMI_DMS_SWI_USB_COMPOSITION_19: Dual configuration: USB composition 7 and USB composition 9.
- * @QMI_DMS_SWI_USB_COMPOSITION_20: Dual configuration: USB composition 7 and USB composition 10.
- * @QMI_DMS_SWI_USB_COMPOSITION_21: Dual configuration: USB composition 7 and USB composition 11.
- * @QMI_DMS_SWI_USB_COMPOSITION_22: Dual configuration: USB composition 7 and USB composition 12.
- *
- * Sierra Wireless USB composition modes.
- *
- * Since: 1.20
- */
-typedef enum { /*< since=1.20 >*/
- QMI_DMS_SWI_USB_COMPOSITION_UNKNOWN = -1,
- QMI_DMS_SWI_USB_COMPOSITION_0 = 0,
- QMI_DMS_SWI_USB_COMPOSITION_1 = 1,
- QMI_DMS_SWI_USB_COMPOSITION_2 = 2,
- QMI_DMS_SWI_USB_COMPOSITION_3 = 3,
- QMI_DMS_SWI_USB_COMPOSITION_4 = 4,
- QMI_DMS_SWI_USB_COMPOSITION_5 = 5,
- QMI_DMS_SWI_USB_COMPOSITION_6 = 6,
- QMI_DMS_SWI_USB_COMPOSITION_7 = 7,
- QMI_DMS_SWI_USB_COMPOSITION_8 = 8,
- QMI_DMS_SWI_USB_COMPOSITION_9 = 9,
- QMI_DMS_SWI_USB_COMPOSITION_10 = 10,
- QMI_DMS_SWI_USB_COMPOSITION_11 = 11,
- QMI_DMS_SWI_USB_COMPOSITION_12 = 12,
- QMI_DMS_SWI_USB_COMPOSITION_13 = 13,
- QMI_DMS_SWI_USB_COMPOSITION_14 = 14,
- QMI_DMS_SWI_USB_COMPOSITION_15 = 15,
- QMI_DMS_SWI_USB_COMPOSITION_16 = 16,
- QMI_DMS_SWI_USB_COMPOSITION_17 = 17,
- QMI_DMS_SWI_USB_COMPOSITION_18 = 18,
- QMI_DMS_SWI_USB_COMPOSITION_19 = 19,
- QMI_DMS_SWI_USB_COMPOSITION_20 = 20,
- QMI_DMS_SWI_USB_COMPOSITION_21 = 21,
- QMI_DMS_SWI_USB_COMPOSITION_22 = 22,
-} QmiDmsSwiUsbComposition;
-
-/**
- * qmi_dms_swi_usb_composition_get_description:
- * @value: a #QmiDmsSwiUsbComposition.
- *
- * Gets a text description of the Sierra Wireless USB composition.
- *
- * Since: 1.20
- * Returns: a string.
- */
-const char *qmi_dms_swi_usb_composition_get_description (QmiDmsSwiUsbComposition value);
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI DMS Foxconn Change Device Mode' message */
-
-/**
- * QmiDmsFoxconnDeviceMode:
- * @QMI_DMS_FOXCONN_DEVICE_MODE_UNKNOWN: Unknown mode.
- * @QMI_DMS_FOXCONN_DEVICE_MODE_FASTBOOT_ONLINE: Fastboot download mode for full partition files.
- * @QMI_DMS_FOXCONN_DEVICE_MODE_FASTBOOT_OTA: Fastboot download mode for OTA files.
- *
- * Foxconn specific device modes.
- *
- * Since: 1.26
- */
-typedef enum { /*< since=1.26 >*/
- QMI_DMS_FOXCONN_DEVICE_MODE_UNKNOWN = 0,
- QMI_DMS_FOXCONN_DEVICE_MODE_FASTBOOT_ONLINE = 0x05,
- QMI_DMS_FOXCONN_DEVICE_MODE_FASTBOOT_OTA = 0x0A,
-} QmiDmsFoxconnDeviceMode;
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI DMS Foxconn Get Firmware Version' message */
-
-/**
- * QmiDmsFoxconnFirmwareVersionType:
- * @QMI_DMS_FOXCONN_FIRMWARE_VERSION_TYPE_FIRMWARE_MCFG: E.g. T77W968.F0.0.0.2.3.GC.004.
- * @QMI_DMS_FOXCONN_FIRMWARE_VERSION_TYPE_FIRMWARE_MCFG_APPS: E.g. T77W968.F0.0.0.2.3.GC.004.011.
- * @QMI_DMS_FOXCONN_FIRMWARE_VERSION_TYPE_APPS: E.g. 011.
- *
- * Foxconn specific firmware version types.
- *
- * Since: 1.26
- */
-typedef enum { /*< since=1.26 >*/
- QMI_DMS_FOXCONN_FIRMWARE_VERSION_TYPE_FIRMWARE_MCFG = 0x00,
- QMI_DMS_FOXCONN_FIRMWARE_VERSION_TYPE_FIRMWARE_MCFG_APPS = 0x01,
- QMI_DMS_FOXCONN_FIRMWARE_VERSION_TYPE_APPS = 0x02,
-} QmiDmsFoxconnFirmwareVersionType;
-
-#endif /* _LIBQMI_GLIB_QMI_ENUMS_DMS_H_ */
+++ /dev/null
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * uqmi -- tiny QMI support implementation
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA.
- *
- * Copyright (C) 2012 Google Inc.
- * Copyright (C) 2012-2017 Aleksander Morgado <aleksander@aleksander.es>
- */
-
-#ifndef _LIBQMI_GLIB_QMI_ENUMS_NAS_H_
-#define _LIBQMI_GLIB_QMI_ENUMS_NAS_H_
-
-/**
- * SECTION: qmi-enums-nas
- *
- * This section defines enumerations and flags used in the NAS service
- * interface.
- */
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI NAS Event Report' indication */
-
-/**
- * QmiNasRadioInterface:
- * @QMI_NAS_RADIO_INTERFACE_UNKNOWN: Not known or not needed.
- * @QMI_NAS_RADIO_INTERFACE_NONE: None, no service.
- * @QMI_NAS_RADIO_INTERFACE_CDMA_1X: CDMA2000 1X.
- * @QMI_NAS_RADIO_INTERFACE_CDMA_1XEVDO: CDMA2000 HRPD (1xEV-DO).
- * @QMI_NAS_RADIO_INTERFACE_AMPS: AMPS.
- * @QMI_NAS_RADIO_INTERFACE_GSM: GSM.
- * @QMI_NAS_RADIO_INTERFACE_UMTS: UMTS.
- * @QMI_NAS_RADIO_INTERFACE_LTE: LTE.
- * @QMI_NAS_RADIO_INTERFACE_TD_SCDMA: TD-SCDMA.
- * @QMI_NAS_RADIO_INTERFACE_5GNR: 5G NR. Since 1.26.
- *
- * Radio interface technology.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_NAS_RADIO_INTERFACE_UNKNOWN = -1,
- QMI_NAS_RADIO_INTERFACE_NONE = 0x00,
- QMI_NAS_RADIO_INTERFACE_CDMA_1X = 0x01,
- QMI_NAS_RADIO_INTERFACE_CDMA_1XEVDO = 0x02,
- QMI_NAS_RADIO_INTERFACE_AMPS = 0x03,
- QMI_NAS_RADIO_INTERFACE_GSM = 0x04,
- QMI_NAS_RADIO_INTERFACE_UMTS = 0x05,
- QMI_NAS_RADIO_INTERFACE_LTE = 0x08,
- QMI_NAS_RADIO_INTERFACE_TD_SCDMA = 0x09,
- QMI_NAS_RADIO_INTERFACE_5GNR = 0x0C,
-} QmiNasRadioInterface;
-
-/**
- * QmiNasActiveBand:
- * @QMI_NAS_ACTIVE_BAND_BC_0: Band class 0.
- * @QMI_NAS_ACTIVE_BAND_BC_1: Band class 1.
- * @QMI_NAS_ACTIVE_BAND_BC_2: Band class 2.
- * @QMI_NAS_ACTIVE_BAND_BC_3: Band class 3.
- * @QMI_NAS_ACTIVE_BAND_BC_4: Band class 4.
- * @QMI_NAS_ACTIVE_BAND_BC_5: Band class 5.
- * @QMI_NAS_ACTIVE_BAND_BC_6: Band class 6.
- * @QMI_NAS_ACTIVE_BAND_BC_7: Band class 7.
- * @QMI_NAS_ACTIVE_BAND_BC_8: Band class 8.
- * @QMI_NAS_ACTIVE_BAND_BC_9: Band class 9.
- * @QMI_NAS_ACTIVE_BAND_BC_10: Band class 10.
- * @QMI_NAS_ACTIVE_BAND_BC_11: Band class 11.
- * @QMI_NAS_ACTIVE_BAND_BC_12: Band class 12.
- * @QMI_NAS_ACTIVE_BAND_BC_13: Band class 13.
- * @QMI_NAS_ACTIVE_BAND_BC_14: Band class 14.
- * @QMI_NAS_ACTIVE_BAND_BC_15: Band class 15.
- * @QMI_NAS_ACTIVE_BAND_BC_16: Band class 16.
- * @QMI_NAS_ACTIVE_BAND_BC_17: Band class 17.
- * @QMI_NAS_ACTIVE_BAND_BC_18: Band class 18.
- * @QMI_NAS_ACTIVE_BAND_BC_19: Band class 19.
- * @QMI_NAS_ACTIVE_BAND_GSM_450: GSM 450.
- * @QMI_NAS_ACTIVE_BAND_GSM_480: GSM 480.
- * @QMI_NAS_ACTIVE_BAND_GSM_750: GSM 750.
- * @QMI_NAS_ACTIVE_BAND_GSM_850: GSM 850.
- * @QMI_NAS_ACTIVE_BAND_GSM_900_EXTENDED: GSM 900 (Extended).
- * @QMI_NAS_ACTIVE_BAND_GSM_900_PRIMARY: GSM 900 (Primary).
- * @QMI_NAS_ACTIVE_BAND_GSM_900_RAILWAYS: GSM 900 (Railways).
- * @QMI_NAS_ACTIVE_BAND_GSM_DCS_1800: GSM 1800.
- * @QMI_NAS_ACTIVE_BAND_GSM_PCS_1900: GSM 1900.
- * @QMI_NAS_ACTIVE_BAND_WCDMA_2100: WCDMA 2100.
- * @QMI_NAS_ACTIVE_BAND_WCDMA_PCS_1900: WCDMA PCS 1900.
- * @QMI_NAS_ACTIVE_BAND_WCDMA_DCS_1800: WCDMA DCS 1800.
- * @QMI_NAS_ACTIVE_BAND_WCDMA_1700_US: WCDMA 1700 (U.S.).
- * @QMI_NAS_ACTIVE_BAND_WCDMA_850: WCDMA 850.
- * @QMI_NAS_ACTIVE_BAND_WCDMA_800: WCDMA 800.
- * @QMI_NAS_ACTIVE_BAND_WCDMA_2600: WCDMA 2600.
- * @QMI_NAS_ACTIVE_BAND_WCDMA_900: WCDMA 900.
- * @QMI_NAS_ACTIVE_BAND_WCDMA_1700_JAPAN: WCDMA 1700 (Japan).
- * @QMI_NAS_ACTIVE_BAND_WCDMA_1500_JAPAN: WCDMA 1500 (Japan).
- * @QMI_NAS_ACTIVE_BAND_WCDMA_850_JAPAN: WCDMA 850 (Japan).
- * @QMI_NAS_ACTIVE_BAND_EUTRAN_1: EUTRAN band 1.
- * @QMI_NAS_ACTIVE_BAND_EUTRAN_2: EUTRAN band 2.
- * @QMI_NAS_ACTIVE_BAND_EUTRAN_3: EUTRAN band 3.
- * @QMI_NAS_ACTIVE_BAND_EUTRAN_4: EUTRAN band 4.
- * @QMI_NAS_ACTIVE_BAND_EUTRAN_5: EUTRAN band 5.
- * @QMI_NAS_ACTIVE_BAND_EUTRAN_6: EUTRAN band 6.
- * @QMI_NAS_ACTIVE_BAND_EUTRAN_7: EUTRAN band 7.
- * @QMI_NAS_ACTIVE_BAND_EUTRAN_8: EUTRAN band 8.
- * @QMI_NAS_ACTIVE_BAND_EUTRAN_9: EUTRAN band 9.
- * @QMI_NAS_ACTIVE_BAND_EUTRAN_10: EUTRAN band 10.
- * @QMI_NAS_ACTIVE_BAND_EUTRAN_11: EUTRAN band 11.
- * @QMI_NAS_ACTIVE_BAND_EUTRAN_12: EUTRAN band 12.
- * @QMI_NAS_ACTIVE_BAND_EUTRAN_13: EUTRAN band 13.
- * @QMI_NAS_ACTIVE_BAND_EUTRAN_14: EUTRAN band 14.
- * @QMI_NAS_ACTIVE_BAND_EUTRAN_17: EUTRAN band 17.
- * @QMI_NAS_ACTIVE_BAND_EUTRAN_18: EUTRAN band 18.
- * @QMI_NAS_ACTIVE_BAND_EUTRAN_19: EUTRAN band 19.
- * @QMI_NAS_ACTIVE_BAND_EUTRAN_20: EUTRAN band 20.
- * @QMI_NAS_ACTIVE_BAND_EUTRAN_21: EUTRAN band 21.
- * @QMI_NAS_ACTIVE_BAND_EUTRAN_23: EUTRAN band 23.
- * @QMI_NAS_ACTIVE_BAND_EUTRAN_24: EUTRAN band 24.
- * @QMI_NAS_ACTIVE_BAND_EUTRAN_25: EUTRAN band 25.
- * @QMI_NAS_ACTIVE_BAND_EUTRAN_26: EUTRAN band 26.
- * @QMI_NAS_ACTIVE_BAND_EUTRAN_27: EUTRAN band 27.
- * @QMI_NAS_ACTIVE_BAND_EUTRAN_28: EUTRAN band 28.
- * @QMI_NAS_ACTIVE_BAND_EUTRAN_29: EUTRAN band 29.
- * @QMI_NAS_ACTIVE_BAND_EUTRAN_30: EUTRAN band 30.
- * @QMI_NAS_ACTIVE_BAND_EUTRAN_31: EUTRAN band 31.
- * @QMI_NAS_ACTIVE_BAND_EUTRAN_32: EUTRAN band 32.
- * @QMI_NAS_ACTIVE_BAND_EUTRAN_33: EUTRAN band 33.
- * @QMI_NAS_ACTIVE_BAND_EUTRAN_34: EUTRAN band 34.
- * @QMI_NAS_ACTIVE_BAND_EUTRAN_35: EUTRAN band 35.
- * @QMI_NAS_ACTIVE_BAND_EUTRAN_36: EUTRAN band 36.
- * @QMI_NAS_ACTIVE_BAND_EUTRAN_37: EUTRAN band 37.
- * @QMI_NAS_ACTIVE_BAND_EUTRAN_38: EUTRAN band 38.
- * @QMI_NAS_ACTIVE_BAND_EUTRAN_39: EUTRAN band 39.
- * @QMI_NAS_ACTIVE_BAND_EUTRAN_40: EUTRAN band 40.
- * @QMI_NAS_ACTIVE_BAND_EUTRAN_41: EUTRAN band 41.
- * @QMI_NAS_ACTIVE_BAND_EUTRAN_42: EUTRAN band 42.
- * @QMI_NAS_ACTIVE_BAND_EUTRAN_43: EUTRAN band 43.
- * @QMI_NAS_ACTIVE_BAND_EUTRAN_46: EUTRAN band 46.
- * @QMI_NAS_ACTIVE_BAND_EUTRAN_47: EUTRAN band 47.
- * @QMI_NAS_ACTIVE_BAND_EUTRAN_48: EUTRAN band 48.
- * @QMI_NAS_ACTIVE_BAND_EUTRAN_66: EUTRAN band 66.
- * @QMI_NAS_ACTIVE_BAND_EUTRAN_71: EUTRAN band 71.
- * @QMI_NAS_ACTIVE_BAND_EUTRAN_125: EUTRAN band 125.
- * @QMI_NAS_ACTIVE_BAND_EUTRAN_126: EUTRAN band 126.
- * @QMI_NAS_ACTIVE_BAND_EUTRAN_127: EUTRAN band 127.
- * @QMI_NAS_ACTIVE_BAND_EUTRAN_250: EUTRAN band 250.
- * @QMI_NAS_ACTIVE_BAND_TDSCDMA_A: TD-SCDMA Band A.
- * @QMI_NAS_ACTIVE_BAND_TDSCDMA_B: TD-SCDMA Band B.
- * @QMI_NAS_ACTIVE_BAND_TDSCDMA_C: TD-SCDMA Band C.
- * @QMI_NAS_ACTIVE_BAND_TDSCDMA_D: TD-SCDMA Band D.
- * @QMI_NAS_ACTIVE_BAND_TDSCDMA_E: TD-SCDMA Band E.
- * @QMI_NAS_ACTIVE_BAND_TDSCDMA_F: TD-SCDMA Band F.
- *
- * Band classes.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_NAS_ACTIVE_BAND_BC_0 = 0,
- QMI_NAS_ACTIVE_BAND_BC_1 = 1,
- QMI_NAS_ACTIVE_BAND_BC_2 = 2,
- QMI_NAS_ACTIVE_BAND_BC_3 = 3,
- QMI_NAS_ACTIVE_BAND_BC_4 = 4,
- QMI_NAS_ACTIVE_BAND_BC_5 = 5,
- QMI_NAS_ACTIVE_BAND_BC_6 = 6,
- QMI_NAS_ACTIVE_BAND_BC_7 = 7,
- QMI_NAS_ACTIVE_BAND_BC_8 = 8,
- QMI_NAS_ACTIVE_BAND_BC_9 = 9,
- QMI_NAS_ACTIVE_BAND_BC_10 = 10,
- QMI_NAS_ACTIVE_BAND_BC_11 = 11,
- QMI_NAS_ACTIVE_BAND_BC_12 = 12,
- QMI_NAS_ACTIVE_BAND_BC_13 = 13,
- QMI_NAS_ACTIVE_BAND_BC_14 = 14,
- QMI_NAS_ACTIVE_BAND_BC_15 = 15,
- QMI_NAS_ACTIVE_BAND_BC_16 = 16,
- QMI_NAS_ACTIVE_BAND_BC_17 = 17,
- QMI_NAS_ACTIVE_BAND_BC_18 = 18,
- QMI_NAS_ACTIVE_BAND_BC_19 = 19,
- QMI_NAS_ACTIVE_BAND_GSM_450 = 40,
- QMI_NAS_ACTIVE_BAND_GSM_480 = 41,
- QMI_NAS_ACTIVE_BAND_GSM_750 = 42,
- QMI_NAS_ACTIVE_BAND_GSM_850 = 43,
- QMI_NAS_ACTIVE_BAND_GSM_900_EXTENDED = 44,
- QMI_NAS_ACTIVE_BAND_GSM_900_PRIMARY = 45,
- QMI_NAS_ACTIVE_BAND_GSM_900_RAILWAYS = 46,
- QMI_NAS_ACTIVE_BAND_GSM_DCS_1800 = 47,
- QMI_NAS_ACTIVE_BAND_GSM_PCS_1900 = 48,
- QMI_NAS_ACTIVE_BAND_WCDMA_2100 = 80,
- QMI_NAS_ACTIVE_BAND_WCDMA_PCS_1900 = 81,
- QMI_NAS_ACTIVE_BAND_WCDMA_DCS_1800 = 82,
- QMI_NAS_ACTIVE_BAND_WCDMA_1700_US = 83,
- QMI_NAS_ACTIVE_BAND_WCDMA_850 = 84,
- QMI_NAS_ACTIVE_BAND_WCDMA_800 = 85,
- QMI_NAS_ACTIVE_BAND_WCDMA_2600 = 86,
- QMI_NAS_ACTIVE_BAND_WCDMA_900 = 87,
- QMI_NAS_ACTIVE_BAND_WCDMA_1700_JAPAN = 88,
- QMI_NAS_ACTIVE_BAND_WCDMA_1500_JAPAN = 90,
- QMI_NAS_ACTIVE_BAND_WCDMA_850_JAPAN = 91,
- QMI_NAS_ACTIVE_BAND_EUTRAN_1 = 120,
- QMI_NAS_ACTIVE_BAND_EUTRAN_2 = 121,
- QMI_NAS_ACTIVE_BAND_EUTRAN_3 = 122,
- QMI_NAS_ACTIVE_BAND_EUTRAN_4 = 123,
- QMI_NAS_ACTIVE_BAND_EUTRAN_5 = 124,
- QMI_NAS_ACTIVE_BAND_EUTRAN_6 = 125,
- QMI_NAS_ACTIVE_BAND_EUTRAN_7 = 126,
- QMI_NAS_ACTIVE_BAND_EUTRAN_8 = 127,
- QMI_NAS_ACTIVE_BAND_EUTRAN_9 = 128,
- QMI_NAS_ACTIVE_BAND_EUTRAN_10 = 129,
- QMI_NAS_ACTIVE_BAND_EUTRAN_11 = 130,
- QMI_NAS_ACTIVE_BAND_EUTRAN_12 = 131,
- QMI_NAS_ACTIVE_BAND_EUTRAN_13 = 132,
- QMI_NAS_ACTIVE_BAND_EUTRAN_14 = 133,
- QMI_NAS_ACTIVE_BAND_EUTRAN_17 = 134,
- QMI_NAS_ACTIVE_BAND_EUTRAN_18 = 143,
- QMI_NAS_ACTIVE_BAND_EUTRAN_19 = 144,
- QMI_NAS_ACTIVE_BAND_EUTRAN_20 = 145,
- QMI_NAS_ACTIVE_BAND_EUTRAN_21 = 146,
- QMI_NAS_ACTIVE_BAND_EUTRAN_23 = 152,
- QMI_NAS_ACTIVE_BAND_EUTRAN_24 = 147,
- QMI_NAS_ACTIVE_BAND_EUTRAN_25 = 148,
- QMI_NAS_ACTIVE_BAND_EUTRAN_26 = 153,
- QMI_NAS_ACTIVE_BAND_EUTRAN_27 = 164,
- QMI_NAS_ACTIVE_BAND_EUTRAN_28 = 158,
- QMI_NAS_ACTIVE_BAND_EUTRAN_29 = 159,
- QMI_NAS_ACTIVE_BAND_EUTRAN_30 = 160,
- QMI_NAS_ACTIVE_BAND_EUTRAN_31 = 165,
- QMI_NAS_ACTIVE_BAND_EUTRAN_32 = 154,
- QMI_NAS_ACTIVE_BAND_EUTRAN_33 = 135,
- QMI_NAS_ACTIVE_BAND_EUTRAN_34 = 136,
- QMI_NAS_ACTIVE_BAND_EUTRAN_35 = 137,
- QMI_NAS_ACTIVE_BAND_EUTRAN_36 = 138,
- QMI_NAS_ACTIVE_BAND_EUTRAN_37 = 139,
- QMI_NAS_ACTIVE_BAND_EUTRAN_38 = 140,
- QMI_NAS_ACTIVE_BAND_EUTRAN_39 = 141,
- QMI_NAS_ACTIVE_BAND_EUTRAN_40 = 142,
- QMI_NAS_ACTIVE_BAND_EUTRAN_41 = 149,
- QMI_NAS_ACTIVE_BAND_EUTRAN_42 = 150,
- QMI_NAS_ACTIVE_BAND_EUTRAN_43 = 151,
- QMI_NAS_ACTIVE_BAND_EUTRAN_46 = 163,
- QMI_NAS_ACTIVE_BAND_EUTRAN_47 = 166,
- QMI_NAS_ACTIVE_BAND_EUTRAN_48 = 167,
- QMI_NAS_ACTIVE_BAND_EUTRAN_66 = 161,
- QMI_NAS_ACTIVE_BAND_EUTRAN_71 = 168,
- QMI_NAS_ACTIVE_BAND_EUTRAN_125 = 155,
- QMI_NAS_ACTIVE_BAND_EUTRAN_126 = 156,
- QMI_NAS_ACTIVE_BAND_EUTRAN_127 = 157,
- QMI_NAS_ACTIVE_BAND_EUTRAN_250 = 162,
- QMI_NAS_ACTIVE_BAND_TDSCDMA_A = 200,
- QMI_NAS_ACTIVE_BAND_TDSCDMA_B = 201,
- QMI_NAS_ACTIVE_BAND_TDSCDMA_C = 202,
- QMI_NAS_ACTIVE_BAND_TDSCDMA_D = 203,
- QMI_NAS_ACTIVE_BAND_TDSCDMA_E = 204,
- QMI_NAS_ACTIVE_BAND_TDSCDMA_F = 205
-} QmiNasActiveBand;
-
-/**
- * QmiNasNetworkServiceDomain:
- * @QMI_NAS_NETWORK_SERVICE_DOMAIN_NONE: No service.
- * @QMI_NAS_NETWORK_SERVICE_DOMAIN_CS: Circuit switched.
- * @QMI_NAS_NETWORK_SERVICE_DOMAIN_PS: Packet switched.
- * @QMI_NAS_NETWORK_SERVICE_DOMAIN_CS_PS: Circuit and packet switched.
- * @QMI_NAS_NETWORK_SERVICE_DOMAIN_UNKNOWN: Unknown service.
- *
- * Network Service Domain.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_NAS_NETWORK_SERVICE_DOMAIN_NONE = 0x00,
- QMI_NAS_NETWORK_SERVICE_DOMAIN_CS = 0x01,
- QMI_NAS_NETWORK_SERVICE_DOMAIN_PS = 0x02,
- QMI_NAS_NETWORK_SERVICE_DOMAIN_CS_PS = 0x03,
- QMI_NAS_NETWORK_SERVICE_DOMAIN_UNKNOWN = 0x04,
-} QmiNasNetworkServiceDomain;
-
-/**
- * QmiNasEvdoSinrLevel:
- * @QMI_NAS_EVDO_SINR_LEVEL_0: -9 dB.
- * @QMI_NAS_EVDO_SINR_LEVEL_1: -6 dB.
- * @QMI_NAS_EVDO_SINR_LEVEL_2: -4.5 dB.
- * @QMI_NAS_EVDO_SINR_LEVEL_3: -3 dB.
- * @QMI_NAS_EVDO_SINR_LEVEL_4: -2 dB.
- * @QMI_NAS_EVDO_SINR_LEVEL_5: +1 dB.
- * @QMI_NAS_EVDO_SINR_LEVEL_6: +3 dB.
- * @QMI_NAS_EVDO_SINR_LEVEL_7: +6 dB.
- * @QMI_NAS_EVDO_SINR_LEVEL_8: +9 dB.
- *
- * EV-DO SINR level.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_NAS_EVDO_SINR_LEVEL_0 = 0,
- QMI_NAS_EVDO_SINR_LEVEL_1 = 1,
- QMI_NAS_EVDO_SINR_LEVEL_2 = 2,
- QMI_NAS_EVDO_SINR_LEVEL_3 = 3,
- QMI_NAS_EVDO_SINR_LEVEL_4 = 4,
- QMI_NAS_EVDO_SINR_LEVEL_5 = 5,
- QMI_NAS_EVDO_SINR_LEVEL_6 = 6,
- QMI_NAS_EVDO_SINR_LEVEL_7 = 7,
- QMI_NAS_EVDO_SINR_LEVEL_8 = 8
-} QmiNasEvdoSinrLevel;
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI NAS Get Signal Strength' request/response */
-
-/**
- * QmiNasSignalStrengthRequest:
- * @QMI_NAS_SIGNAL_STRENGTH_REQUEST_NONE: None.
- * @QMI_NAS_SIGNAL_STRENGTH_REQUEST_RSSI: Request RSSI information.
- * @QMI_NAS_SIGNAL_STRENGTH_REQUEST_ECIO: Request ECIO information.
- * @QMI_NAS_SIGNAL_STRENGTH_REQUEST_IO: Request IO information.
- * @QMI_NAS_SIGNAL_STRENGTH_REQUEST_SINR: Request SINR information.
- * @QMI_NAS_SIGNAL_STRENGTH_REQUEST_ERROR_RATE: Request error rate information.
- * @QMI_NAS_SIGNAL_STRENGTH_REQUEST_RSRQ: Request RSRQ information.
- * @QMI_NAS_SIGNAL_STRENGTH_REQUEST_LTE_SNR: Request LTE SNR information.
- * @QMI_NAS_SIGNAL_STRENGTH_REQUEST_LTE_RSRP: Request LTE RSRP information.
- *
- * Extra information to request when gathering Signal Strength.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_NAS_SIGNAL_STRENGTH_REQUEST_NONE = 0,
- QMI_NAS_SIGNAL_STRENGTH_REQUEST_RSSI = 1 << 0,
- QMI_NAS_SIGNAL_STRENGTH_REQUEST_ECIO = 1 << 1,
- QMI_NAS_SIGNAL_STRENGTH_REQUEST_IO = 1 << 2,
- QMI_NAS_SIGNAL_STRENGTH_REQUEST_SINR = 1 << 3,
- QMI_NAS_SIGNAL_STRENGTH_REQUEST_ERROR_RATE = 1 << 4,
- QMI_NAS_SIGNAL_STRENGTH_REQUEST_RSRQ = 1 << 5,
- QMI_NAS_SIGNAL_STRENGTH_REQUEST_LTE_SNR = 1 << 6,
- QMI_NAS_SIGNAL_STRENGTH_REQUEST_LTE_RSRP = 1 << 7
-} QmiNasSignalStrengthRequest;
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI NAS Network Scan' request/response */
-
-/**
- * QmiNasNetworkScanType:
- * @QMI_NAS_NETWORK_SCAN_TYPE_GSM: GSM network.
- * @QMI_NAS_NETWORK_SCAN_TYPE_UMTS: UMTS network.
- * @QMI_NAS_NETWORK_SCAN_TYPE_LTE: LTE network.
- * @QMI_NAS_NETWORK_SCAN_TYPE_TD_SCDMA: TD-SCDMA network.
- *
- * Flags to use when specifying which networks to scan.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_NAS_NETWORK_SCAN_TYPE_GSM = 1 << 0,
- QMI_NAS_NETWORK_SCAN_TYPE_UMTS = 1 << 1,
- QMI_NAS_NETWORK_SCAN_TYPE_LTE = 1 << 2,
- QMI_NAS_NETWORK_SCAN_TYPE_TD_SCDMA = 1 << 3
-} QmiNasNetworkScanType;
-
-/**
- * QmiNasNetworkScanResult:
- * @QMI_NAS_NETWORK_SCAN_RESULT_SUCCESS: Success.
- * @QMI_NAS_NETWORK_SCAN_RESULT_ABORT: Abort.
- * @QMI_NAS_NETWORK_SCAN_RESULT_RADIO_LINK_FAILURE: Radio link failure.
- *
- * Network scan result.
- *
- * Since: 1.24
- */
-typedef enum { /*< since=1.24 >*/
- QMI_NAS_NETWORK_SCAN_RESULT_SUCCESS = 0,
- QMI_NAS_NETWORK_SCAN_RESULT_ABORT = 1,
- QMI_NAS_NETWORK_SCAN_RESULT_RADIO_LINK_FAILURE = 2,
-} QmiNasNetworkScanResult;
-
-/**
- * QmiNasNetworkStatus:
- * @QMI_NAS_NETWORK_STATUS_CURRENT_SERVING: Network is in use, current serving.
- * @QMI_NAS_NETWORK_STATUS_AVAILABLE: Network is vailable.
- * @QMI_NAS_NETWORK_STATUS_HOME: Network is home network.
- * @QMI_NAS_NETWORK_STATUS_ROAMING: Network is a roaming network.
- * @QMI_NAS_NETWORK_STATUS_FORBIDDEN: Network is forbidden.
- * @QMI_NAS_NETWORK_STATUS_NOT_FORBIDDEN: Network is not forbidden.
- * @QMI_NAS_NETWORK_STATUS_PREFERRED: Network is preferred.
- * @QMI_NAS_NETWORK_STATUS_NOT_PREFERRED: Network is not preferred.
- *
- * Flags to specify the status of a given network.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_NAS_NETWORK_STATUS_CURRENT_SERVING = 1 << 0,
- QMI_NAS_NETWORK_STATUS_AVAILABLE = 1 << 1,
- QMI_NAS_NETWORK_STATUS_HOME = 1 << 2,
- QMI_NAS_NETWORK_STATUS_ROAMING = 1 << 3,
- QMI_NAS_NETWORK_STATUS_FORBIDDEN = 1 << 4,
- QMI_NAS_NETWORK_STATUS_NOT_FORBIDDEN = 1 << 5,
- QMI_NAS_NETWORK_STATUS_PREFERRED = 1 << 6,
- QMI_NAS_NETWORK_STATUS_NOT_PREFERRED = 1 << 7
-} QmiNasNetworkStatus;
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI NAS Initiate Network Register' request/response */
-
-/**
- * QmiNasNetworkRegisterType:
- * @QMI_NAS_NETWORK_REGISTER_TYPE_AUTOMATIC: Automatic network registration.
- * @QMI_NAS_NETWORK_REGISTER_TYPE_MANUAL: Manual network registration.
- *
- * Type of network registration.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_NAS_NETWORK_REGISTER_TYPE_AUTOMATIC = 0x01,
- QMI_NAS_NETWORK_REGISTER_TYPE_MANUAL = 0x02
-} QmiNasNetworkRegisterType;
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI NAS Attach Detach' request/response */
-
-/**
- * QmiNasPsAttachAction:
- * @QMI_NAS_PS_ATTACH_ACTION_ATTACH: Attach the PS domain.
- * @QMI_NAS_PS_ATTACH_ACTION_DETACH: Detach the PS domain.
- *
- * Packet Switched domain attach/detach action.
- *
- * Since: 1.20
- */
-typedef enum { /*< since=1.20 >*/
- QMI_NAS_PS_ATTACH_ACTION_ATTACH = 0x01,
- QMI_NAS_PS_ATTACH_ACTION_DETACH = 0x02
-} QmiNasPsAttachAction;
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI NAS Get Serving System' request/response */
-
-/**
- * QmiNasRegistrationState:
- * @QMI_NAS_REGISTRATION_STATE_NOT_REGISTERED: Not registered.
- * @QMI_NAS_REGISTRATION_STATE_REGISTERED: Registered.
- * @QMI_NAS_REGISTRATION_STATE_NOT_REGISTERED_SEARCHING: Searching.
- * @QMI_NAS_REGISTRATION_STATE_REGISTRATION_DENIED: Registration denied.
- * @QMI_NAS_REGISTRATION_STATE_UNKNOWN: Unknown.
- *
- * Status of the network registration.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_NAS_REGISTRATION_STATE_NOT_REGISTERED = 0x00,
- QMI_NAS_REGISTRATION_STATE_REGISTERED = 0x01,
- QMI_NAS_REGISTRATION_STATE_NOT_REGISTERED_SEARCHING = 0x02,
- QMI_NAS_REGISTRATION_STATE_REGISTRATION_DENIED = 0x03,
- QMI_NAS_REGISTRATION_STATE_UNKNOWN = 0x04
-} QmiNasRegistrationState;
-
-/**
- * QmiNasAttachState:
- * @QMI_NAS_ATTACH_STATE_UNKNOWN: Unknown attach state.
- * @QMI_NAS_ATTACH_STATE_ATTACHED: Attached.
- * @QMI_NAS_ATTACH_STATE_DETACHED: Detached.
- *
- * Domain attach state.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_NAS_ATTACH_STATE_UNKNOWN = 0x00,
- QMI_NAS_ATTACH_STATE_ATTACHED = 0x01,
- QMI_NAS_ATTACH_STATE_DETACHED = 0x02,
-} QmiNasAttachState;
-
-/**
- * QmiNasNetworkType:
- * @QMI_NAS_NETWORK_TYPE_UNKNOWN: Unknown.
- * @QMI_NAS_NETWORK_TYPE_3GPP2: 3GPP2 network.
- * @QMI_NAS_NETWORK_TYPE_3GPP: 3GPP network.
- *
- * Type of network.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_NAS_NETWORK_TYPE_UNKNOWN = 0x00,
- QMI_NAS_NETWORK_TYPE_3GPP2 = 0x01,
- QMI_NAS_NETWORK_TYPE_3GPP = 0x02,
-} QmiNasNetworkType;
-
-/**
- * QmiNasRoamingIndicatorStatus:
- * @QMI_NAS_ROAMING_INDICATOR_STATUS_ON: Roaming.
- * @QMI_NAS_ROAMING_INDICATOR_STATUS_OFF: Home.
- *
- * Status of the roaming indication.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_NAS_ROAMING_INDICATOR_STATUS_ON = 0x00,
- QMI_NAS_ROAMING_INDICATOR_STATUS_OFF = 0x01,
- /* next values only for 3GPP2 */
-} QmiNasRoamingIndicatorStatus;
-
-/**
- * QmiNasDataCapability:
- * @QMI_NAS_DATA_CAPABILITY_NONE: None or unknown.
- * @QMI_NAS_DATA_CAPABILITY_GPRS: GPRS.
- * @QMI_NAS_DATA_CAPABILITY_EDGE: EDGE.
- * @QMI_NAS_DATA_CAPABILITY_HSDPA: HSDPA.
- * @QMI_NAS_DATA_CAPABILITY_HSUPA: HSUPA.
- * @QMI_NAS_DATA_CAPABILITY_WCDMA: WCDMA.
- * @QMI_NAS_DATA_CAPABILITY_CDMA: CDMA.
- * @QMI_NAS_DATA_CAPABILITY_EVDO_REV_0: EV-DO revision 0.
- * @QMI_NAS_DATA_CAPABILITY_EVDO_REV_A: EV-DO revision A.
- * @QMI_NAS_DATA_CAPABILITY_GSM: GSM.
- * @QMI_NAS_DATA_CAPABILITY_EVDO_REV_B: EV-DO revision B.
- * @QMI_NAS_DATA_CAPABILITY_LTE: LTE.
- * @QMI_NAS_DATA_CAPABILITY_HSDPA_PLUS: HSDPA+.
- * @QMI_NAS_DATA_CAPABILITY_DC_HSDPA_PLUS: DC-HSDPA+.
- *
- * Data capability of the network.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_NAS_DATA_CAPABILITY_NONE = 0x00,
- QMI_NAS_DATA_CAPABILITY_GPRS = 0x01,
- QMI_NAS_DATA_CAPABILITY_EDGE = 0x02,
- QMI_NAS_DATA_CAPABILITY_HSDPA = 0x03,
- QMI_NAS_DATA_CAPABILITY_HSUPA = 0x04,
- QMI_NAS_DATA_CAPABILITY_WCDMA = 0x05,
- QMI_NAS_DATA_CAPABILITY_CDMA = 0x06,
- QMI_NAS_DATA_CAPABILITY_EVDO_REV_0 = 0x07,
- QMI_NAS_DATA_CAPABILITY_EVDO_REV_A = 0x08,
- QMI_NAS_DATA_CAPABILITY_GSM = 0x09,
- QMI_NAS_DATA_CAPABILITY_EVDO_REV_B = 0x0A,
- QMI_NAS_DATA_CAPABILITY_LTE = 0x0B,
- QMI_NAS_DATA_CAPABILITY_HSDPA_PLUS = 0x0C,
- QMI_NAS_DATA_CAPABILITY_DC_HSDPA_PLUS = 0x0D
-} QmiNasDataCapability;
-
-/**
- * QmiNasServiceStatus:
- * @QMI_NAS_SERVICE_STATUS_NONE: No service.
- * @QMI_NAS_SERVICE_STATUS_LIMITED: Limited service.
- * @QMI_NAS_SERVICE_STATUS_AVAILABLE: Service available.
- * @QMI_NAS_SERVICE_STATUS_LIMITED_REGIONAL: Limited regional service.
- * @QMI_NAS_SERVICE_STATUS_POWER_SAVE: Device in power save mode.
- *
- * Status of the service.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_NAS_SERVICE_STATUS_NONE = 0x00,
- QMI_NAS_SERVICE_STATUS_LIMITED = 0x01,
- QMI_NAS_SERVICE_STATUS_AVAILABLE = 0x02,
- QMI_NAS_SERVICE_STATUS_LIMITED_REGIONAL = 0x03,
- QMI_NAS_SERVICE_STATUS_POWER_SAVE = 0x04
-} QmiNasServiceStatus;
-
-/**
- * QmiNasHdrPersonality:
- * @QMI_NAS_HDR_PERSONALITY_UNKNOWN: Unknown.
- * @QMI_NAS_HDR_PERSONALITY_HRPD: HRPD.
- * @QMI_NAS_HDR_PERSONALITY_EHRPD: eHRPD.
- *
- * HDR personality type.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_NAS_HDR_PERSONALITY_UNKNOWN = 0x00,
- QMI_NAS_HDR_PERSONALITY_HRPD = 0x01,
- QMI_NAS_HDR_PERSONALITY_EHRPD = 0x02,
-} QmiNasHdrPersonality;
-
-/**
- * QmiNasCallBarringStatus:
- * @QMI_NAS_CALL_BARRING_STATUS_NORMAL_ONLY: Normal calls only.
- * @QMI_NAS_CALL_BARRING_STATUS_EMERGENCY_ONLY: Emergency calls only.
- * @QMI_NAS_CALL_BARRING_STATUS_NO_CALLS: No calls allowed.
- * @QMI_NAS_CALL_BARRING_STATUS_ALL_CALLS: All calls allowed.
- * @QMI_NAS_CALL_BARRING_STATUS_UNKNOWN: Unknown.
- *
- * Status of the call barring functionality.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_NAS_CALL_BARRING_STATUS_NORMAL_ONLY = 0x00,
- QMI_NAS_CALL_BARRING_STATUS_EMERGENCY_ONLY = 0x01,
- QMI_NAS_CALL_BARRING_STATUS_NO_CALLS = 0x02,
- QMI_NAS_CALL_BARRING_STATUS_ALL_CALLS = 0x03,
- QMI_NAS_CALL_BARRING_STATUS_UNKNOWN = -1
-} QmiNasCallBarringStatus;
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI NAS Get Home Network' request/response */
-
-/**
- * QmiNasNetworkDescriptionDisplay:
- * @QMI_NAS_NETWORK_DESCRIPTION_DISPLAY_NO: Don't display.
- * @QMI_NAS_NETWORK_DESCRIPTION_DISPLAY_YES: Display.
- * @QMI_NAS_NETWORK_DESCRIPTION_DISPLAY_UNKNOWN: Unknown.
- *
- * Setup to define whether the network description should be displayed.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_NAS_NETWORK_DESCRIPTION_DISPLAY_NO = 0x00,
- QMI_NAS_NETWORK_DESCRIPTION_DISPLAY_YES = 0x01,
- QMI_NAS_NETWORK_DESCRIPTION_DISPLAY_UNKNOWN = 0xFF
-} QmiNasNetworkDescriptionDisplay;
-
-/**
- * QmiNasNetworkDescriptionEncoding:
- * @QMI_NAS_NETWORK_DESCRIPTION_ENCODING_UNSPECIFIED: Unspecified.
- * @QMI_NAS_NETWORK_DESCRIPTION_ENCODING_ASCII7: ASCII-7.
- * @QMI_NAS_NETWORK_DESCRIPTION_ENCODING_UNICODE: Unicode.
- * @QMI_NAS_NETWORK_DESCRIPTION_ENCODING_GSM: GSM 7-bit.
- *
- * Type of encoding used in the network description.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_NAS_NETWORK_DESCRIPTION_ENCODING_UNSPECIFIED = 0x00,
- QMI_NAS_NETWORK_DESCRIPTION_ENCODING_ASCII7 = 0x01,
- QMI_NAS_NETWORK_DESCRIPTION_ENCODING_UNICODE = 0x04,
- QMI_NAS_NETWORK_DESCRIPTION_ENCODING_GSM = 0x09
-} QmiNasNetworkDescriptionEncoding;
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI NAS Get Preferred Networks' request/response */
-
-/**
- * QmiNasPlmnAccessTechnologyIdentifier:
- * @QMI_NAS_PLMN_ACCESS_TECHNOLOGY_IDENTIFIER_UNSPECIFIED: Unspecified.
- * @QMI_NAS_PLMN_ACCESS_TECHNOLOGY_IDENTIFIER_GSM_COMPACT: GSM Compact.
- * @QMI_NAS_PLMN_ACCESS_TECHNOLOGY_IDENTIFIER_GSM: GSM.
- * @QMI_NAS_PLMN_ACCESS_TECHNOLOGY_IDENTIFIER_NGRAN: NG-RAN.
- * @QMI_NAS_PLMN_ACCESS_TECHNOLOGY_IDENTIFIER_EUTRAN: E-UTRAN.
- * @QMI_NAS_PLMN_ACCESS_TECHNOLOGY_IDENTIFIER_UTRAN: UTRAN.
- * @QMI_NAS_PLMN_ACCESS_TECHNOLOGY_IDENTIFIER_ALL: All technologies.
- *
- * Preferred networks access technology identifier as specified in
- * ETSI TS 131 102, chapter 4.2.5.
- *
- * Since: 1.30
- */
-typedef enum { /*< since=1.30 >*/
- QMI_NAS_PLMN_ACCESS_TECHNOLOGY_IDENTIFIER_UNSPECIFIED = 0x0000,
- QMI_NAS_PLMN_ACCESS_TECHNOLOGY_IDENTIFIER_GSM_COMPACT = 1 << 6,
- QMI_NAS_PLMN_ACCESS_TECHNOLOGY_IDENTIFIER_GSM = 1 << 7,
- QMI_NAS_PLMN_ACCESS_TECHNOLOGY_IDENTIFIER_NGRAN = 1 << 11,
- QMI_NAS_PLMN_ACCESS_TECHNOLOGY_IDENTIFIER_EUTRAN = 1 << 14,
- QMI_NAS_PLMN_ACCESS_TECHNOLOGY_IDENTIFIER_UTRAN = 1 << 15,
- QMI_NAS_PLMN_ACCESS_TECHNOLOGY_IDENTIFIER_ALL = 0xFFFF
-} QmiNasPlmnAccessTechnologyIdentifier;
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI NAS Get Technology Preference' request/response */
-
-/**
- * QmiNasRadioTechnologyPreference:
- * @QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_AUTO: Automatic selection.
- * @QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_3GPP2: 3GPP2 technology.
- * @QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_3GPP: 3GPP technology.
- * @QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_AMPS_OR_GSM: AMPS if 3GPP2, GSM if 3GPP.
- * @QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_CDMA_OR_WCDMA: CDMA if 3GPP2, WCDMA if 3GPP.
- * @QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_HDR: CDMA EV-DO.
- * @QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_LTE: LTE.
- *
- * Flags to specify the radio technology preference.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_AUTO = 0,
- QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_3GPP2 = 1 << 0,
- QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_3GPP = 1 << 1,
- QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_AMPS_OR_GSM = 1 << 2,
- QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_CDMA_OR_WCDMA = 1 << 3,
- QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_HDR = 1 << 4,
- QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_LTE = 1 << 5
-} QmiNasRadioTechnologyPreference;
-
-/**
- * QmiNasPreferenceDuration:
- * @QMI_NAS_PREFERENCE_DURATION_PERMANENT: Permanent.
- * @QMI_NAS_PREFERENCE_DURATION_POWER_CYCLE: Until the next power cycle.
- * @QMI_NAS_PREFERENCE_DURATION_ONE_CALL: Until end of call.
- * @QMI_NAS_PREFERENCE_DURATION_ONE_CALL_OR_TIME: Until end of call or a specified time.
- * @QMI_NAS_PREFERENCE_DURATION_INTERNAL_ONE_CALL_1: Internal reason 1, one call.
- * @QMI_NAS_PREFERENCE_DURATION_INTERNAL_ONE_CALL_2: Internal reason 2, one call.
- * @QMI_NAS_PREFERENCE_DURATION_INTERNAL_ONE_CALL_3: Internal reason 3, one call.
- *
- * Duration of the preference setting.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_NAS_PREFERENCE_DURATION_PERMANENT = 0x00,
- QMI_NAS_PREFERENCE_DURATION_POWER_CYCLE = 0x01,
- QMI_NAS_PREFERENCE_DURATION_ONE_CALL = 0x02,
- QMI_NAS_PREFERENCE_DURATION_ONE_CALL_OR_TIME = 0x03,
- QMI_NAS_PREFERENCE_DURATION_INTERNAL_ONE_CALL_1 = 0x04,
- QMI_NAS_PREFERENCE_DURATION_INTERNAL_ONE_CALL_2 = 0x05,
- QMI_NAS_PREFERENCE_DURATION_INTERNAL_ONE_CALL_3 = 0x06
-} QmiNasPreferenceDuration;
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI NAS Get/Set System Selection Preference'
- * requests/responses */
-
-/**
- * QmiNasRatModePreference:
- * @QMI_NAS_RAT_MODE_PREFERENCE_CDMA_1X: CDMA2000 1X.
- * @QMI_NAS_RAT_MODE_PREFERENCE_CDMA_1XEVDO: CDMA2000 HRPD (1xEV-DO).
- * @QMI_NAS_RAT_MODE_PREFERENCE_GSM: GSM.
- * @QMI_NAS_RAT_MODE_PREFERENCE_UMTS: UMTS.
- * @QMI_NAS_RAT_MODE_PREFERENCE_LTE: LTE.
- * @QMI_NAS_RAT_MODE_PREFERENCE_TD_SCDMA: TD-SCDMA.
- * @QMI_NAS_RAT_MODE_PREFERENCE_5GNR: 5GNR. Since 1.26.
- *
- * Flags specifying radio access technology mode preference.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_NAS_RAT_MODE_PREFERENCE_CDMA_1X = 1 << 0,
- QMI_NAS_RAT_MODE_PREFERENCE_CDMA_1XEVDO = 1 << 1,
- QMI_NAS_RAT_MODE_PREFERENCE_GSM = 1 << 2,
- QMI_NAS_RAT_MODE_PREFERENCE_UMTS = 1 << 3,
- QMI_NAS_RAT_MODE_PREFERENCE_LTE = 1 << 4,
- QMI_NAS_RAT_MODE_PREFERENCE_TD_SCDMA = 1 << 5,
- QMI_NAS_RAT_MODE_PREFERENCE_5GNR = 1 << 6,
-} QmiNasRatModePreference;
-
-/**
- * QmiNasCdmaPrlPreference:
- * @QMI_NAS_CDMA_PRL_PREFERENCE_A_SIDE_ONLY: System A only.
- * @QMI_NAS_CDMA_PRL_PREFERENCE_B_SIDE_ONLY: System B only.
- * @QMI_NAS_CDMA_PRL_PREFERENCE_ANY: Any system.
- *
- * Flags specifying the preference when using CDMA Band Class 0.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_NAS_CDMA_PRL_PREFERENCE_A_SIDE_ONLY = 0x0001,
- QMI_NAS_CDMA_PRL_PREFERENCE_B_SIDE_ONLY = 0x0002,
- QMI_NAS_CDMA_PRL_PREFERENCE_ANY = 0x3FFF
-} QmiNasCdmaPrlPreference;
-
-/**
- * QmiNasRoamingPreference:
- * @QMI_NAS_ROAMING_PREFERENCE_OFF: Only non-roaming networks.
- * @QMI_NAS_ROAMING_PREFERENCE_NOT_OFF: Only roaming networks.
- * @QMI_NAS_ROAMING_PREFERENCE_NOT_FLASHING: Only non-roaming networks or not flashing.
- * @QMI_NAS_ROAMING_PREFERENCE_ANY: Don't filter by roaming when acquiring networks.
- *
- * Roaming preference.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_NAS_ROAMING_PREFERENCE_OFF = 0x01,
- QMI_NAS_ROAMING_PREFERENCE_NOT_OFF = 0x02,
- QMI_NAS_ROAMING_PREFERENCE_NOT_FLASHING = 0x03,
- QMI_NAS_ROAMING_PREFERENCE_ANY = 0xFF
-} QmiNasRoamingPreference;
-
-/**
- * QmiNasNetworkSelectionPreference:
- * @QMI_NAS_NETWORK_SELECTION_PREFERENCE_AUTOMATIC: Automatic.
- * @QMI_NAS_NETWORK_SELECTION_PREFERENCE_MANUAL: Manual.
- *
- * Network selection preference.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_NAS_NETWORK_SELECTION_PREFERENCE_AUTOMATIC = 0x00,
- QMI_NAS_NETWORK_SELECTION_PREFERENCE_MANUAL = 0x01
-} QmiNasNetworkSelectionPreference;
-
-/**
- * QmiNasChangeDuration:
- * @QMI_NAS_CHANGE_DURATION_PERMANENT: Permanent.
- * @QMI_NAS_CHANGE_DURATION_POWER_CYCLE: Until the next power cycle.
- *
- * Duration of the change setting.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_NAS_CHANGE_DURATION_POWER_CYCLE = 0x00,
- QMI_NAS_CHANGE_DURATION_PERMANENT = 0x01
-} QmiNasChangeDuration;
-
-/**
- * QmiNasServiceDomainPreference:
- * @QMI_NAS_SERVICE_DOMAIN_PREFERENCE_CS_ONLY: Circuit-switched only.
- * @QMI_NAS_SERVICE_DOMAIN_PREFERENCE_PS_ONLY: Packet-switched only.
- * @QMI_NAS_SERVICE_DOMAIN_PREFERENCE_CS_PS: Circuit-switched and packet-switched.
- * @QMI_NAS_SERVICE_DOMAIN_PREFERENCE_PS_ATTACH: Packet-switched attach.
- * @QMI_NAS_SERVICE_DOMAIN_PREFERENCE_PS_DETACH:Packet-switched dettach.
- *
- * Service domain preference.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_NAS_SERVICE_DOMAIN_PREFERENCE_CS_ONLY = 0x00,
- QMI_NAS_SERVICE_DOMAIN_PREFERENCE_PS_ONLY = 0x01,
- QMI_NAS_SERVICE_DOMAIN_PREFERENCE_CS_PS = 0x02,
- QMI_NAS_SERVICE_DOMAIN_PREFERENCE_PS_ATTACH = 0x03,
- QMI_NAS_SERVICE_DOMAIN_PREFERENCE_PS_DETACH = 0x04,
-} QmiNasServiceDomainPreference;
-
-/**
- * QmiNasGsmWcdmaAcquisitionOrderPreference:
- * @QMI_NAS_GSM_WCDMA_ACQUISITION_ORDER_PREFERENCE_AUTOMATIC: Automatic.
- * @QMI_NAS_GSM_WCDMA_ACQUISITION_ORDER_PREFERENCE_GSM: GSM first, then WCDMA.
- * @QMI_NAS_GSM_WCDMA_ACQUISITION_ORDER_PREFERENCE_WCDMA: WCDMA first, then GSM.
- *
- * GSM/WCDMA acquisition order preference.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_NAS_GSM_WCDMA_ACQUISITION_ORDER_PREFERENCE_AUTOMATIC = 0x00,
- QMI_NAS_GSM_WCDMA_ACQUISITION_ORDER_PREFERENCE_GSM = 0x01,
- QMI_NAS_GSM_WCDMA_ACQUISITION_ORDER_PREFERENCE_WCDMA = 0x02
-} QmiNasGsmWcdmaAcquisitionOrderPreference;
-
-/**
- * QmiNasTdScdmaBandPreference:
- * @QMI_NAS_TD_SCDMA_BAND_PREFERENCE_A: Band A.
- * @QMI_NAS_TD_SCDMA_BAND_PREFERENCE_B: Band B.
- * @QMI_NAS_TD_SCDMA_BAND_PREFERENCE_C: Band C.
- * @QMI_NAS_TD_SCDMA_BAND_PREFERENCE_D: Band D.
- * @QMI_NAS_TD_SCDMA_BAND_PREFERENCE_E: Band E.
- * @QMI_NAS_TD_SCDMA_BAND_PREFERENCE_F: Band F.
- *
- * Flags to specify TD-SCDMA-specific frequency band preferences.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_NAS_TD_SCDMA_BAND_PREFERENCE_A = 1 << 0,
- QMI_NAS_TD_SCDMA_BAND_PREFERENCE_B = 1 << 1,
- QMI_NAS_TD_SCDMA_BAND_PREFERENCE_C = 1 << 2,
- QMI_NAS_TD_SCDMA_BAND_PREFERENCE_D = 1 << 3,
- QMI_NAS_TD_SCDMA_BAND_PREFERENCE_E = 1 << 4,
- QMI_NAS_TD_SCDMA_BAND_PREFERENCE_F = 1 << 5
-} QmiNasTdScdmaBandPreference;
-
-/**
- * QmiNasVoiceDomainPreference:
- * @QMI_NAS_VOICE_DOMAIN_PREFERENCE_CS_ONLY: Circuit-switched voice only
- * @QMI_NAS_VOICE_DOMAIN_PREFERENCE_PS_ONLY: Packet-switched voice only.
- * @QMI_NAS_VOICE_DOMAIN_PREFERENCE_CS_PREFERRED: Circuit-switched voice is preferred.
- * @QMI_NAS_VOICE_DOMAIN_PREFERENCE_PS_PREFERRED: Packet-switched voice is preferred.
- *
- * Voice domain preference.
- *
- * Since: 1.24
- */
-typedef enum { /*< since=1.24 >*/
- QMI_NAS_VOICE_DOMAIN_PREFERENCE_CS_ONLY = 0x00,
- QMI_NAS_VOICE_DOMAIN_PREFERENCE_PS_ONLY = 0x01,
- QMI_NAS_VOICE_DOMAIN_PREFERENCE_CS_PREFERRED = 0x02,
- QMI_NAS_VOICE_DOMAIN_PREFERENCE_PS_PREFERRED = 0x03,
-} QmiNasVoiceDomainPreference;
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI NAS Get System Info' request/response */
-
-/**
- * QmiNasNetworkSelectionRegistrationRestriction:
- * @QMI_NAS_NETWORK_SELECTION_REGISTRATION_RESTRICTION_UNRESTRICTED: Device follows the normal registration process.
- * @QMI_NAS_NETWORK_SELECTION_REGISTRATION_RESTRICTION_CAMPED_ONLY: Device camps on the network according to its provisioning, but does not register.
- * @QMI_NAS_NETWORK_SELECTION_REGISTRATION_RESTRICTION_LIMITED: Device selects the network for limited service.
- *
- * Registration restriction.
- *
- * Since: 1.24
- */
-typedef enum { /*< since=1.24 >*/
- QMI_NAS_NETWORK_SELECTION_REGISTRATION_RESTRICTION_UNRESTRICTED = 0x00,
- QMI_NAS_NETWORK_SELECTION_REGISTRATION_RESTRICTION_CAMPED_ONLY = 0x01,
- QMI_NAS_NETWORK_SELECTION_REGISTRATION_RESTRICTION_LIMITED = 0x02,
-} QmiNasNetworkSelectionRegistrationRestriction;
-
-/**
- * QmiNasLteRegistrationDomain:
- * @QMI_NAS_LTE_REGISTRATION_DOMAIN_NOT_APPLICABLE: Not applicable since the UE is not in "Camp Only" mode.
- * @QMI_NAS_LTE_REGISTRATION_DOMAIN_CS_ONLY: UE is in "Camp Only" mode and the PLMN can provide CS service only.
- * @QMI_NAS_LTE_REGISTRATION_DOMAIN_PS_ONLY: UE is in "Camp Only" mode and the PLMN can provide PS service only.
- * @QMI_NAS_LTE_REGISTRATION_DOMAIN_CS_PS: UE is in "Camp Only" mode and the PLMN can provide CS and PS service.
- * @QMI_NAS_LTE_REGISTRATION_DOMAIN_LIMITED_SERVICE: UE is in "Camp Only" mode but the PLMN cannot provide any service.
- *
- * LTE registration domain.
- *
- * Since: 1.24
- */
-typedef enum { /*< since=1.24 >*/
- QMI_NAS_LTE_REGISTRATION_DOMAIN_NOT_APPLICABLE = 0x00,
- QMI_NAS_LTE_REGISTRATION_DOMAIN_CS_ONLY = 0x01,
- QMI_NAS_LTE_REGISTRATION_DOMAIN_PS_ONLY = 0x02,
- QMI_NAS_LTE_REGISTRATION_DOMAIN_CS_PS = 0x03,
- QMI_NAS_LTE_REGISTRATION_DOMAIN_LIMITED_SERVICE = 0x04,
-} QmiNasLteRegistrationDomain;
-
-/**
- * QmiNasRoamingStatus:
- * @QMI_NAS_ROAMING_STATUS_OFF: Off.
- * @QMI_NAS_ROAMING_STATUS_ON: On.
- * @QMI_NAS_ROAMING_STATUS_BLINK: Blinking.
- * @QMI_NAS_ROAMING_STATUS_OUT_OF_NEIGHBORHOOD: Out of neighborhood.
- * @QMI_NAS_ROAMING_STATUS_OUT_OF_BUILDING: Out of building.
- * @QMI_NAS_ROAMING_STATUS_PREFERRED_SYSTEM: Preferred system.
- * @QMI_NAS_ROAMING_STATUS_AVAILABLE_SYSTEM: Available system.
- * @QMI_NAS_ROAMING_STATUS_ALLIANCE_PARTNER: Alliance partner.
- * @QMI_NAS_ROAMING_STATUS_PREMIUM_PARTNER: Premium partner.
- * @QMI_NAS_ROAMING_STATUS_FULL_SERVICE: Full service.
- * @QMI_NAS_ROAMING_STATUS_PARTIAL_SERVICE: Partial service.
- * @QMI_NAS_ROAMING_STATUS_BANNER_ON: Banner on.
- * @QMI_NAS_ROAMING_STATUS_BANNER_OFF: Banner off.
- *
- * Roaming status.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_NAS_ROAMING_STATUS_OFF = 0x00,
- QMI_NAS_ROAMING_STATUS_ON = 0x01,
- /* Next ones only for 3GPP2 */
- QMI_NAS_ROAMING_STATUS_BLINK = 0x02,
- QMI_NAS_ROAMING_STATUS_OUT_OF_NEIGHBORHOOD = 0x03,
- QMI_NAS_ROAMING_STATUS_OUT_OF_BUILDING = 0x04,
- QMI_NAS_ROAMING_STATUS_PREFERRED_SYSTEM = 0x05,
- QMI_NAS_ROAMING_STATUS_AVAILABLE_SYSTEM = 0x06,
- QMI_NAS_ROAMING_STATUS_ALLIANCE_PARTNER = 0x07,
- QMI_NAS_ROAMING_STATUS_PREMIUM_PARTNER = 0x08,
- QMI_NAS_ROAMING_STATUS_FULL_SERVICE = 0x09,
- QMI_NAS_ROAMING_STATUS_PARTIAL_SERVICE = 0x0A,
- QMI_NAS_ROAMING_STATUS_BANNER_ON = 0x0B,
- QMI_NAS_ROAMING_STATUS_BANNER_OFF = 0x0C
-} QmiNasRoamingStatus;
-
-/**
- * QmiNasLteCellAccessStatus:
- * @QMI_NAS_CELL_ACCESS_STATUS_NORMAL_ONLY: Access is allowed for normal calls only.
- * @QMI_NAS_CELL_ACCESS_STATUS_EMERGENCY_ONLY: Access is allowed for emergency calls only.
- * @QMI_NAS_CELL_ACCESS_STATUS_NO_CALLS: Access is not allowed for any call type.
- * @QMI_NAS_CELL_ACCESS_STATUS_ALL_CALLS: Access is allowed for all call types.
- * @QMI_NAS_CELL_ACCESS_STATUS_UNKNOWN: Unknown.
- *
- * Cell access status for LTE calls.
- *
- * Since: 1.24
- */
-typedef enum { /*< since=1.24 >*/
- QMI_NAS_CELL_ACCESS_STATUS_NORMAL_ONLY = 0x00,
- QMI_NAS_CELL_ACCESS_STATUS_EMERGENCY_ONLY = 0x01,
- QMI_NAS_CELL_ACCESS_STATUS_NO_CALLS = 0x02,
- QMI_NAS_CELL_ACCESS_STATUS_ALL_CALLS = 0x03,
- QMI_NAS_CELL_ACCESS_STATUS_UNKNOWN = 0xFF,
-} QmiNasLteCellAccessStatus;
-
-/**
- * QmiNasHdrProtocolRevision:
- * @QMI_NAS_HDR_PROTOCOL_REVISION_NONE: None.
- * @QMI_NAS_HDR_PROTOCOL_REVISION_REL_0: HDR Rel 0.
- * @QMI_NAS_HDR_PROTOCOL_REVISION_REL_A: HDR Rel A.
- * @QMI_NAS_HDR_PROTOCOL_REVISION_REL_B: HDR Rel B.
- *
- * HDR protocol revision.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_NAS_HDR_PROTOCOL_REVISION_NONE = 0x00,
- QMI_NAS_HDR_PROTOCOL_REVISION_REL_0 = 0x01,
- QMI_NAS_HDR_PROTOCOL_REVISION_REL_A = 0x02,
- QMI_NAS_HDR_PROTOCOL_REVISION_REL_B = 0x03
-} QmiNasHdrProtocolRevision;
-
-/**
- * QmiNasWcdmaHsService:
- * @QMI_NAS_WCDMA_HS_SERVICE_HSDPA_HSUPA_UNSUPPORTED: HSDPA and HSUPA not supported.
- * @QMI_NAS_WCDMA_HS_SERVICE_HSDPA_SUPPORTED: HSDPA supported.
- * @QMI_NAS_WCDMA_HS_SERVICE_HSUPA_SUPPORTED: HSUPA supported.
- * @QMI_NAS_WCDMA_HS_SERVICE_HSDPA_HSUPA_SUPPORTED: HSDPA and HSUPA supported.
- * @QMI_NAS_WCDMA_HS_SERVICE_HSDPA_PLUS_SUPPORTED: HSDPA+ supported.
- * @QMI_NAS_WCDMA_HS_SERVICE_HSDPA_PLUS_HSUPA_SUPPORTED: HSDPA+ and HSUPA supported.
- * @QMI_NAS_WCDMA_HS_SERVICE_DC_HSDPA_PLUS_SUPPORTED: DC-HSDPA+ supported.
- * @QMI_NAS_WCDMA_HS_SERVICE_DC_HSDPA_PLUS_HSUPA_SUPPORTED: DC-HSDPA+ and HSUPA supported.
- *
- * Call status on high speed.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_NAS_WCDMA_HS_SERVICE_HSDPA_HSUPA_UNSUPPORTED = 0x00,
- QMI_NAS_WCDMA_HS_SERVICE_HSDPA_SUPPORTED = 0x01,
- QMI_NAS_WCDMA_HS_SERVICE_HSUPA_SUPPORTED = 0x02,
- QMI_NAS_WCDMA_HS_SERVICE_HSDPA_HSUPA_SUPPORTED = 0x03,
- QMI_NAS_WCDMA_HS_SERVICE_HSDPA_PLUS_SUPPORTED = 0x04,
- QMI_NAS_WCDMA_HS_SERVICE_HSDPA_PLUS_HSUPA_SUPPORTED = 0x05,
- QMI_NAS_WCDMA_HS_SERVICE_DC_HSDPA_PLUS_SUPPORTED = 0x06,
- QMI_NAS_WCDMA_HS_SERVICE_DC_HSDPA_PLUS_HSUPA_SUPPORTED = 0x07
-} QmiNasWcdmaHsService;
-
-/**
- * QmiNasCellBroadcastCapability:
- * @QMI_NAS_CELL_BROADCAST_CAPABILITY_UNKNOWN: Unknown.
- * @QMI_NAS_CELL_BROADCAST_CAPABILITY_OFF: Cell broadcast not supported.
- * @QMI_NAS_CELL_BROADCAST_CAPABILITY_ON: Cell broadcast supported.
- *
- * Cell broadcast support.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_NAS_CELL_BROADCAST_CAPABILITY_UNKNOWN = 0x00,
- QMI_NAS_CELL_BROADCAST_CAPABILITY_OFF = 0x01,
- QMI_NAS_CELL_BROADCAST_CAPABILITY_ON = 0x02
-} QmiNasCellBroadcastCapability;
-
-/**
- * QmiNasSimRejectState:
- * @QMI_NAS_SIM_REJECT_STATE_SIM_UNAVAILABLE: SIM not available.
- * @QMI_NAS_SIM_REJECT_STATE_SIM_AVAILABLE: SIM available.
- * @QMI_NAS_SIM_REJECT_STATE_SIM_CS_INVALID: SIM invalid for circuit-switched connections.
- * @QMI_NAS_SIM_REJECT_STATE_SIM_PS_INVALID: SIM invalid for packet-switched connections.
- * @QMI_NAS_SIM_REJECT_STATE_SIM_CS_PS_INVALID: SIM invalid for circuit-switched and packet-switched connections.
- *
- * Reject information of the SIM.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_NAS_SIM_REJECT_STATE_SIM_UNAVAILABLE = 0,
- QMI_NAS_SIM_REJECT_STATE_SIM_AVAILABLE = 1,
- QMI_NAS_SIM_REJECT_STATE_SIM_CS_INVALID = 2,
- QMI_NAS_SIM_REJECT_STATE_SIM_PS_INVALID = 3,
- QMI_NAS_SIM_REJECT_STATE_SIM_CS_PS_INVALID = 4
-} QmiNasSimRejectState;
-
-/**
- * QmiNasCdmaPilotType:
- * @QMI_NAS_CDMA_PILOT_TYPE_ACTIVE: the pilot is part of the active set.
- * @QMI_NAS_CDMA_PILOT_TYPE_NEIGHBOR: the pilot is part of the neighbor set.
- *
- * The pilot set the pilot belongs to.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_NAS_CDMA_PILOT_TYPE_ACTIVE = 0,
- QMI_NAS_CDMA_PILOT_TYPE_NEIGHBOR = 1,
-} QmiNasCdmaPilotType;
-
-/**
- * QmiNasDayOfWeek:
- * @QMI_NAS_DAY_OF_WEEK_MONDAY: Monday
- * @QMI_NAS_DAY_OF_WEEK_TUESDAY: Tuesday
- * @QMI_NAS_DAY_OF_WEEK_WEDNESDAY: Wednesday
- * @QMI_NAS_DAY_OF_WEEK_THURSDAY: Thursday
- * @QMI_NAS_DAY_OF_WEEK_FRIDAY: Friday
- * @QMI_NAS_DAY_OF_WEEK_SATURDAY: Saturday
- * @QMI_NAS_DAY_OF_WEEK_SUNDAY: Sunday
- *
- * The day of the week.
- *
- * Since: 1.4
- */
-typedef enum { /*< since=1.4 >*/
- QMI_NAS_DAY_OF_WEEK_MONDAY = 0,
- QMI_NAS_DAY_OF_WEEK_TUESDAY = 1,
- QMI_NAS_DAY_OF_WEEK_WEDNESDAY = 2,
- QMI_NAS_DAY_OF_WEEK_THURSDAY = 3,
- QMI_NAS_DAY_OF_WEEK_FRIDAY = 4,
- QMI_NAS_DAY_OF_WEEK_SATURDAY = 5,
- QMI_NAS_DAY_OF_WEEK_SUNDAY = 6
-} QmiNasDayOfWeek;
-
-/**
- * QmiNasDaylightSavingsAdjustment:
- * @QMI_NAS_DAYLIGHT_SAVINGS_ADJUSTMENT_NONE: no adjustment
- * @QMI_NAS_DAYLIGHT_SAVINGS_ADJUSTMENT_ONE_HOUR: one hour adjustment
- * @QMI_NAS_DAYLIGHT_SAVINGS_ADJUSTMENT_TWO_HOURS: two hours adjustment
- *
- * The number of hours a time is adjusted for daylight savings.
- *
- * Since: 1.4
- */
-typedef enum { /*< since=1.4 >*/
- QMI_NAS_DAYLIGHT_SAVINGS_ADJUSTMENT_NONE = 0,
- QMI_NAS_DAYLIGHT_SAVINGS_ADJUSTMENT_ONE_HOUR = 1,
- QMI_NAS_DAYLIGHT_SAVINGS_ADJUSTMENT_TWO_HOURS = 2
-} QmiNasDaylightSavingsAdjustment;
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI NAS Get Cell Location Info' request/response */
-
-/**
- * QmiNasWcdmaRrcState:
- * @QMI_NAS_WCDMA_RRC_STATE_DISCONNECTED: Disconnected.
- * @QMI_NAS_WCDMA_RRC_STATE_CELL_PCH: WCDMA RRC state is CELL_PCH.
- * @QMI_NAS_WCDMA_RRC_STATE_URA_PCH: WCDMA RRC state is URA_PCH.
- * @QMI_NAS_WCDMA_RRC_STATE_CELL_FACH: WCDMA RRC state is CELL_FACH.
- * @QMI_NAS_WCDMA_RRC_STATE_CELL_DCH: WCDMA RRC state is CELL_DCH.
- *
- * RRC state.
- *
- * Since: 1.10
- */
-typedef enum { /*< since=1.10 >*/
- QMI_NAS_WCDMA_RRC_STATE_DISCONNECTED = 0,
- QMI_NAS_WCDMA_RRC_STATE_CELL_PCH = 1,
- QMI_NAS_WCDMA_RRC_STATE_URA_PCH = 2,
- QMI_NAS_WCDMA_RRC_STATE_CELL_FACH = 3,
- QMI_NAS_WCDMA_RRC_STATE_CELL_DCH = 4
-} QmiNasWcdmaRrcState;
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI NAS Get LTE Cphy CA Info' request/response */
-
-/**
- * QmiNasDLBandwidth:
- * @QMI_NAS_DL_BANDWIDTH_1_4: 1.4 MHz
- * @QMI_NAS_DL_BANDWIDTH_3: 3 MHz
- * @QMI_NAS_DL_BANDWIDTH_5: 5 MHz
- * @QMI_NAS_DL_BANDWIDTH_10: 10 MHz
- * @QMI_NAS_DL_BANDWIDTH_15: 15 MHz
- * @QMI_NAS_DL_BANDWIDTH_20: 20 MHz
- * @QMI_NAS_DL_BANDWIDTH_INVALID: Invalid
- * @QMI_NAS_DL_BANDWIDTH_UNKNOWN: Unknown
- *
- * DL Bandwidth.
- *
- * Since: 1.16
- */
-typedef enum { /*< since=1.16 >*/
- QMI_NAS_DL_BANDWIDTH_1_4 = 0,
- QMI_NAS_DL_BANDWIDTH_3 = 1,
- QMI_NAS_DL_BANDWIDTH_5 = 2,
- QMI_NAS_DL_BANDWIDTH_10 = 3,
- QMI_NAS_DL_BANDWIDTH_15 = 4,
- QMI_NAS_DL_BANDWIDTH_20 = 5,
- QMI_NAS_DL_BANDWIDTH_INVALID = 6,
- QMI_NAS_DL_BANDWIDTH_UNKNOWN = 0xFF
-} QmiNasDLBandwidth;
-
-/**
- * QmiNasScellState:
- * @QMI_NAS_SCELL_STATE_DECONFIGURED: Deconfigured
- * @QMI_NAS_SCELL_STATE_DEACTIVATED: Deactivated
- * @QMI_NAS_SCELL_STATE_ACTIVATED: Activated
- *
- * SCell State.
- *
- * Since: 1.16
- */
-typedef enum { /*< since=1.16 >*/
- QMI_NAS_SCELL_STATE_DECONFIGURED = 0,
- QMI_NAS_SCELL_STATE_DEACTIVATED = 1,
- QMI_NAS_SCELL_STATE_ACTIVATED = 2
-} QmiNasScellState;
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI NAS Get Operator Name' request/response */
-/**
- * QmiNasPlmnEncodingScheme:
- * @QMI_NAS_PLMN_ENCODING_SCHEME_GSM: GSM default alphabet packed encoding (ETSI GSM 03.38)
- * @QMI_NAS_PLMN_ENCODING_SCHEME_UCS2LE: UCS-2 little-endian
- *
- * PLMN name encoding schemes. See 3GPP TS 24.008 section "Network Name
- * information element".
- *
- * Since: 1.18
- */
-typedef enum { /*< since=1.18 >*/
- QMI_NAS_PLMN_ENCODING_SCHEME_GSM = 0,
- QMI_NAS_PLMN_ENCODING_SCHEME_UCS2LE = 1,
-} QmiNasPlmnEncodingScheme;
-
-/**
- * QmiNasNetworkNameDisplayCondition:
- * @QMI_NAS_NETWORK_NAME_DISPLAY_CONDITION_DISPLAY_REGISTERED_PLMN_IF_KNOWN_NETWORK: if
- * set, display of the registered PLMN is required when the registered PLMN is either
- * the HPLMN or a PLMN in the Service Provider PLMN List (see EFspdi). Otherwise
- * display of the registered PLMN is not required in this case.
- * @QMI_NAS_NETWORK_NAME_DISPLAY_CONDITION_DISPLAY_SPN_NOT_REQUIRED_IF_UNKNOWN_NETWORK: if
- * set, display of the Service Provider Name is not required when registered PLMN is
- * neither HPLMN nor a PLMN in the service provider PLMN list (see EFspdi). If not set,
- * SPN display is required in this case.
- *
- * Flags used to control display of the PLMN name and Service Provider Name. See
- * 3GPP TS 51.011 descripton of the EFspn SIM file for more details.
- *
- * Since: 1.18
- */
-typedef enum { /*< since=1.18 >*/
- QMI_NAS_NETWORK_NAME_DISPLAY_CONDITION_DISPLAY_REGISTERED_PLMN_IF_KNOWN_NETWORK = 1 << 0,
- QMI_NAS_NETWORK_NAME_DISPLAY_CONDITION_DISPLAY_SPN_NOT_REQUIRED_IF_UNKNOWN_NETWORK = 1 << 1,
-} QmiNasNetworkNameDisplayCondition;
-
-/**
- * QmiNasPlmnNameCountryInitials:
- * @QMI_NAS_PLMN_NAME_COUNTRY_INITIALS_DO_NOT_ADD: don't add country initials
- * @QMI_NAS_PLMN_NAME_COUNTRY_INIITALS_ADD: add country initials
- * @QMI_NAS_PLMN_NAME_COUNTRY_INIITALS_UNSPECIFIED: unspecified
- *
- * PLMN name country initials options. See 3GPP TS 24.008
- * section "Network Name information element".
- *
- * Since: 1.18
- */
-typedef enum { /*< since=1.18 >*/
- QMI_NAS_PLMN_NAME_COUNTRY_INITIALS_DO_NOT_ADD = 0,
- QMI_NAS_PLMN_NAME_COUNTRY_INIITALS_ADD = 1,
- QMI_NAS_PLMN_NAME_COUNTRY_INIITALS_UNSPECIFIED = 0xFF,
-} QmiNasPlmnNameCountryInitials;
-
-/**
- * QmiNasNetworkNameSource:
- * @QMI_NAS_NETWORK_NAME_SOURCE_UNKNOWN: Unknown.
- * @QMI_NAS_NETWORK_NAME_SOURCE_OPERATOR_PLMN_LIST_AND_PLMN_NETWORK_NAME: Operator PLMN list and PLMN network name.
- * @QMI_NAS_NETWORK_NAME_SOURCE_COMMON_PCN_HANDSET_SPECIFICATION_AND_OPERATOR_NAME_STRING: Common PCN handset specification and operator name string.
- * @QMI_NAS_NETWORK_NAME_SOURCE_NITZ: Network identity and time zone.
- * @QMI_NAS_NETWORK_NAME_SOURCE_SE13: GSMA SE13 table.
- * @QMI_NAS_NETWORK_NAME_SOURCE_MCC_MNC: MCC and MNC.
- * @QMI_NAS_NETWORK_NAME_SOURCE_SERVICE_PROVIDER_NAME: Service provider name.
- *
- * Network name source.
- *
- * Since: 1.24
- */
-typedef enum { /*< since=1.24 >*/
- QMI_NAS_NETWORK_NAME_SOURCE_UNKNOWN = 0x00,
- QMI_NAS_NETWORK_NAME_SOURCE_OPERATOR_PLMN_LIST_AND_PLMN_NETWORK_NAME = 0x01,
- QMI_NAS_NETWORK_NAME_SOURCE_COMMON_PCN_HANDSET_SPECIFICATION_AND_OPERATOR_NAME_STRING = 0x02,
- QMI_NAS_NETWORK_NAME_SOURCE_NITZ = 0x03,
- QMI_NAS_NETWORK_NAME_SOURCE_SE13 = 0x04,
- QMI_NAS_NETWORK_NAME_SOURCE_MCC_MNC = 0x05,
- QMI_NAS_NETWORK_NAME_SOURCE_SERVICE_PROVIDER_NAME = 0x06,
-} QmiNasNetworkNameSource;
-
-/**
- * QmiNasPlmnNameSpareBits:
- * @QMI_NAS_PLMN_NAME_SPARE_BITS_UNKNOWN: unknown
- * @QMI_NAS_PLMN_NAME_SPARE_BITS_BIT_8: bit 8 is spare
- * @QMI_NAS_PLMN_NAME_SPARE_BITS_BITS_78: bits 7 - 8 are spare
- * @QMI_NAS_PLMN_NAME_SPARE_BITS_BITS_68: bits 6 - 8 are spare
- * @QMI_NAS_PLMN_NAME_SPARE_BITS_BITS_58: bits 5 - 8 are spare
- * @QMI_NAS_PLMN_NAME_SPARE_BITS_BITS_48: bits 4 - 8 are spare
- * @QMI_NAS_PLMN_NAME_SPARE_BITS_BITS_38: bits 3 - 8 are spare
- * @QMI_NAS_PLMN_NAME_SPARE_BITS_BITS_28: bits 2 - 8 are spare
- *
- * PLMN name spare bits in last octet of a network name. See 3GPP TS 24.008
- * section "Network Name information element".
- *
- * Since: 1.18
- */
-typedef enum { /*< since=1.18 >*/
- QMI_NAS_PLMN_NAME_SPARE_BITS_UNKNOWN = 0,
- QMI_NAS_PLMN_NAME_SPARE_BITS_BIT_8 = 1,
- QMI_NAS_PLMN_NAME_SPARE_BITS_BITS_78 = 2,
- QMI_NAS_PLMN_NAME_SPARE_BITS_BITS_68 = 3,
- QMI_NAS_PLMN_NAME_SPARE_BITS_BITS_58 = 4,
- QMI_NAS_PLMN_NAME_SPARE_BITS_BITS_48 = 5,
- QMI_NAS_PLMN_NAME_SPARE_BITS_BITS_38 = 6,
- QMI_NAS_PLMN_NAME_SPARE_BITS_BITS_28 = 7,
-} QmiNasPlmnNameSpareBits;
-
-/**
- * QmiNasUsagePreference:
- * @QMI_NAS_USAGE_PREFERENCE_UNKNOWN: Unknown.
- * @QMI_NAS_USAGE_PREFERENCE_VOICE_CENTRIC: Voice centric.
- * @QMI_NAS_USAGE_PREFERENCE_DATA_CENTRIC: Data centric.
- *
- * Modem usage preference.
- *
- * Since: 1.24
- */
-typedef enum { /*< since=1.24 >*/
- QMI_NAS_USAGE_PREFERENCE_UNKNOWN = 0x00,
- QMI_NAS_USAGE_PREFERENCE_VOICE_CENTRIC = 0x01,
- QMI_NAS_USAGE_PREFERENCE_DATA_CENTRIC = 0x02
-} QmiNasUsagePreference;
-
-/**
- * QmiNasSwiModemMode:
- * @QMI_NAS_SWI_MODEM_MODE_POWERING_OFF: Powering off
- * @QMI_NAS_SWI_MODEM_MODE_FACTORY_TEST: Factory test
- * @QMI_NAS_SWI_MODEM_MODE_OFFLINE: Offline
- * @QMI_NAS_SWI_MODEM_MODE_OFFLINE_AMPS: Offline AMPS
- * @QMI_NAS_SWI_MODEM_MODE_OFFLINE_CDMA: Offline CDMA
- * @QMI_NAS_SWI_MODEM_MODE_ONLINE: Online
- * @QMI_NAS_SWI_MODEM_MODE_LOW_POWER: Low power
- * @QMI_NAS_SWI_MODEM_MODE_RESETTING: Resetting
- * @QMI_NAS_SWI_MODEM_MODE_NETWORK_TEST: Network test
- * @QMI_NAS_SWI_MODEM_MODE_OFFLINE_REQUEST: Offline request
- * @QMI_NAS_SWI_MODEM_MODE_PSEUDO_ONLINE: Pseudo online
- * @QMI_NAS_SWI_MODEM_MODE_RESETTING_MODEM: Resetting modem
- * @QMI_NAS_SWI_MODEM_MODE_UNKNOWN: Unknown
- *
- * Modem mode (Sierra Wireless specific).
- *
- * Since: 1.24
- */
-typedef enum { /*< since=1.24 >*/
- QMI_NAS_SWI_MODEM_MODE_POWERING_OFF = 0x00,
- QMI_NAS_SWI_MODEM_MODE_FACTORY_TEST = 0x01,
- QMI_NAS_SWI_MODEM_MODE_OFFLINE = 0x02,
- QMI_NAS_SWI_MODEM_MODE_OFFLINE_AMPS = 0x03,
- QMI_NAS_SWI_MODEM_MODE_OFFLINE_CDMA = 0x04,
- QMI_NAS_SWI_MODEM_MODE_ONLINE = 0x05,
- QMI_NAS_SWI_MODEM_MODE_LOW_POWER = 0x06,
- QMI_NAS_SWI_MODEM_MODE_RESETTING = 0x07,
- QMI_NAS_SWI_MODEM_MODE_NETWORK_TEST = 0x08,
- QMI_NAS_SWI_MODEM_MODE_OFFLINE_REQUEST = 0x09,
- QMI_NAS_SWI_MODEM_MODE_PSEUDO_ONLINE = 0x0a,
- QMI_NAS_SWI_MODEM_MODE_RESETTING_MODEM = 0x0b,
- QMI_NAS_SWI_MODEM_MODE_UNKNOWN = 0xff
-} QmiNasSwiModemMode;
-
-/**
- * QmiNasSwiSystemMode:
- * @QMI_NAS_SWI_SYSTEM_MODE_NO_SERVICE: No service
- * @QMI_NAS_SWI_SYSTEM_MODE_AMPS: AMPS
- * @QMI_NAS_SWI_SYSTEM_MODE_CDMA: CDMA
- * @QMI_NAS_SWI_SYSTEM_MODE_GSM: GSM
- * @QMI_NAS_SWI_SYSTEM_MODE_HDR: HDR
- * @QMI_NAS_SWI_SYSTEM_MODE_WCDMA: WCDMA
- * @QMI_NAS_SWI_SYSTEM_MODE_GPS: GPS
- * @QMI_NAS_SWI_SYSTEM_MODE_WLAN: WLAN
- * @QMI_NAS_SWI_SYSTEM_MODE_LTE: LTE
- * @QMI_NAS_SWI_SYSTEM_MODE_UNKNOWN: Unknown
- *
- * System mode (Sierra Wireless specific).
- *
- * Since: 1.24
- */
-typedef enum { /*< since=1.24 >*/
- QMI_NAS_SWI_SYSTEM_MODE_NO_SERVICE = 0x00,
- QMI_NAS_SWI_SYSTEM_MODE_AMPS = 0x01,
- QMI_NAS_SWI_SYSTEM_MODE_CDMA = 0x02,
- QMI_NAS_SWI_SYSTEM_MODE_GSM = 0x03,
- QMI_NAS_SWI_SYSTEM_MODE_HDR = 0x04,
- QMI_NAS_SWI_SYSTEM_MODE_WCDMA = 0x05,
- QMI_NAS_SWI_SYSTEM_MODE_GPS = 0x06,
- QMI_NAS_SWI_SYSTEM_MODE_WLAN = 0x08,
- QMI_NAS_SWI_SYSTEM_MODE_LTE = 0x09,
- QMI_NAS_SWI_SYSTEM_MODE_UNKNOWN = 0xff
-} QmiNasSwiSystemMode;
-
-/**
- * QmiNasSwiImsRegState:
- * @QMI_NAS_SWI_IMS_REG_NO_SRV: No service
- * @QMI_NAS_SWI_IMS_REG_IN_PROG: In prog
- * @QMI_NAS_SWI_IMS_REG_FAILED: Failed
- * @QMI_NAS_SWI_IMS_REG_LIMITED: Limited
- * @QMI_NAS_SWI_IMS_REG_FULL_SRV: Full service
- * @QMI_NAS_SWI_IMS_REG__UNKNOWN: Unknown
- *
- * IMS registration state. (Sierra Wireless specific).
- *
- * Since: 1.24
- */
-typedef enum { /*< since=1.24 >*/
- QMI_NAS_SWI_IMS_REG_NO_SRV = 0x00,
- QMI_NAS_SWI_IMS_REG_IN_PROG = 0x01,
- QMI_NAS_SWI_IMS_REG_FAILED = 0x02,
- QMI_NAS_SWI_IMS_REG_LIMITED = 0x03,
- QMI_NAS_SWI_IMS_REG_FULL_SRV = 0x04,
- QMI_NAS_SWI_IMS_REG__UNKNOWN = 0xff
-} QmiNasSwiImsRegState;
-
-/**
- * QmiNasSwiPsState:
- * @QMI_NAS_SWI_PS_STATE_ATTACHED: Attached
- * @QMI_NAS_SWI_PS_STATE_DETACHED: Detached
- * @QMI_NAS_SWI_PS_STATE_UNKNOWN: Unknown
- *
- * PS registration state. (Sierra Wireless specific).
- *
- * Since: 1.24
- */
-typedef enum { /*< since=1.24 >*/
- QMI_NAS_SWI_PS_STATE_ATTACHED = 0x00,
- QMI_NAS_SWI_PS_STATE_DETACHED = 0x01,
- QMI_NAS_SWI_PS_STATE_UNKNOWN = 0xff
-} QmiNasSwiPsState;
-
-/**
- * QmiNasSwiEmmState:
- * @QMI_NAS_SWI_EMM_STATE_DEREGISTERED: Deregistered
- * @QMI_NAS_SWI_EMM_STATE_REG_INITIATED: Registration initiated
- * @QMI_NAS_SWI_EMM_STATE_REGISTERED: Registered
- * @QMI_NAS_SWI_EMM_STATE_TAU_INITIATED: TAU initiated
- * @QMI_NAS_SWI_EMM_STATE_SR_INITIATED: SR initiated
- * @QMI_NAS_SWI_EMM_STATE_DEREG_INITIATED: Deregistration initiated
- * @QMI_NAS_SWI_EMM_STATE_INVALID: Invalid
- * @QMI_NAS_SWI_EMM_STATE_UNKNOWN: Unknown
- *
- * EMM registration state. (Sierra Wireless specific).
- *
- * Since: 1.24
- */
-typedef enum { /*< since=1.24 >*/
- QMI_NAS_SWI_EMM_STATE_DEREGISTERED = 0x00,
- QMI_NAS_SWI_EMM_STATE_REG_INITIATED = 0x01,
- QMI_NAS_SWI_EMM_STATE_REGISTERED = 0x02,
- QMI_NAS_SWI_EMM_STATE_TAU_INITIATED = 0x03,
- QMI_NAS_SWI_EMM_STATE_SR_INITIATED = 0x04,
- QMI_NAS_SWI_EMM_STATE_DEREG_INITIATED = 0x05,
- QMI_NAS_SWI_EMM_STATE_INVALID = 0x06,
- QMI_NAS_SWI_EMM_STATE_UNKNOWN = 0xff
-} QmiNasSwiEmmState;
-
-/**
- * QmiNasSwiEmmConnectionState:
- * @QMI_NAS_SWI_EMM_CONN_STATE_RRC_IDLE: RRC idle
- * @QMI_NAS_SWI_EMM_CONN_STATE_WAITING_RRC_CFM: Waiting RRC Cfm
- * @QMI_NAS_SWI_EMM_CONN_STATE_RRC_CONNECTING: RRC connecting
- * @QMI_NAS_SWI_EMM_CONN_STATE_RRC_RELEASING: RRC releasing
- * @QMI_NAS_SWI_EMM_CONN_STATE_UNKNOWN: Unknown
- *
- * EMM connection state state. (Sierra Wireless specific).
- *
- * Since: 1.24
- */
-typedef enum { /*< since=1.24 >*/
- QMI_NAS_SWI_EMM_CONN_STATE_RRC_IDLE = 0x00,
- QMI_NAS_SWI_EMM_CONN_STATE_WAITING_RRC_CFM = 0x01,
- QMI_NAS_SWI_EMM_CONN_STATE_RRC_CONNECTING = 0x02,
- QMI_NAS_SWI_EMM_CONN_STATE_RRC_RELEASING = 0x03,
- QMI_NAS_SWI_EMM_CONN_STATE_UNKNOWN = 0xff
-} QmiNasSwiEmmConnectionState;
-
-/**
- * QmiNasDrx:
- * @QMI_NAS_DRX_UNKNOWN: Unknown or not specified.
- * @QMI_NAS_DRX_CN6_T32: CN=6, T=32.
- * @QMI_NAS_DRX_CN7_T64: CN=7, T=64.
- * @QMI_NAS_DRX_CN8_T128: CN=8, T=128.
- * @QMI_NAS_DRX_CN9_T256: CN=9, T=256.
- *
- * DRX setting of the device.
- *
- * Since: 1.28
- */
-typedef enum { /*< since=1.28 >*/
- QMI_NAS_DRX_UNKNOWN = 0x00,
- QMI_NAS_DRX_CN6_T32 = 0x06,
- QMI_NAS_DRX_CN7_T64 = 0x07,
- QMI_NAS_DRX_CN8_T128 = 0x08,
- QMI_NAS_DRX_CN9_T256 = 0x09,
-} QmiNasDrx;
-
-/**
- * QmiNasBoolean:
- * @QMI_NAS_BOOLEAN_FALSE: Status FALSE.
- * @QMI_NAS_BOOLEAN_TRUE: Status TRUE.
- * @QMI_NAS_BOOLEAN_UNKNOWN: Status Unknown.
- *
- * Boolean flag with validity info.
- *
- * Since: 1.28
- */
-typedef enum { /*< since=1.28 >*/
- QMI_NAS_BOOLEAN_FALSE = 0x00,
- QMI_NAS_BOOLEAN_TRUE = 0x01,
- QMI_NAS_BOOLEAN_UNKNOWN = 0x02
-} QmiNasBoolean;
-
-/**
- * QmiNasPlmnLanguageId:
- * @QMI_NAS_PLMN_LANGUAGE_ID_UNKNOWN: Language Unknown.
- * @QMI_NAS_PLMN_LANGUAGE_ID_ZH_TRAD: Traditional Chinese.
- * @QMI_NAS_PLMN_LANGUAGE_ID_ZH_SIMP: Simplified Chinese.
- *
- * Language ID used when encoding the PLMN.
- *
- * Since: 1.28
- */
-typedef enum { /*< since=1.28 >*/
- QMI_NAS_PLMN_LANGUAGE_ID_UNKNOWN = 0x00,
- QMI_NAS_PLMN_LANGUAGE_ID_ZH_TRAD = 0x01,
- QMI_NAS_PLMN_LANGUAGE_ID_ZH_SIMP = 0x02
-} QmiNasPlmnLanguageId;
-
-/**
- * QmiNasLteVoiceDomain:
- * @QMI_NAS_LTE_VOICE_DOMAIN_NONE: No voice.
- * @QMI_NAS_LTE_VOICE_DOMAIN_IMS: Voice is supported over IMS network.
- * @QMI_NAS_LTE_VOICE_DOMAIN_1X: Voice is supported over the 1X network.
- * @QMI_NAS_LTE_VOICE_DOMAIN_3GPP: Voice is supported over the 3GPP network.
- *
- * LTE voice domain.
- *
- * Since: 1.28
- */
-typedef enum { /*< since=1.28 >*/
- QMI_NAS_LTE_VOICE_DOMAIN_NONE = 0x00,
- QMI_NAS_LTE_VOICE_DOMAIN_IMS = 0x01,
- QMI_NAS_LTE_VOICE_DOMAIN_1X = 0x02,
- QMI_NAS_LTE_VOICE_DOMAIN_3GPP = 0x03
-} QmiNasLteVoiceDomain;
-
-/**
- * QmiNasRejectCause:
- * @QMI_NAS_REJECT_CAUSE_NONE: None.
- * @QMI_NAS_REJECT_CAUSE_IMSI_UNKNOWN_IN_HLR: IMSI unknown in HLR/HSS.
- * @QMI_NAS_REJECT_CAUSE_ILLEGAL_UE: Illegal MS/UE.
- * @QMI_NAS_REJECT_CAUSE_IMSI_UNKNOWN_IN_VLR: IMSI unknown in VLR.
- * @QMI_NAS_REJECT_CAUSE_IMEI_NOT_ACCEPTED: IMEI not accepted.
- * @QMI_NAS_REJECT_CAUSE_ILLEGAL_ME: Illegal ME.
- * @QMI_NAS_REJECT_CAUSE_PS_SERVICES_NOT_ALLOWED: GPRS/EPS services not allowed.
- * @QMI_NAS_REJECT_CAUSE_PS_AND_NON_PS_SERVICES_NOT_ALLOWED: GPRS/EPS and non-GPRS/EPS services not allowed.
- * @QMI_NAS_REJECT_CAUSE_UE_IDENTITY_NOT_DERIVED_BY_NETWORK: MS/UE identity not derived by network.
- * @QMI_NAS_REJECT_CAUSE_IMPLICITLY_DETACHED: Implicitly detached.
- * @QMI_NAS_REJECT_CAUSE_PLMN_NOT_ALLOWED: PLMN not allowed.
- * @QMI_NAS_REJECT_CAUSE_LOCATION_AREA_NOT_ALLOWED: Location/tracking area not allowed.
- * @QMI_NAS_REJECT_CAUSE_ROAMING_IN_LOCATION_AREA_NOT_ALLOWED: Roaming in location/tracking area not allowed.
- * @QMI_NAS_REJECT_CAUSE_PS_SERVICES_IN_LOCATION_AREA_NOT_ALLOWED: GPRS/EPS services in location/tracking area not allowed.
- * @QMI_NAS_REJECT_CAUSE_NO_SUITABLE_CELLS_IN_LOCATION_AREA: No suitable cells in location/tracking area.
- * @QMI_NAS_REJECT_CAUSE_MSC_TEMPORARILY_NOT_REACHABLE: MSC temporarily not reachable.
- * @QMI_NAS_REJECT_CAUSE_NETWORK_FAILURE: Network failure.
- * @QMI_NAS_REJECT_CAUSE_CS_DOMAIN_NOT_AVAILABLE: CS domain not available.
- * @QMI_NAS_REJECT_CAUSE_ESM_FAILURE: ESM failure.
- * @QMI_NAS_REJECT_CAUSE_MAC_FAILURE: MAC failure.
- * @QMI_NAS_REJECT_CAUSE_SYNCH_FAILURE: Synch failure.
- * @QMI_NAS_REJECT_CAUSE_CONGESTION: Congestion.
- * @QMI_NAS_REJECT_CAUSE_UE_SECURITY_CAPABILITIES_MISMATCH: GSM authentication unacceptable, UE security capabilities mismatch.
- * @QMI_NAS_REJECT_CAUSE_SECURITY_MODE_REJECTED_UNSPECIFIED: Security mode rejected or unspecified.
- * @QMI_NAS_REJECT_CAUSE_CSG_NOT_AUTHORIZED: CSG not authorized.
- * @QMI_NAS_REJECT_CAUSE_NON_EPS_AUTHENTICATION_UNACCEPTABLE: Non-EPS authentication unacceptable.
- * @QMI_NAS_REJECT_CAUSE_SMS_PROVIDED_BY_GPRS_IN_ROUTING_AREA: SMS provided by GPRS in routing area.
- * @QMI_NAS_REJECT_CAUSE_REDIRECTION_TO_5GCN_REQUIRED: Redirection to 5GCN required.
- * @QMI_NAS_REJECT_CAUSE_SERVICE_OPTION_NOT_SUPPORTED: Service option not supported.
- * @QMI_NAS_REJECT_CAUSE_REQUESTED_SERVICE_OPTION_NOT_SUBSCRIBED: Requested service option not subscribed.
- * @QMI_NAS_REJECT_CAUSE_SERVICE_OPTION_TEMPORARILY_OUT_OF_ORDER: Service option temporarily out of order.
- * @QMI_NAS_REJECT_CAUSE_REQUESTED_SERVICE_OPTION_NOT_AUTHORIZED: Requested service option not authorized.
- * @QMI_NAS_REJECT_CAUSE_CALL_CANNOT_BE_IDENTIFIED: Call cannot be identified.
- * @QMI_NAS_REJECT_CAUSE_CS_SERVICE_TEMPORARILY_NOT_AVAILABLE: CS service temporarily not available.
- * @QMI_NAS_REJECT_CAUSE_NO_EPS_BEARER_CONTEXT_ACTIVATED: No EPS bearer context activated.
- * @QMI_NAS_REJECT_CAUSE_SEVERE_NETWORK_FAILURE: Severe network failure.
- * @QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_0: Retry upon entry 0.
- * @QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_1: Retry upon entry 1.
- * @QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_2: Retry upon entry 2.
- * @QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_3: Retry upon entry 3.
- * @QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_4: Retry upon entry 4.
- * @QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_5: Retry upon entry 5.
- * @QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_6: Retry upon entry 6.
- * @QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_7: Retry upon entry 7.
- * @QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_8: Retry upon entry 8.
- * @QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_9: Retry upon entry 9.
- * @QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_10: Retry upon entry 10.
- * @QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_11: Retry upon entry 11.
- * @QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_12: Retry upon entry 12.
- * @QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_13: Retry upon entry 13.
- * @QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_14: Retry upon entry 14.
- * @QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_15: Retry upon entry 15.
- * @QMI_NAS_REJECT_CAUSE_SEMANTICALLY_INCORRECT_MESSAGE: Semantically incorrect message.
- * @QMI_NAS_REJECT_CAUSE_INVALID_MANDATORY_INFORMATION: Invalid mandatory information.
- * @QMI_NAS_REJECT_CAUSE_MESSAGE_TYPE_NON_EXISTENT: Message type non existent.
- * @QMI_NAS_REJECT_CAUSE_MESSAGE_TYPE_NOT_COMPATIBLE: Message type not compatible.
- * @QMI_NAS_REJECT_CAUSE_INFORMATION_ELEMENT_NON_EXISTENT: Information element non existent.
- * @QMI_NAS_REJECT_CAUSE_CONDITIONAL_INFORMATION_ELEMENT_ERROR: Conditional information element error.
- * @QMI_NAS_REJECT_CAUSE_MESSAGE_NOT_COMPATIBLE: Message not compatible.
- * @QMI_NAS_REJECT_CAUSE_UNSPECIFIED_PROTOCOL_ERROR: Unspecified protocol error.
- *
- * Reason why a request from the mobile station is rejected by the network.
- *
- * Defined in 3GPP TS 24.008 in sections 10.5.3.6 and 10.5.5.14 (detailed in
- * annex G) and in 3GPP TS 24.301 in section 9.9.3.9.
- *
- * Since: 1.30
- */
-typedef enum { /*< since=1.30 >*/
- QMI_NAS_REJECT_CAUSE_NONE = 0x00,
- QMI_NAS_REJECT_CAUSE_IMSI_UNKNOWN_IN_HLR = 0x02,
- QMI_NAS_REJECT_CAUSE_ILLEGAL_UE = 0x03,
- QMI_NAS_REJECT_CAUSE_IMSI_UNKNOWN_IN_VLR = 0x04,
- QMI_NAS_REJECT_CAUSE_IMEI_NOT_ACCEPTED = 0x05,
- QMI_NAS_REJECT_CAUSE_ILLEGAL_ME = 0x06,
- QMI_NAS_REJECT_CAUSE_PS_SERVICES_NOT_ALLOWED = 0x07,
- QMI_NAS_REJECT_CAUSE_PS_AND_NON_PS_SERVICES_NOT_ALLOWED = 0x08,
- QMI_NAS_REJECT_CAUSE_UE_IDENTITY_NOT_DERIVED_BY_NETWORK = 0x09,
- QMI_NAS_REJECT_CAUSE_IMPLICITLY_DETACHED = 0x0A,
- QMI_NAS_REJECT_CAUSE_PLMN_NOT_ALLOWED = 0x0B,
- QMI_NAS_REJECT_CAUSE_LOCATION_AREA_NOT_ALLOWED = 0x0C,
- QMI_NAS_REJECT_CAUSE_ROAMING_IN_LOCATION_AREA_NOT_ALLOWED = 0x0D,
- QMI_NAS_REJECT_CAUSE_PS_SERVICES_IN_LOCATION_AREA_NOT_ALLOWED = 0x0E,
- QMI_NAS_REJECT_CAUSE_NO_SUITABLE_CELLS_IN_LOCATION_AREA = 0x0F,
- QMI_NAS_REJECT_CAUSE_MSC_TEMPORARILY_NOT_REACHABLE = 0x10,
- QMI_NAS_REJECT_CAUSE_NETWORK_FAILURE = 0x11,
- QMI_NAS_REJECT_CAUSE_CS_DOMAIN_NOT_AVAILABLE = 0x12,
- QMI_NAS_REJECT_CAUSE_ESM_FAILURE = 0x13,
- QMI_NAS_REJECT_CAUSE_MAC_FAILURE = 0x14,
- QMI_NAS_REJECT_CAUSE_SYNCH_FAILURE = 0x15,
- QMI_NAS_REJECT_CAUSE_CONGESTION = 0x16,
- QMI_NAS_REJECT_CAUSE_UE_SECURITY_CAPABILITIES_MISMATCH = 0x17,
- QMI_NAS_REJECT_CAUSE_SECURITY_MODE_REJECTED_UNSPECIFIED = 0x18,
- QMI_NAS_REJECT_CAUSE_CSG_NOT_AUTHORIZED = 0x19,
- QMI_NAS_REJECT_CAUSE_NON_EPS_AUTHENTICATION_UNACCEPTABLE = 0x1A,
- QMI_NAS_REJECT_CAUSE_SMS_PROVIDED_BY_GPRS_IN_ROUTING_AREA = 0x1C,
- QMI_NAS_REJECT_CAUSE_REDIRECTION_TO_5GCN_REQUIRED = 0x1F,
- QMI_NAS_REJECT_CAUSE_SERVICE_OPTION_NOT_SUPPORTED = 0x20,
- QMI_NAS_REJECT_CAUSE_REQUESTED_SERVICE_OPTION_NOT_SUBSCRIBED = 0x21,
- QMI_NAS_REJECT_CAUSE_SERVICE_OPTION_TEMPORARILY_OUT_OF_ORDER = 0x22,
- QMI_NAS_REJECT_CAUSE_REQUESTED_SERVICE_OPTION_NOT_AUTHORIZED = 0x23,
- QMI_NAS_REJECT_CAUSE_CALL_CANNOT_BE_IDENTIFIED = 0x26,
- QMI_NAS_REJECT_CAUSE_CS_SERVICE_TEMPORARILY_NOT_AVAILABLE = 0x27,
- QMI_NAS_REJECT_CAUSE_NO_EPS_BEARER_CONTEXT_ACTIVATED = 0x28,
- QMI_NAS_REJECT_CAUSE_SEVERE_NETWORK_FAILURE = 0x2A,
- QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_0 = 0x30,
- QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_1 = 0x31,
- QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_2 = 0x32,
- QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_3 = 0x33,
- QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_4 = 0x34,
- QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_5 = 0x35,
- QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_6 = 0x36,
- QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_7 = 0x37,
- QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_8 = 0x38,
- QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_9 = 0x39,
- QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_10 = 0x3A,
- QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_11 = 0x3B,
- QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_12 = 0x3C,
- QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_13 = 0x3D,
- QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_14 = 0x3E,
- QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_15 = 0x3F,
- QMI_NAS_REJECT_CAUSE_SEMANTICALLY_INCORRECT_MESSAGE = 0x5F,
- QMI_NAS_REJECT_CAUSE_INVALID_MANDATORY_INFORMATION = 0x60,
- QMI_NAS_REJECT_CAUSE_MESSAGE_TYPE_NON_EXISTENT = 0x61,
- QMI_NAS_REJECT_CAUSE_MESSAGE_TYPE_NOT_COMPATIBLE = 0x62,
- QMI_NAS_REJECT_CAUSE_INFORMATION_ELEMENT_NON_EXISTENT = 0x63,
- QMI_NAS_REJECT_CAUSE_CONDITIONAL_INFORMATION_ELEMENT_ERROR = 0x64,
- QMI_NAS_REJECT_CAUSE_MESSAGE_NOT_COMPATIBLE = 0x65,
- QMI_NAS_REJECT_CAUSE_UNSPECIFIED_PROTOCOL_ERROR = 0x6F,
-} QmiNasRejectCause;
-
-#endif /* _LIBQMI_GLIB_QMI_ENUMS_NAS_H_ */
+++ /dev/null
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * uqmi -- tiny QMI support implementation
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA.
- *
- * Copyright (C) 2012 Google Inc.
- * Copyright (C) 2012-2017 Aleksander Morgado <aleksander@aleksander.es>
- */
-
-#ifndef _LIBQMI_GLIB_QMI_ENUMS_PDS_H_
-#define _LIBQMI_GLIB_QMI_ENUMS_PDS_H_
-
-/**
- * SECTION: qmi-enums-pds
- *
- * This section defines enumerations and flags used in the PDS service
- * interface.
- */
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI PDS Event Report' indication */
-
-/**
- * QmiPdsOperationMode:
- * @QMI_PDS_OPERATION_MODE_UNKNOWN: Unknown (position not fixed yet).
- * @QMI_PDS_OPERATION_MODE_STANDALONE: Standalone.
- * @QMI_PDS_OPERATION_MODE_MS_BASED: Mobile Station Based (MSB) A-GPS.
- * @QMI_PDS_OPERATION_MODE_MS_ASSISTED: Mobile Station Assisted (MSA) A-GPS.
- *
- * Operation mode used to compute the position.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_PDS_OPERATION_MODE_UNKNOWN = -1,
- QMI_PDS_OPERATION_MODE_STANDALONE = 0,
- QMI_PDS_OPERATION_MODE_MS_BASED = 1,
- QMI_PDS_OPERATION_MODE_MS_ASSISTED = 2
-} QmiPdsOperationMode;
-
-/**
- * QmiPdsPositionSessionStatus:
- * @QMI_PDS_POSITION_SESSION_STATUS_SUCCESS: Success.
- * @QMI_PDS_POSITION_SESSION_STATUS_IN_PROGRESS: In progress.
- * @QMI_PDS_POSITION_SESSION_STATUS_GENERAL_FAILURE: General failure.
- * @QMI_PDS_POSITION_SESSION_STATUS_TIMEOUT: Timeout.
- * @QMI_PDS_POSITION_SESSION_STATUS_USER_ENDED_SESSION: User ended session.
- * @QMI_PDS_POSITION_SESSION_STATUS_BAD_PARAMETER: Bad parameter.
- * @QMI_PDS_POSITION_SESSION_STATUS_PHONE_OFFLINE: Phone is offline.
- * @QMI_PDS_POSITION_SESSION_STATUS_ENGINE_LOCKED: Engine locked.
- * @QMI_PDS_POSITION_SESSION_STATUS_E911_SESSION_IN_PROGRESS: Emergency call in progress.
- *
- * Status of the positioning session.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_PDS_POSITION_SESSION_STATUS_SUCCESS = 0x00,
- QMI_PDS_POSITION_SESSION_STATUS_IN_PROGRESS = 0x01,
- QMI_PDS_POSITION_SESSION_STATUS_GENERAL_FAILURE = 0x02,
- QMI_PDS_POSITION_SESSION_STATUS_TIMEOUT = 0x03,
- QMI_PDS_POSITION_SESSION_STATUS_USER_ENDED_SESSION = 0x04,
- QMI_PDS_POSITION_SESSION_STATUS_BAD_PARAMETER = 0x05,
- QMI_PDS_POSITION_SESSION_STATUS_PHONE_OFFLINE = 0x06,
- QMI_PDS_POSITION_SESSION_STATUS_ENGINE_LOCKED = 0x07,
- QMI_PDS_POSITION_SESSION_STATUS_E911_SESSION_IN_PROGRESS = 0x08
-} QmiPdsPositionSessionStatus;
-
-/**
- * QmiPdsDataValid:
- * @QMI_PDS_DATA_VALID_TIMESTAMP_CALENDAR: Timestamp calendar (GPS time).
- * @QMI_PDS_DATA_VALID_TIMESTAMP_UTC: Timestamp (UTC).
- * @QMI_PDS_DATA_VALID_LEAP_SECONDS: Leap seconds.
- * @QMI_PDS_DATA_VALID_TIME_UNCERTAINTY: Time uncertainty.
- * @QMI_PDS_DATA_VALID_LATITUDE: Latitude.
- * @QMI_PDS_DATA_VALID_LONGITUDE: Longitude.
- * @QMI_PDS_DATA_VALID_ELLIPSOID_ALTITUDE: Ellipsoid altitude.
- * @QMI_PDS_DATA_VALID_MEAN_SEA_LEVEL_ALTITUDE: Mean sea level altitude.
- * @QMI_PDS_DATA_VALID_HORIZONTAL_SPEED: Horizontal speed.
- * @QMI_PDS_DATA_VALID_VERTICAL_SPEED: Vertical speed.
- * @QMI_PDS_DATA_VALID_HEADING: Heading.
- * @QMI_PDS_DATA_VALID_HORIZONTAL_UNCERTAINTY_CIRCULAR: Horizontal uncertainty circular.
- * @QMI_PDS_DATA_VALID_HORIZONTAL_UNCERTAINTY_ELLIPSE_SEMI_MAJOR: Horizontal uncertainty ellipse semi-major.
- * @QMI_PDS_DATA_VALID_HORIZONTAL_UNCERTAINTY_ELLIPSE_SEMI_MINOR: Horizontal uncertainty ellipse semi-minor.
- * @QMI_PDS_DATA_VALID_HORIZONTAL_UNCERTAINTY_ELLIPSE_ORIENT_AZIMUTH: Horizontal uncertainty ellipse orient azimuth.
- * @QMI_PDS_DATA_VALID_VERTICAL_UNCERTAINTY: Vertical uncertainty.
- * @QMI_PDS_DATA_VALID_HORIZONTAL_VELOCITY_UNCERTAINTY: Horizontal velocity uncertainty.
- * @QMI_PDS_DATA_VALID_VERTICAL_VELOCITY_UNCERTAINTY: Vertical velocity uncertainty.
- * @QMI_PDS_DATA_VALID_HORIZONTAL_CONFIDENCE: Horizontal confidence.
- * @QMI_PDS_DATA_VALID_POSITION_DOP: Position dillution of precision.
- * @QMI_PDS_DATA_VALID_HORIZONTAL_DOP: Horizontal dillution of precision.
- * @QMI_PDS_DATA_VALID_VERTICAL_DOP: Vertical dillution of precision.
- * @QMI_PDS_DATA_VALID_OPERATING_MODE: Operating mode.
- *
- * Flags to indicate which position data parameters are valid.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_PDS_DATA_VALID_TIMESTAMP_CALENDAR = 1 << 0,
- QMI_PDS_DATA_VALID_TIMESTAMP_UTC = 1 << 1,
- QMI_PDS_DATA_VALID_LEAP_SECONDS = 1 << 2,
- QMI_PDS_DATA_VALID_TIME_UNCERTAINTY = 1 << 3,
- QMI_PDS_DATA_VALID_LATITUDE = 1 << 4,
- QMI_PDS_DATA_VALID_LONGITUDE = 1 << 5,
- QMI_PDS_DATA_VALID_ELLIPSOID_ALTITUDE = 1 << 6,
- QMI_PDS_DATA_VALID_MEAN_SEA_LEVEL_ALTITUDE = 1 << 7,
- QMI_PDS_DATA_VALID_HORIZONTAL_SPEED = 1 << 8,
- QMI_PDS_DATA_VALID_VERTICAL_SPEED = 1 << 9,
- QMI_PDS_DATA_VALID_HEADING = 1 << 10,
- QMI_PDS_DATA_VALID_HORIZONTAL_UNCERTAINTY_CIRCULAR = 1 << 11,
- QMI_PDS_DATA_VALID_HORIZONTAL_UNCERTAINTY_ELLIPSE_SEMI_MAJOR = 1 << 12,
- QMI_PDS_DATA_VALID_HORIZONTAL_UNCERTAINTY_ELLIPSE_SEMI_MINOR = 1 << 13,
- QMI_PDS_DATA_VALID_HORIZONTAL_UNCERTAINTY_ELLIPSE_ORIENT_AZIMUTH = 1 << 14,
- QMI_PDS_DATA_VALID_VERTICAL_UNCERTAINTY = 1 << 15,
- QMI_PDS_DATA_VALID_HORIZONTAL_VELOCITY_UNCERTAINTY = 1 << 16,
- QMI_PDS_DATA_VALID_VERTICAL_VELOCITY_UNCERTAINTY = 1 << 17,
- QMI_PDS_DATA_VALID_HORIZONTAL_CONFIDENCE = 1 << 18,
- QMI_PDS_DATA_VALID_POSITION_DOP = 1 << 19,
- QMI_PDS_DATA_VALID_HORIZONTAL_DOP = 1 << 20,
- QMI_PDS_DATA_VALID_VERTICAL_DOP = 1 << 21,
- QMI_PDS_DATA_VALID_OPERATING_MODE = 1 << 22
-} QmiPdsDataValid;
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI PDS Get GPS Service State' request/response */
-
-/**
- * QmiPdsTrackingSessionState:
- * @QMI_PDS_TRACKING_SESSION_STATE_UNKNOWN: Unknown state.
- * @QMI_PDS_TRACKING_SESSION_STATE_INACTIVE: Session inactive.
- * @QMI_PDS_TRACKING_SESSION_STATE_ACTIVE: Session active.
- *
- * State of the tracking session.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_PDS_TRACKING_SESSION_STATE_UNKNOWN = 0,
- QMI_PDS_TRACKING_SESSION_STATE_INACTIVE = 1,
- QMI_PDS_TRACKING_SESSION_STATE_ACTIVE = 2
-} QmiPdsTrackingSessionState;
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI PDS Get Default Tracking Session' request/response */
-
-/**
- * QmiPdsOperatingMode:
- * @QMI_PDS_OPERATING_MODE_STANDALONE: Standalone (GPS only).
- * @QMI_PDS_OPERATING_MODE_MS_BASED: Mobile Station Based (MSB) A-GPS
- * @QMI_PDS_OPERATING_MODE_MS_ASSISTED: Mobile Station Assisted (MSA) A-GPS.
- *
- * GPS operating mode.
- *
- * Since: 1.12
- */
-typedef enum { /*< since=1.12 >*/
- QMI_PDS_OPERATING_MODE_STANDALONE = 0,
- QMI_PDS_OPERATING_MODE_MS_BASED = 1,
- QMI_PDS_OPERATING_MODE_MS_ASSISTED = 2,
-} QmiPdsOperatingMode;
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI PDS Get AGPS Config' request/response */
-
-/**
- * QmiPdsNetworkMode:
- * @QMI_PDS_NETWORK_MODE_UMTS: UMTS.
- * @QMI_PDS_NETWORK_MODE_CDMA: CDMA.
- *
- * Network mode used during the A-GPS setup.
- *
- * Since: 1.12
- */
-typedef enum { /*< since=1.12 >*/
- QMI_PDS_NETWORK_MODE_UMTS = 0,
- QMI_PDS_NETWORK_MODE_CDMA = 1,
-} QmiPdsNetworkMode;
-
-#endif /* _LIBQMI_GLIB_QMI_ENUMS_PDS_H_ */
+++ /dev/null
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * uqmi -- tiny QMI support implementation
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA.
- *
- * Copyright (C) 2012 Google Inc.
- * Copyright (C) 2012-2017 Aleksander Morgado <aleksander@aleksander.es>
- */
-
-#ifndef _LIBQMI_GLIB_QMI_ENUMS_PRIVATE_H_
-#define _LIBQMI_GLIB_QMI_ENUMS_PRIVATE_H_
-
-/*****************************************************************************/
-/* QMI Control */
-
-/**
- * QmiCtlDataFormat:
- * @QMI_CTL_DATA_FORMAT_QOS_FLOW_HEADER_ABSENT: QoS header absent
- * @QMI_CTL_DATA_FORMAT_QOS_FLOW_HEADER_PRESENT: QoS header present
- *
- * Controls whether the network port data format includes a QoS header or not.
- * Should normally be set to ABSENT.
- */
-typedef enum {
- QMI_CTL_DATA_FORMAT_QOS_FLOW_HEADER_ABSENT = 0,
- QMI_CTL_DATA_FORMAT_QOS_FLOW_HEADER_PRESENT = 1,
-} QmiCtlDataFormat;
-
-/**
- * QmiCtlDataLinkProtocol:
- * @QMI_CTL_DATA_LINK_PROTOCOL_802_3: data frames formatted as 802.3 Ethernet
- * @QMI_CTL_DATA_LINK_PROTOCOL_RAW_IP: data frames are raw IP packets
- *
- * Determines the network port data format.
- */
-typedef enum {
- QMI_CTL_DATA_LINK_PROTOCOL_UNKNOWN = 0,
- QMI_CTL_DATA_LINK_PROTOCOL_802_3 = 1,
- QMI_CTL_DATA_LINK_PROTOCOL_RAW_IP = 2,
-} QmiCtlDataLinkProtocol;
-
-/**
- * QmiCtlFlag:
- * @QMI_CTL_FLAG_NONE: None.
- * @QMI_CTL_FLAG_RESPONSE: Message is a response.
- * @QMI_CTL_FLAG_INDICATION: Message is an indication.
- *
- * QMI flags in messages of the %QMI_SERVICE_CTL service.
- */
-typedef enum {
- QMI_CTL_FLAG_NONE = 0,
- QMI_CTL_FLAG_RESPONSE = 1 << 0,
- QMI_CTL_FLAG_INDICATION = 1 << 1
-} QmiCtlFlag;
-
-/**
- * QmiServiceFlag:
- * @QMI_SERVICE_FLAG_NONE: None.
- * @QMI_SERVICE_FLAG_COMPOUND: Message is compound.
- * @QMI_SERVICE_FLAG_RESPONSE: Message is a response.
- * @QMI_SERVICE_FLAG_INDICATION: Message is an indication.
- *
- * QMI flags in messages which are not of the %QMI_SERVICE_CTL service.
- */
-typedef enum {
- QMI_SERVICE_FLAG_NONE = 0,
- QMI_SERVICE_FLAG_COMPOUND = 1 << 0,
- QMI_SERVICE_FLAG_RESPONSE = 1 << 1,
- QMI_SERVICE_FLAG_INDICATION = 1 << 2
-} QmiServiceFlag;
-
-
-
-#endif /* _LIBQMI_GLIB_QMI_ENUMS_PRIVATE_H_ */
+++ /dev/null
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * libqmi-glib -- GLib/GIO based library to control QMI devices
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA.
- *
- * Copyright (C) 2012 Google Inc.
- * Copyright (C) 2012-2017 Aleksander Morgado <aleksander@aleksander.es>
- */
-
-#ifndef _LIBQMI_GLIB_QMI_ENUMS_UIM_H_
-#define _LIBQMI_GLIB_QMI_ENUMS_UIM_H_
-
-/**
- * SECTION: qmi-enums-uim
- *
- * This section defines enumerations and flags used in the UIM service
- * interface.
- */
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI UIM Indication Register' indication */
-
-/**
- * QmiUimEventRegistrationFlag:
- * @QMI_UIM_EVENT_REGISTRATION_FLAG_CARD_STATUS: Card status.
- * @QMI_UIM_EVENT_REGISTRATION_FLAG_SAP_CONNECTION: SAP connection.
- * @QMI_UIM_EVENT_REGISTRATION_FLAG_EXTENDED_CARD_STATUS: Extended card status.
- * @QMI_UIM_EVENT_REGISTRATION_FLAG_PHYSICAL_SLOT_STATUS: Physical slot status. Since 1.26.
- *
- * Flags to use to register to UIM indications.
- *
- * Since: 1.22.4
- */
-typedef enum { /*< since=1.22.4 >*/
- QMI_UIM_EVENT_REGISTRATION_FLAG_CARD_STATUS = 1 << 0,
- QMI_UIM_EVENT_REGISTRATION_FLAG_SAP_CONNECTION = 1 << 1,
- QMI_UIM_EVENT_REGISTRATION_FLAG_EXTENDED_CARD_STATUS = 1 << 2,
- QMI_UIM_EVENT_REGISTRATION_FLAG_PHYSICAL_SLOT_STATUS = 1 << 4,
-} QmiUimEventRegistrationFlag;
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI UIM Read Record' request/response */
-
-/**
- * QmiUimSessionType:
- * @QMI_UIM_SESSION_TYPE_PRIMARY_GW_PROVISIONING: Primary GSM/WCDMA provisioning.
- * @QMI_UIM_SESSION_TYPE_PRIMARY_1X_PROVISIONING: Primary CDMA1x provisioning.
- * @QMI_UIM_SESSION_TYPE_SECONDARY_GW_PROVISIONING: Secondary GSM/WCDMA provisioning.
- * @QMI_UIM_SESSION_TYPE_SECONDARY_1X_PROVISIONING: Secondary CDMA1x provisioning.
- * @QMI_UIM_SESSION_TYPE_NONPROVISIONING_SLOT_1: Nonprovisioning on slot 1.
- * @QMI_UIM_SESSION_TYPE_NONPROVISIONING_SLOT_2: Nonprovisioning on slot 2.
- * @QMI_UIM_SESSION_TYPE_CARD_SLOT_1: Card on slot 1.
- * @QMI_UIM_SESSION_TYPE_CARD_SLOT_2: Card on slot 2.
- * @QMI_UIM_SESSION_TYPE_LOGICAL_CHANNEL_SLOT_1: Logical channel on slot 1.
- * @QMI_UIM_SESSION_TYPE_LOGICAL_CHANNEL_SLOT_2: Logical channel on slot 2.
- * @QMI_UIM_SESSION_TYPE_TERTIARY_GW_PROVISIONING: Tertiary GSM/WCDMA provisioning. Since 1.28.
- * @QMI_UIM_SESSION_TYPE_TERTIARY_1X_PROVISIONING: Tertiary CDMA1x provisioning. Since 1.28.
- * @QMI_UIM_SESSION_TYPE_QUATERNARY_GW_PROVISIONING: Quaternary GSM/WCDMA provisioning. Since 1.28.
- * @QMI_UIM_SESSION_TYPE_QUATERNARY_1X_PROVISIONING: Quaternary CDMA1x provisioning. Since 1.28.
- * @QMI_UIM_SESSION_TYPE_QUINARY_GW_PROVISIONING: Quinary GSM/WCDMA provisioning. Since 1.28.
- * @QMI_UIM_SESSION_TYPE_QUINARY_1X_PROVISIONING: Quinary CDMA1x provisioning. Since 1.28.
- * @QMI_UIM_SESSION_TYPE_NONPROVISIONING_SLOT_3: Nonprovisioning on slot 3. Since 1.28.
- * @QMI_UIM_SESSION_TYPE_NONPROVISIONING_SLOT_4: Nonprovisioning on slot 4. Since 1.28.
- * @QMI_UIM_SESSION_TYPE_NONPROVISIONING_SLOT_5: Nonprovisioning on slot 5. Since 1.28.
- * @QMI_UIM_SESSION_TYPE_CARD_SLOT_3: Card on slot 3. Since 1.28.
- * @QMI_UIM_SESSION_TYPE_CARD_SLOT_4: Card on slot 4. Since 1.28.
- * @QMI_UIM_SESSION_TYPE_CARD_SLOT_5: Card on slot 5. Since 1.28.
- * @QMI_UIM_SESSION_TYPE_LOGICAL_CHANNEL_SLOT_3: Logical channel on slot 3. Since 1.28.
- * @QMI_UIM_SESSION_TYPE_LOGICAL_CHANNEL_SLOT_4: Logical channel on slot 4. Since 1.28.
- * @QMI_UIM_SESSION_TYPE_LOGICAL_CHANNEL_SLOT_5: Logical channel on slot 5. Since 1.28.
- *
- * Type of UIM session.
- *
- * Since: 1.6
- */
-typedef enum { /*< since=1.6 >*/
- QMI_UIM_SESSION_TYPE_PRIMARY_GW_PROVISIONING = 0,
- QMI_UIM_SESSION_TYPE_PRIMARY_1X_PROVISIONING = 1,
- QMI_UIM_SESSION_TYPE_SECONDARY_GW_PROVISIONING = 2,
- QMI_UIM_SESSION_TYPE_SECONDARY_1X_PROVISIONING = 3,
- QMI_UIM_SESSION_TYPE_NONPROVISIONING_SLOT_1 = 4,
- QMI_UIM_SESSION_TYPE_NONPROVISIONING_SLOT_2 = 5,
- QMI_UIM_SESSION_TYPE_CARD_SLOT_1 = 6,
- QMI_UIM_SESSION_TYPE_CARD_SLOT_2 = 7,
- QMI_UIM_SESSION_TYPE_LOGICAL_CHANNEL_SLOT_1 = 8,
- QMI_UIM_SESSION_TYPE_LOGICAL_CHANNEL_SLOT_2 = 9,
- QMI_UIM_SESSION_TYPE_TERTIARY_GW_PROVISIONING = 10,
- QMI_UIM_SESSION_TYPE_TERTIARY_1X_PROVISIONING = 11,
- QMI_UIM_SESSION_TYPE_QUATERNARY_GW_PROVISIONING = 12,
- QMI_UIM_SESSION_TYPE_QUATERNARY_1X_PROVISIONING = 13,
- QMI_UIM_SESSION_TYPE_QUINARY_GW_PROVISIONING = 14,
- QMI_UIM_SESSION_TYPE_QUINARY_1X_PROVISIONING = 15,
- QMI_UIM_SESSION_TYPE_NONPROVISIONING_SLOT_3 = 16,
- QMI_UIM_SESSION_TYPE_NONPROVISIONING_SLOT_4 = 17,
- QMI_UIM_SESSION_TYPE_NONPROVISIONING_SLOT_5 = 18,
- QMI_UIM_SESSION_TYPE_CARD_SLOT_3 = 19,
- QMI_UIM_SESSION_TYPE_CARD_SLOT_4 = 20,
- QMI_UIM_SESSION_TYPE_CARD_SLOT_5 = 21,
- QMI_UIM_SESSION_TYPE_LOGICAL_CHANNEL_SLOT_3 = 22,
- QMI_UIM_SESSION_TYPE_LOGICAL_CHANNEL_SLOT_4 = 23,
- QMI_UIM_SESSION_TYPE_LOGICAL_CHANNEL_SLOT_5 = 24,
-} QmiUimSessionType;
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI UIM Get File Attributes' request/response */
-
-/**
- * QmiUimFileType:
- * @QMI_UIM_FILE_TYPE_TRANSPARENT: Transparent.
- * @QMI_UIM_FILE_TYPE_CYCLIC: Cyclic.
- * @QMI_UIM_FILE_TYPE_LINEAR_FIXED: Linear fixed.
- * @QMI_UIM_FILE_TYPE_DEDICATED_FILE: Dedicated file.
- * @QMI_UIM_FILE_TYPE_MASTER_FILE: Master file.
- *
- * Type of UIM file.
- *
- * Since: 1.6
- */
-typedef enum { /*< since=1.6 >*/
- QMI_UIM_FILE_TYPE_TRANSPARENT = 0,
- QMI_UIM_FILE_TYPE_CYCLIC = 1,
- QMI_UIM_FILE_TYPE_LINEAR_FIXED = 2,
- QMI_UIM_FILE_TYPE_DEDICATED_FILE = 3,
- QMI_UIM_FILE_TYPE_MASTER_FILE = 4
-} QmiUimFileType;
-
-/**
- * QmiUimSecurityAttributeLogic:
- * @QMI_UIM_SECURITY_ATTRIBUTE_LOGIC_ALWAYS: Always.
- * @QMI_UIM_SECURITY_ATTRIBUTE_LOGIC_NEVER: Never.
- * @QMI_UIM_SECURITY_ATTRIBUTE_LOGIC_AND: And.
- * @QMI_UIM_SECURITY_ATTRIBUTE_LOGIC_OR: Or.
- * @QMI_UIM_SECURITY_ATTRIBUTE_LOGIC_SINGLE: Single.
- *
- * Logic applicable to security attributes.
- *
- * Since: 1.6
- */
-typedef enum { /*< since=1.6 >*/
- QMI_UIM_SECURITY_ATTRIBUTE_LOGIC_ALWAYS = 0,
- QMI_UIM_SECURITY_ATTRIBUTE_LOGIC_NEVER = 1,
- QMI_UIM_SECURITY_ATTRIBUTE_LOGIC_AND = 2,
- QMI_UIM_SECURITY_ATTRIBUTE_LOGIC_OR = 3,
- QMI_UIM_SECURITY_ATTRIBUTE_LOGIC_SINGLE = 4
-} QmiUimSecurityAttributeLogic;
-
-/**
- * QmiUimSecurityAttribute:
- * @QMI_UIM_SECURITY_ATTRIBUTE_PIN1: PIN1.
- * @QMI_UIM_SECURITY_ATTRIBUTE_PIN2: PIN2.
- * @QMI_UIM_SECURITY_ATTRIBUTE_UPIN: UPIN.
- * @QMI_UIM_SECURITY_ATTRIBUTE_ADM: ADM.
- *
- * Security Attributes.
- *
- * Since: 1.6
- */
-typedef enum { /*< since=1.6 >*/
- QMI_UIM_SECURITY_ATTRIBUTE_PIN1 = 1 << 0,
- QMI_UIM_SECURITY_ATTRIBUTE_PIN2 = 1 << 1,
- QMI_UIM_SECURITY_ATTRIBUTE_UPIN = 1 << 2,
- QMI_UIM_SECURITY_ATTRIBUTE_ADM = 1 << 3
-} QmiUimSecurityAttribute;
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI UIM Set PIN Protection' */
-
-/**
- * QmiUimPinId:
- * @QMI_UIM_PIN_ID_UNKNOWN: Unknown.
- * @QMI_UIM_PIN_ID_PIN1: PIN1.
- * @QMI_UIM_PIN_ID_PIN2: PIN2.
- * @QMI_UIM_PIN_ID_UPIN: UPIN.
- * @QMI_UIM_PIN_ID_HIDDEN_KEY: Hidden key.
- *
- * PIN ID.
- *
- * Since: 1.14
- */
-typedef enum { /*< since=1.14 >*/
- QMI_UIM_PIN_ID_UNKNOWN = 0,
- QMI_UIM_PIN_ID_PIN1 = 1,
- QMI_UIM_PIN_ID_PIN2 = 2,
- QMI_UIM_PIN_ID_UPIN = 3,
- QMI_UIM_PIN_ID_HIDDEN_KEY = 4
-} QmiUimPinId;
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI UIM Get Card Status' request/response */
-
-/**
- * QmiUimCardState:
- * @QMI_UIM_CARD_STATE_ABSENT: Absent.
- * @QMI_UIM_CARD_STATE_PRESENT: Present.
- * @QMI_UIM_CARD_STATE_ERROR: Error.
- *
- * State of the card.
- *
- * Since: 1.10
- */
-typedef enum { /*< since=1.10 >*/
- QMI_UIM_CARD_STATE_ABSENT = 0,
- QMI_UIM_CARD_STATE_PRESENT = 1,
- QMI_UIM_CARD_STATE_ERROR = 2
-} QmiUimCardState;
-
-/**
- * QmiUimPinState:
- * @QMI_UIM_PIN_STATE_NOT_INITIALIZED: Not initialized.
- * @QMI_UIM_PIN_STATE_ENABLED_NOT_VERIFIED: Enabled, not verified.
- * @QMI_UIM_PIN_STATE_ENABLED_VERIFIED: Enabled, verified.
- * @QMI_UIM_PIN_STATE_DISABLED: Disabled.
- * @QMI_UIM_PIN_STATE_BLOCKED: Blocked.
- * @QMI_UIM_PIN_STATE_PERMANENTLY_BLOCKED: Permanently Blocked.
- *
- * The PIN state.
- *
- * Since: 1.10
- */
-typedef enum { /*< since=1.10 >*/
- QMI_UIM_PIN_STATE_NOT_INITIALIZED = 0,
- QMI_UIM_PIN_STATE_ENABLED_NOT_VERIFIED = 1,
- QMI_UIM_PIN_STATE_ENABLED_VERIFIED = 2,
- QMI_UIM_PIN_STATE_DISABLED = 3,
- QMI_UIM_PIN_STATE_BLOCKED = 4,
- QMI_UIM_PIN_STATE_PERMANENTLY_BLOCKED = 5,
-} QmiUimPinState;
-
-/**
- * QmiUimCardError:
- * @QMI_UIM_CARD_ERROR_UNKNOWN: Unknown error.
- * @QMI_UIM_CARD_ERROR_POWER_DOWN: Power down.
- * @QMI_UIM_CARD_ERROR_POLL: Poll error.
- * @QMI_UIM_CARD_ERROR_NO_ATR_RECEIVED: No ATR received.
- * @QMI_UIM_CARD_ERROR_VOLTAGE_MISMATCH: Voltage mismatch.
- * @QMI_UIM_CARD_ERROR_PARITY: Parity error.
- * @QMI_UIM_CARD_ERROR_POSSIBLY_REMOVED: Unknown error, possibly removed.
- * @QMI_UIM_CARD_ERROR_TECHNICAL: Technical problem.
- *
- * Card error.
- *
- * Since: 1.10
- */
-typedef enum { /*< since=1.10 >*/
- QMI_UIM_CARD_ERROR_UNKNOWN = 0,
- QMI_UIM_CARD_ERROR_POWER_DOWN = 1,
- QMI_UIM_CARD_ERROR_POLL = 2,
- QMI_UIM_CARD_ERROR_NO_ATR_RECEIVED = 3,
- QMI_UIM_CARD_ERROR_VOLTAGE_MISMATCH = 4,
- QMI_UIM_CARD_ERROR_PARITY = 5,
- QMI_UIM_CARD_ERROR_POSSIBLY_REMOVED = 6,
- QMI_UIM_CARD_ERROR_TECHNICAL = 7
-} QmiUimCardError;
-
-/**
- * QmiUimCardApplicationType:
- * @QMI_UIM_CARD_APPLICATION_TYPE_UNKNOWN: Unknown.
- * @QMI_UIM_CARD_APPLICATION_TYPE_SIM: SIM.
- * @QMI_UIM_CARD_APPLICATION_TYPE_USIM: USIM.
- * @QMI_UIM_CARD_APPLICATION_TYPE_RUIM: RUIM.
- * @QMI_UIM_CARD_APPLICATION_TYPE_CSIM: CSIM.
- * @QMI_UIM_CARD_APPLICATION_TYPE_ISIM: ISIM.
- *
- * Card application type.
- *
- * Since: 1.10
- */
-typedef enum { /*< since=1.10 >*/
- QMI_UIM_CARD_APPLICATION_TYPE_UNKNOWN = 0,
- QMI_UIM_CARD_APPLICATION_TYPE_SIM = 1,
- QMI_UIM_CARD_APPLICATION_TYPE_USIM = 2,
- QMI_UIM_CARD_APPLICATION_TYPE_RUIM = 3,
- QMI_UIM_CARD_APPLICATION_TYPE_CSIM = 4,
- QMI_UIM_CARD_APPLICATION_TYPE_ISIM = 5,
-} QmiUimCardApplicationType;
-
-/**
- * QmiUimCardApplicationState:
- * @QMI_UIM_CARD_APPLICATION_STATE_UNKNOWN: Unknown.
- * @QMI_UIM_CARD_APPLICATION_STATE_DETECTED: Detected.
- * @QMI_UIM_CARD_APPLICATION_STATE_PIN1_OR_UPIN_PIN_REQUIRED: PIN1 or UPIN PIN required.
- * @QMI_UIM_CARD_APPLICATION_STATE_PUK1_OR_UPIN_PUK_REQUIRED: PUK1 or UPIN PUK required.
- * @QMI_UIM_CARD_APPLICATION_STATE_CHECK_PERSONALIZATION_STATE: Personalization state must be checked.
- * @QMI_UIM_CARD_APPLICATION_STATE_PIN1_BLOCKED: PIN1 blocked.
- * @QMI_UIM_CARD_APPLICATION_STATE_ILLEGAL: Illegal.
- * @QMI_UIM_CARD_APPLICATION_STATE_READY: Ready
- *
- * Card application state.
- *
- * Since: 1.10
- */
-typedef enum { /*< since=1.10 >*/
- QMI_UIM_CARD_APPLICATION_STATE_UNKNOWN = 0,
- QMI_UIM_CARD_APPLICATION_STATE_DETECTED = 1,
- QMI_UIM_CARD_APPLICATION_STATE_PIN1_OR_UPIN_PIN_REQUIRED = 2,
- QMI_UIM_CARD_APPLICATION_STATE_PUK1_OR_UPIN_PUK_REQUIRED = 3,
- QMI_UIM_CARD_APPLICATION_STATE_CHECK_PERSONALIZATION_STATE = 4,
- QMI_UIM_CARD_APPLICATION_STATE_PIN1_BLOCKED = 5,
- QMI_UIM_CARD_APPLICATION_STATE_ILLEGAL = 6,
- QMI_UIM_CARD_APPLICATION_STATE_READY = 7,
-} QmiUimCardApplicationState;
-
-/**
- * QmiUimCardApplicationPersonalizationState:
- * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_STATE_UNKNOWN: Unknown.
- * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_STATE_IN_PROGRESS: Operation in progress.
- * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_STATE_READY: Ready.
- * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_STATE_CODE_REQUIRED: Code required.
- * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_STATE_PUK_CODE_REQUIRED: PUK code required.
- * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_STATE_PERMANENTLY_BLOCKED: Permanently blocked-
- *
- * Card application personalization state.
- *
- * Since: 1.10
- */
-typedef enum { /*< since=1.10 >*/
- QMI_UIM_CARD_APPLICATION_PERSONALIZATION_STATE_UNKNOWN = 0,
- QMI_UIM_CARD_APPLICATION_PERSONALIZATION_STATE_IN_PROGRESS = 1,
- QMI_UIM_CARD_APPLICATION_PERSONALIZATION_STATE_READY = 2,
- QMI_UIM_CARD_APPLICATION_PERSONALIZATION_STATE_CODE_REQUIRED = 3,
- QMI_UIM_CARD_APPLICATION_PERSONALIZATION_STATE_PUK_CODE_REQUIRED = 4,
- QMI_UIM_CARD_APPLICATION_PERSONALIZATION_STATE_PERMANENTLY_BLOCKED = 5,
-} QmiUimCardApplicationPersonalizationState;
-
-/**
- * QmiUimCardApplicationPersonalizationFeature:
- * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_GW_NETWORK: GW network.
- * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_GW_NETWORK_SUBSET: GW network subset.
- * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_GW_SERVICE_PROVIDER: GW service provider.
- * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_GW_CORPORATE: GW corporate.
- * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_GW_UIM: UIM.
- * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_1X_NETWORK_TYPE_1: 1X network type 1.
- * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_1X_NETWORK_TYPE_2: 1X network type 2.
- * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_1X_HRPD: 1X HRPD.
- * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_1X_SERVICE_PROVIDER: 1X service provider.
- * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_1X_CORPORATE: 1X corporate.
- * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_1X_RUIM: 1X R-UIM.
- * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_UNKNOWN: Unknown.
- *
- * Card application personalization feature, when a code is required.
- *
- * Since: 1.10
- */
-typedef enum { /*< since=1.10 >*/
- QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_GW_NETWORK = 0,
- QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_GW_NETWORK_SUBSET = 1,
- QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_GW_SERVICE_PROVIDER = 2,
- QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_GW_CORPORATE = 3,
- QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_GW_UIM = 4,
- QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_1X_NETWORK_TYPE_1 = 5,
- QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_1X_NETWORK_TYPE_2 = 6,
- QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_1X_HRPD = 7,
- QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_1X_SERVICE_PROVIDER = 8,
- QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_1X_CORPORATE = 9,
- QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_1X_RUIM = 10,
- QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_UNKNOWN = 11
-} QmiUimCardApplicationPersonalizationFeature;
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI UIM Refresh' indication */
-
-/**
- * QmiUimRefreshStage:
- * @QMI_UIM_REFRESH_STAGE_WAIT_FOR_OK: Waiting for REFRESH OK message.
- * @QMI_UIM_REFRESH_STAGE_START: Refresh started.
- * @QMI_UIM_REFRESH_STAGE_END_WITH_SUCCESS: Refresh completed successfully.
- * @QMI_UIM_REFRESH_STAGE_END_WITH_FAILURE: Refresh has failed.
- *
- * Current stage of the refresh procedure.
- *
- * Since: 1.28
- */
-typedef enum { /*< since=1.28 >*/
- QMI_UIM_REFRESH_STAGE_WAIT_FOR_OK = 0,
- QMI_UIM_REFRESH_STAGE_START = 1,
- QMI_UIM_REFRESH_STAGE_END_WITH_SUCCESS = 2,
- QMI_UIM_REFRESH_STAGE_END_WITH_FAILURE = 3
-} QmiUimRefreshStage;
-
-/**
- * QmiUimRefreshMode:
- * @QMI_UIM_REFRESH_MODE_RESET: Reset.
- * @QMI_UIM_REFRESH_MODE_INIT: Init.
- * @QMI_UIM_REFRESH_MODE_INIT_FCN: Init & FCN.
- * @QMI_UIM_REFRESH_MODE_FCN: FCN.
- * @QMI_UIM_REFRESH_MODE_INIT_FULL_FCN: Init & full FCN.
- * @QMI_UIM_REFRESH_MODE_APP_RESET: Application reset.
- * @QMI_UIM_REFRESH_MODE_3G_RESET: 3G session reset.
- *
- * Refresh mode
- *
- * Since: 1.28
- */
-typedef enum { /*< since=1.28 >*/
- QMI_UIM_REFRESH_MODE_RESET = 0,
- QMI_UIM_REFRESH_MODE_INIT = 1,
- QMI_UIM_REFRESH_MODE_INIT_FCN = 2,
- QMI_UIM_REFRESH_MODE_FCN = 3,
- QMI_UIM_REFRESH_MODE_INIT_FULL_FCN = 4,
- QMI_UIM_REFRESH_MODE_APP_RESET = 5,
- QMI_UIM_REFRESH_MODE_3G_RESET = 6
-} QmiUimRefreshMode;
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI UIM Get Slot Status' request/response */
-
-/**
- * QmiUimPhysicalCardState:
- * @QMI_UIM_PHYSICAL_CARD_STATE_UNKNOWN: Unknown.
- * @QMI_UIM_PHYSICAL_CARD_STATE_ABSENT: Absent.
- * @QMI_UIM_PHYSICAL_CARD_STATE_PRESENT: Present.
- *
- * State of the physical card.
- *
- * Since: 1.26
- */
-typedef enum { /*< since=1.26 >*/
- QMI_UIM_PHYSICAL_CARD_STATE_UNKNOWN = 0,
- QMI_UIM_PHYSICAL_CARD_STATE_ABSENT = 1,
- QMI_UIM_PHYSICAL_CARD_STATE_PRESENT = 2,
-} QmiUimPhysicalCardState;
-
-/**
- * QmiUimSlotState:
- * @QMI_UIM_SLOT_STATE_INACTIVE: Inactive.
- * @QMI_UIM_SLOT_STATE_ACTIVE: Active.
- *
- * State of the slot.
- *
- * Since: 1.26
- */
-typedef enum { /*< since=1.26 >*/
- QMI_UIM_SLOT_STATE_INACTIVE = 0,
- QMI_UIM_SLOT_STATE_ACTIVE = 1,
-} QmiUimSlotState;
-
-/**
- * QmiUimCardProtocol:
- * @QMI_UIM_CARD_PROTOCOL_UNKNOWN: Unknown.
- * @QMI_UIM_CARD_PROTOCOL_ICC: ICC protocol.
- * @QMI_UIM_CARD_PROTOCOL_UICC: UICC protocol.
- *
- * Protocol for the card.
- *
- * Since: 1.26
- */
-typedef enum { /*< since=1.26 >*/
- QMI_UIM_CARD_PROTOCOL_UNKNOWN = 0,
- QMI_UIM_CARD_PROTOCOL_ICC = 1,
- QMI_UIM_CARD_PROTOCOL_UICC = 2,
-} QmiUimCardProtocol;
-
-/**
- * QmiUimConfiguration:
- * @QMI_UIM_CONFIGURATION_AUTOMATIC_SELECTION: Automatic selection.
- * @QMI_UIM_CONFIGURATION_PERSONALIZATION_STATUS: Personalization status.
- * @QMI_UIM_CONFIGURATION_HALT_SUBSCRIPTION: Halt publication of subscription.
- *
- * Requested configurations. If none explicitly requested, all configuration
- * items are returned.
- *
- * Since: 1.30
- */
-typedef enum { /*< since=1.30 >*/
- QMI_UIM_CONFIGURATION_AUTOMATIC_SELECTION = 1 << 0,
- QMI_UIM_CONFIGURATION_PERSONALIZATION_STATUS = 1 << 1,
- QMI_UIM_CONFIGURATION_HALT_SUBSCRIPTION = 1 << 2,
-} QmiUimConfiguration;
-
-/**
- * QmiUimDepersonalizationOperation:
- * @QMI_UIM_DEPERSONALIZATION_OPERATION_DEACTIVATE: Deactivate personalization
- * @QMI_UIM_DEPERSONALIZATION_OPERATION_UNBLOCK: Unblock personalization
- *
- * Depersonalization operation to perform.
- *
- * Since: 1.30
- */
-typedef enum { /*< since=1.30 >*/
- QMI_UIM_DEPERSONALIZATION_OPERATION_DEACTIVATE = 0,
- QMI_UIM_DEPERSONALIZATION_OPERATION_UNBLOCK = 1,
-} QmiUimDepersonalizationOperation;
-
-#endif /* _LIBQMI_GLIB_QMI_ENUMS_UIM_H_ */
+++ /dev/null
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * libqmi-glib -- GLib/GIO based library to control QMI devices
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA.
- *
- * Copyright (C) 2014-2017 Aleksander Morgado <aleksander@aleksander.es>
- */
-
-#ifndef _LIBQMI_GLIB_QMI_ENUMS_WDA_H_
-#define _LIBQMI_GLIB_QMI_ENUMS_WDA_H_
-
-/**
- * SECTION: qmi-enums-wda
- *
- * This section defines enumerations and flags used in the WDA service
- * interface.
- */
-
-/**
- * QmiWdaLinkLayerProtocol:
- * @QMI_WDA_LINK_LAYER_PROTOCOL_UNKNOWN: Unknown.
- * @QMI_WDA_LINK_LAYER_PROTOCOL_802_3: 802.3 ethernet mode.
- * @QMI_WDA_LINK_LAYER_PROTOCOL_RAW_IP: Raw IP mode.
- *
- * Link layer protocol.
- *
- * Since: 1.10
- */
-typedef enum { /*< since=1.10 >*/
- QMI_WDA_LINK_LAYER_PROTOCOL_UNKNOWN = 0x00,
- QMI_WDA_LINK_LAYER_PROTOCOL_802_3 = 0x01,
- QMI_WDA_LINK_LAYER_PROTOCOL_RAW_IP = 0x02,
-} QmiWdaLinkLayerProtocol;
-
-/**
- * QmiWdaDataAggregationProtocol:
- * @QMI_WDA_DATA_AGGREGATION_PROTOCOL_DISABLED: Disabled.
- * @QMI_WDA_DATA_AGGREGATION_PROTOCOL_TLP: TLP enabled.
- * @QMI_WDA_DATA_AGGREGATION_PROTOCOL_QC_NCM: QC NCM enabled.
- * @QMI_WDA_DATA_AGGREGATION_PROTOCOL_MBIM: MBIM enabled.
- * @QMI_WDA_DATA_AGGREGATION_PROTOCOL_RNDIS: RNDIS enabled.
- * @QMI_WDA_DATA_AGGREGATION_PROTOCOL_QMAP: QMAP enabled.
- * @QMI_WDA_DATA_AGGREGATION_PROTOCOL_QMAPV2: QMAPV2 enabled. Since: 1.30.
- * @QMI_WDA_DATA_AGGREGATION_PROTOCOL_QMAPV3: QMAPV3 enabled. Since: 1.30.
- * @QMI_WDA_DATA_AGGREGATION_PROTOCOL_QMAPV4: QMAPV4 enabled. Since: 1.30.
- * @QMI_WDA_DATA_AGGREGATION_PROTOCOL_QMAPV5: QMAPV5 enabled. Since: 1.28.
- *
- * Data aggregation protocol in uplink or downlink.
- *
- * Since: 1.10
- */
-typedef enum { /*< since=1.10 >*/
- QMI_WDA_DATA_AGGREGATION_PROTOCOL_DISABLED = 0x00,
- QMI_WDA_DATA_AGGREGATION_PROTOCOL_TLP = 0x01,
- QMI_WDA_DATA_AGGREGATION_PROTOCOL_QC_NCM = 0x02,
- QMI_WDA_DATA_AGGREGATION_PROTOCOL_MBIM = 0x03,
- QMI_WDA_DATA_AGGREGATION_PROTOCOL_RNDIS = 0x04,
- QMI_WDA_DATA_AGGREGATION_PROTOCOL_QMAP = 0x05,
- QMI_WDA_DATA_AGGREGATION_PROTOCOL_QMAPV2 = 0x06,
- QMI_WDA_DATA_AGGREGATION_PROTOCOL_QMAPV3 = 0x07,
- QMI_WDA_DATA_AGGREGATION_PROTOCOL_QMAPV4 = 0x08,
- QMI_WDA_DATA_AGGREGATION_PROTOCOL_QMAPV5 = 0x09,
-} QmiWdaDataAggregationProtocol;
-
-#endif /* _LIBQMI_GLIB_QMI_ENUMS_WDA_H_ */
+++ /dev/null
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * uqmi -- tiny QMI support implementation
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA.
- *
- * Copyright (C) 2012 Lanedo GmbH
- * Copyright (C) 2015 Velocloud Inc.
- * Copyright (C) 2012-2017 Aleksander Morgado <aleksander@aleksander.es>
- */
-
-#ifndef _LIBQMI_GLIB_QMI_ENUMS_WDS_H_
-#define _LIBQMI_GLIB_QMI_ENUMS_WDS_H_
-
-/**
- * SECTION: qmi-enums-wds
- *
- * This section defines enumerations and flags used in the WDS service
- * interface.
- */
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI WDS Start Network' message */
-
-/**
- * QmiWdsIpFamily:
- * @QMI_WDS_IP_FAMILY_UNKNOWN: unknown. Since: 1.18.
- * @QMI_WDS_IP_FAMILY_IPV4: IPv4.
- * @QMI_WDS_IP_FAMILY_IPV6: IPv6.
- * @QMI_WDS_IP_FAMILY_UNSPECIFIED: None specified.
- *
- * Type of IP family.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_WDS_IP_FAMILY_UNKNOWN = 0,
- QMI_WDS_IP_FAMILY_IPV4 = 4,
- QMI_WDS_IP_FAMILY_IPV6 = 6,
- QMI_WDS_IP_FAMILY_UNSPECIFIED = 8
-} QmiWdsIpFamily;
-
-/**
- * QmiWdsTechnologyPreference:
- * @QMI_WDS_TECHNOLOGY_PREFERENCE_ALLOW_3GPP: 3GPP allowed.
- * @QMI_WDS_TECHNOLOGY_PREFERENCE_ALLOW_3GPP2: 3GPP2 allowed.
- *
- * Type of network allowed when trying to connect.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_WDS_TECHNOLOGY_PREFERENCE_ALLOW_3GPP = 1 << 0,
- QMI_WDS_TECHNOLOGY_PREFERENCE_ALLOW_3GPP2 = 1 << 1
-} QmiWdsTechnologyPreference;
-
-/**
- * QmiWdsExtendedTechnologyPreference:
- * @QMI_WDS_EXTENDED_TECHNOLOGY_PREFERENCE_CDMA: Use CDMA.
- * @QMI_WDS_EXTENDED_TECHNOLOGY_PREFERENCE_UMTS: Use UMTS.
- * @QMI_WDS_EXTENDED_TECHNOLOGY_PREFERENCE_EPC: Use EPC, LTE.
- * @QMI_WDS_EXTENDED_TECHNOLOGY_PREFERENCE_EMBMS: Use eMBMS.
- * @QMI_WDS_EXTENDED_TECHNOLOGY_PREFERENCE_MODEM_LINK_LOCAL: Use modem link-local.
- *
- * Type of network allowed when trying to connect.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_WDS_EXTENDED_TECHNOLOGY_PREFERENCE_CDMA = 32769,
- QMI_WDS_EXTENDED_TECHNOLOGY_PREFERENCE_UMTS = 32772,
- QMI_WDS_EXTENDED_TECHNOLOGY_PREFERENCE_EPC = 34944,
- QMI_WDS_EXTENDED_TECHNOLOGY_PREFERENCE_EMBMS = 34946,
- QMI_WDS_EXTENDED_TECHNOLOGY_PREFERENCE_MODEM_LINK_LOCAL = 34952,
-} QmiWdsExtendedTechnologyPreference;
-
-/**
- * QmiWdsCallType:
- * @QMI_WDS_CALL_TYPE_LAPTOP: Laptop call.
- * @QMI_WDS_CALL_TYPE_EMBEDDED: Embedded call.
- *
- * Type of call to originate.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_WDS_CALL_TYPE_LAPTOP = 0,
- QMI_WDS_CALL_TYPE_EMBEDDED = 1
-} QmiWdsCallType;
-
-/**
- * QmiWdsCallEndReason:
- * @QMI_WDS_CALL_END_REASON_GENERIC_UNSPECIFIED: Unspecified reason.
- * @QMI_WDS_CALL_END_REASON_GENERIC_CLIENT_END: Client end.
- * @QMI_WDS_CALL_END_REASON_GENERIC_NO_SERVICE: No service.
- * @QMI_WDS_CALL_END_REASON_GENERIC_FADE: Fade.
- * @QMI_WDS_CALL_END_REASON_GENERIC_RELEASE_NORMAL: Release normal.
- * @QMI_WDS_CALL_END_REASON_GENERIC_ACCESS_ATTEMPT_IN_PROGRESS: Access attempt in progress.
- * @QMI_WDS_CALL_END_REASON_GENERIC_ACCESS_FAILURE: Access Failure.
- * @QMI_WDS_CALL_END_REASON_GENERIC_REDIRECTION_OR_HANDOFF: Redirection or handoff.
- * @QMI_WDS_CALL_END_REASON_GENERIC_CLOSE_IN_PROGRESS: Close in progress.
- * @QMI_WDS_CALL_END_REASON_GENERIC_AUTHENTICATION_FAILED: Authentication failed.
- * @QMI_WDS_CALL_END_REASON_GENERIC_INTERNAL_ERROR: Internal error.
- * @QMI_WDS_CALL_END_REASON_CDMA_LOCK: CDMA specific. Phone is CDMA-locked.
- * @QMI_WDS_CALL_END_REASON_CDMA_INTERCEPT: CDMA specific. Received intercept from the BS.
- * @QMI_WDS_CALL_END_REASON_CDMA_REORDER: CDMA specific. Received reorder from the BS.
- * @QMI_WDS_CALL_END_REASON_CDMA_RELEASE_SO_REJECT: CDMA specific. Received release from the BS, SO reject.
- * @QMI_WDS_CALL_END_REASON_CDMA_INCOMING_CALL: CDMA specific. Received incoming call from the BS.
- * @QMI_WDS_CALL_END_REASON_CDMA_ALERT_STOP: CDMA specific. Received alert stop from the BS.
- * @QMI_WDS_CALL_END_REASON_CDMA_ACTIVATION: CDMA specific. Received end activation.
- * @QMI_WDS_CALL_END_REASON_CDMA_MAX_ACCESS_PROBES: CDMA specific. Maximum access probes transmitted.
- * @QMI_WDS_CALL_END_REASON_CDMA_CCS_NOT_SUPPORTED_BY_BS: CDMA specific. Concurrent service not supported by the BS.
- * @QMI_WDS_CALL_END_REASON_CDMA_NO_RESPONSE_FROM_BS: CDMA specific. No response received from the BS.
- * @QMI_WDS_CALL_END_REASON_CDMA_REJECTED_BY_BS: CDMA specific. Rejected by the BS.
- * @QMI_WDS_CALL_END_REASON_CDMA_INCOMPATIBLE: CDMA specific. Concurrent services requested are incompatible.
- * @QMI_WDS_CALL_END_REASON_CDMA_ALREADY_IN_TC: CDMA specific. Already in TC.
- * @QMI_WDS_CALL_END_REASON_CDMA_USER_CALL_ORIGINATED_DURING_GPS: CDMA specific. Call originated during GPS.
- * @QMI_WDS_CALL_END_REASON_CDMA_USER_CALL_ORIGINATED_DURING_SMS: CDMA specific. Call originated during SMS.
- * @QMI_WDS_CALL_END_REASON_CDMA_NO_SERVICE: CDMA specific. No service.
- * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_CONFERENCE_FAILED: GSM/WCDMA specific. Call origination request failed.
- * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_INCOMING_REJECTED: GSM/WCDMA specific. Client rejected incoming call.
- * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_NO_SERVICE: GSM/WCDMA specific. No service.
- * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_NETWORK_END: GSM/WCDMA specific. Network ended the call.
- * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_LLC_SNDCP_FAILURE: GSM/WCDMA specific. LLC or SNDCP failure.
- * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_INSUFFICIENT_RESOURCES: GSM/WCDMA specific. Insufficient resources.
- * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_OPTION_TEMPORARILY_OUT_OF_ORDER: GSM/WCDMA specific. Service option temporarily out of order.
- * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_NSAPI_ALREADY_USED: GSM/WCDMA specific. NSAPI already used.
- * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_REGULAR_DEACTIVATION: GSM/WCDMA specific. Regular PDP context deactivation.
- * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_NETWORK_FAILURE: GSM/WCDMA specific. Network failure.
- * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_REATTACH_REQUIRED: GSM/WCDMA specific. Reattach required.
- * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_PROTOCOL_ERROR: GSM/WCDMA specific. Protocol error.
- * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_OPERATOR_DETERMINED_BARRING: GSM/WCDMA specific. Operator-determined barring.
- * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_UNKNOWN_APN: GSM/WCDMA specific. Unknown or missing APN.
- * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_UNKNOWN_PDP: GSM/WCDMA specific. Unknown PDP address or type.
- * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_GGSN_REJECT: GSM/WCDMA specific. Activation rejected by GGSN.
- * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_ACTIVATION_REJECT: GSM/WCDMA specific. Activation rejected.
- * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_OPTION_NOT_SUPPORTED: GSM/WCDMA specific. Service option not supported.
- * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_OPTION_UNSUBSCRIBED: GSM/WCDMA specific. Service option not subscribed.
- * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_QOS_NOT_ACCEPTED: GSM/WCDMA specific. QoS not accepted.
- * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_TFT_SEMANTIC_ERROR: GSM/WCDMA specific. Semantic error in TFT operation.
- * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_TFT_SYNTAX_ERROR: GSM/WCDMA specific. Syntax error in TFT operation.
- * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_UNKNOWN_PDP_CONTEXT: GSM/WCDMA specific. Unknown PDP context.
- * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_FILTER_SEMANTIC_ERROR: GSM/WCDMA specific. Semantic error in packet filters.
- * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_FILTER_SYNTAX_ERROR: GSM/WCDMA specific. Syntax error in packet filters.
- * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_PDP_WITHOUT_ACTIVE_TFT: GSM/WCDMA specific. PDP context without TFT activated.
- * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_INVALID_TRANSACTION_ID: GSM/WCDMA specific. Invalid transaction ID.
- * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_MESSAGE_INCORRECT_SEMANTIC: GSM/WCDMA specific. Message incorrect semantically.
- * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_INVALID_MANDATORY_INFO: GSM/WCDMA specific. Invalid mandatory information.
- * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_MESSAGE_TYPE_UNSUPPORTED: GSM/WCDMA specific. Message type not implemented.
- * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_MESSAGE_TYPE_NONCOMPATIBLE_STATE: GSM/WCDMA specific. Message not compatible with state.
- * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_UNKNOWN_INFO_ELEMENT: GSM/WCDMA specific. Information element unknown.
- * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_CONDITIONAL_IE_ERROR: GSM/WCDMA specific. Conditional IE error.
- * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_MESSAGE_AND_PROTOCOL_STATE_UNCOMPATIBLE: GSM/WCDMA specific. Message and protocol state uncompatible.
- * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_APN_TYPE_CONFLICT: GSM/WCDMA specific. APN type conflict.
- * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_NO_GPRS_CONTEXT: GSM/WCDMA specific. No GPRS context.
- * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_FEATURE_NOT_SUPPORTED: GSM/WCDMA specific. Feature not supported.
- * @QMI_WDS_CALL_END_REASON_EVDO_CONNECTION_DENY_GENERAL_OR_BUSY: CDMA/EVDO specific. Received Connection Deny: General or Network busy.
- * @QMI_WDS_CALL_END_REASON_EVDO_CONNECTION_DENY_BILLING_OR_AUTHENTICATION_FAILURE: CDMA/EVDO specific. Received Connection Deny: Billing or Authentication failure.
- * @QMI_WDS_CALL_END_REASON_EVDO_HDR_CHANGE: CDMA/EVDO specific. Change HDR.
- * @QMI_WDS_CALL_END_REASON_EVDO_HDR_EXIT: CDMA/EVDO specific. Exit HDR.
- * @QMI_WDS_CALL_END_REASON_EVDO_HDR_NO_SESSION: CDMA/EVDO specific. No HDR session.
- * @QMI_WDS_CALL_END_REASON_EVDO_HDR_ORIGINATION_DURING_GPS_FIX: CDMA/EVDO specific. HDR call ended in favor of a GPS fix.
- * @QMI_WDS_CALL_END_REASON_EVDO_HDR_CONNECTION_SETUP_TIMEOUT: CDMA/EVDO specific. Connection setup timeout.
- * @QMI_WDS_CALL_END_REASON_EVDO_HDR_RELEASED_BY_CM: CDMA/EVDO specific. Released HDR call by call manager.
- *
- * Reason for ending the call.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- /* Generic reasons */
- QMI_WDS_CALL_END_REASON_GENERIC_UNSPECIFIED = 1,
- QMI_WDS_CALL_END_REASON_GENERIC_CLIENT_END = 2,
- QMI_WDS_CALL_END_REASON_GENERIC_NO_SERVICE = 3,
- QMI_WDS_CALL_END_REASON_GENERIC_FADE = 4,
- QMI_WDS_CALL_END_REASON_GENERIC_RELEASE_NORMAL = 5,
- QMI_WDS_CALL_END_REASON_GENERIC_ACCESS_ATTEMPT_IN_PROGRESS = 6,
- QMI_WDS_CALL_END_REASON_GENERIC_ACCESS_FAILURE = 7,
- QMI_WDS_CALL_END_REASON_GENERIC_REDIRECTION_OR_HANDOFF = 8,
- QMI_WDS_CALL_END_REASON_GENERIC_CLOSE_IN_PROGRESS = 9,
- QMI_WDS_CALL_END_REASON_GENERIC_AUTHENTICATION_FAILED = 10,
- QMI_WDS_CALL_END_REASON_GENERIC_INTERNAL_ERROR = 11,
-
- /* CDMA specific reasons */
- QMI_WDS_CALL_END_REASON_CDMA_LOCK = 500,
- QMI_WDS_CALL_END_REASON_CDMA_INTERCEPT = 501,
- QMI_WDS_CALL_END_REASON_CDMA_REORDER = 502,
- QMI_WDS_CALL_END_REASON_CDMA_RELEASE_SO_REJECT = 503,
- QMI_WDS_CALL_END_REASON_CDMA_INCOMING_CALL = 504,
- QMI_WDS_CALL_END_REASON_CDMA_ALERT_STOP = 505,
- QMI_WDS_CALL_END_REASON_CDMA_ACTIVATION = 506,
- QMI_WDS_CALL_END_REASON_CDMA_MAX_ACCESS_PROBES = 507,
- QMI_WDS_CALL_END_REASON_CDMA_CCS_NOT_SUPPORTED_BY_BS = 508,
- QMI_WDS_CALL_END_REASON_CDMA_NO_RESPONSE_FROM_BS = 509,
- QMI_WDS_CALL_END_REASON_CDMA_REJECTED_BY_BS = 510,
- QMI_WDS_CALL_END_REASON_CDMA_INCOMPATIBLE = 511,
- QMI_WDS_CALL_END_REASON_CDMA_ALREADY_IN_TC = 512,
- QMI_WDS_CALL_END_REASON_CDMA_USER_CALL_ORIGINATED_DURING_GPS = 513,
- QMI_WDS_CALL_END_REASON_CDMA_USER_CALL_ORIGINATED_DURING_SMS = 514,
- QMI_WDS_CALL_END_REASON_CDMA_NO_SERVICE = 515,
-
- /* GSM/WCDMA specific reasons */
- QMI_WDS_CALL_END_REASON_GSM_WCDMA_CONFERENCE_FAILED = 1000,
- QMI_WDS_CALL_END_REASON_GSM_WCDMA_INCOMING_REJECTED = 1001,
- QMI_WDS_CALL_END_REASON_GSM_WCDMA_NO_SERVICE = 1002,
- QMI_WDS_CALL_END_REASON_GSM_WCDMA_NETWORK_END = 1003,
- QMI_WDS_CALL_END_REASON_GSM_WCDMA_LLC_SNDCP_FAILURE = 1004,
- QMI_WDS_CALL_END_REASON_GSM_WCDMA_INSUFFICIENT_RESOURCES = 1005,
- QMI_WDS_CALL_END_REASON_GSM_WCDMA_OPTION_TEMPORARILY_OUT_OF_ORDER = 1006,
- QMI_WDS_CALL_END_REASON_GSM_WCDMA_NSAPI_ALREADY_USED = 1007,
- QMI_WDS_CALL_END_REASON_GSM_WCDMA_REGULAR_DEACTIVATION = 1008,
- QMI_WDS_CALL_END_REASON_GSM_WCDMA_NETWORK_FAILURE = 1009,
- QMI_WDS_CALL_END_REASON_GSM_WCDMA_REATTACH_REQUIRED = 1010,
- QMI_WDS_CALL_END_REASON_GSM_WCDMA_PROTOCOL_ERROR = 1011,
- QMI_WDS_CALL_END_REASON_GSM_WCDMA_OPERATOR_DETERMINED_BARRING = 1012,
- QMI_WDS_CALL_END_REASON_GSM_WCDMA_UNKNOWN_APN = 1013,
- QMI_WDS_CALL_END_REASON_GSM_WCDMA_UNKNOWN_PDP = 1014,
- QMI_WDS_CALL_END_REASON_GSM_WCDMA_GGSN_REJECT = 1015,
- QMI_WDS_CALL_END_REASON_GSM_WCDMA_ACTIVATION_REJECT = 1016,
- QMI_WDS_CALL_END_REASON_GSM_WCDMA_OPTION_NOT_SUPPORTED = 1017,
- QMI_WDS_CALL_END_REASON_GSM_WCDMA_OPTION_UNSUBSCRIBED = 1018,
- QMI_WDS_CALL_END_REASON_GSM_WCDMA_QOS_NOT_ACCEPTED = 1019,
- QMI_WDS_CALL_END_REASON_GSM_WCDMA_TFT_SEMANTIC_ERROR = 1020,
- QMI_WDS_CALL_END_REASON_GSM_WCDMA_TFT_SYNTAX_ERROR = 1021,
- QMI_WDS_CALL_END_REASON_GSM_WCDMA_UNKNOWN_PDP_CONTEXT = 1022,
- QMI_WDS_CALL_END_REASON_GSM_WCDMA_FILTER_SEMANTIC_ERROR = 1023,
- QMI_WDS_CALL_END_REASON_GSM_WCDMA_FILTER_SYNTAX_ERROR = 1024,
- QMI_WDS_CALL_END_REASON_GSM_WCDMA_PDP_WITHOUT_ACTIVE_TFT = 1025,
- QMI_WDS_CALL_END_REASON_GSM_WCDMA_INVALID_TRANSACTION_ID = 1026,
- QMI_WDS_CALL_END_REASON_GSM_WCDMA_MESSAGE_INCORRECT_SEMANTIC = 1027,
- QMI_WDS_CALL_END_REASON_GSM_WCDMA_INVALID_MANDATORY_INFO = 1028,
- QMI_WDS_CALL_END_REASON_GSM_WCDMA_MESSAGE_TYPE_UNSUPPORTED = 1029,
- QMI_WDS_CALL_END_REASON_GSM_WCDMA_MESSAGE_TYPE_NONCOMPATIBLE_STATE = 1030,
- QMI_WDS_CALL_END_REASON_GSM_WCDMA_UNKNOWN_INFO_ELEMENT = 1031,
- QMI_WDS_CALL_END_REASON_GSM_WCDMA_CONDITIONAL_IE_ERROR = 1032,
- QMI_WDS_CALL_END_REASON_GSM_WCDMA_MESSAGE_AND_PROTOCOL_STATE_UNCOMPATIBLE = 1033,
- QMI_WDS_CALL_END_REASON_GSM_WCDMA_APN_TYPE_CONFLICT = 1034,
- QMI_WDS_CALL_END_REASON_GSM_WCDMA_NO_GPRS_CONTEXT = 1035,
- QMI_WDS_CALL_END_REASON_GSM_WCDMA_FEATURE_NOT_SUPPORTED = 1036,
-
- /* EVDO specific reasons */
- QMI_WDS_CALL_END_REASON_EVDO_CONNECTION_DENY_GENERAL_OR_BUSY = 1500,
- QMI_WDS_CALL_END_REASON_EVDO_CONNECTION_DENY_BILLING_OR_AUTHENTICATION_FAILURE = 1501,
- QMI_WDS_CALL_END_REASON_EVDO_HDR_CHANGE = 1502,
- QMI_WDS_CALL_END_REASON_EVDO_HDR_EXIT = 1503,
- QMI_WDS_CALL_END_REASON_EVDO_HDR_NO_SESSION = 1504,
- QMI_WDS_CALL_END_REASON_EVDO_HDR_ORIGINATION_DURING_GPS_FIX = 1505,
- QMI_WDS_CALL_END_REASON_EVDO_HDR_CONNECTION_SETUP_TIMEOUT = 1506,
- QMI_WDS_CALL_END_REASON_EVDO_HDR_RELEASED_BY_CM = 1507
-} QmiWdsCallEndReason;
-
-/**
- * QmiWdsVerboseCallEndReasonType:
- * @QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_MIP: Mobile IP.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_INTERNAL: Internal.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_CM: Call manager.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_3GPP: 3GPP.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_PPP: PPP.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_EHRPD: eHRPD.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_IPV6: IPv6.
- *
- * Type of verbose call end reason.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_MIP = 1,
- QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_INTERNAL = 2,
- QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_CM = 3,
- QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_3GPP = 6,
- QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_PPP = 7,
- QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_EHRPD = 8,
- QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_IPV6 = 9
-} QmiWdsVerboseCallEndReasonType;
-
-/**
- * QmiWdsVerboseCallEndReasonMip:
- * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_ERROR_REASON_UNKNOWN: Unknown reason.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_REASON_UNSPECIFIED: FA error. Reason unspecified.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_ADMINISTRATIVELY_PROHIBITED: FA error. Administratively prohibited.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_INSUFFICIENT_RESOURCES: FA error. Insufficient resources.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_MOBILE_NODE_AUTHENTICATION_FAILURE: FA error. Mobile node authenticatin failure.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_HA_AUTHENTICATION_FAILURE: FA error. HA authentication failure.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_REQUESTED_LIFETIME_TOO_LONG: FA error. Requested lifetime too long.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_MALFORMED_REQUEST: FA error. Malformed request.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_MALFORMED_REPLY: FA error. Malformed reply.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_ENCAPSULATION_UNAVAILABLE: FA error. Encapsulation unavailable.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_VJHC_UNAVAILABLE: FA error. VJHC unavailable.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_REVERSE_TUNNEL_UNAVAILABLE: FA error. Reverse tunnel unavailable.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_REVERSE_TUNNEL_MANDATORY_AND_T_BIT_NOT_SET: FA error. Reverse tunnel mandatory and T bit not set.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_DELIVERY_STYLE_NOT_SUPPORTED: FA error. Delivery style not supported.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_MISSING_NAI: FA error. Missing NAI.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_MISSING_HA: FA error. Missing HA.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_MISSING_HOME_ADDRESS: FA error. Missing home address.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_UNKNOWN_CHALLENGE: FA error. Unknown challenge.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_MISSING_CHALLENGE: FA error. Missing challenge.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_STALE_CHALLENGE: FA error. Stale challenge.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_REASON_UNSPECIFIED: HA error. Reason unspecified.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_ADMINISTRATIVELY_PROHIBITED: HA error. Administratively prohibited.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_INSUFFICIENT_RESOURCES: HA error. Insufficient resources.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_MOBILE_NODE_AUTHENTICATION_FAILURE: HA error. Mobile node authentication failure.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_FA_AUTHENTICATION_FAILURE: HA error. FA authentication failure.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_REGISTRATION_ID_MISMATCH: HA error. Registration ID mismatch.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_MALFORMED_REQUEST: HA error. Malformed request.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_UNKNOWN_HA_ADDRESS: HA error. Unknown HA address.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_REVERSE_TUNNEL_UNAVAILABLE: HA error. Reverse tunnel unavailable.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_REVERSE_TUNNEL_MANDATORY_AND_T_BIT_NOT_SET: HA error. Reverse tunnel mandatory and T bit not set.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_ENCAPSULATION_UNAVAILABLE: HA error. Encapsulation unavailable.
- *
- * Mobile IP specific call end reasons, given when the @QmiWdsVerboseCallEndReasonType is #QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_MIP.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_WDS_VERBOSE_CALL_END_REASON_MIP_ERROR_REASON_UNKNOWN = -1,
-
- QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_REASON_UNSPECIFIED = 64,
- QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_ADMINISTRATIVELY_PROHIBITED = 65,
- QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_INSUFFICIENT_RESOURCES = 66,
- QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_MOBILE_NODE_AUTHENTICATION_FAILURE = 67,
- QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_HA_AUTHENTICATION_FAILURE = 68,
- QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_REQUESTED_LIFETIME_TOO_LONG = 69,
- QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_MALFORMED_REQUEST = 70,
- QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_MALFORMED_REPLY = 71,
- QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_ENCAPSULATION_UNAVAILABLE = 72,
- QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_VJHC_UNAVAILABLE = 73,
- QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_REVERSE_TUNNEL_UNAVAILABLE = 74,
- QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_REVERSE_TUNNEL_MANDATORY_AND_T_BIT_NOT_SET = 75,
- QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_DELIVERY_STYLE_NOT_SUPPORTED = 79,
-
- QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_MISSING_NAI = 97,
- QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_MISSING_HA = 98,
- QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_MISSING_HOME_ADDRESS = 99,
-
- QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_UNKNOWN_CHALLENGE = 104,
- QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_MISSING_CHALLENGE = 105,
- QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_STALE_CHALLENGE = 106,
-
- QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_REASON_UNSPECIFIED = 128,
- QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_ADMINISTRATIVELY_PROHIBITED = 129,
- QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_INSUFFICIENT_RESOURCES = 130,
- QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_MOBILE_NODE_AUTHENTICATION_FAILURE = 131,
- QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_FA_AUTHENTICATION_FAILURE = 132,
- QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_REGISTRATION_ID_MISMATCH = 133,
- QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_MALFORMED_REQUEST = 134,
- QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_UNKNOWN_HA_ADDRESS = 136,
- QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_REVERSE_TUNNEL_UNAVAILABLE = 137,
- QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_REVERSE_TUNNEL_MANDATORY_AND_T_BIT_NOT_SET = 138,
- QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_ENCAPSULATION_UNAVAILABLE = 139
-} QmiWdsVerboseCallEndReasonMip;
-
-/**
- * QmiWdsVerboseCallEndReasonInternal:
- * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_ERROR: Internal error.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_CALL_ENDED: Call ended.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_UNKNOWN_INTERNAL_CAUSE: Unknown internal cause.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_UNKNOWN_CAUSE: Unknown cause.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_CLOSE_IN_PROGRESS: Close in progress.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_NETWORK_INITIATED_TERMINATION: Network initiated termination.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_APP_PREEMPTED: App preempted.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_PDN_IPV4_CALL_DISALLOWED: PDN IPv4 call disallowed. Since: 1.14.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_PDN_IPV4_CALL_THROTTLED: PDN IPv4 call throttled. Since: 1.14.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_PDN_IPV6_CALL_DISALLOWED: PDN IPv6 call disallowed. Since: 1.14.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_PDN_IPV6_CALL_THROTTLED: PDN IPv6 call throttled. Since: 1.14.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_MODEM_RESTART: Modem restart. Since: 1.14.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_PDP_PPP_NOT_SUPPORTED: PDP PPP not supported. Since: 1.14.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_UNPREFERRED_RAT: Unpreferred RAT. Since: 1.14.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_PHYSICAL_LINK_CLOSE_IN_PROGRESS: Physical link close in progress. Since: 1.14.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_APN_PENDING_HANDOVER: APN pending handover. Since: 1.14.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_PROFILE_BEARER_INCOMPATIBLE: Profile bearer incompatible. Since: 1.14.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_MMGDSI_CARD_EVENT: MMGDSI Card event. Since: 1.14.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_LPM_OR_POWER_DOWN: LPM or power down. Since: 1.14.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_APN_DISABLED: APN disabled. Since: 1.14.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_MPIT_EXPIRED: MPIT expired. Since: 1.14.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_IPV6_ADDRESS_TRANSFER_FAILED: IPv6 address transfer failed. Since: 1.14.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_TRAT_SWAP_FAILED: TRAT swap failed. Since: 1.14.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_EHRPD_TO_HRPD_FALLBACK: eHRPD to HRPD fallback. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_MANDATORY_APN_DISABLED: Mandatory APN disabled. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_MIP_CONFIG_FAILURE: MIP config failure. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_PDN_INACTIVITY_TIMER_EXPIRED: PDN inactivity timeout expired. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_MAX_V4_CONNECTIONS: Max IPv4 connections. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_MAX_V6_CONNECTIONS: Max IPv6 connections. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_APN_MISMATCH: APN mismatch. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_IP_VERSION_MISMATCH: IP version mismatch. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_DUN_CALL_DISALLOWED: DUN call disallowed. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_INVALID_PROFILE: Invalid profile. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_EPC_NONEPC_TRANSITION: EPC to non-EPC transition. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_INVALID_PROFILE_ID: Invalid profile ID. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_CALL_ALREADY_PRESENT: Call already present. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_INTERFACE_IN_USE: Interface in use. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_IP_PDP_MISMATCH: IP PDP mismatch. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_APN_DISALLOWED_ON_ROAMING: APN disallowed on roaming. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_APN_PARAMETER_CHANGE: APN parameter change. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_INTERFACE_IN_USE_CONFIG_MATCH: Interface in use config match. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_NULL_APN_DISALLOWED: NULL APN disallowed. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_THERMAL_MITIGATION: Thermal mitigation. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_SUBS_ID_MISMATCH: Subs ID mismatch Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_DATA_SETTINGS_DISABLED: Data settings disabled. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_DATA_ROAMING_SETTINGS_DISABLED: Data roaming settings disabled. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_APN_FORMAT_INVALID: APN format invalid. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_DDS_CALL_ABORT: DDS call abort. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_VALIDATION_FAILURE: Validation failure. Since 1.24.10.
- *
- * Internal call end reasons, given when the @QmiWdsVerboseCallEndReasonType is #QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_INTERNAL.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_ERROR = 201,
- QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_CALL_ENDED = 202,
- QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_UNKNOWN_INTERNAL_CAUSE = 203,
- QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_UNKNOWN_CAUSE = 204,
- QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_CLOSE_IN_PROGRESS = 205,
- QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_NETWORK_INITIATED_TERMINATION = 206,
- QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_APP_PREEMPTED = 207,
- QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_PDN_IPV4_CALL_DISALLOWED = 208,
- QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_PDN_IPV4_CALL_THROTTLED = 209,
- QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_PDN_IPV6_CALL_DISALLOWED = 210,
- QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_PDN_IPV6_CALL_THROTTLED = 211,
- QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_MODEM_RESTART = 212,
- QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_PDP_PPP_NOT_SUPPORTED = 213,
- QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_UNPREFERRED_RAT = 214,
- QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_PHYSICAL_LINK_CLOSE_IN_PROGRESS = 215,
- QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_APN_PENDING_HANDOVER = 216,
- QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_PROFILE_BEARER_INCOMPATIBLE = 217,
- QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_MMGDSI_CARD_EVENT = 218,
- QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_LPM_OR_POWER_DOWN = 219,
- QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_APN_DISABLED = 220,
- QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_MPIT_EXPIRED = 221,
- QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_IPV6_ADDRESS_TRANSFER_FAILED = 222,
- QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_TRAT_SWAP_FAILED = 223,
- QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_EHRPD_TO_HRPD_FALLBACK = 224,
- QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_MANDATORY_APN_DISABLED = 225,
- QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_MIP_CONFIG_FAILURE = 226,
- QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_PDN_INACTIVITY_TIMER_EXPIRED = 227,
- QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_MAX_V4_CONNECTIONS = 228,
- QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_MAX_V6_CONNECTIONS = 229,
- QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_APN_MISMATCH = 230,
- QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_IP_VERSION_MISMATCH = 231,
- QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_DUN_CALL_DISALLOWED = 232,
- QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_INVALID_PROFILE = 233,
- QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_EPC_NONEPC_TRANSITION = 234,
- QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_INVALID_PROFILE_ID = 235,
- QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_CALL_ALREADY_PRESENT = 236,
- QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_INTERFACE_IN_USE = 237,
- QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_IP_PDP_MISMATCH = 238,
- QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_APN_DISALLOWED_ON_ROAMING = 239,
- QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_APN_PARAMETER_CHANGE = 240,
- QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_INTERFACE_IN_USE_CONFIG_MATCH = 241,
- QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_NULL_APN_DISALLOWED = 242,
- QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_THERMAL_MITIGATION = 243,
- QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_SUBS_ID_MISMATCH = 244,
- QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_DATA_SETTINGS_DISABLED = 245,
- QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_DATA_ROAMING_SETTINGS_DISABLED = 246,
- QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_APN_FORMAT_INVALID = 247,
- QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_DDS_CALL_ABORT = 248,
- QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_VALIDATION_FAILURE = 249,
-} QmiWdsVerboseCallEndReasonInternal;
-
-/**
- * QmiWdsVerboseCallEndReasonCm:
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_CDMA_LOCK: CDMA specific. Phone is CDMA-locked.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_INTERCEPT: CDMA specific. Received intercept from the BS.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_REORDER: CDMA specific. Received reorder from the BS.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_RELEASE_SO_REJECT: CDMA specific. Received release from the BS, SO reject.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_INCOMING_CALL: CDMA specific. Received incoming call from the BS.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ALERT_STOP: CDMA specific. Received alert stop from the BS.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ACTIVATION: CDMA specific. Received end activation.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_MAX_ACCESS_PROBES: CDMA specific. Maximum access probes transmitted.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_CCS_NOT_SUPPORTED_BY_BS: CDMA specific. Concurrent service not supported by the BS.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_NO_RESPONSE_FROM_BS: CDMA specific. No response received from the BS.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_REJECTED_BY_BS: CDMA specific. Rejected by the BS.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_INCOMPATIBLE: CDMA specific. Concurrent services requested are incompatible.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ALREADY_IN_TC: CDMA specific. Already in TC.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_USER_CALL_ORIGINATED_DURING_GPS: CDMA specific. Call originated during GPS.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_USER_CALL_ORIGINATED_DURING_SMS: CDMA specific. Call originated during SMS.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_NO_CDMA_SERVICE: CDMA specific. No service.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_MC_ABORT: MC abort. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_PSIST_NG: Persistence test failure. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_UIM_NOT_PRESENT: UIM not present. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_RETRY_ORDER: Retry order.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ACCESS_BLOCK: Access blocked. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ACCESS_BLOCK_ALL: Access blocked for all. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_IS707B_MAX_ACCESS_PROBES: Maximum access probes for IS-707B call. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_THERMAL_EMERGENCY: Thermal emergency. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_CALL_ORIGINATION_THROTTLED: Call origination throttled. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_USER_CALL_ORIGINATED: Voice call originated and concurrent voice/data not supported. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_CONFERENCE_FAILED: Conference failed. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_INCOMING_REJECTED: Incoming rejected.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_NO_GATEWAY_SERVICE: No gateway service.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_NO_GPRS_CONTEXT: No GPRS context.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ILLEGAL_MS: Illegal MS.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ILLEGAL_ME: Illegal ME.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_GPRS_AND_NON_GPRS_SERVICES_NOT_ALLOWED: GPRS and non GPRS services not allowed.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_GPRS_SERVICES_NOT_ALLOWED: GPRS services not allowed.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_MS_IDENTITY_NOT_DERIVED_BY_THE_NETWORK: MS identity not derived by the network.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_IMPLICITLY_DETACHED: Implicitly detached.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_PLMN_NOT_ALLOWED: PLMN not allowed.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LA_NOT_ALLOWED: LA not allowed.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_GPRS_SERVICES_NOT_ALLOWED_IN_PLMN: GPRS services not allowed in PLMN.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_PDP_DUPLICATE: PDP duplicate.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_UE_RAT_CHANGE: UE radio access technology change.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_CONGESTION: Congestion.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_NO_PDP_CONTEXT_ACTIVATED: No PDP context activated.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ACCESS_CLASS_DSAC_REJECTION: Access class DSAC rejection.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_PDP_ACTIVATE_MAX_RETRY_FAILED: Maximum retries failed to activate PDP context. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_RAB_FAILURE: RAB failure. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_EPS_SERVICE_NOT_ALLOWED: EPS service not allowed. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_TRACKING_AREA_NOT_ALLOWED: Tracking area not allowed. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ROAMING_NOT_ALLOWED_IN_TRACKING_AREA: Roaming not allowed in tracking area. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_NO_SUITABLE_CELLS_IN_TRACKING_AREA: No suitable cells in tracking area. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_NOT_AUTHORIZED_CLOSED_SUBSCRIBER_GROUP: Not authorized in closed subscriber group. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_UNKNOWN_EPS_BEARER_CONTEXT: EPS Session Management, unknown EPS bearer context. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_DRB_RELEASED_AT_RRC: DRB released at RRC. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_NAS_SIGNAL_CONNECTION_RELEASED: NAS signal connection released. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_EMM_DETACHED: EPS Mobility Management, detached. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_EMM_ATTACH_FAILED: EPS Mobility Management, attach failed. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_EMM_ATTACH_STARTED: EPS Mobility Management, attach started. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LTE_NAS_SERVICE_REQUEST_FAILED: LTE NAS service request failed. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_ACTIVE_DEDICATED_BEARER_REACTIVATED_BY_NW: EPS Session Management, active dedicated bearer reactivated by network. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_LOWER_LAYER_FAILURE: EPS Session Management, lower layer failure. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_SYNC_UP_WITH_NW: EPS Session Management, sync up with network. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_NW_ACTIVATED_DEDICATED_BEARER_WITH_ID_OF_DEFAULT_BEARER: EPS Session Management, network activated dedicated bearer with id of default bearer. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_BAD_OTA_MESSAGE: EPS Session Management, bad OTA message. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_DS_REJECTED_CALL: EPS Session Management, DS rejected call. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_CONTEXT_TRANSFERRED_DUE_TO_IRAT: EPS Session Management, context transferred due to IRAT. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_DS_EXPLICIT_DEACT: DS explicit deactivation. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_LOCAL_CAUSE_NONE: EPS Session Management, local cause none. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LTE_NAS_SERVICE_REQUEST_FAILED_NO_THROTTLE: LTE NAS service request failed, no throttle. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ACL_FAILURE: ACL failure. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LTE_NAS_SERVICE_REQUEST_FAILED_DS_DISALLOW: LTE NAS service request failed, DS disallow. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_EMM_T3417_EXPIRED: EPS Mobility Management, T3417 expired. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_EMM_T3417_EXT_EXPIRED: EPS Mobility Management, T3417 ext expired. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_UL_DATA_CONFIRMATION_FAILURE_TXN: LTE Radio Resource Control, UL data confirmation failure, txn. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_UL_DATA_CONFIRMATION_FAILURE_HANDOVER: LTE Radio Resource Control, UL data confirmation failure, handover. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_UL_DATA_CONFIRMATION_FAILURE_CONN_REL: LTE Radio Resource Control, UL data confirmation failure, connection release. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_UL_DATA_CONFIRMATION_FAILURE_RLF: LTE Radio Resource Control, UL data confirmation failure, radio link failure. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_UL_DATA_CONFIRMATION_FAILURE_CTRL_NOT_CONN: LTE Radio Resource Control, UL data confirmation failure, ctrl not conn. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE: LTE Radio Resource Control, connection establishment failure. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_ABORTED: LTE Radio Resource Control, connection establishment failure, aborted. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_ACCESS_BARRED: LTE Radio Resource Control, connection establishment failure, access barred. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_CELL_RESELECTION: LTE Radio Resource Control, connection establishment failure, cell reselection. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_CONFIG_FAILURE: LTE Radio Resource Control, connection establishment failure, config failure. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_TIMER_EXPIRED: LTE Radio Resource Control, connection establishment failure, timer expired. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_LINK_FAILURE: LTE Radio Resource Control, connection establishment failure, link failure. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_NOT_CAMPED: LTE Radio Resource Control, connection establishment failure, not camped. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_SI_FAILURE: LTE Radio Resource Control, connection establishment failure, SI failure. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_REJECTED: LTE Radio Resource Control, connection establishment failure, rejected. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_RELEASE_NORMAL: LTE Radio Resource Control, connection release, normal. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_RELEASE_RLF: LTE Radio Resource Control, connection release, radio link failure. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_RELEASE_CRE_FAILURE: LTE Radio Resource Control, connection release, cre failure. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_RELEASE_OOS_DURING_CRE: LTE Radio Resource Control, connection release, oos during cre. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_RELEASE_ABORTED: LTE Radio Resource Control, connection release, aborted. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_RELEASE_SIB_READ_ERROR: LTE Radio Resource Control, connection release, SIB read error. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_DETACH_WITH_REATTACH_LTE_NW_DETACH: Detach with reattach LTE network detach. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_DETACH_WITHOUT_REATTACH_LTE_NW_DETACH: Detach without reattach LTE network detach. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_PROC_TIMEOUT: EPS Session Management, proc timeout. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_MESSAGE_EXCEED_MAX_L2_LIMIT: Message exceed max L2 limit. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_CONNECTION_DENY_GENERAL_OR_BUSY: CDMA/EVDO specific. Received Connection Deny. General or Network busy.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_CONNECTION_DENY_BILLING_OR_AUTHENTICATION_FAILURE: CDMA/EVDO specific. Received Connection Deny. Billing or Authentication failure.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_CHANGE: CDMA/EVDO specific. Change HDR.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_EXIT: CDMA/EVDO specific. Exit HDR.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_NO_SESSION: CDMA/EVDO specific. No HDR session.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_ORIGINATION_DURING_GPS_FIX: CDMA/EVDO specific. HDR call ended in favor of a GPS fix.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_CONNECTION_SETUP_TIMEOUT: CDMA/EVDO specific. Connection setup timeout.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_RELEASED_BY_CM: CDMA/EVDO specific. Released HDR call by call manager.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_COLLOCATED_ACQUISITION_FAILED: Failed to acquire co-located HDR for origination. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_OTASP_COMMIT_IN_PROGRESS: CDMA/EVDO specific. OTASP commit in progress. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_NO_HYBRID_SERVICE: CDMA/EVDO specific. No hybrid HDR service.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_NO_LOCK_GRANTED: CDMA/EVDO specific. No lock granted. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_HOLD_OTHER_IN_PROGRESS: CDMA/EVDO specific. hold other in progress. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_FADE: CDMA/EVDO specific. Fade. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_ACCESS_FAILURE: CDMA/EVDO specific. Access failure. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_CLIENT_END: Client end.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_NO_SERVICE: No service.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_FADE: Fade.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_RELEASE_NORMAL: Release normal.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ACCESS_ATTEMPT_IN_PROGRESS: Access attempt in progress.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ACCESS_FAILURE: Access Failure.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_REDIRECTION_OR_HANDOFF: Redirection or handoff.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_OFFLINE: Offline. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_EMERGENCY_MODE: Emergency mode. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_PHONE_IN_USE: Phone in use. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_INVALID_MODE: Invalid mode. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_INVALID_SIM_STATE: Invalid SIM state. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_NO_COLLOCATED_HDR: No collocated HDR. Since 1.24.10.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_CALL_CONTROL_REJECTED: Call control rejected. Since 1.24.10.
- *
- * Call manager specific call end reasons, given when the @QmiWdsVerboseCallEndReasonType is #QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_CM.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_CDMA_LOCK = 500,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_INTERCEPT = 501,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_REORDER = 502,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_RELEASE_SO_REJECT = 503,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_INCOMING_CALL = 504,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_ALERT_STOP = 505,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_ACTIVATION = 506,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_MAX_ACCESS_PROBES = 507,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_CCS_NOT_SUPPORTED_BY_BS = 508,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_NO_RESPONSE_FROM_BS = 509,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_REJECTED_BY_BS = 510,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_INCOMPATIBLE = 511,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_ALREADY_IN_TC = 512,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_USER_CALL_ORIGINATED_DURING_GPS = 513,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_USER_CALL_ORIGINATED_DURING_SMS = 514,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_NO_CDMA_SERVICE = 515,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_MC_ABORT = 516,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_PSIST_NG = 517,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_UIM_NOT_PRESENT = 518,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_RETRY_ORDER = 519,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_ACCESS_BLOCK = 520,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_ACCESS_BLOCK_ALL = 521,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_IS707B_MAX_ACCESS_PROBES = 522,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_THERMAL_EMERGENCY = 523,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_CALL_ORIGINATION_THROTTLED = 524,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_USER_CALL_ORIGINATED = 525,
-
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_CONFERENCE_FAILED = 1000,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_INCOMING_REJECTED = 1001,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_NO_GATEWAY_SERVICE = 1002,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_NO_GPRS_CONTEXT = 1003,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_ILLEGAL_MS = 1004,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_ILLEGAL_ME = 1005,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_GPRS_AND_NON_GPRS_SERVICES_NOT_ALLOWED = 1006,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_GPRS_SERVICES_NOT_ALLOWED = 1007,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_MS_IDENTITY_NOT_DERIVED_BY_THE_NETWORK = 1008,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_IMPLICITLY_DETACHED = 1009,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_PLMN_NOT_ALLOWED = 1010,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_LA_NOT_ALLOWED = 1011,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_GPRS_SERVICES_NOT_ALLOWED_IN_PLMN = 1012,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_PDP_DUPLICATE = 1013,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_UE_RAT_CHANGE = 1014,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_CONGESTION = 1015,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_NO_PDP_CONTEXT_ACTIVATED = 1016,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_ACCESS_CLASS_DSAC_REJECTION = 1017,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_PDP_ACTIVATE_MAX_RETRY_FAILED = 1018,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_RAB_FAILURE = 1019,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_EPS_SERVICE_NOT_ALLOWED = 1020,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_TRACKING_AREA_NOT_ALLOWED = 1021,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_ROAMING_NOT_ALLOWED_IN_TRACKING_AREA = 1022,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_NO_SUITABLE_CELLS_IN_TRACKING_AREA = 1023,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_NOT_AUTHORIZED_CLOSED_SUBSCRIBER_GROUP = 1024,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_UNKNOWN_EPS_BEARER_CONTEXT = 1025,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_DRB_RELEASED_AT_RRC = 1026,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_NAS_SIGNAL_CONNECTION_RELEASED = 1027,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_EMM_DETACHED = 1028,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_EMM_ATTACH_FAILED = 1029,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_EMM_ATTACH_STARTED = 1030,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_LTE_NAS_SERVICE_REQUEST_FAILED = 1031,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_ACTIVE_DEDICATED_BEARER_REACTIVATED_BY_NW = 1032,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_LOWER_LAYER_FAILURE = 1033,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_SYNC_UP_WITH_NW = 1034,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_NW_ACTIVATED_DEDICATED_BEARER_WITH_ID_OF_DEFAULT_BEARER = 1035,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_BAD_OTA_MESSAGE = 1036,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_DS_REJECTED_CALL = 1037,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_CONTEXT_TRANSFERRED_DUE_TO_IRAT = 1038,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_DS_EXPLICIT_DEACT = 1039,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_LOCAL_CAUSE_NONE = 1040,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_LTE_NAS_SERVICE_REQUEST_FAILED_NO_THROTTLE = 1041,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_ACL_FAILURE = 1042,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_LTE_NAS_SERVICE_REQUEST_FAILED_DS_DISALLOW = 1043,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_EMM_T3417_EXPIRED = 1044,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_EMM_T3417_EXT_EXPIRED = 1045,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_UL_DATA_CONFIRMATION_FAILURE_TXN = 1046,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_UL_DATA_CONFIRMATION_FAILURE_HANDOVER = 1047,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_UL_DATA_CONFIRMATION_FAILURE_CONN_REL = 1048,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_UL_DATA_CONFIRMATION_FAILURE_RLF = 1049,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_UL_DATA_CONFIRMATION_FAILURE_CTRL_NOT_CONN = 1050,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE = 1051,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_ABORTED = 1052,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_ACCESS_BARRED = 1053,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_CELL_RESELECTION = 1054,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_CONFIG_FAILURE = 1055,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_TIMER_EXPIRED = 1056,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_LINK_FAILURE = 1057,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_NOT_CAMPED = 1058,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_SI_FAILURE = 1059,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_REJECTED = 1060,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_RELEASE_NORMAL = 1061,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_RELEASE_RLF = 1062,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_RELEASE_CRE_FAILURE = 1063,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_RELEASE_OOS_DURING_CRE = 1064,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_RELEASE_ABORTED = 1065,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_RELEASE_SIB_READ_ERROR = 1066,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_DETACH_WITH_REATTACH_LTE_NW_DETACH = 1067,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_DETACH_WITHOUT_REATTACH_LTE_NW_DETACH = 1068,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_PROC_TIMEOUT = 1069,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_MESSAGE_EXCEED_MAX_L2_LIMIT = 1070,
-
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_CONNECTION_DENY_GENERAL_OR_BUSY = 1500,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_CONNECTION_DENY_BILLING_OR_AUTHENTICATION_FAILURE = 1501,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_CHANGE = 1502,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_EXIT = 1503,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_NO_SESSION = 1504,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_ORIGINATION_DURING_GPS_FIX = 1505,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_CONNECTION_SETUP_TIMEOUT = 1506,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_RELEASED_BY_CM = 1507,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_COLLOCATED_ACQUISITION_FAILED = 1508,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_OTASP_COMMIT_IN_PROGRESS = 1509,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_NO_HYBRID_SERVICE = 1510,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_NO_LOCK_GRANTED = 1511,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_HOLD_OTHER_IN_PROGRESS = 1512,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_FADE = 1513,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_ACCESS_FAILURE = 1514,
-
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_CLIENT_END = 2000,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_NO_SERVICE = 2001,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_FADE = 2002,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_RELEASE_NORMAL = 2003,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_ACCESS_ATTEMPT_IN_PROGRESS = 2004,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_ACCESS_FAILURE = 2005,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_REDIRECTION_OR_HANDOFF = 2006,
-
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_OFFLINE = 2500,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_EMERGENCY_MODE = 2501,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_PHONE_IN_USE = 2502,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_INVALID_MODE = 2503,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_INVALID_SIM_STATE = 2504,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_NO_COLLOCATED_HDR = 2505,
- QMI_WDS_VERBOSE_CALL_END_REASON_CM_CALL_CONTROL_REJECTED = 2506,
-} QmiWdsVerboseCallEndReasonCm;
-
-/**
- * QmiWdsVerboseCallEndReason3gpp:
- * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_OPERATOR_DETERMINED_BARRING: Operator-determined barring.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_LLC_SNDCP_FAILURE: LLC or SNDCP failure.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_INSUFFICIENT_RESOURCES: Insufficient resources.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_UNKNOWN_APN: Unknown or missing APN.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_UNKNOWN_PDP: Unknown PDP address or type.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_AUTHENTICATION_FAILED: Authentication failed.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_GGSN_REJECT: Activation rejected by GGSN.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_ACTIVATION_REJECT: Activation rejected.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_OPTION_NOT_SUPPORTED: Service option not supported.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_OPTION_UNSUBSCRIBED: Service option not subscribed.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_OPTION_TEMPORARILY_OUT_OF_ORDER: Service option temporarily out of order.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_NSAPI_ALREADY_USED: NSAPI already used.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_REGULAR_DEACTIVATION: Regular PDP context deactivation.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_QOS_NOT_ACCEPTED: QoS not accepted.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_NETWORK_FAILURE: Network failure.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_REATTACH_REQUIRED: Reattach required.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_FEATURE_NOT_SUPPORTED: Feature not supported.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_TFT_SEMANTIC_ERROR: Semantic error in TFT operation.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_TFT_SYNTAX_ERROR: Syntax error in TFT operation.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_UNKNOWN_PDP_CONTEXT: Unknown PDP context.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_FILTER_SEMANTIC_ERROR: Semantic error in packet filters.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_FILTER_SYNTAX_ERROR: Syntax error in packet filters.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_PDP_WITHOUT_ACTIVE_TFT: PDP context without TFT activated.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_IPV4_ONLY_ALLOWED: IPv4 only allowed.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_IPV6_ONLY_ALLOWED: IPv6 only allowed.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_SINGLE_ADDRESS_BEARER_ONLY: Single address bearer only.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_ESM_INFO_NOT_RECEIVED: ESM information not received.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_PDN_CONNECTION_DOES_NOT_EXIST: PDN connection does not exist.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_MULTIPLE_CONNECTION_TO_SAME_PDN_NOT_ALLOWED: Multiple connection to same PDN not allowed.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_INVALID_TRANSACTION_ID: Invalid transaction ID.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_MESSAGE_INCORRECT_SEMANTIC: Message incorrect semantically.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_INVALID_MANDATORY_INFO: Invalid mandatory information.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_MESSAGE_TYPE_UNSUPPORTED: Message type not implemented.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_MESSAGE_TYPE_NONCOMPATIBLE_STATE: Message not compatible with state.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_UNKNOWN_INFO_ELEMENT: Information element unknown.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_CONDITIONAL_IE_ERROR: Conditional IE error.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_MESSAGE_AND_PROTOCOL_STATE_UNCOMPATIBLE: Message and protocol state uncompatible.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_PROTOCOL_ERROR: Protocol error.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_APN_TYPE_CONFLICT: APN type conflict.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_INVALID_PROXY_CALL_SESSION_CONTROL_FUNCTION_ADDRESS: Invalid proxy call session control function address. Since 1.24.10.
- *
- * 3GPP-specific call end reasons, given when the @QmiWdsVerboseCallEndReasonType is #QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_3GPP.
- *
- * Since: 1.0
- */
-typedef enum { /*< underscore_name=qmi_wds_verbose_call_end_reason_3gpp,since=1.0 >*/
- QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_OPERATOR_DETERMINED_BARRING = 8,
-
- QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_LLC_SNDCP_FAILURE = 25,
- QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_INSUFFICIENT_RESOURCES = 26,
- QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_UNKNOWN_APN = 27,
- QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_UNKNOWN_PDP = 28,
- QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_AUTHENTICATION_FAILED = 29,
- QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_GGSN_REJECT = 30,
- QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_ACTIVATION_REJECT = 31,
- QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_OPTION_NOT_SUPPORTED = 32,
- QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_OPTION_UNSUBSCRIBED = 33,
- QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_OPTION_TEMPORARILY_OUT_OF_ORDER = 34,
- QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_NSAPI_ALREADY_USED = 35,
- QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_REGULAR_DEACTIVATION = 36,
- QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_QOS_NOT_ACCEPTED = 37,
- QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_NETWORK_FAILURE = 38,
- QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_REATTACH_REQUIRED = 39,
- QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_FEATURE_NOT_SUPPORTED = 40,
- QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_TFT_SEMANTIC_ERROR = 41,
- QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_TFT_SYNTAX_ERROR = 42,
- QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_UNKNOWN_PDP_CONTEXT = 43,
- QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_FILTER_SEMANTIC_ERROR = 44,
- QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_FILTER_SYNTAX_ERROR = 45,
- QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_PDP_WITHOUT_ACTIVE_TFT = 46,
-
- QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_IPV4_ONLY_ALLOWED = 50,
- QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_IPV6_ONLY_ALLOWED = 51,
- QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_SINGLE_ADDRESS_BEARER_ONLY = 52,
- QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_ESM_INFO_NOT_RECEIVED = 53,
- QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_PDN_CONNECTION_DOES_NOT_EXIST = 54,
- QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_MULTIPLE_CONNECTION_TO_SAME_PDN_NOT_ALLOWED = 55,
-
- QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_INVALID_TRANSACTION_ID = 81,
-
- QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_MESSAGE_INCORRECT_SEMANTIC = 95,
- QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_INVALID_MANDATORY_INFO = 96,
- QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_MESSAGE_TYPE_UNSUPPORTED = 97,
- QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_MESSAGE_TYPE_NONCOMPATIBLE_STATE = 98,
- QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_UNKNOWN_INFO_ELEMENT = 99,
- QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_CONDITIONAL_IE_ERROR = 100,
- QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_MESSAGE_AND_PROTOCOL_STATE_UNCOMPATIBLE = 101,
-
- QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_PROTOCOL_ERROR = 111,
- QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_APN_TYPE_CONFLICT = 112,
- QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_INVALID_PROXY_CALL_SESSION_CONTROL_FUNCTION_ADDRESS = 113,
-} QmiWdsVerboseCallEndReason3gpp;
-
-/**
- * QmiWdsVerboseCallEndReasonPpp:
- * @QMI_WDS_VERBOSE_CALL_END_REASON_PPP_UNKNOWN: Unknown error.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_PPP_TIMEOUT: Timeout.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_PPP_AUTHENTICATION_FAILURE: Authentication failure.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_PPP_OPTION_MISMATCH: Option mismatch.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_PPP_PAP_FAILURE: PAP failure.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_PPP_CHAP_FAILURE: CHAP failure.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_PPP_CLOSE_IN_PROGRESS: Close in progress. Since 1.24.10.
- *
- * PPP-specific call end reasons, given when the @QmiWdsVerboseCallEndReasonType is #QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_PPP.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_WDS_VERBOSE_CALL_END_REASON_PPP_UNKNOWN = -1,
-
- QMI_WDS_VERBOSE_CALL_END_REASON_PPP_TIMEOUT = 1,
- QMI_WDS_VERBOSE_CALL_END_REASON_PPP_AUTHENTICATION_FAILURE = 2,
- QMI_WDS_VERBOSE_CALL_END_REASON_PPP_OPTION_MISMATCH = 3,
-
- QMI_WDS_VERBOSE_CALL_END_REASON_PPP_PAP_FAILURE = 31,
- QMI_WDS_VERBOSE_CALL_END_REASON_PPP_CHAP_FAILURE = 32,
- QMI_WDS_VERBOSE_CALL_END_REASON_PPP_CLOSE_IN_PROGRESS = 33,
-
-} QmiWdsVerboseCallEndReasonPpp;
-
-/**
- * QmiWdsVerboseCallEndReasonEhrpd:
- * @QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_SUBSCRIPTION_LIMITED_TO_IPV4: Subscription limited to IPv4.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_SUBSCRIPTION_LIMITED_TO_IPV6: Subscription limited to IPv6.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_TIMEOUT: VSNCP specific. timeout.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_FAILURE: VSNCP specific. failure.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_GENERAL_ERROR: VSNCP specific. 3GPP2 general error.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_UNAUTHENTICATED_APN: VSNCP specific. 3GPP2 unauthenticated APN.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_PDN_LIMIT_EXCEEDED: VSNCP specific. 3GPP2 PDN limit exceeded.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_NO_PDN_GATEWAY: VSNCP specific. 3GPP2 no PDN gateway.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_PDN_GATEWAY_UNREACHABLE: VSNCP specific. 3GPP2 PDN gateway unreachable.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_PDN_GATEWAY_REJECTED: VSNCP specific. 3GPP2 PDN gateway rejected.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_INSUFFICIENT_PARAMETERS: VSNCP specific. 3GPP2 insufficient parameters.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_RESOURCE_UNAVAILABLE: VSNCP specific. 3GPP2 resource unavailable.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_ADMINISTRATIVELY_PROHIBITED: VSNCP specific. 3GPP2 administratively prohibited.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_PDN_ID_IN_USE: VSNCP specific. 3GPP2 PDN ID in use.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_SUBSCRIPTION_LIMITATION: VSNCP specific. 3GPP2 subscription limitation.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_PDN_EXISTS_FOR_THIS_APN: VSNCP specific. 3GPP2 PDN exists for this APN.
- *
- * eHRPD-specific call end reasons, given when the @QmiWdsVerboseCallEndReasonType is #QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_EHRPD.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_SUBSCRIPTION_LIMITED_TO_IPV4 = 1,
- QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_SUBSCRIPTION_LIMITED_TO_IPV6 = 2,
-
- QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_TIMEOUT = 4,
- QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_FAILURE = 5,
- QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_GENERAL_ERROR = 6,
- QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_UNAUTHENTICATED_APN = 7,
- QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_PDN_LIMIT_EXCEEDED = 8,
- QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_NO_PDN_GATEWAY = 9,
- QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_PDN_GATEWAY_UNREACHABLE = 10,
- QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_PDN_GATEWAY_REJECTED = 11,
- QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_INSUFFICIENT_PARAMETERS = 12,
- QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_RESOURCE_UNAVAILABLE = 13,
- QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_ADMINISTRATIVELY_PROHIBITED = 14,
- QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_PDN_ID_IN_USE = 15,
- QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_SUBSCRIPTION_LIMITATION = 16,
- QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_PDN_EXISTS_FOR_THIS_APN = 17
-} QmiWdsVerboseCallEndReasonEhrpd;
-
-/**
- * QmiWdsVerboseCallEndReasonIpv6:
- * @QMI_WDS_VERBOSE_CALL_END_REASON_IPV6_PREFIX_UNAVAILABLE: Prefix unavailable.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_IPV6_HRPD_IPV6_DISABLED: HRDP IPv6 disabled.
- * @QMI_WDS_VERBOSE_CALL_END_REASON_IPV6_DISABLED: IPv6 disabled. Since 1.24.10.
- *
- * IPv6-specific call end reasons, given when the @QmiWdsVerboseCallEndReasonType is #QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_IPV6.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_WDS_VERBOSE_CALL_END_REASON_IPV6_PREFIX_UNAVAILABLE = 1,
- QMI_WDS_VERBOSE_CALL_END_REASON_IPV6_HRPD_IPV6_DISABLED = 2,
- QMI_WDS_VERBOSE_CALL_END_REASON_IPV6_DISABLED = 3,
-} QmiWdsVerboseCallEndReasonIpv6;
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI WDS Get Packet Service Status' message */
-
-/**
- * QmiWdsConnectionStatus:
- * @QMI_WDS_CONNECTION_STATUS_UNKNOWN: Unknown status.
- * @QMI_WDS_CONNECTION_STATUS_DISCONNECTED: Network is disconnected
- * @QMI_WDS_CONNECTION_STATUS_CONNECTED: Network is connected.
- * @QMI_WDS_CONNECTION_STATUS_SUSPENDED: Network connection is suspended.
- * @QMI_WDS_CONNECTION_STATUS_AUTHENTICATING: Network authentication is ongoing.
- *
- * Status of the network connection.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_WDS_CONNECTION_STATUS_UNKNOWN = 0,
- QMI_WDS_CONNECTION_STATUS_DISCONNECTED = 1,
- QMI_WDS_CONNECTION_STATUS_CONNECTED = 2,
- QMI_WDS_CONNECTION_STATUS_SUSPENDED = 3,
- QMI_WDS_CONNECTION_STATUS_AUTHENTICATING = 4
-} QmiWdsConnectionStatus;
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI WDS Get Data Bearer Technology' message */
-
-/**
- * QmiWdsDataBearerTechnology:
- * @QMI_WDS_DATA_BEARER_TECHNOLOGY_UNKNOWN: Unknown.
- * @QMI_WDS_DATA_BEARER_TECHNOLOGY_CDMA20001X: CDMA2000 1x.
- * @QMI_WDS_DATA_BEARER_TECHNOLOGY_1xEVDO: CDMA2000 HRPD 1xEVDO.
- * @QMI_WDS_DATA_BEARER_TECHNOLOGY_GSM: GSM.
- * @QMI_WDS_DATA_BEARER_TECHNOLOGY_UMTS: UMTS.
- * @QMI_WDS_DATA_BEARER_TECHNOLOGY_1xEVDO_REVA: CDMA2000 HRPD 1xEVDO RevA.
- * @QMI_WDS_DATA_BEARER_TECHNOLOGY_EDGE: EDGE.
- * @QMI_WDS_DATA_BEARER_TECHNOLOGY_HSDPA: HSDPA and WCDMA.
- * @QMI_WDS_DATA_BEARER_TECHNOLOGY_HSUPA: WCDMA and HSUPA.
- * @QMI_WDS_DATA_BEARER_TECHNOLOGY_HSDPA_HSUPDA: HSDPA and HSUPA.
- * @QMI_WDS_DATA_BEARER_TECHNOLOGY_LTE: LTE.
- * @QMI_WDS_DATA_BEARER_TECHNOLOGY_EHRPD: CDMA2000 eHRPD.
- * @QMI_WDS_DATA_BEARER_TECHNOLOGY_HSDPAPLUS: HSDPA+ and WCDMA.
- * @QMI_WDS_DATA_BEARER_TECHNOLOGY_HSDPAPLUS_HSUPA: HSDPA+ and HSUPA.
- * @QMI_WDS_DATA_BEARER_TECHNOLOGY_DCHSDPAPLUS: DC-HSDPA+ and WCDMA.
- * @QMI_WDS_DATA_BEARER_TECHNOLOGY_DCHSDPAPLUS_HSUPA: DC-HSDPA+ and HSUPA.
- * @QMI_WDS_DATA_BEARER_TECHNOLOGY_HSDPAPLUS_PLUS_64QAM: HSDPA+ with 64QAM. Since: 1.18.
- * @QMI_WDS_DATA_BEARER_TECHNOLOGY_HSDPAPLUS_PLUS_64QAM_HSUPA: HSDPA+ with 64QAM and HSUPA. Since: 1.18.
- * @QMI_WDS_DATA_BEARER_TECHNOLOGY_TDSCDMA: TD-SCDMA. Since: 1.18.
- * @QMI_WDS_DATA_BEARER_TECHNOLOGY_TDSCDMA_HSDPA: TD-SCDMA and HSDPA. Since: 1.18.
- * @QMI_WDS_DATA_BEARER_TECHNOLOGY_TDSCDMA_HSUPA: TD-SCDMA and HSUPA. Since: 1.18.
- *
- * Data bearer technology.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_WDS_DATA_BEARER_TECHNOLOGY_UNKNOWN = -1,
- QMI_WDS_DATA_BEARER_TECHNOLOGY_CDMA20001X = 0x01,
- QMI_WDS_DATA_BEARER_TECHNOLOGY_1xEVDO = 0x02,
- QMI_WDS_DATA_BEARER_TECHNOLOGY_GSM = 0x03,
- QMI_WDS_DATA_BEARER_TECHNOLOGY_UMTS = 0x04,
- QMI_WDS_DATA_BEARER_TECHNOLOGY_1xEVDO_REVA = 0x05,
- QMI_WDS_DATA_BEARER_TECHNOLOGY_EDGE = 0x06,
- QMI_WDS_DATA_BEARER_TECHNOLOGY_HSDPA = 0x07,
- QMI_WDS_DATA_BEARER_TECHNOLOGY_HSUPA = 0x08,
- QMI_WDS_DATA_BEARER_TECHNOLOGY_HSDPA_HSUPDA = 0x09,
- QMI_WDS_DATA_BEARER_TECHNOLOGY_LTE = 0x0A,
- QMI_WDS_DATA_BEARER_TECHNOLOGY_EHRPD = 0x0B,
- QMI_WDS_DATA_BEARER_TECHNOLOGY_HSDPAPLUS = 0x0C,
- QMI_WDS_DATA_BEARER_TECHNOLOGY_HSDPAPLUS_HSUPA = 0x0D,
- QMI_WDS_DATA_BEARER_TECHNOLOGY_DCHSDPAPLUS = 0x0E,
- QMI_WDS_DATA_BEARER_TECHNOLOGY_DCHSDPAPLUS_HSUPA = 0x0F,
- QMI_WDS_DATA_BEARER_TECHNOLOGY_HSDPAPLUS_PLUS_64QAM = 0x10,
- QMI_WDS_DATA_BEARER_TECHNOLOGY_HSDPAPLUS_PLUS_64QAM_HSUPA = 0x11,
- QMI_WDS_DATA_BEARER_TECHNOLOGY_TDSCDMA = 0x12,
- QMI_WDS_DATA_BEARER_TECHNOLOGY_TDSCDMA_HSDPA = 0x13,
- QMI_WDS_DATA_BEARER_TECHNOLOGY_TDSCDMA_HSUPA = 0x14,
-} QmiWdsDataBearerTechnology;
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI WDS Get Current Data Bearer Technology' message */
-
-/**
- * QmiWdsNetworkType:
- * @QMI_WDS_NETWORK_TYPE_UNKNOWN: Unknown.
- * @QMI_WDS_NETWORK_TYPE_3GPP2: 3GPP2 network type.
- * @QMI_WDS_NETWORK_TYPE_3GPP: 3GPP network type.
- *
- * Network type of the data bearer.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_WDS_NETWORK_TYPE_UNKNOWN = 0,
- QMI_WDS_NETWORK_TYPE_3GPP2 = 1,
- QMI_WDS_NETWORK_TYPE_3GPP = 2
-} QmiWdsNetworkType;
-
-/**
- * QmiWdsDataSystemNetworkType:
- * @QMI_WDS_DATA_SYSTEM_NETWORK_TYPE_3GPP2: 3GPP2 network type.
- * @QMI_WDS_DATA_SYSTEM_NETWORK_TYPE_3GPP: 3GPP network type.
- *
- * Network type of the data system.
- *
- * Since: 1.14
- */
-typedef enum { /*< since=1.14 >*/
- QMI_WDS_DATA_SYSTEM_NETWORK_TYPE_3GPP = 0,
- QMI_WDS_DATA_SYSTEM_NETWORK_TYPE_3GPP2 = 1,
-} QmiWdsDataSystemNetworkType;
-
-/**
- * QmiWdsDataSystem:
- * @QMI_WDS_DATA_SYSTEM_UNKNOWN: unknown
- * @QMI_WDS_DATA_SYSTEM_CDMA1X: CDMA 1x
- * @QMI_WDS_DATA_SYSTEM_CDMA1X_EVDO: CDMA 1x EVDO
- * @QMI_WDS_DATA_SYSTEM_GPRS: GPRS
- * @QMI_WDS_DATA_SYSTEM_WCDMA: WCDMA
- * @QMI_WDS_DATA_SYSTEM_LTE: LTE
- * @QMI_WDS_DATA_SYSTEM_TDSCDMA: TD-SCDMA.
- *
- * Data system type.
- *
- * Since: 1.18
- */
-typedef enum { /*< since=1.18 >*/
- QMI_WDS_DATA_SYSTEM_UNKNOWN = 0,
- QMI_WDS_DATA_SYSTEM_CDMA1X = 1,
- QMI_WDS_DATA_SYSTEM_CDMA1X_EVDO = 2,
- QMI_WDS_DATA_SYSTEM_GPRS = 3,
- QMI_WDS_DATA_SYSTEM_WCDMA = 4,
- QMI_WDS_DATA_SYSTEM_LTE = 5,
- QMI_WDS_DATA_SYSTEM_TDSCDMA = 6,
-} QmiWdsDataSystem;
-
-/**
- * QmiWdsRat3gpp2:
- * @QMI_WDS_RAT_3GPP2_NONE: Unknown, to be ignored.
- * @QMI_WDS_RAT_3GPP2_CDMA1X: CDMA 1x.
- * @QMI_WDS_RAT_3GPP2_EVDO_REV0: EVDO Rev0.
- * @QMI_WDS_RAT_3GPP2_EVDO_REVA: EVDO RevA.
- * @QMI_WDS_RAT_3GPP2_EVDO_REVB: EVDO RevB.
- * @QMI_WDS_RAT_3GPP2_EHRPD: eHRPD. Since: 1.18.
- * @QMI_WDS_RAT_3GPP2_FMC: FMC. Since: 1.18.
- * @QMI_WDS_RAT_3GPP2_NULL_BEARER: No bearer.
- *
- * Flags specifying the 3GPP2-specific Radio Access Technology, when the data
- * bearer network type is @QMI_WDS_NETWORK_TYPE_3GPP2.
- *
- * Since: 1.0
- */
-typedef enum { /*< underscore_name=qmi_wds_rat_3gpp2,since=1.0 >*/
- QMI_WDS_RAT_3GPP2_NONE = 0,
- QMI_WDS_RAT_3GPP2_CDMA1X = 1 << 0,
- QMI_WDS_RAT_3GPP2_EVDO_REV0 = 1 << 1,
- QMI_WDS_RAT_3GPP2_EVDO_REVA = 1 << 2,
- QMI_WDS_RAT_3GPP2_EVDO_REVB = 1 << 3,
- QMI_WDS_RAT_3GPP2_EHRPD = 1 << 4,
- QMI_WDS_RAT_3GPP2_FMC = 1 << 5,
- QMI_WDS_RAT_3GPP2_NULL_BEARER = 1 << 15
-} QmiWdsRat3gpp2;
-
-/**
- * QmiWdsRat3gpp:
- * @QMI_WDS_RAT_3GPP_NONE: Unknown, to be ignored.
- * @QMI_WDS_RAT_3GPP_WCDMA: WCDMA.
- * @QMI_WDS_RAT_3GPP_GPRS: GPRS.
- * @QMI_WDS_RAT_3GPP_HSDPA: HSDPA.
- * @QMI_WDS_RAT_3GPP_HSUPA: HSUPA.
- * @QMI_WDS_RAT_3GPP_EDGE: EDGE.
- * @QMI_WDS_RAT_3GPP_LTE: LTE.
- * @QMI_WDS_RAT_3GPP_HSDPAPLUS: HSDPA+.
- * @QMI_WDS_RAT_3GPP_DCHSDPAPLUS: DC-HSDPA+.
- * @QMI_WDS_RAT_3GPP_64QAM: 64QAM. Since: 1.18.
- * @QMI_WDS_RAT_3GPP_TDSCDMA: TD-SCDMA. Since: 1.18.
- * @QMI_WDS_RAT_3GPP_NULL_BEARER: No bearer.
- *
- * Flags specifying the 3GPP-specific Radio Access Technology, when the data
- * bearer network type is @QMI_WDS_NETWORK_TYPE_3GPP.
- *
- * Since: 1.0
- */
-typedef enum { /*< underscore_name=qmi_wds_rat_3gpp,since=1.0 >*/
- QMI_WDS_RAT_3GPP_NONE = 0,
- QMI_WDS_RAT_3GPP_WCDMA = 1 << 0,
- QMI_WDS_RAT_3GPP_GPRS = 1 << 1,
- QMI_WDS_RAT_3GPP_HSDPA = 1 << 2,
- QMI_WDS_RAT_3GPP_HSUPA = 1 << 3,
- QMI_WDS_RAT_3GPP_EDGE = 1 << 4,
- QMI_WDS_RAT_3GPP_LTE = 1 << 5,
- QMI_WDS_RAT_3GPP_HSDPAPLUS = 1 << 6,
- QMI_WDS_RAT_3GPP_DCHSDPAPLUS = 1 << 7,
- QMI_WDS_RAT_3GPP_64QAM = 1 << 8,
- QMI_WDS_RAT_3GPP_TDSCDMA = 1 << 9,
- QMI_WDS_RAT_3GPP_NULL_BEARER = 1 << 15
-} QmiWdsRat3gpp;
-
-/**
- * QmiWdsSoCdma1x:
- * @QMI_WDS_SO_CDMA1X_NONE: Unknown, to be ignored.
- * @QMI_WDS_SO_CDMA1X_IS95: IS95.
- * @QMI_WDS_SO_CDMA1X_IS2000: IS2000.
- * @QMI_WDS_SO_CDMA1X_IS2000_REL_A: IS2000 RelA.
- *
- * Flags specifying the Service Option when the bearer network type is
- * @QMI_WDS_NETWORK_TYPE_3GPP2 and when the Radio Access Technology mask
- * contains @QMI_WDS_RAT_3GPP2_CDMA1X.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_WDS_SO_CDMA1X_NONE = 0,
- QMI_WDS_SO_CDMA1X_IS95 = 1 << 0,
- QMI_WDS_SO_CDMA1X_IS2000 = 1 << 1,
- QMI_WDS_SO_CDMA1X_IS2000_REL_A = 1 << 2
-} QmiWdsSoCdma1x;
-
-/**
- * QmiWdsSoEvdoRev0:
- * @QMI_WDS_SO_EVDO_REV0_NONE: Unknown, to be ignored.
- * @QMI_WDS_SO_EVDO_REV0_DPA: DPA.
- *
- * Flags specifying the Service Option when the bearer network type is
- * @QMI_WDS_NETWORK_TYPE_3GPP2 and when the Radio Access Technology mask
- * contains @QMI_WDS_RAT_3GPP2_EVDO_REV0.
- *
- * Since: 1.18
- */
-typedef enum { /*< since=1.18 >*/
- QMI_WDS_SO_EVDO_REV0_NONE = 0,
- QMI_WDS_SO_EVDO_REV0_DPA = 1 << 0,
-} QmiWdsSoEvdoRev0;
-
-/**
- * QmiWdsSoEvdoRevA:
- * @QMI_WDS_SO_EVDO_REVA_NONE: Unknown, to be ignored.
- * @QMI_WDS_SO_EVDO_REVA_DPA: DPA.
- * @QMI_WDS_SO_EVDO_REVA_MFPA: MFPA.
- * @QMI_WDS_SO_EVDO_REVA_EMPA: EMPA.
- * @QMI_WDS_SO_EVDO_REVA_EMPA_EHRPD: EMPA eHRPD.
- *
- * Flags specifying the Service Option when the bearer network type is
- * @QMI_WDS_NETWORK_TYPE_3GPP2 and when the Radio Access Technology mask
- * contains @QMI_WDS_RAT_3GPP2_EVDO_REVA.
- *
- * Since: 1.0
- */
-typedef enum { /*< underscore_name=qmi_wds_so_evdo_reva,since=1.0 >*/
- QMI_WDS_SO_EVDO_REVA_NONE = 0,
- QMI_WDS_SO_EVDO_REVA_DPA = 1 << 0,
- QMI_WDS_SO_EVDO_REVA_MFPA = 1 << 1,
- QMI_WDS_SO_EVDO_REVA_EMPA = 1 << 2,
- QMI_WDS_SO_EVDO_REVA_EMPA_EHRPD = 1 << 3,
-} QmiWdsSoEvdoRevA;
-
-/**
- * QmiWdsSoEvdoRevB:
- * @QMI_WDS_SO_EVDO_REVB_NONE: Unknown, to be ignored.
- * @QMI_WDS_SO_EVDO_REVB_DPA: DPA.
- * @QMI_WDS_SO_EVDO_REVB_MFPA: MFPA.
- * @QMI_WDS_SO_EVDO_REVB_EMPA: EMPA.
- * @QMI_WDS_SO_EVDO_REVB_EMPA_EHRPD: EMPA eHRPD.
- * @QMI_WDS_SO_EVDO_REVB_MMPA: MMPA.
- * @QMI_WDS_SO_EVDO_REVB_MMPA_EHRPD: MMPA eHRPD.
- *
- * Flags specifying the Service Option when the bearer network type is
- * @QMI_WDS_NETWORK_TYPE_3GPP2 and when the Radio Access Technology mask
- * contains @QMI_WDS_RAT_3GPP2_EVDO_REVB.
- *
- * Since: 1.18
- */
-typedef enum { /*< underscore_name=qmi_wds_so_evdo_revb,since=1.18 >*/
- QMI_WDS_SO_EVDO_REVB_NONE = 0,
- QMI_WDS_SO_EVDO_REVB_DPA = 1 << 0,
- QMI_WDS_SO_EVDO_REVB_MFPA = 1 << 1,
- QMI_WDS_SO_EVDO_REVB_EMPA = 1 << 2,
- QMI_WDS_SO_EVDO_REVB_EMPA_EHRPD = 1 << 3,
- QMI_WDS_SO_EVDO_REVB_MMPA = 1 << 4,
- QMI_WDS_SO_EVDO_REVB_MMPA_EHRPD = 1 << 5,
-} QmiWdsSoEvdoRevB;
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI WDS Get Current Settings' message */
-
-/**
- * QmiWdsGetCurrentSettingsRequestedSettings:
- * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_NONE: no settings requested
- * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_PROFILE_ID: request profile ID
- * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_PROFILE_NAME: request profile name
- * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_PDP_TYPE: request PDP context type
- * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_APN_NAME: request APN name
- * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_DNS_ADDRESS: request DNS server addresses
- * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_GRANTED_QOS: request granted QoS
- * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_USERNAME: request username
- * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_AUTH_PROTOCOL: request authentication protocol, ie PAP/CHAP/none.
- * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_IP_ADDRESS: request IP address
- * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_GATEWAY_INFO: request gateway address
- * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_PCSCF_ADDRESS: request PCSCF address
- * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_PCSCF_SERVER_ADDRESS_LIST: request PCSCF server address list
- * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_PCSCF_DOMAIN_NAME_LIST: request PCSCF domain name list
- * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_MTU: request MTU
- * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_DOMAIN_NAME_LIST: request domain name list
- * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_IP_FAMILY: request IP family, ie IPv4 or IPv6.
- * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_IMCN_FLAG: request IMCN flag
- * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_EXTENDED_TECHNOLOGY: request extended technology info
- *
- * Flags specifying which specific settings to return when requesting the
- * current WDS bearer settings.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_NONE = 0,
- QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_PROFILE_ID = 1 << 0,
- QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_PROFILE_NAME = 1 << 1,
- QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_PDP_TYPE = 1 << 2,
- QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_APN_NAME = 1 << 3,
- QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_DNS_ADDRESS = 1 << 4,
- QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_GRANTED_QOS = 1 << 5,
- QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_USERNAME = 1 << 6,
- QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_AUTH_PROTOCOL = 1 << 7,
- QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_IP_ADDRESS = 1 << 8,
- QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_GATEWAY_INFO = 1 << 9,
- QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_PCSCF_ADDRESS = 1 << 10,
- QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_PCSCF_SERVER_ADDRESS_LIST = 1 << 11,
- QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_PCSCF_DOMAIN_NAME_LIST = 1 << 12,
- QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_MTU = 1 << 13,
- QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_DOMAIN_NAME_LIST = 1 << 14,
- QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_IP_FAMILY = 1 << 15,
- QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_IMCN_FLAG = 1 << 16,
- QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_EXTENDED_TECHNOLOGY = 1 << 17,
-} QmiWdsGetCurrentSettingsRequestedSettings;
-
-/**
- * QmiWdsPdpType:
- * @QMI_WDS_PDP_TYPE_IPV4: IPv4
- * @QMI_WDS_PDP_TYPE_PPP: PPP
- * @QMI_WDS_PDP_TYPE_IPV6: IPv6
- * @QMI_WDS_PDP_TYPE_IPV4_OR_IPV6: IPv4 and IPv6 combined context
- *
- * PDP context type.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_WDS_PDP_TYPE_IPV4 = 0,
- QMI_WDS_PDP_TYPE_PPP = 1,
- QMI_WDS_PDP_TYPE_IPV6 = 2,
- QMI_WDS_PDP_TYPE_IPV4_OR_IPV6 = 3
-} QmiWdsPdpType;
-
-/**
- * QmiWdsTrafficClass:
- * @QMI_WDS_TRAFFIC_CLASS_SUBSCRIBED: default class, best-effort
- * @QMI_WDS_TRAFFIC_CLASS_CONVERSATIONAL: two-way video/voice, most delay sensitive
- * @QMI_WDS_TRAFFIC_CLASS_STREAMING: one-way video/audio, delay sensitive
- * @QMI_WDS_TRAFFIC_CLASS_INTERACTIVE: delay-sensitive, e.g. browsing, SSH.
- * @QMI_WDS_TRAFFIC_CLASS_BACKGROUND: delay-insensitive, e.g. downloads, email.
- *
- * QoS Traffic Classes.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_WDS_TRAFFIC_CLASS_SUBSCRIBED = 0,
- QMI_WDS_TRAFFIC_CLASS_CONVERSATIONAL = 1,
- QMI_WDS_TRAFFIC_CLASS_STREAMING = 2,
- QMI_WDS_TRAFFIC_CLASS_INTERACTIVE = 3,
- QMI_WDS_TRAFFIC_CLASS_BACKGROUND = 4
-} QmiWdsTrafficClass;
-
-/**
- * QmiWdsAuthentication:
- * @QMI_WDS_AUTHENTICATION_NONE: no authentication
- * @QMI_WDS_AUTHENTICATION_PAP: PAP authentication
- * @QMI_WDS_AUTHENTICATION_CHAP: CHAP authentication
- *
- * PDP context authentication protocols.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_WDS_AUTHENTICATION_NONE = 0,
- QMI_WDS_AUTHENTICATION_PAP = 1 << 0,
- QMI_WDS_AUTHENTICATION_CHAP = 1 << 1
-} QmiWdsAuthentication;
-
-/**
- * QmiWdsProfileType:
- * @QMI_WDS_PROFILE_TYPE_3GPP: 3GPP profile type.
- * @QMI_WDS_PROFILE_TYPE_3GPP2: 3GPP2 profile type.
- *
- * Profile network type family.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_WDS_PROFILE_TYPE_3GPP = 0,
- QMI_WDS_PROFILE_TYPE_3GPP2 = 1
-} QmiWdsProfileType;
-
- /**
- * QmiWdsProfileFamily:
- * @QMI_WDS_PROFILE_FAMILY_EMBEDDED: Embedded profile family.
- * @QMI_WDS_PROFILE_FAMILY_TETHERED: Tethered profile family.
- *
- * Profile family.
- *
- * Since: 1.22
- */
- typedef enum { /*< since=1.22 >*/
- QMI_WDS_PROFILE_FAMILY_EMBEDDED = 0,
- QMI_WDS_PROFILE_FAMILY_TETHERED = 1
- } QmiWdsProfileFamily;
-
-/**
- * QmiWdsDeliveryOrder:
- * @QMI_WDS_QOS_DELIVERY_ORDER_SUBSCRIBE: Subscribe.
- * @QMI_WDS_QOS_DELIVERY_ORDER_ON: On.
- * @QMI_WDS_QOS_DELIVERY_ORDER_OFF: Off.
- *
- * QoS delivery order.
- *
- * Since: 1.14
- */
-typedef enum { /*< since=1.14 >*/
- QMI_WDS_QOS_DELIVERY_ORDER_SUBSCRIBE = 0,
- QMI_WDS_QOS_DELIVERY_ORDER_ON = 1,
- QMI_WDS_QOS_DELIVERY_ORDER_OFF = 2
-} QmiWdsDeliveryOrder;
-
-/**
- * QmiWdsSduErrorRatio:
- * @QMI_WDS_SDU_ERROR_RATIO_SUBSCRIBE: Subscribe.
- * @QMI_WDS_SDU_ERROR_RATIO_1E2: 1x10^2.
- * @QMI_WDS_SDU_ERROR_RATIO_7E3: 7x10^3.
- * @QMI_WDS_SDU_ERROR_RATIO_1E3: 1x10^3.
- * @QMI_WDS_SDU_ERROR_RATIO_1E4: 1x10^4.
- * @QMI_WDS_SDU_ERROR_RATIO_1E5: 1x10^5.
- * @QMI_WDS_SDU_ERROR_RATIO_1E6: 1x10^6.
- * @QMI_WDS_SDU_ERROR_RATIO_1E1: 1x10^7.
- *
- * Target value for the fraction of SDUs lost or detected as erroneous.
- *
- * Since: 1.14
- */
-typedef enum { /*< since=1.14 >*/
- QMI_WDS_SDU_ERROR_RATIO_SUBSCRIBE = 0,
- QMI_WDS_SDU_ERROR_RATIO_1E2 = 1,
- QMI_WDS_SDU_ERROR_RATIO_7E3 = 2,
- QMI_WDS_SDU_ERROR_RATIO_1E3 = 3,
- QMI_WDS_SDU_ERROR_RATIO_1E4 = 4,
- QMI_WDS_SDU_ERROR_RATIO_1E5 = 5,
- QMI_WDS_SDU_ERROR_RATIO_1E6 = 6,
- QMI_WDS_SDU_ERROR_RATIO_1E1 = 7
-} QmiWdsSduErrorRatio;
-
-/**
- * QmiWdsSduResidualBitErrorRatio:
- * @QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_SUBSCRIBE: Subscribe.
- * @QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_5E2: 5x10^2.
- * @QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_1E2: 1x10^2.
- * @QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_5E3: 5x10^3.
- * @QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_4E3: 4x10^3.
- * @QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_1E3: 1x10^3.
- * @QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_1E4: 1x10^4.
- * @QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_1E5: 1x10^5.
- * @QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_1E6: 1x10^6.
- * @QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_6E8: 6x10^8.
- *
- * Target value for the undetected bit error ratio in the delivered SDUs.
- *
- * Since: 1.14
- */
-typedef enum { /*< since=1.14 >*/
- QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_SUBSCRIBE = 0,
- QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_5E2 = 1,
- QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_1E2 = 2,
- QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_5E3 = 3,
- QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_4E3 = 4,
- QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_1E3 = 5,
- QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_1E4 = 6,
- QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_1E5 = 7,
- QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_1E6 = 8,
- QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_6E8 = 9
-} QmiWdsSduResidualBitErrorRatio;
-
-/**
- * QmiWdsSduErroneousDelivery:
- * @QMI_WDS_SDU_ERRONEOUS_DELIVERY_SUBSCRIBE: Subscribe.
- * @QMI_WDS_SDU_ERRONEOUS_DELIVERY_NO_DETECTION: No detection.
- * @QMI_WDS_SDU_ERRONEOUS_DELIVERY_ENABLED: Erroneous SDUs are delivered.
- * @QMI_WDS_SDU_ERRONEOUS_DELIVERY_DISABLED: Erroneous SDUs are delivered.
- *
- * Whether SDUs detected as erroneous are delivered or not.
- *
- * Since: 1.14
- */
-typedef enum { /*< since=1.14 >*/
- QMI_WDS_SDU_ERRONEOUS_DELIVERY_SUBSCRIBE = 0,
- QMI_WDS_SDU_ERRONEOUS_DELIVERY_NO_DETECTION = 1,
- QMI_WDS_SDU_ERRONEOUS_DELIVERY_ENABLED = 2,
- QMI_WDS_SDU_ERRONEOUS_DELIVERY_DISABLED = 3
-} QmiWdsSduErroneousDelivery;
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI WDS Get Packet Statistics' message */
-
-/**
- * QmiWdsPacketStatisticsMaskFlag:
- * @QMI_WDS_PACKET_STATISTICS_MASK_FLAG_TX_PACKETS_OK: Request count of correctly sent packets.
- * @QMI_WDS_PACKET_STATISTICS_MASK_FLAG_RX_PACKETS_OK: Request count of correctly received packets.
- * @QMI_WDS_PACKET_STATISTICS_MASK_FLAG_TX_PACKETS_ERROR: Request count of sent packets with error.
- * @QMI_WDS_PACKET_STATISTICS_MASK_FLAG_RX_PACKETS_ERROR: Request count of received packets with error.
- * @QMI_WDS_PACKET_STATISTICS_MASK_FLAG_TX_OVERFLOWS: Request count of transmitter overflows.
- * @QMI_WDS_PACKET_STATISTICS_MASK_FLAG_RX_OVERFLOWS: Request count of receiver overflows.
- * @QMI_WDS_PACKET_STATISTICS_MASK_FLAG_TX_BYTES_OK: Request count of correctly sent bytes.
- * @QMI_WDS_PACKET_STATISTICS_MASK_FLAG_RX_BYTES_OK: Request count of correctly received bytes.
- * @QMI_WDS_PACKET_STATISTICS_MASK_FLAG_TX_PACKETS_DROPPED: Request count of dropped packets in transmission.
- * @QMI_WDS_PACKET_STATISTICS_MASK_FLAG_RX_PACKETS_DROPPED: Request count of dropped packets in reception.
- *
- * Mask to use when requesting packet statistics.
- *
- * Since: 1.6
- */
-typedef enum { /*< since=1.6 >*/
- QMI_WDS_PACKET_STATISTICS_MASK_FLAG_TX_PACKETS_OK = 1 << 0,
- QMI_WDS_PACKET_STATISTICS_MASK_FLAG_RX_PACKETS_OK = 1 << 1,
- QMI_WDS_PACKET_STATISTICS_MASK_FLAG_TX_PACKETS_ERROR = 1 << 2,
- QMI_WDS_PACKET_STATISTICS_MASK_FLAG_RX_PACKETS_ERROR = 1 << 3,
- QMI_WDS_PACKET_STATISTICS_MASK_FLAG_TX_OVERFLOWS = 1 << 4,
- QMI_WDS_PACKET_STATISTICS_MASK_FLAG_RX_OVERFLOWS = 1 << 5,
- QMI_WDS_PACKET_STATISTICS_MASK_FLAG_TX_BYTES_OK = 1 << 6,
- QMI_WDS_PACKET_STATISTICS_MASK_FLAG_RX_BYTES_OK = 1 << 7,
- QMI_WDS_PACKET_STATISTICS_MASK_FLAG_TX_PACKETS_DROPPED = 1 << 8,
- QMI_WDS_PACKET_STATISTICS_MASK_FLAG_RX_PACKETS_DROPPED = 1 << 9
-} QmiWdsPacketStatisticsMaskFlag;
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI WDS Get Profile List' message */
-
-/**
- * QmiWdsDsProfileError:
- * @QMI_WDS_DS_PROFILE_ERROR_UNKNOWN: Unknown DS profile error.
- * @QMI_WDS_DS_PROFILE_ERROR_FAIL: General failure.
- * @QMI_WDS_DS_PROFILE_ERROR_INVALID_HANDLE: Invalid handle.
- * @QMI_WDS_DS_PROFILE_ERROR_INVALID_OPERATION: Invalid operation.
- * @QMI_WDS_DS_PROFILE_ERROR_INVALID_PROFILE_TYPE: Invalid profile type.
- * @QMI_WDS_DS_PROFILE_ERROR_INVALID_PROFILE_NUMBER: Invalid profile number.
- * @QMI_WDS_DS_PROFILE_ERROR_INVALID_PROFILE_ID: Invalid profile identifier.
- * @QMI_WDS_DS_PROFILE_ERROR_INVALID_ARGUMENT: Invalid argument.
- * @QMI_WDS_DS_PROFILE_ERROR_REGISTRY_NOT_INITIALIZED: Registry not initialized.
- * @QMI_WDS_DS_PROFILE_ERROR_INVALID_PARAMETER_LENGTH: Invalid parameter length.
- * @QMI_WDS_DS_PROFILE_ERROR_LIST_END: List end, profile not found.
- * @QMI_WDS_DS_PROFILE_ERROR_INVALID_SUBSCRIPTION_ID: Invalid subscription identifier.
- * @QMI_WDS_DS_PROFILE_ERROR_INVALID_PROFILE_FAMILY: Invalid profile family.
- * @QMI_WDS_DS_PROFILE_ERROR_3GPP_INVALID_PROFILE_FAMILY: Invalid 3GPP profile family.
- * @QMI_WDS_DS_PROFILE_ERROR_3GPP_ACCESS_ERROR: Error accessing 3GPP profiles.
- * @QMI_WDS_DS_PROFILE_ERROR_3GPP_CONTEXT_NOT_DEFINED: 3GPP profile doesn't have a valid context.
- * @QMI_WDS_DS_PROFILE_ERROR_3GPP_VALID_FLAG_NOT_SET: 3GPP profile doesn't have valid flag set.
- * @QMI_WDS_DS_PROFILE_ERROR_3GPP_READ_ONLY_FLAG_SET: 3GPP profile has read-only flag set.
- * @QMI_WDS_DS_PROFILE_ERROR_3GPP_OUT_OF_PROFILES: Out of 3GPP profiles.
- * @QMI_WDS_DS_PROFILE_ERROR_3GPP2_INVALID_PROFILE_ID: Invalid 3GPP2 profile identifier.
- *
- * Extended DS profile errors.
- *
- * Since: 1.8
- */
-typedef enum { /*< since=1.8 >*/
- QMI_WDS_DS_PROFILE_ERROR_UNKNOWN = 0,
- QMI_WDS_DS_PROFILE_ERROR_FAIL = 1,
- QMI_WDS_DS_PROFILE_ERROR_INVALID_HANDLE = 2,
- QMI_WDS_DS_PROFILE_ERROR_INVALID_OPERATION = 3,
- QMI_WDS_DS_PROFILE_ERROR_INVALID_PROFILE_TYPE = 4,
- QMI_WDS_DS_PROFILE_ERROR_INVALID_PROFILE_NUMBER = 5,
- QMI_WDS_DS_PROFILE_ERROR_INVALID_PROFILE_ID = 6,
- QMI_WDS_DS_PROFILE_ERROR_INVALID_ARGUMENT = 7,
- QMI_WDS_DS_PROFILE_ERROR_REGISTRY_NOT_INITIALIZED = 8,
- QMI_WDS_DS_PROFILE_ERROR_INVALID_PARAMETER_LENGTH = 9,
- QMI_WDS_DS_PROFILE_ERROR_LIST_END = 10,
- QMI_WDS_DS_PROFILE_ERROR_INVALID_SUBSCRIPTION_ID = 11,
- QMI_WDS_DS_PROFILE_ERROR_INVALID_PROFILE_FAMILY = 12,
- QMI_WDS_DS_PROFILE_ERROR_3GPP_INVALID_PROFILE_FAMILY = 1001,
- QMI_WDS_DS_PROFILE_ERROR_3GPP_ACCESS_ERROR = 1002,
- QMI_WDS_DS_PROFILE_ERROR_3GPP_CONTEXT_NOT_DEFINED = 1003,
- QMI_WDS_DS_PROFILE_ERROR_3GPP_VALID_FLAG_NOT_SET = 1004,
- QMI_WDS_DS_PROFILE_ERROR_3GPP_READ_ONLY_FLAG_SET = 1005,
- QMI_WDS_DS_PROFILE_ERROR_3GPP_OUT_OF_PROFILES = 1006,
- QMI_WDS_DS_PROFILE_ERROR_3GPP2_INVALID_PROFILE_ID = 1101,
-} QmiWdsDsProfileError;
-
-/**
- * QmiWdsAutoconnectSetting:
- * @QMI_WDS_AUTOCONNECT_SETTING_DISABLED: Disabled.
- * @QMI_WDS_AUTOCONNECT_SETTING_ENABLED: Enabled.
- * @QMI_WDS_AUTOCONNECT_SETTING_PAUSED: Paused, resume on power cycle.
- *
- * Status of the autoconnect setting.
- *
- * Since: 1.14
- */
-typedef enum { /*< since=1.14 >*/
- QMI_WDS_AUTOCONNECT_SETTING_DISABLED = 0,
- QMI_WDS_AUTOCONNECT_SETTING_ENABLED = 1,
- QMI_WDS_AUTOCONNECT_SETTING_PAUSED = 2,
-} QmiWdsAutoconnectSetting;
-
-/**
- * QmiWdsAutoconnectSettingRoaming:
- * @QMI_WDS_AUTOCONNECT_SETTING_ROAMING_ALLOWED: Autoconnect always allowed, even when roaming.
- * @QMI_WDS_AUTOCONNECT_SETTING_ROAMING_HOME_ONLY: Autoconnect allowed only in home network.
- *
- * Status of the autoconnect setting while roaming.
- *
- * Since: 1.14
- */
-typedef enum { /*< since=1.14 >*/
- QMI_WDS_AUTOCONNECT_SETTING_ROAMING_ALLOWED = 0,
- QMI_WDS_AUTOCONNECT_SETTING_ROAMING_HOME_ONLY = 1,
-} QmiWdsAutoconnectSettingRoaming;
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI WDS Set Event Report' message */
-
-/**
- * QmiWdsSetEventReportTransferStatistics:
- * @QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_TX_PACKETS_OK: report TX packet successes.
- * @QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_RX_PACKETS_OK: report RX packet successes.
- * @QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_TX_PACKETS_ERROR: report TX packet errors.
- * @QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_RX_PACKETS_ERROR: report RX packet errors.
- * @QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_TX_OVERFLOWS: report TX overflows.
- * @QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_RX_OVERFLOWS: report RX overflows.
- * @QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_TX_BYTES_OK: report TX byte total.
- * @QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_RX_BYTES_OK: report RX byte total.
- * @QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_TX_PACKETS_DROPPED: report TX packets dropped.
- * @QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_RX_PACKETS_DROPPED: report RX packets dropped.
- *
- * Flags indicating which WDS Set Event Report Transfer Statistics indicators
- * should be emitted.
- *
- * Since: 1.18
- */
-typedef enum { /*< since=1.18 >*/
- QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_TX_PACKETS_OK = 1 << 0,
- QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_RX_PACKETS_OK = 1 << 1,
- QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_TX_PACKETS_ERROR = 1 << 2,
- QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_RX_PACKETS_ERROR = 1 << 3,
- QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_TX_OVERFLOWS = 1 << 4,
- QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_RX_OVERFLOWS = 1 << 5,
- QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_TX_BYTES_OK = 1 << 6,
- QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_RX_BYTES_OK = 1 << 7,
- QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_TX_PACKETS_DROPPED = 1 << 8,
- QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_RX_PACKETS_DROPPED = 1 << 9,
-} QmiWdsSetEventReportTransferStatistics;
-
-/**
- * QmiWdsDormancyStatus:
- * @QMI_WDS_DORMANCY_STATUS_UNKNOWN: dormancy status unknown.
- * @QMI_WDS_DORMANCY_STATUS_TRAFFIC_CHANNEL_DORMANT: traffic channel is dormant.
- * @QMI_WDS_DORMANCY_STATUS_TRAFFIC_CHANNEL_ACTIVE: traffic channel is active.
- *
- * Dormancy status.
- *
- * Since: 1.18
- */
-typedef enum { /*< since=1.18 >*/
- QMI_WDS_DORMANCY_STATUS_UNKNOWN = 0,
- QMI_WDS_DORMANCY_STATUS_TRAFFIC_CHANNEL_DORMANT = 1,
- QMI_WDS_DORMANCY_STATUS_TRAFFIC_CHANNEL_ACTIVE = 2,
-} QmiWdsDormancyStatus;
-
-/**
- * QmiWdsDataCallStatus:
- * @QMI_WDS_DATA_CALL_STATUS_UNKNOWN: data call status unknown.
- * @QMI_WDS_DATA_CALL_STATUS_ACTIVATED: data call status activated.
- * @QMI_WDS_DATA_CALL_STATUS_TERMINATED: data call status terminated.
- *
- * Data call status.
- *
- * Since: 1.18
- */
-typedef enum { /*< since=1.18 >*/
- QMI_WDS_DATA_CALL_STATUS_UNKNOWN = 0,
- QMI_WDS_DATA_CALL_STATUS_ACTIVATED = 1,
- QMI_WDS_DATA_CALL_STATUS_TERMINATED = 2,
-} QmiWdsDataCallStatus;
-
-/**
- * QmiWdsDataCallType:
- * @QMI_WDS_DATA_CALL_TYPE_UNKNOWN: data call type unknown.
- * @QMI_WDS_DATA_CALL_TYPE_EMBEDDED: embedded data call.
- * @QMI_WDS_DATA_CALL_TYPE_TETHERED: tethered data call.
- * @QMI_WDS_DATA_CALL_TYPE_MODEM_EMBEDDED: modem embedded data call.
- *
- * Data call type.
- *
- * Since: 1.18
- */
-typedef enum { /*< since=1.18 >*/
- QMI_WDS_DATA_CALL_TYPE_UNKNOWN = 0,
- QMI_WDS_DATA_CALL_TYPE_EMBEDDED = 1,
- QMI_WDS_DATA_CALL_TYPE_TETHERED = 2,
- QMI_WDS_DATA_CALL_TYPE_MODEM_EMBEDDED = 3,
-} QmiWdsDataCallType;
-
-/**
- * QmiWdsTetheredCallType:
- * @QMI_WDS_TETHERED_CALL_TYPE_NON_TETHERED: non-tethered.
- * @QMI_WDS_TETHERED_CALL_TYPE_RMNET: RmNet.
- * @QMI_WDS_TETHERED_CALL_TYPE_DUN: DUN.
- *
- * Tethered call type.
- *
- * Since: 1.18
- */
-typedef enum { /*< since=1.18 >*/
- QMI_WDS_TETHERED_CALL_TYPE_NON_TETHERED = 0,
- QMI_WDS_TETHERED_CALL_TYPE_RMNET = 1,
- QMI_WDS_TETHERED_CALL_TYPE_DUN = 2,
-} QmiWdsTetheredCallType;
-
-/**
- * QmiWdsRadioAccessTechnology:
- * @QMI_WDS_RADIO_ACCESS_TECHNOLOGY_NULL_BEARER: null bearer
- * @QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP_WCDMA: WCDMA.
- * @QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP_GERAN: GERAN.
- * @QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP_LTE: LTE.
- * @QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP_TDSCDMA: TD-SDCMA.
- * @QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP_WLAN: 3GPP WLAN.
- * @QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP_MAXIMUM: 3GPP maximum.
- * @QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP2_1X: CDMA 1x.
- * @QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP2_HRPD: CDMA EVDO, HRPD.
- * @QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP2_EHRPD: CDMA EVDO with eHRPD.
- * @QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP2_WLAN: 3GPP2 WLAN.
- * @QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP2_MAXIMUM: 3GPP2 maximum.
- *
- * Radio access technology.
- *
- * Since: 1.18
- */
-typedef enum { /*< since=1.18 >*/
- QMI_WDS_RADIO_ACCESS_TECHNOLOGY_NULL_BEARER = 0,
- QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP_WCDMA = 1,
- QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP_GERAN = 2,
- QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP_LTE = 3,
- QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP_TDSCDMA = 4,
- QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP_WLAN = 5,
- QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP_MAXIMUM = 100,
- QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP2_1X = 101,
- QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP2_HRPD = 102,
- QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP2_EHRPD = 103,
- QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP2_WLAN = 104,
- QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP2_MAXIMUM = 200,
-} QmiWdsRadioAccessTechnology;
-
-/**
- * QmiWdsExtendedDataBearerTechnology3gpp:
- * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_UNKNOWN: unknown.
- * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_WCDMA: WCDMA.
- * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_HSDPA: HSDPA.
- * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_HSUPA: HSUPA.
- * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_HSDPA_PLUS: HSDPA+.
- * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_DC_HSDPA_PLUS: Dual-cell HSDPA+.
- * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_64QAM: 64-QAM.
- * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_HSPA: HSPA.
- * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_GPRS: GPRS.
- * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_EDGE: EDGE.
- * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_GSM: GSM.
- * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_S2B: S2B.
- * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_LTE_LIMITED_SERVICE: LTE limited service.
- * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_LTE_FDD: LTE FDD.
- * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_LTE_TDD: LTE TDD.
- *
- * 3GPP extended data bearer technologies.
- *
- * Since: 1.18
- */
-typedef enum { /*< underscore_name=qmi_wds_extended_data_bearer_technology_3gpp,since=1.18 >*/
- QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_UNKNOWN = 0,
- QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_WCDMA = 1 << 0,
- QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_HSDPA = 1 << 1,
- QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_HSUPA = 1 << 2,
- QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_HSDPA_PLUS = 1 << 3,
- QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_DC_HSDPA_PLUS = 1 << 4,
- QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_64QAM = 1 << 5,
- QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_HSPA = 1 << 6,
- QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_GPRS = 1 << 7,
- QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_EDGE = 1 << 8,
- QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_GSM = 1 << 9,
- QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_S2B = 1 << 10,
- QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_LTE_LIMITED_SERVICE = 1 << 11,
- QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_LTE_FDD = 1 << 12,
- QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_LTE_TDD = 1 << 13,
-} QmiWdsExtendedDataBearerTechnology3gpp;
-
-/**
- * QmiWdsExtendedDataBearerTechnology3gpp2:
- * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_UNKNOWN: unknown.
- * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_RESERVED: reserved.
- * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_CDMA1X_IS95: CDMA1x IS-95.
- * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_CDMA1X_IS2000: CDMA1x IS-2000.
- * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_CDMA1X_IS2000_REL_A: CDMA1x IS-2000 Release A.
- * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_REV_0_DPA: HDR EVDO Rev 0 DPA.
- * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_REV_A_DPA: HDR EVDO Rev A DPA.
- * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_REV_B_DPA: HDR EVDO Rev B DPA.
- * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_REV_A_MPA: HDR EVDO Rev A MPA.
- * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_REV_B_MPA: HDR EVDO Rev B MPA.
- * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_REV_A_EMPA: HDR EVDO Rev A EMPA.
- * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_REV_B_EMPA: HDR EVDO Rev B EMPA.
- * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_REV_B_MMPA: HDR EVDO Rev B MMPA.
- * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_EVDO_FMC: HDR EVDO FMC.
- *
- * 3GPP2 extended data bearer technologies.
- *
- * Since: 1.18
- */
-typedef enum { /*< underscore_name=qmi_wds_extended_data_bearer_technology_3gpp2,since=1.18 >*/
- QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_UNKNOWN = 0,
- QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_RESERVED = 1 << 0,
- QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_CDMA1X_IS95 = 1 << 1,
- QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_CDMA1X_IS2000 = 1 << 2,
- QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_CDMA1X_IS2000_REL_A = 1 << 3,
- QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_REV_0_DPA = 1 << 4,
- QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_REV_A_DPA = 1 << 5,
- QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_REV_B_DPA = 1 << 6,
- QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_REV_A_MPA = 1 << 7,
- QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_REV_B_MPA = 1 << 8,
- QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_REV_A_EMPA = 1 << 9,
- QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_REV_B_EMPA = 1 << 10,
- QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_REV_B_MMPA = 1 << 11,
- QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_EVDO_FMC = 1 << 12,
-} QmiWdsExtendedDataBearerTechnology3gpp2;
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI WDS Profile'-related messages */
-
-/**
- * QmiWdsPdpHeaderCompressionType:
- * @QMI_WDS_PDP_HEADER_COMPRESSION_TYPE_OFF: no header compression
- * @QMI_WDS_PDP_HEADER_COMPRESSION_TYPE_MANUFACTURER_PREFERRED: manufacturer preferred
- * @QMI_WDS_PDP_HEADER_COMPRESSION_TYPE_RFC1144: RFC1144
- * @QMI_WDS_PDP_HEADER_COMPRESSION_TYPE_RFC2507: RFC2507
- * @QMI_WDS_PDP_HEADER_COMPRESSION_TYPE_RFC3095: RFC3095
- *
- * PDP header compression types.
- *
- * Since: 1.18
- */
-typedef enum { /*< since=1.18 >*/
- QMI_WDS_PDP_HEADER_COMPRESSION_TYPE_OFF = 0,
- QMI_WDS_PDP_HEADER_COMPRESSION_TYPE_MANUFACTURER_PREFERRED = 1,
- QMI_WDS_PDP_HEADER_COMPRESSION_TYPE_RFC1144 = 2,
- QMI_WDS_PDP_HEADER_COMPRESSION_TYPE_RFC2507 = 3,
- QMI_WDS_PDP_HEADER_COMPRESSION_TYPE_RFC3095 = 4,
-} QmiWdsPdpHeaderCompressionType;
-
-/**
- * QmiWdsPdpDataCompressionType:
- * @QMI_WDS_PDP_DATA_COMPRESSION_TYPE_OFF: no data compression
- * @QMI_WDS_PDP_DATA_COMPRESSION_TYPE_MANUFACTURER_PREFERRED: manufacturer preferred
- * @QMI_WDS_PDP_DATA_COMPRESSION_TYPE_V42BIS: V42bis
- * @QMI_WDS_PDP_DATA_COMPRESSION_TYPE_V44: V44
- *
- * PDP data compression types.
- *
- * Since: 1.18
- */
-typedef enum { /*< since=1.18 >*/
- QMI_WDS_PDP_DATA_COMPRESSION_TYPE_OFF = 0,
- QMI_WDS_PDP_DATA_COMPRESSION_TYPE_MANUFACTURER_PREFERRED = 1,
- QMI_WDS_PDP_DATA_COMPRESSION_TYPE_V42BIS = 2,
- QMI_WDS_PDP_DATA_COMPRESSION_TYPE_V44 = 3,
-} QmiWdsPdpDataCompressionType;
-
-/**
- * QmiWdsQosClassIdentifier:
- * @QMI_WDS_QOS_CLASS_IDENTIFIER_NETWORK_ASSIGN: network assigned
- * @QMI_WDS_QOS_CLASS_IDENTIFIER_GUARANTEED_BITRATE1: guaranteed bitrate 1
- * @QMI_WDS_QOS_CLASS_IDENTIFIER_GUARANTEED_BITRATE2: guaranteed bitrate 2
- * @QMI_WDS_QOS_CLASS_IDENTIFIER_GUARANTEED_BITRATE3: guaranteed bitrate 3
- * @QMI_WDS_QOS_CLASS_IDENTIFIER_GUARANTEED_BITRATE4: guaranteed bitrate 4
- * @QMI_WDS_QOS_CLASS_IDENTIFIER_NON_GUARANTEED_BITRATE5: non-guaranteed bitrate 5
- * @QMI_WDS_QOS_CLASS_IDENTIFIER_NON_GUARANTEED_BITRATE6: non-guaranteed bitrate 6
- * @QMI_WDS_QOS_CLASS_IDENTIFIER_NON_GUARANTEED_BITRATE7: non-guaranteed bitrate 7
- * @QMI_WDS_QOS_CLASS_IDENTIFIER_NON_GUARANTEED_BITRATE8: non-guaranteed bitrate 8
- *
- * QoS Class Identifier.
- *
- * Since: 1.18
- */
-typedef enum { /*< since=1.18 >*/
- QMI_WDS_QOS_CLASS_IDENTIFIER_NETWORK_ASSIGN = 0,
- QMI_WDS_QOS_CLASS_IDENTIFIER_GUARANTEED_BITRATE1 = 1,
- QMI_WDS_QOS_CLASS_IDENTIFIER_GUARANTEED_BITRATE2 = 2,
- QMI_WDS_QOS_CLASS_IDENTIFIER_GUARANTEED_BITRATE3 = 3,
- QMI_WDS_QOS_CLASS_IDENTIFIER_GUARANTEED_BITRATE4 = 4,
- QMI_WDS_QOS_CLASS_IDENTIFIER_NON_GUARANTEED_BITRATE5 = 5,
- QMI_WDS_QOS_CLASS_IDENTIFIER_NON_GUARANTEED_BITRATE6 = 6,
- QMI_WDS_QOS_CLASS_IDENTIFIER_NON_GUARANTEED_BITRATE7 = 7,
- QMI_WDS_QOS_CLASS_IDENTIFIER_NON_GUARANTEED_BITRATE8 = 8,
-} QmiWdsQosClassIdentifier;
-
-/**
- * QmiWdsAttachPdnListAction:
- * @QMI_WDS_ATTACH_PDN_LIST_ACTION_NONE: No action (default)
- * @QMI_WDS_ATTACH_PDN_LIST_ACTION_DETACH_OR_PDN_DISCONNECT: PS detach or PDN disconnect based on the modem configuration
- *
- * Action when setting the attach PDN list.
- *
- * Since: 1.28
- */
-typedef enum { /*< since=1.28 >*/
- QMI_WDS_ATTACH_PDN_LIST_ACTION_NONE = 0x01,
- QMI_WDS_ATTACH_PDN_LIST_ACTION_DETACH_OR_PDN_DISCONNECT = 0x02,
-} QmiWdsAttachPdnListAction;
-
-/**
- * QmiWdsClientType:
- * @QMI_WDS_CLIENT_TYPE_TETHERED: client type tethered
- * @QMI_WDS_CLIENT_TYPE_UNDEFINED: no client type defined
- *
- * Client Type
- *
- * Since: 1.18
- */
-typedef enum { /*< since=1.18 >*/
- QMI_WDS_CLIENT_TYPE_TETHERED = 0x01,
- QMI_WDS_CLIENT_TYPE_UNDEFINED = 0xFF,
-} QmiWdsClientType;
-
-/**
- * QMI_WDS_RATE_UNAVAILABLE:
- *
- * The TX/RX rate information is unavailable or cannot be measured.
- *
- * Since: 1.22.4
- */
-#define QMI_WDS_RATE_UNAVAILABLE 0xFFFFFFFF
-
-/**
- * QmiWdsIpSupportType:
- * @QMI_WDS_IP_SUPPORT_TYPE_IPV4: IPv4 type.
- * @QMI_WDS_IP_SUPPORT_TYPE_IPV6: IPv6 type.
- * @QMI_WDS_IP_SUPPORT_TYPE_IPV4V6: IPv4v6 type.
- *
- * IP support type.
- *
- * Since: 1.28
- */
-typedef enum { /*< since=1.28 >*/
- QMI_WDS_IP_SUPPORT_TYPE_IPV4 = 0,
- QMI_WDS_IP_SUPPORT_TYPE_IPV6 = 1,
- QMI_WDS_IP_SUPPORT_TYPE_IPV4V6 = 2,
-} QmiWdsIpSupportType;
-
-#endif /* _LIBQMI_GLIB_QMI_ENUMS_WDS_H_ */
+++ /dev/null
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * uqmi -- tiny QMI support implementation
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA.
- *
- * Copyright (C) 2012 Google Inc.
- * Copyright (C) 2012-2017 Aleksander Morgado <aleksander@aleksander.es>
- */
-
-#ifndef _LIBQMI_GLIB_QMI_ENUMS_WMS_H_
-#define _LIBQMI_GLIB_QMI_ENUMS_WMS_H_
-
-/**
- * SECTION: qmi-enums-wms
- *
- * This section defines enumerations and flags used in the WMS service
- * interface.
- */
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI WMS Event Report' indication */
-
-/**
- * QmiWmsStorageType:
- * @QMI_WMS_STORAGE_TYPE_UIM: Message stored in UIM.
- * @QMI_WMS_STORAGE_TYPE_NV: Message stored in non-volatile memory.
- * @QMI_WMS_STORAGE_TYPE_NONE: None.
- *
- * Type of messaging storage.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_WMS_STORAGE_TYPE_UIM = 0x00,
- QMI_WMS_STORAGE_TYPE_NV = 0x01,
- QMI_WMS_STORAGE_TYPE_NONE = 0xFF
-} QmiWmsStorageType;
-
-/**
- * QmiWmsAckIndicator:
- * @QMI_WMS_ACK_INDICATOR_SEND: ACK needs to be sent.
- * @QMI_WMS_ACK_INDICATOR_DO_NOT_SEND: ACK doesn't need to be sent.
- *
- * Indication of whether ACK needs to be sent or not.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_WMS_ACK_INDICATOR_SEND = 0x00,
- QMI_WMS_ACK_INDICATOR_DO_NOT_SEND = 0x01
-} QmiWmsAckIndicator;
-
-/**
- * QmiWmsMessageFormat:
- * @QMI_WMS_MESSAGE_FORMAT_CDMA: CDMA message.
- * @QMI_WMS_MESSAGE_FORMAT_GSM_WCDMA_POINT_TO_POINT: Point-to-point 3GPP message.
- * @QMI_WMS_MESSAGE_FORMAT_GSM_WCDMA_BROADCAST: Broadcast 3GPP message.
- * @QMI_WMS_MESSAGE_FORMAT_MWI: Message Waiting Indicator.
- *
- * Type of message.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_WMS_MESSAGE_FORMAT_CDMA = 0x00,
- QMI_WMS_MESSAGE_FORMAT_GSM_WCDMA_POINT_TO_POINT = 0x06,
- QMI_WMS_MESSAGE_FORMAT_GSM_WCDMA_BROADCAST = 0x07,
- QMI_WMS_MESSAGE_FORMAT_MWI = 0x08
-} QmiWmsMessageFormat;
-
-/**
- * QmiWmsMessageMode:
- * @QMI_WMS_MESSAGE_MODE_CDMA: Message sent using 3GPP2 technologies.
- * @QMI_WMS_MESSAGE_MODE_GSM_WCDMA: Message sent using 3GPP technologies.
- *
- * Message mode.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_WMS_MESSAGE_MODE_CDMA = 0x00,
- QMI_WMS_MESSAGE_MODE_GSM_WCDMA = 0x01
-} QmiWmsMessageMode;
-
-/**
- * QmiWmsNotificationType:
- * @QMI_WMS_NOTIFICATION_TYPE_PRIMARY: Primary.
- * @QMI_WMS_NOTIFICATION_TYPE_SECONDARY_GSM: Secondary GSM.
- * @QMI_WMS_NOTIFICATION_TYPE_SECONDARY_UMTS: Secondary UMTS.
- *
- * Type of notification.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_WMS_NOTIFICATION_TYPE_PRIMARY = 0x00,
- QMI_WMS_NOTIFICATION_TYPE_SECONDARY_GSM = 0x01,
- QMI_WMS_NOTIFICATION_TYPE_SECONDARY_UMTS = 0x02
-} QmiWmsNotificationType;
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI WMS Raw Send' request/response */
-
-/**
- * QmiWmsCdmaServiceOption:
- * @QMI_WMS_CDMA_SERVICE_OPTION_AUTO: Automatic selection of service option.
- * @QMI_WMS_CDMA_SERVICE_OPTION_6: Use service option 6.
- * @QMI_WMS_CDMA_SERVICE_OPTION_14: Use service option 14.
- *
- * CDMA service option selection.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_WMS_CDMA_SERVICE_OPTION_AUTO = 0x00,
- QMI_WMS_CDMA_SERVICE_OPTION_6 = 0x06,
- QMI_WMS_CDMA_SERVICE_OPTION_14 = 0x0E
-} QmiWmsCdmaServiceOption;
-
-/**
- * QmiWmsCdmaCauseCode:
- * @QMI_WMS_CDMA_CAUSE_CODE_NETWORK_ADDRESS_VACANT: Address is valid but not yet allocated. Since 1.18.
- * @QMI_WMS_CDMA_CAUSE_CODE_NETWORK_ADDRESS_TRANSLATION_FAILURE: Address is invalid. Since 1.18.
- * @QMI_WMS_CDMA_CAUSE_CODE_NETWORK_RESOURCE_SHORTAGE: Network resource shortage. Since 1.18.
- * @QMI_WMS_CDMA_CAUSE_CODE_NETWORK_FAILURE: Network failed. Since 1.18.
- * @QMI_WMS_CDMA_CAUSE_CODE_NETWORK_INVALID_TELESERVICE_ID: SMS teleservice ID is invalid. Since 1.18.
- * @QMI_WMS_CDMA_CAUSE_CODE_NETWORK_OTHER: Other network error. Since 1.18.
- * @QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_NO_PAGE_RESPONSE: No page response from destination. Since 1.18.
- * @QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_BUSY: Destination is busy. Since 1.18.
- * @QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_NO_ACK: No acknowledge from destination. Since 1.18.
- * @QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_RESOURCE_SHORTAGE: Destination resource shortage. Since 1.18.
- * @QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_SMS_DELIVERY_POSTPONED: SMS delivery postponed. Since 1.18.
- * @QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_OUT_OF_SERVICE: Destination out of service. Since 1.18.
- * @QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_NOT_AT_ADDRESS: Destination not at address. Since 1.18.
- * @QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_OTHER: Other destination error. Since 1.18.
- * @QMI_WMS_CDMA_CAUSE_CODE_RADIO_INTERFACE_RESOURCE_SHORTAGE: Radio interface resource shortage. Since 1.18.
- * @QMI_WMS_CDMA_CAUSE_CODE_RADIO_INTERFACE_INCOMPATIBILITY: Radio interface incompatibility. Since 1.18.
- * @QMI_WMS_CDMA_CAUSE_CODE_RADIO_INTERFACE_OTHER: Other radio interface error. Since 1.18.
- * @QMI_WMS_CDMA_CAUSE_CODE_GENERAL_ENCODING: Encoding error. Since 1.18.
- * @QMI_WMS_CDMA_CAUSE_CODE_GENERAL_SMS_ORIGIN_DENIED: SMS origin denied. Since 1.18.
- * @QMI_WMS_CDMA_CAUSE_CODE_GENERAL_SMS_DESTINATION_DENIED: SMS destination denied. Since 1.18.
- * @QMI_WMS_CDMA_CAUSE_CODE_GENERAL_SUPPLEMENTARY_SERVICE_NOT_SUPPORTED: Supplementary service not supported. Since 1.18.
- * @QMI_WMS_CDMA_CAUSE_CODE_GENERAL_SMS_NOT_SUPPORTED: SMS not supported. Since 1.18.
- * @QMI_WMS_CDMA_CAUSE_CODE_GENERAL_MISSING_EXPECTED_PARAMETER: Missing optional expected parameter. Since 1.18.
- * @QMI_WMS_CDMA_CAUSE_CODE_GENERAL_MISSING_MANDATORY_PARAMETER: Missing mandatory parameter. Since 1.18.
- * @QMI_WMS_CDMA_CAUSE_CODE_GENERAL_UNRECOGNIZED_PARAMETER_VALUE: Unrecognized parameter value. Since 1.18.
- * @QMI_WMS_CDMA_CAUSE_CODE_GENERAL_UNEXPECTED_PARAMETER_VALUE: Unexpected parameter value. Since 1.18.
- * @QMI_WMS_CDMA_CAUSE_CODE_GENERAL_USER_DATA_SIZE_ERROR: User data size error. Since 1.18.
- * @QMI_WMS_CDMA_CAUSE_CODE_GENERAL_OTHER: Other general error. Since 1.18.
- *
- * Cause codes when failed to send an SMS in CDMA.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- /* Network errors */
- QMI_WMS_CDMA_CAUSE_CODE_NETWORK_ADDRESS_VACANT = 0x00,
- QMI_WMS_CDMA_CAUSE_CODE_NETWORK_ADDRESS_TRANSLATION_FAILURE = 0x01,
- QMI_WMS_CDMA_CAUSE_CODE_NETWORK_RESOURCE_SHORTAGE = 0x02,
- QMI_WMS_CDMA_CAUSE_CODE_NETWORK_FAILURE = 0x03,
- QMI_WMS_CDMA_CAUSE_CODE_NETWORK_INVALID_TELESERVICE_ID = 0x04,
- QMI_WMS_CDMA_CAUSE_CODE_NETWORK_OTHER = 0x05,
-
- /* Destination errors */
- QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_NO_PAGE_RESPONSE = 0x20,
- QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_BUSY = 0x21,
- QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_NO_ACK = 0x22,
- QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_RESOURCE_SHORTAGE = 0x23,
- QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_SMS_DELIVERY_POSTPONED = 0x24,
- QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_OUT_OF_SERVICE = 0x25,
- QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_NOT_AT_ADDRESS = 0x26,
- QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_OTHER = 0x27,
-
- /* Radio Interface errors */
- QMI_WMS_CDMA_CAUSE_CODE_RADIO_INTERFACE_RESOURCE_SHORTAGE = 0x40,
- QMI_WMS_CDMA_CAUSE_CODE_RADIO_INTERFACE_INCOMPATIBILITY = 0x41,
- QMI_WMS_CDMA_CAUSE_CODE_RADIO_INTERFACE_OTHER = 0x42,
-
- /* General errors */
- QMI_WMS_CDMA_CAUSE_CODE_GENERAL_ENCODING = 0x60,
- QMI_WMS_CDMA_CAUSE_CODE_GENERAL_SMS_ORIGIN_DENIED = 0x61,
- QMI_WMS_CDMA_CAUSE_CODE_GENERAL_SMS_DESTINATION_DENIED = 0x62,
- QMI_WMS_CDMA_CAUSE_CODE_GENERAL_SUPPLEMENTARY_SERVICE_NOT_SUPPORTED = 0x63,
- QMI_WMS_CDMA_CAUSE_CODE_GENERAL_SMS_NOT_SUPPORTED = 0x64,
- QMI_WMS_CDMA_CAUSE_CODE_GENERAL_MISSING_EXPECTED_PARAMETER = 0x65,
- QMI_WMS_CDMA_CAUSE_CODE_GENERAL_MISSING_MANDATORY_PARAMETER = 0x66,
- QMI_WMS_CDMA_CAUSE_CODE_GENERAL_UNRECOGNIZED_PARAMETER_VALUE = 0x67,
- QMI_WMS_CDMA_CAUSE_CODE_GENERAL_UNEXPECTED_PARAMETER_VALUE = 0x68,
- QMI_WMS_CDMA_CAUSE_CODE_GENERAL_USER_DATA_SIZE_ERROR = 0x69,
- QMI_WMS_CDMA_CAUSE_CODE_GENERAL_OTHER = 0x6A
-} QmiWmsCdmaCauseCode;
-
-/**
- * QmiWmsCdmaErrorClass:
- * @QMI_WMS_CDMA_ERROR_CLASS_TEMPORARY: Temporary error reported by network.
- * @QMI_WMS_CDMA_ERROR_CLASS_PERMANENT: Permanent error reported by network.
- * @QMI_WMS_CDMA_ERROR_CLASS_TEMPORARY_DEVICE: Temporary error reported by device. Since 1.28.
- * @QMI_WMS_CDMA_ERROR_CLASS_PERMANENT_DEVICE: Permanent error reported by device. Since 1.28.
- *
- * Error class reported from the network when failed to send an SMS in CDMA,
- * or reported by the device when failed to process a transfer-only CDMA message.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_WMS_CDMA_ERROR_CLASS_TEMPORARY = 0x00,
- QMI_WMS_CDMA_ERROR_CLASS_PERMANENT = 0x01,
- QMI_WMS_CDMA_ERROR_CLASS_TEMPORARY_DEVICE = 0x02,
- QMI_WMS_CDMA_ERROR_CLASS_PERMANENT_DEVICE = 0x03,
-} QmiWmsCdmaErrorClass;
-
-/**
- * QmiWmsGsmUmtsRpCause:
- * @QMI_WMS_GSM_UMTS_RP_CAUSE_UNASSIGNED_NUMBER: Unassigned number.
- * @QMI_WMS_GSM_UMTS_RP_CAUSE_OPERATOR_DETERMINED_BARRING: Operator determined barring.
- * @QMI_WMS_GSM_UMTS_RP_CAUSE_CALL_BARRED: Call barred.
- * @QMI_WMS_GSM_UMTS_RP_CAUSE_RESERVED: Reserved.
- * @QMI_WMS_GSM_UMTS_RP_CAUSE_SMS_TRANSFER_REJECTED: SMS transfer rejected.
- * @QMI_WMS_GSM_UMTS_RP_CAUSE_MEMORY_CAPACITY_EXCEEDED: Memory capacity exceeded.
- * @QMI_WMS_GSM_UMTS_RP_CAUSE_DESTINATION_OUT_OF_ORDER: Destination out of order.
- * @QMI_WMS_GSM_UMTS_RP_CAUSE_UNIDENTIFIED_SUBSCRIBER: Unidentified subscriber.
- * @QMI_WMS_GSM_UMTS_RP_CAUSE_FACILITY_REJECTED: Facility rejected.
- * @QMI_WMS_GSM_UMTS_RP_CAUSE_UNKNOWN_SUBSCRIBER: Unknown subscriber.
- * @QMI_WMS_GSM_UMTS_RP_CAUSE_NETWORK_OUF_OF_ORDER: Network out of order.
- * @QMI_WMS_GSM_UMTS_RP_CAUSE_TEMPORARY_FAILURE: Temporary failure.
- * @QMI_WMS_GSM_UMTS_RP_CAUSE_CONGESTION: Congestion.
- * @QMI_WMS_GSM_UMTS_RP_CAUSE_RESOURCES_UNAVAILABLE: Resources unavailable.
- * @QMI_WMS_GSM_UMTS_RP_CAUSE_FACILITY_NOT_SUBSCRIBED: Facility not subscribed.
- * @QMI_WMS_GSM_UMTS_RP_CAUSE_FACILITY_NOT_IMPLEMENTED: Facility not implemented.
- * @QMI_WMS_GSM_UMTS_RP_CAUSE_INVALID_SMS_TRANSFER_REFERENCE_VALUE: Invalid SMS transfer reference value.
- * @QMI_WMS_GSM_UMTS_RP_CAUSE_SEMANTICALLY_INCORRECT_MESSAGE: Semantically incorrect message.
- * @QMI_WMS_GSM_UMTS_RP_CAUSE_INVALID_MANDATORY_INFO: Invalid mandatory info.
- * @QMI_WMS_GSM_UMTS_RP_CAUSE_MESSAGE_TYPE_NOT_IMPLEMENTED: Message type not implemented.
- * @QMI_WMS_GSM_UMTS_RP_CAUSE_MESSAGE_NOT_COMPATIBLE_WITH_SMS: Message not compatible with SMS.
- * @QMI_WMS_GSM_UMTS_RP_CAUSE_INFORMATION_ELEMENT_NOT_IMPLEMENTED: Information element not implemented.
- * @QMI_WMS_GSM_UMTS_RP_CAUSE_PROTOCOL_ERROR: Protocol error.
- * @QMI_WMS_GSM_UMTS_RP_CAUSE_INTERWORKING: Interworking error.
- *
- * RP cause codes when failed to send an SMS in GSM/WCDMA.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_WMS_GSM_UMTS_RP_CAUSE_UNASSIGNED_NUMBER = 0x01,
- QMI_WMS_GSM_UMTS_RP_CAUSE_OPERATOR_DETERMINED_BARRING = 0x08,
- QMI_WMS_GSM_UMTS_RP_CAUSE_CALL_BARRED = 0x0A,
- QMI_WMS_GSM_UMTS_RP_CAUSE_RESERVED = 0x0B,
- QMI_WMS_GSM_UMTS_RP_CAUSE_SMS_TRANSFER_REJECTED = 0x15,
- QMI_WMS_GSM_UMTS_RP_CAUSE_MEMORY_CAPACITY_EXCEEDED = 0x16,
- QMI_WMS_GSM_UMTS_RP_CAUSE_DESTINATION_OUT_OF_ORDER = 0x1B,
- QMI_WMS_GSM_UMTS_RP_CAUSE_UNIDENTIFIED_SUBSCRIBER = 0x1C,
- QMI_WMS_GSM_UMTS_RP_CAUSE_FACILITY_REJECTED = 0x1D,
- QMI_WMS_GSM_UMTS_RP_CAUSE_UNKNOWN_SUBSCRIBER = 0x1E,
- QMI_WMS_GSM_UMTS_RP_CAUSE_NETWORK_OUF_OF_ORDER = 0x20,
- QMI_WMS_GSM_UMTS_RP_CAUSE_TEMPORARY_FAILURE = 0x21,
- QMI_WMS_GSM_UMTS_RP_CAUSE_CONGESTION = 0x2A,
- QMI_WMS_GSM_UMTS_RP_CAUSE_RESOURCES_UNAVAILABLE = 0x2F,
- QMI_WMS_GSM_UMTS_RP_CAUSE_FACILITY_NOT_SUBSCRIBED = 0x32,
- QMI_WMS_GSM_UMTS_RP_CAUSE_FACILITY_NOT_IMPLEMENTED = 0x45,
- QMI_WMS_GSM_UMTS_RP_CAUSE_INVALID_SMS_TRANSFER_REFERENCE_VALUE = 0x51,
- QMI_WMS_GSM_UMTS_RP_CAUSE_SEMANTICALLY_INCORRECT_MESSAGE = 0x5F,
- QMI_WMS_GSM_UMTS_RP_CAUSE_INVALID_MANDATORY_INFO = 0x60,
- QMI_WMS_GSM_UMTS_RP_CAUSE_MESSAGE_TYPE_NOT_IMPLEMENTED = 0x61,
- QMI_WMS_GSM_UMTS_RP_CAUSE_MESSAGE_NOT_COMPATIBLE_WITH_SMS = 0x62,
- QMI_WMS_GSM_UMTS_RP_CAUSE_INFORMATION_ELEMENT_NOT_IMPLEMENTED = 0x63,
- QMI_WMS_GSM_UMTS_RP_CAUSE_PROTOCOL_ERROR = 0x6F,
- QMI_WMS_GSM_UMTS_RP_CAUSE_INTERWORKING = 0x7F
-} QmiWmsGsmUmtsRpCause;
-
-/**
- * QmiWmsGsmUmtsTpCause:
- * @QMI_WMS_GSM_UMTS_TP_CAUSE_TELE_INTERWORKING_NOT_SUPPORTED: Tele interworking not supported.
- * @QMI_WMS_GSM_UMTS_TP_CAUSE_SHORT_MESSAGE_TYPE_0_NOT_SUPPORTED: Short message type 0 not supported.
- * @QMI_WMS_GSM_UMTS_TP_CAUSE_SHORT_MESSAGE_CANNOT_BE_REPLACED: Short message cannot be replaced.
- * @QMI_WMS_GSM_UMTS_TP_CAUSE_UNSPECIFIED_PID_ERROR: Unspecified TP-PID error.
- * @QMI_WMS_GSM_UMTS_TP_CAUSE_DCS_NOT_SUPPORTED: Data coding scheme not supported.
- * @QMI_WMS_GSM_UMTS_TP_CAUSE_MESSAGE_CLASS_NOT_SUPPORTED: Message class not supported.
- * @QMI_WMS_GSM_UMTS_TP_CAUSE_UNSPECIFIED_DCS_ERROR: Unspecified data coding scheme error.
- * @QMI_WMS_GSM_UMTS_TP_CAUSE_COMMAND_CANNOT_BE_ACTIONED: Command cannot be actioned.
- * @QMI_WMS_GSM_UMTS_TP_CAUSE_COMMAND_UNSUPPORTED: Command unsupported.
- * @QMI_WMS_GSM_UMTS_TP_CAUSE_UNSPECIFIED_COMMAND_ERROR: Unspecified command error.
- * @QMI_WMS_GSM_UMTS_TP_CAUSE_TPDU_NOT_SUPPORTED: TPDU not supported.
- * @QMI_WMS_GSM_UMTS_TP_CAUSE_SC_BUSY: SC busy.
- * @QMI_WMS_GSM_UMTS_TP_CAUSE_NO_SC_SUBSCRIPTION: No SC subscription.
- * @QMI_WMS_GSM_UMTS_TP_CAUSE_SC_SYSTEM_FAILURE: SC system failure.
- * @QMI_WMS_GSM_UMTS_TP_CAUSE_INVALID_SME_ADDRESS: Invalid SME address.
- * @QMI_WMS_GSM_UMTS_TP_CAUSE_DESTINATION_SME_BARRED: Destination SME barred.
- * @QMI_WMS_GSM_UMTS_TP_CAUSE_SM_REJECTED_OR_DUPLICATE: SM rejected or duplicate.
- * @QMI_WMS_GSM_UMTS_TP_CAUSE_VPF_NOT_SUPPORTED: TP-VPF not supported.
- * @QMI_WMS_GSM_UMTS_TP_CAUSE_VP_NOT_SUPPORTED: TP-VP not supported.
- * @QMI_WMS_GSM_UMTS_TP_CAUSE_SIM_SMS_STORAGE_FULL: SIM SMS storage full.
- * @QMI_WMS_GSM_UMTS_TP_CAUSE_NO_SMS_STORAGE_CAPABILITY_IN_SIM: No SMS storage capability in SIM.
- * @QMI_WMS_GSM_UMTS_TP_CAUSE_MS_ERROR: MS error.
- * @QMI_WMS_GSM_UMTS_TP_CAUSE_MEMORY_CAPACITY_EXCEEDED: Memory capacity exceeded.
- * @QMI_WMS_GSM_UMTS_TP_CAUSE_SIM_APPLICATION_TOOLKIT_BUSY: SIM application toolkit busy.
- * @QMI_WMS_GSM_UMTS_TP_CAUSE_SIM_DATA_DOWNLOAD_ERROR: SIM data download error.
- * @QMI_WMS_GSM_UMTS_TP_CAUSE_UNSPECIFIED_ERROR: Unspecified error.
- *
- * RT cause codes when failed to send an SMS in GSM/WCDMA.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_WMS_GSM_UMTS_TP_CAUSE_TELE_INTERWORKING_NOT_SUPPORTED = 0x80,
- QMI_WMS_GSM_UMTS_TP_CAUSE_SHORT_MESSAGE_TYPE_0_NOT_SUPPORTED = 0x81,
- QMI_WMS_GSM_UMTS_TP_CAUSE_SHORT_MESSAGE_CANNOT_BE_REPLACED = 0x82,
- QMI_WMS_GSM_UMTS_TP_CAUSE_UNSPECIFIED_PID_ERROR = 0x8F,
- QMI_WMS_GSM_UMTS_TP_CAUSE_DCS_NOT_SUPPORTED = 0x90,
- QMI_WMS_GSM_UMTS_TP_CAUSE_MESSAGE_CLASS_NOT_SUPPORTED = 0x91,
- QMI_WMS_GSM_UMTS_TP_CAUSE_UNSPECIFIED_DCS_ERROR = 0x9F,
- QMI_WMS_GSM_UMTS_TP_CAUSE_COMMAND_CANNOT_BE_ACTIONED = 0xA0,
- QMI_WMS_GSM_UMTS_TP_CAUSE_COMMAND_UNSUPPORTED = 0xA1,
- QMI_WMS_GSM_UMTS_TP_CAUSE_UNSPECIFIED_COMMAND_ERROR = 0xAF,
- QMI_WMS_GSM_UMTS_TP_CAUSE_TPDU_NOT_SUPPORTED = 0xB0,
- QMI_WMS_GSM_UMTS_TP_CAUSE_SC_BUSY = 0xC0,
- QMI_WMS_GSM_UMTS_TP_CAUSE_NO_SC_SUBSCRIPTION = 0xC1,
- QMI_WMS_GSM_UMTS_TP_CAUSE_SC_SYSTEM_FAILURE = 0xC2,
- QMI_WMS_GSM_UMTS_TP_CAUSE_INVALID_SME_ADDRESS = 0xC3,
- QMI_WMS_GSM_UMTS_TP_CAUSE_DESTINATION_SME_BARRED = 0xC4,
- QMI_WMS_GSM_UMTS_TP_CAUSE_SM_REJECTED_OR_DUPLICATE = 0xC5,
- QMI_WMS_GSM_UMTS_TP_CAUSE_VPF_NOT_SUPPORTED = 0xC6,
- QMI_WMS_GSM_UMTS_TP_CAUSE_VP_NOT_SUPPORTED = 0xC7,
- QMI_WMS_GSM_UMTS_TP_CAUSE_SIM_SMS_STORAGE_FULL = 0xD0,
- QMI_WMS_GSM_UMTS_TP_CAUSE_NO_SMS_STORAGE_CAPABILITY_IN_SIM = 0xD1,
- QMI_WMS_GSM_UMTS_TP_CAUSE_MS_ERROR = 0xD2,
- QMI_WMS_GSM_UMTS_TP_CAUSE_MEMORY_CAPACITY_EXCEEDED = 0xD3,
- QMI_WMS_GSM_UMTS_TP_CAUSE_SIM_APPLICATION_TOOLKIT_BUSY = 0xD4,
- QMI_WMS_GSM_UMTS_TP_CAUSE_SIM_DATA_DOWNLOAD_ERROR = 0xD5,
- QMI_WMS_GSM_UMTS_TP_CAUSE_UNSPECIFIED_ERROR = 0xFF
-} QmiWmsGsmUmtsTpCause;
-
-/**
- * QmiWmsMessageDeliveryFailureType:
- * @QMI_WMS_MESSAGE_DELIVERY_FAILURE_TYPE_TEMPORARY: Temporary failure.
- * @QMI_WMS_MESSAGE_DELIVERY_FAILURE_TYPE_PERMANENT: Permanent failure.
- *
- * Type of message delivery failure.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_WMS_MESSAGE_DELIVERY_FAILURE_TYPE_TEMPORARY = 0x00,
- QMI_WMS_MESSAGE_DELIVERY_FAILURE_TYPE_PERMANENT = 0x01
-} QmiWmsMessageDeliveryFailureType;
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI WMS Read Raw' request/response */
-
-/**
- * QmiWmsMessageTagType:
- * @QMI_WMS_MESSAGE_TAG_TYPE_MT_READ: Received SMS, already read.
- * @QMI_WMS_MESSAGE_TAG_TYPE_MT_NOT_READ: Received SMS, not read.
- * @QMI_WMS_MESSAGE_TAG_TYPE_MO_SENT: Sent SMS.
- * @QMI_WMS_MESSAGE_TAG_TYPE_MO_NOT_SENT: Not yet sent SMS.
- *
- * Type of message tag.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_WMS_MESSAGE_TAG_TYPE_MT_READ = 0x00,
- QMI_WMS_MESSAGE_TAG_TYPE_MT_NOT_READ = 0x01,
- QMI_WMS_MESSAGE_TAG_TYPE_MO_SENT = 0x02,
- QMI_WMS_MESSAGE_TAG_TYPE_MO_NOT_SENT = 0x03
-} QmiWmsMessageTagType;
-
-/**
- * QmiWmsMessageProtocol:
- * @QMI_WMS_MESSAGE_PROTOCOL_CDMA: CDMA.
- * @QMI_WMS_MESSAGE_PROTOCOL_WCDMA: WCDMA.
- *
- * Type of message protocol.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_WMS_MESSAGE_PROTOCOL_CDMA = 0x00,
- QMI_WMS_MESSAGE_PROTOCOL_WCDMA = 0x01
-} QmiWmsMessageProtocol;
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI WMS Set Routes' request/response */
-
-/**
- * QmiWmsMessageType:
- * @QMI_WMS_MESSAGE_TYPE_POINT_TO_POINT: Point to point message.
- *
- * Type of message.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_WMS_MESSAGE_TYPE_POINT_TO_POINT = 0x00
-} QmiWmsMessageType;
-
-/**
- * QmiWmsMessageClass:
- * @QMI_WMS_MESSAGE_CLASS_0: Class 0.
- * @QMI_WMS_MESSAGE_CLASS_1: Class 1.
- * @QMI_WMS_MESSAGE_CLASS_2: Class 2.
- * @QMI_WMS_MESSAGE_CLASS_3: Class 3.
- * @QMI_WMS_MESSAGE_CLASS_NONE: Class none.
- * @QMI_WMS_MESSAGE_CLASS_CDMA: Class CDMA.
- *
- * Message class.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_WMS_MESSAGE_CLASS_0 = 0x00,
- QMI_WMS_MESSAGE_CLASS_1 = 0x01,
- QMI_WMS_MESSAGE_CLASS_2 = 0x02,
- QMI_WMS_MESSAGE_CLASS_3 = 0x03,
- QMI_WMS_MESSAGE_CLASS_NONE = 0x04,
- QMI_WMS_MESSAGE_CLASS_CDMA = 0x05
-} QmiWmsMessageClass;
-
-/**
- * QmiWmsReceiptAction:
- * @QMI_WMS_RECEIPT_ACTION_DISCARD: Discard message.
- * @QMI_WMS_RECEIPT_ACTION_STORE_AND_NOTIFY: Store and notify to client.
- * @QMI_WMS_RECEIPT_ACTION_TRANSFER_ONLY: Notify to client, which should send back ACK.
- * @QMI_WMS_RECEIPT_ACTION_TRANSFER_AND_ACK: Notify to client and send back ACK.
- * @QMI_WMS_RECEIPT_ACTION_UNKNOWN: Unknown action.
- *
- * Action to perform when a message is received.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_WMS_RECEIPT_ACTION_DISCARD = 0x00,
- QMI_WMS_RECEIPT_ACTION_STORE_AND_NOTIFY = 0x01,
- QMI_WMS_RECEIPT_ACTION_TRANSFER_ONLY = 0x02,
- QMI_WMS_RECEIPT_ACTION_TRANSFER_AND_ACK = 0x03,
- QMI_WMS_RECEIPT_ACTION_UNKNOWN = 0xFF
-} QmiWmsReceiptAction;
-
-/**
- * QmiWmsTransferIndication:
- * @QMI_WMS_TRANSFER_INDICATION_CLIENT: Status reports transferred to the client.
- *
- * Transfer indication actions.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_WMS_TRANSFER_INDICATION_CLIENT = 0x01
-} QmiWmsTransferIndication;
-
-/**
- * QmiWmsAckFailureCause:
- * @QMI_WMS_ACK_FAILURE_CAUSE_NO_NETWORK_RESPONSE: No network response.
- * @QMI_WMS_ACK_FAILURE_CAUSE_NETWORK_RELEASED_LINK: Network released link.
- * @QMI_WMS_ACK_FAILURE_CAUSE_NOT_SENT: Not sent.
- *
- * Ack failure cause.
- *
- * Since: 1.28
- */
-typedef enum { /*< since=1.28 >*/
- QMI_WMS_ACK_FAILURE_CAUSE_NO_NETWORK_RESPONSE = 0x00,
- QMI_WMS_ACK_FAILURE_CAUSE_NETWORK_RELEASED_LINK = 0x01,
- QMI_WMS_ACK_FAILURE_CAUSE_NOT_SENT = 0x02,
-} QmiWmsAckFailureCause;
-
-#endif /* _LIBQMI_GLIB_QMI_ENUMS_WMS_H_ */
+++ /dev/null
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * uqmi -- tiny QMI support implementation
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA.
- *
- * Copyright (C) 2012 Google, Inc.
- * Copyright (C) 2012-2017 Aleksander Morgado <aleksander@aleksander.es>
- */
-
-#ifndef _LIBQMI_GLIB_QMI_ENUMS_H_
-#define _LIBQMI_GLIB_QMI_ENUMS_H_
-
-/**
- * SECTION: qmi-enums
- *
- * This section defines common enumerations and flags used in the interface.
- */
-
-/**
- * QmiService:
- * @QMI_SERVICE_UNKNOWN: Unknown service.
- * @QMI_SERVICE_CTL: Control service.
- * @QMI_SERVICE_WDS: Wireless Data Service.
- * @QMI_SERVICE_DMS: Device Management Service.
- * @QMI_SERVICE_NAS: Network Access Service.
- * @QMI_SERVICE_QOS: Quality Of Service service.
- * @QMI_SERVICE_WMS: Wireless Messaging Service.
- * @QMI_SERVICE_PDS: Position Determination Service.
- * @QMI_SERVICE_AUTH: Authentication service.
- * @QMI_SERVICE_AT: AT service.
- * @QMI_SERVICE_VOICE: Voice service.
- * @QMI_SERVICE_CAT2: Card Application Toolkit service (v2).
- * @QMI_SERVICE_UIM: User Identity Module service.
- * @QMI_SERVICE_PBM: Phonebook Management service.
- * @QMI_SERVICE_QCHAT: QCHAT service. Since: 1.8.
- * @QMI_SERVICE_RMTFS: Remote file system service.
- * @QMI_SERVICE_TEST: Test service. Since: 1.8.
- * @QMI_SERVICE_LOC: Location service (~ PDS v2).
- * @QMI_SERVICE_SAR: Service access proxy service.
- * @QMI_SERVICE_IMS: IMS settings service. Since: 1.8.
- * @QMI_SERVICE_ADC: Analog to digital converter driver service. Since: 1.8.
- * @QMI_SERVICE_CSD: Core sound driver service. Since: 1.8.
- * @QMI_SERVICE_MFS: Modem embedded file system service. Since: 1.8.
- * @QMI_SERVICE_TIME: Time service. Since: 1.8.
- * @QMI_SERVICE_TS: Thermal sensors service. Since: 1.8.
- * @QMI_SERVICE_TMD: Thermal mitigation device service. Since: 1.8.
- * @QMI_SERVICE_SAP: Service access proxy service. Since: 1.8.
- * @QMI_SERVICE_WDA: Wireless data administrative service. Since: 1.8.
- * @QMI_SERVICE_TSYNC: TSYNC control service. Since: 1.8.
- * @QMI_SERVICE_RFSA: Remote file system access service. Since: 1.8.
- * @QMI_SERVICE_CSVT: Circuit switched videotelephony service. Since: 1.8.
- * @QMI_SERVICE_QCMAP: Qualcomm mobile access point service. Since: 1.8.
- * @QMI_SERVICE_IMSP: IMS presence service. Since: 1.8.
- * @QMI_SERVICE_IMSVT: IMS videotelephony service. Since: 1.8.
- * @QMI_SERVICE_IMSA: IMS application service. Since: 1.8.
- * @QMI_SERVICE_COEX: Coexistence service. Since: 1.8.
- * @QMI_SERVICE_PDC: Persistent device configuration service. Since: 1.8.
- * @QMI_SERVICE_STX: Simultaneous transmit service. Since: 1.8.
- * @QMI_SERVICE_BIT: Bearer independent transport service. Since: 1.8.
- * @QMI_SERVICE_IMSRTP: IMS RTP service. Since: 1.8.
- * @QMI_SERVICE_RFRPE: RF radiated performance enhancement service. Since: 1.8.
- * @QMI_SERVICE_DSD: Data system determination service. Since: 1.8.
- * @QMI_SERVICE_SSCTL: Subsystem control service. Since: 1.8.
- * @QMI_SERVICE_DPM: Data Port Mapper service. Since: 1.30.
- * @QMI_SERVICE_CAT: Card Application Toolkit service (v1).
- * @QMI_SERVICE_RMS: Remote Management Service.
- * @QMI_SERVICE_OMA: Open Mobile Alliance device management service.
- * @QMI_SERVICE_FOTA: Firmware Over The Air service. Since: 1.24.
- * @QMI_SERVICE_GMS: Telit General Modem Service. Since: 1.24.
- * @QMI_SERVICE_GAS: Telit General Application Service. Since: 1.24.
- *
- * QMI services.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_SERVICE_UNKNOWN = -1,
- QMI_SERVICE_CTL = 0x00,
- QMI_SERVICE_WDS = 0x01,
- QMI_SERVICE_DMS = 0x02,
- QMI_SERVICE_NAS = 0x03,
- QMI_SERVICE_QOS = 0x04,
- QMI_SERVICE_WMS = 0x05,
- QMI_SERVICE_PDS = 0x06,
- QMI_SERVICE_AUTH = 0x07,
- QMI_SERVICE_AT = 0x08,
- QMI_SERVICE_VOICE = 0x09,
- QMI_SERVICE_CAT2 = 0x0A,
- QMI_SERVICE_UIM = 0x0B,
- QMI_SERVICE_PBM = 0x0C,
- QMI_SERVICE_QCHAT = 0x0D,
- QMI_SERVICE_RMTFS = 0x0E,
- QMI_SERVICE_TEST = 0x0F,
- QMI_SERVICE_LOC = 0x10,
- QMI_SERVICE_SAR = 0x11,
- QMI_SERVICE_IMS = 0x12,
- QMI_SERVICE_ADC = 0x13,
- QMI_SERVICE_CSD = 0x14,
- QMI_SERVICE_MFS = 0x15,
- QMI_SERVICE_TIME = 0x16,
- QMI_SERVICE_TS = 0x17,
- QMI_SERVICE_TMD = 0x18,
- QMI_SERVICE_SAP = 0x19,
- QMI_SERVICE_WDA = 0x1A,
- QMI_SERVICE_TSYNC = 0x1B,
- QMI_SERVICE_RFSA = 0x1C,
- QMI_SERVICE_CSVT = 0x1D,
- QMI_SERVICE_QCMAP = 0x1E,
- QMI_SERVICE_IMSP = 0x1F,
- QMI_SERVICE_IMSVT = 0x20,
- QMI_SERVICE_IMSA = 0x21,
- QMI_SERVICE_COEX = 0x22,
- /* 0x23, reserved */
- QMI_SERVICE_PDC = 0x24,
- /* 0x25, reserved */
- QMI_SERVICE_STX = 0x26,
- QMI_SERVICE_BIT = 0x27,
- QMI_SERVICE_IMSRTP = 0x28,
- QMI_SERVICE_RFRPE = 0x29,
- QMI_SERVICE_DSD = 0x2A,
- QMI_SERVICE_SSCTL = 0x2B,
- QMI_SERVICE_DPM = 0x2F,
- QMI_SERVICE_CAT = 0xE0,
- QMI_SERVICE_RMS = 0xE1,
- QMI_SERVICE_OMA = 0xE2,
- QMI_SERVICE_FOTA = 0xE6,
- QMI_SERVICE_GMS = 0xE7,
- QMI_SERVICE_GAS = 0xE8,
-} QmiService;
-
-/**
- * QmiEndian:
- * @QMI_ENDIAN_LITTLE: Little endian.
- * @QMI_ENDIAN_BIG: Big endian.
- *
- * Type of endianness.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.28 >*/ /* the get_string() helper and QmiEndian type added in 1.28 */
- QMI_ENDIAN_LITTLE = 0,
- QMI_ENDIAN_BIG = 1
-} QmiEndian;
-
-/**
- * QmiDataEndpointType:
- * @QMI_DATA_ENDPOINT_TYPE_UNKNOWN: Unknown. Since 1.30.
- * @QMI_DATA_ENDPOINT_TYPE_HSIC: High-speed inter-chip interface. Since 1.30.
- * @QMI_DATA_ENDPOINT_TYPE_HSUSB: High-speed USB.
- * @QMI_DATA_ENDPOINT_TYPE_PCIE: PCIe. Since: 1.28.
- * @QMI_DATA_ENDPOINT_TYPE_EMBEDDED: Embedded. Since 1.28.
- * @QMI_DATA_ENDPOINT_TYPE_BAM_DMUX: BAM/DMUX. Since 1.30.
- * @QMI_DATA_ENDPOINT_TYPE_UNDEFINED: Undefined.
- *
- * Data Endpoint Type.
- *
- * Since: 1.18
- */
-typedef enum { /*< since=1.18 >*/
- QMI_DATA_ENDPOINT_TYPE_UNKNOWN = 0x00,
- QMI_DATA_ENDPOINT_TYPE_HSIC = 0x01,
- QMI_DATA_ENDPOINT_TYPE_HSUSB = 0x02,
- QMI_DATA_ENDPOINT_TYPE_PCIE = 0x03,
- QMI_DATA_ENDPOINT_TYPE_EMBEDDED = 0x04,
- QMI_DATA_ENDPOINT_TYPE_BAM_DMUX = 0x05,
- QMI_DATA_ENDPOINT_TYPE_UNDEFINED = 0xFF,
-} QmiDataEndpointType;
-
-/**
- * QmiSioPort:
- * @QMI_SIO_PORT_NONE: Invalid port number.
- * @QMI_SIO_PORT_A2_MUX_RMNET0: A2 MUX (BAM-DMUX) port for rmnet0.
- * @QMI_SIO_PORT_A2_MUX_RMNET1: A2 MUX (BAM-DMUX) port for rmnet1.
- * @QMI_SIO_PORT_A2_MUX_RMNET2: A2 MUX (BAM-DMUX) port for rmnet2.
- * @QMI_SIO_PORT_A2_MUX_RMNET3: A2 MUX (BAM-DMUX) port for rmnet3.
- * @QMI_SIO_PORT_A2_MUX_RMNET4: A2 MUX (BAM-DMUX) port for rmnet4.
- * @QMI_SIO_PORT_A2_MUX_RMNET5: A2 MUX (BAM-DMUX) port for rmnet5.
- * @QMI_SIO_PORT_A2_MUX_RMNET6: A2 MUX (BAM-DMUX) port for rmnet6.
- * @QMI_SIO_PORT_A2_MUX_RMNET7: A2 MUX (BAM-DMUX) port for rmnet7.
- *
- * SIO (serial I/O) port numbers. All ports available in the modem have a SIO
- * port number. This enum is incomplete, only few port numbers are publicly
- * known.
- *
- * Since: 1.28
- */
-typedef enum { /*< since=1.28 >*/
- QMI_SIO_PORT_NONE = 0x0000,
- QMI_SIO_PORT_A2_MUX_RMNET0 = 0x0e04,
- QMI_SIO_PORT_A2_MUX_RMNET1 = 0x0e05,
- QMI_SIO_PORT_A2_MUX_RMNET2 = 0x0e06,
- QMI_SIO_PORT_A2_MUX_RMNET3 = 0x0e07,
- QMI_SIO_PORT_A2_MUX_RMNET4 = 0x0e08,
- QMI_SIO_PORT_A2_MUX_RMNET5 = 0x0e09,
- QMI_SIO_PORT_A2_MUX_RMNET6 = 0x0e0a,
- QMI_SIO_PORT_A2_MUX_RMNET7 = 0x0e0b,
-} QmiSioPort;
-
-#endif /* _LIBQMI_GLIB_QMI_ENUMS_H_ */
+++ /dev/null
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * libqmi-glib -- GLib/GIO based library to control QMI devices
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA.
- *
- * Copyright (C) 2012 Lanedo GmbH.
- * Copyright (C) 2012 Google, Inc.
- * Copyright (C) 2012-2017 Aleksander Morgado <aleksander@aleksander.es>
- */
-
-#ifndef _LIBQMI_GLIB_QMI_FLAGS64_DMS_H_
-#define _LIBQMI_GLIB_QMI_FLAGS64_DMS_H_
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI DMS Get Band Capability' message */
-
-/**
- * QmiDmsBandCapability:
- * @QMI_DMS_BAND_CAPABILITY_BC_0_A_SYSTEM: Band class 0, A-system.
- * @QMI_DMS_BAND_CAPABILITY_BC_0_B_SYSTEM: Band class 0, B-system.
- * @QMI_DMS_BAND_CAPABILITY_BC_1_ALL_BLOCKS: Band class 1, all blocks.
- * @QMI_DMS_BAND_CAPABILITY_BC_2: Band class 2.
- * @QMI_DMS_BAND_CAPABILITY_BC_3_A_SYSTEM: Band class 3, A-system.
- * @QMI_DMS_BAND_CAPABILITY_BC_4_ALL_BLOCKS: Band class 4, all blocks.
- * @QMI_DMS_BAND_CAPABILITY_BC_5_ALL_BLOCKS: Band class 5, all blocks.
- * @QMI_DMS_BAND_CAPABILITY_BC_6: Band class 6.
- * @QMI_DMS_BAND_CAPABILITY_BC_7: Band class 7.
- * @QMI_DMS_BAND_CAPABILITY_BC_8: Band class 8.
- * @QMI_DMS_BAND_CAPABILITY_BC_9: Band class 9.
- * @QMI_DMS_BAND_CAPABILITY_BC_10: Band class 10.
- * @QMI_DMS_BAND_CAPABILITY_BC_11: Band class 11.
- * @QMI_DMS_BAND_CAPABILITY_BC_12: Band class 12.
- * @QMI_DMS_BAND_CAPABILITY_BC_14: Band class 14.
- * @QMI_DMS_BAND_CAPABILITY_BC_15: Band class 15.
- * @QMI_DMS_BAND_CAPABILITY_BC_16: Band class 16.
- * @QMI_DMS_BAND_CAPABILITY_BC_17: Band class 17.
- * @QMI_DMS_BAND_CAPABILITY_BC_18: Band class 18.
- * @QMI_DMS_BAND_CAPABILITY_BC_19: Band class 19.
- * @QMI_DMS_BAND_CAPABILITY_GSM_DCS_1800: GSM DCS band.
- * @QMI_DMS_BAND_CAPABILITY_GSM_900_EXTENDED: GSM Extended GSM band (900).
- * @QMI_DMS_BAND_CAPABILITY_GSM_900_PRIMARY: GSM Primary GSM band (900).
- * @QMI_DMS_BAND_CAPABILITY_GSM_450: GSM 450 band.
- * @QMI_DMS_BAND_CAPABILITY_GSM_480: GSM 480 band.
- * @QMI_DMS_BAND_CAPABILITY_GSM_750: GSM 750 band.
- * @QMI_DMS_BAND_CAPABILITY_GSM_850: GSM 850 band.
- * @QMI_DMS_BAND_CAPABILITY_GSM_900_RAILWAYS: GSM railways band (900).
- * @QMI_DMS_BAND_CAPABILITY_GSM_PCS_1900: GSM PCS band (1900).
- * @QMI_DMS_BAND_CAPABILITY_WCDMA_2100: WCDMA 2100 band (Europe, Japan, China).
- * @QMI_DMS_BAND_CAPABILITY_WCDMA_PCS_1900: WCDMA PCS 1900 band (US).
- * @QMI_DMS_BAND_CAPABILITY_WCDMA_DCS_1800: WCDMA DCS 1800 band (Europe, China).
- * @QMI_DMS_BAND_CAPABILITY_WCDMA_1700_US: WCDMA 1700 band (US).
- * @QMI_DMS_BAND_CAPABILITY_WCDMA_850_US: WCDMA 850 band (US).
- * @QMI_DMS_BAND_CAPABILITY_WCDMA_800: QWCDMA 850 band (Japan).
- * @QMI_DMS_BAND_CAPABILITY_WCDMA_2600: WCDMA 2600 band (Europe).
- * @QMI_DMS_BAND_CAPABILITY_WCDMA_900: WCDMA 900 band (Europe, Japan).
- * @QMI_DMS_BAND_CAPABILITY_WCDMA_1700_JAPAN: WCDMA 1700 band (Japan).
- * @QMI_DMS_BAND_CAPABILITY_WCDMA_850_JAPAN: WCDMA 850 band (Japan)
- * @QMI_DMS_BAND_CAPABILITY_WCDMA_1500: WCDMA 1500 band.
- *
- * Frequency band capabilities.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_DMS_BAND_CAPABILITY_BC_0_A_SYSTEM = 1 << 0,
- QMI_DMS_BAND_CAPABILITY_BC_0_B_SYSTEM = 1 << 1,
- QMI_DMS_BAND_CAPABILITY_BC_1_ALL_BLOCKS = 1 << 2,
- QMI_DMS_BAND_CAPABILITY_BC_2 = 1 << 3,
- QMI_DMS_BAND_CAPABILITY_BC_3_A_SYSTEM = 1 << 4,
- QMI_DMS_BAND_CAPABILITY_BC_4_ALL_BLOCKS = 1 << 5,
- QMI_DMS_BAND_CAPABILITY_BC_5_ALL_BLOCKS = 1 << 6,
- QMI_DMS_BAND_CAPABILITY_GSM_DCS_1800 = 1 << 7,
- QMI_DMS_BAND_CAPABILITY_GSM_900_EXTENDED = 1 << 8,
- QMI_DMS_BAND_CAPABILITY_GSM_900_PRIMARY = 1 << 9,
- QMI_DMS_BAND_CAPABILITY_BC_6 = 1 << 10,
- QMI_DMS_BAND_CAPABILITY_BC_7 = 1 << 11,
- QMI_DMS_BAND_CAPABILITY_BC_8 = 1 << 12,
- QMI_DMS_BAND_CAPABILITY_BC_9 = 1 << 13,
- QMI_DMS_BAND_CAPABILITY_BC_10 = 1 << 14,
- QMI_DMS_BAND_CAPABILITY_BC_11 = 1 << 15,
- QMI_DMS_BAND_CAPABILITY_GSM_450 = 1 << 16,
- QMI_DMS_BAND_CAPABILITY_GSM_480 = 1 << 17,
- QMI_DMS_BAND_CAPABILITY_GSM_750 = 1 << 18,
- QMI_DMS_BAND_CAPABILITY_GSM_850 = 1 << 19,
- QMI_DMS_BAND_CAPABILITY_GSM_900_RAILWAYS = 1 << 20,
- QMI_DMS_BAND_CAPABILITY_GSM_PCS_1900 = 1 << 21,
- QMI_DMS_BAND_CAPABILITY_WCDMA_2100 = 1 << 22,
- QMI_DMS_BAND_CAPABILITY_WCDMA_PCS_1900 = 1 << 23,
- QMI_DMS_BAND_CAPABILITY_WCDMA_DCS_1800 = 1 << 24,
- QMI_DMS_BAND_CAPABILITY_WCDMA_1700_US = 1 << 25,
- QMI_DMS_BAND_CAPABILITY_WCDMA_850_US = 1 << 26,
- QMI_DMS_BAND_CAPABILITY_WCDMA_800 = 1 << 27,
- QMI_DMS_BAND_CAPABILITY_BC_12 = 1 << 28,
- QMI_DMS_BAND_CAPABILITY_BC_14 = 1 << 29,
- /* Bit 30 reserved */
- QMI_DMS_BAND_CAPABILITY_BC_15 = ((uint64_t) 1) << 31,
- /* Bits 32-47 reserved */
- QMI_DMS_BAND_CAPABILITY_WCDMA_2600 = ((uint64_t) 1) << 48,
- QMI_DMS_BAND_CAPABILITY_WCDMA_900 = ((uint64_t) 1) << 49,
- QMI_DMS_BAND_CAPABILITY_WCDMA_1700_JAPAN = ((uint64_t) 1) << 50,
- /* Bits 51-55 reserved */
- QMI_DMS_BAND_CAPABILITY_BC_16 = ((uint64_t) 1) << 56,
- QMI_DMS_BAND_CAPABILITY_BC_17 = ((uint64_t) 1) << 57,
- QMI_DMS_BAND_CAPABILITY_BC_18 = ((uint64_t) 1) << 58,
- QMI_DMS_BAND_CAPABILITY_BC_19 = ((uint64_t) 1) << 59,
- QMI_DMS_BAND_CAPABILITY_WCDMA_850_JAPAN = ((uint64_t) 1) << 60,
- QMI_DMS_BAND_CAPABILITY_WCDMA_1500 = ((uint64_t) 1) << 61
- /* Bits 62-63 reserved */
-} QmiDmsBandCapability;
-
-/**
- * QmiDmsLteBandCapability:
- * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_1: LTE EUTRAN Band 1
- * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_2: LTE EUTRAN Band 2.
- * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_3: LTE EUTRAN Band 3.
- * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_4: LTE EUTRAN Band 4.
- * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_5: LTE EUTRAN Band 5.
- * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_6: LTE EUTRAN Band 6.
- * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_7: LTE EUTRAN Band 7.
- * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_8: LTE EUTRAN Band 8.
- * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_9: LTE EUTRAN Band 9.
- * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_10: LTE EUTRAN Band 10.
- * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_11: LTE EUTRAN Band 11.
- * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_12: LTE EUTRAN Band 12.
- * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_13: LTE EUTRAN Band 13.
- * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_14: LTE EUTRAN Band 14.
- * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_17: LTE EUTRAN Band 17.
- * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_18: LTE EUTRAN Band 18.
- * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_19: LTE EUTRAN Band 19.
- * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_20: LTE EUTRAN Band 20.
- * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_21: LTE EUTRAN Band 21.
- * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_24: LTE EUTRAN Band 24.
- * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_25: LTE EUTRAN Band 25.
- * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_26: LTE EUTRAN Band 26.
- * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_27: LTE EUTRAN Band 27.
- * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_28: LTE EUTRAN Band 28.
- * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_29: LTE EUTRAN Band 29.
- * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_30: LTE EUTRAN Band 30.
- * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_31: LTE EUTRAN Band 31.
- * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_32: LTE EUTRAN Band 32.
- * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_33: LTE EUTRAN Band 33.
- * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_34: LTE EUTRAN Band 34.
- * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_35: LTE EUTRAN Band 35.
- * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_36: LTE EUTRAN Band 36.
- * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_37: LTE EUTRAN Band 37.
- * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_38: LTE EUTRAN Band 38.
- * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_39: LTE EUTRAN Band 39.
- * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_40: LTE EUTRAN Band 40.
- * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_41: LTE EUTRAN Band 41.
- * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_42: LTE EUTRAN Band 42.
- * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_43: LTE EUTRAN Band 43.
- *
- * LTE-specific Frequency bands.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_1 = 1 << 0,
- QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_2 = 1 << 1,
- QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_3 = 1 << 2,
- QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_4 = 1 << 3,
- QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_5 = 1 << 4,
- QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_6 = 1 << 5,
- QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_7 = 1 << 6,
- QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_8 = 1 << 7,
- QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_9 = 1 << 8,
- QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_10 = 1 << 9,
- QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_11 = 1 << 10,
- QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_12 = 1 << 11,
- QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_13 = 1 << 12,
- QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_14 = 1 << 13,
- /* Bit 14-15 reserved */
- QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_17 = 1 << 16,
- QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_18 = 1 << 17,
- QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_19 = 1 << 18,
- QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_20 = 1 << 19,
- QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_21 = 1 << 20,
- /* Bit 21-22 reserved */
- QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_24 = 1 << 23,
- QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_25 = 1 << 24,
- QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_26 = 1 << 25,
- QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_27 = 1 << 26,
- QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_28 = 1 << 27,
- QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_29 = 1 << 28,
- QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_30 = 1 << 29,
- QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_31 = 1 << 30,
- QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_32 = ((uint64_t) 1) << 31,
- QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_33 = ((uint64_t) 1) << 32,
- QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_34 = ((uint64_t) 1) << 33,
- QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_35 = ((uint64_t) 1) << 34,
- QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_36 = ((uint64_t) 1) << 35,
- QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_37 = ((uint64_t) 1) << 36,
- QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_38 = ((uint64_t) 1) << 37,
- QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_39 = ((uint64_t) 1) << 38,
- QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_40 = ((uint64_t) 1) << 39,
- QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_41 = ((uint64_t) 1) << 40,
- QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_42 = ((uint64_t) 1) << 41,
- QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_43 = ((uint64_t) 1) << 42
- /* Bit 43-64 reserved */
-} QmiDmsLteBandCapability;
-
-#endif /* _LIBQMI_GLIB_QMI_FLAGS64_DMS_H_ */
+++ /dev/null
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * libqmi-glib -- GLib/GIO based library to control QMI devices
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA.
- *
- * Copyright (C) 2012 Google Inc.
- * Copyright (C) 2012-2017 Aleksander Morgado <aleksander@aleksander.es>
- */
-
-#ifndef _LIBQMI_GLIB_QMI_FLAGS64_NAS_H_
-#define _LIBQMI_GLIB_QMI_FLAGS64_NAS_H_
-
-/*****************************************************************************/
-/* Helper enums for the 'QMI NAS Get System Selection Preference'
- * request/response */
-
-/**
- * QmiNasBandPreference:
- * @QMI_NAS_BAND_PREFERENCE_BC_0_A_SYSTEM: Band class 0, A system.
- * @QMI_NAS_BAND_PREFERENCE_BC_0_B_SYSTEM: Band class 0, B system.
- * @QMI_NAS_BAND_PREFERENCE_BC_1_ALL_BLOCKS: Band class 1.
- * @QMI_NAS_BAND_PREFERENCE_BC_2: Band class 2.
- * @QMI_NAS_BAND_PREFERENCE_BC_3_A_SYSTEM: Band class 3, A system.
- * @QMI_NAS_BAND_PREFERENCE_BC_4_ALL_BLOCKS: Band class 4, all blocks.
- * @QMI_NAS_BAND_PREFERENCE_BC_5_ALL_BLOCKS: Band class 5, all blocks.
- * @QMI_NAS_BAND_PREFERENCE_BC_6: Band class 6.
- * @QMI_NAS_BAND_PREFERENCE_BC_7: Band class 7.
- * @QMI_NAS_BAND_PREFERENCE_BC_8: Band class 8.
- * @QMI_NAS_BAND_PREFERENCE_BC_9: Band class 9.
- * @QMI_NAS_BAND_PREFERENCE_BC_10: Band class 10.
- * @QMI_NAS_BAND_PREFERENCE_BC_11: Band class 11.
- * @QMI_NAS_BAND_PREFERENCE_BC_12: Band class 12.
- * @QMI_NAS_BAND_PREFERENCE_BC_14: Band class 14.
- * @QMI_NAS_BAND_PREFERENCE_BC_15: Band class 15.
- * @QMI_NAS_BAND_PREFERENCE_BC_16: Band class 16.
- * @QMI_NAS_BAND_PREFERENCE_BC_17: Band class 17.
- * @QMI_NAS_BAND_PREFERENCE_BC_18: Band class 18.
- * @QMI_NAS_BAND_PREFERENCE_BC_19: Band class 19.
- * @QMI_NAS_BAND_PREFERENCE_GSM_DCS_1800: GSM DCS 1800 band.
- * @QMI_NAS_BAND_PREFERENCE_GSM_900_EXTENDED: Extended GSM 900 band.
- * @QMI_NAS_BAND_PREFERENCE_GSM_900_PRIMARY: Primary GSM 900 band.
- * @QMI_NAS_BAND_PREFERENCE_GSM_450: GSM 450.
- * @QMI_NAS_BAND_PREFERENCE_GSM_480: GSM 480.
- * @QMI_NAS_BAND_PREFERENCE_GSM_750: GSM 750.
- * @QMI_NAS_BAND_PREFERENCE_GSM_850: GSM 850.
- * @QMI_NAS_BAND_PREFERENCE_GSM_900_RAILWAYS: GSM 900 (Railways).
- * @QMI_NAS_BAND_PREFERENCE_GSM_PCS_1900: GSM 1900.
- * @QMI_NAS_BAND_PREFERENCE_WCDMA_2100: WCDMA 2100.
- * @QMI_NAS_BAND_PREFERENCE_WCDMA_PCS_1900: WCDMA PCS 1900.
- * @QMI_NAS_BAND_PREFERENCE_WCDMA_DCS_1800: WCDMA DCS 1800.
- * @QMI_NAS_BAND_PREFERENCE_WCDMA_1700_US: WCDMA 1700 (U.S.).
- * @QMI_NAS_BAND_PREFERENCE_WCDMA_850_US: WCDMA 850.
- * @QMI_NAS_BAND_PREFERENCE_WCDMA_800: WCDMA 800.
- * @QMI_NAS_BAND_PREFERENCE_WCDMA_2600: WCDMA 2600.
- * @QMI_NAS_BAND_PREFERENCE_WCDMA_900: WCDMA 900.
- * @QMI_NAS_BAND_PREFERENCE_WCDMA_1700_JAPAN: WCDMA 1700 (Japan).
- * @QMI_NAS_BAND_PREFERENCE_WCDMA_850_JAPAN: WCDMA 850 (Japan). Since: 1.22.
- * @QMI_NAS_BAND_PREFERENCE_WCDMA_1500: WCDMA 1500. Since: 1.22.
- *
- * Flags to specify frequency band preferences.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_NAS_BAND_PREFERENCE_BC_0_A_SYSTEM = 1 << 0,
- QMI_NAS_BAND_PREFERENCE_BC_0_B_SYSTEM = 1 << 1,
- QMI_NAS_BAND_PREFERENCE_BC_1_ALL_BLOCKS = 1 << 2,
- QMI_NAS_BAND_PREFERENCE_BC_2 = 1 << 3,
- QMI_NAS_BAND_PREFERENCE_BC_3_A_SYSTEM = 1 << 4,
- QMI_NAS_BAND_PREFERENCE_BC_4_ALL_BLOCKS = 1 << 5,
- QMI_NAS_BAND_PREFERENCE_BC_5_ALL_BLOCKS = 1 << 6,
- QMI_NAS_BAND_PREFERENCE_GSM_DCS_1800 = 1 << 7,
- QMI_NAS_BAND_PREFERENCE_GSM_900_EXTENDED = 1 << 8,
- QMI_NAS_BAND_PREFERENCE_GSM_900_PRIMARY = 1 << 9,
- QMI_NAS_BAND_PREFERENCE_BC_6 = 1 << 10,
- QMI_NAS_BAND_PREFERENCE_BC_7 = 1 << 11,
- QMI_NAS_BAND_PREFERENCE_BC_8 = 1 << 12,
- QMI_NAS_BAND_PREFERENCE_BC_9 = 1 << 13,
- QMI_NAS_BAND_PREFERENCE_BC_10 = 1 << 14,
- QMI_NAS_BAND_PREFERENCE_BC_11 = 1 << 15,
- QMI_NAS_BAND_PREFERENCE_GSM_450 = 1 << 16,
- QMI_NAS_BAND_PREFERENCE_GSM_480 = 1 << 17,
- QMI_NAS_BAND_PREFERENCE_GSM_750 = 1 << 18,
- QMI_NAS_BAND_PREFERENCE_GSM_850 = 1 << 19,
- QMI_NAS_BAND_PREFERENCE_GSM_900_RAILWAYS = 1 << 20,
- QMI_NAS_BAND_PREFERENCE_GSM_PCS_1900 = 1 << 21,
- QMI_NAS_BAND_PREFERENCE_WCDMA_2100 = 1 << 22,
- QMI_NAS_BAND_PREFERENCE_WCDMA_PCS_1900 = 1 << 23,
- QMI_NAS_BAND_PREFERENCE_WCDMA_DCS_1800 = 1 << 24,
- QMI_NAS_BAND_PREFERENCE_WCDMA_1700_US = 1 << 25,
- QMI_NAS_BAND_PREFERENCE_WCDMA_850_US = 1 << 26,
- QMI_NAS_BAND_PREFERENCE_WCDMA_800 = 1 << 27,
- QMI_NAS_BAND_PREFERENCE_BC_12 = 1 << 28,
- QMI_NAS_BAND_PREFERENCE_BC_14 = 1 << 29,
- /* Bit 30 reserved */
- QMI_NAS_BAND_PREFERENCE_BC_15 = ((uint64_t) 1) << 31,
- /* Bits 32-47 reserved */
- QMI_NAS_BAND_PREFERENCE_WCDMA_2600 = ((uint64_t) 1) << 48,
- QMI_NAS_BAND_PREFERENCE_WCDMA_900 = ((uint64_t) 1) << 49,
- QMI_NAS_BAND_PREFERENCE_WCDMA_1700_JAPAN = ((uint64_t) 1) << 50,
- /* Bits 51-55 reserved */
- QMI_NAS_BAND_PREFERENCE_BC_16 = ((uint64_t) 1) << 56,
- QMI_NAS_BAND_PREFERENCE_BC_17 = ((uint64_t) 1) << 57,
- QMI_NAS_BAND_PREFERENCE_BC_18 = ((uint64_t) 1) << 58,
- QMI_NAS_BAND_PREFERENCE_BC_19 = ((uint64_t) 1) << 59,
- QMI_NAS_BAND_PREFERENCE_WCDMA_850_JAPAN = ((uint64_t) 1) << 60,
- QMI_NAS_BAND_PREFERENCE_WCDMA_1500 = ((uint64_t) 1) << 61
- /* Bits 62-63 reserved */
-} QmiNasBandPreference;
-
-/**
- * QmiNasLteBandPreference:
- * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_1: LTE EUTRAN Band 1
- * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_2: LTE EUTRAN Band 2.
- * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_3: LTE EUTRAN Band 3.
- * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_4: LTE EUTRAN Band 4.
- * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_5: LTE EUTRAN Band 5.
- * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_6: LTE EUTRAN Band 6.
- * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_7: LTE EUTRAN Band 7.
- * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_8: LTE EUTRAN Band 8.
- * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_9: LTE EUTRAN Band 9.
- * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_10: LTE EUTRAN Band 10.
- * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_11: LTE EUTRAN Band 11.
- * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_12: LTE EUTRAN Band 12.
- * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_13: LTE EUTRAN Band 13.
- * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_14: LTE EUTRAN Band 14.
- * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_17: LTE EUTRAN Band 17.
- * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_18: LTE EUTRAN Band 18.
- * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_19: LTE EUTRAN Band 19.
- * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_20: LTE EUTRAN Band 20.
- * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_21: LTE EUTRAN Band 21.
- * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_24: LTE EUTRAN Band 24.
- * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_25: LTE EUTRAN Band 25.
- * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_26: LTE EUTRAN Band 26.
- * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_27: LTE EUTRAN Band 27.
- * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_28: LTE EUTRAN Band 28.
- * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_29: LTE EUTRAN Band 29.
- * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_30: LTE EUTRAN Band 30.
- * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_31: LTE EUTRAN Band 31.
- * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_32: LTE EUTRAN Band 32.
- * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_33: LTE EUTRAN Band 33.
- * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_34: LTE EUTRAN Band 34.
- * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_35: LTE EUTRAN Band 35.
- * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_36: LTE EUTRAN Band 36.
- * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_37: LTE EUTRAN Band 37.
- * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_38: LTE EUTRAN Band 38.
- * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_39: LTE EUTRAN Band 39.
- * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_40: LTE EUTRAN Band 40.
- * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_41: LTE EUTRAN Band 41.
- * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_42: LTE EUTRAN Band 42.
- * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_43: LTE EUTRAN Band 43.
- *
- * Flags to specify LTE-specific frequency band preferences.
- *
- * Since: 1.0
- */
-typedef enum { /*< since=1.0 >*/
- QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_1 = 1 << 0,
- QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_2 = 1 << 1,
- QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_3 = 1 << 2,
- QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_4 = 1 << 3,
- QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_5 = 1 << 4,
- QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_6 = 1 << 5,
- QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_7 = 1 << 6,
- QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_8 = 1 << 7,
- QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_9 = 1 << 8,
- QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_10 = 1 << 9,
- QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_11 = 1 << 10,
- QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_12 = 1 << 11,
- QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_13 = 1 << 12,
- QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_14 = 1 << 13,
- /* Bit 14-15 reserved */
- QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_17 = 1 << 16,
- QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_18 = 1 << 17,
- QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_19 = 1 << 18,
- QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_20 = 1 << 19,
- QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_21 = 1 << 20,
- /* Bit 21-22 reserved */
- QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_24 = 1 << 23,
- QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_25 = 1 << 24,
- QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_26 = 1 << 25,
- QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_27 = 1 << 26,
- QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_28 = 1 << 27,
- QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_29 = 1 << 28,
- QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_30 = 1 << 29,
- QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_31 = 1 << 30,
- QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_32 = ((uint64_t) 1) << 31,
- QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_33 = ((uint64_t) 1) << 32,
- QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_34 = ((uint64_t) 1) << 33,
- QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_35 = ((uint64_t) 1) << 34,
- QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_36 = ((uint64_t) 1) << 35,
- QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_37 = ((uint64_t) 1) << 36,
- QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_38 = ((uint64_t) 1) << 37,
- QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_39 = ((uint64_t) 1) << 38,
- QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_40 = ((uint64_t) 1) << 39,
- QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_41 = ((uint64_t) 1) << 40,
- QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_42 = ((uint64_t) 1) << 41,
- QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_43 = ((uint64_t) 1) << 42
- /* Bit 43-64 reserved */
-} QmiNasLteBandPreference;
-
-#endif /* _LIBQMI_GLIB_QMI_FLAGS64_NAS_H_ */
+++ /dev/null
-/*
- * uqmi -- tiny QMI support implementation
- *
- * Copyright (C) 2014-2015 Felix Fietkau <nbd@openwrt.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-#include "qmi-message.h"
-
-static uint8_t buf[QMI_BUFFER_LEN];
-static unsigned int buf_ofs;
-
-uint8_t *__qmi_get_buf(unsigned int *ofs)
-{
- *ofs = buf_ofs;
- return buf;
-}
-
-void __qmi_alloc_reset(void)
-{
- buf_ofs = 0;
-}
-
-void *__qmi_alloc_static(unsigned int len)
-{
- void *ret;
-
- if (buf_ofs + len > sizeof(buf)) {
- fprintf(stderr, "ERROR: static buffer for message data too small\n");
- abort();
- }
-
- ret = &buf[buf_ofs];
- buf_ofs += len;
- memset(ret, 0, len);
- return ret;
-}
-
-char *__qmi_copy_string(void *data, unsigned int len)
-{
- char *res;
-
- res = (char *) &buf[buf_ofs];
- buf_ofs += len + 1;
- memcpy(res, data, len);
- res[len] = 0;
- return res;
-}
-
-struct tlv *tlv_get_next(void **buf, unsigned int *buflen)
-{
- struct tlv *tlv = NULL;
- unsigned int tlv_len;
-
- if (*buflen < sizeof(*tlv))
- return NULL;
-
- tlv = *buf;
- tlv_len = le16_to_cpu(tlv->len) + sizeof(*tlv);
- if (tlv_len > *buflen)
- return NULL;
-
- *buflen -= tlv_len;
- *buf += tlv_len;
- return tlv;
-}
-
-static struct tlv *qmi_msg_next_tlv(struct qmi_msg *qm, int add)
-{
- int tlv_len;
- void *tlv;
-
- if (qm->qmux.service == QMI_SERVICE_CTL) {
- tlv = qm->ctl.tlv;
- tlv_len = le16_to_cpu(qm->ctl.tlv_len);
- qm->ctl.tlv_len = cpu_to_le16(tlv_len + add);
- } else {
- tlv = qm->svc.tlv;
- tlv_len = le16_to_cpu(qm->svc.tlv_len);
- qm->svc.tlv_len = cpu_to_le16(tlv_len + add);
- }
-
- tlv += tlv_len;
-
- return tlv;
-}
-
-void tlv_new(struct qmi_msg *qm, uint8_t type, uint16_t len, void *data)
-{
- struct tlv *tlv;
-
- tlv = qmi_msg_next_tlv(qm, sizeof(*tlv) + len);
- tlv->type = type;
- tlv->len = cpu_to_le16(len);
- memcpy(tlv->data, data, len);
-}
-
-void qmi_init_request_message(struct qmi_msg *qm, QmiService service)
-{
- memset(qm, 0, sizeof(*qm));
- qm->marker = 1;
- qm->qmux.service = service;
-}
-
-int qmi_complete_request_message(struct qmi_msg *qm)
-{
- void *tlv_end = qmi_msg_next_tlv(qm, 0);
- void *msg_start = &qm->qmux;
-
- qm->qmux.len = cpu_to_le16(tlv_end - msg_start);
- return tlv_end - msg_start + 1;
-}
-
-int qmi_check_message_status(void *tlv_buf, unsigned int len)
-{
- struct tlv *tlv;
- struct {
- uint16_t status;
- uint16_t code;
- } __packed *status;
-
- while ((tlv = tlv_get_next(&tlv_buf, &len)) != NULL) {
- if (tlv->type != 2)
- continue;
-
- if (tlv_data_len(tlv) != sizeof(*status))
- return QMI_ERROR_INVALID_DATA;
-
- status = (void *) tlv->data;
- if (!status->status)
- return 0;
-
- return le16_to_cpu(status->code);
- }
-
- return QMI_ERROR_NO_DATA;
-}
-
-void *qmi_msg_get_tlv_buf(struct qmi_msg *qm, int *tlv_len)
-{
- void *ptr;
- int len;
-
- if (qm->qmux.service == QMI_SERVICE_CTL) {
- ptr = qm->ctl.tlv;
- len = qm->ctl.tlv_len;
- } else {
- ptr = qm->svc.tlv;
- len = qm->svc.tlv_len;
- }
-
- if (tlv_len)
- *tlv_len = len;
-
- return ptr;
-}
-
-
+++ /dev/null
-/*
- * uqmi -- tiny QMI support implementation
- *
- * Copyright (C) 2014-2015 Felix Fietkau <nbd@openwrt.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA.
- */
-
-#ifndef __UQMI_MESSAGE_H
-#define __UQMI_MESSAGE_H
-
-#include <libubox/utils.h>
-#include <stdbool.h>
-
-#include "qmi-struct.h"
-#include "qmi-enums.h"
-
-#include "qmi-enums-private.h"
-#include "qmi-message-ctl.h"
-
-#include "qmi-enums-dms.h"
-#include "qmi-flags64-dms.h"
-#include "qmi-message-dms.h"
-
-#include "qmi-enums-nas.h"
-#include "qmi-flags64-nas.h"
-#include "qmi-message-nas.h"
-
-#include "qmi-enums-pds.h"
-#include "qmi-message-pds.h"
-
-#include "qmi-enums-wds.h"
-#include "qmi-message-wds.h"
-
-#include "qmi-enums-wms.h"
-#include "qmi-message-wms.h"
-
-#include "qmi-enums-wda.h"
-#include "qmi-message-wda.h"
-
-#include "qmi-enums-uim.h"
-#include "qmi-message-uim.h"
-
-#define qmi_set(_data, _field, _val) \
- do { \
- (_data)->set._field = 1; \
- (_data)->data._field = _val; \
- } while (0)
-
-#define qmi_set_ptr(_data, _field, _val) \
- do { \
- (_data)->data._field = _val; \
- } while (0)
-
-#define qmi_set_static_array(_data, _field, _val) \
- do { \
- (_data)->data._field##_n = ARRAY_SIZE(_val); \
- (_data)->data._field = _val; \
- } while (0);
-
-#define qmi_set_array(_data, _field, _val, _n) \
- do { \
- (_data)->data.n_##_field = _n; \
- (_data)->data._field = _val; \
- } while (0);
-
-#define QMI_INIT(_field, _val) \
- .set._field = 1, \
- .data._field = (_val)
-
-#define QMI_INIT_SEQUENCE(_field, ...) \
- .set._field = 1, \
- .data._field = { __VA_ARGS__ }
-
-#define QMI_INIT_PTR(_field, _val) \
- .data._field = (_val)
-
-#define QMI_INIT_STATIC_ARRAY(_field, _val) \
- .data._field##_n = ARRAY_SIZE(_val), \
- .data._field = (_val)
-
-#define QMI_INIT_ARRAY(_field, _val, _n) \
- .data._field##_n = (_n), \
- .data._field = (_val)
-
-
-enum {
- QMI_ERROR_NO_DATA = -1,
- QMI_ERROR_INVALID_DATA = -2,
- QMI_ERROR_CANCELLED = -3,
-};
-
-#define QMI_BUFFER_LEN 2048
-
-void __qmi_alloc_reset(void);
-void *__qmi_alloc_static(unsigned int len);
-char *__qmi_copy_string(void *data, unsigned int len);
-uint8_t *__qmi_get_buf(unsigned int *ofs);
-
-static inline int tlv_data_len(struct tlv *tlv)
-{
- return le16_to_cpu(tlv->len);
-}
-
-struct tlv *tlv_get_next(void **buf, unsigned int *buflen);
-void tlv_new(struct qmi_msg *qm, uint8_t type, uint16_t len, void *data);
-
-void qmi_init_request_message(struct qmi_msg *qm, QmiService service);
-int qmi_complete_request_message(struct qmi_msg *qm);
-int qmi_check_message_status(void *buf, unsigned int len);
-void *qmi_msg_get_tlv_buf(struct qmi_msg *qm, int *len);
-
-#endif
+++ /dev/null
-/*
- * uqmi -- tiny QMI support implementation
- *
- * Copyright (C) 2014-2015 Felix Fietkau <nbd@openwrt.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA.
- */
-
-#ifndef __QMI_STRUCT_H
-#define __QMI_STRUCT_H
-
-#include <libubox/utils.h>
-#include <stdint.h>
-
-struct qmux {
- uint16_t len;
- uint8_t flags;
- uint8_t service;
- uint8_t client;
-} __packed;
-
-struct tlv {
- uint8_t type;
- uint16_t len;
- uint8_t data[];
-} __packed;
-
-struct qmi_ctl {
- uint8_t transaction;
- uint16_t message;
- uint16_t tlv_len;
- struct tlv tlv[];
-} __packed;
-
-struct qmi_svc {
- uint16_t transaction;
- uint16_t message;
- uint16_t tlv_len;
- struct tlv tlv[];
-} __packed;
-
-struct qmi_msg {
- uint8_t marker;
- struct qmux qmux;
- uint8_t flags;
- union {
- struct qmi_ctl ctl;
- struct qmi_svc svc;
- };
-} __packed;
-
-#endif
+++ /dev/null
-/*
- * uqmi -- tiny QMI support implementation
- *
- * Copyright (C) 2014-2015 Felix Fietkau <nbd@openwrt.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA.
- */
-
-#include <libubox/uloop.h>
-#include <libubox/utils.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-#include <getopt.h>
-#include <signal.h>
-
-#include "uqmi.h"
-#include "commands.h"
-
-static const char *device;
-
-#define CMD_OPT(_arg) (-2 - _arg)
-
-#define __uqmi_command(_name, _optname, _arg, _option) { #_optname, _arg##_argument, NULL, CMD_OPT(__UQMI_COMMAND_##_name) }
-static const struct option uqmi_getopt[] = {
- __uqmi_commands,
- { "single", no_argument, NULL, 's' },
- { "device", required_argument, NULL, 'd' },
- { "keep-client-id", required_argument, NULL, 'k' },
- { "release-client-id", required_argument, NULL, 'r' },
- { "mbim", no_argument, NULL, 'm' },
- { "timeout", required_argument, NULL, 't' },
- { NULL, 0, NULL, 0 }
-};
-#undef __uqmi_command
-
-static int usage(const char *progname)
-{
- fprintf(stderr, "Usage: %s <options|actions>\n"
- "Options:\n"
- " --single, -s: Print output as a single line (for scripts)\n"
- " --device=NAME, -d NAME: Set device name to NAME (required)\n"
- " --keep-client-id <name>: Keep Client ID for service <name>\n"
- " --release-client-id <name>: Release Client ID after exiting\n"
- " --mbim, -m NAME is an MBIM device with EXT_QMUX support\n"
- " --timeout, -t response timeout in msecs\n"
- "\n"
- "Services: dms, nas, pds, wds, wms\n"
- "\n"
- "Actions:\n"
- " --get-versions: Get service versions\n"
- " --set-client-id <name>,<id>: Set Client ID for service <name> to <id>\n"
- " (implies --keep-client-id)\n"
- " --get-client-id <name>: Connect and get Client ID for service <name>\n"
- " (implies --keep-client-id)\n"
- " --sync: Release all Client IDs\n"
- wds_helptext
- dms_helptext
- uim_helptext
- nas_helptext
- wms_helptext
- wda_helptext
- "\n", progname);
- return 1;
-}
-
-static void keep_client_id(struct qmi_dev *qmi, const char *optarg)
-{
- QmiService svc = qmi_service_get_by_name(optarg);
- if (svc < 0) {
- fprintf(stderr, "Invalid service %s\n", optarg);
- exit(1);
- }
- qmi_service_get_client_id(qmi, svc);
-}
-
-static void release_client_id(struct qmi_dev *qmi, const char *optarg)
-{
- QmiService svc = qmi_service_get_by_name(optarg);
- if (svc < 0) {
- fprintf(stderr, "Invalid service %s\n", optarg);
- exit(1);
- }
- qmi_service_release_client_id(qmi, svc);
-}
-
-static void handle_exit_signal(int signal)
-{
- cancel_all_requests = true;
- uloop_end();
-}
-
-static void _request_timeout_handler(struct uloop_timeout *timeout)
-{
- fprintf(stderr, "Request timed out\n");
- handle_exit_signal(0);
-}
-
-struct uloop_timeout request_timeout = { .cb = _request_timeout_handler, };
-
-int main(int argc, char **argv)
-{
- static struct qmi_dev dev;
- int ch, ret;
-
- uloop_init();
- signal(SIGINT, handle_exit_signal);
- signal(SIGTERM, handle_exit_signal);
-
- while ((ch = getopt_long(argc, argv, "d:k:smt:", uqmi_getopt, NULL)) != -1) {
- int cmd_opt = CMD_OPT(ch);
-
- if (ch < 0 && cmd_opt >= 0 && cmd_opt < __UQMI_COMMAND_LAST) {
- uqmi_add_command(optarg, cmd_opt);
- continue;
- }
-
- switch(ch) {
- case 'r':
- release_client_id(&dev, optarg);
- break;
- case 'k':
- keep_client_id(&dev, optarg);
- break;
- case 'd':
- device = optarg;
- break;
- case 's':
- single_line = true;
- break;
- case 'm':
- dev.is_mbim = true;
- break;
- case 't':
- uloop_timeout_set(&request_timeout, atol(optarg));
- break;
- default:
- return usage(argv[0]);
- }
- }
-
- if (!device) {
- fprintf(stderr, "No device given\n");
- return usage(argv[0]);
- }
-
- if (qmi_device_open(&dev, device)) {
- fprintf(stderr, "Failed to open device\n");
- return 2;
- }
-
- ret = uqmi_run_commands(&dev) ? 0 : -1;
-
- qmi_device_close(&dev);
-
- return ret;
-}
+++ /dev/null
-/*
- * uqmi -- tiny QMI support implementation
- *
- * Copyright (C) 2014-2015 Felix Fietkau <nbd@openwrt.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA.
- */
-
-#ifndef __UQMI_H
-#define __UQMI_H
-
-#include <stdbool.h>
-
-#include <libubox/uloop.h>
-#include <libubox/ustream.h>
-
-#include "qmi-message.h"
-
-#ifdef DEBUG_PACKET
-void dump_packet(const char *prefix, void *ptr, int len);
-#else
-static inline void dump_packet(const char *prefix, void *ptr, int len)
-{
-}
-#endif
-
-#define __qmi_services \
- __qmi_service(QMI_SERVICE_WDS), \
- __qmi_service(QMI_SERVICE_DMS), \
- __qmi_service(QMI_SERVICE_NAS), \
- __qmi_service(QMI_SERVICE_QOS), \
- __qmi_service(QMI_SERVICE_WMS), \
- __qmi_service(QMI_SERVICE_PDS), \
- __qmi_service(QMI_SERVICE_AUTH), \
- __qmi_service(QMI_SERVICE_AT), \
- __qmi_service(QMI_SERVICE_VOICE), \
- __qmi_service(QMI_SERVICE_CAT2), \
- __qmi_service(QMI_SERVICE_UIM), \
- __qmi_service(QMI_SERVICE_PBM), \
- __qmi_service(QMI_SERVICE_LOC), \
- __qmi_service(QMI_SERVICE_SAR), \
- __qmi_service(QMI_SERVICE_RMTFS), \
- __qmi_service(QMI_SERVICE_CAT), \
- __qmi_service(QMI_SERVICE_RMS), \
- __qmi_service(QMI_SERVICE_OMA), \
- __qmi_service(QMI_SERVICE_WDA)
-
-#define __qmi_service(_n) __##_n
-enum {
- __qmi_services,
- __QMI_SERVICE_LAST
-};
-#undef __qmi_service
-
-struct qmi_dev;
-struct qmi_request;
-struct qmi_msg;
-
-typedef void (*request_cb)(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg);
-
-struct qmi_dev {
- struct ustream_fd sf;
-
- struct list_head req;
-
- struct {
- bool connected;
- uint8_t client_id;
- uint16_t tid;
- } service_data[__QMI_SERVICE_LAST];
-
- uint32_t service_connected;
- uint32_t service_keep_cid;
- uint32_t service_release_cid;
-
- uint8_t ctl_tid;
- void *buf;
-
- bool is_mbim;
-};
-
-struct qmi_request {
- struct list_head list;
-
- request_cb cb;
-
- bool *complete;
- bool pending;
- bool no_error_cb;
- uint8_t service;
- uint16_t tid;
- int ret;
-};
-
-extern bool cancel_all_requests;
-int qmi_device_open(struct qmi_dev *qmi, const char *path);
-void qmi_device_close(struct qmi_dev *qmi);
-
-int qmi_request_start(struct qmi_dev *qmi, struct qmi_request *req, request_cb cb);
-void qmi_request_cancel(struct qmi_dev *qmi, struct qmi_request *req);
-int qmi_request_wait(struct qmi_dev *qmi, struct qmi_request *req);
-
-static inline bool qmi_request_pending(struct qmi_request *req)
-{
- return req->pending;
-}
-
-int qmi_service_connect(struct qmi_dev *qmi, QmiService svc, int client_id);
-int qmi_service_get_client_id(struct qmi_dev *qmi, QmiService svc);
-int qmi_service_release_client_id(struct qmi_dev *qmi, QmiService svc);
-QmiService qmi_service_get_by_name(const char *str);
-
-#endif
--- /dev/null
+
+
+SET(UQMI uqmi.c dev.c commands.c ${SOURCES})
+
+ADD_EXECUTABLE(uqmi ${UQMI})
+ADD_DEPENDENCIES(uqmi gen-headers gen-errors)
+
+TARGET_LINK_LIBRARIES(uqmi ${LIBS} common qmigen)
+TARGET_INCLUDE_DIRECTORIES(uqmi PRIVATE ${ubox_include_dir} ${blobmsg_json_include_dir} ${json_include_dir} ${CMAKE_SOURCE_DIR})
+
+INSTALL(TARGETS uqmi
+ RUNTIME DESTINATION sbin
+)
--- /dev/null
+/*
+ * uqmi -- tiny QMI support implementation
+ *
+ * Copyright (C) 2014-2015 Felix Fietkau <nbd@openwrt.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ */
+#include "qmi-message.h"
+
+static struct {
+ QmiDmsUimPinId pin_id;
+ char* pin;
+ char* new_pin;
+ char* puk;
+} dms_req_data;
+
+const char *oper_modes[] = {
+ [QMI_DMS_OPERATING_MODE_ONLINE] = "online",
+ [QMI_DMS_OPERATING_MODE_LOW_POWER] = "low_power",
+ [QMI_DMS_OPERATING_MODE_FACTORY_TEST] = "factory_test",
+ [QMI_DMS_OPERATING_MODE_OFFLINE] = "offline",
+ [QMI_DMS_OPERATING_MODE_RESET] = "reset",
+ [QMI_DMS_OPERATING_MODE_SHUTTING_DOWN] = "shutting_down",
+ [QMI_DMS_OPERATING_MODE_PERSISTENT_LOW_POWER] = "persistent_low_power",
+ [QMI_DMS_OPERATING_MODE_MODE_ONLY_LOW_POWER] = "mode_only_low_power",
+};
+
+static void cmd_dms_get_capabilities_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
+{
+ void *t, *networks;
+ int i;
+ struct qmi_dms_get_capabilities_response res;
+ const char *radio_cap[] = {
+ [QMI_DMS_RADIO_INTERFACE_CDMA20001X] = "cdma1x",
+ [QMI_DMS_RADIO_INTERFACE_EVDO] = "cdma1xevdo",
+ [QMI_DMS_RADIO_INTERFACE_GSM] = "gsm",
+ [QMI_DMS_RADIO_INTERFACE_UMTS] = "umts",
+ [QMI_DMS_RADIO_INTERFACE_LTE] = "lte",
+ };
+ const char *service_cap[] = {
+ [QMI_DMS_DATA_SERVICE_CAPABILITY_NONE] = "none",
+ [QMI_DMS_DATA_SERVICE_CAPABILITY_CS] = "cs",
+ [QMI_DMS_DATA_SERVICE_CAPABILITY_PS] = "ps",
+ [QMI_DMS_DATA_SERVICE_CAPABILITY_SIMULTANEOUS_CS_PS] = "simultaneous_cs_ps",
+ [QMI_DMS_DATA_SERVICE_CAPABILITY_NON_SIMULTANEOUS_CS_PS] = "non_simultaneous_cs_ps",
+ };
+
+ qmi_parse_dms_get_capabilities_response(msg, &res);
+
+ t = blobmsg_open_table(&status, NULL);
+
+ blobmsg_add_u32(&status, "max_tx_channel_rate", (int32_t) res.data.info.max_tx_channel_rate);
+ blobmsg_add_u32(&status, "max_rx_channel_rate", (int32_t) res.data.info.max_rx_channel_rate);
+ if ((int)res.data.info.data_service_capability >= 0 && res.data.info.data_service_capability < ARRAY_SIZE(service_cap))
+ blobmsg_add_string(&status, "data_service", service_cap[res.data.info.data_service_capability]);
+
+ if(res.data.info.sim_capability == QMI_DMS_SIM_CAPABILITY_NOT_SUPPORTED)
+ blobmsg_add_string(&status, "sim", "not supported");
+ else if(res.data.info.sim_capability == QMI_DMS_SIM_CAPABILITY_SUPPORTED)
+ blobmsg_add_string(&status, "sim", "supported");
+
+ networks = blobmsg_open_array(&status, "networks");
+ for (i = 0; i < res.data.info.radio_interface_list_n; i++) {
+ if ((int)res.data.info.radio_interface_list[i] >= 0 && res.data.info.radio_interface_list[i] < ARRAY_SIZE(radio_cap))
+ blobmsg_add_string(&status, NULL, radio_cap[res.data.info.radio_interface_list[i]]);
+ else
+ blobmsg_add_string(&status, NULL, "unknown");
+ }
+ blobmsg_close_array(&status, networks);
+
+ blobmsg_close_table(&status, t);
+}
+
+static enum qmi_cmd_result
+cmd_dms_get_capabilities_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ qmi_set_dms_get_capabilities_request(msg);
+ return QMI_CMD_REQUEST;
+}
+
+const char *get_pin_status(int status)
+{
+ static const char *pin_status[] = {
+ [QMI_DMS_UIM_PIN_STATUS_NOT_INITIALIZED] = "not_initialized",
+ [QMI_DMS_UIM_PIN_STATUS_ENABLED_NOT_VERIFIED] = "not_verified",
+ [QMI_DMS_UIM_PIN_STATUS_ENABLED_VERIFIED] = "verified",
+ [QMI_DMS_UIM_PIN_STATUS_DISABLED] = "disabled",
+ [QMI_DMS_UIM_PIN_STATUS_BLOCKED] = "blocked",
+ [QMI_DMS_UIM_PIN_STATUS_PERMANENTLY_BLOCKED] = "permanently_blocked",
+ [QMI_DMS_UIM_PIN_STATUS_UNBLOCKED] = "unblocked",
+ [QMI_DMS_UIM_PIN_STATUS_CHANGED] = "changed",
+ };
+ const char *res = "Unknown";
+
+ if (status < ARRAY_SIZE(pin_status) && pin_status[status])
+ res = pin_status[status];
+
+ return res;
+}
+
+static void cmd_dms_get_pin_status_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
+{
+ struct qmi_dms_uim_get_pin_status_response res;
+ void *c;
+
+ qmi_parse_dms_uim_get_pin_status_response(msg, &res);
+ c = blobmsg_open_table(&status, NULL);
+ if (res.set.pin1_status) {
+ blobmsg_add_string(&status, "pin1_status", get_pin_status(res.data.pin1_status.current_status));
+ blobmsg_add_u32(&status, "pin1_verify_tries", (int32_t) res.data.pin1_status.verify_retries_left);
+ blobmsg_add_u32(&status, "pin1_unblock_tries", (int32_t) res.data.pin1_status.unblock_retries_left);
+ }
+ if (res.set.pin2_status) {
+ blobmsg_add_string(&status, "pin2_status", get_pin_status(res.data.pin2_status.current_status));
+ blobmsg_add_u32(&status, "pin2_verify_tries", (int32_t) res.data.pin2_status.verify_retries_left);
+ blobmsg_add_u32(&status, "pin2_unblock_tries", (int32_t) res.data.pin2_status.unblock_retries_left);
+ }
+ blobmsg_close_table(&status, c);
+}
+
+static enum qmi_cmd_result
+cmd_dms_get_pin_status_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ qmi_set_dms_uim_get_pin_status_request(msg);
+ return QMI_CMD_REQUEST;
+}
+
+#define cmd_dms_verify_pin1_cb no_cb
+static enum qmi_cmd_result
+cmd_dms_verify_pin1_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ struct qmi_dms_uim_verify_pin_request data = {
+ QMI_INIT_SEQUENCE(info,
+ .pin_id = QMI_DMS_UIM_PIN_ID_PIN,
+ .pin = arg
+ )
+ };
+ qmi_set_dms_uim_verify_pin_request(msg, &data);
+ return QMI_CMD_REQUEST;
+}
+
+#define cmd_dms_verify_pin2_cb no_cb
+static enum qmi_cmd_result
+cmd_dms_verify_pin2_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ struct qmi_dms_uim_verify_pin_request data = {
+ QMI_INIT_SEQUENCE(info,
+ .pin_id = QMI_DMS_UIM_PIN_ID_PIN2,
+ .pin = arg
+ )
+ };
+ qmi_set_dms_uim_verify_pin_request(msg, &data);
+ return QMI_CMD_REQUEST;
+}
+
+#define cmd_dms_set_pin_cb no_cb
+static enum qmi_cmd_result
+cmd_dms_set_pin_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ dms_req_data.pin = arg;
+ return QMI_CMD_DONE;
+}
+
+static enum qmi_cmd_result
+cmd_dms_set_pin_protection_prepare(struct qmi_msg *msg, char *arg)
+{
+ if (!dms_req_data.pin) {
+ uqmi_add_error("Missing argument");
+ return QMI_CMD_EXIT;
+ }
+
+ int is_enabled;
+ if (strcasecmp(arg, "disabled") == 0)
+ is_enabled = false;
+ else if (strcasecmp(arg, "enabled") == 0)
+ is_enabled = true;
+ else {
+ uqmi_add_error("Invalid value (valid: disabled, enabled)");
+ return QMI_CMD_EXIT;
+ }
+
+ struct qmi_dms_uim_set_pin_protection_request dms_pin_protection_req = {
+ QMI_INIT_SEQUENCE(info,
+ .pin_id = dms_req_data.pin_id
+ ),
+ QMI_INIT_PTR(info.pin, dms_req_data.pin),
+ QMI_INIT_PTR(info.protection_enabled, is_enabled)
+ };
+
+ qmi_set_dms_uim_set_pin_protection_request(msg, &dms_pin_protection_req);
+ return QMI_CMD_REQUEST;
+}
+
+#define cmd_dms_set_pin1_protection_cb no_cb
+static enum qmi_cmd_result
+cmd_dms_set_pin1_protection_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ dms_req_data.pin_id = QMI_DMS_UIM_PIN_ID_PIN;
+ return cmd_dms_set_pin_protection_prepare(msg, arg);
+}
+
+#define cmd_dms_set_pin2_protection_cb no_cb
+static enum qmi_cmd_result
+cmd_dms_set_pin2_protection_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ dms_req_data.pin_id = QMI_DMS_UIM_PIN_ID_PIN2;
+ return cmd_dms_set_pin_protection_prepare(msg, arg);
+}
+
+static enum qmi_cmd_result
+cmd_dms_change_pin_prepare(struct qmi_msg *msg, char *arg)
+{
+ if (!dms_req_data.pin || !dms_req_data.new_pin) {
+ uqmi_add_error("Missing argument");
+ return QMI_CMD_EXIT;
+ }
+
+ struct qmi_dms_uim_change_pin_request dms_change_pin_req = {
+ QMI_INIT_SEQUENCE(info,
+ .pin_id = dms_req_data.pin_id
+ ),
+ QMI_INIT_PTR(info.old_pin, dms_req_data.pin),
+ QMI_INIT_PTR(info.new_pin, dms_req_data.new_pin)
+ };
+
+ qmi_set_dms_uim_change_pin_request(msg, &dms_change_pin_req);
+ return QMI_CMD_REQUEST;
+}
+
+#define cmd_dms_change_pin1_cb no_cb
+static enum qmi_cmd_result
+cmd_dms_change_pin1_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ dms_req_data.pin_id = QMI_DMS_UIM_PIN_ID_PIN;
+ return cmd_dms_change_pin_prepare(msg, arg);
+}
+
+#define cmd_dms_change_pin2_cb no_cb
+static enum qmi_cmd_result
+cmd_dms_change_pin2_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ dms_req_data.pin_id = QMI_DMS_UIM_PIN_ID_PIN2;
+ return cmd_dms_change_pin_prepare(msg, arg);
+}
+
+#define cmd_dms_set_new_pin_cb no_cb
+static enum qmi_cmd_result
+cmd_dms_set_new_pin_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ dms_req_data.new_pin = arg;
+ return QMI_CMD_DONE;
+}
+
+#define cmd_dms_set_puk_cb no_cb
+static enum qmi_cmd_result
+cmd_dms_set_puk_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ dms_req_data.puk = arg;
+ return QMI_CMD_DONE;
+}
+
+#define cmd_dms_unblock_pin1_cb no_cb
+static enum qmi_cmd_result
+cmd_dms_unblock_pin1_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ if (!dms_req_data.puk || !dms_req_data.new_pin) {
+ uqmi_add_error("Missing argument");
+ return QMI_CMD_EXIT;
+ }
+
+ struct qmi_dms_uim_unblock_pin_request dms_unlock_pin_req = {
+ QMI_INIT_SEQUENCE(info,
+ .pin_id = QMI_DMS_UIM_PIN_ID_PIN
+ ),
+ QMI_INIT_PTR(info.puk, dms_req_data.puk),
+ QMI_INIT_PTR(info.new_pin, dms_req_data.new_pin)
+ };
+
+ qmi_set_dms_uim_unblock_pin_request(msg, &dms_unlock_pin_req);
+ return QMI_CMD_REQUEST;
+}
+
+#define cmd_dms_unblock_pin2_cb no_cb
+static enum qmi_cmd_result
+cmd_dms_unblock_pin2_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ if (!dms_req_data.puk || !dms_req_data.new_pin) {
+ uqmi_add_error("Missing argument");
+ return QMI_CMD_EXIT;
+ }
+
+ struct qmi_dms_uim_unblock_pin_request dms_unlock_pin_req = {
+ QMI_INIT_SEQUENCE(info,
+ .pin_id = QMI_DMS_UIM_PIN_ID_PIN2
+ ),
+ QMI_INIT_PTR(info.puk, dms_req_data.puk),
+ QMI_INIT_PTR(info.new_pin, dms_req_data.new_pin)
+ };
+
+ qmi_set_dms_uim_unblock_pin_request(msg, &dms_unlock_pin_req);
+ return QMI_CMD_REQUEST;
+}
+
+static void cmd_dms_get_iccid_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
+{
+ struct qmi_dms_uim_get_iccid_response res;
+
+ qmi_parse_dms_uim_get_iccid_response(msg, &res);
+ if (res.data.iccid)
+ blobmsg_add_string(&status, NULL, res.data.iccid);
+}
+
+static enum qmi_cmd_result
+cmd_dms_get_iccid_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ qmi_set_dms_uim_get_iccid_request(msg);
+ return QMI_CMD_REQUEST;
+}
+
+static void cmd_dms_get_imsi_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
+{
+ struct qmi_dms_uim_get_imsi_response res;
+
+ qmi_parse_dms_uim_get_imsi_response(msg, &res);
+ if (res.data.imsi)
+ blobmsg_add_string(&status, NULL, res.data.imsi);
+}
+
+static enum qmi_cmd_result
+cmd_dms_get_imsi_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ qmi_set_dms_uim_get_imsi_request(msg);
+ return QMI_CMD_REQUEST;
+}
+
+static void cmd_dms_get_msisdn_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
+{
+ struct qmi_dms_get_msisdn_response res;
+
+ qmi_parse_dms_get_msisdn_response(msg, &res);
+ if (res.data.msisdn)
+ blobmsg_add_string(&status, NULL, res.data.msisdn);
+}
+
+static enum qmi_cmd_result
+cmd_dms_get_msisdn_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ qmi_set_dms_get_msisdn_request(msg);
+ return QMI_CMD_REQUEST;
+}
+
+static void cmd_dms_get_imei_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
+{
+ struct qmi_dms_get_ids_response res;
+
+ qmi_parse_dms_get_ids_response(msg, &res);
+ if (res.data.imei)
+ blobmsg_add_string(&status, NULL, res.data.imei);
+}
+
+static enum qmi_cmd_result
+cmd_dms_get_imei_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ qmi_set_dms_get_ids_request(msg);
+ return QMI_CMD_REQUEST;
+}
+
+#define cmd_dms_reset_cb no_cb
+static enum qmi_cmd_result
+cmd_dms_reset_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ qmi_set_dms_reset_request(msg);
+ return QMI_CMD_REQUEST;
+}
+
+static void
+cmd_dms_get_operating_mode_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
+{
+ struct qmi_dms_get_operating_mode_response res;
+
+ qmi_parse_dms_get_operating_mode_response(msg, &res);
+ if (res.data.mode < ARRAY_SIZE(oper_modes))
+ blobmsg_add_string(&status, NULL, oper_modes[res.data.mode]);
+ else
+ blobmsg_add_string(&status, NULL, "unknown");
+}
+
+static enum qmi_cmd_result
+cmd_dms_get_operating_mode_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ qmi_set_dms_get_operating_mode_request(msg);
+ return QMI_CMD_REQUEST;
+}
+
+#define cmd_dms_set_operating_mode_cb no_cb
+static enum qmi_cmd_result
+cmd_dms_set_operating_mode_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ static struct qmi_dms_set_operating_mode_request sreq = {
+ QMI_INIT(mode, QMI_DMS_OPERATING_MODE_ONLINE),
+ };
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(oper_modes); i++) {
+ if (!oper_modes[i])
+ continue;
+
+ if (strcmp(arg, oper_modes[i]) != 0)
+ continue;
+
+ sreq.data.mode = i;
+ qmi_set_dms_set_operating_mode_request(msg, &sreq);
+ return QMI_CMD_REQUEST;
+ }
+
+ return uqmi_add_error("Invalid argument");
+}
+
+#define cmd_dms_set_fcc_authentication_cb no_cb
+static enum qmi_cmd_result
+cmd_dms_set_fcc_authentication_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ qmi_set_dms_set_fcc_authentication_request(msg);
+ return QMI_CMD_REQUEST;
+}
--- /dev/null
+/*
+ * uqmi -- tiny QMI support implementation
+ *
+ * Copyright (C) 2014-2015 Felix Fietkau <nbd@openwrt.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ */
+
+#define __uqmi_dms_commands \
+ __uqmi_command(dms_get_capabilities, get-capabilities, no, QMI_SERVICE_DMS), \
+ __uqmi_command(dms_get_pin_status, get-pin-status, no, QMI_SERVICE_DMS), \
+ __uqmi_command(dms_verify_pin1, verify-pin1, required, QMI_SERVICE_DMS), \
+ __uqmi_command(dms_verify_pin2, verify-pin2, required, QMI_SERVICE_DMS), \
+ __uqmi_command(dms_set_pin1_protection, set-pin1-protection, required, QMI_SERVICE_DMS), \
+ __uqmi_command(dms_set_pin2_protection, set-pin2-protection, required, QMI_SERVICE_DMS), \
+ __uqmi_command(dms_set_pin, pin, required, CMD_TYPE_OPTION), \
+ __uqmi_command(dms_change_pin1, change-pin1, no, QMI_SERVICE_DMS), \
+ __uqmi_command(dms_change_pin2, change-pin2, no, QMI_SERVICE_DMS), \
+ __uqmi_command(dms_unblock_pin1, unblock-pin1, no, QMI_SERVICE_DMS), \
+ __uqmi_command(dms_unblock_pin2, unblock-pin2, no, QMI_SERVICE_DMS), \
+ __uqmi_command(dms_set_puk, puk, required, CMD_TYPE_OPTION), \
+ __uqmi_command(dms_set_new_pin, new-pin, required, CMD_TYPE_OPTION), \
+ __uqmi_command(dms_get_iccid, get-iccid, no, QMI_SERVICE_DMS), \
+ __uqmi_command(dms_get_imsi, get-imsi, no, QMI_SERVICE_DMS), \
+ __uqmi_command(dms_get_imei, get-imei, no, QMI_SERVICE_DMS), \
+ __uqmi_command(dms_get_msisdn, get-msisdn, no, QMI_SERVICE_DMS), \
+ __uqmi_command(dms_get_operating_mode, get-device-operating-mode, no, QMI_SERVICE_DMS), \
+ __uqmi_command(dms_set_operating_mode, set-device-operating-mode, required, QMI_SERVICE_DMS), \
+ __uqmi_command(dms_reset, reset-dms, no, QMI_SERVICE_DMS), \
+ __uqmi_command(dms_set_fcc_authentication, fcc-auth, no, QMI_SERVICE_DMS) \
+
+#define dms_helptext \
+ " --get-capabilities: List device capabilities\n" \
+ " --get-pin-status: Get PIN verification status\n" \
+ " --verify-pin1 <pin>: Verify PIN1\n" \
+ " --verify-pin2 <pin>: Verify PIN2\n" \
+ " --set-pin1-protection <state>: Set PIN1 protection state (disabled, enabled)\n" \
+ " --pin <pin>: PIN1 needed to change state\n" \
+ " --set-pin2-protection <state>: Set PIN2 protection state (disabled, enabled)\n" \
+ " --pin <pin2>: PIN2 needed to change state\n" \
+ " --change-pin1: Change PIN1\n" \
+ " --pin <old pin>: Current PIN1\n" \
+ " --new-pin <new pin>: New pin\n" \
+ " --change-pin2: Change PIN2\n" \
+ " --pin <old pin>: Current PIN2\n" \
+ " --new-pin <new pin>: New pin\n" \
+ " --unblock-pin1: Unblock PIN1\n" \
+ " --puk <puk>: PUK needed to unblock\n" \
+ " --new-pin <new pin>: New pin\n" \
+ " --unblock-pin2: Unblock PIN2\n" \
+ " --puk <puk>: PUK needed to unblock\n" \
+ " --new-pin <new pin>: New pin\n" \
+ " --get-iccid: Get the ICCID\n" \
+ " --get-imsi: Get International Mobile Subscriber ID\n" \
+ " --get-imei: Get International Mobile Equipment ID\n" \
+ " --get-msisdn: Get the MSISDN (telephone number)\n" \
+ " --reset-dms: Reset the DMS service\n" \
+ " --get-device-operating-mode Get the device operating mode\n" \
+ " --set-device-operating-mode <m> Set the device operating mode\n" \
+ " (modes: online, low_power, factory_test, offline\n" \
+ " reset, shutting_down, persistent_low_power,\n" \
+ " mode_only_low_power)\n" \
+ " --fcc-auth: Set FCC authentication\n" \
+
+const char *get_pin_status(int status);
--- /dev/null
+/*
+ * uqmi -- tiny QMI support implementation
+ *
+ * Copyright (C) 2014-2015 Felix Fietkau <nbd@openwrt.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ */
+
+#include "uqmi.h"
+#include "qmi-message.h"
+#include "commands.h"
+
+#include <libubox/blobmsg.h>
+
+static struct qmi_nas_get_tx_rx_info_request tx_rx_req;
+static struct qmi_nas_set_system_selection_preference_request sel_req;
+static struct {
+ bool mcc_is_set;
+ bool mnc_is_set;
+} plmn_code_flag;
+
+static void
+print_earfcn_info(uint32_t earfcn)
+{
+ /* https://www.sqimway.com/lte_band.php */
+ static const struct {
+ uint32_t min;
+ uint32_t max;
+ uint16_t band;
+ uint16_t freq;
+ const char *duplex;
+ } earfcn_ranges[] = {
+ { 0, 599, 1, 2100, "FDD" },
+ { 600, 1199, 2, 1800, "FDD" },
+ { 1200, 1949, 3, 1800, "FDD" },
+ { 1950, 2399, 4, 1700, "FDD" },
+ { 2400, 2649, 5, 850, "FDD" },
+ { 2650, 2749, 6, 800, "FDD" },
+ { 2750, 3449, 7, 2600, "FDD" },
+ { 3450, 3799, 8, 900, "FDD" },
+ { 3800, 4149, 9, 1800, "FDD" },
+ { 4150, 4749, 10, 1700, "FDD" },
+ { 4750, 4999, 11, 1500, "FDD" },
+ { 5000, 5179, 12, 700, "FDD" },
+ { 5180, 5279, 13, 700, "FDD" },
+ { 5280, 5379, 14, 700, "FDD" },
+ { 5730, 5849, 17, 700, "FDD" },
+ { 5850, 5999, 18, 850, "FDD" },
+ { 6000, 6149, 19, 850, "FDD" },
+ { 6150, 6449, 20, 800, "FDD" },
+ { 6450, 6599, 21, 1500, "FDD" },
+ { 6600, 7399, 22, 3500, "FDD" },
+ { 7500, 7699, 23, 2000, "FDD" },
+ { 7700, 8039, 24, 1600, "FDD" },
+ { 8040, 8689, 25, 1900, "FDD" },
+ { 8690, 9039, 26, 850, "FDD" },
+ { 9040, 9209, 27, 800, "FDD" },
+ { 9210, 9659, 28, 700, "FDD" },
+ { 9660, 9769, 29, 700, "SDL" },
+ { 9770, 9869, 30, 2300, "FDD" },
+ { 9870, 9919, 31, 450, "FDD" },
+ { 9920, 10359, 32, 1500, "SDL" },
+ { 36000, 36199, 33, 1900, "TDD" },
+ { 36200, 36349, 34, 2000, "TDD" },
+ { 36350, 36949, 35, 1900, "TDD" },
+ { 36950, 37549, 36, 1900, "TDD" },
+ { 37550, 37749, 37, 1900, "TDD" },
+ { 37750, 38249, 38, 2600, "TDD" },
+ { 38250, 38649, 39, 1900, "TDD" },
+ { 38650, 39649, 40, 2300, "TDD" },
+ { 39650, 41589, 41, 2500, "TDD" },
+ { 41590, 43589, 42, 3500, "TDD" },
+ { 43590, 45589, 43, 3700, "TDD" },
+ { 45590, 46589, 44, 700, "TDD" },
+ };
+
+ for (int i = 0; i < (sizeof(earfcn_ranges) / sizeof(*earfcn_ranges)); i++) {
+ if (earfcn <= earfcn_ranges[i].max && earfcn >= earfcn_ranges[i].min) {
+ blobmsg_add_u32(&status, "band", earfcn_ranges[i].band);
+ blobmsg_add_u32(&status, "frequency", earfcn_ranges[i].freq);
+ blobmsg_add_string(&status, "duplex", earfcn_ranges[i].duplex);
+ return;
+ }
+ }
+}
+
+#define cmd_nas_do_set_system_selection_cb no_cb
+static enum qmi_cmd_result
+cmd_nas_do_set_system_selection_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ qmi_set_nas_set_system_selection_preference_request(msg, &sel_req);
+ return QMI_CMD_REQUEST;
+}
+
+static enum qmi_cmd_result
+do_sel_network(void)
+{
+ static bool use_sel_req = false;
+
+ if (!use_sel_req) {
+ use_sel_req = true;
+ uqmi_add_command(NULL, __UQMI_COMMAND_nas_do_set_system_selection);
+ }
+
+ return QMI_CMD_DONE;
+}
+
+#define cmd_nas_set_network_modes_cb no_cb
+static enum qmi_cmd_result
+cmd_nas_set_network_modes_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ static const struct {
+ const char *name;
+ QmiNasRatModePreference val;
+ } modes[] = {
+ { "cdma", QMI_NAS_RAT_MODE_PREFERENCE_CDMA_1X | QMI_NAS_RAT_MODE_PREFERENCE_CDMA_1XEVDO },
+ { "td-scdma", QMI_NAS_RAT_MODE_PREFERENCE_TD_SCDMA },
+ { "gsm", QMI_NAS_RAT_MODE_PREFERENCE_GSM },
+ { "umts", QMI_NAS_RAT_MODE_PREFERENCE_UMTS },
+ { "lte", QMI_NAS_RAT_MODE_PREFERENCE_LTE },
+ };
+ QmiNasRatModePreference val = 0;
+ char *word;
+ int i;
+
+ for (word = strtok(arg, ",");
+ word;
+ word = strtok(NULL, ",")) {
+ bool found = false;
+
+ for (i = 0; i < ARRAY_SIZE(modes); i++) {
+ if (strcmp(word, modes[i].name) != 0 &&
+ strcmp(word, "all") != 0)
+ continue;
+
+ val |= modes[i].val;
+ found = true;
+ }
+
+ if (!found) {
+ uqmi_add_error("Invalid network mode");
+ return QMI_CMD_EXIT;
+ }
+ }
+
+ qmi_set(&sel_req, mode_preference, val);
+ return do_sel_network();
+}
+
+#define cmd_nas_set_network_preference_cb no_cb
+static enum qmi_cmd_result
+cmd_nas_set_network_preference_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ QmiNasGsmWcdmaAcquisitionOrderPreference pref = QMI_NAS_GSM_WCDMA_ACQUISITION_ORDER_PREFERENCE_AUTOMATIC;
+
+ if (!strcmp(arg, "gsm"))
+ pref = QMI_NAS_GSM_WCDMA_ACQUISITION_ORDER_PREFERENCE_GSM;
+ else if (!strcmp(arg, "wcdma"))
+ pref = QMI_NAS_GSM_WCDMA_ACQUISITION_ORDER_PREFERENCE_WCDMA;
+
+ qmi_set(&sel_req, gsm_wcdma_acquisition_order_preference, pref);
+ return do_sel_network();
+}
+
+#define cmd_nas_set_roaming_cb no_cb
+static enum qmi_cmd_result
+cmd_nas_set_roaming_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ QmiNasRoamingPreference pref;
+
+ if (!strcmp(arg, "any"))
+ pref = QMI_NAS_ROAMING_PREFERENCE_ANY;
+ else if (!strcmp(arg, "only"))
+ pref = QMI_NAS_ROAMING_PREFERENCE_NOT_OFF;
+ else if (!strcmp(arg, "off"))
+ pref = QMI_NAS_ROAMING_PREFERENCE_OFF;
+ else
+ return uqmi_add_error("Invalid argument");
+
+ qmi_set(&sel_req, roaming_preference, pref);
+ return do_sel_network();
+}
+
+#define cmd_nas_set_mcc_cb no_cb
+static enum qmi_cmd_result
+cmd_nas_set_mcc_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ char *err;
+ int value = strtoul(arg, &err, 10);
+ if (err && *err) {
+ uqmi_add_error("Invalid MCC value");
+ return QMI_CMD_EXIT;
+ }
+
+ sel_req.data.network_selection_preference.mcc = value;
+ plmn_code_flag.mcc_is_set = true;
+ return QMI_CMD_DONE;
+}
+
+#define cmd_nas_set_mnc_cb no_cb
+static enum qmi_cmd_result
+cmd_nas_set_mnc_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ char *err;
+ int value = strtoul(arg, &err, 10);
+ if (err && *err) {
+ uqmi_add_error("Invalid MNC value");
+ return QMI_CMD_EXIT;
+ }
+
+ sel_req.data.network_selection_preference.mnc = value;
+ plmn_code_flag.mnc_is_set = true;
+ return QMI_CMD_DONE;
+}
+
+#define cmd_nas_set_plmn_cb no_cb
+static enum qmi_cmd_result
+cmd_nas_set_plmn_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ sel_req.set.network_selection_preference = 1;
+ sel_req.data.network_selection_preference.mode = QMI_NAS_NETWORK_SELECTION_PREFERENCE_AUTOMATIC;
+
+ if (!plmn_code_flag.mcc_is_set && plmn_code_flag.mnc_is_set) {
+ uqmi_add_error("No MCC value");
+ return QMI_CMD_EXIT;
+ }
+
+ if (plmn_code_flag.mcc_is_set && sel_req.data.network_selection_preference.mcc) {
+ if (!plmn_code_flag.mnc_is_set) {
+ uqmi_add_error("No MNC value");
+ return QMI_CMD_EXIT;
+ } else {
+ sel_req.data.network_selection_preference.mode = QMI_NAS_NETWORK_SELECTION_PREFERENCE_MANUAL;
+ }
+ }
+
+ return do_sel_network();
+}
+
+#define cmd_nas_initiate_network_register_cb no_cb
+static enum qmi_cmd_result
+cmd_nas_initiate_network_register_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ static struct qmi_nas_initiate_network_register_request register_req = {
+ QMI_INIT(action, QMI_NAS_NETWORK_REGISTER_TYPE_AUTOMATIC)
+ };
+
+ qmi_set_nas_initiate_network_register_request(msg, ®ister_req);
+ return QMI_CMD_REQUEST;
+}
+
+static void
+cmd_nas_get_signal_info_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
+{
+ struct qmi_nas_get_signal_info_response res;
+ void *c;
+
+ qmi_parse_nas_get_signal_info_response(msg, &res);
+
+ c = blobmsg_open_table(&status, NULL);
+ if (res.set.cdma_signal_strength) {
+ blobmsg_add_string(&status, "type", "cdma");
+ blobmsg_add_u32(&status, "rssi", (int32_t) res.data.cdma_signal_strength.rssi);
+ blobmsg_add_u32(&status, "ecio", (int32_t) res.data.cdma_signal_strength.ecio);
+ }
+
+ if (res.set.hdr_signal_strength) {
+ blobmsg_add_string(&status, "type", "hdr");
+ blobmsg_add_u32(&status, "rssi", (int32_t) res.data.hdr_signal_strength.rssi);
+ blobmsg_add_u32(&status, "ecio", (int32_t) res.data.hdr_signal_strength.ecio);
+ blobmsg_add_u32(&status, "io", res.data.hdr_signal_strength.io);
+ }
+
+ if (res.set.gsm_signal_strength) {
+ blobmsg_add_string(&status, "type", "gsm");
+ blobmsg_add_u32(&status, "signal", (int32_t) res.data.gsm_signal_strength);
+ }
+
+ if (res.set.wcdma_signal_strength) {
+ blobmsg_add_string(&status, "type", "wcdma");
+ blobmsg_add_u32(&status, "rssi", (int32_t) res.data.wcdma_signal_strength.rssi);
+ blobmsg_add_u32(&status, "ecio", (int32_t) res.data.wcdma_signal_strength.ecio);
+ }
+
+ if (res.set.lte_signal_strength) {
+ blobmsg_add_string(&status, "type", "lte");
+ blobmsg_add_u32(&status, "rssi", (int32_t) res.data.lte_signal_strength.rssi);
+ blobmsg_add_u32(&status, "rsrq", (int32_t) res.data.lte_signal_strength.rsrq);
+ blobmsg_add_u32(&status, "rsrp", (int32_t) res.data.lte_signal_strength.rsrp);
+ blobmsg_add_double(&status, "snr", (double) res.data.lte_signal_strength.snr*0.1);
+ }
+
+ if (res.set.tdma_signal_strength) {
+ blobmsg_add_string(&status, "type", "tdma");
+ blobmsg_add_u32(&status, "signal", (int32_t) res.data.tdma_signal_strength);
+ }
+
+ blobmsg_close_table(&status, c);
+}
+
+static void
+print_system_info(uint8_t svc_status, uint8_t tsvc_status, bool preferred, bool system_info,
+ bool domain_valid, uint8_t domain,
+ bool service_cap_valid, uint8_t service_cap,
+ bool roaming_status_valid, uint8_t roaming_status,
+ bool forbidden_valid, bool forbidden,
+ bool network_id_valid, char *mcc, char *mnc,
+ bool lac_valid, uint16_t lac)
+{
+ static const char *map_service[] = {
+ [QMI_NAS_SERVICE_STATUS_NONE] = "none",
+ [QMI_NAS_SERVICE_STATUS_LIMITED] = "limited",
+ [QMI_NAS_SERVICE_STATUS_AVAILABLE] = "available",
+ [QMI_NAS_SERVICE_STATUS_LIMITED_REGIONAL] = "limited regional",
+ [QMI_NAS_SERVICE_STATUS_POWER_SAVE] = "power save",
+ };
+
+ static const char *map_roaming[] = {
+ [QMI_NAS_ROAMING_STATUS_OFF] = "off",
+ [QMI_NAS_ROAMING_STATUS_ON] = "on",
+ [QMI_NAS_ROAMING_STATUS_BLINK] = "blink",
+ [QMI_NAS_ROAMING_STATUS_OUT_OF_NEIGHBORHOOD] = "out of neighborhood",
+ [QMI_NAS_ROAMING_STATUS_OUT_OF_BUILDING] = "out of building",
+ [QMI_NAS_ROAMING_STATUS_PREFERRED_SYSTEM] = "preferred system",
+ [QMI_NAS_ROAMING_STATUS_AVAILABLE_SYSTEM] = "available system",
+ [QMI_NAS_ROAMING_STATUS_ALLIANCE_PARTNER] = "alliance partner",
+ [QMI_NAS_ROAMING_STATUS_PREMIUM_PARTNER] = "premium partner",
+ [QMI_NAS_ROAMING_STATUS_FULL_SERVICE] = "full service",
+ [QMI_NAS_ROAMING_STATUS_PARTIAL_SERVICE] = "partial service",
+ [QMI_NAS_ROAMING_STATUS_BANNER_ON] = "banner on",
+ [QMI_NAS_ROAMING_STATUS_BANNER_OFF] = "banner off",
+ };
+
+ static const char *map_network[] = {
+ [QMI_NAS_NETWORK_SERVICE_DOMAIN_NONE] = "none",
+ [QMI_NAS_NETWORK_SERVICE_DOMAIN_CS] = "cs",
+ [QMI_NAS_NETWORK_SERVICE_DOMAIN_PS] = "ps",
+ [QMI_NAS_NETWORK_SERVICE_DOMAIN_CS_PS] = "cs-ps",
+ [QMI_NAS_NETWORK_SERVICE_DOMAIN_UNKNOWN] = "unknown",
+ };
+
+ blobmsg_add_string(&status, "service_status", map_service[svc_status]);
+ blobmsg_add_string(&status, "true_service_status", map_service[tsvc_status]);
+ blobmsg_add_u8(&status, "preferred_data_path", preferred);
+
+ if (system_info) {
+ if (domain_valid)
+ blobmsg_add_string(&status, "domain", map_network[domain]);
+ if (service_cap_valid)
+ blobmsg_add_string(&status, "service", map_network[service_cap]);
+ if (roaming_status_valid)
+ blobmsg_add_string(&status, "roaming_status", map_roaming[roaming_status]);
+ if (forbidden_valid)
+ blobmsg_add_u8(&status, "forbidden", forbidden);
+ if (network_id_valid) {
+ blobmsg_add_string(&status, "mcc", mcc);
+ if ((uint8_t)mnc[2] == 255)
+ mnc[2] = 0;
+ blobmsg_add_string(&status, "mnc", mnc);
+ }
+ if (lac_valid)
+ blobmsg_add_u32(&status, "location_area_code", (int32_t) lac);
+ }
+}
+
+static void
+cmd_nas_get_system_info_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
+{
+ static const char *cell_status[] = {
+ [QMI_NAS_CELL_ACCESS_STATUS_NORMAL_ONLY] = "normal",
+ [QMI_NAS_CELL_ACCESS_STATUS_EMERGENCY_ONLY] = "emergency",
+ [QMI_NAS_CELL_ACCESS_STATUS_NO_CALLS] = "no calls",
+ [QMI_NAS_CELL_ACCESS_STATUS_ALL_CALLS] = "all calls",
+ [QMI_NAS_CELL_ACCESS_STATUS_UNKNOWN] = "unknown",
+ };
+
+ struct qmi_nas_get_system_info_response res;
+ void *c, *t;
+
+ qmi_parse_nas_get_system_info_response(msg, &res);
+ t = blobmsg_open_table(&status, NULL);
+ if (res.set.gsm_service_status) {
+ c = blobmsg_open_table(&status, "gsm");
+ print_system_info(res.data.gsm_service_status.service_status,
+ res.data.gsm_service_status.true_service_status,
+ res.data.gsm_service_status.preferred_data_path,
+ res.set.gsm_system_info_v2,
+ res.data.gsm_system_info_v2.domain_valid,
+ res.data.gsm_system_info_v2.domain,
+ res.data.gsm_system_info_v2.service_capability_valid,
+ res.data.gsm_system_info_v2.service_capability,
+ res.data.gsm_system_info_v2.roaming_status_valid,
+ res.data.gsm_system_info_v2.roaming_status,
+ res.data.gsm_system_info_v2.forbidden_valid,
+ res.data.gsm_system_info_v2.forbidden,
+ res.data.gsm_system_info_v2.network_id_valid,
+ res.data.gsm_system_info_v2.mcc,
+ res.data.gsm_system_info_v2.mnc,
+ res.data.gsm_system_info_v2.lac_valid,
+ res.data.gsm_system_info_v2.lac);
+ if (res.set.gsm_system_info_v2 && res.data.gsm_system_info_v2.cid_valid)
+ blobmsg_add_u32(&status, "cell_id",
+ res.data.gsm_system_info_v2.cid);
+ if (res.set.additional_gsm_system_info &&
+ res.data.additional_gsm_system_info.geo_system_index != 0xFFFF)
+ blobmsg_add_u32(&status, "geo_system_index",
+ res.data.additional_gsm_system_info.geo_system_index);
+ blobmsg_close_table(&status, c);
+ }
+
+ if (res.set.wcdma_service_status) {
+ c = blobmsg_open_table(&status, "wcdma");
+ print_system_info(res.data.wcdma_service_status.service_status,
+ res.data.wcdma_service_status.true_service_status,
+ res.data.wcdma_service_status.preferred_data_path,
+ res.set.wcdma_system_info_v2,
+ res.data.wcdma_system_info_v2.domain_valid,
+ res.data.wcdma_system_info_v2.domain,
+ res.data.wcdma_system_info_v2.service_capability_valid,
+ res.data.wcdma_system_info_v2.service_capability,
+ res.data.wcdma_system_info_v2.roaming_status_valid,
+ res.data.wcdma_system_info_v2.roaming_status,
+ res.data.wcdma_system_info_v2.forbidden_valid,
+ res.data.wcdma_system_info_v2.forbidden,
+ res.data.wcdma_system_info_v2.network_id_valid,
+ res.data.wcdma_system_info_v2.mcc,
+ res.data.wcdma_system_info_v2.mnc,
+ res.data.wcdma_system_info_v2.lac_valid,
+ res.data.wcdma_system_info_v2.lac);
+ if (res.set.wcdma_system_info_v2 && res.data.wcdma_system_info_v2.cid_valid) {
+ blobmsg_add_u32(&status, "rnc_id",res.data.wcdma_system_info_v2.cid/65536);
+ blobmsg_add_u32(&status, "cell_id",res.data.wcdma_system_info_v2.cid%65536);
+ }
+ if (res.set.additional_wcdma_system_info &&
+ res.data.additional_wcdma_system_info.geo_system_index != 0xFFFF)
+ blobmsg_add_u32(&status, "geo_system_index",
+ res.data.additional_wcdma_system_info.geo_system_index);
+ blobmsg_close_table(&status, c);
+ }
+
+ if (res.set.lte_service_status) {
+ c = blobmsg_open_table(&status, "lte");
+ print_system_info(res.data.lte_service_status.service_status,
+ res.data.lte_service_status.true_service_status,
+ res.data.lte_service_status.preferred_data_path,
+ res.set.lte_system_info_v2,
+ res.data.lte_system_info_v2.domain_valid,
+ res.data.lte_system_info_v2.domain,
+ res.data.lte_system_info_v2.service_capability_valid,
+ res.data.lte_system_info_v2.service_capability,
+ res.data.lte_system_info_v2.roaming_status_valid,
+ res.data.lte_system_info_v2.roaming_status,
+ res.data.lte_system_info_v2.forbidden_valid,
+ res.data.lte_system_info_v2.forbidden,
+ res.data.lte_system_info_v2.network_id_valid,
+ res.data.lte_system_info_v2.mcc,
+ res.data.lte_system_info_v2.mnc,
+ res.data.lte_system_info_v2.lac_valid,
+ res.data.lte_system_info_v2.lac);
+ if (res.set.lte_system_info_v2 && res.data.lte_system_info_v2.tac_valid)
+ blobmsg_add_u32(&status, "tracking_area_code",
+ res.data.lte_system_info_v2.tac);
+ if (res.set.lte_system_info_v2 && res.data.lte_system_info_v2.cid_valid) {
+ blobmsg_add_u32(&status, "enodeb_id",res.data.lte_system_info_v2.cid/256);
+ blobmsg_add_u32(&status, "cell_id",res.data.lte_system_info_v2.cid%256);
+ }
+ if (res.set.additional_lte_system_info &&
+ res.data.additional_lte_system_info.geo_system_index != 0xFFFF)
+ blobmsg_add_u32(&status, "geo_system_index",
+ res.data.additional_lte_system_info.geo_system_index);
+ if (res.set.lte_voice_support)
+ blobmsg_add_u8(&status, "voice_support", res.data.lte_voice_support);
+ if (res.set.ims_voice_support)
+ blobmsg_add_u8(&status, "ims_voice_support", res.data.ims_voice_support);
+ if (res.set.lte_cell_access_status)
+ blobmsg_add_string(&status, "cell_access_status",
+ cell_status[res.data.lte_cell_access_status]);
+ if (res.set.network_selection_registration_restriction)
+ blobmsg_add_u32(&status, "registration_restriction",
+ res.data.network_selection_registration_restriction);
+ if (res.set.lte_registration_domain)
+ blobmsg_add_u32(&status, "registration_domain",
+ res.data.lte_registration_domain);
+ if (res.set.eutra_with_nr5g_availability)
+ blobmsg_add_u8(&status, "5g_nsa_available",
+ res.data.eutra_with_nr5g_availability);
+ if (res.set.dcnr_restriction_info)
+ blobmsg_add_u8(&status, "dcnr_restriction", res.data.dcnr_restriction_info);
+
+ blobmsg_close_table(&status, c);
+ }
+ blobmsg_close_table(&status, t);
+}
+
+static enum qmi_cmd_result
+cmd_nas_get_system_info_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ qmi_set_nas_get_system_info_request(msg);
+ return QMI_CMD_REQUEST;
+}
+
+static void
+print_channel_info(int32_t cell_id, int32_t channel, uint32_t bw)
+{
+ static const char *map_bandwidth[] = {
+ [QMI_NAS_DL_BANDWIDTH_1_4] = "1.4",
+ [QMI_NAS_DL_BANDWIDTH_3] = "3",
+ [QMI_NAS_DL_BANDWIDTH_5] = "5",
+ [QMI_NAS_DL_BANDWIDTH_10] = "10",
+ [QMI_NAS_DL_BANDWIDTH_15] = "15",
+ [QMI_NAS_DL_BANDWIDTH_20] = "20",
+ [QMI_NAS_DL_BANDWIDTH_INVALID] = "invalid",
+ [QMI_NAS_DL_BANDWIDTH_UNKNOWN] = "unknown",
+ };
+
+ blobmsg_add_u32(&status, "cell_id", cell_id);
+ blobmsg_add_u32(&status, "channel", channel);
+ print_earfcn_info(channel);
+ blobmsg_add_string(&status, "bandwidth", map_bandwidth[bw]);
+}
+
+static void
+cmd_nas_get_lte_cphy_ca_info_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
+{
+ struct qmi_nas_get_lte_cphy_ca_info_response res;
+ static const char *scell_state[] = {
+ [QMI_NAS_SCELL_STATE_DECONFIGURED] = "deconfigured",
+ [QMI_NAS_SCELL_STATE_DEACTIVATED] = "deactivated",
+ [QMI_NAS_SCELL_STATE_ACTIVATED] = "activated",
+ };
+ char idx_buf[16];
+ void *t, *c;
+ int i;
+
+ qmi_parse_nas_get_lte_cphy_ca_info_response(msg, &res);
+ t = blobmsg_open_table(&status, NULL);
+ if (res.set.phy_ca_agg_pcell_info) {
+ c = blobmsg_open_table(&status, "primary");
+ print_channel_info(res.data.phy_ca_agg_pcell_info.physical_cell_id,
+ res.data.phy_ca_agg_pcell_info.rx_channel,
+ res.data.phy_ca_agg_pcell_info.dl_bandwidth);
+ blobmsg_close_table(&status, c);
+ }
+ if (res.set.phy_ca_agg_scell_info && res.data.phy_ca_agg_secondary_cells_n) {
+ for (i = 0; i < res.data.phy_ca_agg_secondary_cells_n; i++) {
+ if (res.data.phy_ca_agg_secondary_cells[i].rx_channel == 0)
+ break;
+ sprintf(idx_buf, "secondary_%d",
+ res.data.phy_ca_agg_secondary_cells[i].cell_index);
+ c = blobmsg_open_table(&status, idx_buf);
+ print_channel_info(res.data.phy_ca_agg_secondary_cells[i].physical_cell_id,
+ res.data.phy_ca_agg_secondary_cells[i].rx_channel,
+ res.data.phy_ca_agg_secondary_cells[i].dl_bandwidth);
+ blobmsg_add_string(&status, "state",
+ scell_state[res.data.phy_ca_agg_secondary_cells[i].state]);
+ blobmsg_close_table(&status, c);
+ }
+ } else {
+ if (res.set.scell_index)
+ sprintf(idx_buf, "secondary_%d", res.data.scell_index);
+ else
+ sprintf(idx_buf, "secondary");
+ if (res.set.phy_ca_agg_scell_info && res.data.phy_ca_agg_scell_info.rx_channel != 0) {
+ c = blobmsg_open_table(&status, idx_buf);
+ print_channel_info(res.data.phy_ca_agg_scell_info.physical_cell_id,
+ res.data.phy_ca_agg_scell_info.rx_channel,
+ res.data.phy_ca_agg_scell_info.dl_bandwidth);
+ blobmsg_add_string(&status, "state",
+ scell_state[res.data.phy_ca_agg_scell_info.state]);
+ blobmsg_close_table(&status, c);
+ }
+ }
+ blobmsg_close_table(&status, t);
+}
+
+static enum qmi_cmd_result
+cmd_nas_get_lte_cphy_ca_info_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ qmi_set_nas_get_lte_cphy_ca_info_request(msg);
+ return QMI_CMD_REQUEST;
+}
+
+static void
+print_chain_info(int8_t radio, bool tuned, int32_t rssi, int32_t ecio, int32_t rsrp, int32_t rscp, uint32_t phase)
+{
+ blobmsg_add_u8(&status, "tuned", tuned);
+ blobmsg_add_double(&status, "rssi", (double) rssi*0.1);
+ if (radio == QMI_NAS_RADIO_INTERFACE_LTE) {
+ blobmsg_add_double(&status, "rsrq", (double) ecio*-0.1);
+ blobmsg_add_double(&status, "rsrp", (double) rsrp*-0.1);
+ }
+ if (radio == QMI_NAS_RADIO_INTERFACE_UMTS) {
+ blobmsg_add_double(&status, "ecio", (double) ecio*-0.1);
+ blobmsg_add_double(&status, "rscp", (double) rscp*-0.1);
+ }
+ if (phase != 0xFFFFFFFF)
+ blobmsg_add_double(&status, "phase", (double) phase*0.01);
+}
+
+static void
+cmd_nas_get_tx_rx_info_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
+{
+ struct qmi_nas_get_tx_rx_info_response res;
+ void *c, *t;
+
+ qmi_parse_nas_get_tx_rx_info_response(msg, &res);
+ t = blobmsg_open_table(&status, NULL);
+ if (res.set.rx_chain_0_info) {
+ c = blobmsg_open_table(&status, "rx_chain_0");
+ print_chain_info(tx_rx_req.data.radio_interface,
+ res.data.rx_chain_0_info.is_radio_tuned,
+ res.data.rx_chain_0_info.rx_power,
+ res.data.rx_chain_0_info.ecio,
+ res.data.rx_chain_0_info.rsrp,
+ res.data.rx_chain_0_info.rscp,
+ res.data.rx_chain_0_info.phase);
+ blobmsg_close_table(&status, c);
+ }
+ if (res.set.rx_chain_1_info) {
+ c = blobmsg_open_table(&status, "rx_chain_1");
+ print_chain_info(tx_rx_req.data.radio_interface,
+ res.data.rx_chain_1_info.is_radio_tuned,
+ res.data.rx_chain_1_info.rx_power,
+ res.data.rx_chain_1_info.ecio,
+ res.data.rx_chain_1_info.rsrp,
+ res.data.rx_chain_1_info.rscp,
+ res.data.rx_chain_1_info.phase);
+ blobmsg_close_table(&status, c);
+ }
+ if (res.set.rx_chain_2_info) {
+ c = blobmsg_open_table(&status, "rx_chain_2");
+ print_chain_info(tx_rx_req.data.radio_interface,
+ res.data.rx_chain_2_info.is_radio_tuned,
+ res.data.rx_chain_2_info.rx_power,
+ res.data.rx_chain_2_info.ecio,
+ res.data.rx_chain_2_info.rsrp,
+ res.data.rx_chain_2_info.rscp,
+ res.data.rx_chain_2_info.phase);
+ blobmsg_close_table(&status, c);
+ }
+ if (res.set.rx_chain_3_info) {
+ c = blobmsg_open_table(&status, "rx_chain_3");
+ print_chain_info(tx_rx_req.data.radio_interface,
+ res.data.rx_chain_3_info.is_radio_tuned,
+ res.data.rx_chain_3_info.rx_power,
+ res.data.rx_chain_3_info.ecio,
+ res.data.rx_chain_3_info.rsrp,
+ res.data.rx_chain_3_info.rscp,
+ res.data.rx_chain_3_info.phase);
+ blobmsg_close_table(&status, c);
+ }
+ if (res.set.tx_info) {
+ c = blobmsg_open_table(&status, "tx");
+ blobmsg_add_u8(&status, "traffic", res.data.tx_info.is_in_traffic);
+ if (res.data.tx_info.is_in_traffic)
+ blobmsg_add_double(&status, "tx_power",
+ (double) res.data.tx_info.tx_power*0.1);
+ blobmsg_close_table(&status, c);
+ }
+ blobmsg_close_table(&status, t);
+}
+
+
+static enum qmi_cmd_result
+cmd_nas_get_tx_rx_info_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ int radio = 0;
+
+ if (!strcmp(arg, "lte"))
+ radio = QMI_NAS_RADIO_INTERFACE_LTE;
+ else if (!strcmp(arg, "umts"))
+ radio = QMI_NAS_RADIO_INTERFACE_UMTS;
+ else if (!strcmp(arg, "gsm"))
+ radio = QMI_NAS_RADIO_INTERFACE_GSM;
+ else
+ return uqmi_add_error("Invalid argument");
+
+ qmi_set(&tx_rx_req, radio_interface, radio);
+ qmi_set_nas_get_tx_rx_info_request(msg, &tx_rx_req);
+ return QMI_CMD_REQUEST;
+}
+
+static void
+print_lte_info(int32_t cell_id, int16_t rsrp, int16_t rsrq, int16_t rssi)
+{
+ blobmsg_add_u32(&status, "physical_cell_id", cell_id);
+ blobmsg_add_double(&status, "rsrq", ((double)rsrq)/10);
+ blobmsg_add_double(&status, "rsrp", ((double)rsrp)/10);
+ blobmsg_add_double(&status, "rssi", ((double)rssi)/10);
+}
+
+static void
+print_sel_info(int32_t priority, int32_t high, int32_t low)
+{
+ blobmsg_add_u32(&status, "cell_reselection_priority", priority);
+ blobmsg_add_u32(&status, "cell_reselection_low", low);
+ blobmsg_add_u32(&status, "cell_reselection_high", high);
+}
+
+static void
+cmd_nas_get_cell_location_info_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
+{
+ struct qmi_nas_get_cell_location_info_response res;
+ void *c = NULL, *t, *cell, *freq;
+ int i, j;
+
+ qmi_parse_nas_get_cell_location_info_response(msg, &res);
+ t = blobmsg_open_table(&status, NULL);
+
+ if (res.set.umts_info_v2) {
+ c = blobmsg_open_table(&status, "umts_info");
+ blobmsg_add_u32(&status, "location_area_code", res.data.umts_info_v2.lac);
+ blobmsg_add_u32(&status, "cell_id", res.data.umts_info_v2.cell_id);
+ blobmsg_add_u32(&status, "channel",
+ res.data.umts_info_v2.utra_absolute_rf_channel_number);
+ blobmsg_add_u32(&status, "primary_scrambling_code",
+ res.data.umts_info_v2.primary_scrambling_code);
+ blobmsg_add_u32(&status, "rscp", res.data.umts_info_v2.rscp);
+ blobmsg_add_u32(&status, "ecio", res.data.umts_info_v2.ecio);
+ for (j = 0; j < res.data.umts_info_v2.cell_n; j++) {
+ cell = blobmsg_open_table(&status, NULL);
+ blobmsg_add_u32(&status, "channel",
+ res.data.umts_info_v2.cell[j].utra_absolute_rf_channel_number);
+ blobmsg_add_u32(&status, "primary_scrambling_code",
+ res.data.umts_info_v2.cell[j].primary_scrambling_code);
+ blobmsg_add_u32(&status, "rscp", res.data.umts_info_v2.cell[j].rscp);
+ blobmsg_add_u32(&status, "ecio", res.data.umts_info_v2.cell[j].ecio);
+ blobmsg_close_table(&status, cell);
+ }
+ for (j = 0; j < res.data.umts_info_v2.neighboring_geran_n; j++) {
+ cell = blobmsg_open_table(&status, "neighboring_geran");
+ blobmsg_add_u32(&status, "channel",
+ res.data.umts_info_v2.neighboring_geran[j].geran_absolute_rf_channel_number);
+ blobmsg_add_u8(&status, "network_color_code",
+ res.data.umts_info_v2.neighboring_geran[j].network_color_code);
+ blobmsg_add_u8(&status, "base_station_color_code",
+ res.data.umts_info_v2.neighboring_geran[j].base_station_color_code);
+ blobmsg_add_u32(&status, "rssi",
+ res.data.umts_info_v2.neighboring_geran[j].rssi);
+ blobmsg_close_table(&status, cell);
+ }
+ blobmsg_close_table(&status, c);
+ }
+ if (res.set.intrafrequency_lte_info_v2) {
+ c = blobmsg_open_table(&status, "intrafrequency_lte_info");
+ blobmsg_add_u32(&status, "tracking_area_code",
+ res.data.intrafrequency_lte_info_v2.tracking_area_code);
+ blobmsg_add_u32(&status, "enodeb_id",
+ res.data.intrafrequency_lte_info_v2.global_cell_id/256);
+ blobmsg_add_u32(&status, "cell_id",
+ res.data.intrafrequency_lte_info_v2.global_cell_id%256);
+ blobmsg_add_u32(&status, "channel",
+ res.data.intrafrequency_lte_info_v2.eutra_absolute_rf_channel_number);
+ print_earfcn_info(res.data.intrafrequency_lte_info_v2.eutra_absolute_rf_channel_number);
+ blobmsg_add_u32(&status, "serving_cell_id",
+ res.data.intrafrequency_lte_info_v2.serving_cell_id);
+ if (res.data.intrafrequency_lte_info_v2.ue_in_idle) {
+ blobmsg_add_u32(&status, "cell_reselection_priority",
+ res.data.intrafrequency_lte_info_v2.cell_reselection_priority);
+ blobmsg_add_u32(&status, "s_non_intra_search_threshold",
+ res.data.intrafrequency_lte_info_v2.s_non_intra_search_threshold);
+ blobmsg_add_u32(&status, "serving_cell_low_threshold",
+ res.data.intrafrequency_lte_info_v2.serving_cell_low_threshold);
+ blobmsg_add_u32(&status, "s_intra_search_threshold",
+ res.data.intrafrequency_lte_info_v2.s_intra_search_threshold);
+ }
+ for (i = 0; i < res.data.intrafrequency_lte_info_v2.cell_n; i++) {
+ cell = blobmsg_open_table(&status, NULL);
+ print_lte_info(res.data.intrafrequency_lte_info_v2.cell[i].physical_cell_id,
+ res.data.intrafrequency_lte_info_v2.cell[i].rsrq,
+ res.data.intrafrequency_lte_info_v2.cell[i].rsrp,
+ res.data.intrafrequency_lte_info_v2.cell[i].rssi);
+ if (res.data.intrafrequency_lte_info_v2.ue_in_idle)
+ blobmsg_add_u32(&status, "cell_selection_rx_level",
+ res.data.intrafrequency_lte_info_v2.cell[i].cell_selection_rx_level);
+ blobmsg_close_table(&status, cell);
+ }
+ blobmsg_close_table(&status, c);
+ }
+ if (res.set.interfrequency_lte_info) {
+ if (res.data.interfrequency_lte_info.frequency_n > 0)
+ c = blobmsg_open_table(&status, "interfrequency_lte_info");
+ for (i = 0; i < res.data.interfrequency_lte_info.frequency_n; i++) {
+ freq = blobmsg_open_table(&status, NULL);
+ blobmsg_add_u32(&status, "channel",
+ res.data.interfrequency_lte_info.frequency[i].eutra_absolute_rf_channel_number);
+ print_earfcn_info(res.data.interfrequency_lte_info.frequency[i].eutra_absolute_rf_channel_number);
+ if (res.data.interfrequency_lte_info.ue_in_idle) {
+ print_sel_info(res.data.interfrequency_lte_info.frequency[i].cell_reselection_priority,
+ res.data.interfrequency_lte_info.frequency[i].cell_selection_rx_level_high_threshold,
+ res.data.interfrequency_lte_info.frequency[i].cell_selection_rx_level_low_threshold);
+ }
+ for (j = 0; j < res.data.interfrequency_lte_info.frequency[i].cell_n; j++) {
+ cell = blobmsg_open_table(&status, NULL);
+ print_lte_info(res.data.interfrequency_lte_info.frequency[i].cell[j].physical_cell_id,
+ res.data.interfrequency_lte_info.frequency[i].cell[j].rsrq,
+ res.data.interfrequency_lte_info.frequency[i].cell[j].rsrp,
+ res.data.interfrequency_lte_info.frequency[i].cell[j].rssi);
+ if (res.data.interfrequency_lte_info.ue_in_idle)
+ blobmsg_add_u32(&status, "cell_selection_rx_level",
+ res.data.interfrequency_lte_info.frequency[i].cell[j].cell_selection_rx_level);
+ blobmsg_close_table(&status, cell);
+ }
+ blobmsg_close_table(&status, freq);
+ }
+ if (res.data.interfrequency_lte_info.frequency_n > 0)
+ blobmsg_close_table(&status, c);
+ }
+ if (res.set.lte_info_neighboring_gsm) {
+ if (res.data.lte_info_neighboring_gsm.frequency_n > 0)
+ c = blobmsg_open_table(&status, "lte_info_neighboring_gsm");
+ for (i = 0; i < res.data.lte_info_neighboring_gsm.frequency_n; i++) {
+ freq = blobmsg_open_table(&status, NULL);
+ blobmsg_add_u32(&status, "ncc_permitted",
+ res.data.lte_info_neighboring_gsm.frequency[i].ncc_permitted);
+ if (res.data.lte_info_neighboring_gsm.ue_in_idle) {
+ print_sel_info(res.data.lte_info_neighboring_gsm.frequency[i].cell_reselection_priority,
+ res.data.lte_info_neighboring_gsm.frequency[i].cell_reselection_high_threshold,
+ res.data.lte_info_neighboring_gsm.frequency[i].cell_reselection_low_threshold);
+ }
+ for (j = 0; j < res.data.lte_info_neighboring_gsm.frequency[i].cell_n; j++) {
+ cell = blobmsg_open_table(&status, NULL);
+ blobmsg_add_u32(&status, "channel",
+ res.data.lte_info_neighboring_gsm.frequency[i].cell[j].geran_absolute_rf_channel_number);
+ blobmsg_add_u32(&status, "base_station_identity_code",
+ res.data.lte_info_neighboring_gsm.frequency[i].cell[j].base_station_identity_code);
+ blobmsg_add_double(&status, "rssi",
+ ((double)res.data.lte_info_neighboring_gsm.frequency[i].cell[j].rssi)/10);
+ if (res.data.lte_info_neighboring_gsm.ue_in_idle)
+ blobmsg_add_u32(&status, "cell_selection_rx_level",
+ res.data.lte_info_neighboring_gsm.frequency[i].cell[j].cell_selection_rx_level);
+ blobmsg_close_table(&status, cell);
+ }
+ blobmsg_close_table(&status, freq);
+ }
+ if (res.data.lte_info_neighboring_gsm.frequency_n > 0)
+ blobmsg_close_table(&status, c);
+ }
+ if (res.set.lte_info_neighboring_wcdma) {
+ if (res.data.lte_info_neighboring_wcdma.frequency_n > 0)
+ c = blobmsg_open_table(&status, "lte_info_neighboring_wcdma");
+ for (i = 0; i < res.data.lte_info_neighboring_wcdma.frequency_n; i++) {
+ freq = blobmsg_open_table(&status, NULL);
+ blobmsg_add_u32(&status, "channel",
+ res.data.lte_info_neighboring_wcdma.frequency[i].utra_absolute_rf_channel_number);
+ if (res.data.lte_info_neighboring_wcdma.ue_in_idle) {
+ print_sel_info(res.data.lte_info_neighboring_wcdma.frequency[i].cell_reselection_priority,
+ res.data.lte_info_neighboring_wcdma.frequency[i].cell_reselection_high_threshold,
+ res.data.lte_info_neighboring_wcdma.frequency[i].cell_reselection_low_threshold);
+ }
+ for (j = 0; j < res.data.lte_info_neighboring_wcdma.frequency[i].cell_n; j++) {
+ cell = blobmsg_open_table(&status, NULL);
+ blobmsg_add_u32(&status, "primary_scrambling_code",
+ res.data.lte_info_neighboring_wcdma.frequency[i].cell[j].primary_scrambling_code);
+ blobmsg_add_double(&status, "rscp",
+ ((double)res.data.lte_info_neighboring_wcdma.frequency[i].cell[j].cpich_rscp)/10);
+ blobmsg_add_double(&status, "ecno",
+ ((double)res.data.lte_info_neighboring_wcdma.frequency[i].cell[j].cpich_ecno)/10);
+ if (res.data.lte_info_neighboring_wcdma.ue_in_idle)
+ blobmsg_add_u32(&status, "cell_selection_rx_level",
+ res.data.lte_info_neighboring_wcdma.frequency[i].cell[j].cell_selection_rx_level);
+ blobmsg_close_table(&status, cell);
+ }
+ blobmsg_close_table(&status, freq);
+ }
+ if (res.data.lte_info_neighboring_wcdma.frequency_n > 0)
+ blobmsg_close_table(&status, c);
+ }
+ if (res.set.umts_info_neighboring_lte) {
+ if (res.data.umts_info_neighboring_lte.frequency_n > 0)
+ c = blobmsg_open_table(&status, "umts_info_neighboring_lte");
+ for (i = 0; i < res.data.umts_info_neighboring_lte.frequency_n; i++) {
+ freq = blobmsg_open_table(&status, NULL);
+ blobmsg_add_u32(&status, "channel",
+ res.data.umts_info_neighboring_lte.frequency[i].eutra_absolute_rf_channel_number);
+ print_earfcn_info(res.data.umts_info_neighboring_lte.frequency[i].eutra_absolute_rf_channel_number);
+ blobmsg_add_u32(&status, "physical_cell_id",
+ res.data.umts_info_neighboring_lte.frequency[i].physical_cell_id);
+ blobmsg_add_double(&status, "rsrp",
+ (double) res.data.umts_info_neighboring_lte.frequency[i].rsrp);
+ blobmsg_add_double(&status, "rsrq",
+ (double) res.data.umts_info_neighboring_lte.frequency[i].rsrq);
+ blobmsg_add_u32(&status, "cell_selection_rx_level",
+ res.data.umts_info_neighboring_lte.frequency[i].cell_selection_rx_level);
+ blobmsg_close_table(&status, freq);
+ }
+ if (res.data.umts_info_neighboring_lte.frequency_n > 0)
+ blobmsg_close_table(&status, c);
+ }
+ blobmsg_close_table(&status, t);
+}
+
+static enum qmi_cmd_result
+cmd_nas_get_cell_location_info_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ qmi_set_nas_get_cell_location_info_request(msg);
+ return QMI_CMD_REQUEST;
+}
+
+static enum qmi_cmd_result
+cmd_nas_get_signal_info_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ qmi_set_nas_get_signal_info_request(msg);
+ return QMI_CMD_REQUEST;
+}
+
+static void
+cmd_nas_get_serving_system_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
+{
+ struct qmi_nas_get_serving_system_response res;
+ static const char *reg_states[] = {
+ [QMI_NAS_REGISTRATION_STATE_NOT_REGISTERED] = "not_registered",
+ [QMI_NAS_REGISTRATION_STATE_REGISTERED] = "registered",
+ [QMI_NAS_REGISTRATION_STATE_NOT_REGISTERED_SEARCHING] = "searching",
+ [QMI_NAS_REGISTRATION_STATE_REGISTRATION_DENIED] = "registering_denied",
+ [QMI_NAS_REGISTRATION_STATE_UNKNOWN] = "unknown",
+ };
+ void *c;
+
+ qmi_parse_nas_get_serving_system_response(msg, &res);
+
+ c = blobmsg_open_table(&status, NULL);
+ if (res.set.serving_system) {
+ int state = res.data.serving_system.registration_state;
+
+ if (state > QMI_NAS_REGISTRATION_STATE_UNKNOWN)
+ state = QMI_NAS_REGISTRATION_STATE_UNKNOWN;
+
+ blobmsg_add_string(&status, "registration", reg_states[state]);
+ }
+ if (res.set.current_plmn) {
+ blobmsg_add_u32(&status, "plmn_mcc", res.data.current_plmn.mcc);
+ blobmsg_add_u32(&status, "plmn_mnc", res.data.current_plmn.mnc);
+ if (res.data.current_plmn.description)
+ blobmsg_add_string(&status, "plmn_description", res.data.current_plmn.description);
+ }
+
+ if (res.set.roaming_indicator)
+ blobmsg_add_u8(&status, "roaming", !res.data.roaming_indicator);
+
+ blobmsg_close_table(&status, c);
+}
+
+static enum qmi_cmd_result
+cmd_nas_get_serving_system_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ qmi_set_nas_get_serving_system_request(msg);
+ return QMI_CMD_REQUEST;
+}
+
+static void
+cmd_nas_get_plmn_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
+{
+ struct qmi_nas_get_system_selection_preference_response res;
+ static const char *modes[] = {
+ [QMI_NAS_NETWORK_SELECTION_PREFERENCE_AUTOMATIC] = "automatic",
+ [QMI_NAS_NETWORK_SELECTION_PREFERENCE_MANUAL] = "manual",
+ };
+ void *c;
+
+ qmi_parse_nas_get_system_selection_preference_response(msg, &res);
+
+ c = blobmsg_open_table(&status, NULL);
+ if (res.set.network_selection_preference) {
+ blobmsg_add_string(&status, "mode", modes[res.data.network_selection_preference]);
+ }
+ if (res.set.manual_network_selection) {
+ blobmsg_add_u32(&status, "mcc", res.data.manual_network_selection.mcc);
+ blobmsg_add_u32(&status, "mnc", res.data.manual_network_selection.mnc);
+ }
+
+ blobmsg_close_table(&status, c);
+}
+
+static enum qmi_cmd_result
+cmd_nas_get_plmn_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ qmi_set_nas_get_system_selection_preference_request(msg);
+ return QMI_CMD_REQUEST;
+}
+
+static void
+cmd_nas_network_scan_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
+{
+ static struct qmi_nas_network_scan_response res;
+ const char *network_status[] = {
+ "current_serving",
+ "available",
+ "home",
+ "roaming",
+ "forbidden",
+ "not_forbidden",
+ "preferred",
+ "not_preferred",
+ };
+ const char *radio[] = {
+ [QMI_NAS_RADIO_INTERFACE_NONE] = "none",
+ [QMI_NAS_RADIO_INTERFACE_CDMA_1X] = "cdma-1x",
+ [QMI_NAS_RADIO_INTERFACE_CDMA_1XEVDO] = "cdma-1x_evdo",
+ [QMI_NAS_RADIO_INTERFACE_AMPS] = "amps",
+ [QMI_NAS_RADIO_INTERFACE_GSM] = "gsm",
+ [QMI_NAS_RADIO_INTERFACE_UMTS] = "umts",
+ [QMI_NAS_RADIO_INTERFACE_LTE] = "lte",
+ [QMI_NAS_RADIO_INTERFACE_TD_SCDMA] = "td-scdma",
+ };
+ void *t, *c, *info, *stat;
+ int i, j;
+
+ qmi_parse_nas_network_scan_response(msg, &res);
+
+ t = blobmsg_open_table(&status, NULL);
+
+ c = blobmsg_open_array(&status, "network_info");
+ for (i = 0; i < res.data.network_information_n; i++) {
+ info = blobmsg_open_table(&status, NULL);
+ blobmsg_add_u32(&status, "mcc", res.data.network_information[i].mcc);
+ blobmsg_add_u32(&status, "mnc", res.data.network_information[i].mnc);
+ if (res.data.network_information[i].description)
+ blobmsg_add_string(&status, "description", res.data.network_information[i].description);
+ stat = blobmsg_open_array(&status, "status");
+ for (j = 0; j < ARRAY_SIZE(network_status); j++) {
+ if (!(res.data.network_information[i].network_status & (1 << j)))
+ continue;
+
+ blobmsg_add_string(&status, NULL, network_status[j]);
+ }
+ blobmsg_close_array(&status, stat);
+ blobmsg_close_table(&status, info);
+ }
+ blobmsg_close_array(&status, c);
+
+ c = blobmsg_open_array(&status, "radio_access_technology");
+ for (i = 0; i < res.data.radio_access_technology_n; i++) {
+ const char *r = "unknown";
+ int r_i = res.data.radio_access_technology[i].radio_interface;
+
+ info = blobmsg_open_table(&status, NULL);
+ blobmsg_add_u32(&status, "mcc", res.data.radio_access_technology[i].mcc);
+ blobmsg_add_u32(&status, "mnc", res.data.radio_access_technology[i].mnc);
+ if (r_i >= 0 && r_i < ARRAY_SIZE(radio))
+ r = radio[r_i];
+
+ blobmsg_add_string(&status, "radio", r);
+ blobmsg_close_table(&status, info);
+ }
+ blobmsg_close_array(&status, c);
+
+ blobmsg_close_table(&status, t);
+}
+
+static enum qmi_cmd_result
+cmd_nas_network_scan_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ struct qmi_nas_network_scan_request sreq = {
+ QMI_INIT(network_type,
+ QMI_NAS_NETWORK_SCAN_TYPE_GSM |
+ QMI_NAS_NETWORK_SCAN_TYPE_UMTS |
+ QMI_NAS_NETWORK_SCAN_TYPE_LTE |
+ QMI_NAS_NETWORK_SCAN_TYPE_TD_SCDMA),
+ };
+
+ qmi_set_nas_network_scan_request(msg, &sreq);
+ return QMI_CMD_REQUEST;
+}
--- /dev/null
+/*
+ * uqmi -- tiny QMI support implementation
+ *
+ * Copyright (C) 2014-2015 Felix Fietkau <nbd@openwrt.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ */
+
+#define __uqmi_nas_commands \
+ __uqmi_command(nas_do_set_system_selection, __set-system-selection, no, QMI_SERVICE_NAS), \
+ __uqmi_command(nas_set_network_modes, set-network-modes, required, CMD_TYPE_OPTION), \
+ __uqmi_command(nas_initiate_network_register, network-register, no, QMI_SERVICE_NAS), \
+ __uqmi_command(nas_set_plmn, set-plmn, no, QMI_SERVICE_NAS), \
+ __uqmi_command(nas_get_plmn, get-plmn, no, QMI_SERVICE_NAS), \
+ __uqmi_command(nas_set_mcc, mcc, required, CMD_TYPE_OPTION), \
+ __uqmi_command(nas_set_mnc, mnc, required, CMD_TYPE_OPTION), \
+ __uqmi_command(nas_network_scan, network-scan, no, QMI_SERVICE_NAS), \
+ __uqmi_command(nas_get_signal_info, get-signal-info, no, QMI_SERVICE_NAS), \
+ __uqmi_command(nas_get_serving_system, get-serving-system, no, QMI_SERVICE_NAS), \
+ __uqmi_command(nas_set_network_preference, set-network-preference, required, CMD_TYPE_OPTION), \
+ __uqmi_command(nas_set_roaming, set-network-roaming, required, CMD_TYPE_OPTION), \
+ __uqmi_command(nas_get_system_info, get-system-info, no, QMI_SERVICE_NAS), \
+ __uqmi_command(nas_get_lte_cphy_ca_info, get-lte-cphy-ca-info, no, QMI_SERVICE_NAS), \
+ __uqmi_command(nas_get_cell_location_info, get-cell-location-info, no, QMI_SERVICE_NAS), \
+ __uqmi_command(nas_get_tx_rx_info, get-tx-rx-info, required, QMI_SERVICE_NAS) \
+
+#define nas_helptext \
+ " --set-network-modes <modes>: Set usable network modes (Syntax: <mode1>[,<mode2>,...])\n" \
+ " Available modes: all, lte, umts, gsm, cdma, td-scdma\n" \
+ " --set-network-preference <mode>: Set preferred network mode to <mode>\n" \
+ " Available modes: auto, gsm, wcdma\n" \
+ " --set-network-roaming <mode>: Set roaming preference:\n" \
+ " Available modes: any, off, only\n" \
+ " --network-scan: Initiate network scan\n" \
+ " --network-register: Initiate network register\n" \
+ " --set-plmn: Register at specified network\n" \
+ " --mcc <mcc>: Mobile Country Code (0 - auto)\n" \
+ " --mnc <mnc>: Mobile Network Code\n" \
+ " --get-plmn: Get preferred network selection info\n" \
+ " --get-signal-info: Get signal strength info\n" \
+ " --get-serving-system: Get serving system info\n" \
+ " --get-system-info: Get system info\n" \
+ " --get-lte-cphy-ca-info: Get LTE Cphy CA Info\n" \
+ " --get-cell-location-info: Get Cell Location Info\n" \
+ " --get-tx-rx-info <radio>: Get TX/RX Info (gsm, umts, lte)\n" \
+
--- /dev/null
+/*
+ * uqmi -- tiny QMI support implementation
+ *
+ * Copyright (C) 2016 Felix Fietkau <nbd@nbd.name>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ */
+
+static int uim_slot = 0;
+
+#define cmd_uim_verify_pin1_cb no_cb
+static enum qmi_cmd_result
+cmd_uim_verify_pin1_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ struct qmi_uim_verify_pin_request data = {
+ QMI_INIT_SEQUENCE(session,
+ .session_type = QMI_UIM_SESSION_TYPE_CARD_SLOT_1,
+ .application_identifier_n = 0
+ ),
+ QMI_INIT_SEQUENCE(info,
+ .pin_id = QMI_UIM_PIN_ID_PIN1,
+ .pin_value = arg
+ )
+ };
+ qmi_set_uim_verify_pin_request(msg, &data);
+ return QMI_CMD_REQUEST;
+}
+
+#define cmd_uim_verify_pin2_cb no_cb
+static enum qmi_cmd_result
+cmd_uim_verify_pin2_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ struct qmi_uim_verify_pin_request data = {
+ QMI_INIT_SEQUENCE(session,
+ .session_type = QMI_UIM_SESSION_TYPE_CARD_SLOT_1,
+ .application_identifier_n = 0
+ ),
+ QMI_INIT_SEQUENCE(info,
+ .pin_id = QMI_UIM_PIN_ID_PIN2,
+ .pin_value = arg
+ )
+ };
+ qmi_set_uim_verify_pin_request(msg, &data);
+ return QMI_CMD_REQUEST;
+}
+
+static void cmd_uim_get_sim_state_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
+{
+ struct qmi_uim_get_card_status_response res;
+ void * const card_table = blobmsg_open_table(&status, NULL);
+ static const char *card_application_states[] = {
+ [QMI_UIM_CARD_APPLICATION_STATE_UNKNOWN] = "unknown",
+ [QMI_UIM_CARD_APPLICATION_STATE_DETECTED] = "detected",
+ [QMI_UIM_CARD_APPLICATION_STATE_PIN1_OR_UPIN_PIN_REQUIRED] = "pin-required",
+ [QMI_UIM_CARD_APPLICATION_STATE_PUK1_OR_UPIN_PUK_REQUIRED] = "puk-required",
+ [QMI_UIM_CARD_APPLICATION_STATE_CHECK_PERSONALIZATION_STATE] = "check-personalization-state",
+ [QMI_UIM_CARD_APPLICATION_STATE_PIN1_BLOCKED] = "pin1-blocked",
+ [QMI_UIM_CARD_APPLICATION_STATE_ILLEGAL] = "illegal",
+ [QMI_UIM_CARD_APPLICATION_STATE_READY] = "ready",
+ };
+
+ qmi_parse_uim_get_card_status_response(msg, &res);
+
+ for (int i = 0; i < res.data.card_status.cards_n; ++i) {
+ if (res.data.card_status.cards[i].card_state != QMI_UIM_CARD_STATE_PRESENT)
+ continue;
+
+ uint8_t card_application_state = QMI_UIM_CARD_APPLICATION_STATE_UNKNOWN;
+ uint8_t pin1_state = res.data.card_status.cards[i].upin_state;
+ uint8_t pin1_retries = res.data.card_status.cards[i].upin_retries;
+ uint8_t puk1_retries = res.data.card_status.cards[i].upuk_retries;
+ uint8_t pin2_state;
+ uint8_t pin2_retries;
+ uint8_t puk2_retries;
+ bool has_pin2 = false;
+
+ for (int j = 0; j < res.data.card_status.cards[i].applications_n; ++j) {
+ if (res.data.card_status.cards[i].applications[j].type == QMI_UIM_CARD_APPLICATION_TYPE_UNKNOWN)
+ continue;
+
+ card_application_state = pin1_state = res.data.card_status.cards[i].applications[j].state;
+
+ if (!res.data.card_status.cards[i].applications[j].upin_replaces_pin1) {
+ pin1_state = res.data.card_status.cards[i].applications[j].pin1_state;
+ pin1_retries = res.data.card_status.cards[i].applications[j].pin1_retries;
+ puk1_retries = res.data.card_status.cards[i].applications[j].puk1_retries;
+ }
+
+ pin2_state = res.data.card_status.cards[i].applications[j].pin2_state;
+ pin2_retries = res.data.card_status.cards[i].applications[j].pin2_retries;
+ puk2_retries = res.data.card_status.cards[i].applications[j].puk2_retries;
+ has_pin2 = true;
+
+ break; /* handle first application only for now */
+ }
+
+ if (card_application_state > QMI_UIM_CARD_APPLICATION_STATE_READY)
+ card_application_state = QMI_UIM_CARD_APPLICATION_STATE_UNKNOWN;
+
+ blobmsg_add_u32(&status, "card_slot", i + 1); /* Slot is idx + 1 */
+ blobmsg_add_string(&status, "card_application_state", card_application_states[card_application_state]);
+ blobmsg_add_string(&status, "pin1_status", get_pin_status(pin1_state));
+ blobmsg_add_u32(&status, "pin1_verify_tries", pin1_retries);
+ blobmsg_add_u32(&status, "pin1_unlock_tries", puk1_retries);
+ if (has_pin2) {
+ blobmsg_add_string(&status, "pin2_status", get_pin_status(pin2_state));
+ blobmsg_add_u32(&status, "pin2_verify_tries", pin2_retries);
+ blobmsg_add_u32(&status, "pin2_unlock_tries", puk2_retries);
+ }
+
+ break; /* handle only first preset SIM card for now */
+ }
+
+ blobmsg_close_table(&status, card_table);
+}
+
+static enum qmi_cmd_result
+cmd_uim_get_sim_state_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ qmi_set_uim_get_card_status_request(msg);
+ return QMI_CMD_REQUEST;
+}
+
+#define cmd_uim_slot_cb no_cb
+static enum qmi_cmd_result
+cmd_uim_slot_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ char *err;
+ int value = strtoul(arg, &err, 10);
+ if ((err && *err) || value < 1 || value > 2) {
+ uqmi_add_error("Invalid UIM-Slot value. Allowed: [1,2]");
+ return QMI_CMD_EXIT;
+ }
+
+ uim_slot = value;
+
+ return QMI_CMD_DONE;
+}
+
+#define cmd_uim_power_off_cb no_cb
+static enum qmi_cmd_result
+cmd_uim_power_off_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ struct qmi_uim_power_off_sim_request data = {
+ QMI_INIT(slot, uim_slot)
+ };
+
+ if (!uim_slot) {
+ uqmi_add_error("UIM-Slot not set. Use --uim-slot <slot> to set it.");
+ return QMI_CMD_EXIT;
+ }
+
+ qmi_set_uim_power_off_sim_request(msg, &data);
+ return QMI_CMD_REQUEST;
+}
+
+#define cmd_uim_power_on_cb no_cb
+static enum qmi_cmd_result
+cmd_uim_power_on_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ struct qmi_uim_power_on_sim_request data = {
+ QMI_INIT(slot, uim_slot)
+ };
+
+ if (!uim_slot) {
+ uqmi_add_error("UIM-Slot not set. Use --uim-slot <slot> to set it.");
+ return QMI_CMD_EXIT;
+ }
+
+ qmi_set_uim_power_on_sim_request(msg, &data);
+ return QMI_CMD_REQUEST;
+}
--- /dev/null
+/*
+ * uqmi -- tiny QMI support implementation
+ *
+ * Copyright (C) 2016 Felix Fietkau <nbd@nbd.name>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ */
+
+#define __uqmi_uim_commands \
+ __uqmi_command(uim_slot, uim-slot, required, CMD_TYPE_OPTION), \
+ __uqmi_command(uim_verify_pin1, uim-verify-pin1, required, QMI_SERVICE_UIM), \
+ __uqmi_command(uim_verify_pin2, uim-verify-pin2, required, QMI_SERVICE_UIM), \
+ __uqmi_command(uim_get_sim_state, uim-get-sim-state, no, QMI_SERVICE_UIM), \
+ __uqmi_command(uim_power_off, uim-power-off, no, QMI_SERVICE_UIM), \
+ __uqmi_command(uim_power_on, uim-power-on, no, QMI_SERVICE_UIM) \
+
+
+#define uim_helptext \
+ " --uim-verify-pin1 <pin>: Verify PIN1 (new devices)\n" \
+ " --uim-verify-pin2 <pin>: Verify PIN2 (new devices)\n" \
+ " --uim-get-sim-state: Get current SIM state\n" \
+ " --uim-power-off: Power off SIM card\n" \
+ " --uim-slot: SIM slot [1-2]\n" \
+ " --uim-power-on: Power on SIM card\n" \
+ " --uim-slot: SIM slot [1-2]\n" \
+
--- /dev/null
+/*
+ * uqmi -- tiny QMI support implementation
+ *
+ * Copyright (C) 2014-2015 Felix Fietkau <nbd@openwrt.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ */
+
+#include <stdlib.h>
+
+#include "qmi-message.h"
+
+static const struct {
+ const char *name;
+ QmiWdaLinkLayerProtocol val;
+} link_modes[] = {
+ { "802.3", QMI_WDA_LINK_LAYER_PROTOCOL_802_3 },
+ { "raw-ip", QMI_WDA_LINK_LAYER_PROTOCOL_RAW_IP },
+};
+
+#define cmd_wda_set_data_format_cb no_cb
+
+static enum qmi_cmd_result
+cmd_wda_set_data_format_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ struct qmi_wda_set_data_format_request data_req = {};
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(link_modes); i++) {
+ if (strcasecmp(link_modes[i].name, arg) != 0)
+ continue;
+
+ qmi_set(&data_req, link_layer_protocol, link_modes[i].val);
+ qmi_set_wda_set_data_format_request(msg, &data_req);
+ return QMI_CMD_REQUEST;
+ }
+
+ uqmi_add_error("Invalid auth mode (valid: 802.3, raw-ip)");
+ return QMI_CMD_EXIT;
+}
+
+static void
+cmd_wda_get_data_format_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
+{
+ struct qmi_wda_get_data_format_response res;
+ const char *name = "unknown";
+ int i;
+
+ qmi_parse_wda_get_data_format_response(msg, &res);
+ for (i = 0; i < ARRAY_SIZE(link_modes); i++) {
+ if (link_modes[i].val != res.data.link_layer_protocol)
+ continue;
+
+ name = link_modes[i].name;
+ break;
+ }
+
+ blobmsg_add_string(&status, NULL, name);
+}
+
+static enum qmi_cmd_result
+cmd_wda_get_data_format_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ struct qmi_wda_get_data_format_request data_req = {};
+ qmi_set_wda_get_data_format_request(msg, &data_req);
+ return QMI_CMD_REQUEST;
+}
--- /dev/null
+/*
+ * uqmi -- tiny QMI support implementation
+ *
+ * Copyright (C) 2014-2015 Felix Fietkau <nbd@openwrt.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ */
+
+#define __uqmi_wda_commands \
+ __uqmi_command(wda_set_data_format, wda-set-data-format, required, QMI_SERVICE_WDA), \
+ __uqmi_command(wda_get_data_format, wda-get-data-format, no, QMI_SERVICE_WDA)
+
+
+#define wda_helptext \
+ " --wda-set-data-format <type>: Set data format (type: 802.3|raw-ip)\n" \
+ " --wda-get-data-format: Get data format\n" \
+
--- /dev/null
+/*
+ * uqmi -- tiny QMI support implementation
+ *
+ * Copyright (C) 2014-2015 Felix Fietkau <nbd@openwrt.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ */
+
+#include <stdlib.h>
+#include <arpa/inet.h>
+
+#include "qmi-message.h"
+
+static const struct {
+ const char *auth_name;
+ QmiWdsAuthentication auth;
+} auth_modes[] = {
+ { "none", QMI_WDS_AUTHENTICATION_NONE },
+ { "pap", QMI_WDS_AUTHENTICATION_PAP },
+ { "chap", QMI_WDS_AUTHENTICATION_CHAP },
+ { "both", QMI_WDS_AUTHENTICATION_PAP | QMI_WDS_AUTHENTICATION_CHAP },
+};
+
+static const struct {
+ const char *ipfam_name;
+ const QmiWdsIpFamily mode;
+} ipfam_modes[] = {
+ { "ipv4", QMI_WDS_IP_FAMILY_IPV4 },
+ { "ipv6", QMI_WDS_IP_FAMILY_IPV6 },
+ { "unspecified", QMI_WDS_IP_FAMILY_UNSPECIFIED },
+};
+
+static const struct {
+ const char *pdp_name;
+ const QmiWdsPdpType type;
+} pdp_types[] = {
+ { "ipv4", QMI_WDS_PDP_TYPE_IPV4 },
+ { "ppp", QMI_WDS_PDP_TYPE_PPP },
+ { "ipv6", QMI_WDS_PDP_TYPE_IPV6 },
+ { "ipv4v6", QMI_WDS_PDP_TYPE_IPV4_OR_IPV6 },
+};
+
+static const struct {
+ const char *profile_name;
+ const QmiWdsProfileType profile;
+} profile_types[] = {
+ { "3gpp", QMI_WDS_PROFILE_TYPE_3GPP },
+ { "3gpp2", QMI_WDS_PROFILE_TYPE_3GPP2 },
+};
+
+static struct qmi_wds_start_network_request wds_sn_req = {
+ QMI_INIT(authentication_preference,
+ QMI_WDS_AUTHENTICATION_PAP | QMI_WDS_AUTHENTICATION_CHAP),
+};
+
+static struct qmi_wds_stop_network_request wds_stn_req;
+
+static struct qmi_wds_modify_profile_request wds_mp_req = {
+ QMI_INIT_SEQUENCE(profile_identifier,
+ .profile_type = QMI_WDS_PROFILE_TYPE_3GPP,
+ .profile_index = 1,
+ ),
+ QMI_INIT(apn_disabled_flag, false),
+};
+
+static struct qmi_wds_create_profile_request wds_cp_req = {
+ QMI_INIT(profile_type,QMI_WDS_PROFILE_TYPE_3GPP),
+ QMI_INIT(apn_disabled_flag, false),
+};
+
+#define cmd_wds_set_apn_cb no_cb
+static enum qmi_cmd_result
+cmd_wds_set_apn_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ qmi_set_ptr(&wds_sn_req, apn, arg);
+ qmi_set_ptr(&wds_mp_req, apn_name, arg);
+ qmi_set_ptr(&wds_cp_req, apn_name, arg);
+ return QMI_CMD_DONE;
+}
+
+#define cmd_wds_set_auth_cb no_cb
+static enum qmi_cmd_result
+cmd_wds_set_auth_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ int i;
+ for (i = 0; i < ARRAY_SIZE(auth_modes); i++) {
+ if (strcasecmp(auth_modes[i].auth_name, arg) != 0)
+ continue;
+
+ qmi_set(&wds_sn_req, authentication_preference, auth_modes[i].auth);
+ qmi_set(&wds_mp_req, authentication, auth_modes[i].auth);
+ qmi_set(&wds_cp_req, authentication, auth_modes[i].auth);
+ return QMI_CMD_DONE;
+ }
+
+ uqmi_add_error("Invalid auth mode (valid: pap, chap, both, none)");
+ return QMI_CMD_EXIT;
+}
+
+#define cmd_wds_set_username_cb no_cb
+static enum qmi_cmd_result
+cmd_wds_set_username_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ qmi_set_ptr(&wds_sn_req, username, arg);
+ qmi_set_ptr(&wds_mp_req, username, arg);
+ qmi_set_ptr(&wds_cp_req, username, arg);
+ return QMI_CMD_DONE;
+}
+
+#define cmd_wds_set_password_cb no_cb
+static enum qmi_cmd_result
+cmd_wds_set_password_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ qmi_set_ptr(&wds_sn_req, password, arg);
+ qmi_set_ptr(&wds_mp_req, password, arg);
+ qmi_set_ptr(&wds_cp_req, password, arg);
+ return QMI_CMD_DONE;
+}
+
+#define cmd_wds_set_autoconnect_cb no_cb
+static enum qmi_cmd_result
+cmd_wds_set_autoconnect_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ qmi_set(&wds_sn_req, enable_autoconnect, true);
+ qmi_set(&wds_stn_req, disable_autoconnect, true);
+ return QMI_CMD_DONE;
+}
+
+#define cmd_wds_set_ip_family_pref_cb no_cb
+static enum qmi_cmd_result
+cmd_wds_set_ip_family_pref_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ int i;
+ for (i = 0; i < ARRAY_SIZE(ipfam_modes); i++) {
+ if (strcasecmp(ipfam_modes[i].ipfam_name, arg) != 0)
+ continue;
+
+ qmi_set(&wds_sn_req, ip_family_preference, ipfam_modes[i].mode);
+ return QMI_CMD_DONE;
+ }
+
+ uqmi_add_error("Invalid value (valid: ipv4, ipv6, unspecified)");
+ return QMI_CMD_EXIT;
+}
+
+#define cmd_wds_set_pdp_type_cb no_cb
+static enum qmi_cmd_result
+cmd_wds_set_pdp_type_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(pdp_types); i++) {
+ if (strcasecmp(pdp_types[i].pdp_name, arg) != 0)
+ continue;
+
+ qmi_set(&wds_mp_req, pdp_type, pdp_types[i].type);
+ qmi_set(&wds_cp_req, pdp_type, pdp_types[i].type);
+ return QMI_CMD_DONE;
+ }
+
+ uqmi_add_error("Invalid value (valid: ipv4, ipv6, ipv4v6)");
+ return QMI_CMD_EXIT;
+}
+
+#define cmd_wds_no_roaming_cb no_cb
+static enum qmi_cmd_result
+cmd_wds_no_roaming_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ if (strcmp(arg, "true") == 0) {
+ qmi_set(&wds_mp_req, roaming_disallowed_flag, true);
+ qmi_set(&wds_cp_req, roaming_disallowed_flag, true);
+ } else if (strcmp(arg, "false") == 0) {
+ qmi_set(&wds_mp_req, roaming_disallowed_flag, false);
+ qmi_set(&wds_cp_req, roaming_disallowed_flag, false);
+ } else {
+ uqmi_add_error("Invalid value (true or false)");
+ return QMI_CMD_EXIT;
+ }
+ return QMI_CMD_DONE;
+}
+
+#define cmd_wds_set_profile_cb no_cb
+static enum qmi_cmd_result
+cmd_wds_set_profile_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ uint32_t idx = strtoul(arg, NULL, 10);
+
+ qmi_set(&wds_sn_req, profile_index_3gpp, idx);
+ return QMI_CMD_DONE;
+}
+
+static void
+cmd_wds_start_network_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
+{
+ struct qmi_wds_start_network_response res;
+
+ qmi_parse_wds_start_network_response(msg, &res);
+ if (res.set.packet_data_handle)
+ blobmsg_add_u32(&status, NULL, res.data.packet_data_handle);
+}
+
+static enum qmi_cmd_result
+cmd_wds_start_network_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ qmi_set_wds_start_network_request(msg, &wds_sn_req);
+ return QMI_CMD_REQUEST;
+}
+
+#define cmd_wds_stop_network_cb no_cb
+static enum qmi_cmd_result
+cmd_wds_stop_network_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ uint32_t pdh = strtoul(arg, NULL, 0);
+
+ qmi_set(&wds_stn_req, packet_data_handle, pdh);
+ qmi_set_wds_stop_network_request(msg, &wds_stn_req);
+ return QMI_CMD_REQUEST;
+}
+
+static void
+cmd_wds_modify_profile_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
+{
+ struct qmi_wds_modify_profile_response res;
+ qmi_parse_wds_modify_profile_response(msg, &res);
+}
+
+static enum qmi_cmd_result
+cmd_wds_modify_profile_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ int id;
+ char *s;
+ char *p_type;
+
+ s = strchr(arg, ',');
+ if (!s) {
+ fprintf(stderr, "Invalid argument\n");
+ return QMI_CMD_EXIT;
+ }
+ *s = 0;
+ s++;
+
+ id = strtoul(s, &s, 0);
+ if (s && *s) {
+ fprintf(stderr, "Invalid argument\n");
+ return QMI_CMD_EXIT;
+ }
+
+ p_type = strtok(arg, ",");
+
+ int i;
+ for (i = 0; i < ARRAY_SIZE(profile_types); i++) {
+ if (strcasecmp(profile_types[i].profile_name, p_type) != 0)
+ continue;
+
+ qmi_set_ptr(&wds_mp_req, profile_identifier.profile_type, profile_types[i].profile);
+ qmi_set_ptr(&wds_mp_req, profile_identifier.profile_index, id);
+ qmi_set_wds_modify_profile_request(msg, &wds_mp_req);
+ return QMI_CMD_REQUEST;
+ }
+
+ uqmi_add_error("Invalid value (valid: 3gpp or 3gpp2)");
+ return QMI_CMD_EXIT;
+}
+
+static void
+cmd_wds_create_profile_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
+{
+ struct qmi_wds_create_profile_response res;
+ void *p;
+
+ qmi_parse_wds_create_profile_response(msg, &res);
+
+ if (res.set.profile_identifier) {
+ p = blobmsg_open_table(&status, NULL);
+ blobmsg_add_u32(&status, "created-profile", res.data.profile_identifier.profile_index);
+ blobmsg_close_table(&status, p);
+ }
+}
+
+static enum qmi_cmd_result
+cmd_wds_create_profile_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ int i;
+ for (i = 0; i < ARRAY_SIZE(profile_types); i++) {
+ if (strcasecmp(profile_types[i].profile_name, arg) != 0)
+ continue;
+
+ qmi_set_ptr(&wds_cp_req, profile_type, profile_types[i].profile);
+
+ qmi_set_wds_create_profile_request(msg, &wds_cp_req);
+ return QMI_CMD_REQUEST;
+ }
+
+ uqmi_add_error("Invalid value (valid: 3gpp or 3gpp2)");
+ return QMI_CMD_EXIT;
+}
+
+static void
+cmd_wds_get_packet_service_status_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
+{
+ struct qmi_wds_get_packet_service_status_response res;
+ const char *data_status[] = {
+ [QMI_WDS_CONNECTION_STATUS_UNKNOWN] = "unknown",
+ [QMI_WDS_CONNECTION_STATUS_DISCONNECTED] = "disconnected",
+ [QMI_WDS_CONNECTION_STATUS_CONNECTED] = "connected",
+ [QMI_WDS_CONNECTION_STATUS_SUSPENDED] = "suspended",
+ [QMI_WDS_CONNECTION_STATUS_AUTHENTICATING] = "authenticating",
+ };
+ int s = 0;
+
+ qmi_parse_wds_get_packet_service_status_response(msg, &res);
+ if (res.set.connection_status &&
+ res.data.connection_status < ARRAY_SIZE(data_status))
+ s = res.data.connection_status;
+
+ blobmsg_add_string(&status, NULL, data_status[s]);
+}
+
+static enum qmi_cmd_result
+cmd_wds_get_packet_service_status_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ qmi_set_wds_get_packet_service_status_request(msg);
+ return QMI_CMD_REQUEST;
+}
+
+#define cmd_wds_set_autoconnect_settings_cb no_cb
+static enum qmi_cmd_result
+cmd_wds_set_autoconnect_settings_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ struct qmi_wds_set_autoconnect_settings_request ac_req;
+ const char *modes[] = {
+ [QMI_WDS_AUTOCONNECT_SETTING_DISABLED] = "disabled",
+ [QMI_WDS_AUTOCONNECT_SETTING_ENABLED] = "enabled",
+ [QMI_WDS_AUTOCONNECT_SETTING_PAUSED] = "paused",
+ };
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(modes); i++) {
+ if (strcasecmp(modes[i], arg) != 0)
+ continue;
+
+ qmi_set(&ac_req, status, i);
+ qmi_set_wds_set_autoconnect_settings_request(msg, &ac_req);
+ return QMI_CMD_DONE;
+ }
+
+ uqmi_add_error("Invalid value (valid: disabled, enabled, paused)");
+ return QMI_CMD_EXIT;
+}
+
+#define cmd_wds_reset_cb no_cb
+static enum qmi_cmd_result
+cmd_wds_reset_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ qmi_set_wds_reset_request(msg);
+ return QMI_CMD_REQUEST;
+}
+
+#define cmd_wds_set_ip_family_cb no_cb
+static enum qmi_cmd_result
+cmd_wds_set_ip_family_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ struct qmi_wds_set_ip_family_request ipf_req;
+
+ int i;
+ for (i = 0; i < ARRAY_SIZE(ipfam_modes); i++) {
+ if (strcasecmp(ipfam_modes[i].ipfam_name, arg) != 0)
+ continue;
+
+ qmi_set(&ipf_req, preference, ipfam_modes[i].mode);
+ qmi_set_wds_set_ip_family_request(msg, &ipf_req);
+ return QMI_CMD_REQUEST;
+ }
+
+ uqmi_add_error("Invalid value (valid: ipv4, ipv6, unspecified)");
+ return QMI_CMD_EXIT;
+}
+
+static void wds_to_ipv4(const char *name, const uint32_t addr)
+{
+ struct in_addr ip_addr;
+ char buf[INET_ADDRSTRLEN];
+
+ ip_addr.s_addr = htonl(addr);
+ blobmsg_add_string(&status, name, inet_ntop(AF_INET, &ip_addr, buf, sizeof(buf)));
+}
+
+static void wds_to_ipv6(const char *name, const uint16_t *addr)
+{
+ char buf[INET6_ADDRSTRLEN];
+ uint16_t ip_addr[8];
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(ip_addr); i++)
+ ip_addr[i] = htons(addr[i]);
+
+ blobmsg_add_string(&status, name, inet_ntop(AF_INET6, &ip_addr, buf, sizeof(buf)));
+}
+
+static enum qmi_cmd_result
+cmd_wds_get_profile_settings_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ int id;
+ char *s;
+ char *p_type;
+
+ s = strchr(arg, ',');
+ if (!s) {
+ fprintf(stderr, "Invalid argument\n");
+ return QMI_CMD_EXIT;
+ }
+ *s = 0;
+ s++;
+
+ id = strtoul(s, &s, 0);
+ if (s && *s) {
+ fprintf(stderr, "Invalid argument\n");
+ return QMI_CMD_EXIT;
+ }
+
+ p_type = strtok(arg, ",");
+
+ int i;
+ for (i = 0; i < ARRAY_SIZE(profile_types); i++) {
+ if (strcasecmp(profile_types[i].profile_name, p_type) != 0)
+ continue;
+
+ struct qmi_wds_get_profile_settings_request p_num = {
+ QMI_INIT_SEQUENCE(profile_id,
+ .profile_type = profile_types[i].profile,
+ .profile_index = id,
+ )
+ };
+ qmi_set_wds_get_profile_settings_request(msg, &p_num);
+ return QMI_CMD_REQUEST;
+ }
+
+ uqmi_add_error("Invalid value (valid: 3gpp or 3gpp2)");
+ return QMI_CMD_EXIT;
+}
+
+static void
+cmd_wds_get_profile_settings_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
+{
+ struct qmi_wds_get_profile_settings_response res;
+
+ void *p;
+
+ qmi_parse_wds_get_profile_settings_response(msg, &res);
+
+ p = blobmsg_open_table(&status, NULL);
+
+ blobmsg_add_string(&status, "apn", res.data.apn_name);
+ if (res.set.pdp_type && (int) res.data.pdp_type < ARRAY_SIZE(pdp_types))
+ blobmsg_add_string(&status, "pdp-type", pdp_types[res.data.pdp_type].pdp_name);
+ blobmsg_add_string(&status, "username", res.data.username);
+ blobmsg_add_string(&status, "password", res.data.password);
+ if (res.set.authentication && (int) res.data.authentication < ARRAY_SIZE(auth_modes))
+ blobmsg_add_string(&status, "auth", auth_modes[res.data.authentication].auth_name);
+ blobmsg_add_u8(&status, "no-roaming", res.data.roaming_disallowed_flag);
+ blobmsg_add_u8(&status, "apn-disabled", res.data.apn_disabled_flag);
+ blobmsg_close_table(&status, p);
+}
+
+static void
+cmd_wds_get_current_settings_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
+{
+ void *v4, *v6, *d, *t;
+ struct qmi_wds_get_current_settings_response res;
+ int i;
+
+ qmi_parse_wds_get_current_settings_response(msg, &res);
+
+ t = blobmsg_open_table(&status, NULL);
+
+ if (res.set.pdp_type && (int) res.data.pdp_type < ARRAY_SIZE(pdp_types))
+ blobmsg_add_string(&status, "pdp-type", pdp_types[res.data.pdp_type].pdp_name);
+
+ if (res.set.ip_family) {
+ for (i = 0; i < ARRAY_SIZE(ipfam_modes); i++) {
+ if (ipfam_modes[i].mode != res.data.ip_family)
+ continue;
+ blobmsg_add_string(&status, "ip-family", ipfam_modes[i].ipfam_name);
+ break;
+ }
+ }
+
+ if (res.set.mtu)
+ blobmsg_add_u32(&status, "mtu", res.data.mtu);
+
+ /* IPV4 */
+ v4 = blobmsg_open_table(&status, "ipv4");
+
+ if (res.set.ipv4_address)
+ wds_to_ipv4("ip", res.data.ipv4_address);
+ if (res.set.primary_ipv4_dns_address)
+ wds_to_ipv4("dns1", res.data.primary_ipv4_dns_address);
+ if (res.set.secondary_ipv4_dns_address)
+ wds_to_ipv4("dns2", res.data.secondary_ipv4_dns_address);
+ if (res.set.ipv4_gateway_address)
+ wds_to_ipv4("gateway", res.data.ipv4_gateway_address);
+ if (res.set.ipv4_gateway_subnet_mask)
+ wds_to_ipv4("subnet", res.data.ipv4_gateway_subnet_mask);
+ blobmsg_close_table(&status, v4);
+
+ /* IPV6 */
+ v6 = blobmsg_open_table(&status, "ipv6");
+
+ if (res.set.ipv6_address) {
+ wds_to_ipv6("ip", res.data.ipv6_address.address);
+ blobmsg_add_u32(&status, "ip-prefix-length", res.data.ipv6_address.prefix_length);
+ }
+ if (res.set.ipv6_gateway_address) {
+ wds_to_ipv6("gateway", res.data.ipv6_gateway_address.address);
+ blobmsg_add_u32(&status, "gw-prefix-length", res.data.ipv6_gateway_address.prefix_length);
+ }
+ if (res.set.ipv6_primary_dns_address)
+ wds_to_ipv6("dns1", res.data.ipv6_primary_dns_address);
+ if (res.set.ipv6_secondary_dns_address)
+ wds_to_ipv6("dns2", res.data.ipv6_secondary_dns_address);
+
+ blobmsg_close_table(&status, v6);
+
+ d = blobmsg_open_table(&status, "domain-names");
+ for (i = 0; i < res.data.domain_name_list_n; i++) {
+ blobmsg_add_string(&status, NULL, res.data.domain_name_list[i]);
+ }
+ blobmsg_close_table(&status, d);
+
+ blobmsg_close_table(&status, t);
+}
+
+static enum qmi_cmd_result
+cmd_wds_get_current_settings_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ struct qmi_wds_get_current_settings_request gcs_req;
+ memset(&gcs_req, '\0', sizeof(struct qmi_wds_get_current_settings_request));
+ qmi_set(&gcs_req, requested_settings,
+ QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_PDP_TYPE |
+ QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_DNS_ADDRESS |
+ QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_GRANTED_QOS |
+ QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_IP_ADDRESS |
+ QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_GATEWAY_INFO |
+ QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_MTU |
+ QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_DOMAIN_NAME_LIST |
+ QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_IP_FAMILY);
+ qmi_set_wds_get_current_settings_request(msg, &gcs_req);
+ return QMI_CMD_REQUEST;
+}
+
+static enum qmi_cmd_result
+cmd_wds_get_default_profile_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ int i;
+ for (i = 0; i < ARRAY_SIZE(profile_types); i++) {
+ if (strcasecmp(profile_types[i].profile_name, arg) != 0)
+ continue;
+
+ struct qmi_wds_get_default_profile_number_request type_family = {
+ QMI_INIT_SEQUENCE(profile_type,
+ .type = profile_types[i].profile,
+ .family = QMI_WDS_PROFILE_FAMILY_TETHERED,
+ )
+ };
+
+ qmi_set_wds_get_default_profile_number_request(msg, &type_family);
+ return QMI_CMD_REQUEST;
+ }
+
+ uqmi_add_error("Invalid value (valid: 3gpp or 3gpp2)");
+ return QMI_CMD_EXIT;
+}
+
+static void
+cmd_wds_get_default_profile_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
+{
+ struct qmi_wds_get_default_profile_number_response res;
+ void *p;
+ qmi_parse_wds_get_default_profile_number_response(msg, &res);
+
+ p = blobmsg_open_table(&status, NULL);
+
+ blobmsg_add_u32(&status, "default-profile", res.data.index);
+
+ blobmsg_close_table(&status, p);
+}
--- /dev/null
+/*
+ * uqmi -- tiny QMI support implementation
+ *
+ * Copyright (C) 2014-2015 Felix Fietkau <nbd@openwrt.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ */
+
+#define __uqmi_wds_commands \
+ __uqmi_command(wds_start_network, start-network, no, QMI_SERVICE_WDS), \
+ __uqmi_command(wds_set_apn, apn, required, CMD_TYPE_OPTION), \
+ __uqmi_command(wds_set_auth, auth-type, required, CMD_TYPE_OPTION), \
+ __uqmi_command(wds_set_username, username, required, CMD_TYPE_OPTION), \
+ __uqmi_command(wds_set_password, password, required, CMD_TYPE_OPTION), \
+ __uqmi_command(wds_set_ip_family_pref, ip-family, required, CMD_TYPE_OPTION), \
+ __uqmi_command(wds_set_autoconnect, autoconnect, no, CMD_TYPE_OPTION), \
+ __uqmi_command(wds_set_profile, profile, required, CMD_TYPE_OPTION), \
+ __uqmi_command(wds_stop_network, stop-network, required, QMI_SERVICE_WDS), \
+ __uqmi_command(wds_get_packet_service_status, get-data-status, no, QMI_SERVICE_WDS), \
+ __uqmi_command(wds_set_ip_family, set-ip-family, required, QMI_SERVICE_WDS), \
+ __uqmi_command(wds_set_autoconnect_settings, set-autoconnect, required, QMI_SERVICE_WDS), \
+ __uqmi_command(wds_reset, reset-wds, no, QMI_SERVICE_WDS), \
+ __uqmi_command(wds_get_profile_settings, get-profile-settings, required, QMI_SERVICE_WDS), \
+ __uqmi_command(wds_get_default_profile, get-default-profile, required, QMI_SERVICE_WDS), \
+ __uqmi_command(wds_create_profile, create-profile, required, QMI_SERVICE_WDS), \
+ __uqmi_command(wds_modify_profile, modify-profile, required, QMI_SERVICE_WDS), \
+ __uqmi_command(wds_set_pdp_type, pdp-type, required, CMD_TYPE_OPTION), \
+ __uqmi_command(wds_no_roaming, no-roaming, required, CMD_TYPE_OPTION), \
+ __uqmi_command(wds_get_current_settings, get-current-settings, no, QMI_SERVICE_WDS) \
+
+
+#define wds_helptext \
+ " --start-network: Start network connection (use with options below)\n" \
+ " --apn <apn>: Use APN\n" \
+ " --auth-type pap|chap|both|none: Use network authentication type\n" \
+ " --username <name>: Use network username\n" \
+ " --password <password>: Use network password\n" \
+ " --ip-family <family>: Use ip-family for the connection (ipv4, ipv6, unspecified)\n" \
+ " --autoconnect: Enable automatic connect/reconnect\n" \
+ " --profile <index>: Use connection profile\n" \
+ " --stop-network <pdh>: Stop network connection (use with option below)\n" \
+ " --autoconnect: Disable automatic connect/reconnect\n" \
+ " --get-data-status: Get current data access status\n" \
+ " --set-ip-family <val>: Set ip-family (ipv4, ipv6, unspecified)\n" \
+ " --set-autoconnect <val>: Set automatic connect/reconnect (disabled, enabled, paused)\n" \
+ " --get-profile-settings <val,#>: Get APN profile settings (3gpp, 3gpp2),#\n" \
+ " --get-default-profile <val>: Get default profile number (3gpp, 3gpp2)\n" \
+ " --create-profile <val> Create profile (3gpp, 3gpp2)\n" \
+ " --apn <apn>: Use APN\n" \
+ " --pdp-type ipv4|ipv6|ipv4v6>: Use pdp-type for the connection\n" \
+ " --username <name>: Use network username\n" \
+ " --password <password>: Use network password\n" \
+ " --auth-type pap|chap|both|none: Use network authentication type\n" \
+ " --no-roaming false|true To allow roaming, set to false\n" \
+ " --modify-profile <val>,# Modify profile number (3gpp, 3gpp2)\n" \
+ " --apn <apn>: Use APN\n" \
+ " --pdp-type ipv4|ipv6|ipv4v6>: Use pdp-type for the connection\n" \
+ " --username <name>: Use network username\n" \
+ " --password <password>: Use network password\n" \
+ " --auth-type pap|chap|both|none: Use network authentication type\n" \
+ " --no-roaming false|true To allow roaming, set to false\n" \
+ " --get-current-settings: Get current connection settings\n" \
+
--- /dev/null
+/*
+ * uqmi -- tiny QMI support implementation
+ *
+ * Copyright (C) 2014-2015 Felix Fietkau <nbd@openwrt.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ */
+
+#include "qmi-message.h"
+
+#define MIN(a,b) (((a)<(b))?(a):(b))
+#define CEILDIV(x,y) (((x) + (y) - 1) / (y))
+
+static struct qmi_wms_list_messages_request lmreq = {
+ QMI_INIT(storage_type, QMI_WMS_STORAGE_TYPE_UIM),
+ QMI_INIT(message_tag, QMI_WMS_MESSAGE_TAG_TYPE_MT_NOT_READ),
+};
+
+static struct qmi_wms_delete_request dmreq = {
+ QMI_INIT(memory_storage, QMI_WMS_STORAGE_TYPE_UIM),
+ QMI_INIT(message_mode, QMI_WMS_MESSAGE_MODE_GSM_WCDMA),
+};
+
+static struct qmi_wms_raw_read_request gmreq = {
+ QMI_INIT_SEQUENCE(message_memory_storage_id,
+ .storage_type = QMI_WMS_STORAGE_TYPE_UIM,
+ ),
+ QMI_INIT(message_mode, QMI_WMS_MESSAGE_MODE_GSM_WCDMA),
+};
+
+
+#define cmd_wms_storage_cb no_cb
+static enum qmi_cmd_result
+cmd_wms_storage_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ if (strcmp(arg, "sim") == 0) {
+ } else if (strcmp(arg, "me") == 0) {
+ qmi_set_ptr(&lmreq, storage_type, QMI_WMS_STORAGE_TYPE_NV);
+ qmi_set_ptr(&dmreq, memory_storage, QMI_WMS_STORAGE_TYPE_NV);
+ qmi_set_ptr(&gmreq, message_memory_storage_id.storage_type, QMI_WMS_STORAGE_TYPE_NV);
+ } else {
+ uqmi_add_error("Invalid value (sim or me)");
+ return QMI_CMD_EXIT;
+ }
+ return QMI_CMD_DONE;
+}
+
+static void cmd_wms_list_messages_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
+{
+ struct qmi_wms_list_messages_response res;
+ void *c;
+ int i;
+
+ qmi_parse_wms_list_messages_response(msg, &res);
+ c = blobmsg_open_array(&status, NULL);
+ for (i = 0; i < res.data.message_list_n; i++)
+ blobmsg_add_u32(&status, NULL, res.data.message_list[i].memory_index);
+
+ blobmsg_close_array(&status, c);
+}
+
+static enum qmi_cmd_result
+cmd_wms_list_messages_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ qmi_set_wms_list_messages_request(msg, &lmreq);
+
+ return QMI_CMD_REQUEST;
+}
+
+static int
+put_unicode_char(char *dest, uint16_t c)
+{
+ if (c < 0x80) {
+ *dest = c;
+ return 1;
+ } else if (c < 0x800) {
+ *(dest++) = 0xc0 | ((c >> 6) & 0x1f);
+ *dest = 0x80 | (c & 0x3f);
+ return 2;
+ } else {
+ *(dest++) = 0xe0 | ((c >> 12) & 0xf);
+ *(dest++) = 0x80 | ((c >> 6) & 0x3f);
+ *dest = 0x80 | (c & 0x3f);
+ return 3;
+ }
+}
+
+
+static int
+pdu_decode_7bit_char(char *dest, int len, unsigned char c, bool *escape)
+{
+ uint16_t conv_0x20[] = {
+ 0x0040, 0x00A3, 0x0024, 0x00A5, 0x00E8, 0x00E9, 0x00F9, 0x00EC,
+ 0x00F2, 0x00E7, 0x000A, 0x00D8, 0x00F8, 0x000D, 0x00C5, 0x00E5,
+ 0x0394, 0x005F, 0x03A6, 0x0393, 0x039B, 0x03A9, 0x03A0, 0x03A8,
+ 0x03A3, 0x0398, 0x039E, 0x00A0, 0x00C6, 0x00E6, 0x00DF, 0x00C9,
+ };
+ uint16_t conv_0x5b[] = {
+ 0x00C4, 0x00D6, 0x00D1, 0x00DC, 0x00A7, 0x00BF,
+ };
+ uint16_t conv_0x7b[] = {
+ 0x00E4, 0x00F6, 0x00F1, 0x00FC, 0x00E0
+ };
+ int cur_len = 0;
+ uint16_t outc;
+
+ fprintf(stderr, " %02x", c);
+ dest += len;
+ if (*escape) {
+ *escape = false;
+ switch(c) {
+ case 0x0A:
+ *dest = 0x0C;
+ return 1;
+ case 0x14:
+ *dest = 0x5E;
+ return 1;
+ case 0x28:
+ *dest = 0x7B;
+ return 1;
+ case 0x29:
+ *dest = 0x7D;
+ return 1;
+ case 0x2F:
+ *dest = 0x5C;
+ return 1;
+ case 0x3C:
+ *dest = 0x5B;
+ return 1;
+ case 0x3D:
+ *dest = 0x7E;
+ return 1;
+ case 0x3E:
+ *dest = 0x5D;
+ return 1;
+ case 0x40:
+ *dest = 0x7C;
+ return 1;
+ case 0x65:
+ outc = 0x20AC;
+ goto out;
+ case 0x1B:
+ goto normal;
+ default:
+ /* invalid */
+ *(dest++) = conv_0x20[0x1B];
+ cur_len++;
+ goto normal;
+ }
+ }
+
+ if (c == 0x1b) {
+ *escape = true;
+ return 0;
+ }
+
+normal:
+ if (c < 0x20)
+ outc = conv_0x20[(int) c];
+ else if (c == 0x40)
+ outc = 0x00A1;
+ else if (c >= 0x5b && c <= 0x60)
+ outc = conv_0x5b[c - 0x5b];
+ else if (c >= 0x7b && c <= 0x7f)
+ outc = conv_0x7b[c - 0x7b];
+ else
+ outc = c;
+
+out:
+ return cur_len + put_unicode_char(dest, outc);
+}
+
+static int
+pdu_decode_7bit_str(char *dest, const unsigned char *data, int data_len, int bit_offset)
+{
+ bool escape = false;
+ int len = 0;
+ int i;
+
+ fprintf(stderr, "Raw text:");
+ for (i = 0; i < data_len; i++) {
+ int pos = (i + bit_offset) % 7;
+
+ if (pos == 0) {
+ len += pdu_decode_7bit_char(dest, len, data[i] & 0x7f, &escape);
+ } else {
+ if (i)
+ len += pdu_decode_7bit_char(dest, len,
+ (data[i - 1] >> (7 + 1 - pos)) |
+ ((data[i] << pos) & 0x7f), &escape);
+
+ if (pos == 6)
+ len += pdu_decode_7bit_char(dest, len, (data[i] >> 1) & 0x7f,
+ &escape);
+ }
+ }
+ dest[len] = 0;
+ fprintf(stderr, "\n");
+ return len;
+}
+
+static int decode_udh(const unsigned char *data)
+{
+ const unsigned char *end;
+ unsigned int type, len, udh_len;
+
+ udh_len = *(data++);
+ end = data + udh_len;
+ while (data < end) {
+ const unsigned char *val;
+
+ type = data[0];
+ len = data[1];
+ val = &data[2];
+ data += 2 + len;
+ if (data > end)
+ break;
+
+ switch (type) {
+ case 0x00:
+ blobmsg_add_u32(&status, "concat_ref", (uint32_t) val[0]);
+ blobmsg_add_u32(&status, "concat_part", (uint32_t) val[2]);
+ blobmsg_add_u32(&status, "concat_parts", (uint32_t) val[1]);
+ break;
+ case 0x08:
+ blobmsg_add_u32(&status, "concat_ref", (uint32_t) (val[0] << 8 | val[1]));
+ blobmsg_add_u32(&status, "concat_part", (uint32_t) val[3]);
+ blobmsg_add_u32(&status, "concat_parts", (uint32_t) val[2]);
+ break;
+ default:
+ break;
+ }
+ }
+
+ return udh_len + 1;
+}
+
+static void decode_7bit_field(char *name, const unsigned char *data, int data_len, int bit_offset)
+{
+ char *dest = blobmsg_alloc_string_buffer(&status, name, 3 * data_len + 2);
+ int out_len = pdu_decode_7bit_str(dest, data, CEILDIV(data_len * 7, 8), bit_offset);
+ dest[out_len] = 0;
+ blobmsg_add_string_buffer(&status);
+}
+
+static char *pdu_add_semioctet(char *str, char val)
+{
+ *str = '0' + (val & 0xf);
+ if (*str <= '9')
+ str++;
+
+ *str = '0' + ((val >> 4) & 0xf);
+ if (*str <= '9')
+ str++;
+
+ return str;
+}
+
+static void
+pdu_decode_address(char *str, unsigned char *data, int len)
+{
+ unsigned char toa;
+
+ toa = *(data++);
+ switch (toa & 0x70) {
+ case 0x50:
+ pdu_decode_7bit_str(str, data, len, 0);
+ return;
+ case 0x10:
+ *(str++) = '+';
+ /* fall through */
+ default:
+ while (len--) {
+ str = pdu_add_semioctet(str, *data);
+ data++;
+ }
+ }
+
+ *str = 0;
+}
+
+static void wms_decode_address(char *name, unsigned char *data, int len)
+{
+ char *str = blobmsg_alloc_string_buffer(&status, name, len * 2 + 2);
+ pdu_decode_address(str, data, len);
+ blobmsg_add_string_buffer(&status);
+}
+
+static void blobmsg_add_hex(struct blob_buf *buf, const char *name, unsigned const char *data, int len)
+{
+ char* str = blobmsg_alloc_string_buffer(buf, name, len * 2 + 1);
+ for (int i = 0; i < len; i++) {
+ str += sprintf(str, "%02x", data[i]);
+ }
+ blobmsg_add_string_buffer(buf);
+}
+
+#define cmd_wms_delete_message_cb no_cb
+static enum qmi_cmd_result
+cmd_wms_delete_message_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ char *err;
+ int id;
+
+ id = strtoul(arg, &err, 10);
+ if (err && *err) {
+ uqmi_add_error("Invalid message ID");
+ return QMI_CMD_EXIT;
+ }
+
+ dmreq.set.memory_index = 1;
+ dmreq.data.memory_index = id;
+
+ qmi_set_wms_delete_request(msg, &dmreq);
+
+ return QMI_CMD_REQUEST;
+}
+
+
+static void cmd_wms_get_message_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
+{
+ struct qmi_wms_raw_read_response res;
+ unsigned char *data, *end;
+ char *str;
+ int cur_len;
+ bool sent;
+ unsigned char first, dcs;
+ void *c;
+
+ qmi_parse_wms_raw_read_response(msg, &res);
+ c = blobmsg_open_table(&status, NULL);
+ data = (unsigned char *) res.data.raw_message_data.raw_data;
+ end = data + res.data.raw_message_data.raw_data_n;
+
+ cur_len = *(data++);
+ if (data + cur_len >= end)
+ goto error;
+
+ if (cur_len) {
+ wms_decode_address("smsc", data, cur_len - 1);
+ data += cur_len;
+ }
+
+ if (data + 3 >= end)
+ goto error;
+
+ first = *(data++);
+ sent = (first & 0x3) == 1;
+ if (sent)
+ data++;
+
+ cur_len = *(data++);
+ if (data + cur_len >= end)
+ goto error;
+
+ if (cur_len) {
+ cur_len = (cur_len + 1) / 2;
+ wms_decode_address(sent ? "receiver" : "sender", data, cur_len);
+ data += cur_len + 1;
+ }
+
+ if (data + 3 >= end)
+ goto error;
+
+ /* Protocol ID */
+ if (*(data++) != 0)
+ goto error;
+
+ /* Data Encoding */
+ dcs = *(data++);
+
+ if (dcs & 0x10)
+ blobmsg_add_u32(&status, "class", (dcs & 3));
+
+ if (sent) {
+ /* Message validity */
+ data++;
+ } else {
+ if (data + 6 >= end)
+ goto error;
+
+ str = blobmsg_alloc_string_buffer(&status, "timestamp", 32);
+
+ /* year */
+ *(str++) = '2';
+ *(str++) = '0';
+ str = pdu_add_semioctet(str, data[0]);
+ /* month */
+ *(str++) = '-';
+ str = pdu_add_semioctet(str, data[1]);
+ /* day */
+ *(str++) = '-';
+ str = pdu_add_semioctet(str, data[2]);
+
+ /* hour */
+ *(str++) = ' ';
+ str = pdu_add_semioctet(str, data[3]);
+ /* minute */
+ *(str++) = ':';
+ str = pdu_add_semioctet(str, data[4]);
+ /* second */
+ *(str++) = ':';
+ str = pdu_add_semioctet(str, data[5]);
+ *str = 0;
+
+ blobmsg_add_string_buffer(&status);
+
+ data += 7;
+ }
+
+ int message_len = *(data++);
+ int udh_len = 0;
+ int bit_offset = 0;
+
+ /* User Data Header */
+ if (first & 0x40) {
+ udh_len = decode_udh(data);
+ data += udh_len;
+ bit_offset = udh_len % 7;
+ }
+
+ if (data >= end)
+ goto error;
+
+ switch(dcs & 0x0c) {
+ case 0x00:
+ /* 7 bit GSM alphabet */
+ message_len = message_len - CEILDIV(udh_len * 8, 7);
+ message_len = MIN(message_len, CEILDIV((end - data) * 8, 7));
+ decode_7bit_field("text", data, message_len, bit_offset);
+ break;
+ case 0x04:
+ /* 8 bit data */
+ message_len = MIN(message_len - udh_len, end - data);
+ blobmsg_add_hex(&status, "data", data, message_len);
+ break;
+ case 0x08:
+ /* 16 bit UCS-2 string */
+ message_len = MIN(message_len - udh_len, end - data);
+ blobmsg_add_hex(&status, "ucs-2", data, message_len);
+ break;
+ default:
+ goto error;
+ }
+
+ blobmsg_close_table(&status, c);
+ return;
+
+error:
+ blobmsg_close_table(&status, c);
+ fprintf(stderr, "There was an error reading message.\n");
+}
+
+static enum qmi_cmd_result
+cmd_wms_get_message_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ char *err;
+ int id;
+
+ id = strtoul(arg, &err, 10);
+ if (err && *err) {
+ uqmi_add_error("Invalid message ID");
+ return QMI_CMD_EXIT;
+ }
+
+ gmreq.data.message_memory_storage_id.memory_index = id;
+ qmi_set_wms_raw_read_request(msg, &gmreq);
+
+ return QMI_CMD_REQUEST;
+}
+
+
+static void cmd_wms_get_raw_message_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
+{
+ struct qmi_wms_raw_read_response res;
+ unsigned char *data;
+ char *str;
+ int i;
+
+ qmi_parse_wms_raw_read_response(msg, &res);
+ data = (unsigned char *) res.data.raw_message_data.raw_data;
+ str = blobmsg_alloc_string_buffer(&status, NULL, res.data.raw_message_data.raw_data_n * 3);
+ for (i = 0; i < res.data.raw_message_data.raw_data_n; i++) {
+ str += sprintf(str, &" %02x"[i ? 0 : 1], data[i]);
+ }
+ blobmsg_add_string_buffer(&status);
+}
+
+#define cmd_wms_get_raw_message_prepare cmd_wms_get_message_prepare
+
+
+static struct {
+ const char *smsc;
+ const char *target;
+ bool flash;
+} _send;
+
+
+#define cmd_wms_send_message_smsc_cb no_cb
+static enum qmi_cmd_result
+cmd_wms_send_message_smsc_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ _send.smsc = arg;
+ return QMI_CMD_DONE;
+}
+
+#define cmd_wms_send_message_target_cb no_cb
+static enum qmi_cmd_result
+cmd_wms_send_message_target_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ _send.target = arg;
+ return QMI_CMD_DONE;
+}
+
+#define cmd_wms_send_message_flash_cb no_cb
+static enum qmi_cmd_result
+cmd_wms_send_message_flash_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ _send.flash = true;
+ return QMI_CMD_DONE;
+}
+
+static int
+pdu_encode_semioctet(unsigned char *dest, const char *str)
+{
+ int len = 0;
+ bool lower = true;
+
+ while (*str) {
+ char digit = *str - '0';
+
+ if (lower)
+ dest[len] = 0xf0 | digit;
+ else
+ dest[len++] &= (digit << 4) | 0xf;
+
+ lower = !lower;
+ str++;
+ }
+
+ return lower ? len : (len + 1);
+}
+
+static int
+pdu_encode_7bit_str(unsigned char *data, const char *str)
+{
+ unsigned char c;
+ int len = 0;
+ int ofs = 0;
+
+ while(1) {
+ c = *(str++) & 0x7f;
+ if (!c)
+ break;
+
+ switch(ofs) {
+ case 0:
+ data[len] = c;
+ break;
+ default:
+ data[len++] |= c << (8 - ofs);
+ data[len] = c >> ofs;
+ break;
+ }
+
+ ofs = (ofs + 1) % 8;
+ }
+
+ return len + 1;
+}
+
+static int
+pdu_encode_number(unsigned char *dest, const char *str, bool smsc)
+{
+ unsigned char format;
+ bool ascii = false;
+ int len = 0;
+ int i;
+
+ dest[len++] = 0;
+ if (*str == '+') {
+ str++;
+ format = 0x91;
+ } else {
+ format = 0x81;
+ }
+
+ for (i = 0; str[i]; i++) {
+ if (str[i] >= '0' && str[i] <= '9')
+ continue;
+
+ ascii = true;
+ break;
+ }
+
+ if (ascii)
+ format |= 0x40;
+
+ dest[len++] = format;
+ if (!ascii)
+ len += pdu_encode_semioctet(&dest[len], str);
+ else
+ len += pdu_encode_7bit_str(&dest[len], str);
+
+ if (smsc)
+ dest[0] = len - 1;
+ else
+ dest[0] = strlen(str);
+
+ return len;
+}
+
+static int
+pdu_encode_data(unsigned char *dest, const char *str)
+{
+ int len = 0;
+
+ dest[len++] = 0;
+ len += pdu_encode_7bit_str(&dest[len], str);
+ dest[0] = strlen(str);
+
+ return len;
+}
+
+#define cmd_wms_send_message_cb no_cb
+static enum qmi_cmd_result
+cmd_wms_send_message_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ static unsigned char buf[512];
+ static struct qmi_wms_raw_send_request mreq = {
+ QMI_INIT_SEQUENCE(raw_message_data,
+ .format = QMI_WMS_MESSAGE_FORMAT_GSM_WCDMA_POINT_TO_POINT,
+ .raw_data = buf,
+ ),
+ };
+ unsigned char *cur = buf;
+ unsigned char first_octet = 0x11;
+ unsigned char protocol_id = 0x00;
+ unsigned char dcs = 0x00;
+
+ if (!_send.target || !*_send.target) {
+ uqmi_add_error("Missing argument");
+ return QMI_CMD_EXIT;
+ }
+
+ if ((_send.smsc && strlen(_send.smsc) > 16) || strlen(_send.target) > 16 || strlen(arg) > 160) {
+ uqmi_add_error("Argument too long");
+ return QMI_CMD_EXIT;
+ }
+
+ if (_send.flash)
+ dcs |= 0x10;
+
+ if (!_send.smsc || !*_send.smsc)
+ *(cur++) = 0;
+ else
+ cur += pdu_encode_number(cur, _send.smsc, true);
+
+ *(cur++) = first_octet;
+ *(cur++) = 0; /* reference */
+
+ cur += pdu_encode_number(cur, _send.target, false);
+ *(cur++) = protocol_id;
+ *(cur++) = dcs;
+
+ *(cur++) = 0xff; /* validity */
+ cur += pdu_encode_data(cur, arg);
+
+ mreq.data.raw_message_data.raw_data_n = cur - buf;
+ qmi_set_wms_raw_send_request(msg, &mreq);
+
+ return QMI_CMD_REQUEST;
+}
--- /dev/null
+/*
+ * uqmi -- tiny QMI support implementation
+ *
+ * Copyright (C) 2014-2015 Felix Fietkau <nbd@openwrt.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ */
+
+#define __uqmi_wms_commands \
+ __uqmi_command(wms_storage, storage, required, CMD_TYPE_OPTION), \
+ __uqmi_command(wms_list_messages, list-messages, no, QMI_SERVICE_WMS), \
+ __uqmi_command(wms_delete_message, delete-message, required, QMI_SERVICE_WMS), \
+ __uqmi_command(wms_get_message, get-message, required, QMI_SERVICE_WMS), \
+ __uqmi_command(wms_get_raw_message, get-raw-message, required, QMI_SERVICE_WMS), \
+ __uqmi_command(wms_send_message_smsc, send-message-smsc, required, CMD_TYPE_OPTION), \
+ __uqmi_command(wms_send_message_target, send-message-target, required, CMD_TYPE_OPTION), \
+ __uqmi_command(wms_send_message_flash, send-message-flash, no, CMD_TYPE_OPTION), \
+ __uqmi_command(wms_send_message, send-message, required, QMI_SERVICE_WMS)
+
+#define wms_helptext \
+ " --list-messages: List SMS messages\n" \
+ " --storage <mem>: Messages storage (sim (default), me)\n" \
+ " --delete-message <id>: Delete SMS message at index <id>\n" \
+ " --storage <mem>: Messages storage (sim (default), me)\n" \
+ " --get-message <id>: Get SMS message at index <id>\n" \
+ " --storage <mem>: Messages storage (sim (default), me)\n" \
+ " --get-raw-message <id>: Get SMS raw message contents at index <id>\n" \
+ " --storage <mem>: Messages storage (sim (default), me)\n" \
+ " --send-message <data>: Send SMS message (use options below)\n" \
+ " --send-message-smsc <nr>: SMSC number\n" \
+ " --send-message-target <nr>: Destination number (required)\n" \
+ " --send-message-flash: Send as Flash SMS\n" \
+
--- /dev/null
+/*
+ * uqmi -- tiny QMI support implementation
+ *
+ * Copyright (C) 2014-2015 Felix Fietkau <nbd@openwrt.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <strings.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include <libubox/blobmsg.h>
+#include <libubox/blobmsg_json.h>
+
+#include "uqmi.h"
+#include "utils.h"
+#include "commands.h"
+
+struct blob_buf status;
+bool single_line = false;
+
+static void no_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
+{
+}
+
+static void cmd_version_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
+{
+ struct qmi_ctl_get_version_info_response res;
+ void *c;
+ char name_buf[16];
+ int i;
+
+ qmi_parse_ctl_get_version_info_response(msg, &res);
+
+ c = blobmsg_open_table(&status, NULL);
+ for (i = 0; i < res.data.service_list_n; i++) {
+ sprintf(name_buf, "service_%d", res.data.service_list[i].service);
+ blobmsg_printf(&status, name_buf, "%d,%d",
+ res.data.service_list[i].major_version,
+ res.data.service_list[i].minor_version);
+ }
+ blobmsg_close_table(&status, c);
+}
+
+static enum qmi_cmd_result
+cmd_version_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ qmi_set_ctl_get_version_info_request(msg);
+ return QMI_CMD_REQUEST;
+}
+
+#define cmd_sync_cb no_cb
+static enum qmi_cmd_result
+cmd_sync_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ qmi_set_ctl_sync_request(msg);
+ return QMI_CMD_REQUEST;
+}
+
+#define cmd_get_client_id_cb no_cb
+static enum qmi_cmd_result
+cmd_get_client_id_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ QmiService svc = qmi_service_get_by_name(arg);
+
+ if (svc < 0) {
+ fprintf(stderr, "Invalid service name '%s'\n", arg);
+ return QMI_CMD_EXIT;
+ }
+
+ if (qmi_service_connect(qmi, svc, -1)) {
+ fprintf(stderr, "Failed to connect to service\n");
+ return QMI_CMD_EXIT;
+ }
+
+ printf("%d\n", qmi_service_get_client_id(qmi, svc));
+ return QMI_CMD_DONE;
+}
+
+#define cmd_set_client_id_cb no_cb
+static enum qmi_cmd_result
+cmd_set_client_id_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ QmiService svc;
+ int id;
+ char *s;
+
+ s = strchr(arg, ',');
+ if (!s) {
+ fprintf(stderr, "Invalid argument\n");
+ return QMI_CMD_EXIT;
+ }
+ *s = 0;
+ s++;
+
+ id = strtoul(s, &s, 0);
+ if (s && *s) {
+ fprintf(stderr, "Invalid argument\n");
+ return QMI_CMD_EXIT;
+ }
+
+ svc = qmi_service_get_by_name(arg);
+ if (svc < 0) {
+ fprintf(stderr, "Invalid service name '%s'\n", arg);
+ return QMI_CMD_EXIT;
+ }
+
+ if (qmi_service_connect(qmi, svc, id)) {
+ fprintf(stderr, "Failed to connect to service\n");
+ return QMI_CMD_EXIT;
+ }
+
+ return QMI_CMD_DONE;
+}
+
+static int
+qmi_get_array_idx(const char **array, int size, const char *str)
+{
+ int i;
+
+ for (i = 0; i < size; i++) {
+ if (!array[i])
+ continue;
+
+ if (!strcmp(array[i], str))
+ return i;
+ }
+
+ return -1;
+}
+
+#define cmd_ctl_set_data_format_cb no_cb
+static enum qmi_cmd_result
+cmd_ctl_set_data_format_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ struct qmi_ctl_set_data_format_request sreq = {};
+ const char *modes[] = {
+ [QMI_CTL_DATA_LINK_PROTOCOL_802_3] = "802.3",
+ [QMI_CTL_DATA_LINK_PROTOCOL_RAW_IP] = "raw-ip",
+ };
+ int mode = qmi_get_array_idx(modes, ARRAY_SIZE(modes), arg);
+
+ if (mode < 0) {
+ uqmi_add_error("Invalid mode (modes: 802.3, raw-ip)");
+ return QMI_CMD_EXIT;
+ }
+
+ qmi_set_ctl_set_data_format_request(msg, &sreq);
+ return QMI_CMD_DONE;
+}
+
+#include "commands-wds.c"
+#include "commands-dms.c"
+#include "commands-nas.c"
+#include "commands-wms.c"
+#include "commands-wda.c"
+#include "commands-uim.c"
+
+#define __uqmi_command(_name, _optname, _arg, _type) \
+ [__UQMI_COMMAND_##_name] = { \
+ .name = #_optname, \
+ .type = _type, \
+ .prepare = cmd_##_name##_prepare, \
+ .cb = cmd_##_name##_cb, \
+ }
+
+const struct uqmi_cmd_handler uqmi_cmd_handler[__UQMI_COMMAND_LAST] = {
+ __uqmi_commands
+};
+#undef __uqmi_command
+
+static struct uqmi_cmd *cmds;
+static int n_cmds;
+
+void uqmi_add_command(char *arg, int cmd)
+{
+ int idx = n_cmds++;
+
+ cmds = realloc(cmds, n_cmds * sizeof(*cmds));
+ cmds[idx].handler = &uqmi_cmd_handler[cmd];
+ cmds[idx].arg = arg;
+}
+
+static void uqmi_print_result(struct blob_attr *data)
+{
+ char *str;
+
+ if (!blob_len(data))
+ return;
+
+ str = blobmsg_format_json_indent(blob_data(data), false, single_line ? -1 : 0);
+ if (!str)
+ return;
+
+ printf("%s\n", str);
+ free(str);
+}
+
+static bool __uqmi_run_commands(struct qmi_dev *qmi, bool option)
+{
+ static struct qmi_request req;
+ char *buf = qmi->buf;
+ int i;
+
+ for (i = 0; i < n_cmds; i++) {
+ enum qmi_cmd_result res;
+ bool cmd_option = cmds[i].handler->type == CMD_TYPE_OPTION;
+ bool do_break = false;
+
+ if (cmd_option != option)
+ continue;
+
+ blob_buf_init(&status, 0);
+ if (cmds[i].handler->type > QMI_SERVICE_CTL &&
+ qmi_service_connect(qmi, cmds[i].handler->type, -1)) {
+ uqmi_add_error("Failed to connect to service");
+ res = QMI_CMD_EXIT;
+ } else {
+ res = cmds[i].handler->prepare(qmi, &req, (void *) buf, cmds[i].arg);
+ }
+
+ if (res == QMI_CMD_REQUEST) {
+ qmi_request_start(qmi, &req, cmds[i].handler->cb);
+ req.no_error_cb = true;
+ if (qmi_request_wait(qmi, &req)) {
+ uqmi_add_error(qmi_get_error_str(req.ret));
+ do_break = true;
+ }
+ } else if (res == QMI_CMD_EXIT) {
+ do_break = true;
+ }
+
+ uqmi_print_result(status.head);
+ if (do_break)
+ return false;
+ }
+ return true;
+}
+
+int uqmi_add_error(const char *msg)
+{
+ blobmsg_add_string(&status, NULL, msg);
+ return QMI_CMD_EXIT;
+}
+
+bool uqmi_run_commands(struct qmi_dev *qmi)
+{
+ bool ret;
+
+ ret = __uqmi_run_commands(qmi, true) &&
+ __uqmi_run_commands(qmi, false);
+
+ free(cmds);
+ cmds = NULL;
+ n_cmds = 0;
+
+ return ret;
+}
--- /dev/null
+/*
+ * uqmi -- tiny QMI support implementation
+ *
+ * Copyright (C) 2014-2015 Felix Fietkau <nbd@openwrt.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ */
+
+#ifndef __UQMI_COMMANDS_H
+#define __UQMI_COMMANDS_H
+
+#include <stdbool.h>
+#include <libubox/blob.h>
+
+#include "commands-wds.h"
+#include "commands-dms.h"
+#include "commands-nas.h"
+#include "commands-wms.h"
+#include "commands-wda.h"
+#include "commands-uim.h"
+
+enum qmi_cmd_result {
+ QMI_CMD_DONE,
+ QMI_CMD_REQUEST,
+ QMI_CMD_EXIT,
+};
+
+enum {
+ CMD_TYPE_OPTION = -1,
+};
+
+struct uqmi_cmd_handler {
+ const char *name;
+ int type;
+
+ enum qmi_cmd_result (*prepare)(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg);
+ void (*cb)(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg);
+};
+
+struct uqmi_cmd {
+ const struct uqmi_cmd_handler *handler;
+ char *arg;
+};
+
+#define __uqmi_commands \
+ __uqmi_command(version, get-versions, no, QMI_SERVICE_CTL), \
+ __uqmi_command(sync, sync, no, QMI_SERVICE_CTL), \
+ __uqmi_command(set_client_id, set-client-id, required, CMD_TYPE_OPTION), \
+ __uqmi_command(get_client_id, get-client-id, required, QMI_SERVICE_CTL), \
+ __uqmi_command(ctl_set_data_format, set-data-format, required, QMI_SERVICE_CTL), \
+ __uqmi_wds_commands, \
+ __uqmi_dms_commands, \
+ __uqmi_nas_commands, \
+ __uqmi_wms_commands, \
+ __uqmi_wda_commands, \
+ __uqmi_uim_commands
+
+#define __uqmi_command(_name, _optname, _arg, _option) __UQMI_COMMAND_##_name
+enum uqmi_command {
+ __uqmi_commands,
+ __UQMI_COMMAND_LAST
+};
+#undef __uqmi_command
+
+extern bool single_line;
+extern const struct uqmi_cmd_handler uqmi_cmd_handler[];
+extern struct blob_buf status;
+void uqmi_add_command(char *arg, int longidx);
+bool uqmi_run_commands(struct qmi_dev *qmi);
+int uqmi_add_error(const char *msg);
+
+#endif
--- /dev/null
+/*
+ * uqmi -- tiny QMI support implementation
+ *
+ * Copyright (C) 2014-2015 Felix Fietkau <nbd@openwrt.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ */
+
+#include <fcntl.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <strings.h>
+#include "uqmi.h"
+#include "qmi-errors.h"
+#include "qmi-errors.c"
+#include "mbim.h"
+
+bool cancel_all_requests = false;
+
+#define __qmi_service(_n) [__##_n] = _n
+static const uint8_t qmi_services[__QMI_SERVICE_LAST] = {
+ __qmi_services
+};
+#undef __qmi_service
+
+#ifdef DEBUG_PACKET
+void dump_packet(const char *prefix, void *ptr, int len)
+{
+ unsigned char *data = ptr;
+ int i;
+
+ fprintf(stderr, "%s:", prefix);
+ for (i = 0; i < len; i++)
+ fprintf(stderr, " %02x", data[i]);
+ fprintf(stderr, "\n");
+}
+#endif
+
+static int
+qmi_get_service_idx(QmiService svc)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(qmi_services); i++)
+ if (qmi_services[i] == svc)
+ return i;
+
+ return -1;
+}
+
+static bool qmi_message_is_response(struct qmi_msg *msg)
+{
+ if (msg->qmux.service == QMI_SERVICE_CTL) {
+ if (msg->flags & QMI_CTL_FLAG_RESPONSE)
+ return true;
+ }
+ else {
+ if (msg->flags & QMI_SERVICE_FLAG_RESPONSE)
+ return true;
+ }
+
+ return false;
+}
+
+static bool qmi_message_is_indication(struct qmi_msg *msg)
+{
+ if (msg->qmux.service == QMI_SERVICE_CTL) {
+ if (msg->flags & QMI_CTL_FLAG_INDICATION)
+ return true;
+ }
+ else {
+ if (msg->flags & QMI_SERVICE_FLAG_INDICATION)
+ return true;
+ }
+
+ return false;
+}
+
+static void __qmi_request_complete(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
+{
+ void *tlv_buf;
+ int tlv_len;
+
+ if (!req->pending)
+ return;
+
+ req->pending = false;
+ list_del(&req->list);
+
+ if (msg) {
+ tlv_buf = qmi_msg_get_tlv_buf(msg, &tlv_len);
+ req->ret = qmi_check_message_status(tlv_buf, tlv_len);
+ if (req->ret)
+ msg = NULL;
+ } else {
+ req->ret = QMI_ERROR_CANCELLED;
+ }
+
+ if (req->cb && (msg || !req->no_error_cb))
+ req->cb(qmi, req, msg);
+
+ if (req->complete) {
+ *req->complete = true;
+ uloop_cancelled = true;
+ }
+}
+
+static void qmi_process_msg(struct qmi_dev *qmi, struct qmi_msg *msg)
+{
+ struct qmi_request *req;
+ uint16_t tid;
+
+ if (qmi_message_is_indication(msg)) {
+ if (msg->qmux.service == QMI_SERVICE_CTL) {
+ struct qmi_msg sync_msg = {0};
+ qmi_set_ctl_sync_request(&sync_msg);
+ /* A SYNC indication might be sent on boot in order to indicate
+ * that all Client IDs have been deallocated by the modem:
+ * cancel all requests, as they will not be answered. */
+ if (msg->ctl.message == sync_msg.ctl.message) {
+ while (!list_empty(&qmi->req)) {
+ req = list_first_entry(&qmi->req, struct qmi_request, list);
+ qmi_request_cancel(qmi, req);
+ }
+ }
+ }
+
+ return;
+ }
+
+ if (!qmi_message_is_response(msg))
+ return;
+
+ if (msg->qmux.service == QMI_SERVICE_CTL)
+ tid = msg->ctl.transaction;
+ else
+ tid = le16_to_cpu(msg->svc.transaction);
+
+ list_for_each_entry(req, &qmi->req, list) {
+ if (req->service != msg->qmux.service)
+ continue;
+
+ if (req->tid != tid)
+ continue;
+
+ __qmi_request_complete(qmi, req, msg);
+ return;
+ }
+}
+
+static void qmi_notify_read(struct ustream *us, int bytes)
+{
+ struct qmi_dev *qmi = container_of(us, struct qmi_dev, sf.stream);
+ struct qmi_msg *msg;
+ char *buf;
+ int len, msg_len;
+
+
+ while (1) {
+ buf = ustream_get_read_buf(us, &len);
+ if (!buf || !len)
+ return;
+
+ dump_packet("Received packet", buf, len);
+ if (qmi->is_mbim) {
+ struct mbim_command_message *mbim = (void *) buf;
+
+ if (len < sizeof(*mbim))
+ return;
+ msg = (struct qmi_msg *) (buf + sizeof(*mbim));
+ msg_len = le32_to_cpu(mbim->header.length);
+ if (!is_mbim_qmi(mbim)) {
+ /* must consume other MBIM packets */
+ ustream_consume(us, msg_len);
+ return;
+ }
+ } else {
+ if (len < offsetof(struct qmi_msg, flags))
+ return;
+ msg = (struct qmi_msg *) buf;
+ msg_len = le16_to_cpu(msg->qmux.len) + 1;
+ }
+
+ if (len < msg_len)
+ return;
+
+ qmi_process_msg(qmi, msg);
+ ustream_consume(us, msg_len);
+ }
+}
+
+int qmi_request_start(struct qmi_dev *qmi, struct qmi_request *req, request_cb cb)
+{
+ struct qmi_msg *msg = qmi->buf;
+ int len = qmi_complete_request_message(msg);
+ uint16_t tid;
+ void *buf = (void *) qmi->buf;
+
+ memset(req, 0, sizeof(*req));
+ req->ret = -1;
+ req->service = msg->qmux.service;
+ if (req->service == QMI_SERVICE_CTL) {
+ tid = qmi->ctl_tid++;
+ msg->ctl.transaction = tid;
+ } else {
+ int idx = qmi_get_service_idx(req->service);
+
+ if (idx < 0)
+ return -1;
+
+ tid = qmi->service_data[idx].tid++;
+ msg->svc.transaction = cpu_to_le16(tid);
+ msg->qmux.client = qmi->service_data[idx].client_id;
+ }
+
+ req->tid = tid;
+ req->cb = cb;
+ req->pending = true;
+ list_add(&req->list, &qmi->req);
+
+ if (qmi->is_mbim) {
+ buf -= sizeof(struct mbim_command_message);
+ mbim_qmi_cmd((struct mbim_command_message *) buf, len, tid);
+ len += sizeof(struct mbim_command_message);
+ }
+
+ dump_packet("Send packet", buf, len);
+ ustream_write(&qmi->sf.stream, buf, len, false);
+ return 0;
+}
+
+void qmi_request_cancel(struct qmi_dev *qmi, struct qmi_request *req)
+{
+ req->cb = NULL;
+ __qmi_request_complete(qmi, req, NULL);
+}
+
+/*! Run uloop until the request has been completed
+ *
+ * \param qmi the qmi device
+ * \param req the request to wait for
+ * \return req->ret (0 on success)
+ */
+int qmi_request_wait(struct qmi_dev *qmi, struct qmi_request *req)
+{
+ bool complete = false;
+ bool cancelled;
+
+ if (!req->pending)
+ return req->ret;
+
+ if (req->complete)
+ *req->complete = true;
+
+ req->complete = &complete;
+ while (!complete) {
+ cancelled = uloop_cancelled;
+ uloop_cancelled = false;
+ uloop_run();
+
+ if (cancel_all_requests)
+ qmi_request_cancel(qmi, req);
+
+ uloop_cancelled = cancelled;
+ }
+
+ if (req->complete == &complete)
+ req->complete = NULL;
+
+ return req->ret;
+}
+
+struct qmi_connect_request {
+ struct qmi_request req;
+ int cid;
+};
+
+static void qmi_connect_service_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
+{
+ struct qmi_ctl_allocate_cid_response res;
+ struct qmi_connect_request *creq = container_of(req, struct qmi_connect_request, req);
+
+ if (!msg)
+ return;
+
+ qmi_parse_ctl_allocate_cid_response(msg, &res);
+ creq->cid = res.data.allocation_info.cid;
+}
+
+int qmi_service_connect(struct qmi_dev *qmi, QmiService svc, int client_id)
+{
+ struct qmi_ctl_allocate_cid_request creq = {
+ QMI_INIT(service, svc)
+ };
+ struct qmi_connect_request req;
+ int idx = qmi_get_service_idx(svc);
+ struct qmi_msg *msg = qmi->buf;
+
+ if (idx < 0)
+ return -1;
+
+ if (qmi->service_connected & (1 << idx))
+ return 0;
+
+ if (client_id < 0) {
+ qmi_set_ctl_allocate_cid_request(msg, &creq);
+ qmi_request_start(qmi, &req.req, qmi_connect_service_cb);
+ qmi_request_wait(qmi, &req.req);
+
+ if (req.req.ret)
+ return req.req.ret;
+
+ client_id = req.cid;
+ } else {
+ qmi->service_keep_cid |= (1 << idx);
+ }
+
+ qmi->service_data[idx].connected = true;
+ qmi->service_data[idx].client_id = client_id;
+ qmi->service_data[idx].tid = 1;
+ qmi->service_connected |= (1 << idx);
+
+ return 0;
+}
+
+static void __qmi_service_disconnect(struct qmi_dev *qmi, int idx)
+{
+ int client_id = qmi->service_data[idx].client_id;
+ struct qmi_ctl_release_cid_request creq = {
+ QMI_INIT_SEQUENCE(release_info,
+ .service = qmi_services[idx],
+ .cid = client_id,
+ )
+ };
+ struct qmi_request req;
+ struct qmi_msg *msg = qmi->buf;
+
+ qmi->service_connected &= ~(1 << idx);
+ qmi->service_data[idx].client_id = -1;
+ qmi->service_data[idx].tid = 0;
+
+ qmi_set_ctl_release_cid_request(msg, &creq);
+ qmi_request_start(qmi, &req, NULL);
+ qmi_request_wait(qmi, &req);
+}
+
+int qmi_service_release_client_id(struct qmi_dev *qmi, QmiService svc)
+{
+ int idx = qmi_get_service_idx(svc);
+ qmi->service_release_cid |= 1 << idx;
+ return 0;
+}
+
+static void qmi_close_all_services(struct qmi_dev *qmi)
+{
+ uint32_t connected = qmi->service_connected;
+ int idx;
+
+ qmi->service_keep_cid &= ~qmi->service_release_cid;
+ for (idx = 0; connected; idx++, connected >>= 1) {
+ if (!(connected & 1))
+ continue;
+
+ if (qmi->service_keep_cid & (1 << idx))
+ continue;
+
+ __qmi_service_disconnect(qmi, idx);
+ }
+}
+
+int qmi_service_get_client_id(struct qmi_dev *qmi, QmiService svc)
+{
+ int idx = qmi_get_service_idx(svc);
+
+ if (idx < 0)
+ return -1;
+
+ qmi->service_keep_cid |= (1 << idx);
+ return qmi->service_data[idx].client_id;
+}
+
+int qmi_device_open(struct qmi_dev *qmi, const char *path)
+{
+ static struct {
+ struct mbim_command_message mbim;
+ union {
+ char buf[2048];
+ struct qmi_msg msg;
+ } u;
+ } __packed msgbuf;
+ struct ustream *us = &qmi->sf.stream;
+ int fd;
+
+ uloop_init();
+
+ fd = open(path, O_RDWR | O_EXCL | O_NONBLOCK | O_NOCTTY);
+ if (fd < 0)
+ return -1;
+
+ us->notify_read = qmi_notify_read;
+ ustream_fd_init(&qmi->sf, fd);
+ INIT_LIST_HEAD(&qmi->req);
+ qmi->ctl_tid = 1;
+ qmi->buf = msgbuf.u.buf;
+
+ return 0;
+}
+
+void qmi_device_close(struct qmi_dev *qmi)
+{
+ struct qmi_request *req;
+
+ qmi_close_all_services(qmi);
+ ustream_free(&qmi->sf.stream);
+ close(qmi->sf.fd.fd);
+
+ while (!list_empty(&qmi->req)) {
+ req = list_first_entry(&qmi->req, struct qmi_request, list);
+ qmi_request_cancel(qmi, req);
+ }
+}
+
+QmiService qmi_service_get_by_name(const char *str)
+{
+ static const struct {
+ const char *name;
+ QmiService svc;
+ } services[] = {
+ { "dms", QMI_SERVICE_DMS },
+ { "nas", QMI_SERVICE_NAS },
+ { "pds", QMI_SERVICE_PDS },
+ { "wds", QMI_SERVICE_WDS },
+ { "wms", QMI_SERVICE_WMS },
+ { "wda", QMI_SERVICE_WDA },
+ { "uim", QMI_SERVICE_UIM },
+ };
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(services); i++) {
+ if (!strcasecmp(str, services[i].name))
+ return services[i].svc;
+ }
+
+ return -1;
+}
--- /dev/null
+/*
+ * uqmi -- tiny QMI support implementation
+ *
+ * Copyright (C) 2014-2015 Felix Fietkau <nbd@openwrt.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ */
+
+#include <libubox/uloop.h>
+#include <libubox/utils.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <errno.h>
+#include <getopt.h>
+#include <signal.h>
+
+#include "uqmi.h"
+#include "commands.h"
+
+static const char *device;
+
+#define CMD_OPT(_arg) (-2 - _arg)
+
+#define __uqmi_command(_name, _optname, _arg, _option) { #_optname, _arg##_argument, NULL, CMD_OPT(__UQMI_COMMAND_##_name) }
+static const struct option uqmi_getopt[] = {
+ __uqmi_commands,
+ { "single", no_argument, NULL, 's' },
+ { "device", required_argument, NULL, 'd' },
+ { "keep-client-id", required_argument, NULL, 'k' },
+ { "release-client-id", required_argument, NULL, 'r' },
+ { "mbim", no_argument, NULL, 'm' },
+ { "timeout", required_argument, NULL, 't' },
+ { NULL, 0, NULL, 0 }
+};
+#undef __uqmi_command
+
+static int usage(const char *progname)
+{
+ fprintf(stderr, "Usage: %s <options|actions>\n"
+ "Options:\n"
+ " --single, -s: Print output as a single line (for scripts)\n"
+ " --device=NAME, -d NAME: Set device name to NAME (required)\n"
+ " --keep-client-id <name>: Keep Client ID for service <name>\n"
+ " --release-client-id <name>: Release Client ID after exiting\n"
+ " --mbim, -m NAME is an MBIM device with EXT_QMUX support\n"
+ " --timeout, -t response timeout in msecs\n"
+ "\n"
+ "Services: dms, nas, pds, wds, wms\n"
+ "\n"
+ "Actions:\n"
+ " --get-versions: Get service versions\n"
+ " --set-client-id <name>,<id>: Set Client ID for service <name> to <id>\n"
+ " (implies --keep-client-id)\n"
+ " --get-client-id <name>: Connect and get Client ID for service <name>\n"
+ " (implies --keep-client-id)\n"
+ " --sync: Release all Client IDs\n"
+ wds_helptext
+ dms_helptext
+ uim_helptext
+ nas_helptext
+ wms_helptext
+ wda_helptext
+ "\n", progname);
+ return 1;
+}
+
+static void keep_client_id(struct qmi_dev *qmi, const char *optarg)
+{
+ QmiService svc = qmi_service_get_by_name(optarg);
+ if (svc < 0) {
+ fprintf(stderr, "Invalid service %s\n", optarg);
+ exit(1);
+ }
+ qmi_service_get_client_id(qmi, svc);
+}
+
+static void release_client_id(struct qmi_dev *qmi, const char *optarg)
+{
+ QmiService svc = qmi_service_get_by_name(optarg);
+ if (svc < 0) {
+ fprintf(stderr, "Invalid service %s\n", optarg);
+ exit(1);
+ }
+ qmi_service_release_client_id(qmi, svc);
+}
+
+static void handle_exit_signal(int signal)
+{
+ cancel_all_requests = true;
+ uloop_end();
+}
+
+static void _request_timeout_handler(struct uloop_timeout *timeout)
+{
+ fprintf(stderr, "Request timed out\n");
+ handle_exit_signal(0);
+}
+
+struct uloop_timeout request_timeout = { .cb = _request_timeout_handler, };
+
+int main(int argc, char **argv)
+{
+ static struct qmi_dev dev;
+ int ch, ret;
+
+ uloop_init();
+ signal(SIGINT, handle_exit_signal);
+ signal(SIGTERM, handle_exit_signal);
+
+ while ((ch = getopt_long(argc, argv, "d:k:smt:", uqmi_getopt, NULL)) != -1) {
+ int cmd_opt = CMD_OPT(ch);
+
+ if (ch < 0 && cmd_opt >= 0 && cmd_opt < __UQMI_COMMAND_LAST) {
+ uqmi_add_command(optarg, cmd_opt);
+ continue;
+ }
+
+ switch(ch) {
+ case 'r':
+ release_client_id(&dev, optarg);
+ break;
+ case 'k':
+ keep_client_id(&dev, optarg);
+ break;
+ case 'd':
+ device = optarg;
+ break;
+ case 's':
+ single_line = true;
+ break;
+ case 'm':
+ dev.is_mbim = true;
+ break;
+ case 't':
+ uloop_timeout_set(&request_timeout, atol(optarg));
+ break;
+ default:
+ return usage(argv[0]);
+ }
+ }
+
+ if (!device) {
+ fprintf(stderr, "No device given\n");
+ return usage(argv[0]);
+ }
+
+ if (qmi_device_open(&dev, device)) {
+ fprintf(stderr, "Failed to open device\n");
+ return 2;
+ }
+
+ ret = uqmi_run_commands(&dev) ? 0 : -1;
+
+ qmi_device_close(&dev);
+
+ return ret;
+}
--- /dev/null
+/*
+ * uqmi -- tiny QMI support implementation
+ *
+ * Copyright (C) 2014-2015 Felix Fietkau <nbd@openwrt.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ */
+
+#ifndef __UQMI_H
+#define __UQMI_H
+
+#include <stdbool.h>
+
+#include <libubox/uloop.h>
+#include <libubox/ustream.h>
+
+#include "qmi-message.h"
+
+#ifdef DEBUG_PACKET
+void dump_packet(const char *prefix, void *ptr, int len);
+#else
+static inline void dump_packet(const char *prefix, void *ptr, int len)
+{
+}
+#endif
+
+#define __qmi_services \
+ __qmi_service(QMI_SERVICE_WDS), \
+ __qmi_service(QMI_SERVICE_DMS), \
+ __qmi_service(QMI_SERVICE_NAS), \
+ __qmi_service(QMI_SERVICE_QOS), \
+ __qmi_service(QMI_SERVICE_WMS), \
+ __qmi_service(QMI_SERVICE_PDS), \
+ __qmi_service(QMI_SERVICE_AUTH), \
+ __qmi_service(QMI_SERVICE_AT), \
+ __qmi_service(QMI_SERVICE_VOICE), \
+ __qmi_service(QMI_SERVICE_CAT2), \
+ __qmi_service(QMI_SERVICE_UIM), \
+ __qmi_service(QMI_SERVICE_PBM), \
+ __qmi_service(QMI_SERVICE_LOC), \
+ __qmi_service(QMI_SERVICE_SAR), \
+ __qmi_service(QMI_SERVICE_RMTFS), \
+ __qmi_service(QMI_SERVICE_CAT), \
+ __qmi_service(QMI_SERVICE_RMS), \
+ __qmi_service(QMI_SERVICE_OMA), \
+ __qmi_service(QMI_SERVICE_WDA)
+
+#define __qmi_service(_n) __##_n
+enum {
+ __qmi_services,
+ __QMI_SERVICE_LAST
+};
+#undef __qmi_service
+
+struct qmi_dev;
+struct qmi_request;
+struct qmi_msg;
+
+typedef void (*request_cb)(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg);
+
+struct qmi_dev {
+ struct ustream_fd sf;
+
+ struct list_head req;
+
+ struct {
+ bool connected;
+ uint8_t client_id;
+ uint16_t tid;
+ } service_data[__QMI_SERVICE_LAST];
+
+ uint32_t service_connected;
+ uint32_t service_keep_cid;
+ uint32_t service_release_cid;
+
+ uint8_t ctl_tid;
+ void *buf;
+
+ bool is_mbim;
+};
+
+struct qmi_request {
+ struct list_head list;
+
+ request_cb cb;
+
+ bool *complete;
+ bool pending;
+ bool no_error_cb;
+ uint8_t service;
+ uint16_t tid;
+ int ret;
+};
+
+extern bool cancel_all_requests;
+int qmi_device_open(struct qmi_dev *qmi, const char *path);
+void qmi_device_close(struct qmi_dev *qmi);
+
+int qmi_request_start(struct qmi_dev *qmi, struct qmi_request *req, request_cb cb);
+void qmi_request_cancel(struct qmi_dev *qmi, struct qmi_request *req);
+int qmi_request_wait(struct qmi_dev *qmi, struct qmi_request *req);
+
+static inline bool qmi_request_pending(struct qmi_request *req)
+{
+ return req->pending;
+}
+
+int qmi_service_connect(struct qmi_dev *qmi, QmiService svc, int client_id);
+int qmi_service_get_client_id(struct qmi_dev *qmi, QmiService svc);
+int qmi_service_release_client_id(struct qmi_dev *qmi, QmiService svc);
+QmiService qmi_service_get_by_name(const char *str);
+
+#endif
+++ /dev/null
-/*
- * uqmi -- tiny QMI support implementation
- *
- * Copyright (C) 2014-2015 Felix Fietkau <nbd@openwrt.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA.
- */
-
-#include "utils.h"
-#include "qmi-errors.h"
-#include <qmi-errors.c>
-
-#include <libubox/utils.h>
-
-const char *qmi_get_error_str(int code)
-{
- int i;
-
- for (i = 0; i < ARRAY_SIZE(qmi_errors); i++) {
- if (qmi_errors[i].code == code)
- return qmi_errors[i].text;
- }
-
- return "Unknown error";
-}
+++ /dev/null
-/*
- * uqmi -- tiny QMI support implementation
- *
- * Copyright (C) 2014-2015 Felix Fietkau <nbd@openwrt.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA.
- */
-
-
-#ifndef __UTILS_H
-#define __UTILS_H
-
-const char *qmi_get_error_str(int code);
-
-#endif /* __UTILS_H */