Add the base code for tcore HAL testcases 46/184046/4
authorsinikang <sinikang@samsung.com>
Fri, 13 Jul 2018 07:37:08 +0000 (16:37 +0900)
committersinikang <sinikang@samsung.com>
Mon, 16 Jul 2018 06:38:33 +0000 (15:38 +0900)
Change-Id: I5ccf2a8915a943dd89a94ae504d36e4a39cad5a7

45 files changed:
CMakeLists.txt
haltest/CMakeLists.txt [new file with mode: 0644]
haltest/tcore_hal_tc.cpp [new file with mode: 0644]
include/co_call.h [changed mode: 0644->0755]
include/co_context.h [changed mode: 0644->0755]
include/co_custom.h [changed mode: 0644->0755]
include/co_gps.h [changed mode: 0644->0755]
include/co_modem.h [changed mode: 0644->0755]
include/co_network.h [changed mode: 0644->0755]
include/co_phonebook.h [changed mode: 0644->0755]
include/co_ps.h [changed mode: 0644->0755]
include/co_sap.h [changed mode: 0644->0755]
include/co_sat.h [changed mode: 0644->0755]
include/co_sim.h [changed mode: 0644->0755]
include/co_sms.h [changed mode: 0644->0755]
include/co_ss.h [changed mode: 0644->0755]
include/communicator.h [changed mode: 0644->0755]
include/core_object.h [changed mode: 0644->0755]
include/hal.h [changed mode: 0644->0755]
include/internal/tcore_types.h [changed mode: 0644->0755]
include/log.h [changed mode: 0644->0755]
include/mux.h [changed mode: 0644->0755]
include/plugin.h [changed mode: 0644->0755]
include/queue.h [changed mode: 0644->0755]
include/server.h
include/storage.h [changed mode: 0644->0755]
include/tcore.h [changed mode: 0644->0755]
include/type/call.h [changed mode: 0644->0755]
include/type/common.h [changed mode: 0644->0755]
include/type/gps.h [changed mode: 0644->0755]
include/type/modem.h [changed mode: 0644->0755]
include/type/network.h [changed mode: 0644->0755]
include/type/notification.h [changed mode: 0644->0755]
include/type/phonebook.h [changed mode: 0644->0755]
include/type/ps.h [changed mode: 0644->0755]
include/type/request.h [changed mode: 0644->0755]
include/type/response.h [changed mode: 0644->0755]
include/type/sat.h [changed mode: 0644->0755]
include/type/sim.h [changed mode: 0644->0755]
include/type/sms.h [changed mode: 0644->0755]
include/type/sound.h [changed mode: 0644->0755]
include/type/ss.h [changed mode: 0644->0755]
include/user_request.h [changed mode: 0644->0755]
include/util.h [changed mode: 0644->0755]
packaging/libtcore.spec

index a4c43fc..72243c6 100644 (file)
@@ -1,7 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-PROJECT(libtcore C)
-
-#INCLUDE(FindPkgConfig)
+PROJECT(libtcore C CXX)
 
 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
 SET(EXEC_PREFIX "\${prefix}")
@@ -10,14 +8,24 @@ SET(INCLUDEDIR "\${prefix}/include")
 
 # Set required packages
 INCLUDE(FindPkgConfig)
