Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ cd rfc
autoreconf -i
./configure --enable-rfctool=yes --enable-tr181set=yes
cd rfcapi
make librfcapi_la_CPPFLAGS="-I/usr/include/cjson"
make CXXFLAGS="-DUSE_IARMBUS" librfcapi_la_CPPFLAGS="-I/usr/include/cjson"
make install
export RFC_PATH=$ROOT/rfc

Expand Down
260 changes: 258 additions & 2 deletions ds/host.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
* If not stated otherwise in this file or this component's LICENSE file the
* following copyright and licenses apply:

Check failure on line 3 in ds/host.cpp

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'ds/host.cpp' (Match: rdk/components/generic/devicesettings/rdk/components/generic/devicesettings/1907, 536 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdk/components/generic/devicesettings/+archive/rdk-dev-1907.tar.gz, file: ds/host.cpp)
*
* Copyright 2016 RDK Management
* Copyright 2025 RDK Management
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -241,7 +241,6 @@
}
}


/**
* @fn bool Host::setPowerMode(int mode)
* @brief This API is used to change the power mode of the device.
Expand Down Expand Up @@ -913,11 +912,268 @@
printf ("%s:%d - Set Audio Mixer levels for audio input: %d with volume = %d\n", __PRETTY_FUNCTION__, __LINE__,aInput, volume);
}

/* virtual */ void Host::IHDMIInEvents::OnHDMIInEventHotPlug(dsHdmiInPort_t port, bool isConnected)
{
/* If client needs to handle this event, they should override this method */
INT_WARN("Base impl of OnHDMIInEventHotPlug called. port: %d isConnected %d", port, isConnected);
}

/* virtual */ void Host::IHDMIInEvents::OnHDMIInEventSignalStatus(dsHdmiInPort_t port, dsHdmiInSignalStatus_t signalStatus)
{
/* If client needs to handle this event, they should override this method */
INT_WARN("Base impl of OnHDMIInEventSignalStatus called. port: %d signalStatus %d", port, signalStatus);
}

/* virtual */ void Host::IHDMIInEvents::OnHDMIInEventStatus(dsHdmiInPort_t activePort, bool isPresented)
{
/* If client needs to handle this event, they should override this method */
INT_WARN("Base impl of OnHDMIInEventStatus called. activePort: %d isPresented %d", activePort, isPresented);
}

/* virtual */ void Host::IHDMIInEvents::OnHDMIInVideoModeUpdate(dsHdmiInPort_t port, const dsVideoPortResolution_t& videoPortResolution)
{
/* If client needs to handle this event, they should override this method */
INT_WARN("Base impl of OnHDMIInVideoModeUpdate called. port: %d videoPortResolution.pixelresolution %d",
port, videoPortResolution.pixelResolution);
}

/* virtual */ void Host::IHDMIInEvents::OnHDMIInAllmStatus(dsHdmiInPort_t port, bool allmStatus)
{
/* If client needs to handle this event, they should override this method */
INT_WARN("Base impl of OnHDMIInAllmStatus called. port %d allmStatus: %d", port, allmStatus);
}

/* virtual */ void Host::IHDMIInEvents::OnHDMIInAVIContentType(dsHdmiInPort_t port, dsAviContentType_t aviContentType)
{
/* If client needs to handle this event, they should override this method */
INT_WARN("Base impl of OnHDMIInAVIContentType called. port %d aviContentType: %d", port, aviContentType);
}

/* virtual */ void Host::IHDMIInEvents::OnHDMIInVRRStatus(dsHdmiInPort_t port, dsVRRType_t vrrType)
{
/* If client needs to handle this event, they should override this method */
INT_WARN("Base impl of OnHDMIInVRRStatus called. port %d vrrType: %d", port, vrrType);
}

/* virtual */ void Host::IHDMIInEvents::OnHDMIInAVLatency(int audioDelay, int videoDelay)
{
/* If client needs to handle this event, they should override this method */
INT_WARN("Base impl of OnHDMIInAVLatency called. audioDelay: %d videoDelay %d", audioDelay, videoDelay);
}

/* virtual */ void Host::IVideoDeviceEvents::OnDisplayFrameratePreChange(const std::string& frameRate)
{
/* If client needs to handle this event, they should override this method */
INT_WARN("Base impl of OnDisplayFrameratePreChange called. frameRate: %s", frameRate.c_str());
}

