summaryrefslogtreecommitdiff
path: root/src/components/application_manager/rpc_plugins
diff options
context:
space:
mode:
authorjacobkeeler <jacob.keeler@livioradio.com>2019-01-22 13:40:04 -0500
committerjacobkeeler <jacob.keeler@livioradio.com>2019-01-22 13:40:04 -0500
commit73336d81747ab60e38496f2e7416b2388480573d (patch)
tree72df5338755a441ccd091d9dc2d2f9c3ab71298b /src/components/application_manager/rpc_plugins
parent18c1984eb33d846b7cdb1ee0a5d79fdfd0d2fb78 (diff)
downloadsdl_core-73336d81747ab60e38496f2e7416b2388480573d.tar.gz
Add dummy response for PublishAppService
Diffstat (limited to 'src/components/application_manager/rpc_plugins')
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_publish_app_service_request.cc20
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/publish_app_service_request.cc16
2 files changed, 30 insertions, 6 deletions
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 41729cfe5a..a11e4e8a22 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
@@ -53,12 +53,22 @@ ASPublishAppServiceRequest::~ASPublishAppServiceRequest() {}
void ASPublishAppServiceRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
-
- (*message_)[strings::params][strings::message_type] = MessageType::kResponse;
- (*message_)[strings::params][hmi_response::code] =
- hmi_apis::Common_Result::SUCCESS;
+ smart_objects::SmartObject response_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ smart_objects::SmartObject service_record =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ service_record[strings::service_manifest] =
+ (*message_)[strings::msg_params][strings::app_service_manifest];
+ service_record[strings::service_id] = "This is a service ID";
+ service_record[strings::service_published] = true;
+ service_record[strings::service_active] = true;
+ response_params[strings::app_service_record] = service_record;
// TODO: Add AppServiceRecord to response
- rpc_service_.ManageHMICommand(message_);
+ SendResponse(true,
+ (*message_)[strings::params][strings::correlation_id].asUInt(),
+ hmi_apis::FunctionID::AppService_PublishAppService,
+ hmi_apis::Common_Result::SUCCESS,
+ &response_params);
}
} // namespace commands
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 ddde156a44..a133695f60 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
@@ -58,7 +58,21 @@ void PublishAppServiceRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
LOG4CXX_DEBUG(logger_, "Received a PublishAppService");
MessageHelper::PrintSmartObject(message_);
- SendResponse(true, mobile_apis::Result::SUCCESS);
+
+ smart_objects::SmartObject response_params =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+
+ smart_objects::SmartObject service_record =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+ service_record[strings::service_manifest] =
+ (*message_)[strings::msg_params][strings::app_service_manifest];
+ service_record[strings::service_id] = "This is a service ID";
+ service_record[strings::service_published] = true;
+ service_record[strings::service_active] = true;
+
+ response_params[strings::app_service_record] = service_record;
+
+ SendResponse(true, mobile_apis::Result::SUCCESS, NULL, &response_params);
}
} // namespace commands