Update change log and spec for wrt-plugins-tizen_0.4.70
[framework/web/wrt-plugins-tizen.git] / src / Filesystem / EventResolve.h
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 #ifndef TIZENAPIS_FILESYSTEM_EVENTRESOLVE_H_
20 #define TIZENAPIS_FILESYSTEM_EVENTRESOLVE_H_
21
22 #include <dpl/shared_ptr.h>
23 #include <Commons/IEvent.h>
24 #include <Security.h>
25
26 #include "IPath.h"
27 #include "INode.h"
28
29 namespace DeviceAPI {
30 namespace Filesystem {
31 class EventResolve :
32         public WrtDeviceApis::Commons::IEvent<EventResolve>,
33         public DeviceAPI::Common::SecurityAccessor
34 {
35   public:
36     /**
37      * Creates new event object.
38      * @param path Path to the node to resolve.
39      * @return New object.
40      */
41     explicit EventResolve(const IPathPtr& path);
42
43     /**
44      * Gets path of the node to resolve.
45      * @return Path to resolve.
46      */
47     IPathPtr getPath() const;
48
49     /**
50      * Gets resolved node.
51      * NULL if none found. Check exception code.
52      * @return Resolved node or NULL.
53      */
54     INodePtr getResult() const;
55
56     /**
57      * Sets resolved node.
58      * @param node Resolved node.
59      */
60     void setResult(const INodePtr& node);
61
62     void setMode(const std::string &mode);
63     std::string getMode();
64
65   private:
66     IPathPtr m_path; ///< Path to the requested node.
67     INodePtr m_node; ///< Resolved node.
68     std::string m_mode;
69 };
70
71 typedef DPL::SharedPtr<EventResolve> EventResolvePtr;
72 } // Filesystem
73 } // TizenApis
74
75 #endif // WRTPLUGINS_FILESYSTEM_EVENTRESOLVE_H_