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.
|
as network preference.
|
||||||
|
|
||||||
The possible values are:
|
The possible values are:
|
||||||
"any" Radio access technology
|
"any" Radio access technology
|
||||||
selection is done automatically,
|
selection is done automatically,
|
||||||
based on reception and
|
based on reception and
|
||||||
availability.
|
availability.
|
||||||
"2g" Only GSM used for radio access.
|
"gsm" Only GSM used for radio access.
|
||||||
"3g" Only UMTS used for radio access.
|
"umts" Only UMTS used for radio access.
|
||||||
"4g" Only LTE used for radio acccess.
|
"lte" Only LTE used for radio acccess.
|
||||||
|
|
|
@ -29,10 +29,10 @@ extern "C" {
|
||||||
#include <ofono/types.h>
|
#include <ofono/types.h>
|
||||||
|
|
||||||
enum ofono_radio_access_mode {
|
enum ofono_radio_access_mode {
|
||||||
OFONO_RADIO_ACCESS_MODE_ANY = 0,
|
OFONO_RADIO_ACCESS_MODE_ANY = 0,
|
||||||
OFONO_RADIO_ACCESS_MODE_2G = 1,
|
OFONO_RADIO_ACCESS_MODE_GSM = 1,
|
||||||
OFONO_RADIO_ACCESS_MODE_3G = 2,
|
OFONO_RADIO_ACCESS_MODE_UMTS = 2,
|
||||||
OFONO_RADIO_ACCESS_MODE_4G = 3,
|
OFONO_RADIO_ACCESS_MODE_LTE = 3,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ofono_radio_settings;
|
struct ofono_radio_settings;
|
||||||
|
|
|
@ -52,12 +52,12 @@ static const char *radio_access_mode_to_string(enum ofono_radio_access_mode mode
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case OFONO_RADIO_ACCESS_MODE_ANY:
|
case OFONO_RADIO_ACCESS_MODE_ANY:
|
||||||
return "any";
|
return "any";
|
||||||
case OFONO_RADIO_ACCESS_MODE_2G:
|
case OFONO_RADIO_ACCESS_MODE_GSM:
|
||||||
return "2g";
|
return "gsm";
|
||||||
case OFONO_RADIO_ACCESS_MODE_3G:
|
case OFONO_RADIO_ACCESS_MODE_UMTS:
|
||||||
return "3g";
|
return "umts";
|
||||||
case OFONO_RADIO_ACCESS_MODE_4G:
|
case OFONO_RADIO_ACCESS_MODE_LTE:
|
||||||
return "4g";
|
return "lte";
|
||||||
default:
|
default:
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
@ -68,12 +68,12 @@ static int string_to_radio_access_mode(const char *mode)
|
||||||
{
|
{
|
||||||
if (g_strcmp0(mode, "any") == 0)
|
if (g_strcmp0(mode, "any") == 0)
|
||||||
return OFONO_RADIO_ACCESS_MODE_ANY;
|
return OFONO_RADIO_ACCESS_MODE_ANY;
|
||||||
if (g_strcmp0(mode, "2g") == 0)
|
if (g_strcmp0(mode, "gsm") == 0)
|
||||||
return OFONO_RADIO_ACCESS_MODE_2G;
|
return OFONO_RADIO_ACCESS_MODE_GSM;
|
||||||
if (g_strcmp0(mode, "3g") == 0)
|
if (g_strcmp0(mode, "umts") == 0)
|
||||||
return OFONO_RADIO_ACCESS_MODE_3G;
|
return OFONO_RADIO_ACCESS_MODE_UMTS;
|
||||||
if (g_strcmp0(mode, "4g") == 0)
|
if (g_strcmp0(mode, "lte") == 0)
|
||||||
return OFONO_RADIO_ACCESS_MODE_4G;
|
return OFONO_RADIO_ACCESS_MODE_LTE;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue