From 166dc725ed73de88457b837ed5b38c4c2addb605 Mon Sep 17 00:00:00 2001 From: "sooyeon.kim" Date: Wed, 28 Dec 2016 23:07:48 +0900 Subject: [PATCH] Add metadata for setting app Change-Id: I1754350836f8198cc30fcaaebf85c1cde99952b9 Signed-off-by: sooyeon.kim --- engine-parser/src/tts-engine-parser.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/engine-parser/src/tts-engine-parser.c b/engine-parser/src/tts-engine-parser.c index 53c3e41..68786dc 100644 --- a/engine-parser/src/tts-engine-parser.c +++ b/engine-parser/src/tts-engine-parser.c @@ -62,9 +62,10 @@ #define TTS_GLOBAL_ENGINE_BASE "/etc/skel/share/.voice/tts/1.0" #define TTS_GLOBAL_ENGINE_INFO "/etc/skel/share/.voice/tts/1.0/engine-info" +#define TTS_METADATA_NAME "http://tizen.org/metadata/tts-engine/name" #define TTS_METADATA_LANGUAGE "http://tizen.org/metadata/tts-engine/language" #define TTS_METADATA_CREDENTIAL_REQUIRED "http://tizen.org/metadata/tts-engine/credential-required" - +#define TTS_METADATA_SETTING "http://tizen.org/metadata/tts-engine/setting" typedef struct metadata { const char *key; @@ -380,9 +381,9 @@ static int __write_metadata_inxml(const char *pkgid, const char *appid, GList *l xmlDocSetRootElement(g_doc, root); /* Save name */ - cur = xmlNewNode(NULL, (const xmlChar*)TTS_TAG_ENGINE_NAME); - xmlNodeSetContent(cur, (const xmlChar*)pkgid); - xmlAddChild(root, cur); +// cur = xmlNewNode(NULL, (const xmlChar*)TTS_TAG_ENGINE_NAME); +// xmlNodeSetContent(cur, (const xmlChar*)pkgid); +// xmlAddChild(root, cur); iter = g_list_first(list); @@ -396,6 +397,14 @@ static int __write_metadata_inxml(const char *pkgid, const char *appid, GList *l cur = xmlNewNode(NULL, (const xmlChar*)TTS_TAG_ENGINE_CREDENTIAL); xmlNodeSetContent(cur, (const xmlChar*)md->value); xmlAddChild(root, cur); + } else if (!strcmp(md->key, TTS_METADATA_SETTING)) { + cur = xmlNewNode(NULL, (const xmlChar*)TTS_TAG_ENGINE_SETTING); + xmlNodeSetContent(cur, (const xmlChar*)md->value); + xmlAddChild(root, cur); + } else if (!strcmp(md->key, TTS_METADATA_NAME)) { + cur = xmlNewNode(NULL, (const xmlChar*)TTS_TAG_ENGINE_NAME); + xmlNodeSetContent(cur, (const xmlChar*)md->value); + xmlAddChild(root, cur); } else { LOGW("[WARNING] Unknown metadata type"); } -- 2.7.4