Beta merge 2
[profile/ivi/wrt-plugins-tizen.git] / src / platform / API / Filter / FilterFactory.h
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        FilterFactory.h
19  * @author      Kisub Song (kisubs.song@samsung.com)
20  * @version     0.1
21  * @brief
22  */
23
24 #ifndef _API_FILTER_FACTORY_H_
25 #define _API_FILTER_FACTORY_H_
26
27 #include <string>
28 #include "CompositeFilter.h"
29 #include "AttributeFilter.h"
30 #include "AttributeRangeFilter.h"
31 #include "SortMode.h"
32 #include "AnyType.h"
33
34 namespace TizenApis {
35 namespace Api {
36 namespace Tizen {
37
38 class FilterFactory : private DPL::Noncopyable
39 {
40 private:
41         FilterFactory()
42         {
43         }
44
45 public:
46         static FilterFactory& getInstance();
47
48         CompositeFilterPtr createCompositeFilterObject(const FilterType& type,
49                         const FilterArrayPtr& filters);
50
51         AttributeFilterPtr createAttributeFilterObject(const std::string& attributeName,
52                         const MatchFlag& matchFlag,
53                         const AnyArrayPtr& matchValues);
54
55         AttributeRangeFilterPtr createAttributeRangeFilterObject(const std::string& attributeName,
56                         const AnyPtr& initialValue,
57                         const AnyPtr& endValue);
58
59         SortModePtr     createSortModeObject(const std::string& attributeName,
60                         const SortOrder& type = ASCENDING_SORT_ORDER);
61 };
62
63 } // Tizen
64 } // Api
65 } // TizenApis
66
67 #endif // _API_FILTER_FACTORY_H_