tizen beta release
[framework/web/wrt-plugins-common.git] / src / modules / API / Filesystem / NodeFilter.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  * @author          Zbigniew Kostrzewa (z.kostrzewa@samsung.com)
18  */
19
20 #ifndef WRTDEVICEAPIS_FILESYSTEM_NODEFILTER_H_
21 #define WRTDEVICEAPIS_FILESYSTEM_NODEFILTER_H_
22
23 #include <ctime>
24 #include <cstddef>
25 #include <string>
26 #include <dpl/optional.h>
27 #include <dpl/shared_ptr.h>
28 #include <Commons/Range.h>
29
30 namespace WrtDeviceApis {
31 namespace Filesystem {
32 namespace Api {
33
34 typedef DPL::Optional<std::string> OptionalString;
35 typedef DPL::Optional<std::time_t> OptionalDate;
36 typedef DPL::Optional<std::size_t> OptionalSize;
37
38 class NodeFilter
39 {
40   public:
41     OptionalString getName() const;
42     void setName(const OptionalString& name);
43
44     OptionalDate getMinCreated() const;
45     void setMinCreated(const OptionalDate& date);
46
47     OptionalDate getMaxCreated() const;
48     void setMaxCreated(const OptionalDate& date);
49
50     void setCreated(const OptionalDate& date);
51
52     OptionalDate getMinModified() const;
53     void setMinModified(const OptionalDate& date);
54
55     OptionalDate getMaxModified() const;
56     void setMaxModified(const OptionalDate& date);
57
58     void setModified(const OptionalDate& date);
59
60     OptionalSize getMinSize() const;
61     void setMinSize(const OptionalSize& size);
62
63     OptionalSize getMaxSize() const;
64     void setMaxSize(const OptionalSize& size);
65
66     void setSize(const OptionalSize& size);
67
68   private:
69     OptionalString m_name;
70     Commons::Range<OptionalDate> m_created;
71     Commons::Range<OptionalDate> m_modified;
72     Commons::Range<OptionalSize> m_size;
73 };
74
75 typedef DPL::SharedPtr<NodeFilter> NodeFilterPtr;
76
77 } // API
78 } // Filesystem
79 } // WrtDeviceApis
80
81 #endif // WRTDEVICEAPIS_FILESYSTEM_NODEFILTER_H_