summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSung-jae Park <nicesj.park@samsung.com>2013-02-16 07:59:44 (GMT)
committerSung-jae Park <nicesj.park@samsung.com>2013-02-16 07:59:44 (GMT)
commite2d5d2be715592ab202302bbada756b78283b650 (patch)
tree77c463e5bfbddbb3f1aa70936d148557ae45323c
parentc7607ae6cfe01a2e0a602b3905cb83fa3f61f98e (diff)
downloaddata-provider-master-e2d5d2be715592ab202302bbada756b78283b650.zip
data-provider-master-e2d5d2be715592ab202302bbada756b78283b650.tar.gz
data-provider-master-e2d5d2be715592ab202302bbada756b78283b650.tar.bz2
Update the manifest.
Add a new attrbiute "mode" for "size" tag. mode="easy" will defines the easy mode livebox. Change-Id: If0850695c6b15dede575971cefe36cd9f7b4ffa4
-rw-r--r--packaging/org.tizen.data-provider-master.spec2
-rw-r--r--pkgmgr_livebox/src/service_register.c42
2 files changed, 40 insertions, 4 deletions
diff --git a/packaging/org.tizen.data-provider-master.spec b/packaging/org.tizen.data-provider-master.spec
index a3deb09..c56ad8c 100644
--- a/packaging/org.tizen.data-provider-master.spec
+++ b/packaging/org.tizen.data-provider-master.spec
@@ -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
diff --git a/pkgmgr_livebox/src/service_register.c b/pkgmgr_livebox/src/service_register.c
index baefb2a..21691f0 100644
--- a/pkgmgr_livebox/src/service_register.c
+++ b/pkgmgr_livebox/src/service_register.c
@@ -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;