Chromium Code Reviews| 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_EVENT_EMITTER_TTY_H_ | |
| 6 #define LIBRARIES_NACL_IO_EVENT_EMITTER_TTY_H_ | |
| 7 | |
| 8 #include <poll.h> | |
| 9 #include <stdint.h> | |
| 10 #include <stdlib.h> | |
| 11 | |
| 12 #include "nacl_io/event_emitter_stream.h" | |
| 13 #include "nacl_io/fifo_char.h" | |
| 14 #include "nacl_io/fifo_null.h" | |
| 15 | |
| 16 #include "sdk_util/auto_lock.h" | |
| 17 #include "sdk_util/macros.h" | |
| 18 | |
| 19 namespace nacl_io { | |
| 20 | |
| 21 class EventEmitterTTY; | |
| 22 typedef sdk_util::ScopedRef<EventEmitterTTY> ScopedEventEmitterTTY; | |
| 23 | |
| 24 class EventEmitterTTY : public EventEmitterStream { | |
| 25 public: | |
| 26 EventEmitterTTY(size_t size); | |
|
binji
2013/09/15 22:18:58
explicit
noelallen1
2013/09/17 21:21:54
Done.
| |
| 27 | |
| 28 size_t Read_Locked(char* data, size_t len); | |
| 29 size_t Write_Locked(const char* data, size_t len); | |
| 30 | |
| 31 virtual FIFOInterface* rx_fifo() { return &fifo_; } | |
| 32 virtual FIFOInterface* tx_fifo() { return &null_; } | |
| 33 | |
| 34 private: | |
| 35 FIFOChar fifo_; | |
| 36 FIFONull null_; | |
| 37 DISALLOW_COPY_AND_ASSIGN(EventEmitterPipe); | |
|
binji
2013/09/15 22:18:58
EventEmitterTTY
noelallen1
2013/09/17 21:21:54
Done.
| |
| 38 }; | |
| 39 | |
| 40 } // namespace nacl_io | |
| 41 | |
| 42 #endif // LIBRARIES_NACL_IO_EVENT_EMITTER_PIPE_H_ | |
| 43 | |
| OLD | NEW |