Provide different rules to parse network registration and packet
service registration values. Data technologies do not make sense
for network registration, and will be added to ConnectionManager
in a later commit.
---
src/common.c | 19 +++++++++++++++++++
src/common.h | 1 +
2 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/src/common.c b/src/common.c
index 4d93488..817af45 100644
--- a/src/common.c
+++ b/src/common.c
@@ -694,6 +694,25 @@ const char *registration_tech_to_string(int tech)
{
switch (tech) {
case ACCESS_TECHNOLOGY_GSM:
+ case ACCESS_TECHNOLOGY_GSM_COMPACT:
+ case ACCESS_TECHNOLOGY_GSM_EGPRS:
+ return "gsm";
+ case ACCESS_TECHNOLOGY_UTRAN:
+ case ACCESS_TECHNOLOGY_UTRAN_HSDPA:
+ case ACCESS_TECHNOLOGY_UTRAN_HSUPA:
+ case ACCESS_TECHNOLOGY_UTRAN_HSDPA_HSUPA:
+ return "umts";
+ case ACCESS_TECHNOLOGY_EUTRAN:
+ return "lte";
+ default:
+ return "";
+ }
+}
+
+const char *data_tech_to_string(int tech)
+{
+ switch (tech) {
+ case ACCESS_TECHNOLOGY_GSM:
return "gsm";
case ACCESS_TECHNOLOGY_GSM_COMPACT:
return "gsm";
diff --git a/src/common.h b/src/common.h
index 64f297e..4509d48 100644
--- a/src/common.h
+++ b/src/common.h
@@ -158,5 +158,6 @@ gboolean is_valid_pin(const char *pin, enum pin_type type);
const char *registration_status_to_string(int status);
const char *registration_tech_to_string(int tech);
+const char *data_tech_to_string(int tech);
gboolean is_valid_apn(const char *apn);
--
1.7.1
_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono