X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2FCECProcessor.h;h=5593a2cc99e5be970756bd2d778df3f91e27ba50;hb=6acb9c0bfd389f1ad4d052582b27a1a395322135;hp=5aa532b07a2db66e51986ee6f042ce100e8afd94;hpb=f8edb2973d37f3ebfd08291f28be5435d0cf8f64;p=deb_libcec.git diff --git a/src/lib/CECProcessor.h b/src/lib/CECProcessor.h index 5aa532b..5593a2c 100644 --- a/src/lib/CECProcessor.h +++ b/src/lib/CECProcessor.h @@ -51,6 +51,18 @@ namespace CEC class CCECTuner; class CCECTV; class CCECClient; + class CCECProcessor; + + class CCECAllocateLogicalAddress : public PLATFORM::CThread + { + public: + CCECAllocateLogicalAddress(CCECProcessor* processor, CCECClient* client); + void* Process(void); + + private: + CCECProcessor* m_processor; + CCECClient* m_client; + }; class CCECProcessor : public PLATFORM::CThread, public IAdapterCommunicationCallback { @@ -65,10 +77,12 @@ namespace CEC bool RegisterClient(CCECClient *client); bool UnregisterClient(CCECClient *client); void UnregisterClients(void); + uint16_t GetPhysicalAddressFromEeprom(void); CCECClient *GetPrimaryClient(void); CCECClient *GetClient(const cec_logical_address address); bool OnCommandReceived(const cec_command &command); + void HandleLogicalAddressLost(cec_logical_address oldAddress); CCECBusDevice * GetDevice(cec_logical_address address) const; CCECAudioSystem * GetAudioSystem(void) const; @@ -127,7 +141,13 @@ namespace CEC bool TryLogicalAddress(cec_logical_address address, cec_version libCECSpecVersion = CEC_VERSION_1_4); bool IsRunningLatestFirmware(void); - private: + void SwitchMonitoring(bool bSwitchTo); + + bool AllocateLogicalAddresses(CCECClient* client); + + uint16_t GetAdapterVendorId(void) const; + uint16_t GetAdapterProductId(void) const; + private: bool OpenConnection(const char *strPort, uint16_t iBaudRate, uint32_t iTimeoutMs, bool bStartListening = true); void SetCECInitialised(bool bSetTo = true); @@ -152,5 +172,8 @@ namespace CEC CCECInputBuffer m_inBuffer; CCECDeviceMap * m_busDevices; std::map m_clients; + bool m_bMonitor; + CCECAllocateLogicalAddress* m_addrAllocator; + bool m_bStallCommunication; }; };