Initialize Tizen 2.3
[framework/web/wrt-plugins-common.git] / src_mobile / modules / API / Filesystem / EventListNodes.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 #ifndef WRTDEVICEAPIS_FILESYSTEM_EVENTLISTNODES_H_
17 #define WRTDEVICEAPIS_FILESYSTEM_EVENTLISTNODES_H_
18
19 #include <dpl/shared_ptr.h>
20 #include <Commons/IEvent.h>
21 #include "INodeTypes.h"
22 #include "NodeFilter.h"
23
24 namespace WrtDeviceApis {
25 namespace Filesystem {
26 namespace Api {
27 class EventListNodes : public Commons::IEvent<EventListNodes>
28 {
29   public:
30     /**
31      * Creates new event object.
32      * @param path Node to list children for.
33      * @return New object.
34      */
35     explicit EventListNodes(const INodePtr& node);
36
37     /**
38      * Gets parent node.
39      * @return Parent node.
40      */
41     INodePtr getNode() const;
42
43     /**
44      * Gets filter.
45      * @return Filter.
46      */
47     NodeFilterPtr getFilter() const;
48
49     /**
50      * Sets filter.
51      * @param filter Filter to list only specific nodes.
52      */
53     void setFilter(const NodeFilterPtr& filter);
54
55     /**
56      * Gets nodes.
57      * @return Nodes list.
58      */
59     NodeList getResult() const;
60
61     /**
62      * Sets nodes list.
63      * @param list Nodes list.
64      */
65     void setResult(const NodeList& list);
66
67   private:
68     NodeList m_list;      ///< List of child nodes.
69     INodePtr m_node;      ///< Node to list children for.
70     NodeFilterPtr m_filter; ///< Filter.
71 };
72
73 typedef DPL::SharedPtr<EventListNodes> EventListNodesPtr;
74 } // API
75 } // Filesystem
76 } // WrtDeviceApis
77
78 #endif // WRTDEVICEAPIS_FILESYSTEM_EVENTLISTNODES_H_