-pkg_check_modules(pkgs REQUIRED glib-2.0 libtzplatform-config)
+pkg_check_modules(pkgs REQUIRED glib-2.0 gobject-2.0 libtzplatform-config)
 
 FOREACH(flag ${pkgs_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
 ENDFOREACH(flag)
 
+INCLUDE_DIRECTORIES(
+               ${CMAKE_SOURCE_DIR}/include
+               ${CMAKE_SOURCE_DIR}/include/internal
+               ${CMAKE_SOURCE_DIR}/include/type
+)
+
 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I${CMAKE_SOURCE_DIR}/include ${EXTRA_CFLAGS} -Werror -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wdeclaration-after-statement -Wmissing-declarations -Wredundant-decls -Wcast-align -O2 -Wall  -Wno-array-bounds -Wno-empty-body -Wno-ignored-qualifiers -Wshadow -Wwrite-strings -Wswitch-default -Wno-unused-but-set-variable")
 
+# -fvisibility option should be "default" to call internal functions
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=default -fPIC -Wno-unused-function -fprofile-arcs -ftest-coverage")
+ADD_DEFINITIONS("-DTCORE_HAL_TEST")
+
 ADD_DEFINITIONS("-DFEATURE_TLOG_DEBUG")
 ADD_DEFINITIONS("-DTCORE_LOG_TAG=\"TCORE\"")
 #ADD_DEFINITIONS("-DTCORE_HAL_DEBUG")
@@ -65,7 +73,7 @@ SET(SRCS
 
 # library build
 ADD_LIBRARY(tcore SHARED ${SRCS})
-TARGET_LINK_LIBRARIES(tcore ${pkgs_LDFLAGS})
+TARGET_LINK_LIBRARIES(tcore ${pkgs_LDFLAGS} -ldl -lgcov)
 SET_TARGET_PROPERTIES(tcore PROPERTIES VERSION 0.0.0 SOVERSION 0 OUTPUT_NAME tcore)
 
 # pkgconfig file
@@ -77,6 +85,11 @@ CONFIGURE_FILE(tcore.pc.in tcore.pc @ONLY)
 INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/ DESTINATION include/tcore)
 INSTALL(TARGETS tcore
                LIBRARY DESTINATION ${LIBDIR})
+# adding for HAL test support
+INSTALL(TARGETS tcore DESTINATION ${LIBDIR} COMPONENT RuntimeLibraries)
 INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/tcore.pc DESTINATION ${LIBDIR}/pkgconfig)
 
+#HAL test pkg build
+ADD_SUBDIRECTORY(haltest)
+
 #ADD_SUBDIRECTORY(unit-test)
diff --git a/haltest/CMakeLists.txt b/haltest/CMakeLists.txt
new file mode 100644 (file)
index 0000000..37a3fe4
--- /dev/null
@@ -0,0 +1,21 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT(tcore_hal_tc C CXX)
+
+SET(HAL_TEST "tcore_hal_tc")
+ADD_DEFINITIONS("-DUSE_DLOG")
+
+INCLUDE(FindPkgConfig)
+pkg_check_modules(hal_test_pkgs REQUIRED glib-2.0 gmock dlog)
+
+FOREACH(flag ${hal_test_pkgs_CFLAGS})
+       SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}")
+ENDFOREACH(flag)
+
+SET(HAL_TEST_SRCS tcore_hal_tc.cpp)
+ADD_EXECUTABLE(${HAL_TEST} ${HAL_TEST_SRCS} )
+TARGET_LINK_LIBRARIES(${HAL_TEST}
+                                       ${hal_test_pkgs_LDFLAGS}
+                                       -L${CMAKE_SOURCE_DIR} tcore
+                                       )
+
+INSTALL(TARGETS ${HAL_TEST} DESTINATION /usr/bin)
diff --git a/haltest/tcore_hal_tc.cpp b/haltest/tcore_hal_tc.cpp
new file mode 100644 (file)
index 0000000..92e1a8d
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2014 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.
+ */
+
+#include <gmock/gmock.h>
+#include <gtest/gtest.h>
+#include <unistd.h>
+#include <iostream>
+#include <stdio.h>
+#include <glib.h>
+#include <sys/time.h>
+
+#include <tcore.h>
+#include <server.h>
+
+static Server *tcore_running_server;
+
+using ::testing::EmptyTestEventListener;
+using ::testing::InitGoogleTest;
+using ::testing::Test;
+using ::testing::TestCase;
+using ::testing::TestEventListeners;
+using ::testing::TestInfo;
+using ::testing::TestPartResult;
+using ::testing::UnitTest;
+
+void tcore_log(enum tcore_log_type type, enum tcore_log_priority priority, const char *tag, const char *fmt, ...)
+{
+}
+
+TEST(LIBTCORE_COMMON, tcore_server_get_modems_count)
+{
+       gint modem_count = 1;
+       //modem_count = tcore_server_get_modems_count(tcore_running_server);
+       ASSERT_TRUE(modem_count > 0);
+}
+
+int main(int argc, char **argv) {
+  InitGoogleTest(&argc, argv);
+
+  return RUN_ALL_TESTS();
+}
old mode 100644 (file)
new mode 100755 (executable)
index a958b9c..1053c94
 #ifndef __TCORE_CO_CALL_H__
 #define __TCORE_CO_CALL_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include <core_object.h>
 
 __BEGIN_DECLS
