X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2FCECProcessor.h;h=5f496d2631558506045e645ecf450e4ba37c5995;hb=5f2f3609d7ee857ac7e5d03600fbd735e99c892f;hp=48154fe9842de770fe692dbe73789bf313e7f970;hpb=004b83822a351e1fb6e982a9183a12a430b0b769;p=deb_libcec.git diff --git a/src/lib/CECProcessor.h b/src/lib/CECProcessor.h index 48154fe..5f496d2 100644 --- a/src/lib/CECProcessor.h +++ b/src/lib/CECProcessor.h @@ -64,14 +64,13 @@ namespace CEC void Close(void); bool RegisterClient(CCECClient *client); - void UnregisterClient(CCECClient *client); + bool UnregisterClient(CCECClient *client); void UnregisterClients(void); CCECClient *GetPrimaryClient(void); CCECClient *GetClient(const cec_logical_address address); bool OnCommandReceived(const cec_command &command); - bool IsMonitoring(void) const { return m_bMonitor; } CCECBusDevice * GetDevice(cec_logical_address address) const; CCECAudioSystem * GetAudioSystem(void) const; CCECPlaybackDevice * GetPlaybackDevice(cec_logical_address address) const; @@ -80,9 +79,9 @@ namespace CEC CCECTV * GetTV(void) const; CCECBusDevice * GetDeviceByPhysicalAddress(uint16_t iPhysicalAddress, bool bSuppressUpdate = true); - CCECBusDevice * GetPrimaryDevice(void) const; - cec_logical_address GetLogicalAddress(void) const; - cec_logical_addresses GetLogicalAddresses(void) const; + CCECBusDevice * GetPrimaryDevice(void); + cec_logical_address GetLogicalAddress(void); + cec_logical_addresses GetLogicalAddresses(void); bool IsPresentDevice(cec_logical_address address); bool IsPresentDeviceType(cec_device_type type); uint16_t GetDetectedPhysicalAddress(void) const; @@ -98,13 +97,14 @@ namespace CEC bool PowerOnDevice(const cec_logical_address initiator, cec_logical_address address); bool SetDeckInfo(cec_deck_info info, bool bSendUpdate = true); - bool SetActiveSource(uint16_t iStreamPath); - bool SwitchMonitoring(bool bEnable); + bool ActivateSource(uint16_t iStreamPath); bool PollDevice(cec_logical_address iAddress); void SetStandardLineTimeout(uint8_t iTimeout); + uint8_t GetStandardLineTimeout(void); void SetRetryLineTimeout(uint8_t iTimeout); + uint8_t GetRetryLineTimeout(void); bool CanPersistConfiguration(void); - bool PersistConfiguration(libcec_configuration *configuration); + bool PersistConfiguration(const libcec_configuration &configuration); void RescanActiveDevices(void); bool SetLineTimeout(uint8_t iTimeout); @@ -127,6 +127,8 @@ namespace CEC bool IsHandledByLibCEC(const cec_logical_address address) const; bool TryLogicalAddress(cec_logical_address address); + + bool IsRunningLatestFirmware(void); private: bool OpenConnection(const char *strPort, uint16_t iBaudRate, uint32_t iTimeoutMs, bool bStartListening = true); void SetCECInitialised(bool bSetTo = true); @@ -136,14 +138,14 @@ namespace CEC bool SetAckMask(uint16_t iMask); void LogOutput(const cec_command &data); - void ParseCommand(const cec_command &command); + void ProcessCommand(const cec_command &command); + + void ResetMembers(void); bool m_bInitialised; PLATFORM::CMutex m_mutex; IAdapterCommunication * m_communication; CLibCEC* m_libcec; - bool m_bMonitor; - uint16_t m_iPreviousAckMask; uint8_t m_iStandardLineTimeout; uint8_t m_iRetryLineTimeout; uint64_t m_iLastTransmission;