mirror of git://git.sysmocom.de/ofono
Refactor: Rename radio setting type names
This commit is contained in:
parent
77693b697d
commit
538cd6a1cb
|
@ -34,10 +34,10 @@ Properties string TechnologyPreference [read-write]
|
|||
as network preference.
|
||||
|
||||
The possible values are:
|
||||
"any" Radio access technology
|
||||
selection is done automatically,
|
||||
based on reception and
|
||||
availability.
|
||||
"2g" Only GSM used for radio access.
|
||||
"3g" Only UMTS used for radio access.
|
||||
"4g" Only LTE used for radio acccess.
|
||||
"any" Radio access technology
|
||||
selection is done automatically,
|
||||
based on reception and
|
||||
availability.
|
||||
"gsm" Only GSM used for radio access.
|
||||
"umts" Only UMTS used for radio access.
|
||||
"lte" Only LTE used for radio acccess.
|
||||
|
|
|
@ -29,10 +29,10 @@ extern "C" {
|
|||
#include <ofono/types.h>
|
||||
|
||||
enum ofono_radio_access_mode {
|
||||
OFONO_RADIO_ACCESS_MODE_ANY = 0,
|
||||
OFONO_RADIO_ACCESS_MODE_2G = 1,
|
||||
OFONO_RADIO_ACCESS_MODE_3G = 2,
|
||||
OFONO_RADIO_ACCESS_MODE_4G = 3,
|
||||
OFONO_RADIO_ACCESS_MODE_ANY = 0,
|
||||
OFONO_RADIO_ACCESS_MODE_GSM = 1,
|
||||
OFONO_RADIO_ACCESS_MODE_UMTS = 2,
|
||||
OFONO_RADIO_ACCESS_MODE_LTE = 3,
|
||||
};
|
||||
|
||||
struct ofono_radio_settings;
|
||||
|
|
|
@ -52,12 +52,12 @@ static const char *radio_access_mode_to_string(enum ofono_radio_access_mode mode
|
|||
switch (mode) {
|
||||
case OFONO_RADIO_ACCESS_MODE_ANY:
|
||||
return "any";
|
||||
case OFONO_RADIO_ACCESS_MODE_2G:
|
||||
return "2g";
|
||||
case OFONO_RADIO_ACCESS_MODE_3G:
|
||||
return "3g";
|
||||
case OFONO_RADIO_ACCESS_MODE_4G:
|
||||
return "4g";
|
||||
case OFONO_RADIO_ACCESS_MODE_GSM:
|
||||
return "gsm";
|
||||
case OFONO_RADIO_ACCESS_MODE_UMTS:
|
||||
return "umts";
|
||||
case OFONO_RADIO_ACCESS_MODE_LTE:
|
||||
return "lte";
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
|
@ -68,12 +68,12 @@ static int string_to_radio_access_mode(const char *mode)
|
|||
{
|
||||
if (g_strcmp0(mode, "any") == 0)
|
||||
return OFONO_RADIO_ACCESS_MODE_ANY;
|
||||
if (g_strcmp0(mode, "2g") == 0)
|
||||
return OFONO_RADIO_ACCESS_MODE_2G;
|
||||
if (g_strcmp0(mode, "3g") == 0)
|
||||
return OFONO_RADIO_ACCESS_MODE_3G;
|
||||
if (g_strcmp0(mode, "4g") == 0)
|
||||
return OFONO_RADIO_ACCESS_MODE_4G;
|
||||
if (g_strcmp0(mode, "gsm") == 0)
|
||||
return OFONO_RADIO_ACCESS_MODE_GSM;
|
||||
if (g_strcmp0(mode, "umts") == 0)
|
||||
return OFONO_RADIO_ACCESS_MODE_UMTS;
|
||||
if (g_strcmp0(mode, "lte") == 0)
|
||||
return OFONO_RADIO_ACCESS_MODE_LTE;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue