Save value of auto-launch to livebox DB without adding manifest file
authorYunchan Cho <yunchan.cho@samsung.com>
Tue, 26 Mar 2013 11:38:46 +0000 (20:38 +0900)
committerYunchan Cho <yunchan.cho@samsung.com>
Thu, 28 Mar 2013 12:06:58 +0000 (21:06 +0900)
[Issue#] DCM-962
[Problem] There is no way for webapp to know that the webapp is launched by web livebox
[Cause] wrt-installer doesn't save value 'auto-launch' attribute to web livebox DB
[Solution] value of 'auto-launch' is saved to web livebox DB by installer.
           This value is used by web-provider on clicking box.

Change-Id: I8e1e4538ef55f80aab93972f9b52996159f427cb

src/jobs/widget_install/manifest.h
src/jobs/widget_install/task_database.cpp
src/jobs/widget_install/task_manifest_file.cpp

index 20236a4..e6f7827 100644 (file)
@@ -403,10 +403,6 @@ class LiveBox
     {
         this->primary = x;
     }
-    void setAutoLaunch(const NcnameType &x)
-    {
-        this->autoLaunch = x;
-    }
     void setUpdatePeriod(const NcnameType &x)
     {
         this->updatePeriod = x;
index d7f4646..084c321 100644 (file)
@@ -333,9 +333,16 @@ void TaskDatabase::StepLiveboxDBInsert()
         LogInfo("livebox id: " << boxId);
         LogInfo("livebox type: " << boxType);
 
+        int autoLaunch;
+        if ((**it).m_autoLaunch == L"true") {
+            autoLaunch = 1;
+        } else {
+            autoLaunch = 0;
+        }
+
         int ret =
-            web_provider_livebox_insert_box_type(
-                boxId.c_str(), tizenId.c_str(), boxType.c_str());
+            web_provider_livebox_insert_box_info(
+                boxId.c_str(), tizenId.c_str(), boxType.c_str(), autoLaunch);
 
         if (ret < 0) {
             LogDebug("failed to set type of livebox: " << boxId);
index 95b53c5..400fc65 100644 (file)
@@ -899,10 +899,6 @@ void TaskManifestFile::setLiveBoxInfo(Manifest& manifest)
             liveBox.setPrimary(ConfigInfo->m_primary);
         }
 
-        if (ConfigInfo->m_autoLaunch == L"true") {
-            liveBox.setAutoLaunch(appid);
-        }
-
         if (ConfigInfo->m_updatePeriod != L"") {
             liveBox.setUpdatePeriod(ConfigInfo->m_updatePeriod);
         }