Merge from tizen 2.4 latest.
[platform/core/api/notification.git] / include / notification_setting_internal.h
1 /*
2  *  libnotification
3  *
4  * Copyright (c) 2015 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Kyho Jo <kyuho.jo@samsung.com>
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  *
20  */
21
22 #ifndef __NOTIFICATION_SETTING_INTERNAL_H__
23 #define __NOTIFICATION_SETTING_INTERNAL_H__
24
25 #include <stdbool.h>
26 #include "notification.h"
27 #include "notification_setting.h"
28
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32
33 /* Application setting */
34 struct notification_setting {
35         char *package_name;
36         bool  allow_to_notify;
37         bool  do_not_disturb_except;
38         int   visibility_class;
39 };
40
41 int notification_setting_get_setting_array(notification_setting_h *setting_array, int *count);
42 int notification_setting_get_setting_by_package_name(const char *package_name, notification_setting_h *setting);
43
44 int notification_setting_get_package_name(notification_setting_h setting, char **value);
45 int notification_setting_set_package_name(notification_setting_h setting, char *value);
46
47 int notification_setting_get_allow_to_notify(notification_setting_h setting, bool *value);
48 int notification_setting_set_allow_to_notify(notification_setting_h setting, bool value);
49
50 int notification_setting_get_do_not_disturb_except(notification_setting_h setting, bool *value);
51 int notification_setting_set_do_not_disturb_except(notification_setting_h setting, bool value);
52
53 int notification_setting_insert_package(const char *package_id);
54 int notification_setting_delete_package(const char *package_id);
55
56 /* System setting */
57 typedef struct notification_system_setting* notification_system_setting_h;
58
59 int notification_system_setting_load_system_setting(notification_system_setting_h *system_setting);
60 int notification_system_setting_update_system_setting(notification_system_setting_h system_setting);
61 int notification_system_setting_free_system_setting(notification_system_setting_h system_setting);
62
63 int notification_system_setting_get_do_not_disturb(notification_system_setting_h system_setting, bool *value);
64 int notification_system_setting_set_do_not_disturb(notification_system_setting_h system_setting, bool value);
65
66 int notification_system_setting_get_visibility_class(notification_system_setting_h system_setting, int *value);
67 int notification_system_setting_set_visibility_class(notification_system_setting_h system_setting, int value);
68
69 /* OLD IMPLEMENTATION */
70 int notification_setting_property_set(const char *pkgname, const char *property, const char *value) NOTIFICATION_DEPRECATED_API;
71 int notification_setting_property_get(const char *pkgname, const char *property, char **value) NOTIFICATION_DEPRECATED_API;
72
73 #ifdef __cplusplus
74 }
75 #endif
76 #endif /* __NOTIFICATION_SETTING_INTERNAL_H__ */