summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJackLivio <jack@livio.io>2019-02-19 14:41:45 -0500
committerJackLivio <jack@livio.io>2019-02-19 14:41:45 -0500
commit2119d3fea64e2c7ea7b0600703907dd2d15652e7 (patch)
tree46e277e9d32396647bf63b510e22cf9833decfd1
parent6875de18acfa7a65e5693477624395d1509d36a8 (diff)
parent1660c7950143cf1b79b8e5b1fabd2d18ad95af6f (diff)
downloadsdl_core-2119d3fea64e2c7ea7b0600703907dd2d15652e7.tar.gz
Merge remote-tracking branch 'origin/feature/base_app_services_implementation' into feature/app_service_policies
-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 5cb46f968f..3a01ce1303 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 = "";
@@ -108,10 +105,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;
}
@@ -122,9 +121,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"/>