summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2010-03-25 10:42:48 -0500
committerDenis Kenzior <denkenz@gmail.com>2010-03-25 10:42:48 -0500
commit538cd6a1cb603c607fb31c9366e98165e0addb9d (patch)
treea8eabf5c46b7bf16c95892b9a4c678899649f0b5
parent77693b697d1796f67f998b8bba0542398f5079f9 (diff)
downloadofono-538cd6a1cb603c607fb31c9366e98165e0addb9d.tar.bz2
Refactor: Rename radio setting type names
-rw-r--r--doc/radio-settings-api.txt14
-rw-r--r--include/radio-settings.h8
-rw-r--r--src/radio-settings.c24
3 files changed, 23 insertions, 23 deletions
diff --git a/doc/radio-settings-api.txt b/doc/radio-settings-api.txt
index cd64ad64..3372abd7 100644
--- a/doc/radio-settings-api.txt
+++ b/doc/radio-settings-api.txt
@@ -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.
diff --git a/include/radio-settings.h b/include/radio-settings.h
index 2575f9bb..d41ec0b3 100644
--- a/include/radio-settings.h
+++ b/include/radio-settings.h
@@ -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;
diff --git a/src/radio-settings.c b/src/radio-settings.c
index 93c645a5..f70d870b 100644
--- a/src/radio-settings.c
+++ b/src/radio-settings.c
@@ -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;
}