summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSho Amano <samano@xevo.com>2018-06-26 17:27:55 +0900
committerSho Amano <samano@xevo.com>2018-06-26 17:38:36 +0900
commitd34665c35bc4d959296511dd27e77ba2d5f709d5 (patch)
tree93a9aa9324b06af58700c7d0553e7038a4bbcfe5 /src
parent8fb9393b89093003c71833d6a8a9ba483b5d1773 (diff)
downloadsdl_core-d34665c35bc4d959296511dd27e77ba2d5f709d5.tar.gz
Rename some variables and function
Reflecting review comments.
Diffstat (limited to 'src')
-rw-r--r--src/components/application_manager/include/application_manager/application_manager_impl.h5
-rw-r--r--src/components/application_manager/src/application_manager_impl.cc5
-rw-r--r--src/components/application_manager/src/resumption/resume_ctrl_impl.cc2
-rw-r--r--src/components/application_manager/test/resumption/resume_ctrl_test.cc14
-rw-r--r--src/components/config_profile/include/config_profile/profile.h6
-rw-r--r--src/components/config_profile/src/profile.cc11
-rw-r--r--src/components/include/application_manager/application_manager_settings.h2
-rw-r--r--src/components/include/test/application_manager/mock_application_manager_settings.h3
8 files changed, 22 insertions, 26 deletions
diff --git a/src/components/application_manager/include/application_manager/application_manager_impl.h b/src/components/application_manager/include/application_manager/application_manager_impl.h
index da5e4794b3..9ef1210a02 100644
--- a/src/components/application_manager/include/application_manager/application_manager_impl.h
+++ b/src/components/application_manager/include/application_manager/application_manager_impl.h
@@ -1714,10 +1714,9 @@ class ApplicationManagerImpl
// This is a cache to remember DeviceHandle of secondary transports. Only used
// during RegisterApplication().
- typedef std::map<int32_t, connection_handler::DeviceHandle>
- SecondaryTransportDeviceMap;
+ typedef std::map<int32_t, connection_handler::DeviceHandle> DeviceMap;
- SecondaryTransportDeviceMap secondary_transport_devices_cache_;
+ DeviceMap secondary_transport_devices_cache_;
#ifdef TELEMETRY_MONITOR
AMTelemetryObserver* metric_observer_;
diff --git a/src/components/application_manager/src/application_manager_impl.cc b/src/components/application_manager/src/application_manager_impl.cc
index 1d3b8ac1b7..be78d8fb26 100644
--- a/src/components/application_manager/src/application_manager_impl.cc
+++ b/src/components/application_manager/src/application_manager_impl.cc
@@ -660,7 +660,7 @@ ApplicationSharedPtr ApplicationManagerImpl::RegisterApplication(
// instance.
// Also, make sure that this is done *after* we updated applications_ list to
// avoid timing issues.
- SecondaryTransportDeviceMap::iterator itr =
+ DeviceMap::iterator itr =
secondary_transport_devices_cache_.find(connection_key);
if (secondary_transport_devices_cache_.end() != itr) {
connection_handler::DeviceHandle secondary_device_handle = itr->second;
@@ -1800,8 +1800,7 @@ void ApplicationManagerImpl::OnSecondaryTransportEndedCallback(
const int32_t session_key) {
LOG4CXX_AUTO_TRACE(logger_);
- SecondaryTransportDeviceMap::iterator it =
- secondary_transport_devices_cache_.find(session_key);
+ DeviceMap::iterator it = secondary_transport_devices_cache_.find(session_key);
if (it == secondary_transport_devices_cache_.end()) {
LOG4CXX_WARN(
logger_,
diff --git a/src/components/application_manager/src/resumption/resume_ctrl_impl.cc b/src/components/application_manager/src/resumption/resume_ctrl_impl.cc
index d44342d875..7984512a61 100644
--- a/src/components/application_manager/src/resumption/resume_ctrl_impl.cc
+++ b/src/components/application_manager/src/resumption/resume_ctrl_impl.cc
@@ -937,7 +937,7 @@ mobile_apis::HMILevel::eType ResumeCtrlImpl::GetHmiLevelOnLowBandwidthTransport(
const std::string& level_for_projection_app =
settings.projection_lowbandwidth_resumption_level();
const std::string& level_for_media_app =
- settings.mediaapp_lowbandwidth_resumption_level();
+ settings.media_lowbandwidth_resumption_level();
HMILevel::eType result_level = HMILevel::HMI_NONE;
HMILevel::eType level;
diff --git a/src/components/application_manager/test/resumption/resume_ctrl_test.cc b/src/components/application_manager/test/resumption/resume_ctrl_test.cc
index f74424102b..b7a5cbcd33 100644
--- a/src/components/application_manager/test/resumption/resume_ctrl_test.cc
+++ b/src/components/application_manager/test/resumption/resume_ctrl_test.cc
@@ -86,7 +86,7 @@ class ResumeCtrlTest : public ::testing::Test {
, kDefaultDeferredTestLevel_(eType::INVALID_ENUM)
, kNaviLowbandwidthLevel_("LIMITED")
, kProjectionLowbandwidthLevel_("NONE")
- , kMediaappLowbandwidthLevel_("NONE") {}
+ , kMediaLowbandwidthLevel_("NONE") {}
virtual void SetUp() OVERRIDE {
Mock::VerifyAndClearExpectations(&app_mngr_);
@@ -124,9 +124,9 @@ class ResumeCtrlTest : public ::testing::Test {
.Times(AtLeast(0))
.WillRepeatedly(ReturnRef(kProjectionLowbandwidthLevel_));
EXPECT_CALL(mock_application_manager_settings_,
- mediaapp_lowbandwidth_resumption_level())
+ media_lowbandwidth_resumption_level())
.Times(AtLeast(0))
- .WillRepeatedly(ReturnRef(kMediaappLowbandwidthLevel_));
+ .WillRepeatedly(ReturnRef(kMediaLowbandwidthLevel_));
EXPECT_CALL(*app_mock_, deferred_resumption_hmi_level())
.Times(AtLeast(0))
@@ -167,7 +167,7 @@ class ResumeCtrlTest : public ::testing::Test {
const mobile_apis::HMILevel::eType kDefaultDeferredTestLevel_;
const std::string kNaviLowbandwidthLevel_;
const std::string kProjectionLowbandwidthLevel_;
- const std::string kMediaappLowbandwidthLevel_;
+ const std::string kMediaLowbandwidthLevel_;
};
/**
@@ -726,7 +726,7 @@ TEST_F(
std::string navi_lowbandwidth_level("NONE");
std::string projection_lowbandwidth_level("BACKGROUND");
- std::string mediaapp_lowbandwidth_level("LIMITED");
+ std::string media_lowbandwidth_level("LIMITED");
EXPECT_CALL(mock_application_manager_settings_,
navigation_lowbandwidth_resumption_level())
.WillRepeatedly(ReturnRef(navi_lowbandwidth_level));
@@ -734,8 +734,8 @@ TEST_F(
projection_lowbandwidth_resumption_level())
.WillRepeatedly(ReturnRef(projection_lowbandwidth_level));
EXPECT_CALL(mock_application_manager_settings_,
- mediaapp_lowbandwidth_resumption_level())
- .WillRepeatedly(ReturnRef(mediaapp_lowbandwidth_level));
+ media_lowbandwidth_resumption_level())
+ .WillRepeatedly(ReturnRef(media_lowbandwidth_level));
EXPECT_CALL(*app_mock_, deferred_resumption_hmi_level())
.WillRepeatedly(Return(restored_test_type));
diff --git a/src/components/config_profile/include/config_profile/profile.h b/src/components/config_profile/include/config_profile/profile.h
index 4cefcd378f..4c2be53228 100644
--- a/src/components/config_profile/include/config_profile/profile.h
+++ b/src/components/config_profile/include/config_profile/profile.h
@@ -673,9 +673,9 @@ class Profile : public protocol_handler::ProtocolHandlerSettings,
/**
* @brief Returns HMI level for resumption of a media app
*
- * Note: this is not for AppHMIType = MEDIA.
+ * Note: this is *not* for AppHMIType = MEDIA.
*/
- const std::string& mediaapp_lowbandwidth_resumption_level() const OVERRIDE;
+ const std::string& media_lowbandwidth_resumption_level() const OVERRIDE;
/**
* @brief Returns wait time after device connection
@@ -1000,7 +1000,7 @@ class Profile : public protocol_handler::ProtocolHandlerSettings,
transport_required_for_resumption_map_;
std::string navigation_lowbandwidth_resumption_level_;
std::string projection_lowbandwidth_resumption_level_;
- std::string mediaapps_lowbandwidth_resumption_level_;
+ std::string media_lowbandwidth_resumption_level_;
uint16_t app_launch_wait_time_;
uint16_t app_launch_max_retry_attempt_;
uint16_t app_launch_retry_wait_time_;
diff --git a/src/components/config_profile/src/profile.cc b/src/components/config_profile/src/profile.cc
index 71709d5a55..19f75203e5 100644
--- a/src/components/config_profile/src/profile.cc
+++ b/src/components/config_profile/src/profile.cc
@@ -471,8 +471,7 @@ Profile::Profile()
kDefaultLowBandwidthResumptionLevel)
, projection_lowbandwidth_resumption_level_(
kDefaultLowBandwidthResumptionLevel)
- , mediaapps_lowbandwidth_resumption_level_(
- kDefaultLowBandwidthResumptionLevel)
+ , media_lowbandwidth_resumption_level_(kDefaultLowBandwidthResumptionLevel)
, app_launch_wait_time_(kDefaultAppLaunchWaitTime)
, app_launch_max_retry_attempt_(kDefaultAppLaunchMaxRetryAttempt)
, app_launch_retry_wait_time_(kDefaultAppLaunchRetryWaitTime)
@@ -988,8 +987,8 @@ const std::string& Profile::projection_lowbandwidth_resumption_level() const {
return projection_lowbandwidth_resumption_level_;
}
-const std::string& Profile::mediaapp_lowbandwidth_resumption_level() const {
- return mediaapps_lowbandwidth_resumption_level_;
+const std::string& Profile::media_lowbandwidth_resumption_level() const {
+ return media_lowbandwidth_resumption_level_;
}
const uint16_t Profile::app_launch_max_retry_attempt() const {
@@ -2040,12 +2039,12 @@ void Profile::UpdateValues() {
kProjectionLowBandwidthResumptionLevelKey,
kLowBandwidthTransportResumptionLevelSection);
- ReadStringValue(&mediaapps_lowbandwidth_resumption_level_,
+ ReadStringValue(&media_lowbandwidth_resumption_level_,
kDefaultLowBandwidthResumptionLevel,
kLowBandwidthTransportResumptionLevelSection,
kMediaLowBandwidthResumptionLevelKey);
- LOG_UPDATED_VALUE(mediaapps_lowbandwidth_resumption_level_,
+ LOG_UPDATED_VALUE(media_lowbandwidth_resumption_level_,
kMediaLowBandwidthResumptionLevelKey,
kLowBandwidthTransportResumptionLevelSection);
diff --git a/src/components/include/application_manager/application_manager_settings.h b/src/components/include/application_manager/application_manager_settings.h
index d7f7267012..8f9d7496c8 100644
--- a/src/components/include/application_manager/application_manager_settings.h
+++ b/src/components/include/application_manager/application_manager_settings.h
@@ -95,7 +95,7 @@ class ApplicationManagerSettings : public RequestControlerSettings,
const = 0;
virtual const std::string& projection_lowbandwidth_resumption_level()
const = 0;
- virtual const std::string& mediaapp_lowbandwidth_resumption_level() const = 0;
+ virtual const std::string& media_lowbandwidth_resumption_level() const = 0;
virtual void set_config_file_name(const std::string& fileName) = 0;
virtual const std::pair<uint32_t, int32_t>& start_stream_retry_amount()
const = 0;
diff --git a/src/components/include/test/application_manager/mock_application_manager_settings.h b/src/components/include/test/application_manager/mock_application_manager_settings.h
index d91243ad41..735539156a 100644
--- a/src/components/include/test/application_manager/mock_application_manager_settings.h
+++ b/src/components/include/test/application_manager/mock_application_manager_settings.h
@@ -101,8 +101,7 @@ class MockApplicationManagerSettings
const std::string&());
MOCK_CONST_METHOD0(projection_lowbandwidth_resumption_level,
const std::string&());
- MOCK_CONST_METHOD0(mediaapp_lowbandwidth_resumption_level,
- const std::string&());
+ MOCK_CONST_METHOD0(media_lowbandwidth_resumption_level, const std::string&());
MOCK_METHOD1(set_config_file_name, void(const std::string& fileName));
// The following line won't really compile, as the return
// type has multiple template arguments. To fix it, use a