RDK Documentation (Open Sourced RDK Components)
|
The host module is the central module of the Device Settings module. Each devices establishes one and only one host instance that represents the entire host device.
Functions | |
static Host & | device::Host::getInstance (void) |
This API is used to get a reference to the single instance of the Host object. More... | |
void | device::Host::addPowerModeListener (PowerModeChangeListener *l) |
This API is used to register listeners for Power Mode change event. The listener object is created by application and should be released by the application once the listener is removed. Listeners will be notified with the new mode via the listener's powerModeChanged() callback. More... | |
void | device::Host::removePowerModeChangeListener (PowerModeChangeListener *l) |
This API is used to remove a listener from Power Mode change listener list. More... | |
void | device::Host::addDisplayConnectionListener (DisplayConnectionChangeListener *l) |
This API is used to register listeners for Display connection change event. The listener will be notified if Display device is connected/disconnected from the video output port. The notification only carries the state change of the connection. It does not carry any other system state change that may have been triggered by the connection. The application is responsible to query the various parts of system to detect any such change. For example, when a TV device is replaced, the application shall query the video output port again upon the connection for the new resolution supported by the TV. The listener object is created by application and should be released by the application once the listener is removed. More... | |
void | device::Host::removeDisplayConnectionListener (DisplayConnectionChangeListener *l) |
This API is used to remove listeners from the Display connection change event list. More... | |
void | device::Host::notifyPowerChange (const int mode) |
This function is used to get the current power state. More... | |
void | device::Host::notifyDisplayConnectionChange (int portHandle, bool newConnectionStatus) |
bool | device::Host::setPowerMode (int mode) |
This API is used to change the power mode of the device. This function will set the power mode to active or standby and turn off all the ouput ports. The accepted modes are defined as constants in host module: Host::kPowerOn, Host::kPowerOff, Host::kPowerStandby. Upon the return of this API, the power mode listeners will be notified of the new power mode. This function is currently not supported. More... | |
int | device::Host::getPowerMode () |
This API is used to get the current power mode of the device. This function is currently not supported. More... | |
List< VideoOutputPort > | device::Host::getVideoOutputPorts () |
This API is used to get the list of the video output ports supported on the device. A complete list of ports that are physically present on the platform will be returned, regardless the state of each port. If no Video Output Port is available on the device, an empty List will be returned. More... | |
List< AudioOutputPort > | device::Host::getAudioOutputPorts () |
This API is used to get the list of the audio output ports supported on the device. A complete list of ports that are physically present on the platform will be returned, regardless the state of each port. If no Audio Output Port is available on the device, an empty List will be returned. More... | |
List< VideoDevice > | device::Host::getVideoDevices () |
This API is used to get the list of the video devices (i.e. Decoders) supported on the device. If no Video Device is available on the device, an empty List will be returned. More... | |
VideoOutputPort & | device::Host::getVideoOutputPort (const std::string &name) |
This API is used to get the reference to the video output port by its name. The name of the port must match one of those returned by Host::getVideoOutputPorts. Application shall not develop code that depends on the actual naming conventions of the video output port. Such code as Host::getVideoOutputPort("HDMI0") is discouraged as the name of the left-most HDMI output port may not necessarily be "HDMI0" from all implementations. IllegalArgumentException will be thrown if the "name" does not match any of the ports. More... | |
VideoOutputPort & | device::Host::getVideoOutputPort (int id) |
This API is used to get a reference to the video output port by its id. The name of the port must match one of those returned by Host::getVideoOutputPorts. Application shall not develop code that depends on the actual naming conventions of the video output port. Such code as Host::getVideoOutputPort("HDMI0") is discouraged as the name of the left-most HDMI output port may not necessarily be "HDMI0" from all implementations. IllegalArgumentException will be thrown if the "name" does not match any of the ports. More... | |
AudioOutputPort & | device::Host::getAudioOutputPort (const std::string &name) |
This API is used to get the reference to the audio output port by its name. The name of the port must match one of those returned by Host::getAudioOutputPorts. Application shall not develop code that depends on the actual naming conventions of the Audio output port. Such code as Host::getAudioOutputPort("SPDIF0") is discouraged as the name of the left-most SPDIF output port may not necessarily be "SPDIF0" from all implementations. IllegalArgumentException will be thrown if the "name" does not match any of the ports. More... | |
AudioOutputPort & | device::Host::getAudioOutputPort (int id) |
This API is used to get a reference to the Audio output port by its id. The name of the port must match one of those returned by Host::getAudioOutputPorts. Application shall not develop code that depends on the actual naming conventions of the Audio output port. Such code as Host::getAudioOutputPort("SPDIF0") is discouraged as the name of the left-most SPDIF output port may not necessarily be "SPDIF0" from all implementations. IllegalArgumentException will be thrown if the "name" does not match any of the ports. More... | |
SleepMode | device::Host::getPreferredSleepMode () |
This API is used to gets the Preferred sleep Mode and implements the low power mode for RDK platform. dsGetPreferredSleepMode(&mode) function returns preferred sleep mode which is persisted. More... | |
int | device::Host::setPreferredSleepMode (const SleepMode) |
This API is used to set the Preferred sleep Mode and implements the low power mode for RDK platform. More... | |
List< SleepMode > | device::Host::getAvailableSleepModes () |
This function is used to get the available sleep modes. More... | |
float | device::Host::getCPUTemperature () |
This API gets CPU temperature. More... | |
uint32_t | device::Host::getVersion (void) |
Get DS HAL API Version. More... | |
void | device::Host::setVersion (uint32_t versionNumber) |
void | device::Host::getHostEDID (std::vector< uint8_t > &edid) const |
This function is used to get the EDID information of the host device. More... | |
std::string | device::Host::getSocIDFromSDK () |
This API to get the SOC ID. dsGetSocIDFromSDK() function returns the SOC ID in string format. More... | |
void | device::Host::getCurrentAudioFormat (dsAudioFormat_t &audioFormat) |
void | device::Host::getSinkDeviceAtmosCapability (dsATMOSCapability_t &atmosCapability) |
void | device::Host::setAudioAtmosOutputMode (bool enable) |
void | device::Host::setAssociatedAudioMixing (const bool mixing) |
This API is used to enable/disable Associated Audio Mixing. More... | |
void | device::Host::getAssociatedAudioMixing (bool *mixing) |
This API is used to get status of Associated Audio Mixing. More... | |
void | device::Host::setFaderControl (const int mixerbalance) |
This API is used to set the mixerbalance betweeen main and associated audio. More... | |
void | device::Host::getFaderControl (int *mixerBalance) |
This API is used to get the mixerbalance betweeen main and associated audio. More... | |
void | device::Host::setPrimaryLanguage (const std::string pLang) |
This API is used to set Primary language. More... | |
void | device::Host::getPrimaryLanguage (std::string &pLang) |
This API is used to get the current Primary language. More... | |
void | device::Host::setSecondaryLanguage (const std::string sLang) |
This API is used to set Secondary language. More... | |
void | device::Host::getSecondaryLanguage (std::string &sLang) |
This API is used to get the current AC4 Secondary language. More... | |
bool | device::Host::isHDMIOutPortPresent () |
std::string | device::Host::getDefaultVideoPortName () |
std::string | device::Host::getDefaultAudioPortName () |
|
static |
void device::Host::addPowerModeListener | ( | PowerModeChangeListener * | l | ) |
This API is used to register listeners for Power Mode change event. The listener object is created by application and should be released by the application once the listener is removed. Listeners will be notified with the new mode via the listener's powerModeChanged() callback.
[in] | PowerModeChangeListener | Pointer to Power Mode change listener |
void device::Host::removePowerModeChangeListener | ( | PowerModeChangeListener * | l | ) |
void device::Host::addDisplayConnectionListener | ( | DisplayConnectionChangeListener * | l | ) |
This API is used to register listeners for Display connection change event. The listener will be notified if Display device is connected/disconnected from the video output port. The notification only carries the state change of the connection. It does not carry any other system state change that may have been triggered by the connection. The application is responsible to query the various parts of system to detect any such change. For example, when a TV device is replaced, the application shall query the video output port again upon the connection for the new resolution supported by the TV. The listener object is created by application and should be released by the application once the listener is removed.
[in] | DisplayConnectionChangeListener | Pointer to Display connection change listener |
void device::Host::removeDisplayConnectionListener | ( | DisplayConnectionChangeListener * | l | ) |
This API is used to remove listeners from the Display connection change event list.
[in] | DisplayConnectionChangeListener | The listener to remove |
void device::Host::notifyPowerChange | ( | const int | mode | ) |
bool device::Host::setPowerMode | ( | int | mode | ) |
This API is used to change the power mode of the device. This function will set the power mode to active or standby and turn off all the ouput ports. The accepted modes are defined as constants in host module: Host::kPowerOn, Host::kPowerOff, Host::kPowerStandby. Upon the return of this API, the power mode listeners will be notified of the new power mode. This function is currently not supported.
[in] | mode | New Power Mode. |
int device::Host::getPowerMode | ( | ) |
List< VideoOutputPort > device::Host::getVideoOutputPorts | ( | ) |
This API is used to get the list of the video output ports supported on the device. A complete list of ports that are physically present on the platform will be returned, regardless the state of each port. If no Video Output Port is available on the device, an empty List will be returned.
None |
List< AudioOutputPort > device::Host::getAudioOutputPorts | ( | ) |
This API is used to get the list of the audio output ports supported on the device. A complete list of ports that are physically present on the platform will be returned, regardless the state of each port. If no Audio Output Port is available on the device, an empty List will be returned.
List< VideoDevice > device::Host::getVideoDevices | ( | ) |
VideoOutputPort & device::Host::getVideoOutputPort | ( | const std::string & | name | ) |
This API is used to get the reference to the video output port by its name. The name of the port must match one of those returned by Host::getVideoOutputPorts. Application shall not develop code that depends on the actual naming conventions of the video output port. Such code as Host::getVideoOutputPort("HDMI0") is discouraged as the name of the left-most HDMI output port may not necessarily be "HDMI0" from all implementations. IllegalArgumentException will be thrown if the "name" does not match any of the ports.
[in] | name | Name of the port |
VideoOutputPort & device::Host::getVideoOutputPort | ( | int | id | ) |
This API is used to get a reference to the video output port by its id. The name of the port must match one of those returned by Host::getVideoOutputPorts. Application shall not develop code that depends on the actual naming conventions of the video output port. Such code as Host::getVideoOutputPort("HDMI0") is discouraged as the name of the left-most HDMI output port may not necessarily be "HDMI0" from all implementations. IllegalArgumentException will be thrown if the "name" does not match any of the ports.
[in] | id | port id |
AudioOutputPort & device::Host::getAudioOutputPort | ( | const std::string & | name | ) |
This API is used to get the reference to the audio output port by its name. The name of the port must match one of those returned by Host::getAudioOutputPorts. Application shall not develop code that depends on the actual naming conventions of the Audio output port. Such code as Host::getAudioOutputPort("SPDIF0") is discouraged as the name of the left-most SPDIF output port may not necessarily be "SPDIF0" from all implementations. IllegalArgumentException will be thrown if the "name" does not match any of the ports.
[in] | name | Name of the port |
AudioOutputPort & device::Host::getAudioOutputPort | ( | int | id | ) |
This API is used to get a reference to the Audio output port by its id. The name of the port must match one of those returned by Host::getAudioOutputPorts. Application shall not develop code that depends on the actual naming conventions of the Audio output port. Such code as Host::getAudioOutputPort("SPDIF0") is discouraged as the name of the left-most SPDIF output port may not necessarily be "SPDIF0" from all implementations. IllegalArgumentException will be thrown if the "name" does not match any of the ports.
[in] | id | port id |
SleepMode device::Host::getPreferredSleepMode | ( | ) |
int device::Host::setPreferredSleepMode | ( | const SleepMode | mode | ) |
float device::Host::getCPUTemperature | ( | ) |
uint32_t device::Host::getVersion | ( | void | ) |
void device::Host::getHostEDID | ( | std::vector< uint8_t > & | edid | ) | const |
std::string device::Host::getSocIDFromSDK | ( | ) |
This API to get the SOC ID. dsGetSocIDFromSDK() function returns the SOC ID in string format.
None |
void device::Host::getCurrentAudioFormat | ( | dsAudioFormat_t & | audioFormat | ) |
Host::getCurrentAudioFormat(dsAudioFormat_t &audioFormat)
[in/out] | Audio format of currently playing content |
void device::Host::getSinkDeviceAtmosCapability | ( | dsATMOSCapability_t & | atmosCapability | ) |
Host::getSinkDeviceAtmosCapability(dsATMOSCapability_t & atmosCapability)
[in/out] | Sink device ATMOS capability |
void device::Host::setAssociatedAudioMixing | ( | const bool | mixing | ) |
This API is used to enable/disable Associated Audio Mixing.
If return is not equal to dsERR_NONE, it will throw the ret to IllegalArgumentException Handler and it will pass the message as "No message for this exception" with the value of "dsERR_INVALID_PARAM" from dsError type.
[in] | mixing | enable/disable Associated Audio Mixing. |
void device::Host::getAssociatedAudioMixing | ( | bool * | mixing | ) |
void device::Host::setFaderControl | ( | const int | mixerBalance | ) |
This API is used to set the mixerbalance betweeen main and associated audio.
If return is not equal to dsERR_NONE, it will throw the ret to IllegalArgumentException Handler and it will pass the message as "No message for this exception" with the value of "dsERR_INVALID_PARAM" from dsError type.
[in] | New | mixerbalance betweeen main and associated audio. |
void device::Host::getFaderControl | ( | int * | mixerBalance | ) |
void device::Host::setPrimaryLanguage | ( | const std::string | pLang | ) |
This API is used to set Primary language.
If return is not equal to dsERR_NONE, it will throw the ret to IllegalArgumentException Handler and it will pass the message as "No message for this exception" with the value of "dsERR_INVALID_PARAM" from dsError type.
[string] | Primary language to be set |
void device::Host::getPrimaryLanguage | ( | std::string & | pLang | ) |
This API is used to get the current Primary language.
If return is not equal to dsERR_NONE, it will throw the ret to IllegalArgumentException Handler and it will pass the message as "No message for this exception" with the value of "dsERR_INVALID_PARAM" from dsError type.
void device::Host::setSecondaryLanguage | ( | const std::string | sLang | ) |
This API is used to set Secondary language.
If return is not equal to dsERR_NONE, it will throw the ret to IllegalArgumentException Handler and it will pass the message as "No message for this exception" with the value of "dsERR_INVALID_PARAM" from dsError type.
[string] | Secondary language to be set |
void device::Host::getSecondaryLanguage | ( | std::string & | sLang | ) |
This API is used to get the current AC4 Secondary language.
If return is not equal to dsERR_NONE, it will throw the ret to IllegalArgumentException Handler and it will pass the message as "No message for this exception" with the value of "dsERR_INVALID_PARAM" from dsError type.