diff options
author | vslobodyanik <vslobodyanik@luxoft.com> | 2014-07-03 10:09:16 +0100 |
---|---|---|
committer | vslobodyanik <vslobodyanik@luxoft.com> | 2014-07-03 10:09:16 +0100 |
commit | ea0f4919dd93b1456adb292a7371c99ef4c20815 (patch) | |
tree | e4db24388fe67b1940bb02563a984f2d40b85a9c | |
parent | b16db2c6260fefa0c42aa7b35b7ecc220efa2e75 (diff) | |
download | smartdevicelink-SNAPSHOT_PASA03072014.tar.gz |
APPLINK-7983:CreateInteractionChoiceSet, PerformInteraction, Show add changeSNAPSHOT_PASA03072014
5 files changed, 19 insertions, 19 deletions
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/create_interaction_choice_set_request.h b/src/components/application_manager/include/application_manager/commands/mobile/create_interaction_choice_set_request.h index ab885b371..0795865b5 100644 --- a/src/components/application_manager/include/application_manager/commands/mobile/create_interaction_choice_set_request.h +++ b/src/components/application_manager/include/application_manager/commands/mobile/create_interaction_choice_set_request.h @@ -166,9 +166,9 @@ class CreateInteractionChoiceSetRequest : public CommandRequestImpl { * @brief Checks choice set params(menuName, tertiaryText, ...) when type is * String, on contained \t\n \\t \\n * @param choice_set which must check - * @return if choice_set contains \t\n \\t \\n return TRUE, FASE otherwise + * @return if choice_set contains \t\n \\t \\n return TRUE, FALSE otherwise */ - bool IsContainsWhitespace(const smart_objects::SmartObject& choice_set); + bool IsWhitepaceExist(const smart_objects::SmartObject& choice_set); DISALLOW_COPY_AND_ASSIGN(CreateInteractionChoiceSetRequest); }; diff --git a/src/components/application_manager/include/application_manager/commands/mobile/perform_interaction_request.h b/src/components/application_manager/include/application_manager/commands/mobile/perform_interaction_request.h index 6b28c3a25..35ad05961 100644 --- a/src/components/application_manager/include/application_manager/commands/mobile/perform_interaction_request.h +++ b/src/components/application_manager/include/application_manager/commands/mobile/perform_interaction_request.h @@ -193,9 +193,9 @@ class PerformInteractionRequest : public CommandRequestImpl { * @brief Checks perform interaction params(initialText, initialPrompt, ...) * when type is String, on contained \t\n \\t \\n * @return if perform interaction contains \t\n \\t \\n return TRUE, - * FASE otherwise + * FALSE otherwise */ - bool IsContainsWhitespace(); + bool IsWhitepaceExist(); // members timer::TimerThread<PerformInteractionRequest> timer_; diff --git a/src/components/application_manager/src/commands/mobile/create_interaction_choice_set_request.cc b/src/components/application_manager/src/commands/mobile/create_interaction_choice_set_request.cc index d2cca545c..44a2ea3eb 100644 --- a/src/components/application_manager/src/commands/mobile/create_interaction_choice_set_request.cc +++ b/src/components/application_manager/src/commands/mobile/create_interaction_choice_set_request.cc @@ -213,7 +213,7 @@ mobile_apis::Result::eType CreateInteractionChoiceSetRequest::CheckChoiceSet( } // Checking choice set on contained \t\n \\t \\n - if (IsContainsWhitespace((*it_array))) { + if (IsWhitepaceExist((*it_array))) { LOG4CXX_ERROR(logger_, "Incoming choice set has contains \t\n \\t \\n"); return mobile_apis::Result::INVALID_DATA; @@ -256,21 +256,21 @@ bool CreateInteractionChoiceSetRequest::compareStr( return 0 == strcasecmp(str1.asCharArray(), str2.asCharArray()); } -bool CreateInteractionChoiceSetRequest::IsContainsWhitespace( +bool CreateInteractionChoiceSetRequest::IsWhitepaceExist( const smart_objects::SmartObject& choice_set) { bool return_value = false; - std::string str = choice_set[strings::menu_name].asString(); + std::string str = choice_set[strings::menu_name].asCharArray(); if (!CheckSyntax(str, true)) { return_value = true; } - str = choice_set[strings::secondary_text].asString(); + str = choice_set[strings::secondary_text].asCharArray(); if (!CheckSyntax(str, true)) { return_value = true; } - str = choice_set[strings::tertiary_text].asString(); + str = choice_set[strings::tertiary_text].asCharArray(); if (!CheckSyntax(str, true)) { return_value = true; } @@ -282,7 +282,8 @@ bool CreateInteractionChoiceSetRequest::IsContainsWhitespace( smart_objects::SmartArray::const_iterator it_vr_end = vr_array->end(); for (; it_vr != it_vr_end; ++it_vr) { - if (!CheckSyntax((*it_vr).asString(), true)) { + str = (*it_vr).asCharArray(); + if (!CheckSyntax(str, true)) { return_value = true; break; } diff --git a/src/components/application_manager/src/commands/mobile/perform_interaction_request.cc b/src/components/application_manager/src/commands/mobile/perform_interaction_request.cc index c8cbabac1..eff7e63e4 100644 --- a/src/components/application_manager/src/commands/mobile/perform_interaction_request.cc +++ b/src/components/application_manager/src/commands/mobile/perform_interaction_request.cc @@ -37,7 +37,6 @@ #include "application_manager/application_manager_impl.h" #include "application_manager/application_impl.h" #include "application_manager/message_helper.h" -//#include "application_manager/smart_object_keys.h" #include "config_profile/profile.h" #include "interfaces/MOBILE_API.h" #include "interfaces/HMI_API.h" @@ -124,13 +123,13 @@ void PerformInteractionRequest::Run() { for (size_t i = 0; i < choice_list.length(); ++i) { if (!app->FindChoiceSet(choice_list[i].asInt())) { LOG4CXX_ERROR(logger_, "Invalid ID"); - SendResponse(false, mobile_apis::Result::INVALID_DATA); + SendResponse(false, mobile_apis::Result::INVALID_ID); return; } } // Checking perform interaction on contained \t\n \\t \\n - if (IsContainsWhitespace()) { + if (IsWhitepaceExist()) { LOG4CXX_ERROR(logger_, "Incoming perform interaction has contains \t\n \\t \\n"); SendResponse(false, mobile_apis::Result::INVALID_DATA); @@ -738,7 +737,7 @@ void PerformInteractionRequest::DisablePerformInteraction() { } } -bool PerformInteractionRequest::IsContainsWhitespace() { +bool PerformInteractionRequest::IsWhitepaceExist() { //if ((*message_)[strings::msg_params].keyExists(strings::vr_help)) { bool return_value = false; std::string str; @@ -758,7 +757,7 @@ bool PerformInteractionRequest::IsContainsWhitespace() { smart_objects::SmartArray::const_iterator it_ip_end = ip_array->end(); for (; it_ip != it_ip_end; ++it_ip) { - str = (*it_ip)[strings::text].asString(); + str = (*it_ip)[strings::text].asCharArray(); if (!CheckSyntax(str, true)) { return_value = true; break; @@ -774,7 +773,7 @@ bool PerformInteractionRequest::IsContainsWhitespace() { smart_objects::SmartArray::const_iterator it_hp_end = hp_array->end(); for (; it_hp != it_hp_end; ++it_hp) { - str = (*it_hp)[strings::text].asString(); + str = (*it_hp)[strings::text].asCharArray(); if (!CheckSyntax(str, true)) { return_value = true; break; @@ -790,7 +789,7 @@ bool PerformInteractionRequest::IsContainsWhitespace() { smart_objects::SmartArray::const_iterator it_tp_end = tp_array->end(); for (; it_tp != it_tp_end; ++it_tp) { - str = (*it_tp)[strings::text].asString(); + str = (*it_tp)[strings::text].asCharArray(); if (!CheckSyntax(str, true)) { return_value = true; break; @@ -806,7 +805,7 @@ bool PerformInteractionRequest::IsContainsWhitespace() { smart_objects::SmartArray::const_iterator it_vh_end = vh_array->end(); for (; it_vh != it_vh_end; ++it_vh) { - str = (*it_vh)[strings::text].asString(); + str = (*it_vh)[strings::text].asCharArray(); if (!CheckSyntax(str, true)) { return_value = true; break; diff --git a/src/components/application_manager/src/commands/mobile/show_request.cc b/src/components/application_manager/src/commands/mobile/show_request.cc index 44eef710d..d993e1aa5 100644 --- a/src/components/application_manager/src/commands/mobile/show_request.cc +++ b/src/components/application_manager/src/commands/mobile/show_request.cc @@ -314,7 +314,7 @@ bool ShowRequest::CheckStringsOfShowRequest() { smart_objects::SmartArray::const_iterator it_sb_end = sb_array->end(); for (; it_sb != it_sb_end; ++it_sb) { - str = (*it_sb)[strings::text].asString(); + str = (*it_sb)[strings::text].asCharArray(); if (!CheckSyntax(str, true)) { return false; } |