803efb0836c377b60adadba0dd703b27f034c9ae
[profile/ivi/wrt-plugins-tizen.git] / src / platform / API / Messaging / StorageChangesFolderFilterValidatorFactory.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  * StorageChangesFolderFilterValidatorFactory.cpp
18  *
19  *  Created on: 2011. 10. 27.
20  *      Author: sangtai
21  */
22
23 #include "StorageChangesFolderFilterValidatorFactory.h"
24
25 using namespace TizenApis::Api::Tizen;
26
27 namespace TizenApis {
28         namespace Platform {
29                 namespace Messaging {
30
31                 const std::string StorageChangesFolderFilterValidatorFactory::ATTRIBUTE_ID              = "id";
32                 const std::string StorageChangesFolderFilterValidatorFactory::ATTRIBUTE_PARENT_ID       = "parentId";
33                 const std::string StorageChangesFolderFilterValidatorFactory::ATTRIBUTE_ACCOUNT_ID      = "serviceId";
34                 const std::string StorageChangesFolderFilterValidatorFactory::ATTRIBUTE_CONTENT_TYPE    = "contentType";
35                 const std::string StorageChangesFolderFilterValidatorFactory::ATTRIBUTE_NAME            = "name";
36                 const std::string StorageChangesFolderFilterValidatorFactory::ATTRIBUTE_PATH            = "path";
37                 const std::string StorageChangesFolderFilterValidatorFactory::ATTRIBUTE_TYPE            = "type";
38                 const std::string StorageChangesFolderFilterValidatorFactory::ATTRIBUTE_SYNCHRONIZABLE  = "synchronizable";
39
40                 static PropertyStructArray properties =
41                 {
42                                 {"id",             Api::Tizen::PrimitiveType_String},
43                                 {"parentId",       Api::Tizen::PrimitiveType_String},
44                                 {"serviceId",      Api::Tizen::PrimitiveType_String},
45                                 {"contentType",    Api::Tizen::PrimitiveType_String},
46                                 {"name",                   Api::Tizen::PrimitiveType_String},
47                                 {"path",           Api::Tizen::PrimitiveType_String},
48                                 {"type",           Api::Tizen::PrimitiveType_String},
49                                 {"synchronizable", Api::Tizen::PrimitiveType_Number},
50                                 {0,                  Api::Tizen::PrimitiveType_Notype}
51                 };
52
53                 static MatchFlagStrArray matchFlag{
54                         "EXACTLY",
55                         "CONTAINS",
56                         "STARTSWITH",
57                         "ENDSWITH",
58                         0
59                 };
60
61                 StorageChangesFolderFilterValidatorPtr StorageChangesFolderFilterValidatorFactory::getStorageChangesFolderFilterValidator()
62                 {
63                     static StorageChangesFolderFilterValidatorPtr theInstance =
64                                 StorageChangesFolderFilterValidatorPtr(new StorageChangesFolderFilterValidator(properties, matchFlag, Api::Tizen::PrimitiveType_Int));
65
66                     return theInstance;
67                 }
68
69                 }
70         }       //naspace Platform
71 } //naspace WrtPlugins