OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_SOCKET_UNIX_EVENT_EMITTER_H_ | 5 #ifndef LIBRARIES_NACL_IO_SOCKET_UNIX_EVENT_EMITTER_H_ |
6 #define LIBRARIES_NACL_IO_SOCKET_UNIX_EVENT_EMITTER_H_ | 6 #define LIBRARIES_NACL_IO_SOCKET_UNIX_EVENT_EMITTER_H_ |
7 | 7 |
8 #include "nacl_io/fifo_interface.h" | 8 #include "nacl_io/fifo_interface.h" |
9 #include "nacl_io/stream/stream_event_emitter.h" | 9 #include "nacl_io/stream/stream_event_emitter.h" |
10 | 10 |
11 #include "sdk_util/macros.h" | 11 #include "sdk_util/macros.h" |
12 #include "sdk_util/scoped_ref.h" | 12 #include "sdk_util/scoped_ref.h" |
13 #include "sdk_util/simple_lock.h" | 13 #include "sdk_util/simple_lock.h" |
14 | 14 |
15 namespace nacl_io { | 15 namespace nacl_io { |
16 | 16 |
17 class UnixEventEmitter; | 17 class UnixEventEmitter; |
18 class Node; | |
19 | 18 |
20 typedef sdk_util::ScopedRef<UnixEventEmitter> ScopedUnixEventEmitter; | 19 typedef sdk_util::ScopedRef<UnixEventEmitter> ScopedUnixEventEmitter; |
21 | 20 |
22 class UnixEventEmitter : public StreamEventEmitter { | 21 class UnixEventEmitter : public StreamEventEmitter { |
23 public: | 22 public: |
24 uint32_t ReadIn_Locked(char* buffer, uint32_t len); | 23 uint32_t ReadIn_Locked(char* buffer, uint32_t len); |
25 uint32_t WriteOut_Locked(const char* buffer, uint32_t len); | 24 uint32_t WriteOut_Locked(const char* buffer, uint32_t len); |
26 | 25 |
27 uint32_t BytesInOutputFIFO(); | 26 uint32_t BytesInOutputFIFO(); |
28 uint32_t SpaceInInputFIFO(); | 27 uint32_t SpaceInInputFIFO(); |
(...skipping 12 matching lines...) Expand all Loading... |
41 virtual FIFOInterface* out_fifo() = 0; | 40 virtual FIFOInterface* out_fifo() = 0; |
42 void UpdateStatus_Locked(); | 41 void UpdateStatus_Locked(); |
43 | 42 |
44 private: | 43 private: |
45 DISALLOW_COPY_AND_ASSIGN(UnixEventEmitter); | 44 DISALLOW_COPY_AND_ASSIGN(UnixEventEmitter); |
46 }; | 45 }; |
47 | 46 |
48 } // namespace nacl_io | 47 } // namespace nacl_io |
49 | 48 |
50 #endif // LIBRARIES_NACL_IO_SOCKET_UNIX_EVENT_EMITTER_H_ | 49 #endif // LIBRARIES_NACL_IO_SOCKET_UNIX_EVENT_EMITTER_H_ |
OLD | NEW |