66 virtual bool Open(
const char *strPort, uint32_t iTimeoutMs = 10000) = 0;
233 virtual uint8_t
VolumeUp(
bool bSendRelease =
true) = 0;
242#if CEC_LIB_VERSION_MAJOR >= 5
323#if CEC_LIB_VERSION_MAJOR >= 5
326 virtual bool CanPersistConfiguration(
void) = 0;
356#if CEC_LIB_VERSION_MAJOR >= 5
378 virtual bool EnableCallbacks(
void *cbParam,
ICECCallbacks *callbacks) = 0;
436 virtual void PrintVersion(uint32_t version,
char* buf,
size_t bufSize) = 0;
493#if CEC_LIB_VERSION_MAJOR >= 5
CEC::ICECAdapter * CECInitialise(CEC::libcec_configuration *configuration)
Load the CEC adapter library.
void CECDestroy(CEC::ICECAdapter *instance)
Unload the CEC adapter library.
bool CECStartBootloader(void)
Try to connect to the adapter and send the "start bootloader" command, without initialising libCEC an...
#define CEC_DEFAULT_PHYSICAL_ADDRESS
default physical address 1.0.0.0, HDMI port 1
To create a new libCEC instance, call CECInitialise() and pass the configuration as argument.
virtual const char * ToString(const cec_deck_control_mode mode)=0
virtual const char * ToString(const cec_version version)=0
virtual std::string GetDeviceMenuLanguage(cec_logical_address iLogicalAddress)=0
Get the menu language of the device with the given logical address.
virtual const char * ToString(const cec_menu_state state)=0
virtual bool SetMenuState(cec_menu_state state, bool bSendUpdate=true)=0
Change the menu state.
virtual bool SetStreamPath(cec_logical_address iLogicalAddress)=0
Sets the stream path to the device on the given logical address.
virtual uint16_t GetAdapterVendorId(void) const =0
virtual const char * GetLibInfo(void)=0
virtual bool PingAdapter(void)=0
Sends a ping command to the adapter, to check if it's responding.
virtual bool Transmit(const cec_command &data)=0
Transmit a raw CEC command over the CEC line.
virtual bool SetDeckControlMode(cec_deck_control_mode mode, bool bSendUpdate=true)=0
Change the deck control mode, if this adapter is registered as playback or recording device.
virtual bool SendKeyRelease(cec_logical_address iDestination, bool bWait=false)=0
Send a key release to a device on the CEC bus.
virtual bool SetLogicalAddress(cec_logical_address iLogicalAddress=CECDEVICE_PLAYBACKDEVICE1)=0
Change the logical address on the CEC bus of the CEC adapter.
virtual const char * ToString(const cec_logical_address address)=0
virtual const char * ToString(const cec_power_status status)=0
virtual bool SetActiveSource(cec_device_type type=CEC_DEVICE_TYPE_RESERVED)=0
Change the active source to a device type handled by libCEC.
virtual int8_t DetectAdapters(cec_adapter_descriptor *deviceList, uint8_t iBufSize, const char *strDevicePath=nullptr, bool bQuickScan=false)=0
Try to find all connected CEC adapters.
virtual bool StandbyDevices(cec_logical_address address=CECDEVICE_BROADCAST)=0
Put the given CEC capable devices in standby mode.
virtual bool IsLibCECActiveSource(void)=0
virtual const char * ToString(const cec_user_control_code key)=0
virtual cec_logical_address GetActiveSource(void)=0
Get the logical address of the device that is currently the active source on the CEC bus.
virtual const char * VendorIdToString(uint32_t vendor)=0
virtual uint8_t VolumeDown(bool bSendRelease=true)=0
Sends a volume down keypress to an audiosystem if it's present.
virtual uint8_t AudioUnmute(void)=0
Mute the AVR (if connected)
virtual uint8_t AudioMute(void)=0
Mute the AVR (if present)
virtual bool IsActiveDeviceType(cec_device_type type)=0
Check whether a device of the given type is active on the bus.
virtual void PrintVersion(uint32_t version, char *buf, size_t bufSize)=0
virtual bool SetPhysicalAddress(uint16_t iPhysicalAddress=0x1000)=0
Change the physical address (HDMI port) of the CEC adapter.
virtual cec_version GetDeviceCecVersion(cec_logical_address iLogicalAddress)=0
Get the CEC version of the device with the given logical address.
virtual cec_command CommandFromString(const char *strCommand)=0
Create a new cec_command from a string.
virtual bool GetStats(struct cec_adapter_stats *stats)=0
virtual std::string GetDeviceOSDName(cec_logical_address iAddress)=0
Get the OSD name of a device on the CEC bus.
virtual bool SetHDMIPort(cec_logical_address iBaseDevice, uint8_t iPort)=0
Changes the active HDMI port.
virtual bool AudioEnable(bool enable)=0
Enable or disable system audio mode.
virtual uint16_t GetAdapterProductId(void) const =0
virtual uint32_t GetDeviceVendorId(cec_logical_address iLogicalAddress)=0
Get the vendor ID of the device with the given logical address.
virtual std::string VersionToString(uint32_t version)=0
virtual bool SendKeypress(cec_logical_address iDestination, cec_user_control_code key, bool bWait=false)=0
Send a keypress to a device on the CEC bus.
virtual void Close(void)=0
Close the connection to the CEC adapter.
virtual cec_logical_addresses GetActiveDevices(void)=0
virtual uint8_t MuteAudio(void)=0
Toggles the mute status of an audiosystem, if it's present.
virtual cec_logical_addresses GetLogicalAddresses(void)=0
virtual bool DisableCallbacks(void)=0
Disable all callbacks.
virtual bool CanSaveConfiguration(void)=0
virtual bool SetConfiguration(const libcec_configuration *configuration)=0
Change libCEC's configuration.
virtual const char * ToString(const cec_deck_info status)=0
virtual bool StartBootloader(void)=0
Start the bootloader of the CEC adapter.
virtual uint8_t AudioToggleMute(void)=0
Toggle the mute status of the AVR (if present)
virtual bool SetCallbacks(ICECCallbacks *callbacks, void *cbParam)=0
Set and enable the callback methods.
virtual const char * ToString(const cec_device_type type)=0
virtual bool GetCurrentConfiguration(libcec_configuration *configuration)=0
Get libCEC's current configuration.
virtual const char * ToString(const cec_vendor_id vendor)
virtual bool IsActiveDevice(cec_logical_address iLogicalAddress)=0
Check whether a device is active on the bus.
virtual bool PowerOnDevices(cec_logical_address address=CECDEVICE_TV)=0
Power on the given CEC capable devices.
virtual bool SetStreamPath(uint16_t iPhysicalAddress)=0
Sets the stream path to the device on the given physical address.
virtual uint8_t AudioStatus(void)=0
Get the current audio status (if an AVR is connected)
virtual bool SetOSDString(cec_logical_address iLogicalAddress, cec_display_control duration, const char *strMessage)=0
Display a message on the device with the given logical address.
virtual uint16_t GetDevicePhysicalAddress(cec_logical_address iLogicalAddress)=0
Get the physical address of the device with the given logical address.
virtual const char * ToString(const cec_opcode opcode)=0
virtual bool Open(const char *strPort, uint32_t iTimeoutMs=10000)=0
Open a connection to the CEC adapter.
virtual void RescanActiveDevices(void)=0
Tell libCEC to poll for active devices on the bus.
virtual const char * ToString(const cec_system_audio_status mode)=0
virtual bool PollDevice(cec_logical_address iLogicalAddress)=0
Sends a POLL message to a device, to check if it's present and responding.
virtual const char * ToString(const cec_audio_status status)=0
virtual uint8_t VolumeUp(bool bSendRelease=true)=0
Sends a volume up keypress to an audiosystem if it's present.
virtual const char * ToString(const cec_adapter_type type)=0
virtual void InitVideoStandalone(void)=0
Calling this method will initialise the host on which libCEC is running.
virtual bool SetInactiveView(void)=0
Broadcast a message that notifies connected CEC capable devices that this device is no longer the act...
virtual cec_power_status GetDevicePowerStatus(cec_logical_address iLogicalAddress)=0
Get the power status of the device with the given logical address.
virtual bool SwitchMonitoring(bool bEnable)=0
Enable or disable monitoring mode, for debugging purposes.
virtual bool IsActiveSource(cec_logical_address iLogicalAddress)=0
Check whether a device is currently the active source on the CEC bus.
virtual bool SetDeckInfo(cec_deck_info info, bool bSendUpdate=true)=0
Change the deck info, if this adapter is a playback or recording device.
virtual uint8_t SystemAudioModeStatus(void)=0
Get the current system audio mode status (if an AVR is connected)
virtual bool GetDeviceInformation(const char *strPort, libcec_configuration *config, uint32_t iTimeoutMs=10000)=0
Get information about the given CEC adapter.
@ CECDEVICE_PLAYBACKDEVICE1
@ CEC_DEVICE_TYPE_RESERVED