summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/commands/hmi/as_unpublish_app_service_request.h78
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/commands/hmi/as_unpublish_app_service_response.h78
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/commands/mobile/unpublish_app_service_request.h78
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/commands/mobile/unpublish_app_service_response.h78
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_hmi_command_factory.cc6
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_mobile_command_factory.cc12
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_unpublish_app_service_request.cc83
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_unpublish_app_service_response.cc61
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/publish_app_service_request.cc6
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/unpublish_app_service_request.cc77
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/unpublish_app_service_response.cc62
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/test/commands/hmi/dummy_hmi_commands_test.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/test/commands/mobile/dummy_mobile_commands_test.cc6
-rw-r--r--src/components/application_manager/src/app_service_manager.cc34
-rw-r--r--src/components/application_manager/src/hmi_interfaces_impl.cc2
-rw-r--r--src/components/interfaces/HMI_API.xml12
-rw-r--r--src/components/interfaces/MOBILE_API.xml43
-rw-r--r--src/components/policy/policy_external/include/policy/policy_table/enums.h5
-rw-r--r--src/components/policy/policy_external/src/policy_table/enums.cc5
-rw-r--r--src/components/policy/policy_regular/include/policy/policy_table/enums.h5
-rw-r--r--src/components/policy/policy_regular/src/policy_table/enums.cc9
21 files changed, 729 insertions, 15 deletions
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/commands/hmi/as_unpublish_app_service_request.h b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/commands/hmi/as_unpublish_app_service_request.h
new file mode 100644
index 0000000000..fdeadfa7c0
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/commands/hmi/as_unpublish_app_service_request.h
@@ -0,0 +1,78 @@
+/*
+ Copyright (c) 2019, Ford Motor Company, Livio
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+
+ Neither the name of the the copyright holders nor the names of their
+ contributors may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_APP_SERVICE_RPC_PLUGIN_INCLUDE_APP_SERVICE_RPC_PLUGIN_COMMANDS_HMI_AS_UNPUBLISH_APP_SERVICE_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_APP_SERVICE_RPC_PLUGIN_INCLUDE_APP_SERVICE_RPC_PLUGIN_COMMANDS_HMI_AS_UNPUBLISH_APP_SERVICE_REQUEST_H_
+
+#include "application_manager/commands/request_from_hmi.h"
+
+namespace app_service_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief ASUnpublishAppServiceRequest command class
+ **/
+class ASUnpublishAppServiceRequest : public app_mngr::commands::RequestFromHMI {
+ public:
+ /**
+ * @brief ASUnpublishAppServiceRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ ASUnpublishAppServiceRequest(
+ const app_mngr::commands::MessageSharedPtr& message,
+ app_mngr::ApplicationManager& application_manager,
+ app_mngr::rpc_service::RPCService& rpc_service,
+ app_mngr::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle);
+
+ /**
+ * @brief ASUnpublishAppServiceRequest class destructor
+ **/
+ virtual ~ASUnpublishAppServiceRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ASUnpublishAppServiceRequest);
+};
+
+} // namespace commands
+
+} // namespace app_service_rpc_plugin
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_APP_SERVICE_RPC_PLUGIN_INCLUDE_APP_SERVICE_RPC_PLUGIN_COMMANDS_HMI_AS_UNPUBLISH_APP_SERVICE_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/commands/hmi/as_unpublish_app_service_response.h b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/commands/hmi/as_unpublish_app_service_response.h
new file mode 100644
index 0000000000..51edd2dadb
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/commands/hmi/as_unpublish_app_service_response.h
@@ -0,0 +1,78 @@
+/*
+ Copyright (c) 2019, Ford Motor Company, Livio
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+
+ Neither the name of the the copyright holders nor the names of their
+ contributors may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_APP_SERVICE_RPC_PLUGIN_INCLUDE_APP_SERVICE_RPC_PLUGIN_COMMANDS_HMI_AS_UNPUBLISH_APP_SERVICE_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_APP_SERVICE_RPC_PLUGIN_INCLUDE_APP_SERVICE_RPC_PLUGIN_COMMANDS_HMI_AS_UNPUBLISH_APP_SERVICE_RESPONSE_H_
+
+#include "application_manager/commands/response_to_hmi.h"
+
+namespace app_service_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief ASUnpublishAppServiceResponse command class
+ **/
+class ASUnpublishAppServiceResponse : public app_mngr::commands::ResponseToHMI {
+ public:
+ /**
+ * @brief ASUnpublishAppServiceResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ ASUnpublishAppServiceResponse(
+ const app_mngr::commands::MessageSharedPtr& message,
+ app_mngr::ApplicationManager& application_manager,
+ app_mngr::rpc_service::RPCService& rpc_service,
+ app_mngr::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle);
+
+ /**
+ * @brief ASUnpublishAppServiceResponse class destructor
+ **/
+ virtual ~ASUnpublishAppServiceResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ASUnpublishAppServiceResponse);
+};
+
+} // namespace commands
+
+} // namespace app_service_rpc_plugin
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_APP_SERVICE_RPC_PLUGIN_INCLUDE_APP_SERVICE_RPC_PLUGIN_COMMANDS_HMI_AS_UNPUBLISH_APP_SERVICE_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/commands/mobile/unpublish_app_service_request.h b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/commands/mobile/unpublish_app_service_request.h
new file mode 100644
index 0000000000..90d7d0d4a1
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/commands/mobile/unpublish_app_service_request.h
@@ -0,0 +1,78 @@
+/*
+ Copyright (c) 2019, Ford Motor Company, Livio
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+
+ Neither the name of the the copyright holders nor the names of their
+ contributors may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_APP_SERVICE_RPC_PLUGIN_INCLUDE_APP_SERVICE_RPC_PLUGIN_COMMANDS_MOBILE_UNPUBLISH_APP_SERVICE_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_APP_SERVICE_RPC_PLUGIN_INCLUDE_APP_SERVICE_RPC_PLUGIN_COMMANDS_MOBILE_UNPUBLISH_APP_SERVICE_REQUEST_H_
+
+#include "application_manager/commands/command_request_impl.h"
+
+namespace app_service_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UnpublishAppServiceRequest command class
+ **/
+class UnpublishAppServiceRequest : public app_mngr::commands::CommandRequestImpl {
+ public:
+ /**
+ * @brief UnpublishAppServiceRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UnpublishAppServiceRequest(
+ const app_mngr::commands::MessageSharedPtr& message,
+ app_mngr::ApplicationManager& application_manager,
+ app_mngr::rpc_service::RPCService& rpc_service,
+ app_mngr::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle);
+
+ /**
+ * @brief UnpublishAppServiceRequest class destructor
+ **/
+ virtual ~UnpublishAppServiceRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UnpublishAppServiceRequest);
+};
+
+} // namespace commands
+
+} // namespace app_service_rpc_plugin
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_APP_SERVICE_RPC_PLUGIN_INCLUDE_APP_SERVICE_RPC_PLUGIN_COMMANDS_MOBILE_UNPUBLISH_APP_SERVICE_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/commands/mobile/unpublish_app_service_response.h b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/commands/mobile/unpublish_app_service_response.h
new file mode 100644
index 0000000000..16e6d23c41
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/commands/mobile/unpublish_app_service_response.h
@@ -0,0 +1,78 @@
+/*
+ Copyright (c) 2019, Ford Motor Company, Livio
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+
+ Neither the name of the the copyright holders nor the names of their
+ contributors may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_APP_SERVICE_RPC_PLUGIN_INCLUDE_APP_SERVICE_RPC_PLUGIN_COMMANDS_MOBILE_UNPUBLISH_APP_SERVICE_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_APP_SERVICE_RPC_PLUGIN_INCLUDE_APP_SERVICE_RPC_PLUGIN_COMMANDS_MOBILE_UNPUBLISH_APP_SERVICE_RESPONSE_H_
+
+#include "application_manager/commands/command_response_impl.h"
+
+namespace app_service_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UnpublishAppServiceResponse command class
+ **/
+class UnpublishAppServiceResponse : public app_mngr::commands::CommandResponseImpl {
+ public:
+ /**
+ * @brief UnpublishAppServiceResponse class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ UnpublishAppServiceResponse(
+ const app_mngr::commands::MessageSharedPtr& message,
+ app_mngr::ApplicationManager& application_manager,
+ app_mngr::rpc_service::RPCService& rpc_service,
+ app_mngr::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handle);
+
+ /**
+ * @brief UnpublishAppServiceResponse class destructor
+ **/
+ virtual ~UnpublishAppServiceResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UnpublishAppServiceResponse);
+};
+
+} // namespace commands
+
+} // namespace app_service_rpc_plugin
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_APP_SERVICE_RPC_PLUGIN_INCLUDE_APP_SERVICE_RPC_PLUGIN_COMMANDS_MOBILE_UNPUBLISH_APP_SERVICE_RESPONSE_H_
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 1cec2ccdce..02b5d897e5 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
@@ -50,6 +50,8 @@
#include "app_service_rpc_plugin/commands/hmi/as_perform_app_service_interaction_response_to_hmi.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/as_unpublish_app_service_request.h"
+#include "app_service_rpc_plugin/commands/hmi/as_unpublish_app_service_response.h"
#include "app_service_rpc_plugin/commands/hmi/on_as_app_service_data_notification.h"
#include "app_service_rpc_plugin/commands/hmi/on_as_app_service_data_notification_from_hmi.h"
@@ -126,6 +128,10 @@ app_mngr::CommandCreator& AppServiceHmiCommandFactory::buildCommandCreator(
return hmi_apis::messageType::request == message_type
? factory.GetCreator<commands::ASPublishAppServiceRequest>()
: factory.GetCreator<commands::ASPublishAppServiceResponse>();
+ case hmi_apis::FunctionID::AppService_UnpublishAppService:
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::ASUnpublishAppServiceRequest>()
+ : factory.GetCreator<commands::ASUnpublishAppServiceResponse>();
case hmi_apis::FunctionID::AppService_OnAppServiceData:
return app_mngr::commands::Command::CommandSource::SOURCE_HMI == source
? factory.GetCreator<
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_mobile_command_factory.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_mobile_command_factory.cc
index 76be96cf8f..5c44fb5fae 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_mobile_command_factory.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_mobile_command_factory.cc
@@ -47,6 +47,8 @@
#include "app_service_rpc_plugin/commands/mobile/perform_app_service_interaction_response_from_mobile.h"
#include "app_service_rpc_plugin/commands/mobile/publish_app_service_request.h"
#include "app_service_rpc_plugin/commands/mobile/publish_app_service_response.h"
+#include "app_service_rpc_plugin/commands/mobile/unpublish_app_service_request.h"
+#include "app_service_rpc_plugin/commands/mobile/unpublish_app_service_response.h"
CREATE_LOGGERPTR_GLOBAL(logger_, "AppServiceRpcPlugin")
@@ -120,6 +122,16 @@ app_mngr::CommandCreator& AppServiceMobileCommandFactory::buildCommandCreator(
return factory.GetCreator<commands::PublishAppServiceResponse>();
}
break;
+ case mobile_apis::FunctionID::UnpublishAppServiceID:
+ if (app_mngr::commands::Command::CommandSource::SOURCE_MOBILE == source &&
+ mobile_apis::messageType::response != message_type) {
+ return factory.GetCreator<commands::UnpublishAppServiceRequest>();
+ } else if (app_mngr::commands::Command::CommandSource::SOURCE_SDL ==
+ source &&
+ mobile_apis::messageType::request != message_type) {
+ return factory.GetCreator<commands::UnpublishAppServiceResponse>();
+ }
+ break;
case mobile_apis::FunctionID::OnAppServiceDataID:
return app_mngr::commands::Command::CommandSource::SOURCE_MOBILE == source
? factory.GetCreator<
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_unpublish_app_service_request.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_unpublish_app_service_request.cc
new file mode 100644
index 0000000000..c19d588c09
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_unpublish_app_service_request.cc
@@ -0,0 +1,83 @@
+/*
+ Copyright (c) 2019, Ford Motor Company, Livio
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+
+ Neither the name of the the copyright holders nor the names of their
+ contributors may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "app_service_rpc_plugin/commands/hmi/as_unpublish_app_service_request.h"
+#include "application_manager/application_impl.h"
+#include "application_manager/rpc_service.h"
+#include "interfaces/MOBILE_API.h"
+#include "application_manager/app_service_manager.h"
+
+namespace app_service_rpc_plugin {
+using namespace application_manager;
+namespace commands {
+
+ASUnpublishAppServiceRequest::ASUnpublishAppServiceRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ app_mngr::rpc_service::RPCService& rpc_service,
+ app_mngr::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : RequestFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+ASUnpublishAppServiceRequest::~ASUnpublishAppServiceRequest() {}
+
+void ASUnpublishAppServiceRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ std::string service_id = (*message_)[strings::msg_params][strings::service_id].asString();
+
+ bool ret = application_manager_.GetAppServiceManager().UnpublishAppService(service_id);
+
+ if (!ret) {
+ SendErrorResponse(
+ (*message_)[strings::params][strings::correlation_id].asUInt(),
+ hmi_apis::FunctionID::AppService_UnpublishAppService,
+ hmi_apis::Common_Result::REJECTED,
+ "The app service with that requested service ID does not exist",
+ application_manager::commands::Command::SOURCE_SDL_TO_HMI);
+ return;
+ }
+
+ SendResponse(true,
+ (*message_)[strings::params][strings::correlation_id].asUInt(),
+ hmi_apis::FunctionID::AppService_UnpublishAppService,
+ hmi_apis::Common_Result::SUCCESS,
+ NULL,
+ application_manager::commands::Command::SOURCE_SDL_TO_HMI);
+}
+
+} // namespace commands
+} // namespace app_service_rpc_plugin
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_unpublish_app_service_response.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_unpublish_app_service_response.cc
new file mode 100644
index 0000000000..47cc6ed295
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_unpublish_app_service_response.cc
@@ -0,0 +1,61 @@
+/*
+ Copyright (c) 2019, Ford Motor Company, Livio
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+
+ Neither the name of the the copyright holders nor the names of their
+ contributors may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "app_service_rpc_plugin/commands/hmi/as_unpublish_app_service_response.h"
+#include "application_manager/application_impl.h"
+#include "application_manager/rpc_service.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace app_service_rpc_plugin {
+using namespace application_manager;
+namespace commands {
+
+ASUnpublishAppServiceResponse::ASUnpublishAppServiceResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ app_mngr::rpc_service::RPCService& rpc_service,
+ app_mngr::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : ResponseToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+ASUnpublishAppServiceResponse::~ASUnpublishAppServiceResponse() {}
+
+void ASUnpublishAppServiceResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+}
+
+} // namespace commands
+} // namespace app_service_rpc_plugin
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 c168b4bf2f..53d1bf82fa 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
@@ -120,12 +120,6 @@ void PublishAppServiceRequest::Run() {
return;
}
- if (app->IsFullscreen()) {
- // Service should be activated if app is in the foreground
- application_manager_.GetAppServiceManager().ActivateAppService(
- service_record[strings::service_id].asString());
- }
-
response_params[strings::app_service_record] = service_record;
SendResponse(true, mobile_apis::Result::SUCCESS, NULL, &response_params);
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/unpublish_app_service_request.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/unpublish_app_service_request.cc
new file mode 100644
index 0000000000..2aef9709b2
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/unpublish_app_service_request.cc
@@ -0,0 +1,77 @@
+/*
+ Copyright (c) 2019, Ford Motor Company, Livio
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+
+ Neither the name of the the copyright holders nor the names of their
+ contributors may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "app_service_rpc_plugin/commands/mobile/unpublish_app_service_request.h"
+
+#include "application_manager/app_service_manager.h"
+#include "application_manager/application_impl.h"
+#include "application_manager/rpc_service.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace app_service_rpc_plugin {
+using namespace application_manager;
+namespace commands {
+
+UnpublishAppServiceRequest::UnpublishAppServiceRequest(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ app_mngr::rpc_service::RPCService& rpc_service,
+ app_mngr::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : CommandRequestImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+UnpublishAppServiceRequest::~UnpublishAppServiceRequest() {}
+
+void UnpublishAppServiceRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ std::string service_id = (*message_)[strings::msg_params][strings::service_id].asString();
+
+ bool ret = application_manager_.GetAppServiceManager().UnpublishAppService(service_id);
+
+ if (!ret) {
+ SendResponse(false,
+ mobile_apis::Result::INVALID_ID,
+ "The app service with that requested service ID does not exist");
+ return;
+ }
+
+ SendResponse(true, mobile_apis::Result::SUCCESS, NULL, NULL);
+
+}
+
+} // namespace commands
+} // namespace app_service_rpc_plugin
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/unpublish_app_service_response.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/unpublish_app_service_response.cc
new file mode 100644
index 0000000000..5551d6bdf0
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/unpublish_app_service_response.cc
@@ -0,0 +1,62 @@
+/*
+ Copyright (c) 2019, Ford Motor Company, Livio
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+
+ Neither the name of the the copyright holders nor the names of their
+ contributors may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "app_service_rpc_plugin/commands/mobile/unpublish_app_service_response.h"
+#include "application_manager/application_impl.h"
+#include "application_manager/rpc_service.h"
+#include "interfaces/MOBILE_API.h"
+
+namespace app_service_rpc_plugin {
+using namespace application_manager;
+namespace commands {
+
+UnpublishAppServiceResponse::UnpublishAppServiceResponse(
+ const application_manager::commands::MessageSharedPtr& message,
+ ApplicationManager& application_manager,
+ app_mngr::rpc_service::RPCService& rpc_service,
+ app_mngr::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler)
+ : CommandResponseImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+UnpublishAppServiceResponse::~UnpublishAppServiceResponse() {}
+
+void UnpublishAppServiceResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ rpc_service_.SendMessageToMobile(message_);
+}
+
+} // namespace commands
+} // namespace app_service_rpc_plugin
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/test/commands/hmi/dummy_hmi_commands_test.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/test/commands/hmi/dummy_hmi_commands_test.cc
index f64f353767..4236ac23f9 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/test/commands/hmi/dummy_hmi_commands_test.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/test/commands/hmi/dummy_hmi_commands_test.cc
@@ -53,6 +53,8 @@
#include "hmi/as_perform_app_service_interaction_response_to_hmi.h"
#include "hmi/as_publish_app_service_request.h"
#include "hmi/as_publish_app_service_response.h"
+#include "hmi/as_unpublish_app_service_request.h"
+#include "hmi/as_unpublish_app_service_response.h"
#include "hmi/on_as_app_service_data_notification.h"
#include "hmi/on_as_app_service_data_notification_from_hmi.h"
@@ -132,6 +134,8 @@ typedef Types<commands::ASAppServiceActivationRequest,
commands::ASPerformAppServiceInteractionResponseToHMI,
commands::ASPublishAppServiceRequest,
commands::ASPublishAppServiceResponse,
+ commands::ASUnpublishAppServiceRequest,
+ commands::ASUnpublishAppServiceResponse,
commands::OnASAppServiceDataNotification,
commands::OnASAppServiceDataNotificationFromHMI>
HMICommandsListFirst;
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/test/commands/mobile/dummy_mobile_commands_test.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/test/commands/mobile/dummy_mobile_commands_test.cc
index e77b21ca6d..69bff3ad76 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/test/commands/mobile/dummy_mobile_commands_test.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/test/commands/mobile/dummy_mobile_commands_test.cc
@@ -49,6 +49,8 @@
#include "mobile/perform_app_service_interaction_response_from_mobile.h"
#include "mobile/publish_app_service_request.h"
#include "mobile/publish_app_service_response.h"
+#include "mobile/unpublish_app_service_request.h"
+#include "mobile/unpublish_app_service_response.h"
#include "application_manager/mock_application.h"
#include "application_manager/mock_application_manager.h"
@@ -118,7 +120,9 @@ typedef Types<commands::GetAppServiceDataRequest,
commands::PerformAppServiceInteractionResponse,
commands::PerformAppServiceInteractionResponseFromMobile,
commands::PublishAppServiceRequest,
- commands::PublishAppServiceResponse>
+ commands::PublishAppServiceResponse,
+ commands::UnpublishAppServiceRequest,
+ commands::UnpublishAppServiceResponse>
MobileCommandsListFirst;
TYPED_TEST_CASE(MobileCommandsTestFirst, MobileCommandsListFirst);
diff --git a/src/components/application_manager/src/app_service_manager.cc b/src/components/application_manager/src/app_service_manager.cc
index bab8147d9f..6925499c0f 100644
--- a/src/components/application_manager/src/app_service_manager.cc
+++ b/src/components/application_manager/src/app_service_manager.cc
@@ -72,10 +72,27 @@ smart_objects::SmartObject AppServiceManager::PublishAppService(
std::string service_type = manifest[strings::service_type].asString();
- if (FindServiceByProvider(connection_key, service_type)) {
+ AppService* found_service = FindServiceByProvider(connection_key, service_type);
+ if (found_service) {
LOG4CXX_WARN(logger_,
- "Service already exists for this provider, rejecting");
- return smart_objects::SmartObject();
+ "Service already exists for this provider, updating");
+
+ published_services_lock_.Acquire();
+ found_service->record[strings::service_manifest] = manifest;
+ found_service->record[strings::service_published] = true;
+ smart_objects::SmartObject updated_service_record = found_service->record;
+ published_services_lock_.Release();
+
+ smart_objects::SmartObject msg_params;
+ msg_params[strings::system_capability][strings::system_capability_type] =
+ mobile_apis::SystemCapabilityType::APP_SERVICES;
+
+ AppServiceUpdated(
+ updated_service_record, mobile_apis::ServiceUpdateReason::MANIFEST_UPDATE, msg_params);
+
+ MessageHelper::BroadcastCapabilityUpdate(msg_params, app_manager_);
+
+ return updated_service_record;
}
if (manifest.keyExists(strings::service_name) &&
@@ -131,10 +148,15 @@ smart_objects::SmartObject AppServiceManager::PublishAppService(
MessageHelper::BroadcastCapabilityUpdate(msg_params, app_manager_);
- // Activate the new service if it is the default for its service type, or if
- // no service is active of its service type
+ // Activate the new service if it is the default for its service type, if
+ // no service is active of its service type, or it is a mobile app in full.
AppService* active_service = ActiveServiceForType(service_type);
- if (!active_service || app_service.default_service) {
+ ApplicationSharedPtr app = NULL;
+ if (mobile_service && connection_key) {
+ app = app_manager_.application(connection_key);
+ }
+
+ if (!active_service || app_service.default_service || (mobile_service && app && app->IsFullscreen())) {
ActivateAppService(service_id);
}
diff --git a/src/components/application_manager/src/hmi_interfaces_impl.cc b/src/components/application_manager/src/hmi_interfaces_impl.cc
index 9aff403e09..fc2a81b2db 100644
--- a/src/components/application_manager/src/hmi_interfaces_impl.cc
+++ b/src/components/application_manager/src/hmi_interfaces_impl.cc
@@ -231,6 +231,8 @@ generate_function_to_interface_convert_map() {
convert_map[RC_OnRemoteControlSettings] = HmiInterfaces::HMI_INTERFACE_RC;
convert_map[AppService_PublishAppService] =
HmiInterfaces::HMI_INTERFACE_AppService;
+ convert_map[AppService_UnpublishAppService] =
+ HmiInterfaces::HMI_INTERFACE_AppService;
convert_map[AppService_GetAppServiceData] =
HmiInterfaces::HMI_INTERFACE_AppService;
convert_map[AppService_PerformAppServiceInteraction] =
diff --git a/src/components/interfaces/HMI_API.xml b/src/components/interfaces/HMI_API.xml
index a69d2f05c8..5730039fdb 100644
--- a/src/components/interfaces/HMI_API.xml
+++ b/src/components/interfaces/HMI_API.xml
@@ -6341,6 +6341,18 @@
</param>
</function>
+ <function name="UnpublishAppService" messagetype="request">
+ <description>Unpublish an existing service published by this application.</description>
+
+ <param name="serviceID" type="String" mandatory="true">
+ <description> The ID of the service to be unpublished. </description>
+ </param>
+ </function>
+
+ <function name="UnpublishAppService" messagetype="response">
+ <description>The response to UnpublishAppService</description>
+ </function>
+
<function name="OnAppServiceData" messagetype="notification">
<description>This notification includes the data that is updated from the specific service. HMI->SDL if the HMI is a producer, SDL->HMI if the HMI is a consumer</description>
diff --git a/src/components/interfaces/MOBILE_API.xml b/src/components/interfaces/MOBILE_API.xml
index a2cdb88b4d..28f8c41d35 100644
--- a/src/components/interfaces/MOBILE_API.xml
+++ b/src/components/interfaces/MOBILE_API.xml
@@ -2645,6 +2645,7 @@
<element name="GetAppServiceDataID" value="53" hexvalue="35" since="5.1" />
<element name="GetFileID" value="54" hexvalue="36" since="5.1" />
<element name="PerformAppServiceInteractionID" value="55" hexvalue="37" since="5.1" />
+ <element name="UnpublishAppServiceID" value="56" hexvalue="38" since="5.2" />
<!--
Base Notifications
@@ -7201,10 +7202,16 @@
</function>
<function name="PublishAppService" functionID="PublishAppServiceID" messagetype="request" since="5.1">
- <description>Registers a service offered by this app on the module</description>
+ <description>
+ Registers a service offered by this app on the module.
+ Subsequent calls with the same service type will update the manifest for that service.
+ </description>
<param name="appServiceManifest" type="AppServiceManifest" mandatory="true">
- <description> The manifest of the service that wishes to be published.</description>
+ <description>
+ The manifest of the service that wishes to be published.
+ If already published, the updated manifest for this service.
+ </description>
</param>
</function>
@@ -7236,6 +7243,38 @@
</param>
</function>
+ <function name="UnpublishAppService" functionID="UnpublishAppServiceID" messagetype="request" since="5.2">
+ <description> Unpublish an existing service published by this application. </description>
+
+ <param name="serviceID" type="String" mandatory="true">
+ <description> The ID of the service to be unpublished. </description>
+ </param>
+ </function>
+
+ <function name="UnpublishAppService" functionID="UnpublishAppServiceID" messagetype="response" since="5.2">
+ <description> The response to UnpublishAppService </description>
+ <param name="success" type="Boolean" platform="documentation" mandatory="true">
+ <description> true, if successful; false, if failed </description>
+ </param>
+
+ <param name="resultCode" type="Result" platform="documentation" mandatory="true">
+ <description>See Result</description>
+ <element name="SUCCESS"/>
+ <element name="REJECTED"/>
+ <element name="DISALLOWED"/>
+ <element name="INVALID_DATA"/>
+ <element name="INVALID_ID"/>
+ <element name="OUT_OF_MEMORY"/>
+ <element name="TOO_MANY_PENDING_REQUESTS"/>
+ <element name="APPLICATION_NOT_REGISTERED"/>
+ <element name="GENERIC_ERROR"/>
+ </param>
+
+ <param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
+ <description>Provides additional human readable info regarding the result.</description>
+ </param>
+ </function>
+
<function name="GetAppServiceData" functionID="GetAppServiceDataID" messagetype="request" since="5.1">
<description> This request asks the module for current data related to the specific service. It also includes an option to subscribe to that service for future updates</description>
diff --git a/src/components/policy/policy_external/include/policy/policy_table/enums.h b/src/components/policy/policy_external/include/policy/policy_table/enums.h
index 28b0caf95b..05eed535f7 100644
--- a/src/components/policy/policy_external/include/policy/policy_table/enums.h
+++ b/src/components/policy/policy_external/include/policy/policy_table/enums.h
@@ -472,6 +472,11 @@ enum FunctionID {
PerformAppServiceInteractionID = 55,
/**
+ * @brief UnpublishAppServiceID.
+ */
+ UnpublishAppServiceID = 56,
+
+ /**
* @brief OnHMIStatusID.
*/
OnHMIStatusID = 32768,
diff --git a/src/components/policy/policy_external/src/policy_table/enums.cc b/src/components/policy/policy_external/src/policy_table/enums.cc
index bb25623b35..4717ea7d6e 100644
--- a/src/components/policy/policy_external/src/policy_table/enums.cc
+++ b/src/components/policy/policy_external/src/policy_table/enums.cc
@@ -1159,6 +1159,11 @@ bool EnumFromJsonString(const std::string& literal, FunctionID* result) {
return true;
}
+ if ("UnpublishAppService" == literal) {
+ *result = PublishAppServiceID;
+ return true;
+ }
+
if ("OnHMIStatus" == literal) {
*result = OnHMIStatusID;
return true;
diff --git a/src/components/policy/policy_regular/include/policy/policy_table/enums.h b/src/components/policy/policy_regular/include/policy/policy_table/enums.h
index 679950277d..4093726821 100644
--- a/src/components/policy/policy_regular/include/policy/policy_table/enums.h
+++ b/src/components/policy/policy_regular/include/policy/policy_table/enums.h
@@ -457,6 +457,11 @@ enum FunctionID {
PerformAppServiceInteractionID = 55,
/**
+ * @brief UnpublishAppServiceID.
+ */
+ UnpublishAppServiceID = 56,
+
+ /**
* @brief OnHMIStatusID.
*/
OnHMIStatusID = 32768,
diff --git a/src/components/policy/policy_regular/src/policy_table/enums.cc b/src/components/policy/policy_regular/src/policy_table/enums.cc
index 421ccacded..ce698aa56f 100644
--- a/src/components/policy/policy_regular/src/policy_table/enums.cc
+++ b/src/components/policy/policy_regular/src/policy_table/enums.cc
@@ -859,6 +859,8 @@ bool IsValidEnum(FunctionID val) {
return true;
case PerformAppServiceInteractionID:
return true;
+ case UnpublishAppServiceID:
+ return true;
case OnHMIStatusID:
return true;
case OnAppInterfaceUnregisteredID:
@@ -1022,6 +1024,8 @@ const char* EnumToJsonString(FunctionID val) {
return "GetAppServiceData";
case PerformAppServiceInteractionID:
return "PerformAppServiceInteraction";
+ case UnpublishAppServiceID:
+ return "UnpublishAppService";
case OnHMIStatusID:
return "OnHMIStatus";
case OnAppInterfaceUnregisteredID:
@@ -1346,6 +1350,11 @@ bool EnumFromJsonString(const std::string& literal, FunctionID* result) {
return true;
}
+ if ("UnpublishAppService" == literal) {
+ *result = UnpublishAppServiceID;
+ return true;
+ }
+
if ("OnHMIStatus" == literal) {
*result = OnHMIStatusID;
return true;