added sip view table
[platform/core/pim/contacts-service.git] / common / ctsvc_view.c
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 #include "contacts.h"
20
21 #include "ctsvc_internal.h"
22 #include "ctsvc_view.h"
23
24 API const _contacts_address_book_property_ids _contacts_address_book = {
25         ._uri           = CTSVC_VIEW_URI_ADDRESSBOOK,
26         .id                     = CTSVC_PROPERTY_ADDRESSBOOK_ID,
27         .account_id     = CTSVC_PROPERTY_ADDRESSBOOK_ACCOUNT_ID,
28         .name           = CTSVC_PROPERTY_ADDRESSBOOK_NAME,
29         .mode           = CTSVC_PROPERTY_ADDRESSBOOK_MODE
30 };
31
32 API const _contacts_group_property_ids _contacts_group = {
33         ._uri                   = CTSVC_VIEW_URI_GROUP,
34         .id                             = CTSVC_PROPERTY_GROUP_ID,
35         .address_book_id        = CTSVC_PROPERTY_GROUP_ADDRESSBOOK_ID,
36         .name                   = CTSVC_PROPERTY_GROUP_NAME,
37         .ringtone_path  = CTSVC_PROPERTY_GROUP_RINGTONE,
38         .image_path             = CTSVC_PROPERTY_GROUP_IMAGE,
39         .vibration              = CTSVC_PROPERTY_GROUP_VIBRATION,
40         .extra_data             = CTSVC_PROPERTY_GROUP_EXTRA_DATA,
41         .is_read_only   = CTSVC_PROPERTY_GROUP_IS_READ_ONLY,
42         .message_alert = CTSVC_PROPERTY_GROUP_MESSAGE_ALERT
43 };
44
45 API const _contacts_person_property_ids _contacts_person = {
46         ._uri                                   = CTSVC_VIEW_URI_PERSON,
47         .id                                             = CTSVC_PROPERTY_PERSON_ID,
48         .display_name                   = CTSVC_PROPERTY_PERSON_DISPLAY_NAME,
49         .display_name_index             = CTSVC_PROPERTY_PERSON_DISPLAY_NAME_INDEX,
50         .display_contact_id             = CTSVC_PROPERTY_PERSON_DISPLAY_CONTACT_ID,
51         .ringtone_path                  = CTSVC_PROPERTY_PERSON_RINGTONE,
52         .image_thumbnail_path   = CTSVC_PROPERTY_PERSON_IMAGE_THUMBNAIL,
53         .vibration                              = CTSVC_PROPERTY_PERSON_VIBRATION,
54         .message_alert          = CTSVC_PROPERTY_PERSON_MESSAGE_ALERT,
55         .status                                 = CTSVC_PROPERTY_PERSON_STATUS,
56         .is_favorite                    = CTSVC_PROPERTY_PERSON_IS_FAVORITE,
57         .favorite_priority              = CTSVC_PROPERTY_PERSON_FAVORITE_PRIORITY,
58         .link_count                             = CTSVC_PROPERTY_PERSON_LINK_COUNT,
59         .addressbook_ids                = CTSVC_PROPERTY_PERSON_ADDRESSBOOK_IDS,
60         .has_phonenumber                = CTSVC_PROPERTY_PERSON_HAS_PHONENUMBER,
61         .has_email                              = CTSVC_PROPERTY_PERSON_HAS_EMAIL,
62 };
63
64 API const _contacts_contact_property_ids _contacts_contact = {
65         ._uri                                   = CTSVC_VIEW_URI_CONTACT,
66         .id                                             = CTSVC_PROPERTY_CONTACT_ID,
67         .display_name                   = CTSVC_PROPERTY_CONTACT_DISPLAY_NAME,
68         .display_source_type    = CTSVC_PROPERTY_CONTACT_DISPLAY_SOURCE_DATA_ID,
69         .address_book_id                = CTSVC_PROPERTY_CONTACT_ADDRESSBOOK_ID,
70         .ringtone_path                  = CTSVC_PROPERTY_CONTACT_RINGTONE,
71         .image_thumbnail_path   = CTSVC_PROPERTY_CONTACT_IMAGE_THUMBNAIL,
72         .is_favorite                    = CTSVC_PROPERTY_CONTACT_IS_FAVORITE,
73         .has_phonenumber                = CTSVC_PROPERTY_CONTACT_HAS_PHONENUMBER,
74         .has_email                              = CTSVC_PROPERTY_CONTACT_HAS_EMAIL,
75         .person_id                              = CTSVC_PROPERTY_CONTACT_PERSON_ID,
76         .uid                                    = CTSVC_PROPERTY_CONTACT_UID,
77         .vibration                              = CTSVC_PROPERTY_CONTACT_VIBRATION,
78         .message_alert          = CTSVC_PROPERTY_CONTACT_MESSAGE_ALERT,
79         .changed_time                   = CTSVC_PROPERTY_CONTACT_CHANGED_TIME,
80         .link_mode              = CTSVC_PROPERTY_CONTACT_LINK_MODE,
81         .name                                   = CTSVC_PROPERTY_CONTACT_NAME,
82         .company                                = CTSVC_PROPERTY_CONTACT_COMPANY,
83         .note                                   = CTSVC_PROPERTY_CONTACT_NOTE,
84         .number                                 = CTSVC_PROPERTY_CONTACT_NUMBER,
85         .email                                  = CTSVC_PROPERTY_CONTACT_EMAIL,
86         .event                                  = CTSVC_PROPERTY_CONTACT_EVENT,
87         .messenger                              = CTSVC_PROPERTY_CONTACT_MESSENGER,
88         .address                                = CTSVC_PROPERTY_CONTACT_ADDRESS,
89         .url                                    = CTSVC_PROPERTY_CONTACT_URL,
90         .nickname                               = CTSVC_PROPERTY_CONTACT_NICKNAME,
91         .profile                                = CTSVC_PROPERTY_CONTACT_PROFILE,
92         .relationship                   = CTSVC_PROPERTY_CONTACT_RELATIONSHIP,
93         .image                                  = CTSVC_PROPERTY_CONTACT_IMAGE,
94         .group_relation                 = CTSVC_PROPERTY_CONTACT_GROUP_RELATION,
95         .extension                              = CTSVC_PROPERTY_CONTACT_EXTENSION,
96         .sip                                    = CTSVC_PROPERTY_CONTACT_SIP,
97 };
98
99 API const _contacts_my_profile_property_ids _contacts_my_profile = {
100         ._uri                                   = CTSVC_VIEW_URI_MY_PROFILE,
101         .id                                             = CTSVC_PROPERTY_MY_PROFILE_ID,
102         .display_name                   = CTSVC_PROPERTY_MY_PROFILE_DISPLAY_NAME,
103         .address_book_id                = CTSVC_PROPERTY_MY_PROFILE_ADDRESSBOOK_ID,
104         .image_thumbnail_path   = CTSVC_PROPERTY_MY_PROFILE_IMAGE_THUMBNAIL,
105         .uid                                    = CTSVC_PROPERTY_MY_PROFILE_UID,
106         .changed_time                   = CTSVC_PROPERTY_MY_PROFILE_CHANGED_TIME,
107         .name                                   = CTSVC_PROPERTY_MY_PROFILE_NAME,
108         .company                                = CTSVC_PROPERTY_MY_PROFILE_COMPANY,
109         .note                                   = CTSVC_PROPERTY_MY_PROFILE_NOTE,
110         .number                                 = CTSVC_PROPERTY_MY_PROFILE_NUMBER,
111         .email                                  = CTSVC_PROPERTY_MY_PROFILE_EMAIL,
112         .event                                  = CTSVC_PROPERTY_MY_PROFILE_EVENT,
113         .messenger                              = CTSVC_PROPERTY_MY_PROFILE_MESSENGER,
114         .address                                = CTSVC_PROPERTY_MY_PROFILE_ADDRESS,
115         .url                                    = CTSVC_PROPERTY_MY_PROFILE_URL,
116         .nickname                               = CTSVC_PROPERTY_MY_PROFILE_NICKNAME,
117         .profile                                = CTSVC_PROPERTY_MY_PROFILE_PROFILE,
118         .relationship                   = CTSVC_PROPERTY_MY_PROFILE_RELATIONSHIP,
119         .image                                  = CTSVC_PROPERTY_MY_PROFILE_IMAGE,
120         .extension                              = CTSVC_PROPERTY_MY_PROFILE_EXTENSION,
121         .sip                                    = CTSVC_PROPERTY_MY_PROFILE_SIP,
122 };
123
124 API const _contacts_simple_contact_property_ids _contacts_simple_contact = {
125         ._uri                                   = CTSVC_VIEW_URI_SIMPLE_CONTACT,
126         .id                                             = CTSVC_PROPERTY_CONTACT_ID,
127         .display_name                   = CTSVC_PROPERTY_CONTACT_DISPLAY_NAME,
128         .display_source_type    = CTSVC_PROPERTY_CONTACT_DISPLAY_SOURCE_DATA_ID,
129         .address_book_id                = CTSVC_PROPERTY_CONTACT_ADDRESSBOOK_ID,
130         .person_id                              = CTSVC_PROPERTY_CONTACT_PERSON_ID,
131         .ringtone_path                  = CTSVC_PROPERTY_CONTACT_RINGTONE,
132         .image_thumbnail_path   = CTSVC_PROPERTY_CONTACT_IMAGE_THUMBNAIL,
133         .is_favorite                    = CTSVC_PROPERTY_CONTACT_IS_FAVORITE,
134         .has_phonenumber                = CTSVC_PROPERTY_CONTACT_HAS_PHONENUMBER,
135         .has_email                              = CTSVC_PROPERTY_CONTACT_HAS_EMAIL,
136         .uid                                    = CTSVC_PROPERTY_CONTACT_UID,
137         .vibration                              = CTSVC_PROPERTY_CONTACT_VIBRATION,
138         .message_alert          = CTSVC_PROPERTY_CONTACT_MESSAGE_ALERT,
139         .changed_time                   = CTSVC_PROPERTY_CONTACT_CHANGED_TIME,
140 };
141
142 API const _contacts_name_property_ids _contacts_name = {
143         ._uri                   = CTSVC_VIEW_URI_NAME,
144         .id                             = CTSVC_PROPERTY_NAME_ID,
145         .contact_id             = CTSVC_PROPERTY_NAME_CONTACT_ID,
146         .first                  = CTSVC_PROPERTY_NAME_FIRST,
147         .last                   = CTSVC_PROPERTY_NAME_LAST,
148         .addition               = CTSVC_PROPERTY_NAME_ADDITION,
149         .suffix                 = CTSVC_PROPERTY_NAME_SUFFIX,
150         .prefix                 = CTSVC_PROPERTY_NAME_PREFIX,
151         .phonetic_first = CTSVC_PROPERTY_NAME_PHONETIC_FIRST,
152         .phonetic_middle = CTSVC_PROPERTY_NAME_PHONETIC_MIDDLE,
153         .phonetic_last  = CTSVC_PROPERTY_NAME_PHONETIC_LAST
154 };
155
156 API const _contacts_number_property_ids _contacts_number = {
157         ._uri           = CTSVC_VIEW_URI_NUMBER,
158         .id                     = CTSVC_PROPERTY_NUMBER_ID,
159         .contact_id     = CTSVC_PROPERTY_NUMBER_CONTACT_ID,
160         .type           = CTSVC_PROPERTY_NUMBER_TYPE,
161         .label          = CTSVC_PROPERTY_NUMBER_LABEL,
162         .is_default     = CTSVC_PROPERTY_NUMBER_IS_DEFAULT,
163         .number         = CTSVC_PROPERTY_NUMBER_NUMBER,
164         .normalized_number = CTSVC_PROPERTY_NUMBER_NORMALIZED_NUMBER,
165         .cleaned_number = CTSVC_PROPERTY_NUMBER_CLEANED_NUMBER,
166         .number_filter = CTSVC_PROPERTY_NUMBER_NUMBER_FILTER
167 };
168
169 API const _contacts_email_property_ids _contacts_email = {
170         ._uri           = CTSVC_VIEW_URI_EMAIL,
171         .id                     = CTSVC_PROPERTY_EMAIL_ID,
172         .contact_id     = CTSVC_PROPERTY_EMAIL_CONTACT_ID,
173         .type           = CTSVC_PROPERTY_EMAIL_TYPE,
174         .label          = CTSVC_PROPERTY_EMAIL_LABEL,
175         .is_default     = CTSVC_PROPERTY_EMAIL_IS_DEFAULT,
176         .email          = CTSVC_PROPERTY_EMAIL_EMAIL
177 };
178
179 API const _contacts_address_property_ids _contacts_address = {
180         ._uri                   = CTSVC_VIEW_URI_ADDRESS,
181         .id                             = CTSVC_PROPERTY_ADDRESS_ID,
182         .contact_id             = CTSVC_PROPERTY_ADDRESS_CONTACT_ID,
183         .type                   = CTSVC_PROPERTY_ADDRESS_TYPE,
184         .label                  = CTSVC_PROPERTY_ADDRESS_LABEL,
185         .postbox                = CTSVC_PROPERTY_ADDRESS_POSTBOX,
186         .postal_code    = CTSVC_PROPERTY_ADDRESS_POSTAL_CODE,
187         .region                 = CTSVC_PROPERTY_ADDRESS_REGION,
188         .locality               = CTSVC_PROPERTY_ADDRESS_LOCALITY,
189         .street                 = CTSVC_PROPERTY_ADDRESS_STREET,
190         .country                = CTSVC_PROPERTY_ADDRESS_COUNTRY,
191         .extended               = CTSVC_PROPERTY_ADDRESS_EXTENDED,
192         .is_default             = CTSVC_PROPERTY_ADDRESS_IS_DEFAULT
193 };
194
195 API const _contacts_url_property_ids _contacts_url = {
196         ._uri           = CTSVC_VIEW_URI_URL,
197         .id                     = CTSVC_PROPERTY_URL_ID,
198         .contact_id     = CTSVC_PROPERTY_URL_CONTACT_ID,
199         .type           = CTSVC_PROPERTY_URL_TYPE,
200         .label          = CTSVC_PROPERTY_URL_LABEL,
201         .url            = CTSVC_PROPERTY_URL_URL
202 };
203
204 API const _contacts_event_property_ids _contacts_event = {
205         ._uri           = CTSVC_VIEW_URI_EVENT,
206         .id                     = CTSVC_PROPERTY_EVENT_ID,
207         .contact_id     = CTSVC_PROPERTY_EVENT_CONTACT_ID,
208         .type           = CTSVC_PROPERTY_EVENT_TYPE,
209         .label          = CTSVC_PROPERTY_EVENT_LABEL,
210         .date           = CTSVC_PROPERTY_EVENT_DATE,
211         .is_leap_month = CTSVC_PROPERTY_EVENT_IS_LEAP_MONTH,
212         .calendar_type = CTSVC_PROPERTY_EVENT_CALENDAR_TYPE,
213 };
214
215 API const _contacts_company_property_ids _contacts_company = {
216         ._uri                   = CTSVC_VIEW_URI_COMPANY,
217         .id                             = CTSVC_PROPERTY_COMPANY_ID,
218         .contact_id             = CTSVC_PROPERTY_COMPANY_CONTACT_ID,
219         .type                   = CTSVC_PROPERTY_COMPANY_TYPE,
220         .label                  = CTSVC_PROPERTY_COMPANY_LABEL,
221         .name                   = CTSVC_PROPERTY_COMPANY_NAME,
222         .department             = CTSVC_PROPERTY_COMPANY_DEPARTMENT,
223         .job_title              = CTSVC_PROPERTY_COMPANY_JOB_TITLE,
224         .assistant_name = CTSVC_PROPERTY_COMPANY_ASSISTANT_NAME,
225         .role                   = CTSVC_PROPERTY_COMPANY_ROLE,
226         .logo                   = CTSVC_PROPERTY_COMPANY_LOGO,
227         .location               = CTSVC_PROPERTY_COMPANY_LOCATION,
228         .description    = CTSVC_PROPERTY_COMPANY_DESCRIPTION,
229         .phonetic_name  = CTSVC_PROPERTY_COMPANY_PHONETIC_NAME,
230 };
231
232 API const _contacts_nickname_property_ids _contacts_nickname = {
233         ._uri           = CTSVC_VIEW_URI_NICKNAME,
234         .id                     = CTSVC_PROPERTY_NICKNAME_ID,
235         .contact_id     = CTSVC_PROPERTY_NICKNAME_CONTACT_ID,
236         .name           = CTSVC_PROPERTY_NICKNAME_NAME,
237 };
238
239 API const _contacts_note_property_ids _contacts_note = {
240         ._uri           = CTSVC_VIEW_URI_NOTE,
241         .id                     = CTSVC_PROPERTY_NOTE_ID,
242         .contact_id     = CTSVC_PROPERTY_NOTE_CONTACT_ID,
243         .note           = CTSVC_PROPERTY_NOTE_NOTE
244 };
245
246 API const _contacts_profile_property_ids _contacts_profile = {
247         ._uri                   = CTSVC_VIEW_URI_PROFILE,
248         .id                     = CTSVC_PROPERTY_PROFILE_ID,
249         .uid                    = CTSVC_PROPERTY_PROFILE_UID,
250         .text                   = CTSVC_PROPERTY_PROFILE_TEXT,
251         .order          = CTSVC_PROPERTY_PROFILE_ORDER,
252         .service_operation      = CTSVC_PROPERTY_PROFILE_SERVICE_OPERATION,
253         .mime           = CTSVC_PROPERTY_PROFILE_MIME,
254         .app_id         = CTSVC_PROPERTY_PROFILE_APP_ID,
255         .uri                    = CTSVC_PROPERTY_PROFILE_URI,
256         .category               = CTSVC_PROPERTY_PROFILE_CATEGORY,
257         .extra_data     = CTSVC_PROPERTY_PROFILE_EXTRA_DATA,
258         .contact_id     = CTSVC_PROPERTY_PROFILE_CONTACT_ID
259 };
260
261 API const _contacts_group_relation_property_ids _contacts_group_relation = {
262         ._uri           = CTSVC_VIEW_URI_GROUP_RELATION,
263         .id                     = CTSVC_PROPERTY_GROUP_RELATION_ID,
264         .group_id       = CTSVC_PROPERTY_GROUP_RELATION_GROUP_ID,
265         .contact_id     = CTSVC_PROPERTY_GROUP_RELATION_CONTACT_ID,
266         .name           = CTSVC_PROPERTY_GROUP_RELATION_GROUP_NAME,
267 };
268
269 API const _contacts_relationship_property_ids _contacts_relationship = {
270         ._uri           = CTSVC_VIEW_URI_RELATIONSHIP,
271         .id                     = CTSVC_PROPERTY_RELATIONSHIP_ID,
272         .contact_id     = CTSVC_PROPERTY_RELATIONSHIP_CONTACT_ID,
273         .type           = CTSVC_PROPERTY_RELATIONSHIP_TYPE,
274         .label          = CTSVC_PROPERTY_RELATIONSHIP_LABEL,
275         .name           = CTSVC_PROPERTY_RELATIONSHIP_NAME,
276 };
277
278 API const _contacts_image_property_ids _contacts_image = {
279         ._uri           = CTSVC_VIEW_URI_IMAGE,
280         .id                     = CTSVC_PROPERTY_IMAGE_ID,
281         .contact_id     = CTSVC_PROPERTY_IMAGE_CONTACT_ID,
282         .type           = CTSVC_PROPERTY_IMAGE_TYPE,
283         .label          = CTSVC_PROPERTY_IMAGE_LABEL,
284         .path           = CTSVC_PROPERTY_IMAGE_PATH,
285         .is_default = CTSVC_PROPERTY_IMAGE_IS_DEFAULT,
286 };
287
288 API const _contacts_messenger_property_ids _contacts_messenger = {
289         ._uri           = CTSVC_VIEW_URI_MESSENGER,
290         .id                     = CTSVC_PROPERTY_MESSENGER_ID,
291         .contact_id     = CTSVC_PROPERTY_MESSENGER_CONTACT_ID,
292         .type           = CTSVC_PROPERTY_MESSENGER_TYPE,
293         .label          = CTSVC_PROPERTY_MESSENGER_LABEL,
294         .im_id          = CTSVC_PROPERTY_MESSENGER_IM_ID,
295 };
296
297 API const _contacts_sdn_property_ids _contacts_sdn = {
298         ._uri   = CTSVC_VIEW_URI_SDN,
299         .id             = CTSVC_PROPERTY_SDN_ID,
300         .name   = CTSVC_PROPERTY_SDN_NAME,
301         .number = CTSVC_PROPERTY_SDN_NUMBER,
302         .sim_slot_no    = CTSVC_PROPERTY_SDN_SIM_SLOT_NO,
303 };
304
305 API const _contacts_speeddial_property_ids _contacts_speeddial = {
306         ._uri                                   = CTSVC_VIEW_URI_SPEEDDIAL,
307         .speeddial_number               = CTSVC_PROPERTY_SPEEDDIAL_DIAL_NUMBER,
308         .number_id                              = CTSVC_PROPERTY_SPEEDDIAL_NUMBER_ID,
309         .number                                 = CTSVC_PROPERTY_SPEEDDIAL_NUMBER,
310         .number_label                   = CTSVC_PROPERTY_SPEEDDIAL_NUMBER_LABEL,
311         .number_type                    = CTSVC_PROPERTY_SPEEDDIAL_NUMBER_TYPE,
312         .person_id                              = CTSVC_PROPERTY_SPEEDDIAL_PERSON_ID,
313         .display_name                   = CTSVC_PROPERTY_SPEEDDIAL_DISPLAY_NAME,
314         .image_thumbnail_path   = CTSVC_PROPERTY_SPEEDDIAL_IMAGE_THUMBNAIL,
315         .normalized_number      = CTSVC_PROPERTY_SPEEDDIAL_NORMALIZED_NUMBER,
316         .cleaned_number         = CTSVC_PROPERTY_SPEEDDIAL_CLEANED_NUMBER,
317         .number_filter          = CTSVC_PROPERTY_SPEEDDIAL_NUMBER_FILTER,
318 };
319
320 API const _contacts_contact_updated_info_property_ids _contacts_contact_updated_info = {
321         ._uri                   = CTSVC_VIEW_URI_CONTACTS_UPDATED_INFO,
322         .contact_id             = CTSVC_PROPERTY_UPDATE_INFO_ID,
323         .address_book_id        = CTSVC_PROPERTY_UPDATE_INFO_ADDRESSBOOK_ID,
324         .type                   = CTSVC_PROPERTY_UPDATE_INFO_TYPE,
325         .version                = CTSVC_PROPERTY_UPDATE_INFO_VERSION,
326         .image_changed  = CTSVC_PROPERTY_UPDATE_INFO_IMAGE_CHANGED,
327 };
328
329 API const _contacts_my_profile_updated_info_property_ids _contacts_my_profile_updated_info = {
330         ._uri                   = CTSVC_VIEW_URI_MY_PROFILE_UPDATED_INFO,
331         .address_book_id        = CTSVC_PROPERTY_UPDATE_INFO_ADDRESSBOOK_ID,
332         .last_changed_type      = CTSVC_PROPERTY_UPDATE_INFO_LAST_CHANGED_TYPE,
333         .version                = CTSVC_PROPERTY_UPDATE_INFO_VERSION,
334 };
335
336 API const _contacts_group_updated_info_property_ids _contacts_group_updated_info = {
337         ._uri                   = CTSVC_VIEW_URI_GROUPS_UPDATED_INFO,
338         .group_id               = CTSVC_PROPERTY_UPDATE_INFO_ID,
339         .address_book_id        = CTSVC_PROPERTY_UPDATE_INFO_ADDRESSBOOK_ID,
340         .type                   = CTSVC_PROPERTY_UPDATE_INFO_TYPE,
341         .version                = CTSVC_PROPERTY_UPDATE_INFO_VERSION,
342 };
343
344 API const _contacts_group_member_updated_info_property_ids _contacts_group_member_updated_info = {
345         ._uri                   = CTSVC_VIEW_URI_GROUPS_MEMBER_UPDATED_INFO,
346         .group_id               = CTSVC_PROPERTY_UPDATE_INFO_ID,
347         .address_book_id        = CTSVC_PROPERTY_UPDATE_INFO_ADDRESSBOOK_ID,
348         .version                = CTSVC_PROPERTY_UPDATE_INFO_VERSION,
349 };
350
351 API const _contacts_grouprel_updated_info_property_ids _contacts_grouprel_updated_info = {
352         ._uri                   = CTSVC_VIEW_URI_GROUPRELS_UPDATED_INFO,
353         .group_id               = CTSVC_PROPERTY_GROUP_ID,
354         .contact_id             = CTSVC_PROPERTY_CONTACT_ID,
355         .address_book_id        = CTSVC_PROPERTY_ADDRESSBOOK_ID,
356         .type                   = CTSVC_PROPERTY_UPDATE_INFO_TYPE,
357         .version                = CTSVC_PROPERTY_UPDATE_INFO_VERSION,
358 };
359
360 API const _contacts_activity_property_ids _contacts_activity = {
361         ._uri                   = CTSVC_VIEW_URI_ACTIVITY,
362         .id                             = CTSVC_PROPERTY_ACTIVITY_ID,
363         .contact_id             = CTSVC_PROPERTY_ACTIVITY_CONTACT_ID,
364         .source_name    = CTSVC_PROPERTY_ACTIVITY_SOURCE_NAME,
365         .status                 = CTSVC_PROPERTY_ACTIVITY_STATUS,
366         .timestamp              = CTSVC_PROPERTY_ACTIVITY_TIMESTAMP,
367         .service_operation      = CTSVC_PROPERTY_ACTIVITY_SERVICE_OPERATION,
368         .uri                            = CTSVC_PROPERTY_ACTIVITY_URI,
369         .photo                  = CTSVC_PROPERTY_ACTIVITY_ACTIVITY_PHOTO,
370 };
371
372 API const _contacts_activity_photo_property_ids _contacts_activity_photo = {
373         ._uri                   = CTSVC_VIEW_URI_ACTIVITY_PHOTO,
374         .id                             = CTSVC_PROPERTY_ACTIVITY_PHOTO_ID,
375         .activity_id    = CTSVC_PROPERTY_ACTIVITY_PHOTO_ACTIVITY_ID,
376         .photo_url              = CTSVC_PROPERTY_ACTIVITY_PHOTO_URL,
377         .sort_index             = CTSVC_PROPERTY_ACTIVITY_PHOTO_SORT_INDEX,
378 };
379
380 #ifdef ENABLE_LOG_FEATURE
381 API const _contacts_phone_log_property_ids _contacts_phone_log = {
382         ._uri                   = CTSVC_VIEW_URI_PHONELOG,
383         .id                             = CTSVC_PROPERTY_PHONELOG_ID,
384         .person_id              = CTSVC_PROPERTY_PHONELOG_PERSON_ID,
385         .address                = CTSVC_PROPERTY_PHONELOG_ADDRESS,
386         .log_time               = CTSVC_PROPERTY_PHONELOG_LOG_TIME,
387         .log_type               = CTSVC_PROPERTY_PHONELOG_LOG_TYPE,
388         .extra_data1    = CTSVC_PROPERTY_PHONELOG_EXTRA_DATA1,
389         .extra_data2    = CTSVC_PROPERTY_PHONELOG_EXTRA_DATA2,
390         .normalized_address = CTSVC_PROPERTY_PHONELOG_NORMALIZED_ADDRESS,
391         .cleaned_address = CTSVC_PROPERTY_PHONELOG_CLEANED_ADDRESS,
392         .address_filter = CTSVC_PROPERTY_PHONELOG_ADDRESS_FILTER,
393         .sim_slot_no            = CTSVC_PROPERTY_PHONELOG_SIM_SLOT_NO,
394 };
395 #endif /* ENABLE_LOG_FEATURE */
396
397 API const _contacts_extension_property_ids _contacts_extension = {
398         ._uri           = CTSVC_VIEW_URI_EXTENSION,
399         .id                     = CTSVC_PROPERTY_EXTENSION_ID,
400         .contact_id     = CTSVC_PROPERTY_EXTENSION_CONTACT_ID,
401         .data1          = CTSVC_PROPERTY_EXTENSION_DATA1,
402         .data2          = CTSVC_PROPERTY_EXTENSION_DATA2,
403         .data3          = CTSVC_PROPERTY_EXTENSION_DATA3,
404         .data4          = CTSVC_PROPERTY_EXTENSION_DATA4,
405         .data5          = CTSVC_PROPERTY_EXTENSION_DATA5,
406         .data6          = CTSVC_PROPERTY_EXTENSION_DATA6,
407         .data7          = CTSVC_PROPERTY_EXTENSION_DATA7,
408         .data8          = CTSVC_PROPERTY_EXTENSION_DATA8,
409         .data9          = CTSVC_PROPERTY_EXTENSION_DATA9,
410         .data10         = CTSVC_PROPERTY_EXTENSION_DATA10,
411         .data11         = CTSVC_PROPERTY_EXTENSION_DATA11,
412         .data12         = CTSVC_PROPERTY_EXTENSION_DATA12,
413 };
414
415 API const _contacts_person_contact_property_ids _contacts_person_contact = {
416         ._uri                                   = CTSVC_VIEW_URI_READ_ONLY_PERSON_CONTACT,
417         .person_id                              = CTSVC_PROPERTY_PERSON_ID,
418         .display_name                   = CTSVC_PROPERTY_PERSON_DISPLAY_NAME,
419         .display_name_index             = CTSVC_PROPERTY_PERSON_DISPLAY_NAME_INDEX,
420         .display_contact_id             = CTSVC_PROPERTY_PERSON_DISPLAY_CONTACT_ID,
421         .ringtone_path                  = CTSVC_PROPERTY_PERSON_RINGTONE,
422         .image_thumbnail_path   = CTSVC_PROPERTY_PERSON_IMAGE_THUMBNAIL,
423         .vibration                              = CTSVC_PROPERTY_PERSON_VIBRATION,
424         .message_alert          = CTSVC_PROPERTY_PERSON_MESSAGE_ALERT,
425         .status                                 = CTSVC_PROPERTY_PERSON_STATUS,
426         .is_favorite                    = CTSVC_PROPERTY_PERSON_IS_FAVORITE,
427         .link_count                             = CTSVC_PROPERTY_PERSON_LINK_COUNT,
428         .addressbook_ids                = CTSVC_PROPERTY_PERSON_ADDRESSBOOK_IDS,
429         .has_phonenumber                = CTSVC_PROPERTY_PERSON_HAS_PHONENUMBER,
430         .has_email                              = CTSVC_PROPERTY_PERSON_HAS_EMAIL,
431         .contact_id                             = CTSVC_PROPERTY_CONTACT_ID,
432         .address_book_id                = CTSVC_PROPERTY_CONTACT_ADDRESSBOOK_ID,
433         .address_book_name              = CTSVC_PROPERTY_ADDRESSBOOK_NAME,
434         .address_book_mode              = CTSVC_PROPERTY_ADDRESSBOOK_MODE
435 };
436
437 API const _contacts_person_number_property_ids _contacts_person_number = {
438         ._uri                                   = CTSVC_VIEW_URI_READ_ONLY_PERSON_NUMBER,
439         .person_id                              = CTSVC_PROPERTY_PERSON_ID,
440         .display_name                   = CTSVC_PROPERTY_PERSON_DISPLAY_NAME,
441         .display_name_index             = CTSVC_PROPERTY_PERSON_DISPLAY_NAME_INDEX,
442         .display_contact_id             = CTSVC_PROPERTY_PERSON_DISPLAY_CONTACT_ID,
443         .ringtone_path                  = CTSVC_PROPERTY_PERSON_RINGTONE,
444         .image_thumbnail_path   = CTSVC_PROPERTY_PERSON_IMAGE_THUMBNAIL,
445         .vibration                              = CTSVC_PROPERTY_PERSON_VIBRATION,
446         .message_alert          = CTSVC_PROPERTY_PERSON_MESSAGE_ALERT,
447         .is_favorite                    = CTSVC_PROPERTY_PERSON_IS_FAVORITE,
448         .has_phonenumber                = CTSVC_PROPERTY_PERSON_HAS_PHONENUMBER,
449         .has_email                              = CTSVC_PROPERTY_PERSON_HAS_EMAIL,
450         .number_id                      = CTSVC_PROPERTY_NUMBER_ID,
451         .type                           = CTSVC_PROPERTY_NUMBER_TYPE,
452         .label                          = CTSVC_PROPERTY_NUMBER_LABEL,
453         .is_primary_default     = CTSVC_PROPERTY_DATA_IS_PRIMARY_DEFAULT,
454         .number                         = CTSVC_PROPERTY_NUMBER_NUMBER,
455         .number_filter          = CTSVC_PROPERTY_NUMBER_NUMBER_FILTER,
456         .normalized_number = CTSVC_PROPERTY_NUMBER_NORMALIZED_NUMBER,
457         .cleaned_number = CTSVC_PROPERTY_NUMBER_CLEANED_NUMBER
458 };
459
460 API const _contacts_person_email_property_ids _contacts_person_email = {
461         ._uri                                   = CTSVC_VIEW_URI_READ_ONLY_PERSON_EMAIL,
462         .person_id                              = CTSVC_PROPERTY_PERSON_ID,
463         .display_name                   = CTSVC_PROPERTY_PERSON_DISPLAY_NAME,
464         .display_name_index             = CTSVC_PROPERTY_PERSON_DISPLAY_NAME_INDEX,
465         .display_contact_id             = CTSVC_PROPERTY_PERSON_DISPLAY_CONTACT_ID,
466         .ringtone_path                  = CTSVC_PROPERTY_PERSON_RINGTONE,
467         .image_thumbnail_path   = CTSVC_PROPERTY_PERSON_IMAGE_THUMBNAIL,
468         .vibration                              = CTSVC_PROPERTY_PERSON_VIBRATION,
469         .message_alert          = CTSVC_PROPERTY_PERSON_MESSAGE_ALERT,
470         .is_favorite                    = CTSVC_PROPERTY_PERSON_IS_FAVORITE,
471         .has_phonenumber                = CTSVC_PROPERTY_PERSON_HAS_PHONENUMBER,
472         .has_email                              = CTSVC_PROPERTY_PERSON_HAS_EMAIL,
473         .email_id                       = CTSVC_PROPERTY_EMAIL_ID,
474         .type                           = CTSVC_PROPERTY_EMAIL_TYPE,
475         .label                          = CTSVC_PROPERTY_EMAIL_LABEL,
476         .is_primary_default     = CTSVC_PROPERTY_DATA_IS_PRIMARY_DEFAULT,
477         .email                          = CTSVC_PROPERTY_EMAIL_EMAIL
478 };
479
480 API const _contacts_person_usage_property_ids _contacts_person_usage = {
481         ._uri                                   = CTSVC_VIEW_URI_READ_ONLY_PERSON_USAGE,
482         .person_id                              = CTSVC_PROPERTY_PERSON_ID,
483         .display_name                   = CTSVC_PROPERTY_PERSON_DISPLAY_NAME,
484         .display_name_index             = CTSVC_PROPERTY_PERSON_DISPLAY_NAME_INDEX,
485         .display_contact_id             = CTSVC_PROPERTY_PERSON_DISPLAY_CONTACT_ID,
486         .ringtone_path                  = CTSVC_PROPERTY_PERSON_RINGTONE,
487         .image_thumbnail_path   = CTSVC_PROPERTY_PERSON_IMAGE_THUMBNAIL,
488         .vibration                              = CTSVC_PROPERTY_PERSON_VIBRATION,
489         .message_alert          = CTSVC_PROPERTY_PERSON_MESSAGE_ALERT,
490         .is_favorite                    = CTSVC_PROPERTY_PERSON_IS_FAVORITE,
491         .has_phonenumber                = CTSVC_PROPERTY_PERSON_HAS_PHONENUMBER,
492         .has_email                              = CTSVC_PROPERTY_PERSON_HAS_EMAIL,
493         .usage_type                             = CTSVC_PROPERTY_PERSON_USAGE_TYPE,
494         .times_used                             = CTSVC_PROPERTY_PERSON_TIMES_USED
495 };
496
497 API const _contacts_person_grouprel_property_ids _contacts_person_grouprel = {
498         ._uri                                   = CTSVC_VIEW_URI_READ_ONLY_PERSON_GROUP,
499         .person_id                              = CTSVC_PROPERTY_PERSON_ID,
500         .display_name                   = CTSVC_PROPERTY_PERSON_DISPLAY_NAME,
501         .display_name_index             = CTSVC_PROPERTY_PERSON_DISPLAY_NAME_INDEX,
502         .display_contact_id             = CTSVC_PROPERTY_PERSON_DISPLAY_CONTACT_ID,
503         .ringtone_path                  = CTSVC_PROPERTY_PERSON_RINGTONE,
504         .image_thumbnail_path   = CTSVC_PROPERTY_PERSON_IMAGE_THUMBNAIL,
505         .vibration                              = CTSVC_PROPERTY_PERSON_VIBRATION,
506         .message_alert                  = CTSVC_PROPERTY_PERSON_MESSAGE_ALERT,
507         .status                                 = CTSVC_PROPERTY_PERSON_STATUS,
508         .is_favorite                    = CTSVC_PROPERTY_PERSON_IS_FAVORITE,
509         .has_phonenumber                = CTSVC_PROPERTY_PERSON_HAS_PHONENUMBER,
510         .has_email                              = CTSVC_PROPERTY_PERSON_HAS_EMAIL,
511         .link_count                             = CTSVC_PROPERTY_PERSON_LINK_COUNT,
512         .addressbook_ids                = CTSVC_PROPERTY_PERSON_ADDRESSBOOK_IDS,
513         .address_book_id                = CTSVC_PROPERTY_CONTACT_ADDRESSBOOK_ID,
514         .group_id               = CTSVC_PROPERTY_GROUP_RELATION_GROUP_ID,
515         .address_book_name              = CTSVC_PROPERTY_ADDRESSBOOK_NAME,
516         .address_book_mode              = CTSVC_PROPERTY_ADDRESSBOOK_MODE,
517         .contact_id                             = CTSVC_PROPERTY_GROUP_RELATION_CONTACT_ID
518 };
519
520 API const _contacts_person_group_not_assigned_property_ids _contacts_person_group_not_assigned = {
521         ._uri                                           = CTSVC_VIEW_URI_READ_ONLY_PERSON_GROUP_NOT_ASSIGNED,
522         .person_id                              = CTSVC_PROPERTY_PERSON_ID,
523         .display_name                   = CTSVC_PROPERTY_PERSON_DISPLAY_NAME,
524         .display_name_index             = CTSVC_PROPERTY_PERSON_DISPLAY_NAME_INDEX,
525         .display_contact_id             = CTSVC_PROPERTY_PERSON_DISPLAY_CONTACT_ID,
526         .ringtone_path                          = CTSVC_PROPERTY_PERSON_RINGTONE,
527         .image_thumbnail_path           = CTSVC_PROPERTY_PERSON_IMAGE_THUMBNAIL,
528         .vibration                                      = CTSVC_PROPERTY_PERSON_VIBRATION,
529         .message_alert                  = CTSVC_PROPERTY_PERSON_MESSAGE_ALERT,
530         .status                                 = CTSVC_PROPERTY_PERSON_STATUS,
531         .is_favorite                            = CTSVC_PROPERTY_PERSON_IS_FAVORITE,
532         .has_phonenumber                        = CTSVC_PROPERTY_PERSON_HAS_PHONENUMBER,
533         .has_email                              = CTSVC_PROPERTY_PERSON_HAS_EMAIL,
534         .link_count                             = CTSVC_PROPERTY_PERSON_LINK_COUNT,
535         .linked_address_book_ids        = CTSVC_PROPERTY_PERSON_ADDRESSBOOK_IDS,
536         .contact_id                             = CTSVC_PROPERTY_CONTACT_ID,
537         .address_book_id                        = CTSVC_PROPERTY_CONTACT_ADDRESSBOOK_ID,
538         .address_book_mode              = CTSVC_PROPERTY_ADDRESSBOOK_MODE
539 };
540
541 API const _contacts_person_group_assigned_property_ids _contacts_person_group_assigned = {
542         ._uri                                   = CTSVC_VIEW_URI_READ_ONLY_PERSON_GROUP_ASSIGNED,
543         .person_id                              = CTSVC_PROPERTY_PERSON_ID,
544         .display_name                   = CTSVC_PROPERTY_PERSON_DISPLAY_NAME,
545         .display_name_index             = CTSVC_PROPERTY_PERSON_DISPLAY_NAME_INDEX,
546         .display_contact_id             = CTSVC_PROPERTY_PERSON_DISPLAY_CONTACT_ID,
547         .ringtone_path                  = CTSVC_PROPERTY_PERSON_RINGTONE,
548         .image_thumbnail_path   = CTSVC_PROPERTY_PERSON_IMAGE_THUMBNAIL,
549         .vibration                              = CTSVC_PROPERTY_PERSON_VIBRATION,
550         .message_alert                  = CTSVC_PROPERTY_PERSON_MESSAGE_ALERT,
551         .status                                 = CTSVC_PROPERTY_PERSON_STATUS,
552         .is_favorite                    = CTSVC_PROPERTY_PERSON_IS_FAVORITE,
553         .has_phonenumber                = CTSVC_PROPERTY_PERSON_HAS_PHONENUMBER,
554         .has_email                              = CTSVC_PROPERTY_PERSON_HAS_EMAIL,
555         .link_count                             = CTSVC_PROPERTY_PERSON_LINK_COUNT,
556         .linked_address_book_ids                = CTSVC_PROPERTY_PERSON_ADDRESSBOOK_IDS,
557         .address_book_id                = CTSVC_PROPERTY_CONTACT_ADDRESSBOOK_ID,
558         .group_id                               = CTSVC_PROPERTY_GROUP_RELATION_GROUP_ID,
559         .address_book_mode              = CTSVC_PROPERTY_ADDRESSBOOK_MODE,
560         .contact_id                             = CTSVC_PROPERTY_GROUP_RELATION_CONTACT_ID
561 };
562
563 #ifdef ENABLE_LOG_FEATURE
564 API const _contacts_person_phone_log_property_ids _contacts_person_phone_log = {
565         ._uri                   = CTSVC_VIEW_URI_READ_ONLY_PERSON_PHONELOG,
566         .person_id                              = CTSVC_PROPERTY_PERSON_ID,
567         .display_name                   = CTSVC_PROPERTY_PERSON_DISPLAY_NAME,
568         .image_thumbnail_path   = CTSVC_PROPERTY_PERSON_IMAGE_THUMBNAIL,
569         .log_id = CTSVC_PROPERTY_PHONELOG_ID,
570         .address                = CTSVC_PROPERTY_PHONELOG_ADDRESS,
571         .address_type   = CTSVC_PROPERTY_DATA_DATA1,
572         .log_time               = CTSVC_PROPERTY_PHONELOG_LOG_TIME,
573         .log_type               = CTSVC_PROPERTY_PHONELOG_LOG_TYPE,
574         .extra_data1    = CTSVC_PROPERTY_PHONELOG_EXTRA_DATA1,
575         .extra_data2    = CTSVC_PROPERTY_PHONELOG_EXTRA_DATA2,
576         .normalized_address = CTSVC_PROPERTY_PHONELOG_NORMALIZED_ADDRESS,
577         .cleaned_address = CTSVC_PROPERTY_PHONELOG_CLEANED_ADDRESS,
578         .address_filter = CTSVC_PROPERTY_PHONELOG_CLEANED_ADDRESS,
579         .sim_slot_no            = CTSVC_PROPERTY_PHONELOG_SIM_SLOT_NO,
580 };
581 #endif /* ENABLE_LOG_FEATURE */
582
583 API const _contacts_contact_number_property_ids _contacts_contact_number = {
584         ._uri                                   = CTSVC_VIEW_URI_READ_ONLY_CONTACT_NUMBER,
585         .contact_id                             = CTSVC_PROPERTY_CONTACT_ID,
586         .display_name                   = CTSVC_PROPERTY_CONTACT_DISPLAY_NAME,
587         .display_source_type    = CTSVC_PROPERTY_CONTACT_DISPLAY_SOURCE_DATA_ID,
588         .address_book_id                = CTSVC_PROPERTY_CONTACT_ADDRESSBOOK_ID,
589         .person_id                              = CTSVC_PROPERTY_CONTACT_PERSON_ID,
590         .ringtone_path                  = CTSVC_PROPERTY_CONTACT_RINGTONE,
591         .image_thumbnail_path   = CTSVC_PROPERTY_CONTACT_IMAGE_THUMBNAIL,
592         .number_id                      = CTSVC_PROPERTY_NUMBER_ID,
593         .type                           = CTSVC_PROPERTY_NUMBER_TYPE,
594         .label                          = CTSVC_PROPERTY_NUMBER_LABEL,
595         .is_default                     = CTSVC_PROPERTY_NUMBER_IS_DEFAULT,
596         .number                         = CTSVC_PROPERTY_NUMBER_NUMBER,
597         .number_filter          = CTSVC_PROPERTY_NUMBER_NUMBER_FILTER,
598         .normalized_number = CTSVC_PROPERTY_NUMBER_NORMALIZED_NUMBER,
599         .cleaned_number = CTSVC_PROPERTY_NUMBER_CLEANED_NUMBER
600 };
601
602 API const _contacts_contact_email_property_ids _contacts_contact_email = {
603         ._uri                                   = CTSVC_VIEW_URI_READ_ONLY_CONTACT_EMAIL,
604         .contact_id                             = CTSVC_PROPERTY_CONTACT_ID,
605         .display_name                   = CTSVC_PROPERTY_CONTACT_DISPLAY_NAME,
606         .display_source_type    = CTSVC_PROPERTY_CONTACT_DISPLAY_SOURCE_DATA_ID,
607         .address_book_id                = CTSVC_PROPERTY_CONTACT_ADDRESSBOOK_ID,
608         .person_id                              = CTSVC_PROPERTY_CONTACT_PERSON_ID,
609         .ringtone_path                  = CTSVC_PROPERTY_CONTACT_RINGTONE,
610         .image_thumbnail_path   = CTSVC_PROPERTY_CONTACT_IMAGE_THUMBNAIL,
611         .email_id                       = CTSVC_PROPERTY_EMAIL_ID,
612         .type                           = CTSVC_PROPERTY_EMAIL_TYPE,
613         .label                          = CTSVC_PROPERTY_EMAIL_LABEL,
614         .is_default                     = CTSVC_PROPERTY_EMAIL_IS_DEFAULT,
615         .email                          = CTSVC_PROPERTY_EMAIL_EMAIL
616 };
617
618 API const _contacts_contact_grouprel_property_ids _contacts_contact_grouprel = {
619         ._uri                                   = CTSVC_VIEW_URI_READ_ONLY_CONTACT_GROUP,
620         .contact_id                             = CTSVC_PROPERTY_CONTACT_ID,
621         .display_name                   = CTSVC_PROPERTY_CONTACT_DISPLAY_NAME,
622         .display_source_type    = CTSVC_PROPERTY_CONTACT_DISPLAY_SOURCE_DATA_ID,
623         .address_book_id                = CTSVC_PROPERTY_CONTACT_ADDRESSBOOK_ID,
624         .person_id                              = CTSVC_PROPERTY_CONTACT_PERSON_ID,
625         .ringtone_path                  = CTSVC_PROPERTY_CONTACT_RINGTONE,
626         .image_thumbnail_path   = CTSVC_PROPERTY_CONTACT_IMAGE_THUMBNAIL,
627         .group_id               = CTSVC_PROPERTY_GROUP_RELATION_GROUP_ID,
628         .group_name             = CTSVC_PROPERTY_GROUP_RELATION_GROUP_NAME
629 };
630
631 API const _contacts_contact_activity_property_ids _contacts_contact_activity = {
632         ._uri                   = CTSVC_VIEW_URI_READ_ONLY_CONTACT_ACTIVITY,
633         .contact_id                             = CTSVC_PROPERTY_CONTACT_ID,
634         .display_name                   = CTSVC_PROPERTY_CONTACT_DISPLAY_NAME,
635         .display_source_type    = CTSVC_PROPERTY_CONTACT_DISPLAY_SOURCE_DATA_ID,
636         .address_book_id                = CTSVC_PROPERTY_CONTACT_ADDRESSBOOK_ID,
637         .person_id                              = CTSVC_PROPERTY_CONTACT_PERSON_ID,
638         .ringtone_path                  = CTSVC_PROPERTY_CONTACT_RINGTONE,
639         .image_thumbnail_path   = CTSVC_PROPERTY_CONTACT_IMAGE_THUMBNAIL,
640         .activity_id    = CTSVC_PROPERTY_ACTIVITY_ID,
641         .source_name    = CTSVC_PROPERTY_ACTIVITY_SOURCE_NAME,
642         .status                 = CTSVC_PROPERTY_ACTIVITY_STATUS,
643         .timestamp              = CTSVC_PROPERTY_ACTIVITY_TIMESTAMP,
644         .service_operation      = CTSVC_PROPERTY_ACTIVITY_SERVICE_OPERATION,
645         .uri                            = CTSVC_PROPERTY_ACTIVITY_URI,
646         .account_id             = CTSVC_PROPERTY_ADDRESSBOOK_ACCOUNT_ID,
647 };
648
649 API const _contacts_sip_property_ids _contacts_sip= {
650         ._uri           = CTSVC_VIEW_URI_SIP,
651         .id         = CTSVC_PROPERTY_SIP_ID,
652         .contact_id     = CTSVC_PROPERTY_SIP_CONTACT_ID,
653         .address    = CTSVC_PROPERTY_SIP_ADDRESS,
654         .type           = CTSVC_PROPERTY_SIP_TYPE,
655         .label          = CTSVC_PROPERTY_SIP_LABEL,
656 };
657
658 #ifdef ENABLE_LOG_FEATURE
659 API const _contacts_phone_log_stat_property_ids _contacts_phone_log_stat = {
660         ._uri           = CTSVC_VIEW_URI_READ_ONLY_PHONELOG_STAT,
661         .log_count      = CTSVC_PROPERTY_PHONELOG_STAT_LOG_COUNT,
662         .log_type       = CTSVC_PROPERTY_PHONELOG_STAT_LOG_TYPE,
663 };
664 #endif /* ENABLE_LOG_FEATURE */
665
666 const property_info_s __property_addressbook[] = {
667         {CTSVC_PROPERTY_ADDRESSBOOK_ID,                 CTSVC_SEARCH_PROPERTY_ALL,      "addressbook_id"},
668         {CTSVC_PROPERTY_ADDRESSBOOK_ACCOUNT_ID, CTSVC_SEARCH_PROPERTY_ALL,      "account_id"},
669         {CTSVC_PROPERTY_ADDRESSBOOK_NAME,               CTSVC_SEARCH_PROPERTY_ALL,      "addressbook_name"},
670         {CTSVC_PROPERTY_ADDRESSBOOK_MODE,               CTSVC_SEARCH_PROPERTY_ALL,      "mode"},
671 };
672
673 const property_info_s __property_sdn[] = {   /* _contacts_sdn */
674         {CTSVC_PROPERTY_SDN_ID,         CTSVC_SEARCH_PROPERTY_ALL,      "id"},
675         {CTSVC_PROPERTY_SDN_NAME,               CTSVC_SEARCH_PROPERTY_ALL,      "name"},
676         {CTSVC_PROPERTY_SDN_NUMBER,     CTSVC_SEARCH_PROPERTY_ALL,      "number"},
677         {CTSVC_PROPERTY_SDN_SIM_SLOT_NO,        CTSVC_SEARCH_PROPERTY_ALL,      "sim_slot_no"},
678 };
679
680 const property_info_s __property_group[] = {
681         {CTSVC_PROPERTY_GROUP_ID,                               CTSVC_SEARCH_PROPERTY_ALL,      "group_id"},
682         {CTSVC_PROPERTY_GROUP_ADDRESSBOOK_ID,   CTSVC_SEARCH_PROPERTY_ALL,      "addressbook_id"},
683         {CTSVC_PROPERTY_GROUP_NAME,                     CTSVC_SEARCH_PROPERTY_ALL,      "group_name"},
684         {CTSVC_PROPERTY_GROUP_RINGTONE,         CTSVC_SEARCH_PROPERTY_ALL,      "ringtone_path"},
685         {CTSVC_PROPERTY_GROUP_IMAGE,                    CTSVC_SEARCH_PROPERTY_ALL,      "image_thumbnail_path"},
686         {CTSVC_PROPERTY_GROUP_VIBRATION,                CTSVC_SEARCH_PROPERTY_ALL,      "vibration"},
687         {CTSVC_PROPERTY_GROUP_EXTRA_DATA,               CTSVC_SEARCH_PROPERTY_ALL,      "extra_data"},
688         {CTSVC_PROPERTY_GROUP_IS_READ_ONLY,     CTSVC_SEARCH_PROPERTY_ALL,      "is_read_only"},
689         {CTSVC_PROPERTY_GROUP_MESSAGE_ALERT,    CTSVC_SEARCH_PROPERTY_ALL,      "message_alert"},
690 };
691
692 const property_info_s __property_person[] = {
693         {CTSVC_PROPERTY_PERSON_ID,                                      CTSVC_SEARCH_PROPERTY_ALL, "person_id"},
694         {CTSVC_PROPERTY_PERSON_DISPLAY_NAME,            CTSVC_SEARCH_PROPERTY_ALL, NULL},         /* "dispaly_name" or "reverse_dispaly_name" */
695         {CTSVC_PROPERTY_PERSON_DISPLAY_NAME_INDEX,      CTSVC_SEARCH_PROPERTY_PROJECTION,       NULL}, /* "dispaly_name" or "reverse_dispaly_name" */
696         {CTSVC_PROPERTY_PERSON_DISPLAY_CONTACT_ID, CTSVC_SEARCH_PROPERTY_ALL, "name_contact_id"},
697         {CTSVC_PROPERTY_PERSON_RINGTONE,                        CTSVC_SEARCH_PROPERTY_ALL, "ringtone_path"},
698         {CTSVC_PROPERTY_PERSON_IMAGE_THUMBNAIL, CTSVC_SEARCH_PROPERTY_ALL, "image_thumbnail_path"},
699         {CTSVC_PROPERTY_PERSON_VIBRATION,               CTSVC_SEARCH_PROPERTY_ALL, "vibration"},
700         {CTSVC_PROPERTY_PERSON_MESSAGE_ALERT,   CTSVC_SEARCH_PROPERTY_ALL, "message_alert"},
701         {CTSVC_PROPERTY_PERSON_STATUS,                  CTSVC_SEARCH_PROPERTY_ALL, "status"},
702         {CTSVC_PROPERTY_PERSON_IS_FAVORITE,             CTSVC_SEARCH_PROPERTY_ALL, "is_favorite"},
703         {CTSVC_PROPERTY_PERSON_FAVORITE_PRIORITY,       CTSVC_SEARCH_PROPERTY_FILTER, "favorite_prio"},
704         {CTSVC_PROPERTY_PERSON_LINK_COUNT,              CTSVC_SEARCH_PROPERTY_ALL,      "link_count"},
705         {CTSVC_PROPERTY_PERSON_ADDRESSBOOK_IDS, CTSVC_SEARCH_PROPERTY_PROJECTION,       "addressbook_ids"},
706         {CTSVC_PROPERTY_PERSON_HAS_PHONENUMBER, CTSVC_SEARCH_PROPERTY_ALL,      "has_phonenumber"},
707         {CTSVC_PROPERTY_PERSON_HAS_EMAIL,               CTSVC_SEARCH_PROPERTY_ALL,      "has_email"},
708 };
709
710 const property_info_s __property_simple_contact[] = {
711         {CTSVC_PROPERTY_CONTACT_ID,                             CTSVC_SEARCH_PROPERTY_ALL,      "contact_id"},
712         {CTSVC_PROPERTY_CONTACT_DISPLAY_NAME,   CTSVC_SEARCH_PROPERTY_ALL,      NULL},            /* "dispaly_name" or "reverse_dispaly_name" */
713         {CTSVC_PROPERTY_CONTACT_DISPLAY_SOURCE_DATA_ID, CTSVC_SEARCH_PROPERTY_ALL,      "display_name_source"},
714         {CTSVC_PROPERTY_CONTACT_ADDRESSBOOK_ID, CTSVC_SEARCH_PROPERTY_ALL,      "addressbook_id"},
715         {CTSVC_PROPERTY_CONTACT_RINGTONE,               CTSVC_SEARCH_PROPERTY_ALL,      "ringtone_path"},
716         {CTSVC_PROPERTY_CONTACT_IMAGE_THUMBNAIL, CTSVC_SEARCH_PROPERTY_ALL,     "image_thumbnail_path"},
717         {CTSVC_PROPERTY_CONTACT_IS_FAVORITE,            CTSVC_SEARCH_PROPERTY_ALL,      "is_favorite"},
718         {CTSVC_PROPERTY_CONTACT_HAS_PHONENUMBER, CTSVC_SEARCH_PROPERTY_ALL,     "has_phonenumber"},
719         {CTSVC_PROPERTY_CONTACT_HAS_EMAIL,              CTSVC_SEARCH_PROPERTY_ALL,      "has_email"},
720         {CTSVC_PROPERTY_CONTACT_PERSON_ID,              CTSVC_SEARCH_PROPERTY_ALL,      "person_id"},
721         {CTSVC_PROPERTY_CONTACT_UID,                            CTSVC_SEARCH_PROPERTY_ALL,      "uid"},
722         {CTSVC_PROPERTY_CONTACT_VIBRATION,              CTSVC_SEARCH_PROPERTY_ALL,      "vibration"},
723         {CTSVC_PROPERTY_CONTACT_MESSAGE_ALERT,          CTSVC_SEARCH_PROPERTY_ALL,      "message_alert"},
724         {CTSVC_PROPERTY_CONTACT_CHANGED_TIME,   CTSVC_SEARCH_PROPERTY_ALL,      "changed_time"},
725 };
726
727 const property_info_s __property_name[] = {
728         {CTSVC_PROPERTY_NAME_ID,                                        CTSVC_SEARCH_PROPERTY_ALL,      "id"},
729         {CTSVC_PROPERTY_NAME_CONTACT_ID,                        CTSVC_SEARCH_PROPERTY_ALL,      "contact_id"},
730         {CTSVC_PROPERTY_NAME_FIRST,                             CTSVC_SEARCH_PROPERTY_ALL,      "data2"},
731         {CTSVC_PROPERTY_NAME_LAST,                                      CTSVC_SEARCH_PROPERTY_ALL,      "data3"},
732         {CTSVC_PROPERTY_NAME_ADDITION,                  CTSVC_SEARCH_PROPERTY_ALL,      "data4"},
733         {CTSVC_PROPERTY_NAME_PREFIX,                            CTSVC_SEARCH_PROPERTY_ALL,      "data5"},
734         {CTSVC_PROPERTY_NAME_SUFFIX,                            CTSVC_SEARCH_PROPERTY_ALL,      "data6"},
735         {CTSVC_PROPERTY_NAME_PHONETIC_FIRST,    CTSVC_SEARCH_PROPERTY_ALL,      "data7"},
736         {CTSVC_PROPERTY_NAME_PHONETIC_MIDDLE,   CTSVC_SEARCH_PROPERTY_ALL,      "data8"},
737         {CTSVC_PROPERTY_NAME_PHONETIC_LAST,             CTSVC_SEARCH_PROPERTY_ALL,      "data9"},
738 };
739
740 const property_info_s __property_number[] = {   /* _contacts_number */
741         {CTSVC_PROPERTY_NUMBER_ID,                              CTSVC_SEARCH_PROPERTY_ALL,      "id"},
742         {CTSVC_PROPERTY_NUMBER_CONTACT_ID,      CTSVC_SEARCH_PROPERTY_ALL,      "contact_id"},
743         {CTSVC_PROPERTY_NUMBER_TYPE,                    CTSVC_SEARCH_PROPERTY_ALL,      "data1"},
744         {CTSVC_PROPERTY_NUMBER_LABEL,                   CTSVC_SEARCH_PROPERTY_ALL,      "data2"},
745         {CTSVC_PROPERTY_NUMBER_IS_DEFAULT,      CTSVC_SEARCH_PROPERTY_ALL,      "is_default"},
746         {CTSVC_PROPERTY_NUMBER_NUMBER,          CTSVC_SEARCH_PROPERTY_ALL,      "data3"},
747         {CTSVC_PROPERTY_NUMBER_NORMALIZED_NUMBER,       CTSVC_SEARCH_PROPERTY_FILTER,   "data5"},
748         {CTSVC_PROPERTY_NUMBER_CLEANED_NUMBER,  CTSVC_SEARCH_PROPERTY_FILTER,   "data6"},
749         {CTSVC_PROPERTY_NUMBER_NUMBER_FILTER,   CTSVC_SEARCH_PROPERTY_FILTER,   "data4"},
750 };
751
752 const property_info_s __property_email[] = {
753         {CTSVC_PROPERTY_EMAIL_ID,                               CTSVC_SEARCH_PROPERTY_ALL,      "id"},
754         {CTSVC_PROPERTY_EMAIL_CONTACT_ID,       CTSVC_SEARCH_PROPERTY_ALL,      "contact_id"},
755         {CTSVC_PROPERTY_EMAIL_TYPE,                     CTSVC_SEARCH_PROPERTY_ALL,      "data1"},
756         {CTSVC_PROPERTY_EMAIL_LABEL,                    CTSVC_SEARCH_PROPERTY_ALL,      "data2"},
757         {CTSVC_PROPERTY_EMAIL_IS_DEFAULT,       CTSVC_SEARCH_PROPERTY_ALL,      "is_default"},
758         {CTSVC_PROPERTY_EMAIL_EMAIL,                    CTSVC_SEARCH_PROPERTY_ALL,      "data3"},
759 };
760
761 const property_info_s __property_address[] = {
762         {CTSVC_PROPERTY_ADDRESS_ID,                     CTSVC_SEARCH_PROPERTY_ALL,      "id"},
763         {CTSVC_PROPERTY_ADDRESS_CONTACT_ID,     CTSVC_SEARCH_PROPERTY_ALL,      "contact_id"},
764         {CTSVC_PROPERTY_ADDRESS_TYPE,                   CTSVC_SEARCH_PROPERTY_ALL,      "data1"},
765         {CTSVC_PROPERTY_ADDRESS_LABEL,          CTSVC_SEARCH_PROPERTY_ALL,      "data2"},
766         {CTSVC_PROPERTY_ADDRESS_POSTBOX,                CTSVC_SEARCH_PROPERTY_ALL,      "data3"},
767         {CTSVC_PROPERTY_ADDRESS_POSTAL_CODE, CTSVC_SEARCH_PROPERTY_ALL, "data4"},
768         {CTSVC_PROPERTY_ADDRESS_REGION,         CTSVC_SEARCH_PROPERTY_ALL,      "data5"},
769         {CTSVC_PROPERTY_ADDRESS_LOCALITY,       CTSVC_SEARCH_PROPERTY_ALL,      "data6"},
770         {CTSVC_PROPERTY_ADDRESS_STREET,         CTSVC_SEARCH_PROPERTY_ALL,      "data7"},
771         {CTSVC_PROPERTY_ADDRESS_COUNTRY,                CTSVC_SEARCH_PROPERTY_ALL,      "data9"},
772         {CTSVC_PROPERTY_ADDRESS_EXTENDED,       CTSVC_SEARCH_PROPERTY_ALL,      "data8"},
773         {CTSVC_PROPERTY_ADDRESS_IS_DEFAULT,     CTSVC_SEARCH_PROPERTY_ALL,      "is_default"},
774 };
775
776 const property_info_s __property_url[] = {
777         {CTSVC_PROPERTY_URL_ID,                         CTSVC_SEARCH_PROPERTY_ALL,      "id"},
778         {CTSVC_PROPERTY_URL_CONTACT_ID, CTSVC_SEARCH_PROPERTY_ALL,      "contact_id"},
779         {CTSVC_PROPERTY_URL_TYPE,                       CTSVC_SEARCH_PROPERTY_ALL,      "data1"},
780         {CTSVC_PROPERTY_URL_LABEL,                      CTSVC_SEARCH_PROPERTY_ALL,      "data2"},
781         {CTSVC_PROPERTY_URL_URL,                        CTSVC_SEARCH_PROPERTY_ALL,      "data3"},
782 };
783
784 const property_info_s __property_event[] = {
785         {CTSVC_PROPERTY_EVENT_ID,                               CTSVC_SEARCH_PROPERTY_ALL,      "id"},
786         {CTSVC_PROPERTY_EVENT_CONTACT_ID,       CTSVC_SEARCH_PROPERTY_ALL,      "contact_id"},
787         {CTSVC_PROPERTY_EVENT_TYPE,                     CTSVC_SEARCH_PROPERTY_ALL,      "data1"},
788         {CTSVC_PROPERTY_EVENT_LABEL,                    CTSVC_SEARCH_PROPERTY_ALL,      "data2"},
789         {CTSVC_PROPERTY_EVENT_DATE,                     CTSVC_SEARCH_PROPERTY_ALL,      "data3"},
790         {CTSVC_PROPERTY_EVENT_CALENDAR_TYPE,    CTSVC_SEARCH_PROPERTY_ALL,      "data4"},
791         {CTSVC_PROPERTY_EVENT_IS_LEAP_MONTH,    CTSVC_SEARCH_PROPERTY_ALL,      "data5"},
792 };
793
794 const property_info_s __property_group_relation[] = {
795         {CTSVC_PROPERTY_GROUP_RELATION_GROUP_ID,        CTSVC_SEARCH_PROPERTY_ALL,      "group_id"},
796         {CTSVC_PROPERTY_GROUP_RELATION_CONTACT_ID,      CTSVC_SEARCH_PROPERTY_ALL,      "contact_id"},
797         {CTSVC_PROPERTY_GROUP_RELATION_GROUP_NAME, CTSVC_SEARCH_PROPERTY_ALL,   "group_name"},
798 };
799
800 const property_info_s __property_relationship[] = {
801         {CTSVC_PROPERTY_RELATIONSHIP_ID,                                CTSVC_SEARCH_PROPERTY_ALL,      "id"},
802         {CTSVC_PROPERTY_RELATIONSHIP_CONTACT_ID,        CTSVC_SEARCH_PROPERTY_ALL,      "contact_id"},
803         {CTSVC_PROPERTY_RELATIONSHIP_TYPE,                      CTSVC_SEARCH_PROPERTY_ALL,      "data1"},
804         {CTSVC_PROPERTY_RELATIONSHIP_LABEL,                     CTSVC_SEARCH_PROPERTY_ALL,      "data2"},
805         {CTSVC_PROPERTY_RELATIONSHIP_NAME,                      CTSVC_SEARCH_PROPERTY_ALL,      "data3"},
806 };
807
808 const property_info_s __property_image[] = {
809         {CTSVC_PROPERTY_IMAGE_ID,                               CTSVC_SEARCH_PROPERTY_ALL,      "id"},
810         {CTSVC_PROPERTY_IMAGE_CONTACT_ID,       CTSVC_SEARCH_PROPERTY_ALL,      "contact_id"},
811         {CTSVC_PROPERTY_IMAGE_TYPE,                     CTSVC_SEARCH_PROPERTY_ALL,      "data1"},
812         {CTSVC_PROPERTY_IMAGE_LABEL,                    CTSVC_SEARCH_PROPERTY_ALL,      "data2"},
813         {CTSVC_PROPERTY_IMAGE_PATH,                     CTSVC_SEARCH_PROPERTY_ALL,      "data3"},
814         {CTSVC_PROPERTY_IMAGE_IS_DEFAULT,       CTSVC_SEARCH_PROPERTY_ALL,      "is_default"},
815 };
816
817 const property_info_s __property_company[] = {
818         {CTSVC_PROPERTY_COMPANY_ID,                             CTSVC_SEARCH_PROPERTY_ALL,      "id"},
819         {CTSVC_PROPERTY_COMPANY_CONTACT_ID,             CTSVC_SEARCH_PROPERTY_ALL,      "contact_id"},
820         {CTSVC_PROPERTY_COMPANY_TYPE,                           CTSVC_SEARCH_PROPERTY_ALL,      "data1"},
821         {CTSVC_PROPERTY_COMPANY_LABEL,                  CTSVC_SEARCH_PROPERTY_ALL,      "data2"},
822         {CTSVC_PROPERTY_COMPANY_NAME,                           CTSVC_SEARCH_PROPERTY_ALL,      "data3"},
823         {CTSVC_PROPERTY_COMPANY_DEPARTMENT,             CTSVC_SEARCH_PROPERTY_ALL,      "data4"},
824         {CTSVC_PROPERTY_COMPANY_JOB_TITLE,              CTSVC_SEARCH_PROPERTY_ALL,      "data5"},
825         {CTSVC_PROPERTY_COMPANY_ROLE,                   CTSVC_SEARCH_PROPERTY_ALL,      "data6"},
826         {CTSVC_PROPERTY_COMPANY_ASSISTANT_NAME, CTSVC_SEARCH_PROPERTY_ALL,      "data7"},
827         {CTSVC_PROPERTY_COMPANY_LOGO,                           CTSVC_SEARCH_PROPERTY_ALL,      "data8"},
828         {CTSVC_PROPERTY_COMPANY_LOCATION,               CTSVC_SEARCH_PROPERTY_ALL,      "data9"},
829         {CTSVC_PROPERTY_COMPANY_DESCRIPTION,    CTSVC_SEARCH_PROPERTY_ALL,      "data10"},
830         {CTSVC_PROPERTY_COMPANY_PHONETIC_NAME,  CTSVC_SEARCH_PROPERTY_ALL,      "data11"},
831 };
832
833 const property_info_s __property_nickname[] = {
834         {CTSVC_PROPERTY_NICKNAME_ID,                            CTSVC_SEARCH_PROPERTY_ALL,      "id",},
835         {CTSVC_PROPERTY_NICKNAME_CONTACT_ID,    CTSVC_SEARCH_PROPERTY_ALL,      "contact_id"},
836         {CTSVC_PROPERTY_NICKNAME_NAME,                  CTSVC_SEARCH_PROPERTY_ALL,      "data3"},
837 };
838
839 const property_info_s __property_messenger[] = {
840         {CTSVC_PROPERTY_MESSENGER_ID,                           CTSVC_SEARCH_PROPERTY_ALL,      "id"},
841         {CTSVC_PROPERTY_MESSENGER_CONTACT_ID,   CTSVC_SEARCH_PROPERTY_ALL,      "contact_id"},
842         {CTSVC_PROPERTY_MESSENGER_TYPE,                 CTSVC_SEARCH_PROPERTY_ALL,      "data1"},
843         {CTSVC_PROPERTY_MESSENGER_LABEL,                        CTSVC_SEARCH_PROPERTY_ALL,      "data2"},
844         {CTSVC_PROPERTY_MESSENGER_IM_ID,                        CTSVC_SEARCH_PROPERTY_ALL,      "data3"},
845 };
846
847 const property_info_s __property_note[] = {
848         {CTSVC_PROPERTY_NOTE_ID,                        CTSVC_SEARCH_PROPERTY_ALL,      "id"},
849         {CTSVC_PROPERTY_NOTE_CONTACT_ID,        CTSVC_SEARCH_PROPERTY_ALL,      "contact_id"},
850         {CTSVC_PROPERTY_NOTE_NOTE,                      CTSVC_SEARCH_PROPERTY_ALL,      "data3"},
851 };
852
853 const property_info_s __property_profile[] = {
854         {CTSVC_PROPERTY_PROFILE_ID,                                     CTSVC_SEARCH_PROPERTY_ALL,      "id"},
855         {CTSVC_PROPERTY_PROFILE_CONTACT_ID,                     CTSVC_SEARCH_PROPERTY_ALL,      "contact_id"},
856         {CTSVC_PROPERTY_PROFILE_UID,                                    CTSVC_SEARCH_PROPERTY_ALL,      "data3"},
857         {CTSVC_PROPERTY_PROFILE_TEXT,                                   CTSVC_SEARCH_PROPERTY_ALL,      "data4"},
858         {CTSVC_PROPERTY_PROFILE_ORDER,                          CTSVC_SEARCH_PROPERTY_ALL,      "data5"},
859         {CTSVC_PROPERTY_PROFILE_SERVICE_OPERATION,      CTSVC_SEARCH_PROPERTY_ALL,      "data6"},
860         {CTSVC_PROPERTY_PROFILE_MIME,                           CTSVC_SEARCH_PROPERTY_ALL,      "data7"},
861         {CTSVC_PROPERTY_PROFILE_APP_ID,                         CTSVC_SEARCH_PROPERTY_ALL,      "data8"},
862         {CTSVC_PROPERTY_PROFILE_URI,                                    CTSVC_SEARCH_PROPERTY_ALL,      "data9"},
863         {CTSVC_PROPERTY_PROFILE_CATEGORY,                       CTSVC_SEARCH_PROPERTY_ALL,      "data10"},
864         {CTSVC_PROPERTY_PROFILE_EXTRA_DATA,             CTSVC_SEARCH_PROPERTY_ALL,      "data11"},
865 };
866
867 const property_info_s __property_activity_photo[] = {
868         {CTSVC_PROPERTY_ACTIVITY_PHOTO_ID,                      CTSVC_SEARCH_PROPERTY_ALL,      "id"},
869         {CTSVC_PROPERTY_ACTIVITY_PHOTO_ACTIVITY_ID,     CTSVC_SEARCH_PROPERTY_ALL,      "activity_id"},
870         {CTSVC_PROPERTY_ACTIVITY_PHOTO_URL,                     CTSVC_SEARCH_PROPERTY_ALL,      "photo_url"},
871         {CTSVC_PROPERTY_ACTIVITY_PHOTO_SORT_INDEX,      CTSVC_SEARCH_PROPERTY_ALL,      "sort_index"},
872 };
873
874 const property_info_s __property_activity[] = {
875         {CTSVC_PROPERTY_ACTIVITY_ID,                            CTSVC_SEARCH_PROPERTY_ALL,      "id"},
876         {CTSVC_PROPERTY_ACTIVITY_CONTACT_ID,            CTSVC_SEARCH_PROPERTY_ALL,      "contact_id"},
877         {CTSVC_PROPERTY_ACTIVITY_SOURCE_NAME,   CTSVC_SEARCH_PROPERTY_ALL,      "source_name"},
878         {CTSVC_PROPERTY_ACTIVITY_STATUS,                        CTSVC_SEARCH_PROPERTY_ALL,      "status"},
879         {CTSVC_PROPERTY_ACTIVITY_TIMESTAMP,             CTSVC_SEARCH_PROPERTY_ALL,      "timestamp"},
880         {CTSVC_PROPERTY_ACTIVITY_SERVICE_OPERATION, CTSVC_SEARCH_PROPERTY_ALL,  "service_operation"},
881         {CTSVC_PROPERTY_ACTIVITY_URI,                           CTSVC_SEARCH_PROPERTY_ALL,      "uri"},
882         {CTSVC_PROPERTY_ACTIVITY_ACTIVITY_PHOTO, CTSVC_SEARCH_PROPERTY_NONE,    (void*)__property_activity_photo},
883 };
884
885 const property_info_s __property_extension[] = {
886         {CTSVC_PROPERTY_EXTENSION_ID,                           CTSVC_SEARCH_PROPERTY_ALL,      "id"},
887         {CTSVC_PROPERTY_EXTENSION_CONTACT_ID,   CTSVC_SEARCH_PROPERTY_ALL,      "contact_id"},
888         {CTSVC_PROPERTY_EXTENSION_DATA1,                CTSVC_SEARCH_PROPERTY_ALL,      "data1"},
889         {CTSVC_PROPERTY_EXTENSION_DATA2,                CTSVC_SEARCH_PROPERTY_ALL,      "data2"},
890         {CTSVC_PROPERTY_EXTENSION_DATA3,                CTSVC_SEARCH_PROPERTY_ALL,      "data3"},
891         {CTSVC_PROPERTY_EXTENSION_DATA4,                CTSVC_SEARCH_PROPERTY_ALL,      "data4"},
892         {CTSVC_PROPERTY_EXTENSION_DATA5,                CTSVC_SEARCH_PROPERTY_ALL,      "data5"},
893         {CTSVC_PROPERTY_EXTENSION_DATA6,                CTSVC_SEARCH_PROPERTY_ALL,      "data6"},
894         {CTSVC_PROPERTY_EXTENSION_DATA7,                CTSVC_SEARCH_PROPERTY_ALL,      "data7"},
895         {CTSVC_PROPERTY_EXTENSION_DATA8,                CTSVC_SEARCH_PROPERTY_ALL,      "data8"},
896         {CTSVC_PROPERTY_EXTENSION_DATA9,                CTSVC_SEARCH_PROPERTY_ALL,      "data9"},
897         {CTSVC_PROPERTY_EXTENSION_DATA10,               CTSVC_SEARCH_PROPERTY_ALL,      "data10"},
898         {CTSVC_PROPERTY_EXTENSION_DATA11,               CTSVC_SEARCH_PROPERTY_ALL,      "data11"},
899         {CTSVC_PROPERTY_EXTENSION_DATA12,               CTSVC_SEARCH_PROPERTY_ALL,      "data12"},
900 };
901
902 const property_info_s __property_sip[] = {
903         {CTSVC_PROPERTY_SIP_ID,             CTSVC_SEARCH_PROPERTY_ALL,  "id"},
904         {CTSVC_PROPERTY_SIP_CONTACT_ID,     CTSVC_SEARCH_PROPERTY_ALL,  "contact_id"},
905         {CTSVC_PROPERTY_SIP_ADDRESS,        CTSVC_SEARCH_PROPERTY_ALL,  "data1"},
906         {CTSVC_PROPERTY_SIP_TYPE,                       CTSVC_SEARCH_PROPERTY_ALL,      "data2"},
907         {CTSVC_PROPERTY_SIP_LABEL,          CTSVC_SEARCH_PROPERTY_ALL,  "data3"},
908 };
909
910 const property_info_s __property_contact[] = {
911         {CTSVC_PROPERTY_CONTACT_ID,                                     CTSVC_SEARCH_PROPERTY_ALL,      "contact_id"},
912         {CTSVC_PROPERTY_CONTACT_DISPLAY_NAME,           CTSVC_SEARCH_PROPERTY_ALL,      NULL},        /* dispaly_name, reverse_display_name */
913         {CTSVC_PROPERTY_CONTACT_DISPLAY_SOURCE_DATA_ID, CTSVC_SEARCH_PROPERTY_ALL,      "display_name_source"},
914         {CTSVC_PROPERTY_CONTACT_ADDRESSBOOK_ID,         CTSVC_SEARCH_PROPERTY_ALL,      "addressbook_id"},
915         {CTSVC_PROPERTY_CONTACT_RINGTONE,                       CTSVC_SEARCH_PROPERTY_ALL,      "ringtone_path"},
916         {CTSVC_PROPERTY_CONTACT_IMAGE_THUMBNAIL,        CTSVC_SEARCH_PROPERTY_ALL,      "image_thumbnail_path"},
917         {CTSVC_PROPERTY_CONTACT_IS_FAVORITE,                    CTSVC_SEARCH_PROPERTY_ALL,      "is_favorite"},
918         {CTSVC_PROPERTY_CONTACT_HAS_PHONENUMBER,        CTSVC_SEARCH_PROPERTY_ALL,      "has_phonenumber"},
919         {CTSVC_PROPERTY_CONTACT_HAS_EMAIL,                      CTSVC_SEARCH_PROPERTY_ALL,      "has_email"},
920         {CTSVC_PROPERTY_CONTACT_PERSON_ID,                      CTSVC_SEARCH_PROPERTY_ALL,      "person_id"},
921         {CTSVC_PROPERTY_CONTACT_UID,                                    CTSVC_SEARCH_PROPERTY_ALL,      "uid"},
922         {CTSVC_PROPERTY_CONTACT_VIBRATION,                      CTSVC_SEARCH_PROPERTY_ALL,      "vibration"},
923         {CTSVC_PROPERTY_CONTACT_MESSAGE_ALERT,          CTSVC_SEARCH_PROPERTY_ALL,      "message_alert"},
924         {CTSVC_PROPERTY_CONTACT_CHANGED_TIME,           CTSVC_SEARCH_PROPERTY_ALL,      "changed_time"},
925         {CTSVC_PROPERTY_CONTACT_LINK_MODE,                      CTSVC_SEARCH_PROPERTY_ALL,      "link_mode"},
926         {CTSVC_PROPERTY_CONTACT_NAME,                                   CTSVC_SEARCH_PROPERTY_NONE, (void*)__property_name},
927         {CTSVC_PROPERTY_CONTACT_COMPANY,                                CTSVC_SEARCH_PROPERTY_NONE, (void*)__property_company},
928         {CTSVC_PROPERTY_CONTACT_NOTE,                                   CTSVC_SEARCH_PROPERTY_NONE, (void*)__property_note},
929         {CTSVC_PROPERTY_CONTACT_NUMBER,                         CTSVC_SEARCH_PROPERTY_NONE, (void*)__property_number},
930         {CTSVC_PROPERTY_CONTACT_EMAIL,                          CTSVC_SEARCH_PROPERTY_NONE, (void*)__property_email},
931         {CTSVC_PROPERTY_CONTACT_EVENT,                          CTSVC_SEARCH_PROPERTY_NONE, (void*)__property_event},
932         {CTSVC_PROPERTY_CONTACT_MESSENGER,                      CTSVC_SEARCH_PROPERTY_NONE, (void*)__property_messenger},
933         {CTSVC_PROPERTY_CONTACT_ADDRESS,                                CTSVC_SEARCH_PROPERTY_NONE, (void*)__property_address},
934         {CTSVC_PROPERTY_CONTACT_URL,                                    CTSVC_SEARCH_PROPERTY_NONE, (void*)__property_url},
935         {CTSVC_PROPERTY_CONTACT_NICKNAME,                       CTSVC_SEARCH_PROPERTY_NONE, (void*)__property_nickname},
936         {CTSVC_PROPERTY_CONTACT_PROFILE,                                CTSVC_SEARCH_PROPERTY_NONE, (void*)__property_profile},
937         {CTSVC_PROPERTY_CONTACT_RELATIONSHIP,           CTSVC_SEARCH_PROPERTY_NONE, (void*)__property_relationship},
938         {CTSVC_PROPERTY_CONTACT_IMAGE,                          CTSVC_SEARCH_PROPERTY_NONE, (void*)__property_image},
939         {CTSVC_PROPERTY_CONTACT_GROUP_RELATION,         CTSVC_SEARCH_PROPERTY_NONE, (void*)__property_group_relation},
940         {CTSVC_PROPERTY_CONTACT_EXTENSION,                      CTSVC_SEARCH_PROPERTY_NONE, (void*)__property_extension},
941         {CTSVC_PROPERTY_CONTACT_SIP,                            CTSVC_SEARCH_PROPERTY_NONE, (void*)__property_sip},
942 };
943
944 const property_info_s __property_my_profile[] = {
945         {CTSVC_PROPERTY_MY_PROFILE_ID,                                  CTSVC_SEARCH_PROPERTY_ALL,      "my_profile_id"},
946         {CTSVC_PROPERTY_MY_PROFILE_DISPLAY_NAME,                CTSVC_SEARCH_PROPERTY_ALL,      NULL},    /* dispaly_name, reverse_display_name */
947         {CTSVC_PROPERTY_MY_PROFILE_ADDRESSBOOK_ID,              CTSVC_SEARCH_PROPERTY_ALL,      "addressbook_id"},
948         {CTSVC_PROPERTY_MY_PROFILE_IMAGE_THUMBNAIL,     CTSVC_SEARCH_PROPERTY_ALL,      "image_thumbnail_path"},
949         {CTSVC_PROPERTY_MY_PROFILE_UID,                                 CTSVC_SEARCH_PROPERTY_ALL,      "uid"},
950         {CTSVC_PROPERTY_MY_PROFILE_CHANGED_TIME,                CTSVC_SEARCH_PROPERTY_ALL,      "changed_time"},
951         {CTSVC_PROPERTY_MY_PROFILE_NAME,                                        CTSVC_SEARCH_PROPERTY_NONE, (void*)__property_name},
952         {CTSVC_PROPERTY_MY_PROFILE_COMPANY,                             CTSVC_SEARCH_PROPERTY_NONE, (void*)__property_company},
953         {CTSVC_PROPERTY_MY_PROFILE_NOTE,                                        CTSVC_SEARCH_PROPERTY_NONE, (void*)__property_note},
954         {CTSVC_PROPERTY_MY_PROFILE_NUMBER,                              CTSVC_SEARCH_PROPERTY_NONE, (void*)__property_number},
955         {CTSVC_PROPERTY_MY_PROFILE_EMAIL,                               CTSVC_SEARCH_PROPERTY_NONE, (void*)__property_email},
956         {CTSVC_PROPERTY_MY_PROFILE_EVENT,                               CTSVC_SEARCH_PROPERTY_NONE, (void*)__property_event},
957         {CTSVC_PROPERTY_MY_PROFILE_MESSENGER,                   CTSVC_SEARCH_PROPERTY_NONE, (void*)__property_messenger},
958         {CTSVC_PROPERTY_MY_PROFILE_ADDRESS,                             CTSVC_SEARCH_PROPERTY_NONE, (void*)__property_address},
959         {CTSVC_PROPERTY_MY_PROFILE_URL,                                 CTSVC_SEARCH_PROPERTY_NONE, (void*)__property_url},
960         {CTSVC_PROPERTY_MY_PROFILE_NICKNAME,                            CTSVC_SEARCH_PROPERTY_NONE, (void*)__property_nickname},
961         {CTSVC_PROPERTY_MY_PROFILE_PROFILE,                             CTSVC_SEARCH_PROPERTY_NONE, (void*)__property_profile},
962         {CTSVC_PROPERTY_MY_PROFILE_RELATIONSHIP,                CTSVC_SEARCH_PROPERTY_NONE, (void*)__property_relationship},
963         {CTSVC_PROPERTY_MY_PROFILE_IMAGE,                               CTSVC_SEARCH_PROPERTY_NONE, (void*)__property_image},
964         {CTSVC_PROPERTY_MY_PROFILE_EXTENSION,                   CTSVC_SEARCH_PROPERTY_NONE, (void*)__property_extension},
965         {CTSVC_PROPERTY_MY_PROFILE_SIP,                                 CTSVC_SEARCH_PROPERTY_NONE, (void*)__property_sip},
966 };
967
968 const property_info_s __property_speeddial[] = {   /* _contacts_speeddial */
969         {CTSVC_PROPERTY_SPEEDDIAL_DIAL_NUMBER,          CTSVC_SEARCH_PROPERTY_ALL,      "speed_number"},
970         {CTSVC_PROPERTY_SPEEDDIAL_NUMBER_ID,                    CTSVC_SEARCH_PROPERTY_ALL,      "number_id"},
971         {CTSVC_PROPERTY_SPEEDDIAL_NUMBER,                       CTSVC_SEARCH_PROPERTY_ALL,      "number"},
972         {CTSVC_PROPERTY_SPEEDDIAL_NUMBER_LABEL, CTSVC_SEARCH_PROPERTY_ALL,      "label"},
973         {CTSVC_PROPERTY_SPEEDDIAL_NUMBER_TYPE,          CTSVC_SEARCH_PROPERTY_ALL,      "type"},
974         {CTSVC_PROPERTY_SPEEDDIAL_PERSON_ID,                    CTSVC_SEARCH_PROPERTY_ALL,      "person_id"},
975         {CTSVC_PROPERTY_SPEEDDIAL_DISPLAY_NAME, CTSVC_SEARCH_PROPERTY_ALL,      NULL},            /* display_name or reverse_display_name */
976         {CTSVC_PROPERTY_SPEEDDIAL_IMAGE_THUMBNAIL,      CTSVC_SEARCH_PROPERTY_ALL,      "image_thumbnail_path"},
977         {CTSVC_PROPERTY_SPEEDDIAL_NORMALIZED_NUMBER,    CTSVC_SEARCH_PROPERTY_FILTER,   "normalized_number"},
978         {CTSVC_PROPERTY_SPEEDDIAL_CLEANED_NUMBER,       CTSVC_SEARCH_PROPERTY_FILTER,   "cleaned_number"},
979         {CTSVC_PROPERTY_SPEEDDIAL_NUMBER_FILTER,        CTSVC_SEARCH_PROPERTY_FILTER,   "minmatch"},
980 };
981
982 #ifdef ENABLE_LOG_FEATURE
983 const property_info_s __property_phonelog[] = {   /* _contacts_phone_log */
984         {CTSVC_PROPERTY_PHONELOG_ID,                            CTSVC_SEARCH_PROPERTY_ALL,      "id"},
985         {CTSVC_PROPERTY_PHONELOG_PERSON_ID,             CTSVC_SEARCH_PROPERTY_ALL,      "person_id"},
986         {CTSVC_PROPERTY_PHONELOG_ADDRESS,               CTSVC_SEARCH_PROPERTY_ALL,      "number"},
987         {CTSVC_PROPERTY_PHONELOG_LOG_TIME,              CTSVC_SEARCH_PROPERTY_ALL,      "log_time"},
988         {CTSVC_PROPERTY_PHONELOG_LOG_TYPE,              CTSVC_SEARCH_PROPERTY_ALL,      "log_type"},
989         {CTSVC_PROPERTY_PHONELOG_EXTRA_DATA1,   CTSVC_SEARCH_PROPERTY_ALL,      "data1"},         /* duration */
990         {CTSVC_PROPERTY_PHONELOG_EXTRA_DATA2,   CTSVC_SEARCH_PROPERTY_ALL,      "data2"},         /* short message, email subject */
991         {CTSVC_PROPERTY_PHONELOG_NORMALIZED_ADDRESS,    CTSVC_SEARCH_PROPERTY_FILTER,   "normal_num"},
992         {CTSVC_PROPERTY_PHONELOG_CLEANED_ADDRESS, CTSVC_SEARCH_PROPERTY_FILTER, "clean_num"},
993         {CTSVC_PROPERTY_PHONELOG_ADDRESS_FILTER, CTSVC_SEARCH_PROPERTY_FILTER, "minmatch"},
994         {CTSVC_PROPERTY_PHONELOG_SIM_SLOT_NO,                   CTSVC_SEARCH_PROPERTY_ALL, "sim_id"},
995 };
996 #endif /* ENABLE_LOG_FEATURE */
997
998 /* search properties */
999 const property_info_s __property_person_contact[] = {   /* _contacts_person_contact */
1000         {CTSVC_PROPERTY_PERSON_ID,                                              CTSVC_SEARCH_PROPERTY_ALL,      "person_id"},
1001         {CTSVC_PROPERTY_PERSON_DISPLAY_NAME,                    CTSVC_SEARCH_PROPERTY_ALL,      NULL},    /* "dispaly_name" or "reverse_dispaly_name" */
1002         {CTSVC_PROPERTY_PERSON_DISPLAY_NAME_INDEX,              CTSVC_SEARCH_PROPERTY_PROJECTION,       NULL}, /* "dispaly_name" or "reverse_dispaly_name" */
1003         {CTSVC_PROPERTY_PERSON_DISPLAY_CONTACT_ID,              CTSVC_SEARCH_PROPERTY_PROJECTION,       "name_contact_id"},
1004         {CTSVC_PROPERTY_PERSON_RINGTONE,                                CTSVC_SEARCH_PROPERTY_PROJECTION,       "ringtone_path"},
1005         {CTSVC_PROPERTY_PERSON_IMAGE_THUMBNAIL,         CTSVC_SEARCH_PROPERTY_PROJECTION,       "image_thumbnail_path"},
1006         {CTSVC_PROPERTY_PERSON_VIBRATION,                               CTSVC_SEARCH_PROPERTY_PROJECTION,       "vibration"},
1007         {CTSVC_PROPERTY_PERSON_MESSAGE_ALERT,           CTSVC_SEARCH_PROPERTY_PROJECTION,       "message_alert"},
1008         {CTSVC_PROPERTY_PERSON_STATUS,                          CTSVC_SEARCH_PROPERTY_PROJECTION,       "status"},
1009         {CTSVC_PROPERTY_PERSON_IS_FAVORITE,                     CTSVC_SEARCH_PROPERTY_ALL,      "is_favorite"},
1010         {CTSVC_PROPERTY_PERSON_LINK_COUNT,                              CTSVC_SEARCH_PROPERTY_PROJECTION,       "link_count"},
1011         {CTSVC_PROPERTY_PERSON_ADDRESSBOOK_IDS,         CTSVC_SEARCH_PROPERTY_PROJECTION,       "addressbook_ids"},
1012         {CTSVC_PROPERTY_PERSON_HAS_PHONENUMBER,                 CTSVC_SEARCH_PROPERTY_ALL,      "has_phonenumber"},
1013         {CTSVC_PROPERTY_PERSON_HAS_EMAIL,                               CTSVC_SEARCH_PROPERTY_ALL,      "has_email"},
1014         /* contact */
1015         {CTSVC_PROPERTY_CONTACT_ID,                                             CTSVC_SEARCH_PROPERTY_ALL,      "contact_id"},
1016         {CTSVC_PROPERTY_CONTACT_ADDRESSBOOK_ID,                 CTSVC_SEARCH_PROPERTY_ALL,      "addressbook_id"},
1017         /* addressbook */
1018         {CTSVC_PROPERTY_ADDRESSBOOK_NAME,                               CTSVC_SEARCH_PROPERTY_ALL,      "addressbook_name"},
1019         {CTSVC_PROPERTY_ADDRESSBOOK_MODE,                               CTSVC_SEARCH_PROPERTY_ALL,      "addressbook_mode"},
1020 };
1021
1022 const property_info_s __property_person_number[] = {   /* _contacts_person_number */
1023         {CTSVC_PROPERTY_PERSON_ID,                                              CTSVC_SEARCH_PROPERTY_ALL,      "person_id"},
1024         {CTSVC_PROPERTY_PERSON_DISPLAY_NAME,                    CTSVC_SEARCH_PROPERTY_ALL,      NULL},    /* "dispaly_name" or "reverse_dispaly_name" */
1025         {CTSVC_PROPERTY_PERSON_DISPLAY_NAME_INDEX,              CTSVC_SEARCH_PROPERTY_PROJECTION,       NULL}, /* "dispaly_name" or "reverse_dispaly_name" */
1026         {CTSVC_PROPERTY_PERSON_DISPLAY_CONTACT_ID,              CTSVC_SEARCH_PROPERTY_PROJECTION,       "name_contact_id"},
1027         {CTSVC_PROPERTY_PERSON_RINGTONE,                                CTSVC_SEARCH_PROPERTY_PROJECTION,       "ringtone_path"},
1028         {CTSVC_PROPERTY_PERSON_IMAGE_THUMBNAIL,         CTSVC_SEARCH_PROPERTY_PROJECTION,       "image_thumbnail_path"},
1029         {CTSVC_PROPERTY_PERSON_VIBRATION,                               CTSVC_SEARCH_PROPERTY_PROJECTION,       "vibration"},
1030         {CTSVC_PROPERTY_PERSON_MESSAGE_ALERT,           CTSVC_SEARCH_PROPERTY_PROJECTION,       "message_alert"},
1031         {CTSVC_PROPERTY_PERSON_IS_FAVORITE,                     CTSVC_SEARCH_PROPERTY_ALL,      "is_favorite"},
1032         {CTSVC_PROPERTY_PERSON_HAS_PHONENUMBER,                 CTSVC_SEARCH_PROPERTY_ALL,      "has_phonenumber"},
1033         {CTSVC_PROPERTY_PERSON_HAS_EMAIL,                               CTSVC_SEARCH_PROPERTY_ALL,      "has_email"},
1034         /* number */
1035         {CTSVC_PROPERTY_NUMBER_ID,                                              CTSVC_SEARCH_PROPERTY_ALL,      "number_id"},
1036         {CTSVC_PROPERTY_DATA_IS_PRIMARY_DEFAULT,                CTSVC_SEARCH_PROPERTY_ALL,      "is_primary_default"},
1037         {CTSVC_PROPERTY_NUMBER_TYPE,                                    CTSVC_SEARCH_PROPERTY_PROJECTION,       "type"},
1038         {CTSVC_PROPERTY_NUMBER_LABEL,                                   CTSVC_SEARCH_PROPERTY_PROJECTION,       "label"},
1039         {CTSVC_PROPERTY_NUMBER_NUMBER,                          CTSVC_SEARCH_PROPERTY_ALL,      "number"},
1040         {CTSVC_PROPERTY_NUMBER_NUMBER_FILTER,                   CTSVC_SEARCH_PROPERTY_FILTER,   "minmatch"},
1041         {CTSVC_PROPERTY_NUMBER_NORMALIZED_NUMBER,       CTSVC_SEARCH_PROPERTY_FILTER,   "normalized_number"},
1042         {CTSVC_PROPERTY_NUMBER_CLEANED_NUMBER,  CTSVC_SEARCH_PROPERTY_FILTER,   "cleaned_number"},
1043 };
1044
1045 const property_info_s __property_person_email[] = {   /* _contacts_person_email */
1046         {CTSVC_PROPERTY_PERSON_ID,                                              CTSVC_SEARCH_PROPERTY_ALL,      "person_id"},
1047         {CTSVC_PROPERTY_PERSON_DISPLAY_NAME,                    CTSVC_SEARCH_PROPERTY_ALL,      NULL},    /* "dispaly_name" or "reverse_dispaly_name" */
1048         {CTSVC_PROPERTY_PERSON_DISPLAY_NAME_INDEX,              CTSVC_SEARCH_PROPERTY_PROJECTION,       NULL}, /* "dispaly_name" or "reverse_dispaly_name" */
1049         {CTSVC_PROPERTY_PERSON_DISPLAY_CONTACT_ID,              CTSVC_SEARCH_PROPERTY_PROJECTION,       "name_contact_id"},
1050         {CTSVC_PROPERTY_PERSON_RINGTONE,                                CTSVC_SEARCH_PROPERTY_PROJECTION,       "ringtone_path"},
1051         {CTSVC_PROPERTY_PERSON_IMAGE_THUMBNAIL,         CTSVC_SEARCH_PROPERTY_PROJECTION,       "image_thumbnail_path"},
1052         {CTSVC_PROPERTY_PERSON_VIBRATION,                               CTSVC_SEARCH_PROPERTY_PROJECTION,       "vibration"},
1053         {CTSVC_PROPERTY_PERSON_MESSAGE_ALERT,           CTSVC_SEARCH_PROPERTY_PROJECTION,       "message_alert"},
1054         {CTSVC_PROPERTY_PERSON_IS_FAVORITE,                     CTSVC_SEARCH_PROPERTY_ALL,      "is_favorite"},
1055         {CTSVC_PROPERTY_PERSON_HAS_PHONENUMBER,                 CTSVC_SEARCH_PROPERTY_ALL,      "has_phonenumber"},
1056         {CTSVC_PROPERTY_PERSON_HAS_EMAIL,                               CTSVC_SEARCH_PROPERTY_ALL,      "has_email"},
1057         /* email */
1058         {CTSVC_PROPERTY_EMAIL_ID,                                               CTSVC_SEARCH_PROPERTY_ALL,      "email_id"},
1059         {CTSVC_PROPERTY_EMAIL_TYPE,                                     CTSVC_SEARCH_PROPERTY_PROJECTION,       "type"},
1060         {CTSVC_PROPERTY_EMAIL_LABEL,                                    CTSVC_SEARCH_PROPERTY_PROJECTION,       "label"},
1061         {CTSVC_PROPERTY_DATA_IS_PRIMARY_DEFAULT,                CTSVC_SEARCH_PROPERTY_ALL,      "is_primary_default"},
1062         {CTSVC_PROPERTY_EMAIL_EMAIL,                                    CTSVC_SEARCH_PROPERTY_ALL,      "email"},
1063 };
1064
1065 const property_info_s __property_person_grouprel[] = {   /* _contacts_person_grouprel */
1066         {CTSVC_PROPERTY_PERSON_ID,                                              CTSVC_SEARCH_PROPERTY_ALL,      "person_id"},
1067         {CTSVC_PROPERTY_PERSON_DISPLAY_NAME,                    CTSVC_SEARCH_PROPERTY_ALL,      NULL},    /* "dispaly_name" or "reverse_dispaly_name" */
1068         {CTSVC_PROPERTY_PERSON_DISPLAY_NAME_INDEX,              CTSVC_SEARCH_PROPERTY_PROJECTION,       NULL}, /* "dispaly_name" or "reverse_dispaly_name" */
1069         {CTSVC_PROPERTY_PERSON_DISPLAY_CONTACT_ID,              CTSVC_SEARCH_PROPERTY_PROJECTION,       "name_contact_id"},
1070         {CTSVC_PROPERTY_PERSON_RINGTONE,                                CTSVC_SEARCH_PROPERTY_PROJECTION,       "ringtone_path"},
1071         {CTSVC_PROPERTY_PERSON_IMAGE_THUMBNAIL,         CTSVC_SEARCH_PROPERTY_PROJECTION,       "image_thumbnail_path"},
1072         {CTSVC_PROPERTY_PERSON_VIBRATION,                               CTSVC_SEARCH_PROPERTY_PROJECTION,       "vibration"},
1073         {CTSVC_PROPERTY_PERSON_MESSAGE_ALERT,           CTSVC_SEARCH_PROPERTY_PROJECTION,       "message_alert"},
1074         {CTSVC_PROPERTY_PERSON_STATUS,                                  CTSVC_SEARCH_PROPERTY_PROJECTION,       "status"},
1075         {CTSVC_PROPERTY_PERSON_IS_FAVORITE,                     CTSVC_SEARCH_PROPERTY_ALL,      "is_favorite"},
1076         {CTSVC_PROPERTY_PERSON_LINK_COUNT,                              CTSVC_SEARCH_PROPERTY_PROJECTION,       "link_count"},
1077         {CTSVC_PROPERTY_PERSON_ADDRESSBOOK_IDS,         CTSVC_SEARCH_PROPERTY_PROJECTION,       "addressbook_ids"},
1078         {CTSVC_PROPERTY_PERSON_HAS_PHONENUMBER,                 CTSVC_SEARCH_PROPERTY_ALL,      "has_phonenumber"},
1079         {CTSVC_PROPERTY_PERSON_HAS_EMAIL,                               CTSVC_SEARCH_PROPERTY_ALL,      "has_email"},
1080         /* contacts */
1081         {CTSVC_PROPERTY_CONTACT_ADDRESSBOOK_ID,                         CTSVC_SEARCH_PROPERTY_ALL,      "addressbook_id"},
1082         /* group relation */
1083         {CTSVC_PROPERTY_GROUP_RELATION_GROUP_ID,                        CTSVC_SEARCH_PROPERTY_ALL,      "group_id"},
1084         {CTSVC_PROPERTY_GROUP_RELATION_CONTACT_ID,                      CTSVC_SEARCH_PROPERTY_PROJECTION,       "contact_id"},
1085         /* addressbook */
1086         {CTSVC_PROPERTY_ADDRESSBOOK_NAME,                               CTSVC_SEARCH_PROPERTY_ALL,      "addressbook_name"},
1087         {CTSVC_PROPERTY_ADDRESSBOOK_MODE,                               CTSVC_SEARCH_PROPERTY_ALL,      "addressbook_mode"},
1088 };
1089
1090 const property_info_s __property_person_group_assigned[] = {   /* _contacts_person_group_assigned */
1091         {CTSVC_PROPERTY_PERSON_ID,                                              CTSVC_SEARCH_PROPERTY_ALL,      "person_id"},
1092         {CTSVC_PROPERTY_PERSON_DISPLAY_NAME,                    CTSVC_SEARCH_PROPERTY_ALL,      NULL},    /* "dispaly_name" or "reverse_dispaly_name" */
1093         {CTSVC_PROPERTY_PERSON_DISPLAY_NAME_INDEX,              CTSVC_SEARCH_PROPERTY_PROJECTION,       NULL}, /* "dispaly_name" or "reverse_dispaly_name" */
1094         {CTSVC_PROPERTY_PERSON_DISPLAY_CONTACT_ID,              CTSVC_SEARCH_PROPERTY_PROJECTION,       "name_contact_id"},
1095         {CTSVC_PROPERTY_PERSON_RINGTONE,                                CTSVC_SEARCH_PROPERTY_PROJECTION,       "ringtone_path"},
1096         {CTSVC_PROPERTY_PERSON_IMAGE_THUMBNAIL,         CTSVC_SEARCH_PROPERTY_PROJECTION,       "image_thumbnail_path"},
1097         {CTSVC_PROPERTY_PERSON_VIBRATION,                               CTSVC_SEARCH_PROPERTY_PROJECTION,       "vibration"},
1098         {CTSVC_PROPERTY_PERSON_MESSAGE_ALERT,           CTSVC_SEARCH_PROPERTY_PROJECTION,       "message_alert"},
1099         {CTSVC_PROPERTY_PERSON_STATUS,                                  CTSVC_SEARCH_PROPERTY_PROJECTION,       "status"},
1100         {CTSVC_PROPERTY_PERSON_IS_FAVORITE,                     CTSVC_SEARCH_PROPERTY_ALL,      "is_favorite"},
1101         {CTSVC_PROPERTY_PERSON_LINK_COUNT,                              CTSVC_SEARCH_PROPERTY_PROJECTION,       "link_count"},
1102         {CTSVC_PROPERTY_PERSON_ADDRESSBOOK_IDS,         CTSVC_SEARCH_PROPERTY_PROJECTION,       "addressbook_ids"},
1103         {CTSVC_PROPERTY_PERSON_HAS_PHONENUMBER,                 CTSVC_SEARCH_PROPERTY_ALL,      "has_phonenumber"},
1104         {CTSVC_PROPERTY_PERSON_HAS_EMAIL,                               CTSVC_SEARCH_PROPERTY_ALL,      "has_email"},
1105         /* contacts */
1106         {CTSVC_PROPERTY_CONTACT_ADDRESSBOOK_ID,                         CTSVC_SEARCH_PROPERTY_ALL,      "addressbook_id"},
1107         /* group relation */
1108         {CTSVC_PROPERTY_GROUP_RELATION_GROUP_ID,                        CTSVC_SEARCH_PROPERTY_ALL,      "group_id"},
1109         {CTSVC_PROPERTY_GROUP_RELATION_CONTACT_ID,                      CTSVC_SEARCH_PROPERTY_PROJECTION,       "contact_id"},
1110         /* addressbook */
1111         {CTSVC_PROPERTY_ADDRESSBOOK_MODE,                               CTSVC_SEARCH_PROPERTY_ALL,      "addressbook_mode"},
1112 };
1113
1114 const property_info_s __property_person_group_not_assigned[] = {   /* _contacts_person_group_not_assigned */
1115         {CTSVC_PROPERTY_PERSON_ID,                                              CTSVC_SEARCH_PROPERTY_ALL,      "person_id"},
1116         {CTSVC_PROPERTY_PERSON_DISPLAY_NAME,                    CTSVC_SEARCH_PROPERTY_ALL,      NULL},    /* "dispaly_name" or "reverse_dispaly_name" */
1117         {CTSVC_PROPERTY_PERSON_DISPLAY_NAME_INDEX,              CTSVC_SEARCH_PROPERTY_PROJECTION,       NULL}, /* "dispaly_name" or "reverse_dispaly_name" */
1118         {CTSVC_PROPERTY_PERSON_DISPLAY_CONTACT_ID,              CTSVC_SEARCH_PROPERTY_PROJECTION,       "name_contact_id"},
1119         {CTSVC_PROPERTY_PERSON_RINGTONE,                                CTSVC_SEARCH_PROPERTY_PROJECTION,       "ringtone_path"},
1120         {CTSVC_PROPERTY_PERSON_IMAGE_THUMBNAIL,         CTSVC_SEARCH_PROPERTY_PROJECTION,       "image_thumbnail_path"},
1121         {CTSVC_PROPERTY_PERSON_VIBRATION,                               CTSVC_SEARCH_PROPERTY_PROJECTION,       "vibration"},
1122         {CTSVC_PROPERTY_PERSON_MESSAGE_ALERT,           CTSVC_SEARCH_PROPERTY_PROJECTION,       "message_alert"},
1123         {CTSVC_PROPERTY_PERSON_STATUS,                                  CTSVC_SEARCH_PROPERTY_PROJECTION,       "status"},
1124         {CTSVC_PROPERTY_PERSON_IS_FAVORITE,                     CTSVC_SEARCH_PROPERTY_ALL,      "is_favorite"},
1125         {CTSVC_PROPERTY_PERSON_LINK_COUNT,                              CTSVC_SEARCH_PROPERTY_PROJECTION,       "link_count"},
1126         {CTSVC_PROPERTY_PERSON_ADDRESSBOOK_IDS,         CTSVC_SEARCH_PROPERTY_PROJECTION,       "addressbook_ids"},
1127         {CTSVC_PROPERTY_PERSON_HAS_PHONENUMBER,                 CTSVC_SEARCH_PROPERTY_ALL,      "has_phonenumber"},
1128         {CTSVC_PROPERTY_PERSON_HAS_EMAIL,                               CTSVC_SEARCH_PROPERTY_ALL,      "has_email"},
1129         /* contacts */
1130         {CTSVC_PROPERTY_CONTACT_ADDRESSBOOK_ID,                 CTSVC_SEARCH_PROPERTY_ALL,      "addressbook_id"},
1131         {CTSVC_PROPERTY_CONTACT_ID,                                                     CTSVC_SEARCH_PROPERTY_PROJECTION,       "contact_id"},
1132         /* addressbook */
1133         {CTSVC_PROPERTY_ADDRESSBOOK_MODE,                               CTSVC_SEARCH_PROPERTY_ALL,      "addressbook_mode"},
1134 };
1135
1136 #ifdef ENABLE_LOG_FEATURE
1137 const property_info_s __property_person_phonelog[] = {   /* _contacts_person_phone_log */
1138         {CTSVC_PROPERTY_PERSON_ID,                                              CTSVC_SEARCH_PROPERTY_ALL,      "id"},
1139         {CTSVC_PROPERTY_PERSON_DISPLAY_NAME,                    CTSVC_SEARCH_PROPERTY_ALL,      NULL},    /* "dispaly_name" or "reverse_dispaly_name" */
1140         {CTSVC_PROPERTY_PERSON_IMAGE_THUMBNAIL,         CTSVC_SEARCH_PROPERTY_PROJECTION,       "image_thumbnail_path"},
1141         /* phonelog */
1142         {CTSVC_PROPERTY_PHONELOG_ID,                            CTSVC_SEARCH_PROPERTY_ALL,      "phonelog_id"},
1143         {CTSVC_PROPERTY_PHONELOG_ADDRESS,                       CTSVC_SEARCH_PROPERTY_ALL,      "address"},
1144         {CTSVC_PROPERTY_DATA_DATA1,                                     CTSVC_SEARCH_PROPERTY_PROJECTION,       "address_type"},
1145         {CTSVC_PROPERTY_PHONELOG_LOG_TIME,                      CTSVC_SEARCH_PROPERTY_ALL,      "log_time"},
1146         {CTSVC_PROPERTY_PHONELOG_LOG_TYPE,                      CTSVC_SEARCH_PROPERTY_ALL,      "log_type"},
1147         {CTSVC_PROPERTY_PHONELOG_EXTRA_DATA1,           CTSVC_SEARCH_PROPERTY_PROJECTION,       "data1"}, /* duration */
1148         {CTSVC_PROPERTY_PHONELOG_EXTRA_DATA2,           CTSVC_SEARCH_PROPERTY_PROJECTION,       "data2"}, /* message_id */
1149         {CTSVC_PROPERTY_PHONELOG_NORMALIZED_ADDRESS,    CTSVC_SEARCH_PROPERTY_FILTER,   "normal_num"},
1150         {CTSVC_PROPERTY_PHONELOG_CLEANED_ADDRESS,       CTSVC_SEARCH_PROPERTY_FILTER,   "clean_num"},
1151         {CTSVC_PROPERTY_PHONELOG_ADDRESS_FILTER,        CTSVC_SEARCH_PROPERTY_FILTER,   "minmatch"},
1152         {CTSVC_PROPERTY_PHONELOG_SIM_SLOT_NO, CTSVC_SEARCH_PROPERTY_ALL, "sim_id"},
1153 };
1154 #endif /* ENABLE_LOG_FEATURE */
1155
1156 const property_info_s __property_person_usage[] = {   /* _contacts_person_usage */
1157         {CTSVC_PROPERTY_PERSON_ID,                                              CTSVC_SEARCH_PROPERTY_ALL,      "person_id"},
1158         {CTSVC_PROPERTY_PERSON_DISPLAY_NAME,                    CTSVC_SEARCH_PROPERTY_ALL,      NULL},    /* "dispaly_name" or "reverse_dispaly_name" */
1159         {CTSVC_PROPERTY_PERSON_DISPLAY_NAME_INDEX,                              CTSVC_SEARCH_PROPERTY_PROJECTION,       NULL}, /* "dispaly_name" or "reverse_dispaly_name" */
1160         {CTSVC_PROPERTY_PERSON_DISPLAY_CONTACT_ID,              CTSVC_SEARCH_PROPERTY_PROJECTION,       "name_contact_id"},
1161         {CTSVC_PROPERTY_PERSON_RINGTONE,                                CTSVC_SEARCH_PROPERTY_PROJECTION,       "ringtone_path"},
1162         {CTSVC_PROPERTY_PERSON_IMAGE_THUMBNAIL,         CTSVC_SEARCH_PROPERTY_PROJECTION,       "image_thumbnail_path"},
1163         {CTSVC_PROPERTY_PERSON_VIBRATION,                               CTSVC_SEARCH_PROPERTY_PROJECTION,       "vibration"},
1164         {CTSVC_PROPERTY_PERSON_MESSAGE_ALERT,           CTSVC_SEARCH_PROPERTY_PROJECTION,       "message_alert"},
1165         {CTSVC_PROPERTY_PERSON_IS_FAVORITE,                     CTSVC_SEARCH_PROPERTY_ALL,      "is_favorite"},
1166         {CTSVC_PROPERTY_PERSON_HAS_PHONENUMBER,                 CTSVC_SEARCH_PROPERTY_ALL,      "has_phonenumber"},
1167         {CTSVC_PROPERTY_PERSON_HAS_EMAIL,                               CTSVC_SEARCH_PROPERTY_ALL,      "has_email"},
1168         /* contact_stat */
1169         {CTSVC_PROPERTY_PERSON_USAGE_TYPE,                              CTSVC_SEARCH_PROPERTY_ALL,      "usage_type"},
1170         {CTSVC_PROPERTY_PERSON_TIMES_USED,                              CTSVC_SEARCH_PROPERTY_ALL,      "times_used"},
1171 };
1172
1173 const property_info_s __property_contact_number[] = {   /* _contacts_contact_number */
1174         {CTSVC_PROPERTY_CONTACT_ID,                                     CTSVC_SEARCH_PROPERTY_ALL,      "contact_id"},
1175         {CTSVC_PROPERTY_CONTACT_DISPLAY_NAME,           CTSVC_SEARCH_PROPERTY_ALL,      NULL},        /* "dispaly_name" or "reverse_dispaly_name" */
1176         {CTSVC_PROPERTY_CONTACT_DISPLAY_SOURCE_DATA_ID,                 CTSVC_SEARCH_PROPERTY_PROJECTION,       "display_name_source"},
1177         {CTSVC_PROPERTY_CONTACT_ADDRESSBOOK_ID,         CTSVC_SEARCH_PROPERTY_ALL,      "addressbook_id"},
1178         {CTSVC_PROPERTY_CONTACT_PERSON_ID,                      CTSVC_SEARCH_PROPERTY_ALL,      "person_id"},
1179         {CTSVC_PROPERTY_CONTACT_RINGTONE,                       CTSVC_SEARCH_PROPERTY_PROJECTION,       "ringtone_path"},
1180         {CTSVC_PROPERTY_CONTACT_IMAGE_THUMBNAIL,        CTSVC_SEARCH_PROPERTY_PROJECTION,       "image_thumbnail_path"},
1181         /* number */
1182         {CTSVC_PROPERTY_NUMBER_ID,                                      CTSVC_SEARCH_PROPERTY_ALL,      "number_id"},
1183         {CTSVC_PROPERTY_NUMBER_TYPE,                            CTSVC_SEARCH_PROPERTY_PROJECTION,       "type"},
1184         {CTSVC_PROPERTY_NUMBER_LABEL,                           CTSVC_SEARCH_PROPERTY_PROJECTION,       "label"},
1185         {CTSVC_PROPERTY_NUMBER_IS_DEFAULT,                      CTSVC_SEARCH_PROPERTY_ALL,      "is_default"},
1186         {CTSVC_PROPERTY_NUMBER_NUMBER,                          CTSVC_SEARCH_PROPERTY_ALL,      "number"},
1187         {CTSVC_PROPERTY_NUMBER_NUMBER_FILTER,           CTSVC_SEARCH_PROPERTY_FILTER,   "minmatch"},
1188         {CTSVC_PROPERTY_NUMBER_NORMALIZED_NUMBER,       CTSVC_SEARCH_PROPERTY_FILTER,   "normalized_number"},
1189         {CTSVC_PROPERTY_NUMBER_CLEANED_NUMBER,  CTSVC_SEARCH_PROPERTY_FILTER,   "cleaned_number"},
1190 };
1191
1192 const property_info_s __property_contact_email[] = {   /* _contacts_contact_email */
1193         {CTSVC_PROPERTY_CONTACT_ID,                                     CTSVC_SEARCH_PROPERTY_ALL,      "contact_id"},
1194         {CTSVC_PROPERTY_CONTACT_DISPLAY_NAME,           CTSVC_SEARCH_PROPERTY_ALL,      NULL},        /* "dispaly_name" or "reverse_dispaly_name" */
1195         {CTSVC_PROPERTY_CONTACT_DISPLAY_SOURCE_DATA_ID,                 CTSVC_SEARCH_PROPERTY_ALL,      "display_name_source"},
1196         {CTSVC_PROPERTY_CONTACT_ADDRESSBOOK_ID,         CTSVC_SEARCH_PROPERTY_ALL,      "addressbook_id"},
1197         {CTSVC_PROPERTY_CONTACT_PERSON_ID,                      CTSVC_SEARCH_PROPERTY_ALL,      "person_id"},
1198         {CTSVC_PROPERTY_CONTACT_RINGTONE,                       CTSVC_SEARCH_PROPERTY_PROJECTION,       "ringtone_path"},
1199         {CTSVC_PROPERTY_CONTACT_IMAGE_THUMBNAIL,                CTSVC_SEARCH_PROPERTY_PROJECTION,       "image_thumbnail_path"},
1200         /* email */
1201         {CTSVC_PROPERTY_EMAIL_ID,                                               CTSVC_SEARCH_PROPERTY_ALL,      "email_id"},
1202         {CTSVC_PROPERTY_EMAIL_TYPE,                                             CTSVC_SEARCH_PROPERTY_PROJECTION,       "type"},
1203         {CTSVC_PROPERTY_EMAIL_LABEL,                                    CTSVC_SEARCH_PROPERTY_PROJECTION,       "label"},
1204         {CTSVC_PROPERTY_EMAIL_IS_DEFAULT,                               CTSVC_SEARCH_PROPERTY_ALL,      "is_default"},
1205         {CTSVC_PROPERTY_EMAIL_EMAIL,                                    CTSVC_SEARCH_PROPERTY_ALL,      "email"},
1206 };
1207
1208 const property_info_s __property_contact_grouprel[] = {   /* _contacts_contact_grouprel */
1209         {CTSVC_PROPERTY_CONTACT_ID,                                     CTSVC_SEARCH_PROPERTY_ALL,      "contact_id"},
1210         {CTSVC_PROPERTY_CONTACT_DISPLAY_NAME,           CTSVC_SEARCH_PROPERTY_ALL,      NULL},        /* "dispaly_name" or "reverse_dispaly_name" */
1211         {CTSVC_PROPERTY_CONTACT_DISPLAY_SOURCE_DATA_ID,                 CTSVC_SEARCH_PROPERTY_PROJECTION,       "display_name_source"},
1212         {CTSVC_PROPERTY_CONTACT_ADDRESSBOOK_ID,         CTSVC_SEARCH_PROPERTY_ALL,      "addressbook_id"},
1213         {CTSVC_PROPERTY_CONTACT_PERSON_ID,                      CTSVC_SEARCH_PROPERTY_ALL,      "person_id"},
1214         {CTSVC_PROPERTY_CONTACT_RINGTONE,                       CTSVC_SEARCH_PROPERTY_PROJECTION,       "ringtone_path"},
1215         {CTSVC_PROPERTY_CONTACT_IMAGE_THUMBNAIL,                CTSVC_SEARCH_PROPERTY_PROJECTION,       "image_thumbnail_path"},
1216         /* group relation */
1217         {CTSVC_PROPERTY_GROUP_RELATION_GROUP_ID,                CTSVC_SEARCH_PROPERTY_ALL,      "group_id"},
1218         {CTSVC_PROPERTY_GROUP_RELATION_GROUP_NAME,              CTSVC_SEARCH_PROPERTY_PROJECTION,       "group_name"},
1219 };
1220
1221 const property_info_s __property_contact_activity[] = {   /* _contacts_contact_activity */
1222         {CTSVC_PROPERTY_CONTACT_ID,                                     CTSVC_SEARCH_PROPERTY_ALL,      "contact_id"},
1223         {CTSVC_PROPERTY_CONTACT_DISPLAY_NAME,           CTSVC_SEARCH_PROPERTY_ALL,      NULL},        /* "dispaly_name" or "reverse_dispaly_name" */
1224         {CTSVC_PROPERTY_CONTACT_DISPLAY_SOURCE_DATA_ID,                 CTSVC_SEARCH_PROPERTY_PROJECTION,       "display_name_source"},
1225         {CTSVC_PROPERTY_CONTACT_ADDRESSBOOK_ID,         CTSVC_SEARCH_PROPERTY_ALL,      "addressbook_id"},
1226         {CTSVC_PROPERTY_CONTACT_PERSON_ID,                      CTSVC_SEARCH_PROPERTY_ALL,      "person_id"},
1227         {CTSVC_PROPERTY_CONTACT_RINGTONE,                       CTSVC_SEARCH_PROPERTY_PROJECTION,       "ringtone_path"},
1228         {CTSVC_PROPERTY_CONTACT_IMAGE_THUMBNAIL,                CTSVC_SEARCH_PROPERTY_PROJECTION,       "image_thumbnail_path"},
1229         {CTSVC_PROPERTY_ACTIVITY_ID,                            CTSVC_SEARCH_PROPERTY_ALL,      "activity_id"},
1230         {CTSVC_PROPERTY_ACTIVITY_SOURCE_NAME,           CTSVC_SEARCH_PROPERTY_ALL,      "source_name"},
1231         {CTSVC_PROPERTY_ACTIVITY_STATUS,                        CTSVC_SEARCH_PROPERTY_PROJECTION,       "status"},
1232         {CTSVC_PROPERTY_ACTIVITY_TIMESTAMP,             CTSVC_SEARCH_PROPERTY_ALL,      "timestamp"},
1233         {CTSVC_PROPERTY_ACTIVITY_SERVICE_OPERATION, CTSVC_SEARCH_PROPERTY_ALL,  "service_operation"},
1234         {CTSVC_PROPERTY_ACTIVITY_URI,                                   CTSVC_SEARCH_PROPERTY_ALL,      "uri"},
1235         {CTSVC_PROPERTY_ADDRESSBOOK_ACCOUNT_ID,         CTSVC_SEARCH_PROPERTY_ALL,      "account_id"},
1236 };
1237
1238 #ifdef ENABLE_LOG_FEATURE
1239 const property_info_s __property_phonelog_stat[] = {   /* _contacts_phone_log_stat */
1240         {CTSVC_PROPERTY_PHONELOG_STAT_LOG_COUNT,                CTSVC_SEARCH_PROPERTY_PROJECTION,       "log_count"},
1241         {CTSVC_PROPERTY_PHONELOG_STAT_LOG_TYPE,                 CTSVC_SEARCH_PROPERTY_ALL,      "log_type"},
1242 };
1243 #endif
1244
1245 typedef struct {
1246         char *view_uri;
1247         ctsvc_record_type_e type;
1248         property_info_s *properties;
1249         unsigned int property_count;
1250 } view_uri_info_s;
1251
1252 #define PTR_COUNT(X)    (void*)(X), sizeof(X)/sizeof(property_info_s)
1253
1254 static const view_uri_info_s __tables[] = {
1255         {CTSVC_VIEW_URI_ADDRESSBOOK,    CTSVC_RECORD_ADDRESSBOOK,               PTR_COUNT(__property_addressbook)},
1256         {CTSVC_VIEW_URI_GROUP,                  CTSVC_RECORD_GROUP,                             PTR_COUNT(__property_group)},
1257         {CTSVC_VIEW_URI_PERSON,                 CTSVC_RECORD_PERSON,                    PTR_COUNT(__property_person)},
1258         {CTSVC_VIEW_URI_SIMPLE_CONTACT, CTSVC_RECORD_SIMPLE_CONTACT,    PTR_COUNT(__property_simple_contact)},
1259         {CTSVC_VIEW_URI_CONTACT,                CTSVC_RECORD_CONTACT,                   PTR_COUNT(__property_contact)},
1260         {CTSVC_VIEW_URI_MY_PROFILE,             CTSVC_RECORD_MY_PROFILE,                PTR_COUNT(__property_my_profile)},
1261         {CTSVC_VIEW_URI_ACTIVITY,               CTSVC_RECORD_ACTIVITY,                  PTR_COUNT(__property_activity)},
1262         {CTSVC_VIEW_URI_ACTIVITY_PHOTO, CTSVC_RECORD_ACTIVITY_PHOTO,    PTR_COUNT(__property_activity_photo)},
1263 #ifdef ENABLE_LOG_FEATURE
1264         {CTSVC_VIEW_URI_PHONELOG,               CTSVC_RECORD_PHONELOG,                  PTR_COUNT(__property_phonelog)},
1265 #endif /* ENABLE_LOG_FEATURE */
1266         {CTSVC_VIEW_URI_SPEEDDIAL,              CTSVC_RECORD_SPEEDDIAL,                 PTR_COUNT(__property_speeddial)},
1267         {CTSVC_VIEW_URI_SDN,                    CTSVC_RECORD_SDN,                               PTR_COUNT(__property_sdn)},
1268
1269         {CTSVC_VIEW_URI_NAME,                   CTSVC_RECORD_NAME,                              PTR_COUNT(__property_name)},
1270         {CTSVC_VIEW_URI_COMPANY,                CTSVC_RECORD_COMPANY,                   PTR_COUNT(__property_company)},
1271         {CTSVC_VIEW_URI_NUMBER,         CTSVC_RECORD_NUMBER,                    PTR_COUNT(__property_number)},
1272         {CTSVC_VIEW_URI_EMAIL,                  CTSVC_RECORD_EMAIL,                             PTR_COUNT(__property_email)},
1273         {CTSVC_VIEW_URI_URL,                    CTSVC_RECORD_URL,                               PTR_COUNT(__property_url)},
1274         {CTSVC_VIEW_URI_ADDRESS,                CTSVC_RECORD_ADDRESS,                   PTR_COUNT(__property_address)},
1275         {CTSVC_VIEW_URI_PROFILE,                CTSVC_RECORD_PROFILE,                   PTR_COUNT(__property_profile)},
1276         {CTSVC_VIEW_URI_RELATIONSHIP,   CTSVC_RECORD_RELATIONSHIP,              PTR_COUNT(__property_relationship)},
1277         {CTSVC_VIEW_URI_IMAGE,                  CTSVC_RECORD_IMAGE,                             PTR_COUNT(__property_image)},
1278         {CTSVC_VIEW_URI_NOTE,                   CTSVC_RECORD_NOTE,                              PTR_COUNT(__property_note)},
1279         {CTSVC_VIEW_URI_NICKNAME,               CTSVC_RECORD_NICKNAME,                  PTR_COUNT(__property_nickname)},
1280         {CTSVC_VIEW_URI_EVENT,                  CTSVC_RECORD_EVENT,                             PTR_COUNT(__property_event)},
1281         {CTSVC_VIEW_URI_MESSENGER,              CTSVC_RECORD_MESSENGER,                 PTR_COUNT(__property_messenger)},
1282         {CTSVC_VIEW_URI_GROUP_RELATION, CTSVC_RECORD_GROUP_RELATION,    PTR_COUNT(__property_group_relation)},
1283         {CTSVC_VIEW_URI_EXTENSION,              CTSVC_RECORD_EXTENSION,                 PTR_COUNT(__property_extension)},
1284         {CTSVC_VIEW_URI_SIP,                    CTSVC_RECORD_SIP,                               PTR_COUNT(__property_sip)},
1285
1286         {CTSVC_VIEW_URI_GROUPS_UPDATED_INFO,  CTSVC_RECORD_UPDATED_INFO, NULL, 0},
1287         {CTSVC_VIEW_URI_GROUPS_MEMBER_UPDATED_INFO,  CTSVC_RECORD_UPDATED_INFO, NULL, 0},
1288         {CTSVC_VIEW_URI_CONTACTS_UPDATED_INFO, CTSVC_RECORD_UPDATED_INFO, NULL, 0},
1289         {CTSVC_VIEW_URI_MY_PROFILE_UPDATED_INFO, CTSVC_RECORD_UPDATED_INFO,  NULL, 0},
1290         {CTSVC_VIEW_URI_GROUPRELS_UPDATED_INFO, CTSVC_RECORD_RESULT, NULL, 0},
1291
1292         {CTSVC_VIEW_URI_READ_ONLY_PERSON_CONTACT,               CTSVC_RECORD_RESULT, PTR_COUNT(__property_person_contact)},
1293         {CTSVC_VIEW_URI_READ_ONLY_PERSON_NUMBER,                CTSVC_RECORD_RESULT, PTR_COUNT(__property_person_number)},
1294         {CTSVC_VIEW_URI_READ_ONLY_PERSON_EMAIL,         CTSVC_RECORD_RESULT, PTR_COUNT(__property_person_email)},
1295         {CTSVC_VIEW_URI_READ_ONLY_PERSON_GROUP,         CTSVC_RECORD_RESULT, PTR_COUNT(__property_person_grouprel)},
1296         {CTSVC_VIEW_URI_READ_ONLY_PERSON_GROUP_ASSIGNED,                CTSVC_RECORD_RESULT, PTR_COUNT(__property_person_group_assigned)},
1297         {CTSVC_VIEW_URI_READ_ONLY_PERSON_GROUP_NOT_ASSIGNED,            CTSVC_RECORD_RESULT, PTR_COUNT(__property_person_group_not_assigned)},
1298 #ifdef ENABLE_LOG_FEATURE
1299         {CTSVC_VIEW_URI_READ_ONLY_PERSON_PHONELOG,                              CTSVC_RECORD_RESULT, PTR_COUNT(__property_person_phonelog)},
1300 #endif /* ENABLE_LOG_FEATURE */
1301         {CTSVC_VIEW_URI_READ_ONLY_PERSON_USAGE,                         CTSVC_RECORD_RESULT, PTR_COUNT(__property_person_usage)},
1302
1303         {CTSVC_VIEW_URI_READ_ONLY_CONTACT_NUMBER,                               CTSVC_RECORD_RESULT, PTR_COUNT(__property_contact_number)},
1304         {CTSVC_VIEW_URI_READ_ONLY_CONTACT_EMAIL,                                CTSVC_RECORD_RESULT, PTR_COUNT(__property_contact_email)},
1305         {CTSVC_VIEW_URI_READ_ONLY_CONTACT_GROUP,                                CTSVC_RECORD_RESULT, PTR_COUNT(__property_contact_grouprel)},
1306         {CTSVC_VIEW_URI_READ_ONLY_CONTACT_ACTIVITY,                     CTSVC_RECORD_RESULT, PTR_COUNT(__property_contact_activity)},
1307 #ifdef ENABLE_LOG_FEATURE
1308         {CTSVC_VIEW_URI_READ_ONLY_PHONELOG_STAT,                                CTSVC_RECORD_RESULT, PTR_COUNT(__property_phonelog_stat)},
1309 #endif /* ENABLE_LOG_FEATURE */
1310 };
1311
1312 static GHashTable *__ctsvc_view_uri_hash = NULL;
1313
1314 #ifndef _CONTACTS_IPC_SERVER /* native or client library */
1315 static int __ctsvc_view_ref_count = 0;
1316 #endif
1317
1318 void ctsvc_view_uri_init()
1319 {
1320         int i;
1321         int count;
1322
1323 #ifndef _CONTACTS_IPC_SERVER /* native or client library */
1324         /* it is called in mutex lock */
1325         __ctsvc_view_ref_count++;
1326 #endif
1327
1328         if (__ctsvc_view_uri_hash)
1329                 return;
1330
1331         __ctsvc_view_uri_hash = g_hash_table_new(g_str_hash, g_str_equal);
1332
1333         i = 0;
1334         count = sizeof(__tables)/sizeof(view_uri_info_s);
1335         for (i = 0; i < count; i++)
1336                 g_hash_table_insert(__ctsvc_view_uri_hash, __tables[i].view_uri, GINT_TO_POINTER(&__tables[i]));
1337 }
1338
1339 void ctsvc_view_uri_deinit()
1340 {
1341 #ifndef _CONTACTS_IPC_SERVER /* native or client library */
1342         /* it is called in mutex lock */
1343         __ctsvc_view_ref_count--;
1344         if (__ctsvc_view_ref_count != 0)
1345                 return;
1346
1347         if (NULL == __ctsvc_view_uri_hash) {
1348                 ERR("contacts-service is not initialized");
1349                 return;
1350         }
1351
1352         g_hash_table_destroy(__ctsvc_view_uri_hash);
1353         __ctsvc_view_uri_hash = NULL;
1354 #endif
1355 }
1356
1357 ctsvc_record_type_e ctsvc_view_get_record_type(const char *view_uri)
1358 {
1359         view_uri_info_s *view_uri_info = NULL;
1360         ctsvc_record_type_e type = CTSVC_RECORD_INVALID;
1361
1362         if (NULL == __ctsvc_view_uri_hash) {
1363                 ERR("contacts-service is not initialized");
1364                 return type;
1365         }
1366
1367         view_uri_info = g_hash_table_lookup(__ctsvc_view_uri_hash, view_uri);
1368         if (view_uri_info)
1369                 type = view_uri_info->type;
1370
1371         return type;
1372 }
1373
1374 const char* ctsvc_view_get_uri(const char *view_uri)
1375 {
1376         view_uri_info_s *view_uri_info = NULL;
1377
1378         if (NULL == __ctsvc_view_uri_hash) {
1379                 ERR("contacts-service is not initialized");
1380                 return NULL;
1381         }
1382
1383         view_uri_info = g_hash_table_lookup(__ctsvc_view_uri_hash, view_uri);
1384         if (view_uri_info)
1385                 return view_uri_info->view_uri;
1386
1387         return NULL;
1388 }
1389
1390 const property_info_s* ctsvc_view_get_all_property_infos(const char *view_uri, unsigned int *count)
1391 {
1392         view_uri_info_s *view_uri_info = NULL;
1393
1394         if (NULL == __ctsvc_view_uri_hash) {
1395                 ERR("contacts-service is not initialized");
1396                 return NULL;
1397         }
1398
1399         view_uri_info = g_hash_table_lookup(__ctsvc_view_uri_hash, view_uri);
1400         if (view_uri_info) {
1401                 *count = view_uri_info->property_count;
1402                 return view_uri_info->properties;
1403         }
1404
1405         return NULL;
1406 }
1407