summaryrefslogtreecommitdiff
path: root/src/components/application_manager/include/application_manager/app_service_manager.h
diff options
context:
space:
mode:
authorjacobkeeler <jacob.keeler@livioradio.com>2019-04-23 13:37:17 -0400
committerjacobkeeler <jacob.keeler@livioradio.com>2019-04-23 13:39:15 -0400
commit471b4131195a0c9c653d087056bdb6825634739c (patch)
tree09a64a96fcf5becf93baa6d1aea6703b924d8ea4 /src/components/application_manager/include/application_manager/app_service_manager.h
parent4e09fc9eabcfccb1a7cc6f13c34a1028d4abc75f (diff)
downloadsdl_core-471b4131195a0c9c653d087056bdb6825634739c.tar.gz
Prevent apps from publishing several services of the same type
Diffstat (limited to 'src/components/application_manager/include/application_manager/app_service_manager.h')
-rw-r--r--src/components/application_manager/include/application_manager/app_service_manager.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/components/application_manager/include/application_manager/app_service_manager.h b/src/components/application_manager/include/application_manager/app_service_manager.h
index 9690d7cd46..9f096af536 100644
--- a/src/components/application_manager/include/application_manager/app_service_manager.h
+++ b/src/components/application_manager/include/application_manager/app_service_manager.h
@@ -81,7 +81,8 @@ class AppServiceManager {
* app. False, if published by the embedded system.
* @param connection_key - If mobile_service is true, the connection key of
* the app publishing this service.
- * @return The app service record of the published app service
+ * @return The app service record of the published app service on success, a
+ * Null SmartObject value on failure
*/
virtual smart_objects::SmartObject PublishAppService(
const smart_objects::SmartObject& manifest,
@@ -197,7 +198,7 @@ class AppServiceManager {
/**
* @brief Get the service with a given service ID.
- * @param service_type - The service ID
+ * @param service_id - The service ID
* @return A pointer to requested service on success, NULL on failure
*/
virtual AppService* FindServiceByID(const std::string service_id);
@@ -247,6 +248,15 @@ class AppServiceManager {
std::string DefaultServiceByType(const std::string service_type);
AppService* FindServiceByPolicyAppID(const std::string policy_app_id,
const std::string type);
+
+ /**
+ * @brief Get the service of a given type published by a given provider.
+ * @param connection_key - The connection key of the service provider
+ * @param service_type - The service ID
+ * @return A pointer to requested service on success, NULL on failure
+ */
+ virtual AppService* FindServiceByProvider(const uint32_t connection_key,
+ const std::string service_type);
std::string GetPolicyAppID(AppService service);
};