Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / native_client_sdk / src / libraries / nacl_io / pipe / pipe_node.h
blob1782011310525cfda54d614b936db69f8a92987a
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
3 // found in the LICENSE file.
5 #ifndef LIBRARIES_NACL_IO_PIPE_PIPE_NODE_H_
6 #define LIBRARIES_NACL_IO_PIPE_PIPE_NODE_H_
8 #include <map>
9 #include <string>
11 #include "nacl_io/pipe/pipe_event_emitter.h"
12 #include "nacl_io/stream/stream_node.h"
14 namespace nacl_io {
16 class PipeNode : public StreamNode {
17 public:
18 explicit PipeNode(Filesystem* fs);
20 virtual PipeEventEmitter* GetEventEmitter();
21 virtual Error Read(const HandleAttr& attr,
22 void* buf,
23 size_t count,
24 int* out_bytes);
25 virtual Error Write(const HandleAttr& attr,
26 const void* buf,
27 size_t count,
28 int* out_bytes);
30 protected:
31 ScopedPipeEventEmitter pipe_;
33 friend class KernelProxy;
34 friend class StreamFs;
37 } // namespace nacl_io
39 #endif // LIBRARIES_NACL_IO_PIPE_PIPE_NODE_H_