From 87bcfb30c7f3e2ee78c4dd7e759ee041d581132b Mon Sep 17 00:00:00 2001 From: Wootak Jung Date: Mon, 2 May 2016 10:09:10 +0900 Subject: [PATCH] Add APIs to set/get roam_pdp_protocol type Change-Id: I0d40c414f40c22992cc85b4208d00533d1f0bab5 --- include/co_context.h | 2 ++ packaging/libtcore.spec | 2 +- src/core_object/co_context.c | 29 +++++++++++++++++++++++++++++ 3 files changed, 32 insertions(+), 1 deletion(-) diff --git a/include/co_context.h b/include/co_context.h index 332f9b7..0f5ee4d 100644 --- a/include/co_context.h +++ b/include/co_context.h @@ -102,6 +102,8 @@ TReturn tcore_context_set_address(CoreObject *o, const char *addr); char *tcore_context_get_address(CoreObject *o); TReturn tcore_context_set_type(CoreObject *o, enum co_context_type type); enum co_context_type tcore_context_get_type(CoreObject *o); +TReturn tcore_context_set_roam_pdp_type(CoreObject *o, enum co_context_type type); +enum co_context_type tcore_context_get_roam_pdp_type(CoreObject *o); TReturn tcore_context_set_data_compression(CoreObject *o, enum co_context_d_comp comp); enum co_context_d_comp tcore_context_get_data_compression(CoreObject *o); TReturn tcore_context_set_header_compression(CoreObject *o, enum co_context_h_comp comp); diff --git a/packaging/libtcore.spec b/packaging/libtcore.spec index 48825fa..60af19c 100644 --- a/packaging/libtcore.spec +++ b/packaging/libtcore.spec @@ -1,6 +1,6 @@ %define major 0 %define minor 2 -%define patchlevel 96 +%define patchlevel 97 Name: libtcore Version: %{major}.%{minor}.%{patchlevel} diff --git a/src/core_object/co_context.c b/src/core_object/co_context.c index 3d3118c..e885478 100644 --- a/src/core_object/co_context.c +++ b/src/core_object/co_context.c @@ -41,6 +41,7 @@ struct private_object_data { char *apn; char *addr; enum co_context_type type; + enum co_context_type roam_pdp_type; enum co_context_d_comp d_comp; enum co_context_h_comp h_comp; enum co_context_tech tech_pref; @@ -308,6 +309,34 @@ enum co_context_type tcore_context_get_type(CoreObject *o) return po->type; } +TReturn tcore_context_set_roam_pdp_type(CoreObject *o, enum co_context_type roam_pdp_type) +{ + struct private_object_data *po = NULL; + + CORE_OBJECT_CHECK_RETURN(o, CORE_OBJECT_TYPE_PS_CONTEXT, TCORE_RETURN_EINVAL); + + po = tcore_object_ref_object(o); + if (!po) + return TCORE_RETURN_EINVAL; + + po->roam_pdp_type = roam_pdp_type; + + return TCORE_RETURN_SUCCESS; +} + +enum co_context_type tcore_context_get_roam_pdp_type(CoreObject *o) +{ + struct private_object_data *po = NULL; + + CORE_OBJECT_CHECK_RETURN(o, CORE_OBJECT_TYPE_PS_CONTEXT, 0); + + po = tcore_object_ref_object(o); + if (!po) + return 0; + + return po->roam_pdp_type; +} + TReturn tcore_context_set_data_compression(CoreObject *o, enum co_context_d_comp comp) { struct private_object_data *po = NULL; -- 2.7.4