[Release] wrt-installer_0.0.89 submit/tizen_2.0/20130102.024045
authorJihoon Chung <jihoon.chung@samsung.com>
Wed, 2 Jan 2013 02:39:09 +0000 (11:39 +0900)
committerJihoon Chung <jihoon.chung@samsung.com>
Wed, 2 Jan 2013 02:39:09 +0000 (11:39 +0900)
Change-Id: I8c74269f701b060793ef2e64b9c6e103af3ea2c4

debian/changelog
packaging/wrt-installer.spec
src/configuration_parser/widget_parser.cpp
src/jobs/widget_install/task_database.cpp
src/jobs/widget_install/task_file_manipulation.cpp
src/jobs/widget_install/widget_install_errors.h
src/jobs/widget_uninstall/task_remove_files.cpp

index 182b579..a9505da 100644 (file)
@@ -1,3 +1,15 @@
+wrt-installer (0.0.89) unstable; urgency=low
+
+  * Throw error on no ElementParser
+  * Closed directory
+  * Apply vconf key path builder
+  * Add vconf creation for memory saving mode
+
+  * Git : framework/web/wrt-installer
+  * Tag : wrt-installer_0.0.89
+
+ -- Jihoon Chung <jihoon.chung@samsung.com>  Wed, 02 Jan 2013 11:17:14 +0900
+
 wrt-installer (0.0.88) unstable; urgency=low
 
   * Create/Remove vconf for security settings
index 8d71075..1e54895 100644 (file)
@@ -1,7 +1,7 @@
-#git:framework/web/wrt-installer wrt-installer 0.0.88
+#git:framework/web/wrt-installer wrt-installer 0.0.89
 Name:       wrt-installer
 Summary:    Installer for tizen Webruntime
-Version:    0.0.88
+Version:    0.0.89
 Release:    1
 Group:      Development/Libraries
 License:    Apache License, Version 2.0
index c64171b..f33004c 100755 (executable)
@@ -1682,6 +1682,8 @@ class LiveboxParser : public ElementParser
                 return DPL::MakeDelegate(this, &LiveboxParser::BoxContentParser::OnBoxSizeElement);
             } else if (name == L"pd") {
                 return DPL::MakeDelegate(this, &LiveboxParser::BoxContentParser::OnPdElement);
+            } else{
+                ThrowMsg(Exception::ParseError, "No element parser for name: " << name);
             }
         }
 
index 8df7c1a..696a962 100644 (file)
@@ -27,6 +27,7 @@
 #include <widget_install/widget_install_errors.h>
 #include <widget_install/widget_install_context.h>
 #include <dpl/wrt-dao-rw/widget_dao.h>
+#include <dpl/wrt-dao-ro/vconf_config.h>
 #include <dpl/foreach.h>
 #include <dpl/utils/wrt_utility.h>
 #include <dpl/log/log.h>
