summaryrefslogtreecommitdiff
path: root/src/components/application_manager/include/application_manager/application_manager.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/application_manager/include/application_manager/application_manager.h')
-rw-r--r--src/components/application_manager/include/application_manager/application_manager.h478
1 files changed, 238 insertions, 240 deletions
diff --git a/src/components/application_manager/include/application_manager/application_manager.h b/src/components/application_manager/include/application_manager/application_manager.h
index 30240b744d..411ecec092 100644
--- a/src/components/application_manager/include/application_manager/application_manager.h
+++ b/src/components/application_manager/include/application_manager/application_manager.h
@@ -255,7 +255,7 @@ class ApplicationManager {
virtual const HMICapabilities& hmi_capabilities() const = 0;
virtual void ProcessQueryApp(const smart_objects::SmartObject& sm_object,
- const uint32_t connection_key) = 0;
+ const uint32_t connection_key) = 0;
virtual bool is_attenuated_supported() const = 0;
@@ -283,182 +283,182 @@ class ApplicationManager {
virtual policy::PolicyHandlerInterface& GetPolicyHandler() = 0;
virtual uint32_t GetNextHMICorrelationID() = 0;
- virtual uint32_t GenerateNewHMIAppID() = 0 ;
-
- /**
- * @brief Ends opened navi services (audio/video) for application
- * @param app_id Application id
- */
- virtual void EndNaviServices(uint32_t app_id) = 0;
-
- /* @brief Starts audio passthru process
- *
- * @return true on success, false if passthru is already in process
- */
- virtual bool BeginAudioPassThrough() = 0;
-
- /*
- * @brief Finishes already started audio passthru process
- *
- * @return true on success, false if passthru is not active
- */
- virtual bool EndAudioPassThrough() = 0 ;
-
-
- virtual void ConnectToDevice(const std::string& device_mac) = 0;
-
- virtual void OnHMIStartedCooperation() = 0 ;
-
- virtual bool IsHMICooperating() const = 0;
- /**
- * @brief Notifies all components interested in Vehicle Data update
- * i.e. new value of odometer etc and returns list of applications
- * subscribed for event.
- * @param vehicle_info Enum value of type of vehicle data
- * @param new value (for integer values currently) of vehicle data
- */
- virtual std::vector<ApplicationSharedPtr> IviInfoUpdated(
- VehicleDataType vehicle_info, int value) = 0;
-
- virtual ApplicationSharedPtr RegisterApplication(const utils::SharedPtr<
- smart_objects::SmartObject>& request_for_registration) = 0;
-
- virtual void SendUpdateAppList() = 0;
-
- virtual void MarkAppsGreyOut(const connection_handler::DeviceHandle handle,
- bool is_greyed_out) = 0;
- virtual bool IsAppsQueriedFrom(
- const connection_handler::DeviceHandle handle) const = 0;
-
- virtual bool IsStopping() const = 0;
-
- virtual void RemoveAppFromTTSGlobalPropertiesList(const uint32_t app_id) = 0;
-
- virtual mobile_apis::Result::eType SaveBinary(const std::vector<uint8_t>& binary_data,
- const std::string& file_path,
- const std::string& file_name,
- const int64_t offset) = 0;
- /*
- * @brief Sets SDL access to all mobile apps
- *
- * @param allowed SDL access to all mobile apps
- */
- virtual void SetAllAppsAllowed(const bool allowed) = 0;
-
- /*
- * @brief Sets state for driver distraction
- *
- * @param state New state to be set
- */
- virtual void set_driver_distraction(bool is_distracting) = 0;
-
- /*
- * @brief Starts audio pass thru thread
- *
- * @param session_key Session key of connection for Mobile side
- * @param correlation_id Correlation id for response for Mobile side
- * @param max_duration Max duration of audio recording in milliseconds
- * @param sampling_rate Value for rate(8, 16, 22, 44 kHz)
- * @param bits_per_sample The quality the audio is recorded.
- * @param audio_type Type of audio data
- */
- virtual void StartAudioPassThruThread(int32_t session_key,
- int32_t correlation_id,
- int32_t max_duration,
- int32_t sampling_rate,
- int32_t bits_per_sample,
- int32_t audio_type) = 0;
-
- virtual void StartDevicesDiscovery() = 0;
-
- virtual void StopAudioPassThru(int32_t application_key) = 0;
-
- /**
- * @brief TerminateRequest forces termination of request
- * @param connection_key - application id of request
- * @param corr_id correlation id of request
- */
- virtual void TerminateRequest(uint32_t connection_key, uint32_t corr_id) = 0;
-
- /*
- * @brief Closes application by id
- *
- * @param app_id Application id
- * @param reason reason of unregistering application
- * @param is_resuming describes - is this unregister
- * is normal or need to be resumed\
- * @param is_unexpected_disconnect
- * Indicates if connection was unexpectedly lost(TM layer, HB)
- */
- virtual void UnregisterApplication(const uint32_t& app_id,
- mobile_apis::Result::eType reason,
- bool is_resuming = false,
- bool is_unexpected_disconnect = false) = 0;
-
- /**
- * @ Updates request timeout
- *
- * @param connection_key Connection key of application
- * @param mobile_correlation_id Correlation ID of the mobile request
- * @param new_timeout_value New timeout in milliseconds to be set
- */
- virtual void updateRequestTimeout(uint32_t connection_key,
- uint32_t mobile_correlation_id,
- uint32_t new_timeout_value) = 0;
-
- virtual StateController& state_controller() = 0;
-
- virtual void SetUnregisterAllApplicationsReason(
- mobile_api::AppInterfaceUnregisteredReason::eType reason) = 0;
-
- /*
- * @brief Called on Master_reset or Factory_defaults
- * when User chooses to reset HU.
- * Resets Policy Table if applicable.
- */
- virtual void HeadUnitReset(mobile_api::AppInterfaceUnregisteredReason::eType reason) = 0;
-
- /**
- * @brief Checks HMI level and returns true if streaming is allowed
- * @param app_id Application id
- * @param service_type Service type to check
- * @return True if streaming is allowed, false in other case
- */
- virtual bool HMILevelAllowsStreaming(
- uint32_t app_id, protocol_handler::ServiceType service_type) const = 0;
-
- /**
- * @brief Checks, if given RPC is allowed at current HMI level for specific
- * application in policy table
- * @param policy_app_id Application id
- * @param hmi_level Current HMI level of application
- * @param function_id FunctionID of RPC
- * @param params_permissions Permissions for RPC parameters (e.g.
- * SubscribeVehicleData) defined in policy table
- * @return SUCCESS, if allowed, otherwise result code of check
- */
- virtual mobile_apis::Result::eType CheckPolicyPermissions(
- const std::string& policy_app_id,
- mobile_apis::HMILevel::eType hmi_level,
- mobile_apis::FunctionID::eType function_id,
- const RPCParams& rpc_params,
- CommandParametersPermissions* params_permissions = NULL) = 0;
-
-
- /**
- * @brief IsApplicationForbidden allows to distinguish if application is
- * not allowed to register, because of spamming.
- *
- * @param connection_key the connection key ofthe required application
- *
- * @param policy_app_id application's mobile(policy) identifier.
- *
- * @return true in case application is allowed to register, false otherwise.
- */
- virtual bool IsApplicationForbidden(uint32_t connection_key,
- const std::string& policy_app_id) const = 0;
-
- virtual resumption::ResumeCtrl& resume_controller() = 0 ;
+ virtual uint32_t GenerateNewHMIAppID() = 0;
+
+ /**
+ * @brief Ends opened navi services (audio/video) for application
+ * @param app_id Application id
+ */
+ virtual void EndNaviServices(uint32_t app_id) = 0;
+
+ /* @brief Starts audio passthru process
+ *
+ * @return true on success, false if passthru is already in process
+ */
+ virtual bool BeginAudioPassThrough() = 0;
+
+ /*
+ * @brief Finishes already started audio passthru process
+ *
+ * @return true on success, false if passthru is not active
+ */
+ virtual bool EndAudioPassThrough() = 0;
+
+ virtual void ConnectToDevice(const std::string& device_mac) = 0;
+
+ virtual void OnHMIStartedCooperation() = 0;
+
+ virtual bool IsHMICooperating() const = 0;
+ /**
+ * @brief Notifies all components interested in Vehicle Data update
+ * i.e. new value of odometer etc and returns list of applications
+ * subscribed for event.
+ * @param vehicle_info Enum value of type of vehicle data
+ * @param new value (for integer values currently) of vehicle data
+ */
+ virtual std::vector<ApplicationSharedPtr> IviInfoUpdated(
+ VehicleDataType vehicle_info, int value) = 0;
+
+ virtual ApplicationSharedPtr RegisterApplication(const utils::SharedPtr<
+ smart_objects::SmartObject>& request_for_registration) = 0;
+
+ virtual void SendUpdateAppList() = 0;
+
+ virtual void MarkAppsGreyOut(const connection_handler::DeviceHandle handle,
+ bool is_greyed_out) = 0;
+ virtual bool IsAppsQueriedFrom(
+ const connection_handler::DeviceHandle handle) const = 0;
+
+ virtual bool IsStopping() const = 0;
+
+ virtual void RemoveAppFromTTSGlobalPropertiesList(const uint32_t app_id) = 0;
+
+ virtual mobile_apis::Result::eType SaveBinary(
+ const std::vector<uint8_t>& binary_data,
+ const std::string& file_path,
+ const std::string& file_name,
+ const int64_t offset) = 0;
+ /*
+ * @brief Sets SDL access to all mobile apps
+ *
+ * @param allowed SDL access to all mobile apps
+ */
+ virtual void SetAllAppsAllowed(const bool allowed) = 0;
+
+ /*
+ * @brief Sets state for driver distraction
+ *
+ * @param state New state to be set
+ */
+ virtual void set_driver_distraction(bool is_distracting) = 0;
+
+ /*
+ * @brief Starts audio pass thru thread
+ *
+ * @param session_key Session key of connection for Mobile side
+ * @param correlation_id Correlation id for response for Mobile side
+ * @param max_duration Max duration of audio recording in milliseconds
+ * @param sampling_rate Value for rate(8, 16, 22, 44 kHz)
+ * @param bits_per_sample The quality the audio is recorded.
+ * @param audio_type Type of audio data
+ */
+ virtual void StartAudioPassThruThread(int32_t session_key,
+ int32_t correlation_id,
+ int32_t max_duration,
+ int32_t sampling_rate,
+ int32_t bits_per_sample,
+ int32_t audio_type) = 0;
+
+ virtual void StartDevicesDiscovery() = 0;
+
+ virtual void StopAudioPassThru(int32_t application_key) = 0;
+
+ /**
+ * @brief TerminateRequest forces termination of request
+ * @param connection_key - application id of request
+ * @param corr_id correlation id of request
+ */
+ virtual void TerminateRequest(uint32_t connection_key, uint32_t corr_id) = 0;
+
+ /*
+ * @brief Closes application by id
+ *
+ * @param app_id Application id
+ * @param reason reason of unregistering application
+ * @param is_resuming describes - is this unregister
+ * is normal or need to be resumed\
+ * @param is_unexpected_disconnect
+ * Indicates if connection was unexpectedly lost(TM layer, HB)
+ */
+ virtual void UnregisterApplication(const uint32_t& app_id,
+ mobile_apis::Result::eType reason,
+ bool is_resuming = false,
+ bool is_unexpected_disconnect = false) = 0;
+
+ /**
+ * @ Updates request timeout
+ *
+ * @param connection_key Connection key of application
+ * @param mobile_correlation_id Correlation ID of the mobile request
+ * @param new_timeout_value New timeout in milliseconds to be set
+ */
+ virtual void updateRequestTimeout(uint32_t connection_key,
+ uint32_t mobile_correlation_id,
+ uint32_t new_timeout_value) = 0;
+
+ virtual StateController& state_controller() = 0;
+
+ virtual void SetUnregisterAllApplicationsReason(
+ mobile_api::AppInterfaceUnregisteredReason::eType reason) = 0;
+
+ /*
+ * @brief Called on Master_reset or Factory_defaults
+ * when User chooses to reset HU.
+ * Resets Policy Table if applicable.
+ */
+ virtual void HeadUnitReset(
+ mobile_api::AppInterfaceUnregisteredReason::eType reason) = 0;
+
+ /**
+ * @brief Checks HMI level and returns true if streaming is allowed
+ * @param app_id Application id
+ * @param service_type Service type to check
+ * @return True if streaming is allowed, false in other case
+ */
+ virtual bool HMILevelAllowsStreaming(
+ uint32_t app_id, protocol_handler::ServiceType service_type) const = 0;
+
+ /**
+ * @brief Checks, if given RPC is allowed at current HMI level for specific
+ * application in policy table
+ * @param policy_app_id Application id
+ * @param hmi_level Current HMI level of application
+ * @param function_id FunctionID of RPC
+ * @param params_permissions Permissions for RPC parameters (e.g.
+ * SubscribeVehicleData) defined in policy table
+ * @return SUCCESS, if allowed, otherwise result code of check
+ */
+ virtual mobile_apis::Result::eType CheckPolicyPermissions(
+ const std::string& policy_app_id,
+ mobile_apis::HMILevel::eType hmi_level,
+ mobile_apis::FunctionID::eType function_id,
+ const RPCParams& rpc_params,
+ CommandParametersPermissions* params_permissions = NULL) = 0;
+
+ /**
+ * @brief IsApplicationForbidden allows to distinguish if application is
+ * not allowed to register, because of spamming.
+ *
+ * @param connection_key the connection key ofthe required application
+ *
+ * @param policy_app_id application's mobile(policy) identifier.
+ *
+ * @return true in case application is allowed to register, false otherwise.
+ */
+ virtual bool IsApplicationForbidden(
+ uint32_t connection_key, const std::string& policy_app_id) const = 0;
+
+ virtual resumption::ResumeCtrl& resume_controller() = 0;
/*
* @brief Converts connection string transport type representation
* to HMI Common_TransportType
@@ -467,62 +467,61 @@ class ApplicationManager {
*
* @return Corresponding HMI TransporType value
*/
- virtual hmi_apis::Common_TransportType::eType GetDeviceTransportType(
+ virtual hmi_apis::Common_TransportType::eType GetDeviceTransportType(
const std::string& transport_type) = 0;
- /**
- * @brief method adds application
- * to tts_global_properties_app_list_
- * @param app_id contains application which will
- * send TTS global properties after timeout
- */
- virtual void AddAppToTTSGlobalPropertiesList(const uint32_t app_id) = 0;
+ /**
+ * @brief method adds application
+ * to tts_global_properties_app_list_
+ * @param app_id contains application which will
+ * send TTS global properties after timeout
+ */
+ virtual void AddAppToTTSGlobalPropertiesList(const uint32_t app_id) = 0;
- /**
- * Generate grammar ID
- *
- * @return New grammar ID
- */
- virtual uint32_t GenerateGrammarID() = 0;
-
- virtual policy::DeviceConsent GetUserConsentForDevice(
- const std::string& device_id) const = 0;
-
- /**
- * @brief Handle sequence for unauthorized application
- * @param app_id Application id
- */
- virtual void OnAppUnauthorized(const uint32_t& app_id) = 0;
-
- virtual bool ActivateApplication(ApplicationSharedPtr app) = 0;
-
- /**
- * @brief Callback calls when application starts/stops data streaming
- * @param app_id Streaming application id
- * @param service_type Streaming service type
- * @param state Shows if streaming started or stopped
- */
- virtual void OnAppStreaming(uint32_t app_id,
- protocol_handler::ServiceType service_type,
- bool state) = 0;
-
-
- /**
- * @brief CreateRegularState create regular HMI state for application
- * @param app_id
- * @param hmi_level of returned state
- * @param audio_state of returned state
- * @param system_context of returned state
- * @return new regular HMI state
- */
- virtual HmiStatePtr CreateRegularState(
- uint32_t app_id,
- mobile_apis::HMILevel::eType hmi_level,
- mobile_apis::AudioStreamingState::eType audio_state,
- mobile_apis::SystemContext::eType system_context) const = 0;
-
- virtual void SendAudioPassThroughNotification(uint32_t session_key,
- std::vector<uint8_t>& binary_data) = 0;
+ /**
+ * Generate grammar ID
+ *
+ * @return New grammar ID
+ */
+ virtual uint32_t GenerateGrammarID() = 0;
+
+ virtual policy::DeviceConsent GetUserConsentForDevice(
+ const std::string& device_id) const = 0;
+
+ /**
+ * @brief Handle sequence for unauthorized application
+ * @param app_id Application id
+ */
+ virtual void OnAppUnauthorized(const uint32_t& app_id) = 0;
+
+ virtual bool ActivateApplication(ApplicationSharedPtr app) = 0;
+
+ /**
+ * @brief Callback calls when application starts/stops data streaming
+ * @param app_id Streaming application id
+ * @param service_type Streaming service type
+ * @param state Shows if streaming started or stopped
+ */
+ virtual void OnAppStreaming(uint32_t app_id,
+ protocol_handler::ServiceType service_type,
+ bool state) = 0;
+
+ /**
+ * @brief CreateRegularState create regular HMI state for application
+ * @param app_id
+ * @param hmi_level of returned state
+ * @param audio_state of returned state
+ * @param system_context of returned state
+ * @return new regular HMI state
+ */
+ virtual HmiStatePtr CreateRegularState(
+ uint32_t app_id,
+ mobile_apis::HMILevel::eType hmi_level,
+ mobile_apis::AudioStreamingState::eType audio_state,
+ mobile_apis::SystemContext::eType system_context) const = 0;
+
+ virtual void SendAudioPassThroughNotification(
+ uint32_t session_key, std::vector<uint8_t>& binary_data) = 0;
/**
* @brief Checks if application can stream (streaming service is started and
@@ -531,19 +530,18 @@ class ApplicationManager {
* @param service_type Service type to check
* @return True if streaming is allowed, false in other case
*/
- virtual bool CanAppStream(uint32_t app_id,
- protocol_handler::ServiceType service_type) const = 0;
-
- /**
- * @brief ForbidStreaming forbid the stream over the certain application.
- * @param app_id the application's id which should stop streaming.
- */
- virtual void ForbidStreaming(uint32_t app_id) = 0;
+ virtual bool CanAppStream(
+ uint32_t app_id, protocol_handler::ServiceType service_type) const = 0;
- virtual const ApplicationManagerSettings& get_settings() const = 0;
+ /**
+ * @brief ForbidStreaming forbid the stream over the certain application.
+ * @param app_id the application's id which should stop streaming.
+ */
+ virtual void ForbidStreaming(uint32_t app_id) = 0;
- virtual event_engine::EventDispatcher& event_dispatcher() = 0;
+ virtual const ApplicationManagerSettings& get_settings() const = 0;
+ virtual event_engine::EventDispatcher& event_dispatcher() = 0;
};
} // namespace application_manager