diff options
Diffstat (limited to 'src/components/application_manager/rpc_plugins')
10 files changed, 1 insertions, 1428 deletions
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/hmi_command_factory.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/hmi_command_factory.cc index 83edb76264..c510315ad8 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/hmi_command_factory.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/hmi_command_factory.cc @@ -158,36 +158,6 @@ #include "sdl_rpc_plugin/commands/hmi/decrypt_certificate_response.h" #endif // EXTERNAL_PROPRIETARY_MODE -#ifdef HMI_DBUS_API -#include "sdl_rpc_plugin/commands/hmi/vi_get_vehicle_data_request_template.h" -#include "sdl_rpc_plugin/commands/hmi/vi_get_vehicle_data_response_template.h" -#include "sdl_rpc_plugin/commands/hmi/vi_subscribe_vehicle_data_request_template.h" -#include "sdl_rpc_plugin/commands/hmi/vi_subscribe_vehicle_data_response_template.h" -#include "sdl_rpc_plugin/commands/hmi/vi_unsubscribe_vehicle_data_request_template.h" -#include "sdl_rpc_plugin/commands/hmi/vi_unsubscribe_vehicle_data_response_template.h" -#include "sdl_rpc_plugin/commands/hmi/on_vi_gps_data_notification.h" -#include "sdl_rpc_plugin/commands/hmi/on_vi_speed_notification.h" -#include "sdl_rpc_plugin/commands/hmi/on_vi_rpm_notification.h" -#include "sdl_rpc_plugin/commands/hmi/on_vi_fuel_level_notification.h" -#include "sdl_rpc_plugin/commands/hmi/on_vi_fuel_level_state_notification.h" -#include "sdl_rpc_plugin/commands/hmi/on_vi_instant_fuel_consumption_notification.h" -#include "sdl_rpc_plugin/commands/hmi/on_vi_external_temperature_notification.h" -#include "sdl_rpc_plugin/commands/hmi/on_vi_vin_notification.h" -#include "sdl_rpc_plugin/commands/hmi/on_vi_prndl_notification.h" -#include "sdl_rpc_plugin/commands/hmi/on_vi_tire_pressure_notification.h" -#include "sdl_rpc_plugin/commands/hmi/on_vi_odometer_notification.h" -#include "sdl_rpc_plugin/commands/hmi/on_vi_belt_status_notification.h" -#include "sdl_rpc_plugin/commands/hmi/on_vi_body_information_notification.h" -#include "sdl_rpc_plugin/commands/hmi/on_vi_device_status_notification.h" -#include "sdl_rpc_plugin/commands/hmi/on_vi_driver_braking_notification.h" -#include "sdl_rpc_plugin/commands/hmi/on_vi_wiper_status_notification.h" -#include "sdl_rpc_plugin/commands/hmi/on_vi_head_lamp_status_notification.h" -#include "sdl_rpc_plugin/commands/hmi/on_vi_engine_torque_notification.h" -#include "sdl_rpc_plugin/commands/hmi/on_vi_acc_pedal_position_notification.h" -#include "sdl_rpc_plugin/commands/hmi/on_vi_steering_wheel_angle_notification.h" -#include "sdl_rpc_plugin/commands/hmi/on_vi_my_key_notification.h" -#endif // #ifdef HMI_DBUS_API - #include "sdl_rpc_plugin/commands/hmi/navi_is_ready_request.h" #include "sdl_rpc_plugin/commands/hmi/navi_show_constant_tbt_request.h" #include "sdl_rpc_plugin/commands/hmi/navi_show_constant_tbt_response.h" @@ -603,229 +573,6 @@ CommandCreator& HMICommandFactory::get_creator_factory( ? factory.GetCreator<commands::UIIsReadyRequest>() : factory.GetCreator<commands::UIIsReadyResponse>(); } -#ifdef HMI_DBUS_API - case hmi_apis::FunctionID::VehicleInfo_GetGpsData: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator< - commands::VISubscribeVehicleDataRequestTemplate< - hmi_apis::FunctionID::VehicleInfo_GetGpsData> >() - : factory.GetCreator< - commands::VISubscribeVehicleDataResponseTemplate< - hmi_apis::FunctionID::VehicleInfo_GetGpsData> >(); - } - case hmi_apis::FunctionID::VehicleInfo_GetSpeed: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator<commands::VIGetVehicleDataRequestTemplate< - hmi_apis::FunctionID::VehicleInfo_GetSpeed> >() - : factory - .GetCreator<commands::VIGetVehicleDataResponseTemplate< - hmi_apis::FunctionID::VehicleInfo_GetSpeed> >(); - } - case hmi_apis::FunctionID::VehicleInfo_GetRpm: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator<commands::VIGetVehicleDataRequestTemplate< - hmi_apis::FunctionID::VehitcleInfo_GetRpm> >() - : factory - .GetCreator<commands::VIGetVehicleDataResponseTemplate< - hmi_apis::FunctionID::VehicleInfo_GetRpm> >(); - } - case hmi_apis::FunctionID::VehicleInfo_GetFuelLevel: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator<commands::VIGetVehicleDataRequestTemplate< - hmi_apis::FunctionID::VehicleInfo_GetFuelLevel> >() - : factory - .GetCreator<commands::VIGetVehicleDataResponseTemplate< - hmi_apis::FunctionID::VehicleInfo_GetFuelLevel> >(); - } - case hmi_apis::FunctionID::VehicleInfo_GetFuelLevelState: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator<commands::VIGetVehicleDataRequestTemplate< - hmi_apis::FunctionID::VehicleInfo_GetFuelLevelState> >() - : factory - .GetCreator<commands::VIGetVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_GetFuelLevelState> >(); - } - case hmi_apis::FunctionID::VehicleInfo_GetInstantFuelConsumption: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator<commands::VIGetVehicleDataRequestTemplate< - hmi_apis::FunctionID:: - VehicleInfo_GetInstantFuelConsumption> >() - : factory - .GetCreator<commands::VIGetVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_GetInstantFuelConsumption> >(); - } - case hmi_apis::FunctionID::VehicleInfo_GetExternalTemperature: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator<commands::VIGetVehicleDataRequestTemplate< - hmi_apis::FunctionID:: - VehicleInfo_GetExternalTemperature> >() - : factory - .GetCreator<commands::VIGetVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_GetExternalTemperature> >(); - } - case hmi_apis::FunctionID::VehicleInfo_GetPrndl: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator<commands::VIGetVehicleDataRequestTemplate< - hmi_apis::FunctionID::VehicleInfo_GetPrndl> >() - : factory - .GetCreator<commands::VIGetVehicleDataResponseTemplate< - hmi_apis::FunctionID::VehicleInfo_GetPrndl> >(); - } - case hmi_apis::FunctionID::VehicleInfo_GetVin: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator<commands::VIGetVehicleDataRequestTemplate< - hmi_apis::FunctionID::VehicleInfo_GetVin> >() - : factory - .GetCreator<commands::VIGetVehicleDataResponseTemplate< - hmi_apis::FunctionID::VehicleInfo_GetVin> >(); - } - case hmi_apis::FunctionID::VehicleInfo_GetTirePressure: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator<commands::VIGetVehicleDataRequestTemplate< - hmi_apis::FunctionID::VehicleInfo_GetTirePressure> >() - : factory - .GetCreator<commands::VIGetVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_GetTirePressure> >(); - } - case hmi_apis::FunctionID::VehicleInfo_GetOdometer: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator<commands::VIGetVehicleDataRequestTemplate< - hmi_apis::FunctionID::VehicleInfo_GetOdometer> >() - : factory - .GetCreator<commands::VIGetVehicleDataResponseTemplate< - hmi_apis::FunctionID::VehicleInfo_GetOdometer> >(); - } - case hmi_apis::FunctionID::VehicleInfo_GetBeltStatus: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator<commands::VIGetVehicleDataRequestTemplate< - hmi_apis::FunctionID::VehicleInfo_GetBeltStatus> >() - : factory - .GetCreator<commands::VIGetVehicleDataResponseTemplate< - hmi_apis::FunctionID::VehicleInfo_GetBeltStatus> >(); - } - case hmi_apis::FunctionID::VehicleInfo_GetBodyInformation: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator<commands::VIGetVehicleDataRequestTemplate< - hmi_apis::FunctionID::VehicleInfo_GetBodyInformation> >() - : factory - .GetCreator<commands::VIGetVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_GetBodyInformation> >(); - } - case hmi_apis::FunctionID::VehicleInfo_GetDeviceStatus: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator<commands::VIGetVehicleDataRequestTemplate< - hmi_apis::FunctionID::VehicleInfo_GetDeviceStatus> >() - : factory - .GetCreator<commands::VIGetVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_GetDeviceStatus> >(); - } - case hmi_apis::FunctionID::VehicleInfo_GetDriverBraking: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator<commands::VIGetVehicleDataRequestTemplate< - hmi_apis::FunctionID::VehicleInfo_GetDriverBraking> >() - : factory - .GetCreator<commands::VIGetVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_GetDriverBraking> >(); - } - case hmi_apis::FunctionID::VehicleInfo_GetWiperStatus: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator<commands::VIGetVehicleDataRequestTemplate< - hmi_apis::FunctionID::VehicleInfo_GetWiperStatus> >() - : factory - .GetCreator<commands::VIGetVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_GetWiperStatus> >(); - } - case hmi_apis::FunctionID::VehicleInfo_GetHeadLampStatus: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator<commands::VIGetVehicleDataRequestTemplate< - hmi_apis::FunctionID::VehicleInfo_GetHeadLampStatus> >() - : factory - .GetCreator<commands::VIGetVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_GetHeadLampStatus> >(); - } - case hmi_apis::FunctionID::VehicleInfo_GetEngineTorque: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator<commands::VIGetVehicleDataRequestTemplate< - hmi_apis::FunctionID::VehicleInfo_GetEngineTorque> >() - : factory - .GetCreator<commands::VIGetVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_GetEngineTorque> >(); - } - case hmi_apis::FunctionID::VehicleInfo_GetAccPedalPosition: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator<commands::VIGetVehicleDataRequestTemplate< - hmi_apis::FunctionID:: - VehicleInfo_GetAccPedalPosition> >() - : factory - .GetCreator<commands::VIGetVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_GetAccPedalPosition> >(); - } - case hmi_apis::FunctionID::VehicleInfo_GetSteeringWheelAngle: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator<commands::VIGetVehicleDataRequestTemplate< - hmi_apis::FunctionID:: - VehicleInfo_GetSteeringWheelAngle> >() - : factory - .GetCreator<commands::VIGetVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_GetSteeringWheelAngle> >(); - } - case hmi_apis::FunctionID::VehicleInfo_GetECallInfo: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator<commands::VIGetVehicleDataRequestTemplate< - hmi_apis::FunctionID::VehicleInfo_GetECallInfo> >() - : factory - .GetCreator<commands::VIGetVehicleDataResponseTemplate< - hmi_apis::FunctionID::VehicleInfo_GetECallInfo> >(); - } - case hmi_apis::FunctionID::VehicleInfo_GetAirbagStatus: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator<commands::VIGetVehicleDataRequestTemplate< - hmi_apis::FunctionID::VehicleInfo_GetAirbagStatus> >() - : factory - .GetCreator<commands::VIGetVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_GetAirbagStatus> >(); - } - case hmi_apis::FunctionID::VehicleInfo_GetEmergencyEvent: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator<commands::VIGetVehicleDataRequestTemplate< - hmi_apis::FunctionID::VehicleInfo_GetEmergencyEvent> >() - : factory - .GetCreator<commands::VIGetVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_GetEmergencyEvent> >(); - } - case hmi_apis::FunctionID::VehicleInfo_GetClusterModeStatus: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator<commands::VIGetVehicleDataRequestTemplate< - hmi_apis::FunctionID:: - VehicleInfo_GetClusterModeStatus> >() - : factory - .GetCreator<commands::VIGetVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_GetClusterModeStatus> >(); - } - case hmi_apis::FunctionID::VehicleInfo_GetMyKey: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator<commands::VIGetVehicleDataRequestTemplate< - hmi_apis::FunctionID::VehicleInfo_GetMyKey> >() - : factory - .GetCreator<commands::VIGetVehicleDataResponseTemplate< - hmi_apis::FunctionID::VehicleInfo_GetMyKey> >(); - } -#endif // #ifdef HMI_DBUS_API case hmi_apis::FunctionID::Navigation_IsReady: { return hmi_apis::messageType::request == message_type ? factory.GetCreator<commands::NaviIsReadyRequest>() @@ -955,610 +702,6 @@ CommandCreator& HMICommandFactory::get_creator_factory( return factory .GetCreator<commands::hmi::OnButtonSubscriptionNotification>(); } -#ifdef HMI_DBUS_API - case hmi_apis::FunctionID::VehicleInfo_SubscribeGps: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator< - commands::VISubscribeVehicleDataRequestTemplate< - hmi_apis::FunctionID::VehicleInfo_SubscribeGps> >() - : factory.GetCreator< - commands::VISubscribeVehicleDataResponseTemplate< - hmi_apis::FunctionID::VehicleInfo_SubscribeGps> >(); - } - case hmi_apis::FunctionID::VehicleInfo_SubscribeSpeed: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator< - commands::VISubscribeVehicleDataRequestTemplate< - hmi_apis::FunctionID::VehicleInfo_SubscribeSpeed> >() - : factory.GetCreator< - commands::VISubscribeVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_SubscribeSpeed> >(); - } - case hmi_apis::FunctionID::VehicleInfo_SubscribeRpm: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator< - commands::VISubscribeVehicleDataRequestTemplate< - hmi_apis::FunctionID::VehicleInfo_SubscribeRpm> >() - : factory.GetCreator< - commands::VISubscribeVehicleDataResponseTemplate< - hmi_apis::FunctionID::VehicleInfo_SubscribeRpm> >(); - } - case hmi_apis::FunctionID::VehicleInfo_SubscribeFuelLevel: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator< - commands::VISubscribeVehicleDataRequestTemplate< - hmi_apis::FunctionID:: - VehicleInfo_SubscribeFuelLevel> >() - : factory.GetCreator< - commands::VISubscribeVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_SubscribeFuelLevel> >(); - } - case hmi_apis::FunctionID::VehicleInfo_SubscribeFuelLevel_State: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator< - commands::VISubscribeVehicleDataRequestTemplate< - hmi_apis::FunctionID:: - VehicleInfo_SubscribeFuelLevel_State> >() - : factory.GetCreator< - commands::VISubscribeVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_SubscribeFuelLevel_State> >(); - } - case hmi_apis::FunctionID::VehicleInfo_SubscribeInstantFuelConsumption: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator< - commands::VISubscribeVehicleDataRequestTemplate< - hmi_apis::FunctionID:: - VehicleInfo_SubscribeInstantFuelConsumption> >() - : factory.GetCreator< - commands::VISubscribeVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_SubscribeInstantFuelConsumption> >(); - } - case hmi_apis::FunctionID::VehicleInfo_SubscribeExternalTemperature: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator< - commands::VISubscribeVehicleDataRequestTemplate< - hmi_apis::FunctionID:: - VehicleInfo_SubscribeExternalTemperature> >() - : factory.GetCreator< - commands::VISubscribeVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_SubscribeExternalTemperature> >(); - } - case hmi_apis::FunctionID::VehicleInfo_SubscribePrndl: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator< - commands::VISubscribeVehicleDataRequestTemplate< - hmi_apis::FunctionID::VehicleInfo_SubscribePrndl> >() - : factory.GetCreator< - commands::VISubscribeVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_SubscribePrndl> >(); - } - case hmi_apis::FunctionID::VehicleInfo_SubscribeVin: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator< - commands::VISubscribeVehicleDataRequestTemplate< - hmi_apis::FunctionID::VehicleInfo_SubscribeVin> >() - : factory.GetCreator< - commands::VISubscribeVehicleDataResponseTemplate< - hmi_apis::FunctionID::VehicleInfo_SubscribeVin> >(); - } - case hmi_apis::FunctionID::VehicleInfo_SubscribeTirePressure: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator< - commands::VISubscribeVehicleDataRequestTemplate< - hmi_apis::FunctionID:: - VehicleInfo_SubscribeTirePressure> >() - : factory.GetCreator< - commands::VISubscribeVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_SubscribeTirePressure> >(); - } - case hmi_apis::FunctionID::VehicleInfo_SubscribeOdometer: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator< - commands::VISubscribeVehicleDataRequestTemplate< - hmi_apis::FunctionID:: - VehicleInfo_SubscribeOdometer> >() - : factory.GetCreator< - commands::VISubscribeVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_SubscribeOdometer> >(); - } - case hmi_apis::FunctionID::VehicleInfo_SubscribeBeltStatus: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator< - commands::VISubscribeVehicleDataRequestTemplate< - hmi_apis::FunctionID:: - VehicleInfo_SubscribeBeltStatus> >() - : factory.GetCreator< - commands::VISubscribeVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_SubscribeBeltStatus> >(); - } - case hmi_apis::FunctionID::VehicleInfo_SubscribeBodyInformation: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator< - commands::VISubscribeVehicleDataRequestTemplate< - hmi_apis::FunctionID:: - VehicleInfo_SubscribeBodyInformation> >() - : factory.GetCreator< - commands::VISubscribeVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_SubscribeBodyInformation> >(); - } - case hmi_apis::FunctionID::VehicleInfo_SubscribeDeviceStatus: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator< - commands::VISubscribeVehicleDataRequestTemplate< - hmi_apis::FunctionID:: - VehicleInfo_SubscribeDeviceStatus> >() - : factory.GetCreator< - commands::VISubscribeVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_SubscribeDeviceStatus> >(); - } - case hmi_apis::FunctionID::VehicleInfo_SubscribeDriverBraking: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator< - commands::VISubscribeVehicleDataRequestTemplate< - hmi_apis::FunctionID:: - VehicleInfo_SubscribeDriverBraking> >() - : factory.GetCreator< - commands::VISubscribeVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_SubscribeDriverBraking> >(); - } - case hmi_apis::FunctionID::VehicleInfo_SubscribeWiperStatus: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator< - commands::VISubscribeVehicleDataRequestTemplate< - hmi_apis::FunctionID:: - VehicleInfo_SubscribeWiperStatus> >() - : factory.GetCreator< - commands::VISubscribeVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_SubscribeWiperStatus> >(); - } - case hmi_apis::FunctionID::VehicleInfo_SubscribeHeadLampStatus: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator< - commands::VISubscribeVehicleDataRequestTemplate< - hmi_apis::FunctionID:: - VehicleInfo_SubscribeHeadLampStatus> >() - : factory.GetCreator< - commands::VISubscribeVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_SubscribeHeadLampStatus> >(); - } - case hmi_apis::FunctionID::VehicleInfo_SubscribeEngineTorque: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator< - commands::VISubscribeVehicleDataRequestTemplate< - hmi_apis::FunctionID:: - VehicleInfo_SubscribeEngineTorque> >() - : factory.GetCreator< - commands::VISubscribeVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_SubscribeEngineTorque> >(); - } - case hmi_apis::FunctionID::VehicleInfo_SubscribeAccPedalPosition: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator< - commands::VISubscribeVehicleDataRequestTemplate< - hmi_apis::FunctionID:: - VehicleInfo_SubscribeAccPedalPosition> >() - : factory.GetCreator< - commands::VISubscribeVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_SubscribeAccPedalPosition> >(); - } - case hmi_apis::FunctionID::VehicleInfo_SubscribeSteeringWheelAngle: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator< - commands::VISubscribeVehicleDataRequestTemplate< - hmi_apis::FunctionID:: - VehicleInfo_SubscribeSteeringWheelAngle> >() - : factory.GetCreator< - commands::VISubscribeVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_SubscribeSteeringWheelAngle> >(); - } - case hmi_apis::FunctionID::VehicleInfo_SubscribeECallInfo: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator< - commands::VISubscribeVehicleDataRequestTemplate< - hmi_apis::FunctionID:: - VehicleInfo_SubscribeECallInfo> >() - : factory.GetCreator< - commands::VISubscribeVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_SubscribeECallInfo> >(); - } - case hmi_apis::FunctionID::VehicleInfo_SubscribeAirbagStatus: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator< - commands::VISubscribeVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_SubscribeAirbagStatus> >() - : factory.GetCreator< - commands::VISubscribeVehicleDataRequestTemplate< - hmi_apis::FunctionID:: - VehicleInfo_SubscribeAirbagStatus> >(); - } - case hmi_apis::FunctionID::VehicleInfo_SubscribeEmergencyEvent: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator< - commands::VISubscribeVehicleDataRequestTemplate< - hmi_apis::FunctionID:: - VehicleInfo_SubscribeEmergencyEvent> >() - : factory.GetCreator< - commands::VISubscribeVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_SubscribeEmergencyEvent> >(); - } - case hmi_apis::FunctionID::VehicleInfo_SubscribeClusterModeStatus: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator< - commands::VISubscribeVehicleDataRequestTemplate< - hmi_apis::FunctionID:: - VehicleInfo_SubscribeClusterModeStatus> >() - : factory.GetCreator< - commands::VISubscribeVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_SubscribeClusterModeStatus> >(); - } - case hmi_apis::FunctionID::VehicleInfo_SubscribeMyKey: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator< - commands::VISubscribeVehicleDataRequestTemplate< - hmi_apis::FunctionID::VehicleInfo_SubscribeMyKey> >() - : factory.GetCreator< - commands::VISubscribeVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_SubscribeMyKey> >(); - } - case hmi_apis::FunctionID::VehicleInfo_UnsubscribeGps: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator < - commands::VIUnsubscribeVehicleDataRequestTemplate< - hmi_apis::FunctionID::VehicleInfo_UnsubscribeGps>() - : factory.GetCreator< - commands::VIUnsubscribeVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_UnsubscribeGps> >(); - } - case hmi_apis::FunctionID::VehicleInfo_UnsubscribeSpeed: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator< - commands::VIUnsubscribeVehicleDataRequestTemplate< - hmi_apis::FunctionID:: - VehicleInfo_UnsubscribeSpeed> >() - : factory.GetCreator< - commands::VIUnsubscribeVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_UnsubscribeSpeed> >(); - } - case hmi_apis::FunctionID::VehicleInfo_UnsubscribeRpm: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator< - commands::VIUnsubscribeVehicleDataRequestTemplate< - hmi_apis::FunctionID::VehicleInfo_UnsubscribeRpm> >() - : factory.GetCreator< - commands::VIUnsubscribeVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_UnsubscribeRpm> >(); - } - case hmi_apis::FunctionID::VehicleInfo_UnsubscribeFuelLevel: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator< - commands::VIUnsubscribeVehicleDataRequestTemplate< - hmi_apis::FunctionID:: - VehicleInfo_UnsubscribeFuelLevel> >() - : factory.GetCreator< - commands::VIUnsubscribeVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_UnsubscribeFuelLevel> >(); - } - case hmi_apis::FunctionID::VehicleInfo_UnsubscribeFuelLevel_State: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator< - commands::VIUnsubscribeVehicleDataRequestTemplate< - hmi_apis::FunctionID:: - VehicleInfo_UnsubscribeFuelLevel_State> >() - : factory.GetCreator< - commands::VIUnsubscribeVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_UnsubscribeFuelLevel_State> >(); - } - case hmi_apis::FunctionID::VehicleInfo_UnsubscribeInstantFuelConsumption: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator< - commands::VIUnsubscribeVehicleDataRequestTemplate< - hmi_apis::FunctionID:: - VehicleInfo_UnsubscribeInstantFuelConsumption> >() - : factory.GetCreator< - commands::VIUnsubscribeVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_UnsubscribeInstantFuelConsumption> >(); - } - case hmi_apis::FunctionID::VehicleInfo_UnsubscribeExternalTemperature: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator< - commands::VIUnsubscribeVehicleDataRequestTemplate< - hmi_apis::FunctionID:: - VehicleInfo_UnsubscribeExternalTemperature> >() - : factory.GetCreator< - commands::VIUnsubscribeVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_UnsubscribeExternalTemperature> >(); - } - case hmi_apis::FunctionID::VehicleInfo_UnsubscribePrndl: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator< - commands::VIUnsubscribeVehicleDataRequestTemplate< - hmi_apis::FunctionID:: - VehicleInfo_UnsubscribePrndl> >() - : factory.GetCreator< - commands::VIUnsubscribeVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_UnsubscribePrndl> >(); - } - case hmi_apis::FunctionID::VehicleInfo_UnsubscribeVin: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator< - commands::VIUnsubscribeVehicleDataRequestTemplate< - hmi_apis::FunctionID::VehicleInfo_UnsubscribeVin> >() - : factory.GetCreator< - commands::VIUnsubscribeVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_UnsubscribeVin> >(); - } - case hmi_apis::FunctionID::VehicleInfo_UnsubscribeTirePressure: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator< - commands::VIUnsubscribeVehicleDataRequestTemplate< - hmi_apis::FunctionID:: - VehicleInfo_UnsubscribeTirePressure> >() - : factory.GetCreator< - commands::VIUnsubscribeVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_UnsubscribeTirePressure> >(); - } - case hmi_apis::FunctionID::VehicleInfo_UnsubscribeOdometer: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator< - commands::VIUnsubscribeVehicleDataRequestTemplate< - hmi_apis::FunctionID:: - VehicleInfo_UnsubscribeOdometer> >() - : factory.GetCreator< - commands::VIUnsubscribeVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_UnsubscribeOdometer> >(); - } - case hmi_apis::FunctionID::VehicleInfo_UnsubscribeBeltStatus: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator< - commands::VIUnsubscribeVehicleDataRequestTemplate< - hmi_apis::FunctionID:: - VehicleInfo_UnsubscribeBeltStatus> >() - : factory.GetCreator< - commands::VIUnsubscribeVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_UnsubscribeBeltStatus> >(); - } - case hmi_apis::FunctionID::VehicleInfo_UnsubscribeBodyInformation: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator< - commands::VIUnsubscribeVehicleDataRequestTemplate< - hmi_apis::FunctionID:: - VehicleInfo_UnsubscribeBodyInformation> >() - : factory.GetCreator< - commands::VIUnsubscribeVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_UnsubscribeBodyInformation> >(); - } - case hmi_apis::FunctionID::VehicleInfo_UnsubscribeDeviceStatus: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator< - commands::VIUnsubscribeVehicleDataRequestTemplate< - hmi_apis::FunctionID:: - VehicleInfo_UnsubscribeDeviceStatus> >() - : factory.GetCreator< - commands::VIUnsubscribeVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_UnsubscribeDeviceStatus> >(); - } - case hmi_apis::FunctionID::VehicleInfo_UnsubscribeDriverBraking: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator< - commands::VIUnsubscribeVehicleDataRequestTemplate< - hmi_apis::FunctionID:: - VehicleInfo_UnsubscribeDriverBraking> >() - : factory.GetCreator< - commands::VIUnsubscribeVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_UnsubscribeDriverBraking> >(); - } - case hmi_apis::FunctionID::VehicleInfo_UnsubscribeWiperStatus: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator< - commands::VIUnsubscribeVehicleDataRequestTemplate< - hmi_apis::FunctionID:: - VehicleInfo_UnsubscribeWiperStatus> >() - : factory.GetCreator< - commands::VIUnsubscribeVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_UnsubscribeWiperStatus> >(); - } - case hmi_apis::FunctionID::VehicleInfo_UnsubscribeHeadLampStatus: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator< - commands::VIUnsubscribeVehicleDataRequestTemplate< - hmi_apis::FunctionID:: - VehicleInfo_UnsubscribeHeadLampStatus> >() - : factory.GetCreator< - commands::VIUnsubscribeVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_UnsubscribeHeadLampStatus> >(); - } - case hmi_apis::FunctionID::VehicleInfo_UnsubscribeEngineTorque: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator< - commands::VIUnsubscribeVehicleDataRequestTemplate< - hmi_apis::FunctionID:: - VehicleInfo_UnsubscribeEngineTorque> >() - : factory.GetCreator< - commands::VIUnsubscribeVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_UnsubscribeEngineTorque> >(); - } - case hmi_apis::FunctionID::VehicleInfo_UnsubscribeAccPedalPosition: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator< - commands::VIUnsubscribeVehicleDataRequestTemplate< - hmi_apis::FunctionID:: - VehicleInfo_UnsubscribeAccPedalPosition> >() - : factory.GetCreator< - commands::VIUnsubscribeVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_UnsubscribeAccPedalPosition> >(); - } - case hmi_apis::FunctionID::VehicleInfo_UnsubscribeSteeringWheelAngle: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator< - commands::VIUnsubscribeVehicleDataRequestTemplate< - hmi_apis::FunctionID:: - VehicleInfo_UnsubscribeSteeringWheelAngle> >() - : factory.GetCreator< - commands::VIUnsubscribeVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_UnsubscribeSteeringWheelAngle> >(); - } - case hmi_apis::FunctionID::VehicleInfo_UnsubscribeECallInfo: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator< - commands::VIUnsubscribeVehicleDataRequestTemplate< - hmi_apis::FunctionID:: - VehicleInfo_UnsubscribeECallInfo> >() - : factory.GetCreator< - commands::VIUnsubscribeVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_UnsubscribeECallInfo> >(); - } - case hmi_apis::FunctionID::VehicleInfo_UnsubscribeAirbagStatus: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator< - commands::VIUnsubscribeVehicleDataRequestTemplate< - hmi_apis::FunctionID:: - VehicleInfo_UnsubscribeAirbagStatus> >() - : factory.GetCreator< - commands::VIUnsubscribeVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_UnsubscribeAirbagStatus> >(); - } - case hmi_apis::FunctionID::VehicleInfo_UnsubscribeEmergencyEvent: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator< - commands::VIUnsubscribeVehicleDataRequestTemplate< - hmi_apis::FunctionID:: - VehicleInfo_UnsubscribeEmergencyEvent> >() - : factory.GetCreator< - commands::VIUnsubscribeVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_UnsubscribeEmergencyEvent> >(); - } - case hmi_apis::FunctionID::VehicleInfo_UnsubscribeClusterModeStatus: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator< - commands::VIUnsubscribeVehicleDataRequestTemplate< - hmi_apis::FunctionID:: - VehicleInfo_UnsubscribeClusterModeStatus> >() - : factory.GetCreator< - commands::VIUnsubscribeVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_UnsubscribeClusterModeStatus> >(); - } - case hmi_apis::FunctionID::VehicleInfo_UnsubscribeMyKey: { - return hmi_apis::messageType::request == message_type - ? factory.GetCreator<commands::>( - VIUnsubscribeVehicleDataRequestTemplate< - hmi_apis::FunctionID::VehicleInfo_UnsubscribeMyKey>) - : factory.GetCreator< - commands::VIUnsubscribeVehicleDataResponseTemplate< - hmi_apis::FunctionID:: - VehicleInfo_UnsubscribeMyKey> >(); - } - case hmi_apis::FunctionID::VehicleInfo_OnGpsData: { - return factory.GetCreator<commands::OnVIGpsDataNotification>(); - } - case hmi_apis::FunctionID::VehicleInfo_OnSpeed: { - return factory.GetCreator<commands::OnVISpeedNotification>(); - } - case hmi_apis::FunctionID::VehicleInfo_OnRpm: { - return factory.GetCreator<commands::OnVIRpmNotification>(); - } - case hmi_apis::FunctionID::VehicleInfo_OnFuelLevel: { - return factory.GetCreator<commands::OnVifuelLevelNotification>(); - } - case hmi_apis::FunctionID::VehicleInfo_OnFuelLevelState: { - return factory.GetCreator<commands::OnVifuelLevelStateNotification>(); - } - case hmi_apis::FunctionID::VehicleInfo_OnInstantFuelConsumption: { - return factory - .GetCreator<commands::OnVIInstantFuelConsumptionNotification>(); - } - case hmi_apis::FunctionID::VehicleInfo_OnExternalTemperature: { - return factory - .GetCreator<commands::OnVIExternalTemperatureNotification>(); - } - case hmi_apis::FunctionID::VehicleInfo_OnVin: { - return factory.GetCreator<commands::OnVIVinNotification>(); - } - case hmi_apis::FunctionID::VehicleInfo_OnPrndl: { - return factory.GetCreator<commands::OnVIPrndlNotification>(); - } - case hmi_apis::FunctionID::VehicleInfo_OnTirePressure: { - return factory.GetCreator<commands::OnVITirePressureNotification>(); - } - case hmi_apis::FunctionID::VehicleInfo_OnOdometer: { - return factory.GetCreator<commands::OnVIOdometerNotification>(); - } - case hmi_apis::FunctionID::VehicleInfo_OnBeltStatus: { - return factory.GetCreator<commands::OnVIBeltStatusNotification>(); - } - case hmi_apis::FunctionID::VehicleInfo_OnBodyInformation: { - return factory.GetCreator<commands::OnVIBodyInformationNotification>(); - } - case hmi_apis::FunctionID::VehicleInfo_OnDeviceStatus: { - return factory.GetCreator<commands::OnVIDeviceStatusNotification>(); - } - case hmi_apis::FunctionID::VehicleInfo_OnDriverBraking: { - return factory.GetCreator<commands::OnVIDriverBrakingNotification>(); - } - case hmi_apis::FunctionID::VehicleInfo_OnWiperStatus: { - return factory.GetCreator<commands::OnVIWiperStatusNotification>(); - } - case hmi_apis::FunctionID::VehicleInfo_OnHeadLampStatus: { - return factory.GetCreator<commands::OnVIHeadLampStatusNotification>(); - } - case hmi_apis::FunctionID::VehicleInfo_OnEngineTorque: { - return factory.GetCreator<commands::OnVIEngineTorqueNotification>(); - } - case hmi_apis::FunctionID::VehicleInfo_OnAccPedalPosition: { - return factory.GetCreator<commands::OnVIAccPedalPositionNotification>(); - } - case hmi_apis::FunctionID::VehicleInfo_OnSteeringWheelAngle: { - return factory.GetCreator<commands::OnVISteeringWheelAngleNotification>(); - } - case hmi_apis::FunctionID::VehicleInfo_OnMyKey: { - return factory.GetCreator<commands::OnVIMyKeyNotification>(); - } -#endif // #ifdef HMI_DBUS_API case hmi_apis::FunctionID::Navigation_OnTBTClientState: { return factory.GetCreator<commands::OnNaviTBTClientStateNotification>(); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/dummy_hmi_commands_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/dummy_hmi_commands_test.cc index 2374609774..b8b84f13c9 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/dummy_hmi_commands_test.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/dummy_hmi_commands_test.cc @@ -223,27 +223,6 @@ #include "hmi/on_tts_reset_timeout_notification.h" #include "hmi/dial_number_request.h" #include "hmi/dial_number_response.h" -#include "hmi/on_vi_gps_data_notification.h" -#include "hmi/on_vi_speed_notification.h" -#include "hmi/on_vi_rpm_notification.h" -#include "hmi/on_vi_fuel_level_notification.h" -#include "hmi/on_vi_fuel_level_state_notification.h" -#include "hmi/on_vi_instant_fuel_consumption_notification.h" -#include "hmi/on_vi_external_temperature_notification.h" -#include "hmi/on_vi_vin_notification.h" -#include "hmi/on_vi_prndl_notification.h" -#include "hmi/on_vi_tire_pressure_notification.h" -#include "hmi/on_vi_odometer_notification.h" -#include "hmi/on_vi_belt_status_notification.h" -#include "hmi/on_vi_body_information_notification.h" -#include "hmi/on_vi_device_status_notification.h" -#include "hmi/on_vi_driver_braking_notification.h" -#include "hmi/on_vi_wiper_status_notification.h" -#include "hmi/on_vi_head_lamp_status_notification.h" -#include "hmi/on_vi_engine_torque_notification.h" -#include "hmi/on_vi_acc_pedal_position_notification.h" -#include "hmi/on_vi_steering_wheel_angle_notification.h" -#include "hmi/on_vi_my_key_notification.h" #include "hmi/ui_set_icon_request.h" #include "application_manager/commands/commands_test.h" @@ -515,28 +494,7 @@ typedef Types<commands::hmi::OnButtonEventNotification, commands::OnVRLanguageChangeNotification, commands::OnTTSLanguageChangeNotification> HMICommandsListFourth; -typedef Types<commands::OnVIGpsDataNotification, - commands::OnVISpeedNotification, - commands::OnVIRpmNotification, - commands::OnVIFuelLevelNotification, - commands::OnVIFuelLevelStateNotification, - commands::OnVIInstantFuelConsumptionNotification, - commands::OnVIExternalTemperatureNotification, - commands::OnVIVinNotification, - commands::OnVIPrndlNotification, - commands::OnVITirePressureNotification, - commands::OnVIOdometerNotification, - commands::OnVIBeltStatusNotification, - commands::OnVIBodyInformationNotification, - commands::OnVIDeviceStatusNotification, - commands::OnVIDriverBrakingNotification, - commands::OnVIWiperStatusNotification, - commands::OnVIHeadLampStatusNotification, - commands::OnVIEngineTorqueNotification, - commands::OnVIAccPedalPositionNotification, - commands::OnVISteeringWheelAngleNotification, - commands::OnVIMyKeyNotification, - commands::AllowAllAppsRequest, +typedef Types<commands::AllowAllAppsRequest, commands::AllowAllAppsResponse, commands::AllowAppRequest, commands::AllowAppResponse> HMICommandsListFifth; diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/hmi_notifications_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/hmi_notifications_test.cc index b498d07d99..245bb72860 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/hmi_notifications_test.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/hmi_notifications_test.cc @@ -42,27 +42,6 @@ #include "sdl_rpc_plugin/commands/hmi/on_ui_command_notification.h" #include "sdl_rpc_plugin/commands/hmi/on_ui_keyboard_input_notification.h" #include "sdl_rpc_plugin/commands/hmi/on_ui_touch_event_notification.h" -#include "sdl_rpc_plugin/commands/hmi/on_vi_acc_pedal_position_notification.h" -#include "sdl_rpc_plugin/commands/hmi/on_vi_belt_status_notification.h" -#include "sdl_rpc_plugin/commands/hmi/on_vi_body_information_notification.h" -#include "sdl_rpc_plugin/commands/hmi/on_vi_device_status_notification.h" -#include "sdl_rpc_plugin/commands/hmi/on_vi_driver_braking_notification.h" -#include "sdl_rpc_plugin/commands/hmi/on_vi_engine_torque_notification.h" -#include "sdl_rpc_plugin/commands/hmi/on_vi_external_temperature_notification.h" -#include "sdl_rpc_plugin/commands/hmi/on_vi_fuel_level_notification.h" -#include "sdl_rpc_plugin/commands/hmi/on_vi_fuel_level_state_notification.h" -#include "sdl_rpc_plugin/commands/hmi/on_vi_gps_data_notification.h" -#include "sdl_rpc_plugin/commands/hmi/on_vi_head_lamp_status_notification.h" -#include "sdl_rpc_plugin/commands/hmi/on_vi_instant_fuel_consumption_notification.h" -#include "sdl_rpc_plugin/commands/hmi/on_vi_my_key_notification.h" -#include "sdl_rpc_plugin/commands/hmi/on_vi_odometer_notification.h" -#include "sdl_rpc_plugin/commands/hmi/on_vi_prndl_notification.h" -#include "sdl_rpc_plugin/commands/hmi/on_vi_rpm_notification.h" -#include "sdl_rpc_plugin/commands/hmi/on_vi_speed_notification.h" -#include "sdl_rpc_plugin/commands/hmi/on_vi_steering_wheel_angle_notification.h" -#include "sdl_rpc_plugin/commands/hmi/on_vi_tire_pressure_notification.h" -#include "sdl_rpc_plugin/commands/hmi/on_vi_vin_notification.h" -#include "sdl_rpc_plugin/commands/hmi/on_vi_wiper_status_notification.h" #include "sdl_rpc_plugin/commands/hmi/on_app_permission_changed_notification.h" #include "sdl_rpc_plugin/commands/hmi/on_app_registered_notification.h" #include "sdl_rpc_plugin/commands/hmi/on_audio_data_streaming_notification.h" @@ -312,12 +291,6 @@ void sig_handler(int sig) { } // namespace template <class Command> -class HMIOnViNotifications : public commands_test::CommandsTest<kIsNice> { - public: - typedef Command CommandType; -}; - -template <class Command> class HMIOnNotificationsListToHMI : public commands_test::CommandsTest<kIsNice> { public: diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_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 17ae1ffd09..04a131da8f 100644 --- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_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 @@ -73,22 +73,6 @@ class GetVehicleDataRequest : public app_mngr::commands::CommandRequestImpl { protected: virtual void on_event(const app_mngr::event_engine::Event& event); -#ifdef HMI_DBUS_API - private: - void SendRequestsToHmi(const int32_t app_id); - - struct HmiRequest { - hmi_apis::Common_Result::eType status; - bool complete; - smart_objects::SmartObject value; - const char* str; - hmi_apis::FunctionID::eType func_id; - }; - - typedef std::vector<HmiRequest> HmiRequests; - HmiRequests hmi_requests_; -#endif // #ifdef HMI_DBUS_API - DISALLOW_COPY_AND_ASSIGN(GetVehicleDataRequest); }; diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_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 d324d5ca24..6e084e0869 100644 --- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_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 @@ -87,20 +87,6 @@ class SubscribeVehicleDataRequest */ bool Init() FINAL; -#ifdef HMI_DBUS_API - private: - struct HmiRequest { - hmi_apis::Common_Result::eType status; - bool complete; - smart_objects::SmartObject value; - const char* str; - hmi_apis::FunctionID::eType func_id; - }; - - typedef std::vector<HmiRequest> HmiRequests; - HmiRequests hmi_requests_; -#endif // #ifdef HMI_DBUS_API - private: /** * @brief Checks, if any app is subscribed for particular VI parameter diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_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 5730048b85..e04d1fb97a 100644 --- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_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 @@ -84,20 +84,6 @@ class UnsubscribeVehicleDataRequest */ bool Init() FINAL; -#ifdef HMI_DBUS_API - private: - struct HmiRequest { - hmi_apis::Common_Result::eType status; - bool complete; - smart_objects::SmartObject value; - const char* str; - hmi_apis::FunctionID::eType func_id; - }; - - typedef std::vector<HmiRequest> HmiRequests; - HmiRequests hmi_requests_; -#endif // #ifdef HMI_DBUS_API - private: /** * @brief Checks, if any app is subscribed for particular VI parameter diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_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 7c7a5e61f7..87a9ace377 100644 --- a/src/components/application_manager/rpc_plugins/vehicle_info_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 @@ -46,176 +46,6 @@ namespace commands { namespace str = strings; -#ifdef HMI_DBUS_API -GetVehicleDataRequest::GetVehicleDataRequest( - const application_manager::commands::MessageSharedPtr& message, - ApplicationManager& application_manager, - app_mngr::rpc_service::RPCService& rpc_service, - app_mngr::HMICapabilities& hmi_capabilities, - policy::PolicyHandlerInterface& policy_handler) - : CommandRequestImpl(message, application_manager) {} - -GetVehicleDataRequest::~GetVehicleDataRequest() {} - -void GetVehicleDataRequest::Run() { - LOG4CXX_AUTO_TRACE(logger_); - - int32_t app_id = - (*message_)[strings::params][strings::connection_key].asUInt(); - ApplicationSharedPtr app = application_manager_.application(app_id); - - if (!app) { - LOG4CXX_ERROR(logger_, "NULL pointer"); - SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED); - return; - } - - const VehicleData& vehicle_data = MessageHelper::vehicle_data(); - VehicleData::const_iterator it = vehicle_data.begin(); - - for (; vehicle_data.end() != it; ++it) { - if (true == (*message_)[str::msg_params].keyExists(it->first) && - true == (*message_)[str::msg_params][it->first].asBool()) { - SendRequestsToHmi(app->app_id()); - return; - } - } - - SendResponse(false, mobile_apis::Result::INVALID_DATA); -} - -namespace { -struct Subrequest { - hmi_apis::FunctionID::eType func_id; - const char* str; -}; -Subrequest subrequests[] = { - {hmi_apis::FunctionID::VehicleInfo_GetGpsData, str::gps}, - {hmi_apis::FunctionID::VehicleInfo_GetSpeed, str::speed}, - {hmi_apis::FunctionID::VehicleInfo_GetRpm, str::rpm}, - {hmi_apis::FunctionID::VehicleInfo_GetFuelLevel, str::fuel_level}, - {hmi_apis::FunctionID::VehicleInfo_GetFuelLevelState, - str::fuel_level_state}, - {hmi_apis::FunctionID::VehicleInfo_GetInstantFuelConsumption, - str::instant_fuel_consumption}, - {hmi_apis::FunctionID::VehicleInfo_GetExternalTemperature, - str::external_temp}, - {hmi_apis::FunctionID::VehicleInfo_GetVin, str::vin}, - {hmi_apis::FunctionID::VehicleInfo_GetPrndl, str::prndl}, - {hmi_apis::FunctionID::VehicleInfo_GetTirePressure, str::tire_pressure}, - {hmi_apis::FunctionID::VehicleInfo_GetOdometer, str::odometer}, - {hmi_apis::FunctionID::VehicleInfo_GetBeltStatus, str::belt_status}, - {hmi_apis::FunctionID::VehicleInfo_GetBodyInformation, - str::body_information}, - {hmi_apis::FunctionID::VehicleInfo_GetDeviceStatus, str::device_status}, - {hmi_apis::FunctionID::VehicleInfo_GetDriverBraking, str::driver_braking}, - {hmi_apis::FunctionID::VehicleInfo_GetWiperStatus, str::wiper_status}, - {hmi_apis::FunctionID::VehicleInfo_GetHeadLampStatus, - str::head_lamp_status}, - {hmi_apis::FunctionID::VehicleInfo_GetEngineTorque, str::engine_torque}, - {hmi_apis::FunctionID::VehicleInfo_GetAccPedalPosition, str::acc_pedal_pos}, - {hmi_apis::FunctionID::VehicleInfo_GetSteeringWheelAngle, - str::steering_wheel_angle}, - {hmi_apis::FunctionID::VehicleInfo_GetECallInfo, str::e_call_info}, - {hmi_apis::FunctionID::VehicleInfo_GetAirbagStatus, str::airbag_status}, - {hmi_apis::FunctionID::VehicleInfo_GetEmergencyEvent, str::emergency_event}, - {hmi_apis::FunctionID::VehicleInfo_GetClusterModeStatus, - str::cluster_mode_status}, - {hmi_apis::FunctionID::VehicleInfo_GetMyKey, str::my_key}, -}; -} - -void GetVehicleDataRequest::SendRequestsToHmi(const int32_t app_id) { - smart_objects::SmartObject msg_params(smart_objects::SmartType_Map); - msg_params[strings::app_id] = app_id; - - for (size_t i = 0; i < sizeof(subrequests) / sizeof(subrequests[0]); ++i) { - const Subrequest& sr = subrequests[i]; - if (true == (*message_)[str::msg_params].keyExists(sr.str) && - true == (*message_)[str::msg_params][sr.str].asBool()) { - HmiRequest hmi_request; - hmi_request.str = sr.str; - hmi_request.func_id = sr.func_id; - hmi_request.complete = false; - hmi_requests_.push_back(hmi_request); - } - } - - LOG4CXX_INFO(logger_, - hmi_requests_.size() << " requests are going to be sent to HMI"); - - for (HmiRequests::const_iterator it = hmi_requests_.begin(); - it != hmi_requests_.end(); - ++it) { - SendHMIRequest(it->func_id, &msg_params, true); - } -} - -void GetVehicleDataRequest::on_event(const event_engine::Event& event) { - LOG4CXX_INFO(logger_, "GetVehicleDataRequest::on_event " << event.id()); - - const smart_objects::SmartObject& message = event.smart_object(); - - for (HmiRequests::iterator it = hmi_requests_.begin(); - it != hmi_requests_.end(); - ++it) { - HmiRequest& hmi_request = *it; - if (hmi_request.func_id == event.id()) { - hmi_request.status = static_cast<hmi_apis::Common_Result::eType>( - message[strings::params][hmi_response::code].asInt()); - if (hmi_apis::Common_Result::SUCCESS == hmi_request.status) - hmi_request.value = message[str::msg_params][hmi_request.str]; - hmi_request.complete = true; - break; - } - } - - bool all_complete = true; - bool any_arg_success = false; - mobile_api::Result::eType status = mobile_api::Result::eType::SUCCESS; - for (HmiRequests::const_iterator it = hmi_requests_.begin(); - it != hmi_requests_.end(); - ++it) { - if (!it->complete) { - all_complete = false; - break; - } - if (hmi_apis::Common_Result::SUCCESS != it->status) { - if (mobile_api::Result::SUCCESS == status) { - status = static_cast<mobile_apis::Result::eType>(it->status); - } else if (status != - static_cast<mobile_apis::Result::eType>(it->status)) { - status = mobile_api::Result::eType::GENERIC_ERROR; - } - LOG4CXX_TRACE(logger_, - "Status from HMI: " << it->status - << ", so response status become " - << status); - } else { - any_arg_success = true; - } - } - - if (all_complete) { - smart_objects::SmartObject response_params(smart_objects::SmartType_Map); - if (any_arg_success) { - for (HmiRequests::const_iterator it = hmi_requests_.begin(); - it != hmi_requests_.end(); - ++it) { - response_params[it->str] = it->value; - } - } - LOG4CXX_INFO(logger_, "All HMI requests are complete"); - const char* info = NULL; - std::string error_message; - if (true == message[strings::params].keyExists(strings::error_msg)) { - error_message = message[strings::params][strings::error_msg].asString(); - info = error_message.c_str(); - } - SendResponse(any_arg_success, status, info, &response_params); - } -} -#else GetVehicleDataRequest::GetVehicleDataRequest( const application_manager::commands::MessageSharedPtr& message, ApplicationManager& application_manager, @@ -312,8 +142,6 @@ void GetVehicleDataRequest::on_event(const event_engine::Event& event) { } } -#endif // #ifdef HMI_DBUS_API - } // namespace commands } // namespace application_manager diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_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 27716855a2..41fd35b8b5 100644 --- a/src/components/application_manager/rpc_plugins/vehicle_info_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 @@ -1,26 +1,19 @@ /* - Copyright (c) 2018, Ford Motor Company All rights reserved. - Copyright (c) 2018, Livio, 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 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 @@ -59,59 +52,6 @@ SubscribeVehicleDataRequest::SubscribeVehicleDataRequest( SubscribeVehicleDataRequest::~SubscribeVehicleDataRequest() {} -#ifdef HMI_DBUS_API -namespace { -struct Subrequest { - hmi_apis::FunctionID::eType func_id; - const char* str; -}; -Subrequest subrequests[] = { - {hmi_apis::FunctionID::VehicleInfo_SubscribeGps, strings::gps}, - {hmi_apis::FunctionID::VehicleInfo_SubscribeSpeed, strings::speed}, - {hmi_apis::FunctionID::VehicleInfo_SubscribeRpm, strings::rpm}, - {hmi_apis::FunctionID::VehicleInfo_SubscribeFuelLevel, strings::fuel_level}, - {hmi_apis::FunctionID::VehicleInfo_SubscribeFuelLevel_State, - strings::fuel_level_state}, - {hmi_apis::FunctionID::VehicleInfo_SubscribeInstantFuelConsumption, - strings::instant_fuel_consumption}, - {hmi_apis::FunctionID::VehicleInfo_SubscribeExternalTemperature, - strings::external_temp}, - {hmi_apis::FunctionID::VehicleInfo_SubscribeVin, strings::vin}, - {hmi_apis::FunctionID::VehicleInfo_SubscribePrndl, strings::prndl}, - {hmi_apis::FunctionID::VehicleInfo_SubscribeTirePressure, - strings::tire_pressure}, - {hmi_apis::FunctionID::VehicleInfo_SubscribeOdometer, strings::odometer}, - {hmi_apis::FunctionID::VehicleInfo_SubscribeBeltStatus, - strings::belt_status}, - {hmi_apis::FunctionID::VehicleInfo_SubscribeBodyInformation, - strings::body_information}, - {hmi_apis::FunctionID::VehicleInfo_SubscribeDeviceStatus, - strings::device_status}, - {hmi_apis::FunctionID::VehicleInfo_SubscribeDriverBraking, - strings::driver_braking}, - {hmi_apis::FunctionID::VehicleInfo_SubscribeWiperStatus, - strings::wiper_status}, - {hmi_apis::FunctionID::VehicleInfo_SubscribeHeadLampStatus, - strings::head_lamp_status}, - {hmi_apis::FunctionID::VehicleInfo_SubscribeEngineTorque, - strings::engine_torque}, - {hmi_apis::FunctionID::VehicleInfo_SubscribeAccPedalPosition, - strings::acc_pedal_pos}, - {hmi_apis::FunctionID::VehicleInfo_SubscribeSteeringWheelAngle, - strings::steering_wheel_angle}, - {hmi_apis::FunctionID::VehicleInfo_SubscribeECallInfo, - strings::e_call_info}, - {hmi_apis::FunctionID::VehicleInfo_SubscribeAirbagStatus, - strings::airbag_status}, - {hmi_apis::FunctionID::VehicleInfo_SubscribeEmergencyEvent, - strings::emergency_event}, - {hmi_apis::FunctionID::VehicleInfo_SubscribeClusterModeStatus, - strings::cluster_mode_status}, - {hmi_apis::FunctionID::VehicleInfo_SubscribeMyKey, strings::my_key}, -}; -} -#endif // #ifdef HMI_DBUS_API - void SubscribeVehicleDataRequest::Run() { LOG4CXX_AUTO_TRACE(logger_); @@ -140,33 +80,10 @@ void SubscribeVehicleDataRequest::Run() { return; } -#ifdef HMI_DBUS_API - // Generate list of subrequests - for (size_t i = 0; i < sizeof(subrequests) / sizeof(subrequests[0]); ++i) { - const Subrequest& sr = subrequests[i]; - if (true == (*message_)[strings::msg_params].keyExists(sr.str) && - true == (*message_)[strings::msg_params][sr.str].asBool()) { - HmiRequest hmi_request; - hmi_request.str = sr.str; - hmi_request.func_id = sr.func_id; - hmi_request.complete = false; - hmi_requests_.push_back(hmi_request); - } - } - LOG4CXX_DEBUG( - logger_, hmi_requests_.size() << " requests are going to be sent to HMI"); - - // Send subrequests - for (HmiRequests::const_iterator it = hmi_requests_.begin(); - it != hmi_requests_.end(); - ++it) - SendHMIRequest(it->func_id, &msg_params, true); -#else StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VehicleInfo); SendHMIRequest(hmi_apis::FunctionID::VehicleInfo_SubscribeVehicleData, &msg_params, true); -#endif // #ifdef HMI_DBUS_API } void SubscribeVehicleDataRequest::on_event(const event_engine::Event& event) { @@ -188,64 +105,6 @@ void SubscribeVehicleDataRequest::on_event(const event_engine::Event& event) { return; } -#ifdef HMI_DBUS_API - for (HmiRequests::iterator it = hmi_requests_.begin(); - it != hmi_requests_.end(); - ++it) { - HmiRequest& hmi_request = *it; - if (hmi_request.func_id == event.id()) { - hmi_request.status = static_cast<hmi_apis::Common_Result::eType>( - message[strings::params][hmi_response::code].asInt()); - if (hmi_apis::Common_Result::SUCCESS == hmi_request.status) - hmi_request.value = message[strings::msg_params][hmi_request.str]; - hmi_request.complete = true; - break; - } - } - bool all_complete = true; - bool any_arg_success = false; - mobile_api::Result::eType status = mobile_api::Result::eType::SUCCESS; - for (HmiRequests::const_iterator it = hmi_requests_.begin(); - it != hmi_requests_.end(); - ++it) { - if (!it->complete) { - all_complete = false; - break; - } - if (hmi_apis::Common_Result::SUCCESS != it->status) { - if (mobile_api::Result::SUCCESS == status) { - status = static_cast<mobile_apis::Result::eType>(it->status); - } else if (status != - static_cast<mobile_apis::Result::eType>(it->status)) { - status = mobile_api::Result::eType::GENERIC_ERROR; - } - LOG4CXX_TRACE(logger_, - "Status from HMI: " << it->status - << ", so response status become " - << status); - } else { - any_arg_success = true; - } - } - - if (all_complete) { - smart_objects::SmartObject response_params(smart_objects::SmartType_Map); - if (any_arg_success) { - for (HmiRequests::const_iterator it = hmi_requests_.begin(); - it != hmi_requests_.end(); - ++it) { - response_params[it->str] = it->value; - } - } - LOG4CXX_DEBUG(logger_, "All HMI requests are complete"); - const bool result = any_arg_success; - SendResponse(any_arg_success, status, NULL, &response_params); - if (result) { - app->UpdateHash(); - } - } -#else - hmi_apis::Common_Result::eType hmi_result = static_cast<hmi_apis::Common_Result::eType>( message[strings::params][hmi_response::code].asInt()); @@ -288,7 +147,6 @@ void SubscribeVehicleDataRequest::on_event(const event_engine::Event& event) { result_code, response_info.empty() ? NULL : response_info.c_str(), &(message[strings::msg_params])); -#endif // #ifdef HMI_DBUS_API } bool SubscribeVehicleDataRequest::Init() { diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_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 de419894c5..d0152ea0c3 100644 --- a/src/components/application_manager/rpc_plugins/vehicle_info_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 @@ -60,60 +60,6 @@ UnsubscribeVehicleDataRequest::UnsubscribeVehicleDataRequest( UnsubscribeVehicleDataRequest::~UnsubscribeVehicleDataRequest() {} -#ifdef HMI_DBUS_API -namespace { -struct Subrequest { - hmi_apis::FunctionID::eType func_id; - const char* str; -}; -Subrequest subrequests[] = { - {hmi_apis::FunctionID::VehicleInfo_UnsubscribeGps, strings::gps}, - {hmi_apis::FunctionID::VehicleInfo_UnsubscribeSpeed, strings::speed}, - {hmi_apis::FunctionID::VehicleInfo_UnsubscribeRpm, strings::rpm}, - {hmi_apis::FunctionID::VehicleInfo_UnsubscribeFuelLevel, - strings::fuel_level}, - {hmi_apis::FunctionID::VehicleInfo_UnsubscribeFuelLevel_State, - strings::fuel_level_state}, - {hmi_apis::FunctionID::VehicleInfo_UnsubscribeInstantFuelConsumption, - strings::instant_fuel_consumption}, - {hmi_apis::FunctionID::VehicleInfo_UnsubscribeExternalTemperature, - strings::external_temp}, - {hmi_apis::FunctionID::VehicleInfo_UnsubscribeVin, strings::vin}, - {hmi_apis::FunctionID::VehicleInfo_UnsubscribePrndl, strings::prndl}, - {hmi_apis::FunctionID::VehicleInfo_UnsubscribeTirePressure, - strings::tire_pressure}, - {hmi_apis::FunctionID::VehicleInfo_UnsubscribeOdometer, strings::odometer}, - {hmi_apis::FunctionID::VehicleInfo_UnsubscribeBeltStatus, - strings::belt_status}, - {hmi_apis::FunctionID::VehicleInfo_UnsubscribeBodyInformation, - strings::body_information}, - {hmi_apis::FunctionID::VehicleInfo_UnsubscribeDeviceStatus, - strings::device_status}, - {hmi_apis::FunctionID::VehicleInfo_UnsubscribeDriverBraking, - strings::driver_braking}, - {hmi_apis::FunctionID::VehicleInfo_UnsubscribeWiperStatus, - strings::wiper_status}, - {hmi_apis::FunctionID::VehicleInfo_UnsubscribeHeadLampStatus, - strings::head_lamp_status}, - {hmi_apis::FunctionID::VehicleInfo_UnsubscribeEngineTorque, - strings::engine_torque}, - {hmi_apis::FunctionID::VehicleInfo_UnsubscribeAccPedalPosition, - strings::acc_pedal_pos}, - {hmi_apis::FunctionID::VehicleInfo_UnsubscribeSteeringWheelAngle, - strings::steering_wheel_angle}, - {hmi_apis::FunctionID::VehicleInfo_UnsubscribeECallInfo, - strings::e_call_info}, - {hmi_apis::FunctionID::VehicleInfo_UnsubscribeAirbagStatus, - strings::airbag_status}, - {hmi_apis::FunctionID::VehicleInfo_UnsubscribeEmergencyEvent, - strings::emergency_event}, - {hmi_apis::FunctionID::VehicleInfo_UnsubscribeClusterModeStatus, - strings::cluster_mode_status}, - {hmi_apis::FunctionID::VehicleInfo_UnsubscribeMyKey, strings::my_key}, -}; -} -#endif // #ifdef HMI_DBUS_API - void UnsubscribeVehicleDataRequest::Run() { LOG4CXX_AUTO_TRACE(logger_); @@ -226,33 +172,10 @@ void UnsubscribeVehicleDataRequest::Run() { return; } -#ifdef HMI_DBUS_API - // Generate list of subrequests - for (size_t i = 0; i < sizeof(subrequests) / sizeof(subrequests[0]); ++i) { - const Subrequest& sr = subrequests[i]; - if (true == (*message_)[strings::msg_params].keyExists(sr.str) && - true == (*message_)[strings::msg_params][sr.str].asBool()) { - HmiRequest hmi_request; - hmi_request.str = sr.str; - hmi_request.func_id = sr.func_id; - hmi_request.complete = false; - hmi_requests_.push_back(hmi_request); - } - } - LOG4CXX_INFO(logger_, - hmi_requests_.size() << " requests are going to be sent to HMI"); - - // Send subrequests - for (HmiRequests::const_iterator it = hmi_requests_.begin(); - it != hmi_requests_.end(); - ++it) - SendHMIRequest(it->func_id, &msg_params, true); -#else StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VehicleInfo); SendHMIRequest(hmi_apis::FunctionID::VehicleInfo_UnsubscribeVehicleData, &msg_params, true); -#endif // #ifdef HMI_DBUS_API } void UnsubscribeVehicleDataRequest::on_event(const event_engine::Event& event) { @@ -275,65 +198,6 @@ void UnsubscribeVehicleDataRequest::on_event(const event_engine::Event& event) { return; } -#ifdef HMI_DBUS_API - for (HmiRequests::iterator it = hmi_requests_.begin(); - it != hmi_requests_.end(); - ++it) { - HmiRequest& hmi_request = *it; - if (hmi_request.func_id == event.id()) { - hmi_request.status = static_cast<hmi_apis::Common_Result::eType>( - message[strings::params][hmi_response::code].asInt()); - if (hmi_apis::Common_Result::SUCCESS == hmi_request.status) - hmi_request.value = message[strings::msg_params][hmi_request.str]; - hmi_request.complete = true; - break; - } - } - bool all_complete = true; - bool any_arg_success = false; - mobile_api::Result::eType status = mobile_api::Result::eType::SUCCESS; - for (HmiRequests::const_iterator it = hmi_requests_.begin(); - it != hmi_requests_.end(); - ++it) { - if (!it->complete) { - all_complete = false; - break; - } - if (hmi_apis::Common_Result::SUCCESS != it->status) { - if (mobile_api::Result::SUCCESS == status) { - status = static_cast<mobile_apis::Result::eType>(it->status); - } else if (status != - static_cast<mobile_apis::Result::eType>(it->status)) { - status = mobile_api::Result::eType::GENERIC_ERROR; - } - LOG4CXX_TRACE(logger_, - "Status from HMI: " << it->status - << ", so response status become " - << status); - } else { - any_arg_success = true; - } - } - if (all_complete) { - smart_objects::SmartObject response_params(smart_objects::SmartType_Map); - if (any_arg_success) { - for (HmiRequests::const_iterator it = hmi_requests_.begin(); - it != hmi_requests_.end(); - ++it) { - response_params[it->str] = it->value; - } - } - - LOG4CXX_INFO(logger_, "All HMI requests are complete"); - if (true == any_arg_success) { - SetAllowedToTerminate(false); - } - SendResponse(any_arg_success, status, NULL, &response_params); - if (true == any_arg_success) { - app->UpdateHash(); - } - } -#else hmi_apis::Common_Result::eType hmi_result = static_cast<hmi_apis::Common_Result::eType>( message[strings::params][hmi_response::code].asInt()); @@ -369,7 +233,6 @@ void UnsubscribeVehicleDataRequest::on_event(const event_engine::Event& event) { application_manager_.TerminateRequest( connection_key(), correlation_id(), function_id()); } -#endif // #ifdef HMI_DBUS_API } bool UnsubscribeVehicleDataRequest::Init() { diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/mobile/get_vehicle_data_request_test.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/mobile/get_vehicle_data_request_test.cc index d8e4c3d075..4ad8a84189 100644 --- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/mobile/get_vehicle_data_request_test.cc +++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/mobile/get_vehicle_data_request_test.cc @@ -92,10 +92,6 @@ class UnwrappedGetVehicleDataRequest : public GetVehicleDataRequest { using GetVehicleDataRequest::on_event; }; -#ifdef HMI_DBUS_API -// HMI_DBUS_API currently not supported -#else - TEST_F(GetVehicleDataRequestTest, Run_ApplicationIsNotRegistered_UNSUCCESS) { GetVehicleDataRequestPtr command(CreateCommand<GetVehicleDataRequest>()); @@ -253,8 +249,6 @@ TEST_F(GetVehicleDataRequestTest, OnEvent_DataNotAvailable_SUCCESS) { command->on_event(event); } -#endif // HMI_DBUS_API - } // namespace get_vehicle_data_request } // namespace mobile_commands_test } // namespace commands_test |