summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSung-jae Park <nicesj.park@samsung.com>2013-10-10 18:01:52 +0900
committerSung-jae Park <nicesj.park@samsung.com>2013-10-10 18:01:52 +0900
commit94c43896341f4065e22595ec812826bd0ca5d543 (patch)
treed94fe8f520a03ab6b9a0ecc5a27ef31fc4b4fd90
parent315abb9ba1c582ca4ec6d387cb1a29d38f98d6df (diff)
downloaddata-provider-master-94c43896341f4065e22595ec812826bd0ca5d543.tar.gz
data-provider-master-94c43896341f4065e22595ec812826bd0ca5d543.tar.bz2
data-provider-master-94c43896341f4065e22595ec812826bd0ca5d543.zip
Update accessibility operation.
Change-Id: I59437b763192ca11ce8d046e532610df633627d6
-rw-r--r--packaging/data-provider-master.spec2
-rw-r--r--src/script_handler.c41
-rw-r--r--src/slave_life.c2
3 files changed, 42 insertions, 3 deletions
diff --git a/packaging/data-provider-master.spec b/packaging/data-provider-master.spec
index 18d8de2..1875cc5 100644
--- a/packaging/data-provider-master.spec
+++ b/packaging/data-provider-master.spec
@@ -1,6 +1,6 @@
Name: data-provider-master
Summary: Master service provider for liveboxes.
-Version: 0.25.15
+Version: 0.25.16
Release: 1
Group: HomeTF/Livebox
License: Flora License
diff --git a/src/script_handler.c b/src/script_handler.c
index 13eec96..9d56c80 100644
--- a/src/script_handler.c
+++ b/src/script_handler.c
@@ -51,6 +51,7 @@
#define TYPE_INFO "info"
#define TYPE_DRAG "drag"
#define TYPE_ACCESS "access"
+#define TYPE_OPERATE_ACCESS "access,operation"
#define INFO_SIZE "size"
#define INFO_CATEGORY "category"
@@ -74,6 +75,7 @@ struct script_port {
int (*update_text)(void *handle, Evas *e, const char *id, const char *part, const char *text);
int (*update_image)(void *handle, Evas *e, const char *id, const char *part, const char *path, const char *option);
int (*update_access)(void *handle, Evas *e, const char *id, const char *part, const char *text, const char *option);
+ int (*operate_access)(void *handle, Evas *e, const char *id, const char *part, const char *operation, const char *option);
int (*update_script)(void *handle, Evas *e, const char *src_id, const char *target_id, const char *part, const char *path, const char *option);
int (*update_signal)(void *handle, Evas *e, const char *id, const char *part, const char *signal);
int (*update_drag)(void *handle, Evas *e, const char *id, const char *part, double x, double y);
@@ -217,6 +219,11 @@ static int load_all_ports(void)
goto errout;
}
+ item->operate_access = dlsym(item->handle, "script_operate_access");
+ if (!item->operate_access) {
+ goto errout;
+ }
+
item->update_script = dlsym(item->handle, "script_update_script");
if (!item->update_script) {
goto errout;
@@ -751,6 +758,36 @@ static int update_access(struct inst_info *inst, struct block *block, int is_pd)
return LB_STATUS_SUCCESS;
}
+static int operate_access(struct inst_info *inst, struct block *block, int is_pd)
+{
+ struct script_info *info;
+ Evas *e;
+
+ if (!block || !block->part) {
+ ErrPrint("Block or block->part is NIL\n");
+ return LB_STATUS_ERROR_INVALID;
+ }
+
+ info = is_pd ? instance_pd_script(inst) : instance_lb_script(inst);
+ if (!info) {
+ ErrPrint("info is NIL (%d, %s)\n", is_pd, instance_id(inst));
+ return LB_STATUS_ERROR_FAULT;
+ }
+
+ if (!info->port) {
+ ErrPrint("info->port is NIL\n");
+ return LB_STATUS_ERROR_INVALID;
+ }
+
+ e = script_handler_evas(info);
+ if (e) {
+ info->port->operate_access(info->port_data, e, block->id, block->part, block->data, block->option);
+ } else {
+ ErrPrint("Evas: (nil) id[%s] part[%s] data[%s]\n", block->id, block->part, block->data);
+ }
+ return LB_STATUS_SUCCESS;
+}
+
static int update_script_script(struct inst_info *inst, struct block *block, int is_pd)
{
struct script_info *info;
@@ -978,6 +1015,10 @@ static inline void consuming_parsed_block(int lineno, struct inst_info *inst, in
.handler = update_access,
},
{
+ .type = TYPE_OPERATE_ACCESS,
+ .handler = operate_access,
+ },
+ {
.type = NULL,
.handler = NULL,
},
diff --git a/src/slave_life.c b/src/slave_life.c
index 781aefd..6283938 100644
--- a/src/slave_life.c
+++ b/src/slave_life.c
@@ -854,8 +854,6 @@ HAPI struct slave_node *slave_deactivated_by_fault(struct slave_node *slave)
} else {
slave->critical_fault_count = 0;
}
- } else {
- ErrPrint("Failed to get time of day: %s\n", strerror(errno));
}
#else
struct timeval faulted_at;