X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fio%2Fpipe.h;h=3f964f4536facbb16413d5c05efc373cf4216722;hp=eb77e6ab830d0d50cfa5bbedc16a29b7bbfbe4d2;hb=9a4c531eb1aa68595cd3ab074b31bfa565aaefe2;hpb=c21ab7e49852585df01b4cc19599e25a918b581b diff --git a/source/io/pipe.h b/source/io/pipe.h index eb77e6a..3f964f4 100644 --- a/source/io/pipe.h +++ b/source/io/pipe.h @@ -2,6 +2,7 @@ #define MSP_IO_PIPE_H_ #include "eventobject.h" +#include "eventreader.h" #include "handle.h" namespace Msp { @@ -10,17 +11,18 @@ 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_mode(Mode); void set_block(bool); protected: @@ -28,7 +30,8 @@ protected: 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