#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 <web_provider_livebox_info.h>
#include <dpl/wrt-dao-rw/widget_dao.h>
#include <dpl/wrt-dao-ro/vconf_config.h>
#include <dpl/foreach.h>
#include <dpl/log/log.h>
#include <dpl/assert.h>
#include <wrt-commons/security-origin-dao/security_origin_dao.h>
+#include <dpl/wrt-dao-ro/widget_dao_types.h>
#include <string>
#include <sstream>
#include <ace_api_install.h>
/* Set install Time */
time(&m_context.widgetConfig.installedTime);
- if (m_context.existingWidgetInfo.isExist) { //update
+ if (m_context.isUpdateMode) { //update
LogInfo("Registering widget... (update)");
Try
{
{
LogError(
"Given tizenId not found for update installation (Same GUID?)");
- ThrowMsg(Exceptions::InvalidPackage,
+ ThrowMsg(Exceptions::DatabaseFailure,
"Given tizenId not found for update installation");
}
WidgetDAO::registerOrUpdateWidget(
LogDebug("Create Security origin database");
// automatically create security origin database
using namespace SecurityOriginDB;
+ using namespace WrtDB;
+
SecurityOriginDAO dao(m_context.locations->getPkgId());
// Checking privilege list for setting security origin exception data
std::map<std::string, Feature>::const_iterator result =
g_W3CPrivilegeTextMap.find(DPL::ToUTF8String(it->name));
if (result != g_W3CPrivilegeTextMap.end()) {
- dao.setPrivilegeSecurityOriginData(result->second);
+ if (result->second == FEATURE_USER_MEDIA) {
+ dao.setPrivilegeSecurityOriginData(result->second, false);
+ } else if (result->second == FEATURE_FULLSCREEN_MODE) {
+ continue;
+ } else {
+ dao.setPrivilegeSecurityOriginData(result->second);
+ }
}
}
{
WrtDB::ExternalLocationList externalLocationsUpdate =
m_context.locations->listExternalLocations();
- if (m_context.existingWidgetInfo.isExist) { //update
+ if (m_context.isUpdateMode) { //update
Try
{
WidgetDAO dao(m_context.widgetConfig.tzAppid);
std::string boxId = DPL::ToUTF8String((**it).m_liveboxId);
std::string boxType;
if ((**it).m_type == L"") {
- boxType = web_provider_info_get_default_type();
+ boxType = web_provider_livebox_get_default_type();
} else {
boxType = DPL::ToUTF8String((**it).m_type);
}
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_info_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);