From 85783aa3de3cca373fa7ef2f6bd3db31362cc568 Mon Sep 17 00:00:00 2001 From: Jihoon Chung Date: Tue, 18 Jun 2013 14:33:17 +0900 Subject: [PATCH] Change tizen:metadata details [Issue#] N/A [Problem] N/A [Cause] N/A [Solution] Change tizen:metadata details Add value is null case [SCMRequest] must be imported with wrt-commons Change-Id: I7ab48bee18e8d3689dd129877958aa39e5dc8fda --- configuration/config.xml | 1 + configuration/widgets.tizen.xsd | 2 +- src/configuration_parser/widget_parser.cpp | 4 ++-- src/jobs/widget_install/manifest.cpp | 6 ++++-- src/jobs/widget_install/manifest.h | 2 +- 5 files changed, 9 insertions(+), 6 deletions(-) mode change 100755 => 100644 src/configuration_parser/widget_parser.cpp mode change 100755 => 100644 src/jobs/widget_install/manifest.cpp mode change 100755 => 100644 src/jobs/widget_install/manifest.h diff --git a/configuration/config.xml b/configuration/config.xml index 9407c0a..f33ce7e 100644 --- a/configuration/config.xml +++ b/configuration/config.xml @@ -26,6 +26,7 @@ + WEB DYNAMICBOX diff --git a/configuration/widgets.tizen.xsd b/configuration/widgets.tizen.xsd index 24dee00..0a7b508 100644 --- a/configuration/widgets.tizen.xsd +++ b/configuration/widgets.tizen.xsd @@ -229,7 +229,7 @@ - + diff --git a/src/configuration_parser/widget_parser.cpp b/src/configuration_parser/widget_parser.cpp old mode 100755 new mode 100644 index b37bd1e..d2a17b9 --- a/src/configuration_parser/widget_parser.cpp +++ b/src/configuration_parser/widget_parser.cpp @@ -2631,9 +2631,9 @@ class MetadataParser : public ElementParser } NormalizeString(m_key); NormalizeString(m_value); - ConfigParserData::Metadata metaData(*m_key, *m_value); + ConfigParserData::Metadata metaData(m_key, m_value); FOREACH(it, m_data.metadataList) { - if (!DPL::StringCompare(it->key, *m_key)) { + if (!DPL::StringCompare(*it->key, *m_key)) { LogError("Key isn't unique"); return; } diff --git a/src/jobs/widget_install/manifest.cpp b/src/jobs/widget_install/manifest.cpp old mode 100755 new mode 100644 index 9688ee2..6a62c0c --- a/src/jobs/widget_install/manifest.cpp +++ b/src/jobs/widget_install/manifest.cpp @@ -498,8 +498,10 @@ void Privilege::serialize(xmlTextWriterPtr writer) void Metadata::serialize(xmlTextWriterPtr writer) { startElement(writer, "metadata"); - writeAttribute(writer, "key", this->key); - writeAttribute(writer, "value", this->value); + writeAttribute(writer, "key", *this->key); + if (!this->value.IsNull()) { + writeAttribute(writer, "value", *this->value); + } endElement(writer); } } //namespace Jobs diff --git a/src/jobs/widget_install/manifest.h b/src/jobs/widget_install/manifest.h old mode 100755 new mode 100644 index 30a849d..da78fe8 --- a/src/jobs/widget_install/manifest.h +++ b/src/jobs/widget_install/manifest.h @@ -77,7 +77,7 @@ typedef DPL::String NcnameType, NmtokenType, AnySimpleType, LangType; typedef DPL::String OperationType, MimeType, UriType, TypeType, PackageType; typedef DPL::OptionalString InstallLocationType, CategoriesType; typedef DPL::String AppCategoryType; -typedef DPL::String KeyType, ValueType; +typedef DPL::OptionalString KeyType, ValueType; /** * xmllib2 wrappers -- 2.7.4