X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fio%2Fpipe.h;h=50da5e53e1d6b49a9c1d599a319ae6fb5502c83f;hb=7a493cb73ff5f5f820d4873d6c993d0e9c5a580a;hp=4e4e42b031796f3588dea1a88a3f4c607f84928f;hpb=378ec811c8df431f5b4e7094eb1949476d3a79fe;p=libs%2Fcore.git diff --git a/source/io/pipe.h b/source/io/pipe.h index 4e4e42b..50da5e5 100644 --- a/source/io/pipe.h +++ b/source/io/pipe.h @@ -1,25 +1,27 @@ #ifndef MSP_IO_PIPE_H_ #define MSP_IO_PIPE_H_ -#include "base.h" +#include "eventobject.h" +#include "eventreader.h" +#include "handle.h" namespace Msp { namespace IO { -class Pipe: public Base +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); protected: @@ -27,7 +29,8 @@ protected: virtual unsigned do_read(char *, unsigned); public: - virtual Handle get_event_handle(); + virtual const Handle &get_handle(Mode); + virtual const Handle &get_event_handle() { return reader.get_event(); } }; } // namespace IO