RDK Documentation (Open Sourced RDK Components)
|
AAMP Config Class defn. More...
#include <AampConfig.h>
Public Member Functions | |
AampConfig () | |
AampConfig Constructor function . Default values defined. More... | |
~AampConfig () | |
AampConfig Distructor function. More... | |
AampConfig (const AampConfig &)=delete | |
Copy constructor disabled. More... | |
AampConfig & | operator= (const AampConfig &) |
AampConfig Copy Constructor function. | |
void | Initialize () |
void | ReadDeviceCapability () |
void | ShowOperatorSetConfiguration () |
ShowOperatorSetConfiguration - List all operator configured settings. More... | |
void | ShowAppSetConfiguration () |
ShowAppSetConfiguration - List all Application configured settings. More... | |
void | ShowStreamSetConfiguration () |
ShowStreamSetConfiguration - List all stream configured settings. More... | |
void | ShowDefaultAampConfiguration () |
ShowDefaultAampConfiguration - List all AAMP Default settings. More... | |
void | ShowDevCfgConfiguration () |
ShowDevCfgConfiguration - List all developer configured settings. More... | |
void | ShowAAMPConfiguration () |
ShowAAMPConfiguration - Show all settings for every owner. More... | |
bool | ReadAampCfgTxtFile () |
ReadAampCfgTxtFile - Function to parse and process configuration file in text format. More... | |
bool | ReadAampCfgJsonFile () |
ReadAampCfgJsonFile - Function to parse and process configuration file in json format. More... | |
void | ReadOperatorConfiguration () |
ReadOperatorConfiguration - Reads Operator configuration from RFC and env variables. More... | |
void | ReadBase64TR181Param () |
void | ReadAllTR181Params () |
void | ParseAampCfgTxtString (std::string &cfg) |
ParseAampCfgTxtString - It parses the aamp configuration. More... | |
void | ParseAampCfgJsonString (std::string &cfg) |
ParseAampCfgJsonString - It parses the aamp configuration from json format. More... | |
void | ToggleConfigValue (ConfigPriority owner, AAMPConfigSettings cfg) |
ToggleConfigValue - Toggle Boolean configuration. More... | |
template<typename T > | |
void | SetConfigValue (ConfigPriority owner, AAMPConfigSettings cfg, const T &value) |
SetConfigValue - Set function to set bool/int/long data type configuration. More... | |
bool | IsConfigSet (AAMPConfigSettings cfg) |
Gets the boolean configuration value. More... | |
bool | GetConfigValue (AAMPConfigSettings cfg, std::string &value) |
GetConfigValue - Gets configuration for string data type. More... | |
bool | GetConfigValue (AAMPConfigSettings cfg, long &value) |
GetConfigValue - Gets configuration for long data type. More... | |
bool | GetConfigValue (AAMPConfigSettings cfg, double &value) |
GetConfigValue - Gets configuration for double data type. More... | |
bool | GetConfigValue (AAMPConfigSettings cfg, int &value) |
GetConfigValue - Gets configuration for integer data type. More... | |
ConfigPriority | GetConfigOwner (AAMPConfigSettings cfg) |
GetConfigOwner - Gets configuration Owner. More... | |
const char * | GetChannelOverride (const std::string chName) |
GetChannelOverride - Gets channel override url for channel Name. More... | |
const char * | GetChannelLicenseOverride (const std::string chName) |
GetChannelLicenseOverride - Gets channel License override url for channel Url. More... | |
bool | ProcessConfigJson (const char *cfg, ConfigPriority owner) |
ProcessConfigJson - Function to parse and process json configuration string. More... | |
bool | ProcessConfigJson (const cJSON *cfgdata, ConfigPriority owner) |
ProcessConfigJson - Function to parse and process json configuration string. More... | |
bool | ProcessConfigText (std::string &cfg, ConfigPriority owner) |
ProcessConfigText - Function to parse and process configuration text. More... | |
void | RestoreConfiguration (ConfigPriority owner, AampLogManager *mLogObj) |
RestoreConfiguration - Function is restore last configuration value from current ownership. More... | |
void | ConfigureLogSettings () |
ConfigureLogSettings - This function configures log settings for LogManager instance. More... | |
bool | GetAampConfigJSONStr (std::string &str) |
GetAampConfigJSONStr - Function to Complete Config as JSON str. More... | |
bool | GetDeveloperConfigData (std::string &key, std::string &value) |
GetDeveloperConfigData - Function to parse and process configuration text. More... | |
void | DoCustomSetting (ConfigPriority owner) |
DoCustomSetting - Function to do override , to avoid complexity with multiple configs. More... | |
void | CustomArrayRead (cJSON *customArray, ConfigPriority owner) |
CustomArrayRead - Function to Read Custom JSON Array. More... | |
bool | CustomSearch (std::string url, int playerId, std::string appname) |
CustomSearch - Function to apply custom search. More... | |
AampLogManager * | GetLoggerInstance () |
std::string | GetUserAgentString () |
template<> | |
void | SetConfigValue (ConfigPriority owner, AAMPConfigSettings cfg, const std::string &value) |
SetConfigValue - Set function to set string data type configuration. More... | |
Data Fields | |
AampLogManager | logging |
AampLogManager * | mLogObj |
Private Types | |
typedef std::map< std::string, AampConfigLookupEntry > | LookUp |
typedef std::map< std::string, AampConfigLookupEntry >::iterator | LookUpIter |
typedef std::map< std::string, std::string > | DevCmds |
typedef std::map< std::string, std::string >::iterator | DevCmdsIter |
typedef std::list< ConfigChannelInfo > | ChannelMap |
typedef std::list< ConfigChannelInfo >::iterator | ChannelMapIter |
Private Member Functions | |
template<class J , class K > | |
void | SetValue (J &setting, ConfigPriority newowner, const K &value, std::string cfgName) |
SetValue - Function to store the configuration and ownership based on priority set. More... | |
void | trim (std::string &src) |
char * | GetTR181AAMPConfig (const char *paramName, size_t &iConfigLen) |
template<typename T > | |
bool | ReadNumericHelper (std::string valStr, T &value) |
ReadNumericHelper - Parse helper function. More... | |
void | ShowConfiguration (ConfigPriority owner) |
ShowConfiguration - Function to list configration values based on the owner. More... | |
std::string | GetConfigName (AAMPConfigSettings cfg) |
GetConfigName - Function to get configuration name for enum from lookup table. More... | |
template<typename T > | |
bool | ValidateRange (std::string key, T &value) |
Private Attributes | |
LookUp | mAampLookupTable |
DevCmds | mAampDevCmdTable |
std::vector< struct customJson > | vCustom |
std::vector< struct customJson >::iterator | vCustomIt |
bool | customFound |
ConfigBool | bAampCfgValue [eAAMPConfig_BoolMaxValue] |
ConfigInt | iAampCfgValue [eAAMPConfig_IntMaxValue-eAAMPConfig_IntStartValue] |
ConfigLong | lAampCfgValue [eAAMPConfig_LongMaxValue-eAAMPConfig_LongStartValue] |
ConfigDouble | dAampCfgValue [eAAMPConfig_DoubleMaxValue-eAAMPConfig_DoubleStartValue] |
ConfigString | sAampCfgValue [eAAMPConfig_StringMaxValue-eAAMPConfig_StringStartValue] |
ChannelMap | mChannelOverrideMap |
AAMP Config Class defn.
Definition at line 457 of file AampConfig.h.
AampConfig::AampConfig | ( | ) |
AampConfig Constructor function . Default values defined.
Definition at line 305 of file AampConfig.cpp.
|
inline |
|
delete |
Copy constructor disabled.
void AampConfig::ReadDeviceCapability | ( | ) |
Definition at line 609 of file AampConfig.cpp.
void AampConfig::ShowOperatorSetConfiguration | ( | ) |
ShowOperatorSetConfiguration - List all operator configured settings.
Definition at line 1909 of file AampConfig.cpp.
AampConfig::ShowAppSetConfiguration | ( | ) |
ShowAppSetConfiguration - List all Application configured settings.
Definition at line 1918 of file AampConfig.cpp.
AampConfig::ShowStreamSetConfiguration | ( | ) |
ShowStreamSetConfiguration - List all stream configured settings.
Definition at line 1927 of file AampConfig.cpp.
AampConfig::ShowDefaultAampConfiguration | ( | ) |
ShowDefaultAampConfiguration - List all AAMP Default settings.
Definition at line 1938 of file AampConfig.cpp.
void AampConfig::ShowDevCfgConfiguration | ( | ) |
ShowDevCfgConfiguration - List all developer configured settings.
Definition at line 1947 of file AampConfig.cpp.
AampConfig::ShowAAMPConfiguration | ( | ) |
ShowAAMPConfiguration - Show all settings for every owner.
Definition at line 1957 of file AampConfig.cpp.
bool AampConfig::ReadAampCfgTxtFile | ( | ) |
ReadAampCfgTxtFile - Function to parse and process configuration file in text format.
Definition at line 1574 of file AampConfig.cpp.
bool AampConfig::ReadAampCfgJsonFile | ( | ) |
ReadAampCfgJsonFile - Function to parse and process configuration file in json format.
Definition at line 1523 of file AampConfig.cpp.
void AampConfig::ReadOperatorConfiguration | ( | ) |
ReadOperatorConfiguration - Reads Operator configuration from RFC and env variables.
Definition at line 1789 of file AampConfig.cpp.
void AampConfig::ParseAampCfgTxtString | ( | std::string & | cfg | ) |
ParseAampCfgTxtString - It parses the aamp configuration.
void AampConfig::ParseAampCfgJsonString | ( | std::string & | cfg | ) |
ParseAampCfgJsonString - It parses the aamp configuration from json format.
AampConfig::ToggleConfigValue | ( | ConfigPriority | owner, |
AAMPConfigSettings | cfg | ||
) |
ToggleConfigValue - Toggle Boolean configuration.
[in] | owner | - ownership of new set call |
[in] | cfg | - Configuration enum to set |
Definition at line 809 of file AampConfig.cpp.
void AampConfig::SetConfigValue | ( | ConfigPriority | owner, |
AAMPConfigSettings | cfg, | ||
const T & | value | ||
) |
SetConfigValue - Set function to set bool/int/long data type configuration.
CAUTION !!!! STOP !!! Read this before you proceed !!!!!!! /////////////
Definition at line 830 of file AampConfig.cpp.
bool AampConfig::IsConfigSet | ( | AAMPConfigSettings | cfg | ) |
Gets the boolean configuration value.
[in] | cfg | - Configuration enum |
Definition at line 649 of file AampConfig.cpp.
bool AampConfig::GetConfigValue | ( | AAMPConfigSettings | cfg, |
std::string & | value | ||
) |
GetConfigValue - Gets configuration for string data type.
Definition at line 748 of file AampConfig.cpp.
bool AampConfig::GetConfigValue | ( | AAMPConfigSettings | cfg, |
long & | value | ||
) |
GetConfigValue - Gets configuration for long data type.
Definition at line 716 of file AampConfig.cpp.
bool AampConfig::GetConfigValue | ( | AAMPConfigSettings | cfg, |
double & | value | ||
) |
GetConfigValue - Gets configuration for double data type.
Definition at line 732 of file AampConfig.cpp.
bool AampConfig::GetConfigValue | ( | AAMPConfigSettings | cfg, |
int & | value | ||
) |
GetConfigValue - Gets configuration for integer data type.
Definition at line 664 of file AampConfig.cpp.
ConfigPriority AampConfig::GetConfigOwner | ( | AAMPConfigSettings | cfg | ) |
GetConfigOwner - Gets configuration Owner.
[in] | cfg | - configuration enum |
Definition at line 680 of file AampConfig.cpp.
const char * AampConfig::GetChannelOverride | ( | const std::string | manifestUrl | ) |
GetChannelOverride - Gets channel override url for channel Name.
[in] | chName | - channel name to search |
Definition at line 764 of file AampConfig.cpp.
const char * AampConfig::GetChannelLicenseOverride | ( | const std::string | manifestUrl | ) |
GetChannelLicenseOverride - Gets channel License override url for channel Url.
[in] | chName | - channel Name to override |
Definition at line 785 of file AampConfig.cpp.
bool AampConfig::ProcessConfigJson | ( | const char * | jsonbuffer, |
ConfigPriority | owner | ||
) |
ProcessConfigJson - Function to parse and process json configuration string.
Definition at line 889 of file AampConfig.cpp.
bool AampConfig::ProcessConfigJson | ( | const cJSON * | cfgdata, |
ConfigPriority | owner | ||
) |
ProcessConfigJson - Function to parse and process json configuration string.
Definition at line 906 of file AampConfig.cpp.
AampConfig::ProcessConfigText | ( | std::string & | cfg, |
ConfigPriority | owner | ||
) |
ProcessConfigText - Function to parse and process configuration text.
[in] | cfg | - config text ( new line separated) |
[in] | owner | - Owner who is setting the value |
Definition at line 1347 of file AampConfig.cpp.
void AampConfig::RestoreConfiguration | ( | ConfigPriority | owner, |
AampLogManager * | mLogObj | ||
) |
RestoreConfiguration - Function is restore last configuration value from current ownership.
[in] | owner | - Owner value for reverting |
Definition at line 2147 of file AampConfig.cpp.
AampConfig::ConfigureLogSettings | ( | ) |
ConfigureLogSettings - This function configures log settings for LogManager instance.
Definition at line 1859 of file AampConfig.cpp.
bool AampConfig::GetAampConfigJSONStr | ( | std::string & | str | ) |
GetAampConfigJSONStr - Function to Complete Config as JSON str.
[in] | str | - input string where config json will be stored |
Definition at line 1287 of file AampConfig.cpp.
AampConfig::GetDeveloperConfigData | ( | std::string & | key, |
std::string & | value | ||
) |
GetDeveloperConfigData - Function to parse and process configuration text.
[in] | key | - key string to parse |
[in] | value | - value read from input string |
Definition at line 1330 of file AampConfig.cpp.
void AampConfig::DoCustomSetting | ( | ConfigPriority | owner | ) |
DoCustomSetting - Function to do override , to avoid complexity with multiple configs.
[in] | owner | - ConfigPriority owner |
Definition at line 1993 of file AampConfig.cpp.
AampConfig::CustomArrayRead | ( | cJSON * | customArray, |
ConfigPriority | owner | ||
) |
CustomArrayRead - Function to Read Custom JSON Array.
[in] | customArray | - input string where custom config json will be stored |
[in] | owner | - ownership of configs will be stored |
Definition at line 1070 of file AampConfig.cpp.
bool AampConfig::CustomSearch | ( | std::string | url, |
int | playerId, | ||
std::string | appname | ||
) |
CustomSearch - Function to apply custom search.
[in] | url | - input string where url name will be stored |
[in] | playerId | - input int variable where playerId will be stored |
[in] | appname | - input string where appname will be stored |
Definition at line 1142 of file AampConfig.cpp.
|
private |
SetValue - Function to store the configuration and ownership based on priority set.
[in] | setting | - Config variable to set |
[in] | newowner | - New owner value |
[in] | value | - Value to set |
Definition at line 2062 of file AampConfig.cpp.
|
private |
[in] | paramName | - Parameter Name to parse |
[in] | iConfigLen | - Length of the configuration |
|
private |
ReadNumericHelper - Parse helper function.
[in] | valStr | - string input to convert |
[out] | value | - coverted output |
Definition at line 2294 of file AampConfig.cpp.
|
private |
ShowConfiguration - Function to list configration values based on the owner.
[in] | owner | - Owner value for listing |
Definition at line 2225 of file AampConfig.cpp.
|
private |
GetConfigName - Function to get configuration name for enum from lookup table.
[in] | cfg | - configuration enum |
Definition at line 2087 of file AampConfig.cpp.
void AampConfig::SetConfigValue | ( | ConfigPriority | owner, |
AAMPConfigSettings | cfg, | ||
const std::string & | value | ||
) |
SetConfigValue - Set function to set string data type configuration.
Definition at line 872 of file AampConfig.cpp.
AampLogManager AampConfig::logging |
Aamp log manager class
Definition at line 462 of file AampConfig.h.
|
private |
Stores bool configuration
Definition at line 745 of file AampConfig.h.
|
private |
Stores int configuration
Definition at line 746 of file AampConfig.h.
|
private |
Stores long configuration
Definition at line 747 of file AampConfig.h.
|
private |
Stores double configuration
Definition at line 748 of file AampConfig.h.
|
private |
Stores string configuration
Definition at line 749 of file AampConfig.h.