From: Jihoon Chung Date: Tue, 28 May 2013 01:25:56 +0000 (+0900) Subject: Add widget_config for shared directory X-Git-Tag: submit/tizen_2.2/20130927.091100^2~83 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f8b74a4d3b1b13da49d56449ea130abe53cc53c3;p=platform%2Fframework%2Fweb%2Fwrt-commons.git Add widget_config for shared directory [Issue#] N/A [Problem] N/A [Cause] N/A [Solution] Add path builder for shared directory [SCMRequest] N/A Change-Id: I2ca612caabc7673b0f6f359494706523304db55b --- diff --git a/modules/widget_dao/include/dpl/wrt-dao-ro/global_config.h b/modules/widget_dao/include/dpl/wrt-dao-ro/global_config.h index a1eeb36..19791e7 100644 --- a/modules/widget_dao/include/dpl/wrt-dao-ro/global_config.h +++ b/modules/widget_dao/include/dpl/wrt-dao-ro/global_config.h @@ -124,14 +124,6 @@ inline const char* GetWidgetPrivateStoragePath() return "data"; } -/** - * widgets share directory path - */ -inline const char* GetWidgetSharePath() -{ - return "share"; -} - /** * widgets desktop files path */ @@ -284,6 +276,26 @@ inline const char* GetTempInstallInfoPath() { return "/opt/share/widget/temp_info"; } + +inline const char* GetWidgetSharedPath() +{ + return "/shared"; +} + +inline const char* GetWidgetDataPath() +{ + return "/data"; +} + +inline const char* GetWidgetTrustedPath() +{ + return "/trusted"; +} + +inline const char* GetWidgetResPath() +{ + return "/res"; +} } // namespace GlobalConfig } // namespace WrtDB diff --git a/modules/widget_dao/include/dpl/wrt-dao-ro/widget_config.h b/modules/widget_dao/include/dpl/wrt-dao-ro/widget_config.h index 1144bdc..04275ba 100644 --- a/modules/widget_dao/include/dpl/wrt-dao-ro/widget_config.h +++ b/modules/widget_dao/include/dpl/wrt-dao-ro/widget_config.h @@ -69,6 +69,36 @@ inline std::string GetWidgetDesktopFilePath(DPL::String tzPkgId) .Concat(".desktop") .GetFullPath(); } + +inline std::string GetWidgetSharedStoragePath(DPL::String tzPkgId) +{ + return PathBuilder() + .Append(GlobalConfig::GetWidgetUserDataPath()) + .Append(DPL::ToUTF8String(tzPkgId)) + .Concat(GlobalConfig::GetWidgetSharedPath()) + .GetFullPath(); +} + +inline std::string GetWidgetSharedDataStoragePath(DPL::String tzPkgId) +{ + return PathBuilder(GetWidgetSharedStoragePath(tzPkgId)) + .Concat(GlobalConfig::GetWidgetDataPath()) + .GetFullPath(); +} + +inline std::string GetWidgetSharedTrustedStoragePath(DPL::String tzPkgId) +{ + return PathBuilder(GetWidgetSharedStoragePath(tzPkgId)) + .Concat(GlobalConfig::GetWidgetTrustedPath()) + .GetFullPath(); +} + +inline std::string GetWidgetSharedResStoragePath(DPL::String tzPkgId) +{ + return PathBuilder(GetWidgetSharedStoragePath(tzPkgId)) + .Concat(GlobalConfig::GetWidgetResPath()) + .GetFullPath(); +} } // namespace WidgetConfig } // namespace WrtDB