summaryrefslogtreecommitdiff
path: root/include/lldb/Host/Pipe.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/lldb/Host/Pipe.h')
-rw-r--r--include/lldb/Host/Pipe.h86
1 files changed, 15 insertions, 71 deletions
diff --git a/include/lldb/Host/Pipe.h b/include/lldb/Host/Pipe.h
index b36c85cfbe87..a5502efa78ed 100644
--- a/include/lldb/Host/Pipe.h
+++ b/include/lldb/Host/Pipe.h
@@ -7,77 +7,21 @@
//
//===----------------------------------------------------------------------===//
-#ifndef liblldb_Pipe_h_
-#define liblldb_Pipe_h_
-#if defined(__cplusplus)
+#ifndef liblldb_Host_Pipe_h_
+#define liblldb_Host_Pipe_h_
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-
-#include "lldb/lldb-private.h"
-
-namespace lldb_private {
-
-//----------------------------------------------------------------------
-/// @class Pipe Pipe.h "lldb/Host/Pipe.h"
-/// @brief A class that abtracts unix style pipes.
-///
-/// A class that abstracts the LLDB core from host pipe functionality.
-//----------------------------------------------------------------------
-class Pipe
+#if defined(_WIN32)
+#include "lldb/Host/windows/PipeWindows.h"
+namespace lldb_private
{
-public:
- static int kInvalidDescriptor;
-
- Pipe();
-
- ~Pipe();
-
- bool
- Open();
-
- bool
- IsValid() const;
-
- bool
- ReadDescriptorIsValid() const;
-
- bool
- WriteDescriptorIsValid() const;
-
- int
- GetReadFileDescriptor() const;
-
- int
- GetWriteFileDescriptor() const;
-
- // Close both descriptors
- void
- Close();
-
- bool
- CloseReadFileDescriptor();
-
- bool
- CloseWriteFileDescriptor();
-
- int
- ReleaseReadFileDescriptor();
-
- int
- ReleaseWriteFileDescriptor();
-
- size_t
- Read (void *buf, size_t size);
-
- size_t
- Write (const void *buf, size_t size);
-private:
- int m_fds[2];
-};
-
-} // namespace lldb_private
+typedef PipeWindows Pipe;
+}
+#else
+#include "lldb/Host/posix/PipePosix.h"
+namespace lldb_private
+{
+typedef PipePosix Pipe;
+}
+#endif
-#endif // #if defined(__cplusplus)
-#endif // liblldb_Pipe_h_
+#endif // liblldb_Host_Pipe_h_