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.
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()
45 typedef void (*calendar_reminder_cb)(const char *param, void* user_data);
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
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()
63 int calendar_reminder_add_cb(calendar_reminder_cb callback, void *user_data);
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()
77 int calendar_reminder_remove_cb(calendar_reminder_cb callback, void *user_data);
88 #endif /* __TIZEN_SOCIAL_CALENDAR_REMINDER_H__ */