diff options
author | Alexander <akutsan@luxoft.com> | 2018-09-10 13:59:48 +0300 |
---|---|---|
committer | Alexander <akutsan@luxoft.com> | 2018-09-10 14:01:34 +0300 |
commit | 78ac9a2cd006eed81fdbf273fea7dba531113830 (patch) | |
tree | 267d7d4de4770f6d8ef887c9426dc07ec7e33aa3 /src/components/policy/policy_external/src | |
parent | 2dd7e2a810de7b15ebc5eaa947e47170bfbcef2a (diff) | |
download | sdl_core-78ac9a2cd006eed81fdbf273fea7dba531113830.tar.gz |
Add FunctionID to enums
Diffstat (limited to 'src/components/policy/policy_external/src')
-rw-r--r-- | src/components/policy/policy_external/src/policy_table/enums.cc | 358 |
1 files changed, 358 insertions, 0 deletions
diff --git a/src/components/policy/policy_external/src/policy_table/enums.cc b/src/components/policy/policy_external/src/policy_table/enums.cc index 31a6fc86e6..5152cc38ef 100644 --- a/src/components/policy/policy_external/src/policy_table/enums.cc +++ b/src/components/policy/policy_external/src/policy_table/enums.cc @@ -833,6 +833,364 @@ bool EnumFromJsonString(const std::string& literal, ModuleType* result) { } } +bool EnumFromJsonString(const std::string& literal, FunctionID* result) { + if ("RESERVE" == literal) { + *result = RESERVED; + return true; + } + + if ("RegisterAppInterface" == literal) { + *result = RegisterAppInterfaceID; + return true; + } + + if ("UnregisterAppInterface" == literal) { + *result = UnregisterAppInterfaceID; + return true; + } + + if ("SetGlobalProperties" == literal) { + *result = SetGlobalPropertiesID; + return true; + } + + if ("ResetGlobalProperties" == literal) { + *result = ResetGlobalPropertiesID; + return true; + } + + if ("AddCommand" == literal) { + *result = AddCommandID; + return true; + } + + if ("DeleteCommand" == literal) { + *result = DeleteCommandID; + return true; + } + + if ("AddSubMenu" == literal) { + *result = AddSubMenuID; + return true; + } + + if ("DeleteSubMenu" == literal) { + *result = DeleteSubMenuID; + return true; + } + + if ("CreateInteractionChoiceSet" == literal) { + *result = CreateInteractionChoiceSetID; + return true; + } + + if ("PerformInteraction" == literal) { + *result = PerformInteractionID; + return true; + } + + if ("DeleteInteractionChoiceSet" == literal) { + *result = DeleteInteractionChoiceSetID; + return true; + } + + if ("Alert" == literal) { + *result = AlertID; + return true; + } + + if ("Show" == literal) { + *result = ShowID; + return true; + } + + if ("Speak" == literal) { + *result = SpeakID; + return true; + } + + if ("SetMediaClockTimer" == literal) { + *result = SetMediaClockTimerID; + return true; + } + + if ("PerformAudioPassThru" == literal) { + *result = PerformAudioPassThruID; + return true; + } + + if ("EndAudioPassThru" == literal) { + *result = EndAudioPassThruID; + return true; + } + + if ("SubscribeButton" == literal) { + *result = SubscribeButtonID; + return true; + } + + if ("UnsubscribeButton" == literal) { + *result = UnsubscribeButtonID; + return true; + } + + if ("SubscribeVehicleData" == literal) { + *result = SubscribeVehicleDataID; + return true; + } + + if ("UnsubscribeVehicleData" == literal) { + *result = UnsubscribeVehicleDataID; + return true; + } + + if ("GetVehicleData" == literal) { + *result = GetVehicleDataID; + return true; + } + + if ("ReadD" == literal) { + *result = ReadDIDID; + return true; + } + + if ("GetDTCs" == literal) { + *result = GetDTCsID; + return true; + } + + if ("ScrollableMessage" == literal) { + *result = ScrollableMessageID; + return true; + } + + if ("Slider" == literal) { + *result = SliderID; + return true; + } + + if ("ShowConstantTBT" == literal) { + *result = ShowConstantTBTID; + return true; + } + + if ("AlertManeuver" == literal) { + *result = AlertManeuverID; + return true; + } + + if ("UpdateTurnList" == literal) { + *result = UpdateTurnListID; + return true; + } + + if ("ChangeRegistration" == literal) { + *result = ChangeRegistrationID; + return true; + } + + if ("GenericResponse" == literal) { + *result = GenericResponseID; + return true; + } + + if ("PutFile" == literal) { + *result = PutFileID; + return true; + } + + if ("DeleteFile" == literal) { + *result = DeleteFileID; + return true; + } + + if ("ListFiles" == literal) { + *result = ListFilesID; + return true; + } + + if ("SetAppIcon" == literal) { + *result = SetAppIconID; + return true; + } + + if ("SetDisplayLayout" == literal) { + *result = SetDisplayLayoutID; + return true; + } + + if ("DiagnosticMessage" == literal) { + *result = DiagnosticMessageID; + return true; + } + + if ("SystemRequest" == literal) { + *result = SystemRequestID; + return true; + } + + if ("SendLocation" == literal) { + *result = SendLocationID; + return true; + } + + if ("DialNumber" == literal) { + *result = DialNumberID; + return true; + } + + if ("ButtonPress" == literal) { + *result = ButtonPressID; + return true; + } + + if ("GetInteriorVehicleData" == literal) { + *result = GetInteriorVehicleDataID; + return true; + } + + if ("SetInteriorVehicleData" == literal) { + *result = SetInteriorVehicleDataID; + return true; + } + + if ("GetWayPoints" == literal) { + *result = GetWayPointsID; + return true; + } + + if ("SubscribeWayPoints" == literal) { + *result = SubscribeWayPointsID; + return true; + } + + if ("UnsubscribeWayPoints" == literal) { + *result = UnsubscribeWayPointsID; + return true; + } + + if ("GetSystemCapability" == literal) { + *result = GetSystemCapabilityID; + return true; + } + + if ("SendHapticData" == literal) { + *result = SendHapticDataID; + return true; + } + + if ("OnHMIStatus" == literal) { + *result = OnHMIStatusID; + return true; + } + + if ("OnAppInterfaceUnregistered" == literal) { + *result = OnAppInterfaceUnregisteredID; + return true; + } + + if ("OnButtonEvent" == literal) { + *result = OnButtonEventID; + return true; + } + + if ("OnButtonPress" == literal) { + *result = OnButtonPressID; + return true; + } + + if ("OnVehicleData" == literal) { + *result = OnVehicleDataID; + return true; + } + + if ("OnCommand" == literal) { + *result = OnCommandID; + return true; + } + + if ("OnTBTClientState" == literal) { + *result = OnTBTClientStateID; + return true; + } + + if ("OnDriverDistraction" == literal) { + *result = OnDriverDistractionID; + return true; + } + + if ("OnPermissionsChange" == literal) { + *result = OnPermissionsChangeID; + return true; + } + + if ("OnAudioPassThru" == literal) { + *result = OnAudioPassThruID; + return true; + } + + if ("OnLanguageChange" == literal) { + *result = OnLanguageChangeID; + return true; + } + + if ("OnKeyboardInput" == literal) { + *result = OnKeyboardInputID; + return true; + } + + if ("OnTouchEvent" == literal) { + *result = OnTouchEventID; + return true; + } + + if ("OnSystemRequest" == literal) { + *result = OnSystemRequestID; + return true; + } + + if ("OnHashChange" == literal) { + *result = OnHashChangeID; + return true; + } + + if ("OnInteriorVehicleData" == literal) { + *result = OnInteriorVehicleDataID; + return true; + } + + if ("OnWayPointChange" == literal) { + *result = OnWayPointChangeID; + return true; + } + + if ("OnRCStatus" == literal) { + *result = OnRCStatusID; + return true; + } + + if ("EncodedSyncPData" == literal) { + *result = EncodedSyncPDataID; + return true; + } + + if ("SyncPData" == literal) { + *result = SyncPDataID; + return true; + } + + if ("OnEncodedSyncPData" == literal) { + *result = OnEncodedSyncPDataID; + return true; + } + + if ("OnSyncPData" == literal) { + *result = OnSyncPDataID; + return true; + } + return false; +}; + const std::string kDefaultApp = "default"; const std::string kPreDataConsentApp = "pre_DataConsent"; const std::string kDeviceApp = "device"; |