diff options
Diffstat (limited to 'include/calendar_attendee.h')
-rwxr-xr-x | include/calendar_attendee.h | 203 |
1 files changed, 203 insertions, 0 deletions
diff --git a/include/calendar_attendee.h b/include/calendar_attendee.h new file mode 100755 index 0000000..8e4cf90 --- /dev/null +++ b/include/calendar_attendee.h @@ -0,0 +1,203 @@ +/* + * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +#ifndef __TIZEN_SOCIAL_CALENDAR_CALENDAR_ATTENDEE_H__ +#define __TIZEN_SOCIAL_CALENDAR_CALENDAR_ATTENDEE_H__ + +#include <tizen.h> +#include <time.h> +#include <calendar_types.h> + + + +#ifdef __cplusplus +extern "C" +{ +#endif + +/** + * @addtogroup CAPI_SOCIAL_CALENDAR_ATTENDEE_MODULE + * @{ + */ + + +/** + * @brief Gets the name of the attendee. + * + * @remarks @a name must be released with free() by you. + * + * @param [in] attendee The attendee handle + * @param [out] name The name of the attendee \n If the name does not exist, it is NULL + * + * @return 0 on success, otherwise a negative error value. + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * + * @see calendar_attendee_set_name() +*/ +int calendar_attendee_get_name(calendar_attendee_h attendee, char **name); + + +/** + * @brief Sets a name of the attendee. + * + * @param[in] attendee The attendee handle + * @param[in] name The name of the attendee + * + * @return 0 on success, otherwise a negative error value. + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * + * @see calendar_attendee_get_name() +*/ +int calendar_attendee_set_name(calendar_attendee_h attendee, const char *name); + +/** + * @brief Gets the email of the attendee. + * + * @remarks @a email must be released with free() by you. + * + * @param [in] attendee The attendee handle + * @param [out] email The email of the attendee \n If the email does not exist, it is NULL + * + * @return 0 on success, otherwise a negative error value. + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * + * @see calendar_attendee_set_email() + */ +int calendar_attendee_get_email(calendar_attendee_h attendee, char **email); + +/** + * @brief Sets a email of the attendee. + * + * @param[in] attendee The attendee handle + * @param[in] email The email of the attendee + * + * @return 0 on success, otherwise a negative error value. + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * + * @see calendar_attendee_get_email() + */ +int calendar_attendee_set_email(calendar_attendee_h attendee, const char *email); + +/** + * @brief Gets the phone number of the attendee. + * + * @remarks @a phone_number must be released with free() by you. + * + * @param [in] attendee The attendee handle + * @param [out] phone_number The phone number of the attendee \n If the phone number does not exist, it is NULL + * + * @return 0 on success, otherwise a negative error value. + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * + * @see calendar_attendee_set_phone_number() + */ +int calendar_attendee_get_phone_number(calendar_attendee_h attendee, char **phone_number); + +/** + * @brief Sets a phone number of the attendee. + * + * @param[in] attendee The attendee handle + * @param[in] phone_number The phone number of the attendee + * + * @return 0 on success, otherwise a negative error value. + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * + * @see calendar_attendee_get_phone_number() + */ +int calendar_attendee_set_phone_number(calendar_attendee_h attendee, const char *phone_number); + +/** + * @brief Gets the contact database ID associated with the given attendee handle. + * + * @param[in] attendee The calendar attendee handle + * @param[out] contact_db_id The contact database ID \n + * If the contact database ID has never set, @a contact_db_id is -1 + * + * @return 0 on success, otherwise a negative error value. + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * + * @see calendar_attendee_set_contact_db_id() + * @see calendar_event_add_attendee_with_contact() + * @see contact_get_db_id() + * @see contact_get_from_db() + */ +int calendar_attendee_get_contact_db_id(calendar_attendee_h attendee, int *contact_db_id); + +/** + * @brief Sets a contact database ID for the given attendee handle. + * + * @param[in] attendee The calendar attendee handle + * @param[in] contact_db_id The contact database ID + * + * @return 0 on success, otherwise a negative error value. + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * + * @see calendar_attendee_get_contact_db_id() + * @see contact_get_db_id() + * @see contact_get_from_db() + */ +int calendar_attendee_set_contact_db_id(calendar_attendee_h attendee, int contact_db_id); + +/** + * @brief Checks whether there is a next attendee handle on the list. + * + * @param [in] iterator The attendee iterator handle + * @return @c true If the next element exists or @c false If the next element doesn't exist + * + * @see calendar_event_get_attendee_iterator() + * @see calendar_attendee_iterator_next() +*/ +bool calendar_attendee_iterator_has_next(calendar_attendee_iterator_h iterator); + +/** + * @brief Moves attendee list iterator to the next position and gets attendee handle. + * @details If the next element for the current attendee list exists, then the iterator is moved to + * the next position on the list and the attendee handle for this position is returned. + * When the iterator reaches the last element of the list, all further calls will return + * #CALENDAR_ERROR_ITERATOR_END and @a attendee will remain unchanged. + * + * @param [in] iterator The attendee iterator handle + * @param [out] attendee The attendee handle + * + * @return 0 on success, otherwise a negative error value. + * @retval #CALENDAR_ERROR_NONE Successful + * @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CALENDAR_ERROR_ITERATOR_END Iterator is on last position + * + * @see calendar_event_get_attendee_iterator() + * @see calendar_attendee_iterator_has_next() + */ +int calendar_attendee_iterator_next(calendar_attendee_iterator_h *iterator, calendar_attendee_h *attendee); + + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* __TIZEN_SOCIAL_CALENDAR_CALENDAR_ATTENDEE_H__ */ |