summaryrefslogtreecommitdiff
path: root/src/components/application_manager/include/application_manager/commands/command_impl.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/application_manager/include/application_manager/commands/command_impl.h')
-rw-r--r--src/components/application_manager/include/application_manager/commands/command_impl.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/components/application_manager/include/application_manager/commands/command_impl.h b/src/components/application_manager/include/application_manager/commands/command_impl.h
index 1b4db7e888..6105f7c5d6 100644
--- a/src/components/application_manager/include/application_manager/commands/command_impl.h
+++ b/src/components/application_manager/include/application_manager/commands/command_impl.h
@@ -69,6 +69,23 @@ struct CommandParametersPermissions {
};
namespace commands {
+
+/**
+ * @brief Checks Mobile result code for single RPC
+ * @param result_code contains result code from response to Mobile
+ * @return true if result code complies to successful result codes,
+ * false otherwise.
+ */
+bool IsMobileResultSuccess(const mobile_apis::Result::eType result_code);
+
+/**
+ * @brief Checks HMI result code for single RPC
+ * @param result_code contains result code from HMI response
+ * @return true if result code complies to successful result codes,
+ * false otherwise.
+ */
+bool IsHMIResultSuccess(const hmi_apis::Common_Result::eType result_code);
+
/**
* @brief Class is intended to encapsulate RPC as an object
**/
@@ -183,6 +200,16 @@ class CommandImpl : public Command {
*/
bool CheckSyntax(const std::string& str, bool allow_empty_line = false) const;
+ /**
+ * @brief Checks HMI result code for single RPC
+ * @param result_code contains result code from HMI response
+ * @param interface to check availability
+ * @return true if result code complies to successful result codes,
+ * false otherwise.
+ */
+ bool IsHMIResultSuccess(hmi_apis::Common_Result::eType result_code,
+ HmiInterfaces::InterfaceID interface) const;
+
// members
static const int32_t hmi_protocol_type_;
static const int32_t mobile_protocol_type_;