summaryrefslogtreecommitdiff
path: root/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_hmi_command_factory.cc
diff options
context:
space:
mode:
authorJacob Keeler <jacob.keeler@livioradio.com>2019-02-23 12:35:11 -0500
committerGitHub <noreply@github.com>2019-02-23 12:35:11 -0500
commit2a26de5bc0f3a357e28e6a83c9a7d439d2673431 (patch)
tree21475ca531caf403cc20102ab31fdcdb32c4ae1c /src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_hmi_command_factory.cc
parenta4011490d9aa4606d6d835690bc8703c4375526b (diff)
downloadsdl_core-2a26de5bc0f3a357e28e6a83c9a7d439d2673431.tar.gz
App Service Activation Logic (#2809)
* Add AS.AppServiceActivation and AS.GetAppServiceRecords RPCs * Initialize AppServiceManager in Application manager tests * Moved create notification functions to message helper class * Fix style * Removed setServiceActive function * Add OnSystemCapabilityUpdated triggers to AppServiceManager Includes refactoring of OnSystemCapabilityUpdated notification classes. * Remove servicesSupported parameter * Update SystemCapability structs with new revisions * Include additional cases for activation 1. Services are activated if their publishing app is in the foreground. 2. If a service is deactivated without another being activated, the embedded service becomes active if available. * Fixed error from previous commit and addressed style comments * Addressed review comments * Address review comments * Fix LastState usage in app service manager * Addressed review comments and removed extra debug statements * Fix style
Diffstat (limited to 'src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_hmi_command_factory.cc')
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_hmi_command_factory.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_hmi_command_factory.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_hmi_command_factory.cc
index e741d7bfd4..7afc04c8e9 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_hmi_command_factory.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_hmi_command_factory.cc
@@ -34,6 +34,10 @@
#include "application_manager/message.h"
#include "interfaces/HMI_API.h"
+#include "app_service_rpc_plugin/commands/hmi/as_app_service_activation_request.h"
+#include "app_service_rpc_plugin/commands/hmi/as_app_service_activation_response.h"
+#include "app_service_rpc_plugin/commands/hmi/as_get_app_service_records_request.h"
+#include "app_service_rpc_plugin/commands/hmi/as_get_app_service_records_response.h"
#include "app_service_rpc_plugin/commands/hmi/as_publish_app_service_request.h"
#include "app_service_rpc_plugin/commands/hmi/as_publish_app_service_response.h"
#include "app_service_rpc_plugin/commands/hmi/on_as_app_service_data_notification.h"
@@ -111,6 +115,16 @@ app_mngr::CommandCreator& AppServiceHmiCommandFactory::buildCommandCreator(
commands::OnASAppServiceDataNotificationFromHMI>()
: factory
.GetCreator<commands::OnASAppServiceDataNotification>();
+ case hmi_apis::FunctionID::AppService_GetAppServiceRecords:
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::ASGetAppServiceRecordsRequest>()
+ : factory
+ .GetCreator<commands::ASGetAppServiceRecordsResponse>();
+ case hmi_apis::FunctionID::AppService_AppServiceActivation:
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::ASAppServiceActivationRequest>()
+ : factory
+ .GetCreator<commands::ASAppServiceActivationResponse>();
default:
LOG4CXX_WARN(logger_, "Unsupported function_id: " << function_id);
return factory.GetCreator<app_mngr::InvalidCommand>();