Enable to import the contact / calender service 75/230575/1
authorDoHyun Pyun <dh79.pyun@samsung.com>
Mon, 13 Apr 2020 00:02:54 +0000 (09:02 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Mon, 13 Apr 2020 00:02:54 +0000 (09:02 +0900)
Change-Id: I6523a7a484a1b6cece78421f98eaffd4857bd9aa
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
bt-share/CMakeLists.txt
bt-share/src/obex-event-handler.c
packaging/bluetooth-share.spec

index 2d8625e..516cd6c 100644 (file)
@@ -26,11 +26,11 @@ pkg_check_modules(pkgs REQUIRED glib-2.0 bluetooth-api
                                libtzplatform-config eventsystem
                                cynara-creds-dbus cynara-client cynara-session
                                storage db-util libsystemd-login)
-#pkg_check_modules(CALENDAR_SERVICE2 calendar-service2)
-#pkg_check_modules(CONTACTS_SERVICE2 contacts-service2 zlib)
+pkg_check_modules(CALENDAR_SERVICE2 calendar-service2)
+pkg_check_modules(CONTACTS_SERVICE2 contacts-service2 zlib)
 
-#FOREACH(flag ${pkgs_CFLAGS} ${CALENDAR_SERVICE2_CFLAGS} ${CONTACTS_SERVICE2_CFLAGS})
-FOREACH(flag ${pkgs_CFLAGS})
+#FOREACH(flag ${pkgs_CFLAGS})
+FOREACH(flag ${pkgs_CFLAGS} ${CALENDAR_SERVICE2_CFLAGS} ${CONTACTS_SERVICE2_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
 ENDFOREACH(flag)
 #SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -finstrument-functions")
@@ -55,8 +55,8 @@ ADD_DEFINITIONS("-DSLP_DEBUG")
 
 ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
 
-#TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS} ${CALENDAR_SERVICE2_LDFLAGS} ${CONTACTS_SERVICE2_LDFLAGS} -L${CMAKE_CURRENT_SOURCE_DIR}/../lib -lbluetooth-share-api)
-TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS} -L${CMAKE_CURRENT_SOURCE_DIR}/../lib -lbluetooth-share-api)
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS} ${CALENDAR_SERVICE2_LDFLAGS} ${CONTACTS_SERVICE2_LDFLAGS} -L${CMAKE_CURRENT_SOURCE_DIR}/../lib -lbluetooth-share-api)
+#TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS} -L${CMAKE_CURRENT_SOURCE_DIR}/../lib -lbluetooth-share-api)
 
 IF (BUILD_GTESTS)
 # -fvisibility option should be "default" to call internal functions
index 285dc96..b309639 100644 (file)
@@ -340,6 +340,7 @@ void __bt_update_db_with_noti_id(bt_tr_db_table_e table, notification_h noti,
 /* LCOV_EXCL_STOP */
 
 #ifdef ENABLE_CONTACTS_SERVICE2
+#if 0
 /* LCOV_EXCL_START */
 void _bt_util_get_number(char *source, char *dest)
 {
@@ -577,6 +578,7 @@ fail:
 }
 /* LCOV_EXCL_STOP */
 #endif
+#endif
 
 /* LCOV_EXCL_START */
 void _bt_share_event_handler(int event, bluetooth_event_param_t *param,
@@ -1125,7 +1127,6 @@ done:
                }
 
 #ifdef ENABLE_CONTACTS_SERVICE2
-{
 #if 0
                int contact_id = -1;
 
@@ -1138,11 +1139,8 @@ done:
                        }
                }
 #endif
-               char *receiving_files = "IDS_WIFI_BODY_RECEIVING_FILES_FROM_PS_ING";
-}
-#else
-               char *receiving_files = "IDS_WIFI_BODY_RECEIVING_FILES_FROM_PS_ING";
 #endif
+               char *receiving_files = "IDS_WIFI_BODY_RECEIVING_FILES_FROM_PS_ING";
 
                INFO("Notification data: %p", data);
                if (data) {
index bbefc87..4ee7ede 100644 (file)
@@ -39,6 +39,9 @@ BuildRequires:  pkgconfig(cynara-creds-dbus)
 BuildRequires:  pkgconfig(eventsystem)
 BuildRequires:  pkgconfig(storage)
 BuildRequires:  pkgconfig(libsystemd)
+BuildRequires:  pkgconfig(calendar-service2)
+BuildRequires:  pkgconfig(contacts-service2)
+
 %if 0%{?gtests:1}
 BuildRequires:  pkgconfig(gmock)
 %endif
@@ -77,9 +80,9 @@ This package is C-API test application.
 cp %{SOURCE1001} %{SOURCE1002} %{SOURCE1003} .
 
 %build
-export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
-export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
-export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
+export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE -DENABLE_CONTACTS_SERVICE2 -DENABLE_CALENDAR_SERVICE2"
+export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE -DENABLE_CONTACTS_SERVICE2 -DENABLE_CALENDAR_SERVICE2"
+export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE -DENABLE_CONTACTS_SERVICE2 -DENABLE_CALENDAR_SERVICE2"
 
 export CFLAGS+=" -fpie -fvisibility=hidden"
 export CXXFLAGS+=" -fpie -fvisibility=hidden"