tizen beta release
[framework/web/wrt-plugins-common.git] / src / modules / API / Filesystem / NodeFilter.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  * @author          Zbigniew Kostrzewa (z.kostrzewa@samsung.com)
18  */
19
20 #include "NodeFilter.h"
21
22 namespace WrtDeviceApis {
23 namespace Filesystem {
24 namespace Api {
25
26 OptionalString NodeFilter::getName() const
27 {
28     return m_name;
29 }
30
31 void NodeFilter::setName(const OptionalString& name)
32 {
33     m_name = name;
34 }
35
36 OptionalDate NodeFilter::getMinCreated() const
37 {
38     return m_created.min;
39 }
40
41 void NodeFilter::setMinCreated(const OptionalDate& date)
42 {
43     m_created.min = date;
44 }
45
46 OptionalDate NodeFilter::getMaxCreated() const
47 {
48     return m_created.max;
49 }
50
51 void NodeFilter::setMaxCreated(const OptionalDate& date)
52 {
53     m_created.max = date;
54 }
55
56 void NodeFilter::setCreated(const OptionalDate& date)
57 {
58     m_created.min = m_created.max = date;
59 }
60
61 OptionalDate NodeFilter::getMinModified() const
62 {
63     return m_modified.min;
64 }
65
66 void NodeFilter::setMinModified(const OptionalDate& date)
67 {
68     m_modified.min = date;
69 }
70
71 OptionalDate NodeFilter::getMaxModified() const
72 {
73     return m_modified.max;
74 }
75
76 void NodeFilter::setMaxModified(const OptionalDate& date)
77 {
78     m_modified.max = date;
79 }
80
81 void NodeFilter::setModified(const OptionalDate& date)
82 {
83     m_modified.min = m_modified.max = date;
84 }
85
86 OptionalSize NodeFilter::getMinSize() const
87 {
88     return m_size.min;
89 }
90
91 void NodeFilter::setMinSize(const OptionalSize& size)
92 {
93     m_size.min = size;
94 }
95
96 OptionalSize NodeFilter::getMaxSize() const
97 {
98     return m_size.max;
99 }
100
101 void NodeFilter::setMaxSize(const OptionalSize& size)
102 {
103     m_size.max = size;
104 }
105
106 void NodeFilter::setSize(const OptionalSize& size)
107 {
108     m_size.min = m_size.max = size;
109 }
110
111 } // API
112 } // Filesystem
113 } // WrtDeviceApis