From 2c0bac46771cbca674de94d94933a367398e8836 Mon Sep 17 00:00:00 2001 From: Jihoon Chung Date: Fri, 19 Apr 2013 20:43:42 +0900 Subject: [PATCH] [Release] wrt-commons_0.2.110 --- etc/wrt_commons_create_clean_db.sh | 48 ++++++++++++++-------- modules/certificate_dao/dao/certificate_dao.cpp | 24 ++--------- .../wrt-commons/certificate-dao/certificate_dao.h | 2 +- .../dao/CustomHandlerDatabase.cpp | 2 +- .../dpl/localization/w3c_file_localization.h | 14 +++---- modules/localization/src/w3c_file_localization.cpp | 40 +++++++----------- .../dao/security_origin_dao.cpp | 30 +------------- .../security-origin-dao/security_origin_dao.h | 3 +- modules/utils/src/warp_iri.cpp | 2 - modules/widget_dao/dao/widget_dao_read_only.cpp | 37 ++++------------- .../include/dpl/wrt-dao-ro/common_dao_types.h | 9 +--- .../include/dpl/wrt-dao-ro/widget_dao_read_only.h | 15 +++---- packaging/wrt-commons.spec | 8 ++-- 13 files changed, 78 insertions(+), 156 deletions(-) mode change 100755 => 100644 modules/certificate_dao/dao/certificate_dao.cpp mode change 100755 => 100644 modules/widget_dao/dao/widget_dao_read_only.cpp diff --git a/etc/wrt_commons_create_clean_db.sh b/etc/wrt_commons_create_clean_db.sh index 710fb97..bb8d16e 100755 --- a/etc/wrt_commons_create_clean_db.sh +++ b/etc/wrt_commons_create_clean_db.sh @@ -14,47 +14,59 @@ # limitations under the License. # -for name in wrt wrt_custom_handler -do +DB_PATH=/opt/dbspace/ +DB_USER_PATH=/opt/usr/dbspace/ + +function create_db { + name=$1 + dbpath=$2 # extract smack label before removal DB_LABEL="" - if [ -f /opt/dbspace/.$name.db ] + if [ -f $dbpath.$name.db ] then - DB_LABEL=`chsmack /opt/dbspace/.$name.db | sed -r "s/.*access=\"([^\"]+)\"/\1/"` + DB_LABEL=`chsmack $dbpath.$name.db | sed -r "s/.*access=\"([^\"]+)\"/\1/"` fi - rm -f /opt/dbspace/.$name.db + rm -f $dbpath.$name.db # extract smack label before removal JOURNAL_LABEL="" - if [ -f /opt/dbspace/.$name.db-journal ] + if [ -f $dbpath.$name.db-journal ] then - JOURNAL_LABEL=`chsmack /opt/dbspace/.$name.db-journal | sed -r "s/.*access=\"([^\"]+)\"/\1/"` + JOURNAL_LABEL=`chsmack $dbpath.$name.db-journal | sed -r "s/.*access=\"([^\"]+)\"/\1/"` fi - rm -f /opt/dbspace/.$name.db-journal + rm -f $dbpath.$name.db-journal SQL="PRAGMA journal_mode = PERSIST;" - sqlite3 /opt/dbspace/.$name.db "$SQL" + sqlite3 $dbpath.$name.db "$SQL" SQL=".read /usr/share/wrt-engine/"$name"_db.sql" - sqlite3 /opt/dbspace/.$name.db "$SQL" - touch /opt/dbspace/.$name.db-journal - chown 0:6026 /opt/dbspace/.$name.db - chown 0:6026 /opt/dbspace/.$name.db-journal - chmod 660 /opt/dbspace/.$name.db - chmod 660 /opt/dbspace/.$name.db-journal + sqlite3 $dbpath.$name.db "$SQL" + touch $dbpath.$name.db-journal + chown 0:6026 $dbpath.$name.db + chown 0:6026 $dbpath.$name.db-journal + chmod 660 $dbpath.$name.db + chmod 660 $dbpath.$name.db-journal pkill -9 security-serv # restore smack label if [ -n "$DB_LABEL" ] then - chsmack -a $DB_LABEL /opt/dbspace/.$name.db + chsmack -a $DB_LABEL $dbpath.$name.db fi # restore smack label if [ -n "$JOURNAL_LABEL" ] then - chsmack -a $JOURNAL_LABEL /opt/dbspace/.$name.db-journal + chsmack -a $JOURNAL_LABEL $dbpath.$name.db-journal fi -done +} +for name in wrt +do + create_db $name $DB_PATH +done +for name in wrt_custom_handler +do + create_db $name $DB_USER_PATH +done diff --git a/modules/certificate_dao/dao/certificate_dao.cpp b/modules/certificate_dao/dao/certificate_dao.cpp old mode 100755 new mode 100644 index 5bcd6e7..d5506eb --- a/modules/certificate_dao/dao/certificate_dao.cpp +++ b/modules/certificate_dao/dao/certificate_dao.cpp @@ -32,7 +32,7 @@ #include #include #include -/* GCC versions 4.7 had changes to the C++ standard. It +/* GCC versions 4.7 had changes to the C++ standard. It * no longer includes to remove namespace pollution. */ #include @@ -63,7 +63,7 @@ const char* const CERTIFICATE_DATABASE_JOURNAL_FILENAME = "-journal"; const int WEB_APPLICATION_UID = 5000; const int WEB_APPLICATION_GUID = 5000; -std::string createDatabasePath(const WrtDB::WidgetPkgName &pkgName) +std::string createDatabasePath(const WrtDB::TizenPkgId &pkgName) { std::stringstream filename; @@ -73,24 +73,6 @@ std::string createDatabasePath(const WrtDB::WidgetPkgName &pkgName) return filename.str(); } -std::string createDatabasePath(int widgetHandle) -{ - using namespace DPL::DB::ORM; - using namespace WrtDB::WidgetConfig; - using namespace WrtDB::GlobalConfig; - - WrtDB::TizenAppId appid; - - Try - { - appid = WrtDB::WidgetDAOReadOnly::getTzAppId(widgetHandle); - } - Catch(DPL::DB::SqlConnection::Exception::Base) { - LogError("Failed to get database Path"); - } - return createDatabasePath(appid); -} - void checkDatabase(std::string databasePath) { SQL_CONNECTION_EXCEPTION_HANDLER_BEGIN @@ -144,7 +126,7 @@ void checkDatabase(std::string databasePath) } } -CertificateDAO::CertificateDAO(const WrtDB::WidgetPkgName &pkgName) : +CertificateDAO::CertificateDAO(const WrtDB::TizenPkgId &pkgName) : m_certificateDBPath(createDatabasePath(pkgName)), m_certificateDBInterface(m_certificateDBPath, CERTIFICATE_DB_TYPE) { diff --git a/modules/certificate_dao/include/wrt-commons/certificate-dao/certificate_dao.h b/modules/certificate_dao/include/wrt-commons/certificate-dao/certificate_dao.h index 9260ab7..26e981b 100755 --- a/modules/certificate_dao/include/wrt-commons/certificate-dao/certificate_dao.h +++ b/modules/certificate_dao/include/wrt-commons/certificate-dao/certificate_dao.h @@ -38,7 +38,7 @@ class CertificateDAO DECLARE_EXCEPTION_TYPE(Base, DataNotExist) }; - explicit CertificateDAO(const WrtDB::WidgetPkgName &pkgName); + explicit CertificateDAO(const WrtDB::TizenPkgId &pkgName); virtual ~CertificateDAO(); CertificateDataList getCertificateDataList(); Result getResult(const CertificateData &certificateData); diff --git a/modules/custom_handler_dao/dao/CustomHandlerDatabase.cpp b/modules/custom_handler_dao/dao/CustomHandlerDatabase.cpp index d6f70a8..5f26fd7 100644 --- a/modules/custom_handler_dao/dao/CustomHandlerDatabase.cpp +++ b/modules/custom_handler_dao/dao/CustomHandlerDatabase.cpp @@ -18,7 +18,7 @@ namespace CustomHandlerDB { namespace Interface { namespace { -const char* CustomHandler_DB_DATABASE = "/opt/dbspace/.wrt_custom_handler.db"; +const char* CustomHandler_DB_DATABASE = "/opt/usr/dbspace/.wrt_custom_handler.db"; DPL::DB::SqlConnection::Flag::Type CustomHandler_DB_FLAGS = DPL::DB::SqlConnection::Flag::UseLucene; } diff --git a/modules/localization/include/dpl/localization/w3c_file_localization.h b/modules/localization/include/dpl/localization/w3c_file_localization.h index 4f6aa1d..52c3af9 100644 --- a/modules/localization/include/dpl/localization/w3c_file_localization.h +++ b/modules/localization/include/dpl/localization/w3c_file_localization.h @@ -39,7 +39,7 @@ DPL::Optional getFilePathInWidgetPackageFromUrl( WrtDB::DbWidgetHandle widgetHandle, const DPL::String &url); DPL::Optional getFilePathInWidgetPackageFromUrl( - const WrtDB::WidgetPkgName &pkgname, + const WrtDB::TizenAppId &tzAppId, const DPL::String &url); DPL::Optional getFilePathInWidgetPackageFromUrl( WrtDB::WidgetDAOReadOnlyPtr dao, @@ -49,37 +49,37 @@ DPL::Optional getFilePathInWidgetPackage( WrtDB::DbWidgetHandle widgetHandle, const DPL::String& file); DPL::Optional getFilePathInWidgetPackage( - const WrtDB::WidgetPkgName &pkgname, + const WrtDB::TizenAppId &tzAppId, const DPL::String& file); DPL::Optional getFilePathInWidgetPackage( WrtDB::WidgetDAOReadOnlyPtr dao, const DPL::String& file); DPL::OptionalString getStartFile(WrtDB::DbWidgetHandle handle); -DPL::OptionalString getStartFile(const WrtDB::WidgetPkgName & pkgname); +DPL::OptionalString getStartFile(const WrtDB::TizenAppId & tzAppId); DPL::OptionalString getStartFile(WrtDB::WidgetDAOReadOnlyPtr dao); OptionalWidgetIcon getIcon(WrtDB::DbWidgetHandle widgetHandle); -OptionalWidgetIcon getIcon(const WrtDB::WidgetPkgName & pkgname); +OptionalWidgetIcon getIcon(const WrtDB::TizenAppId & tzAppId); OptionalWidgetIcon getIcon(WrtDB::WidgetDAOReadOnlyPtr dao); WidgetIconList getValidIconsList( WrtDB::DbWidgetHandle widgetHandle); WidgetIconList getValidIconsList( - const WrtDB::WidgetPkgName &pkgname); + const WrtDB::TizenAppId &tzAppId); WidgetIconList getValidIconsList( WrtDB::WidgetDAOReadOnlyPtr dao); OptionalWidgetStartFileInfo getStartFileInfo( WrtDB::DbWidgetHandle widgetHandle); OptionalWidgetStartFileInfo getStartFileInfo( - const WrtDB::WidgetPkgName &pkgname); + const WrtDB::TizenAppId &tzAppId); OptionalWidgetStartFileInfo getStartFileInfo( WrtDB::WidgetDAOReadOnlyPtr dao); WrtDB::WidgetLocalizedInfo getLocalizedInfo(WrtDB::DbWidgetHandle widgetHandle); WrtDB::WidgetLocalizedInfo getLocalizedInfo( - const WrtDB::WidgetPkgName & pkgname); + const WrtDB::TizenAppId & tzAppId); WrtDB::WidgetLocalizedInfo getLocalizedInfo(WrtDB::WidgetDAOReadOnlyPtr dao); } diff --git a/modules/localization/src/w3c_file_localization.cpp b/modules/localization/src/w3c_file_localization.cpp index 8c34ce7..85ac27e 100644 --- a/modules/localization/src/w3c_file_localization.cpp +++ b/modules/localization/src/w3c_file_localization.cpp @@ -127,11 +127,11 @@ DPL::Optional getFilePathInWidgetPackageFromUrl( } DPL::Optional getFilePathInWidgetPackageFromUrl( - const WrtDB::WidgetPkgName &pkgname, + const WrtDB::TizenAppId &tzAppId, const DPL::String &url) { return getFilePathInWidgetPackageFromUrl( - WidgetDAOReadOnlyPtr(new WidgetDAOReadOnly(pkgname)), + WidgetDAOReadOnlyPtr(new WidgetDAOReadOnly(tzAppId)), url); } @@ -141,18 +141,6 @@ DPL::Optional getFilePathInWidgetPackageFromUrl( { DPL::String req = url; - DPL::String::size_type pos = req.find_first_of('#'); - if(pos != DPL::String::npos) - { - req.resize(pos); //truncate fragment identifier - } - - pos = req.find_first_of('?'); - if(pos != DPL::String::npos) - { - req.resize(pos); //truncate query string - } - if (req.find(WIDGET_URI_BEGIN) == 0) { req.erase(0, WIDGET_URI_BEGIN.length()); } else if (req.find(FILE_URI_BEGIN) == 0) { @@ -209,11 +197,11 @@ DPL::Optional getFilePathInWidgetPackage( } DPL::Optional getFilePathInWidgetPackage( - const WrtDB::WidgetPkgName &pkgname, + const WrtDB::TizenAppId &tzAppId, const DPL::String& file) { return getFilePathInWidgetPackage( - WidgetDAOReadOnlyPtr(new WidgetDAOReadOnly(pkgname)), + WidgetDAOReadOnlyPtr(new WidgetDAOReadOnly(tzAppId)), file); } @@ -224,9 +212,9 @@ DPL::Optional getFilePathInWidgetPackage( return GetFilePathInWidgetPackageInternal(dao->getPath(), file); } -DPL::OptionalString getStartFile(const WrtDB::WidgetPkgName & pkgname) +DPL::OptionalString getStartFile(const WrtDB::TizenAppId & tzAppId) { - return getStartFile(WidgetDAOReadOnlyPtr(new WidgetDAOReadOnly(pkgname))); + return getStartFile(WidgetDAOReadOnlyPtr(new WidgetDAOReadOnly(tzAppId))); } DPL::OptionalString getStartFile(const WrtDB::DbWidgetHandle handle) @@ -265,9 +253,9 @@ DPL::OptionalString getStartFile(WrtDB::WidgetDAOReadOnlyPtr dao) return DPL::OptionalString::Null; } -OptionalWidgetIcon getIcon(const WrtDB::WidgetPkgName & pkgname) +OptionalWidgetIcon getIcon(const WrtDB::TizenAppId & tzAppId) { - return getIcon(WidgetDAOReadOnlyPtr(new WidgetDAOReadOnly(pkgname))); + return getIcon(WidgetDAOReadOnlyPtr(new WidgetDAOReadOnly(tzAppId))); } OptionalWidgetIcon getIcon(WrtDB::DbWidgetHandle widgetHandle) @@ -316,10 +304,10 @@ WidgetIconList getValidIconsList(WrtDB::DbWidgetHandle widgetHandle) WidgetDAOReadOnlyPtr(new WidgetDAOReadOnly(widgetHandle))); } -WidgetIconList getValidIconsList(const WrtDB::WidgetPkgName &pkgname) +WidgetIconList getValidIconsList(const WrtDB::TizenAppId &tzAppId) { return getValidIconsList( - WidgetDAOReadOnlyPtr(new WidgetDAOReadOnly(pkgname))); + WidgetDAOReadOnlyPtr(new WidgetDAOReadOnly(tzAppId))); } WidgetIconList getValidIconsList(WrtDB::WidgetDAOReadOnlyPtr dao) @@ -351,10 +339,10 @@ OptionalWidgetStartFileInfo getStartFileInfo(WrtDB::DbWidgetHandle widgetHandle) } OptionalWidgetStartFileInfo getStartFileInfo( - const WrtDB::WidgetPkgName &pkgname) + const WrtDB::TizenAppId &tzAppId) { return getStartFileInfo( - WidgetDAOReadOnlyPtr(new WidgetDAOReadOnly(pkgname))); + WidgetDAOReadOnlyPtr(new WidgetDAOReadOnly(tzAppId))); } OptionalWidgetStartFileInfo getStartFileInfo(WrtDB::WidgetDAOReadOnlyPtr dao) @@ -401,9 +389,9 @@ WidgetLocalizedInfo getLocalizedInfo(const WrtDB::DbWidgetHandle handle) return getLocalizedInfo(WidgetDAOReadOnlyPtr(new WidgetDAOReadOnly(handle))); } -WidgetLocalizedInfo getLocalizedInfo(const WrtDB::WidgetPkgName & pkgname) +WidgetLocalizedInfo getLocalizedInfo(const WrtDB::TizenAppId & tzAppId) { - return getLocalizedInfo(WidgetDAOReadOnlyPtr(new WidgetDAOReadOnly(pkgname))); + return getLocalizedInfo(WidgetDAOReadOnlyPtr(new WidgetDAOReadOnly(tzAppId))); } WidgetLocalizedInfo getLocalizedInfo(WidgetDAOReadOnlyPtr dao) diff --git a/modules/security_origin_dao/dao/security_origin_dao.cpp b/modules/security_origin_dao/dao/security_origin_dao.cpp index f3c4740..0293898 100755 --- a/modules/security_origin_dao/dao/security_origin_dao.cpp +++ b/modules/security_origin_dao/dao/security_origin_dao.cpp @@ -61,7 +61,7 @@ const char* const SECURITY_DATABASE_JOURNAL_FILENAME = "-journal"; const int WEB_APPLICATION_UID = 5000; const int WEB_APPLICATION_GUID = 5000; -std::string createDatabasePath(const WrtDB::WidgetPkgName &pkgName) +std::string createDatabasePath(const WrtDB::TizenPkgId &pkgName) { std::stringstream filename; @@ -71,24 +71,6 @@ std::string createDatabasePath(const WrtDB::WidgetPkgName &pkgName) return filename.str(); } -std::string createDatabasePath(int widgetHandle) -{ - using namespace DPL::DB::ORM; - using namespace WrtDB::WidgetConfig; - using namespace WrtDB::GlobalConfig; - - WrtDB::TizenAppId appid; - - Try - { - appid = WrtDB::WidgetDAOReadOnly::getTzAppId(widgetHandle); - } - Catch(DPL::DB::SqlConnection::Exception::Base) { - LogError("Failed to get database Path"); - } - return createDatabasePath(appid); -} - void checkDatabase(std::string databasePath) { SQL_CONNECTION_EXCEPTION_HANDLER_BEGIN @@ -142,15 +124,7 @@ void checkDatabase(std::string databasePath) } } -SecurityOriginDAO::SecurityOriginDAO(int handle) : - m_securityOriginDBPath(createDatabasePath(handle)), - m_securityOriginDBInterface(m_securityOriginDBPath, SECURITY_ORIGIN_DB_TYPE) -{ - checkDatabase(m_securityOriginDBPath); - m_securityOriginDBInterface.AttachToThread(SECURITY_ORIGIN_DB_OPTION); -} - -SecurityOriginDAO::SecurityOriginDAO(const WrtDB::WidgetPkgName &pkgName) : +SecurityOriginDAO::SecurityOriginDAO(const WrtDB::TizenPkgId &pkgName) : m_securityOriginDBPath(createDatabasePath(pkgName)), m_securityOriginDBInterface(m_securityOriginDBPath, SECURITY_ORIGIN_DB_TYPE) { diff --git a/modules/security_origin_dao/include/wrt-commons/security-origin-dao/security_origin_dao.h b/modules/security_origin_dao/include/wrt-commons/security-origin-dao/security_origin_dao.h index 146ea6d..e8c8604 100755 --- a/modules/security_origin_dao/include/wrt-commons/security-origin-dao/security_origin_dao.h +++ b/modules/security_origin_dao/include/wrt-commons/security-origin-dao/security_origin_dao.h @@ -39,8 +39,7 @@ class SecurityOriginDAO DECLARE_EXCEPTION_TYPE(Base, DataNotExist) }; - explicit SecurityOriginDAO(int handle) __attribute__((deprecated)); - explicit SecurityOriginDAO(const WrtDB::WidgetPkgName &pkgName); + explicit SecurityOriginDAO(const WrtDB::TizenPkgId &pkgName); virtual ~SecurityOriginDAO(); SecurityOriginDataList getSecurityOriginDataList(); Result getResult(const SecurityOriginData &securityOriginData); diff --git a/modules/utils/src/warp_iri.cpp b/modules/utils/src/warp_iri.cpp index ae30121..4f6aa0c 100644 --- a/modules/utils/src/warp_iri.cpp +++ b/modules/utils/src/warp_iri.cpp @@ -111,8 +111,6 @@ void WarpIRI::set(const char *p_iri, } } - DPL::String str = DPL::FromASCIIString(std::string(iri->host)); - std::string utf8host = iri->host; std::list hostTokenList; DPL::Tokenize(utf8host, ".", std::front_inserter(hostTokenList)); diff --git a/modules/widget_dao/dao/widget_dao_read_only.cpp b/modules/widget_dao/dao/widget_dao_read_only.cpp old mode 100755 new mode 100644 index 2afc1b9..877b2cd --- a/modules/widget_dao/dao/widget_dao_read_only.cpp +++ b/modules/widget_dao/dao/widget_dao_read_only.cpp @@ -156,7 +156,7 @@ TizenAppId getTizenAppIdByPkgId(const TizenPkgId tzPkgid) SQL_CONNECTION_EXCEPTION_HANDLER_END("Failed in getHandle") } -WidgetPkgName getTizenPkgIdByHandle(const DbWidgetHandle handle) +TizenPkgId getTizenPkgIdByHandle(const DbWidgetHandle handle) { LogDebug("Getting TizenPkgId by DbWidgetHandle: " << handle); @@ -170,7 +170,7 @@ WidgetPkgName getTizenPkgIdByHandle(const DbWidgetHandle handle) ThrowMsg(WidgetDAOReadOnly::Exception::WidgetNotExist, "Failed to get widget by handle"); } - WidgetPkgName tzPkgid = rowList.front().Get_tizen_pkgid(); + TizenPkgId tzPkgid = rowList.front().Get_tizen_pkgid(); return tzPkgid; } @@ -189,7 +189,7 @@ WidgetDAOReadOnly::WidgetDAOReadOnly(DPL::OptionalString widgetGUID) : m_widgetHandle(WidgetDAOReadOnly::getHandle(widgetGUID)) {} -WidgetDAOReadOnly::WidgetDAOReadOnly(DPL::String tzAppid) : +WidgetDAOReadOnly::WidgetDAOReadOnly(TizenAppId tzAppid) : m_widgetHandle(WidgetDAOReadOnly::getHandle(tzAppid)) {} @@ -239,21 +239,6 @@ DbWidgetHandle WidgetDAOReadOnly::getHandle(const DPL::String tzAppId) SQL_CONNECTION_EXCEPTION_HANDLER_END("Failed in getHandle") } -WidgetPkgName WidgetDAOReadOnly::getPkgName() const -{ - return getTizenPkgIdByHandle(m_widgetHandle); -} - -WidgetPkgName WidgetDAOReadOnly::getPkgName(const WidgetGUID GUID) -{ - return getTizenPkgIdByHandle(getHandle(GUID)); -} - -WidgetPkgName WidgetDAOReadOnly::getPkgName(const DbWidgetHandle handle) -{ - return getTizenPkgIdByHandle(handle); -} - TizenAppId WidgetDAOReadOnly::getTzAppId() const { return getTizenAppIdByHandle(m_widgetHandle); @@ -274,6 +259,11 @@ TizenAppId WidgetDAOReadOnly::getTzAppId(const TizenPkgId tzPkgid) return getTizenAppIdByPkgId(tzPkgid); } +TizenPkgId WidgetDAOReadOnly::getTzPkgId() const +{ + return getTizenPkgIdByHandle(m_widgetHandle); +} + PropertyDAOReadOnly::WidgetPropertyKeyList WidgetDAOReadOnly::getPropertyKeyList() const { @@ -433,17 +423,6 @@ DbWidgetHandleList WidgetDAOReadOnly::getHandleList() SQL_CONNECTION_EXCEPTION_HANDLER_END("Failed to get handle list") } -WidgetPkgNameList WidgetDAOReadOnly::getPkgnameList() -{ - LogDebug("Getting Pkgname List "); - SQL_CONNECTION_EXCEPTION_HANDLER_BEGIN - { - WRT_DB_SELECT(select, WidgetInfo, &WrtDatabase::interface()) - return select->GetValueList(); - } - SQL_CONNECTION_EXCEPTION_HANDLER_END("Failed to get Pkgname list") -} - TizenAppIdList WidgetDAOReadOnly::getTizenAppidList() { LogDebug("Getting Pkgname List "); diff --git a/modules/widget_dao/include/dpl/wrt-dao-ro/common_dao_types.h b/modules/widget_dao/include/dpl/wrt-dao-ro/common_dao_types.h index c345fc8..0ee8e52 100644 --- a/modules/widget_dao/include/dpl/wrt-dao-ro/common_dao_types.h +++ b/modules/widget_dao/include/dpl/wrt-dao-ro/common_dao_types.h @@ -81,7 +81,6 @@ class PluginObjectsDAO typedef int DbWidgetHandle; typedef DPL::String TizenPkgId; typedef DPL::String TizenAppId; -typedef DPL::String WidgetPkgName; /** * Value of invalid widget handle @@ -213,13 +212,7 @@ typedef std::multiset DbWidgetFeatureSet; * @brief Default container with DbWidgetHandle's */ typedef std::list DbWidgetHandleList; - -typedef std::list WidgetPkgNameList; //TODO: this cannot be null - // -> appropriate changes in - // db schema needed -typedef std::list TizenAppIdList; //TODO: this cannot be null -> - // appropriate changes in db - // schema needed +typedef std::list TizenAppIdList; class WidgetDAOReadOnly; //forward declaration typedef std::shared_ptr WidgetDAOReadOnlyPtr; diff --git a/modules/widget_dao/include/dpl/wrt-dao-ro/widget_dao_read_only.h b/modules/widget_dao/include/dpl/wrt-dao-ro/widget_dao_read_only.h index 5e585c2..a37da85 100755 --- a/modules/widget_dao/include/dpl/wrt-dao-ro/widget_dao_read_only.h +++ b/modules/widget_dao/include/dpl/wrt-dao-ro/widget_dao_read_only.h @@ -295,7 +295,7 @@ class WidgetDAOReadOnly */ WidgetDAOReadOnly(DbWidgetHandle widgetHandle); WidgetDAOReadOnly(DPL::OptionalString widgetGUID); - WidgetDAOReadOnly(DPL::String tzAppid); + WidgetDAOReadOnly(WrtDB::TizenAppId tzAppid); /** * Destructor @@ -329,17 +329,15 @@ class WidgetDAOReadOnly static TizenAppId getTzAppId(const TizenPkgId tzPkgid); /** - * Returns WidgetPkgName for the specified widget + * Returns TizenPkgId for the specified widget * - * @return pkgName; + * @return TizenPkgId; * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table. * @exception WRT_CONF_ERR_EMDB_NO_RECORD - Can not find matching records in * DB table. */ - WidgetPkgName getPkgName() const; - static WidgetPkgName getPkgName(const WidgetGUID GUID); - static WidgetPkgName getPkgName(const DbWidgetHandle handle); + TizenPkgId getTzPkgId() const; /** * This method returns the root directory of widget resource. @@ -597,11 +595,10 @@ class WidgetDAOReadOnly static DbWidgetHandleList getHandleList(); /** - * This method returns list of pkgname of installed packages - * @return list of pkgname of installed packages + * This method returns list of tizen application list of installed packages + * @return list of TizenAppIdList of installed packages */ static TizenAppIdList getTizenAppidList(); - static WidgetPkgNameList getPkgnameList(); /** * This method returns a list of all the installed widgets. diff --git a/packaging/wrt-commons.spec b/packaging/wrt-commons.spec index 8ffb518..d63942a 100644 --- a/packaging/wrt-commons.spec +++ b/packaging/wrt-commons.spec @@ -1,7 +1,7 @@ -#git:framework/web/wrt-commons wrt-commons 0.2.109 +#git:framework/web/wrt-commons wrt-commons 0.2.110 Name: wrt-commons Summary: Wrt common library -Version: 0.2.109 +Version: 0.2.110 Release: 1 Group: Development/Libraries License: Apache License, Version 2.0 @@ -123,8 +123,8 @@ fi # 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_custom_handler' /opt/dbspace/.wrt_custom_handler.db -chsmack -a 'wrt-commons::db_wrt_custom_handler' /opt/dbspace/.wrt_custom_handler.db-journal +chsmack -a 'wrt-commons::db_wrt_custom_handler' /opt/usr/dbspace/.wrt_custom_handler.db +chsmack -a 'wrt-commons::db_wrt_custom_handler' /opt/usr/dbspace/.wrt_custom_handler.db-journal echo "[WRT] wrt-commons postinst done ..." -- 2.7.4