diff options
-rw-r--r-- | main.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
@@ -115,8 +115,8 @@ void initializeCache(); void shutdown(); const char *code2str(MTS::IO::ICellularRadio::CODE code); std::string loadImeiFromDeviceInfo(); -MTS::IO::ICellularRadio::RADIOMODE radioModeEnum(const std::string &mode); -const char* radioModeStr(MTS::IO::ICellularRadio::RADIOMODE mode); +MTS::IO::ICellularRadio::RADIO_NETWORK_MODE radioModeEnum(const std::string &mode); +const char* radioModeStr(MTS::IO::ICellularRadio::RADIO_NETWORK_MODE mode); static int iOption = 0; @@ -144,9 +144,9 @@ static struct option long_options[] = { { "set-mip-rev-tun", required_argument, 0, '7' }, { "set-mip-mn-aaa-ss", required_argument, 0, '8' }, { "set-mip-mn-ha-ss", required_argument, 0, '9' }, - { "get-radio-mode", no_argument, &iOption, OPT_GET_RADIOMODE }, - { "set-radio-mode", required_argument, 0, OPT_SET_RADIOMODE }, { "unlock-sim-card", required_argument, 0, OPT_UNLOCK_SIM_CARD }, + { "get-radio-network-mode", no_argument, &iOption, OPT_GET_RADIOMODE }, + { "set-radio-network-mode", required_argument, 0, OPT_SET_RADIOMODE }, { "init-dc", no_argument, &iOption, OPT_INIT_DC }, { "init-fumo", no_argument, &iOption, OPT_INIT_FUMO }, { "init-prl", no_argument, &iOption, OPT_INIT_PRL }, @@ -370,11 +370,11 @@ int main(int argc, char** argv) { result = g_apRadio->setActiveFirmware(jArgs); printf("%s\n", code2str(result)); } else if(g_iOptions & OPT_GET_RADIOMODE) { - ICellularRadio::RADIOMODE mode; - g_apRadio->getRadioMode(mode); + ICellularRadio::RADIO_NETWORK_MODE mode; + g_apRadio->getRadioNetworkMode(mode); printf("%s\n", radioModeStr(mode)); } else if(g_iOptions & OPT_SET_RADIOMODE) { - ICellularRadio::CODE res = g_apRadio->setRadioMode(radioModeEnum(g_sRadioMode)); + ICellularRadio::CODE res = g_apRadio->setRadioNetworkMode(radioModeEnum(g_sRadioMode)); printf("%s\n", code2str(res)); } else if(g_iOptions & OPT_UNLOCK_SIM_CARD) { Json::Value jArgs(Json::objectValue); @@ -645,8 +645,8 @@ void printHelp(const std::string& sApp) { printf("\t--set-mip-mn-aaa-ss <VAL> : set MIP MN AAA SS\n"); printf("\t--set-mip-mn-ha-ss <VAL> : set MIP MN HA SS\n"); printf("\t--set-rx-diversity <VAL> : set RX Diversity\n"); - printf("\t--get-radio-mode : get selected cellular network\n"); - printf("\t--set-radio-mode {auto|gsm|umts} : set cellular network\n"); + printf("\t--get-radio-network-mode : get selected cellular network\n"); + printf("\t--set-radio-network-mode {auto|gsm|umts} : set cellular network\n"); // Applicable for LTE910-NA1 dual FW images only // printf("\t--set-active-firmware <VAL> : switch to a specific firmware image\n"); printf("\t--factory-default [ --msl <MSL> ] : reset to factory defaults\n"); @@ -678,27 +678,27 @@ const char *code2str(MTS::IO::ICellularRadio::CODE code) { return "Unknown"; } -MTS::IO::ICellularRadio::RADIOMODE radioModeEnum(const std::string &mode) +MTS::IO::ICellularRadio::RADIO_NETWORK_MODE radioModeEnum(const std::string &mode) { using namespace MTS::IO; if (mode == "auto") - return ICellularRadio::RADIOMODE_AUTO; + return ICellularRadio::RADIO_NETWORK_MODE_AUTO; else if (mode == "gsm") - return ICellularRadio::RADIOMODE_GSM_ONLY; + return ICellularRadio::RADIO_NETWORK_MODE_GSM_ONLY; else if (mode == "umts") - return ICellularRadio::RADIOMODE_UMTS_ONLY; + return ICellularRadio::RADIO_NETWORK_MODE_UMTS_ONLY; else - return ICellularRadio::RADIOMODE_UNKNOWN; + return ICellularRadio::RADIO_NETWORK_MODE_UNKNOWN; } -const char* radioModeStr(MTS::IO::ICellularRadio::RADIOMODE mode) +const char* radioModeStr(MTS::IO::ICellularRadio::RADIO_NETWORK_MODE mode) { using namespace MTS::IO; switch (mode) { - case ICellularRadio::RADIOMODE_GSM_ONLY : return "gsm"; - case ICellularRadio::RADIOMODE_UMTS_ONLY: return "umts"; - case ICellularRadio::RADIOMODE_AUTO : return "auto"; + case ICellularRadio::RADIO_NETWORK_MODE_GSM_ONLY : return "gsm"; + case ICellularRadio::RADIO_NETWORK_MODE_UMTS_ONLY: return "umts"; + case ICellularRadio::RADIO_NETWORK_MODE_AUTO : return "auto"; default : return ""; } } |