diff options
author | Shobhit Adlakha <ShobhitAd@users.noreply.github.com> | 2019-02-21 17:53:08 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-21 17:53:08 -0500 |
commit | a4011490d9aa4606d6d835690bc8703c4375526b (patch) | |
tree | b422413f94d20fd00cf7d7b653865d5f5434a22e /src/components/application_manager/rpc_plugins/app_service_rpc_plugin | |
parent | 1660c7950143cf1b79b8e5b1fabd2d18ad95af6f (diff) | |
download | sdl_core-a4011490d9aa4606d6d835690bc8703c4375526b.tar.gz |
SystemCapability Subscription (#2800)
* Added subscribe paramater and SystemCapability App Extension
* Added SystemCapability app extension in sdl_rpc_plugin
* Added enabling/disabling subscription in
* Added and implemented OnSystemCapabilityUpdated notification
* Add binary data to OEM_SPECIFIC request type
* Add check for missing presetBankCapabilities in Buttons.GetCapabilities
* Revert "Add missing resource close in LoadPlugin"
This reverts commit 35defc42777c57412cbf8b793489ab0dac502f4e.
* Genericize vehicle info in hmi_capabilities.json
* Added subscribe paramater and SystemCapability App Extension
* Added SystemCapability app extension in sdl_rpc_plugin
* Added enabling/disabling subscription in
* Added and implemented OnSystemCapabilityUpdated notification
* Added AppServices structs to MOBILE API
* Add binary data to OEM_SPECIFIC request type
* Add check for missing presetBankCapabilities in Buttons.GetCapabilities
* Revert "Add missing resource close in LoadPlugin"
This reverts commit 35defc42777c57412cbf8b793489ab0dac502f4e.
* Genericize vehicle info in hmi_capabilities.json
* Added subscribe paramater and SystemCapability App Extension
* Added SystemCapability app extension in sdl_rpc_plugin
* Added enabling/disabling subscription in
* Added and implemented OnSystemCapabilityUpdated notification
* Added and implemented OnSystemCapabilityUpdated notification
* Added AppServices structs to MOBILE API
* Add binary data to OEM_SPECIFIC request type
* Add check for missing presetBankCapabilities in Buttons.GetCapabilities
* Revert "Add missing resource close in LoadPlugin"
This reverts commit 35defc42777c57412cbf8b793489ab0dac502f4e.
* Genericize vehicle info in hmi_capabilities.json
* Added subscribe paramater and SystemCapability App Extension
* Added SystemCapability app extension in sdl_rpc_plugin
* Added enabling/disabling subscription in
* Added and implemented OnSystemCapabilityUpdated notification
* Added AppServices structs to MOBILE API
* Implemented AppServiceCapabilities response
* Renamed SystemCapability App Extension filename and ExtractExtension function
* Fix style
* Add OnSystemCapabilityUpdated(APP_SERVICES) handling
* Fix missing include and unused variables
* Made fix in App service manager and added notifcation RPC to policy table
* Implemented automatic app system capability subscription of App Service Provider
* Add binary data to OEM_SPECIFIC request type
* Add check for missing presetBankCapabilities in Buttons.GetCapabilities
* Revert "Add missing resource close in LoadPlugin"
This reverts commit 35defc42777c57412cbf8b793489ab0dac502f4e.
* Genericize vehicle info in hmi_capabilities.json
* Added subscribe paramater and SystemCapability App Extension
* Added SystemCapability app extension in sdl_rpc_plugin
* Added enabling/disabling subscription in
* Added and implemented OnSystemCapabilityUpdated notification
* Added AppServices structs to MOBILE API
* Implemented AppServiceCapabilities response
* Renamed SystemCapability App Extension filename and ExtractExtension function
* Fix style
* Add OnSystemCapabilityUpdated(APP_SERVICES) handling
* Fix missing include and unused variables
* Made fix in App service manager and added notifcation RPC to policy table
* Implemented automatic app system capability subscription of App Service Provider
* Rebase and style fix
* Added all published app services in OnSystemCapabilityUpdate notification
* Add binary data to OEM_SPECIFIC request type
* Add check for missing presetBankCapabilities in Buttons.GetCapabilities
* Revert "Add missing resource close in LoadPlugin"
This reverts commit 35defc42777c57412cbf8b793489ab0dac502f4e.
* Genericize vehicle info in hmi_capabilities.json
* Added subscribe paramater and SystemCapability App Extension
* Added SystemCapability app extension in sdl_rpc_plugin
* Added enabling/disabling subscription in
* Added and implemented OnSystemCapabilityUpdated notification
* Added AppServices structs to MOBILE API
* Implemented AppServiceCapabilities response
* Renamed SystemCapability App Extension filename and ExtractExtension function
* Fix style
* Add OnSystemCapabilityUpdated(APP_SERVICES) handling
* Fix missing include and unused variables
* Made fix in App service manager and added notifcation RPC to policy table
* Implemented automatic app system capability subscription of App Service Provider
* Added subscribe paramater and SystemCapability App Extension
* Added SystemCapability app extension in sdl_rpc_plugin
* Added and implemented OnSystemCapabilityUpdated notification
* Renamed SystemCapability App Extension filename and ExtractExtension function
* Fix style
* Add OnSystemCapabilityUpdated(APP_SERVICES) handling
* Made fix in App service manager and added notifcation RPC to policy table
* Rebase and style fix
* Added all published app services in OnSystemCapabilityUpdate notification
* Applied parameter updateReason only to published app service which triggers OnSystemCapabilityUpdated notification
* Implemented OnSystemCapabilityUpdated notification to HMI
* Addressed review comments
* Implemented UnPublishAppService in ASM
* Implemented ASP removal notification
* Moved ASP removal notification to ApplicationManagerImpl::UnregisterApplication
* Moved HMI OSCU notification from app services plugin to sdl rpc plugin
* Initialize AppServiceManager in Application manager tests
* Moved create notification functions to message helper class
* Fix style
* Removed setServiceActive function
* Update SystemCapability structs with new revisions
* Fixed error from previous commit and addressed style comments
* Addressed review comments
* Addressed review comments and removed extra debug statements
Diffstat (limited to 'src/components/application_manager/rpc_plugins/app_service_rpc_plugin')
3 files changed, 14 insertions, 2 deletions
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/CMakeLists.txt b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/CMakeLists.txt index e254c36587..2bdc150906 100644 --- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/CMakeLists.txt +++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/CMakeLists.txt @@ -28,7 +28,10 @@ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. -include_directories(include) +include_directories( + include + ${COMPONENTS_DIR}/application_manager/rpc_plugins/sdl_rpc_plugin/include + ) set (COMMANDS_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/commands @@ -54,6 +57,7 @@ set(LIBRARIES v4_protocol_v1_2_no_extra SmartObjects Utils + sdl_rpc_plugin ) if(ENABLE_LOG) diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_publish_app_service_request.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_publish_app_service_request.cc index 89da1e744c..a3e6bfed2a 100644 --- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_publish_app_service_request.cc +++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_publish_app_service_request.cc @@ -78,6 +78,7 @@ bool ASPublishAppServiceRequest::ValidateManifest( void ASPublishAppServiceRequest::Run() { LOG4CXX_AUTO_TRACE(logger_); + LOG4CXX_DEBUG(logger_, "Received a PublishAppService request from HMI"); smart_objects::SmartObject response_params = smart_objects::SmartObject(smart_objects::SmartType_Map); smart_objects::SmartObject manifest = diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/publish_app_service_request.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/publish_app_service_request.cc index 7a0333e763..96f17f732a 100644 --- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/publish_app_service_request.cc +++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/publish_app_service_request.cc @@ -35,6 +35,7 @@ #include "application_manager/message_helper.h" #include "application_manager/rpc_service.h" #include "interfaces/MOBILE_API.h" +#include "sdl_rpc_plugin/extensions/system_capability_app_extension.h" namespace app_service_rpc_plugin { using namespace application_manager; @@ -79,7 +80,7 @@ bool PublishAppServiceRequest::ValidateManifest( void PublishAppServiceRequest::Run() { LOG4CXX_AUTO_TRACE(logger_); - LOG4CXX_DEBUG(logger_, "Received a PublishAppService"); + LOG4CXX_DEBUG(logger_, "Received a PublishAppService " << connection_key()); MessageHelper::PrintSmartObject(*message_); smart_objects::SmartObject response_params = @@ -89,6 +90,12 @@ void PublishAppServiceRequest::Run() { if (!ValidateManifest(manifest)) { return; } + + ApplicationSharedPtr app = application_manager_.application(connection_key()); + auto& ext = + sdl_rpc_plugin::SystemCapabilityAppExtension::ExtractExtension(*app); + ext.SubscribeTo(mobile_apis::SystemCapabilityType::APP_SERVICES); + smart_objects::SmartObject service_record = application_manager_.GetAppServiceManager().PublishAppService( manifest, true, connection_key()); |