OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef LIBRARIES_NACL_IO_PIPE_PIPE_NODE_H_ | 5 #ifndef LIBRARIES_NACL_IO_PIPE_PIPE_NODE_H_ |
6 #define LIBRARIES_NACL_IO_PIPE_PIPE_NODE_H_ | 6 #define LIBRARIES_NACL_IO_PIPE_PIPE_NODE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "nacl_io/pipe/pipe_event_emitter.h" | 11 #include "nacl_io/pipe/pipe_event_emitter.h" |
12 #include "nacl_io/stream/stream_node.h" | 12 #include "nacl_io/stream/stream_node.h" |
13 | 13 |
14 namespace nacl_io { | 14 namespace nacl_io { |
15 | 15 |
16 class PipeNode : public StreamNode { | 16 class PipeNode : public StreamNode { |
17 public: | 17 public: |
18 explicit PipeNode(Filesystem* fs); | 18 explicit PipeNode(Filesystem* fs); |
19 | 19 |
20 virtual EventEmitter* GetEventEmitter(); | 20 virtual PipeEventEmitter* GetEventEmitter(); |
21 virtual Error Read(const HandleAttr& attr, | 21 virtual Error Read(const HandleAttr& attr, |
22 void* buf, | 22 void* buf, |
23 size_t count, | 23 size_t count, |
24 int* out_bytes); | 24 int* out_bytes); |
25 virtual Error Write(const HandleAttr& attr, | 25 virtual Error Write(const HandleAttr& attr, |
26 const void* buf, | 26 const void* buf, |
27 size_t count, | 27 size_t count, |
28 int* out_bytes); | 28 int* out_bytes); |
29 | 29 |
30 protected: | 30 protected: |
31 ScopedPipeEventEmitter pipe_; | 31 ScopedPipeEventEmitter pipe_; |
32 | 32 |
33 friend class KernelProxy; | 33 friend class KernelProxy; |
34 friend class StreamFs; | 34 friend class StreamFs; |
35 }; | 35 }; |
36 | 36 |
37 } // namespace nacl_io | 37 } // namespace nacl_io |
38 | 38 |
39 #endif // LIBRARIES_NACL_IO_PIPE_PIPE_NODE_H_ | 39 #endif // LIBRARIES_NACL_IO_PIPE_PIPE_NODE_H_ |
OLD | NEW |