X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2Fadapter%2FPulse-Eight%2FUSBCECAdapterCommunication.h;fp=src%2Flib%2Fadapter%2FUSBCECAdapterCommunication.h;h=a14b3a5d85b7f463b1459ae85a09a1b8a64985c6;hb=2b44051cbfa70deafc30d9767323214debbc1a75;hp=948f2de9c19d5b067412945995b6d91f1234287d;hpb=ebefc26c10d68ba9ced2a30c896dccc81c6c2eeb;p=deb_libcec.git diff --git a/src/lib/adapter/USBCECAdapterCommunication.h b/src/lib/adapter/Pulse-Eight/USBCECAdapterCommunication.h similarity index 87% rename from src/lib/adapter/USBCECAdapterCommunication.h rename to src/lib/adapter/Pulse-Eight/USBCECAdapterCommunication.h index 948f2de..a14b3a5 100644 --- a/src/lib/adapter/USBCECAdapterCommunication.h +++ b/src/lib/adapter/Pulse-Eight/USBCECAdapterCommunication.h @@ -31,11 +31,8 @@ * http://www.pulse-eight.net/ */ -#include "../../../include/cectypes.h" -#include "../platform/threads/threads.h" -#include "../platform/util/buffer.h" -#include "AdapterCommunication.h" -#include "USBCECAdapterMessage.h" +#include "lib/platform/threads/threads.h" +#include "lib/adapter/AdapterCommunication.h" namespace PLATFORM { @@ -48,6 +45,7 @@ namespace CEC class CAdapterPingThread; class CUSBCECAdapterCommands; class CCECAdapterMessageQueue; + class CCECAdapterMessage; class CUSBCECAdapterCommunication : public IAdapterCommunication, public PLATFORM::CThread { @@ -69,21 +67,23 @@ namespace CEC bool Open(uint32_t iTimeoutMs = CEC_DEFAULT_CONNECT_TIMEOUT, bool bSkipChecks = false, bool bStartListening = true); void Close(void); bool IsOpen(void); - CStdString GetError(void) const; - cec_adapter_message_state Write(const cec_command &data, bool &bRetry, uint8_t iLineTimeout = 3); + std::string GetError(void) const; + cec_adapter_message_state Write(const cec_command &data, bool &bRetry, uint8_t iLineTimeout, bool bIsReply); bool StartBootloader(void); - bool SetAckMask(uint16_t iMask); - uint16_t GetAckMask(void); + bool SetLogicalAddresses(const cec_logical_addresses &addresses); + cec_logical_addresses GetLogicalAddresses(void); bool PingAdapter(void); uint16_t GetFirmwareVersion(void); uint32_t GetFirmwareBuildDate(void); bool IsRunningLatestFirmware(void); bool PersistConfiguration(const libcec_configuration &configuration); bool GetConfiguration(libcec_configuration &configuration); - CStdString GetPortName(void); + std::string GetPortName(void); uint16_t GetPhysicalAddress(void); bool SetControlledMode(bool controlled); + cec_vendor_id GetVendorId(void) { return CEC_VENDOR_UNKNOWN; } + bool SupportsSourceLogicalAddress(const cec_logical_address UNUSED(address)) { return true; } ///} void *Process(void); @@ -171,7 +171,9 @@ namespace CEC CAdapterPingThread * m_pingThread; /**< ping thread, that pings the adapter every 15 seconds */ CUSBCECAdapterCommands * m_commands; /**< commands that can be sent to the adapter */ CCECAdapterMessageQueue * m_adapterMessageQueue; /**< the incoming and outgoing message queue */ - uint16_t m_iAckMask; + cec_logical_addresses m_logicalAddresses; /**< the logical address list that this instance is using */ + uint64_t m_iLastEepromWrite; /**< last time that this instance did an eeprom write */ + bool m_iScheduleEepromWrite; /**< in case there were more than 2 changes within 30 seconds, do another write at this time */ }; class CAdapterPingThread : public PLATFORM::CThread