]> git.tdb.fi Git - libs/core.git/blobdiff - source/io/pipe.h
Allow setting a pipe read-only or write-only after creation
[libs/core.git] / source / io / pipe.h
index 73731776856a2fc1c9d90530935fc4009ffaf2cc..3f964f4536facbb16413d5c05efc373cf4216722 100644 (file)
@@ -11,13 +11,18 @@ namespace IO {
 class Pipe: public EventObject
 {
 private:
-       Handle handle[2];
+       Handle read_handle;
+       Handle write_handle;
        EventReader reader;
 
 public:
        Pipe();
+private:
+       void platform_init();
+public:
        ~Pipe();
 
+       void set_mode(Mode);
        void set_block(bool);
 
 protected:
@@ -25,6 +30,7 @@ protected:
        virtual unsigned do_read(char *, unsigned);
 
 public:
+       virtual const Handle &get_handle(Mode);
        virtual const Handle &get_event_handle() { return reader.get_event(); }
 };