@@ -333,4 +337,8 @@ void tcore_call_information_set_operations(CoreObject *o, struct tcore_call_info
 
 __END_DECLS
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __TCORE_CO_CALL_H__ */
old mode 100644 (file)
new mode 100755 (executable)
index 21c27f6..8fa8af8
 #ifndef __TCORE_CO_CONTEXT_H__
 #define __TCORE_CO_CONTEXT_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include <core_object.h>
 
 __BEGIN_DECLS
@@ -186,4 +190,8 @@ int tcore_context_get_deact_reason(CoreObject *o);
 
 __END_DECLS
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __TCORE_CO_CONTEXT_H__ */
old mode 100644 (file)
new mode 100755 (executable)
index e590297..844a449
 #ifndef __TCORE_CO_CUSTOM_H__
 #define __TCORE_CO_CUSTOM_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 __BEGIN_DECLS
 
 typedef void *tcore_custom_operations;
@@ -32,4 +36,8 @@ void tcore_custom_free(CoreObject *co);
 
 __END_DECLS
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __TCORE_CO_CUSTOM_H__ */
old mode 100644 (file)
new mode 100755 (executable)
index e5254ce..90192c7
 #ifndef __TCORE_CO_GPS_H__
 #define __TCORE_CO_GPS_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include <core_object.h>
 
 __BEGIN_DECLS
@@ -43,4 +47,8 @@ void tcore_gps_set_ops(CoreObject *o, struct tcore_gps_operations *ops, enum tco
 
 __END_DECLS
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
old mode 100644 (file)
new mode 100755 (executable)
index 2dc288b..1c2fb6c
 #ifndef __TCORE_CO_MODEM_H__
 #define __TCORE_CO_MODEM_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include <core_object.h>
 
 __BEGIN_DECLS
@@ -57,4 +61,8 @@ TReturn tcore_modem_get_modem_power_state(CoreObject *o, enum modem_state *modem
 
 __END_DECLS
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __TCORE_CO_MODEM_H__ */
old mode 100644 (file)
new mode 100755 (executable)
index af0e705..ea450be
 #ifndef __TCORE_CO_NETWORK_H__
 #define __TCORE_CO_NETWORK_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include <core_object.h>
 
 __BEGIN_DECLS
@@ -216,4 +220,8 @@ void tcore_network_update_mcc_mnc_oper_list_db(TcorePlugin *p, const char *mcc,
 
 __END_DECLS
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __TCORE_CO_NETWORK_H__ */
old mode 100644 (file)
new mode 100755 (executable)
index 2f25d44..a03c67e
 #ifndef __TCORE_CO_PHONEBOOK_H__
 #define __TCORE_CO_PHONEBOOK_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include <core_object.h>
 
 __BEGIN_DECLS
@@ -53,4 +57,8 @@ gboolean tcore_phonebook_set_selected_type(CoreObject *o, enum tel_phonebook_typ
 
 __END_DECLS
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __TCORE_CO_PHONEBOOK_H__ */
old mode 100644 (file)
new mode 100755 (executable)
index be9de43..0edba28
 #ifndef __TCORE_CO_PS_H__
 #define __TCORE_CO_PS_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include <core_object.h>
 #include <co_context.h>
 
@@ -82,4 +86,8 @@ TReturn tcore_ps_set_attach_request(CoreObject *o, gint attach_req_info);
 
 __END_DECLS
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __TCORE_CO_PS_H__ */
old mode 100644 (file)
new mode 100755 (executable)
index 5313969..9d2286f
 #ifndef __TCORE_CO_SAP_H__
 #define __TCORE_CO_SAP_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include <core_object.h>
 
 __BEGIN_DECLS
@@ -42,4 +46,8 @@ void tcore_sap_set_ops(CoreObject *o, struct tcore_sap_operations *ops, enum tco
 
 __END_DECLS
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __TCORE_CO_SAP_H__ */
old mode 100644 (file)
new mode 100755 (executable)
index e47ba55..0a57e1b
 #ifndef __TCORE_CO_SAT_H__
 #define __TCORE_CO_SAT_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include <core_object.h>
 
 enum tcore_sat_result{
@@ -81,4 +85,8 @@ void tcore_sat_free(CoreObject *n);
 
 void tcore_sat_set_ops(CoreObject *o, struct tcore_sat_operations *ops, enum tcore_ops_type ops_type);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __TCORE_CO_SAT_H__ */
old mode 100644 (file)
new mode 100755 (executable)
index 0a8b02c..daf36a2
 #ifndef __TCORE_CO_SIM_H__
 #define __TCORE_CO_SIM_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include <core_object.h>
 
 __BEGIN_DECLS
@@ -183,4 +187,8 @@ gboolean tcore_sim_decode_ef_info(struct tcore_sim_ef_info *p_ef_info, CoreObjec
 
 __END_DECLS
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __TCORE_CO_SIM_H__ */
old mode 100644 (file)
new mode 100755 (executable)
index 97f248e..d6c5e2d
 #ifndef __TCORE_CO_SMS_H__
 #define __TCORE_CO_SMS_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include <core_object.h>
 
 __BEGIN_DECLS
@@ -99,4 +103,8 @@ enum tcore_sms_routing_policy tcore_sms_get_sms_routing(CoreObject *o);
 
 __END_DECLS
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __TCORE_CO_SMS_H__ */
old mode 100644 (file)
new mode 100755 (executable)
index 807936d..055234d
 #ifndef __TCORE_CO_SS_H__
 #define __TCORE_CO_SS_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include <core_object.h>
 
 __BEGIN_DECLS
@@ -210,4 +214,8 @@ enum tcore_ss_routing_policy tcore_ss_get_ss_routing(CoreObject *o);
 
 __END_DECLS
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __TCORE_CO_SS_H__ */
old mode 100644 (file)
new mode 100755 (executable)
index 5c26147..41cf704
 #ifndef __TCORE_COMMUNICATOR_H__
 #define __TCORE_COMMUNICATOR_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 __BEGIN_DECLS
 
 struct tcore_communicator_operations {
@@ -55,4 +59,8 @@ TReturn tcore_communicator_dispatch_request(Communicator *comm, UserRequest *ur)
 
 __END_DECLS
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __TCORE_COMMUNICATOR_H__ */
old mode 100644 (file)
new mode 100755 (executable)
index 8078bcd..b30536f
 #ifndef __TCORE_CORE_OBJECT_H__
 #define __TCORE_CORE_OBJECT_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 __BEGIN_DECLS
 
 #define CORE_OBJECT_TYPE_DEFAULT       0xB0000000
@@ -173,4 +177,8 @@ void tcore_object_deinit_objects(TcorePlugin *plugin,
 
 __END_DECLS
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __TCORE_CORE_OBJECT_H__ */
old mode 100644 (file)
new mode 100755 (executable)
index 99bcf85..e0a0bbd
 #ifndef __TCORE_HAL_H__
 #define __TCORE_HAL_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 __BEGIN_DECLS
 
 typedef void (*TcoreHalReceiveCallback)(TcoreHal *hal, unsigned int data_len, const void *data, void *user_data);
@@ -104,4 +108,8 @@ TReturn tcore_hal_reset(TcoreHal *hal, int option);
 
 __END_DECLS
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __TCORE_HAL_H__ */
old mode 100644 (file)
new mode 100755 (executable)
index 153dc5e..47b1c34
 #ifndef __TCORE_TYPES_H__
 #define __TCORE_TYPES_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define tcore_check_null_ret_err(name, value, err) do { \
        if ( !value ) { \
                dbg("[error] %s : NULL", name ); \
@@ -35,4 +39,8 @@
        } \
 } while (FALSE)
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __TCORE_TYPES_H__ */
old mode 100644 (file)
new mode 100755 (executable)
index edbce0a..aa6bf1e
 #ifndef __TCORE_LOG_H__
 #define __TCORE_LOG_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 __BEGIN_DECLS
 
 #include <glib.h>
@@ -129,4 +133,8 @@ void tcore_log(enum tcore_log_type type, enum tcore_log_priority priority, const
 
 __END_DECLS
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
old mode 100644 (file)
new mode 100755 (executable)
index 6a036f6..b2144b3
 #ifndef __MUX_H__
 #define __MUX_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include "queue.h"
 
 /* CMUX modes */
@@ -62,4 +66,8 @@ void tcore_cmux_close(TcoreHal *phy_hal,
 /* HAL Receive for Internal CMUX */
 void tcore_cmux_rcv_from_hal(TcoreHal *hal, unsigned char *data, size_t length);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif  /* __MUX_H__ */
old mode 100644 (file)
new mode 100755 (executable)
index 4129bf6..ac5e409
 #ifndef __TCORE_PLUGIN_H__
 #define __TCORE_PLUGIN_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 __BEGIN_DECLS
 
 enum tcore_plugin_priority {
@@ -68,4 +72,8 @@ void *tcore_plugin_ref_property(TcorePlugin *plugin, const char *key);
 
 __END_DECLS
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __TCORE_PLUGIN_H__ */
old mode 100644 (file)
new mode 100755 (executable)
index 856afd9..b02af23
 #ifndef __TCORE_QUEUE_H__
 #define __TCORE_QUEUE_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 __BEGIN_DECLS
 
 typedef void(*TcorePendingSendCallback)(TcorePending *p, gboolean result,
@@ -98,4 +102,8 @@ TcorePending* tcore_queue_search_by_command(TcoreQueue *queue, enum tcore_reques
 
 __END_DECLS
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
index 2643331..3cd08af 100644 (file)
 #ifndef __TCORE_SERVER_H__
 #define __TCORE_SERVER_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 __BEGIN_DECLS
 
+
 typedef enum tcore_hook_return (*TcoreServerRequestHook)(Server *s,
        UserRequest *ur, void *user_data);
 typedef enum tcore_hook_return (*TcoreServerNotificationHook)(Server *s,
@@ -99,4 +104,8 @@ gint tcore_server_get_modems_count(Server *s);
 
 __END_DECLS
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __TCORE_SERVER_H__ */
old mode 100644 (file)
new mode 100755 (executable)
index f487583..0379b99
 #ifndef __TCORE_STORAGE_H__
 #define __TCORE_STORAGE_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 __BEGIN_DECLS
 
 #define STORAGE_KEY_INT                0x01000000
@@ -198,4 +202,8 @@ gboolean tcore_storage_remove_query_database(Storage *strg, void *handle,
 
 __END_DECLS
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __TCORE_STORAGE_H__ */
old mode 100644 (file)
new mode 100755 (executable)
index b9dd8be..62d8b71
 #ifndef __TCORE_H__
 #define __TCORE_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include <sys/types.h>
 #include <stdint.h>
 
@@ -79,4 +83,8 @@ enum tcore_ops_type {
        TCORE_OPS_TYPE_MAX
 };
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __TCORE_H__ */
old mode 100644 (file)
new mode 100755 (executable)
index 8c1f8ca..77406c1
 #ifndef __TYPE_CALL_H__
 #define __TYPE_CALL_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 __BEGIN_DECLS
 
 #include <glib.h>
@@ -1129,4 +1133,8 @@ struct tnoti_call_info_modifiable{
 
 __END_DECLS
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
old mode 100644 (file)
new mode 100755 (executable)
index 163bde6..ee6d47b
 #ifndef __TYPE_COMMON_H__
 #define __TYPE_COMMON_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include <errno.h>
 
 #define TCORE_REQUEST        0x10000000
@@ -103,4 +107,8 @@ typedef enum tcore_return TReturn;
 
 __END_DECLS
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
old mode 100644 (file)
new mode 100755 (executable)
index 352775e..3001e0e
 #ifndef __TYPE_GPS_H__
 #define __TYPE_GPS_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 __BEGIN_DECLS
 
 #define SMART_ASSISTANT_AREA_LIST_MAX 10
@@ -69,4 +73,8 @@ struct tnoti_smart_assistant_sync_status {
 
 __END_DECLS
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
old mode 100644 (file)
new mode 100755 (executable)
index e8d79a2..f5270ef
 #ifndef __TYPE_MODEM_H__
 #define __TYPE_MODEM_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 __BEGIN_DECLS
 
 #define MODEM_DEVICE_SN_LEN_MAX 13
@@ -189,4 +193,8 @@ struct tnoti_modem_always_on {
 
 __END_DECLS
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
old mode 100644 (file)
new mode 100755 (executable)
index e7fa04b..16f7807
 #ifndef __TYPE_NETWORK_H__
 #define __TYPE_NETWORK_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 __BEGIN_DECLS
 
 #define NETWORK_MAX_MCC_LEN            3
@@ -724,4 +728,8 @@ struct tnoti_network_epdg_status {
 
 __END_DECLS
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
old mode 100644 (file)
new mode 100755 (executable)
index 708308d..0752d74
 #ifndef __TYPE_NOTIFICATION_H__
 #define __TYPE_NOTIFICATION_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include <type/common.h>
 
 __BEGIN_DECLS
@@ -220,4 +224,8 @@ struct tnoti_server_exit {
 
 __END_DECLS
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
old mode 100644 (file)
new mode 100755 (executable)
index ea1f2e6..069d351
 #ifndef __TYPE_PHONEBOOK_H__
 #define __TYPE_PHONEBOOK_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 __BEGIN_DECLS
 
 #include <glib.h>
@@ -247,5 +251,9 @@ struct tnoti_phonebook_contact_change {
 };
 __END_DECLS
 
+#ifdef __cplusplus
+}
+#endif
+
 
 #endif
old mode 100644 (file)
new mode 100755 (executable)
index 7697085..dabb615
 #ifndef __TYPE_PS_H__
 #define __TYPE_PS_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 __BEGIN_DECLS
 
 #define IPV6_ADDR_LEN 16
@@ -197,4 +201,8 @@ struct tnoti_ps_dedicated_bearer_info {
 };
 __END_DECLS
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
old mode 100644 (file)
new mode 100755 (executable)
index 843cd15..77c9dc3
 #ifndef __TYPE_REQUEST_H__
 #define __TYPE_REQUEST_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include <type/common.h>
 
 __BEGIN_DECLS
@@ -254,4 +258,8 @@ struct treq_server_get_plugins {
 
 __END_DECLS
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
old mode 100644 (file)
new mode 100755 (executable)
index 60f2e62..ced42cc
 #ifndef __TYPE_RESPONSE_H__
 #define __TYPE_RESPONSE_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include <type/common.h>
 
 __BEGIN_DECLS
@@ -242,4 +246,8 @@ enum tcore_response_command {
 
 __END_DECLS
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
old mode 100644 (file)
new mode 100755 (executable)
index f482b97..70e1645
 #ifndef __TYPE_SAT_H__
 #define __TYPE_SAT_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 __BEGIN_DECLS
 
 #include <glib.h>
@@ -1878,4 +1882,8 @@ struct tnoti_sat_mo_sm_control_result_ind{
 
 __END_DECLS
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
old mode 100644 (file)
new mode 100755 (executable)
index eeffe16..64e7e16
 #ifndef __TYPE_SIM_H__
 #define __TYPE_SIM_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 __BEGIN_DECLS
 
 #include <glib.h>
@@ -1372,4 +1376,8 @@ struct tnoti_sim_refresh_stage {
 
 __END_DECLS
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
old mode 100644 (file)
new mode 100755 (executable)
index 8c6394e..d8908f1
 #ifndef __TYPE_SMS_H__
 #define __TYPE_SMS_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 __BEGIN_DECLS
 
 /*
@@ -563,5 +567,9 @@ struct tnoti_sms_format_change {
 
 __END_DECLS
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
 
old mode 100644 (file)
new mode 100755 (executable)
index b9a66d6..55cd273
 #ifndef __TYPE_SOUND_H__
 #define __TYPE_SOUND_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 __BEGIN_DECLS
 
 #include <glib.h>
@@ -87,4 +91,8 @@ struct treq_sound_get_volume_level {
 
 __END_DECLS
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
old mode 100644 (file)
new mode 100755 (executable)
index edb2fb8..2142db4
 #ifndef __TYPE_SS_H__
 #define __TYPE_SS_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 __BEGIN_DECLS
 
 #include <glib.h>
@@ -421,4 +425,8 @@ struct tnoti_ss_information {
 
 __END_DECLS
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
old mode 100644 (file)
new mode 100755 (executable)
index 6a65e41..9e9bc8b
 #ifndef __TCORE_USER_REQUEST_H__
 #define __TCORE_USER_REQUEST_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 __BEGIN_DECLS
 
 typedef void (*UserRequestFreeHook)(UserRequest *ur);
@@ -66,4 +70,8 @@ const void *tcore_user_request_ref_metainfo(UserRequest *ur,
 
 __END_DECLS
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __TCORE_USER_REQUEST_H__ */
old mode 100644 (file)
new mode 100755 (executable)
index a60845f..5f3c7de
 #ifndef __TCORE_UTIL_H__
 #define __TCORE_UTIL_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include <glib-object.h>
 
 __BEGIN_DECLS
@@ -118,4 +122,8 @@ gboolean tcore_util_convert_ipv4_secure_log(gchar *input, gchar *output, int out
 gboolean tcore_util_convert_ipv6_secure_log(gchar *input, gchar *output, int output_len);
 __END_DECLS
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __TCORE_UTIL_H__ */
index ccde8f1..ca65543 100644 (file)
@@ -1,6 +1,6 @@
 %define major 0
 %define minor 3
-%define patchlevel 24
+%define patchlevel 25
 
 Name:           libtcore
 Version:        %{major}.%{minor}.%{patchlevel}
@@ -11,7 +11,10 @@ Group:          System/Libraries
 Source0:        libtcore-%{version}.tar.gz
 BuildRequires:  cmake
 BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires: pkgconfig(gobject-2.0)
 BuildRequires:  pkgconfig(libtzplatform-config)
+BuildRequires: pkgconfig(dlog)
+BuildRequires: pkgconfig(gmock)
 Requires(post): /sbin/ldconfig
 Requires(postun): /sbin/ldconfig
 
@@ -26,6 +29,12 @@ Requires:       %{name} = %{version}
 %description devel
 Telephony-core library (Development)
 
+%package haltests
+Summary:        libtcore extension for HAL test
+Requires:       %{name} = %{version}-%{release}
+%description haltests
+libtcore extension for HAL test.
+
 %prep
 %setup -q
 
@@ -59,3 +68,7 @@ make %{?_smp_mflags}
 %{_libdir}/pkgconfig/tcore.pc
 %{_libdir}/*.so
 
+%files haltests
+%manifest libtcore.manifest
+%{_bindir}/tcore_hal_tc
+%{_libdir}/*.so