[Contact] Refactoring API structures
[profile/ivi/wrt-plugins-tizen.git] / src / platform / Tizen / Calendar / CalendarFilterValidator.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 #include "CalendarFilterValidator.h"
19 #include "CalendarFilter.h"
20
21 namespace TizenApis {
22 namespace Platform {
23 namespace Calendar {
24
25 using namespace TizenApis::Api::Tizen;
26
27 static PropertyStructArray properties =
28 {
29     {CALENDAR_FILTER_ATTRIBUTE_ID_UID,              PrimitiveType_String},
30     {CALENDAR_FILTER_ATTRIBUTE_ID,                      PrimitiveType_String},
31     {CALENDAR_FILTER_ATTRIBUTE_LAST_MODIFIED_DATE,  PrimitiveType_Time},
32     {CALENDAR_FILTER_ATTRIBUTE_DESCRIPTION,         PrimitiveType_String},
33     {CALENDAR_FILTER_ATTRIBUTE_SUMMARY,             PrimitiveType_String},
34     {CALENDAR_FILTER_ATTRIBUTE_START_DATE,          PrimitiveType_Time},
35     {CALENDAR_FILTER_ATTRIBUTE_LOCATION,            PrimitiveType_String},
36     {CALENDAR_FILTER_ATTRIBUTE_LATITUDE,            PrimitiveType_Double},
37     {CALENDAR_FILTER_ATTRIBUTE_LONGITUDE,           PrimitiveType_Double},
38     {CALENDAR_FILTER_ATTRIBUTE_ORGANIZER,           PrimitiveType_String},
39     {CALENDAR_FILTER_ATTRIBUTE_VISIBILITY,          PrimitiveType_String},
40     {CALENDAR_FILTER_ATTRIBUTE_STATUS,              PrimitiveType_String},
41     {CALENDAR_FILTER_ATTRIBUTE_CATEGORIES,          PrimitiveType_String},
42     {CALENDAR_FILTER_ATTRIBUTE_PRIORITY,            PrimitiveType_String},
43     {CALENDAR_FILTER_ATTRIBUTE_DUE_DATE,            PrimitiveType_Time},
44         {CALENDAR_FILTER_ATTRIBUTE_IS_DETACHED,                 PrimitiveType_Boolean},
45     {CALENDAR_FILTER_ATTRIBUTE_IS_ALL_DAY,          PrimitiveType_Boolean},
46     {CALENDAR_FILTER_ATTRIBUTE_END_DATE,            PrimitiveType_Time},
47     {CALENDAR_FILTER_ATTRIBUTE_COMPLETED_DATE,      PrimitiveType_Time},
48     {CALENDAR_FILTER_ATTRIBUTE_PROGRESS,                PrimitiveType_Integer},
49     {CALENDAR_FILTER_ATTRIBUTE_AVAILABILITY,        PrimitiveType_String},
50     {CALENDAR_FILTER_ATTRIBUTE_RECURRENCE_RULE,        PrimitiveType_String},
51     {0, PrimitiveType_NoType}
52 };
53
54 FilterValidatorPtr CalendarFilterValidatorFactory::getCalendarFilterValidator()
55 {
56     static FilterValidatorPtr theInstance =
57                 FilterValidatorPtr(new FilterValidator(properties));
58     return theInstance;
59 }
60
61 } // Calendar
62 } // Platform
63 } // TizenApis