summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTony Espy <espy@canonical.com>2015-10-13 18:07:50 +0200
committerDenis Kenzior <denkenz@gmail.com>2015-10-13 16:00:17 -0500
commitf2f279b28dbadfd50c306f73331d1db4eb95d899 (patch)
tree5f6931ba347708d9ebb5f2286344601fc5e53bdd /src
parentc575802491884b566daf2130edd329b91780901b (diff)
downloadofono-f2f279b28dbadfd50c306f73331d1db4eb95d899.tar.bz2
src: make bearer/operator enums public
Move enums for operator_status and packet_bearer to common.h to avoid duplication in drivers.
Diffstat (limited to 'src')
-rw-r--r--src/common.h20
-rw-r--r--src/gprs.c12
-rw-r--r--src/network.c8
3 files changed, 20 insertions, 20 deletions
diff --git a/src/common.h b/src/common.h
index eb006a74..ef4c58dc 100644
--- a/src/common.h
+++ b/src/common.h
@@ -41,6 +41,14 @@ enum network_registration_status {
NETWORK_REGISTRATION_STATUS_ROAMING = 5,
};
+/* 27.007 Section 7.3 <stat> */
+enum operator_status {
+ OPERATOR_STATUS_UNKNOWN = 0,
+ OPERATOR_STATUS_AVAILABLE = 1,
+ OPERATOR_STATUS_CURRENT = 2,
+ OPERATOR_STATUS_FORBIDDEN = 3,
+};
+
/* 27.007 Section 7.6 */
enum clip_validity {
CLIP_VALIDITY_VALID = 0,
@@ -48,6 +56,18 @@ enum clip_validity {
CLIP_VALIDITY_NOT_AVAILABLE = 2,
};
+/* 27.007 Section 7.29 */
+enum packet_bearer {
+ PACKET_BEARER_NONE = 0,
+ PACKET_BEARER_GPRS = 1,
+ PACKET_BEARER_EGPRS = 2,
+ PACKET_BEARER_UMTS = 3,
+ PACKET_BEARER_HSUPA = 4,
+ PACKET_BEARER_HSDPA = 5,
+ PACKET_BEARER_HSUPA_HSDPA = 6,
+ PACKET_BEARER_EPS = 7,
+};
+
/* 27.007 Section 7.30 */
enum cnap_validity {
CNAP_VALIDITY_VALID = 0,
diff --git a/src/gprs.c b/src/gprs.c
index ca243270..344915cf 100644
--- a/src/gprs.c
+++ b/src/gprs.c
@@ -58,18 +58,6 @@
#define MAX_CONTEXTS 256
#define SUSPEND_TIMEOUT 8
-/* 27.007 Section 7.29 */
-enum packet_bearer {
- PACKET_BEARER_NONE = 0,
- PACKET_BEARER_GPRS = 1,
- PACKET_BEARER_EGPRS = 2,
- PACKET_BEARER_UMTS = 3,
- PACKET_BEARER_HSUPA = 4,
- PACKET_BEARER_HSDPA = 5,
- PACKET_BEARER_HSUPA_HSDPA = 6,
- PACKET_BEARER_EPS = 7,
-};
-
struct ofono_gprs {
GSList *contexts;
ofono_bool_t attached;
diff --git a/src/network.c b/src/network.c
index d1bfca69..1dddcacf 100644
--- a/src/network.c
+++ b/src/network.c
@@ -50,14 +50,6 @@ enum network_registration_mode {
NETWORK_REGISTRATION_MODE_AUTO_ONLY = 5, /* Out of range of 27.007 */
};
-/* 27.007 Section 7.3 <stat> */
-enum operator_status {
- OPERATOR_STATUS_UNKNOWN = 0,
- OPERATOR_STATUS_AVAILABLE = 1,
- OPERATOR_STATUS_CURRENT = 2,
- OPERATOR_STATUS_FORBIDDEN = 3,
-};
-
struct ofono_netreg {
int status;
int location;