]> git.tdb.fi Git - libs/core.git/blobdiff - source/io/pipe.h
Separate event-related stuff from Base
[libs/core.git] / source / io / pipe.h
index 71edf7eb3246f125ceb09ccd90495381807c8b85..eb77e6ab830d0d50cfa5bbedc16a29b7bbfbe4d2 100644 (file)
@@ -1,23 +1,19 @@
 #ifndef MSP_IO_PIPE_H_
 #define MSP_IO_PIPE_H_
 
-#include "base.h"
+#include "eventobject.h"
+#include "handle.h"
 
 namespace Msp {
 namespace IO {
 
-class Pipe: public Base
+class Pipe: public EventObject
 {
 private:
+       struct Private;
+
        Handle handle[2];
-#ifdef WIN32
-       OVERLAPPED *overlapped;
-       Handle event;
-       unsigned buf_size;
-       char *buffer;
-       unsigned buf_avail;
-       char *buf_next;
-#endif
+       Private *priv;
 
 public:
        Pipe();
@@ -32,7 +28,7 @@ protected:
        virtual unsigned do_read(char *, unsigned);
 
 public:
-       virtual Handle get_event_handle();
+       virtual const Handle &get_event_handle();
 };
 
 } // namespace IO