diff options
author | Alexander <akutsan@luxoft.com> | 2018-06-18 19:49:23 +0300 |
---|---|---|
committer | Ira Lytvynenko (GitHub) <ILytvynenko@luxoft.com> | 2018-06-26 12:01:49 +0300 |
commit | 86615e32b7f8e36bb74650ae8c3f6b5b7d880ca2 (patch) | |
tree | 2d629db476a9c65e5af1c10cfe7970951cb78419 | |
parent | 7c0e630ed2e2b5f926adfdc9ddb46585bb2985b0 (diff) | |
download | sdl_core-86615e32b7f8e36bb74650ae8c3f6b5b7d880ca2.tar.gz |
Add missed function descriptions
2 files changed, 62 insertions, 3 deletions
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_app_extension.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_app_extension.h index aa9b5d482f..6b642c822a 100644 --- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_app_extension.h +++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_app_extension.h @@ -51,22 +51,77 @@ typedef std::set<mobile_apis::VehicleDataType::eType> VehicleInfoSubscriptions; class VehicleInfoAppExtension : public app_mngr::AppExtension { public: + /** + * @brief VehicleInfoAppExtension constructor + * @param plugin vehicle info plugin + * @param app application that contains this plugin + */ explicit VehicleInfoAppExtension(VehicleInfoPlugin& plugin, app_mngr::Application& app); virtual ~VehicleInfoAppExtension(); + /** + * @brief subscribeToVehicleInfo add vehicle_data to list of subscriptions of + * application extension + * @param vehicle_data data to subscribe + * @return true in case if subscription is successful + */ bool subscribeToVehicleInfo(const VehicleDataType vehicle_data); + + /** + * @brief unsubscribeFromVehicleInfo remove vehicle_data from list of + * subscriptions of application extension + * @param vehicle_data data to unsubscribe + * @return true in case if unsubscription is successful + */ bool unsubscribeFromVehicleInfo(const VehicleDataType vehicle_data); + /** + * @brief unsubscribeFromVehicleInfo unsubscribe from all vehicle info data + */ void unsubscribeFromVehicleInfo(); + + /** + * @brief isSubscribedToVehicleInfo checks if extension is subscribed to + * vehicle data + * @param vehicle_data_type data type to check subscription + * @return true if extension is subscribed this vehicle_data_type, otherwise + * return false + */ bool isSubscribedToVehicleInfo(const VehicleDataType vehicle_data_type) const; + + /** + * @brief Subscriptions get list of subscriptions for application extension + * @return list of subscriptions for application extension + */ VehicleInfoSubscriptions Subscriptions(); + /** + * @brief SaveResumptionData saves vehicle info data + * @param resumption_data plase to store resumption data + */ void SaveResumptionData( NsSmartDeviceLink::NsSmartObjects::SmartObject& resumption_data) OVERRIDE; + + /** + * @brief ProcessResumption load resumtion data back to plugin during + * resumption + * @param resumption_data resumption data + */ void ProcessResumption( const smart_objects::SmartObject& resumption_data) OVERRIDE; + /** + * @brief VehicleInfoAppExtensionUID unique identifier of VehicleInfo + * aplication extension + */ static unsigned VehicleInfoAppExtensionUID; + + /** + * @brief ExtractVIExtension utility function to extract application extension + * from application + * @param app : applicaiton that contains vehicle info app_extension + * @return application extension extracted from application + */ static VehicleInfoAppExtension& ExtractVIExtension( application_manager::Application& app); diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_plugin.h b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_plugin.h index 97e622f1f4..f8e880d9f5 100644 --- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_plugin.h +++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/include/vehicle_info_plugin/vehicle_info_plugin.h @@ -42,11 +42,9 @@ namespace commands = application_manager::commands; namespace plugins = application_manager::plugin_manager; class VehicleInfoPlugin : public plugins::RPCPlugin { - typedef std::map<std::string, mobile_apis::VehicleDataType::eType> - VehicleData; - public: VehicleInfoPlugin(); + bool Init(app_mngr::ApplicationManager& application_manager, app_mngr::rpc_service::RPCService& rpc_service, app_mngr::HMICapabilities& hmi_capabilities, @@ -62,6 +60,12 @@ class VehicleInfoPlugin : public plugins::RPCPlugin { void OnApplicationEvent(plugins::ApplicationEvent event, app_mngr::ApplicationSharedPtr application) OVERRIDE; + /** + * @brief ProcessResumptionSubscription send Subscribe vehicle data requests + * to HMI + * @param app application for subscription + * @param ext application extension + */ void ProcessResumptionSubscription(app_mngr::Application& app, VehicleInfoAppExtension& ext); |