Fix sample codes for notification_set/get_led
[platform/core/api/notification.git] / include / notification_ipc.h
1 /*
2  * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #ifndef __NOTIFICATION_IPC_H__
18 #define __NOTIFICATION_IPC_H__
19
20 #include <gio/gio.h>
21 #include <notification.h>
22 #include <notification_setting.h>
23 #include <notification_setting_internal.h>
24 #include <notification_list.h>
25
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29
30 GVariant *notification_ipc_make_gvariant_from_noti(notification_h noti, bool translate);
31 int notification_ipc_make_noti_from_gvariant(notification_h noti,
32                 GVariant *variant);
33
34 GVariant *notification_ipc_make_gvariant_from_setting(
35                 struct notification_setting *noti_setting);
36 int notification_ipc_make_setting_from_gvariant(
37                 struct notification_setting *noti_setting, GVariant *variant);
38
39 GVariant *notification_ipc_make_gvariant_from_system_setting(
40                 struct notification_system_setting *noti_setting);
41 int notification_ipc_make_system_setting_from_gvariant(
42                 struct notification_system_setting *noti_setting,
43                 GVariant *variant);
44
45 int notification_dbus_init();
46 int notification_ipc_monitor_init(void);
47 int notification_ipc_monitor_fini(void);
48
49 int notification_ipc_is_master_ready(void);
50 int notification_ipc_add_deffered_task(void (*deferred_task_cb)(void *data),
51                 void *user_data);
52 int notification_ipc_del_deffered_task(void (*deferred_task_cb)(void *data));
53 int notification_ipc_request_insert(notification_h noti, int *priv_id);
54 int notification_ipc_request_update(notification_h noti);
55 int notification_ipc_request_update_async(notification_h noti,
56                 void (*result_cb)(int priv_id, int result, void *data),
57                 void *user_data);
58 int notification_ipc_request_refresh(void);
59 int notification_ipc_request_delete_multiple(notification_type_e type,
60                 char *pkgname);
61 int notification_ipc_request_delete_single(notification_type_e type,
62                 char *pkgname, int priv_id);
63 int notification_ipc_update_setting(notification_setting_h setting);
64 int notification_ipc_update_system_setting(
65                 notification_system_setting_h system_setting);
66 int notification_ipc_request_load_noti_by_tag(notification_h noti,
67                 const char *pkgname, const char *tag);
68 int notification_ipc_request_load_noti_grouping_list(notification_type_e type,
69                 int count,
70                 notification_list_h *list);
71 int notification_ipc_request_get_setting_array(
72                 notification_setting_h *setting_array, int *count);
73 int notification_ipc_request_get_setting_by_package_name(
74                 const char *package_name, notification_setting_h *setting);
75 int notification_ipc_request_load_system_setting(
76                 notification_system_setting_h *setting);
77 int notification_ipc_request_get_count(notification_type_e type,
78                 const char *pkgname, int group_id, int priv_id, int *count);
79 int notification_ipc_request_load_noti_by_priv_id(notification_h noti,
80                 const char *pkgname, int priv_id);
81 int notification_ipc_request_load_noti_detail_list(const char *pkgname,
82                 int group_id, int priv_id, int count,
83                 notification_list_h *list);
84
85 #ifdef __cplusplus
86 }
87 #endif
88 #endif /* __NOTIFICATION_IPC_H__ */
89