X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fio%2Fserial.h;h=dbc7a77bd0578159d12a8ae3b0d202290a604162;hb=ffab0509a65f6f32851e64d66a5f7eeb453ab29f;hp=98b16674b464d098f7c051e72b5837c68d1fa797;hpb=c21ab7e49852585df01b4cc19599e25a918b581b;p=libs%2Fcore.git diff --git a/source/io/serial.h b/source/io/serial.h index 98b1667..dbc7a77 100644 --- a/source/io/serial.h +++ b/source/io/serial.h @@ -2,6 +2,7 @@ #define MSP_IO_SERIAL_H_ #include "eventobject.h" +#include "eventreader.h" #include "handle.h" namespace Msp { @@ -18,10 +19,16 @@ public: }; private: + struct DeviceState; + Handle handle; + EventReader reader; public: Serial(const std::string &); +private: + void platform_init(const std::string &); +public: virtual ~Serial(); private: @@ -29,6 +36,7 @@ private: public: virtual void set_block(bool); + virtual void set_inherit(bool); void set_baud_rate(unsigned); void set_data_bits(unsigned); @@ -41,7 +49,8 @@ private: 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