diff options
Diffstat (limited to 'include/contacts_name.h')
-rwxr-xr-x | include/contacts_name.h | 112 |
1 files changed, 112 insertions, 0 deletions
diff --git a/include/contacts_name.h b/include/contacts_name.h new file mode 100755 index 0000000..e6a2fdc --- /dev/null +++ b/include/contacts_name.h @@ -0,0 +1,112 @@ +/* + * 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_CONTACTS_NAME_H__ +#define __TIZEN_SOCIAL_CONTACTS_NAME_H__ + +#include <contacts_types.h> + +#ifdef __cplusplus +extern "C" +{ +#endif + +/** + * @addtogroup CAPI_SOCIAL_CONTACTS_NAME_MODULE + * @{ + */ + +/** + * @brief Creates a handle to contacts name. + * + * @remarks @a name must be released with contact_name_destroy() by you. \n + * @a name is not added to contacts database until contact_insert_to_db() is called. + * + * + * @param[out] name A new contacts name handle + * + * @return 0 on success, otherwise a negative error value. + * @retval #CONTACTS_ERROR_NONE Successful + * @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory + * + * @see contact_name_destroy() + * + */ +int contact_name_create(contact_name_h *name); + +/** + * @brief Destroys the handle to contacts name. + * + * + * @param[in] name The contacts name handle + * + * @return 0 on success, otherwise a negative error value. + * @retval #CONTACTS_ERROR_NONE Successful + * @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter + * + * + * @see contact_name_create() + * + */ +int contact_name_destroy(contact_name_h name); + +/** + * @brief Gets the contact name detail from the contacts name handle. + * + * @remarks @a detail must be released with free() by you. + * + * @param[in] name The contacts name handle + * @param[in] detail_type The type of detail name to get + * @param[out] detail The detail name to be returned \n + * If requested data does not exist, @a detail is NULL + * + * @return 0 on success, otherwise a negative error value. + * @retval #CONTACTS_ERROR_NONE Successful + * @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter + * + * @see contact_name_set_detail() + * + */ +int contact_name_get_detail(contact_name_h name, contact_name_detail_e detail_type, char **detail); + +/** + * @brief Sets a contact name detail to the contacts name handle. + * + * @param[in] name The contacts name handle + * @param[in] detail_type The type of detail name to set + * @param[in] detail The detail name to set + * + * @return 0 on success, otherwise a negative error value. + * @retval #CONTACTS_ERROR_NONE Successful + * @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter + * + * @see contact_name_get_detail() + * + */ +int contact_name_set_detail(contact_name_h name, contact_name_detail_e detail_type, const char* detail); + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* __TIZEN_SOCIAL_CONTACTS_NAME_H__ */ + |