Add the appid and the pkgid to the enviornment 62/78962/2 accepted/tizen/common/20160712.150354 accepted/tizen/ivi/20160711.031209 accepted/tizen/mobile/20160711.030801 accepted/tizen/tv/20160711.030711 accepted/tizen/wearable/20160711.030726 submit/tizen/20160711.014306
authorHwankyu Jhun <h.jhun@samsung.com>
Thu, 7 Jul 2016 12:35:28 +0000 (21:35 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Fri, 8 Jul 2016 01:21:20 +0000 (10:21 +0900)
Change-Id: I2e2f53e2a77ff105c41be719b1ceb30836429771
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
include/common.h
src/common.c

index 6488292..73dada5 100644 (file)
@@ -56,6 +56,7 @@ typedef struct {
        char *hwacc;
        char *taskmanage;
        char *comp_type;
+       char *pkgid;
 } appinfo_t;
 
 struct ucred;
index 0df007d..c98ad02 100644 (file)
@@ -309,6 +309,9 @@ appinfo_t *_appinfo_create(bundle *kb)
        ptr = bundle_get_val(kb, AUL_K_COMP_TYPE);
        if (ptr)
                appinfo->comp_type = strdup(ptr);
+       ptr = bundle_get_val(kb, AUL_K_PKGID);
+       if (ptr)
+               appinfo->pkgid = strdup(ptr);
        ptr = bundle_get_val(kb, AUL_K_EXEC);
        if (ptr)
                appinfo->app_path = strdup(ptr);
@@ -344,6 +347,8 @@ void _appinfo_free(appinfo_t *appinfo)
                free(appinfo->debug_appid);
        if (appinfo->comp_type)
                free(appinfo->comp_type);
+       if (appinfo->pkgid)
+               free(appinfo->pkgid);
 
        free(appinfo);
 }
@@ -545,6 +550,10 @@ void _set_env(appinfo_t *appinfo, bundle *kb)
                setenv("HWACC", appinfo->hwacc, 1);
        if (appinfo->taskmanage)
                setenv("TASKMANAGE", appinfo->taskmanage, 1);
+       if (appinfo->appid)
+               setenv("AUL_APPID", appinfo->appid, 1);
+       if (appinfo->pkgid)
+               setenv("AUL_PKGID", appinfo->pkgid, 1);
 
        str = bundle_get_val(kb, AUL_K_WAYLAND_DISPLAY);
        if (str)