Skip to content

Conversation

IGapchuk
Copy link
Contributor

Fixes #[issue number]

This PR is not ready for review.

Summary

[Summary of PR changes]

CLA

@IGapchuk IGapchuk changed the base branch from master to develop October 28, 2019 16:29
@IGapchuk IGapchuk force-pushed the fix/incorrect_setting_service_status branch from 7acf7f4 to ade53aa Compare October 29, 2019 09:41
Copy link
Contributor

@alexkutsan alexkutsan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add documentation, commit, and PR description. Unable to get an idea of this changes.

bool result,
std::vector<std::string>& rejected_params) OVERRIDE;

bool SetNaviServiceStatus(uint32_t connection_key,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documentation?


NaviServiceStatusMap::iterator it = navi_service_status_.find(app_id);
if (navi_service_status_.end() == it) {
if (navi_service_status_.end() == it && !result) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@IGapchuk not obvious what is result variable about. Please rename variable. Give more narative name

bool ApplicationManagerImpl::SetNaviServiceStatus(
uint32_t connection_key,
protocol_handler::ServiceType service_type,
bool is_started) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@IGapchuk good practice to use enums for such values.


auto app = application(connection_key);
if (!app) {
LOG4CXX_DEBUG(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@IGapchuk I would say this is warning or error

if (navi_service_status_.end() == it) {
LOG4CXX_WARN(logger_,
"No Information about navi service " << service_type);
NaviServiceStatusMap::iterator it =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

auto

NaviServiceStatusMap::iterator it =
navi_service_status_.find(app->app_id());
if (navi_service_status_.end() == it && (is_started)) {
std::pair<NaviServiceStatusMap::iterator, bool> res =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use autos

utils::Optional<hmi_apis::Common_ServiceStatusUpdateReason::eType>
service_update_reason) = 0;

virtual bool SetNaviServiceStatus(uint32_t connection_key,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documentation

@IGapchuk IGapchuk force-pushed the fix/incorrect_setting_service_status branch from ade53aa to 40a8805 Compare November 11, 2019 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants