From 32d26cbb9d50cdf87f73b0dc76132382982681a4 Mon Sep 17 00:00:00 2001 From: Soyoung Kim Date: Thu, 4 Oct 2012 19:21:06 +0900 Subject: [PATCH] Fixed to generate manifest file - Fill application-service uri, mime attributes to manifest.xml when generate a manifest. --- src/jobs/widget_install/manifest.cpp | 6 ++++++ src/jobs/widget_install/task_manifest_file.cpp | 12 +++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/jobs/widget_install/manifest.cpp b/src/jobs/widget_install/manifest.cpp index 039bbb4..4c068cf 100644 --- a/src/jobs/widget_install/manifest.cpp +++ b/src/jobs/widget_install/manifest.cpp @@ -115,6 +115,12 @@ void Manifest::generate(DPL::String filename) writer = xmlNewTextWriterFilename(DPL::ToUTF8String(filename).c_str(), 0); //compression set to 0 if (writer == NULL) ThrowMsg(LibxmlUtils::Libxml2Error, "xmlNewTextWriterFilename failed"); + state = xmlTextWriterSetIndent (writer, 1); + if (state < 0) + { + ThrowMsg(LibxmlUtils::Libxml2Error, "xmlTextWriterSetIndent failed"); + } + state = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (state < 0) { diff --git a/src/jobs/widget_install/task_manifest_file.cpp b/src/jobs/widget_install/task_manifest_file.cpp index d9104bf..facdef3 100644 --- a/src/jobs/widget_install/task_manifest_file.cpp +++ b/src/jobs/widget_install/task_manifest_file.cpp @@ -789,9 +789,15 @@ void TaskManifestFile::setAppServiceInfo(UiApplication & uiApp) // x-tizen-svc=http://tizen.org/appsvc/operation/pick|NULL|image; FOREACH(it, appServiceList) { ApplicationService appService; - appService.addOperation(it->operation); - appService.addOperation(it->scheme); - appService.addOperation(it->mime); + if (!it->operation.empty()) { + appService.addOperation(it->operation); + } + if (!it->scheme.empty()) { + appService.addUri(it->scheme); + } + if (!it->mime.empty()) { + appService.addMime(it->mime); + } uiApp.addApplicationService(appService); } } -- 2.7.4