Update change log and spec for wrt-plugins-tizen_0.4.38
[framework/web/wrt-plugins-tizen.git] / src / Messaging / StorageChangesMessageFilterValidatorFactory.cpp
1 //
2 // Tizen Web Device API
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18 #include "StorageChangesMessageFilterValidatorFactory.h"
19
20 using namespace DeviceAPI::Tizen;
21
22 namespace DeviceAPI {
23         namespace Messaging {
24
25                 const std::string StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_ID                       = "id";
26                 const std::string StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_SERVICE_ID       = "serviceId";
27                 const std::string StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_CONVERSATION_ID  = "conversationId";           
28                 const std::string StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_FOLDER_ID        = "folderId";
29                 const std::string StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_TYPE             = "type";
30                 const std::string StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_TIMESTAMP        = "timestamp";
31                 const std::string StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_FROM             = "from";
32                 const std::string StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_TO               = "to";
33                 const std::string StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_CC               = "cc";
34                 const std::string StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_BCC              = "bcc";
35                 const std::string StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_BODY             = "body.plainBody";
36                 const std::string StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_IS_READ          = "isRead";
37                 const std::string StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_HAS_ATTACHMENT   = "hasAttachment";            
38                 const std::string StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_PRIORITY         = "isHighPriority";
39                 const std::string StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_SUBJECT          = "subject";
40                 const std::string StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_IS_RESPONSE_TO   = "isResponseTo";
41                 const std::string StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_MESSAGE_STATUS   = "messageStatus";
42
43
44                 static PropertyStructArray properties =
45                 {
46                                 {StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_ID.c_str(),                    DeviceAPI::Tizen::PrimitiveType_String},
47                                 {StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_SERVICE_ID.c_str(),            DeviceAPI::Tizen::PrimitiveType_String},
48                                 {StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_CONVERSATION_ID.c_str(),       DeviceAPI::Tizen::PrimitiveType_String},
49                                 {StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_FOLDER_ID.c_str(),             DeviceAPI::Tizen::PrimitiveType_String},
50                                 {StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_TYPE.c_str(),                  DeviceAPI::Tizen::PrimitiveType_String},
51                                 {StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_TIMESTAMP.c_str(), DeviceAPI::Tizen::PrimitiveType_Time},
52                                 {StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_FROM.c_str(),                  DeviceAPI::Tizen::PrimitiveType_String},
53                                 {StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_TO.c_str(),                    DeviceAPI::Tizen::PrimitiveType_String},
54                                 {StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_CC.c_str(),                    DeviceAPI::Tizen::PrimitiveType_String},
55                                 {StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_BCC.c_str(),                   DeviceAPI::Tizen::PrimitiveType_String},
56                                 {StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_BODY.c_str(),                  DeviceAPI::Tizen::PrimitiveType_String},
57                                 {StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_IS_READ.c_str(),               DeviceAPI::Tizen::PrimitiveType_Boolean},
58                                 {StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_HAS_ATTACHMENT.c_str(),        DeviceAPI::Tizen::PrimitiveType_Boolean},
59                                 {StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_PRIORITY.c_str(),  DeviceAPI::Tizen::PrimitiveType_Boolean},
60                                 {StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_SUBJECT.c_str(),               DeviceAPI::Tizen::PrimitiveType_String},
61                                 {StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_IS_RESPONSE_TO.c_str(),        DeviceAPI::Tizen::PrimitiveType_String},
62                                 {StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_MESSAGE_STATUS.c_str(),        DeviceAPI::Tizen::PrimitiveType_String},
63                                 {0,                  DeviceAPI::Tizen::PrimitiveType_NoType}
64                 };
65
66                 StorageChangesMessageFilterValidatorPtr StorageChangesMessageFilterValidatorFactory::getStorageChangesMessageFilterValidator()
67                 {
68                     static StorageChangesMessageFilterValidatorPtr theInstance =
69                                 StorageChangesMessageFilterValidatorPtr(new StorageChangesMessageFilterValidator(properties));
70
71                     return theInstance;
72                 }
73
74         }
75 }