Transfer feature check logic to private header 75/72675/1 accepted/tizen/common/20160602.140249 accepted/tizen/ivi/20160602.230823 accepted/tizen/mobile/20160602.230843 accepted/tizen/tv/20160602.230815 accepted/tizen/wearable/20160602.230813 submit/tizen/20160602.064517
authorWootak Jung <wootak.jung@samsung.com>
Thu, 2 Jun 2016 05:49:55 +0000 (14:49 +0900)
committerWootak Jung <wootak.jung@samsung.com>
Thu, 2 Jun 2016 05:49:55 +0000 (14:49 +0900)
Change-Id: If19bb4f1cd8479e11d8cf43a802dca0097627d4d

13 files changed:
include/TapiUtility.h
src/tapi_call.c
src/tapi_common.c
src/tapi_modem.c
src/tapi_network.c
src/tapi_oem.c
src/tapi_phonebook.c
src/tapi_private.h [new file with mode: 0644]
src/tapi_sap.c
src/tapi_sat.c
src/tapi_sim.c
src/tapi_sms.c
src/tapi_ss.c

index c47f2e8115484029def31f05e53f31144be769d5..d1a555b78af8abbba0f9dfac76fb869e5fc7bfc4 100644 (file)
@@ -30,8 +30,6 @@
 #ifndef _TEL_UTILITY_H_
 #define _TEL_UTILITY_H_
 
-#include <system_info.h>
-
 __BEGIN_DECLS
 
 /**
@@ -125,34 +123,6 @@ typedef enum {
        TAPI_API_MISC_OUTPARAM_NULL = -803, /**< MISC output parameter NULL */
 } TapiResult_t;
 
-#define TELEPHONY_FEATURE "http://tizen.org/feature/network.telephony"
-
-#define TAPI_RET_ERR_NUM_IF_NOT_SUPPORTED(feature_name) { \
-       bool telephony_supported = FALSE; \
-       if (!system_info_get_platform_bool(feature_name, &telephony_supported)) { \
-               if (telephony_supported == FALSE) { \
-                       err("telephony feature is disabled"); \
-                       return TAPI_API_NOT_SUPPORTED; \
-               } \
-       } else { \
-               err("Error - Feature getting from System Info"); \
-               return TAPI_API_OPERATION_FAILED; \
-       } \
-}
-
-#define TAPI_RET_ERR_NULL_IF_NOT_SUPPORTED(feature_name) { \
-       bool telephony_supported = FALSE; \
-       if (!system_info_get_platform_bool(feature_name, &telephony_supported)) { \
-               if (telephony_supported == FALSE) { \
-                       err("telephony feature is disabled"); \
-                       return NULL; \
-               } \
-       } else { \
-               err("Error - Feature getting from System Info"); \
-               return NULL; \
-       } \
-}
-
 /**
  * @brief Checks the 'scalar_exp' for TRUE, if failed then it returns 'err_value' from the function.
  */
index 6adf5434d077ae17d52904533b7afe23884cc94b..62fd4ca2b19345a4702c2406803e466382fb718e 100644 (file)
@@ -29,6 +29,7 @@
 #include "common.h"
 #include "tapi_log.h"
 #include "ITapiCall.h"
