Apply tizen common error in tizen 3.0
authoryoungman <yman.jung@samsung.com>
Mon, 4 Jan 2016 02:04:18 +0000 (11:04 +0900)
committerYoungjae Shin <yj99.shin@samsung.com>
Mon, 4 Jan 2016 08:46:09 +0000 (17:46 +0900)
Change-Id: If637972aa189e3e1a505af92e8a3974fdb0a400f
Signed-off-by: youngman <yman.jung@samsung.com>
CMakeLists.txt
daemon/CMakeLists.txt
daemon/icd-cynara.c
lib/include/iotcon-errors.h
packaging/iotcon.spec

index 8a6b4c4..6da4da0 100644 (file)
@@ -10,10 +10,11 @@ SET(CLIENT ${PROJECT_NAME})
 SET(DAEMON "${PROJECT_NAME}-daemon")
 SET(DBUS_INTERFACE "org.tizen.${PROJECT_NAME}.dbus")
 
-IF(NEW_SECURE)
-CONFIGURE_FILE(${PROJECT_NAME}.conf.in ${PROJECT_NAME}.conf @ONLY)
-INSTALL(FILES ${PROJECT_NAME}.conf DESTINATION ${SYSCONF_INSTALL_DIR}/dbus-1/system.d/)
-ENDIF(NEW_SECURE)
+IF(TZ_VER_3)
+       ADD_DEFINITIONS("-DTZ_VER_3")
+       CONFIGURE_FILE(${PROJECT_NAME}.conf.in ${PROJECT_NAME}.conf @ONLY)
+       INSTALL(FILES ${PROJECT_NAME}.conf DESTINATION ${SYSCONF_INSTALL_DIR}/dbus-1/system.d/)
+ENDIF(TZ_VER_3)
 
 ADD_SUBDIRECTORY(common)
 ADD_SUBDIRECTORY(lib)
index ae253cd..ab9c4e6 100644 (file)
@@ -10,10 +10,9 @@ SET_SOURCE_FILES_PROPERTIES(${CMAKE_SOURCE_DIR}/common/ic-dbus.c
 SET(PKG_MODULES gio-2.0 dlog gio-unix-2.0 capi-system-info capi-system-system-settings
        iotivity)
 
-IF(NEW_SECURE)
+IF(TZ_VER_3)
        SET(PKG_MODULES ${PKG_MODULES} cynara-client cynara-session cynara-creds-gdbus)
-       ADD_DEFINITIONS("-DIOTCON_CYNARA")
-ENDIF(NEW_SECURE)
+ENDIF(TZ_VER_3)
 
 pkg_check_modules(daemon_pkgs REQUIRED ${PKG_MODULES})
 
index b015b49..e2ef6fb 100644 (file)
@@ -17,7 +17,7 @@
 #include <stdlib.h>
 #include <glib.h>
 #include <gio/gio.h>
-#ifdef IOTCON_CYNARA
+#ifdef TZ_VER_3
 #include <cynara-client.h>
 #include <cynara-session.h>
 #include <cynara-creds-gdbus.h>
@@ -36,13 +36,13 @@ static const char *_icd_privileges_network[] = {
        NULL,
 };
 
-#ifdef IOTCON_CYNARA
+#ifdef TZ_VER_3
 static cynara *_cynara;
 #endif
 
 int icd_cynara_init()
 {
-#ifdef IOTCON_CYNARA
+#ifdef TZ_VER_3
        int ret;
        ret = cynara_initialize(&_cynara, NULL);
 
@@ -57,7 +57,7 @@ int icd_cynara_init()
 
 void icd_cynara_deinit()
 {
-#ifdef IOTCON_CYNARA
+#ifdef TZ_VER_3
        if (_cynara)
                cynara_finish(_cynara);
 
@@ -68,7 +68,7 @@ void icd_cynara_deinit()
 
 static int _icd_cynara_check(GDBusMethodInvocation *invocation, const char **privileges)
 {
-#ifdef IOTCON_CYNARA
+#ifdef TZ_VER_3
        FN_CALL;
        int i = 0;
        int ret;
index a2f6f48..602ebee 100644 (file)
@@ -18,8 +18,8 @@
 
 #include <tizen.h>
 
-#ifndef TIZEN_ERROR_IOTCON
-#define TIZEN_ERROR_IOTCON -0x09000000
+#ifndef TZ_VER_3
+#define TIZEN_ERROR_IOTCON -0x01C80000
 #endif
 
 /**
index 5159fc4..fc15986 100644 (file)
@@ -66,14 +66,14 @@ cp %{SOURCE2001} .
 
 %build
 %if 0%{?tizen_version_major} < 3
-NEW_SECURE=0
+TZ_VER_3=0
 %else
-NEW_SECURE=1
+TZ_VER_3=1
 %endif
 
 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
 %cmake . -DMAJORVER=${MAJORVER} -DFULLVER=%{version} -DBIN_INSTALL_DIR:PATH=%{_bindir} \
-               -DNEW_SECURE=${NEW_SECURE}
+               -DTZ_VER_3=${TZ_VER_3}
 
 
 %install