diff options
author | Conlain Kelly <conlain.k@gmail.com> | 2018-07-18 13:11:19 -0400 |
---|---|---|
committer | Conlain Kelly <conlain.k@gmail.com> | 2018-07-18 13:11:25 -0400 |
commit | e380ed1779e4317437cea63f070a8345b41f2d33 (patch) | |
tree | b2d6669663b91a3f235c2ce4a00c0c888751ff20 /src/components/application_manager/include/application_manager/app_launch | |
parent | 09c941dd2ffd4f98ba706895a67133318c3c5007 (diff) | |
parent | 4f21cbafb247664bd7b89bf2d39944764b1763b1 (diff) | |
download | sdl_core-e380ed1779e4317437cea63f070a8345b41f2d33.tar.gz |
Merge branch 'develop' into feature/boost_lock_implementation
Diffstat (limited to 'src/components/application_manager/include/application_manager/app_launch')
2 files changed, 33 insertions, 3 deletions
diff --git a/src/components/application_manager/include/application_manager/app_launch/app_launch_data_db.h b/src/components/application_manager/include/application_manager/app_launch/app_launch_data_db.h index 92d6bbd9ef..ccbf4c7c01 100644 --- a/src/components/application_manager/include/application_manager/app_launch/app_launch_data_db.h +++ b/src/components/application_manager/include/application_manager/app_launch/app_launch_data_db.h @@ -153,7 +153,7 @@ class AppLaunchDataDB : public AppLaunchDataImpl { /** * @brief returns pointer to data base */ - std::auto_ptr<utils::dbms::SQLDatabase> db_; + std::unique_ptr<utils::dbms::SQLDatabase> db_; /** * @brief indicate initializing status of DB diff --git a/src/components/application_manager/include/application_manager/app_launch/device_apps_launcher.h b/src/components/application_manager/include/application_manager/app_launch/device_apps_launcher.h index f1f29471e6..2a6cdb0745 100644 --- a/src/components/application_manager/include/application_manager/app_launch/device_apps_launcher.h +++ b/src/components/application_manager/include/application_manager/app_launch/device_apps_launcher.h @@ -10,9 +10,39 @@ namespace app_launch { class AppLaunchCtrlImpl; -class DeviceAppsLauncherImpl; +class DeviceAppsLauncher; class AppsLauncher; class AppLaunchSettings; +class Launcher; +class LauncherGenerator; + +// impl class must be defined for unique_ptr in DeviceAppsLauncher +class DeviceAppsLauncherImpl { + public: + DeviceAppsLauncherImpl(DeviceAppsLauncher& interface, + AppsLauncher& apps_launcher); + + bool LaunchAppsOnDevice( + const std::string& device_mac, + const std::vector<ApplicationDataPtr>& applications_to_launch); + + struct LauncherFinder { + LauncherFinder(const std::string& device_mac) : device_mac_(device_mac) {} + + bool operator()(const utils::SharedPtr<Launcher>& launcher) const; + + std::string device_mac_; + }; + + bool StopLaunchingAppsOnDevice(const std::string& device_mac); + + private: + sync_primitives::Lock launchers_lock_; + std::vector<utils::SharedPtr<Launcher> > free_launchers_; + std::vector<utils::SharedPtr<Launcher> > works_launchers_; + DeviceAppsLauncher& interface_; +}; + /** * @brief The MultipleAppsLauncher struct * should manage launching applications and gaps between launching application @@ -36,7 +66,7 @@ class DeviceAppsLauncher { private: application_manager::ApplicationManager& app_mngr_; const AppLaunchSettings& settings_; - std::auto_ptr<DeviceAppsLauncherImpl> impl_; + std::unique_ptr<DeviceAppsLauncherImpl> impl_; friend class DeviceAppsLauncherImpl; DISALLOW_COPY_AND_ASSIGN(DeviceAppsLauncher); }; |