Skip to content

Commit

Permalink
Merge pull request rdkcentral#4607 from rwarier/main
Browse files Browse the repository at this point in the history
DELIA-63701 - Add RFC to control ResourceManager TTS API
  • Loading branch information
anand-ky authored Nov 8, 2023
2 parents 91524a5 + 5ecefdc commit a7ebe33
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
4 changes: 4 additions & 0 deletions ResourceManager/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ All notable changes to this RDK Service will be documented in this file.

* For more details, refer to [versioning](https://github.com/rdkcentral/rdkservices#versioning) section under Main README.

## [1.0.1] - 2023-11-08
### Changed
- Added an RFC to control reserveTTS API

## [1.0.0] - 2023-07-06
### Added
- Add CHANGELOG
Expand Down
14 changes: 9 additions & 5 deletions ResourceManager/ResourceManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#define API_VERSION_NUMBER_MAJOR 1
#define API_VERSION_NUMBER_MINOR 0
#define API_VERSION_NUMBER_PATCH 0
#define API_VERSION_NUMBER_PATCH 1

static std::string sThunderSecurityToken;
//methods
Expand Down Expand Up @@ -62,13 +62,17 @@ namespace WPEFramework {
std::cout<<"EssRMgrCreate "<<((mEssRMgr != nullptr)?"succeeded":"failed")<<std::endl;

RFC_ParamData_t param;

mDisableBlacklist = true;
mDisableReserveTTS = true;

if (true == Utils::getRFCConfig("Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.Resourcemanager.Blacklist.Enable", param))
{
mDisableBlacklist = ((param.type == WDMP_BOOLEAN) && (strncasecmp(param.value, "false", 5) == 0));
}
if (true == Utils::getRFCConfig("Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.Resourcemanager.ReserveTTS.Enable", param))
{
mDisableReserveTTS = ((param.type == WDMP_BOOLEAN) && (strncasecmp(param.value, "false", 5) == 0));
}

#else
std::cout<<"ENABLE_ERM not defined"<<std::endl;
Expand Down Expand Up @@ -194,7 +198,7 @@ namespace WPEFramework {
LOGINFOMETHOD();
bool status = false;

if ((parameters.HasLabel("appid")) && (false == mDisableBlacklist))
if ((parameters.HasLabel("appid")) && (false == mDisableReserveTTS))
{
std::string app = parameters["appid"].String();
std::cout<<"appid : "<< app << std::endl;
Expand All @@ -203,10 +207,10 @@ namespace WPEFramework {
}
else
{
if (mDisableBlacklist)
if (mDisableReserveTTS)
{
status = true;
response["message"] = "Blacklist RFC is disabled";
response["message"] = "ReserveTTS RFC is disabled";
}
else
{
Expand Down
1 change: 1 addition & 0 deletions ResourceManager/ResourceManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ namespace WPEFramework {

EssRMgr* mEssRMgr;
bool mDisableBlacklist;
bool mDisableReserveTTS;
PluginHost::IShell* mCurrentService;
std::map<std::string, bool> mAppsAVBlacklistStatus;

Expand Down

0 comments on commit a7ebe33

Please sign in to comment.