summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJackLivio <jack@livio.io>2019-03-01 16:28:38 -0500
committerGitHub <noreply@github.com>2019-03-01 16:28:38 -0500
commitba7bd475d6099d8a1f3d4c9b2de9317070c84718 (patch)
treebdb29a66102e990ba8c66b1e23d5a5d114108fd9
parenteba1f131162fdcb2be3164d98c39eab56d37b7dc (diff)
downloadsdl_core-ba7bd475d6099d8a1f3d4c9b2de9317070c84718.tar.gz
Remove URI Scheme and URI Prefix (#2828)
* Remove URI Scheme and URI Prefix * Remove ValidateManifest() * Style
-rw-r--r--src/components/application_manager/include/application_manager/smart_object_keys.h2
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/commands/hmi/as_publish_app_service_request.h2
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/commands/mobile/publish_app_service_request.h2
-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.cc18
-rw-r--r--src/components/application_manager/src/smart_object_keys.cc2
-rw-r--r--src/components/interfaces/HMI_API.xml8
-rw-r--r--src/components/interfaces/MOBILE_API.xml8
8 files changed, 0 insertions, 62 deletions
diff --git a/src/components/application_manager/include/application_manager/smart_object_keys.h b/src/components/application_manager/include/application_manager/smart_object_keys.h
index 78f336fb64..5054536883 100644
--- a/src/components/application_manager/include/application_manager/smart_object_keys.h
+++ b/src/components/application_manager/include/application_manager/smart_object_keys.h
@@ -308,8 +308,6 @@ extern const char* service_name;
extern const char* service_type;
extern const char* service_icon;
extern const char* allow_app_consumers;
-extern const char* uri_prefix;
-extern const char* uri_scheme;
extern const char* rpc_spec_version;
extern const char* handled_rpcs;
extern const char* media_service_manifest;
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/commands/hmi/as_publish_app_service_request.h b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/commands/hmi/as_publish_app_service_request.h
index ec2c00a714..4433444602 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/commands/hmi/as_publish_app_service_request.h
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/commands/hmi/as_publish_app_service_request.h
@@ -69,8 +69,6 @@ class ASPublishAppServiceRequest : public app_mngr::commands::RequestFromHMI {
virtual void Run();
private:
- bool ValidateManifest(smart_objects::SmartObject& manifest);
-
DISALLOW_COPY_AND_ASSIGN(ASPublishAppServiceRequest);
};
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/commands/mobile/publish_app_service_request.h b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/commands/mobile/publish_app_service_request.h
index 72e4f1c629..d70f279658 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/commands/mobile/publish_app_service_request.h
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/commands/mobile/publish_app_service_request.h
@@ -68,8 +68,6 @@ class PublishAppServiceRequest : public app_mngr::commands::CommandRequestImpl {
virtual void Run();
private:
- bool ValidateManifest(smart_objects::SmartObject& manifest);
-
DISALLOW_COPY_AND_ASSIGN(PublishAppServiceRequest);
};
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 5e20ca20d1..b816016fa7 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
@@ -51,23 +51,6 @@ ASPublishAppServiceRequest::ASPublishAppServiceRequest(
ASPublishAppServiceRequest::~ASPublishAppServiceRequest() {}
-bool ASPublishAppServiceRequest::ValidateManifest(
- smart_objects::SmartObject& manifest) {
- if (manifest.keyExists(strings::uri_scheme)) {
- Json::Value value;
- Json::Reader reader;
- if (!reader.parse(manifest[strings::uri_scheme].asString(), value)) {
- SendResponse(
- false,
- (*message_)[strings::params][strings::correlation_id].asUInt(),
- hmi_apis::FunctionID::AppService_PublishAppService,
- hmi_apis::Common_Result::INVALID_DATA);
- return false;
- }
- }
- return true;
-}
-
void ASPublishAppServiceRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
LOG4CXX_DEBUG(logger_, "Received a PublishAppService request from HMI");
@@ -75,9 +58,6 @@ void ASPublishAppServiceRequest::Run() {
smart_objects::SmartObject(smart_objects::SmartType_Map);
smart_objects::SmartObject manifest =
(*message_)[strings::msg_params][strings::app_service_manifest];
- if (!ValidateManifest(manifest)) {
- return;
- }
smart_objects::SmartObject service_record =
application_manager_.GetAppServiceManager().PublishAppService(
manifest, false, UINT32_MAX);
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 05210208ca..22d8e50c3a 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
@@ -55,21 +55,6 @@ PublishAppServiceRequest::PublishAppServiceRequest(
PublishAppServiceRequest::~PublishAppServiceRequest() {}
-bool PublishAppServiceRequest::ValidateManifest(
- smart_objects::SmartObject& manifest) {
- if (manifest.keyExists(strings::uri_scheme)) {
- Json::Value value;
- Json::Reader reader;
- if (!reader.parse(manifest[strings::uri_scheme].asString(), value)) {
- SendResponse(false,
- mobile_apis::Result::INVALID_DATA,
- "Provided uriScheme was not valid JSON");
- return false;
- }
- }
- return true;
-}
-
void PublishAppServiceRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
LOG4CXX_DEBUG(logger_, "Received a PublishAppService " << connection_key());
@@ -79,9 +64,6 @@ void PublishAppServiceRequest::Run() {
smart_objects::SmartObject(smart_objects::SmartType_Map);
smart_objects::SmartObject manifest =
(*message_)[strings::msg_params][strings::app_service_manifest];
- if (!ValidateManifest(manifest)) {
- return;
- }
ApplicationSharedPtr app = application_manager_.application(connection_key());
diff --git a/src/components/application_manager/src/smart_object_keys.cc b/src/components/application_manager/src/smart_object_keys.cc
index 45829a4d2a..09e0ccf38b 100644
--- a/src/components/application_manager/src/smart_object_keys.cc
+++ b/src/components/application_manager/src/smart_object_keys.cc
@@ -275,8 +275,6 @@ const char* service_name = "serviceName";
const char* service_type = "serviceType";
const char* service_icon = "serviceIcon";
const char* allow_app_consumers = "allowAppConsumers";
-const char* uri_prefix = "uriPrefix";
-const char* uri_scheme = "uriScheme";
const char* rpc_spec_version = "rpcSpecVersion";
const char* handled_rpcs = "handledRPCs";
const char* media_service_manifest = "mediaServiceManifest";
diff --git a/src/components/interfaces/HMI_API.xml b/src/components/interfaces/HMI_API.xml
index 5cd755ccef..6a7cb8c3d4 100644
--- a/src/components/interfaces/HMI_API.xml
+++ b/src/components/interfaces/HMI_API.xml
@@ -3680,14 +3680,6 @@
<description> If true, app service consumers beyond the IVI system will be able to access this service. If false, only the IVI system will be able consume the service. If not provided, it is assumed to be false. </description>
</param>
- <param name="uriPrefix" type="String" mandatory="false">
- <description> The URI prefix for this service. If provided, all PerformAppServiceInteraction requests must start with it. </description>
- </param>
-
- <param name="uriScheme" type="String" mandatory="false">
- <description> This is a custom schema for this service. SDL will not do any verification on this param past that it has a correctly formated JSON Object as its base. The uriScheme should contain all available actions to be taken through a PerformAppServiceInteraction request from an app service consumer. </description>
- </param>
-
<param name="rpcSpecVersion" type="Common.SyncMsgVersion" mandatory="false">
<description> This is the max RPC Spec version the app service understands. This is important during the RPC passthrough functionality. If not included, it is assumed the max version of the module is acceptable. </description>
</param>
diff --git a/src/components/interfaces/MOBILE_API.xml b/src/components/interfaces/MOBILE_API.xml
index 39796f4e72..5a4b8c5482 100644
--- a/src/components/interfaces/MOBILE_API.xml
+++ b/src/components/interfaces/MOBILE_API.xml
@@ -4014,14 +4014,6 @@
<description> If true, app service consumers beyond the IVI system will be able to access this service. If false, only the IVI system will be able consume the service. If not provided, it is assumed to be false. </description>
</param>
- <param name="uriPrefix" type="String" mandatory="false">
- <description> The URI prefix for this service. If provided, all PerformAppServiceInteraction requests must start with it. </description>
- </param>
-
- <param name="uriScheme" type="String" mandatory="false">
- <description> This is a custom schema for this service. SDL will not do any verification on this param past that it has a correctly formated JSON Object as its base. The uriScheme should contain all available actions to be taken through a PerformAppServiceInteraction request from an app service consumer. </description>
- </param>
-
<param name="rpcSpecVersion" type="SyncMsgVersion" mandatory="false">
<description> This is the max RPC Spec version the app service understands. This is important during the RPC passthrough functionality. If not included, it is assumed the max version of the module is acceptable. </description>
</param>