Beta merge 2
[profile/ivi/wrt-plugins-tizen.git] / src / platform / API / Messaging / StorageChangesMessageFilterValidatorFactory.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  * StorageChangesMessageFilterValidatorFactory.cpp
18  *
19  *  Created on: 2011. 10. 27.
20  *      Author: sangtai
21  */
22
23 #include "StorageChangesMessageFilterValidatorFactory.h"
24
25 using namespace TizenApis::Api::Tizen;
26
27 namespace TizenApis {
28         namespace Platform {
29                 namespace Messaging {
30
31                 const std::string StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_TYPE             = "type";
32                 const std::string StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_FOLDER           = "folder";
33                 const std::string StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_TIMESTAMP        = "timestamp";
34                 const std::string StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_FROM             = "from";
35                 const std::string StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_TO               = "to";
36                 const std::string StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_CC               = "cc";
37                 const std::string StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_BCC              = "bcc";
38                 const std::string StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_BODY             = "body";
39                 const std::string StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_IS_READ          = "isRead";
40                 const std::string StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_PRIORITY         = "priority";
41                 const std::string StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_SUBJECT          = "subject";
42
43
44                 static PropertyStructArray properties =
45                 {
46                                 {"type",             Api::Tizen::PrimitiveType_String},
47                                 {"folder",           Api::Tizen::PrimitiveType_String},
48                                 {StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_TIMESTAMP.c_str(), Api::Tizen::PrimitiveType_Time},
49                                 {"from",             Api::Tizen::PrimitiveType_String},
50                                 {"to",               Api::Tizen::PrimitiveType_String},
51                                 {"cc",               Api::Tizen::PrimitiveType_String},
52                                 {"bcc",              Api::Tizen::PrimitiveType_String},
53                                 {"body",             Api::Tizen::PrimitiveType_String},
54                                 {"isRead",           Api::Tizen::PrimitiveType_Number},
55                                 {StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_PRIORITY.c_str(),  Api::Tizen::PrimitiveType_Number},
56                                 {"subject",          Api::Tizen::PrimitiveType_String},
57                                 {0,                  Api::Tizen::PrimitiveType_NoType}
58                 };
59
60                 StorageChangesMessageFilterValidatorPtr StorageChangesMessageFilterValidatorFactory::getStorageChangesMessageFilterValidator()
61                 {
62                     static StorageChangesMessageFilterValidatorPtr theInstance =
63                                 StorageChangesMessageFilterValidatorPtr(new StorageChangesMessageFilterValidator(properties));
64
65                     return theInstance;
66                 }
67
68                 }
69         }       //naspace Platform
70 } //naspace WrtPlugins