Fix build errors caused by notification API and pkgmgr API. 59/40559/1 submit/tizen_mobile/20150605.073121
authorKyuho Jo <kyuho.jo@samsung.com>
Fri, 5 Jun 2015 06:28:18 +0000 (15:28 +0900)
committerKyuho Jo <kyuho.jo@samsung.com>
Fri, 5 Jun 2015 06:28:18 +0000 (15:28 +0900)
Change-Id: Iff614f38172b53e3803d1bb934bf2abc91a99010
Signed-off-by: Kyuho Jo <kyuho.jo@samsung.com>
src/notification_service.c
src/pkgmgr.c

index 4022d38..0fabd2e 100644 (file)
 
 #include <vconf.h>
 #include <notification.h>
-#include <notification_internal.h>
-#include <notification_ipc.h>
-#include <notification_noti.h>
-#include <notification_setting_service.h>
 
 #include "pkgmgr.h"
 #include "service_common.h"
 #include "util.h"
 #include "conf.h"
 
+#ifdef __FEATURE_TIZEN_2_4_NOTIFICATION__
+#include <notification_noti.h>
+#include <notification_internal.h>
+#include <notification_ipc.h>
+#include <notification_setting_service.h>
+
 #ifndef NOTIFICATION_DEL_PACKET_UNIT
 #define NOTIFICATION_DEL_PACKET_UNIT 10
 #endif
@@ -945,13 +947,14 @@ static int _package_uninstall_cb(const char *pkgname, enum pkgmgr_status status,
 
        return 0;
 }
-
+#endif /* __FEATURE_TIZEN_2_4_NOTIFICATION__ */
 /*!
  * MAIN THREAD
  * Do not try to do any other operation in these functions
  */
 HAPI int notification_service_init(void)
 {
+#ifdef __FEATURE_TIZEN_2_4_NOTIFICATION__
        if (s_info.svc_ctx) {
                ErrPrint("Already initialized\n");
                return WIDGET_ERROR_ALREADY_STARTED;
@@ -970,19 +973,21 @@ HAPI int notification_service_init(void)
        pkgmgr_add_event_callback(PKGMGR_EVENT_INSTALL, _package_install_cb, (void*)&s_info);
        /* pkgmgr_add_event_callback(PKGMGR_EVENT_UPDATE, _package_install_cb, (void*)&s_info); */
        pkgmgr_add_event_callback(PKGMGR_EVENT_UNINSTALL, _package_uninstall_cb, (void*)&s_info);
-
+#endif /* __FEATURE_TIZEN_2_4_NOTIFICATION__ */
        DbgPrint("Successfully initiated\n");
        return WIDGET_ERROR_NONE;
 }
 
 HAPI int notification_service_fini(void)
 {
+#ifdef __FEATURE_TIZEN_2_4_NOTIFICATION__
        if (!s_info.svc_ctx) {
                return WIDGET_ERROR_INVALID_PARAMETER;
        }
 
        service_common_destroy(s_info.svc_ctx);
        s_info.svc_ctx = NULL;
+#endif /* __FEATURE_TIZEN_2_4_NOTIFICATION__ */
        DbgPrint("Successfully Finalized\n");
        return WIDGET_ERROR_NONE;
 }
index 5d2fb17..b3f1365 100644 (file)
@@ -439,7 +439,11 @@ static struct pkgmgr_handler {
        { NULL, NULL },
 };
 
+#ifdef __FEATURE_TIZEN_2_4_PKGMGR__
 static int pkgmgr_cb(int req_id, const char *type, const char *pkgname, const char *key, const char *val, const void *pmsg, void *data)
+#else /* __FEATURE_TIZEN_2_4_PKGMGR__ */
+static int pkgmgr_cb(uid_t target_uid, int req_id, const char *type, const char *pkgname, const char *key, const char *val, const void *pmsg, void *data)
+#endif /* __FEATURE_TIZEN_2_4_PKGMGR__ */
 {
        register int i;
        int ret;
@@ -459,6 +463,7 @@ static int pkgmgr_cb(int req_id, const char *type, const char *pkgname, const ch
        return WIDGET_ERROR_NONE;
 }
 
+
 HAPI int pkgmgr_init(void)
 {
        if (s_info.listen_pc) {