2 * Copyright (c) 2015 - 2017 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_ONGOING_FLAG_H__
18 #define __NOTIFICATION_ONGOING_FLAG_H__
20 #include <notification.h>
23 * @brief Sets the ongoing flag of the notification
24 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
25 * @param[in] noti The notification handle
26 * @param[in] ongoing_flag The ongoing flag
27 * @return #NOTIFICATION_ERROR_NONE on success,
28 * otherwise any other value on failure
29 * @retval #NOTIFICATION_ERROR_NONE Success
30 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value
33 #include <notification.h>
36 notification_h noti = NULL;
37 int noti_err = NOTIFICATION_ERROR_NONE;
40 noti = notification_create(NOTIFICATION_TYPE_NOTI);
45 noti_err = notification_set_ongoing_flag(noti, true);
46 if (noti_err != NOTIFICATION_ERROR_NONE) {
47 notification_free(noti);
53 int notification_set_ongoing_flag(notification_h noti, bool ongoing_flag);
56 * @brief Gets the ongoing flag of the notification
57 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
58 * @param[in] noti The notification handle
59 * @param[out] ongoing_flag The ongoing flag
60 * @return #NOTIFICATION_ERROR_NONE on success,
61 * otherwise any other value on failure
62 * @retval #NOTIFICATION_ERROR_NONE Success
63 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value
66 #include <notification.h>
69 notification_h noti = NULL;
70 int noti_err = NOTIFICATION_ERROR_NONE;
71 bool ongoing_flag = 0;
73 noti_err = notification_get_ongoing_flag(noti, &ongoing_flag);
74 if (noti_err != NOTIFICATION_ERROR_NONE) {
80 int notification_get_ongoing_flag(notification_h noti, bool *ongoing_flag);
82 #endif /* __NOTIFICATION_ONGOING_H__ */