summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSabera Djelti (sdi2) <sabera.djelti@open.eurogiciel.org>2015-01-09 11:31:09 +0100
committerBaptiste DURAND <baptiste.durand@open.eurogiciel.org>2015-01-09 05:27:10 -0800
commit859ec161b49125408a7c74cacc29e78ad27d9a3c (patch)
treef203dc67c16e9bb9a25f02837afe4df9543b488d /src
parentf576bfea93240152921047444a9a9a271536e4ca (diff)
downloadapp-svc-859ec161b49125408a7c74cacc29e78ad27d9a3c.tar.gz
app-svc-859ec161b49125408a7c74cacc29e78ad27d9a3c.tar.bz2
app-svc-859ec161b49125408a7c74cacc29e78ad27d9a3c.zip
using default user to allow app-svc API usage for deamon. App-svc run service leads to app launch that could requires a graphical session BUG-Tizen=TC-2222 Signed-off-by: Sabera Djelti (sdi2) <sabera.djelti@open.eurogiciel.org> Change-Id: Id937789cd6c828745f1b2dbf19330e8602c759c1
Diffstat (limited to 'src')
-rw-r--r--src/appsvc.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/appsvc.c b/src/appsvc.c
index ff70bfc..f6d6766 100644
--- a/src/appsvc.c
+++ b/src/appsvc.c
@@ -664,7 +664,15 @@ static int __get_list_with_submode(char *win_id, GSList **pkg_list)
return 0;
}
-SLPAPI int appsvc_run_service(bundle *b, int request_code, appsvc_res_fn cbfunc, void *data, uid_t uid)
+SLPAPI int appsvc_run_service(bundle *b, int request_code, appsvc_res_fn cbfunc, void *data)
+{
+ //using default user to allow app-svc API usage for deamon.
+ //App-svc run service leads to app launch that could require a graphical session.
+ //Indeed bluetooth_agent uses this API and is launched as bluetooth user (that not regular user).
+ return appsvc_usr_run_service(b, request_code, cbfunc, data, tzplatform_getuid(TZ_SYS_DEFAULT_USER));
+}
+
+SLPAPI int appsvc_usr_run_service(bundle *b, int request_code, appsvc_res_fn cbfunc, void *data, uid_t uid)
{
appsvc_resolve_info_t info;
char *pkgname;
@@ -846,7 +854,15 @@ end:
return ret;
}
-SLPAPI int appsvc_get_list(bundle *b, appsvc_info_iter_fn iter_fn, void *data, uid_t uid)
+
+SLPAPI int appsvc_get_list(bundle *b, appsvc_info_iter_fn iter_fn, void *data)
+{
+ //using default user to allow app-svc API usage for deamon.
+ //App-svc run get list leads to app launch that could require a graphical session.
+ return appsvc_usr_get_list(b, iter_fn, data, tzplatform_getuid(TZ_SYS_DEFAULT_USER));
+}
+
+SLPAPI int appsvc_usr_get_list(bundle *b, appsvc_info_iter_fn iter_fn, void *data, uid_t uid)
{
appsvc_resolve_info_t info;
char *pkgname = NULL;