4 * Copyright (c) 2015 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Kyuho Jo <kyuho.jo@samsung.com>
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
12 * http://www.apache.org/licenses/LICENSE-2.0
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.
22 #ifndef __NOTIFICATION_ONGOING_FLAG_H__
23 #define __NOTIFICATION_ONGOING_FLAG_H__
25 #include <notification.h>
28 * @brief Sets the ongoing flag of the notification
30 * @param[in] noti The notification handle
31 * @param[in] ongoing_flag The ongoing flag
32 * @return #NOTIFICATION_ERROR_NONE on success,
33 * otherwise any other value on failure
34 * @retval #NOTIFICATION_ERROR_NONE Success
35 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value
38 #include <notification.h>
41 notification_h noti = NULL;
42 int noti_err = NOTIFICATION_ERROR_NONE;
45 noti = notification_create(NOTIFICATION_TYPE_NOTI);
50 noti_err = notification_set_ongoing_flag(noti, true);
51 if(noti_err != NOTIFICATION_ERROR_NONE) {
52 notification_free(noti);
58 int notification_set_ongoing_flag(notification_h noti, bool ongoing_flag);
61 * @brief Gets the ongoing flag of the notification
63 * @param[in] noti The notification handle
64 * @param[out] ongoing_flag The ongoing flag
65 * @return #NOTIFICATION_ERROR_NONE on success,
66 * otherwise any other value on failure
67 * @retval #NOTIFICATION_ERROR_NONE Success
68 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value
71 #include <notification.h>
74 notification_h noti = NULL;
75 int noti_err = NOTIFICATION_ERROR_NONE;
76 bool ongoing_flag = 0;
78 noti_err = notification_get_ongoing_flag(noti, &ongoing_flag);
79 if(noti_err != NOTIFICATION_ERROR_NONE) {
85 int notification_get_ongoing_flag(notification_h noti, bool *ongoing_flag);
87 #endif /* __NOTIFICATION_ONGOING_H__ */