INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${LIB_INSTALL_DIR})
-#################################################################
-PKG_CHECK_MODULES(DRM_INITIALIZE_DEP
- REQUIRED
- db-util
- dlog
- openssl
-)
-
-INCLUDE_DIRECTORIES(${DRM_INITIALIZE_DEP_INCLUDE_DIRS})
-
-SET(DRMTAPPSINITIALIZE_SRCS
- service/drm-tapps-initialize.cpp
- tappsd/src/db/DTapps2SqlData.cpp
- tappsd/src/db/DTapps2SqliteDB.cpp
- tappsd/src/intf/drm_intf_tapps.cpp
-)
-
-SET_SOURCE_FILES_PROPERTIES(${DRMTAPPSINITIALIZE_SRCS}
- PROPERTIES
- COMPILE_FLAGS "-fPIE"
-)
-
-ADD_EXECUTABLE(${DRMTAPPSINITIALIZE} ${DRMTAPPSINITIALIZE_SRCS})
-
-TARGET_LINK_LIBRARIES(${DRMTAPPSINITIALIZE}
- ${DRM_INITIALIZE_DEP_LIBRARIES}
- -pie
-)
-
-INSTALL(TARGETS ${DRMTAPPSINITIALIZE} DESTINATION ${BIN_DIR})
#################################################################
CONFIGURE_FILE(${PROJECT_NAME}.pc.in ${PROJECT_NAME}.pc @ONLY)
#################################################################
+ADD_SUBDIRECTORY(initializer)
+
IF(DEFINED BUILD_TEST_DRM_SERVICE_CORE_TIZEN)
ADD_DEFINITIONS("-DTEST_DATA_DIR=\"${TEST_DATA_DIR}\"")
ADD_SUBDIRECTORY(test)
--- /dev/null
+#################################################################
+PKG_CHECK_MODULES(DRM_INITIALIZE_DEP
+ REQUIRED
+ db-util
+ dlog
+ openssl
+)
+
+INCLUDE_DIRECTORIES(${DRM_INITIALIZE_DEP_INCLUDE_DIRS})
+
+SET(DRMTAPPSINITIALIZE_SRCS
+ ${PROJECT_SOURCE_DIR}/initializer/drm-tapps-initialize.cpp
+ ${PROJECT_SOURCE_DIR}/tappsd/src/db/DTapps2SqlData.cpp
+ ${PROJECT_SOURCE_DIR}/tappsd/src/db/DTapps2SqliteDB.cpp
+ ${PROJECT_SOURCE_DIR}/tappsd/src/intf/drm_intf_tapps.cpp
+)
+
+SET_SOURCE_FILES_PROPERTIES(${DRMTAPPSINITIALIZE_SRCS}
+ PROPERTIES
+ COMPILE_FLAGS "-fPIE"
+)
+
+ADD_EXECUTABLE(${DRMTAPPSINITIALIZE} ${DRMTAPPSINITIALIZE_SRCS})
+
+TARGET_LINK_LIBRARIES(${DRMTAPPSINITIALIZE}
+ ${DRM_INITIALIZE_DEP_LIBRARIES}
+ -pie
+)
+
+INSTALL(TARGETS ${DRMTAPPSINITIALIZE} DESTINATION ${BIN_DIR})
--- /dev/null
+/*
+ * Copyright (c) 2000-2015 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Flora License, Version 1.1 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <drm-tizen-mid.h>
+
+#include "DTapps2SqliteDB.h"
+
+static int __drm_tad_create_db(void)
+{
+ BOOL db_ret = FALSE;
+ int IsBeginSuccessful = 0;
+
+ char Table_Name[16] = "dtapps2rights";
+ char *sql_query_table = NULL;
+ void *pDb = NULL;
+
+ db_ret = DTappsDBOpen(pDb, __func__);
+
+ if (db_ret != TRUE) {
+ DRM_TAPPS_EXCEPTION("DTappsDBOpen FAILED");
+ return -1;
+ }
+
+ db_ret = DTappsDBBeginImmedTrans(__func__);
+
+ if (db_ret != TRUE) {
+ DRM_TAPPS_EXCEPTION("DTappsDBBeginImmedTrans FAILED");
+ goto ErrorExit;
+ }
+
+ IsBeginSuccessful = 1;
+
+ sql_query_table = DTappsGetSQLCreateTable(Table_Name);
+
+ if (sql_query_table == NULL) {
+ DRM_TAPPS_EXCEPTION("DTappsGetSQLCreateTable FAILED");
+ goto ErrorExit;
+ }
+
+ DRM_TAPPS_FRQ_LOG("sql_query_table = %s", sql_query_table);
+
+ db_ret = DTappsExecuteSQL(pDb, sql_query_table);
+
+ if (db_ret != TRUE) {
+ DRM_TAPPS_EXCEPTION("DTappsGetSQLCreateTable FAILED");
+ goto ErrorExit;
+ }
+
+ db_ret = DTappsDBCommit(__func__);
+
+ if (db_ret != TRUE) {
+ DRM_TAPPS_EXCEPTION("DTappsDBCommit FAILED");
+
+ goto ErrorExit;
+ }
+
+ db_ret = DTappsDBClose(__func__);
+
+ if (db_ret != TRUE) {
+ DRM_TAPPS_EXCEPTION("DTappsDBClose FAILED");
+ goto ErrorExit;
+ }
+
+ DRM_TAPPS_FRQ_LOG("TAD DB created successfully");
+
+ return 0;
+
+ErrorExit:
+
+ if (1 == IsBeginSuccessful)
+ DTappsDBRollback(__func__);
+
+ db_ret = DTappsDBClose(__func__);
+
+ if (db_ret != TRUE)
+ DRM_TAPPS_EXCEPTION("DTappsDBClose FAILED");
+
+ DRM_TAPPS_EXCEPTION("TAD DB creation FAILED");
+
+ return -1;
+}
+
+int main(int, char *[])
+{
+ DRM_TAPPS_FRQ_LOG("=========Start Create TAD DB file ============\n\n");
+
+ if (0 != __drm_tad_create_db()) {
+ DRM_TAPPS_EXCEPTION("=========Error Creating TAD DB file ============\n\n");
+ return 1;
+ }
+
+ DRM_TAPPS_FRQ_LOG("=========Success Created TAD DB file ============\n\n");
+
+ return 0;
+}
+++ /dev/null
-/*
- * Copyright (c) 2000-2015 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://floralicense.org/license/
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <drm-tizen-mid.h>
-
-#include "DTapps2SqliteDB.h"
-
-static int __drm_tad_create_db(void)
-{
- BOOL db_ret = FALSE;
- int IsBeginSuccessful = 0;
-
- char Table_Name[16] = "dtapps2rights";
- char *sql_query_table = NULL;
- void *pDb = NULL;
-
- db_ret = DTappsDBOpen(pDb, __func__);
-
- if (db_ret != TRUE) {
- DRM_TAPPS_EXCEPTION("DTappsDBOpen FAILED");
- return -1;
- }
-
- db_ret = DTappsDBBeginImmedTrans(__func__);
-
- if (db_ret != TRUE) {
- DRM_TAPPS_EXCEPTION("DTappsDBBeginImmedTrans FAILED");
- goto ErrorExit;
- }
-
- IsBeginSuccessful = 1;
-
- sql_query_table = DTappsGetSQLCreateTable(Table_Name);
-
- if (sql_query_table == NULL) {
- DRM_TAPPS_EXCEPTION("DTappsGetSQLCreateTable FAILED");
- goto ErrorExit;
- }
-
- DRM_TAPPS_FRQ_LOG("sql_query_table = %s", sql_query_table);
-
- db_ret = DTappsExecuteSQL(pDb, sql_query_table);
-
- if (db_ret != TRUE) {
- DRM_TAPPS_EXCEPTION("DTappsGetSQLCreateTable FAILED");
- goto ErrorExit;
- }
-
- db_ret = DTappsDBCommit(__func__);
-
- if (db_ret != TRUE) {
- DRM_TAPPS_EXCEPTION("DTappsDBCommit FAILED");
-
- goto ErrorExit;
- }
-
- db_ret = DTappsDBClose(__func__);
-
- if (db_ret != TRUE) {
- DRM_TAPPS_EXCEPTION("DTappsDBClose FAILED");
- goto ErrorExit;
- }
-
- DRM_TAPPS_FRQ_LOG("TAD DB created successfully");
-
- return 0;
-
-ErrorExit:
-
- if (1 == IsBeginSuccessful)
- DTappsDBRollback(__func__);
-
- db_ret = DTappsDBClose(__func__);
-
- if (db_ret != TRUE)
- DRM_TAPPS_EXCEPTION("DTappsDBClose FAILED");
-
- DRM_TAPPS_EXCEPTION("TAD DB creation FAILED");
-
- return -1;
-}
-
-int main(int, char *[])
-{
- DRM_TAPPS_FRQ_LOG("=========Start Create TAD DB file ============\n\n");
-
- if (0 != __drm_tad_create_db()) {
- DRM_TAPPS_EXCEPTION("=========Error Creating TAD DB file ============\n\n");
- return 1;
- }
-
- DRM_TAPPS_FRQ_LOG("=========Success Created TAD DB file ============\n\n");
-
- return 0;
-}