Move internal API set to internal header file.
[platform/core/api/notification.git] / include / notification_ongoing_flag.h
1 /*
2  *  libnotification
3  *
4  * Copyright (c) 2015 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Kyuho 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_ONGOING_FLAG_H__
23 #define __NOTIFICATION_ONGOING_FLAG_H__
24
25 #include <notification.h>
26
27 /**
28  * @brief Sets the ongoing flag of the notification
29  * @since_tizen 2.4
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
36  * @par Sample code:
37  * @code
38 #include <notification.h>
39 ...
40 {
41         notification_h noti = NULL;
42         int noti_err = NOTIFICATION_ERROR_NONE;
43         bundle *b = NULL;
44
45         noti = notification_create(NOTIFICATION_TYPE_NOTI);
46         if(noti == NULL) {
47                 return;
48         }
49
50         noti_err  = notification_set_ongoing_flag(noti, true);
51         if(noti_err != NOTIFICATION_ERROR_NONE) {
52                 notification_free(noti);
53                 return;
54         }
55 }
56  * @endcode
57  */
58 int notification_set_ongoing_flag(notification_h noti, bool ongoing_flag);
59
60 /**
61  * @brief Gets the ongoing flag of the notification
62  * @since_tizen 2.4
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
69  * @par Sample code:
70  * @code
71 #include <notification.h>
72 ...
73 {
74         notification_h noti = NULL;
75         int noti_err = NOTIFICATION_ERROR_NONE;
76         bool ongoing_flag = 0;
77
78         noti_err  = notification_get_ongoing_flag(noti, &ongoing_flag);
79         if(noti_err != NOTIFICATION_ERROR_NONE) {
80                 return;
81         }
82 }
83  * @endcode
84  */
85 int notification_get_ongoing_flag(notification_h noti, bool *ongoing_flag);
86
87 #endif                          /* __NOTIFICATION_ONGOING_H__ */