BuildRequires: pkgconfig(capi-appfw-app-manager)
BuildRequires: pkgconfig(drm-service-core-intel)
BuildRequires: pkgconfig(app2sd)
+BuildRequires: pkgconfig(web-provider-svc)
Requires: xmlsec1
%description
wrt-plugins-types
pkgmgr-installer
pkgmgr-parser
+ web-provider-svc
REQUIRED
)
if (m_properNamespace) {
if (attribute.name == L"src")
m_box.m_boxSrc = attribute.value;
+ if (attribute.name == L"mouse-event")
+ m_box.m_boxMouseEvent = attribute.value;
}
}
m_autoLaunch = attribute.value;
} else if (attribute.name == L"update-period") {
m_updatePeriod = attribute.value;
+ } else if (attribute.name == L"type") {
+ m_type = attribute.value;
}
}
}
m_livebox.m_primary = m_primary;
m_livebox.m_autoLaunch = m_autoLaunch;
m_livebox.m_updatePeriod = m_updatePeriod;
+ m_livebox.m_type = m_type;
m_data.m_livebox.push_back(m_livebox);
}
DPL::String m_primary;
DPL::String m_autoLaunch;
DPL::String m_updatePeriod;
+ DPL::String m_type;
bool m_properNamespace;
-
};
endElement(writer);
}
- if(!this->box.boxSrc.empty() && !this->box.boxSize.empty())
+ if(!this->box.boxSrc.empty() &&
+ !this->box.boxMouseEvent.empty() &&
+ !this->box.boxSize.empty())
{
startElement(writer, "box");
writeAttribute(writer, "type", "buffer");
+ writeAttribute(writer, "mouse_event", this->box.boxMouseEvent);
FOREACH(m, this->box.boxSize)
{
endElement(writer);
- if(!this->box.pdSrc.empty() && ! this->box.pdWidth.empty() && ! this->box.pdHeight.empty()) {
+ if(!this->box.pdSrc.empty() &&
+ !this->box.pdWidth.empty() &&
+ !this->box.pdHeight.empty())
+ {
startElement(writer, "pd");
writeAttribute(writer, "type", "buffer");
struct BoxInfo
{
NcnameType boxSrc;
+ NcnameType boxMouseEvent;
boxSizeType boxSize;
NcnameType pdSrc;
NcnameType pdWidth;
#include <widget_install/job_widget_install.h>
#include <widget_install/widget_install_errors.h>
#include <widget_install/widget_install_context.h>
+#include <web-provider-info.h>
#include <dpl/wrt-dao-rw/widget_dao.h>
#include <dpl/wrt-dao-ro/vconf_config.h>
#include <dpl/foreach.h>
AddStep(&TaskDatabase::StepAceDBInsert);
AddStep(&TaskDatabase::StepRemoveExternalFiles);
AddStep(&TaskDatabase::StepCreateVconf);
+ AddStep(&TaskDatabase::StepLiveboxDBInsert);
AddAbortStep(&TaskDatabase::StepAbortDBInsert);
}
ace_unregister_widget(static_cast<ace_widget_handle_t>(m_handle));
}
+void TaskDatabase::StepLiveboxDBInsert()
+{
+ if (m_context.widgetConfig.configInfo.m_livebox.size() <= 0) {
+ return;
+ }
+
+ std::string tizenId = DPL::ToUTF8String(m_context.widgetConfig.tzAppid);
+
+ for (auto it = m_context.widgetConfig.configInfo.m_livebox.begin();
+ it != m_context.widgetConfig.configInfo.m_livebox.end(); ++it)
+ {
+ std::string boxId = DPL::ToUTF8String((**it).m_liveboxId);
+ std::string boxType;
+ if ((**it).m_type == L"") {
+ boxType = web_provider_info_get_default_type();
+ } else {
+ boxType = DPL::ToUTF8String((**it).m_type);
+ }
+ LogInfo("livebox id: " << boxId);
+ LogInfo("livebox type: " << boxType);
+
+ int ret =
+ web_provider_info_insert_box_type(
+ boxId.c_str(), tizenId.c_str(), boxType.c_str());
+
+ if (ret < 0) {
+ LogDebug("failed to set type of livebox: " << boxId);
+ }
+ }
+}
+
} //namespace WidgetInstall
} //namespace Jobs
void StepAceDBInsert();
void StepRemoveExternalFiles();
void StepCreateVconf();
+ void StepLiveboxDBInsert();
void StepAbortDBInsert();
LogInfo("setLiveBoxInfo");
LiveBoxInfo liveBox;
DPL::Optional<WrtDB::ConfigParserData::LiveboxInfo> ConfigInfo = *it;
- DPL::String pkgid = m_context.widgetConfig.tzPkgid;
+ DPL::String appid = m_context.widgetConfig.tzAppid;
size_t found;
if(ConfigInfo->m_liveboxId != L"") {
- found = ConfigInfo->m_liveboxId.find_first_of(L".");
+ found = ConfigInfo->m_liveboxId.find_last_of(L".");
if(found != std::string::npos) {
- if(0 == ConfigInfo->m_liveboxId.compare(0, found, pkgid))
+ if(0 == ConfigInfo->m_liveboxId.compare(0, found, appid))
liveBox.setLiveboxId(ConfigInfo->m_liveboxId);
else {
DPL::String liveboxId =
- pkgid+DPL::String(L".")+ConfigInfo->m_liveboxId;
+ appid + DPL::String(L".") + ConfigInfo->m_liveboxId;
liveBox.setLiveboxId(liveboxId);
}
} else {
DPL::String liveboxId =
- pkgid+DPL::String(L".")+ConfigInfo->m_liveboxId;
+ appid + DPL::String(L".") + ConfigInfo->m_liveboxId;
liveBox.setLiveboxId(liveboxId);
}
}
liveBox.setPrimary(ConfigInfo->m_primary);
if(ConfigInfo->m_autoLaunch == L"true")
- liveBox.setAutoLaunch(pkgid);
+ liveBox.setAutoLaunch(appid);
if(ConfigInfo->m_updatePeriod != L"")
liveBox.setUpdatePeriod(ConfigInfo->m_updatePeriod);
box.boxSrc = defaultLocale + ConfigInfo->m_boxInfo.m_boxSrc;
}
+ if (ConfigInfo->m_boxInfo.m_boxMouseEvent == L"true") {
+ box.boxMouseEvent = ConfigInfo->m_boxInfo.m_boxMouseEvent;
+ } else {
+ box.boxMouseEvent = L"false";
+ }
+
std::list<std::pair<DPL::String,DPL::String>> BoxSizeList
= ConfigInfo->m_boxInfo.m_boxSize;
FOREACH(im, BoxSizeList) {
box.pdWidth = ConfigInfo->m_boxInfo.m_pdWidth;
box.pdHeight = ConfigInfo->m_boxInfo.m_pdHeight;
}
-
liveBox.setBox(box);
}
-
manifest.addLivebox(liveBox);
}
* @brief Implementation file for uninstaller task database updating
*/
+#include <web-provider-info.h>
#include <widget_uninstall/task_db_update.h>
#include <widget_uninstall/job_widget_uninstall.h>
#include <widget_uninstall/widget_uninstall_errors.h>
#include <dpl/wrt-dao-ro/widget_dao_read_only.h>
#include <ace_api_install.h>
-
#include <dpl/assert.h>
#include <ace-common/ace_api_common.h>
m_context(context)
{
AddStep(&TaskDbUpdate::StepDbUpdate);
+ AddStep(&TaskDbUpdate::StepLiveboxDBDelete);
}
TaskDbUpdate::~TaskDbUpdate()
UninstallerContext::UNINSTALL_DB_UPDATE,
"Widget DB Update Finished");
}
+
+void TaskDbUpdate::StepLiveboxDBDelete()
+{
+ int ret =
+ web_provider_info_delete_by_app_id(m_context.tzAppid.c_str());
+
+ if (ret < 0) {
+ LogDebug("failed to delete box info");
+ } else {
+ LogInfo("delete box info: " << m_context.tzAppid);
+ }
+}
+
} //namespace WidgetUninstall
} //namespace Jobs
private:
void StepDbUpdate();
+ void StepLiveboxDBDelete();
public:
TaskDbUpdate(UninstallerContext& context);