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
13 changes: 2 additions & 11 deletions ds/host.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* 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, 528 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
*
Expand Down Expand Up @@ -103,7 +103,7 @@
return instance;
}


#if 0
/**
* @fn void Host::addPowerModeListener(PowerModeChangeListener *l)
* @brief This API is used to register listeners for Power Mode change event.
Expand Down Expand Up @@ -231,16 +231,7 @@
}
}

void Host::notifyDisplayConnectionChange (int portHandle, bool newConnectionStatus)
{
std::list < DisplayConnectionChangeListener* > ::iterator it;
for ( it = dispEvntListeners.begin() ; it != dispEvntListeners.end(); it++ )
{
(*it)->displayConnectionChanged(getVideoOutputPort(portHandle), newConnectionStatus);
getVideoOutputPort(portHandle).setDisplayConnected(newConnectionStatus);
}
}

#endif

/**
* @fn bool Host::setPowerMode(int mode)
Expand Down
6 changes: 3 additions & 3 deletions ds/include/host.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,12 @@ class Host {
SleepMode getPreferredSleepMode();
int setPreferredSleepMode(const SleepMode);
List <SleepMode> getAvailableSleepModes();
void addPowerModeListener(PowerModeChangeListener *l);
#if 0
void addPowerModeListener(PowerModeChangeListener *l);
void removePowerModeChangeListener(PowerModeChangeListener *l);
void addDisplayConnectionListener(DisplayConnectionChangeListener *l);
void removeDisplayConnectionListener(DisplayConnectionChangeListener *l);

#endif
static Host& getInstance(void);

List<VideoOutputPort> getVideoOutputPorts();
Expand Down Expand Up @@ -113,7 +114,6 @@ class Host {

std::list < PowerModeChangeListener* > powerEvntListeners;
std::list < DisplayConnectionChangeListener* > dispEvntListeners;
void notifyDisplayConnectionChange(int portHandle, bool newConnectionStatus);
};

}
Expand Down
5 changes: 4 additions & 1 deletion test/testHost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,15 @@ BOOST_AUTO_TEST_CASE(test_Host)
device::Host::getInstance().setPowerMode(0);
device::Host::getInstance().getPowerMode();

#if 0
power p;
disp d;
device::Host::getInstance().addDisplayConnectionListener(&d);
device::Host::getInstance().addDisplayConnectionListener(&d);
device::Host::getInstance().removeDisplayConnectionListener(&d);
device::Host::getInstance().addPowerModeListener(&p);
device::Host::getInstance().removePowerModeChangeListener(&p);
#endif

}
}
catch(...) {
Expand Down
Loading