]> git.tdb.fi Git - libs/core.git/blobdiff - source/io/pipe.h
Remove deprecated things
[libs/core.git] / source / io / pipe.h
index eb77e6ab830d0d50cfa5bbedc16a29b7bbfbe4d2..098e1190a63ecd1882e453c49fc727006b7c861e 100644 (file)
@@ -2,6 +2,7 @@
 #define MSP_IO_PIPE_H_
 
 #include "eventobject.h"
+#include "eventreader.h"
 #include "handle.h"
 
 namespace Msp {
@@ -10,25 +11,28 @@ namespace IO {
 class Pipe: public EventObject
 {
 private:
-       struct Private;
-
-       Handle handle[2];
-       Private *priv;
+       Handle read_handle;
+       Handle write_handle;
+       EventReader reader;
 
 public:
        Pipe();
+private:
+       void platform_init();
+public:
        ~Pipe();
 
-       void close();
-
-       void set_block(bool);
+       void set_mode(Mode);
+       virtual void set_block(bool);
+       virtual void set_inherit(bool);
 
 protected:
        virtual unsigned do_write(const char *, unsigned);
        virtual unsigned do_read(char *, unsigned);
 
 public:
-       virtual const Handle &get_event_handle();
+       virtual const Handle &get_handle(Mode);
+       virtual const Handle &get_event_handle() { return reader.get_event(); }
 };
 
 } // namespace IO