summaryrefslogtreecommitdiff
path: root/src/components/application_manager/include/application_manager/application.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/application_manager/include/application_manager/application.h')
-rw-r--r--src/components/application_manager/include/application_manager/application.h133
1 files changed, 102 insertions, 31 deletions
diff --git a/src/components/application_manager/include/application_manager/application.h b/src/components/application_manager/include/application_manager/application.h
index eca22afa63..c3a4ecbb30 100644
--- a/src/components/application_manager/include/application_manager/application.h
+++ b/src/components/application_manager/include/application_manager/application.h
@@ -38,7 +38,8 @@
#include <set>
#include <list>
#include <vector>
-#include "utils/shared_ptr.h"
+#include <memory>
+
#include "utils/data_accessor.h"
#include "interfaces/MOBILE_API.h"
#include "connection_handler/device.h"
@@ -46,9 +47,11 @@
#include "application_manager/message.h"
#include "application_manager/hmi_state.h"
#include "application_manager/application_state.h"
+#include "application_manager/help_prompt_manager.h"
#include "protocol_handler/protocol_handler.h"
#include "smart_objects/smart_object.h"
#include "utils/macro.h"
+#include "utils/semantic_version.h"
namespace application_manager {
@@ -113,6 +116,7 @@ class InitialApplicationData {
virtual const smart_objects::SmartObject* ngn_media_screen_name() const = 0;
virtual const mobile_api::Language::eType& language() const = 0;
virtual const mobile_api::Language::eType& ui_language() const = 0;
+ virtual const utils::SemanticVersion& msg_version() const = 0;
virtual void set_app_types(const smart_objects::SmartObject& app_types) = 0;
virtual void set_vr_synonyms(
const smart_objects::SmartObject& vr_synonyms) = 0;
@@ -123,6 +127,7 @@ class InitialApplicationData {
virtual void set_language(const mobile_api::Language::eType& language) = 0;
virtual void set_ui_language(
const mobile_api::Language::eType& ui_language) = 0;
+ virtual void set_msg_version(const utils::SemanticVersion& version) = 0;
};
/*
@@ -160,14 +165,14 @@ typedef std::map<uint32_t, PerformChoice> PerformChoiceSetMap;
typedef std::set<uint32_t> SoftButtonID;
/**
- * @brief Defines set of vehicle info types
+ * @brief Defines set of buttons subscription
*/
-typedef std::set<mobile_apis::VehicleDataType::eType> VehicleInfoSubscriptions;
+typedef std::set<mobile_apis::ButtonName::eType> ButtonSubscriptions;
/**
- * @brief Defines set of buttons subscription
+ * @breif Collection for the mobile command smart object.
*/
-typedef std::set<mobile_apis::ButtonName::eType> ButtonSubscriptions;
+typedef std::vector<smart_objects::SmartObjectSPtr> MobileMessageQueue;
class DynamicApplicationData {
public:
@@ -180,10 +185,12 @@ class DynamicApplicationData {
virtual const smart_objects::SmartObject* show_command() const = 0;
virtual const smart_objects::SmartObject* tbt_show_command() const = 0;
virtual DataAccessor<ButtonSubscriptions> SubscribedButtons() const = 0;
- virtual DataAccessor<VehicleInfoSubscriptions> SubscribedIVI() const = 0;
virtual const smart_objects::SmartObject* keyboard_props() const = 0;
virtual const smart_objects::SmartObject* menu_title() const = 0;
virtual const smart_objects::SmartObject* menu_icon() const = 0;
+ virtual const smart_objects::SmartObject* day_color_scheme() const = 0;
+ virtual const smart_objects::SmartObject* night_color_scheme() const = 0;
+ virtual const std::string& display_layout() const = 0;
virtual void load_global_properties(const smart_objects::SmartObject& so) = 0;
virtual void set_help_prompt(
@@ -215,6 +222,12 @@ class DynamicApplicationData {
virtual void set_video_stream_retry_number(
const uint32_t& video_stream_retry_number) = 0;
+ virtual void set_day_color_scheme(
+ const smart_objects::SmartObject& color_scheme) = 0;
+ virtual void set_night_color_scheme(
+ const smart_objects::SmartObject& color_scheme) = 0;
+
+ virtual void set_display_layout(const std::string& layout) = 0;
/**
* @brief Checks if application is media, voice communication or navigation
* @return true if application is media, voice communication or navigation,
@@ -443,6 +456,20 @@ class Application : public virtual InitialApplicationData,
virtual bool is_navi() const = 0;
virtual void set_is_navi(bool allow) = 0;
+ /**
+ * @brief Returns is_remote_control_supported_
+ * @return true if app supports remote control, else false
+ */
+ virtual bool is_remote_control_supported() const = 0;
+
+ /**
+ * @brief Sets remote control supported,
+ * which is used to determine app with remote control
+ * @param allow, if true - remote control is supported,
+ * else remote control is disable
+ */
+ virtual void set_remote_control_supported(const bool allow) = 0;
+
virtual void set_mobile_projection_enabled(bool option) = 0;
virtual bool mobile_projection_enabled() const = 0;
@@ -525,8 +552,16 @@ class Application : public virtual InitialApplicationData,
virtual const mobile_api::SystemContext::eType system_context() const = 0;
virtual const mobile_api::AudioStreamingState::eType audio_streaming_state()
const = 0;
+ virtual const mobile_api::VideoStreamingState::eType video_streaming_state()
+ const = 0;
virtual const std::string& app_icon_path() const = 0;
virtual connection_handler::DeviceHandle device() const = 0;
+ /**
+ * @brief Returns handle of the device on which secondary transport of this
+ * app is running
+ * @return handle of the device on which secondary transport is running
+ */
+ virtual connection_handler::DeviceHandle secondary_device() const = 0;
/**
* @brief sets true if application has sent TTS GlobalProperties
@@ -562,8 +597,13 @@ class Application : public virtual InitialApplicationData,
virtual void increment_list_files_in_none_count() = 0;
virtual bool set_app_icon_path(const std::string& file_name) = 0;
virtual void set_app_allowed(const bool allowed) = 0;
- DEPRECATED virtual void set_device(
- connection_handler::DeviceHandle device) = 0;
+ /**
+ * @brief Sets the handle of the device on which secondary transport of this
+ * app is running
+ * @param handle of the device on which secondary transport is running
+ */
+ virtual void set_secondary_device(
+ connection_handler::DeviceHandle secondary_device) = 0;
virtual uint32_t get_grammar_id() const = 0;
virtual void set_grammar_id(uint32_t value) = 0;
@@ -574,6 +614,24 @@ class Application : public virtual InitialApplicationData,
virtual void set_is_resuming(bool is_resuming) = 0;
virtual bool is_resuming() const = 0;
+ /**
+ * @brief Remembers the HMI level which the app would resume into if high-
+ * bandwidth transport were available.
+ * @param level The HMI level which the app would resume into. Specify
+ * INVALID_ENUM to clear the state.
+ */
+ virtual void set_deferred_resumption_hmi_level(
+ mobile_api::HMILevel::eType level) = 0;
+ /**
+ * @brief Returns the HMI level which the app would resume into if high-
+ * bandwidth transport were available.
+ *
+ * A value of INVALID_ENUM indicates that the app does not have deferred
+ * HMI level.
+ * @return HMI level which the app would resume into
+ */
+ virtual mobile_api::HMILevel::eType deferred_resumption_hmi_level() const = 0;
+
virtual bool AddFile(const AppFile& file) = 0;
virtual const AppFilesMap& getAppFiles() const = 0;
@@ -595,10 +653,6 @@ class Application : public virtual InitialApplicationData,
virtual bool UnsubscribeFromButton(
mobile_apis::ButtonName::eType btn_name) = 0;
- virtual bool SubscribeToIVI(uint32_t vehicle_info_type) = 0;
- virtual bool IsSubscribedToIVI(uint32_t vehicle_info_type) const = 0;
- virtual bool UnsubscribeFromIVI(uint32_t vehicle_info_type) = 0;
-
/**
* @brief ResetDataInNone reset data counters in NONE
*/
@@ -620,6 +674,12 @@ class Application : public virtual InitialApplicationData,
virtual UsageStatistics& usage_report() = 0;
/**
+ * @brief Access to HelpPromptManager interface
+ * @return object for Handling VR help
+ */
+ virtual HelpPromptManager& help_prompt_manager() = 0;
+
+ /**
* @brief SetInitialState sets initial HMI state for application on
* registration
* @param state Hmi state value
@@ -676,6 +736,12 @@ class Application : public virtual InitialApplicationData,
virtual const HmiStatePtr RegularHmiState() const = 0;
/**
+ * @brief Checks if app is allowed to change audio source
+ * @return True - if allowed, otherwise - False
+ */
+ virtual bool IsAllowedToChangeAudioSource() const = 0;
+
+ /**
* @brief PostponedHmiState returns postponed hmi state of application
* if it's present
*
@@ -716,14 +782,11 @@ class Application : public virtual InitialApplicationData,
virtual bool IsAudioApplication() const = 0;
/**
- * DEPRECATED
- * @brief GetDeviceId allows to obtain device id which posseses
- * by this application.
- * @return device the device id.
+ * @brief Check's if it is projection or navigation application
+ *
+ * @return true if application is projection or navigation
*/
- std::string GetDeviceId() const {
- return device_id_;
- }
+ virtual bool IsVideoApplication() const = 0;
/**
* @brief IsRegistered allows to distinguish if this
@@ -809,7 +872,21 @@ class Application : public virtual InitialApplicationData,
*/
virtual uint32_t GetAvailableDiskSpace() = 0;
-#ifdef SDL_REMOTE_CONTROL
+ /**
+ * @brief Allows to save mobile's command smart object in order to perform
+ * this command later.
+ * @param mobile_message the message smart_object.
+ */
+ virtual void PushMobileMessage(
+ smart_objects::SmartObjectSPtr mobile_message) = 0;
+
+ /**
+ * @brief Allows to obtain the whole list of pending commands in order to
+ * process them.
+ * @param mobile_message the messages array which is filled by the method.
+ */
+ virtual void SwapMobileMessageQueue(MobileMessageQueue& mobile_messages) = 0;
+
/**
* @brief set_system_context Set system context for application
* @param system_context Current context
@@ -852,16 +929,10 @@ class Application : public virtual InitialApplicationData,
virtual bool RemoveExtension(AppExtensionUID uid) = 0;
/**
- * @brief Removes all extensions
- */
- virtual void RemoveExtensions() = 0;
-
- /**
- * @brief Get list of subscriptions to vehicle info notifications
- * @return list of subscriptions to vehicle info notifications
+ * @brief Get list of available application extensions
+ * @return application extensions
*/
- virtual const VehicleInfoSubscriptions& SubscribesIVI() const = 0;
-#endif // SDL_REMOTE_CONTROL
+ virtual const std::list<AppExtensionPtr>& Extensions() const = 0;
protected:
mutable sync_primitives::Lock hmi_states_lock_;
@@ -875,8 +946,8 @@ class Application : public virtual InitialApplicationData,
bool is_greyed_out_;
};
-typedef utils::SharedPtr<Application> ApplicationSharedPtr;
-typedef utils::SharedPtr<const Application> ApplicationConstSharedPtr;
+typedef std::shared_ptr<Application> ApplicationSharedPtr;
+typedef std::shared_ptr<const Application> ApplicationConstSharedPtr;
typedef uint32_t ApplicationId;
} // namespace application_manager