X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2Fimplementations%2FCECCommandHandler.h;h=245d39e8aa64a81d10f8589ab09f50c34da5da6c;hb=9f332fe262328ff230ae4ea69004f8f2e9f61e6f;hp=7129b400793ed473769f9b36b4c6be24799d16c4;hpb=1b5cc4a2517ee8e6cebb44063ea03eb4128b4ab1;p=deb_libcec.git diff --git a/src/lib/implementations/CECCommandHandler.h b/src/lib/implementations/CECCommandHandler.h index 7129b40..245d39e 100644 --- a/src/lib/implementations/CECCommandHandler.h +++ b/src/lib/implementations/CECCommandHandler.h @@ -32,6 +32,7 @@ */ #include +#include namespace CEC { @@ -44,23 +45,59 @@ namespace CEC virtual ~CCECCommandHandler(void) {}; virtual bool HandleCommand(const cec_command &command); + virtual cec_vendor_id GetVendorId(void) { return CEC_VENDOR_UNKNOWN; }; + + static const char *ToString(const cec_menu_state state); + static const char *ToString(const cec_deck_control_mode mode); + static const char *ToString(const cec_version version); + static const char *ToString(const cec_power_status status); + static const char *ToString(const cec_deck_info status); + static const char* ToString(const cec_logical_address address); + static const char* ToString(const cec_opcode opcode); + static const char *ToString(const cec_system_audio_status mode); + static const char *ToString(const cec_audio_status status); + static const char *ToString(const cec_vendor_id vendor); protected: - bool HandleDeviceVendorCommandWithId(const cec_command &command); - bool HandleDeviceVendorId(const cec_command &command); - bool HandleGetCecVersion(const cec_command &command); - bool HandleGiveDeckStatus(const cec_command &command); - bool HandleGiveDevicePowerStatus(const cec_command &command); - bool HandleGiveDeviceVendorId(const cec_command &command); - bool HandleGiveOSDName(const cec_command &command); - bool HandleGivePhysicalAddress(const cec_command &command); - bool HandleMenuRequest(const cec_command &command); - bool HandleRequestActiveSource(const cec_command &command); - bool HandleRoutingChange(const cec_command &command); - bool HandleSetStreamPath(const cec_command &command); - bool HandleUserControlPressed(const cec_command &command); - bool HandleUserControlRelease(const cec_command &command); - void UnhandledCommand(const cec_command &command); + virtual bool HandleActiveSource(const cec_command &command); + virtual bool HandleDeckControl(const cec_command &command); + virtual bool HandleDeviceCecVersion(const cec_command &command); + virtual bool HandleDeviceVendorCommandWithId(const cec_command &command); + virtual bool HandleDeviceVendorId(const cec_command &command); + virtual bool HandleGetCecVersion(const cec_command &command); + virtual bool HandleGiveAudioStatus(const cec_command &command); + virtual bool HandleGiveDeckStatus(const cec_command &command); + virtual bool HandleGiveDevicePowerStatus(const cec_command &command); + virtual bool HandleGiveDeviceVendorId(const cec_command &command); + virtual bool HandleGiveOSDName(const cec_command &command); + virtual bool HandleGivePhysicalAddress(const cec_command &command); + virtual bool HandleGiveSystemAudioModeStatus(const cec_command &command); + virtual bool HandleImageViewOn(const cec_command &command); + virtual bool HandleMenuRequest(const cec_command &command); + virtual bool HandleReportAudioStatus(const cec_command &command); + virtual bool HandleReportPhysicalAddress(const cec_command &command); + virtual bool HandleReportPowerStatus(const cec_command &command); + virtual bool HandleRequestActiveSource(const cec_command &command); + virtual bool HandleRoutingChange(const cec_command &command); + virtual bool HandleRoutingInformation(const cec_command &command); + virtual bool HandleSetMenuLanguage(const cec_command &command); + virtual bool HandleSetOSDName(const cec_command &command); + virtual bool HandleSetStreamPath(const cec_command &command); + virtual bool HandleSetSystemAudioModeRequest(const cec_command &command); + virtual bool HandleStandby(const cec_command &command); + virtual bool HandleSystemAudioStatus(const cec_command &command); + virtual bool HandleTextViewOn(const cec_command &command); + virtual bool HandleUserControlPressed(const cec_command &command); + virtual bool HandleUserControlRelease(const cec_command &command); + virtual void UnhandledCommand(const cec_command &command); + + virtual unsigned int GetMyDevices(std::vector &devices) const; + virtual CCECBusDevice *GetDevice(cec_logical_address iLogicalAddress) const; + virtual CCECBusDevice *GetDeviceByPhysicalAddress(uint16_t iPhysicalAddress) const; + virtual CCECBusDevice *GetDeviceByType(cec_device_type type) const; + + virtual void SetVendorId(const cec_command &command); + virtual void SetPhysicalAddress(cec_logical_address iAddress, uint16_t iNewAddress); CCECBusDevice *m_busDevice; };