Add widget_config for shared directory
authorJihoon Chung <jihoon.chung@samsung.com>
Tue, 28 May 2013 01:25:56 +0000 (10:25 +0900)
committerJihoon Chung <jihoon.chung@samsung.com>
Tue, 28 May 2013 02:07:00 +0000 (11:07 +0900)
[Issue#] N/A
[Problem] N/A
[Cause] N/A
[Solution] Add path builder for shared directory
[SCMRequest] N/A

Change-Id: I2ca612caabc7673b0f6f359494706523304db55b

modules/widget_dao/include/dpl/wrt-dao-ro/global_config.h
modules/widget_dao/include/dpl/wrt-dao-ro/widget_config.h

index a1eeb36..19791e7 100644 (file)
@@ -125,14 +125,6 @@ inline const char* GetWidgetPrivateStoragePath()
 }
 
 /**
- * widgets share directory path
- */
-inline const char* GetWidgetSharePath()
-{
-    return "share";
-}
-
-/**
  * widgets desktop files path
  */
 inline const char* GetUserWidgetDesktopPath()
@@ -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
 
index 1144bdc..04275ba 100644 (file)
@@ -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