To launch the app using explict package name.
Change-Id: I6eecec6986af258fbac07d7653cb449cf3050a15
extern void lb_invoke_fault_handler(enum livebox_fault_type type, const char *pkgname, const char *filename, const char *function);
extern int lb_set_content(struct livebox *handler, const char *content);
extern int lb_set_title(struct livebox *handler, const char *title);
-extern void lb_set_auto_launch(struct livebox *handler, int auto_launch);
+extern void lb_set_auto_launch(struct livebox *handler, const char *auto_launch);
extern struct livebox *lb_find_livebox(const char *pkgname, const char *filename);
extern struct livebox *lb_new_livebox(const char *pkgname, const char *filename, double timestamp);
extern struct livebox *lb_find_livebox_by_timestamp(double timestamp);
int height;
double priority;
- int auto_launch;
+ char *auto_launch;
double period;
int pinup_supported;
Name: liblivebox-viewer
Summary: Library for the development of a livebox viewer
-Version: 0.8.6
+Version: 0.8.8
Release: 1
Group: main/app
License: Flora License
const char *title;
double timestamp;
- int auto_launch;
+ const char *auto_launch;
double priority;
int size_list;
int user;
int ret;
- ret = packet_get(packet, "dsssiiiissssidiiiiidsi",
+ ret = packet_get(packet, "dsssiiiisssssdiiiiidsi",
×tamp,
&pkgname, &id, &content,
&lb_w, &lb_h, &pd_w, &pd_h,
ErrPrint("[%lf] pkgname: %s, id: %s, content: %s, "
"pd_w: %d, pd_h: %d, lb_w: %d, lb_h: %d, "
"cluster: %s, category: %s, lb_fname: \"%s\", pd_fname: \"%s\", "
- "auto_launch: %d, priority: %lf, size_list: %d, user: %d, pinup: %d, "
+ "auto_launch: %s, priority: %lf, size_list: %d, user: %d, pinup: %d, "
"lb_type: %d, pd_type: %d, period: %lf, title: [%s], is_pinned_up: %d\n",
timestamp, pkgname, id, content,
pd_w, pd_h, lb_w, lb_h,
}
if (handler->lb.auto_launch)
- if (aul_launch_app(handler->pkgname, NULL) < 0)
- ErrPrint("Failed to launch app %s\n", handler->pkgname);
+ if (aul_launch_app(handler->lb.auto_launch, NULL) < 0)
+ ErrPrint("Failed to launch app %s\n", handler->lb.auto_launch);
timestamp = util_timestamp();
packet = packet_create_noack("clicked", "sssddd", handler->pkgname, handler->id, "clicked", timestamp, x, y);
handler->lb.size_list = size_list;
}
-void lb_set_auto_launch(struct livebox *handler, int auto_launch)
+void lb_set_auto_launch(struct livebox *handler, const char *auto_launch)
{
- handler->lb.auto_launch = auto_launch;
+ if (!strlen(auto_launch))
+ return;
+
+ handler->lb.auto_launch = strdup(auto_launch);
+ if (!handler->lb.auto_launch)
+ ErrPrint("Heap: %s\n", strerror(errno));
}
void lb_set_priority(struct livebox *handler, double priority)
free(handler->id);
free(handler->pkgname);
free(handler->filename);
+ free(handler->lb.auto_launch);
if (handler->lb.data.fb) {
fb_destroy(handler->lb.data.fb);