| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 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. |
| 4 |
| 5 #ifndef LIBRARIES_NACL_IO_MOUNT_NODE_STREAM_H_ |
| 6 #define LIBRARIES_NACL_IO_MOUNT_NODE_STREAM_H_ |
| 7 |
| 8 #include <map> |
| 9 #include <string> |
| 10 |
| 11 #include "nacl_io/event_emitter_pipe.h" |
| 12 #include "nacl_io/mount_node.h" |
| 13 |
| 14 namespace nacl_io { |
| 15 |
| 16 class MountNodeStream : public MountNode { |
| 17 public: |
| 18 explicit MountNodeStream(Mount* mnt); |
| 19 |
| 20 virtual Error Init(int perm); |
| 21 |
| 22 virtual EventEmitter* GetEventEmitter() = 0; |
| 23 virtual Error Read(size_t offs, void *buf, size_t count, int* out_bytes) = 0; |
| 24 virtual Error Write(size_t offs, const void *buf, |
| 25 size_t count, int* out_bytes) = 0; |
| 26 |
| 27 protected: |
| 28 Error WaitOnEvent(uint32_t events, int ms); |
| 29 |
| 30 int read_timeout_; |
| 31 int write_timeout_; |
| 32 |
| 33 friend class KernelProxy; |
| 34 friend class MountStream; |
| 35 }; |
| 36 |
| 37 |
| 38 } // namespace nacl_io |
| 39 |
| 40 #endif // LIBRARIES_NACL_IO_MOUNT_NODE_STREAM_H_ |
| OLD | NEW |