Add metadata for setting app 85/107585/1 accepted/tizen_3.0.m2_mobile accepted/tizen_3.0.m2_tv accepted/tizen_3.0.m2_wearable tizen_3.0.m2 accepted/tizen/3.0.m2/mobile/20170104.142935 accepted/tizen/3.0.m2/tv/20170104.143434 accepted/tizen/3.0.m2/wearable/20170104.143829 accepted/tizen/3.0/common/20161229.112843 accepted/tizen/3.0/ivi/20161229.054747 accepted/tizen/3.0/mobile/20161229.054709 accepted/tizen/3.0/tv/20161229.054723 accepted/tizen/3.0/wearable/20161229.054734 submit/tizen_3.0.m2/20170104.093752 submit/tizen_3.0/20161228.082439
authorsooyeon.kim <sooyeon.kim@samsung.com>
Wed, 28 Dec 2016 14:07:48 +0000 (23:07 +0900)
committersooyeon.kim <sooyeon.kim@samsung.com>
Wed, 28 Dec 2016 14:07:48 +0000 (23:07 +0900)
Change-Id: I1754350836f8198cc30fcaaebf85c1cde99952b9
Signed-off-by: sooyeon.kim <sooyeon.kim@samsung.com>
engine-parser/src/tts-engine-parser.c

index 53c3e41..68786dc 100644 (file)
 #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");
                        }