/* virtual */ void Host::IVideoDeviceEvents::OnDisplayFrameratePostChange(const std::string& frameRate)
{
/* If client needs to handle this event, they should override this method */
INT_WARN("Base impl of OnDisplayFrameratePostChange called. frameRate: %s", frameRate.c_str());
}

/* virtual */ void Host::IVideoDeviceEvents::OnZoomSettingsChanged(dsVideoZoom_t zoomSetting)
{
/* If client needs to handle this event, they should override this method */
INT_WARN("Base impl of OnZoomSettingsChanged called. zoomSetting: %d", zoomSetting);
}

/* virtual */ void Host::IVideoOutputPortEvents::OnResolutionPreChange(int width, int height)
{
/* If client needs to handle this event, they should override this method */
INT_WARN("Base impl of OnResolutionPreChange called. width: %d, height: %d", width, height);
}

/* virtual */ void Host::IVideoOutputPortEvents::OnResolutionPostChange(int width, int height)
{
/* If client needs to handle this event, they should override this method */
INT_WARN("Base impl of OnResolutionPostChange called. width: %d, height: %d", width, height);
}

/* virtual */ void Host::IVideoOutputPortEvents::OnHDCPStatusChange(dsHdcpStatus_t hdcpStatus)
{
/* If client needs to handle this event, they should override this method */
INT_WARN("Base impl of OnHDCPStatusChange called. hdcpStatus: %d", hdcpStatus);
}

/* virtual */ void Host::IVideoOutputPortEvents::OnVideoFormatUpdate(dsHDRStandard_t videoFormatHDR)
{
/* If client needs to handle this event, they should override this method */
INT_WARN("Base impl of OnVideoFormatUpdate called. videoFormatHDR: %d", videoFormatHDR);
}

/* virtual */ void Host::IAudioOutputPortEvents::OnAssociatedAudioMixingChanged(bool mixing)
{
/* If client needs to handle this event, they should override this method */
INT_WARN("Base impl of OnAssociatedAudioMixingChanged called. mixing: %d", mixing);
}
/* virtual */ void Host::IAudioOutputPortEvents::OnAudioFaderControlChanged(int mixerBalance)
{
/* If client needs to handle this event, they should override this method */
INT_WARN("Base impl of OnAudioFaderControlChanged called. mixerBalance: %d", mixerBalance);
}
/* virtual */ void Host::IAudioOutputPortEvents::OnAudioPrimaryLanguageChanged(const std::string& primaryLanguage)
{
/* If client needs to handle this event, they should override this method */
INT_WARN("Base impl of OnAudioPrimaryLanguageChanged called. primaryLanguage: %s", primaryLanguage.c_str());
}

/* virtual */ void Host::IAudioOutputPortEvents::OnAudioSecondaryLanguageChanged(const std::string& secondaryLanguage)
{
/* If client needs to handle this event, they should override this method */
INT_WARN("Base impl of OnAudioSecondaryLanguageChanged called. secondaryLanguage: %s", secondaryLanguage.c_str());
}

/* virtual */ void Host::IAudioOutputPortEvents::OnAudioOutHotPlug(dsAudioPortType_t portType, uint32_t uiPortNumber, bool isPortConnected)
{
/* If client needs to handle this event, they should override this method */
INT_WARN("Base impl of OnAudioOutHotPlug called. portType: %d, uiPortNumber: %d, isPortConnected: %d", portType, uiPortNumber, isPortConnected);
}

/* virtual */ void Host::IAudioOutputPortEvents::OnDolbyAtmosCapabilitiesChanged(dsATMOSCapability_t atmosCapability, bool status)
{
/* If client needs to handle this event, they should override this method */
INT_WARN("Base impl of OnDolbyAtmosCapabilitiesChanged called. atmosCapability: %d, status: %d", atmosCapability, status);
}

// TODO: requires dsMgr.h header include ??
// void Host::IAudioOutputPortEvents::OnAudioPortStateChanged(dsAudioPortState_t audioPortState) { }

/* virtual */ void Host::IAudioOutputPortEvents::OnAudioModeEvent(dsAudioPortType_t audioPortType, dsAudioStereoMode_t audioStereoMode)
{
/* If client needs to handle this event, they should override this method */
INT_WARN("Base impl of OnAudioModeEvent called. audioPortType: %d, audioStereoMode: %d", audioPortType, audioStereoMode);
}

