From 852ec29c4b7395e4316be60e85488607387d6123 Mon Sep 17 00:00:00 2001 From: JackLivio Date: Sun, 27 Jan 2019 17:53:10 -0500 Subject: Add HandledRPC struct to policies --- .../include/policy/policy_table/types.h | 26 ++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'src/components/policy/policy_regular/include/policy/policy_table/types.h') diff --git a/src/components/policy/policy_regular/include/policy/policy_table/types.h b/src/components/policy/policy_regular/include/policy/policy_table/types.h index 4b379ee7b6..b7522065bd 100644 --- a/src/components/policy/policy_regular/include/policy/policy_table/types.h +++ b/src/components/policy/policy_regular/include/policy/policy_table/types.h @@ -50,6 +50,7 @@ struct MessageLanguages; struct MessageString; struct RpcParameters; struct Rpcs; +struct AppServiceHandledRpc; struct AppServiceInfo; } // namespace policy_table_interface_base } // namespace rpc @@ -102,9 +103,9 @@ typedef Strings RequestSubTypes; typedef String<0, 255> AppServiceType; typedef String<0, 255> AppServiceName; typedef Array AppServiceNames; -typedef Array, 0, 255> AppServiceHandledRpcs; - +typedef Array AppServiceHandledRpcs; typedef Map AppServiceParameters; +typedef Integer FunctionIDInt; typedef Map RemoteRpcs; typedef Map AccessModules; @@ -113,10 +114,31 @@ typedef Array, 0, 255> ModuleTypes; typedef AppHMIType AppHmiType; typedef std::vector AppHmiTypes; +struct AppServiceHandledRpc : CompositeType { + public: + FunctionIDInt function_id; + + public: + AppServiceHandledRpc(); + ~AppServiceHandledRpc(); + AppServiceHandledRpc(const Json::Value* value__); + Json::Value ToJsonValue() const; + bool is_valid() const; + bool is_initialized() const; + bool struct_empty() const; + virtual void SetPolicyTableType(PolicyTableType pt_type); + void ReportErrors(rpc::ValidationReport* report__) const; + + private: + bool Validate() const; +}; + struct AppServiceInfo : CompositeType { public: Optional service_names; Optional handled_rpcs; + + public: AppServiceInfo(); ~AppServiceInfo(); AppServiceInfo(const Json::Value* value__); -- cgit v1.2.1