Change pkgname to appid for docomo request. PART1
[platform/framework/web/wrt-installer.git] / src / jobs / widget_install / task_database.cpp
index 78c06ef..8ba08cf 100644 (file)
@@ -74,7 +74,7 @@ void TaskDatabase::StepWrtDBInsert()
             Try
             {
                 m_handleToRemove = WidgetDAOReadOnly::getHandle(
-                    m_context.locations->getPkgname());
+                    m_context.widgetConfig.tzAppid);
             }
             Catch(WidgetDAOReadOnly::Exception::WidgetNotExist)
             {
@@ -82,21 +82,21 @@ void TaskDatabase::StepWrtDBInsert()
                 ThrowMsg(Exceptions::InvalidPackage, "Given tizenId not found for update installation");
             }
             WidgetDAO::registerOrUpdateWidget(
-                    m_context.locations->getPkgname(),
+                    m_context.widgetConfig.tzAppid,
                     m_context.widgetConfig,
                     m_context.wacSecurity);
             m_handle = WidgetDAOReadOnly::getHandle(
-                m_context.locations->getPkgname());
+                m_context.widgetConfig.tzAppid);
         }
         else //new installation
         {
             LogInfo("Registering widget...");
             WidgetDAO::registerWidget(
-                    m_context.locations->getPkgname(),
+                    m_context.widgetConfig.tzAppid,
                     m_context.widgetConfig,
                     m_context.wacSecurity);
             m_handle = WidgetDAOReadOnly::getHandle(
-                m_context.locations->getPkgname());
+                m_context.widgetConfig.tzAppid);
         }
 
         FOREACH (cap, m_context.staticPermittedDevCaps) {
@@ -150,7 +150,7 @@ void TaskDatabase::StepRegisterExternalFiles()
     {
         Try
         {
-            WidgetDAO dao(m_context.locations->getPkgname());
+            WidgetDAO dao(m_context.widgetConfig.tzAppid);
             WrtDB::ExternalLocationList externalLocationsDB = dao.getWidgetExternalLocations();
             FOREACH(file, externalLocationsDB)
             {
@@ -211,22 +211,22 @@ void TaskDatabase::StepCreateVconf()
     std::map<std::string, WrtDB::SettingsType> vconfData;
     vconfData[
         WrtDB::VconfConfig::GetVconfKeyPopupUsage(
-            m_context.locations->getPkgname())] = WrtDB::SETTINGS_TYPE_ON;
+            m_context.widgetConfig.tzAppid)] = WrtDB::SETTINGS_TYPE_ON;
     vconfData[
         WrtDB::VconfConfig::GetVconfKeyGeolocationUsage(
-            m_context.locations->getPkgname())] = WrtDB::SETTINGS_TYPE_ON;
+            m_context.widgetConfig.tzAppid)] = WrtDB::SETTINGS_TYPE_ON;
     vconfData[
         WrtDB::VconfConfig::GetVconfKeyWebNotificationUsage(
-            m_context.locations->getPkgname())] = WrtDB::SETTINGS_TYPE_ON;
+            m_context.widgetConfig.tzAppid)] = WrtDB::SETTINGS_TYPE_ON;
     vconfData[
         WrtDB::VconfConfig::GetVconfKeyWebDatabaseUsage(
-            m_context.locations->getPkgname())] = WrtDB::SETTINGS_TYPE_ON;
+            m_context.widgetConfig.tzAppid)] = WrtDB::SETTINGS_TYPE_ON;
     vconfData[
         WrtDB::VconfConfig::GetVconfKeyFilesystemUsage(
-            m_context.locations->getPkgname())] = WrtDB::SETTINGS_TYPE_ON;
+            m_context.widgetConfig.tzAppid)] = WrtDB::SETTINGS_TYPE_ON;
     vconfData[
         WrtDB::VconfConfig::GetVconfKeyMemorySavingMode(
-            m_context.locations->getPkgname())] = WrtDB::SETTINGS_TYPE_OFF;
+            m_context.widgetConfig.tzAppid)] = WrtDB::SETTINGS_TYPE_OFF;
 
     // vconftool -g 5000 set -t int <path> initialize value
     // Current installer should use vconftool for setting group ID
@@ -249,7 +249,7 @@ void TaskDatabase::StepAbortDBInsert()
     LogWarning("[DB Update Task] Aborting... (DB Clean)");
     Try
     {
-        WidgetDAO::unregisterWidget(m_context.locations->getPkgname());
+        WidgetDAO::unregisterWidget(m_context.widgetConfig.tzAppid);
         LogDebug("Cleaning DB successful!");
     }
     Catch(DPL::DB::SqlConnection::Exception::Base)