4 * Copyright (c) 2012 - 2013 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_SOCAIL_CALENDAR_REMINDER_H__
21 #define __TIZEN_SOCAIL_CALENDAR_REMINDER_H__
24 #define API __attribute__ ((visibility("default")))
32 * @addtogroup CAPI_SOCIAL_CALENDAR_SVC_REMINDER_MODULE
37 * @brief Adds a receiver to get noti when alarm alerts.
39 * @remarks If failed to run appsvc, added receiver will be removed from the table.
41 * @param[in] pkgname The package name to add.
42 * @param[in] extra_data_key The user defined key to be passed via appsvc.
43 * @param[in] extra_data_value THe user defined value to be passed via appsvc.
45 * @return 0 on success, otherwise a negative error value.
46 * @retval #CALENDAR_ERROR_NONE Successful
47 * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure
49 * @see calendar_reminder_remove_receiver()
51 API int calendar_reminder_add_receiver(const char *pkgname, const char *extra_data_key, const char *extra_data_value);
54 * @brief Removes a receiver to get noti when alarm alerts.
56 * @param[in] pkgname The package name to add.
58 * @return 0 on success, otherwise a negative error value.
59 * @retval #CALENDAR_ERROR_NONE Successful
60 * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure
62 * @see calendar_reminder_remove_receiver()
64 API int calendar_reminder_remove_receiver(const char *pkgname);
67 * @brief Activates a receiver to get noti when alarm alerts.
69 * @param[in] pkgname The package name to add.
71 * @return 0 on success, otherwise a negative error value.
72 * @retval #CALENDAR_ERROR_NONE Successful
73 * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure
75 * @see calendar_reminder_remove_receiver()
77 API int calendar_reminder_activate_receiver(const char *pkgname);
80 * @brief Deactivates a receiver to get noti when alarm alerts.
82 * @param[in] pkgname The package name to add.
84 * @return 0 on success, otherwise a negative error value.
85 * @retval #CALENDAR_ERROR_NONE Successful
86 * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure
88 * @see calendar_reminder_remove_receiver()
90 API int calendar_reminder_deactivate_receiver(const char *pkgname);
93 * @brief Check whether receiver exist in the table or not.
95 * @param[in] pkgname The package name to add.
97 * @return 0 on success, otherwise a negative error value.
98 * @retval #CALENDAR_ERROR_NONE Successful
99 * @retval #CALENDAR_ERROR_DB_FAILED Database operation failure
101 * @see calendar_reminder_remove_receiver()
103 API bool calendar_reminder_has_receiver(const char *pkgname);
113 #endif /* __TIZEN_SOCAIL_CALENDAR_REMINDER_H__ */