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.
5 #ifndef LIBRARIES_NACL_IO_EVENT_EMITTER_STREAM_H_
6 #define LIBRARIES_NACL_IO_EVENT_EMITTER_STREAM_H_
8 #include "nacl_io/event_emitter.h"
10 #include "sdk_util/macros.h"
11 #include "sdk_util/scoped_ref.h"
15 class EventEmitterStream;
17 class MountNodeStream;
19 typedef sdk_util::ScopedRef<EventEmitterStream> ScopedEventEmitterStream;
21 class EventEmitterStream : public EventEmitter {
25 void AttachStream(MountNodeStream* stream);
28 MountNodeStream* stream() { return stream_; }
30 uint32_t BytesInOutputFIFO();
31 uint32_t SpaceInInputFIFO();
34 virtual FIFOInterface* in_fifo() = 0;
35 virtual FIFOInterface* out_fifo() = 0;
36 void UpdateStatus_Locked();
39 MountNodeStream* stream_;
40 DISALLOW_COPY_AND_ASSIGN(EventEmitterStream);
43 } // namespace nacl_io
45 #endif // LIBRARIES_NACL_IO_EVENT_EMITTER_STREAM_H_