]> git.tdb.fi Git - libs/core.git/blobdiff - source/io/serial.h
Use #ifdef _WIN32 rather than WIN32
[libs/core.git] / source / io / serial.h
index 98b16674b464d098f7c051e72b5837c68d1fa797..1c91e600ea4503f7f7443769be4c5083c43bdc2e 100644 (file)
@@ -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:
@@ -41,7 +48,7 @@ private:
        virtual unsigned do_read(char *, unsigned);
 
 public:
-       virtual const Handle &get_event_handle();
+       virtual const Handle &get_event_handle() { return reader.get_event(); }
 };
 
 } // namespace IO