m_width = attribute.value;
} else if (attribute.name == L"height") {
m_height = attribute.value;
+ } else if (attribute.name == L"fast-open") {
+ m_fastOpen= attribute.value;
}
}
}
m_data.m_pdSrc = m_src;
m_data.m_pdWidth = m_width;
m_data.m_pdHeight = m_height;
+ m_data.m_pdFastOpen = m_fastOpen;
}
explicit PdParser(
DPL::String m_src;
DPL::String m_width;
DPL::String m_height;
+ DPL::String m_fastOpen;
bool m_properNamespace;
ConfigParserData::LiveboxInfo::BoxContentInfo& m_data;
std::string tizenId = DPL::ToUTF8String(m_context.widgetConfig.tzAppid);
+ // insert specific information to web livebox db
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"") {
+ if ((**it).m_type.empty()) {
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 autoLaunch = (**it).m_autoLaunch == L"true" ? 1 : 0;
LogInfo("livebox auto-launch: " << autoLaunch);
- int mouseEvent;
- if ((**it).m_boxInfo.m_boxMouseEvent == L"true") {
- mouseEvent = 1;
- } else {
- mouseEvent = 0;
- }
+ int mouseEvent = (**it).m_boxInfo.m_boxMouseEvent == L"true" ? 1 : 0;
LogInfo("livebox mouse-event: " << mouseEvent);
- int ret =
- web_provider_livebox_insert_box_info(
- boxId.c_str(), tizenId.c_str(), boxType.c_str(), autoLaunch, mouseEvent);
+ int pdFastOpen = (**it).m_boxInfo.m_pdFastOpen == L"true" ? 1 : 0;
+ LogInfo("livebox pd fast-open: " << pdFastOpen);
- if (ret < 0) {
- LogDebug("failed to set type of livebox: " << boxId);
- }
+ web_provider_livebox_insert_box_info(
+ boxId.c_str(), tizenId.c_str(), boxType.c_str(),
+ autoLaunch, mouseEvent, pdFastOpen);
}
}
} //namespace WidgetInstall