From 645a9ac403c2c62e11b65cfbf45d9a7919c7e91b Mon Sep 17 00:00:00 2001 From: Ira Lytvynenko Date: Fri, 9 Feb 2018 11:16:41 +0200 Subject: Fix hmi message handler initialization in rpc service Move notification and command implementation back to applicaiton manager Copywriting added. In 'src/components/application_manager/rpc_plugins/sdl_rpc_plugin/' folder added copywriting for next files: include/sdl_rpc_plugin/sdl_rpc_plugin.h src/commands/hmi/navi_stop_stream_request.cc src/commands/hmi/on_tts_reset_timeout_notification.cc src/commands/mobile/get_system_capability_request.cc src/commands/mobile/get_system_capability_response.cc src/commands/mobile/get_way_points_request.cc src/commands/mobile/get_way_points_response.cc src/commands/mobile/subscribe_way_points_request.cc src/commands/mobile/subscribe_way_points_response.cc src/commands/mobile/unsubscribe_way_points_request.cc src/commands/mobile/unsubscribe_way_points_response.cc src/sdl_rpc_plugin.cc --- .../commands/hmi/notification_from_hmi.h | 66 ------------------- .../commands/hmi/notification_to_hmi.h | 61 ------------------ .../commands/hmi/response_from_hmi.h | 73 ---------------------- .../sdl_rpc_plugin/commands/hmi/response_to_hmi.h | 64 ------------------- 4 files changed, 264 deletions(-) delete mode 100644 src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/notification_from_hmi.h delete mode 100644 src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/notification_to_hmi.h delete mode 100644 src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/response_from_hmi.h delete mode 100644 src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/response_to_hmi.h (limited to 'src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi') diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/notification_from_hmi.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/notification_from_hmi.h deleted file mode 100644 index 6f8bf3a76b..0000000000 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/notification_from_hmi.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - Copyright (c) 2013, Ford Motor Company - 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 Ford Motor Company 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_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NOTIFICATION_FROM_HMI_H_ -#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NOTIFICATION_FROM_HMI_H_ - -#include "application_manager/commands/command_impl.h" -#include "interfaces/HMI_API.h" -#include "smart_objects/smart_object.h" - -namespace sdl_rpc_plugin { -namespace app_mngr = application_manager; - -namespace commands { - -class NotificationFromHMI : public app_mngr::commands::CommandImpl { - public: - NotificationFromHMI(const app_mngr::commands::MessageSharedPtr& message, - app_mngr::ApplicationManager& application_manager); - virtual ~NotificationFromHMI(); - virtual bool Init(); - virtual bool CleanUp(); - virtual void Run(); - void SendNotificationToMobile( - const app_mngr::commands::MessageSharedPtr& message); - void CreateHMIRequest(const hmi_apis::FunctionID::eType& function_id, - const smart_objects::SmartObject& msg_params) const; - - private: - DISALLOW_COPY_AND_ASSIGN(NotificationFromHMI); -}; - -} // namespace commands - -} // namespace application_manager - -#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NOTIFICATION_FROM_HMI_H_ diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/notification_to_hmi.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/notification_to_hmi.h deleted file mode 100644 index 3f59ae6234..0000000000 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/notification_to_hmi.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - Copyright (c) 2013, Ford Motor Company - 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 Ford Motor Company 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_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NOTIFICATION_TO_HMI_H_ -#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NOTIFICATION_TO_HMI_H_ - -#include "application_manager/commands/command_impl.h" - -namespace sdl_rpc_plugin { -namespace app_mngr = application_manager; - -namespace commands { - -class NotificationToHMI : public app_mngr::commands::CommandImpl { - public: - NotificationToHMI(const app_mngr::commands::MessageSharedPtr& message, - app_mngr::ApplicationManager& application_manager); - virtual ~NotificationToHMI(); - virtual bool Init(); - virtual bool CleanUp(); - virtual void Run(); - void SendNotification(); - - private: - DISALLOW_COPY_AND_ASSIGN(NotificationToHMI); -}; - -} // namespace commands - -} // namespace application_manager - -#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_NOTIFICATION_TO_HMI_H_ diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/response_from_hmi.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/response_from_hmi.h deleted file mode 100644 index 3006054d29..0000000000 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/response_from_hmi.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - Copyright (c) 2014, Ford Motor Company - 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 Ford Motor Company 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_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_RESPONSE_FROM_HMI_H_ -#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_RESPONSE_FROM_HMI_H_ - -#include "application_manager/commands/command_impl.h" -#include "application_manager/application_manager.h" -#include "interfaces/HMI_API.h" - -namespace sdl_rpc_plugin { -namespace app_mngr = application_manager; - -namespace commands { - -class ResponseFromHMI : public app_mngr::commands::CommandImpl { - public: - ResponseFromHMI(const app_mngr::commands::MessageSharedPtr& message, - app_mngr::ApplicationManager& application_manager); - virtual ~ResponseFromHMI(); - virtual bool Init(); - virtual bool CleanUp(); - virtual void Run(); - void SendResponseToMobile(const app_mngr::commands::MessageSharedPtr& message, - app_mngr::ApplicationManager& application_manager); - - /* - * @brief Creates HMI request - * - * @param function_id HMI request ID - * @param msg_params HMI request msg params - */ - void CreateHMIRequest(const hmi_apis::FunctionID::eType& function_id, - const smart_objects::SmartObject& msg_params) const; - - private: - DISALLOW_COPY_AND_ASSIGN(ResponseFromHMI); -}; - -} // namespace commands - -} // namespace application_manager - -#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_RESPONSE_FROM_HMI_H_ diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/response_to_hmi.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/response_to_hmi.h deleted file mode 100644 index 47b09ef535..0000000000 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/response_to_hmi.h +++ /dev/null @@ -1,64 +0,0 @@ - -/* - Copyright (c) 2013, Ford Motor Company - 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 Ford Motor Company 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_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_RESPONSE_TO_HMI_H_ -#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_RESPONSE_TO_HMI_H_ - -#include "application_manager/commands/command_impl.h" -#include "interfaces/HMI_API.h" -#include "smart_objects/smart_object.h" - -namespace sdl_rpc_plugin { -namespace app_mngr = application_manager; - -namespace commands { - -namespace NsSmart = NsSmartDeviceLink::NsSmartObjects; - -class ResponseToHMI : public app_mngr::commands::CommandImpl { - public: - ResponseToHMI(const app_mngr::commands::MessageSharedPtr& message, - app_mngr::ApplicationManager& application_manager); - virtual ~ResponseToHMI(); - virtual bool Init(); - virtual bool CleanUp(); - virtual void Run(); - - private: - DISALLOW_COPY_AND_ASSIGN(ResponseToHMI); -}; - -} // namespace commands -} // namespace application_manager - -#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_RESPONSE_TO_HMI_H_ -- cgit v1.2.1