X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2FCECProcessor.h;h=69586a7cb8fd47f7f010223ad40eb58d5195b0a4;hb=0b83551352338fb45b285c44d6baccd867f05b6d;hp=dc8e9f557d1c476b6a16029a11239fc3f380b56a;hpb=cc0a29772b1a007b1b3760bcfb11750a801f844b;p=deb_libcec.git diff --git a/src/lib/CECProcessor.h b/src/lib/CECProcessor.h index dc8e9f5..69586a7 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; @@ -96,6 +110,7 @@ namespace CEC bool SetDeckInfo(cec_deck_info info, bool bSendUpdate = true); bool ActivateSource(uint16_t iStreamPath); + void SetActiveSource(bool bSetTo, bool bClientUnregistered); bool PollDevice(cec_logical_address iAddress); void SetStandardLineTimeout(uint8_t iTimeout); uint8_t GetStandardLineTimeout(void); @@ -129,6 +144,10 @@ namespace CEC bool IsRunningLatestFirmware(void); 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); @@ -155,5 +174,7 @@ namespace CEC CCECDeviceMap * m_busDevices; std::map m_clients; bool m_bMonitor; + CCECAllocateLogicalAddress* m_addrAllocator; + bool m_bStallCommunication; }; };