enable to make group of read_only book
[platform/core/pim/contacts-service.git] / include / contacts_db.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 #ifndef __TIZEN_SOCIAL_CONTACTS_DB_H__
20 #define __TIZEN_SOCIAL_CONTACTS_DB_H__
21
22 #ifdef __cplusplus
23 extern "C"
24 {
25 #endif
26
27 /**
28  * @file contacts_db.h
29  */
30
31 /**
32  * @ingroup CAPI_SOCIAL_CONTACTS_SVC_MODULE
33  * @defgroup CAPI_SOCIAL_CONTACTS_SVC_DATABASE_MODULE Database
34  *
35  * @brief The contacts database API provides the set of definitions and interfaces that enable application developers to handle contacts database.
36  *
37  * @section CAPI_SOCIAL_CONTACTS_SVC_DATABASE_MODULE_HEADER Required Header
38  *  \#include <contacts.h>
39  *
40  * <BR>
41  * @{
42  */
43
44 /**
45  * @brief Enumeration for contact change state.
46  *
47  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.4 @endif
48  *
49  */
50 typedef enum
51 {
52         CONTACTS_CHANGE_INSERTED,       /**< Inserted */
53         CONTACTS_CHANGE_UPDATED,        /**< Updated */
54         CONTACTS_CHANGE_DELETED,        /**< Deleted */
55 } contacts_changed_e;
56
57 /**
58  * @brief Called when the designated view changes.
59  *
60  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.4 @endif
61  *
62  * @param[in]   view_uri    The view URI
63  * @param[in]   user_data   The user data passed from the callback registration function
64  *
65  * @pre         The callback must be registered using contacts_db_add_changed_cb.
66  *
67  * @see contacts_db_add_changed_cb()
68  */
69 typedef void (*contacts_db_changed_cb)(const char *view_uri, void *user_data);
70
71 /**
72  * @brief Inserts a record to the contacts database.
73  *
74  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.4 @endif
75  * @privlevel public
76  * @privilege %http://tizen.org/privilege/contact.write
77  * @privilege %http://tizen.org/privilege/callhistory.write
78  *
79  * @remarks
80  * %http://tizen.org/privilege/contact.write is needed for record which is created with @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address_book, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact, \n @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_my_profile,
81  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_name, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_number, \n
82  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_email, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_note, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_url, \n
83  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_event, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_image, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_company, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_nickname, \n
84  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_messenger, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_extension, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_profile, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_relationship, \n
85  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity_photo, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_speeddial. \n\n
86  * %http://tizen.org/privilege/callhistory.write is needed for record which is created with @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log.
87  *
88  * @param[in]   record                 The record handle
89  * @param[out]  id                     The ID of inserted record
90  *
91  * @return  @c 0 on success,
92  *          otherwise a negative error value
93  *
94  * @retval  #CONTACTS_ERROR_NONE                Successful
95  * @retval  #CONTACTS_ERROR_OUT_OF_MEMORY       Out of memory
96  * @retval  #CONTACTS_ERROR_INVALID_PARAMETER   Invalid parameter
97  * @retval  #CONTACTS_ERROR_FILE_NO_SPACE       FS Full
98  * @retval  #CONTACTS_ERROR_NO_DATA             Requested data does not exist
99  * @retval  #CONTACTS_ERROR_PERMISSION_DENIED   Permission denied. This application does not have the privilege to call this method.
100  * @retval  #CONTACTS_ERROR_NOT_SUPPORTED       Not supported
101  * @retval  #CONTACTS_ERROR_DB                  Database operation failure
102  * @retval  #CONTACTS_ERROR_IPC                 IPC error
103  *
104  * @pre     contacts_connect() should be called to open a connection to the contacts service.
105  * @post        contacts_db_changed_cb() callback wil be called upon success.
106  *
107  * @see contacts_connect()
108  * @see contacts_db_update_record()
109  * @see contacts_db_delete_record()
110  * @see contacts_db_get_record()
111  */
112 int contacts_db_insert_record(contacts_record_h record, int *id);
113
114 /**
115  * @brief Gets a record from the contacts database.
116  *
117  * @details This function creates a new contact handle from the contacts database by the given @a record_id. \n
118  *          @a record will be created, which is filled with contact information.
119  *
120  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.4 @endif
121  * @privlevel public
122  * @privilege %http://tizen.org/privilege/contact.read
123  * @privilege %http://tizen.org/privilege/callhistory.read
124  *
125  * @remarks %http://tizen.org/privilege/contact.read is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address_book, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person, \n
126  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_simple_contact, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_my_profile, \n
127  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_name, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_number, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_email, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address, \n
128  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_note, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_url, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_event, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_image, \n
129  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_company, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_nickname, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_messenger, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_extension, \n
130  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_profile, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_relationship, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity_photo, \n
131  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_speeddial, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_sdn. \n\n
132  * %http://tizen.org/privilege/callhistory.read is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log.
133  *
134  * @remarks You must release @a record using contacts_record_destroy().
135  *
136  * @param[in]   view_uri    The view URI of a record
137  * @param[in]   record_id   The record ID to get from database
138  * @param[out]  record      The record handle associated with the record ID
139  *
140  * @return  @c 0 on success,
141  *          otherwise a negative error value
142  *
143  * @retval  #CONTACTS_ERROR_NONE                Successful
144  * @retval  #CONTACTS_ERROR_OUT_OF_MEMORY       Out of memory
145  * @retval  #CONTACTS_ERROR_INVALID_PARAMETER   Invalid parameter
146  * @retval  #CONTACTS_ERROR_FILE_NO_SPACE       FS Full
147  * @retval  #CONTACTS_ERROR_NO_DATA             Requested data does not exist
148  * @retval  #CONTACTS_ERROR_PERMISSION_DENIED   Permission denied. This application does not have the privilege to call this method.
149  * @retval  #CONTACTS_ERROR_NOT_SUPPORTED       Not supported
150  * @retval  #CONTACTS_ERROR_DB                  Database operation failure
151  * @retval  #CONTACTS_ERROR_IPC                 IPC error
152  *
153  * @pre     contacts_connect() should be called to open a connection to the contacts service.
154  *
155  * @see contacts_connect()
156  * @see contacts_record_destroy()
157  */
158 int contacts_db_get_record(const char *view_uri, int record_id, contacts_record_h *record);
159
160 /**
161  * @brief Updates a record in the contacts database.
162  *
163  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.4 @endif
164  * @privlevel public
165  * @privilege %http://tizen.org/privilege/contact.write
166  * @privilege %http://tizen.org/privilege/callhistory.write
167  *
168  * @remarks %http://tizen.org/privilege/contact.write is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address_book, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact, \n @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_my_profile,
169  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_name, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_number, \n
170  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_email, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_note, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_url, \n
171  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_event, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_image, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_company, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_nickname, \n
172  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_messenger, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_extension, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_profile, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_relationship, \n
173  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity_photo, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_speeddial. \n\n
174  * %http://tizen.org/privilege/callhistory.write is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log.
175  *
176  * @param[in]   record          The record handle
177  *
178  * @return  @c 0 on success,
179  *          otherwise a negative error value
180  *
181  * @retval  #CONTACTS_ERROR_NONE                Successful
182  * @retval  #CONTACTS_ERROR_OUT_OF_MEMORY       Out of memory
183  * @retval  #CONTACTS_ERROR_INVALID_PARAMETER   Invalid parameter
184  * @retval  #CONTACTS_ERROR_FILE_NO_SPACE       FS Full
185  * @retval  #CONTACTS_ERROR_NO_DATA             Requested data does not exist
186  * @retval  #CONTACTS_ERROR_PERMISSION_DENIED   Permission denied. This application does not have the privilege to call this method.
187  * @retval  #CONTACTS_ERROR_NOT_SUPPORTED       Not supported
188  * @retval  #CONTACTS_ERROR_DB                  Database operation failure
189  * @retval  #CONTACTS_ERROR_IPC                 IPC error
190  *
191  * @pre     contacts_connect() should be called to open a connection to the contacts service.
192  * @post        contacts_db_changed_cb() callback wil be called upon success.
193  *
194  * @see contacts_connect()
195  * @see contacts_db_insert_record()
196  * @see contacts_db_delete_record()
197  * @see contacts_db_get_record()
198  */
199 int contacts_db_update_record(contacts_record_h record);
200
201 /**
202  * @brief Deletes a record from the contacts database with related child records.
203  *
204  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.4 @endif
205  * @privlevel public
206  * @privilege %http://tizen.org/privilege/contact.write
207  * @privilege %http://tizen.org/privilege/callhistory.write
208  *
209  * @remarks %http://tizen.org/privilege/contact.write is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address_book, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact, \n @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_my_profile,
210  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_name, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_number, \n
211  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_email, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_note, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_url, \n
212  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_event, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_image, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_company, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_nickname, \n
213  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_messenger, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_extension, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_profile, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_relationship, \n
214  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity_photo, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_speeddial. \n\n
215  * %http://tizen.org/privilege/callhistory.write is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log.
216  *
217  * @param[in]   view_uri    The view URI of a record
218  * @param[in]   record_id   The record ID to delete
219  *
220  * @return  @c 0 on success,
221  *          otherwise a negative error value
222  *
223  * @retval  #CONTACTS_ERROR_NONE                Successful
224  * @retval  #CONTACTS_ERROR_OUT_OF_MEMORY       Out of memory
225  * @retval  #CONTACTS_ERROR_INVALID_PARAMETER   Invalid parameter
226  * @retval  #CONTACTS_ERROR_FILE_NO_SPACE       FS Full
227  * @retval  #CONTACTS_ERROR_NO_DATA             Requested data does not exist
228  * @retval  #CONTACTS_ERROR_PERMISSION_DENIED   Permission denied. This application does not have the privilege to call this method.
229  * @retval  #CONTACTS_ERROR_NOT_SUPPORTED       Not supported
230  * @retval  #CONTACTS_ERROR_DB                  Database operation failure
231  * @retval  #CONTACTS_ERROR_IPC                 IPC error
232  *
233  * @pre     contacts_connect() should be called to open a connection to the contacts service.
234  * @post        contacts_db_changed_cb() callback wil be called upon success.
235  *
236  * @see contacts_connect()
237  * @see contacts_db_insert_record()
238  */
239 int contacts_db_delete_record(const char *view_uri, int record_id);
240
241 /**
242  * @brief Replaces an id-identified record with the given record.
243  *
244  * @details Now, this API supports only _contacts_contact view_uri.
245  *
246  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.4 @endif
247  * @privlevel public
248  * @privilege %http://tizen.org/privilege/contact.write
249  *
250  * @remarks The write-once value of @a record is not replaced.\n
251  * This API works only for @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact
252  *
253  * @param[in]   record                The new record handle to replace
254  * @param[in]   id                    The DB record ID to be replaced
255  *
256  * @return  @c 0 on success,
257  *          otherwise a negative error value
258  *
259  * @retval  #CONTACTS_ERROR_NONE                Successful
260  * @retval  #CONTACTS_ERROR_OUT_OF_MEMORY       Out of memory
261  * @retval  #CONTACTS_ERROR_INVALID_PARAMETER   Invalid parameter
262  * @retval  #CONTACTS_ERROR_FILE_NO_SPACE       FS Full
263  * @retval  #CONTACTS_ERROR_NO_DATA             Requested data does not exist
264  * @retval  #CONTACTS_ERROR_PERMISSION_DENIED   Permission denied. This application does not have the privilege to call this method.
265  * @retval  #CONTACTS_ERROR_NOT_SUPPORTED       Not supported
266  * @retval  #CONTACTS_ERROR_DB                  Database operation failure
267  * @retval  #CONTACTS_ERROR_IPC                 IPC error
268  *
269  * @pre     contacts_connect() should be called to open a connection to the contacts service.
270  * @post        contacts_db_changed_cb() callback wil be called upon success.
271  *
272  * @see contacts_connect()
273  * @see contacts_db_update_record()
274  * @see contacts_db_delete_record()
275  * @see contacts_db_get_record()
276  */
277 int contacts_db_replace_record(contacts_record_h record, int id);
278
279 /**
280  * @brief Retrieves all records and returns the results list.
281  *
282  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.4 @endif
283  * @privlevel public
284  * @privilege %http://tizen.org/privilege/contact.read
285  *@privilege  %http://tizen.org/privilege/callhistory.read
286  *
287  * @remarks You must release @a record_list using contacts_list_destroy(). \n
288  * %http://tizen.org/privilege/contact.read is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address_book, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person, \n
289  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_simple_contact, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_my_profile, \n
290  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_name, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_number, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_email, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address, \n
291  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_note, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_url, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_event, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_image, \n
292  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_company, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_nickname, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_messenger, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_extension, \n
293  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_profile, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_relationship, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity_photo, \n
294  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_speeddial, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_sdn and all read-only views except views which are related to phone log. \n\n
295  * %http://tizen.org/privilege/callhistory.read is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log_stat. \n
296  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_phone_log view is needed both privileges.
297  *
298  * @param[in]   view_uri        The view URI to get records
299  * @param[in]   offset          The index from which to get results
300  * @param[in]   limit           The number to limit results(value 0 is used for all records)
301  * @param[out]  record_list     The record list
302  *
303  * @return  @c 0 on success,
304  *          otherwise a negative error value
305  *
306  * @retval  #CONTACTS_ERROR_NONE                Successful
307  * @retval  #CONTACTS_ERROR_OUT_OF_MEMORY       Out of memory
308  * @retval  #CONTACTS_ERROR_INVALID_PARAMETER   Invalid parameter
309  * @retval  #CONTACTS_ERROR_FILE_NO_SPACE       FS Full
310  * @retval  #CONTACTS_ERROR_NO_DATA             Requested data does not exist
311  * @retval  #CONTACTS_ERROR_PERMISSION_DENIED   Permission denied. This application does not have the privilege to call this method.
312  * @retval  #CONTACTS_ERROR_NOT_SUPPORTED       Not supported
313  * @retval  #CONTACTS_ERROR_DB                  Database operation failure
314  * @retval  #CONTACTS_ERROR_IPC                 IPC error
315  *
316  * @pre    contacts_connect() should be called to open a connection to the contacts service.
317  *
318  * @see contacts_connect()
319  * @see contacts_list_destroy()
320  */
321 int contacts_db_get_all_records(const char *view_uri, int offset, int limit, contacts_list_h *record_list);
322
323 /**
324  * @brief Uses a query to find records.
325  *
326  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.4 @endif
327  * @privlevel public
328  * @privilege %http://tizen.org/privilege/contact.read
329  * @privilege  %http://tizen.org/privilege/callhistory.read
330  *
331  * @remarks You must release @a record_list using contacts_list_destroy(). \n
332  * %http://tizen.org/privilege/contact.read     is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address_book, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person, \n
333  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_simple_contact, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_my_profile, \n
334  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_name, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_number, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_email, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address, \n
335  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_note, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_url, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_event, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_image, \n
336  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_company, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_nickname, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_messenger, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_extension, \n
337  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_profile, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_relationship, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity_photo, \n
338  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_speeddial, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_sdn and all read-only views except views which are related to phone log. \n\n
339  * %http://tizen.org/privilege/callhistory.read is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log_stat. \n
340  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_phone_log view is needed both privileges.
341  *
342  * @param[in]   query           The query to filter the results
343  * @param[in]   offset          The index from which to get results
344  * @param[in]   limit           The number to limit results(value 0 is used for get all records)
345  * @param[out]  record_list     The record list
346  *
347  * @return  @c 0 on success,
348  *          otherwise a negative error value
349  *
350  * @retval  #CONTACTS_ERROR_NONE                Successful
351  * @retval  #CONTACTS_ERROR_OUT_OF_MEMORY       Out of memory
352  * @retval  #CONTACTS_ERROR_INVALID_PARAMETER   Invalid parameter
353  * @retval  #CONTACTS_ERROR_FILE_NO_SPACE       FS Full
354  * @retval  #CONTACTS_ERROR_NO_DATA             Requested data does not exist
355  * @retval  #CONTACTS_ERROR_PERMISSION_DENIED   Permission denied. This application does not have the privilege to call this method.
356  * @retval  #CONTACTS_ERROR_NOT_SUPPORTED       Not supported
357  * @retval  #CONTACTS_ERROR_DB                  Database operation failure
358  * @retval  #CONTACTS_ERROR_IPC                 IPC error
359  *
360  * @pre    contacts_connect() should be called to open a connection to the contacts service.
361  *
362  * @see contacts_connect()
363  * @see contacts_list_destroy()
364  */
365 int contacts_db_get_records_with_query(contacts_query_h query, int offset, int limit, contacts_list_h *record_list);
366
367 /**
368  * @brief Inserts multiple records to the contacts database.
369  *
370  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.4 @endif
371  * @privlevel public
372  * @privilege %http://tizen.org/privilege/contact.write
373  * @privilege %http://tizen.org/privilege/callhistory.write
374  *
375  * @remarks %http://tizen.org/privilege/contact.write is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address_book, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact, \n @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_my_profile,
376  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_name, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_number, \n
377  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_email, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_note, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_url, \n
378  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_event, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_image, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_company, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_nickname, \n
379  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_messenger, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_extension, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_profile, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_relationship, \n
380  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity_photo, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_speeddial. \n\n
381  * %http://tizen.org/privilege/callhistory.write is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log.
382  *
383  * @param[in]    record_list         The record list handle
384  * @param[out]   ids                 The IDs of inserted records
385  * @param[out]   count               The number of IDs
386  *
387  * @return  @c 0 on success,
388  *          otherwise a negative error value
389  *
390  * @retval  #CONTACTS_ERROR_NONE                Successful
391  * @retval  #CONTACTS_ERROR_OUT_OF_MEMORY       Out of memory
392  * @retval  #CONTACTS_ERROR_INVALID_PARAMETER   Invalid parameter
393  * @retval  #CONTACTS_ERROR_FILE_NO_SPACE       FS Full
394  * @retval  #CONTACTS_ERROR_NO_DATA             Requested data does not exist
395  * @retval  #CONTACTS_ERROR_PERMISSION_DENIED   Permission denied. This application does not have the privilege to call this method.
396  * @retval  #CONTACTS_ERROR_NOT_SUPPORTED       Not supported
397  * @retval  #CONTACTS_ERROR_DB                  Database operation failure
398  * @retval  #CONTACTS_ERROR_IPC                 IPC error
399  *
400  * @pre     contacts_connect() should be called to open a connection to the contacts service.
401  * @post        contacts_db_changed_cb() callback wil be called upon success.
402  *
403  * @see contacts_connect()
404  * @see contacts_db_update_records()
405  * @see contacts_db_delete_records()
406  */
407 int contacts_db_insert_records(contacts_list_h record_list, int **ids, int *count);
408
409 /**
410  * @brief Updates multiple records in the contacts database.
411  *
412  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.4 @endif
413  * @privlevel public
414  * @privilege %http://tizen.org/privilege/contact.write
415  * @privilege %http://tizen.org/privilege/callhistory.write
416  *
417  * @remarks %http://tizen.org/privilege/contact.write is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address_book, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact, \n @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_my_profile,
418  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_name, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_number, \n
419  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_email, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_note, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_url, \n
420  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_event, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_image, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_company, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_nickname, \n
421  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_messenger, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_extension, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_profile, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_relationship, \n
422  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity_photo, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_speeddial. \n\n
423  * %http://tizen.org/privilege/callhistory.write is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log.
424  *
425  * @param[in]   record_list       The record list handle
426  *
427  * @return  @c 0 on success,
428  *          otherwise a negative error value
429  *
430  * @retval  #CONTACTS_ERROR_NONE                Successful
431  * @retval  #CONTACTS_ERROR_OUT_OF_MEMORY       Out of memory
432  * @retval  #CONTACTS_ERROR_INVALID_PARAMETER   Invalid parameter
433  * @retval  #CONTACTS_ERROR_FILE_NO_SPACE       FS Full
434  * @retval  #CONTACTS_ERROR_NO_DATA             Requested data does not exist
435  * @retval  #CONTACTS_ERROR_PERMISSION_DENIED   Permission denied. This application does not have the privilege to call this method.
436  * @retval  #CONTACTS_ERROR_NOT_SUPPORTED       Not supported
437  * @retval  #CONTACTS_ERROR_DB                  Database operation failure
438  * @retval  #CONTACTS_ERROR_IPC                 IPC error
439  *
440  * @pre     contacts_connect() should be called to open a connection to the contacts service.
441  * @post        contacts_db_changed_cb() callback wil be called upon success.
442  *
443  * @see contacts_connect()
444  * @see contacts_db_insert_records()
445  * @see contacts_db_delete_records()
446  */
447 int contacts_db_update_records(contacts_list_h record_list);
448
449 /**
450  * @brief Deletes multiple records in the contacts database with related child records.
451  *
452  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.4 @endif
453  * @privlevel public
454  * @privilege %http://tizen.org/privilege/contact.write
455  * @privilege %http://tizen.org/privilege/callhistory.write
456  *
457  * @remarks %http://tizen.org/privilege/contact.write is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address_book, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact, \n @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_my_profile,
458  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_name, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_number, \n
459  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_email, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_note, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_url, \n
460  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_event, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_image, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_company, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_nickname, \n
461  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_messenger, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_extension, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_profile, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_relationship, \n
462  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity_photo, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_speeddial. \n\n
463  * %http://tizen.org/privilege/callhistory.write is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log.
464  *
465  * @param[in]   view_uri            The view URI of records
466  * @param[in]   record_id_array     The record IDs to delete
467  * @param[in]   count               The size of record ID array
468  *
469  * @return  @c 0 on success,
470  *          otherwise a negative error value
471  *
472  * @retval  #CONTACTS_ERROR_NONE                Successful
473  * @retval  #CONTACTS_ERROR_OUT_OF_MEMORY       Out of memory
474  * @retval  #CONTACTS_ERROR_INVALID_PARAMETER   Invalid parameter
475  * @retval  #CONTACTS_ERROR_FILE_NO_SPACE       FS Full
476  * @retval  #CONTACTS_ERROR_NO_DATA             Requested data does not exist
477  * @retval  #CONTACTS_ERROR_PERMISSION_DENIED   Permission denied. This application does not have the privilege to call this method.
478  * @retval  #CONTACTS_ERROR_NOT_SUPPORTED       Not supported
479  * @retval  #CONTACTS_ERROR_DB                  Database operation failure
480  * @retval  #CONTACTS_ERROR_IPC                 IPC error
481  *
482  * @pre     contacts_connect() should be called to open a connection to the contacts service.
483  * @post        contacts_db_changed_cb() callback wil be called upon success.
484  *
485  * @see contacts_connect()
486  * @see contacts_db_insert_records()
487  * @see contacts_db_update_records()
488  */
489 int contacts_db_delete_records(const char *view_uri, int record_id_array[], int count);
490
491 /**
492  * @brief Replaces database records identified by given ids with a given record list.
493  *
494  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.4 @endif
495  * @privlevel public
496  * @privilege %http://tizen.org/privilege/contact.write
497  *
498  * @remarks The write-once value of record is not replaced.\n
499  * This API works only for @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact
500  *
501  * @param[in]   list                                  The new record list handle to replace
502  * @param[in]   record_id_array         The record IDs to replace
503  * @param[in]   count                           The size of record ID array
504  *
505  * @return  @c 0 on success,
506  *          otherwise a negative error value
507  *
508  * @retval  #CONTACTS_ERROR_NONE                Successful
509  * @retval  #CONTACTS_ERROR_OUT_OF_MEMORY       Out of memory
510  * @retval  #CONTACTS_ERROR_INVALID_PARAMETER   Invalid parameter
511  * @retval  #CONTACTS_ERROR_FILE_NO_SPACE       FS Full
512  * @retval  #CONTACTS_ERROR_NO_DATA             Requested data does not exist
513  * @retval  #CONTACTS_ERROR_PERMISSION_DENIED   Permission denied. This application does not have the privilege to call this method.
514  * @retval  #CONTACTS_ERROR_NOT_SUPPORTED       Not supported
515  * @retval  #CONTACTS_ERROR_DB                  Database operation failure
516  * @retval  #CONTACTS_ERROR_IPC                 IPC error
517  *
518  * @pre     contacts_connect() should be called to open a connection to the contacts service.
519  * @post        contacts_db_changed_cb() callback wil be called upon success.
520  *
521  * @see contacts_connect()
522  * @see contacts_db_update_record()
523  * @see contacts_db_delete_record()
524  * @see contacts_db_get_record()
525  */
526 int contacts_db_replace_records(contacts_list_h list, int record_id_array[], int count);
527
528 /**
529  * @brief Gets the current contacts database version.
530  *
531  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.4 @endif
532  * @privlevel public
533  * @privilege %http://tizen.org/privilege/contact.read
534  * @privilege %http://tizen.org/privilege/callhistory.read
535  *
536  * @param[out]  contacts_db_version    The contacts database version
537  *
538  * @return  @c 0 on success,
539  *          otherwise a negative error value
540  *
541  * @retval  #CONTACTS_ERROR_NONE                Successful
542  * @retval  #CONTACTS_ERROR_OUT_OF_MEMORY       Out of memory
543  * @retval  #CONTACTS_ERROR_INVALID_PARAMETER   Invalid parameter
544  * @retval  #CONTACTS_ERROR_PERMISSION_DENIED   Permission denied. This application does not have the privilege to call this method.
545  * @retval  #CONTACTS_ERROR_NO_DATA             Requested data does not exist
546  * @retval  #CONTACTS_ERROR_DB                  Database operation failure
547  * @retval  #CONTACTS_ERROR_IPC                 IPC error
548  *
549  * @pre     contacts_connect() should be called to open a connection to the contacts service.
550  *
551  * @see contacts_connect()
552  * @see contacts_db_get_changes_by_version()
553  */
554 int contacts_db_get_current_version(int *contacts_db_version);
555
556 /**
557  * @brief Registers a callback function to be invoked when a record changes.
558  *
559  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.4 @endif
560  * @privlevel public
561  * @privilege %http://tizen.org/privilege/contact.read
562  * @privilege %http://tizen.org/privilege/callhistory.read
563  *
564  * @remarks %http://tizen.org/privilege/contact.read is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address_book, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person, \n
565  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_simple_contact, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_my_profile, \n
566  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_name, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_number, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_email, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address, \n
567  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_note, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_url, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_event, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_image, \n
568  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_company, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_nickname, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_messenger, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_extension, \n
569  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_profile, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_relationship, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity_photo, \n
570  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_speeddial, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_sdn, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group_relation.\n\n
571  * %http://tizen.org/privilege/callhistory.read is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log.
572  * If successive change notification produced on the view_uri are identical,
573  * then they are coalesced into a single notification if the older notification has not yet been called
574  * because default main loop is doing something.
575  * But, it means that a callback function is not called to reliably count of change.
576  *
577  * @param[in]   view_uri    The view URI of records whose changes are monitored
578  * @param[in]   callback    The callback function to register
579  * @param[in]   user_data   The user data to be passed to the callback function
580  *
581  * @return  @c 0 on success,
582  *          otherwise a negative error value
583  *
584  * @retval  #CONTACTS_ERROR_NONE                Successful
585  * @retval  #CONTACTS_ERROR_OUT_OF_MEMORY       Out of memory
586  * @retval  #CONTACTS_ERROR_INVALID_PARAMETER   Invalid parameter
587  * @retval  #CONTACTS_ERROR_PERMISSION_DENIED   Permission denied. This application does not have the privilege to call this method.
588  * @retval  #CONTACTS_ERROR_NOT_SUPPORTED       Not supported
589  * @retval  #CONTACTS_ERROR_SYSTEM              System error
590  *
591  * @pre         contacts_connect() should be called to open a connection to the contacts service.
592  * @post                contacts_db_changed_cb() will be invoked when the designated view changes.
593  *
594  * @see contacts_connect()
595  * @see contacts_db_changed_cb()
596  * @see contacts_db_remove_changed_cb()
597  */
598 int contacts_db_add_changed_cb(const char *view_uri, contacts_db_changed_cb callback, void *user_data);
599
600 /**
601  * @brief Unregisters a callback function.
602  *
603  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.4 @endif
604  *
605  * @param[in]   view_uri    The view URI of records whose changes are monitored
606  * @param[in]   callback    The callback function to register
607  * @param[in]   user_data   The user data to be passed to the callback function
608  *
609  * @return  @c 0 on success,
610  *          otherwise a negative error value
611  *
612  * @retval  #CONTACTS_ERROR_NONE                Successful
613  * @retval  #CONTACTS_ERROR_INVALID_PARAMETER   Invalid parameter
614  * @retval  #CONTACTS_ERROR_PERMISSION_DENIED   Permission denied. This application does not have the privilege to call this method.
615  * @retval  #CONTACTS_ERROR_NO_DATA             Requested data does not exist
616  * @retval  #CONTACTS_ERROR_NOT_SUPPORTED       Not supported
617  * @retval  #CONTACTS_ERROR_SYSTEM              System error
618  *
619  * @pre         contacts_connect() should be called to open a connection to the contacts service.
620  *
621  * @see contacts_connect()
622  * @see contacts_db_changed_cb()
623  * @see contacts_db_add_changed_cb()
624  */
625 int contacts_db_remove_changed_cb(const char *view_uri, contacts_db_changed_cb callback, void *user_data);
626
627 /**
628  * @brief Retrieves records changes since the given database version.
629  *
630  * @details This function will find all changed records since the given @a contacts_db_version. \n
631  *          Now, support @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact_updated_info, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group_updated_info \n
632  *          @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_my_profile_updated_info and @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_grouprel_updated_info.
633  *
634  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.4 @endif
635  * @privlevel public
636  * @privilege %http://tizen.org/privilege/contact.read
637  *
638  * @remarks You must release @a record_list using contacts_list_destroy().
639  *
640  * @param[in]   view_uri                    The view URI to get records
641  * @param[in]   address_book_id             The address book ID to filter
642  * @param[in]   contacts_db_version         The contacts database version
643  * @param[out]  change_record_list          The record list
644  * @param[out]  current_contacts_db_version The current contacts database version
645  *
646  * @return  @c 0 on success,
647  *          otherwise a negative error value
648  *
649  * @retval  #CONTACTS_ERROR_NONE                Successful
650  * @retval  #CONTACTS_ERROR_OUT_OF_MEMORY       Out of memory
651  * @retval  #CONTACTS_ERROR_INVALID_PARAMETER   Invalid parameter
652  * @retval  #CONTACTS_ERROR_FILE_NO_SPACE       FS Full
653  * @retval  #CONTACTS_ERROR_NO_DATA             Requested data does not exist
654  * @retval  #CONTACTS_ERROR_PERMISSION_DENIED   Permission denied. This application does not have the privilege to call this method.
655  * @retval  #CONTACTS_ERROR_NOT_SUPPORTED       Not supported
656  * @retval  #CONTACTS_ERROR_DB                  Database operation failure
657  * @retval  #CONTACTS_ERROR_IPC                 IPC error
658  *
659  * @pre    contacts_connect() should be called to open a connection to the contacts service.
660  *
661  * @see contacts_connect()
662  * @see contacts_list_destroy()
663  */
664 int contacts_db_get_changes_by_version(const char *view_uri,
665                 int address_book_id,
666                 int contacts_db_version,
667                 contacts_list_h *change_record_list,
668                 int *current_contacts_db_version);
669
670 /**
671  * @brief Finds records based on a given keyword.
672  *
673  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.4 @endif
674  * @privlevel public
675  * @privilege %http://tizen.org/privilege/contact.read
676  *
677  * @remarks You must release @a record_list using contacts_list_destroy(). \n
678  * This API works only for @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_contact, \n
679  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_grouprel, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_assigned \n
680  * and @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_not_assigned.
681  *
682  * @param[in]   view_uri        The view URI to get records
683  * @param[in]   keyword         The keyword
684  * @param[in]   offset          The index from which to get results
685  * @param[in]   limit           The number to limit results(value 0 is used for get all records)
686  * @param[out]  record_list     The record list
687  *
688  * @return  @c 0 on success,
689  *          otherwise a negative error value
690  *
691  * @retval  #CONTACTS_ERROR_NONE                Successful
692  * @retval  #CONTACTS_ERROR_OUT_OF_MEMORY       Out of memory
693  * @retval  #CONTACTS_ERROR_INVALID_PARAMETER   Invalid parameter
694  * @retval  #CONTACTS_ERROR_PERMISSION_DENIED   Permission denied. This application does not have the privilege to call this method.
695  * @retval  #CONTACTS_ERROR_NOT_SUPPORTED       Not supported
696  * @retval  #CONTACTS_ERROR_DB                  Database operation failure
697  * @retval  #CONTACTS_ERROR_IPC                 IPC error
698  *
699  * @pre    contacts_connect() should be called to open a connection to the contacts service.
700  *
701  * @see contacts_connect()
702  * @see contacts_list_destroy()
703  */
704 int contacts_db_search_records(const char *view_uri, const char *keyword, int offset, int limit, contacts_list_h *record_list);
705
706 /**
707  * @brief Finds records based on given query and keyword.
708  *
709  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.4 @endif
710  * @privlevel public
711  * @privilege %http://tizen.org/privilege/contact.read
712  *
713  * @remarks You must release @a record_list using contacts_list_destroy(). \n
714  * This API works only for @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_contact, \n
715  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_grouprel, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_assigned \n
716  * and @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_not_assigned
717  *
718  * @param[in]   query           The query handle to filter
719  * @param[in]   keyword         The keyword
720  * @param[in]   offset          The index from which to get results
721  * @param[in]   limit           The number to limit results(value 0 used for get all records)
722  * @param[out]  record_list     The record list
723  *
724  * @return  @c 0 on success,
725  *          otherwise a negative error value
726  *
727  * @retval  #CONTACTS_ERROR_NONE                Successful
728  * @retval  #CONTACTS_ERROR_OUT_OF_MEMORY       Out of memory
729  * @retval  #CONTACTS_ERROR_INVALID_PARAMETER   Invalid parameter
730  * @retval  #CONTACTS_ERROR_FILE_NO_SPACE       FS Full
731  * @retval  #CONTACTS_ERROR_PERMISSION_DENIED   Permission denied. This application does not have the privilege to call this method.
732  * @retval  #CONTACTS_ERROR_NOT_SUPPORTED       Not supported
733  * @retval  #CONTACTS_ERROR_DB                  Database operation failure
734  * @retval  #CONTACTS_ERROR_IPC                 IPC error
735  *
736  * @pre    contacts_connect() should be called to open a connection to the contacts service.
737  *
738  * @see contacts_connect()
739  * @see contacts_list_destroy()
740  */
741 int contacts_db_search_records_with_query(contacts_query_h query, const char *keyword, int offset, int limit, contacts_list_h *record_list);
742
743 /**
744  * @brief Finds records based on a keyword and range.
745  *
746  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.4 @endif
747  * @privlevel public
748  * @privilege %http://tizen.org/privilege/contact.read
749  *
750  * @remarks You must release @a record_list using contacts_list_destroy(). \n
751  * This API works only for @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_contact, \n
752  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_grouprel, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_assigned, \n
753  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_not_assigned. These views can search records with range @ref CONTACTS_SEARCH_RANGE_NAME, @ref CONTACTS_SEARCH_RANGE_NUMBER, @ref CONTACTS_SEARCH_RANGE_DATA. \n
754  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_number can search records with @ref CONTACTS_SEARCH_RANGE_NAME and @ref CONTACTS_SEARCH_RANGE_NUMBER.\n
755  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_email can search records with @ref CONTACTS_SEARCH_RANGE_NAME and @ref CONTACTS_SEARCH_RANGE_EMAIL. \n
756  *
757  * @param[in]   view_uri        The view URI
758  * @param[in]   keyword         The keyword
759  * @param[in]   offset          The index from which to get results
760  * @param[in]   limit           The number to limit results(value 0 is used for get all records)
761  * @param[in]   range           The search range
762  * @param[out]  record_list     The record list
763  *
764  * @return  @c 0 on success,
765  *          otherwise a negative error value
766  *
767  * @retval  #CONTACTS_ERROR_NONE                Successful
768  * @retval  #CONTACTS_ERROR_OUT_OF_MEMORY       Out of memory
769  * @retval  #CONTACTS_ERROR_INVALID_PARAMETER   Invalid parameter
770  * @retval  #CONTACTS_ERROR_PERMISSION_DENIED   Permission denied. This application does not have the privilege to call this method.
771  * @retval  #CONTACTS_ERROR_NOT_SUPPORTED       Not supported
772  * @retval  #CONTACTS_ERROR_DB                  Database operation failure
773  * @retval  #CONTACTS_ERROR_IPC                 IPC error
774  *
775  * @pre    contacts_connect() should be called to open a connection to the contacts service.
776  *
777  * @see contacts_connect()
778  * @see contacts_list_destroy()
779  */
780 int contacts_db_search_records_with_range(const char *view_uri, const char *keyword, int offset, int limit, int range, contacts_list_h *record_list);
781
782 /**
783  * @brief Gets the number of records in a specific view.
784  *
785  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.4 @endif
786  * @privlevel public
787  * @privilege %http://tizen.org/privilege/contact.read
788  * @privilege %http://tizen.org/privilege/callhistory.read
789  *
790  * @remarks %http://tizen.org/privilege/contact.read    is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address_book, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person, \n
791  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_simple_contact, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_my_profile, \n
792  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_name, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_number, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_email, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address, \n
793  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_note, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_url, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_event, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_image, \n
794  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_company, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_nickname, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_messenger, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_extension, \n
795  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_profile, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_relationship, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity_photo, \n
796  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_speeddial, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_sdn and all read-only views except views which is related to phone log. \n\n
797  * %http://tizen.org/privilege/callhistory.read is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log_stat. \n
798  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_phone_log view is needed both privilege.
799  *
800  * @param[in]   view_uri        The view URI
801  * @param[out]  count           The count of records
802  *
803  * @return  @c 0 on success,
804  *          otherwise a negative error value
805  *
806  * @retval  #CONTACTS_ERROR_NONE                Successful
807  * @retval  #CONTACTS_ERROR_OUT_OF_MEMORY       Out of memory
808  * @retval  #CONTACTS_ERROR_INVALID_PARAMETER   Invalid parameter
809  * @retval  #CONTACTS_ERROR_NO_DATA             Requested data does not exist
810  * @retval  #CONTACTS_ERROR_PERMISSION_DENIED   Permission denied. This application does not have the privilege to call this method.
811  * @retval  #CONTACTS_ERROR_NOT_SUPPORTED       Not supported
812  * @retval  #CONTACTS_ERROR_DB                  Database operation failure
813  * @retval  #CONTACTS_ERROR_IPC                 IPC error
814  *
815  * @pre    contacts_connect() should be called to open a connection to the contacts service.
816  *
817  * @see contacts_connect()
818  */
819 int contacts_db_get_count(const char *view_uri, int *count);
820
821 /**
822  * @brief Gets the number of records matching a query.
823  *
824  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.4 @endif
825  * @privlevel public
826  * @privilege %http://tizen.org/privilege/contact.read
827  * @privilege %http://tizen.org/privilege/callhistory.read
828  *
829  * @remarks %http://tizen.org/privilege/contact.read is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address_book, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person, \n
830  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_simple_contact, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_my_profile, \n
831  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_name, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_number, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_email, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address, \n
832  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_note, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_url, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_event, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_image, \n
833  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_company, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_nickname, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_messenger, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_extension, \n
834  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_profile, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_relationship, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity_photo, \n
835  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_speeddial, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_sdn and all read-only views except views which is related to phone log. \n\n
836  * %http://tizen.org/privilege/callhistory.read is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log_stat. \n
837  * @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_phone_log view is needed both privilege.
838  *
839  * @param[in]   query           The query handle
840  * @param[out]  count           The count of records
841  *
842  * @return  @c 0 on success,
843  *          otherwise a negative error value
844  *
845  * @retval  #CONTACTS_ERROR_NONE                Successful
846  * @retval  #CONTACTS_ERROR_OUT_OF_MEMORY       Out of memory
847  * @retval  #CONTACTS_ERROR_INVALID_PARAMETER   Invalid parameter
848  * @retval  #CONTACTS_ERROR_NO_DATA             Requested data does not exist
849  * @retval  #CONTACTS_ERROR_PERMISSION_DENIED   Permission denied. This application does not have the privilege to call this method.
850  * @retval  #CONTACTS_ERROR_NOT_SUPPORTED       Not supported
851  * @retval  #CONTACTS_ERROR_DB                  Database operation failure
852  * @retval  #CONTACTS_ERROR_IPC                 IPC error
853  *
854  * @pre    contacts_connect() should be called to open a connection to the contacts service.
855  *
856  * @see contacts_connect()
857  */
858 int contacts_db_get_count_with_query(contacts_query_h query, int *count);
859
860 /**
861  * @brief Gets the last successful changed contacts database version on the current connection.
862  *
863  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.4 @endif
864  * @privlevel public
865  * @privilege %http://tizen.org/privilege/contact.read
866  * @privilege %http://tizen.org/privilege/callhistory.read
867  *
868  * @param[out]  last_change_version    The database version
869  *
870  * @return  @c 0 on success,
871  *          otherwise a negative error value
872  *
873  * @retval  #CONTACTS_ERROR_NONE                Successful
874  * @retval  #CONTACTS_ERROR_INVALID_PARAMETER   Invalid parameter
875  * @retval  #CONTACTS_ERROR_DB                  Database operation failure
876  * @retval  #CONTACTS_ERROR_PERMISSION_DENIED   Permission denied. This application does not have the privilege to call this method.
877  *
878  * @pre     contacts_connect() should be called to open a connection to the contacts service.
879  *
880  * @see contacts_connect()
881  * @see contacts_db_get_current_version()
882  */
883 int contacts_db_get_last_change_version(int *last_change_version);
884
885 /**
886  * @}
887  */
888
889 #ifdef __cplusplus
890 }
891 #endif
892
893
894 #endif /* __TIZEN_SOCIAL_CONTACTS_DB_H__ */