tizen 2.3.1 release
[framework/web/mobile/wrt-plugins-tizen.git] / src / Filesystem / EventCopy.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  * @file        EventCopy.h
20  */
21
22 #ifndef TIZENAPIS_FILESYSTEM_EVENTCOPY_H_
23 #define TIZENAPIS_FILESYSTEM_EVENTCOPY_H_
24
25 #include <memory>
26 #include <Commons/IEvent.h>
27 #include "Path.h"
28 #include "Node.h"
29
30 namespace DeviceAPI {
31 namespace Filesystem {
32
33 class EventCopy : public  DeviceAPI::Filesystem::Utils::FilesystemEvent
34 {
35   public:
36     EventCopy(JSContextRef aGlobalCtx);
37     PathPtr getDestination();
38     void setDestination(PathPtr aDestination);
39     PathPtr getSource();
40     void setSource(PathPtr aSource);
41     NodePtr getResult();
42     void setResult(NodePtr node);
43     int getOptions() const;
44     void setOptions(int options);
45     //! Sets real destination path which represents file in filesystem.
46     //! @param aRealDestination contains path to file.
47     void setRealDestination(const std::string& aRealDestination);
48     //! Sets real source path, which represents file in filesystem.
49     //! @param aRealSource contains path to file.
50     void setRealSource(const std::string& aRealSource);
51     //! Gets real destination path which represents file in filesystem.
52     //! @return contains path to file.
53     std::string getRealDestination();
54     //! Gets real source path, which represents file in filesystem.
55     //! @return contains path to file.
56     std::string getRealSource();
57
58   private:
59     PathPtr m_src;   ///< Source path.
60     PathPtr m_dest;  ///< Destination path.
61     NodePtr m_result; ///< Result node.
62     //! Options for copy actiona @see WrtPlugins::Api::Filesystem::Options.
63     int m_options;
64     std::string m_realSource; ///< Real source path
65     std::string m_realDestination; ///< Real destination path
66 };
67
68 typedef std::shared_ptr<EventCopy> EventCopyPtr;
69 } // Filesystem
70 } // TizenApis
71
72 #endif // TIZENAPIS_FILESYSTEM_EVENTCOPY_H_