diff options
author | Sabera Djelti (sdi2) <sabera.djelti@open.eurogiciel.org> | 2015-01-09 11:31:09 +0100 |
---|---|---|
committer | Baptiste DURAND <baptiste.durand@open.eurogiciel.org> | 2015-01-09 05:27:10 -0800 |
commit | 859ec161b49125408a7c74cacc29e78ad27d9a3c (patch) | |
tree | f203dc67c16e9bb9a25f02837afe4df9543b488d /src | |
parent | f576bfea93240152921047444a9a9a271536e4ca (diff) | |
download | app-svc-859ec161b49125408a7c74cacc29e78ad27d9a3c.tar.gz app-svc-859ec161b49125408a7c74cacc29e78ad27d9a3c.tar.bz2 app-svc-859ec161b49125408a7c74cacc29e78ad27d9a3c.zip |
add _usr_ prototypes : appsvc_usr_run_service, appsvc_usr_get_listtizen_3.0_ivi_releasesubmit/tizen_wearable/20150127.000000submit/tizen_wearable/20150116.000000submit/tizen_tv/20150228.021455submit/tizen_tv/20150227.073215submit/tizen_tv/20150130.050505submit/tizen_tv/20150130.000000submit/tizen_tv/20150120.000002submit/tizen_tv/20150120.000000submit/tizen_tv/20150119.000001submit/tizen_tv/20150119.000000submit/tizen_tv/20150116.000000submit/tizen_mobile/20150213.000000submit/tizen_mobile/20150129.000000submit/tizen_mobile/20150116.000003submit/tizen_mobile/20150116.000001submit/tizen_mobile/20150116.000000submit/tizen_ivi/20150115.222222submit/tizen_common/20150112.154626submit/tizen_common/20150112.103909submit/tizen_common/20150109.133122accepted/tizen/wearable/20150128.040605accepted/tizen/tv/20150302.010506accepted/tizen/ivi/20150115.062918accepted/tizen/common/20150113.085925tizen_3.0_ivitizen_3.0.2014.q4_common
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.c | 20 |
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; |