From: Hyunho Kang Date: Wed, 12 Oct 2016 10:33:35 +0000 (+0900) Subject: Support widget content info share X-Git-Tag: submit/tizen_3.0/20161028.062323 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Ftags%2Fsubmit%2Ftizen_3.0%2F20161028.062323;p=platform%2Fcore%2Fappfw%2Fappcore-widget.git Support widget content info share Change-Id: Ic8b4db04bf4aba55006bb38dca0d59b001de644b Signed-off-by: Hyunho Kang --- diff --git a/src/widget_app.c b/src/widget_app.c index c3edd63..243908a 100755 --- a/src/widget_app.c +++ b/src/widget_app.c @@ -759,6 +759,30 @@ static void __add_climsg() ecore_event_handler_add(ECORE_WL_EVENT_WINDOW_CONFIGURE, __configure_cb, NULL); } +static void __get_content(bundle *b) +{ + char *instance_id = NULL; + widget_context_s *cxt = NULL; + + bundle_get_str(b, AUL_K_WIDGET_INSTANCE_ID, &instance_id); + if (!instance_id) + return; + + cxt = __find_context_by_id(instance_id); + if (!cxt) { + _E("can not find instance id:%s", instance_id); + return; + } + + if (cxt->content) { + bundle_add_str(b, AUL_K_WIDGET_CONTENT_INFO, cxt->content); + _D("content info of %s found", cxt->id); + } else { + bundle_add_str(b, AUL_K_WIDGET_CONTENT_INFO, ""); + _D("empty content info added"); + } +} + static int __aul_handler(aul_type type, bundle *b, void *data) { char *caller = NULL; @@ -785,6 +809,9 @@ static int __aul_handler(aul_type type, bundle *b, void *data) case AUL_TERMINATE: widget_app_exit(); break; + case AUL_WIDGET_CONTENT: + __get_content(b); + break; default: break; }