diff options
Diffstat (limited to 'src/components/policy/policy_external/src/policy_table/types.cc')
-rw-r--r-- | src/components/policy/policy_external/src/policy_table/types.cc | 30 |
1 files changed, 28 insertions, 2 deletions
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 528d70a426..e66b2cb561 100644 --- a/src/components/policy/policy_external/src/policy_table/types.cc +++ b/src/components/policy/policy_external/src/policy_table/types.cc @@ -239,8 +239,12 @@ ApplicationParams::ApplicationParams(const Json::Value* value__) , AppHMIType(impl::ValueMember(value__, "AppHMIType")) , RequestType(impl::ValueMember(value__, "RequestType")) , memory_kb(impl::ValueMember(value__, "memory_kb"), 0) - , heart_beat_timeout_ms( - impl::ValueMember(value__, "heart_beat_timeout_ms")) {} + , heart_beat_timeout_ms(impl::ValueMember(value__, "heart_beat_timeout_ms")) +#ifdef SDL_REMOTE_CONTROL + , moduleType(impl::ValueMember(value__, "moduleType")) +#endif // SDL_REMOTE_CONTROL +{ +} Json::Value ApplicationParams::ToJsonValue() const { Json::Value result__(PolicyBase::ToJsonValue()); @@ -250,6 +254,9 @@ Json::Value ApplicationParams::ToJsonValue() const { impl::WriteJsonField("memory_kb", memory_kb, &result__); impl::WriteJsonField( "heart_beat_timeout_ms", heart_beat_timeout_ms, &result__); +#ifdef SDL_REMOTE_CONTROL + impl::WriteJsonField("moduleType", moduleType, &result__); +#endif // SDL_REMOTE_CONTROL return result__; } @@ -271,6 +278,11 @@ bool ApplicationParams::is_valid() const { if (!heart_beat_timeout_ms.is_valid()) { return false; } +#ifdef SDL_REMOTE_CONTROL + if (!moduleType.is_valid()) { + return false; + } +#endif // SDL_REMOTE_CONTROL return Validate(); } @@ -297,6 +309,11 @@ bool ApplicationParams::struct_empty() const { if (heart_beat_timeout_ms.is_initialized()) { return false; } +#ifdef SDL_REMOTE_CONTROL + if (moduleType.is_initialized()) { + return false; + } +#endif // SDL_REMOTE_CONTROL return true; } @@ -339,6 +356,12 @@ void ApplicationParams::ReportErrors(rpc::ValidationReport* report__) const { heart_beat_timeout_ms.ReportErrors( &report__->ReportSubobject("heart_beat_timeout_ms")); } + +#ifdef SDL_REMOTE_CONTROL + if (!moduleType.is_valid()) { + moduleType.ReportErrors(&report__->ReportSubobject("moduleType")); + } +#endif // SDL_REMOTE_CONTROL } void ApplicationParams::SetPolicyTableType(PolicyTableType pt_type) { @@ -347,6 +370,9 @@ void ApplicationParams::SetPolicyTableType(PolicyTableType pt_type) { RequestType.SetPolicyTableType(pt_type); memory_kb.SetPolicyTableType(pt_type); heart_beat_timeout_ms.SetPolicyTableType(pt_type); +#ifdef SDL_REMOTE_CONTROL + moduleType.SetPolicyTableType(pt_type); +#endif // SDL_REMOTE_CONTROL } // RpcParameters methods |