Add contact feature
[platform/core/pim/contacts-service.git] / include / contacts_phone_log.h
1 /*
2  * Contacts Service
3  *
4  * Copyright (c) 2010 - 2015 Samsung Electronics Co., Ltd. All rights reserved.
5  *
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
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
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.
17  *
18  */
19
20
21 #ifndef __TIZEN_SOCIAL_CONTACTS_PHONELOG_H__
22 #define __TIZEN_SOCIAL_CONTACTS_PHONELOG_H__
23
24
25 #ifdef __cplusplus
26 extern "C"
27 {
28 #endif
29
30
31 /**
32  * @file contacts_phone_log.h
33  */
34
35
36 /**
37  * @ingroup CAPI_SOCIAL_CONTACTS_SVC_MODULE
38  * @defgroup CAPI_SOCIAL_CONTACTS_SVC_PHONELOG_MODULE Phone log
39  * @brief The contacts phone log API provides the set of definitions and interfaces that enable application developers to reset phone log count.
40  * @section CAPI_SOCIAL_CONTACTS_SVC_PHONELOG_MODULE_HEADER Required Header
41  *          \#include <contacts.h>
42  * @section CAPI_SOCIAL_CONTACTS_SVC_PHONELOG_MODULE_FEATURE Related Features
43  *          This API is related with the following features: \n
44  *          - http://tizen.org/feature/network.telephony \n
45  *          It is recommended to design feature related codes in your application for reliability. \n
46  *          You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, thereby controlling the procedure of your application. \n
47  *          To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK. \n
48  *          More details on featuring your application can be found from <a href="https://developer.tizen.org/development/tizen-studio/native-tools/configuring-your-app/manifest-text-editor#feature"><b>Feature Element</b>.</a>
49  * <BR>
50  * @{
51  */
52
53
54 /**
55  * @brief Resets the phone log's count.
56  * @details The number of all types in the phone log will be @c 0.
57  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif
58  * @privlevel public
59  * @privilege %http://tizen.org/privilege/callhistory.write
60  * @return @c 0 on success,
61  *         otherwise a negative error value
62  * @retval #CONTACTS_ERROR_NONE Successful
63  * @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory
64  * @retval #CONTACTS_ERROR_FILE_NO_SPACE FS Full
65  * @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method
66  * @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported
67  * @retval #CONTACTS_ERROR_DB Database operation failure
68  * @retval #CONTACTS_ERROR_IPC IPC error
69  * @retval #CONTACTS_ERROR_SYSTEM Internal system module error
70  * @pre contacts_connect() should be called to open a connection to the contacts service.
71  * @see contacts_connect()
72  */
73 int contacts_phone_log_reset_statistics(void);
74
75
76 /**
77  * @brief Resets the phone log's count by sim slot no.
78  * @since_tizen 3.0
79  * @privlevel public
80  * @privilege %http://tizen.org/privilege/callhistory.write
81  * @param[in] sim_slot_no It is related to the SIM slot number. sim_slot_no 0 means first SIM, sim_slot_no 1 means second SIM
82  * @return @c 0 on success,
83  *         otherwise a negative error value
84  * @retval #CONTACTS_ERROR_NONE Successful
85  * @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory
86  * @retval #CONTACTS_ERROR_FILE_NO_SPACE FS Full
87  * @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method
88  * @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported
89  * @retval #CONTACTS_ERROR_DB Database operation failure
90  * @retval #CONTACTS_ERROR_IPC IPC error
91  * @retval #CONTACTS_ERROR_SYSTEM Internal system module error
92  * @pre contacts_connect() should be called to open a connection to the contacts service.
93  * @see contacts_connect()
94  */
95 int contacts_phone_log_reset_statistics_by_sim(int sim_slot_no);
96
97
98 /**
99  * @}
100  */
101
102
103 #ifdef __cplusplus
104 }
105 #endif
106
107
108 #endif /* __TIZEN_SOCIAL_CONTACTS_PHONELOG_H__ */
109