@@ -865,23 +865,23 @@ void AampConfig::ApplyDeviceCapabilities()
865865 SetConfigValue (AAMP_DEFAULT_SETTING, eAAMPConfig_UseSecManager, isSecMgr);
866866}
867867
868- std::string AampConfig::GetUserAgentString ()
868+ std::string AampConfig::GetUserAgentString () const
869869{
870870 return std::string (configValueString[eAAMPConfig_UserAgent].value );
871871}
872872
873873/* *
874874 * @brief Gets the boolean configuration value
875875 */
876- bool AampConfig::IsConfigSet (AAMPConfigSettingBool cfg)
876+ bool AampConfig::IsConfigSet (AAMPConfigSettingBool cfg) const
877877{ if (cfg < AAMPCONFIG_BOOL_COUNT)
878878 {
879879 return configValueBool[cfg].value ;
880880 }
881881 return false ;
882882}
883883
884- bool AampConfig::GetConfigValue ( AAMPConfigSettingBool cfg )
884+ bool AampConfig::GetConfigValue ( AAMPConfigSettingBool cfg ) const
885885{
886886 if (cfg < AAMPCONFIG_BOOL_COUNT)
887887 {
@@ -893,7 +893,7 @@ bool AampConfig::GetConfigValue( AAMPConfigSettingBool cfg )
893893 * @brief GetConfigValue - Gets configuration for integer data type
894894 *
895895 */
896- int AampConfig::GetConfigValue (AAMPConfigSettingInt cfg)
896+ int AampConfig::GetConfigValue (AAMPConfigSettingInt cfg) const
897897{
898898 if (cfg < AAMPCONFIG_INT_COUNT)
899899 {
@@ -905,7 +905,7 @@ int AampConfig::GetConfigValue(AAMPConfigSettingInt cfg)
905905 * @brief GetConfigValue - Gets configuration for double data type
906906 *
907907 */
908- double AampConfig::GetConfigValue (AAMPConfigSettingFloat cfg)
908+ double AampConfig::GetConfigValue (AAMPConfigSettingFloat cfg) const
909909{
910910 if (cfg < AAMPCONFIG_FLOAT_COUNT)
911911 {
@@ -918,7 +918,7 @@ double AampConfig::GetConfigValue(AAMPConfigSettingFloat cfg)
918918 * @brief GetConfigValue - Gets configuration for string data type
919919 *
920920 */
921- std::string AampConfig::GetConfigValue (AAMPConfigSettingString cfg)
921+ std::string AampConfig::GetConfigValue (AAMPConfigSettingString cfg) const
922922{
923923 if (cfg < AAMPCONFIG_STRING_COUNT)
924924 {
@@ -932,19 +932,19 @@ std::string AampConfig::GetConfigValue(AAMPConfigSettingString cfg)
932932 *
933933 * @return ConfigPriority - owner of the config
934934 */
935- ConfigPriority AampConfig::GetConfigOwner (AAMPConfigSettingBool cfg)
935+ ConfigPriority AampConfig::GetConfigOwner (AAMPConfigSettingBool cfg) const
936936{
937937 return configValueBool[cfg].owner ;
938938}
939- ConfigPriority AampConfig::GetConfigOwner (AAMPConfigSettingInt cfg)
939+ ConfigPriority AampConfig::GetConfigOwner (AAMPConfigSettingInt cfg) const
940940{
941941 return configValueInt[cfg].owner ;
942942}
943- ConfigPriority AampConfig::GetConfigOwner (AAMPConfigSettingFloat cfg)
943+ ConfigPriority AampConfig::GetConfigOwner (AAMPConfigSettingFloat cfg) const
944944{
945945 return configValueFloat[cfg].owner ;
946946}
947- ConfigPriority AampConfig::GetConfigOwner (AAMPConfigSettingString cfg)
947+ ConfigPriority AampConfig::GetConfigOwner (AAMPConfigSettingString cfg) const
948948{
949949 return configValueString[cfg].owner ;
950950}
@@ -954,13 +954,13 @@ ConfigPriority AampConfig::GetConfigOwner(AAMPConfigSettingString cfg)
954954 *
955955 * @return true - if valid return
956956 */
957- const char * AampConfig::GetChannelOverride (const std::string manifestUrl)
957+ const char * AampConfig::GetChannelOverride (const std::string manifestUrl) const
958958{
959959 if (mChannelOverrideMap .size () && manifestUrl.size ())
960960 {
961961 for (auto it = mChannelOverrideMap .begin (); it != mChannelOverrideMap .end (); ++it)
962962 {
963- ConfigChannelInfo &pChannelInfo = *it;
963+ const ConfigChannelInfo &pChannelInfo = *it;
964964 if (manifestUrl.find (pChannelInfo.name ) != std::string::npos)
965965 {
966966 return pChannelInfo.uri .c_str ();
@@ -975,13 +975,13 @@ const char * AampConfig::GetChannelOverride(const std::string manifestUrl)
975975 *
976976 * @return true - if valid return
977977 */
978- const char * AampConfig::GetChannelLicenseOverride (const std::string manifestUrl)
978+ const char * AampConfig::GetChannelLicenseOverride (const std::string manifestUrl) const
979979{
980980 if (mChannelOverrideMap .size () && manifestUrl.size ())
981981 {
982982 for (auto it = mChannelOverrideMap .begin (); it != mChannelOverrideMap .end (); ++it)
983983 {
984- ConfigChannelInfo &pChannelInfo = *it;
984+ const ConfigChannelInfo &pChannelInfo = *it;
985985 if (manifestUrl.find (pChannelInfo.uri ) != std::string::npos)
986986 {
987987 if (!pChannelInfo.licenseUri .empty ())
@@ -1347,7 +1347,7 @@ bool AampConfig::CustomSearch( std::string url, int playerId , std::string appna
13471347 *
13481348 * @return true
13491349 */
1350- bool AampConfig::GetAampConfigJSONStr (std::string &str)
1350+ bool AampConfig::GetAampConfigJSONStr (std::string &str) const
13511351{
13521352 AampJsonObject jsondata;
13531353
@@ -1406,7 +1406,7 @@ void AampConfig::ProcessConfigText(std::string &cfg, ConfigPriority owner )
14061406 while (getline (iss, token, ' ' ))
14071407 {
14081408 const char *uri = token.c_str ();
1409- if ( PlayerInstanceAAMP::isTuneScheme (uri) )
1409+ if ( aamp_isTuneScheme (uri) )
14101410 {
14111411 AAMPLOG_INFO (" Override %s" , uri );
14121412 channelInfo.uri = token;
@@ -1911,19 +1911,19 @@ void AampConfig::DoCustomSetting(ConfigPriority owner)
19111911 ConfigureLogSettings ();
19121912}
19131913
1914- const char * AampConfig::GetConfigName (AAMPConfigSettingBool cfg )
1914+ const char * AampConfig::GetConfigName (AAMPConfigSettingBool cfg ) const
19151915{
19161916 return mConfigLookupTableBool [cfg].cmdString ;
19171917}
1918- const char * AampConfig::GetConfigName (AAMPConfigSettingInt cfg )
1918+ const char * AampConfig::GetConfigName (AAMPConfigSettingInt cfg ) const
19191919{
19201920 return mConfigLookupTableInt [cfg].cmdString ;
19211921}
1922- const char * AampConfig::GetConfigName (AAMPConfigSettingFloat cfg )
1922+ const char * AampConfig::GetConfigName (AAMPConfigSettingFloat cfg ) const
19231923{
19241924 return mConfigLookupTableFloat [cfg].cmdString ;
19251925}
1926- const char *AampConfig::GetConfigName (AAMPConfigSettingString cfg )
1926+ const char *AampConfig::GetConfigName (AAMPConfigSettingString cfg ) const
19271927{
19281928 return mConfigLookupTableString [cfg].cmdString ;
19291929}
0 commit comments