+#include "tapi_private.h"
 
 static void on_response_call_dial(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
index 9fbd620829942b55e861c303110fbf0b8312c7e0..d51022c60d4f1bd7488e1d643e42cb93a20f1be9 100644 (file)
@@ -40,6 +40,7 @@
 
 #include "common.h"
 #include "tapi_log.h"
+#include "tapi_private.h"
 
 TelSatEventDownloadType_t g_event_list[TAPI_SAT_EVENT_LIST_MAX_COUNT] = {-1};
 static GSList *state_callback_list = NULL;
index 1e59d122d30a5a8143b49c2b59d2df8fc17ec43e..67549ee5a07adfbf001210efc1d2b475b9f29b90 100644 (file)
@@ -31,6 +31,7 @@
 
 #include "common.h"
 #include "tapi_log.h"
+#include "tapi_private.h"
 
 static void on_response_default_set(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
index 2ea914d7904393c6ddc6a662ff2abbef858db561..375d423cfa9fb999b512ad4790c09d55e2748fd5 100644 (file)
@@ -29,6 +29,7 @@
 #include "common.h"
 #include "tapi_log.h"
 #include "ITapiNetwork.h"
+#include "tapi_private.h"
 
 static int _convert_systemtype_to_act(int type)
 {
index 64036181e79b237d3a9c80d12db2b5a7a8209170..31159f889d1858894705d9ca7c9d11d91188decb 100644 (file)
@@ -29,6 +29,7 @@
 #include "tapi_log.h"
 #include "ITapiOem.h"
 #include "TelOem.h"
+#include "tapi_private.h"
 
 #define OEM_DATA_LEN_MAX       (10 * 1024)
 #define OEM_DEFAULT_TIMEOUT    (30 * 1000)
index 1460958925b93d0303226b2e99592140e9f75678..fe50a830537a1938606930a5b51d68bea1b34574 100644 (file)
@@ -30,6 +30,7 @@
 #include "common.h"
 #include "tapi_log.h"
 #include "ITapiPhonebook.h"
+#include "tapi_private.h"
 
 static void move_str(char *dest, unsigned int len, gchar *src)
 {
diff --git a/src/tapi_private.h b/src/tapi_private.h
new file mode 100644 (file)
index 0000000..d05ad9e
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * libtapi
+ *
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __TAPI_PRIVATE_H__
+#define __TAPI_PRIVATE_H__
+
+__BEGIN_DECLS
+
+#include <system_info.h>
+
+#define TELEPHONY_FEATURE "http://tizen.org/feature/network.telephony"
+
+#define TAPI_RET_ERR_NUM_IF_NOT_SUPPORTED(feature_name) { \
+       bool telephony_supported = FALSE; \
+       if (!system_info_get_platform_bool(feature_name, &telephony_supported)) { \
+               if (telephony_supported == FALSE) { \
+                       err("telephony feature is disabled"); \
+                       return TAPI_API_NOT_SUPPORTED; \
+               } \
+       } else { \
+               err("Error - Feature getting from System Info"); \
+               return TAPI_API_OPERATION_FAILED; \
+       } \
+}
+
+#define TAPI_RET_ERR_NULL_IF_NOT_SUPPORTED(feature_name) { \
+       bool telephony_supported = FALSE; \
+       if (!system_info_get_platform_bool(feature_name, &telephony_supported)) { \
+               if (telephony_supported == FALSE) { \
+                       err("telephony feature is disabled"); \
+                       return NULL; \
+               } \
+       } else { \
+               err("Error - Feature getting from System Info"); \
+               return NULL; \
+       } \
+}
+
+__END_DECLS
+
+#endif /* __TAPI_PRIVATE_H__ */
index 07799ac8cef54e03d7017b76ebaae8ff0e85a322..1b61fae2944b0ff880c7145a793550fbb2a96170 100644 (file)
@@ -30,6 +30,7 @@
 #include "common.h"
 #include "tapi_log.h"
 #include "ITapiSap.h"
+#include "tapi_private.h"
 
 /* LCOV_EXCL_START */
 static void on_response_sap_connect(GObject *source_object, GAsyncResult *res, gpointer user_data)
index c641ebdd178f4c900033664db94ba7bb0078ff49..ae1f6ae77f86856399edb1de45a79107fcbd66f1 100644 (file)
@@ -29,6 +29,7 @@
 #include "common.h"
 #include "tapi_log.h"
 #include "ITapiSat.h"
+#include "tapi_private.h"
 
 extern TelSatEventDownloadType_t g_event_list[TAPI_SAT_EVENT_LIST_MAX_COUNT];
 
index 93eade302492af3b030be3a7b2990c01ecf5cfe6..baa7c7d65913a0eff63a95d82b942abe97b58d72 100644 (file)
@@ -29,6 +29,7 @@
 #include "common.h"
 #include "tapi_log.h"
 #include "ITapiSim.h"
+#include "tapi_private.h"
 
 #define DBUS_SIM_STATUS_ERROR "SIM STATUS ERROR"
 #define DBUS_SIM_NOT_FOUND "SIM NOT FOUND"
index 740cd09db5f8820b0f9fa7c637e5327287a2977b..8ded66a6ef10e1ddaddaa56064a985de6a0b5c57 100644 (file)
@@ -29,6 +29,7 @@
 #include "common.h"
 #include "tapi_log.h"
 #include "ITapiNetText.h"
+#include "tapi_private.h"
 
 static void on_response_default(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
index 883ce76b5852a4bccdc96c411a00032fb2183969..851151dae1cacc9b25b7ebe4a89b9038d43e3162 100644 (file)
@@ -30,6 +30,7 @@
 #include "common.h"
 #include "tapi_log.h"
 #include "ITapiSs.h"
+#include "tapi_private.h"
 
 static void on_response_get_ss_barring_status(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {