tizen 2.3.1 release
[framework/web/wearable/wrt-plugins-tizen.git] / src / Filesystem / EventOpen.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        EventOpen.cpp
20  */
21
22 #include "EventOpen.h"
23 #include "Stream.h"
24 #include "Node.h"
25
26
27
28 namespace DeviceAPI {
29 namespace Filesystem {
30 EventOpen::EventOpen(JSContextRef aGlobalCtx) :
31     Utils::FilesystemEvent(aGlobalCtx),
32     m_mode(0)
33 {
34 }
35
36 StreamPtr EventOpen::getResult() const
37 {
38     return m_stream;
39 }
40
41 void EventOpen::setResult(const StreamPtr& stream)
42 {
43     m_stream = stream;
44 }
45
46
47 void EventOpen::setCharSet(const std::string &charSet)
48 {
49     m_charSet = charSet;
50 }
51
52 std::string EventOpen::getCharSet() const
53 {
54     return m_charSet;
55 }
56
57 void EventOpen::setMode(int aMode)
58 {
59     m_mode = aMode;
60 }
61
62 int EventOpen::getMode() const
63 {
64     return m_mode;
65 }
66
67 void EventOpen::setNode(NodePtr aNode)
68 {
69     m_node = aNode;
70 }
71 NodePtr EventOpen::getNode()
72 {
73     return m_node;
74 }
75
76 } // Filesystem
77 } // TizenApis