diff options
author | Andrey Oleynik (GitHub) <aoleynik@luxoft.com> | 2017-11-29 18:33:59 +0200 |
---|---|---|
committer | Andriy Byzhynar <AByzhynar@luxoft.com> | 2018-01-18 12:03:51 +0200 |
commit | ee1d2d7677a7d94da43cc8b1e047bdd816e5fd83 (patch) | |
tree | e1b956cd3c472f792117735a20935587e75cfb79 /src/components/policy/policy_regular/include | |
parent | 11bef60123b62bbe0f8f624bb24a5f0cf74980aa (diff) | |
download | sdl_core-ee1d2d7677a7d94da43cc8b1e047bdd816e5fd83.tar.gz |
Changes iAP2 Bluetooth to USB switching flow
These changes update switching flow so now instead of automatic
switching start in case of same UUID is detected SDL will wait for
external signal from the system to start this flow.
Also due to UUID is reliable only while device remains connected (at
least on certain systems) SDL now uses Bluetooth MAC and USB serial to
manage devices and UUID is used only for detection of devices able to
switch their transports. Currently only iAP2 Bluetooth to USB support is
implemented.
Diffstat (limited to 'src/components/policy/policy_regular/include')
3 files changed, 21 insertions, 0 deletions
diff --git a/src/components/policy/policy_regular/include/policy/cache_manager.h b/src/components/policy/policy_regular/include/policy/cache_manager.h index 44827e2602..b711bf6ea2 100644 --- a/src/components/policy/policy_regular/include/policy/cache_manager.h +++ b/src/components/policy/policy_regular/include/policy/cache_manager.h @@ -701,6 +701,15 @@ class CacheManager : public CacheManagerInterface { return pt_; } + /** + * @brief OnDeviceSwitching Processes existing policy permissions for devices + * switching transport + * @param device_id_from Device ID original + * @param device_id_to Device ID new + */ + void OnDeviceSwitching(const std::string& device_id_from, + const std::string& device_id_to) OVERRIDE; + private: std::string currentDateTime(); struct AppHMITypeToString { diff --git a/src/components/policy/policy_regular/include/policy/cache_manager_interface.h b/src/components/policy/policy_regular/include/policy/cache_manager_interface.h index 9712b799dc..9f7c7318db 100644 --- a/src/components/policy/policy_regular/include/policy/cache_manager_interface.h +++ b/src/components/policy/policy_regular/include/policy/cache_manager_interface.h @@ -641,6 +641,15 @@ class CacheManagerInterface { * */ virtual utils::SharedPtr<policy_table::Table> pt() const = 0; + + /** + * @brief OnDeviceSwitching Processes existing policy permissions for devices + * switching transport + * @param device_id_from Device ID original + * @param device_id_to Device ID new + */ + virtual void OnDeviceSwitching(const std::string& device_id_from, + const std::string& device_id_to) = 0; }; typedef utils::SharedPtr<CacheManagerInterface> CacheManagerInterfaceSPtr; diff --git a/src/components/policy/policy_regular/include/policy/policy_manager_impl.h b/src/components/policy/policy_regular/include/policy/policy_manager_impl.h index 1b39392c0c..941db1a67f 100644 --- a/src/components/policy/policy_regular/include/policy/policy_manager_impl.h +++ b/src/components/policy/policy_regular/include/policy/policy_manager_impl.h @@ -553,6 +553,9 @@ class PolicyManagerImpl : public PolicyManager { */ void OnAppRegisteredOnMobile(const std::string& application_id) OVERRIDE; + void OnDeviceSwitching(const std::string& device_id_from, + const std::string& device_id_to) OVERRIDE; + /** * @brief RetrieveCertificate Allows to obtain certificate in order * to start secure connection. |