<xs:element name="box-size">
<xs:complexType mixed="true">
<xs:attribute name="preview" use="optional" type="xs:anyURI"/>
+ <xs:attribute name="use-decoration" use="optional" type="tizen:data.boolean"/>
</xs:complexType>
</xs:element>
if (attribute.name == L"preview") {
m_preview = attribute.value;
}
+ if (attribute.name == L"use-decoration") {
+ m_useDecoration = attribute.value;
+ }
}
}
"size is mandatory - ignoring");
}
- std::pair<DPL::String, DPL::String> boxSize;
- boxSize.first = m_size;
- boxSize.second = m_preview;
- m_data.m_boxSize.push_back(boxSize);
+ ConfigParserData::LiveboxInfo::BoxSizeInfo boxSizeInfo;
+ boxSizeInfo.m_size = m_size;
+ boxSizeInfo.m_preview = m_preview;
+ boxSizeInfo.m_useDecoration = m_useDecoration;
+ m_data.m_boxSize.push_back(boxSizeInfo);
}
explicit BoxSizeParser(
private:
DPL::String m_size;
DPL::String m_preview;
+ DPL::String m_useDecoration;
bool m_properNamespace;
ConfigParserData::LiveboxInfo::BoxContentInfo& m_data;
};
writeAttribute(writer, "mouse_event", this->box.boxMouseEvent);
writeAttribute(writer, "touch_effect", this->box.boxTouchEffect);
- FOREACH(m, this->box.boxSize)
+ FOREACH(it, this->box.boxSize)
{
- std::pair<DPL::String, DPL::String> boxSize = *m;
startElement(writer, "size");
- if (!boxSize.second.empty()) {
- writeAttribute(writer, "preview", boxSize.second);
+ if (!(*it).m_preview.empty()) {
+ writeAttribute(writer, "preview", (*it).m_preview);
}
- writeText(writer, boxSize.first);
+ if (!(*it).m_useDecoration.empty()) {
+ writeAttribute(writer, "need_frame", (*it).m_useDecoration);
+ } else {
+ // default value of use-decoration is "true"
+ writeAttribute(writer, "need_frame", DPL::String(L"true"));
+ }
+
+ writeText(writer, (*it).m_size);
endElement(writer);
}
#include <dpl/string.h>
#include <dpl/optional_typedefs.h>
#include <dpl/foreach.h>
+#include <dpl/wrt-dao-ro/config_parser_data.h>
namespace Jobs {
namespace WidgetInstall {
/**
* @brief LiveBox element
*/
-typedef std::list<std::pair<DPL::String, DPL::String> > boxSizeType;
-typedef std::list<std::pair<DPL::String, DPL::String> > boxLabelType;
+typedef WrtDB::ConfigParserData::LiveboxInfo::BoxSizeList BoxSizeType;
+typedef WrtDB::ConfigParserData::LiveboxInfo::BoxLabelList BoxLabelType;
struct BoxInfo
{
NcnameType boxSrc;
NcnameType boxMouseEvent;
NcnameType boxTouchEffect;
- boxSizeType boxSize;
+ BoxSizeType boxSize;
NcnameType pdSrc;
NcnameType pdWidth;
NcnameType pdHeight;
{
this->updatePeriod = x;
}
- void setLabel(const boxLabelType &x)
+ void setLabel(const BoxLabelType &x)
{
this->label = x;
}
NcnameType autoLaunch;
NcnameType updatePeriod;
NcnameType timeout;
- boxLabelType label;
+ BoxLabelType label;
NcnameType icon;
NcnameType lang;
BoxInfoType box;
#include <web_provider_livebox_info.h>
#include <web_provider_plugin_info.h>
#include <dpl/wrt-dao-ro/global_config.h>
+#include <dpl/wrt-dao-ro/config_parser_data.h>
#include <dpl/log/log.h>
#include <dpl/file_input.h>
#include <dpl/errno_string.h>
std::ostringstream targetFile;
FOREACH (boxIt, liveBoxList) {
- boxSizeType boxSizeList = (**boxIt).m_boxInfo.m_boxSize;
+ ConfigParserData::LiveboxInfo::BoxSizeList boxSizeList =
+ (**boxIt).m_boxInfo.m_boxSize;
FOREACH (sizeIt, boxSizeList) {
- std::string preview = DPL::ToUTF8String((*sizeIt).second);
+ std::string preview = DPL::ToUTF8String((*sizeIt).m_preview);
if (preview.empty()) {
continue;
}
sourceFile << preview;
targetFile << m_context.locations->getSharedDataDir() << "/";
targetFile << (**boxIt).m_liveboxId << ".";
- targetFile << DPL::ToUTF8String((*sizeIt).first) << ".preview.png";
+ targetFile << DPL::ToUTF8String((*sizeIt).m_size) << ".preview.png";
DPL::FileInput input(sourceFile.str());
DPL::FileOutput output(targetFile.str());
box.boxTouchEffect= L"false";
}
- std::list<std::pair<DPL::String, DPL::String> > BoxSizeList
- = ConfigInfo->m_boxInfo.m_boxSize;
- FOREACH(im, BoxSizeList) {
- std::pair<DPL::String, DPL::String> boxSize = *im;
- if (!boxSize.second.empty()) {
- boxSize.second =
+ ConfigParserData::LiveboxInfo::BoxSizeList boxSizeList =
+ ConfigInfo->m_boxInfo.m_boxSize;
+ FOREACH(it, boxSizeList) {
+ if (!(*it).m_preview.empty()) {
+ (*it).m_preview =
DPL::FromUTF8String(m_context.locations->getSharedDataDir()) +
DPL::String(L"/") +
ConfigInfo->m_liveboxId + DPL::String(L".") +
- boxSize.first + DPL::String(L".preview.png");
+ (*it).m_size + DPL::String(L".preview.png");
}
- box.boxSize.push_back(boxSize);
+ box.boxSize.push_back((*it));
}
if (!ConfigInfo->m_boxInfo.m_pdSrc.empty()
#include <dpl/utils/wrt_global_settings.h>
#include <dpl/utils/wrt_utility.h>
#include <dpl/wrt-dao-ro/global_config.h>
+#include <dpl/wrt-dao-ro/config_parser_data.h>
#include <dpl/wrt-dao-rw/feature_dao.h>
#include <libiriwrapper.h>
return;
}
-
-
struct stat statStruct;
struct dirent dirent;
struct dirent *result;
LogInfo("livebox type: " << boxType);
- boxSizeType boxSizeList = (**it).m_boxInfo.m_boxSize;
+ ConfigParserData::LiveboxInfo::BoxSizeList boxSizeList =
+ (**it).m_boxInfo.m_boxSize;
char** boxSize = static_cast<char**>(
malloc(sizeof(char*)* boxSizeList.size()));
int boxSizeCnt = 0;
FOREACH (m, boxSizeList) {
- boxSize[boxSizeCnt++] = strdup(DPL::ToUTF8String((*m).first).c_str());
+ boxSize[boxSizeCnt++] = strdup(DPL::ToUTF8String((*m).m_size).c_str());
}
bool chkSize = web_provider_plugin_check_supported_size(