diff mbox series

[01/14] include: Allow multiple context types

Message ID 20240119211017.474598-1-denkenz@gmail.com (mailing list archive)
State Accepted, archived
Headers show
Series [01/14] include: Allow multiple context types | expand

Commit Message

Denis Kenzior Jan. 19, 2024, 9:09 p.m. UTC
---
 include/gprs-context.h   | 8 ++++----
 include/gprs-provision.h | 4 +++-
 2 files changed, 7 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/include/gprs-context.h b/include/gprs-context.h
index 75958284..81055d89 100644
--- a/include/gprs-context.h
+++ b/include/gprs-context.h
@@ -33,10 +33,10 @@  struct ofono_modem;
 
 enum ofono_gprs_context_type {
 	OFONO_GPRS_CONTEXT_TYPE_ANY = 0,
-	OFONO_GPRS_CONTEXT_TYPE_INTERNET,
-	OFONO_GPRS_CONTEXT_TYPE_MMS,
-	OFONO_GPRS_CONTEXT_TYPE_WAP,
-	OFONO_GPRS_CONTEXT_TYPE_IMS,
+	OFONO_GPRS_CONTEXT_TYPE_INTERNET	= 0x0001,
+	OFONO_GPRS_CONTEXT_TYPE_MMS		= 0x0002,
+	OFONO_GPRS_CONTEXT_TYPE_WAP		= 0x0004,
+	OFONO_GPRS_CONTEXT_TYPE_IMS		= 0x0008,
 };
 
 struct ofono_gprs_primary_context {
diff --git a/include/gprs-provision.h b/include/gprs-provision.h
index 2dd792b5..75808e66 100644
--- a/include/gprs-provision.h
+++ b/include/gprs-provision.h
@@ -26,10 +26,12 @@ 
 extern "C" {
 #endif
 
+#include <stdint.h>
+
 #include "gprs-context.h"
 
 struct ofono_gprs_provision_data {
-	enum ofono_gprs_context_type type;
+	uint32_t type; /* Multiple types can be set in a bitmap */
 	enum ofono_gprs_proto proto;
 	char *name;
 	char *apn;