1321369Sdim//===-- StreamAsynchronousIO.h -----------------------------------*- C++-*-===//
2254721Semaste//
3353358Sdim// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4353358Sdim// See https://llvm.org/LICENSE.txt for license information.
5353358Sdim// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6254721Semaste//
7254721Semaste//===----------------------------------------------------------------------===//
8254721Semaste
9254721Semaste#ifndef liblldb_StreamAsynchronousIO_h_
10254721Semaste#define liblldb_StreamAsynchronousIO_h_
11254721Semaste
12321369Sdim#include "lldb/Utility/Stream.h"
13321369Sdim
14254721Semaste#include <string>
15254721Semaste
16344779Sdim#include <stddef.h>
17254721Semaste
18254721Semastenamespace lldb_private {
19321369Sdimclass Debugger;
20254721Semaste
21314564Sdimclass StreamAsynchronousIO : public Stream {
22254721Semastepublic:
23314564Sdim  StreamAsynchronousIO(Debugger &debugger, bool for_stdout);
24314564Sdim
25314564Sdim  ~StreamAsynchronousIO() override;
26314564Sdim
27314564Sdim  void Flush() override;
28314564Sdim
29344779Sdimprotected:
30344779Sdim  size_t WriteImpl(const void *src, size_t src_len) override;
31314564Sdim
32254721Semasteprivate:
33314564Sdim  Debugger &m_debugger;
34314564Sdim  std::string m_data;
35314564Sdim  bool m_for_stdout;
36254721Semaste};
37254721Semaste
38254721Semaste} // namespace lldb_private
39296417Sdim
40296417Sdim#endif // liblldb_StreamAsynchronousIO_h
41