summaryrefslogtreecommitdiff
path: root/src/components/application_manager/include/application_manager/commands/command_request_impl.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/application_manager/include/application_manager/commands/command_request_impl.h')
-rw-r--r--src/components/application_manager/include/application_manager/commands/command_request_impl.h48
1 files changed, 30 insertions, 18 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 3603eacb04..96a315f505 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
@@ -43,21 +43,13 @@ namespace application_manager {
namespace commands {
struct ResponseInfo {
- ResponseInfo()
- : result_code(hmi_apis::Common_Result::INVALID_ENUM)
- , interface(HmiInterfaces::HMI_INTERFACE_INVALID_ENUM)
- , interface_state(HmiInterfaces::STATE_NOT_RESPONSE)
- , is_ok(false)
- , is_unsupported_resource(false)
- , is_not_used(false) {}
+ // DEPRECATED
ResponseInfo(hmi_apis::Common_Result::eType result,
- HmiInterfaces::InterfaceID interface)
- : result_code(result)
- , interface(interface)
- , interface_state(HmiInterfaces::STATE_NOT_RESPONSE)
- , is_ok(false)
- , is_unsupported_resource(false)
- , is_not_used(false) {}
+ HmiInterfaces::InterfaceID interface);
+ ResponseInfo();
+ ResponseInfo(const hmi_apis::Common_Result::eType result,
+ const HmiInterfaces::InterfaceID hmi_interface,
+ ApplicationManager& application_manager);
hmi_apis::Common_Result::eType result_code;
HmiInterfaces::InterfaceID interface;
HmiInterfaces::InterfaceState interface_state;
@@ -290,6 +282,19 @@ class CommandRequestImpl : public CommandImpl,
mobile_apis::Result::eType PrepareResultCodeForResponse(
const ResponseInfo& first, const ResponseInfo& second);
+ /**
+ * @brief Resolves if the return code must be
+ * UNSUPPORTED_RESOURCE
+ * @param first contains result_code from HMI response and
+ * interface that returns response
+ * @param second contains result_code from HMI response and
+ * interface that returns response.
+ * @return True, if the communication return code must be
+ * UNSUPPORTED_RESOURCE, otherwise false.
+ */
+ bool IsResultCodeUnsupported(const ResponseInfo& first,
+ const ResponseInfo& second) const;
+
protected:
/**
* @brief Returns policy parameters permissions
@@ -360,10 +365,10 @@ class CommandRequestImpl : public CommandImpl,
const hmi_apis::FunctionID::eType& function_id);
/**
- * @brief UpdateHash updates hash field for application and sends
- * OnHashChanged notification to mobile side in case of approriate hash mode
- * is set
- */
+ * @brief UpdateHash updates hash field for application and sends
+ * OnHashChanged notification to mobile side in case of approriate hash mode
+ * is set
+ */
void UpdateHash();
/**
@@ -371,6 +376,13 @@ class CommandRequestImpl : public CommandImpl,
* it is value of 'success' field of appropriate response sent to mobile
*/
bool is_success_result_;
+
+ /**
+ * @brief Add information for the component of response in case of timeout
+ * @param response Response message, which info should be extended
+ */
+ void AddTimeOutComponentInfoToMessage(
+ smart_objects::SmartObject& response) const;
};
} // namespace commands