3.0 Native API reference english examination
[platform/core/pim/calendar-service.git] / include / calendar_reminder.h
1 /*
2  * Calendar Service
3  *
4  * Copyright (c) 2012 - 2015 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  */
19
20 #ifndef __TIZEN_SOCIAL_CALENDAR_REMINDER_H__
21 #define __TIZEN_SOCIAL_CALENDAR_REMINDER_H__
22
23 #include <calendar_types.h>
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28
29 /**
30  * @file calendar_reminder.h
31  */
32
33 /**
34  * @addtogroup CAPI_SOCIAL_CALENDAR_SVC_REMINDER_MODULE
35  * @{
36  */
37
38 /**
39  * @brief Called when an alarm is alerted.
40  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif
41  * @param[in] param Value string like id=value&time=value&tick=value&unit=value&type=value
42  * @param[in] user_data The user data passed from the callback registration function
43  * @see calendar_reminder_add_cb()
44  */
45 typedef void (*calendar_reminder_cb)(const char *param, void* user_data);
46
47
48 /**
49  * @brief Adds a callback to get a notification when an alarm alerts.
50  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif
51  * @privlevel public
52  * @privilege %http://tizen.org/privilege/calendar.read
53  * @param[in] callback The callback to be added
54  * @param[in] user_data The user data
55  * @return @c 0 on success,
56  *         otherwise a negative error value
57  * @retval #CALENDAR_ERROR_NONE Successful
58  * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory
59  * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted
60  * @retval #CALENDAR_ERROR_IPC Unknown IPC error
61  * @see calendar_reminder_remove_cb()
62  */
63 int calendar_reminder_add_cb(calendar_reminder_cb callback, void *user_data);
64
65
66 /**
67  * @brief Removes a callback to get a notification when an alarm alerts.
68  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif
69  * @param[in] callback The callback to be removed
70  * @param[in] user_data The user data
71  * @return @c 0 on success,
72  *         otherwise a negative error value
73  * @retval #CALENDAR_ERROR_NONE Successful
74  * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure
75  * @see calendar_reminder_add_cb()
76  */
77 int calendar_reminder_remove_cb(calendar_reminder_cb callback, void *user_data);
78
79
80 /**
81  * @}
82  */
83
84 #ifdef __cplusplus
85 }
86 #endif
87
88 #endif /* __TIZEN_SOCIAL_CALENDAR_REMINDER_H__ */
89