summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/main.cpp b/main.cpp
index ee30668..f30a417 100644
--- a/main.cpp
+++ b/main.cpp
@@ -98,6 +98,9 @@ const uint32_t OPT_SUMMARY_NETWORK = 0x02000000;
const uint32_t OPT_CELL_MODE = 0x04000000;
const uint32_t OPT_SUPPORTED_CELL_MODE = 0x08000000;
+int32_t g_iAuxOptions = 0;
+const uint32_t AOPT_VOICE_SUPPORT = 0x00000001;
+
void handle_sigterm(int signum);
void printHelp(const std::string& sApp);
void parseOptions(int argc, char** argv);
@@ -358,6 +361,12 @@ int main(int argc, char** argv) {
jValue[MTS::IO::ICellularRadio::KEY_SIM_MNC] = sMnc;
printf("%s", jValue.toStyledString().c_str());
}
+ } else if (g_iAuxOptions & AOPT_VOICE_SUPPORT) {
+ Json::Value jValue;
+ result = g_apRadio->getVoiceSupport(jValue);
+ if (result == ICellularRadio::SUCCESS) {
+ printf("%s", jValue.toStyledString().c_str());
+ }
}
if (g_bIstty && result == ICellularRadio::CODE::SUCCESS)
@@ -604,7 +613,8 @@ Json::Value getNetworkData() {
void parseOptions(int argc, char** argv) {
int c;
- int iOption;
+ int iOption = 0;
+ int iAuxOption = 0;
std::string sPath;
if(argc == 1) {
@@ -649,6 +659,7 @@ void parseOptions(int argc, char** argv) {
{ "sim-carrier-code", no_argument, &iOption, OPT_SIM_CARRIER_CODE },
{ "ue-mode-of-operation", no_argument,&iOption, OPT_UE_MODE_OF_OPERATION },
{ "sim-mcc-mnc", no_argument, &iOption, OPT_SIM_MCC_MNC },
+ { "voice-support",no_argument, &iAuxOption, AOPT_VOICE_SUPPORT },
{ 0, 0, 0, 0 } };
/* getopt_long stores the option index here. */
@@ -663,6 +674,7 @@ void parseOptions(int argc, char** argv) {
if(c == 0) {
g_iOptions |= iOption;
+ g_iAuxOptions |= iAuxOption;
continue;
}
@@ -761,6 +773,7 @@ void printHelp(const std::string& sApp) {
printf("\t--sim-carrier-code\n");
printf("\t--ue-mode-of-operation\n");
printf("\t--sim-mcc-mnc\n");
+ printf("\t--voice-support\n");
// Applicable for LTE910-NA1 dual FW images only
// printf("\t--active-firmware\n");
printf("\n");