/* virtual */ void Host::IAudioOutputPortEvents::OnAudioLevelChangedEvent(int audioLevel)
{
/* If client needs to handle this event, they should override this method */
INT_WARN("Base impl of OnAudioLevelChangedEvent called. audioLevel: %d", audioLevel);
}

/* virtual */ void Host::IAudioOutputPortEvents::OnAudioFormatUpdate(dsAudioFormat_t audioFormat)
{
/* If client needs to handle this event, they should override this method */
INT_WARN("Base impl of OnAudioFormatUpdate called. audioFormat: %d", audioFormat);
}

/* virtual */ void Host::IDisplayDeviceEvents::OnDisplayHDMIHotPlug(dsDisplayEvent_t displayEvent)
{
/* If client needs to handle this event, they should override this method */
INT_WARN("Base impl of OnDisplayHDMIHotPlug called. displayEvent: %d", displayEvent);
}
/* virtual */ void Host::ICompositeInEvents::OnCompositeInHotPlug(dsCompositeInPort_t port, bool isConnected)
{
/* If client needs to handle this event, they should override this method */
INT_WARN("Base impl of OnCompositeInHotPlug called. port: %d isConnected %d", port, isConnected);
}

/* virtual */ void Host::ICompositeInEvents::OnCompositeInSignalStatus(dsCompositeInPort_t port, dsCompInSignalStatus_t signalStatus)
{
/* If client needs to handle this event, they should override this method */
INT_WARN("Base impl of OnCompositeInSignalStatus called. port: %d signalStatus %d", port, signalStatus);
}

/* virtual */ void Host::ICompositeInEvents::OnCompositeInStatus(dsCompositeInPort_t activePort, bool isPresented)
{
/* If client needs to handle this event, they should override this method */
INT_WARN("Base impl of OnCompositeInStatus called. activePort: %d isPresented %d", activePort, isPresented);
}
/* virtual */ void Host::ICompositeInEvents::OnCompositeInVideoModeUpdate(dsCompositeInPort_t activePort, dsVideoPortResolution_t videoResolution)
{
/* If client needs to handle this event, they should override this method */
INT_WARN("Base impl of OnCompositeInVideoModeUpdate called. activePort: %d videoResolution %d", activePort, videoResolution.pixelResolution);
}

/* virtual */ void Host::IDisplayEvents::OnDisplayRxSense(dsDisplayEvent_t displayEvent)
{
/* If client needs to handle this event, they should override this method */
INT_WARN("Base impl of OnDisplayRxSense called. displayEvent: %d ", displayEvent);
}
/* virtual */ void Host::IDisplayEvents::OnDisplayHDCPStatus()
{
/* If client needs to handle this event, they should override this method */
INT_WARN("Base impl of OnDisplayHDCPStatus called. ");
}


dsError_t Host::Register(IHDMIInEvents *listener)
{
return dsERR_NONE;
}

dsError_t Host::UnRegister(IHDMIInEvents *listener)
{
return dsERR_NONE;
}

dsError_t Host::Register(ICompositeInEvents *listener)
{
return dsERR_NONE;
}

dsError_t Host::UnRegister(ICompositeInEvents *listener)
{
return dsERR_NONE;
}

dsError_t Host::Register(IDisplayEvents *listener)
{
return dsERR_NONE;
}

dsError_t Host::UnRegister(IDisplayEvents *listener)
{
return dsERR_NONE;
}

dsError_t Host::Register(IVideoDeviceEvents* listener)
{
return dsERR_NONE;
}

dsError_t Host::UnRegister(IVideoDeviceEvents* listener)
{
return dsERR_NONE;
}

dsError_t Host::Register(IVideoOutputPortEvents* listener)
{
return dsERR_NONE;
}

dsError_t Host::UnRegister(IVideoOutputPortEvents* listener)
{
return dsERR_NONE;
}

dsError_t Host::Register(IAudioOutputPortEvents* listener)
{
return dsERR_NONE;
}

dsError_t Host::UnRegister(IAudioOutputPortEvents* listener)
{
return dsERR_NONE;
}

dsError_t Host::Register(IDisplayDeviceEvents* listener)
{
return dsERR_NONE;
}

dsError_t Host::UnRegister(IDisplayDeviceEvents* listener)
{
return dsERR_NONE;
}


/** @} */

}



/** @} */
/** @} */
Loading
Loading