diff options
author | Oleksandr Lohvinenko (GitHub) <OLohvinenko@luxoft.com> | 2018-05-23 13:29:46 +0300 |
---|---|---|
committer | Ira Lytvynenko (GitHub) <ILytvynenko@luxoft.com> | 2018-06-26 12:01:47 +0300 |
commit | 72a9e815be5cb5f4237dc66db5072f9c5147f602 (patch) | |
tree | 38cb5cd0fb1d6b0781d3a50c177413ea5e61a745 | |
parent | 79297a7f4af228ead8f73b4e0c57224fa164d977 (diff) | |
download | sdl_core-72a9e815be5cb5f4237dc66db5072f9c5147f602.tar.gz |
Moved mobile RPCs.
-rw-r--r-- | src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/diagnostic_message_request.h (renamed from src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/diagnostic_message_request.h) | 2 | ||||
-rw-r--r-- | src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/diagnostic_message_response.h (renamed from src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/diagnostic_message_response.h) | 2 | ||||
-rw-r--r-- | src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/get_dtcs_request.h (renamed from src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/get_dtcs_request.h) | 2 | ||||
-rw-r--r-- | src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/get_dtcs_response.h (renamed from src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/get_dtcs_response.h) | 2 | ||||
-rw-r--r-- | src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/get_vehicle_data_request.h (renamed from src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/get_vehicle_data_request.h) | 2 | ||||
-rw-r--r-- | src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/get_vehicle_data_response.h (renamed from src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/get_vehicle_data_response.h) | 2 | ||||
-rw-r--r-- | src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/on_vehicle_data_notification.h (renamed from src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_vehicle_data_notification.h) | 2 | ||||
-rw-r--r-- | src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/read_did_request.h (renamed from src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/read_did_request.h) | 2 | ||||
-rw-r--r-- | src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/read_did_response.h (renamed from src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/read_did_response.h) | 2 | ||||
-rw-r--r-- | src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/subscribe_vehicle_data_request.h (renamed from src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/subscribe_vehicle_data_request.h) | 2 | ||||
-rw-r--r-- | src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/subscribe_vehicle_data_response.h (renamed from src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/subscribe_vehicle_data_response.h) | 2 | ||||
-rw-r--r-- | src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/unsubscribe_vehicle_data_request.h (renamed from src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/unsubscribe_vehicle_data_request.h) | 2 | ||||
-rw-r--r-- | src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/unsubscribe_vehicle_data_response.h (renamed from src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/unsubscribe_vehicle_data_response.h) | 2 | ||||
-rw-r--r-- | src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_command_factory.h | 4 | ||||
-rw-r--r-- | src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_mobile_command_factory.h | 2 | ||||
-rw-r--r-- | src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/diagnostic_message_request.cc (renamed from src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/diagnostic_message_request.cc) | 4 | ||||
-rw-r--r-- | src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/diagnostic_message_response.cc (renamed from src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/diagnostic_message_response.cc) | 4 | ||||
-rw-r--r-- | src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_dtcs_request.cc (renamed from src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_dtcs_request.cc) | 4 | ||||
-rw-r--r-- | src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_dtcs_response.cc (renamed from src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_dtcs_response.cc) | 4 | ||||
-rw-r--r-- | src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_vehicle_data_request.cc (renamed from src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_vehicle_data_request.cc) | 4 | ||||
-rw-r--r-- | src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_vehicle_data_response.cc (renamed from src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_vehicle_data_response.cc) | 4 | ||||
-rw-r--r-- | src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/on_vehicle_data_notification.cc (renamed from src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_vehicle_data_notification.cc) | 4 | ||||
-rw-r--r-- | src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/read_did_request.cc (renamed from src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/read_did_request.cc) | 4 | ||||
-rw-r--r-- | src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/read_did_response.cc (renamed from src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/read_did_response.cc) | 4 | ||||
-rw-r--r-- | src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/subscribe_vehicle_data_request.cc (renamed from src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_vehicle_data_request.cc) | 4 | ||||
-rw-r--r-- | src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/subscribe_vehicle_data_response.cc (renamed from src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_vehicle_data_response.cc) | 4 | ||||
-rw-r--r-- | src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/unsubscribe_vehicle_data_request.cc (renamed from src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unsubscribe_vehicle_data_request.cc) | 4 | ||||
-rw-r--r-- | src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/unsubscribe_vehicle_data_response.cc (renamed from src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unsubscribe_vehicle_data_response.cc) | 4 | ||||
-rw-r--r-- | src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_command_factory.cc | 14 | ||||
-rw-r--r-- | src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_hmi_command_factory.cc | 19 | ||||
-rw-r--r-- | src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_mobile_command_factory.cc | 96 |
31 files changed, 161 insertions, 52 deletions
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/diagnostic_message_request.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/diagnostic_message_request.h index 8e65d20ba1..e2bc7c4dfd 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/diagnostic_message_request.h +++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/diagnostic_message_request.h @@ -37,7 +37,7 @@ #include "application_manager/commands/command_request_impl.h" #include "utils/macro.h" -namespace sdl_rpc_plugin { +namespace vehicle_info_plugin { namespace app_mngr = application_manager; namespace commands { diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/diagnostic_message_response.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/diagnostic_message_response.h index bc5f375096..d69a6a0155 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/diagnostic_message_response.h +++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/diagnostic_message_response.h @@ -37,7 +37,7 @@ #include "application_manager/commands/command_response_impl.h" #include "utils/macro.h" -namespace sdl_rpc_plugin { +namespace vehicle_info_plugin { namespace app_mngr = application_manager; namespace commands { diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/get_dtcs_request.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/get_dtcs_request.h index cfdc305b53..01f007697d 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/get_dtcs_request.h +++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/get_dtcs_request.h @@ -37,7 +37,7 @@ #include "application_manager/commands/command_request_impl.h" #include "utils/macro.h" -namespace sdl_rpc_plugin { +namespace vehicle_info_plugin { namespace app_mngr = application_manager; namespace commands { diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/get_dtcs_response.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/get_dtcs_response.h index 80207809d0..87024b1860 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/get_dtcs_response.h +++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/get_dtcs_response.h @@ -37,7 +37,7 @@ #include "application_manager/commands/command_response_impl.h" #include "utils/macro.h" -namespace sdl_rpc_plugin { +namespace vehicle_info_plugin { namespace app_mngr = application_manager; namespace commands { diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/get_vehicle_data_request.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/get_vehicle_data_request.h index d25b7b7a93..17ae1ffd09 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/get_vehicle_data_request.h +++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/get_vehicle_data_request.h @@ -37,7 +37,7 @@ #include "application_manager/commands/command_request_impl.h" #include "utils/macro.h" -namespace sdl_rpc_plugin { +namespace vehicle_info_plugin { namespace app_mngr = application_manager; class SmartObject; diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/get_vehicle_data_response.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/get_vehicle_data_response.h index 79080b5dd0..22ec1a5a78 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/get_vehicle_data_response.h +++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/get_vehicle_data_response.h @@ -37,7 +37,7 @@ #include "application_manager/commands/command_response_impl.h" #include "utils/macro.h" -namespace sdl_rpc_plugin { +namespace vehicle_info_plugin { namespace app_mngr = application_manager; namespace commands { diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_vehicle_data_notification.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/on_vehicle_data_notification.h index 34a685963f..57c30164e4 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/on_vehicle_data_notification.h +++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/on_vehicle_data_notification.h @@ -38,7 +38,7 @@ #include "application_manager/application.h" #include "utils/macro.h" -namespace sdl_rpc_plugin { +namespace vehicle_info_plugin { namespace app_mngr = application_manager; namespace commands { diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/read_did_request.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/read_did_request.h index b2d7460ad0..9a8fbbd62e 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/read_did_request.h +++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/read_did_request.h @@ -37,7 +37,7 @@ #include "application_manager/commands/command_request_impl.h" #include "utils/macro.h" -namespace sdl_rpc_plugin { +namespace vehicle_info_plugin { namespace app_mngr = application_manager; namespace commands { diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/read_did_response.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/read_did_response.h index 25c091b61d..2b7ab04768 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/read_did_response.h +++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/read_did_response.h @@ -37,7 +37,7 @@ #include "application_manager/commands/command_response_impl.h" #include "utils/macro.h" -namespace sdl_rpc_plugin { +namespace vehicle_info_plugin { namespace app_mngr = application_manager; namespace commands { diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/subscribe_vehicle_data_request.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/subscribe_vehicle_data_request.h index e836dee669..5859d724ca 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/subscribe_vehicle_data_request.h +++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/subscribe_vehicle_data_request.h @@ -41,7 +41,7 @@ #include "application_manager/application.h" #include "utils/macro.h" -namespace sdl_rpc_plugin { +namespace vehicle_info_plugin { namespace app_mngr = application_manager; namespace commands { diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/subscribe_vehicle_data_response.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/subscribe_vehicle_data_response.h index 94ec195849..60670afee1 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/subscribe_vehicle_data_response.h +++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/subscribe_vehicle_data_response.h @@ -37,7 +37,7 @@ #include "application_manager/commands/command_response_impl.h" #include "utils/macro.h" -namespace sdl_rpc_plugin { +namespace vehicle_info_plugin { namespace app_mngr = application_manager; namespace commands { diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/unsubscribe_vehicle_data_request.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/unsubscribe_vehicle_data_request.h index a22da4490a..6a3fb2a0b9 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/unsubscribe_vehicle_data_request.h +++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/unsubscribe_vehicle_data_request.h @@ -38,7 +38,7 @@ #include "application_manager/application.h" #include "utils/macro.h" -namespace sdl_rpc_plugin { +namespace vehicle_info_plugin { namespace app_mngr = application_manager; namespace commands { diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/unsubscribe_vehicle_data_response.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/unsubscribe_vehicle_data_response.h index 5d24730d5a..397ae3cbce 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/unsubscribe_vehicle_data_response.h +++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/commands/mobile/unsubscribe_vehicle_data_response.h @@ -37,7 +37,7 @@ #include "application_manager/commands/command_response_impl.h" #include "utils/macro.h" -namespace sdl_rpc_plugin { +namespace vehicle_info_plugin { namespace app_mngr = application_manager; namespace commands { diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_command_factory.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_command_factory.h index a2069ade5f..21d6afa768 100644 --- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_command_factory.h +++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_command_factory.h @@ -68,8 +68,8 @@ private: app_mngr::rpc_service::RPCService& rpc_service_; app_mngr::HMICapabilities& hmi_capabilities_; policy::PolicyHandlerInterface& policy_handler_; - std::unique_ptr<VehicleInfoHmiCommandFactory> hmi_command_factory_; - std::unique_ptr<VehicleInfoMobileCommandFactory> mob_command_factory_; + std::unique_ptr<app_mngr::CommandFactory> hmi_command_factory_; + std::unique_ptr<app_mngr::CommandFactory> mob_command_factory_; }; } diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_mobile_command_factory.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_mobile_command_factory.h index 330151c104..cd90219fc1 100644 --- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_mobile_command_factory.h +++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_mobile_command_factory.h @@ -64,6 +64,8 @@ private: app_mngr::HMICapabilities& hmi_capabilities_; policy::PolicyHandlerInterface& policy_handler_; + app_mngr::CommandCreator& buildCommandCreator(int32_t function_id, int32_t message_type); + DISALLOW_COPY_AND_ASSIGN(VehicleInfoMobileCommandFactory); }; diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/diagnostic_message_request.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/diagnostic_message_request.cc index 1a46f4c085..4eba894025 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/diagnostic_message_request.cc +++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/diagnostic_message_request.cc @@ -32,14 +32,14 @@ */ #include <algorithm> -#include "sdl_rpc_plugin/commands/mobile/diagnostic_message_request.h" +#include "vehicle_info_plugin/commands/mobile/diagnostic_message_request.h" #include "application_manager/application_impl.h" #include "interfaces/HMI_API.h" #include "application_manager/message_helper.h" -namespace sdl_rpc_plugin { +namespace vehicle_info_plugin { using namespace application_manager; namespace commands { diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/diagnostic_message_response.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/diagnostic_message_response.cc index eb0f8cf3c7..54d8382f5d 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/diagnostic_message_response.cc +++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/diagnostic_message_response.cc @@ -31,10 +31,10 @@ POSSIBILITY OF SUCH DAMAGE. */ -#include "sdl_rpc_plugin/commands/mobile/diagnostic_message_response.h" +#include "vehicle_info_plugin/commands/mobile/diagnostic_message_response.h" #include "application_manager/rpc_service.h" -namespace sdl_rpc_plugin { +namespace vehicle_info_plugin { using namespace application_manager; namespace commands { diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_dtcs_request.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_dtcs_request.cc index 1785595bf8..6c04e874e8 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_dtcs_request.cc +++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_dtcs_request.cc @@ -31,13 +31,13 @@ POSSIBILITY OF SUCH DAMAGE. */ -#include "sdl_rpc_plugin/commands/mobile/get_dtcs_request.h" +#include "vehicle_info_plugin/commands/mobile/get_dtcs_request.h" #include "application_manager/application_impl.h" #include "interfaces/HMI_API.h" #include "application_manager/message_helper.h" -namespace sdl_rpc_plugin { +namespace vehicle_info_plugin { using namespace application_manager; namespace commands { diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_dtcs_response.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_dtcs_response.cc index 8fac129ade..3686094b73 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_dtcs_response.cc +++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_dtcs_response.cc @@ -31,10 +31,10 @@ POSSIBILITY OF SUCH DAMAGE. */ -#include "sdl_rpc_plugin/commands/mobile/get_dtcs_response.h" +#include "vehicle_info_plugin/commands/mobile/get_dtcs_response.h" #include "application_manager/rpc_service.h" -namespace sdl_rpc_plugin { +namespace vehicle_info_plugin { using namespace application_manager; namespace commands { diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_vehicle_data_request.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_vehicle_data_request.cc index 3305514017..7c7a5e61f7 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_vehicle_data_request.cc +++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_vehicle_data_request.cc @@ -32,14 +32,14 @@ */ #include <string> -#include "sdl_rpc_plugin/commands/mobile/get_vehicle_data_request.h" +#include "vehicle_info_plugin/commands/mobile/get_vehicle_data_request.h" #include "application_manager/application_impl.h" #include "application_manager/message_helper.h" #include "interfaces/MOBILE_API.h" #include "interfaces/HMI_API.h" -namespace sdl_rpc_plugin { +namespace vehicle_info_plugin { using namespace application_manager; namespace commands { diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_vehicle_data_response.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_vehicle_data_response.cc index 69b4166555..3a7d663756 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_vehicle_data_response.cc +++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_vehicle_data_response.cc @@ -31,11 +31,11 @@ POSSIBILITY OF SUCH DAMAGE. */ -#include "sdl_rpc_plugin/commands/mobile/get_vehicle_data_response.h" +#include "vehicle_info_plugin/commands/mobile/get_vehicle_data_response.h" #include "application_manager/rpc_service.h" #include "interfaces/HMI_API.h" -namespace sdl_rpc_plugin { +namespace vehicle_info_plugin { using namespace application_manager; namespace commands { diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_vehicle_data_notification.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/on_vehicle_data_notification.cc index b507d6a462..5dac08c539 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_vehicle_data_notification.cc +++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/on_vehicle_data_notification.cc @@ -31,13 +31,13 @@ POSSIBILITY OF SUCH DAMAGE. */ -#include "sdl_rpc_plugin/commands/mobile/on_vehicle_data_notification.h" +#include "vehicle_info_plugin/commands/mobile/on_vehicle_data_notification.h" #include "application_manager/application_impl.h" #include "application_manager/message_helper.h" #include "interfaces/MOBILE_API.h" -namespace sdl_rpc_plugin { +namespace vehicle_info_plugin { using namespace application_manager; namespace commands { diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/read_did_request.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/read_did_request.cc index a942aa1610..010cce4c63 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/read_did_request.cc +++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/read_did_request.cc @@ -31,14 +31,14 @@ */ #include <string> -#include "sdl_rpc_plugin/commands/mobile/read_did_request.h" +#include "vehicle_info_plugin/commands/mobile/read_did_request.h" #include "application_manager/application_impl.h" #include "interfaces/MOBILE_API.h" #include "interfaces/HMI_API.h" #include "application_manager/message_helper.h" -namespace sdl_rpc_plugin { +namespace vehicle_info_plugin { using namespace application_manager; namespace commands { diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/read_did_response.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/read_did_response.cc index 3ce1d8b766..82d49574f0 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/read_did_response.cc +++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/read_did_response.cc @@ -31,10 +31,10 @@ POSSIBILITY OF SUCH DAMAGE. */ -#include "sdl_rpc_plugin/commands/mobile/read_did_response.h" +#include "vehicle_info_plugin/commands/mobile/read_did_response.h" #include "application_manager/rpc_service.h" -namespace sdl_rpc_plugin { +namespace vehicle_info_plugin { using namespace application_manager; namespace commands { diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_vehicle_data_request.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/subscribe_vehicle_data_request.cc index 61caf37e03..766e720217 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_vehicle_data_request.cc +++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/subscribe_vehicle_data_request.cc @@ -34,13 +34,13 @@ POSSIBILITY OF SUCH DAMAGE. */ -#include "sdl_rpc_plugin/commands/mobile/subscribe_vehicle_data_request.h" +#include "vehicle_info_plugin/commands/mobile/subscribe_vehicle_data_request.h" #include "application_manager/application_impl.h" #include "application_manager/message_helper.h" #include "utils/helpers.h" -namespace sdl_rpc_plugin { +namespace vehicle_info_plugin { using namespace application_manager; namespace commands { diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_vehicle_data_response.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/subscribe_vehicle_data_response.cc index 209a1968b7..2bea839320 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_vehicle_data_response.cc +++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/subscribe_vehicle_data_response.cc @@ -31,12 +31,12 @@ POSSIBILITY OF SUCH DAMAGE. */ -#include "sdl_rpc_plugin/commands/mobile/subscribe_vehicle_data_response.h" +#include "vehicle_info_plugin/commands/mobile/subscribe_vehicle_data_response.h" #include "application_manager/rpc_service.h" #include "application_manager/application_impl.h" #include "interfaces/MOBILE_API.h" -namespace sdl_rpc_plugin { +namespace vehicle_info_plugin { using namespace application_manager; namespace commands { diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unsubscribe_vehicle_data_request.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/unsubscribe_vehicle_data_request.cc index e63ec89ec7..a6a3b11111 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unsubscribe_vehicle_data_request.cc +++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/unsubscribe_vehicle_data_request.cc @@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE. */ -#include "sdl_rpc_plugin/commands/mobile/unsubscribe_vehicle_data_request.h" +#include "vehicle_info_plugin/commands/mobile/unsubscribe_vehicle_data_request.h" #include "application_manager/commands/command_impl.h" #include "application_manager/application_impl.h" @@ -41,7 +41,7 @@ #include "application_manager/smart_object_keys.h" #include "utils/helpers.h" -namespace sdl_rpc_plugin { +namespace vehicle_info_plugin { using namespace application_manager; namespace commands { diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unsubscribe_vehicle_data_response.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/unsubscribe_vehicle_data_response.cc index e7d4cd8e27..143a727455 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/unsubscribe_vehicle_data_response.cc +++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/unsubscribe_vehicle_data_response.cc @@ -31,10 +31,10 @@ POSSIBILITY OF SUCH DAMAGE. */ -#include "sdl_rpc_plugin/commands/mobile/unsubscribe_vehicle_data_response.h" +#include "vehicle_info_plugin/commands/mobile/unsubscribe_vehicle_data_response.h" #include "smart_objects/smart_object.h" -namespace sdl_rpc_plugin { +namespace vehicle_info_plugin { using namespace application_manager; namespace commands { diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_command_factory.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_command_factory.cc index 56ac6cba71..edc80951e3 100644 --- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_command_factory.cc +++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_command_factory.cc @@ -32,6 +32,8 @@ #include "vehicle_info_plugin/vehicle_info_command_factory.h" +CREATE_LOGGERPTR_GLOBAL(logger_, "Vehicle Info Plugin") + namespace vehicle_info_plugin { VehicleInfoCommandFactory::VehicleInfoCommandFactory( @@ -42,12 +44,12 @@ VehicleInfoCommandFactory::VehicleInfoCommandFactory( : application_manager_(application_manager), rpc_service_(rpc_service), hmi_capabilities_(hmi_capabilities), - policy_handler_(policy_handler) { - - hmi_command_factory_.reset(new VehicleInfoHmiCommandFactory( - application_manager, rpc_service, hmi_capabilities, policy_handler)); - mob_command_factory_.reset(new VehicleInfoMobileCommandFactory( - application_manager, rpc_service, hmi_capabilities, policy_handler)); + policy_handler_(policy_handler), + hmi_command_factory_(std::make_shared(new VehicleInfoHmiCommandFactory( + application_manager, rpc_service, hmi_capabilities, policy_handler))), + mob_command_factory_(std::make_shared(new VehicleInfoMobileCommandFactory( + application_manager, rpc_service, hmi_capabilities, policy_handler))) { + LOG4CXX_AUTO_TRACE(logger_); } VehicleInfoCommandFactory::~VehicleInfoCommandFactory() {} diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_hmi_command_factory.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_hmi_command_factory.cc index 71b9b7993e..bebe1f3b27 100644 --- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_hmi_command_factory.cc +++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_hmi_command_factory.cc @@ -57,6 +57,7 @@ VehicleInfoHmiCommandFactory::VehicleInfoHmiCommandFactory( app_mngr::CommandSharedPtr VehicleInfoHmiCommandFactory::CreateCommand( const app_mngr::commands::MessageSharedPtr& message, app_mngr::commands::Command::CommandSource source) { + UNUSED(source); const hmi_apis::FunctionID::eType function_id = static_cast<hmi_apis::FunctionID::eType>( @@ -89,6 +90,24 @@ app_mngr::CommandSharedPtr VehicleInfoHmiCommandFactory::CreateCommand( ? factory.GetCreator<commands::VIIsReadyRequest>() : factory.GetCreator<commands::VIIsReadyResponse>(); break; + case hmi_apis::FunctionID::VehicleInfo_SubscribeVehicleData: + // SubscribeVehicleData HMI request/response + break; + case hmi_apis::FunctionID::VehicleInfo_UnsubscribeVehicleData: + // UnsubscribeVehicleData HMI request/response + break; + case hmi_apis::FunctionID::VehicleInfo_OnVehicleData: + // OnVehicleData HMI notification + break; + case hmi_apis::FunctionID::VehicleInfo_ReadDID: + // ReadDID HMI request/response + break; + case hmi_apis::FunctionID::VehicleInfo_GetDTCs: + // GetDTCs HMI request/response + break; + case hmi_apis::FunctionID::VehicleInfo_DiagnosticMessage: + // DiagnosticMessage HMI request/response + break; default: LOG4CXX_WARN(logger_, "Unsupported function_id: " << function_id); break; diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_mobile_command_factory.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_mobile_command_factory.cc index eb6975acdb..c2e4a26745 100644 --- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_mobile_command_factory.cc +++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_mobile_command_factory.cc @@ -32,6 +32,23 @@ #include "vehicle_info_plugin/vehicle_info_mobile_command_factory.h" +#include "application_manager/message.h" +#include "interfaces/MOBILE_API.h" + +#include "vehicle_info_plugin/commands/mobile/diagnostic_message_request.h" +#include "vehicle_info_plugin/commands/mobile/diagnostic_message_response.h" +#include "vehicle_info_plugin/commands/mobile/get_dtcs_request.h" +#include "vehicle_info_plugin/commands/mobile/get_dtcs_response.h" +#include "vehicle_info_plugin/commands/mobile/get_vehicle_data_request.h" +#include "vehicle_info_plugin/commands/mobile/get_vehicle_data_response.h" +#include "vehicle_info_plugin/commands/mobile/on_vehicle_data_notification.h" +#include "vehicle_info_plugin/commands/mobile/read_did_request.h" +#include "vehicle_info_plugin/commands/mobile/read_did_response.h" +#include "vehicle_info_plugin/commands/mobile/subscribe_vehicle_data_request.h" +#include "vehicle_info_plugin/commands/mobile/subscribe_vehicle_data_response.h" +#include "vehicle_info_plugin/commands/mobile/unsubscribe_vehicle_data_request.h" +#include "vehicle_info_plugin/commands/mobile/unsubscribe_vehicle_data_response.h" + CREATE_LOGGERPTR_GLOBAL(logger_, "Vehicle Info Plugin") namespace vehicle_info_plugin { @@ -51,18 +68,87 @@ VehicleInfoMobileCommandFactory::VehicleInfoMobileCommandFactory( app_mngr::CommandSharedPtr VehicleInfoMobileCommandFactory::CreateCommand( const app_mngr::commands::MessageSharedPtr& message, - app_mngr::commands::Command::CommandSource command_source) { + app_mngr::commands::Command::CommandSource source) { + UNUSED(source); + + const mobile_apis::FunctionID::eType function_id = + static_cast<hmi_apis::FunctionID::eType>( + (*message)[strings::params][strings::function_id].asInt()); + + const mobile_apis::messageType::eType message_type = + static_cast<hmi_apis::messageType::eType>( + (*message)[strings::params][strings::message_type].asInt()); + + auto message_type_str = ""; + if (mobile_apis::messageType::response == message_type) { + message_type_str = "response"; + } else if (mobile_apis::messageType::notification == message_type) { + message_type_str = "notification"; + } else { + message_type_str = "request"; + } - // TODO: Implement - throw -1; + LOG4CXX_DEBUG( + logger_, "HMICommandFactory::CreateCommand function_id: " << function_id + << ", message type: " << message_type_str); + + return buildCommandCreator(function_id, message_type).create(message); } bool VehicleInfoMobileCommandFactory::IsAbleToProcess( const int32_t function_id, const app_mngr::commands::Command::CommandSource source) const { + UNUSED(source); + return buildCommandCreator( + function_id, mobile_apis::messageType::INVALID_ENUM).CanBeCreated(); +} + +app_mngr::CommandCreator& VehicleInfoMobileCommandFactory::buildCommandCreator( + int32_t function_id, int32_t message_type) { + auto factory = + app_mngr::CommandCreatorFactory(application_manager_, rpc_service_, hmi_capabilities_, policy_handler_); + auto &creator = factory.GetCreator<app_mngr::InvalidCommand>(); + + switch (function_id) { + case mobile_apis::FunctionID::GetVehicleDataID: + creator = mobile_apis::messageType::request == message_type + ? factory.GetCreator<commands::GetVehicleDataRequest>() + : factory.GetCreator<commands::GetVehicleDataResponse>(); + break; + case mobile_apis::FunctionID::SubscribeVehicleDataID: + creator = mobile_apis::messageType::request == message_type + ? factory.GetCreator<commands::SubscribeVehicleDataRequest>() + : factory.GetCreator<commands::SubscribeVehicleDataResponse>(); + break; + case mobile_apis::FunctionID::UnsubscribeVehicleDataID: + creator = mobile_apis::messageType::request == message_type + ? factory.GetCreator<commands::UnsubscribeVehicleDataRequest>() + : factory.GetCreator<commands::UnsubscribeVehicleDataResponse>(); + break; + case mobile_apis::FunctionID::OnVehicleDataID: + creator = factory.GetCreator<commands::OnVehicleDataNotification>(); + break; + case mobile_apis::FunctionID::ReadDIDID: + creator = mobile_apis::messageType::request == message_type + ? factory.GetCreator<commands::ReadDIDRequest>() + : factory.GetCreator<commands::ReadDIDResponse>(); + break; + case mobile_apis::FunctionID::GetDTCsID: + creator = mobile_apis::messageType::request == message_type + ? factory.GetCreator<commands::GetDTCsRequest>() + : factory.GetCreator<commands::GetDTCsResponse>(); + break; + case mobile_apis::FunctionID::DiagnosticMessageID: + creator = mobile_apis::messageType::request == message_type + ? factory.GetCreator<commands::DiagnosticMessageRequest>() + : factory.GetCreator<commands::DiagnosticMessageResponse>(); + break; + default: + LOG4CXX_WARN(logger_, "Unsupported function_id: " << function_id); + break; + } - // TODO: Implement - throw -1; + return creator; } } |