diff options
author | AKalinich-Luxoft <AKalinich@luxoft.com> | 2017-06-16 18:01:32 +0300 |
---|---|---|
committer | AKalinich-Luxoft <AKalinich@luxoft.com> | 2017-06-19 16:52:24 +0300 |
commit | e5fb4510b64635d824bbb48a205b7c3e4ed0e92c (patch) | |
tree | d6369ede73517d532295d594a1474a07ca604a4f /src/components/application_manager/include/application_manager/commands | |
parent | 817052ffe35991d6927e9176528821323b4e6812 (diff) | |
download | sdl_core-e5fb4510b64635d824bbb48a205b7c3e4ed0e92c.tar.gz |
Fix UnsubscribeButton wrong result code in case of UNSUPPORTED_RESOURCE
Fixed UnsubscribeButton wrong result code in case of UNSUPPORTED_RESOURCE.
This checking was already implemented for SubscribeButton rpc, but not
implemented for UnsubscribeButton.
In this commit:
- Function CheckHMICapabilities(), which responsible for HMI capabilities
permissions checking, was moved to CommandRequestImpl class to use from
both SubscribeButton/UnsubscribeButton.
- Added logs and minor changes in CheckHMICapabilities() function
- Added checking HMI capabilities for UnsubscribeButton
Diffstat (limited to 'src/components/application_manager/include/application_manager/commands')
2 files changed, 8 insertions, 6 deletions
diff --git a/src/components/application_manager/include/application_manager/commands/command_request_impl.h b/src/components/application_manager/include/application_manager/commands/command_request_impl.h index f585410e97..362a3566da 100644 --- a/src/components/application_manager/include/application_manager/commands/command_request_impl.h +++ b/src/components/application_manager/include/application_manager/commands/command_request_impl.h @@ -193,6 +193,14 @@ class CommandRequestImpl : public CommandImpl, bool CheckAllowedParameters(); /** + * @brief Checks HMI capabilities for specified button support + * @param button Button to check + * @return true if button is present in HMI capabilities + * otherwise returns false + */ + bool CheckHMICapabilities(const mobile_apis::ButtonName::eType button) const; + + /** * @brief Remove from current message parameters disallowed by policy table */ void RemoveDisallowedParameters(); diff --git a/src/components/application_manager/include/application_manager/commands/mobile/subscribe_button_request.h b/src/components/application_manager/include/application_manager/commands/mobile/subscribe_button_request.h index b5a22d40a9..d92c4b636d 100644 --- a/src/components/application_manager/include/application_manager/commands/mobile/subscribe_button_request.h +++ b/src/components/application_manager/include/application_manager/commands/mobile/subscribe_button_request.h @@ -85,12 +85,6 @@ class SubscribeButtonRequest : public CommandRequestImpl { */ void SendSubscribeButtonNotification(); - /** - * @brief Checks HMI capabilities for specified button support - * @param button Button to check - */ - bool CheckHMICapabilities(mobile_apis::ButtonName::eType button); - DISALLOW_COPY_AND_ASSIGN(SubscribeButtonRequest); }; |