summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryoungman <yman.jung@samsung.com>2016-01-04 11:04:18 +0900
committerYoungjae Shin <yj99.shin@samsung.com>2016-01-04 17:46:09 +0900
commitacf6d36ae085e6e9176e246502cf461ba994c826 (patch)
treee1591aea7afb85e1bab0bf8005bf4022298e607d
parent92f74ac69a9192d82a0c0dc0b8754bfd2658d24a (diff)
downloadiotcon-acf6d36ae085e6e9176e246502cf461ba994c826.tar.gz
iotcon-acf6d36ae085e6e9176e246502cf461ba994c826.tar.bz2
iotcon-acf6d36ae085e6e9176e246502cf461ba994c826.zip
Apply tizen common error in tizen 3.0
Change-Id: If637972aa189e3e1a505af92e8a3974fdb0a400f Signed-off-by: youngman <yman.jung@samsung.com>
-rw-r--r--CMakeLists.txt9
-rw-r--r--daemon/CMakeLists.txt5
-rw-r--r--daemon/icd-cynara.c10
-rw-r--r--lib/include/iotcon-errors.h4
-rw-r--r--packaging/iotcon.spec6
5 files changed, 17 insertions, 17 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8a6b4c4..6da4da0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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)
diff --git a/daemon/CMakeLists.txt b/daemon/CMakeLists.txt
index ae253cd..ab9c4e6 100644
--- a/daemon/CMakeLists.txt
+++ b/daemon/CMakeLists.txt
@@ -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})
diff --git a/daemon/icd-cynara.c b/daemon/icd-cynara.c
index b015b49..e2ef6fb 100644
--- a/daemon/icd-cynara.c
+++ b/daemon/icd-cynara.c
@@ -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;
diff --git a/lib/include/iotcon-errors.h b/lib/include/iotcon-errors.h
index a2f6f48..602ebee 100644
--- a/lib/include/iotcon-errors.h
+++ b/lib/include/iotcon-errors.h
@@ -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
/**
diff --git a/packaging/iotcon.spec b/packaging/iotcon.spec
index 5159fc4..fc15986 100644
--- a/packaging/iotcon.spec
+++ b/packaging/iotcon.spec
@@ -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