4 * Copyright (c) 2012 - 2015 Samsung Electronics Co., Ltd. All rights reserved.
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
10 * http://www.apache.org/licenses/LICENSE-2.0
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.
20 #ifndef __TIZEN_SOCIAL_CALENDAR_REMINDER_H__
21 #define __TIZEN_SOCIAL_CALENDAR_REMINDER_H__
23 #include <calendar_types.h>
30 * @file calendar_reminder.h
34 * @addtogroup CAPI_SOCIAL_CALENDAR_SVC_REMINDER_MODULE
39 * @brief Called when an alarm is alerted.
41 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif
43 * @param[in] param Value string like id=value&time=value&tick=value&unit=value&type=value
44 * @param[in] user_data The user data passed from the callback registration function
46 * @see calendar_reminder_add_cb()
48 typedef void (*calendar_reminder_cb)(const char *param, void* user_data);
51 * @brief Adds a callback to get a notification when an alarm alerts.
53 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif
56 * @privilege %http://tizen.org/privilege/calendar.read
58 * @param[in] callback The callback to be added
59 * @param[in] user_data The user data
61 * @return @c 0 on success,
62 * otherwise a negative error value
63 * @retval #CALENDAR_ERROR_NONE Successful
64 * @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory
65 * @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted
66 * @retval #CALENDAR_ERROR_IPC Unknown IPC error
68 * @see calendar_reminder_remove_cb()
70 int calendar_reminder_add_cb(calendar_reminder_cb callback, void *user_data);
73 * @brief Removes a callback to get a notification when an alarm alerts.
75 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif
77 * @param[in] callback The callback to be removed
78 * @param[in] user_data The user data
80 * @return @c 0 on success,
81 * otherwise a negative error value
82 * @retval #CALENDAR_ERROR_NONE Successful
83 * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure
85 * @see calendar_reminder_add_cb()
87 int calendar_reminder_remove_cb(calendar_reminder_cb callback, void *user_data);
97 #endif /* __TIZEN_SOCIAL_CALENDAR_REMINDER_H__ */