summaryrefslogtreecommitdiff
path: root/src/components/policy/policy_regular/include/policy/policy_table/types.h
diff options
context:
space:
mode:
authorJackLivio <jack@livio.io>2019-01-27 17:53:10 -0500
committerJackLivio <jack@livio.io>2019-01-27 17:53:10 -0500
commit852ec29c4b7395e4316be60e85488607387d6123 (patch)
treee79072026c0c0444a74e85e7665ad7ae6a3c52f0 /src/components/policy/policy_regular/include/policy/policy_table/types.h
parenta811be5a47658fc162357c9982bae789bcb53b6e (diff)
downloadsdl_core-852ec29c4b7395e4316be60e85488607387d6123.tar.gz
Add HandledRPC struct to policies
Diffstat (limited to 'src/components/policy/policy_regular/include/policy/policy_table/types.h')
-rw-r--r--src/components/policy/policy_regular/include/policy/policy_table/types.h26
1 files changed, 24 insertions, 2 deletions
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<AppServiceName, 0, 255> AppServiceNames;
-typedef Array<Integer<uint32_t, 0, UINT32_MAX>, 0, 255> AppServiceHandledRpcs;
-
+typedef Array<AppServiceHandledRpc, 0, 255> AppServiceHandledRpcs;
typedef Map<AppServiceInfo, 0, 255> AppServiceParameters;
+typedef Integer<int32_t, 0, INT32_MAX> FunctionIDInt;
typedef Map<Strings, 0, 255> RemoteRpcs;
typedef Map<RemoteRpcs, 0, 255> AccessModules;
@@ -113,10 +114,31 @@ typedef Array<Enum<ModuleType>, 0, 255> ModuleTypes;
typedef AppHMIType AppHmiType;
typedef std::vector<AppHMIType> 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<AppServiceNames> service_names;
Optional<AppServiceHandledRpcs> handled_rpcs;
+
+ public:
AppServiceInfo();
~AppServiceInfo();
AppServiceInfo(const Json::Value* value__);