@@ -44,15 +45,6 @@ using namespace WrtDB;
 namespace Jobs {
 namespace WidgetInstall {
 
-namespace {
-const char * const VCONF_KEY_PREFIX = "file/private/";
-const char * const VCONF_KEY_GROUP = "/security";
-const char * const VCONF_KEY_POPUP_USAGE = "/popup_usage";
-const char * const VCONF_KEY_GEOLOCATION_USAGE = "/geolocation_usage";
-const char * const VCONF_KEY_WEB_NOTIFICATION_USAGE = "/web_notification_usage";
-const char * const VCONF_KEY_WEB_DATABASE_USAGE = "/web_database_usage";
-const char * const VCONF_KEY_FILESYSTEM_USAGE = "/filesystem_usage";
-}
 TaskDatabase::TaskDatabase(InstallerContext& context) :
     DPL::TaskDecl<TaskDatabase>(this),
     m_context(context),
@@ -199,21 +191,30 @@ void TaskDatabase::StepRemoveExternalFiles()
 void TaskDatabase::StepCreateVconf()
 {
     LogDebug("StepCreateVconf");
-     std::string keyPrefix =
-        VCONF_KEY_PREFIX
-        + DPL::ToUTF8String(m_context.locations->getPkgname())
-        + VCONF_KEY_GROUP;
-    std::string securityPopupUsageKey = keyPrefix + VCONF_KEY_POPUP_USAGE;
-    std::string geolocationUsageKey = keyPrefix + VCONF_KEY_GEOLOCATION_USAGE;
-    std::string webNotificationUsageKey = keyPrefix + VCONF_KEY_WEB_NOTIFICATION_USAGE;
-    std::string webDatabaseUsageKey = keyPrefix + VCONF_KEY_WEB_DATABASE_USAGE;
-    std::string filesystemUsageKey = keyPrefix + VCONF_KEY_FILESYSTEM_USAGE;
-
-    vconf_set_int(securityPopupUsageKey.c_str(),
+    std::string popupUsageKey =
+        WrtDB::VconfConfig::GetVconfKeyPopupUsage(
+            m_context.locations->getPkgname());
+    std::string geolocationUsageKey =
+        WrtDB::VconfConfig::GetVconfKeyGeolocationUsage(
+            m_context.locations->getPkgname());
+    std::string webNotificationUsageKey =
+        WrtDB::VconfConfig::GetVconfKeyWebNotificationUsage(
+            m_context.locations->getPkgname());
+    std::string webDatabaseUsageKey =
+        WrtDB::VconfConfig::GetVconfKeyWebDatabaseUsage(
+            m_context.locations->getPkgname());
+    std::string filesystemUsageKey =
+        WrtDB::VconfConfig::GetVconfKeyFilesystemUsage(
+            m_context.locations->getPkgname());
+    std::string memorySavingModeKey =
+        WrtDB::VconfConfig::GetVconfKeyMemorySavingMode(
+            m_context.locations->getPkgname());
+
+    vconf_set_int(popupUsageKey.c_str(),
                   static_cast<int>(WrtDB::SETTINGS_TYPE_ON));
     // prevent permission error
-    vconf_unset(securityPopupUsageKey.c_str());
-    vconf_set_int(securityPopupUsageKey.c_str(),
+    vconf_unset(popupUsageKey.c_str());
+    vconf_set_int(popupUsageKey.c_str(),
                   static_cast<int>(WrtDB::SETTINGS_TYPE_ON));
     vconf_set_int(geolocationUsageKey.c_str(),
                   static_cast<int>(WrtDB::SETTINGS_TYPE_ON));
@@ -223,6 +224,8 @@ void TaskDatabase::StepCreateVconf()
                   static_cast<int>(WrtDB::SETTINGS_TYPE_ON));
     vconf_set_int(filesystemUsageKey.c_str(),
                   static_cast<int>(WrtDB::SETTINGS_TYPE_ON));
+    vconf_set_int(memorySavingModeKey.c_str(),
+                  static_cast<int>(WrtDB::SETTINGS_TYPE_OFF));
 }
 
 void TaskDatabase::StepAbortDBInsert()
index b054e55..a41239e 100644 (file)
@@ -86,6 +86,7 @@ bool _FolderCopy(std::string source, std::string dest)
             infile.close();
         }
     } while(dEntry);
+    closedir(dir);
     return true;
 }
 }
index 7c24dfa..109caff 100644 (file)
@@ -47,7 +47,7 @@ enum Type
     ErrorDeferred,                   ///< Widget installation was deferred and will be continued when possible
     ErrorDatabaseFailure,            ///< Failure in database
     ErrorRemovingFolderFailure,      ///< Failure in removing existing widget folder
-    ErrorCreateVconfFailure,        ///< Failure in creating vconf
+    ErrorCreateVconfFailure,         ///< Failure in creating vconf
     ErrorInstallOspServcie,          ///< Failure in installing osp service
     ErrorUpdateWidget,               ///< Failure in widget update.
     ErrorInstallToExt,               ///< Failure in install to sdcard
index 2d814b4..d7c3157 100644 (file)
@@ -25,6 +25,7 @@
 #include <widget_uninstall/uninstaller_context.h>
 #include <dpl/wrt-dao-rw/widget_dao.h>
 #include <dpl/wrt-dao-ro/widget_config.h>
+#include <dpl/wrt-dao-ro/vconf_config.h>
 #include <dpl/assert.h>
 #include <dpl/utils/wrt_utility.h>
 #include <ail.h>
@@ -178,8 +179,8 @@ void TaskRemoveFiles::StepRemoveExternalLocations()
 void TaskRemoveFiles::StepRemoveVconf()
 {
     std::string key =
-        VCONF_KEY_PREFIX
-        + DPL::ToUTF8String(m_context.locations->getPkgname()) ;
+        WrtDB::VconfConfig::GetVconfKeyRootPath(
+            m_context.locations->getPkgname());
     if(vconf_unset_recursive(key.c_str())) {
         LogError("Fail to unset vconf file");
     } else {