summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjacobkeeler <jacob.keeler@livioradio.com>2019-02-18 13:51:54 -0500
committerjacobkeeler <jacob.keeler@livioradio.com>2019-02-18 13:51:54 -0500
commit1660c7950143cf1b79b8e5b1fabd2d18ad95af6f (patch)
treed27693cbabdfc145639616b9f9106035fbee0735 /src
parentcc8cd684d68306a3c09436a6ae8ab7ec70df1a94 (diff)
downloadsdl_core-1660c7950143cf1b79b8e5b1fabd2d18ad95af6f.tar.gz
Update AppServiceType usage in RPC spec after revisions
Diffstat (limited to 'src')
-rw-r--r--src/components/application_manager/src/app_service_manager.cc16
-rw-r--r--src/components/interfaces/HMI_API.xml4
-rw-r--r--src/components/interfaces/MOBILE_API.xml4
3 files changed, 12 insertions, 12 deletions
diff --git a/src/components/application_manager/src/app_service_manager.cc b/src/components/application_manager/src/app_service_manager.cc
index c52e6a12f1..8fea64b228 100644
--- a/src/components/application_manager/src/app_service_manager.cc
+++ b/src/components/application_manager/src/app_service_manager.cc
@@ -35,21 +35,17 @@
#include <algorithm>
#include <iterator>
+#include "application_manager/app_service_manager.h"
#include "application_manager/application.h"
#include "application_manager/application_manager.h"
#include "application_manager/commands/command_impl.h"
#include "application_manager/message_helper.h"
#include "application_manager/smart_object_keys.h"
-#include "smart_objects/smart_object.h"
-#include "utils/logger.h"
#include "encryption/hashing.h"
+#include "utils/logger.h"
CREATE_LOGGERPTR_GLOBAL(logger_, "AppServiceManager")
-namespace {
-const size_t kLimitCommand = 30;
-}
-
namespace application_manager {
AppServiceManager::AppServiceManager(ApplicationManager& app_manager)
@@ -63,6 +59,7 @@ smart_objects::SmartObject AppServiceManager::PublishAppService(
const smart_objects::SmartObject& manifest,
const bool mobile_service,
const uint32_t connection_key) {
+ LOG4CXX_AUTO_TRACE(logger_);
std::string str_to_hash = "";
std::string service_id = "";
@@ -109,10 +106,12 @@ std::vector<smart_objects::SmartObject> AppServiceManager::GetAllServices() {
std::pair<std::string, AppService> AppServiceManager::ActiveServiceByType(
std::string service_type) {
+ LOG4CXX_AUTO_TRACE(logger_);
for (auto it = published_services_.begin(); it != published_services_.end();
++it) {
- if (it->second.record[strings::app_service_manifest][strings::service_type]
+ if (it->second.record[strings::service_manifest][strings::service_type]
.asString() == service_type &&
+ it->second.record[strings::service_published].asBool() &&
it->second.record[strings::service_active].asBool()) {
return *it;
}
@@ -123,9 +122,10 @@ std::pair<std::string, AppService> AppServiceManager::ActiveServiceByType(
std::pair<std::string, AppService> AppServiceManager::FindServiceByName(
std::string name) {
+ LOG4CXX_AUTO_TRACE(logger_);
for (auto it = published_services_.begin(); it != published_services_.end();
++it) {
- if (it->second.record[strings::app_service_manifest][strings::service_name]
+ if (it->second.record[strings::service_manifest][strings::service_name]
.asString() == name) {
return *it;
}
diff --git a/src/components/interfaces/HMI_API.xml b/src/components/interfaces/HMI_API.xml
index 2a9be1954b..adef6a87cc 100644
--- a/src/components/interfaces/HMI_API.xml
+++ b/src/components/interfaces/HMI_API.xml
@@ -3572,7 +3572,7 @@
<description> Unique name of this service </description>
</param>
- <param name="serviceType" type="Common.AppServiceType" mandatory="true">
+ <param name="serviceType" type="String" mandatory="true">
<description> The type of service that is to be offered by this app </description>
</param>
@@ -3627,7 +3627,7 @@
<struct name="AppServiceData">
<description> Contains all the current data of the app service. The serviceType will link to which of the service data objects are included in this object. (eg if service type equals MEDIA, the mediaServiceData param should be included.</description>
- <param name="serviceType" type="Common.AppServiceType" mandatory="true"/>
+ <param name="serviceType" type="String" mandatory="true"/>
<param name="serviceID" type="String" mandatory="true"/>
<param name="mediaServiceData" type="Common.MediaServiceData" mandatory="false"/>
diff --git a/src/components/interfaces/MOBILE_API.xml b/src/components/interfaces/MOBILE_API.xml
index 65a88ac22a..4d9bfbf09d 100644
--- a/src/components/interfaces/MOBILE_API.xml
+++ b/src/components/interfaces/MOBILE_API.xml
@@ -3911,7 +3911,7 @@
<description> Unique name of this service</description>
</param>
- <param name="serviceType" type="AppServiceType" mandatory="true">
+ <param name="serviceType" type="String" mandatory="true">
<description>The type of service that is to be offered by this app</description>
</param>
@@ -3966,7 +3966,7 @@
<struct name="AppServiceData" since="5.1">
<description> Contains all the current data of the app service. The serviceType will link to which of the service data objects are included in this object. (eg if service type equals MEDIA, the mediaServiceData param should be included.</description>
- <param name="serviceType" type="AppServiceType" mandatory="true"/>
+ <param name="serviceType" type="String" mandatory="true"/>
<param name="serviceID" type="String" mandatory="true"/>
<param name="mediaServiceData" type="MediaServiceData" mandatory="false"/>