2 * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 #ifndef __NOTIFICATION_SETTING_H__
18 #define __NOTIFICATION_SETTING_H__
21 #include <sys/types.h>
23 #include "notification.h"
29 typedef struct notification_setting *notification_setting_h;
31 int notification_setting_get_setting(notification_setting_h *setting);
35 * @brief Gets value which whether information on the notification view is visible.
36 * @since_tizen @if wearable 2.3.1 @elseif mobile 2.3 @endif
37 * @param[in] setting The notification setting handle
38 * @param[out] value The visibility_class value
39 * @return #NOTIFICATION_ERROR_NONE on success,
40 * otherwise any other value on failure
41 * @retval #NOTIFICATION_ERROR_NONE Success
42 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
45 #include <notification_setting_internal.h>
50 notification_setting_h setting = NULL;
54 noti_err = notifiacation_setting_get_visibility_class(setting, &value);
55 if (noti_err != NOTIFICATION_ERROR_NONE) {
59 notification_setting_free_notification(setting);
66 int notification_setting_get_visibility_class(notification_setting_h setting, int *value);
70 * @brief Sets value which whether information on the notification view is visible.
71 * @details After notification_setting_update_setting() call, the visibility_class value is not updated.
72 * @since_tizen @if wearable 2.3.1 @elseif mobile 2.3 @endif
73 * @param[in] setting The notification setting handle
74 * @param[in] value The visibility_class value
75 * @return #NOTIFICATION_ERROR_NONE on success,
76 * otherwise any other value on failure
77 * @retval #NOTIFICATION_ERROR_NONE Success
78 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
81 #include <notification_setting_internal.h>
86 notification_setting_h setting = NULL;
90 value = true; // or false
92 noti_err = notifiacation_setting_set_visibility_class(setting, value);
93 if (noti_err != NOTIFICATION_ERROR_NONE) {
97 notification_setting_free_notification(setting);
104 int notification_setting_set_visibility_class(notification_setting_h setting, int value);
108 * @brief Update the notification setting handle.
109 * @since_tizen @if wearable 2.3.1 @elseif mobile 2.3 @endif
111 * @privilege %http://tizen.org/privilege/notification
112 * @param[in] setting The notification setting handle
113 * @return #NOTIFICATION_ERROR_NONE on success,
114 * otherwise any other value on failure
115 * @retval #NOTIFICATION_ERROR_NONE Success
116 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
119 #include <notification_setting_internal.h>
124 notification_setting_h setting = NULL;
128 noti_err = notifiacation_setting_update_setting(setting);
129 if (noti_err != NOTIFICATION_ERROR_NONE) {
133 notification_setting_free_notification(setting);
140 int notification_setting_update_setting(notification_setting_h setting);
144 * @brief Frees the internal structure data of a notification setting handle.
145 * @since_tizen @if wearable 2.3.1 @elseif mobile 2.3 @endif
146 * @param[in] setting The notification setting handle
147 * @return #NOTIFICATION_ERROR_NONE on success,
148 * otherwise any other value on failure
149 * @retval #NOTIFICATION_ERROR_NONE Success
150 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
153 #include <notification_setting_internal.h>
157 notification_setting_h setting = NULL;
161 noti_err = notifiacation_setting_free_notification(setting);
162 if (noti_err != NOTIFICATION_ERROR_NONE) {
171 int notification_setting_free_notification(notification_setting_h setting);
173 int notification_setting_refresh_setting_table(uid_t uid);
174 int notification_system_setting_init_system_setting_table(uid_t uid);
179 #endif /* __NOTIFICATION_SETTING_H__ */