summaryrefslogtreecommitdiff
path: root/src/notification_noti.c
diff options
context:
space:
mode:
authorMyungki Lee <mk5004.lee@samsung.com>2017-06-22 21:52:04 +0900
committerMyungki Lee <mk5004.lee@samsung.com>2017-06-30 09:32:26 +0900
commit18cb70699f61375df949ad3d07a0f9718d756f99 (patch)
treed67ee96f834fca73ee0e928a6302440768e9ef66 /src/notification_noti.c
parenta1597250ba51c02ba7dca27317dd6939ac8add3e (diff)
downloadnotification-18cb70699f61375df949ad3d07a0f9718d756f99.tar.gz
notification-18cb70699f61375df949ad3d07a0f9718d756f99.tar.bz2
notification-18cb70699f61375df949ad3d07a0f9718d756f99.zip
Move some func to notification_viewer.c
- notification_get_default_viewer, notification_launch_default_viewer Change-Id: I4ecc2453bf31191d4bbeca96fc7532e6f2645709 Signed-off-by: Myungki Lee <mk5004.lee@samsung.com>
Diffstat (limited to 'src/notification_noti.c')
-rwxr-xr-xsrc/notification_noti.c64
1 files changed, 0 insertions, 64 deletions
diff --git a/src/notification_noti.c b/src/notification_noti.c
index afa4eb2..4968070 100755
--- a/src/notification_noti.c
+++ b/src/notification_noti.c
@@ -2231,67 +2231,3 @@ EXPORT_API int notification_noti_delete_template(const char *pkg_id)
return ret;
}
-
-EXPORT_API int notification_get_default_viewer(const char *path, char **default_viewer)
-{
- char *viewer = NULL;
- dictionary *dict = NULL;
-
- if (access(path, F_OK) != 0) {
- NOTIFICATION_ERR("can't access file_path(%s)", path);
- return -1;
- }
-
- dict = iniparser_load(path);
- if (!dict) {
- NOTIFICATION_ERR("can't load file");
- return -1;
- }
-
- viewer = iniparser_getstring(dict, "Notification:DefaultViewer", NULL);
- if (viewer != NULL)
- *default_viewer = strdup(viewer);
-
- iniparser_freedict(dict);
-
- return 0;
-}
-
-EXPORT_API int notification_launch_default_viewer(const char *default_viewer, int priv_id)
-{
- int ret;
- char buf[32] = {0,};
- app_control_h app_control = NULL;
-
- ret = app_control_create(&app_control);
- if (ret != APP_CONTROL_ERROR_NONE) {
- NOTIFICATION_ERR("app_control_create failed [%x]", ret);
- goto out;
- }
-
- ret = app_control_set_app_id(app_control, default_viewer);
- if (ret != APP_CONTROL_ERROR_NONE) {
- NOTIFICATION_ERR("app_control_set_app_id failed [%x]", ret);
- goto out;
- }
-
- snprintf(buf, sizeof(buf), "%d", priv_id);
-
- ret = app_control_add_extra_data(app_control, "NOTIFICATION_PRIVATE_ID", buf);
- if (ret != APP_CONTROL_ERROR_NONE) {
- NOTIFICATION_ERR("app_control_set_extra_data failed [%x]", ret);
- goto out;
- }
-
- ret = app_control_send_launch_request(app_control, NULL, NULL);
- if (ret != APP_CONTROL_ERROR_NONE) {
- NOTIFICATION_ERR("app_control_send_launch_request failed [%x]", ret);
- goto out;
- }
-
-out:
- if (app_control)
- app_control_destroy(app_control);
-
- return ret;
-}