Replace db-util package to sqlite3 08/194308/2 accepted/tizen/unified/20181204.152222 submit/tizen/20181204.022314 submit/tizen/20181204.060629
authorDongsun Lee <ds73.lee@samsung.com>
Mon, 3 Dec 2018 03:00:09 +0000 (12:00 +0900)
committerDongsun Lee <ds73.lee@samsung.com>
Mon, 3 Dec 2018 03:03:18 +0000 (12:03 +0900)
Change-Id: I9102a3a729a59f5c5a7fd90623b15f8c79ce6c9a
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
CMakeLists.txt
drm-service-core-tizen.pc.in
initializer/CMakeLists.txt
packaging/drm-service-core-tizen.spec
tappsd/inc/drm_intf_tapps.h
tappsd/src/db/DTapps2SqliteDB.cpp
test/CMakeLists.txt

index b5c545e..36ada8d 100644 (file)
@@ -34,7 +34,8 @@ ADD_DEFINITIONS("-Wextra")                      # Generate even more extra warni
 PKG_CHECK_MODULES(DRM_SERVICE_CORE_DEP
     REQUIRED
     cryptsvc
-    db-util
+    sqlite3
+    glib-2.0
     dlog
     openssl
 )
index 0895e4a..740d721 100644 (file)
@@ -6,6 +6,6 @@ includedir=@INCLUDE_INSTALL_DIR@
 Name: drm-service-core-tizen
 Description: Tizen Application DRM Plugin
 Version: @VERSION@
-Requires: dlog openssl db-util
+Requires: dlog openssl sqlite3
 Libs: -L${libdir} -ldrm-service-core-tizen
 Cflags: -I${includedir}/drm-tizen
index 576ea75..e36c571 100644 (file)
@@ -1,7 +1,8 @@
 #################################################################
 PKG_CHECK_MODULES(DRM_INITIALIZE_DEP
     REQUIRED
-    db-util
+    sqlite3
+    glib-2.0
     dlog
     openssl
 )
index 7609944..fbd7a56 100755 (executable)
@@ -9,7 +9,8 @@ License:    Flora-1.1 and Apache-2.0
 Source0:    %{name}-%{version}.tar.gz
 BuildRequires:  cmake
 BuildRequires:  pkgconfig(dlog)
-BuildRequires:  pkgconfig(db-util)
+BuildRequires:  pkgconfig(sqlite3)
+BuildRequires:  pkgconfig(glib-2.0)
 BuildRequires:  pkgconfig(openssl)
 BuildRequires:  pkgconfig(cryptsvc)
 BuildRequires:  pkgconfig(libtzplatform-config)
index 85ed411..d9b0d8e 100644 (file)
 #include <string.h>
 #include <errno.h>
 
-#include "db-util.h"
+#include <sqlite3.h>
 
 #include "drm-tizen-mid.h"
 #include <openssl/aes.h>
 
+#ifndef EXPORT_API
+#define EXPORT_API __attribute__ ((visibility("default")))
+#endif
+
 /* Enable this flag during development time */
 #define _TAPPS_DEBUG_ENABLE_
 
index 51e2653..d2f2584 100644 (file)
@@ -114,7 +114,7 @@ BOOL DTappsDBOpen(void *&pDb, const char *CallingFun)
                DRM_TAPPS_FRQ_LOG("Opening DB connection.");
 
                sqlite3 *h_db = NULL;
-               int result = db_util_open(DTAPPS_DB_NAME, &h_db, 0);
+               int result = sqlite3_open(DTAPPS_DB_NAME, &h_db);
 
                if (result != SQLITE_OK) {
                        DRM_TAPPS_EXCEPTION("sqlite msg :[%d]%s", result, sqlite3_errmsg(h_db));
@@ -217,8 +217,8 @@ BOOL DTappsDBClose(const char *CallingFun)
 
        DRM_TAPPS_LOG(" Closing DB connection..pDBConnection=[0x%x]", pDBConnection);
 
-       if (db_util_close(pDBConnection) != SQLITE_OK) {
-               DRM_TAPPS_EXCEPTION("db_util_close failed. errmsg:%s",
+       if (sqlite3_close(pDBConnection) != SQLITE_OK) {
+               DRM_TAPPS_EXCEPTION("sqlite3_close failed. errmsg:%s",
                                                        sqlite3_errmsg(pDBConnection));
                ret = FALSE;
        }
index b203cbf..79b416d 100644 (file)
@@ -1,7 +1,8 @@
 pkg_check_modules(DRM_TEST_DEP
     REQUIRED
     cryptsvc
-    db-util
+    sqlite3
+    glib-2.0
     dlog
     openssl
 )