Remove profile-specific dependency code 74/110674/2
authorseungha.son <seungha.son@samsung.com>
Tue, 17 Jan 2017 10:31:18 +0000 (19:31 +0900)
committerseungha.son <seungha.son@samsung.com>
Tue, 17 Jan 2017 10:42:09 +0000 (19:42 +0900)
 - Include shortcut package in wearable profile.
 - We plan to remove profile dependencies using plug-in next.

Signed-off-by: seungha.son <seungha.son@samsung.com>
Change-Id: I6e8b6ed18c36fa9db50260a5980b79838fba2ddc

CMakeLists.txt
include/service_common.h
packaging/data-provider-master.spec
src/main.c
src/service_common.c

index 600f0ca..946d2da 100644 (file)
@@ -6,52 +6,28 @@ SET(EXEC_PREFIX "\${prefix}")
 SET(LIBDIR ${LIB_INSTALL_DIR})
 SET(INCLUDEDIR "\${prefix}/include")
 
-IF (WEARABLE)
-       INCLUDE(FindPkgConfig)
-       pkg_check_modules(pkg REQUIRED
-               dlog
-               aul
-               vconf
-               sqlite3
-               db-util
-               glib-2.0
-               gio-2.0
-               bundle
-               ecore
-               eina
-               pkgmgr
-               notification
-               badge
-               libsmack
-               pkgmgr-info
-               libsystemd-daemon
-               capi-appfw-app-manager
-               alarm-service
-               )
-ELSE (WEARABLE)
-       INCLUDE(FindPkgConfig)
-       pkg_check_modules(pkg REQUIRED
-               dlog
-               aul
-               vconf
-               sqlite3
-               db-util
-               glib-2.0
-               gio-2.0
-               bundle
-               ecore
-               eina
-               pkgmgr
-               notification
-               badge
-               shortcut
-               libsmack
-               pkgmgr-info
-               libsystemd-daemon
-               capi-appfw-app-manager
-               alarm-service
-               )
-ENDIF (WEARABLE)
+INCLUDE(FindPkgConfig)
+pkg_check_modules(pkg REQUIRED
+       dlog
+       aul
+       vconf
+       sqlite3
+       db-util
+       glib-2.0
+       gio-2.0
+       bundle
+       ecore
+       eina
+       pkgmgr
+       notification
+       badge
+       libsmack
+       shortcut
+       pkgmgr-info
+       libsystemd-daemon
+       capi-appfw-app-manager
+       alarm-service
+)
 
 SET(PACKAGE "${PROJECT_NAME}")
 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Winline -Werror -fno-builtin-malloc -fno-omit-frame-pointer -g -fPIE")
@@ -82,28 +58,16 @@ ELSEIF (WEARABLE)
        ADD_DEFINITIONS("-DWEARABLE")
 ENDIF (MOBILE)
 
-IF (WEARABLE)
-       SET(BUILD_SOURCE
-               src/main.c
-               src/util.c
-               src/pkgmgr.c
-               src/badge_service.c
-               src/notification_service.c
-               src/service_common.c
-               src/critical_log.c
-               )
-ELSE (WEARABLE)
-       SET(BUILD_SOURCE
-               src/main.c
-               src/util.c
-               src/pkgmgr.c
-               src/badge_service.c
-               src/notification_service.c
-               src/service_common.c
-               src/shortcut_service.c
-               src/critical_log.c
-               )
-ENDIF (WEARABLE)
+SET(BUILD_SOURCE
+       src/main.c
+       src/util.c
+       src/pkgmgr.c
+       src/shortcut_service.c
+       src/badge_service.c
+       src/notification_service.c
+       src/service_common.c
+       src/critical_log.c
+)
 
 STRING(REPLACE "-L-l" "-l" pkg_fixed_LDFLAGS ${pkg_LDFLAGS})
 STRING(REPLACE "-l" " -l" pkg_LDFLAGS ${pkg_fixed_LDFLAGS})
index 629b67b..b24a1a6 100755 (executable)
 #include <gio/gio.h>
 #include <notification.h>
 #include <badge.h>
-#include <stdlib.h>
-#ifndef WEARABLE
 #include <shortcut.h>
-#endif
+#include <stdlib.h>
 
 #define NORMAL_UID_BASE 5000
 
index df0a0e2..21f59fe 100755 (executable)
@@ -27,9 +27,7 @@ BuildRequires: pkgconfig(pkgmgr)
 BuildRequires: pkgconfig(pkgmgr-info)
 BuildRequires: pkgconfig(notification)
 BuildRequires: pkgconfig(badge)
-%if "%{profile}" != "wearable"
 BuildRequires: pkgconfig(shortcut)
-%endif
 BuildRequires: pkgconfig(libsystemd-daemon)
 BuildRequires: pkgconfig(alarm-service)
 
index 4abec56..7329b74 100755 (executable)
 #include "util.h"
 #include "critical_log.h"
 #include "service_common.h"
+#include "shortcut_service.h"
 #include "notification_service.h"
 #include "badge_service.h"
-#ifndef WEARABLE
-#include "shortcut_service.h"
-#endif
 
 static void lang_key_changed_cb(keynode_t *node EINA_UNUSED, void *first)
 {
@@ -71,11 +69,11 @@ static inline int app_create(void)
                DbgPrint("VCONFKEY_LANGSET notify key chenaged: %d\n", ret);
 
        lang_key_changed_cb(NULL, NULL);
-#ifndef WEARABLE
+
        ret = shortcut_service_init();
        if (ret < 0)
                DbgPrint("shortcut: %d\n", ret);
-#endif
+
        ret = notification_service_init();
        if (ret < 0)
                DbgPrint("noti: %d\n", ret);
@@ -100,11 +98,11 @@ static inline int app_terminate(void)
        ret = notification_service_fini();
        if (ret < 0)
                DbgPrint("noti: %d\n", ret);
-#ifndef WEARABLE
+
        ret = shortcut_service_fini();
        if (ret < 0)
                DbgPrint("shortcut: %d\n", ret);
-#endif
+
        DbgPrint("Terminated\n");
        return 0;
 }
index 8535d21..0fbb084 100755 (executable)
@@ -32,9 +32,7 @@
 #include "service_common.h"
 #include "notification_service.h"
 #include "badge_service.h"
-#ifndef WEARABLE
 #include "shortcut_service.h"
-#endif
 
 #define PROVIDER_BUS_NAME "org.tizen.data_provider_service"
 #define PROVIDER_OBJECT_PATH "/org/tizen/data_provider_service"