Add APIs to set/get roam_pdp_protocol type 30/68030/1
authorWootak Jung <wootak.jung@samsung.com>
Mon, 2 May 2016 01:09:10 +0000 (10:09 +0900)
committerWootak Jung <wootak.jung@samsung.com>
Mon, 2 May 2016 01:09:10 +0000 (10:09 +0900)
Change-Id: I0d40c414f40c22992cc85b4208d00533d1f0bab5

include/co_context.h
packaging/libtcore.spec
src/core_object/co_context.c

index 332f9b7..0f5ee4d 100644 (file)
@@ -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);
index 48825fa..60af19c 100644 (file)
@@ -1,6 +1,6 @@
 %define major 0
 %define minor 2
-%define patchlevel 96
+%define patchlevel 97
 
 Name:           libtcore
 Version:        %{major}.%{minor}.%{patchlevel}
index 3d3118c..e885478 100644 (file)
@@ -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;