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