So DUN server could share gprs_proto_to_string and gprs_proto_from_string. --- include/gprs-context.h | 3 +++ src/gprs.c | 5 ++--- 2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/include/gprs-context.h b/include/gprs-context.h index f4c7321..de170b8 100644 --- a/include/gprs-context.h +++ b/include/gprs-context.h @@ -84,6 +84,9 @@ void *ofono_gprs_context_get_data(struct ofono_gprs_context *gc); struct ofono_modem *ofono_gprs_context_get_modem(struct ofono_gprs_context *gc); +gboolean gprs_proto_from_string(const char *str, enum ofono_gprs_proto *proto); +const char *gprs_proto_to_string(enum ofono_gprs_proto proto); + #ifdef __cplusplus } #endif diff --git a/src/gprs.c b/src/gprs.c index 8d7fefc..f3f86ec 100644 --- a/src/gprs.c +++ b/src/gprs.c @@ -145,7 +145,7 @@ static enum gprs_context_type gprs_context_string_to_type(const char *str) return GPRS_CONTEXT_TYPE_INVALID; } -static const char *gprs_proto_to_string(enum ofono_gprs_proto proto) +const char *gprs_proto_to_string(enum ofono_gprs_proto proto) { switch (proto) { case OFONO_GPRS_PROTO_IP: @@ -157,8 +157,7 @@ static const char *gprs_proto_to_string(enum ofono_gprs_proto proto) return NULL; } -static gboolean gprs_proto_from_string(const char *str, - enum ofono_gprs_proto *proto) +gboolean gprs_proto_from_string(const char *str, enum ofono_gprs_proto *proto) { if (g_str_equal(str, "ip")) { *proto = OFONO_GPRS_PROTO_IP; -- 1.7.0.4 _______________________________________________ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono