1 //===-- Pipe.h --------------------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef liblldb_Pipe_h_
11 #define liblldb_Pipe_h_
12 #if defined(__cplusplus)
16 #include <sys/types.h>
18 #include "lldb/lldb-private.h"
20 namespace lldb_private {
22 //----------------------------------------------------------------------
23 /// @class Pipe Pipe.h "lldb/Host/Pipe.h"
24 /// @brief A class that abtracts unix style pipes.
26 /// A class that abstracts the LLDB core from host pipe functionality.
27 //----------------------------------------------------------------------
31 static int kInvalidDescriptor;
44 ReadDescriptorIsValid() const;
47 WriteDescriptorIsValid() const;
50 GetReadFileDescriptor() const;
53 GetWriteFileDescriptor() const;
55 // Close both descriptors
60 CloseReadFileDescriptor();
63 CloseWriteFileDescriptor();
66 ReleaseReadFileDescriptor();
69 ReleaseWriteFileDescriptor();
72 Read (void *buf, size_t size);
75 Write (const void *buf, size_t size);
80 } // namespace lldb_private
82 #endif // #if defined(__cplusplus)
83 #endif // liblldb_Pipe_h_