Datacontrol element generation in StepGenerateXml 53/49153/1 accepted/tizen/mobile/20151008.052056 accepted/tizen/tv/20151008.052120 accepted/tizen/wearable/20151008.052147 submit/tizen/20151008.031154
authorTomasz Iwanek <t.iwanek@samsung.com>
Wed, 7 Oct 2015 08:42:19 +0000 (10:42 +0200)
committerTomasz Iwanek <t.iwanek@samsung.com>
Wed, 7 Oct 2015 08:51:34 +0000 (10:51 +0200)
This adds generation of datacontrol element in platform manifest file.

Change-Id: I8a1b3ac4af0788b1b1096400c2de29bdfc4d0d1f

src/common/step/step_generate_xml.cc

index 4107f9c..f570db1 100755 (executable)
@@ -137,6 +137,25 @@ common_installer::Step::Status StepGenerateXml::GenerateApplicationCommonXml(
     xmlTextWriterEndElement(writer);
   }
 
+  datacontrol_x* datacontrol = nullptr;
+  PKGMGR_LIST_MOVE_NODE_TO_HEAD(app->datacontrol, datacontrol);
+  for (; datacontrol != nullptr; datacontrol = datacontrol->next) {
+    xmlTextWriterStartElement(writer, BAD_CAST "datacontrol");
+    if (datacontrol->access) {
+      xmlTextWriterWriteAttribute(writer, BAD_CAST "access",
+          BAD_CAST datacontrol->access);
+    }
+    if (datacontrol->providerid) {
+      xmlTextWriterWriteAttribute(writer, BAD_CAST "providerid",
+          BAD_CAST datacontrol->providerid);
+    }
+    if (datacontrol->type) {
+      xmlTextWriterWriteAttribute(writer, BAD_CAST "type",
+          BAD_CAST datacontrol->type);
+    }
+    xmlTextWriterEndElement(writer);
+  }
+
   metadata_x* meta = nullptr;
   PKGMGR_LIST_MOVE_NODE_TO_HEAD(app->metadata, meta);
   for (; meta; meta = meta->next) {