extern const char *livebox_find_pkgname(const char *filename);
extern int livebox_request_update_by_id(const char *filename);
extern int livebox_trigger_update_monitor(const char *id, int is_pd);
+extern int livebox_update_extra_info(const char *id, const char *content, const char *title, const char *icon, const char *name);
/* End of a file */
return NULL;
}
+int livebox_update_extra_info(const char *id, const char *content, const char *title, const char *icon, const char *name)
+{
+ Eina_List *l;
+ struct item *item;
+
+ EINA_LIST_FOREACH(s_info.item_list, l, item) {
+ if (!strcmp(item->inst->id, id)) {
+ if (content && strlen(content)) {
+ char *_content;
+
+ _content = strdup(content);
+ if (_content) {
+ if (item->inst->content) {
+ free(item->inst->content);
+ item->inst->content = NULL;
+ }
+
+ item->inst->content = _content;
+ } else {
+ ErrPrint("Heap: %s\n", strerror(errno));
+ }
+ }
+
+ if (title && strlen(title)) {
+ char *_title;
+
+ _title = strdup(title);
+ if (_title) {
+ if (item->inst->title) {
+ free(item->inst->title);
+ item->inst->title = NULL;
+ }
+
+ item->inst->title = _title;
+ } else {
+ ErrPrint("Heap: %s\n", strerror(errno));
+ }
+ }
+
+ if (icon && strlen(icon)) {
+ char *_icon;
+
+ _icon = strdup(icon);
+ if (_icon) {
+ if (item->inst->icon) {
+ free(item->inst->icon);
+ item->inst->icon = NULL;
+ }
+
+ item->inst->icon = _icon;
+ } else {
+ ErrPrint("Heap: %s\n", strerror(errno));
+ }
+ }
+
+ if (name && strlen(name)) {
+ char *_name;
+
+ _name = strdup(name);
+ if (_name) {
+ if (item->inst->name) {
+ free(item->inst->name);
+ item->inst->name = NULL;
+ }
+
+ item->inst->name = _name;
+ } else {
+ ErrPrint("Heap: %s\n", strerror(errno));
+ }
+ }
+
+ return LB_STATUS_SUCCESS;
+ }
+ }
+
+ return LB_STATUS_ERROR_NOT_EXIST;
+}
+
int livebox_request_update_by_id(const char *filename)
{
Eina_List *l;