summaryrefslogtreecommitdiff
path: root/src/components/application_manager/include/application_manager
diff options
context:
space:
mode:
authorMasato Ogawa <mogawa@xevo.com>2017-08-04 17:22:13 +0900
committerMasato Ogawa <mogawa@xevo.com>2017-08-22 13:05:15 +0900
commit9b2f37ad1cc2bd7f6e2ed73e9baa5bd9569a2864 (patch)
treec06505cfbe7bfe315c523a96f349c725a1e1daac /src/components/application_manager/include/application_manager
parent5fcb0ef3bf43370b0d579bf23ef6764af75a97de (diff)
downloadsdl_core-9b2f37ad1cc2bd7f6e2ed73e9baa5bd9569a2864.tar.gz
Implement SendHapticData RPC
HMI does not know the position of widget in Navigation template. In cases HMI manages the Haptic feedback of each widget, the Navi app should notify the HMI which elements can be focused using SendHapticData RPC. This is for discussion on proposal SDL-0075.
Diffstat (limited to 'src/components/application_manager/include/application_manager')
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_send_haptic_data_request.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/ui_send_haptic_data_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/send_haptic_data_request.h85
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/send_haptic_data_response.h73
-rw-r--r--src/components/application_manager/include/application_manager/smart_object_keys.h1
5 files changed, 305 insertions, 0 deletions
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_send_haptic_data_request.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_send_haptic_data_request.h
new file mode 100644
index 0000000000..a2a1a0f7c8
--- /dev/null
+++ b/src/components/application_manager/include/application_manager/commands/hmi/ui_send_haptic_data_request.h
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2017 Xevo Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Xevo Inc. nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SEND_HAPTIC_DATA_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SEND_HAPTIC_DATA_REQUEST_H_
+
+#include "application_manager/commands/hmi/request_to_hmi.h"
+
+namespace application_manager {
+
+namespace commands {
+
+/**
+ * @brief UISendHapticDataRequest command class
+ **/
+class UISendHapticDataRequest : public RequestToHMI {
+ public:
+ /**
+ * @brief UISendHapticDataRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UISendHapticDataRequest(const MessageSharedPtr& message,
+ ApplicationManager& application_manager);
+
+ /**
+ * @brief UISendHapticDataRequest class destructor
+ **/
+ virtual ~UISendHapticDataRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UISendHapticDataRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SEND_HAPTIC_DATA_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_send_haptic_data_response.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_send_haptic_data_response.h
new file mode 100644
index 0000000000..8b6a01f8b8
--- /dev/null
+++ b/src/components/application_manager/include/application_manager/commands/hmi/ui_send_haptic_data_response.h
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2017 Xevo Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Xevo Inc. nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SEND_HAPTIC_DATA_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SEND_HAPTIC_DATA_RESPONSE_H_
+
+#include "application_manager/commands/hmi/response_from_hmi.h"
+
+namespace application_manager {
+
+namespace commands {
+
+/**
+ * @brief UISendHapticDataResponse command class
+ **/
+class UISendHapticDataResponse : public ResponseFromHMI {
+ public:
+ /**
+ * @brief UISendHapticDataResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UISendHapticDataResponse(const MessageSharedPtr& message,
+ ApplicationManager& application_manager);
+
+ /**
+ * @brief UISendHapticDataResponse class destructor
+ **/
+ virtual ~UISendHapticDataResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UISendHapticDataResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_UI_SEND_HAPTIC_DATA_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/send_haptic_data_request.h b/src/components/application_manager/include/application_manager/commands/mobile/send_haptic_data_request.h
new file mode 100644
index 0000000000..fcc0c16146
--- /dev/null
+++ b/src/components/application_manager/include/application_manager/commands/mobile/send_haptic_data_request.h
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 2017 Xevo Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Xevo Inc. nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SEND_HAPTIC_DATA_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SEND_HAPTIC_DATA_REQUEST_H_
+
+
+#include <string>
+#include "application_manager/commands/command_request_impl.h"
+#include "application_manager/application_manager.h"
+#include "application_manager/event_engine/event.h"
+#include "smart_objects/smart_object.h"
+
+namespace application_manager {
+
+namespace commands {
+
+/**
+ * @brief SendHapticDataRequest command class
+ **/
+class SendHapticDataRequest : public CommandRequestImpl {
+ public:
+ /**
+ * @brief SendHapticDataRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ SendHapticDataRequest(const MessageSharedPtr& message,
+ ApplicationManager& application_manager);
+
+ /**
+ * @brief SendHapticDataRequest class destructor
+ **/
+ virtual ~SendHapticDataRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ /**
+ * @brief Interface method that is called whenever new event received
+ *
+ * @param event The received event
+ */
+ virtual void on_event(const event_engine::Event& event);
+
+ private:
+ std::string processing_file_;
+ DISALLOW_COPY_AND_ASSIGN(SendHapticDataRequest);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SEND_HAPTIC_DATA_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/send_haptic_data_response.h b/src/components/application_manager/include/application_manager/commands/mobile/send_haptic_data_response.h
new file mode 100644
index 0000000000..0b88daab11
--- /dev/null
+++ b/src/components/application_manager/include/application_manager/commands/mobile/send_haptic_data_response.h
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2017 Xevo Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Xevo Inc. nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SEND_HAPTIC_DATA_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SEND_HAPTIC_DATA_RESPONSE_H_
+
+
+#include "application_manager/commands/command_response_impl.h"
+
+namespace application_manager {
+
+namespace commands {
+
+/**
+ * @brief SendHapticDataResponse command class
+ **/
+class SendHapticDataResponse : public CommandResponseImpl {
+ public:
+ /**
+ * @brief SendHapticDataResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ SendHapticDataResponse(const MessageSharedPtr& message,
+ ApplicationManager& application_manager);
+
+ /**
+ * @brief SendHapticDataResponse class destructor
+ **/
+ virtual ~SendHapticDataResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(SendHapticDataResponse);
+};
+
+} // namespace commands
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SEND_HAPTIC_DATA_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/smart_object_keys.h b/src/components/application_manager/include/application_manager/smart_object_keys.h
index 78085078e0..388c4ed80d 100644
--- a/src/components/application_manager/include/application_manager/smart_object_keys.h
+++ b/src/components/application_manager/include/application_manager/smart_object_keys.h
@@ -173,6 +173,7 @@ extern const char* system_capabilities;
extern const char* navigation_capability;
extern const char* phone_capability;
extern const char* video_streaming_capability;
+extern const char* haptic_spatial_data;
// PutFile
extern const char* sync_file_name;