Makefile
documentation.list
-modules/auto_save_dao/database_checksum_autosave.h
modules/widget_dao/database_checksum.h
modules/security_origin_dao/database_checksum_security_origin.h
modules/custom_handler_dao/database_checksum_custom_handler.h
ADD_SUBDIRECTORY(test)
#ADD_SUBDIRECTORY(log)
ADD_SUBDIRECTORY(widget_dao)
-ADD_SUBDIRECTORY(auto_save_dao)
ADD_SUBDIRECTORY(security_origin_dao)
ADD_SUBDIRECTORY(custom_handler_dao)
ADD_SUBDIRECTORY(utils)
PKG_CHECK_MODULES(SYS_ENCRYPTION
dlog
openssl
+ cryptsvc
+ dukgenerator
REQUIRED
)
${TARGET_DPL_EFL}
)
-TARGET_LINK_LIBRARIES(${TARGET_DPL_ENCRYPTION} "-ldukgenerator" )
-TARGET_LINK_LIBRARIES(${TARGET_DPL_ENCRYPTION} "-lcryptsvc" )
-
# Target library properties
SET_TARGET_PROPERTIES(${TARGET_DPL_ENCRYPTION} PROPERTIES
SOVERSION ${API_VERSION}
# limitations under the License.
#
-for name in wrt wrt_autosave wrt_custom_handler
+for name in wrt wrt_custom_handler
do
# extract smack label before removal
DB_LABEL=""
include(test/config.cmake)
include(log/config.cmake)
ADD_SUBDIRECTORY(widget_dao)
-ADD_SUBDIRECTORY(auto_save_dao)
ADD_SUBDIRECTORY(security_origin_dao)
ADD_SUBDIRECTORY(custom_handler_dao)
ADD_SUBDIRECTORY(certificate_dao)
+++ /dev/null
-SET(TARGET_AUTO_SAVE_DAO_DB "Sqlite3DbAutoSave")
-
-ADD_CUSTOM_COMMAND(
- OUTPUT ${CMAKE_BINARY_DIR}/modules/auto_save_dao/database_checksum_autosave.h
- COMMAND ${CMAKE_SOURCE_DIR}/modules/auto_save_dao/orm/gen_db_md5.sh
- ARGS ${CMAKE_BINARY_DIR}/modules/auto_save_dao/database_checksum_autosave.h
- ${CMAKE_SOURCE_DIR}/modules/auto_save_dao/orm/autosave_db
- DEPENDS ${CMAKE_SOURCE_DIR}/modules/auto_save_dao/orm/autosave_db
- ${CMAKE_SOURCE_DIR}/modules/auto_save_dao/orm/gen_db_md5.sh
- COMMENT "Generating WRT auto save database checksum"
- )
-
-ADD_CUSTOM_COMMAND( OUTPUT .wrt_autosave.db
- COMMAND rm -f ${CMAKE_CURRENT_BINARY_DIR}/.wrt_autosave.db
- COMMAND gcc -Wall -include ${CMAKE_BINARY_DIR}/modules/auto_save_dao/database_checksum_autosave.h -I${PROJECT_SOURCE_DIR}/modules/db/include -I${PROJECT_SOURCE_DIR}/modules/auto_save_dao/orm -E ${PROJECT_SOURCE_DIR}/modules/auto_save_dao/orm/autosave_db_sql_generator.h | grep --invert-match "^#" > ${CMAKE_CURRENT_BINARY_DIR}/wrt_autosave_db.sql
- COMMAND sqlite3 ${CMAKE_CURRENT_BINARY_DIR}/.wrt_autosave.db ".read ${CMAKE_CURRENT_BINARY_DIR}/wrt_autosave_db.sql" || rm -f ${CMAKE_CURRENT_BINARY_DIR}/.wrt_autosave.db
- DEPENDS ${CMAKE_BINARY_DIR}/modules/auto_save_dao/database_checksum_autosave.h ${PROJECT_SOURCE_DIR}/modules/auto_save_dao/orm/autosave_db_sql_generator.h ${PROJECT_SOURCE_DIR}/modules/auto_save_dao/orm/autosave_db
- )
-
-ADD_CUSTOM_COMMAND( OUTPUT .wrt_autosave.db-journal
- COMMAND touch
- ARGS ${CMAKE_CURRENT_BINARY_DIR}/.wrt_autosave.db-journal
- )
-
-ADD_CUSTOM_TARGET(${TARGET_AUTO_SAVE_DAO_DB} ALL DEPENDS .wrt_autosave.db .wrt_autosave.db-journal)
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/wrt_autosave_db.sql DESTINATION share/wrt-engine/)
-
-###############################################################################
-
-INCLUDE(FindPkgConfig)
-
-PKG_CHECK_MODULES(AUTO_SAVE_DAO_DEPS
- glib-2.0
- REQUIRED)
-
-SET(AUTO_SAVE_DAO_INCLUDE_DIRS
- ${PROJECT_SOURCE_DIR}/modules/auto_save_dao/include
- ${PROJECT_SOURCE_DIR}/modules/auto_save_dao/orm
- ${PROJECT_SOURCE_DIR}/modules/core/include
- ${PROJECT_SOURCE_DIR}/modules/db/include
- ${PROJECT_SOURCE_DIR}/modules/log/include
-)
-
-
-SET(AUTO_SAVE_DAO_SOURCES
- dao/common_dao_types.cpp
- dao/AutoSaveDatabase.cpp
-)
-
-SET(AUTO_SAVE_DAO_RO_SOURCES
- dao/auto_save_dao_read_only.cpp
-)
-
-SET(AUTO_SAVE_DAO_RW_SOURCES
- dao/auto_save_dao.cpp
-)
-
-
-INCLUDE_DIRECTORIES(${AUTO_SAVE_DAO_INCLUDE_DIRS})
-INCLUDE_DIRECTORIES(SYSTEM ${AUTO_SAVE_DAO_DEPS_INCLUDE_DIRS})
-
-ADD_LIBRARY(${TARGET_AUTO_SAVE_DAO_LIB} SHARED ${AUTO_SAVE_DAO_SOURCES})
-SET_TARGET_PROPERTIES(${TARGET_AUTO_SAVE_DAO_LIB} PROPERTIES SOVERSION ${API_VERSION} VERSION ${VERSION})
-SET_TARGET_PROPERTIES(${TARGET_AUTO_SAVE_DAO_LIB} PROPERTIES COMPILE_FLAGS "-include ${CMAKE_BINARY_DIR}/modules/auto_save_dao/database_checksum_autosave.h")
-TARGET_LINK_LIBRARIES(${TARGET_AUTO_SAVE_DAO_LIB} ${TARGET_DPL_EFL} ${TARGET_DPL_DB_EFL} ${AUTO_SAVE_DAO_DEPS_LIBRARIES})
-ADD_DEPENDENCIES(${TARGET_AUTO_SAVE_DAO_LIB} ${TARGET_AUTO_SAVE_DAO_DB})
-
-ADD_LIBRARY(${TARGET_AUTO_SAVE_DAO_RO_LIB} SHARED ${AUTO_SAVE_DAO_RO_SOURCES})
-SET_TARGET_PROPERTIES(${TARGET_AUTO_SAVE_DAO_RO_LIB} PROPERTIES SOVERSION ${API_VERSION} VERSION ${VERSION})
-SET_TARGET_PROPERTIES(${TARGET_AUTO_SAVE_DAO_RO_LIB} PROPERTIES COMPILE_FLAGS "-include ${CMAKE_BINARY_DIR}/modules/auto_save_dao/database_checksum_autosave.h")
-TARGET_LINK_LIBRARIES(${TARGET_AUTO_SAVE_DAO_RO_LIB} ${TARGET_AUTO_SAVE_DAO_LIB})
-ADD_DEPENDENCIES(${TARGET_AUTO_SAVE_DAO_RO_LIB} ${TARGET_AUTO_SAVE_DAO_DB})
-
-ADD_LIBRARY(${TARGET_AUTO_SAVE_DAO_RW_LIB} SHARED ${AUTO_SAVE_DAO_RW_SOURCES})
-SET_TARGET_PROPERTIES(${TARGET_AUTO_SAVE_DAO_RW_LIB} PROPERTIES SOVERSION ${API_VERSION} VERSION ${VERSION})
-SET_TARGET_PROPERTIES(${TARGET_AUTO_SAVE_DAO_RW_LIB} PROPERTIES COMPILE_FLAGS "-include ${CMAKE_BINARY_DIR}/modules/auto_save_dao/database_checksum_autosave.h")
-TARGET_LINK_LIBRARIES(${TARGET_AUTO_SAVE_DAO_RW_LIB} ${TARGET_AUTO_SAVE_DAO_RO_LIB})
-ADD_DEPENDENCIES(${TARGET_AUTO_SAVE_DAO_RW_LIB} ${TARGET_AUTO_SAVE_DAO_DB})
-
-INSTALL(TARGETS ${TARGET_AUTO_SAVE_DAO_LIB} DESTINATION lib)
-INSTALL(TARGETS ${TARGET_AUTO_SAVE_DAO_RO_LIB} DESTINATION lib)
-INSTALL(TARGETS ${TARGET_AUTO_SAVE_DAO_RW_LIB} DESTINATION lib)
-
-INSTALL(FILES
- include/wrt-commons/auto-save-dao/common_dao_types.h
- include/wrt-commons/auto-save-dao/AutoSaveDatabase.h
- DESTINATION include/dpl-efl/wrt-commons/auto-save-dao
-)
-
-INSTALL(FILES
- include/wrt-commons/auto-save-dao-ro/auto_save_dao_read_only.h
- DESTINATION include/dpl-efl/wrt-commons/auto-save-dao-ro
-)
-
-INSTALL(FILES
- include/wrt-commons/auto-save-dao-rw/auto_save_dao.h
- DESTINATION include/dpl-efl/wrt-commons/auto-save-dao-rw
-)
+++ /dev/null
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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 <stddef.h>
-#include <wrt-commons/auto-save-dao/AutoSaveDatabase.h>
-
-using namespace AutoSaveDB;
-
-namespace {
-const char* AUTOSAVE_DB_DATABASE = "/opt/dbspace/.wrt_autosave.db";
-DPL::DB::SqlConnection::Flag::Type AUTOSAVE_DB_FLAGS =
- DPL::DB::SqlConnection::Flag::UseLucene;
-}
-
-DPL::Mutex g_autoSaveDbQueriesMutex;
-DPL::DB::ThreadDatabaseSupport Interface::m_autoSavedbInterface(
- AUTOSAVE_DB_DATABASE, AUTOSAVE_DB_FLAGS);
-
+++ /dev/null
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-/*
- * @file auto_save_dao.cpp
- * @author Jihoon Chung (jihoon.chung@samsung.com)
- * @version 1.0
- * @brief This file contains the definition of auto save dao class.
- */
-#include <stddef.h>
-#include <wrt-commons/auto-save-dao-rw/auto_save_dao.h>
-#include <wrt-commons/auto-save-dao/AutoSaveDatabase.h>
-#include <orm_generator_autosave.h>
-#include <dpl/foreach.h>
-
-using namespace DPL::DB::ORM;
-using namespace DPL::DB::ORM::autosave;
-using namespace AutoSaveDB::Interface;
-
-namespace AutoSaveDB {
-#define SQL_CONNECTION_EXCEPTION_HANDLER_BEGIN Try
-
-#define SQL_CONNECTION_EXCEPTION_HANDLER_END(message) \
- Catch(DPL::DB::SqlConnection::Exception::Base) { \
- LogError(message); \
- ReThrowMsg(AutoSaveDAO::Exception::DatabaseError, \
- message); \
- }
-
-AutoSaveDAO::AutoSaveDAO() :
- AutoSaveDAOReadOnly()
-{}
-
-AutoSaveDAO::~AutoSaveDAO()
-{}
-
-void AutoSaveDAO::attachDatabaseRW(void)
-{
- m_autoSavedbInterface.AttachToThread(
- DPL::DB::SqlConnection::Flag::RW);
-}
-
-void AutoSaveDAO::detachDatabase(void)
-{
- m_autoSavedbInterface.DetachFromThread();
-}
-
-void AutoSaveDAO::setAutoSaveSubmitFormData(
- const DPL::String &url,
- const SubmitFormData &
- submitFormData)
-{
- SQL_CONNECTION_EXCEPTION_HANDLER_BEGIN
- {
- ScopedTransaction transaction(&m_autoSavedbInterface);
-
- SubmitFormData submitData = getAutoSaveSubmitFormData(url);
- if (!submitData.empty()) {
- AUTOSAVE_DB_DELETE(del,
- AutoSaveSubmitFormElement,
- &m_autoSavedbInterface)
- del->Where(Equals<AutoSaveSubmitFormElement::address>(url));
- del->Execute();
- }
-
- FOREACH(pSubmitFormData, submitFormData) {
- AutoSaveSubmitFormElement::Row row;
- row.Set_address(url);
- row.Set_key(pSubmitFormData->key);
- row.Set_value(pSubmitFormData->value);
-
- AUTOSAVE_DB_INSERT(
- insert, AutoSaveSubmitFormElement, &m_autoSavedbInterface);
- insert->Values(row);
- insert->Execute();
- }
-
- transaction.Commit();
- }
- SQL_CONNECTION_EXCEPTION_HANDLER_END(
- "Fail to register id, passwd for autosave")
-}
-#undef SQL_CONNECTION_EXCEPTION_HANDLER_BEGIN
-#undef SQL_CONNECTION_EXCEPTION_HANDLER_END
-} // namespace AutoSaveDB
+++ /dev/null
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-/**
- * This file contains the declaration of auto save dao class.
- *
- * @file auto_save_dao_read_only.cpp
- * @author Jihoon Chung (jihoon.chung@samsung.com)
- * @version 1.0
- * @brief This file contains the declaration of auto save dao
- */
-#include <stddef.h>
-#include <wrt-commons/auto-save-dao-ro/auto_save_dao_read_only.h>
-#include <wrt-commons/auto-save-dao/AutoSaveDatabase.h>
-#include <orm_generator_autosave.h>
-#include <dpl/foreach.h>
-
-using namespace DPL::DB::ORM;
-using namespace DPL::DB::ORM::autosave;
-using namespace AutoSaveDB::Interface;
-
-namespace AutoSaveDB {
-#define SQL_CONNECTION_EXCEPTION_HANDLER_BEGIN Try
-
-#define SQL_CONNECTION_EXCEPTION_HANDLER_END(message) \
- Catch(DPL::DB::SqlConnection::Exception::Base) { \
- LogError(message); \
- ReThrowMsg(AutoSaveDAOReadOnly::Exception::DatabaseError, \
- message); \
- }
-
-AutoSaveDAOReadOnly::AutoSaveDAOReadOnly()
-{}
-
-AutoSaveDAOReadOnly::~AutoSaveDAOReadOnly()
-{}
-
-void AutoSaveDAOReadOnly::attachDatabaseRO(void)
-{
- m_autoSavedbInterface.AttachToThread(
- DPL::DB::SqlConnection::Flag::RO);
-}
-
-void AutoSaveDAOReadOnly::detachDatabase(void)
-{
- m_autoSavedbInterface.DetachFromThread();
-}
-
-SubmitFormData AutoSaveDAOReadOnly::getAutoSaveSubmitFormData(
- const DPL::String &url)
-{
- SQL_CONNECTION_EXCEPTION_HANDLER_BEGIN
- {
- AUTOSAVE_DB_SELECT(select,
- AutoSaveSubmitFormElement,
- &m_autoSavedbInterface);
- select->Where(Equals<AutoSaveSubmitFormElement::address>(url));
- AutoSaveSubmitFormElement::Select::RowList rows = select->GetRowList();
-
- SubmitFormData submitFormData;
- FOREACH(it, rows) {
- SubmitFormElement element;
- element.key = it->Get_key();
- element.value = it->Get_value();
- submitFormData.push_back(element);
- }
- return submitFormData;
- }
- SQL_CONNECTION_EXCEPTION_HANDLER_END("Failed to get autosave data string")
-}
-
-#undef SQL_CONNECTION_EXCEPTION_HANDLER_BEGIN
-#undef SQL_CONNECTION_EXCEPTION_HANDLER_END
-} // namespace AutoSaveDB
+++ /dev/null
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-/**
- *
- * @file common_dao_types.cpp
- * @author Jihoon Chung (jihoon.chung@samsung.com)
- * @version 1.0
- * @brief This file contains the implementation of
- * common data types for autoSavedb
- */
-#include <stddef.h>
-#include <wrt-commons/auto-save-dao/common_dao_types.h>
-#include <dpl/log/log.h>
-
-namespace AutoSaveDB {} // namespace AutoSaveDB
+++ /dev/null
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-/**
- * This file contains the declaration of auto save dao class.
- *
- * @file auto_save_dao_read_only.h
- * @author Jihoon Chung (jihoon.chung@samsung.com)
- * @version 1.0
- * @brief This file contains the declaration of auto save dao
- */
-
-#ifndef _AUTO_SAVE_DAO_READ_ONLY_H_
-#define _AUTO_SAVE_DAO_READ_ONLY_H_
-
-#include <dpl/string.h>
-#include <dpl/exception.h>
-#include <dpl/optional.h>
-#include <wrt-commons/auto-save-dao/common_dao_types.h>
-
-namespace AutoSaveDB {
-class AutoSaveDAOReadOnly
-{
- public:
- /**
- * AutoSaveDAOReadOnly Exception classes
- */
- class Exception
- {
- public:
- DECLARE_EXCEPTION_TYPE(DPL::Exception, Base)
- DECLARE_EXCEPTION_TYPE(Base, DatabaseError)
- };
-
- public:
-
- AutoSaveDAOReadOnly();
- virtual ~AutoSaveDAOReadOnly();
-
- static void attachDatabaseRO(void);
- static void detachDatabase(void);
-
- /**
- * This method gets Autofill for Webkit
- */
- static SubmitFormData getAutoSaveSubmitFormData(
- const DPL::String &url);
-};
-} // namespace AutoSaveDB
-
-#endif // _AUTO_SAVE_DAO_READ_ONLY_H_
-
+++ /dev/null
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-/**
- * This file contains the declaration of auto save dao class.
- *
- * @file auto_save_dao.h
- * @author Jihoon Chung (jihoon.chung@samsung.com)
- * @version 1.0
- * @brief This file contains the declaration of auto save dao
- */
-#ifndef _AUTO_SAVE_DAO_H_
-#define _AUTO_SAVE_DAO_H_
-
-#include <wrt-commons/auto-save-dao-ro/auto_save_dao_read_only.h>
-
-namespace AutoSaveDB {
-class AutoSaveDAO : public AutoSaveDAOReadOnly
-{
- public:
-
- AutoSaveDAO();
- virtual ~AutoSaveDAO();
-
- static void attachDatabaseRW(void);
- static void detachDatabase(void);
-
- /**
- * This method sets Autofill for Webkit
- */
- static void setAutoSaveSubmitFormData(
- const DPL::String& url, const SubmitFormData &submitFormData);
-};
-} // namespace AutoSaveDB
-
-#endif // _AUTO_SAVE_DAO_H_
+++ /dev/null
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-#ifndef _AUTOSAVEDATABASE_H_
-#define _AUTOSAVEDATABASE_H_
-
-#include <dpl/thread.h>
-#include <dpl/mutex.h>
-#include <dpl/db/thread_database_support.h>
-
-extern DPL::Mutex g_autoSaveDbQueriesMutex;
-
-#define AUTOSAVE_DB_INTERNAL(tlsCommand, InternalType, interface) \
- static DPL::ThreadLocalVariable<InternalType> *tlsCommand##Ptr = NULL; \
- { \
- DPL::Mutex::ScopedLock lock(&g_autoSaveDbQueriesMutex); \
- if (!tlsCommand##Ptr) { \
- static DPL::ThreadLocalVariable<InternalType> tmp; \
- tlsCommand##Ptr = &tmp; \
- } \
- } \
- DPL::ThreadLocalVariable<InternalType> &tlsCommand = *tlsCommand##Ptr; \
- if (tlsCommand.IsNull()) { tlsCommand = InternalType(interface); }
-
-#define AUTOSAVE_DB_SELECT(name, type, interface) \
- AUTOSAVE_DB_INTERNAL(name, type::Select, interface)
-
-#define AUTOSAVE_DB_INSERT(name, type, interface) \
- AUTOSAVE_DB_INTERNAL(name, type::Insert, interface)
-
-#define AUTOSAVE_DB_UPDATE(name, type, interface) \
- AUTOSAVE_DB_INTERNAL(name, type::Update, interface)
-
-#define AUTOSAVE_DB_DELETE(name, type, interface) \
- AUTOSAVE_DB_INTERNAL(name, type::Delete, interface)
-
-namespace AutoSaveDB {
-namespace Interface {
-extern DPL::DB::ThreadDatabaseSupport m_autoSavedbInterface;
-} // namespace Interface
-} // namespace AutoSaveDB
-
-#endif /* _AUTOSAVEDATABASE_H_ */
-
+++ /dev/null
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-/**
- *
- * @file common_dao_types.h
- * @author Jihoon Chung (jihoon.chung@samsung.com)
- * @version 1.0
- * @brief This file contains the declaration of
- * common data types for auto save database.
- */
-#ifndef SHARE_COMMON_DAO_TYPES_H_
-#define SHARE_COMMON_DAO_TYPES_H_
-
-#include <list>
-#include <dpl/string.h>
-
-namespace AutoSaveDB {
-struct SubmitFormElement
-{
- DPL::String key;
- DPL::String value;
-
- SubmitFormElement()
- {}
-
- SubmitFormElement(
- const DPL::String& keyData,
- const DPL::String& valueData) :
- key(keyData),
- value(valueData)
- {}
-
- bool operator== (const SubmitFormElement& other) const
- {
- return (!DPL::StringCompare(key, other.key) &&
- !DPL::StringCompare(value, other.value));
- }
-
- bool operator!= (const SubmitFormElement& other) const
- {
- return !(*this == other);
- }
-};
-typedef std::list<SubmitFormElement> SubmitFormData;
-} // namespace AutoSaveDB
-
-#endif /* SHARE_COMMON_DAO_TYPES_H_ */
+++ /dev/null
-SQL(
- BEGIN TRANSACTION;
-)
-
-CREATE_TABLE(AutoSaveSubmitFormElement)
- COLUMN_NOT_NULL(address, VARCHAR(256),)
- COLUMN_NOT_NULL(key, TEXT,)
- COLUMN_NOT_NULL(value, TEXT,)
-CREATE_TABLE_END()
-
-SQL(
- COMMIT;
-)
+++ /dev/null
-DATABASE_START(autosave)
-
-#include "autosave_db"
-#include "version_db"
-
-DATABASE_END()
+++ /dev/null
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-/*
- * @file autosave_db_sql_generator.h
- * @author Jihoon Chung (jihoon.chung@samsung.com)
- * @version 1.0
- * @brief Macro definitions for generating the SQL
- * input file from database definition.
- */
-
-//Do not include this file directly! It is used only for SQL code generation.
-#include <dpl/db/orm_macros.h>
-
-#include "autosave_db_definitions"
+++ /dev/null
-#!/bin/sh
-# Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# 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.
-#
-CHECKSUM=`cat ${2} ${3} 2>/dev/null | md5sum 2>/dev/null | cut -d\ -f1 2>/dev/null`
-echo "#define DB_CHECKSUM DB_VERSION_${CHECKSUM}" > ${1}
-echo "#define DB_CHECKSUM_STR \"DB_VERSION_${CHECKSUM}\"" >> ${1}
-
+++ /dev/null
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-#ifndef _ORM_GENERATOR_AUTOSAVE_H_
-#define _ORM_GENERATOR_AUTOSAVE_H_
-
-#define ORM_GENERATOR_DATABASE_NAME autosave_db_definitions
-#include <dpl/db/orm_generator.h>
-#undef ORM_GENERATOR_DATABASE_NAME
-
-#endif // _ORM_GENERATOR_AUTOSAVE_H_
+++ /dev/null
-SQL(
- BEGIN TRANSACTION;
- CREATE TABLE DB_CHECKSUM (version INT);
- COMMIT;
-)
}
SQL_CONNECTION_EXCEPTION_HANDLER_END("Failed in getHandle")
}
+
+WidgetPkgName getTizenPkgIdByHandle(const DbWidgetHandle handle)
+{
+ LogDebug("Getting TizenPkgId by DbWidgetHandle: " << handle);
+
+ SQL_CONNECTION_EXCEPTION_HANDLER_BEGIN
+ {
+ WRT_DB_SELECT(select, WidgetInfo, &WrtDatabase::interface())
+ select->Where(Equals<WidgetInfo::app_id>(handle));
+ WidgetInfo::Select::RowList rowList = select->GetRowList();
+
+ if (rowList.empty()) {
+ ThrowMsg(WidgetDAOReadOnly::Exception::WidgetNotExist,
+ "Failed to get widget by handle");
+ }
+ WidgetPkgName tzPkgid = rowList.front().Get_tizen_pkgid();
+
+ return tzPkgid;
+ }
+ SQL_CONNECTION_EXCEPTION_HANDLER_END("Failed in getHandle")
+}
} // namespace
IWacSecurity::~IWacSecurity()
WidgetPkgName WidgetDAOReadOnly::getPkgName() const
{
- return getTzAppId();
+ return getTizenPkgIdByHandle(m_widgetHandle);
}
WidgetPkgName WidgetDAOReadOnly::getPkgName(const WidgetGUID GUID)
{
- return getTzAppId(GUID);
+ return getTizenPkgIdByHandle(getHandle(GUID));
}
WidgetPkgName WidgetDAOReadOnly::getPkgName(const DbWidgetHandle handle)
{
- return getTzAppId(handle);
+ return getTizenPkgIdByHandle(handle);
}
TizenAppId WidgetDAOReadOnly::getTzAppId() const
-#git:framework/web/wrt-commons wrt-commons 0.2.108
+#git:framework/web/wrt-commons wrt-commons 0.2.109
Name: wrt-commons
Summary: Wrt common library
-Version: 0.2.108
+Version: 0.2.109
Release: 1
Group: Development/Libraries
License: Apache License, Version 2.0
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(libiri)
BuildRequires: pkgconfig(libidn)
-BuildRequires: libcryptsvc-devel
-BuildRequires: dukgenerator-devel
+BuildRequires: pkgconfig(cryptsvc)
+BuildRequires: pkgconfig(dukgenerator)
Requires: libcryptsvc
%description
# Set Smack label for db files
chsmack -a 'wrt-commons::db_wrt' /opt/dbspace/.wrt.db
chsmack -a 'wrt-commons::db_wrt' /opt/dbspace/.wrt.db-journal
-chsmack -a 'wrt-commons::db_wrt_autosave' /opt/dbspace/.wrt_autosave.db
-chsmack -a 'wrt-commons::db_wrt_autosave' /opt/dbspace/.wrt_autosave.db-journal
chsmack -a 'wrt-commons::db_wrt_custom_handler' /opt/dbspace/.wrt_custom_handler.db
chsmack -a 'wrt-commons::db_wrt_custom_handler' /opt/dbspace/.wrt_custom_handler.db-journal
<domain name="wrt-commons"/>
<provide>
<label name="wrt-commons::db_wrt"/>
- <label name="wrt-commons::db_wrt_autosave"/>
<label name="wrt-commons::db_wrt_custom_handler"/>
</provide>
</define>