/*
* This file is part of the libCEC(R) library.
*
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited. All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited. All rights reserved.
* libCEC(R) is an original work, containing original code.
*
* libCEC(R) is a trademark of Pulse-Eight Limited.
* http://www.pulse-eight.net/
*/
-#include "../os.h"
-#include "../util/buffer.h"
+#include "lib/platform/os.h"
+#include "lib/platform/util/buffer.h"
#include <string>
#include <stdint.h>
class CSerialSocket : public CCommonSocket<serial_socket_t>
{
public:
- CSerialSocket(const CStdString &strName, uint32_t iBaudrate, SerialDataBits iDatabits = SERIAL_DATA_BITS_EIGHT, SerialStopBits iStopbits = SERIAL_STOP_BITS_ONE, SerialParity iParity = SERIAL_PARITY_NONE) :
+ CSerialSocket(const std::string &strName, uint32_t iBaudrate, SerialDataBits iDatabits = SERIAL_DATA_BITS_EIGHT, SerialStopBits iStopbits = SERIAL_STOP_BITS_ONE, SerialParity iParity = SERIAL_PARITY_NONE) :
CCommonSocket<serial_socket_t>(INVALID_SERIAL_SOCKET_VALUE, strName),
#ifdef __WINDOWS__
m_iCurrentReadTimeout(MAXDWORD),
- #else
- m_lockPid(0),
#endif
m_bIsOpen(false),
m_iBaudrate(iBaudrate),
protected:
#ifndef __WINDOWS__
struct termios m_options;
- pid_t m_lockPid;
#else
bool SetTimeouts(serial_socket_t socket, int* iError, DWORD iTimeoutMs);
DWORD m_iCurrentReadTimeout;
class CSerialPort : public CProtectedSocket<CSerialSocket>
{
public:
- CSerialPort(const CStdString &strName, uint32_t iBaudrate, SerialDataBits iDatabits = SERIAL_DATA_BITS_EIGHT, SerialStopBits iStopbits = SERIAL_STOP_BITS_ONE, SerialParity iParity = SERIAL_PARITY_NONE) :
+ CSerialPort(const std::string &strName, uint32_t iBaudrate, SerialDataBits iDatabits = SERIAL_DATA_BITS_EIGHT, SerialStopBits iStopbits = SERIAL_STOP_BITS_ONE, SerialParity iParity = SERIAL_PARITY_NONE) :
CProtectedSocket<CSerialSocket> (new CSerialSocket(strName, iBaudrate, iDatabits, iStopbits, iParity)) {}
virtual ~CSerialPort(void) {}
};