writeAttribute(writer, "type", this->type);
writeAttribute(writer, "version", this->version);
if (!this->installLocation.IsNull()) {
- writeAttribute(writer, "install-location", (*this->installLocation),
- (*this->installLocation).empty());
+ writeAttribute(writer, "install-location", (*this->installLocation));
}
+ writeAttribute(writer, "storeclient-id", this->storeClientId,
+ !this->storeClientId.empty());
FOREACH(l, this->label)
{
{
acc->serialize(writer);
}
+
+ if (!this->privileges.isEmpty()) {
+ this->privileges.serialize(writer);
+ }
}
endElement(writer);
}
writeAttribute(writer, "name", *c);
endElement(writer);
}
+ FOREACH(m, this->metadata) {
+ m->serialize(writer);
+ }
endElement(writer);
}
writeAttribute(writer, "nodisplay", "false");
if (!this->label.empty()) {
- startElement(writer, "label");
- writeText(writer, this->label);
- endElement(writer);
+ int defaultLabelChk = 0;
+ FOREACH(m, this->label)
+ {
+ std::pair<DPL::String, DPL::String> boxLabel = *m;
+ startElement(writer, "label");
+ if (!boxLabel.first.empty()) {
+ writeAttribute(writer, "xml:lang", boxLabel.first);
+ } else {
+ defaultLabelChk++;
+ }
+ writeText(writer, boxLabel.second);
+ endElement(writer);
+ }
+ if(!defaultLabelChk) {
+ startElement(writer, "label");
+ writeText(writer, DPL::FromUTF8String("NO NAME"));
+ endElement(writer);
+ }
}
-
if (!this->icon.empty()) {
startElement(writer, "icon");
writeText(writer, this->icon);
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);
}
startElement(writer, "account");
{
startElement(writer, "account-provider");
- writeAttribute(writer, "app-id", this->provider.appid);
+ writeAttribute(writer, "appid", this->provider.appid);
writeAttribute(writer, "multiple-accounts-support",
this->provider.multiAccount);
}
endElement(writer);
}
+
+void Privilege::serialize(xmlTextWriterPtr writer)
+{
+ startElement(writer, "privileges");
+ {
+ FOREACH(it, this->name)
+ {
+ startElement(writer, "privilege");
+ writeText(writer, *it);
+ endElement(writer);
+ }
+ }
+ endElement(writer);
+}
+
+void Metadata::serialize(xmlTextWriterPtr writer)
+{
+ startElement(writer, "metadata");
+ writeAttribute(writer, "key", *this->key);
+ if (!this->value.IsNull()) {
+ writeAttribute(writer, "value", *this->value);
+ }
+ endElement(writer);
+}
} //namespace Jobs
} //namespace WidgetInstall