summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSung-jae Park <nicesj.park@samsung.com>2013-02-06 14:10:50 +0000
committerSung-jae Park <nicesj.park@samsung.com>2013-02-06 14:10:50 +0000
commit9115faef1f19db758c5595d2ee3f5d2d3f7bf90d (patch)
treeda7f3f365c4fdb55de85cfb118c6ccc5001ad01d
parent9426dd3269d1839e1ae0df2633d9243882bfbeb9 (diff)
downloadlivebox-9115faef1f19db758c5595d2ee3f5d2d3f7bf90d.tar.gz
livebox-9115faef1f19db758c5595d2ee3f5d2d3f7bf90d.tar.bz2
livebox-9115faef1f19db758c5595d2ee3f5d2d3f7bf90d.zip
Script is changed.
Group is changed to Option. To use it for image loading. Change-Id: I5511bc7e13f40e5e1f64412e51a781ffd003990c
-rw-r--r--include/livebox.h4
-rw-r--r--src/livebox.c22
2 files changed, 13 insertions, 13 deletions
diff --git a/include/livebox.h b/include/livebox.h
index 311403f..aaba16d 100644
--- a/include/livebox.h
+++ b/include/livebox.h
@@ -125,10 +125,10 @@ extern int livebox_desc_set_id(struct livebox_desc *handle, int idx, const char
* \param[in] type image|text|script|signal|...
* \param[in] part target part to update with given content(data)
* \param[in] data content for specified part
- * \param[in] group script group name
+ * \param[in] option option for the block. (script: group, image: option, ...)
* \return idx Index of current description block
*/
-extern int livebox_desc_add_block(struct livebox_desc *handle, const char *id, const char *type, const char *part, const char *data, const char *group);
+extern int livebox_desc_add_block(struct livebox_desc *handle, const char *id, const char *type, const char *part, const char *data, const char *option);
/*!
* \brief Delete a added block
diff --git a/src/livebox.c b/src/livebox.c
index 6a7b066..5c6f8d0 100644
--- a/src/livebox.c
+++ b/src/livebox.c
@@ -46,7 +46,7 @@ struct block {
char *type;
char *part;
char *data;
- char *group;
+ char *option;
char *id;
char *file;
char *target_id;
@@ -148,9 +148,9 @@ EAPI int livebox_desc_close(struct livebox_desc *handle)
DbgPrint("data=%s\n", block->data);
}
- if (block->group) {
- fprintf(handle->fp, "group=%s\n", block->group);
- DbgPrint("group=%s\n", block->group);
+ if (block->option) {
+ fprintf(handle->fp, "option=%s\n", block->option);
+ DbgPrint("option=%s\n", block->option);
}
if (block->id) {
@@ -169,7 +169,7 @@ EAPI int livebox_desc_close(struct livebox_desc *handle)
free(block->type);
free(block->part);
free(block->data);
- free(block->group);
+ free(block->option);
free(block->id);
free(block->target_id);
free(block);
@@ -365,7 +365,7 @@ EAPI int livebox_desc_set_id(struct livebox_desc *handle, int idx, const char *i
/*!
* \return idx
*/
-EAPI int livebox_desc_add_block(struct livebox_desc *handle, const char *id, const char *type, const char *part, const char *data, const char *group)
+EAPI int livebox_desc_add_block(struct livebox_desc *handle, const char *id, const char *type, const char *part, const char *data, const char *option)
{
struct block *block;
@@ -403,9 +403,9 @@ EAPI int livebox_desc_add_block(struct livebox_desc *handle, const char *id, con
return -ENOMEM;
}
- if (group) {
- block->group = strdup(group);
- if (!block->group) {
+ if (option) {
+ block->option = strdup(option);
+ if (!block->option) {
free(block->data);
free(block->type);
free(block->part);
@@ -417,7 +417,7 @@ EAPI int livebox_desc_add_block(struct livebox_desc *handle, const char *id, con
if (id) {
block->id = strdup(id);
if (!block->id) {
- free(block->group);
+ free(block->option);
free(block->data);
free(block->type);
free(block->part);
@@ -442,7 +442,7 @@ EAPI int livebox_desc_del_block(struct livebox_desc *handle, int idx)
free(block->type);
free(block->part);
free(block->data);
- free(block->group);
+ free(block->option);
free(block->id);
free(block->target_id);
free(block);