X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2Fplatform%2Fsockets%2Fserialport.h;h=c6cb5953a1a9d7a45d2d5b28d17a57250e2b42ee;hb=0e51267bc52437d3ae878c5d3beb6ad1e8be4276;hp=bbe01363ce69266f484c4157df19cda7a0bb1734;hpb=1d9111bd750766146b0ab268a497e7707dfb5f5b;p=deb_libcec.git diff --git a/src/lib/platform/sockets/serialport.h b/src/lib/platform/sockets/serialport.h index bbe0136..c6cb595 100644 --- a/src/lib/platform/sockets/serialport.h +++ b/src/lib/platform/sockets/serialport.h @@ -60,23 +60,23 @@ namespace PLATFORM CStdString GetName(void) const { CStdString strName; - strName = m_name; + strName = m_strName; return strName; } - #ifdef __WINDOWS__ + #ifdef __WINDOWS__ virtual bool IsOpen(void); virtual void Close(void); virtual int64_t Write(uint8_t* data, uint32_t len); virtual int32_t Read(uint8_t* data, uint32_t len, uint64_t iTimeoutMs = 0); + #endif - private: - void FormatWindowsError(int iErrorCode, CStdString &strMessage); + private: bool SetBaudRate(uint32_t baudrate); - std::string m_name; - bool m_tostdout; - + private: + #ifdef __WINDOWS__ + void FormatWindowsError(int iErrorCode, CStdString &strMessage); bool SetTimeouts(bool bBlocking); HANDLE m_handle; @@ -91,5 +91,7 @@ namespace PLATFORM #else struct termios m_options; #endif + std::string m_strName; + bool m_bToStdOut; }; };