summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJackLivio <jack@livio.io>2019-01-29 15:28:27 -0500
committerJackLivio <jack@livio.io>2019-01-29 15:28:27 -0500
commit2f5fe1b89dc6d15fb9bb2e42083db23edf3de276 (patch)
tree11c715af4a6e8d6acf323ba7b5981e7513df3a1a
parentbfcae5a747ff5f72de9132c2e992e1bbaa7a23dc (diff)
downloadsdl_core-2f5fe1b89dc6d15fb9bb2e42083db23edf3de276.tar.gz
Fix style
-rw-r--r--src/components/application_manager/include/application_manager/policies/policy_handler.h14
-rw-r--r--src/components/include/application_manager/policies/policy_handler_interface.h12
-rw-r--r--src/components/include/policy/policy_external/policy/policy_manager.h7
-rw-r--r--src/components/include/policy/policy_regular/policy/policy_manager.h3
-rw-r--r--src/components/policy/policy_external/include/policy/cache_manager.h7
-rw-r--r--src/components/policy/policy_external/include/policy/cache_manager_interface.h7
-rw-r--r--src/components/policy/policy_external/include/policy/policy_manager_impl.h7
-rw-r--r--src/components/policy/policy_external/include/policy/policy_table/types.h2
-rw-r--r--src/components/policy/policy_external/include/policy/sql_pt_representation.h8
-rw-r--r--src/components/policy/policy_external/src/policy_table/types.cc8
-rw-r--r--src/components/policy/policy_external/src/sql_pt_ext_queries.cc7
-rw-r--r--src/components/policy/policy_external/src/sql_pt_ext_representation.cc7
-rw-r--r--src/components/policy/policy_external/src/sql_pt_queries.cc3
-rw-r--r--src/components/policy/policy_external/src/sql_pt_representation.cc15
-rw-r--r--src/components/policy/policy_regular/include/policy/cache_manager.h3
-rw-r--r--src/components/policy/policy_regular/include/policy/cache_manager_interface.h3
-rw-r--r--src/components/policy/policy_regular/include/policy/policy_manager_impl.h3
-rw-r--r--src/components/policy/policy_regular/src/policy_table/types.cc9
18 files changed, 66 insertions, 59 deletions
diff --git a/src/components/application_manager/include/application_manager/policies/policy_handler.h b/src/components/application_manager/include/application_manager/policies/policy_handler.h
index 65432d3741..df96ade313 100644
--- a/src/components/application_manager/include/application_manager/policies/policy_handler.h
+++ b/src/components/application_manager/include/application_manager/policies/policy_handler.h
@@ -446,11 +446,12 @@ class PolicyHandler : public PolicyHandlerInterface,
*/
void OnSetCloudAppProperties(
const smart_objects::SmartObject& message) OVERRIDE;
-
+
/**
* @brief Get app service parameters from the policy table
* @param policy_app_id Unique application id
- * @param app_service_parameters Pointer to struct containing all app service information
+ * @param app_service_parameters Pointer to struct containing all app service
+ * information
*/
void GetAppServiceParameters(const std::string& policy_app_id,
policy_table::AppServiceParameters*
@@ -458,9 +459,12 @@ class PolicyHandler : public PolicyHandlerInterface,
/**
* @brief Check app service parameters from an app against policies
* @param policy_app_id Unique application id
- * @param requested_service_name Service name published by app service provider
- * @param requested_service_type Service type published by app service provider
- * @param requested_handled_rpcs Vector of requested function ids an app service wants to handle from consumers
+ * @param requested_service_name Service name published by app service
+ * provider
+ * @param requested_service_type Service type published by app service
+ * provider
+ * @param requested_handled_rpcs Vector of requested function ids an app
+ * service wants to handle from consumers
*/
bool CheckAppServiceParameters(
const std::string& policy_app_id,
diff --git a/src/components/include/application_manager/policies/policy_handler_interface.h b/src/components/include/application_manager/policies/policy_handler_interface.h
index bfd956c4f2..64f0b893b2 100644
--- a/src/components/include/application_manager/policies/policy_handler_interface.h
+++ b/src/components/include/application_manager/policies/policy_handler_interface.h
@@ -491,7 +491,8 @@ class PolicyHandlerInterface {
/**
* @brief Get app service parameters from the policy table
* @param policy_app_id Unique application id
- * @param app_service_parameters Pointer to struct containing all app service information
+ * @param app_service_parameters Pointer to struct containing all app service
+ * information
*/
virtual void GetAppServiceParameters(
const std::string& policy_app_id,
@@ -500,9 +501,12 @@ class PolicyHandlerInterface {
/**
* @brief Check app service parameters from an app against policies
* @param policy_app_id Unique application id
- * @param requested_service_name Service name published by app service provider
- * @param requested_service_type Service type published by app service provider
- * @param requested_handled_rpcs Vector of requested function ids an app service wants to handle from consumers
+ * @param requested_service_name Service name published by app service
+ * provider
+ * @param requested_service_type Service type published by app service
+ * provider
+ * @param requested_handled_rpcs Vector of requested function ids an app
+ * service wants to handle from consumers
*/
virtual bool CheckAppServiceParameters(
const std::string& policy_app_id,
diff --git a/src/components/include/policy/policy_external/policy/policy_manager.h b/src/components/include/policy/policy_external/policy/policy_manager.h
index ec659bd1b1..e7aefe9f6c 100644
--- a/src/components/include/policy/policy_external/policy/policy_manager.h
+++ b/src/components/include/policy/policy_external/policy/policy_manager.h
@@ -595,11 +595,12 @@ class PolicyManager : public usage_statistics::StatisticsManager {
/**
* @brief Get app service parameters from the policy table
* @param policy_app_id Unique application id
- * @param app_service_parameters Pointer to struct containing all app service information
+ * @param app_service_parameters Pointer to struct containing all app service
+ * information
*/
virtual void GetAppServiceParameters(
- const std::string& policy_app_id,
- policy_table::AppServiceParameters* app_service_parameters) const = 0;
+ const std::string& policy_app_id,
+ policy_table::AppServiceParameters* app_service_parameters) const = 0;
/**
* @brief Gets meta information
diff --git a/src/components/include/policy/policy_regular/policy/policy_manager.h b/src/components/include/policy/policy_regular/policy/policy_manager.h
index b544b9d346..e4ee95fda0 100644
--- a/src/components/include/policy/policy_regular/policy/policy_manager.h
+++ b/src/components/include/policy/policy_regular/policy/policy_manager.h
@@ -576,7 +576,8 @@ class PolicyManager : public usage_statistics::StatisticsManager {
/**
* @brief Get app service parameters from the policy table
* @param policy_app_id Unique application id
- * @param app_service_parameters Pointer to struct containing all app service information
+ * @param app_service_parameters Pointer to struct containing all app service
+ * information
*/
virtual void GetAppServiceParameters(
const std::string& policy_app_id,
diff --git a/src/components/policy/policy_external/include/policy/cache_manager.h b/src/components/policy/policy_external/include/policy/cache_manager.h
index d7094e19e5..3813b58ca3 100644
--- a/src/components/policy/policy_external/include/policy/cache_manager.h
+++ b/src/components/policy/policy_external/include/policy/cache_manager.h
@@ -231,11 +231,12 @@ class CacheManager : public CacheManagerInterface {
/**
* @brief Get app service parameters from the policy table
* @param policy_app_id Unique application id
- * @param app_service_parameters Pointer to struct containing all app service information
+ * @param app_service_parameters Pointer to struct containing all app service
+ * information
*/
virtual void GetAppServiceParameters(
- const std::string& policy_app_id,
- policy_table::AppServiceParameters* app_service_parameters) const;
+ const std::string& policy_app_id,
+ policy_table::AppServiceParameters* app_service_parameters) const;
/**
* @brief Allows to update 'vin' field in module_meta table.
diff --git a/src/components/policy/policy_external/include/policy/cache_manager_interface.h b/src/components/policy/policy_external/include/policy/cache_manager_interface.h
index 4a904c5829..21c8a947cc 100644
--- a/src/components/policy/policy_external/include/policy/cache_manager_interface.h
+++ b/src/components/policy/policy_external/include/policy/cache_manager_interface.h
@@ -240,11 +240,12 @@ class CacheManagerInterface {
/**
* @brief Get app service parameters from the policy table
* @param policy_app_id Unique application id
- * @param app_service_parameters Pointer to struct containing all app service information
+ * @param app_service_parameters Pointer to struct containing all app service
+ * information
*/
virtual void GetAppServiceParameters(
- const std::string& policy_app_id,
- policy_table::AppServiceParameters* app_service_parameters) const = 0;
+ const std::string& policy_app_id,
+ policy_table::AppServiceParameters* app_service_parameters) const = 0;
/**
* @brief Allows to update 'vin' field in module_meta table.
diff --git a/src/components/policy/policy_external/include/policy/policy_manager_impl.h b/src/components/policy/policy_external/include/policy/policy_manager_impl.h
index fe982ff59e..9cf067c0ec 100644
--- a/src/components/policy/policy_external/include/policy/policy_manager_impl.h
+++ b/src/components/policy/policy_external/include/policy/policy_manager_impl.h
@@ -642,11 +642,12 @@ class PolicyManagerImpl : public PolicyManager {
/**
* @brief Get app service parameters from the policy table
* @param policy_app_id Unique application id
- * @param app_service_parameters Pointer to struct containing all app service information
+ * @param app_service_parameters Pointer to struct containing all app service
+ * information
*/
void GetAppServiceParameters(const std::string& policy_app_id,
- policy_table::AppServiceParameters*
- app_service_parameters) const OVERRIDE;
+ policy_table::AppServiceParameters*
+ app_service_parameters) const OVERRIDE;
/**
* @brief OnAppRegisteredOnMobile allows to handle event when application were
diff --git a/src/components/policy/policy_external/include/policy/policy_table/types.h b/src/components/policy/policy_external/include/policy/policy_table/types.h
index e74091b8a3..f3d154dd9f 100644
--- a/src/components/policy/policy_external/include/policy/policy_table/types.h
+++ b/src/components/policy/policy_external/include/policy/policy_table/types.h
@@ -138,7 +138,7 @@ struct AppServiceHandledRpc : CompositeType {
private:
bool Validate() const;
};
-
+
struct AppServiceInfo : CompositeType {
public:
Optional<AppServiceNames> service_names;
diff --git a/src/components/policy/policy_external/include/policy/sql_pt_representation.h b/src/components/policy/policy_external/include/policy/sql_pt_representation.h
index 0d8e1c7ae9..581340ba02 100644
--- a/src/components/policy/policy_external/include/policy/sql_pt_representation.h
+++ b/src/components/policy/policy_external/include/policy/sql_pt_representation.h
@@ -135,8 +135,8 @@ class SQLPTRepresentation : public virtual PTRepresentation {
const std::string& app_id,
policy_table::RequestSubTypes* request_subtypes) const;
bool GatherAppServiceParameters(
- const std::string& app_id,
- policy_table::AppServiceParameters* app_service_parameters) const;
+ const std::string& app_id,
+ policy_table::AppServiceParameters* app_service_parameters) const;
bool GatherNickName(const std::string& app_id,
policy_table::Strings* nicknames) const;
@@ -176,8 +176,8 @@ class SQLPTRepresentation : public virtual PTRepresentation {
const std::string& app_id,
const policy_table::RequestSubTypes& request_subtypes);
bool SaveAppServiceParameters(
- const std::string& app_id,
- const policy_table::AppServiceParameters& app_service_parameters);
+ const std::string& app_id,
+ const policy_table::AppServiceParameters& app_service_parameters);
public:
virtual std::string GetLockScreenIconUrl() const;
diff --git a/src/components/policy/policy_external/src/policy_table/types.cc b/src/components/policy/policy_external/src/policy_table/types.cc
index fb17391332..db28b5b4fb 100644
--- a/src/components/policy/policy_external/src/policy_table/types.cc
+++ b/src/components/policy/policy_external/src/policy_table/types.cc
@@ -275,8 +275,7 @@ AppServiceInfo::~AppServiceInfo() {}
AppServiceInfo::AppServiceInfo(const Json::Value* value__)
: CompositeType(InitHelper(value__, &Json::Value::isObject))
, service_names(impl::ValueMember(value__, "service_names"))
- , handled_rpcs(impl::ValueMember(value__, "handled_rpcs")) {
-}
+ , handled_rpcs(impl::ValueMember(value__, "handled_rpcs")) {}
Json::Value AppServiceInfo::ToJsonValue() const {
Json::Value result__(Json::objectValue);
@@ -325,7 +324,6 @@ void AppServiceInfo::ReportErrors(rpc::ValidationReport* report__) const {
handled_rpcs.ReportErrors(&report__->ReportSubobject("handled_rpcs"));
}
}
-
// ApplicationParams methods
ApplicationParams::ApplicationParams() : PolicyBase() {}
@@ -417,8 +415,8 @@ bool ApplicationParams::is_valid() const {
return false;
}
if (!app_service_parameters.is_valid()) {
- return false;
- }
+ return false;
+ }
return Validate();
}
diff --git a/src/components/policy/policy_external/src/sql_pt_ext_queries.cc b/src/components/policy/policy_external/src/sql_pt_ext_queries.cc
index 25827c719b..32320b6d6c 100644
--- a/src/components/policy/policy_external/src/sql_pt_ext_queries.cc
+++ b/src/components/policy/policy_external/src/sql_pt_ext_queries.cc
@@ -207,8 +207,8 @@ const std::string kInsertApplication =
" `default_hmi`, `priority_value`, `is_revoked`, `memory_kb`, "
" `heart_beat_timeout_ms`, `certificate`, `hybrid_app_preference_value`, "
" `endpoint`, `enabled`, `auth_token`, "
- " `cloud_transport_type`, `service_name`, `service_type`) VALUES "
- "(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
+ " `cloud_transport_type`) VALUES "
+ "(?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
const std::string kCollectFriendlyMsg = "SELECT * FROM `message`";
@@ -237,8 +237,7 @@ const std::string kSelectAppPolicies =
"SELECT `id`, `priority_value`, `default_hmi`, `keep_context`, "
" `steal_focus`, `memory_kb`, `heart_beat_timeout_ms`, `certificate`, "
" `hybrid_app_preference_value`, `endpoint`, `enabled`, `auth_token` "
- " `cloud_transport_type`, `service_name`, `service_type` FROM "
- "`application`";
+ " `cloud_transport_type` FROM `application`";
const std::string kSelectFunctionalGroupNames =
"SELECT `id`, `user_consent_prompt`, `name`"
diff --git a/src/components/policy/policy_external/src/sql_pt_ext_representation.cc b/src/components/policy/policy_external/src/sql_pt_ext_representation.cc
index ce35b637a1..6e0da9e5de 100644
--- a/src/components/policy/policy_external/src/sql_pt_ext_representation.cc
+++ b/src/components/policy/policy_external/src/sql_pt_ext_representation.cc
@@ -689,7 +689,6 @@ bool SQLPTExtRepresentation::SaveApplicationPoliciesSection(
LOG4CXX_WARN(logger_, "Incorrect delete from handled service types.");
return false;
}
-
// First, all predefined apps (e.g. default, pre_DataConsent) should be saved,
// otherwise another app with the predefined permissions can get incorrect
@@ -746,9 +745,9 @@ bool SQLPTExtRepresentation::SaveSpecificAppPolicy(
return false;
}
if (!SaveAppServiceParameters(app.first,
- *app.second.app_service_parameters)) {
- return false;
- }
+ *app.second.app_service_parameters)) {
+ return false;
+ }
// Stop saving other params, since predefined permissions already set
return true;
}
diff --git a/src/components/policy/policy_external/src/sql_pt_queries.cc b/src/components/policy/policy_external/src/sql_pt_queries.cc
index 8190a6e4ca..51f4e4c13e 100644
--- a/src/components/policy/policy_external/src/sql_pt_queries.cc
+++ b/src/components/policy/policy_external/src/sql_pt_queries.cc
@@ -907,12 +907,11 @@ const std::string kDeleteRequestType = "DELETE FROM `request_type`";
const std::string kDeleteRequestSubType = "DELETE FROM `request_subtype`";
const std::string kDeleteAppServiceTypes = "DELETE FROM `app_service_types`";
-
+
const std::string kDeleteAppServiceNames = "DELETE FROM `app_service_names`";
const std::string kDeleteAppServiceHandledRpcs =
"DELETE FROM `app_service_handled_rpcs`";
-
const std::string kSelectApplicationRevoked =
"SELECT `is_revoked` FROM `application` WHERE `id` = ?";
diff --git a/src/components/policy/policy_external/src/sql_pt_representation.cc b/src/components/policy/policy_external/src/sql_pt_representation.cc
index 0897b11009..33dc98343b 100644
--- a/src/components/policy/policy_external/src/sql_pt_representation.cc
+++ b/src/components/policy/policy_external/src/sql_pt_representation.cc
@@ -810,7 +810,8 @@ bool SQLPTRepresentation::GatherApplicationPoliciesSection(
if (!GatherRequestSubType(gather_app_id, &*params.RequestSubType)) {
return false;
}
- if (!GatherAppServiceParameters(gather_app_id, &*params.app_service_parameters)) {
+ if (!GatherAppServiceParameters(gather_app_id,
+ &*params.app_service_parameters)) {
return false;
}
@@ -1304,7 +1305,7 @@ bool SQLPTRepresentation::SaveAppServiceParameters(
}
policy_table::AppServiceParameters::const_iterator it;
for (it = app_service_parameters.begin(); it != app_service_parameters.end();
- ++it) {
+ ++it) {
// Create service type id from hashing app_id and service_type
std::string str_to_hash = std::string(app_id + it->first);
const long int id = abs(CacheManager::GenerateHash(str_to_hash));
@@ -1326,8 +1327,8 @@ bool SQLPTRepresentation::SaveAppServiceParameters(
auto app_service_names = it->second.service_names;
policy_table::AppServiceNames::const_iterator names_it;
for (names_it = app_service_names->begin();
- names_it != app_service_names->end();
- ++names_it) {
+ names_it != app_service_names->end();
+ ++names_it) {
service_name_query.Bind(0, static_cast<int64_t>(id));
service_name_query.Bind(1, *names_it);
if (!service_name_query.Exec() || !service_name_query.Reset()) {
@@ -1340,14 +1341,14 @@ bool SQLPTRepresentation::SaveAppServiceParameters(
utils::dbms::SQLQuery handled_rpcs_query(db());
if (!handled_rpcs_query.Prepare(sql_pt::kInsertAppServiceHandledRpcs)) {
LOG4CXX_WARN(logger_,
- "Incorrect insert statement for app service handled rpcs");
+ "Incorrect insert statement for app service handled rpcs");
return false;
}
auto handled_rpcs = it->second.handled_rpcs;
policy_table::AppServiceHandledRpcs::const_iterator rpc_it;
for (rpc_it = handled_rpcs->begin(); rpc_it != handled_rpcs->end();
- ++rpc_it) {
+ ++rpc_it) {
handled_rpcs_query.Bind(0, static_cast<int64_t>(id));
handled_rpcs_query.Bind(1, static_cast<int32_t>(rpc_it->function_id));
if (!handled_rpcs_query.Exec() || !handled_rpcs_query.Reset()) {
@@ -1358,7 +1359,6 @@ bool SQLPTRepresentation::SaveAppServiceParameters(
}
return true;
}
-
bool SQLPTRepresentation::SaveModuleMeta(const policy_table::ModuleMeta& meta) {
// Section Module Meta is empty for SDL specific
@@ -1834,7 +1834,6 @@ bool SQLPTRepresentation::GatherAppServiceParameters(
return true;
}
-
bool SQLPTRepresentation::GatherNickName(
const std::string& app_id, policy_table::Strings* nicknames) const {
diff --git a/src/components/policy/policy_regular/include/policy/cache_manager.h b/src/components/policy/policy_regular/include/policy/cache_manager.h
index 71e056ee22..354a979287 100644
--- a/src/components/policy/policy_regular/include/policy/cache_manager.h
+++ b/src/components/policy/policy_regular/include/policy/cache_manager.h
@@ -219,7 +219,8 @@ class CacheManager : public CacheManagerInterface {
/**
* @brief Get app service parameters from the policy table
* @param policy_app_id Unique application id
- * @param app_service_parameters Pointer to struct containing all app service information
+ * @param app_service_parameters Pointer to struct containing all app service
+ * information
*/
virtual void GetAppServiceParameters(
const std::string& policy_app_id,
diff --git a/src/components/policy/policy_regular/include/policy/cache_manager_interface.h b/src/components/policy/policy_regular/include/policy/cache_manager_interface.h
index d4ba78c43b..639a9f9c18 100644
--- a/src/components/policy/policy_regular/include/policy/cache_manager_interface.h
+++ b/src/components/policy/policy_regular/include/policy/cache_manager_interface.h
@@ -226,7 +226,8 @@ class CacheManagerInterface {
/**
* @brief Get app service parameters from the policy table
* @param policy_app_id Unique application id
- * @param app_service_parameters Pointer to struct containing all app service information
+ * @param app_service_parameters Pointer to struct containing all app service
+ * information
*/
virtual void GetAppServiceParameters(
const std::string& policy_app_id,
diff --git a/src/components/policy/policy_regular/include/policy/policy_manager_impl.h b/src/components/policy/policy_regular/include/policy/policy_manager_impl.h
index f3b285cbff..4ed8903b00 100644
--- a/src/components/policy/policy_regular/include/policy/policy_manager_impl.h
+++ b/src/components/policy/policy_regular/include/policy/policy_manager_impl.h
@@ -637,7 +637,8 @@ class PolicyManagerImpl : public PolicyManager {
/**
* @brief Get app service parameters from the policy table
* @param policy_app_id Unique application id
- * @param app_service_parameters Pointer to struct containing all app service information
+ * @param app_service_parameters Pointer to struct containing all app service
+ * information
*/
void GetAppServiceParameters(const std::string& policy_app_id,
policy_table::AppServiceParameters*
diff --git a/src/components/policy/policy_regular/src/policy_table/types.cc b/src/components/policy/policy_regular/src/policy_table/types.cc
index 5269daccb6..5f7d2e57bf 100644
--- a/src/components/policy/policy_regular/src/policy_table/types.cc
+++ b/src/components/policy/policy_regular/src/policy_table/types.cc
@@ -203,8 +203,7 @@ AppServiceInfo::~AppServiceInfo() {}
AppServiceInfo::AppServiceInfo(const Json::Value* value__)
: CompositeType(InitHelper(value__, &Json::Value::isObject))
, service_names(impl::ValueMember(value__, "service_names"))
- , handled_rpcs(impl::ValueMember(value__, "handled_rpcs")) {
-}
+ , handled_rpcs(impl::ValueMember(value__, "handled_rpcs")) {}
Json::Value AppServiceInfo::ToJsonValue() const {
Json::Value result__(Json::objectValue);
@@ -278,8 +277,7 @@ ApplicationParams::ApplicationParams(const Json::Value* value__)
, enabled(impl::ValueMember(value__, "enabled"))
, auth_token(impl::ValueMember(value__, "auth_token"))
, cloud_transport_type(impl::ValueMember(value__, "cloud_transport_type"))
- , app_service_parameters(
- impl::ValueMember(value__, "app_services")) {}
+ , app_service_parameters(impl::ValueMember(value__, "app_services")) {}
Json::Value ApplicationParams::ToJsonValue() const {
Json::Value result__(PolicyBase::ToJsonValue());
@@ -299,8 +297,7 @@ Json::Value ApplicationParams::ToJsonValue() const {
impl::WriteJsonField("enabled", enabled, &result__);
impl::WriteJsonField("auth_token", auth_token, &result__);
impl::WriteJsonField("cloud_transport_type", cloud_transport_type, &result__);
- impl::WriteJsonField(
- "app_services", app_service_parameters, &result__);
+ impl::WriteJsonField("app_services", app_service_parameters, &result__);
return result__;
}