Beta merge 2
[profile/ivi/wrt-plugins-tizen.git] / src / platform / Tizen / Contact / ContactFilterValidator.cpp
1 /*
2  * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.0 (the License);
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an AS IS BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 /**
18  * @file        ContactFilterValidator.cpp
19  * @author      Kisub Song (kisubs.song@samsung.com)
20  * @version     0.1
21  * @brief
22  */
23
24 #include "ContactFilterValidator.h"
25
26 namespace TizenApis {
27 namespace Platform {
28 namespace Contact {
29
30 using namespace TizenApis::Api::Tizen;
31
32 static PropertyStructArray properties =
33 {
34         {"name.prefix",                         PrimitiveType_String},
35         {"name.firstName",                      PrimitiveType_String},
36         {"name.middleName",                     PrimitiveType_String},
37         {"name.lastName",                       PrimitiveType_String},
38         {"name.nickNames",                      PrimitiveType_String},
39         {"name.phoneticName",           PrimitiveType_String},
40         {"name.displayName",            PrimitiveType_String},
41         {"addresses.country",           PrimitiveType_String},
42         {"addresses.region",            PrimitiveType_String},
43         {"addresses.city",                      PrimitiveType_String},
44         {"addresses.streetAddress",     PrimitiveType_String},
45         {"addresses.additionalInformation",             PrimitiveType_String},
46         {"addresses.postalCode",        PrimitiveType_String},
47         {"addresses.types",                     PrimitiveType_String},
48         {"photoURI",                            PrimitiveType_String},
49         {"phoneNumbers.number",         PrimitiveType_String},
50         {"phoneNumbers.types",          PrimitiveType_String},
51         {"emails.email",                        PrimitiveType_String},
52         {"emails.types",                        PrimitiveType_String},
53         {"birthday",                            PrimitiveType_Time},
54         {"anniversaries.date",          PrimitiveType_Time},
55         {"organization.name",           PrimitiveType_String},
56         {"organization.department",     PrimitiveType_String},
57         {"organization.title",          PrimitiveType_String},
58         {"organization.role",           PrimitiveType_String},
59         {"notes",                                       PrimitiveType_String},
60         {"urls.url",                            PrimitiveType_String},
61         {"urls.type",                           PrimitiveType_String},
62         {"isFavorite",                          PrimitiveType_Boolean},
63         {"ringtoneURI",                         PrimitiveType_String},
64         {"categories",                          PrimitiveType_String},
65         {0,     PrimitiveType_NoType}
66 };
67
68 FilterValidatorPtr ContactFilterValidatorFactory::getContactFilterValidator()
69 {
70     static FilterValidatorPtr theInstance =
71                 FilterValidatorPtr(new FilterValidator(properties));
72     return theInstance;
73 }
74
75 } // Contact
76 } // Platform
77 } // TizenApis