Update the manifest.
authorSung-jae Park <nicesj.park@samsung.com>
Sat, 16 Feb 2013 07:59:44 +0000 (07:59 +0000)
committerSung-jae Park <nicesj.park@samsung.com>
Sat, 16 Feb 2013 07:59:44 +0000 (07:59 +0000)
Add a new attrbiute "mode" for "size" tag.

mode="easy" will defines the easy mode livebox.

Change-Id: If0850695c6b15dede575971cefe36cd9f7b4ffa4

packaging/org.tizen.data-provider-master.spec
pkgmgr_livebox/src/service_register.c

index a3deb09..c56ad8c 100644 (file)
@@ -1,6 +1,6 @@
 Name: org.tizen.data-provider-master
 Summary: Master service provider for liveboxes.
-Version: 0.16.5
+Version: 0.16.6
 Release: 1
 Group: framework/livebox
 License: Flora License
index baefb2a..21691f0 100644 (file)
@@ -1732,6 +1732,7 @@ static inline void update_box(struct livebox *livebox, xmlNodePtr node)
        for (node = node->children; node; node = node->next) {
                if (!xmlStrcasecmp(node->name, (const xmlChar *)"size")) {
                        xmlChar *size;
+                       int is_easy = 0;
 
                        size = xmlNodeGetContent(node);
                        if (!size) {
@@ -1739,10 +1740,45 @@ static inline void update_box(struct livebox *livebox, xmlNodePtr node)
                                continue;
                        }
 
+                       if (xmlHasProp(node, (const xmlChar *)"mode")) {
+                               xmlChar *mode;
+                               mode = xmlGetProp(node, (const xmlChar *)"mode");
+                               if (mode) {
+                                       DbgPrint("Easy mode: %s\n", mode);
+                                       is_easy = !xmlStrcasecmp(mode, (const xmlChar *)"easy");
+                                       xmlFree(mode);
+                               }
+                       }
+
                        if (!xmlStrcasecmp(size, (const xmlChar *)"1x1")) {
-                               livebox->size_list |= LB_SIZE_TYPE_1x1;
-                               if (xmlHasProp(node, (const xmlChar *)"preview")) {
-                                       livebox->preview[0] = xmlGetProp(node, (const xmlChar *)"preview");
+                               if (is_easy) {
+                                       livebox->size_list |= LB_SIZE_TYPE_EASY_1x1;
+                                       if (xmlHasProp(node, (const xmlChar *)"preview")) {
+                                               livebox->preview[7] = xmlGetProp(node, (const xmlChar *)"preview");
+                                       }
+                               } else {
+                                       livebox->size_list |= LB_SIZE_TYPE_1x1;
+                                       if (xmlHasProp(node, (const xmlChar *)"preview")) {
+                                               livebox->preview[0] = xmlGetProp(node, (const xmlChar *)"preview");
+                                       }
+                               }
+                       } else if (!xmlStrcasecmp(size, (const xmlChar *)"3x1")) {
+                               if (is_easy) {
+                                       livebox->size_list |= LB_SIZE_TYPE_EASY_3x1;
+                                       if (xmlHasProp(node, (const xmlChar *)"preview")) {
+                                               livebox->preview[8] = xmlGetProp(node, (const xmlChar *)"preview");
+                                       }
+                               } else {
+                                       ErrPrint("Invalid size tag (%s)\n", size);
+                               }
+                       } else if (!xmlStrcasecmp(size, (const xmlChar *)"3x3")) {
+                               if (is_easy) {
+                                       livebox->size_list |= LB_SIZE_TYPE_EASY_3x3;
+                                       if (xmlHasProp(node, (const xmlChar *)"preview")) {
+                                               livebox->preview[9] = xmlGetProp(node, (const xmlChar *)"preview");
+                                       }
+                               } else {
+                                       ErrPrint("Invalid size tag (%s)\n", size);
                                }
                        } else if (!xmlStrcasecmp(size, (const xmlChar *)"2x1")) {
                                livebox->size_list |= LB_SIZE_TYPE_2x1;