summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--SmartDeviceLink-iOS.xcodeproj/project.pbxproj4
-rw-r--r--SmartDeviceLink/SDLAirbagStatus.h19
-rw-r--r--SmartDeviceLink/SDLAirbagStatus.m82
-rw-r--r--SmartDeviceLink/SDLAmbientLightStatus.h24
-rw-r--r--SmartDeviceLink/SDLAmbientLightStatus.m103
-rw-r--r--SmartDeviceLink/SDLAppHMIType.h59
-rw-r--r--SmartDeviceLink/SDLAppHMIType.m123
-rw-r--r--SmartDeviceLink/SDLAppInterfaceUnregisteredReason.h60
-rw-r--r--SmartDeviceLink/SDLAppInterfaceUnregisteredReason.m122
-rw-r--r--SmartDeviceLink/SDLAudioPassThruCapabilities.h12
-rw-r--r--SmartDeviceLink/SDLAudioPassThruCapabilities.m33
-rw-r--r--SmartDeviceLink/SDLAudioStreamingState.h31
-rw-r--r--SmartDeviceLink/SDLAudioStreamingState.m53
-rw-r--r--SmartDeviceLink/SDLAudioType.h24
-rw-r--r--SmartDeviceLink/SDLAudioType.m33
-rw-r--r--SmartDeviceLink/SDLBeltStatus.h33
-rw-r--r--SmartDeviceLink/SDLBeltStatus.m150
-rw-r--r--SmartDeviceLink/SDLBitsPerSample.h29
-rw-r--r--SmartDeviceLink/SDLBitsPerSample.m43
-rw-r--r--SmartDeviceLink/SDLBodyInformation.h8
-rw-r--r--SmartDeviceLink/SDLBodyInformation.m20
-rw-r--r--SmartDeviceLink/SDLButtonCapabilities.h4
-rw-r--r--SmartDeviceLink/SDLButtonCapabilities.m11
-rw-r--r--SmartDeviceLink/SDLButtonEventMode.h24
-rw-r--r--SmartDeviceLink/SDLButtonEventMode.m43
-rw-r--r--SmartDeviceLink/SDLButtonName.h85
-rw-r--r--SmartDeviceLink/SDLButtonName.m193
-rw-r--r--SmartDeviceLink/SDLButtonPressMode.h29
-rw-r--r--SmartDeviceLink/SDLButtonPressMode.m43
-rw-r--r--SmartDeviceLink/SDLCarModeStatus.h16
-rw-r--r--SmartDeviceLink/SDLCarModeStatus.m63
-rw-r--r--SmartDeviceLink/SDLChangeRegistration.h7
-rw-r--r--SmartDeviceLink/SDLChangeRegistration.m21
-rw-r--r--SmartDeviceLink/SDLCharacterSet.h28
-rw-r--r--SmartDeviceLink/SDLCharacterSet.m63
-rw-r--r--SmartDeviceLink/SDLClusterModeStatus.h12
-rw-r--r--SmartDeviceLink/SDLClusterModeStatus.m33
-rw-r--r--SmartDeviceLink/SDLCompassDirection.h42
-rw-r--r--SmartDeviceLink/SDLCompassDirection.m103
-rw-r--r--SmartDeviceLink/SDLComponentVolumeStatus.h36
-rw-r--r--SmartDeviceLink/SDLComponentVolumeStatus.m83
-rw-r--r--SmartDeviceLink/SDLDIDResult.h4
-rw-r--r--SmartDeviceLink/SDLDIDResult.m12
-rw-r--r--SmartDeviceLink/SDLDeviceLevelStatus.h36
-rw-r--r--SmartDeviceLink/SDLDeviceLevelStatus.m83
-rw-r--r--SmartDeviceLink/SDLDeviceStatus.h10
-rw-r--r--SmartDeviceLink/SDLDeviceStatus.m30
-rw-r--r--SmartDeviceLink/SDLDimension.h32
-rw-r--r--SmartDeviceLink/SDLDimension.m53
-rw-r--r--SmartDeviceLink/SDLDisplayCapabilities.h5
-rw-r--r--SmartDeviceLink/SDLDisplayCapabilities.m14
-rw-r--r--SmartDeviceLink/SDLDisplayType.h45
-rw-r--r--SmartDeviceLink/SDLDisplayType.m123
-rw-r--r--SmartDeviceLink/SDLDriverDistractionState.h28
-rw-r--r--SmartDeviceLink/SDLDriverDistractionState.m43
-rw-r--r--SmartDeviceLink/SDLECallConfirmationStatus.h29
-rw-r--r--SmartDeviceLink/SDLECallConfirmationStatus.m93
-rw-r--r--SmartDeviceLink/SDLECallInfo.h10
-rw-r--r--SmartDeviceLink/SDLECallInfo.m32
-rw-r--r--SmartDeviceLink/SDLEmergencyEvent.h14
-rw-r--r--SmartDeviceLink/SDLEmergencyEvent.m44
-rw-r--r--SmartDeviceLink/SDLEmergencyEventType.h30
-rw-r--r--SmartDeviceLink/SDLEmergencyEventType.m93
-rw-r--r--SmartDeviceLink/SDLEnum.h13
-rw-r--r--SmartDeviceLink/SDLEnum.m62
-rw-r--r--SmartDeviceLink/SDLError.h8
-rw-r--r--SmartDeviceLink/SDLError.m13
-rw-r--r--SmartDeviceLink/SDLFile.h4
-rw-r--r--SmartDeviceLink/SDLFile.m20
-rw-r--r--SmartDeviceLink/SDLFileType.h53
-rw-r--r--SmartDeviceLink/SDLFileType.m103
-rw-r--r--SmartDeviceLink/SDLFuelCutoffStatus.h30
-rw-r--r--SmartDeviceLink/SDLFuelCutoffStatus.m53
-rw-r--r--SmartDeviceLink/SDLGPSData.h8
-rw-r--r--SmartDeviceLink/SDLGPSData.m22
-rw-r--r--SmartDeviceLink/SDLGetVehicleDataResponse.h18
-rw-r--r--SmartDeviceLink/SDLGetVehicleDataResponse.m44
-rw-r--r--SmartDeviceLink/SDLGlobalProperty.h34
-rw-r--r--SmartDeviceLink/SDLGlobalProperty.m93
-rw-r--r--SmartDeviceLink/SDLHMILevel.h37
-rw-r--r--SmartDeviceLink/SDLHMILevel.m63
-rw-r--r--SmartDeviceLink/SDLHMIPermissions.m8
-rw-r--r--SmartDeviceLink/SDLHMIZoneCapabilities.h25
-rw-r--r--SmartDeviceLink/SDLHMIZoneCapabilities.m43
-rw-r--r--SmartDeviceLink/SDLHeadLampStatus.h6
-rw-r--r--SmartDeviceLink/SDLHeadLampStatus.m10
-rw-r--r--SmartDeviceLink/SDLIgnitionStableStatus.h26
-rw-r--r--SmartDeviceLink/SDLIgnitionStableStatus.m53
-rw-r--r--SmartDeviceLink/SDLIgnitionStatus.h36
-rw-r--r--SmartDeviceLink/SDLIgnitionStatus.m83
-rw-r--r--SmartDeviceLink/SDLImage.h5
-rw-r--r--SmartDeviceLink/SDLImage.m11
-rw-r--r--SmartDeviceLink/SDLImageField.h5
-rw-r--r--SmartDeviceLink/SDLImageField.m17
-rw-r--r--SmartDeviceLink/SDLImageFieldName.h34
-rw-r--r--SmartDeviceLink/SDLImageFieldName.m143
-rw-r--r--SmartDeviceLink/SDLImageType.h29
-rw-r--r--SmartDeviceLink/SDLImageType.m43
-rw-r--r--SmartDeviceLink/SDLInteractionMode.h30
-rw-r--r--SmartDeviceLink/SDLInteractionMode.m53
-rw-r--r--SmartDeviceLink/SDLKeyboardEvent.h20
-rw-r--r--SmartDeviceLink/SDLKeyboardEvent.m73
-rw-r--r--SmartDeviceLink/SDLKeyboardLayout.h14
-rw-r--r--SmartDeviceLink/SDLKeyboardLayout.m53
-rw-r--r--SmartDeviceLink/SDLKeyboardProperties.h12
-rw-r--r--SmartDeviceLink/SDLKeyboardProperties.m34
-rw-r--r--SmartDeviceLink/SDLKeypressMode.h14
-rw-r--r--SmartDeviceLink/SDLKeypressMode.m53
-rw-r--r--SmartDeviceLink/SDLLanguage.h68
-rw-r--r--SmartDeviceLink/SDLLanguage.m263
-rw-r--r--SmartDeviceLink/SDLLayoutMode.h20
-rw-r--r--SmartDeviceLink/SDLLayoutMode.m73
-rw-r--r--SmartDeviceLink/SDLLifecycleConfiguration.h11
-rw-r--r--SmartDeviceLink/SDLLifecycleConfiguration.m12
-rw-r--r--SmartDeviceLink/SDLLifecycleManager.h8
-rw-r--r--SmartDeviceLink/SDLLifecycleManager.m14
-rw-r--r--SmartDeviceLink/SDLLockScreenManager.m6
-rw-r--r--SmartDeviceLink/SDLLockScreenStatus.h14
-rw-r--r--SmartDeviceLink/SDLLockScreenStatus.m55
-rw-r--r--SmartDeviceLink/SDLLockScreenStatusManager.h9
-rw-r--r--SmartDeviceLink/SDLLockScreenStatusManager.m27
-rw-r--r--SmartDeviceLink/SDLMaintenanceModeStatus.h30
-rw-r--r--SmartDeviceLink/SDLMaintenanceModeStatus.m63
-rw-r--r--SmartDeviceLink/SDLManager.h7
-rw-r--r--SmartDeviceLink/SDLManager.m2
-rw-r--r--SmartDeviceLink/SDLManagerDelegate.h6
-rw-r--r--SmartDeviceLink/SDLMediaClockFormat.h47
-rw-r--r--SmartDeviceLink/SDLMediaClockFormat.m93
-rw-r--r--SmartDeviceLink/SDLMyKey.h4
-rw-r--r--SmartDeviceLink/SDLMyKey.m10
-rw-r--r--SmartDeviceLink/SDLOnAppInterfaceUnregistered.h4
-rw-r--r--SmartDeviceLink/SDLOnAppInterfaceUnregistered.m12
-rw-r--r--SmartDeviceLink/SDLOnButtonEvent.h9
-rw-r--r--SmartDeviceLink/SDLOnButtonEvent.m22
-rw-r--r--SmartDeviceLink/SDLOnButtonPress.h9
-rw-r--r--SmartDeviceLink/SDLOnButtonPress.m20
-rw-r--r--SmartDeviceLink/SDLOnCommand.h5
-rw-r--r--SmartDeviceLink/SDLOnCommand.m12
-rw-r--r--SmartDeviceLink/SDLOnDriverDistraction.h5
-rw-r--r--SmartDeviceLink/SDLOnDriverDistraction.m10
-rw-r--r--SmartDeviceLink/SDLOnHMIStatus.h13
-rw-r--r--SmartDeviceLink/SDLOnHMIStatus.m30
-rw-r--r--SmartDeviceLink/SDLOnKeyboardInput.h4
-rw-r--r--SmartDeviceLink/SDLOnKeyboardInput.m11
-rw-r--r--SmartDeviceLink/SDLOnLanguageChange.h6
-rw-r--r--SmartDeviceLink/SDLOnLanguageChange.m21
-rw-r--r--SmartDeviceLink/SDLOnLockScreenStatus.h8
-rw-r--r--SmartDeviceLink/SDLOnLockScreenStatus.m20
-rw-r--r--SmartDeviceLink/SDLOnSystemRequest.h8
-rw-r--r--SmartDeviceLink/SDLOnSystemRequest.m23
-rw-r--r--SmartDeviceLink/SDLOnTBTClientState.h5
-rw-r--r--SmartDeviceLink/SDLOnTBTClientState.m12
-rw-r--r--SmartDeviceLink/SDLOnTouchEvent.h5
-rw-r--r--SmartDeviceLink/SDLOnTouchEvent.m11
-rw-r--r--SmartDeviceLink/SDLOnVehicleData.h17
-rw-r--r--SmartDeviceLink/SDLOnVehicleData.m44
-rw-r--r--SmartDeviceLink/SDLPRNDL.h85
-rw-r--r--SmartDeviceLink/SDLPRNDL.m183
-rw-r--r--SmartDeviceLink/SDLPerformAudioPassThru.h13
-rw-r--r--SmartDeviceLink/SDLPerformAudioPassThru.m33
-rw-r--r--SmartDeviceLink/SDLPerformInteraction.h8
-rw-r--r--SmartDeviceLink/SDLPerformInteraction.m22
-rw-r--r--SmartDeviceLink/SDLPerformInteractionResponse.h5
-rw-r--r--SmartDeviceLink/SDLPerformInteractionResponse.m12
-rw-r--r--SmartDeviceLink/SDLPermissionManager.h2
-rw-r--r--SmartDeviceLink/SDLPermissionManager.m9
-rw-r--r--SmartDeviceLink/SDLPermissionStatus.h33
-rw-r--r--SmartDeviceLink/SDLPermissionStatus.m63
-rw-r--r--SmartDeviceLink/SDLPowerModeQualificationStatus.h16
-rw-r--r--SmartDeviceLink/SDLPowerModeQualificationStatus.m63
-rw-r--r--SmartDeviceLink/SDLPowerModeStatus.h26
-rw-r--r--SmartDeviceLink/SDLPowerModeStatus.m113
-rw-r--r--SmartDeviceLink/SDLPredefinedLayout.h48
-rw-r--r--SmartDeviceLink/SDLPredefinedLayout.m223
-rw-r--r--SmartDeviceLink/SDLPrerecordedSpeech.h18
-rw-r--r--SmartDeviceLink/SDLPrerecordedSpeech.m73
-rw-r--r--SmartDeviceLink/SDLPrimaryAudioSource.h41
-rw-r--r--SmartDeviceLink/SDLPrimaryAudioSource.m93
-rw-r--r--SmartDeviceLink/SDLProxy.m31
-rw-r--r--SmartDeviceLink/SDLPutFile.h5
-rw-r--r--SmartDeviceLink/SDLPutFile.m11
-rw-r--r--SmartDeviceLink/SDLRPCRequestFactory.h70
-rw-r--r--SmartDeviceLink/SDLRPCRequestFactory.m51
-rw-r--r--SmartDeviceLink/SDLRPCResponse.h4
-rw-r--r--SmartDeviceLink/SDLRPCResponse.m10
-rw-r--r--SmartDeviceLink/SDLRPCStruct.m8
-rw-r--r--SmartDeviceLink/SDLRegisterAppInterface.h7
-rw-r--r--SmartDeviceLink/SDLRegisterAppInterface.m25
-rw-r--r--SmartDeviceLink/SDLRegisterAppInterfaceResponse.h16
-rw-r--r--SmartDeviceLink/SDLRegisterAppInterfaceResponse.m52
-rw-r--r--SmartDeviceLink/SDLRequestType.h48
-rw-r--r--SmartDeviceLink/SDLRequestType.m224
-rw-r--r--SmartDeviceLink/SDLResetGlobalProperties.m4
-rw-r--r--SmartDeviceLink/SDLResponseDispatcher.m12
-rw-r--r--SmartDeviceLink/SDLResult.h85
-rw-r--r--SmartDeviceLink/SDLResult.m354
-rw-r--r--SmartDeviceLink/SDLSamplingRate.h40
-rw-r--r--SmartDeviceLink/SDLSamplingRate.m63
-rw-r--r--SmartDeviceLink/SDLSetMediaClockTimer.h6
-rw-r--r--SmartDeviceLink/SDLSetMediaClockTimer.m12
-rw-r--r--SmartDeviceLink/SDLShow.h5
-rw-r--r--SmartDeviceLink/SDLShow.m11
-rw-r--r--SmartDeviceLink/SDLSingleTireStatus.h5
-rw-r--r--SmartDeviceLink/SDLSingleTireStatus.m11
-rw-r--r--SmartDeviceLink/SDLSoftButton.h8
-rw-r--r--SmartDeviceLink/SDLSoftButton.m22
-rw-r--r--SmartDeviceLink/SDLSoftButtonType.h28
-rw-r--r--SmartDeviceLink/SDLSoftButtonType.m53
-rw-r--r--SmartDeviceLink/SDLSpeechCapabilities.h33
-rw-r--r--SmartDeviceLink/SDLSpeechCapabilities.m73
-rw-r--r--SmartDeviceLink/SDLSubscribeButton.h5
-rw-r--r--SmartDeviceLink/SDLSubscribeButton.m10
-rw-r--r--SmartDeviceLink/SDLSystemAction.h25
-rw-r--r--SmartDeviceLink/SDLSystemAction.m53
-rw-r--r--SmartDeviceLink/SDLSystemContext.h41
-rw-r--r--SmartDeviceLink/SDLSystemContext.m73
-rw-r--r--SmartDeviceLink/SDLSystemRequest.h5
-rw-r--r--SmartDeviceLink/SDLSystemRequest.m12
-rw-r--r--SmartDeviceLink/SDLTBTState.h28
-rw-r--r--SmartDeviceLink/SDLTBTState.m123
-rw-r--r--SmartDeviceLink/SDLTTSChunk.h5
-rw-r--r--SmartDeviceLink/SDLTTSChunk.m11
-rw-r--r--SmartDeviceLink/SDLTTSChunkFactory.h5
-rw-r--r--SmartDeviceLink/SDLTTSChunkFactory.m5
-rw-r--r--SmartDeviceLink/SDLTextAlignment.h33
-rw-r--r--SmartDeviceLink/SDLTextAlignment.m53
-rw-r--r--SmartDeviceLink/SDLTextField.h8
-rw-r--r--SmartDeviceLink/SDLTextField.m20
-rw-r--r--SmartDeviceLink/SDLTextFieldName.h133
-rw-r--r--SmartDeviceLink/SDLTextFieldName.m303
-rw-r--r--SmartDeviceLink/SDLTimerMode.h14
-rw-r--r--SmartDeviceLink/SDLTimerMode.m53
-rw-r--r--SmartDeviceLink/SDLTireStatus.h5
-rw-r--r--SmartDeviceLink/SDLTireStatus.m10
-rw-r--r--SmartDeviceLink/SDLTouchManager.m8
-rw-r--r--SmartDeviceLink/SDLTouchType.h14
-rw-r--r--SmartDeviceLink/SDLTouchType.m53
-rw-r--r--SmartDeviceLink/SDLTriggerSource.h27
-rw-r--r--SmartDeviceLink/SDLTriggerSource.m53
-rw-r--r--SmartDeviceLink/SDLUnsubscribeButton.h4
-rw-r--r--SmartDeviceLink/SDLUnsubscribeButton.m10
-rw-r--r--SmartDeviceLink/SDLUpdateMode.h32
-rw-r--r--SmartDeviceLink/SDLUpdateMode.m73
-rw-r--r--SmartDeviceLink/SDLVehicleDataActiveStatus.h31
-rw-r--r--SmartDeviceLink/SDLVehicleDataActiveStatus.m73
-rw-r--r--SmartDeviceLink/SDLVehicleDataEventStatus.h42
-rw-r--r--SmartDeviceLink/SDLVehicleDataEventStatus.m73
-rw-r--r--SmartDeviceLink/SDLVehicleDataNotificationStatus.h26
-rw-r--r--SmartDeviceLink/SDLVehicleDataNotificationStatus.m63
-rw-r--r--SmartDeviceLink/SDLVehicleDataResult.h9
-rw-r--r--SmartDeviceLink/SDLVehicleDataResult.m23
-rw-r--r--SmartDeviceLink/SDLVehicleDataResultCode.h39
-rw-r--r--SmartDeviceLink/SDLVehicleDataResultCode.m113
-rw-r--r--SmartDeviceLink/SDLVehicleDataStatus.h25
-rw-r--r--SmartDeviceLink/SDLVehicleDataStatus.m53
-rw-r--r--SmartDeviceLink/SDLVehicleDataType.h73
-rw-r--r--SmartDeviceLink/SDLVehicleDataType.m283
-rw-r--r--SmartDeviceLink/SDLVrCapabilities.h21
-rw-r--r--SmartDeviceLink/SDLVrCapabilities.m70
-rw-r--r--SmartDeviceLink/SDLWarningLightStatus.h30
-rw-r--r--SmartDeviceLink/SDLWarningLightStatus.m63
-rw-r--r--SmartDeviceLink/SDLWiperStatus.h48
-rw-r--r--SmartDeviceLink/SDLWiperStatus.m173
-rw-r--r--SmartDeviceLink_Example/Classes/ProxyManager.m38
265 files changed, 1821 insertions, 9092 deletions
diff --git a/README.md b/README.md
index 3499e4caf..3581d3e36 100644
--- a/README.md
+++ b/README.md
@@ -198,7 +198,7 @@ When your app receives `onOnHMIStatus` it has changed HMI states on the head uni
You will want to track your first HMI FULL, for instance with a boolean value. The example application has extremely basic tracking of this type in the `onOnHMIStatus` callback.
```objc
-if ((notification.hmiLevel == [SDLHMILevel FULL]) && self.isFirstHMIFull) {
+if ((notification.hmiLevel == SDLHMILevelFull) && self.isFirstHMIFull) {
[self showInitialData];
self.isFirstHMIFull = NO;
}
diff --git a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
index b846cc4d5..2ec91c69c 100644
--- a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
+++ b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
@@ -422,7 +422,6 @@
5D61FCA51A84238C00846EE7 /* SDLEndAudioPassThruResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D61FAB81A84238A00846EE7 /* SDLEndAudioPassThruResponse.h */; settings = {ATTRIBUTES = (Public, ); }; };
5D61FCA61A84238C00846EE7 /* SDLEndAudioPassThruResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 5D61FAB91A84238A00846EE7 /* SDLEndAudioPassThruResponse.m */; };
5D61FCA71A84238C00846EE7 /* SDLEnum.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D61FABA1A84238A00846EE7 /* SDLEnum.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 5D61FCA81A84238C00846EE7 /* SDLEnum.m in Sources */ = {isa = PBXBuildFile; fileRef = 5D61FABB1A84238A00846EE7 /* SDLEnum.m */; };
5D61FCA91A84238C00846EE7 /* SDLFileType.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D61FABC1A84238A00846EE7 /* SDLFileType.h */; settings = {ATTRIBUTES = (Public, ); }; };
5D61FCAA1A84238C00846EE7 /* SDLFileType.m in Sources */ = {isa = PBXBuildFile; fileRef = 5D61FABD1A84238A00846EE7 /* SDLFileType.m */; };
5D61FCAB1A84238C00846EE7 /* SDLFuelCutoffStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D61FABE1A84238A00846EE7 /* SDLFuelCutoffStatus.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -1411,7 +1410,6 @@
5D61FAB81A84238A00846EE7 /* SDLEndAudioPassThruResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLEndAudioPassThruResponse.h; sourceTree = "<group>"; };
5D61FAB91A84238A00846EE7 /* SDLEndAudioPassThruResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLEndAudioPassThruResponse.m; sourceTree = "<group>"; };
5D61FABA1A84238A00846EE7 /* SDLEnum.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLEnum.h; sourceTree = "<group>"; };
- 5D61FABB1A84238A00846EE7 /* SDLEnum.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLEnum.m; sourceTree = "<group>"; };
5D61FABC1A84238A00846EE7 /* SDLFileType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLFileType.h; sourceTree = "<group>"; };
5D61FABD1A84238A00846EE7 /* SDLFileType.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLFileType.m; sourceTree = "<group>"; };
5D61FABE1A84238A00846EE7 /* SDLFuelCutoffStatus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLFuelCutoffStatus.h; sourceTree = "<group>"; };
@@ -3061,7 +3059,6 @@
isa = PBXGroup;
children = (
5D61FABA1A84238A00846EE7 /* SDLEnum.h */,
- 5D61FABB1A84238A00846EE7 /* SDLEnum.m */,
5DB92D301AC9C8BA00C15BB0 /* SDLRPCStruct.h */,
5DB92D311AC9C8BA00C15BB0 /* SDLRPCStruct.m */,
5D61FB7C1A84238B00846EE7 /* SDLRPCMessage.h */,
@@ -4167,7 +4164,6 @@
5D61FD421A84238C00846EE7 /* SDLPRNDL.m in Sources */,
E9C32B921AB20BA200F283AF /* SDLIAPSession.m in Sources */,
5D61FD0C1A84238C00846EE7 /* SDLOnEncodedSyncPData.m in Sources */,
- 5D61FCA81A84238C00846EE7 /* SDLEnum.m in Sources */,
5D61FDE01A84238C00846EE7 /* SDLTTSChunkFactory.m in Sources */,
5D61FD0A1A84238C00846EE7 /* SDLOnDriverDistraction.m in Sources */,
5D61FCED1A84238C00846EE7 /* SDLListFiles.m in Sources */,
diff --git a/SmartDeviceLink/SDLAirbagStatus.h b/SmartDeviceLink/SDLAirbagStatus.h
index 3681795b5..cb2c71ed7 100644
--- a/SmartDeviceLink/SDLAirbagStatus.h
+++ b/SmartDeviceLink/SDLAirbagStatus.h
@@ -3,8 +3,7 @@
#import "SDLRPCMessage.h"
-@class SDLVehicleDataEventStatus;
-
+#import "SDLVehicleDataEventStatus.h"
@interface SDLAirbagStatus : SDLRPCStruct {
}
@@ -12,13 +11,13 @@
- (instancetype)init;
- (instancetype)initWithDictionary:(NSMutableDictionary *)dict;
-@property (strong) SDLVehicleDataEventStatus *driverAirbagDeployed;
-@property (strong) SDLVehicleDataEventStatus *driverSideAirbagDeployed;
-@property (strong) SDLVehicleDataEventStatus *driverCurtainAirbagDeployed;
-@property (strong) SDLVehicleDataEventStatus *passengerAirbagDeployed;
-@property (strong) SDLVehicleDataEventStatus *passengerCurtainAirbagDeployed;
-@property (strong) SDLVehicleDataEventStatus *driverKneeAirbagDeployed;
-@property (strong) SDLVehicleDataEventStatus *passengerSideAirbagDeployed;
-@property (strong) SDLVehicleDataEventStatus *passengerKneeAirbagDeployed;
+@property (strong) SDLVehicleDataEventStatus driverAirbagDeployed;
+@property (strong) SDLVehicleDataEventStatus driverSideAirbagDeployed;
+@property (strong) SDLVehicleDataEventStatus driverCurtainAirbagDeployed;
+@property (strong) SDLVehicleDataEventStatus passengerAirbagDeployed;
+@property (strong) SDLVehicleDataEventStatus passengerCurtainAirbagDeployed;
+@property (strong) SDLVehicleDataEventStatus driverKneeAirbagDeployed;
+@property (strong) SDLVehicleDataEventStatus passengerSideAirbagDeployed;
+@property (strong) SDLVehicleDataEventStatus passengerKneeAirbagDeployed;
@end
diff --git a/SmartDeviceLink/SDLAirbagStatus.m b/SmartDeviceLink/SDLAirbagStatus.m
index a3ce06689..516977b6e 100644
--- a/SmartDeviceLink/SDLAirbagStatus.m
+++ b/SmartDeviceLink/SDLAirbagStatus.m
@@ -3,8 +3,6 @@
#import "SDLAirbagStatus.h"
#import "SDLNames.h"
-#import "SDLVehicleDataEventStatus.h"
-
@implementation SDLAirbagStatus
@@ -20,7 +18,7 @@
return self;
}
-- (void)setDriverAirbagDeployed:(SDLVehicleDataEventStatus *)driverAirbagDeployed {
+- (void)setDriverAirbagDeployed:(SDLVehicleDataEventStatus)driverAirbagDeployed {
if (driverAirbagDeployed != nil) {
[store setObject:driverAirbagDeployed forKey:NAMES_driverAirbagDeployed];
} else {
@@ -28,16 +26,12 @@
}
}
-- (SDLVehicleDataEventStatus *)driverAirbagDeployed {
+- (SDLVehicleDataEventStatus)driverAirbagDeployed {
NSObject *obj = [store objectForKey:NAMES_driverAirbagDeployed];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataEventStatus.class]) {
- return (SDLVehicleDataEventStatus *)obj;
- } else {
- return [SDLVehicleDataEventStatus valueOf:(NSString *)obj];
- }
+ return (SDLVehicleDataEventStatus)obj;
}
-- (void)setDriverSideAirbagDeployed:(SDLVehicleDataEventStatus *)driverSideAirbagDeployed {
+- (void)setDriverSideAirbagDeployed:(SDLVehicleDataEventStatus)driverSideAirbagDeployed {
if (driverSideAirbagDeployed != nil) {
[store setObject:driverSideAirbagDeployed forKey:NAMES_driverSideAirbagDeployed];
} else {
@@ -45,16 +39,12 @@
}
}
-- (SDLVehicleDataEventStatus *)driverSideAirbagDeployed {
+- (SDLVehicleDataEventStatus)driverSideAirbagDeployed {
NSObject *obj = [store objectForKey:NAMES_driverSideAirbagDeployed];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataEventStatus.class]) {
- return (SDLVehicleDataEventStatus *)obj;
- } else {
- return [SDLVehicleDataEventStatus valueOf:(NSString *)obj];
- }
+ return (SDLVehicleDataEventStatus)obj;
}
-- (void)setDriverCurtainAirbagDeployed:(SDLVehicleDataEventStatus *)driverCurtainAirbagDeployed {
+- (void)setDriverCurtainAirbagDeployed:(SDLVehicleDataEventStatus)driverCurtainAirbagDeployed {
if (driverCurtainAirbagDeployed != nil) {
[store setObject:driverCurtainAirbagDeployed forKey:NAMES_driverCurtainAirbagDeployed];
} else {
@@ -62,16 +52,12 @@
}
}
-- (SDLVehicleDataEventStatus *)driverCurtainAirbagDeployed {
+- (SDLVehicleDataEventStatus)driverCurtainAirbagDeployed {
NSObject *obj = [store objectForKey:NAMES_driverCurtainAirbagDeployed];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataEventStatus.class]) {
- return (SDLVehicleDataEventStatus *)obj;
- } else {
- return [SDLVehicleDataEventStatus valueOf:(NSString *)obj];
- }
+ return (SDLVehicleDataEventStatus)obj;
}
-- (void)setPassengerAirbagDeployed:(SDLVehicleDataEventStatus *)passengerAirbagDeployed {
+- (void)setPassengerAirbagDeployed:(SDLVehicleDataEventStatus)passengerAirbagDeployed {
if (passengerAirbagDeployed != nil) {
[store setObject:passengerAirbagDeployed forKey:NAMES_passengerAirbagDeployed];
} else {
@@ -79,16 +65,12 @@
}
}
-- (SDLVehicleDataEventStatus *)passengerAirbagDeployed {
+- (SDLVehicleDataEventStatus)passengerAirbagDeployed {
NSObject *obj = [store objectForKey:NAMES_passengerAirbagDeployed];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataEventStatus.class]) {
- return (SDLVehicleDataEventStatus *)obj;
- } else {
- return [SDLVehicleDataEventStatus valueOf:(NSString *)obj];
- }
+ return (SDLVehicleDataEventStatus)obj;
}
-- (void)setPassengerCurtainAirbagDeployed:(SDLVehicleDataEventStatus *)passengerCurtainAirbagDeployed {
+- (void)setPassengerCurtainAirbagDeployed:(SDLVehicleDataEventStatus)passengerCurtainAirbagDeployed {
if (passengerCurtainAirbagDeployed != nil) {
[store setObject:passengerCurtainAirbagDeployed forKey:NAMES_passengerCurtainAirbagDeployed];
} else {
@@ -96,16 +78,12 @@
}
}
-- (SDLVehicleDataEventStatus *)passengerCurtainAirbagDeployed {
+- (SDLVehicleDataEventStatus)passengerCurtainAirbagDeployed {
NSObject *obj = [store objectForKey:NAMES_passengerCurtainAirbagDeployed];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataEventStatus.class]) {
- return (SDLVehicleDataEventStatus *)obj;
- } else {
- return [SDLVehicleDataEventStatus valueOf:(NSString *)obj];
- }
+ return (SDLVehicleDataEventStatus)obj;
}
-- (void)setDriverKneeAirbagDeployed:(SDLVehicleDataEventStatus *)driverKneeAirbagDeployed {
+- (void)setDriverKneeAirbagDeployed:(SDLVehicleDataEventStatus)driverKneeAirbagDeployed {
if (driverKneeAirbagDeployed != nil) {
[store setObject:driverKneeAirbagDeployed forKey:NAMES_driverKneeAirbagDeployed];
} else {
@@ -113,16 +91,12 @@
}
}
-- (SDLVehicleDataEventStatus *)driverKneeAirbagDeployed {
+- (SDLVehicleDataEventStatus)driverKneeAirbagDeployed {
NSObject *obj = [store objectForKey:NAMES_driverKneeAirbagDeployed];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataEventStatus.class]) {
- return (SDLVehicleDataEventStatus *)obj;
- } else {
- return [SDLVehicleDataEventStatus valueOf:(NSString *)obj];
- }
+ return (SDLVehicleDataEventStatus)obj;
}
-- (void)setPassengerSideAirbagDeployed:(SDLVehicleDataEventStatus *)passengerSideAirbagDeployed {
+- (void)setPassengerSideAirbagDeployed:(SDLVehicleDataEventStatus)passengerSideAirbagDeployed {
if (passengerSideAirbagDeployed != nil) {
[store setObject:passengerSideAirbagDeployed forKey:NAMES_passengerSideAirbagDeployed];
} else {
@@ -130,16 +104,12 @@
}
}
-- (SDLVehicleDataEventStatus *)passengerSideAirbagDeployed {
+- (SDLVehicleDataEventStatus)passengerSideAirbagDeployed {
NSObject *obj = [store objectForKey:NAMES_passengerSideAirbagDeployed];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataEventStatus.class]) {
- return (SDLVehicleDataEventStatus *)obj;
- } else {
- return [SDLVehicleDataEventStatus valueOf:(NSString *)obj];
- }
+ return (SDLVehicleDataEventStatus)obj;
}
-- (void)setPassengerKneeAirbagDeployed:(SDLVehicleDataEventStatus *)passengerKneeAirbagDeployed {
+- (void)setPassengerKneeAirbagDeployed:(SDLVehicleDataEventStatus)passengerKneeAirbagDeployed {
if (passengerKneeAirbagDeployed != nil) {
[store setObject:passengerKneeAirbagDeployed forKey:NAMES_passengerKneeAirbagDeployed];
} else {
@@ -147,13 +117,9 @@
}
}
-- (SDLVehicleDataEventStatus *)passengerKneeAirbagDeployed {
+- (SDLVehicleDataEventStatus)passengerKneeAirbagDeployed {
NSObject *obj = [store objectForKey:NAMES_passengerKneeAirbagDeployed];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataEventStatus.class]) {
- return (SDLVehicleDataEventStatus *)obj;
- } else {
- return [SDLVehicleDataEventStatus valueOf:(NSString *)obj];
- }
+ return (SDLVehicleDataEventStatus)obj;
}
@end
diff --git a/SmartDeviceLink/SDLAmbientLightStatus.h b/SmartDeviceLink/SDLAmbientLightStatus.h
index c778c2104..3fb0d72db 100644
--- a/SmartDeviceLink/SDLAmbientLightStatus.h
+++ b/SmartDeviceLink/SDLAmbientLightStatus.h
@@ -8,19 +8,13 @@
* Reflects the status of the ambient light sensor
* @since SDL 3.0
*/
-@interface SDLAmbientLightStatus : SDLEnum {
-}
+typedef SDLEnum SDLAmbientLightStatus NS_EXTENSIBLE_STRING_ENUM;
-+ (SDLAmbientLightStatus *)valueOf:(NSString *)value;
-+ (NSArray *)values;
-
-+ (SDLAmbientLightStatus *)NIGHT;
-+ (SDLAmbientLightStatus *)TWILIGHT_1;
-+ (SDLAmbientLightStatus *)TWILIGHT_2;
-+ (SDLAmbientLightStatus *)TWILIGHT_3;
-+ (SDLAmbientLightStatus *)TWILIGHT_4;
-+ (SDLAmbientLightStatus *)DAY;
-+ (SDLAmbientLightStatus *)UNKNOWN;
-+ (SDLAmbientLightStatus *)INVALID;
-
-@end
+extern SDLAmbientLightStatus const SDLAmbientLightStatusNight;
+extern SDLAmbientLightStatus const SDLAmbientLightStatusTwilight1;
+extern SDLAmbientLightStatus const SDLAmbientLightStatusTwilight2;
+extern SDLAmbientLightStatus const SDLAmbientLightStatusTwilight3;
+extern SDLAmbientLightStatus const SDLAmbientLightStatusTwilight4;
+extern SDLAmbientLightStatus const SDLAmbientLightStatusDay;
+extern SDLAmbientLightStatus const SDLAmbientLightStatusUnknown;
+extern SDLAmbientLightStatus const SDLAmbientLightStatusInvalid;
diff --git a/SmartDeviceLink/SDLAmbientLightStatus.m b/SmartDeviceLink/SDLAmbientLightStatus.m
index 7fa21db4a..673b159fd 100644
--- a/SmartDeviceLink/SDLAmbientLightStatus.m
+++ b/SmartDeviceLink/SDLAmbientLightStatus.m
@@ -3,98 +3,11 @@
#import "SDLAmbientLightStatus.h"
-SDLAmbientLightStatus *SDLAmbientLightStatus_NIGHT = nil;
-SDLAmbientLightStatus *SDLAmbientLightStatus_TWILIGHT_1 = nil;
-SDLAmbientLightStatus *SDLAmbientLightStatus_TWILIGHT_2 = nil;
-SDLAmbientLightStatus *SDLAmbientLightStatus_TWILIGHT_3 = nil;
-SDLAmbientLightStatus *SDLAmbientLightStatus_TWILIGHT_4 = nil;
-SDLAmbientLightStatus *SDLAmbientLightStatus_DAY = nil;
-SDLAmbientLightStatus *SDLAmbientLightStatus_UNKNOWN = nil;
-SDLAmbientLightStatus *SDLAmbientLightStatus_INVALID = nil;
-
-NSArray *SDLAmbientLightStatus_values = nil;
-
-@implementation SDLAmbientLightStatus
-
-+ (SDLAmbientLightStatus *)valueOf:(NSString *)value {
- for (SDLAmbientLightStatus *item in SDLAmbientLightStatus.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLAmbientLightStatus_values == nil) {
- SDLAmbientLightStatus_values = @[
- SDLAmbientLightStatus.NIGHT,
- SDLAmbientLightStatus.TWILIGHT_1,
- SDLAmbientLightStatus.TWILIGHT_2,
- SDLAmbientLightStatus.TWILIGHT_3,
- SDLAmbientLightStatus.TWILIGHT_4,
- SDLAmbientLightStatus.DAY,
- SDLAmbientLightStatus.UNKNOWN,
- SDLAmbientLightStatus.INVALID,
- ];
- }
- return SDLAmbientLightStatus_values;
-}
-
-+ (SDLAmbientLightStatus *)NIGHT {
- if (SDLAmbientLightStatus_NIGHT == nil) {
- SDLAmbientLightStatus_NIGHT = [[SDLAmbientLightStatus alloc] initWithValue:@"NIGHT"];
- }
- return SDLAmbientLightStatus_NIGHT;
-}
-
-+ (SDLAmbientLightStatus *)TWILIGHT_1 {
- if (SDLAmbientLightStatus_TWILIGHT_1 == nil) {
- SDLAmbientLightStatus_TWILIGHT_1 = [[SDLAmbientLightStatus alloc] initWithValue:@"TWILIGHT_1"];
- }
- return SDLAmbientLightStatus_TWILIGHT_1;
-}
-
-+ (SDLAmbientLightStatus *)TWILIGHT_2 {
- if (SDLAmbientLightStatus_TWILIGHT_2 == nil) {
- SDLAmbientLightStatus_TWILIGHT_2 = [[SDLAmbientLightStatus alloc] initWithValue:@"TWILIGHT_2"];
- }
- return SDLAmbientLightStatus_TWILIGHT_2;
-}
-
-+ (SDLAmbientLightStatus *)TWILIGHT_3 {
- if (SDLAmbientLightStatus_TWILIGHT_3 == nil) {
- SDLAmbientLightStatus_TWILIGHT_3 = [[SDLAmbientLightStatus alloc] initWithValue:@"TWILIGHT_3"];
- }
- return SDLAmbientLightStatus_TWILIGHT_3;
-}
-
-+ (SDLAmbientLightStatus *)TWILIGHT_4 {
- if (SDLAmbientLightStatus_TWILIGHT_4 == nil) {
- SDLAmbientLightStatus_TWILIGHT_4 = [[SDLAmbientLightStatus alloc] initWithValue:@"TWILIGHT_4"];
- }
- return SDLAmbientLightStatus_TWILIGHT_4;
-}
-
-+ (SDLAmbientLightStatus *)DAY {
- if (SDLAmbientLightStatus_DAY == nil) {
- SDLAmbientLightStatus_DAY = [[SDLAmbientLightStatus alloc] initWithValue:@"DAY"];
- }
- return SDLAmbientLightStatus_DAY;
-}
-
-+ (SDLAmbientLightStatus *)UNKNOWN {
- if (SDLAmbientLightStatus_UNKNOWN == nil) {
- SDLAmbientLightStatus_UNKNOWN = [[SDLAmbientLightStatus alloc] initWithValue:@"UNKNOWN"];
- }
- return SDLAmbientLightStatus_UNKNOWN;
-}
-
-+ (SDLAmbientLightStatus *)INVALID {
- if (SDLAmbientLightStatus_INVALID == nil) {
- SDLAmbientLightStatus_INVALID = [[SDLAmbientLightStatus alloc] initWithValue:@"INVALID"];
- }
- return SDLAmbientLightStatus_INVALID;
-}
-
-@end
+SDLAmbientLightStatus const SDLAmbientLightStatusNight = @"NIGHT";
+SDLAmbientLightStatus const SDLAmbientLightStatusTwilight1 = @"TWILIGHT_1";
+SDLAmbientLightStatus const SDLAmbientLightStatusTwilight2 = @"TWILIGHT_2";
+SDLAmbientLightStatus const SDLAmbientLightStatusTwilight3 = @"TWILIGHT_3";
+SDLAmbientLightStatus const SDLAmbientLightStatusTwilight4 = @"TWILIGHT_4";
+SDLAmbientLightStatus const SDLAmbientLightStatusDay = @"DAY";
+SDLAmbientLightStatus const SDLAmbientLightStatusUnknown = @"UNKNOWN";
+SDLAmbientLightStatus const SDLAmbientLightStatusInvalid = @"INVALID";
diff --git a/SmartDeviceLink/SDLAppHMIType.h b/SmartDeviceLink/SDLAppHMIType.h
index 3aaa45170..3936282d0 100644
--- a/SmartDeviceLink/SDLAppHMIType.h
+++ b/SmartDeviceLink/SDLAppHMIType.h
@@ -9,88 +9,51 @@
*
* @since SDL 2.0
*/
-@interface SDLAppHMIType : SDLEnum {
-}
-
-/**
- * @abstract Convert String to AppHMIType
- *
- * @param value The value of the string to get an object for
- *
- * @return SDLAppHMIType
- */
-+ (SDLAppHMIType *)valueOf:(NSString *)value;
-
-/**
- * @abstract Store the enumeration of all possible SDLAppHMIType
- *
- * @return an array that store all possible SDLAppHMIType
- */
-+ (NSArray *)values;
+typedef SDLEnum SDLAppHMIType NS_EXTENSIBLE_STRING_ENUM;
/**
* @abstract The App will have default rights.
- *
- * @return SDLAppHMIType with value *DEFAULT*
*/
-+ (SDLAppHMIType *)DEFAULT;
+extern SDLAppHMIType SDLAppHMITypeDefault;
/**
* @abstract Communication type of App
- *
- * @return SDLAppHMIType with value *COMMUNICATION*
*/
-+ (SDLAppHMIType *)COMMUNICATION;
+extern SDLAppHMIType SDLAppHMITypeCommunication;
/**
* @abstract App dealing with Media
- *
- * @return SDLAppHMIType with value *MEDIA*
*/
-+ (SDLAppHMIType *)MEDIA;
+extern SDLAppHMIType SDLAppHMITypeMedia;
/**
* @abstract Messaging App
- *
- * @return SDLAppHMIType with value *MESSAGING*
*/
-+ (SDLAppHMIType *)MESSAGING;
+extern SDLAppHMIType SDLAppHMITypeMessaging;
/**
* @abstract Navigation App
- *
- * @return SDLAppHMIType with value *NAVIGATION*
*/
-+ (SDLAppHMIType *)NAVIGATION;
+extern SDLAppHMIType SDLAppHMITypeNavigation;
/**
* @abstract Information App
- *
- * @return SDLAppHMIType with value *INFORMATION*
*/
-+ (SDLAppHMIType *)INFORMATION;
+extern SDLAppHMIType SDLAppHMITypeInformation;
/**
* @abstract App dealing with social media
- *
- * @return SDLAppHMIType with value *SOCIAL*
*/
-+ (SDLAppHMIType *)SOCIAL;
+extern SDLAppHMIType SDLAppHMITypeSocial;
-+ (SDLAppHMIType *)BACKGROUND_PROCESS;
+extern SDLAppHMIType SDLAppHMITypeBackgroundProcess;
/**
* @abstract App only for Testing purposes
- *
- * @return SDLAppHMIType with value *TESTING*
*/
-+ (SDLAppHMIType *)TESTING;
+extern SDLAppHMIType SDLAppHMITypeTesting;
/**
* @abstract System App
- *
- * @return SDLAppHMIType with value *SYSTEM*
*/
-+ (SDLAppHMIType *)SYSTEM;
-
-@end
+extern SDLAppHMIType SDLAppHMITypeSystem;
diff --git a/SmartDeviceLink/SDLAppHMIType.m b/SmartDeviceLink/SDLAppHMIType.m
index f09f3af44..7af83d103 100644
--- a/SmartDeviceLink/SDLAppHMIType.m
+++ b/SmartDeviceLink/SDLAppHMIType.m
@@ -4,116 +4,13 @@
#import "SDLAppHMIType.h"
-SDLAppHMIType *SDLAppHMIType_DEFAULT = nil;
-SDLAppHMIType *SDLAppHMIType_COMMUNICATION = nil;
-SDLAppHMIType *SDLAppHMIType_MEDIA = nil;
-SDLAppHMIType *SDLAppHMIType_MESSAGING = nil;
-SDLAppHMIType *SDLAppHMIType_NAVIGATION = nil;
-SDLAppHMIType *SDLAppHMIType_INFORMATION = nil;
-SDLAppHMIType *SDLAppHMIType_SOCIAL = nil;
-SDLAppHMIType *SDLAppHMIType_BACKGROUND_PROCESS = nil;
-SDLAppHMIType *SDLAppHMIType_TESTING = nil;
-SDLAppHMIType *SDLAppHMIType_SYSTEM = nil;
-
-NSArray *SDLAppHMIType_values = nil;
-
-@implementation SDLAppHMIType
-
-+ (SDLAppHMIType *)valueOf:(NSString *)value {
- for (SDLAppHMIType *item in SDLAppHMIType.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLAppHMIType_values == nil) {
- SDLAppHMIType_values = @[
- SDLAppHMIType.DEFAULT,
- SDLAppHMIType.COMMUNICATION,
- SDLAppHMIType.MEDIA,
- SDLAppHMIType.MESSAGING,
- SDLAppHMIType.NAVIGATION,
- SDLAppHMIType.INFORMATION,
- SDLAppHMIType.SOCIAL,
- SDLAppHMIType.BACKGROUND_PROCESS,
- SDLAppHMIType.TESTING,
- SDLAppHMIType.SYSTEM,
- ];
- }
- return SDLAppHMIType_values;
-}
-
-+ (SDLAppHMIType *)DEFAULT {
- if (SDLAppHMIType_DEFAULT == nil) {
- SDLAppHMIType_DEFAULT = [[SDLAppHMIType alloc] initWithValue:@"DEFAULT"];
- }
- return SDLAppHMIType_DEFAULT;
-}
-
-+ (SDLAppHMIType *)COMMUNICATION {
- if (SDLAppHMIType_COMMUNICATION == nil) {
- SDLAppHMIType_COMMUNICATION = [[SDLAppHMIType alloc] initWithValue:@"COMMUNICATION"];
- }
- return SDLAppHMIType_COMMUNICATION;
-}
-
-+ (SDLAppHMIType *)MEDIA {
- if (SDLAppHMIType_MEDIA == nil) {
- SDLAppHMIType_MEDIA = [[SDLAppHMIType alloc] initWithValue:@"MEDIA"];
- }
- return SDLAppHMIType_MEDIA;
-}
-
-+ (SDLAppHMIType *)MESSAGING {
- if (SDLAppHMIType_MESSAGING == nil) {
- SDLAppHMIType_MESSAGING = [[SDLAppHMIType alloc] initWithValue:@"MESSAGING"];
- }
- return SDLAppHMIType_MESSAGING;
-}
-
-+ (SDLAppHMIType *)NAVIGATION {
- if (SDLAppHMIType_NAVIGATION == nil) {
- SDLAppHMIType_NAVIGATION = [[SDLAppHMIType alloc] initWithValue:@"NAVIGATION"];
- }
- return SDLAppHMIType_NAVIGATION;
-}
-
-+ (SDLAppHMIType *)INFORMATION {
- if (SDLAppHMIType_INFORMATION == nil) {
- SDLAppHMIType_INFORMATION = [[SDLAppHMIType alloc] initWithValue:@"INFORMATION"];
- }
- return SDLAppHMIType_INFORMATION;
-}
-
-+ (SDLAppHMIType *)SOCIAL {
- if (SDLAppHMIType_SOCIAL == nil) {
- SDLAppHMIType_SOCIAL = [[SDLAppHMIType alloc] initWithValue:@"SOCIAL"];
- }
- return SDLAppHMIType_SOCIAL;
-}
-
-+ (SDLAppHMIType *)BACKGROUND_PROCESS {
- if (SDLAppHMIType_BACKGROUND_PROCESS == nil) {
- SDLAppHMIType_BACKGROUND_PROCESS = [[SDLAppHMIType alloc] initWithValue:@"BACKGROUND_PROCESS"];
- }
- return SDLAppHMIType_BACKGROUND_PROCESS;
-}
-
-+ (SDLAppHMIType *)TESTING {
- if (SDLAppHMIType_TESTING == nil) {
- SDLAppHMIType_TESTING = [[SDLAppHMIType alloc] initWithValue:@"TESTING"];
- }
- return SDLAppHMIType_TESTING;
-}
-
-+ (SDLAppHMIType *)SYSTEM {
- if (SDLAppHMIType_SYSTEM == nil) {
- SDLAppHMIType_SYSTEM = [[SDLAppHMIType alloc] initWithValue:@"SYSTEM"];
- }
- return SDLAppHMIType_SYSTEM;
-}
-
-@end
+SDLAppHMIType SDLAppHMITypeDefault = @"DEFAULT";
+SDLAppHMIType SDLAppHMITypeCommunication = @"COMMUNICATION";
+SDLAppHMIType SDLAppHMITypeMedia = @"MEDIA";
+SDLAppHMIType SDLAppHMITypeMessaging = @"MESSAGING";
+SDLAppHMIType SDLAppHMITypeNavigation = @"NAVIGATION";
+SDLAppHMIType SDLAppHMITypeInformation = @"INFORMATION";
+SDLAppHMIType SDLAppHMITypeSocial = @"SOCIAL";
+SDLAppHMIType SDLAppHMITypeBackgroundProcess = @"BACKGROUND_PROCESS";
+SDLAppHMIType SDLAppHMITypeTesting = @"TESTING";
+SDLAppHMIType SDLAppHMITypeSystem = @"SYSTEM";
diff --git a/SmartDeviceLink/SDLAppInterfaceUnregisteredReason.h b/SmartDeviceLink/SDLAppInterfaceUnregisteredReason.h
index 4fce3ba16..94ee05708 100644
--- a/SmartDeviceLink/SDLAppInterfaceUnregisteredReason.h
+++ b/SmartDeviceLink/SDLAppInterfaceUnregisteredReason.h
@@ -9,95 +9,57 @@
*
* @since SDL 1.0
*/
-@interface SDLAppInterfaceUnregisteredReason : SDLEnum {
-}
+typedef SDLEnum SDLAppInterfaceUnregisteredReason NS_EXTENSIBLE_STRING_ENUM;
-/**
- * @abstract Convert String to SDLAppInterfaceUnregisteredReason
- *
- * @param value String value to retrieve the object for
- *
- * @return SDLAppInterfaceUnregisteredReason
- */
-+ (SDLAppInterfaceUnregisteredReason *)valueOf:(NSString *)value;
-
-/**
- * @abstract Store the enumeration of all possible SDLAppInterfaceUnregisteredReason
- *
- * @return an array that stores all possible SDLAppInterfaceUnregisteredReason
- */
-+ (NSArray *)values;
/**
* @abstract Vehicle ignition turned off.
- *
- * @return SDLAppInterfaceUnregisteredReason with value *IGNITION_OFF*
*/
-+ (SDLAppInterfaceUnregisteredReason *)IGNITION_OFF;
+extern SDLAppInterfaceUnregisteredReason const SDLAppInterfaceUnregisteredReasonIgnitionOff;
/**
* @abstract Bluetooth was turned off, causing termination of a necessary Bluetooth connection.
- *
- * @return SDLAppInterfaceUnregisteredReason with value *BLUETOOTH_OFF*
*/
-+ (SDLAppInterfaceUnregisteredReason *)BLUETOOTH_OFF;
+extern SDLAppInterfaceUnregisteredReason const SDLAppInterfaceUnregisteredReasonBluetoothOff;
/**
* @abstract USB was disconnected, causing termination of a necessary iAP connection.
- *
- * @return SDLAppInterfaceUnregisteredReason with value *USB_DISCONNECTED*
*/
-+ (SDLAppInterfaceUnregisteredReason *)USB_DISCONNECTED;
+extern SDLAppInterfaceUnregisteredReason const SDLAppInterfaceUnregisteredReasonUsbDisconnected;
/**
* @abstract Application attempted SmartDeviceLink RPC request while HMILevel = NONE. App must have HMILevel other than NONE to issue RPC requests or get notifications or RPC responses.
- *
- * @return SDLAppInterfaceUnregisteredReason with value *REQUEST_WHILE_IN_NONE_HMI_LEVEL*
*/
-+ (SDLAppInterfaceUnregisteredReason *)REQUEST_WHILE_IN_NONE_HMI_LEVEL;
+extern SDLAppInterfaceUnregisteredReason const SDLAppInterfaceUnregisteredReasonRequestWhileInNoneHmiLevel;
/**
* @abstract Either too many -- or too many per unit of time -- requests were made by the application.
- *
- * @return SDLAppInterfaceUnregisteredReason with value *TOO_MANY_REQUESTS*
*/
-+ (SDLAppInterfaceUnregisteredReason *)TOO_MANY_REQUESTS;
+extern SDLAppInterfaceUnregisteredReason const SDLAppInterfaceUnregisteredReasonTooManyRequests;
/**
* @abstract The application has issued requests which cause driver distraction rules to be violated.
- *
- * @return SDLAppInterfaceUnregisteredReason with value *DRIVER_DISTRACTION_VIOLATION*
*/
-+ (SDLAppInterfaceUnregisteredReason *)DRIVER_DISTRACTION_VIOLATION;
+extern SDLAppInterfaceUnregisteredReason const SDLAppInterfaceUnregisteredReasonDriverDistractionViolation;
/**
* @abstract The user performed a language change on the SDL platform, causing the application to need to be reregistered for the new language.
- *
- * @return SDLAppInterfaceUnregisteredReason with value *LANGUAGE_CHANGE*
*/
-+ (SDLAppInterfaceUnregisteredReason *)LANGUAGE_CHANGE;
+extern SDLAppInterfaceUnregisteredReason const SDLAppInterfaceUnregisteredReasonLanguageChange;
/**
* @abstract The user performed a MASTER RESET on the SDL platform, causing removal of a necessary Bluetooth pairing.
- *
- * @return SDLAppInterfaceUnregisteredReason with value *MASTER_RESET*
*/
-+ (SDLAppInterfaceUnregisteredReason *)MASTER_RESET;
+extern SDLAppInterfaceUnregisteredReason const SDLAppInterfaceUnregisteredReasonMasterReset;
/**
* @abstract The user restored settings to FACTORY DEFAULTS on the SDL platform.
- *
- * @return SDLAppInterfaceUnregisteredReason with value *FACTORY_DEFAULTS*
*/
-+ (SDLAppInterfaceUnregisteredReason *)FACTORY_DEFAULTS;
+extern SDLAppInterfaceUnregisteredReason const SDLAppInterfaceUnregisteredReasonFactoryDefaults;
/**
* @abstract The app is not being authorized to be connected to SDL.
*
- * @return SDLAppInterfaceUnregisteredReason with value *APP_UNAUTHORIZED*
- *
* @since SDL 2.0
*/
-+ (SDLAppInterfaceUnregisteredReason *)APP_UNAUTHORIZED;
-
-@end
+extern SDLAppInterfaceUnregisteredReason const SDLAppInterfaceUnregisteredReasonAppUnauthorized;
diff --git a/SmartDeviceLink/SDLAppInterfaceUnregisteredReason.m b/SmartDeviceLink/SDLAppInterfaceUnregisteredReason.m
index 72c19a8f5..c42d380e2 100644
--- a/SmartDeviceLink/SDLAppInterfaceUnregisteredReason.m
+++ b/SmartDeviceLink/SDLAppInterfaceUnregisteredReason.m
@@ -3,116 +3,14 @@
#import "SDLAppInterfaceUnregisteredReason.h"
-SDLAppInterfaceUnregisteredReason *SDLAppInterfaceUnregisteredReason_IGNITION_OFF = nil;
-SDLAppInterfaceUnregisteredReason *SDLAppInterfaceUnregisteredReason_BLUETOOTH_OFF = nil;
-SDLAppInterfaceUnregisteredReason *SDLAppInterfaceUnregisteredReason_USB_DISCONNECTED = nil;
-SDLAppInterfaceUnregisteredReason *SDLAppInterfaceUnregisteredReason_REQUEST_WHILE_IN_NONE_HMI_LEVEL = nil;
-SDLAppInterfaceUnregisteredReason *SDLAppInterfaceUnregisteredReason_TOO_MANY_REQUESTS = nil;
-SDLAppInterfaceUnregisteredReason *SDLAppInterfaceUnregisteredReason_DRIVER_DISTRACTION_VIOLATION = nil;
-SDLAppInterfaceUnregisteredReason *SDLAppInterfaceUnregisteredReason_LANGUAGE_CHANGE = nil;
-SDLAppInterfaceUnregisteredReason *SDLAppInterfaceUnregisteredReason_MASTER_RESET = nil;
-SDLAppInterfaceUnregisteredReason *SDLAppInterfaceUnregisteredReason_FACTORY_DEFAULTS = nil;
-SDLAppInterfaceUnregisteredReason *SDLAppInterfaceUnregisteredReason_APP_UNAUTHORIZED = nil;
-NSArray *SDLAppInterfaceUnregisteredReason_values = nil;
-
-@implementation SDLAppInterfaceUnregisteredReason
-
-+ (SDLAppInterfaceUnregisteredReason *)valueOf:(NSString *)value {
- for (SDLAppInterfaceUnregisteredReason *item in SDLAppInterfaceUnregisteredReason.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLAppInterfaceUnregisteredReason_values == nil) {
- SDLAppInterfaceUnregisteredReason_values = @[
- SDLAppInterfaceUnregisteredReason.IGNITION_OFF,
- SDLAppInterfaceUnregisteredReason.BLUETOOTH_OFF,
- SDLAppInterfaceUnregisteredReason.USB_DISCONNECTED,
- SDLAppInterfaceUnregisteredReason.REQUEST_WHILE_IN_NONE_HMI_LEVEL,
- SDLAppInterfaceUnregisteredReason.TOO_MANY_REQUESTS,
- SDLAppInterfaceUnregisteredReason.DRIVER_DISTRACTION_VIOLATION,
- SDLAppInterfaceUnregisteredReason.LANGUAGE_CHANGE,
- SDLAppInterfaceUnregisteredReason.MASTER_RESET,
- SDLAppInterfaceUnregisteredReason.FACTORY_DEFAULTS,
- SDLAppInterfaceUnregisteredReason.APP_UNAUTHORIZED,
- ];
- }
- return SDLAppInterfaceUnregisteredReason_values;
-}
-
-+ (SDLAppInterfaceUnregisteredReason *)IGNITION_OFF {
- if (SDLAppInterfaceUnregisteredReason_IGNITION_OFF == nil) {
- SDLAppInterfaceUnregisteredReason_IGNITION_OFF = [[SDLAppInterfaceUnregisteredReason alloc] initWithValue:@"IGNITION_OFF"];
- }
- return SDLAppInterfaceUnregisteredReason_IGNITION_OFF;
-}
-
-+ (SDLAppInterfaceUnregisteredReason *)BLUETOOTH_OFF {
- if (SDLAppInterfaceUnregisteredReason_BLUETOOTH_OFF == nil) {
- SDLAppInterfaceUnregisteredReason_BLUETOOTH_OFF = [[SDLAppInterfaceUnregisteredReason alloc] initWithValue:@"BLUETOOTH_OFF"];
- }
- return SDLAppInterfaceUnregisteredReason_BLUETOOTH_OFF;
-}
-
-+ (SDLAppInterfaceUnregisteredReason *)USB_DISCONNECTED {
- if (SDLAppInterfaceUnregisteredReason_USB_DISCONNECTED == nil) {
- SDLAppInterfaceUnregisteredReason_USB_DISCONNECTED = [[SDLAppInterfaceUnregisteredReason alloc] initWithValue:@"USB_DISCONNECTED"];
- }
- return SDLAppInterfaceUnregisteredReason_USB_DISCONNECTED;
-}
-
-+ (SDLAppInterfaceUnregisteredReason *)REQUEST_WHILE_IN_NONE_HMI_LEVEL {
- if (SDLAppInterfaceUnregisteredReason_REQUEST_WHILE_IN_NONE_HMI_LEVEL == nil) {
- SDLAppInterfaceUnregisteredReason_REQUEST_WHILE_IN_NONE_HMI_LEVEL = [[SDLAppInterfaceUnregisteredReason alloc] initWithValue:@"REQUEST_WHILE_IN_NONE_HMI_LEVEL"];
- }
- return SDLAppInterfaceUnregisteredReason_REQUEST_WHILE_IN_NONE_HMI_LEVEL;
-}
-
-+ (SDLAppInterfaceUnregisteredReason *)TOO_MANY_REQUESTS {
- if (SDLAppInterfaceUnregisteredReason_TOO_MANY_REQUESTS == nil) {
- SDLAppInterfaceUnregisteredReason_TOO_MANY_REQUESTS = [[SDLAppInterfaceUnregisteredReason alloc] initWithValue:@"TOO_MANY_REQUESTS"];
- }
- return SDLAppInterfaceUnregisteredReason_TOO_MANY_REQUESTS;
-}
-
-+ (SDLAppInterfaceUnregisteredReason *)DRIVER_DISTRACTION_VIOLATION {
- if (SDLAppInterfaceUnregisteredReason_DRIVER_DISTRACTION_VIOLATION == nil) {
- SDLAppInterfaceUnregisteredReason_DRIVER_DISTRACTION_VIOLATION = [[SDLAppInterfaceUnregisteredReason alloc] initWithValue:@"DRIVER_DISTRACTION_VIOLATION"];
- }
- return SDLAppInterfaceUnregisteredReason_DRIVER_DISTRACTION_VIOLATION;
-}
-
-+ (SDLAppInterfaceUnregisteredReason *)LANGUAGE_CHANGE {
- if (SDLAppInterfaceUnregisteredReason_LANGUAGE_CHANGE == nil) {
- SDLAppInterfaceUnregisteredReason_LANGUAGE_CHANGE = [[SDLAppInterfaceUnregisteredReason alloc] initWithValue:@"LANGUAGE_CHANGE"];
- }
- return SDLAppInterfaceUnregisteredReason_LANGUAGE_CHANGE;
-}
-
-+ (SDLAppInterfaceUnregisteredReason *)MASTER_RESET {
- if (SDLAppInterfaceUnregisteredReason_MASTER_RESET == nil) {
- SDLAppInterfaceUnregisteredReason_MASTER_RESET = [[SDLAppInterfaceUnregisteredReason alloc] initWithValue:@"MASTER_RESET"];
- }
- return SDLAppInterfaceUnregisteredReason_MASTER_RESET;
-}
-
-+ (SDLAppInterfaceUnregisteredReason *)FACTORY_DEFAULTS {
- if (SDLAppInterfaceUnregisteredReason_FACTORY_DEFAULTS == nil) {
- SDLAppInterfaceUnregisteredReason_FACTORY_DEFAULTS = [[SDLAppInterfaceUnregisteredReason alloc] initWithValue:@"FACTORY_DEFAULTS"];
- }
- return SDLAppInterfaceUnregisteredReason_FACTORY_DEFAULTS;
-}
-
-+ (SDLAppInterfaceUnregisteredReason *)APP_UNAUTHORIZED {
- if (SDLAppInterfaceUnregisteredReason_APP_UNAUTHORIZED == nil) {
- SDLAppInterfaceUnregisteredReason_APP_UNAUTHORIZED = [[SDLAppInterfaceUnregisteredReason alloc] initWithValue:@"APP_UNAUTHORIZED"];
- }
- return SDLAppInterfaceUnregisteredReason_APP_UNAUTHORIZED;
-}
-
-@end
+SDLAppInterfaceUnregisteredReason const SDLAppInterfaceUnregisteredReasonIgnitionOff = @"IGNITION_OFF";
+SDLAppInterfaceUnregisteredReason const SDLAppInterfaceUnregisteredReasonBluetoothOff = @"BLUETOOTH_OFF";
+SDLAppInterfaceUnregisteredReason const SDLAppInterfaceUnregisteredReasonUsbDisconnected = @"USB_DISCONNECTED";
+SDLAppInterfaceUnregisteredReason const SDLAppInterfaceUnregisteredReasonRequestWhileInNoneHmiLevel = @"REQUEST_WHILE_IN_NONE_HMI_LEVEL";
+SDLAppInterfaceUnregisteredReason const SDLAppInterfaceUnregisteredReasonTooManyRequests = @"TOO_MANY_REQUESTS";
+SDLAppInterfaceUnregisteredReason const SDLAppInterfaceUnregisteredReasonDriverDistractionViolation = @"DRIVER_DISTRACTION_VIOLATION";
+SDLAppInterfaceUnregisteredReason const SDLAppInterfaceUnregisteredReasonLanguageChange = @"LANGUAGE_CHANGE";
+SDLAppInterfaceUnregisteredReason const SDLAppInterfaceUnregisteredReasonMasterReset = @"MASTER_RESET";
+SDLAppInterfaceUnregisteredReason const SDLAppInterfaceUnregisteredReasonFactoryDefaults = @"FACTORY_DEFAULTS";
+SDLAppInterfaceUnregisteredReason const SDLAppInterfaceUnregisteredReasonAppUnauthorized = @"APP_UNAUTHORIZED";
diff --git a/SmartDeviceLink/SDLAudioPassThruCapabilities.h b/SmartDeviceLink/SDLAudioPassThruCapabilities.h
index 96772b62b..af15629ca 100644
--- a/SmartDeviceLink/SDLAudioPassThruCapabilities.h
+++ b/SmartDeviceLink/SDLAudioPassThruCapabilities.h
@@ -3,9 +3,9 @@
#import "SDLRPCMessage.h"
-@class SDLAudioType;
-@class SDLBitsPerSample;
-@class SDLSamplingRate;
+#import "SDLAudioType.h"
+#import "SDLBitsPerSample.h"
+#import "SDLSamplingRate.h"
/**
@@ -59,16 +59,16 @@
* @abstract The sampling rate for AudioPassThru<br>
*
*/
-@property (strong) SDLSamplingRate *samplingRate;
+@property (strong) SDLSamplingRate samplingRate;
/**
* @abstract The sample depth in bit for AudioPassThru<br>
*
*/
-@property (strong) SDLBitsPerSample *bitsPerSample;
+@property (strong) SDLBitsPerSample bitsPerSample;
/**
* @abstract The audiotype for AudioPassThru<br>
*
*/
-@property (strong) SDLAudioType *audioType;
+@property (strong) SDLAudioType audioType;
@end
diff --git a/SmartDeviceLink/SDLAudioPassThruCapabilities.m b/SmartDeviceLink/SDLAudioPassThruCapabilities.m
index fbb02be84..45493d933 100644
--- a/SmartDeviceLink/SDLAudioPassThruCapabilities.m
+++ b/SmartDeviceLink/SDLAudioPassThruCapabilities.m
@@ -4,10 +4,7 @@
#import "SDLAudioPassThruCapabilities.h"
-#import "SDLAudioType.h"
-#import "SDLBitsPerSample.h"
#import "SDLNames.h"
-#import "SDLSamplingRate.h"
@implementation SDLAudioPassThruCapabilities
@@ -24,7 +21,7 @@
return self;
}
-- (void)setSamplingRate:(SDLSamplingRate *)samplingRate {
+- (void)setSamplingRate:(SDLSamplingRate)samplingRate {
if (samplingRate != nil) {
[store setObject:samplingRate forKey:NAMES_samplingRate];
} else {
@@ -32,16 +29,12 @@
}
}
-- (SDLSamplingRate *)samplingRate {
+- (SDLSamplingRate)samplingRate {
NSObject *obj = [store objectForKey:NAMES_samplingRate];
- if (obj == nil || [obj isKindOfClass:SDLSamplingRate.class]) {
- return (SDLSamplingRate *)obj;
- } else {
- return [SDLSamplingRate valueOf:(NSString *)obj];
- }
+ return (SDLSamplingRate)obj;
}
-- (void)setBitsPerSample:(SDLBitsPerSample *)bitsPerSample {
+- (void)setBitsPerSample:(SDLBitsPerSample)bitsPerSample {
if (bitsPerSample != nil) {
[store setObject:bitsPerSample forKey:NAMES_bitsPerSample];
} else {
@@ -49,16 +42,12 @@
}
}
-- (SDLBitsPerSample *)bitsPerSample {
+- (SDLBitsPerSample)bitsPerSample {
NSObject *obj = [store objectForKey:NAMES_bitsPerSample];
- if (obj == nil || [obj isKindOfClass:SDLBitsPerSample.class]) {
- return (SDLBitsPerSample *)obj;
- } else {
- return [SDLBitsPerSample valueOf:(NSString *)obj];
- }
+ return (SDLBitsPerSample)obj;
}
-- (void)setAudioType:(SDLAudioType *)audioType {
+- (void)setAudioType:(SDLAudioType)audioType {
if (audioType != nil) {
[store setObject:audioType forKey:NAMES_audioType];
} else {
@@ -66,13 +55,9 @@
}
}
-- (SDLAudioType *)audioType {
+- (SDLAudioType)audioType {
NSObject *obj = [store objectForKey:NAMES_audioType];
- if (obj == nil || [obj isKindOfClass:SDLAudioType.class]) {
- return (SDLAudioType *)obj;
- } else {
- return [SDLAudioType valueOf:(NSString *)obj];
- }
+ return (SDLAudioType)obj;
}
@end
diff --git a/SmartDeviceLink/SDLAudioStreamingState.h b/SmartDeviceLink/SDLAudioStreamingState.h
index 3f364495e..eed0c3772 100644
--- a/SmartDeviceLink/SDLAudioStreamingState.h
+++ b/SmartDeviceLink/SDLAudioStreamingState.h
@@ -9,44 +9,21 @@
*
* @since SDL 1.0
*/
-@interface SDLAudioStreamingState : SDLEnum {
-}
+typedef SDLEnum SDLAudioStreamingState NS_EXTENSIBLE_STRING_ENUM;
/**
- * @abstract Convert String to SDLAudioStreamingState
- *
- * @param value The value of the string to get an object for
- *
- * @return SDLAudioStreamingState
- */
-+ (SDLAudioStreamingState *)valueOf:(NSString *)value;
-
-/**
- * @abstract Store the enumeration of all possible SDLAudioStreamingState
- *
- * @return an array that store all possible SDLAudioStreamingState
- */
-+ (NSArray *)values;
-/**
* @abstract Currently streaming audio, if any, is audible to user.
- *
- * @return SDLAudioStreamingState with value of *AUDIBLE*
*/
-+ (SDLAudioStreamingState *)AUDIBLE;
+extern SDLAudioStreamingState SDLAudioStreamingStateAudible;
/**
* @abstract Some kind of audio mixing is taking place. Currently streaming audio, if any, is audible to the user at a lowered volume.
*
- * @return SDLAudioStreamingState with value of *ATTENUATED*
- *
* @since SDL 2.0
*/
-+ (SDLAudioStreamingState *)ATTENUATED;
+extern SDLAudioStreamingState SDLAudioStreamingStateAttenuated;
/**
* @abstract Currently streaming audio, if any, is not audible to user. made via VR session.
- *
- * @return SDLAudioStreamingState with value of *NOT_AUDIBLE*
*/
-+ (SDLAudioStreamingState *)NOT_AUDIBLE;
-@end
+extern SDLAudioStreamingState SDLAudioStreamingStateNotAudible;
diff --git a/SmartDeviceLink/SDLAudioStreamingState.m b/SmartDeviceLink/SDLAudioStreamingState.m
index 38b8676c3..efcdbcb17 100644
--- a/SmartDeviceLink/SDLAudioStreamingState.m
+++ b/SmartDeviceLink/SDLAudioStreamingState.m
@@ -4,53 +4,6 @@
#import "SDLAudioStreamingState.h"
-SDLAudioStreamingState *SDLAudioStreamingState_AUDIBLE = nil;
-SDLAudioStreamingState *SDLAudioStreamingState_ATTENUATED = nil;
-SDLAudioStreamingState *SDLAudioStreamingState_NOT_AUDIBLE = nil;
-
-NSArray *SDLAudioStreamingState_values = nil;
-
-@implementation SDLAudioStreamingState
-
-+ (SDLAudioStreamingState *)valueOf:(NSString *)value {
- for (SDLAudioStreamingState *item in SDLAudioStreamingState.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLAudioStreamingState_values == nil) {
- SDLAudioStreamingState_values = @[
- SDLAudioStreamingState.AUDIBLE,
- SDLAudioStreamingState.ATTENUATED,
- SDLAudioStreamingState.NOT_AUDIBLE,
- ];
- }
- return SDLAudioStreamingState_values;
-}
-
-+ (SDLAudioStreamingState *)AUDIBLE {
- if (SDLAudioStreamingState_AUDIBLE == nil) {
- SDLAudioStreamingState_AUDIBLE = [[SDLAudioStreamingState alloc] initWithValue:@"AUDIBLE"];
- }
- return SDLAudioStreamingState_AUDIBLE;
-}
-
-+ (SDLAudioStreamingState *)ATTENUATED {
- if (SDLAudioStreamingState_ATTENUATED == nil) {
- SDLAudioStreamingState_ATTENUATED = [[SDLAudioStreamingState alloc] initWithValue:@"ATTENUATED"];
- }
- return SDLAudioStreamingState_ATTENUATED;
-}
-
-+ (SDLAudioStreamingState *)NOT_AUDIBLE {
- if (SDLAudioStreamingState_NOT_AUDIBLE == nil) {
- SDLAudioStreamingState_NOT_AUDIBLE = [[SDLAudioStreamingState alloc] initWithValue:@"NOT_AUDIBLE"];
- }
- return SDLAudioStreamingState_NOT_AUDIBLE;
-}
-
-@end
+SDLAudioStreamingState SDLAudioStreamingStateAudible = @"AUDIBLE";
+SDLAudioStreamingState SDLAudioStreamingStateAttentuated = @"ATTENUATED";
+SDLAudioStreamingState SDLAudioStreamingStateNotAudible = @"NOT_AUDIBLE";
diff --git a/SmartDeviceLink/SDLAudioType.h b/SmartDeviceLink/SDLAudioType.h
index 2f1879eea..1c0c34798 100644
--- a/SmartDeviceLink/SDLAudioType.h
+++ b/SmartDeviceLink/SDLAudioType.h
@@ -7,32 +7,12 @@
/**
Describes different audio type options for PerformAudioPassThru
*/
-@interface SDLAudioType : SDLEnum {
-}
-
-/**
- * @abstract Convert String to SDLAudioType
- *
- * @param value The value of the string to get an object for
- *
- * @return SDLAudioType
- */
-+ (SDLAudioType *)valueOf:(NSString *)value;
-
-/**
- * @abstract Store the enumeration of all possible SDLAudioType
- *
- * @return an array that store all possible SDLAudioType
- */
-+ (NSArray *)values;
+typedef SDLEnum SDLAudioType NS_EXTENSIBLE_STRING_ENUM;
/**
* @abstract PCM raw audio
*
- * @return SDLAudioType with value of *PCM*
- *
* @since SDL 2.0
*/
-+ (SDLAudioType *)PCM;
+extern SDLAudioType const SDLAudioTypePcm;
-@end \ No newline at end of file
diff --git a/SmartDeviceLink/SDLAudioType.m b/SmartDeviceLink/SDLAudioType.m
index 5e99123c7..02c981011 100644
--- a/SmartDeviceLink/SDLAudioType.m
+++ b/SmartDeviceLink/SDLAudioType.m
@@ -3,35 +3,4 @@
#import "SDLAudioType.h"
-SDLAudioType *SDLAudioType_PCM = nil;
-
-NSArray *SDLAudioType_values = nil;
-
-@implementation SDLAudioType
-
-+ (SDLAudioType *)valueOf:(NSString *)value {
- for (SDLAudioType *item in SDLAudioType.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLAudioType_values == nil) {
- SDLAudioType_values = @[
- SDLAudioType.PCM,
- ];
- }
- return SDLAudioType_values;
-}
-
-+ (SDLAudioType *)PCM {
- if (SDLAudioType_PCM == nil) {
- SDLAudioType_PCM = [[SDLAudioType alloc] initWithValue:@"PCM"];
- }
- return SDLAudioType_PCM;
-}
-
-@end
+SDLAudioType const SDLAudioTypePcm = @"PCM";
diff --git a/SmartDeviceLink/SDLBeltStatus.h b/SmartDeviceLink/SDLBeltStatus.h
index d12e42eb7..7721c4cef 100644
--- a/SmartDeviceLink/SDLBeltStatus.h
+++ b/SmartDeviceLink/SDLBeltStatus.h
@@ -3,8 +3,7 @@
#import "SDLRPCMessage.h"
-@class SDLVehicleDataEventStatus;
-
+#import "SDLVehicleDataEventStatus.h"
@interface SDLBeltStatus : SDLRPCStruct {
}
@@ -12,20 +11,20 @@
- (instancetype)init;
- (instancetype)initWithDictionary:(NSMutableDictionary *)dict;
-@property (strong) SDLVehicleDataEventStatus *driverBeltDeployed;
-@property (strong) SDLVehicleDataEventStatus *passengerBeltDeployed;
-@property (strong) SDLVehicleDataEventStatus *passengerBuckleBelted;
-@property (strong) SDLVehicleDataEventStatus *driverBuckleBelted;
-@property (strong) SDLVehicleDataEventStatus *leftRow2BuckleBelted;
-@property (strong) SDLVehicleDataEventStatus *passengerChildDetected;
-@property (strong) SDLVehicleDataEventStatus *rightRow2BuckleBelted;
-@property (strong) SDLVehicleDataEventStatus *middleRow2BuckleBelted;
-@property (strong) SDLVehicleDataEventStatus *middleRow3BuckleBelted;
-@property (strong) SDLVehicleDataEventStatus *leftRow3BuckleBelted;
-@property (strong) SDLVehicleDataEventStatus *rightRow3BuckleBelted;
-@property (strong) SDLVehicleDataEventStatus *leftRearInflatableBelted;
-@property (strong) SDLVehicleDataEventStatus *rightRearInflatableBelted;
-@property (strong) SDLVehicleDataEventStatus *middleRow1BeltDeployed;
-@property (strong) SDLVehicleDataEventStatus *middleRow1BuckleBelted;
+@property (strong) SDLVehicleDataEventStatus driverBeltDeployed;
+@property (strong) SDLVehicleDataEventStatus passengerBeltDeployed;
+@property (strong) SDLVehicleDataEventStatus passengerBuckleBelted;
+@property (strong) SDLVehicleDataEventStatus driverBuckleBelted;
+@property (strong) SDLVehicleDataEventStatus leftRow2BuckleBelted;
+@property (strong) SDLVehicleDataEventStatus passengerChildDetected;
+@property (strong) SDLVehicleDataEventStatus rightRow2BuckleBelted;
+@property (strong) SDLVehicleDataEventStatus middleRow2BuckleBelted;
+@property (strong) SDLVehicleDataEventStatus middleRow3BuckleBelted;
+@property (strong) SDLVehicleDataEventStatus leftRow3BuckleBelted;
+@property (strong) SDLVehicleDataEventStatus rightRow3BuckleBelted;
+@property (strong) SDLVehicleDataEventStatus leftRearInflatableBelted;
+@property (strong) SDLVehicleDataEventStatus rightRearInflatableBelted;
+@property (strong) SDLVehicleDataEventStatus middleRow1BeltDeployed;
+@property (strong) SDLVehicleDataEventStatus middleRow1BuckleBelted;
@end
diff --git a/SmartDeviceLink/SDLBeltStatus.m b/SmartDeviceLink/SDLBeltStatus.m
index 70b54d2bd..90a012310 100644
--- a/SmartDeviceLink/SDLBeltStatus.m
+++ b/SmartDeviceLink/SDLBeltStatus.m
@@ -21,7 +21,7 @@
return self;
}
-- (void)setDriverBeltDeployed:(SDLVehicleDataEventStatus *)driverBeltDeployed {
+- (void)setDriverBeltDeployed:(SDLVehicleDataEventStatus)driverBeltDeployed {
if (driverBeltDeployed != nil) {
[store setObject:driverBeltDeployed forKey:NAMES_driverBeltDeployed];
} else {
@@ -29,16 +29,12 @@
}
}
-- (SDLVehicleDataEventStatus *)driverBeltDeployed {
+- (SDLVehicleDataEventStatus)driverBeltDeployed {
NSObject *obj = [store objectForKey:NAMES_driverBeltDeployed];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataEventStatus.class]) {
- return (SDLVehicleDataEventStatus *)obj;
- } else {
- return [SDLVehicleDataEventStatus valueOf:(NSString *)obj];
- }
+ return (SDLVehicleDataEventStatus)obj;
}
-- (void)setPassengerBeltDeployed:(SDLVehicleDataEventStatus *)passengerBeltDeployed {
+- (void)setPassengerBeltDeployed:(SDLVehicleDataEventStatus)passengerBeltDeployed {
if (passengerBeltDeployed != nil) {
[store setObject:passengerBeltDeployed forKey:NAMES_passengerBeltDeployed];
} else {
@@ -46,16 +42,12 @@
}
}
-- (SDLVehicleDataEventStatus *)passengerBeltDeployed {
+- (SDLVehicleDataEventStatus)passengerBeltDeployed {
NSObject *obj = [store objectForKey:NAMES_passengerBeltDeployed];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataEventStatus.class]) {
- return (SDLVehicleDataEventStatus *)obj;
- } else {
- return [SDLVehicleDataEventStatus valueOf:(NSString *)obj];
- }
+ return (SDLVehicleDataEventStatus)obj;
}
-- (void)setPassengerBuckleBelted:(SDLVehicleDataEventStatus *)passengerBuckleBelted {
+- (void)setPassengerBuckleBelted:(SDLVehicleDataEventStatus)passengerBuckleBelted {
if (passengerBuckleBelted != nil) {
[store setObject:passengerBuckleBelted forKey:NAMES_passengerBuckleBelted];
} else {
@@ -63,16 +55,12 @@
}
}
-- (SDLVehicleDataEventStatus *)passengerBuckleBelted {
+- (SDLVehicleDataEventStatus)passengerBuckleBelted {
NSObject *obj = [store objectForKey:NAMES_passengerBuckleBelted];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataEventStatus.class]) {
- return (SDLVehicleDataEventStatus *)obj;
- } else {
- return [SDLVehicleDataEventStatus valueOf:(NSString *)obj];
- }
+ return (SDLVehicleDataEventStatus)obj;
}
-- (void)setDriverBuckleBelted:(SDLVehicleDataEventStatus *)driverBuckleBelted {
+- (void)setDriverBuckleBelted:(SDLVehicleDataEventStatus)driverBuckleBelted {
if (driverBuckleBelted != nil) {
[store setObject:driverBuckleBelted forKey:NAMES_driverBuckleBelted];
} else {
@@ -80,16 +68,12 @@
}
}
-- (SDLVehicleDataEventStatus *)driverBuckleBelted {
+- (SDLVehicleDataEventStatus)driverBuckleBelted {
NSObject *obj = [store objectForKey:NAMES_driverBuckleBelted];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataEventStatus.class]) {
- return (SDLVehicleDataEventStatus *)obj;
- } else {
- return [SDLVehicleDataEventStatus valueOf:(NSString *)obj];
- }
+ return (SDLVehicleDataEventStatus)obj;
}
-- (void)setLeftRow2BuckleBelted:(SDLVehicleDataEventStatus *)leftRow2BuckleBelted {
+- (void)setLeftRow2BuckleBelted:(SDLVehicleDataEventStatus)leftRow2BuckleBelted {
if (leftRow2BuckleBelted != nil) {
[store setObject:leftRow2BuckleBelted forKey:NAMES_leftRow2BuckleBelted];
} else {
@@ -97,16 +81,12 @@
}
}
-- (SDLVehicleDataEventStatus *)leftRow2BuckleBelted {
+- (SDLVehicleDataEventStatus)leftRow2BuckleBelted {
NSObject *obj = [store objectForKey:NAMES_leftRow2BuckleBelted];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataEventStatus.class]) {
- return (SDLVehicleDataEventStatus *)obj;
- } else {
- return [SDLVehicleDataEventStatus valueOf:(NSString *)obj];
- }
+ return (SDLVehicleDataEventStatus)obj;
}
-- (void)setPassengerChildDetected:(SDLVehicleDataEventStatus *)passengerChildDetected {
+- (void)setPassengerChildDetected:(SDLVehicleDataEventStatus)passengerChildDetected {
if (passengerChildDetected != nil) {
[store setObject:passengerChildDetected forKey:NAMES_passengerChildDetected];
} else {
@@ -114,16 +94,12 @@
}
}
-- (SDLVehicleDataEventStatus *)passengerChildDetected {
+- (SDLVehicleDataEventStatus)passengerChildDetected {
NSObject *obj = [store objectForKey:NAMES_passengerChildDetected];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataEventStatus.class]) {
- return (SDLVehicleDataEventStatus *)obj;
- } else {
- return [SDLVehicleDataEventStatus valueOf:(NSString *)obj];
- }
+ return (SDLVehicleDataEventStatus)obj;
}
-- (void)setRightRow2BuckleBelted:(SDLVehicleDataEventStatus *)rightRow2BuckleBelted {
+- (void)setRightRow2BuckleBelted:(SDLVehicleDataEventStatus)rightRow2BuckleBelted {
if (rightRow2BuckleBelted != nil) {
[store setObject:rightRow2BuckleBelted forKey:NAMES_rightRow2BuckleBelted];
} else {
@@ -131,16 +107,12 @@
}
}
-- (SDLVehicleDataEventStatus *)rightRow2BuckleBelted {
+- (SDLVehicleDataEventStatus)rightRow2BuckleBelted {
NSObject *obj = [store objectForKey:NAMES_rightRow2BuckleBelted];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataEventStatus.class]) {
- return (SDLVehicleDataEventStatus *)obj;
- } else {
- return [SDLVehicleDataEventStatus valueOf:(NSString *)obj];
- }
+ return (SDLVehicleDataEventStatus)obj;
}
-- (void)setMiddleRow2BuckleBelted:(SDLVehicleDataEventStatus *)middleRow2BuckleBelted {
+- (void)setMiddleRow2BuckleBelted:(SDLVehicleDataEventStatus)middleRow2BuckleBelted {
if (middleRow2BuckleBelted != nil) {
[store setObject:middleRow2BuckleBelted forKey:NAMES_middleRow2BuckleBelted];
} else {
@@ -148,16 +120,12 @@
}
}
-- (SDLVehicleDataEventStatus *)middleRow2BuckleBelted {
+- (SDLVehicleDataEventStatus)middleRow2BuckleBelted {
NSObject *obj = [store objectForKey:NAMES_middleRow2BuckleBelted];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataEventStatus.class]) {
- return (SDLVehicleDataEventStatus *)obj;
- } else {
- return [SDLVehicleDataEventStatus valueOf:(NSString *)obj];
- }
+ return (SDLVehicleDataEventStatus)obj;
}
-- (void)setMiddleRow3BuckleBelted:(SDLVehicleDataEventStatus *)middleRow3BuckleBelted {
+- (void)setMiddleRow3BuckleBelted:(SDLVehicleDataEventStatus)middleRow3BuckleBelted {
if (middleRow3BuckleBelted != nil) {
[store setObject:middleRow3BuckleBelted forKey:NAMES_middleRow3BuckleBelted];
} else {
@@ -165,16 +133,12 @@
}
}
-- (SDLVehicleDataEventStatus *)middleRow3BuckleBelted {
+- (SDLVehicleDataEventStatus)middleRow3BuckleBelted {
NSObject *obj = [store objectForKey:NAMES_middleRow3BuckleBelted];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataEventStatus.class]) {
- return (SDLVehicleDataEventStatus *)obj;
- } else {
- return [SDLVehicleDataEventStatus valueOf:(NSString *)obj];
- }
+ return (SDLVehicleDataEventStatus)obj;
}
-- (void)setLeftRow3BuckleBelted:(SDLVehicleDataEventStatus *)leftRow3BuckleBelted {
+- (void)setLeftRow3BuckleBelted:(SDLVehicleDataEventStatus)leftRow3BuckleBelted {
if (leftRow3BuckleBelted != nil) {
[store setObject:leftRow3BuckleBelted forKey:NAMES_leftRow3BuckleBelted];
} else {
@@ -182,16 +146,12 @@
}
}
-- (SDLVehicleDataEventStatus *)leftRow3BuckleBelted {
+- (SDLVehicleDataEventStatus)leftRow3BuckleBelted {
NSObject *obj = [store objectForKey:NAMES_leftRow3BuckleBelted];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataEventStatus.class]) {
- return (SDLVehicleDataEventStatus *)obj;
- } else {
- return [SDLVehicleDataEventStatus valueOf:(NSString *)obj];
- }
+ return (SDLVehicleDataEventStatus)obj;
}
-- (void)setRightRow3BuckleBelted:(SDLVehicleDataEventStatus *)rightRow3BuckleBelted {
+- (void)setRightRow3BuckleBelted:(SDLVehicleDataEventStatus)rightRow3BuckleBelted {
if (rightRow3BuckleBelted != nil) {
[store setObject:rightRow3BuckleBelted forKey:NAMES_rightRow3BuckleBelted];
} else {
@@ -199,16 +159,12 @@
}
}
-- (SDLVehicleDataEventStatus *)rightRow3BuckleBelted {
+- (SDLVehicleDataEventStatus)rightRow3BuckleBelted {
NSObject *obj = [store objectForKey:NAMES_rightRow3BuckleBelted];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataEventStatus.class]) {
- return (SDLVehicleDataEventStatus *)obj;
- } else {
- return [SDLVehicleDataEventStatus valueOf:(NSString *)obj];
- }
+ return (SDLVehicleDataEventStatus)obj;
}
-- (void)setLeftRearInflatableBelted:(SDLVehicleDataEventStatus *)leftRearInflatableBelted {
+- (void)setLeftRearInflatableBelted:(SDLVehicleDataEventStatus)leftRearInflatableBelted {
if (leftRearInflatableBelted != nil) {
[store setObject:leftRearInflatableBelted forKey:NAMES_leftRearInflatableBelted];
} else {
@@ -216,16 +172,12 @@
}
}
-- (SDLVehicleDataEventStatus *)leftRearInflatableBelted {
+- (SDLVehicleDataEventStatus)leftRearInflatableBelted {
NSObject *obj = [store objectForKey:NAMES_leftRearInflatableBelted];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataEventStatus.class]) {
- return (SDLVehicleDataEventStatus *)obj;
- } else {
- return [SDLVehicleDataEventStatus valueOf:(NSString *)obj];
- }
+ return (SDLVehicleDataEventStatus)obj;
}
-- (void)setRightRearInflatableBelted:(SDLVehicleDataEventStatus *)rightRearInflatableBelted {
+- (void)setRightRearInflatableBelted:(SDLVehicleDataEventStatus)rightRearInflatableBelted {
if (rightRearInflatableBelted != nil) {
[store setObject:rightRearInflatableBelted forKey:NAMES_rightRearInflatableBelted];
} else {
@@ -233,16 +185,12 @@
}
}
-- (SDLVehicleDataEventStatus *)rightRearInflatableBelted {
+- (SDLVehicleDataEventStatus)rightRearInflatableBelted {
NSObject *obj = [store objectForKey:NAMES_rightRearInflatableBelted];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataEventStatus.class]) {
- return (SDLVehicleDataEventStatus *)obj;
- } else {
- return [SDLVehicleDataEventStatus valueOf:(NSString *)obj];
- }
+ return (SDLVehicleDataEventStatus)obj;
}
-- (void)setMiddleRow1BeltDeployed:(SDLVehicleDataEventStatus *)middleRow1BeltDeployed {
+- (void)setMiddleRow1BeltDeployed:(SDLVehicleDataEventStatus)middleRow1BeltDeployed {
if (middleRow1BeltDeployed != nil) {
[store setObject:middleRow1BeltDeployed forKey:NAMES_middleRow1BeltDeployed];
} else {
@@ -250,16 +198,12 @@
}
}
-- (SDLVehicleDataEventStatus *)middleRow1BeltDeployed {
+- (SDLVehicleDataEventStatus)middleRow1BeltDeployed {
NSObject *obj = [store objectForKey:NAMES_middleRow1BeltDeployed];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataEventStatus.class]) {
- return (SDLVehicleDataEventStatus *)obj;
- } else {
- return [SDLVehicleDataEventStatus valueOf:(NSString *)obj];
- }
+ return (SDLVehicleDataEventStatus)obj;
}
-- (void)setMiddleRow1BuckleBelted:(SDLVehicleDataEventStatus *)middleRow1BuckleBelted {
+- (void)setMiddleRow1BuckleBelted:(SDLVehicleDataEventStatus)middleRow1BuckleBelted {
if (middleRow1BuckleBelted != nil) {
[store setObject:middleRow1BuckleBelted forKey:NAMES_middleRow1BuckleBelted];
} else {
@@ -267,13 +211,9 @@
}
}
-- (SDLVehicleDataEventStatus *)middleRow1BuckleBelted {
+- (SDLVehicleDataEventStatus)middleRow1BuckleBelted {
NSObject *obj = [store objectForKey:NAMES_middleRow1BuckleBelted];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataEventStatus.class]) {
- return (SDLVehicleDataEventStatus *)obj;
- } else {
- return [SDLVehicleDataEventStatus valueOf:(NSString *)obj];
- }
+ return (SDLVehicleDataEventStatus)obj;
}
@end
diff --git a/SmartDeviceLink/SDLBitsPerSample.h b/SmartDeviceLink/SDLBitsPerSample.h
index 9067ce17a..9a3ecac24 100644
--- a/SmartDeviceLink/SDLBitsPerSample.h
+++ b/SmartDeviceLink/SDLBitsPerSample.h
@@ -9,37 +9,14 @@
*
* @since SDL 2.0
*/
-@interface SDLBitsPerSample : SDLEnum {
-}
-
-/**
- * @abstract Convert String to SDLBitsPerSample
- *
- * @param value The value of the string to get an object for
- *
- * @return SDLBitsPerSample
- */
-+ (SDLBitsPerSample *)valueOf:(NSString *)value;
-
-/**
- * @abstract Store the enumeration of all possible SDLBitsPerSample
- *
- * @return an array that store all possible SDLBitsPerSample
- */
-+ (NSArray *)values;
+typedef SDLEnum SDLBitsPerSample NS_EXTENSIBLE_STRING_ENUM;
/**
* @abstract 8 bits per sample
- *
- * @return a SDLBitsPerSample with value of *8_BIT*
*/
-+ (SDLBitsPerSample *)_8_BIT;
+extern SDLBitsPerSample const SDLBitsPerSample8Bit;
/**
* @abstract 16 bits per sample
- *
- * @return a SDLBitsPerSample with value of *16_BIT*
*/
-+ (SDLBitsPerSample *)_16_BIT;
-
-@end
+extern SDLBitsPerSample const SDLBitsPerSample16Bit;
diff --git a/SmartDeviceLink/SDLBitsPerSample.m b/SmartDeviceLink/SDLBitsPerSample.m
index e082aff59..25321788a 100644
--- a/SmartDeviceLink/SDLBitsPerSample.m
+++ b/SmartDeviceLink/SDLBitsPerSample.m
@@ -4,44 +4,5 @@
#import "SDLBitsPerSample.h"
-SDLBitsPerSample *SDLBitsPerSample_8_BIT = nil;
-SDLBitsPerSample *SDLBitsPerSample_16_BIT = nil;
-
-NSArray *SDLBitsPerSample_values = nil;
-
-@implementation SDLBitsPerSample
-
-+ (SDLBitsPerSample *)valueOf:(NSString *)value {
- for (SDLBitsPerSample *item in SDLBitsPerSample.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLBitsPerSample_values == nil) {
- SDLBitsPerSample_values = @[
- SDLBitsPerSample._8_BIT,
- SDLBitsPerSample._16_BIT,
- ];
- }
- return SDLBitsPerSample_values;
-}
-
-+ (SDLBitsPerSample *)_8_BIT {
- if (SDLBitsPerSample_8_BIT == nil) {
- SDLBitsPerSample_8_BIT = [[SDLBitsPerSample alloc] initWithValue:@"8_BIT"];
- }
- return SDLBitsPerSample_8_BIT;
-}
-
-+ (SDLBitsPerSample *)_16_BIT {
- if (SDLBitsPerSample_16_BIT == nil) {
- SDLBitsPerSample_16_BIT = [[SDLBitsPerSample alloc] initWithValue:@"16_BIT"];
- }
- return SDLBitsPerSample_16_BIT;
-}
-
-@end
+SDLBitsPerSample const SDLBitsPerSample8Bit = @"8_BIT";
+SDLBitsPerSample const SDLBitsPerSample16Bit = @"16_BIT";
diff --git a/SmartDeviceLink/SDLBodyInformation.h b/SmartDeviceLink/SDLBodyInformation.h
index 1c92243cd..63f4eb2fb 100644
--- a/SmartDeviceLink/SDLBodyInformation.h
+++ b/SmartDeviceLink/SDLBodyInformation.h
@@ -3,8 +3,8 @@
#import "SDLRPCMessage.h"
-@class SDLIgnitionStableStatus;
-@class SDLIgnitionStatus;
+#import "SDLIgnitionStableStatus.h"
+#import "SDLIgnitionStatus.h"
/**
@@ -33,12 +33,12 @@
/**
* @abstract References signal "Ignition_Switch_Stable". See IgnitionStableStatus.
*/
-@property (strong) SDLIgnitionStableStatus *ignitionStableStatus;
+@property (strong) SDLIgnitionStableStatus ignitionStableStatus;
/**
* @abstract References signal "Ignition_status". See IgnitionStatus.
*/
-@property (strong) SDLIgnitionStatus *ignitionStatus;
+@property (strong) SDLIgnitionStatus ignitionStatus;
/**
* @abstract References signal "DrStatDrv_B_Actl".
diff --git a/SmartDeviceLink/SDLBodyInformation.m b/SmartDeviceLink/SDLBodyInformation.m
index 9be7a88d6..810820336 100644
--- a/SmartDeviceLink/SDLBodyInformation.m
+++ b/SmartDeviceLink/SDLBodyInformation.m
@@ -35,7 +35,7 @@
return [store objectForKey:NAMES_parkBrakeActive];
}
-- (void)setIgnitionStableStatus:(SDLIgnitionStableStatus *)ignitionStableStatus {
+- (void)setIgnitionStableStatus:(SDLIgnitionStableStatus)ignitionStableStatus {
if (ignitionStableStatus != nil) {
[store setObject:ignitionStableStatus forKey:NAMES_ignitionStableStatus];
} else {
@@ -43,16 +43,12 @@
}
}
-- (SDLIgnitionStableStatus *)ignitionStableStatus {
+- (SDLIgnitionStableStatus)ignitionStableStatus {
NSObject *obj = [store objectForKey:NAMES_ignitionStableStatus];
- if (obj == nil || [obj isKindOfClass:SDLIgnitionStableStatus.class]) {
- return (SDLIgnitionStableStatus *)obj;
- } else {
- return [SDLIgnitionStableStatus valueOf:(NSString *)obj];
- }
+ return (SDLIgnitionStableStatus)obj;
}
-- (void)setIgnitionStatus:(SDLIgnitionStatus *)ignitionStatus {
+- (void)setIgnitionStatus:(SDLIgnitionStatus)ignitionStatus {
if (ignitionStatus != nil) {
[store setObject:ignitionStatus forKey:NAMES_ignitionStatus];
} else {
@@ -60,13 +56,9 @@
}
}
-- (SDLIgnitionStatus *)ignitionStatus {
+- (SDLIgnitionStatus)ignitionStatus {
NSObject *obj = [store objectForKey:NAMES_ignitionStatus];
- if (obj == nil || [obj isKindOfClass:SDLIgnitionStatus.class]) {
- return (SDLIgnitionStatus *)obj;
- } else {
- return [SDLIgnitionStatus valueOf:(NSString *)obj];
- }
+ return (SDLIgnitionStatus)obj;
}
- (void)setDriverDoorAjar:(NSNumber *)driverDoorAjar {
diff --git a/SmartDeviceLink/SDLButtonCapabilities.h b/SmartDeviceLink/SDLButtonCapabilities.h
index d84da609a..e794856d5 100644
--- a/SmartDeviceLink/SDLButtonCapabilities.h
+++ b/SmartDeviceLink/SDLButtonCapabilities.h
@@ -3,7 +3,7 @@
#import "SDLRPCMessage.h"
-@class SDLButtonName;
+#import "SDLButtonName.h"
/**
@@ -28,7 +28,7 @@
/**
* @abstract The name of the SDL HMI button.
*/
-@property (strong) SDLButtonName *name;
+@property (strong) SDLButtonName name;
/**
* @abstract A NSNumber value indicates whether the button supports a SHORT press
diff --git a/SmartDeviceLink/SDLButtonCapabilities.m b/SmartDeviceLink/SDLButtonCapabilities.m
index fbcab54c9..8d9e52e2f 100644
--- a/SmartDeviceLink/SDLButtonCapabilities.m
+++ b/SmartDeviceLink/SDLButtonCapabilities.m
@@ -3,7 +3,6 @@
#import "SDLButtonCapabilities.h"
-#import "SDLButtonName.h"
#import "SDLNames.h"
@@ -21,7 +20,7 @@
return self;
}
-- (void)setName:(SDLButtonName *)name {
+- (void)setName:(SDLButtonName)name {
if (name != nil) {
[store setObject:name forKey:NAMES_name];
} else {
@@ -29,13 +28,9 @@
}
}
-- (SDLButtonName *)name {
+- (SDLButtonName)name {
NSObject *obj = [store objectForKey:NAMES_name];
- if (obj == nil || [obj isKindOfClass:SDLButtonName.class]) {
- return (SDLButtonName *)obj;
- } else {
- return [SDLButtonName valueOf:(NSString *)obj];
- }
+ return (SDLButtonName)obj;
}
- (void)setShortPressAvailable:(NSNumber *)shortPressAvailable {
diff --git a/SmartDeviceLink/SDLButtonEventMode.h b/SmartDeviceLink/SDLButtonEventMode.h
index 56cd8683d..a38099345 100644
--- a/SmartDeviceLink/SDLButtonEventMode.h
+++ b/SmartDeviceLink/SDLButtonEventMode.h
@@ -9,32 +9,14 @@
*
* @since SDL 1.0
*/
-@interface SDLButtonEventMode : SDLEnum {
-}
-
-/**
- * @abstract Convert String to SDLButtonEventMode
- * @param value The value of the string to get an object for
- * @return SDLButtonEventMode (BUTTONUP / BUTTONDOWN)
- */
-+ (SDLButtonEventMode *)valueOf:(NSString *)value;
-
-/**
- * @abstract Store the enumeration of all possible SDLButtonEventMode
- * @return an array that store all possible SDLButtonEventMode
- */
-+ (NSArray *)values;
+typedef SDLEnum SDLButtonEventMode NS_EXTENSIBLE_STRING_ENUM;
/**
* @abstract The button was released
- * @return a SDLButtonEventMode with value of *BUTTONUP*
*/
-+ (SDLButtonEventMode *)BUTTONUP;
+extern SDLButtonEventMode const SDLButtonEventModeButtonUp;
/**
* @abstract The button was depressed
- * @return a SDLButtonEventMode with value of *BUTTONDOWN*
*/
-+ (SDLButtonEventMode *)BUTTONDOWN;
-
-@end
+extern SDLButtonEventMode const SDLButtonEventModeButtonDown;
diff --git a/SmartDeviceLink/SDLButtonEventMode.m b/SmartDeviceLink/SDLButtonEventMode.m
index 1dcc13635..71cb61cd9 100644
--- a/SmartDeviceLink/SDLButtonEventMode.m
+++ b/SmartDeviceLink/SDLButtonEventMode.m
@@ -4,44 +4,5 @@
#import "SDLButtonEventMode.h"
-SDLButtonEventMode *SDLButtonEventMode_BUTTONUP = nil;
-SDLButtonEventMode *SDLButtonEventMode_BUTTONDOWN = nil;
-
-NSArray *SDLButtonEventMode_values = nil;
-
-@implementation SDLButtonEventMode
-
-+ (SDLButtonEventMode *)valueOf:(NSString *)value {
- for (SDLButtonEventMode *item in SDLButtonEventMode.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLButtonEventMode_values == nil) {
- SDLButtonEventMode_values = @[
- SDLButtonEventMode.BUTTONUP,
- SDLButtonEventMode.BUTTONDOWN,
- ];
- }
- return SDLButtonEventMode_values;
-}
-
-+ (SDLButtonEventMode *)BUTTONUP {
- if (SDLButtonEventMode_BUTTONUP == nil) {
- SDLButtonEventMode_BUTTONUP = [[SDLButtonEventMode alloc] initWithValue:@"BUTTONUP"];
- }
- return SDLButtonEventMode_BUTTONUP;
-}
-
-+ (SDLButtonEventMode *)BUTTONDOWN {
- if (SDLButtonEventMode_BUTTONDOWN == nil) {
- SDLButtonEventMode_BUTTONDOWN = [[SDLButtonEventMode alloc] initWithValue:@"BUTTONDOWN"];
- }
- return SDLButtonEventMode_BUTTONDOWN;
-}
-
-@end
+SDLButtonEventMode const SDLButtonEventModeButtonUp = @"BUTTONUP";
+SDLButtonEventMode const SDLButtonEventModeButtonDown = @"BUTTONDOWN";
diff --git a/SmartDeviceLink/SDLButtonName.h b/SmartDeviceLink/SDLButtonName.h
index 519a3c554..5b1c5af0f 100644
--- a/SmartDeviceLink/SDLButtonName.h
+++ b/SmartDeviceLink/SDLButtonName.h
@@ -21,132 +21,83 @@
*
* @since SDL 1.0
*/
-@interface SDLButtonName : SDLEnum {
-}
-
-/**
- * @abstract Convert String to SDLButtonName
- *
- * @param value String value to retrieve the object for
- *
- * @return SDLButtonName
- */
-+ (SDLButtonName *)valueOf:(NSString *)value;
-
-/**
- * @abstract Store the enumeration of all possible SDLButtonName
- *
- * @return an array that store all possible SDLButtonName
- */
-+ (NSArray *)values;
+typedef SDLEnum SDLButtonName NS_EXTENSIBLE_STRING_ENUM;
/**
* @abstract Represents the button usually labeled "OK". A typical use of this button is for the user to press it to make a selection.
- *
- * @return a SDLButtonName with the value of *OK*
*/
-+ (SDLButtonName *)OK;
+extern SDLButtonName const SDLButtonNameOk;
/**
* @abstract Represents the seek-left button. A typical use of this button is for the user to scroll to the left through menu choices one menu item per press.
- *
- * @return a SDLButtonName with the value of *SEEKLEFT*
*/
-+ (SDLButtonName *)SEEKLEFT;
+extern SDLButtonName const SDLButtonNameSeekLeft;
/**
* @abstract Represents the seek-right button. A typical use of this button is for the user to scroll to the right through menu choices one menu item per press.
- *
- * @return a SDLButtonName with the value of *SEEKRIGHT*
*/
-+ (SDLButtonName *)SEEKRIGHT;
+extern SDLButtonName const SDLButtonNameSeekRight;
/**
* @abstract Represents a turn of the tuner knob in the clockwise direction one tick.
- *
- * @return a SDLButtonName with the value of *TUNEUP*
*/
-+ (SDLButtonName *)TUNEUP;
+extern SDLButtonName const SDLButtonNameTuneUp;
/**
* @abstract Represents a turn of the tuner knob in the counter-clockwise direction one tick.
- *
- * @return a SDLButtonName with the value of *TUNEDOWN*
*/
-+ (SDLButtonName *)TUNEDOWN;
+extern SDLButtonName const SDLButtonNameTuneDown;
/**
* @abstract Represents the preset 0 button.
- *
- * @return a SDLButtonName with the value of *PRESET_0*
*/
-+ (SDLButtonName *)PRESET_0;
+extern SDLButtonName const SDLButtonNamePreset0;
/**
* @abstract Represents the preset 1 button.
- *
- * @return a SDLButtonName with the value of *PRESET_1*
*/
-+ (SDLButtonName *)PRESET_1;
+extern SDLButtonName const SDLButtonNamePreset1;
/**
* @abstract Represents the preset 2 button.
- *
- * @return a SDLButtonName with the value of *PRESET_2*
*/
-+ (SDLButtonName *)PRESET_2;
+extern SDLButtonName const SDLButtonNamePreset2;
/**
* @abstract Represents the preset 3 button.
- *
- * @return a SDLButtonName with the value of *PRESET_3*
*/
-+ (SDLButtonName *)PRESET_3;
+extern SDLButtonName const SDLButtonNamePreset3;
/**
* @abstract Represents the preset 4 button.
- *
- * @return a SDLButtonName with the value of *PRESET_4*
*/
-+ (SDLButtonName *)PRESET_4;
+extern SDLButtonName const SDLButtonNamePreset4;
/**
* @abstract Represents the preset 5 button.
- *
- * @return a SDLButtonName with the value of *PRESET_5*
*/
-+ (SDLButtonName *)PRESET_5;
+extern SDLButtonName const SDLButtonNamePreset5;
/**
* @abstract Represents the preset 6 button.
- *
- * @return a SDLButtonName with the value of *PRESET_6*
*/
-+ (SDLButtonName *)PRESET_6;
+extern SDLButtonName const SDLButtonNamePreset6;
/**
* @abstract Represents the preset 7 button.
- *
- * @return a SDLButtonName with the value of *PRESET_7*
*/
-+ (SDLButtonName *)PRESET_7;
+extern SDLButtonName const SDLButtonNamePreset7;
/**
* @abstract Represents the preset 8 button.
- *
- * @return a SDLButtonName with the value of *PRESET_8*
*/
-+ (SDLButtonName *)PRESET_8;
+extern SDLButtonName const SDLButtonNamePreset8;
/**
* @abstract Represents the preset 9 button.
- *
- * @return a SDLButtonName with the value of *PRESET_9*
*/
-+ (SDLButtonName *)PRESET_9;
-
-+ (SDLButtonName *)CUSTOM_BUTTON;
+extern SDLButtonName const SDLButtonNamePreset9;
-+ (SDLButtonName *)SEARCH;
+extern SDLButtonName const SDLButtonNameCustomButton;
-@end
+extern SDLButtonName const SDLButtonNameSearch;
diff --git a/SmartDeviceLink/SDLButtonName.m b/SmartDeviceLink/SDLButtonName.m
index 8e0ae3454..23ac32eb9 100644
--- a/SmartDeviceLink/SDLButtonName.m
+++ b/SmartDeviceLink/SDLButtonName.m
@@ -4,179 +4,20 @@
#import "SDLButtonName.h"
-SDLButtonName *SDLButtonName_OK = nil;
-SDLButtonName *SDLButtonName_SEEKLEFT = nil;
-SDLButtonName *SDLButtonName_SEEKRIGHT = nil;
-SDLButtonName *SDLButtonName_TUNEUP = nil;
-SDLButtonName *SDLButtonName_TUNEDOWN = nil;
-SDLButtonName *SDLButtonName_PRESET_0 = nil;
-SDLButtonName *SDLButtonName_PRESET_1 = nil;
-SDLButtonName *SDLButtonName_PRESET_2 = nil;
-SDLButtonName *SDLButtonName_PRESET_3 = nil;
-SDLButtonName *SDLButtonName_PRESET_4 = nil;
-SDLButtonName *SDLButtonName_PRESET_5 = nil;
-SDLButtonName *SDLButtonName_PRESET_6 = nil;
-SDLButtonName *SDLButtonName_PRESET_7 = nil;
-SDLButtonName *SDLButtonName_PRESET_8 = nil;
-SDLButtonName *SDLButtonName_PRESET_9 = nil;
-SDLButtonName *SDLButtonName_CUSTOM_BUTTON = nil;
-SDLButtonName *SDLButtonName_SEARCH = nil;
-
-NSArray *SDLButtonName_values = nil;
-
-@implementation SDLButtonName
-
-+ (SDLButtonName *)valueOf:(NSString *)value {
- for (SDLButtonName *item in SDLButtonName.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLButtonName_values == nil) {
- SDLButtonName_values = @[
- SDLButtonName.OK,
- SDLButtonName.SEEKLEFT,
- SDLButtonName.SEEKRIGHT,
- SDLButtonName.TUNEUP,
- SDLButtonName.TUNEDOWN,
- SDLButtonName.PRESET_0,
- SDLButtonName.PRESET_1,
- SDLButtonName.PRESET_2,
- SDLButtonName.PRESET_3,
- SDLButtonName.PRESET_4,
- SDLButtonName.PRESET_5,
- SDLButtonName.PRESET_6,
- SDLButtonName.PRESET_7,
- SDLButtonName.PRESET_8,
- SDLButtonName.PRESET_9,
- SDLButtonName.CUSTOM_BUTTON,
- SDLButtonName.SEARCH,
- ];
- }
- return SDLButtonName_values;
-}
-
-+ (SDLButtonName *)OK {
- if (SDLButtonName_OK == nil) {
- SDLButtonName_OK = [[SDLButtonName alloc] initWithValue:@"OK"];
- }
- return SDLButtonName_OK;
-}
-
-+ (SDLButtonName *)SEEKLEFT {
- if (SDLButtonName_SEEKLEFT == nil) {
- SDLButtonName_SEEKLEFT = [[SDLButtonName alloc] initWithValue:@"SEEKLEFT"];
- }
- return SDLButtonName_SEEKLEFT;
-}
-
-+ (SDLButtonName *)SEEKRIGHT {
- if (SDLButtonName_SEEKRIGHT == nil) {
- SDLButtonName_SEEKRIGHT = [[SDLButtonName alloc] initWithValue:@"SEEKRIGHT"];
- }
- return SDLButtonName_SEEKRIGHT;
-}
-
-+ (SDLButtonName *)TUNEUP {
- if (SDLButtonName_TUNEUP == nil) {
- SDLButtonName_TUNEUP = [[SDLButtonName alloc] initWithValue:@"TUNEUP"];
- }
- return SDLButtonName_TUNEUP;
-}
-
-+ (SDLButtonName *)TUNEDOWN {
- if (SDLButtonName_TUNEDOWN == nil) {
- SDLButtonName_TUNEDOWN = [[SDLButtonName alloc] initWithValue:@"TUNEDOWN"];
- }
- return SDLButtonName_TUNEDOWN;
-}
-
-+ (SDLButtonName *)PRESET_0 {
- if (SDLButtonName_PRESET_0 == nil) {
- SDLButtonName_PRESET_0 = [[SDLButtonName alloc] initWithValue:@"PRESET_0"];
- }
- return SDLButtonName_PRESET_0;
-}
-
-+ (SDLButtonName *)PRESET_1 {
- if (SDLButtonName_PRESET_1 == nil) {
- SDLButtonName_PRESET_1 = [[SDLButtonName alloc] initWithValue:@"PRESET_1"];
- }
- return SDLButtonName_PRESET_1;
-}
-
-+ (SDLButtonName *)PRESET_2 {
- if (SDLButtonName_PRESET_2 == nil) {
- SDLButtonName_PRESET_2 = [[SDLButtonName alloc] initWithValue:@"PRESET_2"];
- }
- return SDLButtonName_PRESET_2;
-}
-
-+ (SDLButtonName *)PRESET_3 {
- if (SDLButtonName_PRESET_3 == nil) {
- SDLButtonName_PRESET_3 = [[SDLButtonName alloc] initWithValue:@"PRESET_3"];
- }
- return SDLButtonName_PRESET_3;
-}
-
-+ (SDLButtonName *)PRESET_4 {
- if (SDLButtonName_PRESET_4 == nil) {
- SDLButtonName_PRESET_4 = [[SDLButtonName alloc] initWithValue:@"PRESET_4"];
- }
- return SDLButtonName_PRESET_4;
-}
-
-+ (SDLButtonName *)PRESET_5 {
- if (SDLButtonName_PRESET_5 == nil) {
- SDLButtonName_PRESET_5 = [[SDLButtonName alloc] initWithValue:@"PRESET_5"];
- }
- return SDLButtonName_PRESET_5;
-}
-
-+ (SDLButtonName *)PRESET_6 {
- if (SDLButtonName_PRESET_6 == nil) {
- SDLButtonName_PRESET_6 = [[SDLButtonName alloc] initWithValue:@"PRESET_6"];
- }
- return SDLButtonName_PRESET_6;
-}
-
-+ (SDLButtonName *)PRESET_7 {
- if (SDLButtonName_PRESET_7 == nil) {
- SDLButtonName_PRESET_7 = [[SDLButtonName alloc] initWithValue:@"PRESET_7"];
- }
- return SDLButtonName_PRESET_7;
-}
-
-+ (SDLButtonName *)PRESET_8 {
- if (SDLButtonName_PRESET_8 == nil) {
- SDLButtonName_PRESET_8 = [[SDLButtonName alloc] initWithValue:@"PRESET_8"];
- }
- return SDLButtonName_PRESET_8;
-}
-
-+ (SDLButtonName *)PRESET_9 {
- if (SDLButtonName_PRESET_9 == nil) {
- SDLButtonName_PRESET_9 = [[SDLButtonName alloc] initWithValue:@"PRESET_9"];
- }
- return SDLButtonName_PRESET_9;
-}
-
-+ (SDLButtonName *)CUSTOM_BUTTON {
- if (SDLButtonName_CUSTOM_BUTTON == nil) {
- SDLButtonName_CUSTOM_BUTTON = [[SDLButtonName alloc] initWithValue:@"CUSTOM_BUTTON"];
- }
- return SDLButtonName_CUSTOM_BUTTON;
-}
-
-+ (SDLButtonName *)SEARCH {
- if (SDLButtonName_SEARCH == nil) {
- SDLButtonName_SEARCH = [[SDLButtonName alloc] initWithValue:@"SEARCH"];
- }
- return SDLButtonName_SEARCH;
-}
-
-@end
+SDLButtonName const SDLButtonNameOk = @"OK";
+SDLButtonName const SDLButtonNameSeekLeft = @"SEEKLEFT";
+SDLButtonName const SDLButtonNameSeekRight = @"SEEKRIGHT";
+SDLButtonName const SDLButtonNameTuneUp = @"TUNEUP";
+SDLButtonName const SDLButtonNameTuneDown = @"TUNEDOWN";
+SDLButtonName const SDLButtonNamePreset0 = @"PRESET_0";
+SDLButtonName const SDLButtonNamePreset1 = @"PRESET_1";
+SDLButtonName const SDLButtonNamePreset2 = @"PRESET_2";
+SDLButtonName const SDLButtonNamePreset3 = @"PRESET_3";
+SDLButtonName const SDLButtonNamePreset4 = @"PRESET_4";
+SDLButtonName const SDLButtonNamePreset5 = @"PRESET_5";
+SDLButtonName const SDLButtonNamePreset6 = @"PRESET_6";
+SDLButtonName const SDLButtonNamePreset7 = @"PRESET_7";
+SDLButtonName const SDLButtonNamePreset8 = @"PRESET_8";
+SDLButtonName const SDLButtonNamePreset9 = @"PRESET_9";
+SDLButtonName const SDLButtonNameCustomButton = @"CUSTOM_BUTTON";
+SDLButtonName const SDLButtonNameSearch = @"SEARCH";
diff --git a/SmartDeviceLink/SDLButtonPressMode.h b/SmartDeviceLink/SDLButtonPressMode.h
index 8aca9c143..ba95559b4 100644
--- a/SmartDeviceLink/SDLButtonPressMode.h
+++ b/SmartDeviceLink/SDLButtonPressMode.h
@@ -9,37 +9,14 @@
*
* @since SDL 1.0
*/
-@interface SDLButtonPressMode : SDLEnum {
-}
-
-/**
- * @abstract Convert String to SDLButtonPressMode
- *
- * @param value The value of the string to get an object for
- *
- * @return SDLButtonPressMode
- */
-+ (SDLButtonPressMode *)valueOf:(NSString *)value;
-
-/**
- * @abstract Store the enumeration of all possible SDLButtonPressMode
- *
- * @return an array that store all possible SDLButtonPressMode
- */
-+ (NSArray *)values;
+typedef SDLEnum SDLButtonPressMode NS_EXTENSIBLE_STRING_ENUM;
/**
* @abstract A button was released, after it was pressed for a long time. Actual timing is defined by the head unit and may vary.
- *
- * @return a SDLButtonPressMode with the value of *LONG*
*/
-+ (SDLButtonPressMode *)LONG;
+extern SDLButtonPressMode SDLButtonPressModeLong;
/**
* @abstract A button was released, after it was pressed for a short time. Actual timing is defined by the head unit and may vary.
- *
- * @return a SDLButtonPressMode with the value of *SHORT*
*/
-+ (SDLButtonPressMode *)SHORT;
-
-@end
+extern SDLButtonPressMode SDLButtonPressModeShort;
diff --git a/SmartDeviceLink/SDLButtonPressMode.m b/SmartDeviceLink/SDLButtonPressMode.m
index 15e4c2334..307333de3 100644
--- a/SmartDeviceLink/SDLButtonPressMode.m
+++ b/SmartDeviceLink/SDLButtonPressMode.m
@@ -4,44 +4,5 @@
#import "SDLButtonPressMode.h"
-SDLButtonPressMode *SDLButtonPressMode_LONG = nil;
-SDLButtonPressMode *SDLButtonPressMode_SHORT = nil;
-
-NSArray *SDLButtonPressMode_values = nil;
-
-@implementation SDLButtonPressMode
-
-+ (SDLButtonPressMode *)valueOf:(NSString *)value {
- for (SDLButtonPressMode *item in SDLButtonPressMode.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLButtonPressMode_values == nil) {
- SDLButtonPressMode_values = @[
- SDLButtonPressMode.LONG,
- SDLButtonPressMode.SHORT,
- ];
- }
- return SDLButtonPressMode_values;
-}
-
-+ (SDLButtonPressMode *)LONG {
- if (SDLButtonPressMode_LONG == nil) {
- SDLButtonPressMode_LONG = [[SDLButtonPressMode alloc] initWithValue:@"LONG"];
- }
- return SDLButtonPressMode_LONG;
-}
-
-+ (SDLButtonPressMode *)SHORT {
- if (SDLButtonPressMode_SHORT == nil) {
- SDLButtonPressMode_SHORT = [[SDLButtonPressMode alloc] initWithValue:@"SHORT"];
- }
- return SDLButtonPressMode_SHORT;
-}
-
-@end
+SDLButtonPressMode SDLButtonPressModeLong = @"LONG";
+SDLButtonPressMode SDLButtonPressModeShort = @"SHORT";
diff --git a/SmartDeviceLink/SDLCarModeStatus.h b/SmartDeviceLink/SDLCarModeStatus.h
index 15bb7b284..03b8cf126 100644
--- a/SmartDeviceLink/SDLCarModeStatus.h
+++ b/SmartDeviceLink/SDLCarModeStatus.h
@@ -7,26 +7,20 @@
/** Describes the carmode the vehicle is in.
* <b>Since</b> SmartDeviceLink 2.0
*/
-@interface SDLCarModeStatus : SDLEnum {
-}
+typedef SDLEnum SDLCarModeStatus NS_EXTENSIBLE_STRING_ENUM;
-+ (SDLCarModeStatus *)valueOf:(NSString *)value;
-
-+ (NSArray *)values;
/** Provides carmode NORMAL to each module.
*/
-+ (SDLCarModeStatus *)NORMAL;
+extern SDLCarModeStatus const SDLCarModeStatusNormal;
/** Provides carmode FACTORY to each module.
*/
-+ (SDLCarModeStatus *)FACTORY;
+extern SDLCarModeStatus const SDLCarModeStatusFactory;
/** Provides carmode TRANSPORT to each module.
*/
-+ (SDLCarModeStatus *)TRANSPORT;
+extern SDLCarModeStatus const SDLCarModeStatusTransport;
/** Provides carmode CRASH to each module.
*/
-+ (SDLCarModeStatus *)CRASH;
-
-@end
+extern SDLCarModeStatus const SDLCarModeStatusCrash;
diff --git a/SmartDeviceLink/SDLCarModeStatus.m b/SmartDeviceLink/SDLCarModeStatus.m
index 4f9c03c42..b93293da9 100644
--- a/SmartDeviceLink/SDLCarModeStatus.m
+++ b/SmartDeviceLink/SDLCarModeStatus.m
@@ -4,62 +4,7 @@
#import "SDLCarModeStatus.h"
-SDLCarModeStatus *SDLCarModeStatus_NORMAL = nil;
-SDLCarModeStatus *SDLCarModeStatus_FACTORY = nil;
-SDLCarModeStatus *SDLCarModeStatus_TRANSPORT = nil;
-SDLCarModeStatus *SDLCarModeStatus_CRASH = nil;
-
-NSArray *SDLCarModeStatus_values = nil;
-
-@implementation SDLCarModeStatus
-
-+ (SDLCarModeStatus *)valueOf:(NSString *)value {
- for (SDLCarModeStatus *item in SDLCarModeStatus.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLCarModeStatus_values == nil) {
- SDLCarModeStatus_values = @[
- SDLCarModeStatus.NORMAL,
- SDLCarModeStatus.FACTORY,
- SDLCarModeStatus.TRANSPORT,
- SDLCarModeStatus.CRASH,
- ];
- }
- return SDLCarModeStatus_values;
-}
-
-+ (SDLCarModeStatus *)NORMAL {
- if (SDLCarModeStatus_NORMAL == nil) {
- SDLCarModeStatus_NORMAL = [[SDLCarModeStatus alloc] initWithValue:@"NORMAL"];
- }
- return SDLCarModeStatus_NORMAL;
-}
-
-+ (SDLCarModeStatus *)FACTORY {
- if (SDLCarModeStatus_FACTORY == nil) {
- SDLCarModeStatus_FACTORY = [[SDLCarModeStatus alloc] initWithValue:@"FACTORY"];
- }
- return SDLCarModeStatus_FACTORY;
-}
-
-+ (SDLCarModeStatus *)TRANSPORT {
- if (SDLCarModeStatus_TRANSPORT == nil) {
- SDLCarModeStatus_TRANSPORT = [[SDLCarModeStatus alloc] initWithValue:@"TRANSPORT"];
- }
- return SDLCarModeStatus_TRANSPORT;
-}
-
-+ (SDLCarModeStatus *)CRASH {
- if (SDLCarModeStatus_CRASH == nil) {
- SDLCarModeStatus_CRASH = [[SDLCarModeStatus alloc] initWithValue:@"CRASH"];
- }
- return SDLCarModeStatus_CRASH;
-}
-
-@end
+SDLCarModeStatus const SDLCarModeStatusNormal = @"NORMAL";
+SDLCarModeStatus const SDLCarModeStatusFactory = @"FACTORY";
+SDLCarModeStatus const SDLCarModeStatusTransport = @"TRANSPORT";
+SDLCarModeStatus const SDLCarModeStatusCrash = @"CRASH";
diff --git a/SmartDeviceLink/SDLChangeRegistration.h b/SmartDeviceLink/SDLChangeRegistration.h
index 4bbc7c234..90248c421 100644
--- a/SmartDeviceLink/SDLChangeRegistration.h
+++ b/SmartDeviceLink/SDLChangeRegistration.h
@@ -4,7 +4,8 @@
#import "SDLRPCRequest.h"
-@class SDLLanguage;
+#import "SDLLanguage.h"
+
@class SDLTTSChunk;
/**
@@ -32,12 +33,12 @@
/**
* @abstract The language the app wants to change to
*/
-@property (strong, nonatomic) SDLLanguage *language;
+@property (strong, nonatomic) SDLLanguage language;
/**
* @abstract HMI display language
*/
-@property (strong, nonatomic) SDLLanguage *hmiDisplayLanguage;
+@property (strong, nonatomic) SDLLanguage hmiDisplayLanguage;
/**
* Request a new app name registration
diff --git a/SmartDeviceLink/SDLChangeRegistration.m b/SmartDeviceLink/SDLChangeRegistration.m
index 00a7de885..840d04142 100644
--- a/SmartDeviceLink/SDLChangeRegistration.m
+++ b/SmartDeviceLink/SDLChangeRegistration.m
@@ -4,7 +4,6 @@
#import "SDLChangeRegistration.h"
-#import "SDLLanguage.h"
#import "SDLNames.h"
@implementation SDLChangeRegistration
@@ -21,7 +20,7 @@
return self;
}
-- (void)setLanguage:(SDLLanguage *)language {
+- (void)setLanguage:(SDLLanguage)language {
if (language != nil) {
[parameters setObject:language forKey:NAMES_language];
} else {
@@ -29,16 +28,12 @@
}
}
-- (SDLLanguage *)language {
+- (SDLLanguage)language {
NSObject *obj = [parameters objectForKey:NAMES_language];
- if (obj == nil || [obj isKindOfClass:SDLLanguage.class]) {
- return (SDLLanguage *)obj;
- } else {
- return [SDLLanguage valueOf:(NSString *)obj];
- }
+ return (SDLLanguage )obj;
}
-- (void)setHmiDisplayLanguage:(SDLLanguage *)hmiDisplayLanguage {
+- (void)setHmiDisplayLanguage:(SDLLanguage )hmiDisplayLanguage {
if (hmiDisplayLanguage != nil) {
[parameters setObject:hmiDisplayLanguage forKey:NAMES_hmiDisplayLanguage];
} else {
@@ -46,13 +41,9 @@
}
}
-- (SDLLanguage *)hmiDisplayLanguage {
+- (SDLLanguage )hmiDisplayLanguage {
NSObject *obj = [parameters objectForKey:NAMES_hmiDisplayLanguage];
- if (obj == nil || [obj isKindOfClass:SDLLanguage.class]) {
- return (SDLLanguage *)obj;
- } else {
- return [SDLLanguage valueOf:(NSString *)obj];
- }
+ return (SDLLanguage )obj;
}
- (void)setAppName:(NSString *)appName {
diff --git a/SmartDeviceLink/SDLCharacterSet.h b/SmartDeviceLink/SDLCharacterSet.h
index 300afd720..e7bc992fa 100644
--- a/SmartDeviceLink/SDLCharacterSet.h
+++ b/SmartDeviceLink/SDLCharacterSet.h
@@ -9,31 +9,13 @@
*
* @since SDL 1.0
*/
-@interface SDLCharacterSet : SDLEnum {
-}
+typedef SDLEnum SDLCharacterSet NS_EXTENSIBLE_STRING_ENUM;
-/**
- * @abstract Convert String to SDLCharacterSet
- *
- * @param value The value of the string to get an object for
- *
- * @return SDLCharacterSet
- */
-+ (SDLCharacterSet *)valueOf:(NSString *)value;
-
-/**
- * @abstract Store the enumeration of all possible SDLCharacterSet
- *
- * @return an array that store all possible SDLCharacterSet
- */
-+ (NSArray *)values;
-
-+ (SDLCharacterSet *)TYPE2SET;
+extern SDLCharacterSet const SDLCharacterSetType2Set;
-+ (SDLCharacterSet *)TYPE5SET;
+extern SDLCharacterSet const SDLCharacterSetType5Set;
-+ (SDLCharacterSet *)CID1SET;
+extern SDLCharacterSet const SDLCharacterSetCid1Set;
-+ (SDLCharacterSet *)CID2SET;
+extern SDLCharacterSet const SDLCharacterSetCid2Set;
-@end
diff --git a/SmartDeviceLink/SDLCharacterSet.m b/SmartDeviceLink/SDLCharacterSet.m
index 18f00de90..4f8f2f28f 100644
--- a/SmartDeviceLink/SDLCharacterSet.m
+++ b/SmartDeviceLink/SDLCharacterSet.m
@@ -4,62 +4,7 @@
#import "SDLCharacterSet.h"
-SDLCharacterSet *SDLCharacterSet_TYPE2SET = nil;
-SDLCharacterSet *SDLCharacterSet_TYPE5SET = nil;
-SDLCharacterSet *SDLCharacterSet_CID1SET = nil;
-SDLCharacterSet *SDLCharacterSet_CID2SET = nil;
-
-NSArray *SDLCharacterSet_values = nil;
-
-@implementation SDLCharacterSet
-
-+ (SDLCharacterSet *)valueOf:(NSString *)value {
- for (SDLCharacterSet *item in SDLCharacterSet.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLCharacterSet_values == nil) {
- SDLCharacterSet_values = @[
- SDLCharacterSet.TYPE2SET,
- SDLCharacterSet.TYPE5SET,
- SDLCharacterSet.CID1SET,
- SDLCharacterSet.CID2SET,
- ];
- }
- return SDLCharacterSet_values;
-}
-
-+ (SDLCharacterSet *)TYPE2SET {
- if (SDLCharacterSet_TYPE2SET == nil) {
- SDLCharacterSet_TYPE2SET = [[SDLCharacterSet alloc] initWithValue:@"TYPE2SET"];
- }
- return SDLCharacterSet_TYPE2SET;
-}
-
-+ (SDLCharacterSet *)TYPE5SET {
- if (SDLCharacterSet_TYPE5SET == nil) {
- SDLCharacterSet_TYPE5SET = [[SDLCharacterSet alloc] initWithValue:@"TYPE5SET"];
- }
- return SDLCharacterSet_TYPE5SET;
-}
-
-+ (SDLCharacterSet *)CID1SET {
- if (SDLCharacterSet_CID1SET == nil) {
- SDLCharacterSet_CID1SET = [[SDLCharacterSet alloc] initWithValue:@"CID1SET"];
- }
- return SDLCharacterSet_CID1SET;
-}
-
-+ (SDLCharacterSet *)CID2SET {
- if (SDLCharacterSet_CID2SET == nil) {
- SDLCharacterSet_CID2SET = [[SDLCharacterSet alloc] initWithValue:@"CID2SET"];
- }
- return SDLCharacterSet_CID2SET;
-}
-
-@end
+SDLCharacterSet const SDLCharacterSetType2Set = @"TYPE2SET";
+SDLCharacterSet const SDLCharacterSetType5Set = @"TYPE5SET";
+SDLCharacterSet const SDLCharacterSetCid1Set = @"CID1SET";
+SDLCharacterSet const SDLCharacterSetCid2Set = @"CID2SET";
diff --git a/SmartDeviceLink/SDLClusterModeStatus.h b/SmartDeviceLink/SDLClusterModeStatus.h
index 7b745804f..93b5e5c50 100644
--- a/SmartDeviceLink/SDLClusterModeStatus.h
+++ b/SmartDeviceLink/SDLClusterModeStatus.h
@@ -3,9 +3,9 @@
#import "SDLRPCMessage.h"
-@class SDLCarModeStatus;
-@class SDLPowerModeQualificationStatus;
-@class SDLPowerModeStatus;
+#import "SDLCarModeStatus.h"
+#import "SDLPowerModeQualificationStatus.h"
+#import "SDLPowerModeStatus.h"
@interface SDLClusterModeStatus : SDLRPCStruct {
@@ -15,8 +15,8 @@
- (instancetype)initWithDictionary:(NSMutableDictionary *)dict;
@property (strong) NSNumber *powerModeActive;
-@property (strong) SDLPowerModeQualificationStatus *powerModeQualificationStatus;
-@property (strong) SDLCarModeStatus *carModeStatus;
-@property (strong) SDLPowerModeStatus *powerModeStatus;
+@property (strong) SDLPowerModeQualificationStatus powerModeQualificationStatus;
+@property (strong) SDLCarModeStatus carModeStatus;
+@property (strong) SDLPowerModeStatus powerModeStatus;
@end
diff --git a/SmartDeviceLink/SDLClusterModeStatus.m b/SmartDeviceLink/SDLClusterModeStatus.m
index ecd2a528b..8384f7bf7 100644
--- a/SmartDeviceLink/SDLClusterModeStatus.m
+++ b/SmartDeviceLink/SDLClusterModeStatus.m
@@ -3,10 +3,7 @@
#import "SDLClusterModeStatus.h"
-#import "SDLCarModeStatus.h"
#import "SDLNames.h"
-#import "SDLPowerModeQualificationStatus.h"
-#import "SDLPowerModeStatus.h"
@implementation SDLClusterModeStatus
@@ -35,7 +32,7 @@
return [store objectForKey:NAMES_powerModeActive];
}
-- (void)setPowerModeQualificationStatus:(SDLPowerModeQualificationStatus *)powerModeQualificationStatus {
+- (void)setPowerModeQualificationStatus:(SDLPowerModeQualificationStatus)powerModeQualificationStatus {
if (powerModeQualificationStatus != nil) {
[store setObject:powerModeQualificationStatus forKey:NAMES_powerModeQualificationStatus];
} else {
@@ -43,16 +40,12 @@
}
}
-- (SDLPowerModeQualificationStatus *)powerModeQualificationStatus {
+- (SDLPowerModeQualificationStatus)powerModeQualificationStatus {
NSObject *obj = [store objectForKey:NAMES_powerModeQualificationStatus];
- if (obj == nil || [obj isKindOfClass:SDLPowerModeQualificationStatus.class]) {
- return (SDLPowerModeQualificationStatus *)obj;
- } else {
- return [SDLPowerModeQualificationStatus valueOf:(NSString *)obj];
- }
+ return (SDLPowerModeQualificationStatus)obj;
}
-- (void)setCarModeStatus:(SDLCarModeStatus *)carModeStatus {
+- (void)setCarModeStatus:(SDLCarModeStatus)carModeStatus {
if (carModeStatus != nil) {
[store setObject:carModeStatus forKey:NAMES_carModeStatus];
} else {
@@ -60,16 +53,12 @@
}
}
-- (SDLCarModeStatus *)carModeStatus {
+- (SDLCarModeStatus)carModeStatus {
NSObject *obj = [store objectForKey:NAMES_carModeStatus];
- if (obj == nil || [obj isKindOfClass:SDLCarModeStatus.class]) {
- return (SDLCarModeStatus *)obj;
- } else {
- return [SDLCarModeStatus valueOf:(NSString *)obj];
- }
+ return (SDLCarModeStatus)obj;
}
-- (void)setPowerModeStatus:(SDLPowerModeStatus *)powerModeStatus {
+- (void)setPowerModeStatus:(SDLPowerModeStatus)powerModeStatus {
if (powerModeStatus != nil) {
[store setObject:powerModeStatus forKey:NAMES_powerModeStatus];
} else {
@@ -77,13 +66,9 @@
}
}
-- (SDLPowerModeStatus *)powerModeStatus {
+- (SDLPowerModeStatus)powerModeStatus {
NSObject *obj = [store objectForKey:NAMES_powerModeStatus];
- if (obj == nil || [obj isKindOfClass:SDLPowerModeStatus.class]) {
- return (SDLPowerModeStatus *)obj;
- } else {
- return [SDLPowerModeStatus valueOf:(NSString *)obj];
- }
+ return (SDLPowerModeStatus)obj;
}
@end
diff --git a/SmartDeviceLink/SDLCompassDirection.h b/SmartDeviceLink/SDLCompassDirection.h
index cad90cc90..1d61391b4 100644
--- a/SmartDeviceLink/SDLCompassDirection.h
+++ b/SmartDeviceLink/SDLCompassDirection.h
@@ -9,68 +9,44 @@
*
* @since SDL 2.0
*/
-@interface SDLCompassDirection : SDLEnum {
-}
-
-/**
- * @abstract Convert String to SDLCompassDirection
- * @param value The value of the string to get an object for
- * @return SDLCompassDirection
- */
-+ (SDLCompassDirection *)valueOf:(NSString *)value;
-
-/**
- * @abstract Store the enumeration of all possible SDLCompassDirection
- * @return An array that store all possible SDLCompassDirection
- */
-+ (NSArray *)values;
+typedef SDLEnum SDLCompassDirection NS_EXTENSIBLE_STRING_ENUM;
/**
* @abstract Direction North
- * @return A SDLCompassDirection with the value of *NORTH*
*/
-+ (SDLCompassDirection *)NORTH;
+extern SDLCompassDirection const SDLCompassDirectionNorth;
/**
* @abstract Direction Northwest
- * @return A SDLCompassDirection with the value of *NORTHWEST*
*/
-+ (SDLCompassDirection *)NORTHWEST;
+extern SDLCompassDirection const SDLCompassDirectionNorthwest;
/**
* @abstract Direction West
- * @return A SDLCompassDirection with the value of *WEST*
*/
-+ (SDLCompassDirection *)WEST;
+extern SDLCompassDirection const SDLCompassDirectionWest;
/**
* @abstract Direction Southwest
- * @return A SDLCompassDirection with the value of *SOUTHWEST*
*/
-+ (SDLCompassDirection *)SOUTHWEST;
+extern SDLCompassDirection const SDLCompassDirectionSouthwest;
/**
* @abstract Direction South
- * @return A SDLCompassDirection with the value of *SOUTH*
*/
-+ (SDLCompassDirection *)SOUTH;
+extern SDLCompassDirection const SDLCompassDirectionSouth;
/**
* @abstract Direction Southeast
- * @return A SDLCompassDirection with the value of *SOUTHEAST*
*/
-+ (SDLCompassDirection *)SOUTHEAST;
+extern SDLCompassDirection const SDLCompassDirectionSoutheast;
/**
* @abstract Direction East
- * @return A SDLCompassDirection with the value of *EAST*
*/
-+ (SDLCompassDirection *)EAST;
+extern SDLCompassDirection const SDLCompassDirectionEast;
/**
* @abstract Direction Northeast
- * @return A SDLCompassDirection with the value of *NORTHEAST*
*/
-+ (SDLCompassDirection *)NORTHEAST;
-
-@end
+extern SDLCompassDirection const SDLCompassDirectionNortheast;
diff --git a/SmartDeviceLink/SDLCompassDirection.m b/SmartDeviceLink/SDLCompassDirection.m
index f1c79fed1..14d41a118 100644
--- a/SmartDeviceLink/SDLCompassDirection.m
+++ b/SmartDeviceLink/SDLCompassDirection.m
@@ -4,98 +4,11 @@
#import "SDLCompassDirection.h"
-SDLCompassDirection *SDLCompassDirection_NORTH = nil;
-SDLCompassDirection *SDLCompassDirection_NORTHWEST = nil;
-SDLCompassDirection *SDLCompassDirection_WEST = nil;
-SDLCompassDirection *SDLCompassDirection_SOUTHWEST = nil;
-SDLCompassDirection *SDLCompassDirection_SOUTH = nil;
-SDLCompassDirection *SDLCompassDirection_SOUTHEAST = nil;
-SDLCompassDirection *SDLCompassDirection_EAST = nil;
-SDLCompassDirection *SDLCompassDirection_NORTHEAST = nil;
-
-NSArray *SDLCompassDirection_values = nil;
-
-@implementation SDLCompassDirection
-
-+ (SDLCompassDirection *)valueOf:(NSString *)value {
- for (SDLCompassDirection *item in SDLCompassDirection.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLCompassDirection_values == nil) {
- SDLCompassDirection_values = @[
- SDLCompassDirection.NORTH,
- SDLCompassDirection.NORTHWEST,
- SDLCompassDirection.WEST,
- SDLCompassDirection.SOUTHWEST,
- SDLCompassDirection.SOUTH,
- SDLCompassDirection.SOUTHEAST,
- SDLCompassDirection.EAST,
- SDLCompassDirection.NORTHEAST,
- ];
- }
- return SDLCompassDirection_values;
-}
-
-+ (SDLCompassDirection *)NORTH {
- if (SDLCompassDirection_NORTH == nil) {
- SDLCompassDirection_NORTH = [[SDLCompassDirection alloc] initWithValue:@"NORTH"];
- }
- return SDLCompassDirection_NORTH;
-}
-
-+ (SDLCompassDirection *)NORTHWEST {
- if (SDLCompassDirection_NORTHWEST == nil) {
- SDLCompassDirection_NORTHWEST = [[SDLCompassDirection alloc] initWithValue:@"NORTHWEST"];
- }
- return SDLCompassDirection_NORTHWEST;
-}
-
-+ (SDLCompassDirection *)WEST {
- if (SDLCompassDirection_WEST == nil) {
- SDLCompassDirection_WEST = [[SDLCompassDirection alloc] initWithValue:@"WEST"];
- }
- return SDLCompassDirection_WEST;
-}
-
-+ (SDLCompassDirection *)SOUTHWEST {
- if (SDLCompassDirection_SOUTHWEST == nil) {
- SDLCompassDirection_SOUTHWEST = [[SDLCompassDirection alloc] initWithValue:@"SOUTHWEST"];
- }
- return SDLCompassDirection_SOUTHWEST;
-}
-
-+ (SDLCompassDirection *)SOUTH {
- if (SDLCompassDirection_SOUTH == nil) {
- SDLCompassDirection_SOUTH = [[SDLCompassDirection alloc] initWithValue:@"SOUTH"];
- }
- return SDLCompassDirection_SOUTH;
-}
-
-+ (SDLCompassDirection *)SOUTHEAST {
- if (SDLCompassDirection_SOUTHEAST == nil) {
- SDLCompassDirection_SOUTHEAST = [[SDLCompassDirection alloc] initWithValue:@"SOUTHEAST"];
- }
- return SDLCompassDirection_SOUTHEAST;
-}
-
-+ (SDLCompassDirection *)EAST {
- if (SDLCompassDirection_EAST == nil) {
- SDLCompassDirection_EAST = [[SDLCompassDirection alloc] initWithValue:@"EAST"];
- }
- return SDLCompassDirection_EAST;
-}
-
-+ (SDLCompassDirection *)NORTHEAST {
- if (SDLCompassDirection_NORTHEAST == nil) {
- SDLCompassDirection_NORTHEAST = [[SDLCompassDirection alloc] initWithValue:@"NORTHEAST"];
- }
- return SDLCompassDirection_NORTHEAST;
-}
-
-@end
+SDLCompassDirection const SDLCompassDirectionNorth = @"NORTH";
+SDLCompassDirection const SDLCompassDirectionNorthwest = @"NORTHWEST";
+SDLCompassDirection const SDLCompassDirectionWest = @"WEST";
+SDLCompassDirection const SDLCompassDirectionSouthwest = @"SOUTHWEST";
+SDLCompassDirection const SDLCompassDirectionSouth = @"SOUTH";
+SDLCompassDirection const SDLCompassDirectionSoutheast = @"SOUTHEAST";
+SDLCompassDirection const SDLCompassDirectionEast = @"EAST";
+SDLCompassDirection const SDLCompassDirectionNortheast = @"NORTHEAST";
diff --git a/SmartDeviceLink/SDLComponentVolumeStatus.h b/SmartDeviceLink/SDLComponentVolumeStatus.h
index 8df22663c..38928deda 100644
--- a/SmartDeviceLink/SDLComponentVolumeStatus.h
+++ b/SmartDeviceLink/SDLComponentVolumeStatus.h
@@ -9,56 +9,34 @@
*
* @since SDL 2.0
*/
-@interface SDLComponentVolumeStatus : SDLEnum {
-}
-
-/**
- * @abstract Convert String to SDLComponentVolumeStatus
- * @param value The value of the string to get an object for
- * @return SDLComponentVolumeStatus
- */
-+ (SDLComponentVolumeStatus *)valueOf:(NSString *)value;
-
-/**
- * @abstract Store the enumeration of all possible SDLComponentVolumeStatus
- * @return An array that store all possible SDLComponentVolumeStatus
- */
-+ (NSArray *)values;
+typedef SDLEnum SDLComponentVolumeStatus NS_EXTENSIBLE_STRING_ENUM;
/**
* @abstract Unknown SDLComponentVolumeStatus
- * @return a SDLComponentVolumeStatus with the value of *UNKNOWN*
*/
-+ (SDLComponentVolumeStatus *)UNKNOWN;
+extern SDLComponentVolumeStatus const SDLComponentVolumeStatusUnknown;
/**
* @abstract Normal SDLComponentVolumeStatus
- * @return a SDLComponentVolumeStatus with the value of *NORMAL*
*/
-+ (SDLComponentVolumeStatus *)NORMAL;
+extern SDLComponentVolumeStatus const SDLComponentVolumeStatusNormal;
/**
* @abstract Low SDLComponentVolumeStatus
- * @return a SDLComponentVolumeStatus with the value of *LOW*
*/
-+ (SDLComponentVolumeStatus *)LOW;
+extern SDLComponentVolumeStatus const SDLComponentVolumeStatusLow;
/**
* @abstract Fault SDLComponentVolumeStatus
- * @return a SDLComponentVolumeStatus with the value of *FAULT*
*/
-+ (SDLComponentVolumeStatus *)FAULT;
+extern SDLComponentVolumeStatus const SDLComponentVolumeStatusFault;
/**
* @abstract Alert SDLComponentVolumeStatus
- * @return a SDLComponentVolumeStatus with the value of *ALERT*
*/
-+ (SDLComponentVolumeStatus *)ALERT;
+extern SDLComponentVolumeStatus const SDLComponentVolumeStatusAlert;
/**
* @abstract Not supported SDLComponentVolumeStatus
- * @return a SDLComponentVolumeStatus with the value of *NOT_SUPPORTED*
*/
-+ (SDLComponentVolumeStatus *)NOT_SUPPORTED;
-
-@end
+extern SDLComponentVolumeStatus const SDLComponentVolumeStatusNotSupported;
diff --git a/SmartDeviceLink/SDLComponentVolumeStatus.m b/SmartDeviceLink/SDLComponentVolumeStatus.m
index 2e6834fb5..e688b9fc2 100644
--- a/SmartDeviceLink/SDLComponentVolumeStatus.m
+++ b/SmartDeviceLink/SDLComponentVolumeStatus.m
@@ -4,80 +4,9 @@
#import "SDLComponentVolumeStatus.h"
-SDLComponentVolumeStatus *SDLComponentVolumeStatus_UNKNOWN = nil;
-SDLComponentVolumeStatus *SDLComponentVolumeStatus_NORMAL = nil;
-SDLComponentVolumeStatus *SDLComponentVolumeStatus_LOW = nil;
-SDLComponentVolumeStatus *SDLComponentVolumeStatus_FAULT = nil;
-SDLComponentVolumeStatus *SDLComponentVolumeStatus_ALERT = nil;
-SDLComponentVolumeStatus *SDLComponentVolumeStatus_NOT_SUPPORTED = nil;
-
-NSArray *SDLComponentVolumeStatus_values = nil;
-
-@implementation SDLComponentVolumeStatus
-
-+ (SDLComponentVolumeStatus *)valueOf:(NSString *)value {
- for (SDLComponentVolumeStatus *item in SDLComponentVolumeStatus.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLComponentVolumeStatus_values == nil) {
- SDLComponentVolumeStatus_values = @[
- SDLComponentVolumeStatus.UNKNOWN,
- SDLComponentVolumeStatus.NORMAL,
- SDLComponentVolumeStatus.LOW,
- SDLComponentVolumeStatus.FAULT,
- SDLComponentVolumeStatus.ALERT,
- SDLComponentVolumeStatus.NOT_SUPPORTED,
- ];
- }
- return SDLComponentVolumeStatus_values;
-}
-
-+ (SDLComponentVolumeStatus *)UNKNOWN {
- if (SDLComponentVolumeStatus_UNKNOWN == nil) {
- SDLComponentVolumeStatus_UNKNOWN = [[SDLComponentVolumeStatus alloc] initWithValue:@"UNKNOWN"];
- }
- return SDLComponentVolumeStatus_UNKNOWN;
-}
-
-+ (SDLComponentVolumeStatus *)NORMAL {
- if (SDLComponentVolumeStatus_NORMAL == nil) {
- SDLComponentVolumeStatus_NORMAL = [[SDLComponentVolumeStatus alloc] initWithValue:@"NORMAL"];
- }
- return SDLComponentVolumeStatus_NORMAL;
-}
-
-+ (SDLComponentVolumeStatus *)LOW {
- if (SDLComponentVolumeStatus_LOW == nil) {
- SDLComponentVolumeStatus_LOW = [[SDLComponentVolumeStatus alloc] initWithValue:@"LOW"];
- }
- return SDLComponentVolumeStatus_LOW;
-}
-
-+ (SDLComponentVolumeStatus *)FAULT {
- if (SDLComponentVolumeStatus_FAULT == nil) {
- SDLComponentVolumeStatus_FAULT = [[SDLComponentVolumeStatus alloc] initWithValue:@"FAULT"];
- }
- return SDLComponentVolumeStatus_FAULT;
-}
-
-+ (SDLComponentVolumeStatus *)ALERT {
- if (SDLComponentVolumeStatus_ALERT == nil) {
- SDLComponentVolumeStatus_ALERT = [[SDLComponentVolumeStatus alloc] initWithValue:@"ALERT"];
- }
- return SDLComponentVolumeStatus_ALERT;
-}
-
-+ (SDLComponentVolumeStatus *)NOT_SUPPORTED {
- if (SDLComponentVolumeStatus_NOT_SUPPORTED == nil) {
- SDLComponentVolumeStatus_NOT_SUPPORTED = [[SDLComponentVolumeStatus alloc] initWithValue:@"NOT_SUPPORTED"];
- }
- return SDLComponentVolumeStatus_NOT_SUPPORTED;
-}
-
-@end
+SDLComponentVolumeStatus const SDLComponentVolumeStatusUnknown = @"UNKNOWN";
+SDLComponentVolumeStatus const SDLComponentVolumeStatusNormal = @"NORMAL";
+SDLComponentVolumeStatus const SDLComponentVolumeStatusLow = @"LOW";
+SDLComponentVolumeStatus const SDLComponentVolumeStatusFault = @"FAULT";
+SDLComponentVolumeStatus const SDLComponentVolumeStatusAlert = @"ALERT";
+SDLComponentVolumeStatus const SDLComponentVolumeStatusNotSupported = @"NOT_SUPPORTED";
diff --git a/SmartDeviceLink/SDLDIDResult.h b/SmartDeviceLink/SDLDIDResult.h
index a7d0b6c16..3ec5435b0 100644
--- a/SmartDeviceLink/SDLDIDResult.h
+++ b/SmartDeviceLink/SDLDIDResult.h
@@ -3,7 +3,7 @@
#import "SDLRPCMessage.h"
-@class SDLVehicleDataResultCode;
+#import "SDLVehicleDataResultCode.h"
@interface SDLDIDResult : SDLRPCStruct {
@@ -12,7 +12,7 @@
- (instancetype)init;
- (instancetype)initWithDictionary:(NSMutableDictionary *)dict;
-@property (strong) SDLVehicleDataResultCode *resultCode;
+@property (strong) SDLVehicleDataResultCode resultCode;
@property (strong) NSNumber *didLocation;
@property (strong) NSString *data;
diff --git a/SmartDeviceLink/SDLDIDResult.m b/SmartDeviceLink/SDLDIDResult.m
index be42582e7..97163b593 100644
--- a/SmartDeviceLink/SDLDIDResult.m
+++ b/SmartDeviceLink/SDLDIDResult.m
@@ -4,8 +4,6 @@
#import "SDLDIDResult.h"
#import "SDLNames.h"
-#import "SDLVehicleDataResultCode.h"
-
@implementation SDLDIDResult
@@ -21,7 +19,7 @@
return self;
}
-- (void)setResultCode:(SDLVehicleDataResultCode *)resultCode {
+- (void)setResultCode:(SDLVehicleDataResultCode)resultCode {
if (resultCode != nil) {
[store setObject:resultCode forKey:NAMES_resultCode];
} else {
@@ -29,13 +27,9 @@
}
}
-- (SDLVehicleDataResultCode *)resultCode {
+- (SDLVehicleDataResultCode)resultCode {
NSObject *obj = [store objectForKey:NAMES_resultCode];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataResultCode.class]) {
- return (SDLVehicleDataResultCode *)obj;
- } else {
- return [SDLVehicleDataResultCode valueOf:(NSString *)obj];
- }
+ return (SDLVehicleDataResultCode)obj;
}
- (void)setDidLocation:(NSNumber *)didLocation {
diff --git a/SmartDeviceLink/SDLDeviceLevelStatus.h b/SmartDeviceLink/SDLDeviceLevelStatus.h
index e0cb85aea..1063d8520 100644
--- a/SmartDeviceLink/SDLDeviceLevelStatus.h
+++ b/SmartDeviceLink/SDLDeviceLevelStatus.h
@@ -9,56 +9,34 @@
*
* @since SDL 2.0
*/
-@interface SDLDeviceLevelStatus : SDLEnum {
-}
-
-/**
- * Convert String to DeviceLevelStatus
- * @param value String
- * @return DeviceLevelStatus
- */
-+ (SDLDeviceLevelStatus *)valueOf:(NSString *)value;
-
-/**
- @abstract Store the enumeration of all possible SDLDeviceLevelStatus
- @return an array that store all possible SDLDeviceLevelStatus
- */
-+ (NSArray *)values;
+typedef SDLEnum SDLDeviceLevelStatus NS_EXTENSIBLE_STRING_ENUM;
/**
* @abstract Device battery level is zero bars
- * @return a SDLDeviceLevelStatus with value of *ZERO_LEVEL_BARS*
*/
-+ (SDLDeviceLevelStatus *)ZERO_LEVEL_BARS;
+extern SDLDeviceLevelStatus const SDLDeviceLevelStatusZeroLevelBars;
/**
* @abstract Device battery level is one bar
- * @return a SDLDeviceLevelStatus with value of *ONE_LEVEL_BARS*
*/
-+ (SDLDeviceLevelStatus *)ONE_LEVEL_BARS;
+extern SDLDeviceLevelStatus const SDLDeviceLevelStatusOneLevelBars;
/**
* @abstract Device battery level is two bars
- * @return a SDLDeviceLevelStatus with value of *TWO_LEVEL_BARS*
*/
-+ (SDLDeviceLevelStatus *)TWO_LEVEL_BARS;
+extern SDLDeviceLevelStatus const SDLDeviceLevelStatusTwoLevelBars;
/**
* @abstract Device battery level is three bars
- * @return a SDLDeviceLevelStatus with value of *THREE_LEVEL_BARS*
*/
-+ (SDLDeviceLevelStatus *)THREE_LEVEL_BARS;
+extern SDLDeviceLevelStatus const SDLDeviceLevelStatusThreeLevelBars;
/**
* @abstract Device battery level is four bars
- * @return a SDLDeviceLevelStatus with value of *FOUR_LEVEL_BARS*
*/
-+ (SDLDeviceLevelStatus *)FOUR_LEVEL_BARS;
+extern SDLDeviceLevelStatus const SDLDeviceLevelStatusFourLevelBars;
/**
* @abstract Device battery level is unknown
- * @return a SDLDeviceLevelStatus with value of *NOT_PROVIDED*
*/
-+ (SDLDeviceLevelStatus *)NOT_PROVIDED;
-
-@end
+extern SDLDeviceLevelStatus const SDLDeviceLevelStatusNotProvided;
diff --git a/SmartDeviceLink/SDLDeviceLevelStatus.m b/SmartDeviceLink/SDLDeviceLevelStatus.m
index 5babd37b5..a9b5ec594 100644
--- a/SmartDeviceLink/SDLDeviceLevelStatus.m
+++ b/SmartDeviceLink/SDLDeviceLevelStatus.m
@@ -4,80 +4,9 @@
#import "SDLDeviceLevelStatus.h"
-SDLDeviceLevelStatus *SDLDeviceLevelStatus_ZERO_LEVEL_BARS = nil;
-SDLDeviceLevelStatus *SDLDeviceLevelStatus_ONE_LEVEL_BARS = nil;
-SDLDeviceLevelStatus *SDLDeviceLevelStatus_TWO_LEVEL_BARS = nil;
-SDLDeviceLevelStatus *SDLDeviceLevelStatus_THREE_LEVEL_BARS = nil;
-SDLDeviceLevelStatus *SDLDeviceLevelStatus_FOUR_LEVEL_BARS = nil;
-SDLDeviceLevelStatus *SDLDeviceLevelStatus_NOT_PROVIDED = nil;
-
-NSArray *SDLDeviceLevelStatus_values = nil;
-
-@implementation SDLDeviceLevelStatus
-
-+ (SDLDeviceLevelStatus *)valueOf:(NSString *)value {
- for (SDLDeviceLevelStatus *item in SDLDeviceLevelStatus.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLDeviceLevelStatus_values == nil) {
- SDLDeviceLevelStatus_values = @[
- SDLDeviceLevelStatus.ZERO_LEVEL_BARS,
- SDLDeviceLevelStatus.ONE_LEVEL_BARS,
- SDLDeviceLevelStatus.TWO_LEVEL_BARS,
- SDLDeviceLevelStatus.THREE_LEVEL_BARS,
- SDLDeviceLevelStatus.FOUR_LEVEL_BARS,
- SDLDeviceLevelStatus.NOT_PROVIDED,
- ];
- }
- return SDLDeviceLevelStatus_values;
-}
-
-+ (SDLDeviceLevelStatus *)ZERO_LEVEL_BARS {
- if (SDLDeviceLevelStatus_ZERO_LEVEL_BARS == nil) {
- SDLDeviceLevelStatus_ZERO_LEVEL_BARS = [[SDLDeviceLevelStatus alloc] initWithValue:@"ZERO_LEVEL_BARS"];
- }
- return SDLDeviceLevelStatus_ZERO_LEVEL_BARS;
-}
-
-+ (SDLDeviceLevelStatus *)ONE_LEVEL_BARS {
- if (SDLDeviceLevelStatus_ONE_LEVEL_BARS == nil) {
- SDLDeviceLevelStatus_ONE_LEVEL_BARS = [[SDLDeviceLevelStatus alloc] initWithValue:@"ONE_LEVEL_BARS"];
- }
- return SDLDeviceLevelStatus_ONE_LEVEL_BARS;
-}
-
-+ (SDLDeviceLevelStatus *)TWO_LEVEL_BARS {
- if (SDLDeviceLevelStatus_TWO_LEVEL_BARS == nil) {
- SDLDeviceLevelStatus_TWO_LEVEL_BARS = [[SDLDeviceLevelStatus alloc] initWithValue:@"TWO_LEVEL_BARS"];
- }
- return SDLDeviceLevelStatus_TWO_LEVEL_BARS;
-}
-
-+ (SDLDeviceLevelStatus *)THREE_LEVEL_BARS {
- if (SDLDeviceLevelStatus_THREE_LEVEL_BARS == nil) {
- SDLDeviceLevelStatus_THREE_LEVEL_BARS = [[SDLDeviceLevelStatus alloc] initWithValue:@"THREE_LEVEL_BARS"];
- }
- return SDLDeviceLevelStatus_THREE_LEVEL_BARS;
-}
-
-+ (SDLDeviceLevelStatus *)FOUR_LEVEL_BARS {
- if (SDLDeviceLevelStatus_FOUR_LEVEL_BARS == nil) {
- SDLDeviceLevelStatus_FOUR_LEVEL_BARS = [[SDLDeviceLevelStatus alloc] initWithValue:@"FOUR_LEVEL_BARS"];
- }
- return SDLDeviceLevelStatus_FOUR_LEVEL_BARS;
-}
-
-+ (SDLDeviceLevelStatus *)NOT_PROVIDED {
- if (SDLDeviceLevelStatus_NOT_PROVIDED == nil) {
- SDLDeviceLevelStatus_NOT_PROVIDED = [[SDLDeviceLevelStatus alloc] initWithValue:@"NOT_PROVIDED"];
- }
- return SDLDeviceLevelStatus_NOT_PROVIDED;
-}
-
-@end
+SDLDeviceLevelStatus const SDLDeviceLevelStatusZeroLevelBars = @"ZERO_LEVEL_BARS";
+SDLDeviceLevelStatus const SDLDeviceLevelStatusOneLevelBars = @"ONE_LEVEL_BARS";
+SDLDeviceLevelStatus const SDLDeviceLevelStatusTwoLevelBars = @"TWO_LEVEL_BARS";
+SDLDeviceLevelStatus const SDLDeviceLevelStatusThreeLevelBars = @"THREE_LEVEL_BARS";
+SDLDeviceLevelStatus const SDLDeviceLevelStatusFourLevelBars = @"FOUR_LEVEL_BARS";
+SDLDeviceLevelStatus const SDLDeviceLevelStatusNotProvided = @"NOT_PROVIDED";
diff --git a/SmartDeviceLink/SDLDeviceStatus.h b/SmartDeviceLink/SDLDeviceStatus.h
index d8442d438..677848d4d 100644
--- a/SmartDeviceLink/SDLDeviceStatus.h
+++ b/SmartDeviceLink/SDLDeviceStatus.h
@@ -3,8 +3,8 @@
#import "SDLRPCMessage.h"
-@class SDLDeviceLevelStatus;
-@class SDLPrimaryAudioSource;
+#import "SDLDeviceLevelStatus.h"
+#import "SDLPrimaryAudioSource.h"
/**
@@ -155,7 +155,7 @@
*
* Required
*/
-@property (strong) SDLDeviceLevelStatus *battLevelStatus;
+@property (strong) SDLDeviceLevelStatus battLevelStatus;
/**
* @abstract The status of the stereo audio output channel
@@ -178,7 +178,7 @@
*
* Required
*/
-@property (strong) SDLDeviceLevelStatus *signalLevelStatus;
+@property (strong) SDLDeviceLevelStatus signalLevelStatus;
/**
* @abstract The current primary audio source of SDL (if selected).
@@ -187,7 +187,7 @@
*
* Required
*/
-@property (strong) SDLPrimaryAudioSource *primaryAudioSource;
+@property (strong) SDLPrimaryAudioSource primaryAudioSource;
/**
* @abstract Indicates if an emergency call is active
diff --git a/SmartDeviceLink/SDLDeviceStatus.m b/SmartDeviceLink/SDLDeviceStatus.m
index fbe3b4b96..0c8bf9153 100644
--- a/SmartDeviceLink/SDLDeviceStatus.m
+++ b/SmartDeviceLink/SDLDeviceStatus.m
@@ -82,7 +82,7 @@
return [store objectForKey:NAMES_textMsgAvailable];
}
-- (void)setBattLevelStatus:(SDLDeviceLevelStatus *)battLevelStatus {
+- (void)setBattLevelStatus:(SDLDeviceLevelStatus )battLevelStatus {
if (battLevelStatus != nil) {
[store setObject:battLevelStatus forKey:NAMES_battLevelStatus];
} else {
@@ -90,13 +90,9 @@
}
}
-- (SDLDeviceLevelStatus *)battLevelStatus {
+- (SDLDeviceLevelStatus )battLevelStatus {
NSObject *obj = [store objectForKey:NAMES_battLevelStatus];
- if (obj == nil || [obj isKindOfClass:SDLDeviceLevelStatus.class]) {
- return (SDLDeviceLevelStatus *)obj;
- } else {
- return [SDLDeviceLevelStatus valueOf:(NSString *)obj];
- }
+ return (SDLDeviceLevelStatus)obj;
}
- (void)setStereoAudioOutputMuted:(NSNumber *)stereoAudioOutputMuted {
@@ -123,7 +119,7 @@
return [store objectForKey:NAMES_monoAudioOutputMuted];
}
-- (void)setSignalLevelStatus:(SDLDeviceLevelStatus *)signalLevelStatus {
+- (void)setSignalLevelStatus:(SDLDeviceLevelStatus)signalLevelStatus {
if (signalLevelStatus != nil) {
[store setObject:signalLevelStatus forKey:NAMES_signalLevelStatus];
} else {
@@ -131,16 +127,12 @@
}
}
-- (SDLDeviceLevelStatus *)signalLevelStatus {
+- (SDLDeviceLevelStatus)signalLevelStatus {
NSObject *obj = [store objectForKey:NAMES_signalLevelStatus];
- if (obj == nil || [obj isKindOfClass:SDLDeviceLevelStatus.class]) {
- return (SDLDeviceLevelStatus *)obj;
- } else {
- return [SDLDeviceLevelStatus valueOf:(NSString *)obj];
- }
+ return (SDLDeviceLevelStatus)obj;
}
-- (void)setPrimaryAudioSource:(SDLPrimaryAudioSource *)primaryAudioSource {
+- (void)setPrimaryAudioSource:(SDLPrimaryAudioSource)primaryAudioSource {
if (primaryAudioSource != nil) {
[store setObject:primaryAudioSource forKey:NAMES_primaryAudioSource];
} else {
@@ -148,13 +140,9 @@
}
}
-- (SDLPrimaryAudioSource *)primaryAudioSource {
+- (SDLPrimaryAudioSource)primaryAudioSource {
NSObject *obj = [store objectForKey:NAMES_primaryAudioSource];
- if (obj == nil || [obj isKindOfClass:SDLPrimaryAudioSource.class]) {
- return (SDLPrimaryAudioSource *)obj;
- } else {
- return [SDLPrimaryAudioSource valueOf:(NSString *)obj];
- }
+ return (SDLPrimaryAudioSource)obj;
}
- (void)setECallEventActive:(NSNumber *)eCallEventActive {
diff --git a/SmartDeviceLink/SDLDimension.h b/SmartDeviceLink/SDLDimension.h
index 535f93e6e..fdc9b5587 100644
--- a/SmartDeviceLink/SDLDimension.h
+++ b/SmartDeviceLink/SDLDimension.h
@@ -4,48 +4,24 @@
#import "SDLEnum.h"
-#import <Foundation/Foundation.h>
-
/**
* The supported dimensions of the GPS.
*
* @since SDL 2.0
*/
-@interface SDLDimension : SDLEnum {
-}
-
-/**
- * Convert String to SDLDimension
- *
- * @param value The value of the string to get an object for
- *
- * @return SDLDimension
- */
-+ (SDLDimension *)valueOf:(NSString *)value;
-
-/**
- * @abstract Store the enumeration of all possible SDLDimension
- *
- * @return An array that store all possible SDLDimension
- */
-+ (NSArray *)values;
+typedef SDLEnum SDLDimension NS_EXTENSIBLE_STRING_ENUM;
/**
* @abstract No GPS at all
- * @return the dimension with value of *NO_FIX*
*/
-+ (SDLDimension *)NO_FIX;
+extern SDLDimension const SDLDimensionNoFix;
/**
* @abstract Longitude and latitude of the GPS
- * @return the dimension with value of *2D*
*/
-+ (SDLDimension *)_2D;
+extern SDLDimension const SDLDimension2d;
/**
* @abstract Longitude and latitude and altitude of the GPS
- * @return the dimension with value of *3D*
*/
-+ (SDLDimension *)_3D;
-
-@end
+extern SDLDimension const SDLDimension3d;
diff --git a/SmartDeviceLink/SDLDimension.m b/SmartDeviceLink/SDLDimension.m
index 81e0114fc..862f13709 100644
--- a/SmartDeviceLink/SDLDimension.m
+++ b/SmartDeviceLink/SDLDimension.m
@@ -4,53 +4,6 @@
#import "SDLDimension.h"
-SDLDimension *SDLDimension_NO_FIX = nil;
-SDLDimension *SDLDimension_2D = nil;
-SDLDimension *SDLDimension_3D = nil;
-
-NSArray *SDLDimension_values = nil;
-
-@implementation SDLDimension
-
-+ (SDLDimension *)valueOf:(NSString *)value {
- for (SDLDimension *item in SDLDimension.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLDimension_values == nil) {
- SDLDimension_values = @[
- SDLDimension.NO_FIX,
- SDLDimension._2D,
- SDLDimension._3D,
- ];
- }
- return SDLDimension_values;
-}
-
-+ (SDLDimension *)NO_FIX {
- if (SDLDimension_NO_FIX == nil) {
- SDLDimension_NO_FIX = [[SDLDimension alloc] initWithValue:@"NO_FIX"];
- }
- return SDLDimension_NO_FIX;
-}
-
-+ (SDLDimension *)_2D {
- if (SDLDimension_2D == nil) {
- SDLDimension_2D = [[SDLDimension alloc] initWithValue:@"2D"];
- }
- return SDLDimension_2D;
-}
-
-+ (SDLDimension *)_3D {
- if (SDLDimension_3D == nil) {
- SDLDimension_3D = [[SDLDimension alloc] initWithValue:@"3D"];
- }
- return SDLDimension_3D;
-}
-
-@end
+SDLDimension const SDLDimensionNoFix = @"NO_FIX";
+SDLDimension const SDLDimension2d = @"2D";
+SDLDimension const SDLDimension3d = @"3D";
diff --git a/SmartDeviceLink/SDLDisplayCapabilities.h b/SmartDeviceLink/SDLDisplayCapabilities.h
index 57ebd6719..2b22139c2 100644
--- a/SmartDeviceLink/SDLDisplayCapabilities.h
+++ b/SmartDeviceLink/SDLDisplayCapabilities.h
@@ -3,10 +3,9 @@
#import "SDLRPCMessage.h"
-@class SDLDisplayType;
+#import "SDLDisplayType.h"
@class SDLScreenParams;
-
/**
* Contains information about the display for the SDL system to which the application is currently connected.
*
@@ -32,7 +31,7 @@
*
* Required
*/
-@property (strong) SDLDisplayType *displayType;
+@property (strong) SDLDisplayType displayType;
/**
* @abstract An array of SDLTextField structures, each of which describes a field in the HMI which the application can write to using operations such as *SDLShow*, *SDLSetMediaClockTimer*, etc.
diff --git a/SmartDeviceLink/SDLDisplayCapabilities.m b/SmartDeviceLink/SDLDisplayCapabilities.m
index 07ae53d62..8ba986a08 100644
--- a/SmartDeviceLink/SDLDisplayCapabilities.m
+++ b/SmartDeviceLink/SDLDisplayCapabilities.m
@@ -25,7 +25,7 @@
return self;
}
-- (void)setDisplayType:(SDLDisplayType *)displayType {
+- (void)setDisplayType:(SDLDisplayType)displayType {
if (displayType != nil) {
[store setObject:displayType forKey:NAMES_displayType];
} else {
@@ -33,13 +33,9 @@
}
}
-- (SDLDisplayType *)displayType {
+- (SDLDisplayType)displayType {
NSObject *obj = [store objectForKey:NAMES_displayType];
- if (obj == nil || [obj isKindOfClass:SDLDisplayType.class]) {
- return (SDLDisplayType *)obj;
- } else {
- return [SDLDisplayType valueOf:(NSString *)obj];
- }
+ return (SDLDisplayType)obj;
}
- (void)setTextFields:(NSMutableArray *)textFields {
@@ -94,12 +90,12 @@
- (NSMutableArray *)mediaClockFormats {
NSMutableArray *array = [store objectForKey:NAMES_mediaClockFormats];
- if ([array count] < 1 || [[array objectAtIndex:0] isKindOfClass:SDLMediaClockFormat.class]) {
+ if ([array count] < 1) {
return array;
} else {
NSMutableArray *newList = [NSMutableArray arrayWithCapacity:[array count]];
for (NSString *enumString in array) {
- [newList addObject:[SDLMediaClockFormat valueOf:enumString]];
+ [newList addObject:(SDLMediaClockFormat)enumString];
}
return newList;
}
diff --git a/SmartDeviceLink/SDLDisplayType.h b/SmartDeviceLink/SDLDisplayType.h
index 3bb2f2b9a..3147212d6 100644
--- a/SmartDeviceLink/SDLDisplayType.h
+++ b/SmartDeviceLink/SDLDisplayType.h
@@ -9,53 +9,30 @@
*
* @since SDL 1.0
*/
-@interface SDLDisplayType : SDLEnum {
-}
-
-/**
- * Convert String to SDLDisplayType
- *
- * @param value The value of the string to get an object for
- *
- * @return SDLDisplayType
- */
-+ (SDLDisplayType *)valueOf:(NSString *)value;
-
-/**
- * @abstract Store the enumeration of all possible SDLDisplayType
- *
- * @return an array that store all possible SDLDisplayType
- */
-+ (NSArray *)values;
+typedef SDLEnum SDLDisplayType NS_EXTENSIBLE_STRING_ENUM;
/**
* @abstract This display type provides a 2-line x 20 character "dot matrix" display.
- *
- * @return SDLDisplayType with value of *CID*
*/
-+ (SDLDisplayType *)CID;
+extern SDLDisplayType const SDLDisplayTypeCid;
-+ (SDLDisplayType *)TYPE2;
+extern SDLDisplayType const SDLDisplayTypeType2;
-+ (SDLDisplayType *)TYPE5;
+extern SDLDisplayType const SDLDisplayTypeType5;
/**
* @abstract This display type provides an 8 inch touchscreen display.
- *
- * @return SDLDisplayType with value of *NGN*
*/
-+ (SDLDisplayType *)NGN;
-
-+ (SDLDisplayType *)GEN2_8_DMA;
+extern SDLDisplayType const SDLDisplayTypeNgn;
-+ (SDLDisplayType *)GEN2_6_DMA;
+extern SDLDisplayType const SDLDisplayTypeGen28Dma;
-+ (SDLDisplayType *)MFD3;
+extern SDLDisplayType const SDLDisplayTypeGen26Dma;
-+ (SDLDisplayType *)MFD4;
+extern SDLDisplayType const SDLDisplayTypeMfd3;
-+ (SDLDisplayType *)MFD5;
+extern SDLDisplayType const SDLDisplayTypeMfd4;
-+ (SDLDisplayType *)GEN3_8_INCH;
+extern SDLDisplayType const SDLDisplayTypeMfd5;
-@end
+extern SDLDisplayType const SDLDisplayTypeGen38Inch;
diff --git a/SmartDeviceLink/SDLDisplayType.m b/SmartDeviceLink/SDLDisplayType.m
index 8059aa54b..28676f40a 100644
--- a/SmartDeviceLink/SDLDisplayType.m
+++ b/SmartDeviceLink/SDLDisplayType.m
@@ -4,116 +4,13 @@
#import "SDLDisplayType.h"
-SDLDisplayType *SDLDisplayType_CID = nil;
-SDLDisplayType *SDLDisplayType_TYPE2 = nil;
-SDLDisplayType *SDLDisplayType_TYPE5 = nil;
-SDLDisplayType *SDLDisplayType_NGN = nil;
-SDLDisplayType *SDLDisplayType_GEN2_8_DMA = nil;
-SDLDisplayType *SDLDisplayType_GEN2_6_DMA = nil;
-SDLDisplayType *SDLDisplayType_MFD3 = nil;
-SDLDisplayType *SDLDisplayType_MFD4 = nil;
-SDLDisplayType *SDLDisplayType_MFD5 = nil;
-SDLDisplayType *SDLDisplayType_GEN3_8_INCH = nil;
-
-NSArray *SDLDisplayType_values = nil;
-
-@implementation SDLDisplayType
-
-+ (SDLDisplayType *)valueOf:(NSString *)value {
- for (SDLDisplayType *item in SDLDisplayType.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLDisplayType_values == nil) {
- SDLDisplayType_values = @[
- SDLDisplayType.CID,
- SDLDisplayType.TYPE2,
- SDLDisplayType.TYPE5,
- SDLDisplayType.NGN,
- SDLDisplayType.GEN2_8_DMA,
- SDLDisplayType.GEN2_6_DMA,
- SDLDisplayType.MFD3,
- SDLDisplayType.MFD4,
- SDLDisplayType.MFD5,
- SDLDisplayType.GEN3_8_INCH,
- ];
- }
- return SDLDisplayType_values;
-}
-
-+ (SDLDisplayType *)CID {
- if (SDLDisplayType_CID == nil) {
- SDLDisplayType_CID = [[SDLDisplayType alloc] initWithValue:@"CID"];
- }
- return SDLDisplayType_CID;
-}
-
-+ (SDLDisplayType *)TYPE2 {
- if (SDLDisplayType_TYPE2 == nil) {
- SDLDisplayType_TYPE2 = [[SDLDisplayType alloc] initWithValue:@"TYPE2"];
- }
- return SDLDisplayType_TYPE2;
-}
-
-+ (SDLDisplayType *)TYPE5 {
- if (SDLDisplayType_TYPE5 == nil) {
- SDLDisplayType_TYPE5 = [[SDLDisplayType alloc] initWithValue:@"TYPE5"];
- }
- return SDLDisplayType_TYPE5;
-}
-
-+ (SDLDisplayType *)NGN {
- if (SDLDisplayType_NGN == nil) {
- SDLDisplayType_NGN = [[SDLDisplayType alloc] initWithValue:@"NGN"];
- }
- return SDLDisplayType_NGN;
-}
-
-+ (SDLDisplayType *)GEN2_8_DMA {
- if (SDLDisplayType_GEN2_8_DMA == nil) {
- SDLDisplayType_GEN2_8_DMA = [[SDLDisplayType alloc] initWithValue:@"GEN2_8_DMA"];
- }
- return SDLDisplayType_GEN2_8_DMA;
-}
-
-+ (SDLDisplayType *)GEN2_6_DMA {
- if (SDLDisplayType_GEN2_6_DMA == nil) {
- SDLDisplayType_GEN2_6_DMA = [[SDLDisplayType alloc] initWithValue:@"GEN2_6_DMA"];
- }
- return SDLDisplayType_GEN2_6_DMA;
-}
-
-+ (SDLDisplayType *)MFD3 {
- if (SDLDisplayType_MFD3 == nil) {
- SDLDisplayType_MFD3 = [[SDLDisplayType alloc] initWithValue:@"MFD3"];
- }
- return SDLDisplayType_MFD3;
-}
-
-+ (SDLDisplayType *)MFD4 {
- if (SDLDisplayType_MFD4 == nil) {
- SDLDisplayType_MFD4 = [[SDLDisplayType alloc] initWithValue:@"MFD4"];
- }
- return SDLDisplayType_MFD4;
-}
-
-+ (SDLDisplayType *)MFD5 {
- if (SDLDisplayType_MFD5 == nil) {
- SDLDisplayType_MFD5 = [[SDLDisplayType alloc] initWithValue:@"MFD5"];
- }
- return SDLDisplayType_MFD5;
-}
-
-+ (SDLDisplayType *)GEN3_8_INCH {
- if (SDLDisplayType_GEN3_8_INCH == nil) {
- SDLDisplayType_GEN3_8_INCH = [[SDLDisplayType alloc] initWithValue:@"GEN3_8-INCH"];
- }
- return SDLDisplayType_GEN3_8_INCH;
-}
-
-@end
+SDLDisplayType const SDLDisplayTypeCid = @"CID";
+SDLDisplayType const SDLDisplayTypeType2 = @"TYPE2";
+SDLDisplayType const SDLDisplayTypeType5 = @"TYPE5";
+SDLDisplayType const SDLDisplayTypeNgn = @"NGN";
+SDLDisplayType const SDLDisplayTypeGen28Dma = @"GEN2_8_DMA";
+SDLDisplayType const SDLDisplayTypeGen26Gma = @"GEN2_6_DMA";
+SDLDisplayType const SDLDisplayTypeMfd3 = @"MFD3";
+SDLDisplayType const SDLDisplayTypeMfd4 = @"MFD4";
+SDLDisplayType const SDLDisplayTypeMfd5 = @"MFD5";
+SDLDisplayType const SDLDisplayTypeGen38inch = @"GEN3_8_INCH";
diff --git a/SmartDeviceLink/SDLDriverDistractionState.h b/SmartDeviceLink/SDLDriverDistractionState.h
index 7143d09d2..97d1841d8 100644
--- a/SmartDeviceLink/SDLDriverDistractionState.h
+++ b/SmartDeviceLink/SDLDriverDistractionState.h
@@ -9,37 +9,15 @@
*
* @since SDL 1.0
*/
-@interface SDLDriverDistractionState : SDLEnum {
-}
-
-/**
- * Convert String to SDLDisplayType
- *
- * @param value The value of the string to get an object for
- *
- * @return SDLDisplayType
- */
-+ (SDLDriverDistractionState *)valueOf:(NSString *)value;
-
-/**
- * @abstract Store the enumeration of all possible SDLDriverDistractionState
- *
- * @return an array that store all possible SDLDriverDistractionState
- */
-+ (NSArray *)values;
+typedef SDLEnum SDLDriverDistractionState NS_EXTENSIBLE_STRING_ENUM;
/**
* @abstract Driver distraction rules are in effect.
- *
- * @return a SDLDriverDistractionState with value of *DD_ON*
*/
-+ (SDLDriverDistractionState *)DD_ON;
+extern SDLDriverDistractionState const SDLDriverDistractionStateOn;
/**
* @abstract Driver distraction rules are NOT in effect.
- *
- * @return a SDLDriverDistractionState with value of *DD_OFF*
*/
-+ (SDLDriverDistractionState *)DD_OFF;
+extern SDLDriverDistractionState const SDLDriverDistractionStateOff;
-@end
diff --git a/SmartDeviceLink/SDLDriverDistractionState.m b/SmartDeviceLink/SDLDriverDistractionState.m
index c9a6d8714..17290359a 100644
--- a/SmartDeviceLink/SDLDriverDistractionState.m
+++ b/SmartDeviceLink/SDLDriverDistractionState.m
@@ -4,44 +4,5 @@
#import "SDLDriverDistractionState.h"
-SDLDriverDistractionState *SDLDriverDistractionState_DD_ON = nil;
-SDLDriverDistractionState *SDLDriverDistractionState_DD_OFF = nil;
-
-NSArray *SDLDriverDistractionState_values = nil;
-
-@implementation SDLDriverDistractionState
-
-+ (SDLDriverDistractionState *)valueOf:(NSString *)value {
- for (SDLDriverDistractionState *item in SDLDriverDistractionState.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLDriverDistractionState_values == nil) {
- SDLDriverDistractionState_values = @[
- SDLDriverDistractionState.DD_ON,
- SDLDriverDistractionState.DD_OFF,
- ];
- }
- return SDLDriverDistractionState_values;
-}
-
-+ (SDLDriverDistractionState *)DD_ON {
- if (SDLDriverDistractionState_DD_ON == nil) {
- SDLDriverDistractionState_DD_ON = [[SDLDriverDistractionState alloc] initWithValue:@"DD_ON"];
- }
- return SDLDriverDistractionState_DD_ON;
-}
-
-+ (SDLDriverDistractionState *)DD_OFF {
- if (SDLDriverDistractionState_DD_OFF == nil) {
- SDLDriverDistractionState_DD_OFF = [[SDLDriverDistractionState alloc] initWithValue:@"DD_OFF"];
- }
- return SDLDriverDistractionState_DD_OFF;
-}
-
-@end
+SDLDriverDistractionState const SDLDriverDistractionStateOn = @"DD_ON";
+SDLDriverDistractionState const SDLDriverDistractionStateOff = @"DD_OFF";
diff --git a/SmartDeviceLink/SDLECallConfirmationStatus.h b/SmartDeviceLink/SDLECallConfirmationStatus.h
index 46fa78de6..c3b7755fc 100644
--- a/SmartDeviceLink/SDLECallConfirmationStatus.h
+++ b/SmartDeviceLink/SDLECallConfirmationStatus.h
@@ -8,45 +8,32 @@
*<b>Since</b> SmartDeviceLink 2.0
<p>
*/
-@interface SDLECallConfirmationStatus : SDLEnum {
-}
-
-+ (SDLECallConfirmationStatus *)valueOf:(NSString *)value;
-+ (NSArray *)values;
+typedef SDLEnum SDLECallConfirmationStatus NS_EXTENSIBLE_STRING_ENUM;
/** No E-Call signal triggered.
*/
-
-+ (SDLECallConfirmationStatus *)NORMAL;
+extern SDLECallConfirmationStatus const SDLECallConfirmationStatusNormal;
/** An E-Call is being in progress.
*/
-
-+ (SDLECallConfirmationStatus *)CALL_IN_PROGRESS;
+extern SDLECallConfirmationStatus const SDLECallConfirmationStatusInProgress;
/** CALL_CANCELLED An E-Call was cancelled by the user.
*/
-
-+ (SDLECallConfirmationStatus *)CALL_CANCELLED;
+extern SDLECallConfirmationStatus const SDLECallConfirmationStatusCancelled;
/** The E-Call sequence is completed.
*/
-
-+ (SDLECallConfirmationStatus *)CALL_COMPLETED;
+extern SDLECallConfirmationStatus const SDLECallConfirmationStatusCompleted;
/** An E-Call could not be connected.
*/
-
-+ (SDLECallConfirmationStatus *)CALL_UNSUCCESSFUL;
+extern SDLECallConfirmationStatus const SDLECallConfirmationStatusUnsuccessful;
/** E-Call is not configured on this vehicle.
*/
-
-+ (SDLECallConfirmationStatus *)ECALL_CONFIGURED_OFF;
+extern SDLECallConfirmationStatus const SDLECallConfirmationStatusConfiguredOff;
/** E-Call is considered to be complete without Emergency Operator contact.
*/
-
-+ (SDLECallConfirmationStatus *)CALL_COMPLETE_DTMF_TIMEOUT;
-
-@end
+extern SDLECallConfirmationStatus const SDLECallConfirmationStatusCompleteDtmfTimeout;
diff --git a/SmartDeviceLink/SDLECallConfirmationStatus.m b/SmartDeviceLink/SDLECallConfirmationStatus.m
index aae11a791..63445d55b 100644
--- a/SmartDeviceLink/SDLECallConfirmationStatus.m
+++ b/SmartDeviceLink/SDLECallConfirmationStatus.m
@@ -4,89 +4,10 @@
#import "SDLECallConfirmationStatus.h"
-SDLECallConfirmationStatus *SDLECallConfirmationStatus_NORMAL = nil;
-SDLECallConfirmationStatus *SDLECallConfirmationStatus_CALL_IN_PROGRESS = nil;
-SDLECallConfirmationStatus *SDLECallConfirmationStatus_CALL_CANCELLED = nil;
-SDLECallConfirmationStatus *SDLECallConfirmationStatus_CALL_COMPLETED = nil;
-SDLECallConfirmationStatus *SDLECallConfirmationStatus_CALL_UNSUCCESSFUL = nil;
-SDLECallConfirmationStatus *SDLECallConfirmationStatus_ECALL_CONFIGURED_OFF = nil;
-SDLECallConfirmationStatus *SDLECallConfirmationStatus_CALL_COMPLETE_DTMF_TIMEOUT = nil;
-
-NSArray *SDLECallConfirmationStatus_values = nil;
-
-@implementation SDLECallConfirmationStatus
-
-+ (SDLECallConfirmationStatus *)valueOf:(NSString *)value {
- for (SDLECallConfirmationStatus *item in SDLECallConfirmationStatus.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLECallConfirmationStatus_values == nil) {
- SDLECallConfirmationStatus_values = @[
- SDLECallConfirmationStatus.NORMAL,
- SDLECallConfirmationStatus.CALL_IN_PROGRESS,
- SDLECallConfirmationStatus.CALL_CANCELLED,
- SDLECallConfirmationStatus.CALL_COMPLETED,
- SDLECallConfirmationStatus.CALL_UNSUCCESSFUL,
- SDLECallConfirmationStatus.ECALL_CONFIGURED_OFF,
- SDLECallConfirmationStatus.CALL_COMPLETE_DTMF_TIMEOUT,
- ];
- }
- return SDLECallConfirmationStatus_values;
-}
-
-+ (SDLECallConfirmationStatus *)NORMAL {
- if (SDLECallConfirmationStatus_NORMAL == nil) {
- SDLECallConfirmationStatus_NORMAL = [[SDLECallConfirmationStatus alloc] initWithValue:@"NORMAL"];
- }
- return SDLECallConfirmationStatus_NORMAL;
-}
-
-+ (SDLECallConfirmationStatus *)CALL_IN_PROGRESS {
- if (SDLECallConfirmationStatus_CALL_IN_PROGRESS == nil) {
- SDLECallConfirmationStatus_CALL_IN_PROGRESS = [[SDLECallConfirmationStatus alloc] initWithValue:@"CALL_IN_PROGRESS"];
- }
- return SDLECallConfirmationStatus_CALL_IN_PROGRESS;
-}
-
-+ (SDLECallConfirmationStatus *)CALL_CANCELLED {
- if (SDLECallConfirmationStatus_CALL_CANCELLED == nil) {
- SDLECallConfirmationStatus_CALL_CANCELLED = [[SDLECallConfirmationStatus alloc] initWithValue:@"CALL_CANCELLED"];
- }
- return SDLECallConfirmationStatus_CALL_CANCELLED;
-}
-
-+ (SDLECallConfirmationStatus *)CALL_COMPLETED {
- if (SDLECallConfirmationStatus_CALL_COMPLETED == nil) {
- SDLECallConfirmationStatus_CALL_COMPLETED = [[SDLECallConfirmationStatus alloc] initWithValue:@"CALL_COMPLETED"];
- }
- return SDLECallConfirmationStatus_CALL_COMPLETED;
-}
-
-+ (SDLECallConfirmationStatus *)CALL_UNSUCCESSFUL {
- if (SDLECallConfirmationStatus_CALL_UNSUCCESSFUL == nil) {
- SDLECallConfirmationStatus_CALL_UNSUCCESSFUL = [[SDLECallConfirmationStatus alloc] initWithValue:@"CALL_UNSUCCESSFUL"];
- }
- return SDLECallConfirmationStatus_CALL_UNSUCCESSFUL;
-}
-
-+ (SDLECallConfirmationStatus *)ECALL_CONFIGURED_OFF {
- if (SDLECallConfirmationStatus_ECALL_CONFIGURED_OFF == nil) {
- SDLECallConfirmationStatus_ECALL_CONFIGURED_OFF = [[SDLECallConfirmationStatus alloc] initWithValue:@"ECALL_CONFIGURED_OFF"];
- }
- return SDLECallConfirmationStatus_ECALL_CONFIGURED_OFF;
-}
-
-+ (SDLECallConfirmationStatus *)CALL_COMPLETE_DTMF_TIMEOUT {
- if (SDLECallConfirmationStatus_CALL_COMPLETE_DTMF_TIMEOUT == nil) {
- SDLECallConfirmationStatus_CALL_COMPLETE_DTMF_TIMEOUT = [[SDLECallConfirmationStatus alloc] initWithValue:@"CALL_COMPLETE_DTMF_TIMEOUT"];
- }
- return SDLECallConfirmationStatus_CALL_COMPLETE_DTMF_TIMEOUT;
-}
-
-@end
+SDLECallConfirmationStatus const SDLECallConfirmationStatusNormal = @"NORMAL";
+SDLECallConfirmationStatus const SDLECallConfirmationStatusInProgress = @"CALL_IN_PROGRESS";
+SDLECallConfirmationStatus const SDLECallConfirmationStatusCancelled = @"CALL_CANCELLED";
+SDLECallConfirmationStatus const SDLECallConfirmationStatusCompleted = @"CALL_COMPLETED";
+SDLECallConfirmationStatus const SDLECallConfirmationStatusUnsuccessful = @"CALL_UNSUCCESSFUL";
+SDLECallConfirmationStatus const SDLECallConfirmationStatusConfiguredOff = @"ECALL_CONFIGURED_OFF";
+SDLECallConfirmationStatus const SDLECallConfirmationStatusCompleteDtmfTimeout = @"CALL_COMPLETE_DTMF_TIMEOUT";
diff --git a/SmartDeviceLink/SDLECallInfo.h b/SmartDeviceLink/SDLECallInfo.h
index 932cf056a..c7128075f 100644
--- a/SmartDeviceLink/SDLECallInfo.h
+++ b/SmartDeviceLink/SDLECallInfo.h
@@ -3,8 +3,8 @@
#import "SDLRPCMessage.h"
-@class SDLVehicleDataNotificationStatus;
-@class SDLECallConfirmationStatus;
+#import "SDLECallConfirmationStatus.h"
+#import "SDLVehicleDataNotificationStatus.h"
@interface SDLECallInfo : SDLRPCStruct {
@@ -13,8 +13,8 @@
- (instancetype)init;
- (instancetype)initWithDictionary:(NSMutableDictionary *)dict;
-@property (strong) SDLVehicleDataNotificationStatus *eCallNotificationStatus;
-@property (strong) SDLVehicleDataNotificationStatus *auxECallNotificationStatus;
-@property (strong) SDLECallConfirmationStatus *eCallConfirmationStatus;
+@property (strong) SDLVehicleDataNotificationStatus eCallNotificationStatus;
+@property (strong) SDLVehicleDataNotificationStatus auxECallNotificationStatus;
+@property (strong) SDLECallConfirmationStatus eCallConfirmationStatus;
@end
diff --git a/SmartDeviceLink/SDLECallInfo.m b/SmartDeviceLink/SDLECallInfo.m
index 44046fcd0..0f679ba5e 100644
--- a/SmartDeviceLink/SDLECallInfo.m
+++ b/SmartDeviceLink/SDLECallInfo.m
@@ -3,9 +3,7 @@
#import "SDLECallInfo.h"
-#import "SDLECallConfirmationStatus.h"
#import "SDLNames.h"
-#import "SDLVehicleDataNotificationStatus.h"
@implementation SDLECallInfo
@@ -22,7 +20,7 @@
return self;
}
-- (void)setECallNotificationStatus:(SDLVehicleDataNotificationStatus *)eCallNotificationStatus {
+- (void)setECallNotificationStatus:(SDLVehicleDataNotificationStatus)eCallNotificationStatus {
if (eCallNotificationStatus != nil) {
[store setObject:eCallNotificationStatus forKey:NAMES_eCallNotificationStatus];
} else {
@@ -30,16 +28,12 @@
}
}
-- (SDLVehicleDataNotificationStatus *)eCallNotificationStatus {
+- (SDLVehicleDataNotificationStatus)eCallNotificationStatus {
NSObject *obj = [store objectForKey:NAMES_eCallNotificationStatus];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataNotificationStatus.class]) {
- return (SDLVehicleDataNotificationStatus *)obj;
- } else {
- return [SDLVehicleDataNotificationStatus valueOf:(NSString *)obj];
- }
+ return (SDLVehicleDataNotificationStatus)obj;
}
-- (void)setAuxECallNotificationStatus:(SDLVehicleDataNotificationStatus *)auxECallNotificationStatus {
+- (void)setAuxECallNotificationStatus:(SDLVehicleDataNotificationStatus)auxECallNotificationStatus {
if (auxECallNotificationStatus != nil) {
[store setObject:auxECallNotificationStatus forKey:NAMES_auxECallNotificationStatus];
} else {
@@ -47,16 +41,12 @@
}
}
-- (SDLVehicleDataNotificationStatus *)auxECallNotificationStatus {
+- (SDLVehicleDataNotificationStatus)auxECallNotificationStatus {
NSObject *obj = [store objectForKey:NAMES_auxECallNotificationStatus];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataNotificationStatus.class]) {
- return (SDLVehicleDataNotificationStatus *)obj;
- } else {
- return [SDLVehicleDataNotificationStatus valueOf:(NSString *)obj];
- }
+ return (SDLVehicleDataNotificationStatus)obj;
}
-- (void)setECallConfirmationStatus:(SDLECallConfirmationStatus *)eCallConfirmationStatus {
+- (void)setECallConfirmationStatus:(SDLECallConfirmationStatus)eCallConfirmationStatus {
if (eCallConfirmationStatus != nil) {
[store setObject:eCallConfirmationStatus forKey:NAMES_eCallConfirmationStatus];
} else {
@@ -64,13 +54,9 @@
}
}
-- (SDLECallConfirmationStatus *)eCallConfirmationStatus {
+- (SDLECallConfirmationStatus)eCallConfirmationStatus {
NSObject *obj = [store objectForKey:NAMES_eCallConfirmationStatus];
- if (obj == nil || [obj isKindOfClass:SDLECallConfirmationStatus.class]) {
- return (SDLECallConfirmationStatus *)obj;
- } else {
- return [SDLECallConfirmationStatus valueOf:(NSString *)obj];
- }
+ return (SDLECallConfirmationStatus)obj;
}
@end
diff --git a/SmartDeviceLink/SDLEmergencyEvent.h b/SmartDeviceLink/SDLEmergencyEvent.h
index 6dd0c410d..6ee02f7ab 100644
--- a/SmartDeviceLink/SDLEmergencyEvent.h
+++ b/SmartDeviceLink/SDLEmergencyEvent.h
@@ -3,9 +3,9 @@
#import "SDLRPCMessage.h"
-@class SDLEmergencyEventType;
-@class SDLFuelCutoffStatus;
-@class SDLVehicleDataEventStatus;
+#import "SDLEmergencyEventType.h"
+#import "SDLFuelCutoffStatus.h"
+#import "SDLVehicleDataEventStatus.h"
@interface SDLEmergencyEvent : SDLRPCStruct {
@@ -14,10 +14,10 @@
- (instancetype)init;
- (instancetype)initWithDictionary:(NSMutableDictionary *)dict;
-@property (strong) SDLEmergencyEventType *emergencyEventType;
-@property (strong) SDLFuelCutoffStatus *fuelCutoffStatus;
-@property (strong) SDLVehicleDataEventStatus *rolloverEvent;
+@property (strong) SDLEmergencyEventType emergencyEventType;
+@property (strong) SDLFuelCutoffStatus fuelCutoffStatus;
+@property (strong) SDLVehicleDataEventStatus rolloverEvent;
@property (strong) NSNumber *maximumChangeVelocity;
-@property (strong) SDLVehicleDataEventStatus *multipleEvents;
+@property (strong) SDLVehicleDataEventStatus multipleEvents;
@end
diff --git a/SmartDeviceLink/SDLEmergencyEvent.m b/SmartDeviceLink/SDLEmergencyEvent.m
index 76fca57e2..ea58a2029 100644
--- a/SmartDeviceLink/SDLEmergencyEvent.m
+++ b/SmartDeviceLink/SDLEmergencyEvent.m
@@ -3,11 +3,7 @@
#import "SDLEmergencyEvent.h"
-#import "SDLEmergencyEventType.h"
-#import "SDLFuelCutoffStatus.h"
#import "SDLNames.h"
-#import "SDLVehicleDataEventStatus.h"
-
@implementation SDLEmergencyEvent
@@ -23,7 +19,7 @@
return self;
}
-- (void)setEmergencyEventType:(SDLEmergencyEventType *)emergencyEventType {
+- (void)setEmergencyEventType:(SDLEmergencyEventType)emergencyEventType {
if (emergencyEventType != nil) {
[store setObject:emergencyEventType forKey:NAMES_emergencyEventType];
} else {
@@ -31,16 +27,12 @@
}
}
-- (SDLEmergencyEventType *)emergencyEventType {
+- (SDLEmergencyEventType)emergencyEventType {
NSObject *obj = [store objectForKey:NAMES_emergencyEventType];
- if (obj == nil || [obj isKindOfClass:SDLEmergencyEventType.class]) {
- return (SDLEmergencyEventType *)obj;
- } else {
- return [SDLEmergencyEventType valueOf:(NSString *)obj];
- }
+ return (SDLEmergencyEventType)obj;
}
-- (void)setFuelCutoffStatus:(SDLFuelCutoffStatus *)fuelCutoffStatus {
+- (void)setFuelCutoffStatus:(SDLFuelCutoffStatus)fuelCutoffStatus {
if (fuelCutoffStatus != nil) {
[store setObject:fuelCutoffStatus forKey:NAMES_fuelCutoffStatus];
} else {
@@ -48,16 +40,12 @@
}
}
-- (SDLFuelCutoffStatus *)fuelCutoffStatus {
+- (SDLFuelCutoffStatus)fuelCutoffStatus {
NSObject *obj = [store objectForKey:NAMES_fuelCutoffStatus];
- if (obj == nil || [obj isKindOfClass:SDLFuelCutoffStatus.class]) {
- return (SDLFuelCutoffStatus *)obj;
- } else {
- return [SDLFuelCutoffStatus valueOf:(NSString *)obj];
- }
+ return (SDLFuelCutoffStatus)obj;
}
-- (void)setRolloverEvent:(SDLVehicleDataEventStatus *)rolloverEvent {
+- (void)setRolloverEvent:(SDLVehicleDataEventStatus)rolloverEvent {
if (rolloverEvent != nil) {
[store setObject:rolloverEvent forKey:NAMES_rolloverEvent];
} else {
@@ -65,13 +53,9 @@
}
}
-- (SDLVehicleDataEventStatus *)rolloverEvent {
+- (SDLVehicleDataEventStatus)rolloverEvent {
NSObject *obj = [store objectForKey:NAMES_rolloverEvent];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataEventStatus.class]) {
- return (SDLVehicleDataEventStatus *)obj;
- } else {
- return [SDLVehicleDataEventStatus valueOf:(NSString *)obj];
- }
+ return (SDLVehicleDataEventStatus)obj;
}
- (void)setMaximumChangeVelocity:(NSNumber *)maximumChangeVelocity {
@@ -86,7 +70,7 @@
return [store objectForKey:NAMES_maximumChangeVelocity];
}
-- (void)setMultipleEvents:(SDLVehicleDataEventStatus *)multipleEvents {
+- (void)setMultipleEvents:(SDLVehicleDataEventStatus)multipleEvents {
if (multipleEvents != nil) {
[store setObject:multipleEvents forKey:NAMES_multipleEvents];
} else {
@@ -94,13 +78,9 @@
}
}
-- (SDLVehicleDataEventStatus *)multipleEvents {
+- (SDLVehicleDataEventStatus)multipleEvents {
NSObject *obj = [store objectForKey:NAMES_multipleEvents];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataEventStatus.class]) {
- return (SDLVehicleDataEventStatus *)obj;
- } else {
- return [SDLVehicleDataEventStatus valueOf:(NSString *)obj];
- }
+ return (SDLVehicleDataEventStatus)obj;
}
@end
diff --git a/SmartDeviceLink/SDLEmergencyEventType.h b/SmartDeviceLink/SDLEmergencyEventType.h
index 1e75b3ee0..5fac6477d 100644
--- a/SmartDeviceLink/SDLEmergencyEventType.h
+++ b/SmartDeviceLink/SDLEmergencyEventType.h
@@ -8,46 +8,32 @@
*<b> Since:</b> SmartDeviceLink 2.0
*<p>
*/
-
-@interface SDLEmergencyEventType : SDLEnum {
-}
-
-+ (SDLEmergencyEventType *)valueOf:(NSString *)value;
-+ (NSArray *)values;
+typedef SDLEnum SDLEmergencyEventType NS_EXTENSIBLE_STRING_ENUM;
/** No emergency event has happened.
*/
-
-+ (SDLEmergencyEventType *)NO_EVENT;
+extern SDLEmergencyEventType const SDLEmergencyEventTypeNoEvent;
/** Frontal collision has happened.
*/
-
-+ (SDLEmergencyEventType *)FRONTAL;
+extern SDLEmergencyEventType const SDLEmergencyEventTypeFrontal;
/** Side collision has happened.
*/
-
-+ (SDLEmergencyEventType *)SIDE;
+extern SDLEmergencyEventType const SDLEmergencyEventTypeSide;
/**Rear collision has happened.
*/
-
-+ (SDLEmergencyEventType *)REAR;
+extern SDLEmergencyEventType const SDLEmergencyEventTypeRear;
/** A rollover event has happened.
*/
-
-+ (SDLEmergencyEventType *)ROLLOVER;
+extern SDLEmergencyEventType const SDLEmergencyEventTypeRollover;
/** The signal is not supported
*/
-
-+ (SDLEmergencyEventType *)NOT_SUPPORTED;
+extern SDLEmergencyEventType const SDLEmergencyEventTypeNotSupported;
/** Emergency status cannot be determined
*/
-
-+ (SDLEmergencyEventType *)FAULT;
-
-@end
+extern SDLEmergencyEventType const SDLEmergencyEventTypeFault;
diff --git a/SmartDeviceLink/SDLEmergencyEventType.m b/SmartDeviceLink/SDLEmergencyEventType.m
index b07979d01..47d0fed4d 100644
--- a/SmartDeviceLink/SDLEmergencyEventType.m
+++ b/SmartDeviceLink/SDLEmergencyEventType.m
@@ -4,89 +4,10 @@
#import "SDLEmergencyEventType.h"
-SDLEmergencyEventType *SDLEmergencyEventType_NO_EVENT = nil;
-SDLEmergencyEventType *SDLEmergencyEventType_FRONTAL = nil;
-SDLEmergencyEventType *SDLEmergencyEventType_SIDE = nil;
-SDLEmergencyEventType *SDLEmergencyEventType_REAR = nil;
-SDLEmergencyEventType *SDLEmergencyEventType_ROLLOVER = nil;
-SDLEmergencyEventType *SDLEmergencyEventType_NOT_SUPPORTED = nil;
-SDLEmergencyEventType *SDLEmergencyEventType_FAULT = nil;
-
-NSArray *SDLEmergencyEventType_values = nil;
-
-@implementation SDLEmergencyEventType
-
-+ (SDLEmergencyEventType *)valueOf:(NSString *)value {
- for (SDLEmergencyEventType *item in SDLEmergencyEventType.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLEmergencyEventType_values == nil) {
- SDLEmergencyEventType_values = @[
- SDLEmergencyEventType.NO_EVENT,
- SDLEmergencyEventType.FRONTAL,
- SDLEmergencyEventType.SIDE,
- SDLEmergencyEventType.REAR,
- SDLEmergencyEventType.ROLLOVER,
- SDLEmergencyEventType.NOT_SUPPORTED,
- SDLEmergencyEventType.FAULT,
- ];
- }
- return SDLEmergencyEventType_values;
-}
-
-+ (SDLEmergencyEventType *)NO_EVENT {
- if (SDLEmergencyEventType_NO_EVENT == nil) {
- SDLEmergencyEventType_NO_EVENT = [[SDLEmergencyEventType alloc] initWithValue:@"NO_EVENT"];
- }
- return SDLEmergencyEventType_NO_EVENT;
-}
-
-+ (SDLEmergencyEventType *)FRONTAL {
- if (SDLEmergencyEventType_FRONTAL == nil) {
- SDLEmergencyEventType_FRONTAL = [[SDLEmergencyEventType alloc] initWithValue:@"FRONTAL"];
- }
- return SDLEmergencyEventType_FRONTAL;
-}
-
-+ (SDLEmergencyEventType *)SIDE {
- if (SDLEmergencyEventType_SIDE == nil) {
- SDLEmergencyEventType_SIDE = [[SDLEmergencyEventType alloc] initWithValue:@"SIDE"];
- }
- return SDLEmergencyEventType_SIDE;
-}
-
-+ (SDLEmergencyEventType *)REAR {
- if (SDLEmergencyEventType_REAR == nil) {
- SDLEmergencyEventType_REAR = [[SDLEmergencyEventType alloc] initWithValue:@"REAR"];
- }
- return SDLEmergencyEventType_REAR;
-}
-
-+ (SDLEmergencyEventType *)ROLLOVER {
- if (SDLEmergencyEventType_ROLLOVER == nil) {
- SDLEmergencyEventType_ROLLOVER = [[SDLEmergencyEventType alloc] initWithValue:@"ROLLOVER"];
- }
- return SDLEmergencyEventType_ROLLOVER;
-}
-
-+ (SDLEmergencyEventType *)NOT_SUPPORTED {
- if (SDLEmergencyEventType_NOT_SUPPORTED == nil) {
- SDLEmergencyEventType_NOT_SUPPORTED = [[SDLEmergencyEventType alloc] initWithValue:@"NOT_SUPPORTED"];
- }
- return SDLEmergencyEventType_NOT_SUPPORTED;
-}
-
-+ (SDLEmergencyEventType *)FAULT {
- if (SDLEmergencyEventType_FAULT == nil) {
- SDLEmergencyEventType_FAULT = [[SDLEmergencyEventType alloc] initWithValue:@"FAULT"];
- }
- return SDLEmergencyEventType_FAULT;
-}
-
-@end
+SDLEmergencyEventType const SDLEmergencyEventTypeNoEvent = @"NO_EVENT";
+SDLEmergencyEventType const SDLEmergencyEventTypeFrontal = @"FRONTAL";
+SDLEmergencyEventType const SDLEmergencyEventTypeSide = @"SIDE";
+SDLEmergencyEventType const SDLEmergencyEventTypeRear = @"REAR";
+SDLEmergencyEventType const SDLEmergencyEventTypeRollover = @"ROLLOVER";
+SDLEmergencyEventType const SDLEmergencyEventTypeNotSupported = @"NOT_SUPPORTED";
+SDLEmergencyEventType const SDLEmergencyEventTypeFault = @"FAULT";
diff --git a/SmartDeviceLink/SDLEnum.h b/SmartDeviceLink/SDLEnum.h
index c12c1ec97..2d63bd27e 100644
--- a/SmartDeviceLink/SDLEnum.h
+++ b/SmartDeviceLink/SDLEnum.h
@@ -4,15 +4,4 @@
#import <Foundation/Foundation.h>
-
-@interface SDLEnum : NSObject <NSCopying> {
- NSString *value;
-}
-
-- (instancetype)initWithValue:(NSString *)value;
-
-- (BOOL)isEqualToEnum:(SDLEnum *)object;
-
-@property (strong, readonly) NSString *value;
-
-@end
+typedef NSString* SDLEnum;
diff --git a/SmartDeviceLink/SDLEnum.m b/SmartDeviceLink/SDLEnum.m
deleted file mode 100644
index 7a474437d..000000000
--- a/SmartDeviceLink/SDLEnum.m
+++ /dev/null
@@ -1,62 +0,0 @@
-// SDLEnum.m
-//
-
-
-#import "SDLEnum.h"
-
-@implementation SDLEnum
-
-@synthesize value;
-
-- (instancetype)initWithValue:(NSString *)aValue {
- if (self = [super init]) {
- value = aValue;
- }
- return self;
-}
-
-- (NSString *)description {
- return value;
-}
-
-- (id)debugQuickLookObject {
- return value;
-}
-
-
-#pragma mark - Equality
-
-- (NSUInteger)hash {
- return [self.value hash];
-}
-
-- (BOOL)isEqual:(id)object {
- // Test pointer equality
- if (self == object) {
- return YES;
- }
-
- // Test class equality, if not equal, value equality doesn't matter
- if (![object isMemberOfClass:self.class]) {
- return NO;
- }
-
- return [self isEqualToEnum:object];
-}
-
-- (BOOL)isEqualToEnum:(SDLEnum *)object {
- // Test value equality, if it's equal we're good
- if ([self.value isEqualToString:object.value]) {
- return YES;
- }
-
- return NO;
-}
-
-#pragma mark - NSCopying
-
-- (id)copyWithZone:(NSZone *)zone {
- return [[self.class alloc] initWithValue:[self.value copy]];
-}
-
-@end
diff --git a/SmartDeviceLink/SDLError.h b/SmartDeviceLink/SDLError.h
index 664c8770e..17193550c 100644
--- a/SmartDeviceLink/SDLError.h
+++ b/SmartDeviceLink/SDLError.h
@@ -10,7 +10,7 @@
#import "SDLErrorConstants.h"
-@class SDLResult;
+#import "SDLResult.h"
NS_ASSUME_NONNULL_BEGIN
@@ -29,8 +29,8 @@ extern SDLErrorDomain *const SDLErrorDomainFileManager;
+ (NSError *)sdl_lifecycle_notReadyError;
+ (NSError *)sdl_lifecycle_unknownRemoteErrorWithDescription:(NSString *)description andReason:(NSString *)reason;
+ (NSError *)sdl_lifecycle_managersFailedToStart;
-+ (NSError *)sdl_lifecycle_startedWithBadResult:(SDLResult *)result info:(NSString *)info;
-+ (NSError *)sdl_lifecycle_failedWithBadResult:(SDLResult *)result info:(NSString *)info;
++ (NSError *)sdl_lifecycle_startedWithBadResult:(SDLResult)result info:(NSString *)info;
++ (NSError *)sdl_lifecycle_failedWithBadResult:(SDLResult)result info:(NSString *)info;
#pragma mark SDLFileManager
@@ -46,4 +46,4 @@ extern SDLErrorDomain *const SDLErrorDomainFileManager;
@end
-NS_ASSUME_NONNULL_END \ No newline at end of file
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLError.m b/SmartDeviceLink/SDLError.m
index af84e4ac8..ce5ded3d8 100644
--- a/SmartDeviceLink/SDLError.m
+++ b/SmartDeviceLink/SDLError.m
@@ -8,9 +8,6 @@
#import "SDLError.h"
-#import "SDLResult.h"
-
-
NS_ASSUME_NONNULL_BEGIN
#pragma mark Error Domains
@@ -74,9 +71,9 @@ SDLErrorDomain *const SDLErrorDomainFileManager = @"com.sdl.filemanager.error";
userInfo:nil];
}
-+ (NSError *)sdl_lifecycle_startedWithBadResult:(SDLResult *)result info:(NSString *)info {
++ (NSError *)sdl_lifecycle_startedWithBadResult:(SDLResult)result info:(NSString *)info {
NSDictionary *userInfo = @{
- NSLocalizedDescriptionKey: NSLocalizedString(result.value, nil),
+ NSLocalizedDescriptionKey: NSLocalizedString(result, nil),
NSLocalizedFailureReasonErrorKey: NSLocalizedString(info, nil)
};
return [NSError errorWithDomain:SDLErrorDomainLifecycleManager
@@ -84,9 +81,9 @@ SDLErrorDomain *const SDLErrorDomainFileManager = @"com.sdl.filemanager.error";
userInfo:userInfo];
}
-+ (NSError *)sdl_lifecycle_failedWithBadResult:(SDLResult *)result info:(NSString *)info {
++ (NSError *)sdl_lifecycle_failedWithBadResult:(SDLResult)result info:(NSString *)info {
NSDictionary *userInfo = @{
- NSLocalizedDescriptionKey: NSLocalizedString(result.value, nil),
+ NSLocalizedDescriptionKey: NSLocalizedString(result, nil),
NSLocalizedFailureReasonErrorKey: NSLocalizedString(info, nil)
};
return [NSError errorWithDomain:SDLErrorDomainLifecycleManager
@@ -136,4 +133,4 @@ SDLErrorDomain *const SDLErrorDomainFileManager = @"com.sdl.filemanager.error";
@end
-NS_ASSUME_NONNULL_END \ No newline at end of file
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLFile.h b/SmartDeviceLink/SDLFile.h
index 3995f6722..518759c17 100644
--- a/SmartDeviceLink/SDLFile.h
+++ b/SmartDeviceLink/SDLFile.h
@@ -8,7 +8,7 @@
#import <Foundation/Foundation.h>
-@class SDLFileType;
+#import "SDLFileType.h"
NS_ASSUME_NONNULL_BEGIN
@@ -43,7 +43,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* The system will attempt to determine the type of file that you have passed in. It will default to BINARY if it does not recognize the file type or the file type is not supported by SDL.
*/
-@property (strong, nonatomic, readonly) SDLFileType *fileType;
+@property (strong, nonatomic, readonly) SDLFileType fileType;
- (instancetype)init NS_UNAVAILABLE;
diff --git a/SmartDeviceLink/SDLFile.m b/SmartDeviceLink/SDLFile.m
index c711feaa0..95f0b42c3 100644
--- a/SmartDeviceLink/SDLFile.m
+++ b/SmartDeviceLink/SDLFile.m
@@ -19,7 +19,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (copy, nonatomic, readwrite, nullable) NSURL *fileURL;
@property (copy, nonatomic, readwrite) NSData *data;
-@property (strong, nonatomic, readwrite) SDLFileType *fileType;
+@property (strong, nonatomic, readwrite) SDLFileType fileType;
@property (assign, nonatomic, readwrite) BOOL persistent;
@property (copy, nonatomic, readwrite) NSString *name;
@@ -100,24 +100,24 @@ NS_ASSUME_NONNULL_BEGIN
#pragma mark - File Type
-+ (SDLFileType *)sdl_fileTypeFromFileExtension:(NSString *)fileExtension {
++ (SDLFileType)sdl_fileTypeFromFileExtension:(NSString *)fileExtension {
if ([fileExtension caseInsensitiveCompare:@"bmp"] == NSOrderedSame) {
- return [SDLFileType GRAPHIC_BMP];
+ return SDLFileTypeGraphicBmp;
} else if (([fileExtension caseInsensitiveCompare:@"jpg"] == NSOrderedSame) ||
([fileExtension caseInsensitiveCompare:@"jpeg"] == NSOrderedSame)) {
- return [SDLFileType GRAPHIC_JPEG];
+ return SDLFileTypeGraphicJpeg;
} else if ([fileExtension caseInsensitiveCompare:@"png"] == NSOrderedSame) {
- return [SDLFileType GRAPHIC_PNG];
+ return SDLFileTypeGraphicPng;
} else if ([fileExtension caseInsensitiveCompare:@"wav"] == NSOrderedSame) {
- return [SDLFileType AUDIO_WAVE];
+ return SDLFileTypeAudioWave;
} else if ([fileExtension caseInsensitiveCompare:@"mp3"] == NSOrderedSame) {
- return [SDLFileType AUDIO_MP3];
+ return SDLFileTypeAudioMp3;
} else if ([fileExtension caseInsensitiveCompare:@"aac"] == NSOrderedSame) {
- return [SDLFileType AUDIO_AAC];
+ return SDLFileTypeAudioAac;
} else if ([fileExtension caseInsensitiveCompare:@"json"] == NSOrderedSame) {
- return [SDLFileType JSON];
+ return SDLFileTypeJson;
} else {
- return [SDLFileType BINARY];
+ return SDLFileTypeBinary;
}
}
diff --git a/SmartDeviceLink/SDLFileType.h b/SmartDeviceLink/SDLFileType.h
index eb4339868..474344277 100644
--- a/SmartDeviceLink/SDLFileType.h
+++ b/SmartDeviceLink/SDLFileType.h
@@ -9,79 +9,44 @@
*
* @since SDL 2.0
*/
-@interface SDLFileType : SDLEnum {
-}
-
-/**
- * @abstract Convert String to SDLFileType
- *
- * @param value String value to retrieve the object for
- *
- * @return SDLFileType
- */
-+ (SDLFileType *)valueOf:(NSString *)value;
-
-/**
- * @abstract Store the enumeration of all possible SDLFileType
- *
- * @return an array that store all possible SDLFileType
- */
-+ (NSArray *)values;
+typedef SDLEnum SDLFileType NS_EXTENSIBLE_STRING_ENUM;
/**
* @abstract file type: Bitmap (BMP)
- *
- * @return SDLFileType with value of *GRAPHIC_BMP*
*/
-+ (SDLFileType *)GRAPHIC_BMP;
+extern SDLFileType const SDLFileTypeGraphicBmp;
/**
* @abstract file type: JPEG
- *
- * @return SDLFileType with value of *GRAPHIC_JPEG*
*/
-+ (SDLFileType *)GRAPHIC_JPEG;
+extern SDLFileType const SDLFileTypeGraphicJpeg;
/**
* @abstract file type: PNG
- *
- * @return SDLFileType with value of *GRAPHIC_PNG*
*/
-+ (SDLFileType *)GRAPHIC_PNG;
+extern SDLFileType const SDLFileTypeGraphicPng;
/**
* @abstract file type: WAVE (WAV)
- *
- * @return SDLFileType with value of *AUDIO_WAVE*
*/
-+ (SDLFileType *)AUDIO_WAVE;
+extern SDLFileType const SDLFileTypeAudioWave;
/**
* @abstract file type: MP3
- *
- * @return SDLFileType with value of *AUDIO_MP3*
*/
-+ (SDLFileType *)AUDIO_MP3;
+extern SDLFileType const SDLFileTypeAudioMp3;
/**
* @abstract file type: AAC
- *
- * @return SDLFileType with value of *AUDIO_AAC*
*/
-+ (SDLFileType *)AUDIO_AAC;
+extern SDLFileType const SDLFileTypeAudioAac;
/**
* @abstract file type: BINARY
- *
- * @return SDLFileType with value of *BINARY*
*/
-+ (SDLFileType *)BINARY;
+extern SDLFileType const SDLFileTypeBinary;
/**
* @abstract file type: JSON
- *
- * @return SDLFileType with value of *JSON*
*/
-+ (SDLFileType *)JSON;
-
-@end
+extern SDLFileType const SDLFileTypeJson;
diff --git a/SmartDeviceLink/SDLFileType.m b/SmartDeviceLink/SDLFileType.m
index f47932e9e..5f0d13ee5 100644
--- a/SmartDeviceLink/SDLFileType.m
+++ b/SmartDeviceLink/SDLFileType.m
@@ -4,98 +4,11 @@
#import "SDLFileType.h"
-SDLFileType *SDLFileType_GRAPHIC_BMP = nil;
-SDLFileType *SDLFileType_GRAPHIC_JPEG = nil;
-SDLFileType *SDLFileType_GRAPHIC_PNG = nil;
-SDLFileType *SDLFileType_AUDIO_WAVE = nil;
-SDLFileType *SDLFileType_AUDIO_MP3 = nil;
-SDLFileType *SDLFileType_AUDIO_AAC = nil;
-SDLFileType *SDLFileType_BINARY = nil;
-SDLFileType *SDLFileType_JSON = nil;
-
-NSArray *SDLFileType_values = nil;
-
-@implementation SDLFileType
-
-+ (SDLFileType *)valueOf:(NSString *)value {
- for (SDLFileType *item in SDLFileType.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLFileType_values == nil) {
- SDLFileType_values = @[
- SDLFileType.GRAPHIC_BMP,
- SDLFileType.GRAPHIC_JPEG,
- SDLFileType.GRAPHIC_PNG,
- SDLFileType.AUDIO_WAVE,
- SDLFileType.AUDIO_MP3,
- SDLFileType.AUDIO_AAC,
- SDLFileType.BINARY,
- SDLFileType.JSON,
- ];
- }
- return SDLFileType_values;
-}
-
-+ (SDLFileType *)GRAPHIC_BMP {
- if (SDLFileType_GRAPHIC_BMP == nil) {
- SDLFileType_GRAPHIC_BMP = [[SDLFileType alloc] initWithValue:@"GRAPHIC_BMP"];
- }
- return SDLFileType_GRAPHIC_BMP;
-}
-
-+ (SDLFileType *)GRAPHIC_JPEG {
- if (SDLFileType_GRAPHIC_JPEG == nil) {
- SDLFileType_GRAPHIC_JPEG = [[SDLFileType alloc] initWithValue:@"GRAPHIC_JPEG"];
- }
- return SDLFileType_GRAPHIC_JPEG;
-}
-
-+ (SDLFileType *)GRAPHIC_PNG {
- if (SDLFileType_GRAPHIC_PNG == nil) {
- SDLFileType_GRAPHIC_PNG = [[SDLFileType alloc] initWithValue:@"GRAPHIC_PNG"];
- }
- return SDLFileType_GRAPHIC_PNG;
-}
-
-+ (SDLFileType *)AUDIO_WAVE {
- if (SDLFileType_AUDIO_WAVE == nil) {
- SDLFileType_AUDIO_WAVE = [[SDLFileType alloc] initWithValue:@"AUDIO_WAVE"];
- }
- return SDLFileType_AUDIO_WAVE;
-}
-
-+ (SDLFileType *)AUDIO_MP3 {
- if (SDLFileType_AUDIO_MP3 == nil) {
- SDLFileType_AUDIO_MP3 = [[SDLFileType alloc] initWithValue:@"AUDIO_MP3"];
- }
- return SDLFileType_AUDIO_MP3;
-}
-
-+ (SDLFileType *)AUDIO_AAC {
- if (SDLFileType_AUDIO_AAC == nil) {
- SDLFileType_AUDIO_AAC = [[SDLFileType alloc] initWithValue:@"AUDIO_AAC"];
- }
- return SDLFileType_AUDIO_AAC;
-}
-
-+ (SDLFileType *)BINARY {
- if (SDLFileType_BINARY == nil) {
- SDLFileType_BINARY = [[SDLFileType alloc] initWithValue:@"BINARY"];
- }
- return SDLFileType_BINARY;
-}
-
-+ (SDLFileType *)JSON {
- if (SDLFileType_JSON == nil) {
- SDLFileType_JSON = [[SDLFileType alloc] initWithValue:@"JSON"];
- }
- return SDLFileType_JSON;
-}
-
-@end
+SDLFileType const SDLFileTypeGraphicBmp = @"GRAPHIC_BMP";
+SDLFileType const SDLFileTypeGraphicJpeg = @"GRAPHIC_JPEG";
+SDLFileType const SDLFileTypeGraphicPng = @"GRAPHIC_PNG";
+SDLFileType const SDLFileTypeAudioWave = @"AUDIO_WAVE";
+SDLFileType const SDLFileTypeAudioMp3 = @"AUDIO_MP3";
+SDLFileType const SDLFileTypeAudioAac = @"AUDIO_AAC";
+SDLFileType const SDLFileTypeBinary = @"BINARY";
+SDLFileType const SDLFileTypeJson = @"JSON";
diff --git a/SmartDeviceLink/SDLFuelCutoffStatus.h b/SmartDeviceLink/SDLFuelCutoffStatus.h
index df213ff07..17a4026fe 100644
--- a/SmartDeviceLink/SDLFuelCutoffStatus.h
+++ b/SmartDeviceLink/SDLFuelCutoffStatus.h
@@ -10,41 +10,19 @@
*
* @since SDL 2.0
*/
-@interface SDLFuelCutoffStatus : SDLEnum {
-}
-
-/**
- * @abstract Convert String to SDLFuelCutoffStatus
- *
- * @param value String value to retrieve the object for
- *
- * @return SDLFuelCutoffStatus
- */
-+ (SDLFuelCutoffStatus *)valueOf:(NSString *)value;
-
-/**
- * @abstract Store the enumeration of all possible SDLFuelCutoffStatus
- *
- * @return an array that stores all possible SDLFuelCutoffStatus
- */
-+ (NSArray *)values;
+typedef SDLEnum SDLFuelCutoffStatus NS_EXTENSIBLE_STRING_ENUM;
/**
* @abstract Fuel is cut off
- * @return the fuel cutoff status: *TERMINATE_FUEL*
*/
-+ (SDLFuelCutoffStatus *)TERMINATE_FUEL;
+extern SDLFuelCutoffStatus SDLFuelCutoffStatusTerminateFuel;
/**
* @abstract Fuel is not cut off
- * @return the fuel cutoff status: *NORMAL_OPERATION*
*/
-+ (SDLFuelCutoffStatus *)NORMAL_OPERATION;
+extern SDLFuelCutoffStatus SDLFuelCutoffStatusNormalOperation;
/**
* @abstract Status of the fuel pump cannot be determined
- * @return the fuel cutoff status: *FAULT*
*/
-+ (SDLFuelCutoffStatus *)FAULT;
-
-@end
+extern SDLFuelCutoffStatus SDLFuelCutoffStatusFault;
diff --git a/SmartDeviceLink/SDLFuelCutoffStatus.m b/SmartDeviceLink/SDLFuelCutoffStatus.m
index 3bbd92bb8..f6f3bf744 100644
--- a/SmartDeviceLink/SDLFuelCutoffStatus.m
+++ b/SmartDeviceLink/SDLFuelCutoffStatus.m
@@ -4,53 +4,6 @@
#import "SDLFuelCutoffStatus.h"
-SDLFuelCutoffStatus *SDLFuelCutoffStatus_TERMINATE_FUEL = nil;
-SDLFuelCutoffStatus *SDLFuelCutoffStatus_NORMAL_OPERATION = nil;
-SDLFuelCutoffStatus *SDLFuelCutoffStatus_FAULT = nil;
-
-NSArray *SDLFuelCutoffStatus_values = nil;
-
-@implementation SDLFuelCutoffStatus
-
-+ (SDLFuelCutoffStatus *)valueOf:(NSString *)value {
- for (SDLFuelCutoffStatus *item in SDLFuelCutoffStatus.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLFuelCutoffStatus_values == nil) {
- SDLFuelCutoffStatus_values = @[
- SDLFuelCutoffStatus.TERMINATE_FUEL,
- SDLFuelCutoffStatus.NORMAL_OPERATION,
- SDLFuelCutoffStatus.FAULT,
- ];
- }
- return SDLFuelCutoffStatus_values;
-}
-
-+ (SDLFuelCutoffStatus *)TERMINATE_FUEL {
- if (SDLFuelCutoffStatus_TERMINATE_FUEL == nil) {
- SDLFuelCutoffStatus_TERMINATE_FUEL = [[SDLFuelCutoffStatus alloc] initWithValue:@"TERMINATE_FUEL"];
- }
- return SDLFuelCutoffStatus_TERMINATE_FUEL;
-}
-
-+ (SDLFuelCutoffStatus *)NORMAL_OPERATION {
- if (SDLFuelCutoffStatus_NORMAL_OPERATION == nil) {
- SDLFuelCutoffStatus_NORMAL_OPERATION = [[SDLFuelCutoffStatus alloc] initWithValue:@"NORMAL_OPERATION"];
- }
- return SDLFuelCutoffStatus_NORMAL_OPERATION;
-}
-
-+ (SDLFuelCutoffStatus *)FAULT {
- if (SDLFuelCutoffStatus_FAULT == nil) {
- SDLFuelCutoffStatus_FAULT = [[SDLFuelCutoffStatus alloc] initWithValue:@"FAULT"];
- }
- return SDLFuelCutoffStatus_FAULT;
-}
-
-@end
+SDLFuelCutoffStatus SDLFuelCutoffStatusTerminateFuel = @"TERMINATE_FUEL";
+SDLFuelCutoffStatus SDLFuelCutoffStatusNormalOperation = @"NORMAL_OPERATION";
+SDLFuelCutoffStatus SDLFuelCutoffStatusFault = @"FAULT";
diff --git a/SmartDeviceLink/SDLGPSData.h b/SmartDeviceLink/SDLGPSData.h
index cfeebaa41..26ed06986 100644
--- a/SmartDeviceLink/SDLGPSData.h
+++ b/SmartDeviceLink/SDLGPSData.h
@@ -3,8 +3,8 @@
#import "SDLRPCMessage.h"
-@class SDLCompassDirection;
-@class SDLDimension;
+#import "SDLCompassDirection.h"
+#import "SDLDimension.h"
/**
@@ -85,7 +85,7 @@
/**
* Potential Compass Directions
*/
-@property (strong) SDLCompassDirection *compassDirection;
+@property (strong) SDLCompassDirection compassDirection;
/**
* @abstract The 3D positional dilution of precision.
@@ -135,7 +135,7 @@
*
* Required
*/
-@property (strong) SDLDimension *dimension;
+@property (strong) SDLDimension dimension;
/**
* @abstract altitude in meters
diff --git a/SmartDeviceLink/SDLGPSData.m b/SmartDeviceLink/SDLGPSData.m
index 1cec52112..d84ac9aa5 100644
--- a/SmartDeviceLink/SDLGPSData.m
+++ b/SmartDeviceLink/SDLGPSData.m
@@ -3,8 +3,6 @@
#import "SDLGPSData.h"
-#import "SDLCompassDirection.h"
-#import "SDLDimension.h"
#import "SDLNames.h"
@@ -118,7 +116,7 @@
return [store objectForKey:NAMES_utcSeconds];
}
-- (void)setCompassDirection:(SDLCompassDirection *)compassDirection {
+- (void)setCompassDirection:(SDLCompassDirection)compassDirection {
if (compassDirection != nil) {
[store setObject:compassDirection forKey:NAMES_compassDirection];
} else {
@@ -126,13 +124,9 @@
}
}
-- (SDLCompassDirection *)compassDirection {
+- (SDLCompassDirection)compassDirection {
NSObject *obj = [store objectForKey:NAMES_compassDirection];
- if (obj == nil || [obj isKindOfClass:SDLCompassDirection.class]) {
- return (SDLCompassDirection *)obj;
- } else {
- return [SDLCompassDirection valueOf:(NSString *)obj];
- }
+ return (SDLCompassDirection)obj;
}
- (void)setPdop:(NSNumber *)pdop {
@@ -195,7 +189,7 @@
return [store objectForKey:NAMES_satellites];
}
-- (void)setDimension:(SDLDimension *)dimension {
+- (void)setDimension:(SDLDimension)dimension {
if (dimension != nil) {
[store setObject:dimension forKey:NAMES_dimension];
} else {
@@ -203,13 +197,9 @@
}
}
-- (SDLDimension *)dimension {
+- (SDLDimension)dimension {
NSObject *obj = [store objectForKey:NAMES_dimension];
- if (obj == nil || [obj isKindOfClass:SDLDimension.class]) {
- return (SDLDimension *)obj;
- } else {
- return [SDLDimension valueOf:(NSString *)obj];
- }
+ return (SDLDimension)obj;
}
- (void)setAltitude:(NSNumber *)altitude {
diff --git a/SmartDeviceLink/SDLGetVehicleDataResponse.h b/SmartDeviceLink/SDLGetVehicleDataResponse.h
index 882c09b51..9a890a54c 100644
--- a/SmartDeviceLink/SDLGetVehicleDataResponse.h
+++ b/SmartDeviceLink/SDLGetVehicleDataResponse.h
@@ -3,21 +3,23 @@
#import "SDLRPCResponse.h"
+#import "SDLComponentVolumeStatus.h"
+#import "SDLPRNDL.h"
+#import "SDLVehicleDataEventStatus.h"
+#import "SDLWiperStatus.h"
+
@class SDLAirbagStatus;
@class SDLBeltStatus;
@class SDLBodyInformation;
@class SDLClusterModeStatus;
-@class SDLComponentVolumeStatus;
@class SDLDeviceStatus;
@class SDLECallInfo;
@class SDLEmergencyEvent;
@class SDLGPSData;
@class SDLHeadLampStatus;
@class SDLMyKey;
-@class SDLPRNDL;
@class SDLTireStatus;
-@class SDLVehicleDataEventStatus;
-@class SDLWiperStatus;
+
/**
@@ -65,7 +67,7 @@
/**
* @abstract A SDLComponentVolumeStatus* value. The fuel level state.
*/
-@property (strong) SDLComponentVolumeStatus *fuelLevel_State;
+@property (strong) SDLComponentVolumeStatus fuelLevel_State;
/**
* @abstract The instantaneous fuel consumption in microlitres.
@@ -85,7 +87,7 @@
/**
* @abstract See PRNDL.
*/
-@property (strong) SDLPRNDL *prndl;
+@property (strong) SDLPRNDL prndl;
/**
* @abstract A SDLTireStatus* value. See TireStatus.
@@ -115,12 +117,12 @@
/**
* @abstract A SDLVehicleDataResult* value. The status of the brake pedal.
*/
-@property (strong) SDLVehicleDataEventStatus *driverBraking;
+@property (strong) SDLVehicleDataEventStatus driverBraking;
/**
* @abstract A SDLWiperStatus* value. The status of the wipers.
*/
-@property (strong) SDLWiperStatus *wiperStatus;
+@property (strong) SDLWiperStatus wiperStatus;
/**
* @abstract A SDLHeadLampStatus* value. Status of the head lamps.
diff --git a/SmartDeviceLink/SDLGetVehicleDataResponse.m b/SmartDeviceLink/SDLGetVehicleDataResponse.m
index 7f1bdb351..854d6a602 100644
--- a/SmartDeviceLink/SDLGetVehicleDataResponse.m
+++ b/SmartDeviceLink/SDLGetVehicleDataResponse.m
@@ -8,7 +8,6 @@
#import "SDLBeltStatus.h"
#import "SDLBodyInformation.h"
#import "SDLClusterModeStatus.h"
-#import "SDLComponentVolumeStatus.h"
#import "SDLDeviceStatus.h"
#import "SDLECallInfo.h"
#import "SDLEmergencyEvent.h"
@@ -16,10 +15,7 @@
#import "SDLHeadLampStatus.h"
#import "SDLMyKey.h"
#import "SDLNames.h"
-#import "SDLPRNDL.h"
#import "SDLTireStatus.h"
-#import "SDLVehicleDataEventStatus.h"
-#import "SDLWiperStatus.h"
@implementation SDLGetVehicleDataResponse
@@ -89,7 +85,7 @@
return [parameters objectForKey:NAMES_fuelLevel];
}
-- (void)setFuelLevel_State:(SDLComponentVolumeStatus *)fuelLevel_State {
+- (void)setFuelLevel_State:(SDLComponentVolumeStatus)fuelLevel_State {
if (fuelLevel_State != nil) {
[parameters setObject:fuelLevel_State forKey:NAMES_fuelLevel_State];
} else {
@@ -97,13 +93,9 @@
}
}
-- (SDLComponentVolumeStatus *)fuelLevel_State {
+- (SDLComponentVolumeStatus)fuelLevel_State {
NSObject *obj = [parameters objectForKey:NAMES_fuelLevel_State];
- if (obj == nil || [obj isKindOfClass:SDLComponentVolumeStatus.class]) {
- return (SDLComponentVolumeStatus *)obj;
- } else {
- return [SDLComponentVolumeStatus valueOf:(NSString *)obj];
- }
+ return (SDLComponentVolumeStatus)obj;
}
- (void)setInstantFuelConsumption:(NSNumber *)instantFuelConsumption {
@@ -142,7 +134,7 @@
return [parameters objectForKey:NAMES_vin];
}
-- (void)setPrndl:(SDLPRNDL *)prndl {
+- (void)setPrndl:(SDLPRNDL)prndl {
if (prndl != nil) {
[parameters setObject:prndl forKey:NAMES_prndl];
} else {
@@ -150,13 +142,9 @@
}
}
-- (SDLPRNDL *)prndl {
+- (SDLPRNDL)prndl {
NSObject *obj = [parameters objectForKey:NAMES_prndl];
- if (obj == nil || [obj isKindOfClass:SDLPRNDL.class]) {
- return (SDLPRNDL *)obj;
- } else {
- return [SDLPRNDL valueOf:(NSString *)obj];
- }
+ return (SDLPRNDL)obj;
}
- (void)setTirePressure:(SDLTireStatus *)tirePressure {
@@ -239,7 +227,7 @@
}
}
-- (void)setDriverBraking:(SDLVehicleDataEventStatus *)driverBraking {
+- (void)setDriverBraking:(SDLVehicleDataEventStatus)driverBraking {
if (driverBraking != nil) {
[parameters setObject:driverBraking forKey:NAMES_driverBraking];
} else {
@@ -247,16 +235,12 @@
}
}
-- (SDLVehicleDataEventStatus *)driverBraking {
+- (SDLVehicleDataEventStatus)driverBraking {
NSObject *obj = [parameters objectForKey:NAMES_driverBraking];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataEventStatus.class]) {
- return (SDLVehicleDataEventStatus *)obj;
- } else {
- return [SDLVehicleDataEventStatus valueOf:(NSString *)obj];
- }
+ return (SDLVehicleDataEventStatus)obj;
}
-- (void)setWiperStatus:(SDLWiperStatus *)wiperStatus {
+- (void)setWiperStatus:(SDLWiperStatus)wiperStatus {
if (wiperStatus != nil) {
[parameters setObject:wiperStatus forKey:NAMES_wiperStatus];
} else {
@@ -264,13 +248,9 @@
}
}
-- (SDLWiperStatus *)wiperStatus {
+- (SDLWiperStatus)wiperStatus {
NSObject *obj = [parameters objectForKey:NAMES_wiperStatus];
- if (obj == nil || [obj isKindOfClass:SDLWiperStatus.class]) {
- return (SDLWiperStatus *)obj;
- } else {
- return [SDLWiperStatus valueOf:(NSString *)obj];
- }
+ return (SDLWiperStatus)obj;
}
- (void)setHeadLampStatus:(SDLHeadLampStatus *)headLampStatus {
diff --git a/SmartDeviceLink/SDLGlobalProperty.h b/SmartDeviceLink/SDLGlobalProperty.h
index 91302fa6e..436425f93 100644
--- a/SmartDeviceLink/SDLGlobalProperty.h
+++ b/SmartDeviceLink/SDLGlobalProperty.h
@@ -9,42 +9,24 @@
*
* @since SDL 1.0
*/
-@interface SDLGlobalProperty : SDLEnum {
-}
-
-/**
- * Convert String to SDLGlobalProperty
- * @param value The value of the string to get an object for
- * @return SDLGlobalProperty
- */
-+ (SDLGlobalProperty *)valueOf:(NSString *)value;
-
-/**
- * @abstract Store the enumeration of all possible SDLGlobalProperty
- * @return An array that store all possible SDLGlobalProperty
- */
-+ (NSArray *)values;
+typedef SDLEnum SDLGlobalProperty NS_EXTENSIBLE_STRING_ENUM;
/**
* @abstract The help prompt to be spoken if the user needs assistance during a user-initiated interaction.
- * @return A SDLGlobalProperty with value of *HELPPROMPT*
*/
-+ (SDLGlobalProperty *)HELPPROMPT;
+extern SDLGlobalProperty const SDLGlobalPropertyHelpPrompt;
/**
* @abstract The prompt to be spoken if the user-initiated interaction times out waiting for the user's verbal input.
- * @return A SDLGlobalProperty with value of *TIMEOUTPROMPT*
*/
-+ (SDLGlobalProperty *)TIMEOUTPROMPT;
-
-+ (SDLGlobalProperty *)VRHELPTITLE;
+extern SDLGlobalProperty const SDLGlobalPropertyTimeoutPrompt;
-+ (SDLGlobalProperty *)VRHELPITEMS;
+extern SDLGlobalProperty const SDLGlobalPropertyVrHelpTitle;
-+ (SDLGlobalProperty *)MENUNAME;
+extern SDLGlobalProperty const SDLGlobalPropertyVrHelpItems;
-+ (SDLGlobalProperty *)MENUICON;
+extern SDLGlobalProperty const SDLGlobalPropertyMenuName;
-+ (SDLGlobalProperty *)KEYBOARDPROPERTIES;
+extern SDLGlobalProperty const SDLGlobalPropertyMenuIcon;
-@end \ No newline at end of file
+extern SDLGlobalProperty const SDLGlobalPropertyKeyboardProperties;
diff --git a/SmartDeviceLink/SDLGlobalProperty.m b/SmartDeviceLink/SDLGlobalProperty.m
index 59aa87e7b..7648c0089 100644
--- a/SmartDeviceLink/SDLGlobalProperty.m
+++ b/SmartDeviceLink/SDLGlobalProperty.m
@@ -4,89 +4,10 @@
#import "SDLGlobalProperty.h"
-SDLGlobalProperty *SDLGlobalProperty_HELPPROMPT = nil;
-SDLGlobalProperty *SDLGlobalProperty_TIMEOUTPROMPT = nil;
-SDLGlobalProperty *SDLGlobalProperty_VRHELPTITLE = nil;
-SDLGlobalProperty *SDLGlobalProperty_VRHELPITEMS = nil;
-SDLGlobalProperty *SDLGlobalProperty_MENUNAME = nil;
-SDLGlobalProperty *SDLGlobalProperty_MENUICON = nil;
-SDLGlobalProperty *SDLGlobalProperty_KEYBOARDPROPERTIES = nil;
-
-NSArray *SDLGlobalProperty_values = nil;
-
-@implementation SDLGlobalProperty
-
-+ (SDLGlobalProperty *)valueOf:(NSString *)value {
- for (SDLGlobalProperty *item in SDLGlobalProperty.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLGlobalProperty_values == nil) {
- SDLGlobalProperty_values = @[
- SDLGlobalProperty.HELPPROMPT,
- SDLGlobalProperty.TIMEOUTPROMPT,
- SDLGlobalProperty.VRHELPTITLE,
- SDLGlobalProperty.VRHELPITEMS,
- SDLGlobalProperty.MENUNAME,
- SDLGlobalProperty.MENUICON,
- SDLGlobalProperty.KEYBOARDPROPERTIES,
- ];
- }
- return SDLGlobalProperty_values;
-}
-
-+ (SDLGlobalProperty *)HELPPROMPT {
- if (SDLGlobalProperty_HELPPROMPT == nil) {
- SDLGlobalProperty_HELPPROMPT = [[SDLGlobalProperty alloc] initWithValue:@"HELPPROMPT"];
- }
- return SDLGlobalProperty_HELPPROMPT;
-}
-
-+ (SDLGlobalProperty *)TIMEOUTPROMPT {
- if (SDLGlobalProperty_TIMEOUTPROMPT == nil) {
- SDLGlobalProperty_TIMEOUTPROMPT = [[SDLGlobalProperty alloc] initWithValue:@"TIMEOUTPROMPT"];
- }
- return SDLGlobalProperty_TIMEOUTPROMPT;
-}
-
-+ (SDLGlobalProperty *)VRHELPTITLE {
- if (SDLGlobalProperty_VRHELPTITLE == nil) {
- SDLGlobalProperty_VRHELPTITLE = [[SDLGlobalProperty alloc] initWithValue:@"VRHELPTITLE"];
- }
- return SDLGlobalProperty_VRHELPTITLE;
-}
-
-+ (SDLGlobalProperty *)VRHELPITEMS {
- if (SDLGlobalProperty_VRHELPITEMS == nil) {
- SDLGlobalProperty_VRHELPITEMS = [[SDLGlobalProperty alloc] initWithValue:@"VRHELPITEMS"];
- }
- return SDLGlobalProperty_VRHELPITEMS;
-}
-
-+ (SDLGlobalProperty *)MENUNAME {
- if (SDLGlobalProperty_MENUNAME == nil) {
- SDLGlobalProperty_MENUNAME = [[SDLGlobalProperty alloc] initWithValue:@"MENUNAME"];
- }
- return SDLGlobalProperty_MENUNAME;
-}
-
-+ (SDLGlobalProperty *)MENUICON {
- if (SDLGlobalProperty_MENUICON == nil) {
- SDLGlobalProperty_MENUICON = [[SDLGlobalProperty alloc] initWithValue:@"MENUICON"];
- }
- return SDLGlobalProperty_MENUICON;
-}
-
-+ (SDLGlobalProperty *)KEYBOARDPROPERTIES {
- if (SDLGlobalProperty_KEYBOARDPROPERTIES == nil) {
- SDLGlobalProperty_KEYBOARDPROPERTIES = [[SDLGlobalProperty alloc] initWithValue:@"KEYBOARDPROPERTIES"];
- }
- return SDLGlobalProperty_KEYBOARDPROPERTIES;
-}
-
-@end
+SDLGlobalProperty const SDLGlobalPropertyHelpPrompt = @"HELPPROMPT";
+SDLGlobalProperty const SDLGlobalPropertyTimeoutPrompt = @"TIMEOUTPROMPT";
+SDLGlobalProperty const SDLGlobalPropertyVrHelpTitle = @"VRHELPTITLE";
+SDLGlobalProperty const SDLGlobalPropertyVrHelpItems = @"VRHELPITEMS";
+SDLGlobalProperty const SDLGlobalPropertyMenuName = @"MENUNAME";
+SDLGlobalProperty const SDLGlobalPropertyMenuIcon = @"MENUICON";
+SDLGlobalProperty const SDLGlobalPropertyKeyboard = @"KEYBOARDPROPERTIES";
diff --git a/SmartDeviceLink/SDLHMILevel.h b/SmartDeviceLink/SDLHMILevel.h
index 426217465..c7b9f15df 100644
--- a/SmartDeviceLink/SDLHMILevel.h
+++ b/SmartDeviceLink/SDLHMILevel.h
@@ -9,38 +9,17 @@
*
* @since SDL 1.0
*/
-@interface SDLHMILevel : SDLEnum {
-}
-
-/**
- * Return HMILevel status (FULL, LIMITED, BACKGROUND, NONE)
- *
- * @param value String value to retrieve the object for
- *
- * @return Current HMI level
- */
-+ (SDLHMILevel *)valueOf:(NSString *)value;
-
-/**
- * Store all possible SDLHMILevel values
- *
- * @return an array with all possible HMILevel values inside
- */
-+ (NSArray *)values;
+typedef SDLEnum SDLHMILevel NS_EXTENSIBLE_STRING_ENUM;
/**
* The application has full use of the SDL HMI. The app may output via TTS, display, or streaming audio and may gather input via VR, Menu, and button presses
- *
- * @return the HMILevel with value of *FULL*
*/
-+ (SDLHMILevel *)FULL;
+extern SDLHMILevel const SDLHMILevelFull;
/**
* This HMI Level is only defined for a media application using an HMI with an 8 inch touchscreen (Nav) system. The application's <i>Show</i> text is displayed and it receives button presses from media-oriented buttons (SEEKRIGHT, SEEKLEFT, TUNEUP, TUNEDOWN, PRESET_0-9)
- *
- * @return the HMILevel with value of *LIMITED*
*/
-+ (SDLHMILevel *)LIMITED;
+extern SDLHMILevel const SDLHMILevelLimited;
/**
* App cannot interact with user via TTS, VR, Display or Button Presses. App can perform the following operations:
@@ -59,18 +38,12 @@
* <li>Operation : ResetGlobalProperties</li>
* <li>Operation : SetGlobalProperties</li>
* </ul>
- *
- * @return the HMILevel with value of *BACKGROUND*
*/
-+ (SDLHMILevel *)BACKGROUND;
+extern SDLHMILevel const SDLHMILevelBackground;
/**
* Application has been discovered by SDL, but it cannot send any requests or receive any notifications
*
* @discussion An HMILevel of NONE can also mean that the user has exited the application by saying "exit appname" or selecting "exit" from the application's menu. When this happens, the application still has an active interface registration with SDL and all SDL resources the application has created (e.g. Choice Sets, subscriptions, etc.) still exist. But while the HMILevel is NONE, the application cannot send any messages to SYNC, except UnregisterAppInterface
- *
- * @return the HMILevel with value of *NONE*
*/
-+ (SDLHMILevel *)NONE;
-
-@end
+extern SDLHMILevel const SDLHMILevelNone;
diff --git a/SmartDeviceLink/SDLHMILevel.m b/SmartDeviceLink/SDLHMILevel.m
index 88b0be5b6..dab5a8691 100644
--- a/SmartDeviceLink/SDLHMILevel.m
+++ b/SmartDeviceLink/SDLHMILevel.m
@@ -4,62 +4,7 @@
#import "SDLHMILevel.h"
-SDLHMILevel *SDLHMILevel_FULL = nil;
-SDLHMILevel *SDLHMILevel_LIMITED = nil;
-SDLHMILevel *SDLHMILevel_BACKGROUND = nil;
-SDLHMILevel *SDLHMILevel_NONE = nil;
-
-NSArray *SDLHMILevel_values = nil;
-
-@implementation SDLHMILevel
-
-+ (SDLHMILevel *)valueOf:(NSString *)value {
- for (SDLHMILevel *item in SDLHMILevel.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLHMILevel_values == nil) {
- SDLHMILevel_values = @[
- [SDLHMILevel FULL],
- [SDLHMILevel LIMITED],
- [SDLHMILevel BACKGROUND],
- [SDLHMILevel NONE]
- ];
- }
- return SDLHMILevel_values;
-}
-
-+ (SDLHMILevel *)FULL {
- if (SDLHMILevel_FULL == nil) {
- SDLHMILevel_FULL = [[SDLHMILevel alloc] initWithValue:@"FULL"];
- }
- return SDLHMILevel_FULL;
-}
-
-+ (SDLHMILevel *)LIMITED {
- if (SDLHMILevel_LIMITED == nil) {
- SDLHMILevel_LIMITED = [[SDLHMILevel alloc] initWithValue:@"LIMITED"];
- }
- return SDLHMILevel_LIMITED;
-}
-
-+ (SDLHMILevel *)BACKGROUND {
- if (SDLHMILevel_BACKGROUND == nil) {
- SDLHMILevel_BACKGROUND = [[SDLHMILevel alloc] initWithValue:@"BACKGROUND"];
- }
- return SDLHMILevel_BACKGROUND;
-}
-
-+ (SDLHMILevel *)NONE {
- if (SDLHMILevel_NONE == nil) {
- SDLHMILevel_NONE = [[SDLHMILevel alloc] initWithValue:@"NONE"];
- }
- return SDLHMILevel_NONE;
-}
-
-@end
+SDLHMILevel const SDLHMILevelFull = @"FULL";
+SDLHMILevel const SDLHMILevelLimited = @"LIMITED";
+SDLHMILevel const SDLHMILevelBackground = @"BACKGROUND";
+SDLHMILevel const SDLHMILevelNone = @"NONE";
diff --git a/SmartDeviceLink/SDLHMIPermissions.m b/SmartDeviceLink/SDLHMIPermissions.m
index 29555bf59..7c9e59789 100644
--- a/SmartDeviceLink/SDLHMIPermissions.m
+++ b/SmartDeviceLink/SDLHMIPermissions.m
@@ -31,12 +31,12 @@
- (NSMutableArray *)allowed {
NSMutableArray *array = [store objectForKey:NAMES_allowed];
- if ([array count] < 1 || [[array objectAtIndex:0] isKindOfClass:SDLHMILevel.class]) {
+ if ([array count] < 1) {
return array;
} else {
NSMutableArray *newList = [NSMutableArray arrayWithCapacity:[array count]];
for (NSString *enumString in array) {
- [newList addObject:[SDLHMILevel valueOf:enumString]];
+ [newList addObject:(SDLHMILevel)enumString];
}
return newList;
}
@@ -52,12 +52,12 @@
- (NSMutableArray *)userDisallowed {
NSMutableArray *array = [store objectForKey:NAMES_userDisallowed];
- if ([array count] < 1 || [[array objectAtIndex:0] isKindOfClass:SDLHMILevel.class]) {
+ if ([array count] < 1) {
return array;
} else {
NSMutableArray *newList = [NSMutableArray arrayWithCapacity:[array count]];
for (NSString *enumString in array) {
- [newList addObject:[SDLHMILevel valueOf:enumString]];
+ [newList addObject:(SDLHMILevel)enumString];
}
return newList;
}
diff --git a/SmartDeviceLink/SDLHMIZoneCapabilities.h b/SmartDeviceLink/SDLHMIZoneCapabilities.h
index d63655bd8..041acc896 100644
--- a/SmartDeviceLink/SDLHMIZoneCapabilities.h
+++ b/SmartDeviceLink/SDLHMIZoneCapabilities.h
@@ -9,31 +9,14 @@
*
* @since SDL 1.0
*/
-@interface SDLHMIZoneCapabilities : SDLEnum {
-}
-
-/**
- * @abstract SDLHMIZoneCapabilities
- * @param value The value of the string to get an object for
- * @return SDLHMIZoneCapabilities
- */
-+ (SDLHMIZoneCapabilities *)valueOf:(NSString *)value;
-
-/**
- * @abstract store all possible SDLHMIZoneCapabilities values
- * @return an array with all possible SDLHMIZoneCapabilities values inside
- */
-+ (NSArray *)values;
+typedef SDLEnum SDLHMIZoneCapabilities NS_EXTENSIBLE_STRING_ENUM;
/**
* @abstract Indicates HMI available for front seat passengers.
- * @return a SDLHMIZoneCapabilities with value of *FRONT*
*/
-+ (SDLHMIZoneCapabilities *)FRONT;
+extern SDLHMIZoneCapabilities const SDLHMIZoneCapabilitiesFront;
+
/**
* @abstract Indicates HMI available for rear seat passengers.
- * @return a SDLHMIZoneCapabilities with value of *BACK*
*/
-+ (SDLHMIZoneCapabilities *)BACK;
-
-@end
+extern SDLHMIZoneCapabilities const SDLHMIZoneCapabilitiesBack;
diff --git a/SmartDeviceLink/SDLHMIZoneCapabilities.m b/SmartDeviceLink/SDLHMIZoneCapabilities.m
index 56eacf671..9b9bed2ea 100644
--- a/SmartDeviceLink/SDLHMIZoneCapabilities.m
+++ b/SmartDeviceLink/SDLHMIZoneCapabilities.m
@@ -4,44 +4,5 @@
#import "SDLHMIZoneCapabilities.h"
-SDLHMIZoneCapabilities *SDLHMIZoneCapabilities_FRONT = nil;
-SDLHMIZoneCapabilities *SDLHMIZoneCapabilities_BACK = nil;
-
-NSArray *SDLHMIZoneCapabilities_values = nil;
-
-@implementation SDLHMIZoneCapabilities
-
-+ (SDLHMIZoneCapabilities *)valueOf:(NSString *)value {
- for (SDLHMIZoneCapabilities *item in SDLHMIZoneCapabilities.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLHMIZoneCapabilities_values == nil) {
- SDLHMIZoneCapabilities_values = @[
- SDLHMIZoneCapabilities.FRONT,
- SDLHMIZoneCapabilities.BACK,
- ];
- }
- return SDLHMIZoneCapabilities_values;
-}
-
-+ (SDLHMIZoneCapabilities *)FRONT {
- if (SDLHMIZoneCapabilities_FRONT == nil) {
- SDLHMIZoneCapabilities_FRONT = [[SDLHMIZoneCapabilities alloc] initWithValue:@"FRONT"];
- }
- return SDLHMIZoneCapabilities_FRONT;
-}
-
-+ (SDLHMIZoneCapabilities *)BACK {
- if (SDLHMIZoneCapabilities_BACK == nil) {
- SDLHMIZoneCapabilities_BACK = [[SDLHMIZoneCapabilities alloc] initWithValue:@"BACK"];
- }
- return SDLHMIZoneCapabilities_BACK;
-}
-
-@end
+SDLHMIZoneCapabilities const SDLHMIZoneCapabilitiesFront = @"FRONT";
+SDLHMIZoneCapabilities const SDLHMIZoneCapabilitiesBack = @"BACK";
diff --git a/SmartDeviceLink/SDLHeadLampStatus.h b/SmartDeviceLink/SDLHeadLampStatus.h
index cc1586122..05d9beaa6 100644
--- a/SmartDeviceLink/SDLHeadLampStatus.h
+++ b/SmartDeviceLink/SDLHeadLampStatus.h
@@ -3,7 +3,7 @@
#import "SDLRPCMessage.h"
-@class SDLAmbientLightStatus;
+#import "SDLAmbientLightStatus.h"
/**
@@ -29,5 +29,5 @@
* @abstract A boolean value. Status of the high beam lamps.
*/
@property (strong) NSNumber *highBeamsOn;
-@property (strong) SDLAmbientLightStatus *ambientLightSensorStatus;
-@end \ No newline at end of file
+@property (strong) SDLAmbientLightStatus ambientLightSensorStatus;
+@end
diff --git a/SmartDeviceLink/SDLHeadLampStatus.m b/SmartDeviceLink/SDLHeadLampStatus.m
index 44ed87b44..4141c1529 100644
--- a/SmartDeviceLink/SDLHeadLampStatus.m
+++ b/SmartDeviceLink/SDLHeadLampStatus.m
@@ -45,7 +45,7 @@
return [store objectForKey:NAMES_highBeamsOn];
}
-- (void)setAmbientLightSensorStatus:(SDLAmbientLightStatus *)ambientLightSensorStatus {
+- (void)setAmbientLightSensorStatus:(SDLAmbientLightStatus)ambientLightSensorStatus {
if (ambientLightSensorStatus != nil) {
[store setObject:ambientLightSensorStatus forKey:NAMES_ambientLightSensorStatus];
} else {
@@ -53,13 +53,9 @@
}
}
-- (SDLAmbientLightStatus *)ambientLightSensorStatus {
+- (SDLAmbientLightStatus)ambientLightSensorStatus {
NSObject *obj = [store objectForKey:NAMES_ambientLightSensorStatus];
- if (obj == nil || [obj isKindOfClass:SDLAmbientLightStatus.class]) {
- return (SDLAmbientLightStatus *)obj;
- } else {
- return [SDLAmbientLightStatus valueOf:(NSString *)obj];
- }
+ return (SDLAmbientLightStatus)obj;
}
@end
diff --git a/SmartDeviceLink/SDLIgnitionStableStatus.h b/SmartDeviceLink/SDLIgnitionStableStatus.h
index 96dcdfaa9..80f674d58 100644
--- a/SmartDeviceLink/SDLIgnitionStableStatus.h
+++ b/SmartDeviceLink/SDLIgnitionStableStatus.h
@@ -9,34 +9,16 @@
*
* @since SDL 2.0
*/
-@interface SDLIgnitionStableStatus : SDLEnum {
-}
-
-/**
- * @abstract return SDLIgnitionStableStatus
- * @param value The value of the string to get an object for
- * @return SDLIgnitionStableStatus
- */
-+ (SDLIgnitionStableStatus *)valueOf:(NSString *)value;
-
-/**
- * @abstract store all possible SDLIgnitionStableStatus values
- * @return an array with all possible SDLIgnitionStableStatus values inside
- */
-+ (NSArray *)values;
+typedef SDLEnum SDLIgnitionStableStatus NS_EXTENSIBLE_STRING_ENUM;
/**
* @abstract The current ignition switch status is considered not to be stable.
- * @return the Ignition Stable Status with value of *IGNITION_SWITCH_NOT_STABLE*
*/
-+ (SDLIgnitionStableStatus *)IGNITION_SWITCH_NOT_STABLE;
+extern SDLIgnitionStableStatus const SDLIgnitionStableStatusNotStable;
/**
* @abstract The current ignition switch status is considered to be stable.
- * @return the Ignition Stable Status with value of *IGNITION_SWITCH_STABLE*
*/
-+ (SDLIgnitionStableStatus *)IGNITION_SWITCH_STABLE;
-
-+ (SDLIgnitionStableStatus *)MISSING_FROM_TRANSMITTER;
+extern SDLIgnitionStableStatus const SDLIgnitionStableStatusStable;
-@end
+extern SDLIgnitionStableStatus const SDLIgnitionStableStatusMissingFromTransmitter;
diff --git a/SmartDeviceLink/SDLIgnitionStableStatus.m b/SmartDeviceLink/SDLIgnitionStableStatus.m
index 868723b32..8572adcb1 100644
--- a/SmartDeviceLink/SDLIgnitionStableStatus.m
+++ b/SmartDeviceLink/SDLIgnitionStableStatus.m
@@ -4,53 +4,6 @@
#import "SDLIgnitionStableStatus.h"
-SDLIgnitionStableStatus *SDLIgnitionStableStatus_IGNITION_SWITCH_NOT_STABLE = nil;
-SDLIgnitionStableStatus *SDLIgnitionStableStatus_IGNITION_SWITCH_STABLE = nil;
-SDLIgnitionStableStatus *SDLIgnitionStableStatus_MISSING_FROM_TRANSMITTER = nil;
-
-NSArray *SDLIgnitionStableStatus_values = nil;
-
-@implementation SDLIgnitionStableStatus
-
-+ (SDLIgnitionStableStatus *)valueOf:(NSString *)value {
- for (SDLIgnitionStableStatus *item in SDLIgnitionStableStatus.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLIgnitionStableStatus_values == nil) {
- SDLIgnitionStableStatus_values = @[
- SDLIgnitionStableStatus.IGNITION_SWITCH_NOT_STABLE,
- SDLIgnitionStableStatus.IGNITION_SWITCH_STABLE,
- SDLIgnitionStableStatus.MISSING_FROM_TRANSMITTER,
- ];
- }
- return SDLIgnitionStableStatus_values;
-}
-
-+ (SDLIgnitionStableStatus *)IGNITION_SWITCH_NOT_STABLE {
- if (SDLIgnitionStableStatus_IGNITION_SWITCH_NOT_STABLE == nil) {
- SDLIgnitionStableStatus_IGNITION_SWITCH_NOT_STABLE = [[SDLIgnitionStableStatus alloc] initWithValue:@"IGNITION_SWITCH_NOT_STABLE"];
- }
- return SDLIgnitionStableStatus_IGNITION_SWITCH_NOT_STABLE;
-}
-
-+ (SDLIgnitionStableStatus *)IGNITION_SWITCH_STABLE {
- if (SDLIgnitionStableStatus_IGNITION_SWITCH_STABLE == nil) {
- SDLIgnitionStableStatus_IGNITION_SWITCH_STABLE = [[SDLIgnitionStableStatus alloc] initWithValue:@"IGNITION_SWITCH_STABLE"];
- }
- return SDLIgnitionStableStatus_IGNITION_SWITCH_STABLE;
-}
-
-+ (SDLIgnitionStableStatus *)MISSING_FROM_TRANSMITTER {
- if (SDLIgnitionStableStatus_MISSING_FROM_TRANSMITTER == nil) {
- SDLIgnitionStableStatus_MISSING_FROM_TRANSMITTER = [[SDLIgnitionStableStatus alloc] initWithValue:@"MISSING_FROM_TRANSMITTER"];
- }
- return SDLIgnitionStableStatus_MISSING_FROM_TRANSMITTER;
-}
-
-@end
+SDLIgnitionStableStatus const SDLIgnitionStableStatusNotStable = @"IGNITION_SWITCH_NOT_STABLE";
+SDLIgnitionStableStatus const SDLIgnitionStableStatusStable = @"IGNITION_SWITCH_STABLE";
+SDLIgnitionStableStatus const SDLIgnitionStableStatusMissingFromTransmitter = @"MISSING_FROM_TRANSMITTER";
diff --git a/SmartDeviceLink/SDLIgnitionStatus.h b/SmartDeviceLink/SDLIgnitionStatus.h
index fadb3f5f4..c461ae870 100644
--- a/SmartDeviceLink/SDLIgnitionStatus.h
+++ b/SmartDeviceLink/SDLIgnitionStatus.h
@@ -9,56 +9,34 @@
*
* @since SDL 2.0
*/
-@interface SDLIgnitionStatus : SDLEnum {
-}
-
-/**
- * @abstract return SDLIgnitionStatus
- * @param value The value of the string to get an object for
- * @return SDLIgnitionStatus object
- */
-+ (SDLIgnitionStatus *)valueOf:(NSString *)value;
-
-/**
- * @abstract store all possible SDLIgnitionStatus values
- * @return an array with all possible SDLIgnitionStatus values inside
- */
-+ (NSArray *)values;
+typedef SDLEnum SDLIgnitionStatus NS_EXTENSIBLE_STRING_ENUM;
/**
* @abstract Ignition status currently unknown
- * @return Ignition Status with value of *UNKNOWN*
*/
-+ (SDLIgnitionStatus *)UNKNOWN;
+extern SDLIgnitionStatus const SDLIgnitionStatusUnknown;
/**
* @abstract Ignition is off
- * @return Ignition Status with value of *OFF*
*/
-+ (SDLIgnitionStatus *)OFF;
+extern SDLIgnitionStatus const SDLIgnitionStatusOff;
/**
* @abstract Ignition is in mode accessory
- * @return Ignition Status with value of *ACCESSORY*
*/
-+ (SDLIgnitionStatus *)ACCESSORY;
+extern SDLIgnitionStatus const SDLIgnitionStatusAccessory;
/**
* @abstract Ignition is in mode run
- * @return Ignition Status with value of *RUN*
*/
-+ (SDLIgnitionStatus *)RUN;
+extern SDLIgnitionStatus const SDLIgnitionStatusRun;
/**
* @abstract Ignition is in mode start
- * @return Ignition Status with value of *START*
*/
-+ (SDLIgnitionStatus *)START;
+extern SDLIgnitionStatus const SDLIgnitionStatusStart;
/**
* @abstract Signal is invalid
- * @return Ignition Status with value of *INVALID*
*/
-+ (SDLIgnitionStatus *)INVALID;
-
-@end
+extern SDLIgnitionStatus const SDLIgnitionStatusInvalid;
diff --git a/SmartDeviceLink/SDLIgnitionStatus.m b/SmartDeviceLink/SDLIgnitionStatus.m
index ff069f0a0..b2ccf9881 100644
--- a/SmartDeviceLink/SDLIgnitionStatus.m
+++ b/SmartDeviceLink/SDLIgnitionStatus.m
@@ -4,80 +4,9 @@
#import "SDLIgnitionStatus.h"
-SDLIgnitionStatus *SDLIgnitionStatus_UNKNOWN = nil;
-SDLIgnitionStatus *SDLIgnitionStatus_OFF = nil;
-SDLIgnitionStatus *SDLIgnitionStatus_ACCESSORY = nil;
-SDLIgnitionStatus *SDLIgnitionStatus_RUN = nil;
-SDLIgnitionStatus *SDLIgnitionStatus_START = nil;
-SDLIgnitionStatus *SDLIgnitionStatus_INVALID = nil;
-
-NSArray *SDLIgnitionStatus_values = nil;
-
-@implementation SDLIgnitionStatus
-
-+ (SDLIgnitionStatus *)valueOf:(NSString *)value {
- for (SDLIgnitionStatus *item in SDLIgnitionStatus.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLIgnitionStatus_values == nil) {
- SDLIgnitionStatus_values = @[
- SDLIgnitionStatus.UNKNOWN,
- SDLIgnitionStatus.OFF,
- SDLIgnitionStatus.ACCESSORY,
- SDLIgnitionStatus.RUN,
- SDLIgnitionStatus.START,
- SDLIgnitionStatus.INVALID,
- ];
- }
- return SDLIgnitionStatus_values;
-}
-
-+ (SDLIgnitionStatus *)UNKNOWN {
- if (SDLIgnitionStatus_UNKNOWN == nil) {
- SDLIgnitionStatus_UNKNOWN = [[SDLIgnitionStatus alloc] initWithValue:@"UNKNOWN"];
- }
- return SDLIgnitionStatus_UNKNOWN;
-}
-
-+ (SDLIgnitionStatus *)OFF {
- if (SDLIgnitionStatus_OFF == nil) {
- SDLIgnitionStatus_OFF = [[SDLIgnitionStatus alloc] initWithValue:@"OFF"];
- }
- return SDLIgnitionStatus_OFF;
-}
-
-+ (SDLIgnitionStatus *)ACCESSORY {
- if (SDLIgnitionStatus_ACCESSORY == nil) {
- SDLIgnitionStatus_ACCESSORY = [[SDLIgnitionStatus alloc] initWithValue:@"ACCESSORY"];
- }
- return SDLIgnitionStatus_ACCESSORY;
-}
-
-+ (SDLIgnitionStatus *)RUN {
- if (SDLIgnitionStatus_RUN == nil) {
- SDLIgnitionStatus_RUN = [[SDLIgnitionStatus alloc] initWithValue:@"RUN"];
- }
- return SDLIgnitionStatus_RUN;
-}
-
-+ (SDLIgnitionStatus *)START {
- if (SDLIgnitionStatus_START == nil) {
- SDLIgnitionStatus_START = [[SDLIgnitionStatus alloc] initWithValue:@"START"];
- }
- return SDLIgnitionStatus_START;
-}
-
-+ (SDLIgnitionStatus *)INVALID {
- if (SDLIgnitionStatus_INVALID == nil) {
- SDLIgnitionStatus_INVALID = [[SDLIgnitionStatus alloc] initWithValue:@"INVALID"];
- }
- return SDLIgnitionStatus_INVALID;
-}
-
-@end
+SDLIgnitionStatus const SDLIgnitionStatusUnknown = @"UNKNOWN";
+SDLIgnitionStatus const SDLIgnitionStatusOff = @"OFF";
+SDLIgnitionStatus const SDLIgnitionStatusAccessory = @"ACCESSORY";
+SDLIgnitionStatus const SDLIgnitionStatusRun = @"RUN";
+SDLIgnitionStatus const SDLIgnitionStatusStart = @"START";
+SDLIgnitionStatus const SDLIgnitionStatusInvalid = @"INVALID";
diff --git a/SmartDeviceLink/SDLImage.h b/SmartDeviceLink/SDLImage.h
index 993107ec3..748a443ca 100644
--- a/SmartDeviceLink/SDLImage.h
+++ b/SmartDeviceLink/SDLImage.h
@@ -3,8 +3,7 @@
#import "SDLRPCMessage.h"
-@class SDLImageType;
-
+#import "SDLImageType.h"
/**
*Specifies, which image shall be used, e.g. in SDLAlerts or on SDLSoftbuttons provided the display supports it.
@@ -37,6 +36,6 @@
*
* Required
*/
-@property (strong) SDLImageType *imageType;
+@property (strong) SDLImageType imageType;
@end
diff --git a/SmartDeviceLink/SDLImage.m b/SmartDeviceLink/SDLImage.m
index ef646f794..f6d47a97b 100644
--- a/SmartDeviceLink/SDLImage.m
+++ b/SmartDeviceLink/SDLImage.m
@@ -3,7 +3,6 @@
#import "SDLImage.h"
-#import "SDLImageType.h"
#import "SDLNames.h"
@@ -33,7 +32,7 @@
return [store objectForKey:NAMES_value];
}
-- (void)setImageType:(SDLImageType *)imageType {
+- (void)setImageType:(SDLImageType)imageType {
if (imageType != nil) {
[store setObject:imageType forKey:NAMES_imageType];
} else {
@@ -41,13 +40,9 @@
}
}
-- (SDLImageType *)imageType {
+- (SDLImageType)imageType {
NSObject *obj = [store objectForKey:NAMES_imageType];
- if (obj == nil || [obj isKindOfClass:SDLImageType.class]) {
- return (SDLImageType *)obj;
- } else {
- return [SDLImageType valueOf:(NSString *)obj];
- }
+ return (SDLImageType)obj;
}
@end
diff --git a/SmartDeviceLink/SDLImageField.h b/SmartDeviceLink/SDLImageField.h
index eb0942e79..9e52fd705 100644
--- a/SmartDeviceLink/SDLImageField.h
+++ b/SmartDeviceLink/SDLImageField.h
@@ -3,7 +3,8 @@
#import "SDLRPCMessage.h"
-@class SDLImageFieldName;
+#import "SDLImageFieldName.h"
+
@class SDLImageResolution;
@@ -13,7 +14,7 @@
- (instancetype)init;
- (instancetype)initWithDictionary:(NSMutableDictionary *)dict;
-@property (strong) SDLImageFieldName *name;
+@property (strong) SDLImageFieldName name;
@property (strong) NSMutableArray *imageTypeSupported;
@property (strong) SDLImageResolution *imageResolution;
diff --git a/SmartDeviceLink/SDLImageField.m b/SmartDeviceLink/SDLImageField.m
index af4f15517..b495e310f 100644
--- a/SmartDeviceLink/SDLImageField.m
+++ b/SmartDeviceLink/SDLImageField.m
@@ -3,9 +3,8 @@
#import "SDLImageField.h"
-#import "SDLFileType.h"
-#import "SDLImageFieldName.h"
#import "SDLImageResolution.h"
+#import "SDLFileType.h"
#import "SDLNames.h"
@@ -23,7 +22,7 @@
return self;
}
-- (void)setName:(SDLImageFieldName *)name {
+- (void)setName:(SDLImageFieldName)name {
if (name != nil) {
[store setObject:name forKey:NAMES_name];
} else {
@@ -31,13 +30,9 @@
}
}
-- (SDLImageFieldName *)name {
+- (SDLImageFieldName)name {
NSObject *obj = [store objectForKey:NAMES_name];
- if (obj == nil || [obj isKindOfClass:SDLImageFieldName.class]) {
- return (SDLImageFieldName *)obj;
- } else {
- return [SDLImageFieldName valueOf:(NSString *)obj];
- }
+ return (SDLImageFieldName)obj;
}
- (void)setImageTypeSupported:(NSMutableArray *)imageTypeSupported {
@@ -50,12 +45,12 @@
- (NSMutableArray *)imageTypeSupported {
NSMutableArray *array = [store objectForKey:NAMES_imageTypeSupported];
- if ([array count] < 1 || [[array objectAtIndex:0] isKindOfClass:SDLFileType.class]) {
+ if ([array count] < 1) {
return array;
} else {
NSMutableArray *newList = [NSMutableArray arrayWithCapacity:[array count]];
for (NSString *enumString in array) {
- [newList addObject:[SDLFileType valueOf:enumString]];
+ [newList addObject:(SDLFileType)enumString];
}
return newList;
}
diff --git a/SmartDeviceLink/SDLImageFieldName.h b/SmartDeviceLink/SDLImageFieldName.h
index 5c63a5a71..900ecaf84 100644
--- a/SmartDeviceLink/SDLImageFieldName.h
+++ b/SmartDeviceLink/SDLImageFieldName.h
@@ -10,73 +10,65 @@
* @since SmartDeviceLink 3.0
*
*/
-@interface SDLImageFieldName : SDLEnum {
-}
-
-+ (SDLImageFieldName *)valueOf:(NSString *)value;
-+ (NSArray *)values;
+typedef SDLEnum SDLImageFieldName NS_EXTENSIBLE_STRING_ENUM;
/** The image field for SoftButton
*
*/
-+ (SDLImageFieldName *)softButtonImage;
+extern SDLImageFieldName const SDLImageFieldNameSoftButtonImage;
/** The first image field for Choice.
*
*/
-+ (SDLImageFieldName *)choiceImage;
+extern SDLImageFieldName const SDLImageFieldNameChoiceImage;
/** The scondary image field for Choice.
*
*/
-+ (SDLImageFieldName *)choiceSecondaryImage;
+extern SDLImageFieldName const SDLImageFieldNameChoiceSecondaryImage;
/** The image field for vrHelpItem.
*
*/
-+ (SDLImageFieldName *)vrHelpItem;
+extern SDLImageFieldName const SDLImageFieldNameVrHelpItem;
/** The image field for Turn.
*
*/
-
-+ (SDLImageFieldName *)turnIcon;
+extern SDLImageFieldName const SDLImageFieldNameTurnIcon;
/** The image field for the menu icon in SetGlobalProperties.
*
*/
-+ (SDLImageFieldName *)menuIcon;
+extern SDLImageFieldName const SDLImageFieldNameMenuIcon;
/** The image filed for AddCommand.
*
*/
-
-+ (SDLImageFieldName *)cmdIcon;
+extern SDLImageFieldName const SDLImageFieldNameCmdIcon;
/** The iamage field for the app icon ( set by setAppIcon).
*
*/
-+ (SDLImageFieldName *)appIcon;
+extern SDLImageFieldName const SDLImageFieldNameAppIcon;
/** The image filed for Show.
*
*/
-+ (SDLImageFieldName *)graphic;
+extern SDLImageFieldName const SDLImageFieldNameGraphic;
/** The primary image field for ShowConstant TBT.
*
*/
-+ (SDLImageFieldName *)showConstantTBTIcon;
+extern SDLImageFieldName const SDLImageFieldNameShowConstantTbtIcon;
/** The secondary image field for ShowConstant TBT.
*
*/
-+ (SDLImageFieldName *)showConstantTBTNextTurnIcon;
+extern SDLImageFieldName const SDLImageFieldNameShowConstantTbtNextTurnIcon;
/**
* The optional image of a destination / location
* @since SDL 4.0
*/
-+ (SDLImageFieldName *)locationImage;
-
-@end
+extern SDLImageFieldName const SDLImageFieldNameLocationImage;
diff --git a/SmartDeviceLink/SDLImageFieldName.m b/SmartDeviceLink/SDLImageFieldName.m
index 7baa57b45..036675917 100644
--- a/SmartDeviceLink/SDLImageFieldName.m
+++ b/SmartDeviceLink/SDLImageFieldName.m
@@ -4,134 +4,15 @@
#import "SDLImageFieldName.h"
-SDLImageFieldName *SDLImageFieldName_softButtonImage = nil;
-SDLImageFieldName *SDLImageFieldName_choiceImage = nil;
-SDLImageFieldName *SDLImageFieldName_choiceSecondaryImage = nil;
-SDLImageFieldName *SDLImageFieldName_vrHelpItem = nil;
-SDLImageFieldName *SDLImageFieldName_turnIcon = nil;
-SDLImageFieldName *SDLImageFieldName_menuIcon = nil;
-SDLImageFieldName *SDLImageFieldName_cmdIcon = nil;
-SDLImageFieldName *SDLImageFieldName_appIcon = nil;
-SDLImageFieldName *SDLImageFieldName_graphic = nil;
-SDLImageFieldName *SDLImageFieldName_showConstantTBTIcon = nil;
-SDLImageFieldName *SDLImageFieldName_showConstantTBTNextTurnIcon = nil;
-SDLImageFieldName *SDLImageFieldName_locationImage = nil;
-
-NSArray *SDLImageFieldName_values = nil;
-
-@implementation SDLImageFieldName
-
-+ (SDLImageFieldName *)valueOf:(NSString *)value {
- for (SDLImageFieldName *item in SDLImageFieldName.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLImageFieldName_values == nil) {
- SDLImageFieldName_values = @[
- SDLImageFieldName.softButtonImage,
- SDLImageFieldName.choiceImage,
- SDLImageFieldName.choiceSecondaryImage,
- SDLImageFieldName.vrHelpItem,
- SDLImageFieldName.turnIcon,
- SDLImageFieldName.menuIcon,
- SDLImageFieldName.cmdIcon,
- SDLImageFieldName.appIcon,
- SDLImageFieldName.graphic,
- SDLImageFieldName.showConstantTBTIcon,
- SDLImageFieldName.showConstantTBTNextTurnIcon,
- SDLImageFieldName.locationImage,
- ];
- }
- return SDLImageFieldName_values;
-}
-
-+ (SDLImageFieldName *)softButtonImage {
- if (SDLImageFieldName_softButtonImage == nil) {
- SDLImageFieldName_softButtonImage = [[SDLImageFieldName alloc] initWithValue:@"softButtonImage"];
- }
- return SDLImageFieldName_softButtonImage;
-}
-
-+ (SDLImageFieldName *)choiceImage {
- if (SDLImageFieldName_choiceImage == nil) {
- SDLImageFieldName_choiceImage = [[SDLImageFieldName alloc] initWithValue:@"choiceImage"];
- }
- return SDLImageFieldName_choiceImage;
-}
-
-+ (SDLImageFieldName *)choiceSecondaryImage {
- if (SDLImageFieldName_choiceSecondaryImage == nil) {
- SDLImageFieldName_choiceSecondaryImage = [[SDLImageFieldName alloc] initWithValue:@"choiceSecondaryImage"];
- }
- return SDLImageFieldName_choiceSecondaryImage;
-}
-
-+ (SDLImageFieldName *)vrHelpItem {
- if (SDLImageFieldName_vrHelpItem == nil) {
- SDLImageFieldName_vrHelpItem = [[SDLImageFieldName alloc] initWithValue:@"vrHelpItem"];
- }
- return SDLImageFieldName_vrHelpItem;
-}
-
-+ (SDLImageFieldName *)turnIcon {
- if (SDLImageFieldName_turnIcon == nil) {
- SDLImageFieldName_turnIcon = [[SDLImageFieldName alloc] initWithValue:@"turnIcon"];
- }
- return SDLImageFieldName_turnIcon;
-}
-
-+ (SDLImageFieldName *)menuIcon {
- if (SDLImageFieldName_menuIcon == nil) {
- SDLImageFieldName_menuIcon = [[SDLImageFieldName alloc] initWithValue:@"menuIcon"];
- }
- return SDLImageFieldName_menuIcon;
-}
-
-+ (SDLImageFieldName *)cmdIcon {
- if (SDLImageFieldName_cmdIcon == nil) {
- SDLImageFieldName_cmdIcon = [[SDLImageFieldName alloc] initWithValue:@"cmdIcon"];
- }
- return SDLImageFieldName_cmdIcon;
-}
-
-+ (SDLImageFieldName *)appIcon {
- if (SDLImageFieldName_appIcon == nil) {
- SDLImageFieldName_appIcon = [[SDLImageFieldName alloc] initWithValue:@"appIcon"];
- }
- return SDLImageFieldName_appIcon;
-}
-
-+ (SDLImageFieldName *)graphic {
- if (SDLImageFieldName_graphic == nil) {
- SDLImageFieldName_graphic = [[SDLImageFieldName alloc] initWithValue:@"graphic"];
- }
- return SDLImageFieldName_graphic;
-}
-
-+ (SDLImageFieldName *)showConstantTBTIcon {
- if (SDLImageFieldName_showConstantTBTIcon == nil) {
- SDLImageFieldName_showConstantTBTIcon = [[SDLImageFieldName alloc] initWithValue:@"showConstantTBTIcon"];
- }
- return SDLImageFieldName_showConstantTBTIcon;
-}
-
-+ (SDLImageFieldName *)showConstantTBTNextTurnIcon {
- if (SDLImageFieldName_showConstantTBTNextTurnIcon == nil) {
- SDLImageFieldName_showConstantTBTNextTurnIcon = [[SDLImageFieldName alloc] initWithValue:@"showConstantTBTNextTurnIcon"];
- }
- return SDLImageFieldName_showConstantTBTNextTurnIcon;
-}
-
-+ (SDLImageFieldName *)locationImage {
- if (SDLImageFieldName_locationImage == nil) {
- SDLImageFieldName_locationImage = [[SDLImageFieldName alloc] initWithValue:@"locationImage"];
- }
- return SDLImageFieldName_locationImage;
-}
-
-@end
+SDLImageFieldName const SDLImageFieldNameSoftButtonImage = @"softButtonImage";
+SDLImageFieldName const SDLImageFieldNameChoiceImage = @"choiceImage";
+SDLImageFieldName const SDLImageFieldNameChoiceSecondaryImage = @"choiceSecondaryImage";
+SDLImageFieldName const SDLImageFieldNameVrHelpItem = @"vrHelpItem";
+SDLImageFieldName const SDLImageFieldNameTurnIcon = @"turnIcon";
+SDLImageFieldName const SDLImageFieldNameMenuIcon = @"menuIcon";
+SDLImageFieldName const SDLImageFieldNameCmdIcon = @"cmdIcon";
+SDLImageFieldName const SDLImageFieldNameAppIcon = @"appIcon";
+SDLImageFieldName const SDLImageFieldNameGraphic = @"graphic";
+SDLImageFieldName const SDLImageFieldNameShowConstantTBTIcon = @"showConstantTBTIcon";
+SDLImageFieldName const SDLImageFieldNameShowConstantTBTNextTurnIcon = @"showConstantTBTNextTurnIcon";
+SDLImageFieldName const SDLImageFieldNameLocationImage = @"locationImage";
diff --git a/SmartDeviceLink/SDLImageType.h b/SmartDeviceLink/SDLImageType.h
index 2b118a456..4e7a3a488 100644
--- a/SmartDeviceLink/SDLImageType.h
+++ b/SmartDeviceLink/SDLImageType.h
@@ -9,39 +9,16 @@
*
* @since SDL 2.0
*/
-@interface SDLImageType : SDLEnum {
-}
-
-/**
- * @abstract return SDLImageType (STATIC / DYNAMIC)
- *
- * @param value The value of the string to get an object for
- *
- * @return An SDLImageType
- */
-+ (SDLImageType *)valueOf:(NSString *)value;
-
-/**
- * @abstract store all possible SDLImageType values
- *
- * @return An array with all possible SDLImageType values inside
- */
-+ (NSArray *)values;
+typedef SDLEnum SDLImageType NS_EXTENSIBLE_STRING_ENUM;
/**
* @abstract Just the static hex icon value to be used
- *
- * @return The Image Type with value *STATIC*
*/
-+ (SDLImageType *)STATIC;
+extern SDLImageType const SDLImageTypeStatic;
/**
* @abstract Binary image file to be used (identifier to be sent by SDLPutFile)
*
* @see SDLPutFile
- *
- * @return The Image Type with value *DYNAMIC*
*/
-+ (SDLImageType *)DYNAMIC;
-
-@end
+extern SDLImageType const SDLImageTypeDynamic;
diff --git a/SmartDeviceLink/SDLImageType.m b/SmartDeviceLink/SDLImageType.m
index 878eb1773..ef0d39038 100644
--- a/SmartDeviceLink/SDLImageType.m
+++ b/SmartDeviceLink/SDLImageType.m
@@ -4,44 +4,5 @@
#import "SDLImageType.h"
-SDLImageType *SDLImageType_STATIC = nil;
-SDLImageType *SDLImageType_DYNAMIC = nil;
-
-NSArray *SDLImageType_values = nil;
-
-@implementation SDLImageType
-
-+ (SDLImageType *)valueOf:(NSString *)value {
- for (SDLImageType *item in SDLImageType.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLImageType_values == nil) {
- SDLImageType_values = @[
- SDLImageType.STATIC,
- SDLImageType.DYNAMIC,
- ];
- }
- return SDLImageType_values;
-}
-
-+ (SDLImageType *)STATIC {
- if (SDLImageType_STATIC == nil) {
- SDLImageType_STATIC = [[SDLImageType alloc] initWithValue:@"STATIC"];
- }
- return SDLImageType_STATIC;
-}
-
-+ (SDLImageType *)DYNAMIC {
- if (SDLImageType_DYNAMIC == nil) {
- SDLImageType_DYNAMIC = [[SDLImageType alloc] initWithValue:@"DYNAMIC"];
- }
- return SDLImageType_DYNAMIC;
-}
-
-@end
+SDLImageType const SDLImageTypeStatic = @"STATIC";
+SDLImageType const SDLImageTypeDynamic = @"DYNAMIC";
diff --git a/SmartDeviceLink/SDLInteractionMode.h b/SmartDeviceLink/SDLInteractionMode.h
index 442d4f8d7..8a1671459 100644
--- a/SmartDeviceLink/SDLInteractionMode.h
+++ b/SmartDeviceLink/SDLInteractionMode.h
@@ -9,37 +9,19 @@
*
* @since SDL 1.0
*/
-@interface SDLInteractionMode : SDLEnum {
-}
-
-/**
- * @abstract SDLInteractionMode
- * @param value The value of the string to get an object for
- * @return SDLInteractionMode
- */
-+ (SDLInteractionMode *)valueOf:(NSString *)value;
-
-/**
- * @abstract store all possible SDLInteractionMode values
- * @return an array with all possible SDLInteractionMode values inside
- */
-+ (NSArray *)values;
+typedef SDLEnum SDLInteractionMode NS_EXTENSIBLE_STRING_ENUM;
/**
* @abstract Interaction Mode : Manual Only
* @discussion This mode causes the interaction to occur only on the display, meaning the choices are presented and selected only via the display. Selections are viewed with the SEEKRIGHT, SEEKLEFT, TUNEUP, TUNEDOWN buttons. User's selection is indicated with the OK button
- *
- * @return Current Interaction Mode with value of *MANUAL_ONLY*
*/
-+ (SDLInteractionMode *)MANUAL_ONLY;
+extern SDLInteractionMode const SDLInteractionModeManualOnly;
/**
* @abstract Interaction Mode : VR Only
* @discussion This mode causes the interaction to occur only through TTS and VR. The user is prompted via TTS to select a choice by saying one of the choice's synonyms
- *
- * @return Current Interaction Mode with value of *VR_ONLY*
*/
-+ (SDLInteractionMode *)VR_ONLY;
+extern SDLInteractionMode const SDLInteractionModeVrOnly;
/**
* @abstract Interaction Mode : Manual & VR
@@ -48,9 +30,5 @@
* If the user views selections as described in MANUAL_ONLY mode, the interaction becomes strictly, and irreversibly, a MANUAL_ONLY interaction (i.e. the VR session is cancelled, although the interaction itself is still in progress). If the user interacts with the VR session in any way (e.g. speaks a phrase, even if it is not a recognized choice), the interaction becomes strictly, and irreversibly, a VR_ONLY interaction (i.e. the MANUAL_ONLY mode forms of interaction will no longer be honored)
*
* The TriggerSource parameter of the *PerformInteraction* response will indicate which interaction mode the user finally chose to attempt the selection (even if the interaction did not end with a selection being made)
- *
- * @return Current Interaction Mode with value of *BOTH*
*/
-+ (SDLInteractionMode *)BOTH;
-
-@end
+extern SDLInteractionMode const SDLInteractionModeBoth;
diff --git a/SmartDeviceLink/SDLInteractionMode.m b/SmartDeviceLink/SDLInteractionMode.m
index 07dc5f7b2..5baf0f14c 100644
--- a/SmartDeviceLink/SDLInteractionMode.m
+++ b/SmartDeviceLink/SDLInteractionMode.m
@@ -4,53 +4,6 @@
#import "SDLInteractionMode.h"
-SDLInteractionMode *SDLInteractionMode_MANUAL_ONLY = nil;
-SDLInteractionMode *SDLInteractionMode_VR_ONLY = nil;
-SDLInteractionMode *SDLInteractionMode_BOTH = nil;
-
-NSArray *SDLInteractionMode_values = nil;
-
-@implementation SDLInteractionMode
-
-+ (SDLInteractionMode *)valueOf:(NSString *)value {
- for (SDLInteractionMode *item in SDLInteractionMode.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLInteractionMode_values == nil) {
- SDLInteractionMode_values = @[
- SDLInteractionMode.MANUAL_ONLY,
- SDLInteractionMode.VR_ONLY,
- SDLInteractionMode.BOTH,
- ];
- }
- return SDLInteractionMode_values;
-}
-
-+ (SDLInteractionMode *)MANUAL_ONLY {
- if (SDLInteractionMode_MANUAL_ONLY == nil) {
- SDLInteractionMode_MANUAL_ONLY = [[SDLInteractionMode alloc] initWithValue:@"MANUAL_ONLY"];
- }
- return SDLInteractionMode_MANUAL_ONLY;
-}
-
-+ (SDLInteractionMode *)VR_ONLY {
- if (SDLInteractionMode_VR_ONLY == nil) {
- SDLInteractionMode_VR_ONLY = [[SDLInteractionMode alloc] initWithValue:@"VR_ONLY"];
- }
- return SDLInteractionMode_VR_ONLY;
-}
-
-+ (SDLInteractionMode *)BOTH {
- if (SDLInteractionMode_BOTH == nil) {
- SDLInteractionMode_BOTH = [[SDLInteractionMode alloc] initWithValue:@"BOTH"];
- }
- return SDLInteractionMode_BOTH;
-}
-
-@end
+SDLInteractionMode const SDLInteractionModeManualOnly = @"MANUAL_ONLY";
+SDLInteractionMode const SDLInteractionModeVrOnly = @"VR_ONLY";
+SDLInteractionMode const SDLInteractionModeBoth = @"BOTH";
diff --git a/SmartDeviceLink/SDLKeyboardEvent.h b/SmartDeviceLink/SDLKeyboardEvent.h
index f0d90530e..958d417e3 100644
--- a/SmartDeviceLink/SDLKeyboardEvent.h
+++ b/SmartDeviceLink/SDLKeyboardEvent.h
@@ -9,37 +9,29 @@
* @since SmartDeviceLink 3.0
*
*/
-@interface SDLKeyboardEvent : SDLEnum {
-}
-
-+ (SDLKeyboardEvent *)valueOf:(NSString *)value;
-+ (NSArray *)values;
+typedef SDLEnum SDLKeyboardEvent NS_EXTENSIBLE_STRING_ENUM;
/** The use has pressed the keyboard key (applies to both SINGLE_KEYPRESS and RESEND_CURRENT_ENTRY modes).
*
*/
-+ (SDLKeyboardEvent *)KEYPRESS;
+extern SDLKeyboardEvent const SDLKeyboardEventKeypress;
/** The User has finished entering text from the keyboard and submitted the entry.
*
*/
-
-+ (SDLKeyboardEvent *)ENTRY_SUBMITTED;
+extern SDLKeyboardEvent const SDLKeyboardEventEntrySubmitted;
/** The User has pressed the HMI-defined "Cancel" button.
*
*/
-+ (SDLKeyboardEvent *)ENTRY_CANCELLED;
-
+extern SDLKeyboardEvent const SDLKeyboardEventEntryCancelled;
/** The User has not finished entering text and the keyboard is aborted with the event of higher priority.
*
*/
-+ (SDLKeyboardEvent *)ENTRY_ABORTED;
+extern SDLKeyboardEvent const SDLKeyboardEventEntryAborted;
/**
* @since SDL 4.0
*/
-+ (SDLKeyboardEvent *)ENTRY_VOICE;
-
-@end
+extern SDLKeyboardEvent const SDLKeyboardEventEntryVoice;
diff --git a/SmartDeviceLink/SDLKeyboardEvent.m b/SmartDeviceLink/SDLKeyboardEvent.m
index 65a7d8e89..bd52c3462 100644
--- a/SmartDeviceLink/SDLKeyboardEvent.m
+++ b/SmartDeviceLink/SDLKeyboardEvent.m
@@ -4,71 +4,8 @@
#import "SDLKeyboardEvent.h"
-SDLKeyboardEvent *SDLKeyboardEvent_KEYPRESS = nil;
-SDLKeyboardEvent *SDLKeyboardEvent_ENTRY_SUBMITTED = nil;
-SDLKeyboardEvent *SDLKeyboardEvent_ENTRY_CANCELLED = nil;
-SDLKeyboardEvent *SDLKeyboardEvent_ENTRY_ABORTED = nil;
-SDLKeyboardEvent *SDLKeyboardEvent_ENTRY_VOICE = nil;
-
-NSArray *SDLKeyboardEvent_values = nil;
-
-@implementation SDLKeyboardEvent
-
-+ (SDLKeyboardEvent *)valueOf:(NSString *)value {
- for (SDLKeyboardEvent *item in SDLKeyboardEvent.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLKeyboardEvent_values == nil) {
- SDLKeyboardEvent_values = @[
- SDLKeyboardEvent.KEYPRESS,
- SDLKeyboardEvent.ENTRY_SUBMITTED,
- SDLKeyboardEvent.ENTRY_CANCELLED,
- SDLKeyboardEvent.ENTRY_ABORTED,
- SDLKeyboardEvent.ENTRY_VOICE,
- ];
- }
- return SDLKeyboardEvent_values;
-}
-
-+ (SDLKeyboardEvent *)KEYPRESS {
- if (SDLKeyboardEvent_KEYPRESS == nil) {
- SDLKeyboardEvent_KEYPRESS = [[SDLKeyboardEvent alloc] initWithValue:@"KEYPRESS"];
- }
- return SDLKeyboardEvent_KEYPRESS;
-}
-
-+ (SDLKeyboardEvent *)ENTRY_SUBMITTED {
- if (SDLKeyboardEvent_ENTRY_SUBMITTED == nil) {
- SDLKeyboardEvent_ENTRY_SUBMITTED = [[SDLKeyboardEvent alloc] initWithValue:@"ENTRY_SUBMITTED"];
- }
- return SDLKeyboardEvent_ENTRY_SUBMITTED;
-}
-
-+ (SDLKeyboardEvent *)ENTRY_CANCELLED {
- if (SDLKeyboardEvent_ENTRY_CANCELLED == nil) {
- SDLKeyboardEvent_ENTRY_CANCELLED = [[SDLKeyboardEvent alloc] initWithValue:@"ENTRY_CANCELLED"];
- }
- return SDLKeyboardEvent_ENTRY_CANCELLED;
-}
-
-+ (SDLKeyboardEvent *)ENTRY_ABORTED {
- if (SDLKeyboardEvent_ENTRY_ABORTED == nil) {
- SDLKeyboardEvent_ENTRY_ABORTED = [[SDLKeyboardEvent alloc] initWithValue:@"ENTRY_ABORTED"];
- }
- return SDLKeyboardEvent_ENTRY_ABORTED;
-}
-
-+ (SDLKeyboardEvent *)ENTRY_VOICE {
- if (SDLKeyboardEvent_ENTRY_VOICE == nil) {
- SDLKeyboardEvent_ENTRY_VOICE = [[SDLKeyboardEvent alloc] initWithValue:@"ENTRY_VOICE"];
- }
- return SDLKeyboardEvent_ENTRY_VOICE;
-}
-
-@end
+SDLKeyboardEvent const SDLKeyboardEventKeypress = @"KEYPRESS";
+SDLKeyboardEvent const SDLKeyboardEventEntrySubmitted = @"ENTRY_SUBMITTED";
+SDLKeyboardEvent const SDLKeyboardEventEntryCancelled = @"ENTRY_CANCELLED";
+SDLKeyboardEvent const SDLKeyboardEventEntryAborted = @"ENTRY_ABORTED";
+SDLKeyboardEvent const SDLKeyboardEventEntryVoice = @"ENTRY_VOICE";
diff --git a/SmartDeviceLink/SDLKeyboardLayout.h b/SmartDeviceLink/SDLKeyboardLayout.h
index 042caf9d0..c559c5d1c 100644
--- a/SmartDeviceLink/SDLKeyboardLayout.h
+++ b/SmartDeviceLink/SDLKeyboardLayout.h
@@ -9,25 +9,19 @@
*<b>Since</b> SmartDeviceLink 3.0
*
*/
-@interface SDLKeyboardLayout : SDLEnum {
-}
+typedef SDLEnum SDLKeyboardLayout NS_EXTENSIBLE_STRING_ENUM;
-+ (SDLKeyboardLayout *)valueOf:(NSString *)value;
-+ (NSArray *)values;
/** QWERTY layout (the name comes from the first six keys<br> appearing on the top left letter row of the keyboard and read from left to right)
*
*/
-+ (SDLKeyboardLayout *)QWERTY;
+extern SDLKeyboardLayout const SDLKeyboardLayoutQwerty;
/** QWERTZ layout (the name comes from the first six keys<br> appearing on the top left letter row of the keyboard and read from left to right)
*
*/
-+ (SDLKeyboardLayout *)QWERTZ;
+extern SDLKeyboardLayout const SDLKeyboardLayoutQwertz;
/** AZERTY layout (the name comes from the first six keys<br> appearing on the top left letter row of the keyboard and read from left to right)
*
*/
-
-+ (SDLKeyboardLayout *)AZERTY;
-
-@end
+extern SDLKeyboardLayout const SDLKeyboardLayoutAzerty;
diff --git a/SmartDeviceLink/SDLKeyboardLayout.m b/SmartDeviceLink/SDLKeyboardLayout.m
index 700bd2622..4cf5ef8ca 100644
--- a/SmartDeviceLink/SDLKeyboardLayout.m
+++ b/SmartDeviceLink/SDLKeyboardLayout.m
@@ -4,53 +4,6 @@
#import "SDLKeyboardLayout.h"
-SDLKeyboardLayout *SDLKeyboardLayout_QWERTY = nil;
-SDLKeyboardLayout *SDLKeyboardLayout_QWERTZ = nil;
-SDLKeyboardLayout *SDLKeyboardLayout_AZERTY = nil;
-
-NSArray *SDLKeyboardLayout_values = nil;
-
-@implementation SDLKeyboardLayout
-
-+ (SDLKeyboardLayout *)valueOf:(NSString *)value {
- for (SDLKeyboardLayout *item in SDLKeyboardLayout.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLKeyboardLayout_values == nil) {
- SDLKeyboardLayout_values = @[
- SDLKeyboardLayout.QWERTY,
- SDLKeyboardLayout.QWERTZ,
- SDLKeyboardLayout.AZERTY,
- ];
- }
- return SDLKeyboardLayout_values;
-}
-
-+ (SDLKeyboardLayout *)QWERTY {
- if (SDLKeyboardLayout_QWERTY == nil) {
- SDLKeyboardLayout_QWERTY = [[SDLKeyboardLayout alloc] initWithValue:@"QWERTY"];
- }
- return SDLKeyboardLayout_QWERTY;
-}
-
-+ (SDLKeyboardLayout *)QWERTZ {
- if (SDLKeyboardLayout_QWERTZ == nil) {
- SDLKeyboardLayout_QWERTZ = [[SDLKeyboardLayout alloc] initWithValue:@"QWERTZ"];
- }
- return SDLKeyboardLayout_QWERTZ;
-}
-
-+ (SDLKeyboardLayout *)AZERTY {
- if (SDLKeyboardLayout_AZERTY == nil) {
- SDLKeyboardLayout_AZERTY = [[SDLKeyboardLayout alloc] initWithValue:@"AZERTY"];
- }
- return SDLKeyboardLayout_AZERTY;
-}
-
-@end
+SDLKeyboardLayout const SDLKeyboardLayoutQwerty = @"QWERTY";
+SDLKeyboardLayout const SDLKeyboardLayoutQwertz = @"QWERTZ";
+SDLKeyboardLayout const SDLKeyboardLayoutAzerty = @"AZERTY";
diff --git a/SmartDeviceLink/SDLKeyboardProperties.h b/SmartDeviceLink/SDLKeyboardProperties.h
index 8215a8938..b9532e9bf 100644
--- a/SmartDeviceLink/SDLKeyboardProperties.h
+++ b/SmartDeviceLink/SDLKeyboardProperties.h
@@ -3,9 +3,9 @@
#import "SDLRPCMessage.h"
-@class SDLLanguage;
-@class SDLKeyboardLayout;
-@class SDLKeypressMode;
+#import "SDLLanguage.h"
+#import "SDLKeyboardLayout.h"
+#import "SDLKeypressMode.h"
@interface SDLKeyboardProperties : SDLRPCStruct {
@@ -14,9 +14,9 @@
- (instancetype)init;
- (instancetype)initWithDictionary:(NSMutableDictionary *)dict;
-@property (strong) SDLLanguage *language;
-@property (strong) SDLKeyboardLayout *keyboardLayout;
-@property (strong) SDLKeypressMode *keypressMode;
+@property (strong) SDLLanguage language;
+@property (strong) SDLKeyboardLayout keyboardLayout;
+@property (strong) SDLKeypressMode keypressMode;
@property (strong) NSMutableArray *limitedCharacterList;
@property (strong) NSString *autoCompleteText;
diff --git a/SmartDeviceLink/SDLKeyboardProperties.m b/SmartDeviceLink/SDLKeyboardProperties.m
index 896f3a99a..c9a18180f 100644
--- a/SmartDeviceLink/SDLKeyboardProperties.m
+++ b/SmartDeviceLink/SDLKeyboardProperties.m
@@ -3,12 +3,8 @@
#import "SDLKeyboardProperties.h"
-#import "SDLKeyboardLayout.h"
-#import "SDLKeypressMode.h"
-#import "SDLLanguage.h"
#import "SDLNames.h"
-
@implementation SDLKeyboardProperties
- (instancetype)init {
@@ -23,7 +19,7 @@
return self;
}
-- (void)setLanguage:(SDLLanguage *)language {
+- (void)setLanguage:(SDLLanguage)language {
if (language != nil) {
[store setObject:language forKey:NAMES_language];
} else {
@@ -31,16 +27,12 @@
}
}
-- (SDLLanguage *)language {
+- (SDLLanguage)language {
NSObject *obj = [store objectForKey:NAMES_language];
- if (obj == nil || [obj isKindOfClass:SDLLanguage.class]) {
- return (SDLLanguage *)obj;
- } else {
- return [SDLLanguage valueOf:(NSString *)obj];
- }
+ return (SDLLanguage )obj;
}
-- (void)setKeyboardLayout:(SDLKeyboardLayout *)keyboardLayout {
+- (void)setKeyboardLayout:(SDLKeyboardLayout)keyboardLayout {
if (keyboardLayout != nil) {
[store setObject:keyboardLayout forKey:NAMES_keyboardLayout];
} else {
@@ -48,16 +40,12 @@
}
}
-- (SDLKeyboardLayout *)keyboardLayout {
+- (SDLKeyboardLayout)keyboardLayout {
NSObject *obj = [store objectForKey:NAMES_keyboardLayout];
- if (obj == nil || [obj isKindOfClass:SDLKeyboardLayout.class]) {
- return (SDLKeyboardLayout *)obj;
- } else {
- return [SDLKeyboardLayout valueOf:(NSString *)obj];
- }
+ return (SDLKeyboardLayout)obj;
}
-- (void)setKeypressMode:(SDLKeypressMode *)keypressMode {
+- (void)setKeypressMode:(SDLKeypressMode)keypressMode {
if (keypressMode != nil) {
[store setObject:keypressMode forKey:NAMES_keypressMode];
} else {
@@ -65,13 +53,9 @@
}
}
-- (SDLKeypressMode *)keypressMode {
+- (SDLKeypressMode)keypressMode {
NSObject *obj = [store objectForKey:NAMES_keypressMode];
- if (obj == nil || [obj isKindOfClass:SDLKeypressMode.class]) {
- return (SDLKeypressMode *)obj;
- } else {
- return [SDLKeypressMode valueOf:(NSString *)obj];
- }
+ return (SDLKeypressMode)obj;
}
- (void)setLimitedCharacterList:(NSMutableArray *)limitedCharacterList {
diff --git a/SmartDeviceLink/SDLKeypressMode.h b/SmartDeviceLink/SDLKeypressMode.h
index 1b4ad0fe1..55a9edcd1 100644
--- a/SmartDeviceLink/SDLKeypressMode.h
+++ b/SmartDeviceLink/SDLKeypressMode.h
@@ -11,25 +11,19 @@
* @since SmartDeviceLink 3.0
*
*/
-@interface SDLKeypressMode : SDLEnum {
-}
-
-+ (SDLKeypressMode *)valueOf:(NSString *)value;
-+ (NSArray *)values;
+typedef SDLEnum SDLKeypressMode NS_EXTENSIBLE_STRING_ENUM;
/** SINGLE_KEYPRESS:<br>Each and every User`s keypress must be reported (new notification for every newly entered single symbol).
*
*/
-+ (SDLKeypressMode *)SINGLE_KEYPRESS;
+extern SDLKeypressMode const SDLKeypressModeSingleKeypress;
/** QUEUE_KEYPRESSES:<br>The whole entry is reported only after the User submits it (by ‘Search’ button click displayed on touchscreen keyboard)
*
*/
-+ (SDLKeypressMode *)QUEUE_KEYPRESSES;
+extern SDLKeypressMode const SDLKeypressModeQueueKeypresses;
/** RESEND_CURRENT_ENTRY:<br>The whole entry must be reported each and every time the User makes a new keypress<br> (new notification with all previously entered symbols and a newly entered one appended).
*
*/
-+ (SDLKeypressMode *)RESEND_CURRENT_ENTRY;
-
-@end
+extern SDLKeypressMode const SDLKeypressModeResentCurrentEntry;
diff --git a/SmartDeviceLink/SDLKeypressMode.m b/SmartDeviceLink/SDLKeypressMode.m
index 9fa0034e7..66cab110e 100644
--- a/SmartDeviceLink/SDLKeypressMode.m
+++ b/SmartDeviceLink/SDLKeypressMode.m
@@ -4,53 +4,6 @@
#import "SDLKeypressMode.h"
-SDLKeypressMode *SDLKeypressMode_SINGLE_KEYPRESS = nil;
-SDLKeypressMode *SDLKeypressMode_QUEUE_KEYPRESSES = nil;
-SDLKeypressMode *SDLKeypressMode_RESEND_CURRENT_ENTRY = nil;
-
-NSArray *SDLKeypressMode_values = nil;
-
-@implementation SDLKeypressMode
-
-+ (SDLKeypressMode *)valueOf:(NSString *)value {
- for (SDLKeypressMode *item in SDLKeypressMode.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLKeypressMode_values == nil) {
- SDLKeypressMode_values = @[
- SDLKeypressMode.SINGLE_KEYPRESS,
- SDLKeypressMode.QUEUE_KEYPRESSES,
- SDLKeypressMode.RESEND_CURRENT_ENTRY,
- ];
- }
- return SDLKeypressMode_values;
-}
-
-+ (SDLKeypressMode *)SINGLE_KEYPRESS {
- if (SDLKeypressMode_SINGLE_KEYPRESS == nil) {
- SDLKeypressMode_SINGLE_KEYPRESS = [[SDLKeypressMode alloc] initWithValue:@"SINGLE_KEYPRESS"];
- }
- return SDLKeypressMode_SINGLE_KEYPRESS;
-}
-
-+ (SDLKeypressMode *)QUEUE_KEYPRESSES {
- if (SDLKeypressMode_QUEUE_KEYPRESSES == nil) {
- SDLKeypressMode_QUEUE_KEYPRESSES = [[SDLKeypressMode alloc] initWithValue:@"QUEUE_KEYPRESSES"];
- }
- return SDLKeypressMode_QUEUE_KEYPRESSES;
-}
-
-+ (SDLKeypressMode *)RESEND_CURRENT_ENTRY {
- if (SDLKeypressMode_RESEND_CURRENT_ENTRY == nil) {
- SDLKeypressMode_RESEND_CURRENT_ENTRY = [[SDLKeypressMode alloc] initWithValue:@"RESEND_CURRENT_ENTRY"];
- }
- return SDLKeypressMode_RESEND_CURRENT_ENTRY;
-}
-
-@end
+SDLKeypressMode const SDLKeypressModeSingleKeypress = @"SINGLE_KEYPRESS";
+SDLKeypressMode const SDLKeypressModeQueueKeypresses = @"QUEUE_KEYPRESSES";
+SDLKeypressMode const SDLKeypressModeResentCurrentEntry = @"RESEND_CURRENT_ENTRY";
diff --git a/SmartDeviceLink/SDLLanguage.h b/SmartDeviceLink/SDLLanguage.h
index 38d63746b..570e587c5 100644
--- a/SmartDeviceLink/SDLLanguage.h
+++ b/SmartDeviceLink/SDLLanguage.h
@@ -9,142 +9,124 @@
*
* @since SDL 1.0
*/
-@interface SDLLanguage : SDLEnum {
-}
+typedef SDLEnum SDLLanguage NS_EXTENSIBLE_STRING_ENUM;
-/**
- * @abstract Get a Langusge according to a String
- *
- * @param value The value of the string to get an object for
- *
- * @return The Language
- */
-+ (SDLLanguage *)valueOf:(NSString *)value;
-
-/**
- * @abstract store all possible Language values
- *
- * @return an array with all possible Language values inside
- */
-+ (NSArray *)values;
/*!
@abstract English_US
*/
-+ (SDLLanguage *)EN_US;
+extern SDLLanguage const SDLLanguageEnUs;
/**
@abstract Spanish - Mexico
*/
-+ (SDLLanguage *)ES_MX;
+extern SDLLanguage const SDLLanguageEsMx;
/**
* @abstract French - Canada
*/
-+ (SDLLanguage *)FR_CA;
+extern SDLLanguage const SDLLanguageFrCa;
/**
* @abstract German - Germany
*/
-+ (SDLLanguage *)DE_DE;
+extern SDLLanguage const SDLLanguageDeDe;
/**
* @abstract Spanish - Spain
*/
-+ (SDLLanguage *)ES_ES;
+extern SDLLanguage const SDLLanguageEsEs;
/**
@abstract English - Great Britain
*/
-+ (SDLLanguage *)EN_GB;
+extern SDLLanguage const SDLLanguageEnGb;
/**
* @abstract Russian - Russia
*/
-+ (SDLLanguage *)RU_RU;
+extern SDLLanguage const SDLLanguageRuRu;
/**
* @abstract Turkish - Turkey
*/
-+ (SDLLanguage *)TR_TR;
+extern SDLLanguage const SDLLanguageTrTr;
/**
* @abstract Polish - Poland
*/
-+ (SDLLanguage *)PL_PL;
+extern SDLLanguage const SDLLanguagePlPl;
/**
* @abstract French - France
*/
-+ (SDLLanguage *)FR_FR;
+extern SDLLanguage const SDLLanguageFrFr;
/**
* @abstract Italian - Italy
*/
-+ (SDLLanguage *)IT_IT;
+extern SDLLanguage const SDLLanguageItIt;
/**
* @abstract Swedish - Sweden
*/
-+ (SDLLanguage *)SV_SE;
+extern SDLLanguage const SDLLanguageSvSe;
/**
* @abstract Portuguese - Portugal
*/
-+ (SDLLanguage *)PT_PT;
+extern SDLLanguage const SDLLanguagePtPt;
/**
* @abstract Dutch (Standard) - Netherlands
*/
-+ (SDLLanguage *)NL_NL;
+extern SDLLanguage const SDLLanguageNlNl;
/**
* @abstract English - Australia
*/
-+ (SDLLanguage *)EN_AU;
+extern SDLLanguage const SDLLanguageEnAu;
/**
* @abstract Mandarin - China
*/
-+ (SDLLanguage *)ZH_CN;
+extern SDLLanguage const SDLLanguageZhCn;
/**
* @abstract Mandarin - Taiwan
*/
-+ (SDLLanguage *)ZH_TW;
+extern SDLLanguage const SDLLanguageZhTw;
/**
* @abstract Japanese - Japan
*/
-+ (SDLLanguage *)JA_JP;
+extern SDLLanguage const SDLLanguageJaJp;
/**
* @abstract Arabic - Saudi Arabia
*/
-+ (SDLLanguage *)AR_SA;
+extern SDLLanguage const SDLLanguageArSa;
/**
* @abstract Korean - South Korea
*/
-+ (SDLLanguage *)KO_KR;
+extern SDLLanguage const SDLLanguageKoKr;
/**
* @abstract Portuguese - Brazil
*/
-+ (SDLLanguage *)PT_BR;
+extern SDLLanguage const SDLLanguagePtBr;
/**
* @abstract Czech - Czech Republic
*/
-+ (SDLLanguage *)CS_CZ;
+extern SDLLanguage const SDLLanguageCsCz;
/**
* @abstract Danish - Denmark
*/
-+ (SDLLanguage *)DA_DK;
+extern SDLLanguage const SDLLanguageDaDk;
/**
* @abstract Norwegian - Norway
*/
-+ (SDLLanguage *)NO_NO;
-
-@end
+extern SDLLanguage const SDLLanguageNoNo;
diff --git a/SmartDeviceLink/SDLLanguage.m b/SmartDeviceLink/SDLLanguage.m
index df43adf4c..11ac28ad8 100644
--- a/SmartDeviceLink/SDLLanguage.m
+++ b/SmartDeviceLink/SDLLanguage.m
@@ -4,242 +4,27 @@
#import "SDLLanguage.h"
-SDLLanguage *SDLLanguage_EN_US = nil;
-SDLLanguage *SDLLanguage_ES_MX = nil;
-SDLLanguage *SDLLanguage_FR_CA = nil;
-SDLLanguage *SDLLanguage_DE_DE = nil;
-SDLLanguage *SDLLanguage_ES_ES = nil;
-SDLLanguage *SDLLanguage_EN_GB = nil;
-SDLLanguage *SDLLanguage_RU_RU = nil;
-SDLLanguage *SDLLanguage_TR_TR = nil;
-SDLLanguage *SDLLanguage_PL_PL = nil;
-SDLLanguage *SDLLanguage_FR_FR = nil;
-SDLLanguage *SDLLanguage_IT_IT = nil;
-SDLLanguage *SDLLanguage_SV_SE = nil;
-SDLLanguage *SDLLanguage_PT_PT = nil;
-SDLLanguage *SDLLanguage_NL_NL = nil;
-SDLLanguage *SDLLanguage_EN_AU = nil;
-SDLLanguage *SDLLanguage_ZH_CN = nil;
-SDLLanguage *SDLLanguage_ZH_TW = nil;
-SDLLanguage *SDLLanguage_JA_JP = nil;
-SDLLanguage *SDLLanguage_AR_SA = nil;
-SDLLanguage *SDLLanguage_KO_KR = nil;
-SDLLanguage *SDLLanguage_PT_BR = nil;
-SDLLanguage *SDLLanguage_CS_CZ = nil;
-SDLLanguage *SDLLanguage_DA_DK = nil;
-SDLLanguage *SDLLanguage_NO_NO = nil;
-
-NSArray *SDLLanguage_values = nil;
-
-@implementation SDLLanguage
-
-+ (SDLLanguage *)valueOf:(NSString *)value {
- for (SDLLanguage *item in SDLLanguage.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLLanguage_values == nil) {
- SDLLanguage_values = @[
- SDLLanguage.EN_US,
- SDLLanguage.ES_MX,
- SDLLanguage.FR_CA,
- SDLLanguage.DE_DE,
- SDLLanguage.ES_ES,
- SDLLanguage.EN_GB,
- SDLLanguage.RU_RU,
- SDLLanguage.TR_TR,
- SDLLanguage.PL_PL,
- SDLLanguage.FR_FR,
- SDLLanguage.IT_IT,
- SDLLanguage.SV_SE,
- SDLLanguage.PT_PT,
- SDLLanguage.NL_NL,
- SDLLanguage.EN_AU,
- SDLLanguage.ZH_CN,
- SDLLanguage.ZH_TW,
- SDLLanguage.JA_JP,
- SDLLanguage.AR_SA,
- SDLLanguage.KO_KR,
- SDLLanguage.PT_BR,
- SDLLanguage.CS_CZ,
- SDLLanguage.DA_DK,
- SDLLanguage.NO_NO,
- ];
- }
- return SDLLanguage_values;
-}
-
-+ (SDLLanguage *)EN_US {
- if (SDLLanguage_EN_US == nil) {
- SDLLanguage_EN_US = [[SDLLanguage alloc] initWithValue:@"EN-US"];
- }
- return SDLLanguage_EN_US;
-}
-
-+ (SDLLanguage *)ES_MX {
- if (SDLLanguage_ES_MX == nil) {
- SDLLanguage_ES_MX = [[SDLLanguage alloc] initWithValue:@"ES-MX"];
- }
- return SDLLanguage_ES_MX;
-}
-
-+ (SDLLanguage *)FR_CA {
- if (SDLLanguage_FR_CA == nil) {
- SDLLanguage_FR_CA = [[SDLLanguage alloc] initWithValue:@"FR-CA"];
- }
- return SDLLanguage_FR_CA;
-}
-
-+ (SDLLanguage *)DE_DE {
- if (SDLLanguage_DE_DE == nil) {
- SDLLanguage_DE_DE = [[SDLLanguage alloc] initWithValue:@"DE-DE"];
- }
- return SDLLanguage_DE_DE;
-}
-
-+ (SDLLanguage *)ES_ES {
- if (SDLLanguage_ES_ES == nil) {
- SDLLanguage_ES_ES = [[SDLLanguage alloc] initWithValue:@"ES-ES"];
- }
- return SDLLanguage_ES_ES;
-}
-
-+ (SDLLanguage *)EN_GB {
- if (SDLLanguage_EN_GB == nil) {
- SDLLanguage_EN_GB = [[SDLLanguage alloc] initWithValue:@"EN-GB"];
- }
- return SDLLanguage_EN_GB;
-}
-
-+ (SDLLanguage *)RU_RU {
- if (SDLLanguage_RU_RU == nil) {
- SDLLanguage_RU_RU = [[SDLLanguage alloc] initWithValue:@"RU-RU"];
- }
- return SDLLanguage_RU_RU;
-}
-
-+ (SDLLanguage *)TR_TR {
- if (SDLLanguage_TR_TR == nil) {
- SDLLanguage_TR_TR = [[SDLLanguage alloc] initWithValue:@"TR-TR"];
- }
- return SDLLanguage_TR_TR;
-}
-
-+ (SDLLanguage *)PL_PL {
- if (SDLLanguage_PL_PL == nil) {
- SDLLanguage_PL_PL = [[SDLLanguage alloc] initWithValue:@"PL-PL"];
- }
- return SDLLanguage_PL_PL;
-}
-
-+ (SDLLanguage *)FR_FR {
- if (SDLLanguage_FR_FR == nil) {
- SDLLanguage_FR_FR = [[SDLLanguage alloc] initWithValue:@"FR-FR"];
- }
- return SDLLanguage_FR_FR;
-}
-
-+ (SDLLanguage *)IT_IT {
- if (SDLLanguage_IT_IT == nil) {
- SDLLanguage_IT_IT = [[SDLLanguage alloc] initWithValue:@"IT-IT"];
- }
- return SDLLanguage_IT_IT;
-}
-
-+ (SDLLanguage *)SV_SE {
- if (SDLLanguage_SV_SE == nil) {
- SDLLanguage_SV_SE = [[SDLLanguage alloc] initWithValue:@"SV-SE"];
- }
- return SDLLanguage_SV_SE;
-}
-
-+ (SDLLanguage *)PT_PT {
- if (SDLLanguage_PT_PT == nil) {
- SDLLanguage_PT_PT = [[SDLLanguage alloc] initWithValue:@"PT-PT"];
- }
- return SDLLanguage_PT_PT;
-}
-
-+ (SDLLanguage *)NL_NL {
- if (SDLLanguage_NL_NL == nil) {
- SDLLanguage_NL_NL = [[SDLLanguage alloc] initWithValue:@"NL-NL"];
- }
- return SDLLanguage_NL_NL;
-}
-
-+ (SDLLanguage *)EN_AU {
- if (SDLLanguage_EN_AU == nil) {
- SDLLanguage_EN_AU = [[SDLLanguage alloc] initWithValue:@"EN-AU"];
- }
- return SDLLanguage_EN_AU;
-}
-
-+ (SDLLanguage *)ZH_CN {
- if (SDLLanguage_ZH_CN == nil) {
- SDLLanguage_ZH_CN = [[SDLLanguage alloc] initWithValue:@"ZH-CN"];
- }
- return SDLLanguage_ZH_CN;
-}
-
-+ (SDLLanguage *)ZH_TW {
- if (SDLLanguage_ZH_TW == nil) {
- SDLLanguage_ZH_TW = [[SDLLanguage alloc] initWithValue:@"ZH-TW"];
- }
- return SDLLanguage_ZH_TW;
-}
-
-+ (SDLLanguage *)JA_JP {
- if (SDLLanguage_JA_JP == nil) {
- SDLLanguage_JA_JP = [[SDLLanguage alloc] initWithValue:@"JA-JP"];
- }
- return SDLLanguage_JA_JP;
-}
-
-+ (SDLLanguage *)AR_SA {
- if (SDLLanguage_AR_SA == nil) {
- SDLLanguage_AR_SA = [[SDLLanguage alloc] initWithValue:@"AR-SA"];
- }
- return SDLLanguage_AR_SA;
-}
-
-+ (SDLLanguage *)KO_KR {
- if (SDLLanguage_KO_KR == nil) {
- SDLLanguage_KO_KR = [[SDLLanguage alloc] initWithValue:@"KO-KR"];
- }
- return SDLLanguage_KO_KR;
-}
-
-+ (SDLLanguage *)PT_BR {
- if (SDLLanguage_PT_BR == nil) {
- SDLLanguage_PT_BR = [[SDLLanguage alloc] initWithValue:@"PT-BR"];
- }
- return SDLLanguage_PT_BR;
-}
-
-+ (SDLLanguage *)CS_CZ {
- if (SDLLanguage_CS_CZ == nil) {
- SDLLanguage_CS_CZ = [[SDLLanguage alloc] initWithValue:@"CS-CZ"];
- }
- return SDLLanguage_CS_CZ;
-}
-
-+ (SDLLanguage *)DA_DK {
- if (SDLLanguage_DA_DK == nil) {
- SDLLanguage_DA_DK = [[SDLLanguage alloc] initWithValue:@"DA-DK"];
- }
- return SDLLanguage_DA_DK;
-}
-
-+ (SDLLanguage *)NO_NO {
- if (SDLLanguage_NO_NO == nil) {
- SDLLanguage_NO_NO = [[SDLLanguage alloc] initWithValue:@"NO-NO"];
- }
- return SDLLanguage_NO_NO;
-}
-
-@end
+SDLLanguage const SDLLanguageEnUs = @"EN_US";
+SDLLanguage const SDLLanguageEsMx = @"ES_MX";
+SDLLanguage const SDLLanguageFrCa = @"FR_CA";
+SDLLanguage const SDLLanguageDeDe = @"DE_DE";
+SDLLanguage const SDLLanguageEsEs = @"ES_ES";
+SDLLanguage const SDLLanguageEnGb = @"EN_GB";
+SDLLanguage const SDLLanguageRuRu = @"RU_RU";
+SDLLanguage const SDLLanguageTrTr = @"TR_TR";
+SDLLanguage const SDLLanguagePlPl = @"PL_PL";
+SDLLanguage const SDLLanguageFrFr = @"FR_FR";
+SDLLanguage const SDLLanguageItIt = @"IT_IT";
+SDLLanguage const SDLLanguageSvSe = @"SV_SE";
+SDLLanguage const SDLLanguagePtPt = @"PT_PT";
+SDLLanguage const SDLLanguageNlNl = @"NL_NL";
+SDLLanguage const SDLLanguageEnAu = @"EN_AU";
+SDLLanguage const SDLLanguageZhCn = @"ZH_CN";
+SDLLanguage const SDLLanguageZhTw = @"ZH_TW";
+SDLLanguage const SDLLanguageJaJp = @"JA_JP";
+SDLLanguage const SDLLanguageArSa = @"AR_SA";
+SDLLanguage const SDLLanguageKoKr = @"KO_KR";
+SDLLanguage const SDLLanguagePtBr = @"PT_BR";
+SDLLanguage const SDLLanguageCsCz = @"CS_CZ";
+SDLLanguage const SDLLanguageDaDk = @"DA_DK";
+SDLLanguage const SDLLanguageNoNo = @"NO_NO";
diff --git a/SmartDeviceLink/SDLLayoutMode.h b/SmartDeviceLink/SDLLayoutMode.h
index 9e0377f40..9b9cbfa2b 100644
--- a/SmartDeviceLink/SDLLayoutMode.h
+++ b/SmartDeviceLink/SDLLayoutMode.h
@@ -9,35 +9,29 @@
*
* @since SDL 3.0
*/
-@interface SDLLayoutMode : SDLEnum {
-}
+typedef SDLEnum SDLLayoutMode NS_EXTENSIBLE_STRING_ENUM;
-+ (SDLLayoutMode *)valueOf:(NSString *)value;
-+ (NSArray *)values;
-
-/**
+/**
* This mode causes the interaction to display the previous set of choices as icons.
*/
-+ (SDLLayoutMode *)ICON_ONLY;
+extern SDLLayoutMode const SDLLayoutModeIconOnly;
/**
* This mode causes the interaction to display the previous set of choices as icons along with a search field in the HMI.
*/
-+ (SDLLayoutMode *)ICON_WITH_SEARCH;
+extern SDLLayoutMode const SDLLayoutModeIconWithSearch;
/**
* This mode causes the interaction to display the previous set of choices as a list.
*/
-+ (SDLLayoutMode *)LIST_ONLY;
+extern SDLLayoutMode const SDLLayoutModeListOnly;
/**
* This mode causes the interaction to display the previous set of choices as a list along with a search field in the HMI.
*/
-+ (SDLLayoutMode *)LIST_WITH_SEARCH;
+extern SDLLayoutMode const SDLLayoutModeListWithSearch;
/**
* This mode causes the interaction to immediately display a keyboard entry through the HMI.
*/
-+ (SDLLayoutMode *)KEYBOARD;
-
-@end
+extern SDLLayoutMode const SDLLayoutModeKeyboard;
diff --git a/SmartDeviceLink/SDLLayoutMode.m b/SmartDeviceLink/SDLLayoutMode.m
index 343f06a0f..766b5ccfb 100644
--- a/SmartDeviceLink/SDLLayoutMode.m
+++ b/SmartDeviceLink/SDLLayoutMode.m
@@ -4,71 +4,8 @@
#import "SDLLayoutMode.h"
-SDLLayoutMode *SDLLayoutMode_ICON_ONLY = nil;
-SDLLayoutMode *SDLLayoutMode_ICON_WITH_SEARCH = nil;
-SDLLayoutMode *SDLLayoutMode_LIST_ONLY = nil;
-SDLLayoutMode *SDLLayoutMode_LIST_WITH_SEARCH = nil;
-SDLLayoutMode *SDLLayoutMode_KEYBOARD = nil;
-
-NSArray *SDLLayoutMode_values = nil;
-
-@implementation SDLLayoutMode
-
-+ (SDLLayoutMode *)valueOf:(NSString *)value {
- for (SDLLayoutMode *item in SDLLayoutMode.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLLayoutMode_values == nil) {
- SDLLayoutMode_values = @[
- SDLLayoutMode.ICON_ONLY,
- SDLLayoutMode.ICON_WITH_SEARCH,
- SDLLayoutMode.LIST_ONLY,
- SDLLayoutMode.LIST_WITH_SEARCH,
- SDLLayoutMode.KEYBOARD,
- ];
- }
- return SDLLayoutMode_values;
-}
-
-+ (SDLLayoutMode *)ICON_ONLY {
- if (SDLLayoutMode_ICON_ONLY == nil) {
- SDLLayoutMode_ICON_ONLY = [[SDLLayoutMode alloc] initWithValue:@"ICON_ONLY"];
- }
- return SDLLayoutMode_ICON_ONLY;
-}
-
-+ (SDLLayoutMode *)ICON_WITH_SEARCH {
- if (SDLLayoutMode_ICON_WITH_SEARCH == nil) {
- SDLLayoutMode_ICON_WITH_SEARCH = [[SDLLayoutMode alloc] initWithValue:@"ICON_WITH_SEARCH"];
- }
- return SDLLayoutMode_ICON_WITH_SEARCH;
-}
-
-+ (SDLLayoutMode *)LIST_ONLY {
- if (SDLLayoutMode_LIST_ONLY == nil) {
- SDLLayoutMode_LIST_ONLY = [[SDLLayoutMode alloc] initWithValue:@"LIST_ONLY"];
- }
- return SDLLayoutMode_LIST_ONLY;
-}
-
-+ (SDLLayoutMode *)LIST_WITH_SEARCH {
- if (SDLLayoutMode_LIST_WITH_SEARCH == nil) {
- SDLLayoutMode_LIST_WITH_SEARCH = [[SDLLayoutMode alloc] initWithValue:@"LIST_WITH_SEARCH"];
- }
- return SDLLayoutMode_LIST_WITH_SEARCH;
-}
-
-+ (SDLLayoutMode *)KEYBOARD {
- if (SDLLayoutMode_KEYBOARD == nil) {
- SDLLayoutMode_KEYBOARD = [[SDLLayoutMode alloc] initWithValue:@"KEYBOARD"];
- }
- return SDLLayoutMode_KEYBOARD;
-}
-
-@end
+SDLLayoutMode const SDLLayoutModeIconOnly = @"ICON_ONLY";
+SDLLayoutMode const SDLLayoutModeIconWithSearch = @"ICON_WITH_SEARCH";
+SDLLayoutMode const SDLLayoutModeListOnly = @"LIST_ONLY";
+SDLLayoutMode const SDLLayoutModeListWithSearch = @"LIST_WITH_SEARCH";
+SDLLayoutMode const SDLLayoutModeKeyboard = @"KEYBOARD";
diff --git a/SmartDeviceLink/SDLLifecycleConfiguration.h b/SmartDeviceLink/SDLLifecycleConfiguration.h
index 638c1703a..803d46bfc 100644
--- a/SmartDeviceLink/SDLLifecycleConfiguration.h
+++ b/SmartDeviceLink/SDLLifecycleConfiguration.h
@@ -10,9 +10,10 @@
#import <Foundation/Foundation.h>
-@class SDLAppHMIType;
+#import "SDLAppHMIType.h"
+#import "SDLLanguage.h"
+
@class SDLFile;
-@class SDLLanguage;
@class SDLTTSChunk;
@protocol SDLSecurityType;
@@ -95,17 +96,17 @@ NS_ASSUME_NONNULL_BEGIN
/**
* The application type
*/
-@property (strong, nonatomic, null_resettable) SDLAppHMIType *appType;
+@property (strong, nonatomic, null_resettable) SDLAppHMIType appType;
/**
* The default language to use
*/
-@property (strong, nonatomic) SDLLanguage *language;
+@property (strong, nonatomic) SDLLanguage language;
/**
* An array of all the supported languages
*/
-@property (strong, nonatomic) NSArray<SDLLanguage *> *languagesSupported;
+@property (strong, nonatomic) NSArray<SDLLanguage> *languagesSupported;
/**
* The application icon to be used on an app launching screen
diff --git a/SmartDeviceLink/SDLLifecycleConfiguration.m b/SmartDeviceLink/SDLLifecycleConfiguration.m
index f1b8acf7e..8f50e3258 100644
--- a/SmartDeviceLink/SDLLifecycleConfiguration.m
+++ b/SmartDeviceLink/SDLLifecycleConfiguration.m
@@ -8,9 +8,7 @@
#import "SDLLifecycleConfiguration.h"
-#import "SDLAppHMIType.h"
#import "SDLFile.h"
-#import "SDLLanguage.h"
static NSString *const DefaultTCPIPAddress = @"192.168.0.1";
static UInt16 const DefaultTCPIPPort = 12345;
@@ -44,8 +42,8 @@ NS_ASSUME_NONNULL_BEGIN
_appName = appName;
_appId = appId;
- _appType = [SDLAppHMIType DEFAULT];
- _language = [SDLLanguage EN_US];
+ _appType = SDLAppHMITypeDefault;
+ _language = SDLLanguageEnUs;
_languagesSupported = @[_language];
_appIcon = nil;
_shortAppName = nil;
@@ -74,7 +72,7 @@ NS_ASSUME_NONNULL_BEGIN
#pragma mark Computed Properties
- (BOOL)isMedia {
- if ([self.appType isEqualToEnum:[SDLAppHMIType MEDIA]]) {
+ if ([self.appType isEqualToString:SDLAppHMITypeMedia]) {
return YES;
}
@@ -89,9 +87,9 @@ NS_ASSUME_NONNULL_BEGIN
}
}
-- (void)setAppType:(nullable SDLAppHMIType *)appType {
+- (void)setAppType:(nullable SDLAppHMIType)appType {
if (appType == nil) {
- _appType = [SDLAppHMIType DEFAULT];
+ _appType = SDLAppHMITypeDefault;
}
_appType = appType;
diff --git a/SmartDeviceLink/SDLLifecycleManager.h b/SmartDeviceLink/SDLLifecycleManager.h
index ae63f92d2..23002df19 100644
--- a/SmartDeviceLink/SDLLifecycleManager.h
+++ b/SmartDeviceLink/SDLLifecycleManager.h
@@ -9,11 +9,11 @@
#import "SDLNotificationConstants.h"
#import <Foundation/Foundation.h>
+#import "SDLHMILevel.h"
+#import "SDLLanguage.h"
@class SDLConfiguration;
@class SDLFileManager;
-@class SDLHMILevel;
-@class SDLLanguage;
@class SDLLifecycleConfiguration;
@class SDLLockScreenConfiguration;
@class SDLLockScreenManager;
@@ -70,7 +70,7 @@ typedef void (^SDLManagerReadyBlock)(BOOL success, NSError *_Nullable error);
@property (assign, nonatomic, readonly) UInt16 lastCorrelationId;
@property (copy, nonatomic, readonly) SDLLifecycleState *lifecycleState;
-@property (copy, nonatomic, readonly, nullable) SDLHMILevel *hmiLevel;
+@property (copy, nonatomic, readonly, nullable) SDLHMILevel hmiLevel;
@property (strong, nonatomic, readonly, nullable) SDLRegisterAppInterfaceResponse *registerResponse;
@@ -117,4 +117,4 @@ typedef void (^SDLManagerReadyBlock)(BOOL success, NSError *_Nullable error);
@end
-NS_ASSUME_NONNULL_END \ No newline at end of file
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLLifecycleManager.m b/SmartDeviceLink/SDLLifecycleManager.m
index 718f8c330..eef752799 100644
--- a/SmartDeviceLink/SDLLifecycleManager.m
+++ b/SmartDeviceLink/SDLLifecycleManager.m
@@ -56,7 +56,7 @@ SDLLifecycleState *const SDLLifecycleStateReady = @"Ready";
@interface SDLLifecycleManager () <SDLConnectionManagerType>
// Readonly public properties
-@property (copy, nonatomic, readwrite, nullable) SDLHMILevel *hmiLevel;
+@property (copy, nonatomic, readwrite, nullable) SDLHMILevel hmiLevel;
@property (copy, nonatomic, readwrite) SDLConfiguration *configuration;
@property (assign, nonatomic, readwrite) UInt16 lastCorrelationId;
@property (strong, nonatomic, readwrite, nullable) SDLRegisterAppInterfaceResponse *registerResponse;
@@ -272,18 +272,18 @@ SDLLifecycleState *const SDLLifecycleStateReady = @"Ready";
}
- (void)didEnterStateReady {
- SDLResult *registerResult = self.registerResponse.resultCode;
+ SDLResult registerResult = self.registerResponse.resultCode;
NSString *registerInfo = self.registerResponse.info;
BOOL success = NO;
NSError *startError = nil;
- if ([registerResult isEqualToEnum:[SDLResult WARNINGS]] || [registerResult isEqualToEnum:[SDLResult RESUME_FAILED]]) {
+ if ([registerResult isEqualToString:SDLResultWarnings] || [registerResult isEqualToString:SDLResultResumeFailed]) {
// We succeeded, but with warnings
startError = [NSError sdl_lifecycle_startedWithBadResult:registerResult info:registerInfo];
success = YES;
- } else if (![registerResult isEqualToEnum:[SDLResult SUCCESS]]) {
+ } else if (![registerResult isEqualToString:SDLResultSuccess]) {
// We did not succeed in registering
startError = [NSError sdl_lifecycle_failedWithBadResult:registerResult info:registerInfo];
success = NO;
@@ -303,7 +303,7 @@ SDLLifecycleState *const SDLLifecycleStateReady = @"Ready";
[self.notificationDispatcher postNotificationName:SDLDidBecomeReady infoObject:nil];
// Send the hmi level going from NONE to whatever we're at now (could still be NONE)
- [self.delegate hmiLevel:[SDLHMILevel NONE] didChangeToLevel:self.hmiLevel];
+ [self.delegate hmiLevel:SDLHMILevelNone didChangeToLevel:self.hmiLevel];
}
- (void)didEnterStateUnregistering {
@@ -460,7 +460,7 @@ SDLLifecycleState *const SDLLifecycleStateReady = @"Ready";
}
SDLOnHMIStatus *hmiStatusNotification = notification.notification;
- SDLHMILevel *oldHMILevel = self.hmiLevel;
+ SDLHMILevel oldHMILevel = self.hmiLevel;
self.hmiLevel = hmiStatusNotification.hmiLevel;
if (![self.lifecycleStateMachine isCurrentState:SDLLifecycleStateReady]) {
@@ -483,4 +483,4 @@ SDLLifecycleState *const SDLLifecycleStateReady = @"Ready";
@end
-NS_ASSUME_NONNULL_END \ No newline at end of file
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLLockScreenManager.m b/SmartDeviceLink/SDLLockScreenManager.m
index da3f506c4..f38c2df10 100644
--- a/SmartDeviceLink/SDLLockScreenManager.m
+++ b/SmartDeviceLink/SDLLockScreenManager.m
@@ -103,17 +103,17 @@ NS_ASSUME_NONNULL_BEGIN
SDLOnLockScreenStatus *onLockScreenNotification = notification.notification;
// Present the VC depending on the lock screen status
- if ([onLockScreenNotification.lockScreenStatus isEqualToEnum:[SDLLockScreenStatus REQUIRED]]) {
+ if ([onLockScreenNotification.lockScreenStatus isEqualToString:SDLLockScreenStatusRequired]) {
if (!self.presenter.presented && self.canPresent) {
[self.presenter present];
}
- } else if ([onLockScreenNotification.lockScreenStatus isEqualToEnum:[SDLLockScreenStatus OPTIONAL]]) {
+ } else if ([onLockScreenNotification.lockScreenStatus isEqualToString:SDLLockScreenStatusOptional]) {
if (self.config.showInOptionalState && !self.presenter.presented && self.canPresent) {
[self.presenter present];
} else if (self.presenter.presented) {
[self.presenter dismiss];
}
- } else if ([onLockScreenNotification.lockScreenStatus isEqualToEnum:[SDLLockScreenStatus OFF]]) {
+ } else if ([onLockScreenNotification.lockScreenStatus isEqualToString:SDLLockScreenStatusOff]) {
if (self.presenter.presented) {
[self.presenter dismiss];
}
diff --git a/SmartDeviceLink/SDLLockScreenStatus.h b/SmartDeviceLink/SDLLockScreenStatus.h
index 044aa7e3e..eb9d07141 100644
--- a/SmartDeviceLink/SDLLockScreenStatus.h
+++ b/SmartDeviceLink/SDLLockScreenStatus.h
@@ -6,19 +6,19 @@
#import "SDLEnum.h"
-@interface SDLLockScreenStatus : SDLEnum
-+ (SDLLockScreenStatus *)valueOf:(NSString *)value;
-+ (NSMutableArray *)values;
+typedef SDLEnum SDLLockScreenStatus NS_EXTENSIBLE_STRING_ENUM;
+
/**
* LockScreen is Not Required
*/
-+ (SDLLockScreenStatus *)OFF;
+extern SDLLockScreenStatus const SDLLockScreenStatusOff;
+
/**
* LockScreen is Optional
*/
-+ (SDLLockScreenStatus *)OPTIONAL;
+extern SDLLockScreenStatus const SDLLockScreenStatusOptional;
+
/**
* LockScreen is Not Required
*/
-+ (SDLLockScreenStatus *)REQUIRED;
-@end
+extern SDLLockScreenStatus const SDLLockScreenStatusRequired;
diff --git a/SmartDeviceLink/SDLLockScreenStatus.m b/SmartDeviceLink/SDLLockScreenStatus.m
index 8ef8a7d43..4b721ad8f 100644
--- a/SmartDeviceLink/SDLLockScreenStatus.m
+++ b/SmartDeviceLink/SDLLockScreenStatus.m
@@ -5,55 +5,6 @@
#import "SDLLockScreenStatus.h"
-@implementation SDLLockScreenStatus
-
-SDLLockScreenStatus *SDLLockScreenStatus_OFF = nil;
-SDLLockScreenStatus *SDLLockScreenStatus_OPTIONAL = nil;
-SDLLockScreenStatus *SDLLockScreenStatus_REQUIRED = nil;
-
-NSArray *SDLLockScreenStatus_values = nil;
-
-
-+ (SDLLockScreenStatus *)valueOf:(NSString *)value {
- for (SDLLockScreenStatus *item in SDLLockScreenStatus.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLLockScreenStatus_values == nil) {
- SDLLockScreenStatus_values = @[
- SDLLockScreenStatus.OFF,
- SDLLockScreenStatus.OPTIONAL,
- SDLLockScreenStatus.REQUIRED,
- ];
- }
- return SDLLockScreenStatus_values;
-}
-
-+ (SDLLockScreenStatus *)OFF {
- if (SDLLockScreenStatus_OFF == nil) {
- SDLLockScreenStatus_OFF = [[SDLLockScreenStatus alloc] initWithValue:@"OFF"];
- }
- return SDLLockScreenStatus_OFF;
-}
-
-+ (SDLLockScreenStatus *)OPTIONAL {
- if (SDLLockScreenStatus_OPTIONAL == nil) {
- SDLLockScreenStatus_OPTIONAL = [[SDLLockScreenStatus alloc] initWithValue:@"OPTIONAL"];
- }
- return SDLLockScreenStatus_OPTIONAL;
-}
-
-+ (SDLLockScreenStatus *)REQUIRED {
- if (SDLLockScreenStatus_REQUIRED == nil) {
- SDLLockScreenStatus_REQUIRED = [[SDLLockScreenStatus alloc] initWithValue:@"REQUIRED"];
- }
- return SDLLockScreenStatus_REQUIRED;
-}
-
-
-@end
+SDLLockScreenStatus const SDLLockScreenStatusOff = @"OFF";
+SDLLockScreenStatus const SDLLockScreenStatusOptional = @"OPTIONAL";
+SDLLockScreenStatus const SDLLockScreenStatusRequired = @"REQUIRED";
diff --git a/SmartDeviceLink/SDLLockScreenStatusManager.h b/SmartDeviceLink/SDLLockScreenStatusManager.h
index 0467b2171..43c6d4fab 100644
--- a/SmartDeviceLink/SDLLockScreenStatusManager.h
+++ b/SmartDeviceLink/SDLLockScreenStatusManager.h
@@ -5,8 +5,9 @@
#import <Foundation/Foundation.h>
-@class SDLHMILevel;
-@class SDLLockScreenStatus;
+#import "SDLHMILevel.h"
+#import "SDLLockScreenStatus.h"
+
@class SDLOnLockScreenStatus;
@@ -14,8 +15,8 @@
@property (assign, nonatomic) BOOL userSelected;
@property (assign, nonatomic) BOOL driverDistracted;
-@property (strong, nonatomic) SDLHMILevel *hmiLevel;
-@property (strong, nonatomic, readonly) SDLLockScreenStatus *lockScreenStatus;
+@property (strong, nonatomic) SDLHMILevel hmiLevel;
+@property (strong, nonatomic, readonly) SDLLockScreenStatus lockScreenStatus;
@property (strong, nonatomic, readonly) SDLOnLockScreenStatus *lockScreenStatusNotification;
@end
diff --git a/SmartDeviceLink/SDLLockScreenStatusManager.m b/SmartDeviceLink/SDLLockScreenStatusManager.m
index 86350b0d0..08742991d 100644
--- a/SmartDeviceLink/SDLLockScreenStatusManager.m
+++ b/SmartDeviceLink/SDLLockScreenStatusManager.m
@@ -5,7 +5,6 @@
#import "SDLLockScreenStatusManager.h"
-#import "SDLHMILevel.h"
#import "SDLLockScreenStatus.h"
#import "SDLOnLockScreenStatus.h"
@@ -40,14 +39,14 @@
_haveDriverDistractionStatus = YES;
}
-- (void)setHmiLevel:(SDLHMILevel *)hmiLevel {
+- (void)setHmiLevel:(SDLHMILevel)hmiLevel {
if (_hmiLevel != hmiLevel) {
_hmiLevel = hmiLevel;
}
- if ([hmiLevel isEqualToEnum:[SDLHMILevel FULL]] || [hmiLevel isEqualToEnum:[SDLHMILevel LIMITED]]) {
+ if ([hmiLevel isEqualToString:SDLHMILevelFull] || [hmiLevel isEqualToString:SDLHMILevelLimited]) {
self.userSelected = YES;
- } else if ([hmiLevel isEqualToEnum:[SDLHMILevel NONE]]) {
+ } else if ([hmiLevel isEqualToString:SDLHMILevelNone]) {
self.userSelected = NO;
}
}
@@ -65,30 +64,30 @@
return notification;
}
-- (SDLLockScreenStatus *)lockScreenStatus {
- if (self.hmiLevel == nil || [self.hmiLevel isEqualToEnum:[SDLHMILevel NONE]]) {
+- (SDLLockScreenStatus)lockScreenStatus {
+ if (self.hmiLevel == nil || [self.hmiLevel isEqualToString:SDLHMILevelNone]) {
// App is not active on the car
- return [SDLLockScreenStatus OFF];
- } else if ([self.hmiLevel isEqualToEnum:[SDLHMILevel BACKGROUND]]) {
+ return SDLLockScreenStatusOff;
+ } else if ([self.hmiLevel isEqualToString:SDLHMILevelBackground]) {
// App is in the background on the car
// The lockscreen depends entirely on if the user selected the app
if (self.userSelected) {
- return [SDLLockScreenStatus REQUIRED];
+ return SDLLockScreenStatusRequired;
} else {
- return [SDLLockScreenStatus OFF];
+ return SDLLockScreenStatusOff;
}
- } else if ([self.hmiLevel isEqualToEnum:[SDLHMILevel FULL]] || [self.hmiLevel isEqualToEnum:[SDLHMILevel LIMITED]]) {
+ } else if ([self.hmiLevel isEqualToString:SDLHMILevelFull] || [self.hmiLevel isEqualToString:SDLHMILevelLimited]) {
// App is in the foreground on the car in some manner
if (self.haveDriverDistractionStatus && !self.driverDistracted) {
// We have the distraction status, and the driver is not distracted
- return [SDLLockScreenStatus OPTIONAL];
+ return SDLLockScreenStatusOptional;
} else {
// We don't have the distraction status, and/or the driver is distracted
- return [SDLLockScreenStatus REQUIRED];
+ return SDLLockScreenStatusRequired;
}
} else {
// This shouldn't be possible.
- return [SDLLockScreenStatus OFF];
+ return SDLLockScreenStatusOff;
}
}
diff --git a/SmartDeviceLink/SDLMaintenanceModeStatus.h b/SmartDeviceLink/SDLMaintenanceModeStatus.h
index cd399e20c..da491e48c 100644
--- a/SmartDeviceLink/SDLMaintenanceModeStatus.h
+++ b/SmartDeviceLink/SDLMaintenanceModeStatus.h
@@ -7,44 +7,24 @@
/**
* The SDLMaintenanceModeStatus class.
*/
-@interface SDLMaintenanceModeStatus : SDLEnum {
-}
-
-/**
- * @abstract Maintenance Mode Status
- * @param value The value of the string to get an object for
- * @return SDLMaintenanceModeStatus
- */
-+ (SDLMaintenanceModeStatus *)valueOf:(NSString *)value;
-
-/**
- * @abstract declare an array that store all possible Maintenance Mode Status inside
- * @return the array
- */
-+ (NSArray *)values;
+typedef SDLEnum SDLMaintenanceModeStatus NS_EXTENSIBLE_STRING_ENUM;
/**
* @abstract Maintenance Mode Status : Normal
- * @return the object with value of *NORMAL*
*/
-+ (SDLMaintenanceModeStatus *)NORMAL;
+extern SDLMaintenanceModeStatus const SDLMaintenanceModeStatusNormal;
/**
* @abstract Maintenance Mode Status : Near
- * @return the object with value of *NEAR*
*/
-+ (SDLMaintenanceModeStatus *)NEAR;
+extern SDLMaintenanceModeStatus const SDLMaintenanceModeStatusNear;
/**
* @abstract Maintenance Mode Status : Active
- * @return the object with value of *ACTIVE*
*/
-+ (SDLMaintenanceModeStatus *)ACTIVE;
+extern SDLMaintenanceModeStatus const SDLMaintenanceModeStatusActive;
/**
* @abstract Maintenance Mode Status : Feature not present
- * @return the object with value of *FEATURE_NOT_PRESENT*
*/
-+ (SDLMaintenanceModeStatus *)FEATURE_NOT_PRESENT;
-
-@end
+extern SDLMaintenanceModeStatus const SDLMaintenanceModeStatusFeatureNotPresent;
diff --git a/SmartDeviceLink/SDLMaintenanceModeStatus.m b/SmartDeviceLink/SDLMaintenanceModeStatus.m
index d6e7f8ddd..7477954e0 100644
--- a/SmartDeviceLink/SDLMaintenanceModeStatus.m
+++ b/SmartDeviceLink/SDLMaintenanceModeStatus.m
@@ -4,62 +4,7 @@
#import "SDLMaintenanceModeStatus.h"
-SDLMaintenanceModeStatus *SDLMaintenanceModeStatus_NORMAL = nil;
-SDLMaintenanceModeStatus *SDLMaintenanceModeStatus_NEAR = nil;
-SDLMaintenanceModeStatus *SDLMaintenanceModeStatus_ACTIVE = nil;
-SDLMaintenanceModeStatus *SDLMaintenanceModeStatus_FEATURE_NOT_PRESENT = nil;
-
-NSArray *SDLMaintenanceModeStatus_values = nil;
-
-@implementation SDLMaintenanceModeStatus
-
-+ (SDLMaintenanceModeStatus *)valueOf:(NSString *)value {
- for (SDLMaintenanceModeStatus *item in SDLMaintenanceModeStatus.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLMaintenanceModeStatus_values == nil) {
- SDLMaintenanceModeStatus_values = @[
- SDLMaintenanceModeStatus.NORMAL,
- SDLMaintenanceModeStatus.NEAR,
- SDLMaintenanceModeStatus.ACTIVE,
- SDLMaintenanceModeStatus.FEATURE_NOT_PRESENT,
- ];
- }
- return SDLMaintenanceModeStatus_values;
-}
-
-+ (SDLMaintenanceModeStatus *)NORMAL {
- if (SDLMaintenanceModeStatus_NORMAL == nil) {
- SDLMaintenanceModeStatus_NORMAL = [[SDLMaintenanceModeStatus alloc] initWithValue:@"NORMAL"];
- }
- return SDLMaintenanceModeStatus_NORMAL;
-}
-
-+ (SDLMaintenanceModeStatus *)NEAR {
- if (SDLMaintenanceModeStatus_NEAR == nil) {
- SDLMaintenanceModeStatus_NEAR = [[SDLMaintenanceModeStatus alloc] initWithValue:@"NEAR"];
- }
- return SDLMaintenanceModeStatus_NEAR;
-}
-
-+ (SDLMaintenanceModeStatus *)ACTIVE {
- if (SDLMaintenanceModeStatus_ACTIVE == nil) {
- SDLMaintenanceModeStatus_ACTIVE = [[SDLMaintenanceModeStatus alloc] initWithValue:@"ACTIVE"];
- }
- return SDLMaintenanceModeStatus_ACTIVE;
-}
-
-+ (SDLMaintenanceModeStatus *)FEATURE_NOT_PRESENT {
- if (SDLMaintenanceModeStatus_FEATURE_NOT_PRESENT == nil) {
- SDLMaintenanceModeStatus_FEATURE_NOT_PRESENT = [[SDLMaintenanceModeStatus alloc] initWithValue:@"FEATURE_NOT_PRESENT"];
- }
- return SDLMaintenanceModeStatus_FEATURE_NOT_PRESENT;
-}
-
-@end
+SDLMaintenanceModeStatus const SDLMaintenanceModeStatusNormal = @"NORMAL";
+SDLMaintenanceModeStatus const SDLMaintenanceModeStatusNear = @"NEAR";
+SDLMaintenanceModeStatus const SDLMaintenanceModeStatusActive = @"ACTIVE";
+SDLMaintenanceModeStatus const SDLMaintenanceModeStatusFeatureNotPresent = @"FEATURE_NOT_PRESENT";
diff --git a/SmartDeviceLink/SDLManager.h b/SmartDeviceLink/SDLManager.h
index 6fd75f9e0..9e82ea354 100644
--- a/SmartDeviceLink/SDLManager.h
+++ b/SmartDeviceLink/SDLManager.h
@@ -2,10 +2,11 @@
#import "SDLNotificationConstants.h"
+#import "SDLHMILevel.h"
+#import "SDLLanguage.h"
+
@class SDLConfiguration;
@class SDLFileManager;
-@class SDLHMILevel;
-@class SDLLanguage;
@class SDLLifecycleConfiguration;
@class SDLLockScreenConfiguration;
@class SDLPermissionManager;
@@ -34,7 +35,7 @@ typedef void (^SDLManagerReadyBlock)(BOOL success, NSError *_Nullable error);
/**
* The current HMI level of the running app.
*/
-@property (copy, nonatomic, readonly) SDLHMILevel *hmiLevel;
+@property (copy, nonatomic, readonly) SDLHMILevel hmiLevel;
/**
* The file manager to be used by the running app.
diff --git a/SmartDeviceLink/SDLManager.m b/SmartDeviceLink/SDLManager.m
index 1efe5db65..8198a5de7 100644
--- a/SmartDeviceLink/SDLManager.m
+++ b/SmartDeviceLink/SDLManager.m
@@ -64,7 +64,7 @@ NS_ASSUME_NONNULL_BEGIN
return self.lifecycleManager.configuration;
}
-- (SDLHMILevel *)hmiLevel {
+- (SDLHMILevel)hmiLevel {
return self.lifecycleManager.hmiLevel;
}
diff --git a/SmartDeviceLink/SDLManagerDelegate.h b/SmartDeviceLink/SDLManagerDelegate.h
index 349f22508..88ac86652 100644
--- a/SmartDeviceLink/SDLManagerDelegate.h
+++ b/SmartDeviceLink/SDLManagerDelegate.h
@@ -8,7 +8,7 @@
#import <Foundation/Foundation.h>
-@class SDLHMILevel;
+#import "SDLHMILevel.h"
NS_ASSUME_NONNULL_BEGIN
@@ -26,9 +26,9 @@ NS_ASSUME_NONNULL_BEGIN
* @param oldLevel The previous level which has now been left.
* @param newLevel The current level.
*/
-- (void)hmiLevel:(SDLHMILevel *)oldLevel didChangeToLevel:(SDLHMILevel *)newLevel;
+- (void)hmiLevel:(SDLHMILevel)oldLevel didChangeToLevel:(SDLHMILevel)newLevel;
@end
-NS_ASSUME_NONNULL_END \ No newline at end of file
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLMediaClockFormat.h b/SmartDeviceLink/SDLMediaClockFormat.h
index 12c8b8e16..48ff6728f 100644
--- a/SmartDeviceLink/SDLMediaClockFormat.h
+++ b/SmartDeviceLink/SDLMediaClockFormat.h
@@ -14,24 +14,7 @@
*
* @since SDL 1.0
*/
-@interface SDLMediaClockFormat : SDLEnum {
-}
-
-/**
- * @abstract Media Clock Format
- *
- * @param value The value of the string to get an object for
- *
- * @return SDLMediaClockFormat
- */
-+ (SDLMediaClockFormat *)valueOf:(NSString *)value;
-
-/**
- * @abstract declare an array that store all possible Media clock formats inside
- *
- * @return the array
- */
-+ (NSArray *)values;
+typedef SDLEnum SDLMediaClockFormat NS_EXTENSIBLE_STRING_ENUM;
/**
* @abstract Media clock format: Clock1
@@ -42,10 +25,8 @@
* <li>maxMinutes = 59</li>
* <li>maxSeconds = 59</li>
* </ul>
- *
- * @return The SDLMediaClockFormat object with value *CLOCK1*
*/
-+ (SDLMediaClockFormat *)CLOCK1;
+extern SDLMediaClockFormat const SDLMediaClockFormatClock1;
/**
* @abstract Media clock format: Clock2
@@ -56,10 +37,8 @@
* <li>maxMinutes = 59</li>
* <li>maxSeconds = 59</li>
* </ul>
- *
- * @return The SDLMediaClockFormat object with value *CLOCK2*
*/
-+ (SDLMediaClockFormat *)CLOCK2;
+extern SDLMediaClockFormat const SDLMediaClockFormatClock2;
/**
* @abstract Media clock format: Clock3
@@ -72,9 +51,8 @@
* </ul>
*
* @since SDL 2.0
- * @return The SDLMediaClockFormat object with value *CLOCK3*
*/
-+ (SDLMediaClockFormat *)CLOCK3;
+extern SDLMediaClockFormat const SDLMediaClockFormatClock3;
/**
* @abstract Media clock format: ClockText1
@@ -89,10 +67,8 @@
* <li>:|sp : colon or space</li>
* <li>used for Type II headunit</li>
* </ul>
- *
- * @return The SDLMediaClockFormat object with value *CLOCKTEXT1*
*/
-+ (SDLMediaClockFormat *)CLOCKTEXT1;
+extern SDLMediaClockFormat const SDLMediaClockFormatClockText1;
/**
* @abstract Media clock format: ClockText2
@@ -109,10 +85,8 @@
* </ul>
* difference between CLOCKTEXT1 and CLOCKTEXT2 is the supported character
* set
- *
- * @return The SDLMediaClockFormat object with value *CLOCKTEXT2*
*/
-+ (SDLMediaClockFormat *)CLOCKTEXT2;
+extern SDLMediaClockFormat const SDLMediaClockFormatClockText2;
/**
* @abstract Media clock format: ClockText3
@@ -129,10 +103,8 @@
* </ul>
* difference between CLOCKTEXT1 and CLOCKTEXT2 is the supported character
* set
- *
- * @return The SDLMediaClockFormat object with value *CLOCKTEXT3*
*/
-+ (SDLMediaClockFormat *)CLOCKTEXT3;
+extern SDLMediaClockFormat const SDLMediaClockFormatClockText3;
/**
* @abstract Media clock format: ClockText4
@@ -147,8 +119,5 @@
* </ul>
*
* @since SDL 2.0
- * @return The SDLMediaClockFormat object with value *CLOCKTEXT4*
*/
-+ (SDLMediaClockFormat *)CLOCKTEXT4;
-
-@end
+extern SDLMediaClockFormat const SDLMediaClockFormatClockText4;
diff --git a/SmartDeviceLink/SDLMediaClockFormat.m b/SmartDeviceLink/SDLMediaClockFormat.m
index 20ddb8005..f71894814 100644
--- a/SmartDeviceLink/SDLMediaClockFormat.m
+++ b/SmartDeviceLink/SDLMediaClockFormat.m
@@ -4,89 +4,10 @@
#import "SDLMediaClockFormat.h"
-SDLMediaClockFormat *SDLMediaClockFormat_CLOCK1 = nil;
-SDLMediaClockFormat *SDLMediaClockFormat_CLOCK2 = nil;
-SDLMediaClockFormat *SDLMediaClockFormat_CLOCK3 = nil;
-SDLMediaClockFormat *SDLMediaClockFormat_CLOCKTEXT1 = nil;
-SDLMediaClockFormat *SDLMediaClockFormat_CLOCKTEXT2 = nil;
-SDLMediaClockFormat *SDLMediaClockFormat_CLOCKTEXT3 = nil;
-SDLMediaClockFormat *SDLMediaClockFormat_CLOCKTEXT4 = nil;
-
-NSArray *SDLMediaClockFormat_values = nil;
-
-@implementation SDLMediaClockFormat
-
-+ (SDLMediaClockFormat *)valueOf:(NSString *)value {
- for (SDLMediaClockFormat *item in SDLMediaClockFormat.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLMediaClockFormat_values == nil) {
- SDLMediaClockFormat_values = @[
- SDLMediaClockFormat.CLOCK1,
- SDLMediaClockFormat.CLOCK2,
- SDLMediaClockFormat.CLOCK3,
- SDLMediaClockFormat.CLOCKTEXT1,
- SDLMediaClockFormat.CLOCKTEXT2,
- SDLMediaClockFormat.CLOCKTEXT3,
- SDLMediaClockFormat.CLOCKTEXT4,
- ];
- }
- return SDLMediaClockFormat_values;
-}
-
-+ (SDLMediaClockFormat *)CLOCK1 {
- if (SDLMediaClockFormat_CLOCK1 == nil) {
- SDLMediaClockFormat_CLOCK1 = [[SDLMediaClockFormat alloc] initWithValue:@"CLOCK1"];
- }
- return SDLMediaClockFormat_CLOCK1;
-}
-
-+ (SDLMediaClockFormat *)CLOCK2 {
- if (SDLMediaClockFormat_CLOCK2 == nil) {
- SDLMediaClockFormat_CLOCK2 = [[SDLMediaClockFormat alloc] initWithValue:@"CLOCK2"];
- }
- return SDLMediaClockFormat_CLOCK2;
-}
-
-+ (SDLMediaClockFormat *)CLOCK3 {
- if (SDLMediaClockFormat_CLOCK3 == nil) {
- SDLMediaClockFormat_CLOCK3 = [[SDLMediaClockFormat alloc] initWithValue:@"CLOCK3"];
- }
- return SDLMediaClockFormat_CLOCK3;
-}
-
-+ (SDLMediaClockFormat *)CLOCKTEXT1 {
- if (SDLMediaClockFormat_CLOCKTEXT1 == nil) {
- SDLMediaClockFormat_CLOCKTEXT1 = [[SDLMediaClockFormat alloc] initWithValue:@"CLOCKTEXT1"];
- }
- return SDLMediaClockFormat_CLOCKTEXT1;
-}
-
-+ (SDLMediaClockFormat *)CLOCKTEXT2 {
- if (SDLMediaClockFormat_CLOCKTEXT2 == nil) {
- SDLMediaClockFormat_CLOCKTEXT2 = [[SDLMediaClockFormat alloc] initWithValue:@"CLOCKTEXT2"];
- }
- return SDLMediaClockFormat_CLOCKTEXT2;
-}
-
-+ (SDLMediaClockFormat *)CLOCKTEXT3 {
- if (SDLMediaClockFormat_CLOCKTEXT3 == nil) {
- SDLMediaClockFormat_CLOCKTEXT3 = [[SDLMediaClockFormat alloc] initWithValue:@"CLOCKTEXT3"];
- }
- return SDLMediaClockFormat_CLOCKTEXT3;
-}
-
-+ (SDLMediaClockFormat *)CLOCKTEXT4 {
- if (SDLMediaClockFormat_CLOCKTEXT4 == nil) {
- SDLMediaClockFormat_CLOCKTEXT4 = [[SDLMediaClockFormat alloc] initWithValue:@"CLOCKTEXT4"];
- }
- return SDLMediaClockFormat_CLOCKTEXT4;
-}
-
-@end
+SDLMediaClockFormat const SDLMediaClockFormatClock1 = @"CLOCK1";
+SDLMediaClockFormat const SDLMediaClockFormatClock2 = @"CLOCK2";
+SDLMediaClockFormat const SDLMediaClockFormatClock3 = @"CLOCK3";
+SDLMediaClockFormat const SDLMediaClockFormatClockText1 = @"CLOCKTEXT1";
+SDLMediaClockFormat const SDLMediaClockFormatClockText2 = @"CLOCKTEXT2";
+SDLMediaClockFormat const SDLMediaClockFormatClockText3 = @"CLOCKTEXT3";
+SDLMediaClockFormat const SDLMediaClockFormatClockText4 = @"CLOCKTEXT4";
diff --git a/SmartDeviceLink/SDLMyKey.h b/SmartDeviceLink/SDLMyKey.h
index ff039e582..5fcce7668 100644
--- a/SmartDeviceLink/SDLMyKey.h
+++ b/SmartDeviceLink/SDLMyKey.h
@@ -3,7 +3,7 @@
#import "SDLRPCMessage.h"
-@class SDLVehicleDataStatus;
+#import "SDLVehicleDataStatus.h"
@interface SDLMyKey : SDLRPCStruct {
@@ -12,6 +12,6 @@
- (instancetype)init;
- (instancetype)initWithDictionary:(NSMutableDictionary *)dict;
-@property (strong) SDLVehicleDataStatus *e911Override;
+@property (strong) SDLVehicleDataStatus e911Override;
@end
diff --git a/SmartDeviceLink/SDLMyKey.m b/SmartDeviceLink/SDLMyKey.m
index ec4e5ef95..baa7c74c7 100644
--- a/SmartDeviceLink/SDLMyKey.m
+++ b/SmartDeviceLink/SDLMyKey.m
@@ -21,7 +21,7 @@
return self;
}
-- (void)setE911Override:(SDLVehicleDataStatus *)e911Override {
+- (void)setE911Override:(SDLVehicleDataStatus)e911Override {
if (e911Override != nil) {
[store setObject:e911Override forKey:NAMES_e911Override];
} else {
@@ -29,13 +29,9 @@
}
}
-- (SDLVehicleDataStatus *)e911Override {
+- (SDLVehicleDataStatus)e911Override {
NSObject *obj = [store objectForKey:NAMES_e911Override];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataStatus.class]) {
- return (SDLVehicleDataStatus *)obj;
- } else {
- return [SDLVehicleDataStatus valueOf:(NSString *)obj];
- }
+ return (SDLVehicleDataStatus)obj;
}
@end
diff --git a/SmartDeviceLink/SDLOnAppInterfaceUnregistered.h b/SmartDeviceLink/SDLOnAppInterfaceUnregistered.h
index 59b596f58..0550ef70b 100644
--- a/SmartDeviceLink/SDLOnAppInterfaceUnregistered.h
+++ b/SmartDeviceLink/SDLOnAppInterfaceUnregistered.h
@@ -3,7 +3,7 @@
#import "SDLRPCNotification.h"
-@class SDLAppInterfaceUnregisteredReason;
+#import "SDLAppInterfaceUnregisteredReason.h"
/**
@@ -30,6 +30,6 @@
/**
* @abstract The reason application's interface was terminated
*/
-@property (strong) SDLAppInterfaceUnregisteredReason *reason;
+@property (strong) SDLAppInterfaceUnregisteredReason reason;
@end
diff --git a/SmartDeviceLink/SDLOnAppInterfaceUnregistered.m b/SmartDeviceLink/SDLOnAppInterfaceUnregistered.m
index 5427cf871..f09034988 100644
--- a/SmartDeviceLink/SDLOnAppInterfaceUnregistered.m
+++ b/SmartDeviceLink/SDLOnAppInterfaceUnregistered.m
@@ -3,10 +3,8 @@
#import "SDLOnAppInterfaceUnregistered.h"
-#import "SDLAppInterfaceUnregisteredReason.h"
#import "SDLNames.h"
-
@implementation SDLOnAppInterfaceUnregistered
- (instancetype)init {
@@ -21,7 +19,7 @@
return self;
}
-- (void)setReason:(SDLAppInterfaceUnregisteredReason *)reason {
+- (void)setReason:(SDLAppInterfaceUnregisteredReason)reason {
if (reason != nil) {
[parameters setObject:reason forKey:NAMES_reason];
} else {
@@ -29,13 +27,9 @@
}
}
-- (SDLAppInterfaceUnregisteredReason *)reason {
+- (SDLAppInterfaceUnregisteredReason)reason {
NSObject *obj = [parameters objectForKey:NAMES_reason];
- if (obj == nil || [obj isKindOfClass:SDLAppInterfaceUnregisteredReason.class]) {
- return (SDLAppInterfaceUnregisteredReason *)obj;
- } else {
- return [SDLAppInterfaceUnregisteredReason valueOf:(NSString *)obj];
- }
+ return (SDLAppInterfaceUnregisteredReason)obj;
}
@end
diff --git a/SmartDeviceLink/SDLOnButtonEvent.h b/SmartDeviceLink/SDLOnButtonEvent.h
index 0d1fc8afd..736b5ebc8 100644
--- a/SmartDeviceLink/SDLOnButtonEvent.h
+++ b/SmartDeviceLink/SDLOnButtonEvent.h
@@ -3,9 +3,8 @@
#import "SDLRPCNotification.h"
-@class SDLButtonName;
-@class SDLButtonEventMode;
-
+#import "SDLButtonName.h"
+#import "SDLButtonEventMode.h"
/**
* Notifies application that user has depressed or released a button to which
@@ -62,12 +61,12 @@
/**
* @abstract The name of the button
*/
-@property (strong) SDLButtonName *buttonName;
+@property (strong) SDLButtonName buttonName;
/**
* @abstract Indicates whether this is an UP or DOWN event
*/
-@property (strong) SDLButtonEventMode *buttonEventMode;
+@property (strong) SDLButtonEventMode buttonEventMode;
/**
* @abstract If ButtonName is "CUSTOM_BUTTON", this references the integer ID passed by a custom button. (e.g. softButton ID)
diff --git a/SmartDeviceLink/SDLOnButtonEvent.m b/SmartDeviceLink/SDLOnButtonEvent.m
index d112d88ea..de0ab511a 100644
--- a/SmartDeviceLink/SDLOnButtonEvent.m
+++ b/SmartDeviceLink/SDLOnButtonEvent.m
@@ -3,8 +3,6 @@
#import "SDLOnButtonEvent.h"
-#import "SDLButtonEventMode.h"
-#import "SDLButtonName.h"
#import "SDLNames.h"
@@ -22,7 +20,7 @@
return self;
}
-- (void)setButtonName:(SDLButtonName *)buttonName {
+- (void)setButtonName:(SDLButtonName)buttonName {
if (buttonName != nil) {
[parameters setObject:buttonName forKey:NAMES_buttonName];
} else {
@@ -30,16 +28,12 @@
}
}
-- (SDLButtonName *)buttonName {
+- (SDLButtonName)buttonName {
NSObject *obj = [parameters objectForKey:NAMES_buttonName];
- if (obj == nil || [obj isKindOfClass:SDLButtonName.class]) {
- return (SDLButtonName *)obj;
- } else {
- return [SDLButtonName valueOf:(NSString *)obj];
- }
+ return (SDLButtonName)obj;
}
-- (void)setButtonEventMode:(SDLButtonEventMode *)buttonEventMode {
+- (void)setButtonEventMode:(SDLButtonEventMode)buttonEventMode {
if (buttonEventMode != nil) {
[parameters setObject:buttonEventMode forKey:NAMES_buttonEventMode];
} else {
@@ -47,13 +41,9 @@
}
}
-- (SDLButtonEventMode *)buttonEventMode {
+- (SDLButtonEventMode)buttonEventMode {
NSObject *obj = [parameters objectForKey:NAMES_buttonEventMode];
- if (obj == nil || [obj isKindOfClass:SDLButtonEventMode.class]) {
- return (SDLButtonEventMode *)obj;
- } else {
- return [SDLButtonEventMode valueOf:(NSString *)obj];
- }
+ return (SDLButtonEventMode)obj;
}
- (void)setCustomButtonID:(NSNumber *)customButtonID {
diff --git a/SmartDeviceLink/SDLOnButtonPress.h b/SmartDeviceLink/SDLOnButtonPress.h
index 942dbd583..58c320ca1 100644
--- a/SmartDeviceLink/SDLOnButtonPress.h
+++ b/SmartDeviceLink/SDLOnButtonPress.h
@@ -3,9 +3,8 @@
#import "SDLRPCNotification.h"
-@class SDLButtonName;
-@class SDLButtonPressMode;
-
+#import "SDLButtonName.h"
+#import "SDLButtonPressMode.h"
/**
* Notifies application of button press events for buttons to which the
@@ -71,7 +70,7 @@
*
* Required
*/
-@property (strong) SDLButtonName *buttonName;
+@property (strong) SDLButtonName buttonName;
/**
* @abstract Indicates whether this is a LONG or SHORT button press event
@@ -80,7 +79,7 @@
*
* Required
*/
-@property (strong) SDLButtonPressMode *buttonPressMode;
+@property (strong) SDLButtonPressMode buttonPressMode;
/**
* @abstract If ButtonName is "CUSTOM_BUTTON", this references the integer ID passed by a custom button. (e.g. softButton ID)
diff --git a/SmartDeviceLink/SDLOnButtonPress.m b/SmartDeviceLink/SDLOnButtonPress.m
index 8926b7951..29db5d0b1 100644
--- a/SmartDeviceLink/SDLOnButtonPress.m
+++ b/SmartDeviceLink/SDLOnButtonPress.m
@@ -22,7 +22,7 @@
return self;
}
-- (void)setButtonName:(SDLButtonName *)buttonName {
+- (void)setButtonName:(SDLButtonName)buttonName {
if (buttonName != nil) {
[parameters setObject:buttonName forKey:NAMES_buttonName];
} else {
@@ -30,16 +30,12 @@
}
}
-- (SDLButtonName *)buttonName {
+- (SDLButtonName)buttonName {
NSObject *obj = [parameters objectForKey:NAMES_buttonName];
- if (obj == nil || [obj isKindOfClass:SDLButtonName.class]) {
- return (SDLButtonName *)obj;
- } else {
- return [SDLButtonName valueOf:(NSString *)obj];
- }
+ return (SDLButtonName)obj;
}
-- (void)setButtonPressMode:(SDLButtonPressMode *)buttonPressMode {
+- (void)setButtonPressMode:(SDLButtonPressMode)buttonPressMode {
if (buttonPressMode != nil) {
[parameters setObject:buttonPressMode forKey:NAMES_buttonPressMode];
} else {
@@ -47,13 +43,9 @@
}
}
-- (SDLButtonPressMode *)buttonPressMode {
+- (SDLButtonPressMode)buttonPressMode {
NSObject *obj = [parameters objectForKey:NAMES_buttonPressMode];
- if (obj == nil || [obj isKindOfClass:SDLButtonPressMode.class]) {
- return (SDLButtonPressMode *)obj;
- } else {
- return [SDLButtonPressMode valueOf:(NSString *)obj];
- }
+ return (SDLButtonPressMode)obj;
}
- (void)setCustomButtonID:(NSNumber *)customButtonID {
diff --git a/SmartDeviceLink/SDLOnCommand.h b/SmartDeviceLink/SDLOnCommand.h
index 5d3d3f599..040f14ab6 100644
--- a/SmartDeviceLink/SDLOnCommand.h
+++ b/SmartDeviceLink/SDLOnCommand.h
@@ -3,8 +3,7 @@
#import "SDLRPCNotification.h"
-@class SDLTriggerSource;
-
+#import "SDLTriggerSource.h"
/**
* This is called when a command was selected via VR after pressing the PTT button, or selected from the menu after
@@ -37,6 +36,6 @@
/**
* @abstract Indicates whether command was selected via voice or via a menu selection (using the OK button).
*/
-@property (strong) SDLTriggerSource *triggerSource;
+@property (strong) SDLTriggerSource triggerSource;
@end
diff --git a/SmartDeviceLink/SDLOnCommand.m b/SmartDeviceLink/SDLOnCommand.m
index f16023d42..e2a5e71f1 100644
--- a/SmartDeviceLink/SDLOnCommand.m
+++ b/SmartDeviceLink/SDLOnCommand.m
@@ -4,8 +4,6 @@
#import "SDLOnCommand.h"
#import "SDLNames.h"
-#import "SDLTriggerSource.h"
-
@implementation SDLOnCommand
@@ -33,7 +31,7 @@
return [parameters objectForKey:NAMES_cmdID];
}
-- (void)setTriggerSource:(SDLTriggerSource *)triggerSource {
+- (void)setTriggerSource:(SDLTriggerSource)triggerSource {
if (triggerSource != nil) {
[parameters setObject:triggerSource forKey:NAMES_triggerSource];
} else {
@@ -41,13 +39,9 @@
}
}
-- (SDLTriggerSource *)triggerSource {
+- (SDLTriggerSource)triggerSource {
NSObject *obj = [parameters objectForKey:NAMES_triggerSource];
- if (obj == nil || [obj isKindOfClass:SDLTriggerSource.class]) {
- return (SDLTriggerSource *)obj;
- } else {
- return [SDLTriggerSource valueOf:(NSString *)obj];
- }
+ return (SDLTriggerSource)obj;
}
@end
diff --git a/SmartDeviceLink/SDLOnDriverDistraction.h b/SmartDeviceLink/SDLOnDriverDistraction.h
index d99e57393..0f5cd1955 100644
--- a/SmartDeviceLink/SDLOnDriverDistraction.h
+++ b/SmartDeviceLink/SDLOnDriverDistraction.h
@@ -3,8 +3,7 @@
#import "SDLRPCNotification.h"
-@class SDLDriverDistractionState;
-
+#import "SDLDriverDistractionState.h"
/**
* Notifies the application of the current driver distraction state (whether driver distraction rules are in effect, or
@@ -41,6 +40,6 @@
/**
* @abstract The driver distraction state (i.e. whether driver distraction rules are in effect, or not)
*/
-@property (strong) SDLDriverDistractionState *state;
+@property (strong) SDLDriverDistractionState state;
@end
diff --git a/SmartDeviceLink/SDLOnDriverDistraction.m b/SmartDeviceLink/SDLOnDriverDistraction.m
index 1a87075b3..2a5db6185 100644
--- a/SmartDeviceLink/SDLOnDriverDistraction.m
+++ b/SmartDeviceLink/SDLOnDriverDistraction.m
@@ -21,7 +21,7 @@
return self;
}
-- (void)setState:(SDLDriverDistractionState *)state {
+- (void)setState:(SDLDriverDistractionState)state {
if (state != nil) {
[parameters setObject:state forKey:NAMES_state];
} else {
@@ -29,13 +29,9 @@
}
}
-- (SDLDriverDistractionState *)state {
+- (SDLDriverDistractionState)state {
NSObject *obj = [parameters objectForKey:NAMES_state];
- if (obj == nil || [obj isKindOfClass:SDLDriverDistractionState.class]) {
- return (SDLDriverDistractionState *)obj;
- } else {
- return [SDLDriverDistractionState valueOf:(NSString *)obj];
- }
+ return (SDLDriverDistractionState)obj;
}
@end
diff --git a/SmartDeviceLink/SDLOnHMIStatus.h b/SmartDeviceLink/SDLOnHMIStatus.h
index c417070d5..8a8f03def 100644
--- a/SmartDeviceLink/SDLOnHMIStatus.h
+++ b/SmartDeviceLink/SDLOnHMIStatus.h
@@ -3,10 +3,9 @@
#import "SDLRPCNotification.h"
-@class SDLAudioStreamingState;
-@class SDLHMILevel;
-@class SDLSystemContext;
-
+#import "SDLAudioStreamingState.h"
+#import "SDLHMILevel.h"
+#import "SDLSystemContext.h"
/**
* Notifies an application that HMI conditions have changed for the application. This indicates whether the application
@@ -40,19 +39,19 @@
/**
* @abstract SDLHMILevel in effect for the application
*/
-@property (strong) SDLHMILevel *hmiLevel;
+@property (strong) SDLHMILevel hmiLevel;
/**
* @abstract Current state of audio streaming for the application. When this parameter has a value of NOT_AUDIBLE, the application must stop streaming audio to SDL.
*
* Informs app whether any currently streaming audio is audible to user (AUDIBLE) or not (NOT_AUDIBLE). A value of NOT_AUDIBLE means that either the application's audio will not be audible to the user, or that the application's audio should not be audible to the user (i.e. some other application on the mobile device may be streaming audio and the application's audio would be blended with that other audio).
*/
-@property (strong) SDLAudioStreamingState *audioStreamingState;
+@property (strong) SDLAudioStreamingState audioStreamingState;
/**
* @abstract the System Context
* @discussion whether a user-initiated interaction is in-progress (VRSESSION or MENU), or not (MAIN)
*/
-@property (strong) SDLSystemContext *systemContext;
+@property (strong) SDLSystemContext systemContext;
@end
diff --git a/SmartDeviceLink/SDLOnHMIStatus.m b/SmartDeviceLink/SDLOnHMIStatus.m
index e3dc0d7fc..32da9716b 100644
--- a/SmartDeviceLink/SDLOnHMIStatus.m
+++ b/SmartDeviceLink/SDLOnHMIStatus.m
@@ -23,7 +23,7 @@
return self;
}
-- (void)setHmiLevel:(SDLHMILevel *)hmiLevel {
+- (void)setHmiLevel:(SDLHMILevel)hmiLevel {
if (hmiLevel != nil) {
[parameters setObject:hmiLevel forKey:NAMES_hmiLevel];
} else {
@@ -31,16 +31,12 @@
}
}
-- (SDLHMILevel *)hmiLevel {
+- (SDLHMILevel)hmiLevel {
NSObject *obj = [parameters objectForKey:NAMES_hmiLevel];
- if (obj == nil || [obj isKindOfClass:SDLHMILevel.class]) {
- return (SDLHMILevel *)obj;
- } else {
- return [SDLHMILevel valueOf:(NSString *)obj];
- }
+ return (SDLHMILevel)obj;
}
-- (void)setAudioStreamingState:(SDLAudioStreamingState *)audioStreamingState {
+- (void)setAudioStreamingState:(SDLAudioStreamingState)audioStreamingState {
if (audioStreamingState != nil) {
[parameters setObject:audioStreamingState forKey:NAMES_audioStreamingState];
} else {
@@ -48,16 +44,12 @@
}
}
-- (SDLAudioStreamingState *)audioStreamingState {
+- (SDLAudioStreamingState)audioStreamingState {
NSObject *obj = [parameters objectForKey:NAMES_audioStreamingState];
- if (obj == nil || [obj isKindOfClass:SDLAudioStreamingState.class]) {
- return (SDLAudioStreamingState *)obj;
- } else {
- return [SDLAudioStreamingState valueOf:(NSString *)obj];
- }
+ return (SDLAudioStreamingState)obj;
}
-- (void)setSystemContext:(SDLSystemContext *)systemContext {
+- (void)setSystemContext:(SDLSystemContext)systemContext {
if (systemContext != nil) {
[parameters setObject:systemContext forKey:NAMES_systemContext];
} else {
@@ -65,13 +57,9 @@
}
}
-- (SDLSystemContext *)systemContext {
+- (SDLSystemContext)systemContext {
NSObject *obj = [parameters objectForKey:NAMES_systemContext];
- if (obj == nil || [obj isKindOfClass:SDLSystemContext.class]) {
- return (SDLSystemContext *)obj;
- } else {
- return [SDLSystemContext valueOf:(NSString *)obj];
- }
+ return (SDLSystemContext)obj;
}
@end
diff --git a/SmartDeviceLink/SDLOnKeyboardInput.h b/SmartDeviceLink/SDLOnKeyboardInput.h
index e976d6c88..9c8dfb9e9 100644
--- a/SmartDeviceLink/SDLOnKeyboardInput.h
+++ b/SmartDeviceLink/SDLOnKeyboardInput.h
@@ -3,7 +3,7 @@
#import "SDLRPCNotification.h"
-@class SDLKeyboardEvent;
+#import "SDLKeyboardEvent.h"
@interface SDLOnKeyboardInput : SDLRPCNotification {
@@ -12,7 +12,7 @@
- (instancetype)init;
- (instancetype)initWithDictionary:(NSMutableDictionary *)dict;
-@property (strong) SDLKeyboardEvent *event;
+@property (strong) SDLKeyboardEvent event;
@property (strong) NSString *data;
@end
diff --git a/SmartDeviceLink/SDLOnKeyboardInput.m b/SmartDeviceLink/SDLOnKeyboardInput.m
index a70a7d06c..42857840d 100644
--- a/SmartDeviceLink/SDLOnKeyboardInput.m
+++ b/SmartDeviceLink/SDLOnKeyboardInput.m
@@ -3,7 +3,6 @@
#import "SDLOnKeyboardInput.h"
-#import "SDLKeyboardEvent.h"
#import "SDLNames.h"
@@ -21,7 +20,7 @@
return self;
}
-- (void)setEvent:(SDLKeyboardEvent *)event {
+- (void)setEvent:(SDLKeyboardEvent)event {
if (event != nil) {
[parameters setObject:event forKey:NAMES_event];
} else {
@@ -29,13 +28,9 @@
}
}
-- (SDLKeyboardEvent *)event {
+- (SDLKeyboardEvent)event {
NSObject *obj = [parameters objectForKey:NAMES_event];
- if (obj == nil || [obj isKindOfClass:SDLKeyboardEvent.class]) {
- return (SDLKeyboardEvent *)obj;
- } else {
- return [SDLKeyboardEvent valueOf:(NSString *)obj];
- }
+ return (SDLKeyboardEvent)obj;
}
- (void)setData:(NSString *)data {
diff --git a/SmartDeviceLink/SDLOnLanguageChange.h b/SmartDeviceLink/SDLOnLanguageChange.h
index b794edcd1..2aca93d1d 100644
--- a/SmartDeviceLink/SDLOnLanguageChange.h
+++ b/SmartDeviceLink/SDLOnLanguageChange.h
@@ -3,7 +3,7 @@
#import "SDLRPCNotification.h"
-@class SDLLanguage;
+#import "SDLLanguage.h"
/**
@@ -28,11 +28,11 @@
/**
* @abstract Current SDL voice engine (VR+TTS) language
*/
-@property (strong) SDLLanguage *language;
+@property (strong) SDLLanguage language;
/**
* @abstract Current display language
*/
-@property (strong) SDLLanguage *hmiDisplayLanguage;
+@property (strong) SDLLanguage hmiDisplayLanguage;
@end
diff --git a/SmartDeviceLink/SDLOnLanguageChange.m b/SmartDeviceLink/SDLOnLanguageChange.m
index 216d0c4a5..c344fd2a5 100644
--- a/SmartDeviceLink/SDLOnLanguageChange.m
+++ b/SmartDeviceLink/SDLOnLanguageChange.m
@@ -21,7 +21,7 @@
return self;
}
-- (void)setLanguage:(SDLLanguage *)language {
+- (void)setLanguage:(SDLLanguage)language {
if (language != nil) {
[parameters setObject:language forKey:NAMES_language];
} else {
@@ -29,16 +29,12 @@
}
}
-- (SDLLanguage *)language {
+- (SDLLanguage)language {
NSObject *obj = [parameters objectForKey:NAMES_language];
- if (obj == nil || [obj isKindOfClass:SDLLanguage.class]) {
- return (SDLLanguage *)obj;
- } else {
- return [SDLLanguage valueOf:(NSString *)obj];
- }
+ return (SDLLanguage)obj;
}
-- (void)setHmiDisplayLanguage:(SDLLanguage *)hmiDisplayLanguage {
+- (void)setHmiDisplayLanguage:(SDLLanguage)hmiDisplayLanguage {
if (hmiDisplayLanguage != nil) {
[parameters setObject:hmiDisplayLanguage forKey:NAMES_hmiDisplayLanguage];
} else {
@@ -46,13 +42,10 @@
}
}
-- (SDLLanguage *)hmiDisplayLanguage {
+- (SDLLanguage)hmiDisplayLanguage {
NSObject *obj = [parameters objectForKey:NAMES_hmiDisplayLanguage];
- if (obj == nil || [obj isKindOfClass:SDLLanguage.class]) {
- return (SDLLanguage *)obj;
- } else {
- return [SDLLanguage valueOf:(NSString *)obj];
- }
+ return (SDLLanguage)obj;
}
+
@end
diff --git a/SmartDeviceLink/SDLOnLockScreenStatus.h b/SmartDeviceLink/SDLOnLockScreenStatus.h
index 3a4a31452..f63c8eb38 100644
--- a/SmartDeviceLink/SDLOnLockScreenStatus.h
+++ b/SmartDeviceLink/SDLOnLockScreenStatus.h
@@ -5,8 +5,8 @@
#import "SDLRPCNotification.h"
-@class SDLHMILevel;
-@class SDLLockScreenStatus;
+#import "SDLHMILevel.h"
+#import "SDLLockScreenStatus.h"
/**
@@ -37,11 +37,11 @@
* <p>Get the {@linkplain LockScreenStatus} enumeration, indicating if the lockscreen should be required, optional or off </p>
* @return {@linkplain LockScreenStatus}
*/
-@property (strong) SDLLockScreenStatus *lockScreenStatus;
+@property (strong) SDLLockScreenStatus lockScreenStatus;
/**
* <p>Get HMILevel in effect for the application</p>
* @return {@linkplain HMILevel} the current HMI Level in effect for the application
*/
-@property (strong) SDLHMILevel *hmiLevel;
+@property (strong) SDLHMILevel hmiLevel;
@end
diff --git a/SmartDeviceLink/SDLOnLockScreenStatus.m b/SmartDeviceLink/SDLOnLockScreenStatus.m
index fc9e39c00..6d44efd7c 100644
--- a/SmartDeviceLink/SDLOnLockScreenStatus.m
+++ b/SmartDeviceLink/SDLOnLockScreenStatus.m
@@ -23,7 +23,7 @@
return self;
}
-- (void)setLockScreenStatus:(SDLLockScreenStatus *)lockScreenStatus {
+- (void)setLockScreenStatus:(SDLLockScreenStatus)lockScreenStatus {
if (lockScreenStatus != nil) {
[parameters setObject:lockScreenStatus forKey:@"OnLockScreenStatus"];
} else {
@@ -31,16 +31,12 @@
}
}
-- (SDLLockScreenStatus *)lockScreenStatus {
+- (SDLLockScreenStatus)lockScreenStatus {
NSObject *obj = [parameters objectForKey:@"OnLockScreenStatus"];
- if (obj == nil || [obj isKindOfClass:SDLLockScreenStatus.class]) {
- return (SDLLockScreenStatus *)obj;
- } else {
- return [SDLLockScreenStatus valueOf:(NSString *)obj];
- }
+ return (SDLLockScreenStatus)obj;
}
-- (void)setHmiLevel:(SDLHMILevel *)hmiLevel {
+- (void)setHmiLevel:(SDLHMILevel)hmiLevel {
if (hmiLevel != nil) {
[parameters setObject:hmiLevel forKey:@"hmilevel"];
} else {
@@ -48,13 +44,9 @@
}
}
-- (SDLHMILevel *)hmiLevel {
+- (SDLHMILevel)hmiLevel {
NSObject *obj = [parameters objectForKey:@"hmilevel"];
- if (obj == nil || [obj isKindOfClass:SDLHMILevel.class]) {
- return (SDLHMILevel *)obj;
- } else {
- return [SDLHMILevel valueOf:(NSString *)obj];
- }
+ return (SDLHMILevel)obj;
}
- (void)setUserSelected:(NSNumber *)userSelected {
diff --git a/SmartDeviceLink/SDLOnSystemRequest.h b/SmartDeviceLink/SDLOnSystemRequest.h
index b590f0650..c200c0bf5 100644
--- a/SmartDeviceLink/SDLOnSystemRequest.h
+++ b/SmartDeviceLink/SDLOnSystemRequest.h
@@ -3,8 +3,8 @@
#import "SDLRPCNotification.h"
-@class SDLFileType;
-@class SDLRequestType;
+#import "SDLFileType.h"
+#import "SDLRequestType.h"
@interface SDLOnSystemRequest : SDLRPCNotification {
@@ -13,10 +13,10 @@
- (instancetype)init;
- (instancetype)initWithDictionary:(NSMutableDictionary *)dict;
-@property (strong) SDLRequestType *requestType;
+@property (strong) SDLRequestType requestType;
@property (strong) NSString *url;
@property (strong) NSNumber *timeout;
-@property (strong) SDLFileType *fileType;
+@property (strong) SDLFileType fileType;
@property (strong) NSNumber *offset;
@property (strong) NSNumber *length;
diff --git a/SmartDeviceLink/SDLOnSystemRequest.m b/SmartDeviceLink/SDLOnSystemRequest.m
index c5aff7569..1777057cd 100644
--- a/SmartDeviceLink/SDLOnSystemRequest.m
+++ b/SmartDeviceLink/SDLOnSystemRequest.m
@@ -3,10 +3,7 @@
#import "SDLOnSystemRequest.h"
-#import "SDLFileType.h"
#import "SDLNames.h"
-#import "SDLRequestType.h"
-
@implementation SDLOnSystemRequest
@@ -22,7 +19,7 @@
return self;
}
-- (void)setRequestType:(SDLRequestType *)requestType {
+- (void)setRequestType:(SDLRequestType)requestType {
if (requestType != nil) {
[parameters setObject:requestType forKey:NAMES_requestType];
} else {
@@ -30,13 +27,9 @@
}
}
-- (SDLRequestType *)requestType {
+- (SDLRequestType)requestType {
NSObject *obj = [parameters objectForKey:NAMES_requestType];
- if (obj == nil || [obj isKindOfClass:SDLRequestType.class]) {
- return (SDLRequestType *)obj;
- } else {
- return [SDLRequestType valueOf:(NSString *)obj];
- }
+ return (SDLRequestType)obj;
}
- (void)setUrl:(NSString *)url {
@@ -63,7 +56,7 @@
return [parameters objectForKey:NAMES_timeout];
}
-- (void)setFileType:(SDLFileType *)fileType {
+- (void)setFileType:(SDLFileType)fileType {
if (fileType != nil) {
[parameters setObject:fileType forKey:NAMES_fileType];
} else {
@@ -71,13 +64,9 @@
}
}
-- (SDLFileType *)fileType {
+- (SDLFileType)fileType {
NSObject *obj = [parameters objectForKey:NAMES_fileType];
- if (obj == nil || [obj isKindOfClass:SDLFileType.class]) {
- return (SDLFileType *)obj;
- } else {
- return [SDLFileType valueOf:(NSString *)obj];
- }
+ return (SDLFileType)obj;
}
- (void)setOffset:(NSNumber *)offset {
diff --git a/SmartDeviceLink/SDLOnTBTClientState.h b/SmartDeviceLink/SDLOnTBTClientState.h
index 8dec001ca..7c337c681 100644
--- a/SmartDeviceLink/SDLOnTBTClientState.h
+++ b/SmartDeviceLink/SDLOnTBTClientState.h
@@ -3,8 +3,7 @@
#import "SDLRPCNotification.h"
-@class SDLTBTState;
-
+#import "SDLTBTState.h"
@interface SDLOnTBTClientState : SDLRPCNotification {
}
@@ -12,6 +11,6 @@
- (instancetype)init;
- (instancetype)initWithDictionary:(NSMutableDictionary *)dict;
-@property (strong) SDLTBTState *state;
+@property (strong) SDLTBTState state;
@end
diff --git a/SmartDeviceLink/SDLOnTBTClientState.m b/SmartDeviceLink/SDLOnTBTClientState.m
index ee0dc1efc..84a0081d0 100644
--- a/SmartDeviceLink/SDLOnTBTClientState.m
+++ b/SmartDeviceLink/SDLOnTBTClientState.m
@@ -4,8 +4,6 @@
#import "SDLOnTBTClientState.h"
#import "SDLNames.h"
-#import "SDLTBTState.h"
-
@implementation SDLOnTBTClientState
@@ -21,7 +19,7 @@
return self;
}
-- (void)setState:(SDLTBTState *)state {
+- (void)setState:(SDLTBTState)state {
if (state != nil) {
[parameters setObject:state forKey:NAMES_state];
} else {
@@ -29,13 +27,9 @@
}
}
-- (SDLTBTState *)state {
+- (SDLTBTState)state {
NSObject *obj = [parameters objectForKey:NAMES_state];
- if (obj == nil || [obj isKindOfClass:SDLTBTState.class]) {
- return (SDLTBTState *)obj;
- } else {
- return [SDLTBTState valueOf:(NSString *)obj];
- }
+ return (SDLTBTState)obj;
}
@end
diff --git a/SmartDeviceLink/SDLOnTouchEvent.h b/SmartDeviceLink/SDLOnTouchEvent.h
index 68f1fa707..05a77e9c7 100644
--- a/SmartDeviceLink/SDLOnTouchEvent.h
+++ b/SmartDeviceLink/SDLOnTouchEvent.h
@@ -3,8 +3,7 @@
#import "SDLRPCNotification.h"
-@class SDLTouchType;
-
+#import "SDLTouchType.h"
@interface SDLOnTouchEvent : SDLRPCNotification {
}
@@ -12,7 +11,7 @@
- (instancetype)init;
- (instancetype)initWithDictionary:(NSMutableDictionary *)dict;
-@property (strong) SDLTouchType *type;
+@property (strong) SDLTouchType type;
@property (strong) NSMutableArray *event;
@end
diff --git a/SmartDeviceLink/SDLOnTouchEvent.m b/SmartDeviceLink/SDLOnTouchEvent.m
index e73c79603..45e7ae5eb 100644
--- a/SmartDeviceLink/SDLOnTouchEvent.m
+++ b/SmartDeviceLink/SDLOnTouchEvent.m
@@ -5,7 +5,6 @@
#import "SDLNames.h"
#import "SDLTouchEvent.h"
-#import "SDLTouchType.h"
@implementation SDLOnTouchEvent
@@ -22,7 +21,7 @@
return self;
}
-- (void)setType:(SDLTouchType *)type {
+- (void)setType:(SDLTouchType)type {
if (type != nil) {
[parameters setObject:type forKey:NAMES_type];
} else {
@@ -30,13 +29,9 @@
}
}
-- (SDLTouchType *)type {
+- (SDLTouchType)type {
NSObject *obj = [parameters objectForKey:NAMES_type];
- if (obj == nil || [obj isKindOfClass:SDLTouchType.class]) {
- return (SDLTouchType *)obj;
- } else {
- return [SDLTouchType valueOf:(NSString *)obj];
- }
+ return (SDLTouchType)obj;
}
- (void)setEvent:(NSMutableArray *)event {
diff --git a/SmartDeviceLink/SDLOnVehicleData.h b/SmartDeviceLink/SDLOnVehicleData.h
index 245477e3b..889fec647 100644
--- a/SmartDeviceLink/SDLOnVehicleData.h
+++ b/SmartDeviceLink/SDLOnVehicleData.h
@@ -3,21 +3,22 @@
#import "SDLRPCNotification.h"
+#import "SDLComponentVolumeStatus.h"
+#import "SDLPRNDL.h"
+#import "SDLVehicleDataEventStatus.h"
+#import "SDLWiperStatus.h"
+
@class SDLAirbagStatus;
@class SDLBeltStatus;
@class SDLBodyInformation;
@class SDLClusterModeStatus;
-@class SDLComponentVolumeStatus;
@class SDLDeviceStatus;
@class SDLECallInfo;
@class SDLEmergencyEvent;
@class SDLGPSData;
@class SDLHeadLampStatus;
@class SDLMyKey;
-@class SDLPRNDL;
@class SDLTireStatus;
-@class SDLVehicleDataEventStatus;
-@class SDLWiperStatus;
/**
@@ -64,7 +65,7 @@
/**
* @abstract A SDLComponentVolumeStatus* value. The fuel level state.
*/
-@property (strong) SDLComponentVolumeStatus *fuelLevel_State;
+@property (strong) SDLComponentVolumeStatus fuelLevel_State;
/**
* @abstract The instantaneous fuel consumption in microlitres.
@@ -84,7 +85,7 @@
/**
* @abstract See PRNDL.
*/
-@property (strong) SDLPRNDL *prndl;
+@property (strong) SDLPRNDL prndl;
/**
* @abstract A SDLTireStatus* value. See TireStatus.
@@ -114,12 +115,12 @@
/**
* @abstract A SDLVehicleDataResult* value. The status of the brake pedal.
*/
-@property (strong) SDLVehicleDataEventStatus *driverBraking;
+@property (strong) SDLVehicleDataEventStatus driverBraking;
/**
* @abstract A SDLWiperStatus* value. The status of the wipers.
*/
-@property (strong) SDLWiperStatus *wiperStatus;
+@property (strong) SDLWiperStatus wiperStatus;
/**
* @abstract A SDLHeadLampStatus* value. Status of the head lamps.
diff --git a/SmartDeviceLink/SDLOnVehicleData.m b/SmartDeviceLink/SDLOnVehicleData.m
index 3386ca450..146be4280 100644
--- a/SmartDeviceLink/SDLOnVehicleData.m
+++ b/SmartDeviceLink/SDLOnVehicleData.m
@@ -7,7 +7,6 @@
#import "SDLBeltStatus.h"
#import "SDLBodyInformation.h"
#import "SDLClusterModeStatus.h"
-#import "SDLComponentVolumeStatus.h"
#import "SDLDeviceStatus.h"
#import "SDLECallInfo.h"
#import "SDLEmergencyEvent.h"
@@ -15,10 +14,7 @@
#import "SDLHeadLampStatus.h"
#import "SDLMyKey.h"
#import "SDLNames.h"
-#import "SDLPRNDL.h"
#import "SDLTireStatus.h"
-#import "SDLVehicleDataEventStatus.h"
-#import "SDLWiperStatus.h"
@implementation SDLOnVehicleData
@@ -88,7 +84,7 @@
return [parameters objectForKey:NAMES_fuelLevel];
}
-- (void)setFuelLevel_State:(SDLComponentVolumeStatus *)fuelLevel_State {
+- (void)setFuelLevel_State:(SDLComponentVolumeStatus)fuelLevel_State {
if (fuelLevel_State != nil) {
[parameters setObject:fuelLevel_State forKey:NAMES_fuelLevel_State];
} else {
@@ -96,13 +92,9 @@
}
}
-- (SDLComponentVolumeStatus *)fuelLevel_State {
+- (SDLComponentVolumeStatus)fuelLevel_State {
NSObject *obj = [parameters objectForKey:NAMES_fuelLevel_State];
- if (obj == nil || [obj isKindOfClass:SDLComponentVolumeStatus.class]) {
- return (SDLComponentVolumeStatus *)obj;
- } else {
- return [SDLComponentVolumeStatus valueOf:(NSString *)obj];
- }
+ return (SDLComponentVolumeStatus)obj;
}
- (void)setInstantFuelConsumption:(NSNumber *)instantFuelConsumption {
@@ -141,7 +133,7 @@
return [parameters objectForKey:NAMES_vin];
}
-- (void)setPrndl:(SDLPRNDL *)prndl {
+- (void)setPrndl:(SDLPRNDL)prndl {
if (prndl != nil) {
[parameters setObject:prndl forKey:NAMES_prndl];
} else {
@@ -149,13 +141,9 @@
}
}
-- (SDLPRNDL *)prndl {
+- (SDLPRNDL)prndl {
NSObject *obj = [parameters objectForKey:NAMES_prndl];
- if (obj == nil || [obj isKindOfClass:SDLPRNDL.class]) {
- return (SDLPRNDL *)obj;
- } else {
- return [SDLPRNDL valueOf:(NSString *)obj];
- }
+ return (SDLPRNDL)obj;
}
- (void)setTirePressure:(SDLTireStatus *)tirePressure {
@@ -238,7 +226,7 @@
}
}
-- (void)setDriverBraking:(SDLVehicleDataEventStatus *)driverBraking {
+- (void)setDriverBraking:(SDLVehicleDataEventStatus)driverBraking {
if (driverBraking != nil) {
[parameters setObject:driverBraking forKey:NAMES_driverBraking];
} else {
@@ -246,16 +234,12 @@
}
}
-- (SDLVehicleDataEventStatus *)driverBraking {
+- (SDLVehicleDataEventStatus)driverBraking {
NSObject *obj = [parameters objectForKey:NAMES_driverBraking];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataEventStatus.class]) {
- return (SDLVehicleDataEventStatus *)obj;
- } else {
- return [SDLVehicleDataEventStatus valueOf:(NSString *)obj];
- }
+ return (SDLVehicleDataEventStatus)obj;
}
-- (void)setWiperStatus:(SDLWiperStatus *)wiperStatus {
+- (void)setWiperStatus:(SDLWiperStatus)wiperStatus {
if (wiperStatus != nil) {
[parameters setObject:wiperStatus forKey:NAMES_wiperStatus];
} else {
@@ -263,13 +247,9 @@
}
}
-- (SDLWiperStatus *)wiperStatus {
+- (SDLWiperStatus)wiperStatus {
NSObject *obj = [parameters objectForKey:NAMES_wiperStatus];
- if (obj == nil || [obj isKindOfClass:SDLWiperStatus.class]) {
- return (SDLWiperStatus *)obj;
- } else {
- return [SDLWiperStatus valueOf:(NSString *)obj];
- }
+ return (SDLWiperStatus)obj;
}
- (void)setHeadLampStatus:(SDLHeadLampStatus *)headLampStatus {
diff --git a/SmartDeviceLink/SDLPRNDL.h b/SmartDeviceLink/SDLPRNDL.h
index 6095d1a82..26c0268c9 100644
--- a/SmartDeviceLink/SDLPRNDL.h
+++ b/SmartDeviceLink/SDLPRNDL.h
@@ -9,135 +9,84 @@
*
* @since SDL 2.0
*/
-@interface SDLPRNDL : SDLEnum {
-}
-
-/**
- * @abstract get SDLPRNDL according value string
- *
- * @param value The value of the string to get an object for
- *
- * @return SDLPRNDL object
- */
-+ (SDLPRNDL *)valueOf:(NSString *)value;
-
-/**
- * @abstract declare an array to store all possible SDLPRNDL values
- *
- * @return the array
- */
-+ (NSArray *)values;
+typedef SDLEnum SDLPRNDL NS_EXTENSIBLE_STRING_ENUM;
/**
* @abstract Park
- *
- * @return SDLPRNDL: *PARK*
*/
-+ (SDLPRNDL *)PARK;
+extern SDLPRNDL const SDLPRNDLPark;
/**
* @abstract Reverse gear
- *
- * @return SDLPRNDL: *REVERSE*
*/
-+ (SDLPRNDL *)REVERSE;
+extern SDLPRNDL const SDLPRNDLReverse;
/**
* @abstract No gear
- *
- * @return SDLPRNDL: *NEUTRAL*
*/
-+ (SDLPRNDL *)NEUTRAL;
+extern SDLPRNDL const SDLPRNDLNeutral;
/**
* @abstract: Drive gear
- *
- * @return SDLPRNDL: *DRIVE*
*/
-+ (SDLPRNDL *)DRIVE;
+extern SDLPRNDL const SDLPRNDLDrive;
/**
* @abstract Drive Sport mode
- *
- * @return SDLPRNDL: *SPORT*
*/
-+ (SDLPRNDL *)SPORT;
+extern SDLPRNDL const SDLPRNDLSport;
/**
* @abstract 1st gear hold
- *
- * @return SDLPRNDL: *LOWGEAR*
*/
-+ (SDLPRNDL *)LOWGEAR;
+extern SDLPRNDL const SDLPRNDLLowGear;
/**
* @abstract First gear
- *
- * @return SDLPRNDL: *FIRST*
*/
-+ (SDLPRNDL *)FIRST;
+extern SDLPRNDL const SDLPRNDLFirst;
/**
* @abstract Second gear
- *
- * @return SDLPRNDL: *SECOND*
*/
-+ (SDLPRNDL *)SECOND;
+extern SDLPRNDL const SDLPRNDLSecond;
/**
* @abstract Third gear
- *
- * @return SDLPRNDL: *THIRD*
*/
-+ (SDLPRNDL *)THIRD;
+extern SDLPRNDL const SDLPRNDLThird;
/**
* @abstract Fourth gear
- *
- * @return SDLPRNDL: *FOURTH*
*/
-+ (SDLPRNDL *)FOURTH;
+extern SDLPRNDL const SDLPRNDLFourth;
/**
* @abstract Fifth gear
- *
- * @return SDLPRNDL: *FIFTH*
*/
-+ (SDLPRNDL *)FIFTH;
+extern SDLPRNDL const SDLPRNDLFifth;
/**
* @abstract Sixth gear
- *
- * @return SDLPRNDL: *SIXTH*
*/
-+ (SDLPRNDL *)SIXTH;
+extern SDLPRNDL const SDLPRNDLSixth;
/**
* @abstract Seventh gear
- *
- * @return SDLPRNDL: *SEVENTH*
*/
-+ (SDLPRNDL *)SEVENTH;
+extern SDLPRNDL const SDLPRNDLSeventh;
/**
* @abstract Eighth gear
- *
- * @return SDLPRNDL: *EIGHTH*
*/
-+ (SDLPRNDL *)EIGHTH;
+extern SDLPRNDL const SDLPRNDLEigth;
/**
* @abstract Unknown
- *
- * @return SDLPRNDL: *UNKNOWN*
*/
-+ (SDLPRNDL *)UNKNOWN;
+extern SDLPRNDL const SDLPRNDLUnknown;
/**
* @abstract Fault
- *
- * @return SDLPRNDL: *FAULT*
*/
-+ (SDLPRNDL *)FAULT;
-
-@end
+extern SDLPRNDL const SDLPRNDLFault;
diff --git a/SmartDeviceLink/SDLPRNDL.m b/SmartDeviceLink/SDLPRNDL.m
index e0588af77..77eed8336 100644
--- a/SmartDeviceLink/SDLPRNDL.m
+++ b/SmartDeviceLink/SDLPRNDL.m
@@ -4,170 +4,19 @@
#import "SDLPRNDL.h"
-SDLPRNDL *SDLPRNDL_PARK = nil;
-SDLPRNDL *SDLPRNDL_REVERSE = nil;
-SDLPRNDL *SDLPRNDL_NEUTRAL = nil;
-SDLPRNDL *SDLPRNDL_DRIVE = nil;
-SDLPRNDL *SDLPRNDL_SPORT = nil;
-SDLPRNDL *SDLPRNDL_LOWGEAR = nil;
-SDLPRNDL *SDLPRNDL_FIRST = nil;
-SDLPRNDL *SDLPRNDL_SECOND = nil;
-SDLPRNDL *SDLPRNDL_THIRD = nil;
-SDLPRNDL *SDLPRNDL_FOURTH = nil;
-SDLPRNDL *SDLPRNDL_FIFTH = nil;
-SDLPRNDL *SDLPRNDL_SIXTH = nil;
-SDLPRNDL *SDLPRNDL_SEVENTH = nil;
-SDLPRNDL *SDLPRNDL_EIGHTH = nil;
-SDLPRNDL *SDLPRNDL_UNKNOWN = nil;
-SDLPRNDL *SDLPRNDL_FAULT = nil;
-
-NSArray *SDLPRNDL_values = nil;
-
-@implementation SDLPRNDL
-
-+ (SDLPRNDL *)valueOf:(NSString *)value {
- for (SDLPRNDL *item in SDLPRNDL.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLPRNDL_values == nil) {
- SDLPRNDL_values = @[
- SDLPRNDL.PARK,
- SDLPRNDL.REVERSE,
- SDLPRNDL.NEUTRAL,
- SDLPRNDL.DRIVE,
- SDLPRNDL.SPORT,
- SDLPRNDL.LOWGEAR,
- SDLPRNDL.FIRST,
- SDLPRNDL.SECOND,
- SDLPRNDL.THIRD,
- SDLPRNDL.FOURTH,
- SDLPRNDL.FIFTH,
- SDLPRNDL.SIXTH,
- SDLPRNDL.SEVENTH,
- SDLPRNDL.EIGHTH,
- SDLPRNDL.UNKNOWN,
- SDLPRNDL.FAULT,
- ];
- }
- return SDLPRNDL_values;
-}
-
-+ (SDLPRNDL *)PARK {
- if (SDLPRNDL_PARK == nil) {
- SDLPRNDL_PARK = [[SDLPRNDL alloc] initWithValue:@"PARK"];
- }
- return SDLPRNDL_PARK;
-}
-
-+ (SDLPRNDL *)REVERSE {
- if (SDLPRNDL_REVERSE == nil) {
- SDLPRNDL_REVERSE = [[SDLPRNDL alloc] initWithValue:@"REVERSE"];
- }
- return SDLPRNDL_REVERSE;
-}
-
-+ (SDLPRNDL *)NEUTRAL {
- if (SDLPRNDL_NEUTRAL == nil) {
- SDLPRNDL_NEUTRAL = [[SDLPRNDL alloc] initWithValue:@"NEUTRAL"];
- }
- return SDLPRNDL_NEUTRAL;
-}
-
-+ (SDLPRNDL *)DRIVE {
- if (SDLPRNDL_DRIVE == nil) {
- SDLPRNDL_DRIVE = [[SDLPRNDL alloc] initWithValue:@"DRIVE"];
- }
- return SDLPRNDL_DRIVE;
-}
-
-+ (SDLPRNDL *)SPORT {
- if (SDLPRNDL_SPORT == nil) {
- SDLPRNDL_SPORT = [[SDLPRNDL alloc] initWithValue:@"SPORT"];
- }
- return SDLPRNDL_SPORT;
-}
-
-+ (SDLPRNDL *)LOWGEAR {
- if (SDLPRNDL_LOWGEAR == nil) {
- SDLPRNDL_LOWGEAR = [[SDLPRNDL alloc] initWithValue:@"LOWGEAR"];
- }
- return SDLPRNDL_LOWGEAR;
-}
-
-+ (SDLPRNDL *)FIRST {
- if (SDLPRNDL_FIRST == nil) {
- SDLPRNDL_FIRST = [[SDLPRNDL alloc] initWithValue:@"FIRST"];
- }
- return SDLPRNDL_FIRST;
-}
-
-+ (SDLPRNDL *)SECOND {
- if (SDLPRNDL_SECOND == nil) {
- SDLPRNDL_SECOND = [[SDLPRNDL alloc] initWithValue:@"SECOND"];
- }
- return SDLPRNDL_SECOND;
-}
-
-+ (SDLPRNDL *)THIRD {
- if (SDLPRNDL_THIRD == nil) {
- SDLPRNDL_THIRD = [[SDLPRNDL alloc] initWithValue:@"THIRD"];
- }
- return SDLPRNDL_THIRD;
-}
-
-+ (SDLPRNDL *)FOURTH {
- if (SDLPRNDL_FOURTH == nil) {
- SDLPRNDL_FOURTH = [[SDLPRNDL alloc] initWithValue:@"FOURTH"];
- }
- return SDLPRNDL_FOURTH;
-}
-
-+ (SDLPRNDL *)FIFTH {
- if (SDLPRNDL_FIFTH == nil) {
- SDLPRNDL_FIFTH = [[SDLPRNDL alloc] initWithValue:@"FIFTH"];
- }
- return SDLPRNDL_FIFTH;
-}
-
-+ (SDLPRNDL *)SIXTH {
- if (SDLPRNDL_SIXTH == nil) {
- SDLPRNDL_SIXTH = [[SDLPRNDL alloc] initWithValue:@"SIXTH"];
- }
- return SDLPRNDL_SIXTH;
-}
-
-+ (SDLPRNDL *)SEVENTH {
- if (SDLPRNDL_SEVENTH == nil) {
- SDLPRNDL_SEVENTH = [[SDLPRNDL alloc] initWithValue:@"SEVENTH"];
- }
- return SDLPRNDL_SEVENTH;
-}
-
-+ (SDLPRNDL *)EIGHTH {
- if (SDLPRNDL_EIGHTH == nil) {
- SDLPRNDL_EIGHTH = [[SDLPRNDL alloc] initWithValue:@"EIGHTH"];
- }
- return SDLPRNDL_EIGHTH;
-}
-
-+ (SDLPRNDL *)UNKNOWN {
- if (SDLPRNDL_UNKNOWN == nil) {
- SDLPRNDL_UNKNOWN = [[SDLPRNDL alloc] initWithValue:@"UNKNOWN"];
- }
- return SDLPRNDL_UNKNOWN;
-}
-
-+ (SDLPRNDL *)FAULT {
- if (SDLPRNDL_FAULT == nil) {
- SDLPRNDL_FAULT = [[SDLPRNDL alloc] initWithValue:@"FAULT"];
- }
- return SDLPRNDL_FAULT;
-}
-
-@end
+SDLPRNDL const SDLPRNDLPark = @"PARK";
+SDLPRNDL const SDLPRNDLReverse = @"REVERSE";
+SDLPRNDL const SDLPRNDLNeutral = @"NEUTRAL";
+SDLPRNDL const SDLPRNDLDrive = @"DRIVE";
+SDLPRNDL const SDLPRNDLSport = @"SPORT";
+SDLPRNDL const SDLPRNDLLowGear = @"LOWGEAR";
+SDLPRNDL const SDLPRNDLFirst = @"FIRST";
+SDLPRNDL const SDLPRNDLSecond = @"SECOND";
+SDLPRNDL const SDLPRNDLThird = @"THIRD";
+SDLPRNDL const SDLPRNDLFourth = @"FOURTH";
+SDLPRNDL const SDLPRNDLFifth = @"FIFTH";
+SDLPRNDL const SDLPRNDLSixth = @"SIXTH";
+SDLPRNDL const SDLPRNDLSeventh = @"SEVENTH";
+SDLPRNDL const SDLPRNDLEighth = @"EIGHTH";
+SDLPRNDL const SDLPRNDLUnknown = @"UNKNOWN";
+SDLPRNDL const SDLPRNDLFault = @"FAULT";
diff --git a/SmartDeviceLink/SDLPerformAudioPassThru.h b/SmartDeviceLink/SDLPerformAudioPassThru.h
index 66dfacf19..955eb9853 100644
--- a/SmartDeviceLink/SDLPerformAudioPassThru.h
+++ b/SmartDeviceLink/SDLPerformAudioPassThru.h
@@ -3,10 +3,9 @@
#import "SDLRPCRequest.h"
-@class SDLSamplingRate;
-@class SDLBitsPerSample;
-@class SDLAudioType;
-
+#import "SDLAudioType.h"
+#import "SDLBitsPerSample.h"
+#import "SDLSamplingRate.h"
/**
* This will open an audio pass thru session. By doing so the app can receive
@@ -74,7 +73,7 @@
*
* @discussion a SamplingRate value representing a 8 or 16 or 22 or 24 khz
*/
-@property (strong) SDLSamplingRate *samplingRate;
+@property (strong) SDLSamplingRate samplingRate;
/**
* @abstract the maximum duration of audio recording in milliseconds
*
@@ -90,11 +89,11 @@
*
* @discussion a BitsPerSample value representing 8 bit or 16 bit
*/
-@property (strong) SDLBitsPerSample *bitsPerSample;
+@property (strong) SDLBitsPerSample bitsPerSample;
/**
* @abstract an audioType
*/
-@property (strong) SDLAudioType *audioType;
+@property (strong) SDLAudioType audioType;
/**
* @abstract a Boolean value representing if the current audio source should be
* muted during the APT session<br/>
diff --git a/SmartDeviceLink/SDLPerformAudioPassThru.m b/SmartDeviceLink/SDLPerformAudioPassThru.m
index 67b0f05c3..bbd42725a 100644
--- a/SmartDeviceLink/SDLPerformAudioPassThru.m
+++ b/SmartDeviceLink/SDLPerformAudioPassThru.m
@@ -4,10 +4,7 @@
#import "SDLPerformAudioPassThru.h"
-#import "SDLAudioType.h"
-#import "SDLBitsPerSample.h"
#import "SDLNames.h"
-#import "SDLSamplingRate.h"
#import "SDLTTSChunk.h"
@@ -70,7 +67,7 @@
return [parameters objectForKey:NAMES_audioPassThruDisplayText2];
}
-- (void)setSamplingRate:(SDLSamplingRate *)samplingRate {
+- (void)setSamplingRate:(SDLSamplingRate)samplingRate {
if (samplingRate != nil) {
[parameters setObject:samplingRate forKey:NAMES_samplingRate];
} else {
@@ -78,13 +75,9 @@
}
}
-- (SDLSamplingRate *)samplingRate {
+- (SDLSamplingRate)samplingRate {
NSObject *obj = [parameters objectForKey:NAMES_samplingRate];
- if (obj == nil || [obj isKindOfClass:SDLSamplingRate.class]) {
- return (SDLSamplingRate *)obj;
- } else {
- return [SDLSamplingRate valueOf:(NSString *)obj];
- }
+ return (SDLSamplingRate )obj;
}
- (void)setMaxDuration:(NSNumber *)maxDuration {
@@ -99,7 +92,7 @@
return [parameters objectForKey:NAMES_maxDuration];
}
-- (void)setBitsPerSample:(SDLBitsPerSample *)bitsPerSample {
+- (void)setBitsPerSample:(SDLBitsPerSample)bitsPerSample {
if (bitsPerSample != nil) {
[parameters setObject:bitsPerSample forKey:NAMES_bitsPerSample];
} else {
@@ -107,16 +100,12 @@
}
}
-- (SDLBitsPerSample *)bitsPerSample {
+- (SDLBitsPerSample)bitsPerSample {
NSObject *obj = [parameters objectForKey:NAMES_bitsPerSample];
- if (obj == nil || [obj isKindOfClass:SDLBitsPerSample.class]) {
- return (SDLBitsPerSample *)obj;
- } else {
- return [SDLBitsPerSample valueOf:(NSString *)obj];
- }
+ return (SDLBitsPerSample)obj;
}
-- (void)setAudioType:(SDLAudioType *)audioType {
+- (void)setAudioType:(SDLAudioType)audioType {
if (audioType != nil) {
[parameters setObject:audioType forKey:NAMES_audioType];
} else {
@@ -124,13 +113,9 @@
}
}
-- (SDLAudioType *)audioType {
+- (SDLAudioType)audioType {
NSObject *obj = [parameters objectForKey:NAMES_audioType];
- if (obj == nil || [obj isKindOfClass:SDLAudioType.class]) {
- return (SDLAudioType *)obj;
- } else {
- return [SDLAudioType valueOf:(NSString *)obj];
- }
+ return (SDLAudioType)obj;
}
- (void)setMuteAudio:(NSNumber *)muteAudio {
diff --git a/SmartDeviceLink/SDLPerformInteraction.h b/SmartDeviceLink/SDLPerformInteraction.h
index 29f166c96..126e91d2a 100644
--- a/SmartDeviceLink/SDLPerformInteraction.h
+++ b/SmartDeviceLink/SDLPerformInteraction.h
@@ -4,8 +4,8 @@
#import "SDLRPCRequest.h"
-@class SDLInteractionMode;
-@class SDLLayoutMode;
+#import "SDLInteractionMode.h"
+#import "SDLLayoutMode.h"
/**
@@ -53,7 +53,7 @@
* choice. User can choose either by voice (VR_ONLY), by visual selection
* from the menu (MANUAL_ONLY), or by either mode (BOTH)
*/
-@property (strong) SDLInteractionMode *interactionMode;
+@property (strong) SDLInteractionMode interactionMode;
/**
* @abstract A Vector<Integer> value representing an Array of one or more Choice
* Set IDs
@@ -80,6 +80,6 @@
* @since SmartDeviceLink 2.0
*/
@property (strong) NSMutableArray *vrHelp;
-@property (strong) SDLLayoutMode *interactionLayout;
+@property (strong) SDLLayoutMode interactionLayout;
@end
diff --git a/SmartDeviceLink/SDLPerformInteraction.m b/SmartDeviceLink/SDLPerformInteraction.m
index de6c3622f..784d4c5e2 100644
--- a/SmartDeviceLink/SDLPerformInteraction.m
+++ b/SmartDeviceLink/SDLPerformInteraction.m
@@ -4,8 +4,6 @@
#import "SDLPerformInteraction.h"
-#import "SDLInteractionMode.h"
-#import "SDLLayoutMode.h"
#import "SDLNames.h"
#import "SDLTTSChunk.h"
#import "SDLVRHelpItem.h"
@@ -57,7 +55,7 @@
}
}
-- (void)setInteractionMode:(SDLInteractionMode *)interactionMode {
+- (void)setInteractionMode:(SDLInteractionMode)interactionMode {
if (interactionMode != nil) {
[parameters setObject:interactionMode forKey:NAMES_interactionMode];
} else {
@@ -65,13 +63,9 @@
}
}
-- (SDLInteractionMode *)interactionMode {
+- (SDLInteractionMode)interactionMode {
NSObject *obj = [parameters objectForKey:NAMES_interactionMode];
- if (obj == nil || [obj isKindOfClass:SDLInteractionMode.class]) {
- return (SDLInteractionMode *)obj;
- } else {
- return [SDLInteractionMode valueOf:(NSString *)obj];
- }
+ return (SDLInteractionMode)obj;
}
- (void)setInteractionChoiceSetIDList:(NSMutableArray *)interactionChoiceSetIDList {
@@ -161,7 +155,7 @@
}
}
-- (void)setInteractionLayout:(SDLLayoutMode *)interactionLayout {
+- (void)setInteractionLayout:(SDLLayoutMode)interactionLayout {
if (interactionLayout != nil) {
[parameters setObject:interactionLayout forKey:NAMES_interactionLayout];
} else {
@@ -169,13 +163,9 @@
}
}
-- (SDLLayoutMode *)interactionLayout {
+- (SDLLayoutMode)interactionLayout {
NSObject *obj = [parameters objectForKey:NAMES_interactionLayout];
- if (obj == nil || [obj isKindOfClass:SDLLayoutMode.class]) {
- return (SDLLayoutMode *)obj;
- } else {
- return [SDLLayoutMode valueOf:(NSString *)obj];
- }
+ return (SDLLayoutMode)obj;
}
@end
diff --git a/SmartDeviceLink/SDLPerformInteractionResponse.h b/SmartDeviceLink/SDLPerformInteractionResponse.h
index b589f9492..4f279501f 100644
--- a/SmartDeviceLink/SDLPerformInteractionResponse.h
+++ b/SmartDeviceLink/SDLPerformInteractionResponse.h
@@ -4,8 +4,7 @@
#import "SDLRPCResponse.h"
-@class SDLTriggerSource;
-
+#import "SDLTriggerSource.h"
/**
* PerformInteraction Response is sent, when SDLPerformInteraction has been called
@@ -49,7 +48,7 @@
*
* @discussion Only is valid if resultCode is SUCCESS.
*/
-@property (strong) SDLTriggerSource *triggerSource;
+@property (strong) SDLTriggerSource triggerSource;
@end
diff --git a/SmartDeviceLink/SDLPerformInteractionResponse.m b/SmartDeviceLink/SDLPerformInteractionResponse.m
index ae1c5e14c..9cec15612 100644
--- a/SmartDeviceLink/SDLPerformInteractionResponse.m
+++ b/SmartDeviceLink/SDLPerformInteractionResponse.m
@@ -5,8 +5,6 @@
#import "SDLPerformInteractionResponse.h"
#import "SDLNames.h"
-#import "SDLTriggerSource.h"
-
@implementation SDLPerformInteractionResponse
@@ -46,7 +44,7 @@
return [parameters objectForKey:NAMES_manualTextEntry];
}
-- (void)setTriggerSource:(SDLTriggerSource *)triggerSource {
+- (void)setTriggerSource:(SDLTriggerSource)triggerSource {
if (triggerSource != nil) {
[parameters setObject:triggerSource forKey:NAMES_triggerSource];
} else {
@@ -54,13 +52,9 @@
}
}
-- (SDLTriggerSource *)triggerSource {
+- (SDLTriggerSource)triggerSource {
NSObject *obj = [parameters objectForKey:NAMES_triggerSource];
- if (obj == nil || [obj isKindOfClass:SDLTriggerSource.class]) {
- return (SDLTriggerSource *)obj;
- } else {
- return [SDLTriggerSource valueOf:(NSString *)obj];
- }
+ return (SDLTriggerSource)obj;
}
@end
diff --git a/SmartDeviceLink/SDLPermissionManager.h b/SmartDeviceLink/SDLPermissionManager.h
index 78d851f84..b5fb1793c 100644
--- a/SmartDeviceLink/SDLPermissionManager.h
+++ b/SmartDeviceLink/SDLPermissionManager.h
@@ -8,9 +8,9 @@
#import <Foundation/Foundation.h>
+#import "SDLHMILevel.h"
#import "SDLPermissionConstants.h"
-@class SDLHMILevel;
@class SDLPermissionItem;
diff --git a/SmartDeviceLink/SDLPermissionManager.m b/SmartDeviceLink/SDLPermissionManager.m
index 5939738ff..a76e49e86 100644
--- a/SmartDeviceLink/SDLPermissionManager.m
+++ b/SmartDeviceLink/SDLPermissionManager.m
@@ -8,7 +8,6 @@
#import "SDLPermissionManager.h"
-#import "SDLHMILevel.h"
#import "SDLHMIPermissions.h"
#import "SDLNotificationConstants.h"
#import "SDLOnHMIStatus.h"
@@ -25,7 +24,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (copy, nonatomic) NSMutableDictionary<SDLPermissionRPCName *, SDLPermissionItem *> *permissions;
@property (copy, nonatomic) NSMutableArray<SDLPermissionFilter *> *filters;
-@property (copy, nonatomic, nullable) SDLHMILevel *currentHMILevel;
+@property (copy, nonatomic, nullable) SDLHMILevel currentHMILevel;
@end
@@ -79,7 +78,7 @@ NS_ASSUME_NONNULL_BEGIN
return [self.class sdl_groupStatusOfRPCs:rpcNames withPermissions:[self.permissions copy] hmiLevel:self.currentHMILevel];
}
-+ (SDLPermissionGroupStatus)sdl_groupStatusOfRPCs:(NSArray<SDLPermissionRPCName *> *)rpcNames withPermissions:(NSDictionary<SDLPermissionRPCName *, SDLPermissionItem *> *)permissions hmiLevel:(SDLHMILevel *)hmiLevel {
++ (SDLPermissionGroupStatus)sdl_groupStatusOfRPCs:(NSArray<SDLPermissionRPCName *> *)rpcNames withPermissions:(NSDictionary<SDLPermissionRPCName *, SDLPermissionItem *> *)permissions hmiLevel:(SDLHMILevel)hmiLevel {
// If we don't have an HMI level, then just say everything is disallowed
if (hmiLevel == nil) {
return SDLPermissionGroupStatusUnknown;
@@ -227,7 +226,7 @@ NS_ASSUME_NONNULL_BEGIN
SDLOnHMIStatus *hmiStatus = notification.userInfo[SDLNotificationUserInfoObject];
- SDLHMILevel *oldHMILevel = [self.currentHMILevel copy];
+ SDLHMILevel oldHMILevel = [self.currentHMILevel copy];
self.currentHMILevel = hmiStatus.hmiLevel;
NSArray<SDLPermissionFilter *> *filters = [self.filters copy];
@@ -262,7 +261,7 @@ NS_ASSUME_NONNULL_BEGIN
*
* @return Whether or not the filter changed based on the difference in HMI levels.
*/
-- (BOOL)sdl_didFilterChange:(SDLPermissionFilter *)filter fromHMILevel:(SDLHMILevel *)oldHMILevel toHMILevel:(SDLHMILevel *)newHMILevel {
+- (BOOL)sdl_didFilterChange:(SDLPermissionFilter *)filter fromHMILevel:(SDLHMILevel)oldHMILevel toHMILevel:(SDLHMILevel)newHMILevel {
BOOL changed = NO;
for (NSString *rpcName in filter.rpcNames) {
SDLPermissionItem *item = self.permissions[rpcName];
diff --git a/SmartDeviceLink/SDLPermissionStatus.h b/SmartDeviceLink/SDLPermissionStatus.h
index 0ac9219ec..59d5c5b9c 100644
--- a/SmartDeviceLink/SDLPermissionStatus.h
+++ b/SmartDeviceLink/SDLPermissionStatus.h
@@ -9,47 +9,24 @@
*
* @since SDL 2.0
*/
-@interface SDLPermissionStatus : SDLEnum {
-}
-
-/**
- * @abstract SDLPermissionStatus
- *
- * @param value The value of the string to get an object for
- *
- * @return a SDLPermissionStatus object
- */
-+ (SDLPermissionStatus *)valueOf:(NSString *)value;
-
-/**
- * @abstract declare an array to store all possible SDLPermissionStatus values
- * @return the array
- */
-+ (NSArray *)values;
-
+typedef SDLEnum SDLPermissionStatus NS_EXTENSIBLE_STRING_ENUM;
/**
* @abstract permission: allowed
- * @return permission status: *ALLOWED*
*/
-+ (SDLPermissionStatus *)ALLOWED;
+extern SDLPermissionStatus const SDLPermissionStatusAllowed;
/**
* @abstract permission: disallowed
- * @return permission status: *DISALLOWED*
*/
-+ (SDLPermissionStatus *)DISALLOWED;
+extern SDLPermissionStatus const SDLPermissionStatusDisallowed;
/**
* @abstract permission: user disallowed
- * @return permission status: *USER_DISALLOWED*
*/
-+ (SDLPermissionStatus *)USER_DISALLOWED;
+extern SDLPermissionStatus const SDLPermissionStatusUserDisallowed;
/**
* @abstract permission: user consent pending
- * @return permission status: *USER_CONSENT_PENDING*
*/
-+ (SDLPermissionStatus *)USER_CONSENT_PENDING;
-
-@end
+extern SDLPermissionStatus const SDLPermissionStatusUserConsentPending;
diff --git a/SmartDeviceLink/SDLPermissionStatus.m b/SmartDeviceLink/SDLPermissionStatus.m
index 179cf2014..e2152c61f 100644
--- a/SmartDeviceLink/SDLPermissionStatus.m
+++ b/SmartDeviceLink/SDLPermissionStatus.m
@@ -4,62 +4,7 @@
#import "SDLPermissionStatus.h"
-SDLPermissionStatus *SDLPermissionStatus_ALLOWED = nil;
-SDLPermissionStatus *SDLPermissionStatus_DISALLOWED = nil;
-SDLPermissionStatus *SDLPermissionStatus_USER_DISALLOWED = nil;
-SDLPermissionStatus *SDLPermissionStatus_USER_CONSENT_PENDING = nil;
-
-NSArray *SDLPermissionStatus_values = nil;
-
-@implementation SDLPermissionStatus
-
-+ (SDLPermissionStatus *)valueOf:(NSString *)value {
- for (SDLPermissionStatus *item in SDLPermissionStatus.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLPermissionStatus_values == nil) {
- SDLPermissionStatus_values = @[
- SDLPermissionStatus.ALLOWED,
- SDLPermissionStatus.DISALLOWED,
- SDLPermissionStatus.USER_DISALLOWED,
- SDLPermissionStatus.USER_CONSENT_PENDING,
- ];
- }
- return SDLPermissionStatus_values;
-}
-
-+ (SDLPermissionStatus *)ALLOWED {
- if (SDLPermissionStatus_ALLOWED == nil) {
- SDLPermissionStatus_ALLOWED = [[SDLPermissionStatus alloc] initWithValue:@"ALLOWED"];
- }
- return SDLPermissionStatus_ALLOWED;
-}
-
-+ (SDLPermissionStatus *)DISALLOWED {
- if (SDLPermissionStatus_DISALLOWED == nil) {
- SDLPermissionStatus_DISALLOWED = [[SDLPermissionStatus alloc] initWithValue:@"DISALLOWED"];
- }
- return SDLPermissionStatus_DISALLOWED;
-}
-
-+ (SDLPermissionStatus *)USER_DISALLOWED {
- if (SDLPermissionStatus_USER_DISALLOWED == nil) {
- SDLPermissionStatus_USER_DISALLOWED = [[SDLPermissionStatus alloc] initWithValue:@"USER_DISALLOWED"];
- }
- return SDLPermissionStatus_USER_DISALLOWED;
-}
-
-+ (SDLPermissionStatus *)USER_CONSENT_PENDING {
- if (SDLPermissionStatus_USER_CONSENT_PENDING == nil) {
- SDLPermissionStatus_USER_CONSENT_PENDING = [[SDLPermissionStatus alloc] initWithValue:@"USER_CONSENT_PENDING"];
- }
- return SDLPermissionStatus_USER_CONSENT_PENDING;
-}
-
-@end
+SDLPermissionStatus const SDLPermissionStatusAllowed = @"ALLOWED";
+SDLPermissionStatus const SDLPermissionStatusDisallowed = @"DISALLOWED";
+SDLPermissionStatus const SDLPermissionStatusUserDisallowed = @"USER_DISALLOWED";
+SDLPermissionStatus const SDLPermissionStatusUserConentPending = @"USER_CONSENT_PENDING";
diff --git a/SmartDeviceLink/SDLPowerModeQualificationStatus.h b/SmartDeviceLink/SDLPowerModeQualificationStatus.h
index 4e520196b..301198d4b 100644
--- a/SmartDeviceLink/SDLPowerModeQualificationStatus.h
+++ b/SmartDeviceLink/SDLPowerModeQualificationStatus.h
@@ -4,15 +4,9 @@
#import "SDLEnum.h"
-@interface SDLPowerModeQualificationStatus : SDLEnum {
-}
+typedef SDLEnum SDLPowerModeQualificationStatus NS_EXTENSIBLE_STRING_ENUM;
-+ (SDLPowerModeQualificationStatus *)valueOf:(NSString *)value;
-+ (NSArray *)values;
-
-+ (SDLPowerModeQualificationStatus *)POWER_MODE_UNDEFINED;
-+ (SDLPowerModeQualificationStatus *)POWER_MODE_EVALUATION_IN_PROGRESS;
-+ (SDLPowerModeQualificationStatus *)NOT_DEFINED;
-+ (SDLPowerModeQualificationStatus *)POWER_MODE_OK;
-
-@end
+extern SDLPowerModeQualificationStatus const SDLPowerModeQualificationStatusPowerModeUndefined;
+extern SDLPowerModeQualificationStatus const SDLPowerModeQualificationStatusPowerModeEvaluationInProgress;
+extern SDLPowerModeQualificationStatus const SDLPowerModeQualificationStatusNotDefined;
+extern SDLPowerModeQualificationStatus const SDLPowerModeQualificationStatusPowerModeOk;
diff --git a/SmartDeviceLink/SDLPowerModeQualificationStatus.m b/SmartDeviceLink/SDLPowerModeQualificationStatus.m
index d820221e9..37253d06c 100644
--- a/SmartDeviceLink/SDLPowerModeQualificationStatus.m
+++ b/SmartDeviceLink/SDLPowerModeQualificationStatus.m
@@ -4,62 +4,7 @@
#import "SDLPowerModeQualificationStatus.h"
-SDLPowerModeQualificationStatus *SDLPowerModeQualificationStatus_POWER_MODE_UNDEFINED = nil;
-SDLPowerModeQualificationStatus *SDLPowerModeQualificationStatus_POWER_MODE_EVALUATION_IN_PROGRESS = nil;
-SDLPowerModeQualificationStatus *SDLPowerModeQualificationStatus_NOT_DEFINED = nil;
-SDLPowerModeQualificationStatus *SDLPowerModeQualificationStatus_POWER_MODE_OK = nil;
-
-NSArray *SDLPowerModeQualificationStatus_values = nil;
-
-@implementation SDLPowerModeQualificationStatus
-
-+ (SDLPowerModeQualificationStatus *)valueOf:(NSString *)value {
- for (SDLPowerModeQualificationStatus *item in SDLPowerModeQualificationStatus.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLPowerModeQualificationStatus_values == nil) {
- SDLPowerModeQualificationStatus_values = @[
- SDLPowerModeQualificationStatus.POWER_MODE_UNDEFINED,
- SDLPowerModeQualificationStatus.POWER_MODE_EVALUATION_IN_PROGRESS,
- SDLPowerModeQualificationStatus.NOT_DEFINED,
- SDLPowerModeQualificationStatus.POWER_MODE_OK,
- ];
- }
- return SDLPowerModeQualificationStatus_values;
-}
-
-+ (SDLPowerModeQualificationStatus *)POWER_MODE_UNDEFINED {
- if (SDLPowerModeQualificationStatus_POWER_MODE_UNDEFINED == nil) {
- SDLPowerModeQualificationStatus_POWER_MODE_UNDEFINED = [[SDLPowerModeQualificationStatus alloc] initWithValue:@"POWER_MODE_UNDEFINED"];
- }
- return SDLPowerModeQualificationStatus_POWER_MODE_UNDEFINED;
-}
-
-+ (SDLPowerModeQualificationStatus *)POWER_MODE_EVALUATION_IN_PROGRESS {
- if (SDLPowerModeQualificationStatus_POWER_MODE_EVALUATION_IN_PROGRESS == nil) {
- SDLPowerModeQualificationStatus_POWER_MODE_EVALUATION_IN_PROGRESS = [[SDLPowerModeQualificationStatus alloc] initWithValue:@"POWER_MODE_EVALUATION_IN_PROGRESS"];
- }
- return SDLPowerModeQualificationStatus_POWER_MODE_EVALUATION_IN_PROGRESS;
-}
-
-+ (SDLPowerModeQualificationStatus *)NOT_DEFINED {
- if (SDLPowerModeQualificationStatus_NOT_DEFINED == nil) {
- SDLPowerModeQualificationStatus_NOT_DEFINED = [[SDLPowerModeQualificationStatus alloc] initWithValue:@"NOT_DEFINED"];
- }
- return SDLPowerModeQualificationStatus_NOT_DEFINED;
-}
-
-+ (SDLPowerModeQualificationStatus *)POWER_MODE_OK {
- if (SDLPowerModeQualificationStatus_POWER_MODE_OK == nil) {
- SDLPowerModeQualificationStatus_POWER_MODE_OK = [[SDLPowerModeQualificationStatus alloc] initWithValue:@"POWER_MODE_OK"];
- }
- return SDLPowerModeQualificationStatus_POWER_MODE_OK;
-}
-
-@end
+SDLPowerModeQualificationStatus const SDLPowerModeQualificationStatusPowerModeUndefined = @"POWER_MODE_UNDEFINED";
+SDLPowerModeQualificationStatus const SDLPowerModeQualificationStatusPowerModeEvaluationInProgress = @"POWER_MODE_EVALUATION_IN_PROGRESS";
+SDLPowerModeQualificationStatus const SDLPowerModeQualificationStatusNotDefined = @"NOT_DEFINED";
+SDLPowerModeQualificationStatus const SDLPowerModeQualificationStatusPowerModeOk = @"POWER_MODE_OK";
diff --git a/SmartDeviceLink/SDLPowerModeStatus.h b/SmartDeviceLink/SDLPowerModeStatus.h
index 8eb24fdb4..a8f6d282d 100644
--- a/SmartDeviceLink/SDLPowerModeStatus.h
+++ b/SmartDeviceLink/SDLPowerModeStatus.h
@@ -4,20 +4,14 @@
#import "SDLEnum.h"
-@interface SDLPowerModeStatus : SDLEnum {
-}
+typedef SDLEnum SDLPowerModeStatus NS_EXTENSIBLE_STRING_ENUM;
-+ (SDLPowerModeStatus *)valueOf:(NSString *)value;
-+ (NSArray *)values;
-
-+ (SDLPowerModeStatus *)KEY_OUT;
-+ (SDLPowerModeStatus *)KEY_RECENTLY_OUT;
-+ (SDLPowerModeStatus *)KEY_APPROVED_0;
-+ (SDLPowerModeStatus *)POST_ACCESORY_0;
-+ (SDLPowerModeStatus *)ACCESORY_1;
-+ (SDLPowerModeStatus *)POST_IGNITION_1;
-+ (SDLPowerModeStatus *)IGNITION_ON_2;
-+ (SDLPowerModeStatus *)RUNNING_2;
-+ (SDLPowerModeStatus *)CRANK_3;
-
-@end
+extern SDLPowerModeStatus const SDLPowerModeStatusKeyOut;
+extern SDLPowerModeStatus const SDLPowerModeStatusKeyRecentlyOut;
+extern SDLPowerModeStatus const SDLPowerModeStatusKeyApproved;
+extern SDLPowerModeStatus const SDLPowerModeStatusPostAccessory;
+extern SDLPowerModeStatus const SDLPowerModeStatusAccessory;
+extern SDLPowerModeStatus const SDLPowerModeStatusPostIgnition;
+extern SDLPowerModeStatus const SDLPowerModeStatusIgnitionOn;
+extern SDLPowerModeStatus const SDLPowerModeStatusRunning;
+extern SDLPowerModeStatus const SDLPowerModeStatusCrank;
diff --git a/SmartDeviceLink/SDLPowerModeStatus.m b/SmartDeviceLink/SDLPowerModeStatus.m
index efc46a094..b1210d7a6 100644
--- a/SmartDeviceLink/SDLPowerModeStatus.m
+++ b/SmartDeviceLink/SDLPowerModeStatus.m
@@ -4,107 +4,12 @@
#import "SDLPowerModeStatus.h"
-SDLPowerModeStatus *SDLPowerModeStatus_KEY_OUT = nil;
-SDLPowerModeStatus *SDLPowerModeStatus_KEY_RECENTLY_OUT = nil;
-SDLPowerModeStatus *SDLPowerModeStatus_KEY_APPROVED_0 = nil;
-SDLPowerModeStatus *SDLPowerModeStatus_POST_ACCESORY_0 = nil;
-SDLPowerModeStatus *SDLPowerModeStatus_ACCESORY_1 = nil;
-SDLPowerModeStatus *SDLPowerModeStatus_POST_IGNITION_1 = nil;
-SDLPowerModeStatus *SDLPowerModeStatus_IGNITION_ON_2 = nil;
-SDLPowerModeStatus *SDLPowerModeStatus_RUNNING_2 = nil;
-SDLPowerModeStatus *SDLPowerModeStatus_CRANK_3 = nil;
-
-NSArray *SDLPowerModeStatus_values = nil;
-
-@implementation SDLPowerModeStatus
-
-+ (SDLPowerModeStatus *)valueOf:(NSString *)value {
- for (SDLPowerModeStatus *item in SDLPowerModeStatus.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLPowerModeStatus_values == nil) {
- SDLPowerModeStatus_values = @[
- SDLPowerModeStatus.KEY_OUT,
- SDLPowerModeStatus.KEY_RECENTLY_OUT,
- SDLPowerModeStatus.KEY_APPROVED_0,
- SDLPowerModeStatus.POST_ACCESORY_0,
- SDLPowerModeStatus.ACCESORY_1,
- SDLPowerModeStatus.POST_IGNITION_1,
- SDLPowerModeStatus.IGNITION_ON_2,
- SDLPowerModeStatus.RUNNING_2,
- SDLPowerModeStatus.CRANK_3,
- ];
- }
- return SDLPowerModeStatus_values;
-}
-
-+ (SDLPowerModeStatus *)KEY_OUT {
- if (SDLPowerModeStatus_KEY_OUT == nil) {
- SDLPowerModeStatus_KEY_OUT = [[SDLPowerModeStatus alloc] initWithValue:@"KEY_OUT"];
- }
- return SDLPowerModeStatus_KEY_OUT;
-}
-
-+ (SDLPowerModeStatus *)KEY_RECENTLY_OUT {
- if (SDLPowerModeStatus_KEY_RECENTLY_OUT == nil) {
- SDLPowerModeStatus_KEY_RECENTLY_OUT = [[SDLPowerModeStatus alloc] initWithValue:@"KEY_RECENTLY_OUT"];
- }
- return SDLPowerModeStatus_KEY_RECENTLY_OUT;
-}
-
-+ (SDLPowerModeStatus *)KEY_APPROVED_0 {
- if (SDLPowerModeStatus_KEY_APPROVED_0 == nil) {
- SDLPowerModeStatus_KEY_APPROVED_0 = [[SDLPowerModeStatus alloc] initWithValue:@"KEY_APPROVED_0"];
- }
- return SDLPowerModeStatus_KEY_APPROVED_0;
-}
-
-+ (SDLPowerModeStatus *)POST_ACCESORY_0 {
- if (SDLPowerModeStatus_POST_ACCESORY_0 == nil) {
- SDLPowerModeStatus_POST_ACCESORY_0 = [[SDLPowerModeStatus alloc] initWithValue:@"POST_ACCESORY_0"];
- }
- return SDLPowerModeStatus_POST_ACCESORY_0;
-}
-
-+ (SDLPowerModeStatus *)ACCESORY_1 {
- if (SDLPowerModeStatus_ACCESORY_1 == nil) {
- SDLPowerModeStatus_ACCESORY_1 = [[SDLPowerModeStatus alloc] initWithValue:@"ACCESORY_1"];
- }
- return SDLPowerModeStatus_ACCESORY_1;
-}
-
-+ (SDLPowerModeStatus *)POST_IGNITION_1 {
- if (SDLPowerModeStatus_POST_IGNITION_1 == nil) {
- SDLPowerModeStatus_POST_IGNITION_1 = [[SDLPowerModeStatus alloc] initWithValue:@"POST_IGNITION_1"];
- }
- return SDLPowerModeStatus_POST_IGNITION_1;
-}
-
-+ (SDLPowerModeStatus *)IGNITION_ON_2 {
- if (SDLPowerModeStatus_IGNITION_ON_2 == nil) {
- SDLPowerModeStatus_IGNITION_ON_2 = [[SDLPowerModeStatus alloc] initWithValue:@"IGNITION_ON_2"];
- }
- return SDLPowerModeStatus_IGNITION_ON_2;
-}
-
-+ (SDLPowerModeStatus *)RUNNING_2 {
- if (SDLPowerModeStatus_RUNNING_2 == nil) {
- SDLPowerModeStatus_RUNNING_2 = [[SDLPowerModeStatus alloc] initWithValue:@"RUNNING_2"];
- }
- return SDLPowerModeStatus_RUNNING_2;
-}
-
-+ (SDLPowerModeStatus *)CRANK_3 {
- if (SDLPowerModeStatus_CRANK_3 == nil) {
- SDLPowerModeStatus_CRANK_3 = [[SDLPowerModeStatus alloc] initWithValue:@"CRANK_3"];
- }
- return SDLPowerModeStatus_CRANK_3;
-}
-
-@end
+SDLPowerModeStatus const SDLPowerModeStatusKeyOut = @"KEY_OUT";
+SDLPowerModeStatus const SDLPowerModeStatusKeyRecentlyOut = @"KEY_RECENTLY_OUT";
+SDLPowerModeStatus const SDLPowerModeStatusKeyApproved = @"KEY_APPROVED_0";
+SDLPowerModeStatus const SDLPowerModeStatusPostAccessory = @"POST_ACCESORY_0";
+SDLPowerModeStatus const SDLPowerModeStatusAccessory = @"ACCESORY_1";
+SDLPowerModeStatus const SDLPowerModeStatusPostIgnition = @"POST_IGNITION_1";
+SDLPowerModeStatus const SDLPowerModeStatusIgnitionOn = @"IGNITION_ON_2";
+SDLPowerModeStatus const SDLPowerModeStatusRunning = @"RUNNING_2";
+SDLPowerModeStatus const SDLPowerModeStatusCrank = @"CRANK_3";
diff --git a/SmartDeviceLink/SDLPredefinedLayout.h b/SmartDeviceLink/SDLPredefinedLayout.h
index 7d061d449..f7332983c 100644
--- a/SmartDeviceLink/SDLPredefinedLayout.h
+++ b/SmartDeviceLink/SDLPredefinedLayout.h
@@ -4,31 +4,25 @@
#import "SDLEnum.h"
-@interface SDLPredefinedLayout : SDLEnum {
-}
+typedef SDLEnum SDLPredefinedLayout NS_EXTENSIBLE_STRING_ENUM;
-+ (SDLPredefinedLayout *)valueOf:(NSString *)value;
-+ (NSArray *)values;
-
-+ (SDLPredefinedLayout *)DEFAULT;
-+ (SDLPredefinedLayout *)MEDIA;
-+ (SDLPredefinedLayout *)NON_MEDIA;
-+ (SDLPredefinedLayout *)ONSCREEN_PRESETS;
-+ (SDLPredefinedLayout *)NAV_FULLSCREEN_MAP;
-+ (SDLPredefinedLayout *)NAV_LIST;
-+ (SDLPredefinedLayout *)NAV_KEYBOARD;
-+ (SDLPredefinedLayout *)GRAPHIC_WITH_TEXT;
-+ (SDLPredefinedLayout *)TEXT_WITH_GRAPHIC;
-+ (SDLPredefinedLayout *)TILES_ONLY;
-+ (SDLPredefinedLayout *)TEXTBUTTONS_ONLY;
-+ (SDLPredefinedLayout *)GRAPHIC_WITH_TILES;
-+ (SDLPredefinedLayout *)TILES_WITH_GRAPHIC;
-+ (SDLPredefinedLayout *)GRAPHIC_WITH_TEXT_AND_SOFTBUTTONS;
-+ (SDLPredefinedLayout *)TEXT_AND_SOFTBUTTONS_WITH_GRAPHIC;
-+ (SDLPredefinedLayout *)GRAPHIC_WITH_TEXTBUTTONS;
-+ (SDLPredefinedLayout *)TEXTBUTTONS_WITH_GRAPHIC;
-+ (SDLPredefinedLayout *)LARGE_GRAPHIC_WITH_SOFTBUTTONS;
-+ (SDLPredefinedLayout *)DOUBLE_GRAPHIC_WITH_SOFTBUTTONS;
-+ (SDLPredefinedLayout *)LARGE_GRAPHIC_ONLY;
-
-@end
+extern SDLPredefinedLayout const SDLPredefinedLayoutDefault;
+extern SDLPredefinedLayout const SDLPredefinedLayoutMedia;
+extern SDLPredefinedLayout const SDLPredefinedLayoutNonMedia;
+extern SDLPredefinedLayout const SDLPredefinedLayoutOnscreenPresets;
+extern SDLPredefinedLayout const SDLPredefinedLayoutNavFullscreenMap;
+extern SDLPredefinedLayout const SDLPredefinedLayoutNavList;
+extern SDLPredefinedLayout const SDLPredefinedLayoutNavKeyboard;
+extern SDLPredefinedLayout const SDLPredefinedLayoutGraphicWithText;
+extern SDLPredefinedLayout const SDLPredefinedLayoutTextWithGraphic;
+extern SDLPredefinedLayout const SDLPredefinedLayoutTilesOnly;
+extern SDLPredefinedLayout const SDLPredefinedLayoutTextButtonsOnly;
+extern SDLPredefinedLayout const SDLPredefinedLayoutGraphicWithTiles;
+extern SDLPredefinedLayout const SDLPredefinedLayoutTilesWithGraphic;
+extern SDLPredefinedLayout const SDLPredefinedLayoutGraphicWithTextAndSoftButtons;
+extern SDLPredefinedLayout const SDLPredefinedLayoutTextAndSoftButtonsWithGraphic;
+extern SDLPredefinedLayout const SDLPredefinedLayoutGraphicWithTextButtons;
+extern SDLPredefinedLayout const SDLPredefinedLayoutTextButtonsWithGraphic;
+extern SDLPredefinedLayout const SDLPredefinedLayoutLargeGraphicWithSoftButtons;
+extern SDLPredefinedLayout const SDLPredefinedLayoutDoubleGraphicWithSoftButtons;
+extern SDLPredefinedLayout const SDLPredefinedLayoutLargeGraphicOnly;
diff --git a/SmartDeviceLink/SDLPredefinedLayout.m b/SmartDeviceLink/SDLPredefinedLayout.m
index 57dc2b384..404215198 100644
--- a/SmartDeviceLink/SDLPredefinedLayout.m
+++ b/SmartDeviceLink/SDLPredefinedLayout.m
@@ -4,206 +4,23 @@
#import "SDLPredefinedLayout.h"
-SDLPredefinedLayout *SDLPredefinedLayout_DEFAULT = nil;
-SDLPredefinedLayout *SDLPredefinedLayout_MEDIA = nil;
-SDLPredefinedLayout *SDLPredefinedLayout_NON_MEDIA = nil;
-SDLPredefinedLayout *SDLPredefinedLayout_ONSCREEN_PRESETS = nil;
-SDLPredefinedLayout *SDLPredefinedLayout_NAV_FULLSCREEN_MAP = nil;
-SDLPredefinedLayout *SDLPredefinedLayout_NAV_LIST = nil;
-SDLPredefinedLayout *SDLPredefinedLayout_NAV_KEYBOARD = nil;
-SDLPredefinedLayout *SDLPredefinedLayout_GRAPHIC_WITH_TEXT = nil;
-SDLPredefinedLayout *SDLPredefinedLayout_TEXT_WITH_GRAPHIC = nil;
-SDLPredefinedLayout *SDLPredefinedLayout_TILES_ONLY = nil;
-SDLPredefinedLayout *SDLPredefinedLayout_TEXTBUTTONS_ONLY = nil;
-SDLPredefinedLayout *SDLPredefinedLayout_GRAPHIC_WITH_TILES = nil;
-SDLPredefinedLayout *SDLPredefinedLayout_TILES_WITH_GRAPHIC = nil;
-SDLPredefinedLayout *SDLPredefinedLayout_GRAPHIC_WITH_TEXT_AND_SOFTBUTTONS = nil;
-SDLPredefinedLayout *SDLPredefinedLayout_TEXT_AND_SOFTBUTTONS_WITH_GRAPHIC = nil;
-SDLPredefinedLayout *SDLPredefinedLayout_GRAPHIC_WITH_TEXTBUTTONS = nil;
-SDLPredefinedLayout *SDLPredefinedLayout_TEXTBUTTONS_WITH_GRAPHIC = nil;
-SDLPredefinedLayout *SDLPredefinedLayout_LARGE_GRAPHIC_WITH_SOFTBUTTONS = nil;
-SDLPredefinedLayout *SDLPredefinedLayout_DOUBLE_GRAPHIC_WITH_SOFTBUTTONS = nil;
-SDLPredefinedLayout *SDLPredefinedLayout_LARGE_GRAPHIC_ONLY = nil;
-
-NSArray *SDLPredefinedLayout_values = nil;
-
-@implementation SDLPredefinedLayout
-
-+ (SDLPredefinedLayout *)valueOf:(NSString *)value {
- for (SDLPredefinedLayout *item in SDLPredefinedLayout.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLPredefinedLayout_values == nil) {
- SDLPredefinedLayout_values = @[
- SDLPredefinedLayout.DEFAULT,
- SDLPredefinedLayout.MEDIA,
- SDLPredefinedLayout.NON_MEDIA,
- SDLPredefinedLayout.ONSCREEN_PRESETS,
- SDLPredefinedLayout.NAV_FULLSCREEN_MAP,
- SDLPredefinedLayout.NAV_LIST,
- SDLPredefinedLayout.NAV_KEYBOARD,
- SDLPredefinedLayout.GRAPHIC_WITH_TEXT,
- SDLPredefinedLayout.TEXT_WITH_GRAPHIC,
- SDLPredefinedLayout.TILES_ONLY,
- SDLPredefinedLayout.TEXTBUTTONS_ONLY,
- SDLPredefinedLayout.GRAPHIC_WITH_TILES,
- SDLPredefinedLayout.TILES_WITH_GRAPHIC,
- SDLPredefinedLayout.GRAPHIC_WITH_TEXT_AND_SOFTBUTTONS,
- SDLPredefinedLayout.TEXT_AND_SOFTBUTTONS_WITH_GRAPHIC,
- SDLPredefinedLayout.GRAPHIC_WITH_TEXTBUTTONS,
- SDLPredefinedLayout.TEXTBUTTONS_WITH_GRAPHIC,
- SDLPredefinedLayout.LARGE_GRAPHIC_WITH_SOFTBUTTONS,
- SDLPredefinedLayout.DOUBLE_GRAPHIC_WITH_SOFTBUTTONS,
- SDLPredefinedLayout.LARGE_GRAPHIC_ONLY,
- ];
- }
- return SDLPredefinedLayout_values;
-}
-
-+ (SDLPredefinedLayout *)DEFAULT {
- if (SDLPredefinedLayout_DEFAULT == nil) {
- SDLPredefinedLayout_DEFAULT = [[SDLPredefinedLayout alloc] initWithValue:@"DEFAULT"];
- }
- return SDLPredefinedLayout_DEFAULT;
-}
-
-+ (SDLPredefinedLayout *)MEDIA {
- if (SDLPredefinedLayout_MEDIA == nil) {
- SDLPredefinedLayout_MEDIA = [[SDLPredefinedLayout alloc] initWithValue:@"MEDIA"];
- }
- return SDLPredefinedLayout_MEDIA;
-}
-
-+ (SDLPredefinedLayout *)NON_MEDIA {
- if (SDLPredefinedLayout_NON_MEDIA == nil) {
- SDLPredefinedLayout_NON_MEDIA = [[SDLPredefinedLayout alloc] initWithValue:@"NON-MEDIA"];
- }
- return SDLPredefinedLayout_NON_MEDIA;
-}
-
-+ (SDLPredefinedLayout *)ONSCREEN_PRESETS {
- if (SDLPredefinedLayout_ONSCREEN_PRESETS == nil) {
- SDLPredefinedLayout_ONSCREEN_PRESETS = [[SDLPredefinedLayout alloc] initWithValue:@"ONSCREEN_PRESETS"];
- }
- return SDLPredefinedLayout_ONSCREEN_PRESETS;
-}
-
-+ (SDLPredefinedLayout *)NAV_FULLSCREEN_MAP {
- if (SDLPredefinedLayout_NAV_FULLSCREEN_MAP == nil) {
- SDLPredefinedLayout_NAV_FULLSCREEN_MAP = [[SDLPredefinedLayout alloc] initWithValue:@"NAV_FULLSCREEN_MAP"];
- }
- return SDLPredefinedLayout_NAV_FULLSCREEN_MAP;
-}
-
-+ (SDLPredefinedLayout *)NAV_LIST {
- if (SDLPredefinedLayout_NAV_LIST == nil) {
- SDLPredefinedLayout_NAV_LIST = [[SDLPredefinedLayout alloc] initWithValue:@"NAV_LIST"];
- }
- return SDLPredefinedLayout_NAV_LIST;
-}
-
-+ (SDLPredefinedLayout *)NAV_KEYBOARD {
- if (SDLPredefinedLayout_NAV_KEYBOARD == nil) {
- SDLPredefinedLayout_NAV_KEYBOARD = [[SDLPredefinedLayout alloc] initWithValue:@"NAV_KEYBOARD"];
- }
- return SDLPredefinedLayout_NAV_KEYBOARD;
-}
-
-+ (SDLPredefinedLayout *)GRAPHIC_WITH_TEXT {
- if (SDLPredefinedLayout_GRAPHIC_WITH_TEXT == nil) {
- SDLPredefinedLayout_GRAPHIC_WITH_TEXT = [[SDLPredefinedLayout alloc] initWithValue:@"GRAPHIC_WITH_TEXT"];
- }
- return SDLPredefinedLayout_GRAPHIC_WITH_TEXT;
-}
-
-+ (SDLPredefinedLayout *)TEXT_WITH_GRAPHIC {
- if (SDLPredefinedLayout_TEXT_WITH_GRAPHIC == nil) {
- SDLPredefinedLayout_TEXT_WITH_GRAPHIC = [[SDLPredefinedLayout alloc] initWithValue:@"TEXT_WITH_GRAPHIC"];
- }
- return SDLPredefinedLayout_TEXT_WITH_GRAPHIC;
-}
-
-+ (SDLPredefinedLayout *)TILES_ONLY {
- if (SDLPredefinedLayout_TILES_ONLY == nil) {
- SDLPredefinedLayout_TILES_ONLY = [[SDLPredefinedLayout alloc] initWithValue:@"TILES_ONLY"];
- }
- return SDLPredefinedLayout_TILES_ONLY;
-}
-
-+ (SDLPredefinedLayout *)TEXTBUTTONS_ONLY {
- if (SDLPredefinedLayout_TEXTBUTTONS_ONLY == nil) {
- SDLPredefinedLayout_TEXTBUTTONS_ONLY = [[SDLPredefinedLayout alloc] initWithValue:@"TEXTBUTTONS_ONLY"];
- }
- return SDLPredefinedLayout_TEXTBUTTONS_ONLY;
-}
-
-+ (SDLPredefinedLayout *)GRAPHIC_WITH_TILES {
- if (SDLPredefinedLayout_GRAPHIC_WITH_TILES == nil) {
- SDLPredefinedLayout_GRAPHIC_WITH_TILES = [[SDLPredefinedLayout alloc] initWithValue:@"GRAPHIC_WITH_TILES"];
- }
- return SDLPredefinedLayout_GRAPHIC_WITH_TILES;
-}
-
-+ (SDLPredefinedLayout *)TILES_WITH_GRAPHIC {
- if (SDLPredefinedLayout_TILES_WITH_GRAPHIC == nil) {
- SDLPredefinedLayout_TILES_WITH_GRAPHIC = [[SDLPredefinedLayout alloc] initWithValue:@"TILES_WITH_GRAPHIC"];
- }
- return SDLPredefinedLayout_TILES_WITH_GRAPHIC;
-}
-
-+ (SDLPredefinedLayout *)GRAPHIC_WITH_TEXT_AND_SOFTBUTTONS {
- if (SDLPredefinedLayout_GRAPHIC_WITH_TEXT_AND_SOFTBUTTONS == nil) {
- SDLPredefinedLayout_GRAPHIC_WITH_TEXT_AND_SOFTBUTTONS = [[SDLPredefinedLayout alloc] initWithValue:@"GRAPHIC_WITH_TEXT_AND_SOFTBUTTONS"];
- }
- return SDLPredefinedLayout_GRAPHIC_WITH_TEXT_AND_SOFTBUTTONS;
-}
-
-+ (SDLPredefinedLayout *)TEXT_AND_SOFTBUTTONS_WITH_GRAPHIC {
- if (SDLPredefinedLayout_TEXT_AND_SOFTBUTTONS_WITH_GRAPHIC == nil) {
- SDLPredefinedLayout_TEXT_AND_SOFTBUTTONS_WITH_GRAPHIC = [[SDLPredefinedLayout alloc] initWithValue:@"TEXT_AND_SOFTBUTTONS_WITH_GRAPHIC"];
- }
- return SDLPredefinedLayout_TEXT_AND_SOFTBUTTONS_WITH_GRAPHIC;
-}
-
-+ (SDLPredefinedLayout *)GRAPHIC_WITH_TEXTBUTTONS {
- if (SDLPredefinedLayout_GRAPHIC_WITH_TEXTBUTTONS == nil) {
- SDLPredefinedLayout_GRAPHIC_WITH_TEXTBUTTONS = [[SDLPredefinedLayout alloc] initWithValue:@"GRAPHIC_WITH_TEXTBUTTONS"];
- }
- return SDLPredefinedLayout_GRAPHIC_WITH_TEXTBUTTONS;
-}
-
-+ (SDLPredefinedLayout *)TEXTBUTTONS_WITH_GRAPHIC {
- if (SDLPredefinedLayout_TEXTBUTTONS_WITH_GRAPHIC == nil) {
- SDLPredefinedLayout_TEXTBUTTONS_WITH_GRAPHIC = [[SDLPredefinedLayout alloc] initWithValue:@"TEXTBUTTONS_WITH_GRAPHIC"];
- }
- return SDLPredefinedLayout_TEXTBUTTONS_WITH_GRAPHIC;
-}
-
-+ (SDLPredefinedLayout *)LARGE_GRAPHIC_WITH_SOFTBUTTONS {
- if (SDLPredefinedLayout_LARGE_GRAPHIC_WITH_SOFTBUTTONS == nil) {
- SDLPredefinedLayout_LARGE_GRAPHIC_WITH_SOFTBUTTONS = [[SDLPredefinedLayout alloc] initWithValue:@"LARGE_GRAPHIC_WITH_SOFTBUTTONS"];
- }
- return SDLPredefinedLayout_LARGE_GRAPHIC_WITH_SOFTBUTTONS;
-}
-
-+ (SDLPredefinedLayout *)DOUBLE_GRAPHIC_WITH_SOFTBUTTONS {
- if (SDLPredefinedLayout_DOUBLE_GRAPHIC_WITH_SOFTBUTTONS == nil) {
- SDLPredefinedLayout_DOUBLE_GRAPHIC_WITH_SOFTBUTTONS = [[SDLPredefinedLayout alloc] initWithValue:@"DOUBLE_GRAPHIC_WITH_SOFTBUTTONS"];
- }
- return SDLPredefinedLayout_DOUBLE_GRAPHIC_WITH_SOFTBUTTONS;
-}
-
-+ (SDLPredefinedLayout *)LARGE_GRAPHIC_ONLY {
- if (SDLPredefinedLayout_LARGE_GRAPHIC_ONLY == nil) {
- SDLPredefinedLayout_LARGE_GRAPHIC_ONLY = [[SDLPredefinedLayout alloc] initWithValue:@"LARGE_GRAPHIC_ONLY"];
- }
- return SDLPredefinedLayout_LARGE_GRAPHIC_ONLY;
-}
-
-@end
+SDLPredefinedLayout const SDLPredefinedLayoutDefault = @"DEFAULT";
+SDLPredefinedLayout const SDLPredefinedLayoutMedia = @"MEDIA";
+SDLPredefinedLayout const SDLPredefinedLayoutNonMedia = @"NON_MEDIA";
+SDLPredefinedLayout const SDLPredefinedLayoutOnscreenPresets = @"ONSCREEN_PRESETS";
+SDLPredefinedLayout const SDLPredefinedLayoutNavFullscreenMap = @"NAV_FULLSCREEN_MAP";
+SDLPredefinedLayout const SDLPredefinedLayoutNavList = @"NAV_LIST";
+SDLPredefinedLayout const SDLPredefinedLayoutNavKeyboard = @"NAV_KEYBOARD";
+SDLPredefinedLayout const SDLPredefinedLayoutGraphicWithText = @"GRAPHIC_WITH_TEXT";
+SDLPredefinedLayout const SDLPredefinedLayoutTextWithGraphic = @"TEXT_WITH_GRAPHIC";
+SDLPredefinedLayout const SDLPredefinedLayoutTilesOnly = @"TILES_ONLY";
+SDLPredefinedLayout const SDLPredefinedLayoutTextButtonsOnly = @"TEXTBUTTONS_ONLY";
+SDLPredefinedLayout const SDLPredefinedLayoutGraphicWithTiles = @"GRAPHIC_WITH_TILES";
+SDLPredefinedLayout const SDLPredefinedLayoutTilesWithGraphic = @"TILES_WITH_GRAPHIC";
+SDLPredefinedLayout const SDLPredefinedLayoutGraphicWithTextAndSoftButtons = @"GRAPHIC_WITH_TEXT_AND_SOFTBUTTONS";
+SDLPredefinedLayout const SDLPredefinedLayoutTextAndSoftButtonsWithGraphic = @"TEXT_AND_SOFTBUTTONS_WITH_GRAPHIC";
+SDLPredefinedLayout const SDLPredefinedLayoutGraphicWithTextButtons = @"GRAPHIC_WITH_TEXTBUTTONS";
+SDLPredefinedLayout const SDLPredefinedLayoutTextButtonsWithGraphic = @"TEXTBUTTONS_WITH_GRAPHIC";
+SDLPredefinedLayout const SDLPredefinedLayoutLargeGraphicWithSoftButtons = @"LARGE_GRAPHIC_WITH_SOFTBUTTONS";
+SDLPredefinedLayout const SDLPredefinedLayoutDoubleGraphicWithSoftButtons = @"DOUBLE_GRAPHIC_WITH_SOFTBUTTONS";
+SDLPredefinedLayout const SDLPredefinedLayoutLargeGraphicOnly = @"LARGE_GRAPHIC_ONLY";
diff --git a/SmartDeviceLink/SDLPrerecordedSpeech.h b/SmartDeviceLink/SDLPrerecordedSpeech.h
index 85934237a..48197b697 100644
--- a/SmartDeviceLink/SDLPrerecordedSpeech.h
+++ b/SmartDeviceLink/SDLPrerecordedSpeech.h
@@ -4,16 +4,10 @@
#import "SDLEnum.h"
-@interface SDLPrerecordedSpeech : SDLEnum {
-}
+typedef SDLEnum SDLPrerecordedSpeech NS_EXTENSIBLE_STRING_ENUM;
-+ (SDLPrerecordedSpeech *)valueOf:(NSString *)value;
-+ (NSArray *)values;
-
-+ (SDLPrerecordedSpeech *)HELP_JINGLE;
-+ (SDLPrerecordedSpeech *)INITIAL_JINGLE;
-+ (SDLPrerecordedSpeech *)LISTEN_JINGLE;
-+ (SDLPrerecordedSpeech *)POSITIVE_JINGLE;
-+ (SDLPrerecordedSpeech *)NEGATIVE_JINGLE;
-
-@end
+extern SDLPrerecordedSpeech const SDLPrerecordedSpeechHelpJingle;
+extern SDLPrerecordedSpeech const SDLPrerecordedSpeechInitialJingle;
+extern SDLPrerecordedSpeech const SDLPrerecordedSpeechListenJingle;
+extern SDLPrerecordedSpeech const SDLPrerecordedSpeechPositiveJingle;
+extern SDLPrerecordedSpeech const SDLPrerecordedSpeechNegativeJingle;
diff --git a/SmartDeviceLink/SDLPrerecordedSpeech.m b/SmartDeviceLink/SDLPrerecordedSpeech.m
index 676645f76..ce162b46b 100644
--- a/SmartDeviceLink/SDLPrerecordedSpeech.m
+++ b/SmartDeviceLink/SDLPrerecordedSpeech.m
@@ -4,71 +4,8 @@
#import "SDLPrerecordedSpeech.h"
-SDLPrerecordedSpeech *SDLPrerecordedSpeech_HELP_JINGLE = nil;
-SDLPrerecordedSpeech *SDLPrerecordedSpeech_INITIAL_JINGLE = nil;
-SDLPrerecordedSpeech *SDLPrerecordedSpeech_LISTEN_JINGLE = nil;
-SDLPrerecordedSpeech *SDLPrerecordedSpeech_POSITIVE_JINGLE = nil;
-SDLPrerecordedSpeech *SDLPrerecordedSpeech_NEGATIVE_JINGLE = nil;
-
-NSArray *SDLPrerecordedSpeech_values = nil;
-
-@implementation SDLPrerecordedSpeech
-
-+ (SDLPrerecordedSpeech *)valueOf:(NSString *)value {
- for (SDLPrerecordedSpeech *item in SDLPrerecordedSpeech.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLPrerecordedSpeech_values == nil) {
- SDLPrerecordedSpeech_values = @[
- SDLPrerecordedSpeech.HELP_JINGLE,
- SDLPrerecordedSpeech.INITIAL_JINGLE,
- SDLPrerecordedSpeech.LISTEN_JINGLE,
- SDLPrerecordedSpeech.POSITIVE_JINGLE,
- SDLPrerecordedSpeech.NEGATIVE_JINGLE,
- ];
- }
- return SDLPrerecordedSpeech_values;
-}
-
-+ (SDLPrerecordedSpeech *)HELP_JINGLE {
- if (SDLPrerecordedSpeech_HELP_JINGLE == nil) {
- SDLPrerecordedSpeech_HELP_JINGLE = [[SDLPrerecordedSpeech alloc] initWithValue:@"HELP_JINGLE"];
- }
- return SDLPrerecordedSpeech_HELP_JINGLE;
-}
-
-+ (SDLPrerecordedSpeech *)INITIAL_JINGLE {
- if (SDLPrerecordedSpeech_INITIAL_JINGLE == nil) {
- SDLPrerecordedSpeech_INITIAL_JINGLE = [[SDLPrerecordedSpeech alloc] initWithValue:@"INITIAL_JINGLE"];
- }
- return SDLPrerecordedSpeech_INITIAL_JINGLE;
-}
-
-+ (SDLPrerecordedSpeech *)LISTEN_JINGLE {
- if (SDLPrerecordedSpeech_LISTEN_JINGLE == nil) {
- SDLPrerecordedSpeech_LISTEN_JINGLE = [[SDLPrerecordedSpeech alloc] initWithValue:@"LISTEN_JINGLE"];
- }
- return SDLPrerecordedSpeech_LISTEN_JINGLE;
-}
-
-+ (SDLPrerecordedSpeech *)POSITIVE_JINGLE {
- if (SDLPrerecordedSpeech_POSITIVE_JINGLE == nil) {
- SDLPrerecordedSpeech_POSITIVE_JINGLE = [[SDLPrerecordedSpeech alloc] initWithValue:@"POSITIVE_JINGLE"];
- }
- return SDLPrerecordedSpeech_POSITIVE_JINGLE;
-}
-
-+ (SDLPrerecordedSpeech *)NEGATIVE_JINGLE {
- if (SDLPrerecordedSpeech_NEGATIVE_JINGLE == nil) {
- SDLPrerecordedSpeech_NEGATIVE_JINGLE = [[SDLPrerecordedSpeech alloc] initWithValue:@"NEGATIVE_JINGLE"];
- }
- return SDLPrerecordedSpeech_NEGATIVE_JINGLE;
-}
-
-@end
+SDLPrerecordedSpeech const SDLPrerecordedSpeechHelpJingle = @"HELP_JINGLE";
+SDLPrerecordedSpeech const SDLPrerecordedSpeechInitialJingle = @"INITIAL_JINGLE";
+SDLPrerecordedSpeech const SDLPrerecordedSpeechListenJingle = @"LISTEN_JINGLE";
+SDLPrerecordedSpeech const SDLPrerecordedSpeechPositiveJingle = @"POSITIVE_JINGLE";
+SDLPrerecordedSpeech const SDLPrerecordedSpeechNegativeJingle = @"NEGATIVE_JINGLE";
diff --git a/SmartDeviceLink/SDLPrimaryAudioSource.h b/SmartDeviceLink/SDLPrimaryAudioSource.h
index 81e9a2257..0027cbd3a 100644
--- a/SmartDeviceLink/SDLPrimaryAudioSource.h
+++ b/SmartDeviceLink/SDLPrimaryAudioSource.h
@@ -9,64 +9,39 @@
*
* @since SDL 2.0
*/
-@interface SDLPrimaryAudioSource : SDLEnum {
-}
-
-/**
- * @abstract get SDLPrimaryAudioSource according value string
- *
- * @param value String value to retrieve the object enum for
- *
- * @return SDLPrimaryAudioSource object
- */
-+ (SDLPrimaryAudioSource *)valueOf:(NSString *)value;
-
-/**
- * @abstract declare an array to store all possible SDLPrimaryAudioSource values
- * @return the array
- */
-+ (NSArray *)values;
+typedef SDLEnum SDLPrimaryAudioSource NS_EXTENSIBLE_STRING_ENUM;
/**
* @abstract Currently no source selected
- * @return the current primary audio source: *NO_SOURCE_SELECTED*
*/
-+ (SDLPrimaryAudioSource *)NO_SOURCE_SELECTED;
+extern SDLPrimaryAudioSource const SDLPrimaryAudioSourceNoSourceSelected;
/**
* @abstract USB is current source
- * @return the current primary audio source: *USB*
*/
-+ (SDLPrimaryAudioSource *)USB;
+extern SDLPrimaryAudioSource const SDLPrimaryAudioSourceUsb;
/**
* @abstract USB2 is current source
- * @return the current primary audio source: *USB2*
*/
-+ (SDLPrimaryAudioSource *)USB2;
+extern SDLPrimaryAudioSource const SDLPrimaryAudioSourceUsb2;
/**
* @abstract Bluetooth Stereo is current source
- * @return the current primary audio source: *BLUETOOTH_STEREO_BTST*
*/
-+ (SDLPrimaryAudioSource *)BLUETOOTH_STEREO_BTST;
+extern SDLPrimaryAudioSource const SDLPrimaryAudioSourceBluetoothStereo;
/**
* @abstract Line in is current source
- * @return the current primary audio source: *LINE_IN*
*/
-+ (SDLPrimaryAudioSource *)LINE_IN;
+extern SDLPrimaryAudioSource const SDLPrimaryAudioSourceLineIn;
/**
* @abstract iPod is current source
- * @return the current primary audio source: *IPOD*
*/
-+ (SDLPrimaryAudioSource *)IPOD;
+extern SDLPrimaryAudioSource const SDLPrimaryAudioSourceIpod;
/**
* @abstract Mobile app is current source
- * @return the current primary audio source: *MOBILE_APP*
*/
-+ (SDLPrimaryAudioSource *)MOBILE_APP;
-
-@end
+extern SDLPrimaryAudioSource const SDLPrimaryAudioSourceMobileApp;
diff --git a/SmartDeviceLink/SDLPrimaryAudioSource.m b/SmartDeviceLink/SDLPrimaryAudioSource.m
index 4293411a8..926e7cfd6 100644
--- a/SmartDeviceLink/SDLPrimaryAudioSource.m
+++ b/SmartDeviceLink/SDLPrimaryAudioSource.m
@@ -4,89 +4,10 @@
#import "SDLPrimaryAudioSource.h"
-SDLPrimaryAudioSource *SDLPrimaryAudioSource_NO_SOURCE_SELECTED = nil;
-SDLPrimaryAudioSource *SDLPrimaryAudioSource_USB = nil;
-SDLPrimaryAudioSource *SDLPrimaryAudioSource_USB2 = nil;
-SDLPrimaryAudioSource *SDLPrimaryAudioSource_BLUETOOTH_STEREO_BTST = nil;
-SDLPrimaryAudioSource *SDLPrimaryAudioSource_LINE_IN = nil;
-SDLPrimaryAudioSource *SDLPrimaryAudioSource_IPOD = nil;
-SDLPrimaryAudioSource *SDLPrimaryAudioSource_MOBILE_APP = nil;
-
-NSArray *SDLPrimaryAudioSource_values = nil;
-
-@implementation SDLPrimaryAudioSource
-
-+ (SDLPrimaryAudioSource *)valueOf:(NSString *)value {
- for (SDLPrimaryAudioSource *item in SDLPrimaryAudioSource.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLPrimaryAudioSource_values == nil) {
- SDLPrimaryAudioSource_values = @[
- SDLPrimaryAudioSource.NO_SOURCE_SELECTED,
- SDLPrimaryAudioSource.USB,
- SDLPrimaryAudioSource.USB2,
- SDLPrimaryAudioSource.BLUETOOTH_STEREO_BTST,
- SDLPrimaryAudioSource.LINE_IN,
- SDLPrimaryAudioSource.IPOD,
- SDLPrimaryAudioSource.MOBILE_APP,
- ];
- }
- return SDLPrimaryAudioSource_values;
-}
-
-+ (SDLPrimaryAudioSource *)NO_SOURCE_SELECTED {
- if (SDLPrimaryAudioSource_NO_SOURCE_SELECTED == nil) {
- SDLPrimaryAudioSource_NO_SOURCE_SELECTED = [[SDLPrimaryAudioSource alloc] initWithValue:@"NO_SOURCE_SELECTED"];
- }
- return SDLPrimaryAudioSource_NO_SOURCE_SELECTED;
-}
-
-+ (SDLPrimaryAudioSource *)USB {
- if (SDLPrimaryAudioSource_USB == nil) {
- SDLPrimaryAudioSource_USB = [[SDLPrimaryAudioSource alloc] initWithValue:@"USB"];
- }
- return SDLPrimaryAudioSource_USB;
-}
-
-+ (SDLPrimaryAudioSource *)USB2 {
- if (SDLPrimaryAudioSource_USB2 == nil) {
- SDLPrimaryAudioSource_USB2 = [[SDLPrimaryAudioSource alloc] initWithValue:@"USB2"];
- }
- return SDLPrimaryAudioSource_USB2;
-}
-
-+ (SDLPrimaryAudioSource *)BLUETOOTH_STEREO_BTST {
- if (SDLPrimaryAudioSource_BLUETOOTH_STEREO_BTST == nil) {
- SDLPrimaryAudioSource_BLUETOOTH_STEREO_BTST = [[SDLPrimaryAudioSource alloc] initWithValue:@"BLUETOOTH_STEREO_BTST"];
- }
- return SDLPrimaryAudioSource_BLUETOOTH_STEREO_BTST;
-}
-
-+ (SDLPrimaryAudioSource *)LINE_IN {
- if (SDLPrimaryAudioSource_LINE_IN == nil) {
- SDLPrimaryAudioSource_LINE_IN = [[SDLPrimaryAudioSource alloc] initWithValue:@"LINE_IN"];
- }
- return SDLPrimaryAudioSource_LINE_IN;
-}
-
-+ (SDLPrimaryAudioSource *)IPOD {
- if (SDLPrimaryAudioSource_IPOD == nil) {
- SDLPrimaryAudioSource_IPOD = [[SDLPrimaryAudioSource alloc] initWithValue:@"IPOD"];
- }
- return SDLPrimaryAudioSource_IPOD;
-}
-
-+ (SDLPrimaryAudioSource *)MOBILE_APP {
- if (SDLPrimaryAudioSource_MOBILE_APP == nil) {
- SDLPrimaryAudioSource_MOBILE_APP = [[SDLPrimaryAudioSource alloc] initWithValue:@"MOBILE_APP"];
- }
- return SDLPrimaryAudioSource_MOBILE_APP;
-}
-
-@end
+SDLPrimaryAudioSource const SDLPrimaryAudioSourceNoSourceSelected = @"NO_SOURCE_SELECTED";
+SDLPrimaryAudioSource const SDLPrimaryAudioSourceUsb = @"USB";
+SDLPrimaryAudioSource const SDLPrimaryAudioSourceUsb2 = @"USB2";
+SDLPrimaryAudioSource const SDLPrimaryAudioSourceBluetoothStereo = @"BLUETOOTH_STEREO_BTST";
+SDLPrimaryAudioSource const SDLPrimaryAudioSourceLineIn = @"LINE_IN";
+SDLPrimaryAudioSource const SDLPrimaryAudioSourceIpod = @"IPOD";
+SDLPrimaryAudioSource const SDLPrimaryAudioSourceMobileApp = @"MOBILE_APP";
diff --git a/SmartDeviceLink/SDLProxy.m b/SmartDeviceLink/SDLProxy.m
index f49569ea9..fb273591d 100644
--- a/SmartDeviceLink/SDLProxy.m
+++ b/SmartDeviceLink/SDLProxy.m
@@ -146,22 +146,22 @@ const int POLICIES_CORRELATION_ID = 65535;
UIApplicationState appState = [UIApplication sharedApplication].applicationState;
SDLOnHMIStatus *HMIStatusRPC = [[SDLOnHMIStatus alloc] init];
- HMIStatusRPC.audioStreamingState = [SDLAudioStreamingState NOT_AUDIBLE];
- HMIStatusRPC.systemContext = [SDLSystemContext MAIN];
+ HMIStatusRPC.audioStreamingState = SDLAudioStreamingStateNotAudible;
+ HMIStatusRPC.systemContext = SDLSystemContextMain;
switch (appState) {
case UIApplicationStateActive: {
- HMIStatusRPC.hmiLevel = [SDLHMILevel FULL];
+ HMIStatusRPC.hmiLevel = SDLHMILevelFull;
} break;
case UIApplicationStateBackground: // Fallthrough
case UIApplicationStateInactive: {
- HMIStatusRPC.hmiLevel = [SDLHMILevel BACKGROUND];
+ HMIStatusRPC.hmiLevel = SDLHMILevelBackground;
} break;
default:
break;
}
- NSString *log = [NSString stringWithFormat:@"Sending new mobile hmi state: %@", HMIStatusRPC.hmiLevel.value];
+ NSString *log = [NSString stringWithFormat:@"Sending new mobile hmi state: %@", HMIStatusRPC.hmiLevel];
[SDLDebugTool logInfo:log withType:SDLDebugType_RPC toOutput:SDLDebugOutput_All toGroup:self.debugConsoleGroupName];
[self sendRPC:HMIStatusRPC];
@@ -414,16 +414,16 @@ const int POLICIES_CORRELATION_ID = 65535;
[SDLDebugTool logInfo:@"OnSystemRequest (notification)" withType:SDLDebugType_RPC toOutput:SDLDebugOutput_All toGroup:self.debugConsoleGroupName];
SDLOnSystemRequest *systemRequest = [[SDLOnSystemRequest alloc] initWithDictionary:[dict mutableCopy]];
- SDLRequestType *requestType = systemRequest.requestType;
+ SDLRequestType requestType = systemRequest.requestType;
// Handle the various OnSystemRequest types
- if (requestType == [SDLRequestType PROPRIETARY]) {
+ if ([requestType isEqualToString:SDLRequestTypeProprietary]) {
[self handleSystemRequestProprietary:systemRequest];
- } else if (requestType == [SDLRequestType LOCK_SCREEN_ICON_URL]) {
+ } else if ([requestType isEqualToString:SDLRequestTypeLockScreenIconUrl]) {
[self handleSystemRequestLockScreenIconURL:systemRequest];
- } else if (requestType == [SDLRequestType HTTP]) {
+ } else if ([requestType isEqualToString:SDLRequestTypeHttp]) {
[self sdl_handleSystemRequestHTTP:systemRequest];
- } else if (requestType == [SDLRequestType LAUNCH_APP]) {
+ } else if ([requestType isEqualToString:SDLRequestTypeLaunchApp]) {
[self sdl_handleSystemRequestLaunchApp:systemRequest];
}
}
@@ -436,8 +436,7 @@ const int POLICIES_CORRELATION_ID = 65535;
#pragma mark Handle Post-Invoke of Delegate Methods
- (void)handleAfterHMIStatus:(SDLRPCMessage *)message {
- NSString *statusString = (NSString *)[message getParameters:NAMES_hmiLevel];
- SDLHMILevel *hmiLevel = [SDLHMILevel valueOf:statusString];
+ SDLHMILevel hmiLevel = (SDLHMILevel)[message getParameters:NAMES_hmiLevel];
_lsm.hmiLevel = hmiLevel;
SEL callbackSelector = NSSelectorFromString(@"onOnLockScreenNotification:");
@@ -513,7 +512,7 @@ const int POLICIES_CORRELATION_ID = 65535;
// Create the SystemRequest RPC to send to module.
SDLSystemRequest *request = [[SDLSystemRequest alloc] init];
request.correlationID = [NSNumber numberWithInt:POLICIES_CORRELATION_ID];
- request.requestType = [SDLRequestType PROPRIETARY];
+ request.requestType = SDLRequestTypeProprietary;
request.bulkData = data;
// Parse and display the policy data.
@@ -573,7 +572,7 @@ const int POLICIES_CORRELATION_ID = 65535;
// Create the SystemRequest RPC to send to module.
SDLPutFile *putFile = [[SDLPutFile alloc] init];
- putFile.fileType = [SDLFileType JSON];
+ putFile.fileType = SDLFileTypeJson;
putFile.correlationID = @(POLICIES_CORRELATION_ID);
putFile.syncFileName = @"response_data";
putFile.bulkData = data;
@@ -594,7 +593,7 @@ const int POLICIES_CORRELATION_ID = 65535;
*/
- (NSDictionary *)validateAndParseSystemRequest:(SDLOnSystemRequest *)request {
NSString *urlString = request.url;
- SDLFileType *fileType = request.fileType;
+ SDLFileType fileType = request.fileType;
// Validate input
if (urlString == nil || [NSURL URLWithString:urlString] == nil) {
@@ -602,7 +601,7 @@ const int POLICIES_CORRELATION_ID = 65535;
return nil;
}
- if (fileType != [SDLFileType JSON]) {
+ if (![fileType isEqualToString:SDLFileTypeJson]) {
[SDLDebugTool logInfo:@"OnSystemRequest (notification) failure: file type is not JSON" withType:SDLDebugType_RPC toOutput:SDLDebugOutput_All toGroup:self.debugConsoleGroupName];
return nil;
}
diff --git a/SmartDeviceLink/SDLPutFile.h b/SmartDeviceLink/SDLPutFile.h
index eb7bae2bf..4f2ed90e0 100644
--- a/SmartDeviceLink/SDLPutFile.h
+++ b/SmartDeviceLink/SDLPutFile.h
@@ -3,8 +3,7 @@
#import "SDLRPCRequest.h"
-@class SDLFileType;
-
+#import "SDLFileType.h"
/**
* Used to push a binary data onto the SDL module from a mobile device, such as
@@ -41,7 +40,7 @@
*
* Required
*/
-@property (strong) SDLFileType *fileType;
+@property (strong) SDLFileType fileType;
/**
* A value to indicates if the file is meant to persist between
diff --git a/SmartDeviceLink/SDLPutFile.m b/SmartDeviceLink/SDLPutFile.m
index 69d83edcd..b44671063 100644
--- a/SmartDeviceLink/SDLPutFile.m
+++ b/SmartDeviceLink/SDLPutFile.m
@@ -3,7 +3,6 @@
#import "SDLPutFile.h"
-#import "SDLFileType.h"
#import "SDLNames.h"
@@ -33,7 +32,7 @@
return [parameters objectForKey:NAMES_syncFileName];
}
-- (void)setFileType:(SDLFileType *)fileType {
+- (void)setFileType:(SDLFileType)fileType {
if (fileType != nil) {
[parameters setObject:fileType forKey:NAMES_fileType];
} else {
@@ -41,13 +40,9 @@
}
}
-- (SDLFileType *)fileType {
+- (SDLFileType)fileType {
NSObject *obj = [parameters objectForKey:NAMES_fileType];
- if (obj == nil || [obj isKindOfClass:SDLFileType.class]) {
- return (SDLFileType *)obj;
- } else {
- return [SDLFileType valueOf:(NSString *)obj];
- }
+ return (SDLFileType)obj;
}
- (void)setPersistentFile:(NSNumber *)persistentFile {
diff --git a/SmartDeviceLink/SDLRPCRequestFactory.h b/SmartDeviceLink/SDLRPCRequestFactory.h
index 5b0146bbf..aeba6d7a4 100644
--- a/SmartDeviceLink/SDLRPCRequestFactory.h
+++ b/SmartDeviceLink/SDLRPCRequestFactory.h
@@ -9,10 +9,6 @@
@class SDLAddSubMenu;
@class SDLAlert;
@class SDLAlertManeuver;
-@class SDLAppHMIType;
-@class SDLAudioType;
-@class SDLBitsPerSample;
-@class SDLButtonName;
@class SDLChangeRegistration;
@class SDLCreateInteractionChoiceSet;
@class SDLDeleteCommand;
@@ -21,13 +17,9 @@
@class SDLDeleteSubMenu;
@class SDLDialNumber;
@class SDLEndAudioPassThru;
-@class SDLFileType;
@class SDLGetDTCs;
@class SDLGetVehicleData;
@class SDLImage;
-@class SDLImageType;
-@class SDLInteractionMode;
-@class SDLLanguage;
@class SDLListFiles;
@class SDLPerformAudioPassThru;
@class SDLPerformInteraction;
@@ -35,7 +27,6 @@
@class SDLReadDID;
@class SDLRegisterAppInterface;
@class SDLResetGlobalProperties;
-@class SDLSamplingRate;
@class SDLScrollableMessage;
@class SDLSendLocation;
@class SDLSetAppIcon;
@@ -46,31 +37,40 @@
@class SDLShowConstantTBT;
@class SDLSlider;
@class SDLSoftButton;
-@class SDLSoftButtonType;
@class SDLSpeak;
@class SDLSubscribeButton;
@class SDLSubscribeVehicleData;
-@class SDLSystemAction;
-@class SDLTextAlignment;
@class SDLUnregisterAppInterface;
@class SDLUnsubscribeButton;
@class SDLUnsubscribeVehicleData;
-@class SDLUpdateMode;
@class SDLUpdateTurnList;
+#import "SDLAppHMIType.h"
+#import "SDLAudioType.h"
+#import "SDLBitsPerSample.h"
+#import "SDLButtonName.h"
+#import "SDLFileType.h"
+#import "SDLImageType.h"
+#import "SDLInteractionMode.h"
+#import "SDLLanguage.h"
+#import "SDLSamplingRate.h"
+#import "SDLSoftButtonType.h"
+#import "SDLSystemAction.h"
+#import "SDLTextAlignment.h"
+#import "SDLUpdateMode.h"
@interface SDLRPCRequestFactory : NSObject {
}
//***** AddCommand *****
-+ (SDLAddCommand *)buildAddCommandWithID:(NSNumber *)cmdID menuName:(NSString *)menuName parentID:(NSNumber *)parentID position:(NSNumber *)position vrCommands:(NSArray *)vrCommands iconValue:(NSString *)iconValue iconType:(SDLImageType *)iconType correlationID:(NSNumber *)correlationID __deprecated_msg("use buildAddCommandWithID:menuName:parentID:position:vrCommands:iconValue:iconType:handler: with SDLManager instead");
++ (SDLAddCommand *)buildAddCommandWithID:(NSNumber *)cmdID menuName:(NSString *)menuName parentID:(NSNumber *)parentID position:(NSNumber *)position vrCommands:(NSArray *)vrCommands iconValue:(NSString *)iconValue iconType:(SDLImageType)iconType correlationID:(NSNumber *)correlationID __deprecated_msg("use buildAddCommandWithID:menuName:parentID:position:vrCommands:iconValue:iconType:handler: with SDLManager instead");
;
+ (SDLAddCommand *)buildAddCommandWithID:(NSNumber *)cmdID menuName:(NSString *)menuName vrCommands:(NSArray *)vrCommands correlationID:(NSNumber *)correlationID __deprecated_msg("use buildAddCommandWithID:menuName:vrCommands:handler: with SDLManager instead");
+ (SDLAddCommand *)buildAddCommandWithID:(NSNumber *)cmdID vrCommands:(NSArray *)vrCommands correlationID:(NSNumber *)correlationID __deprecated_msg("use buildAddCommandWithID:vrCommands:handler: with SDLManager instead");
-+ (SDLAddCommand *)buildAddCommandWithID:(NSNumber *)cmdID menuName:(NSString *)menuName parentID:(NSNumber *)parentID position:(NSNumber *)position vrCommands:(NSArray *)vrCommands iconValue:(NSString *)iconValue iconType:(SDLImageType *)iconType handler:(SDLRPCNotificationHandler)handler;
++ (SDLAddCommand *)buildAddCommandWithID:(NSNumber *)cmdID menuName:(NSString *)menuName parentID:(NSNumber *)parentID position:(NSNumber *)position vrCommands:(NSArray *)vrCommands iconValue:(NSString *)iconValue iconType:(SDLImageType)iconType handler:(SDLRPCNotificationHandler)handler;
+ (SDLAddCommand *)buildAddCommandWithID:(NSNumber *)cmdID menuName:(NSString *)menuName vrCommands:(NSArray *)vrCommands handler:(SDLRPCNotificationHandler)handler;
@@ -108,7 +108,7 @@
+ (SDLAlertManeuver *)buildAlertManeuverwithTTSchunks:(NSMutableArray *)ttsChunks softButtons:(NSMutableArray *)softButtons correlationID:(NSNumber *)correlationID;
-+ (SDLChangeRegistration *)buildChangeRegistrationWithLanguage:(SDLLanguage *)language hmiDisplayLanguage:(SDLLanguage *)hmiDisplayLanguage correlationID:(NSNumber *)correlationID;
++ (SDLChangeRegistration *)buildChangeRegistrationWithLanguage:(SDLLanguage)language hmiDisplayLanguage:(SDLLanguage)hmiDisplayLanguage correlationID:(NSNumber *)correlationID;
+ (SDLCreateInteractionChoiceSet *)buildCreateInteractionChoiceSetWithID:(NSNumber *)interactionChoiceSetID choiceSet:(NSArray *)choices correlationID:(NSNumber *)correlationID;
@@ -130,38 +130,38 @@
+ (SDLGetVehicleData *)buildGetVehicleDataWithGPS:(NSNumber *)gps speed:(NSNumber *)speed rpm:(NSNumber *)rpm fuelLevel:(NSNumber *)fuelLevel fuelLevelState:(NSNumber *)fuelLevelState instantFuelConsumption:(NSNumber *)instantFuelConsumption externalTemperature:(NSNumber *)externalTemperature vin:(NSNumber *)vin prndl:(NSNumber *)prndl tirePressure:(NSNumber *)tirePressure odometer:(NSNumber *)odometer beltStatus:(NSNumber *)beltStatus bodyInformation:(NSNumber *)bodyInformation deviceStatus:(NSNumber *)deviceStatus driverBraking:(NSNumber *)driverBraking wiperStatus:(NSNumber *)wiperStatus headLampStatus:(NSNumber *)headLampStatus engineTorque:(NSNumber *)engineTorque accPedalPosition:(NSNumber *)accPedalPosition steeringWheelAngle:(NSNumber *)steeringWheelAngle correlationID:(NSNumber *)correlationID;
-+ (SDLPerformAudioPassThru *)buildPerformAudioPassThruWithInitialPrompt:(NSString *)initialPrompt audioPassThruDisplayText1:(NSString *)audioPassThruDisplayText1 audioPassThruDisplayText2:(NSString *)audioPassThruDisplayText2 samplingRate:(SDLSamplingRate *)samplingRate maxDuration:(NSNumber *)maxDuration bitsPerSample:(SDLBitsPerSample *)bitsPerSample audioType:(SDLAudioType *)audioType muteAudio:(NSNumber *)muteAudio correlationID:(NSNumber *)correlationID;
++ (SDLPerformAudioPassThru *)buildPerformAudioPassThruWithInitialPrompt:(NSString *)initialPrompt audioPassThruDisplayText1:(NSString *)audioPassThruDisplayText1 audioPassThruDisplayText2:(NSString *)audioPassThruDisplayText2 samplingRate:(SDLSamplingRate)samplingRate maxDuration:(NSNumber *)maxDuration bitsPerSample:(SDLBitsPerSample)bitsPerSample audioType:(SDLAudioType)audioType muteAudio:(NSNumber *)muteAudio correlationID:(NSNumber *)correlationID;
//***** PerformInteraction *****
-+ (SDLPerformInteraction *)buildPerformInteractionWithInitialChunks:(NSArray *)initialChunks initialText:(NSString *)initialText interactionChoiceSetIDList:(NSArray *)interactionChoiceSetIDList helpChunks:(NSArray *)helpChunks timeoutChunks:(NSArray *)timeoutChunks interactionMode:(SDLInteractionMode *)interactionMode timeout:(NSNumber *)timeout vrHelp:(NSArray *)vrHelp correlationID:(NSNumber *)correlationID;
++ (SDLPerformInteraction *)buildPerformInteractionWithInitialChunks:(NSArray *)initialChunks initialText:(NSString *)initialText interactionChoiceSetIDList:(NSArray *)interactionChoiceSetIDList helpChunks:(NSArray *)helpChunks timeoutChunks:(NSArray *)timeoutChunks interactionMode:(SDLInteractionMode)interactionMode timeout:(NSNumber *)timeout vrHelp:(NSArray *)vrHelp correlationID:(NSNumber *)correlationID;
//***
-+ (SDLPerformInteraction *)buildPerformInteractionWithInitialPrompt:(NSString *)initialPrompt initialText:(NSString *)initialText interactionChoiceSetIDList:(NSArray *)interactionChoiceSetIDList helpPrompt:(NSString *)helpPrompt timeoutPrompt:(NSString *)timeoutPrompt interactionMode:(SDLInteractionMode *)interactionMode timeout:(NSNumber *)timeout vrHelp:(NSArray *)vrHelp correlationID:(NSNumber *)correlationID;
++ (SDLPerformInteraction *)buildPerformInteractionWithInitialPrompt:(NSString *)initialPrompt initialText:(NSString *)initialText interactionChoiceSetIDList:(NSArray *)interactionChoiceSetIDList helpPrompt:(NSString *)helpPrompt timeoutPrompt:(NSString *)timeoutPrompt interactionMode:(SDLInteractionMode)interactionMode timeout:(NSNumber *)timeout vrHelp:(NSArray *)vrHelp correlationID:(NSNumber *)correlationID;
+ (SDLPerformInteraction *)buildPerformInteractionWithInitialPrompt:(NSString *)initialPrompt initialText:(NSString *)initialText interactionChoiceSetID:(NSNumber *)interactionChoiceSetID vrHelp:(NSArray *)vrHelp correlationID:(NSNumber *)correlationID;
-+ (SDLPerformInteraction *)buildPerformInteractionWithInitialPrompt:(NSString *)initialPrompt initialText:(NSString *)initialText interactionChoiceSetIDList:(NSArray *)interactionChoiceSetIDList helpPrompt:(NSString *)helpPrompt timeoutPrompt:(NSString *)timeoutPrompt interactionMode:(SDLInteractionMode *)interactionMode timeout:(NSNumber *)timeout correlationID:(NSNumber *)correlationID;
++ (SDLPerformInteraction *)buildPerformInteractionWithInitialPrompt:(NSString *)initialPrompt initialText:(NSString *)initialText interactionChoiceSetIDList:(NSArray *)interactionChoiceSetIDList helpPrompt:(NSString *)helpPrompt timeoutPrompt:(NSString *)timeoutPrompt interactionMode:(SDLInteractionMode)interactionMode timeout:(NSNumber *)timeout correlationID:(NSNumber *)correlationID;
+ (SDLPerformInteraction *)buildPerformInteractionWithInitialPrompt:(NSString *)initialPrompt initialText:(NSString *)initialText interactionChoiceSetID:(NSNumber *)interactionChoiceSetID correlationID:(NSNumber *)correlationID;
//*****
-+ (SDLPutFile *)buildPutFileWithFileName:(NSString *)fileName fileType:(SDLFileType *)fileType persistentFile:(NSNumber *)persistentFile correlationId:(NSNumber *)correlationID;
-+ (SDLPutFile *)buildPutFileWithFileName:(NSString *)syncFileName fileType:(SDLFileType *)fileType persisistentFile:(NSNumber *)persistentFile correlationID:(NSNumber *)correlationID __deprecated_msg("use buildPutFileWithFileName:fileType:persistentFile:correlationID: instead");
++ (SDLPutFile *)buildPutFileWithFileName:(NSString *)fileName fileType:(SDLFileType)fileType persistentFile:(NSNumber *)persistentFile correlationId:(NSNumber *)correlationID;
++ (SDLPutFile *)buildPutFileWithFileName:(NSString *)syncFileName fileType:(SDLFileType)fileType persisistentFile:(NSNumber *)persistentFile correlationID:(NSNumber *)correlationID __deprecated_msg("use buildPutFileWithFileName:fileType:persistentFile:correlationID: instead");
+ (SDLReadDID *)buildReadDIDWithECUName:(NSNumber *)ecuName didLocation:(NSArray *)didLocation correlationID:(NSNumber *)correlationID;
//***** RegisterAppInterface *****
-+ (SDLRegisterAppInterface *)buildRegisterAppInterfaceWithAppName:(NSString *)appName ttsName:(NSMutableArray *)ttsName vrSynonyms:(NSMutableArray *)vrSynonyms isMediaApp:(NSNumber *)isMediaApp languageDesired:(SDLLanguage *)languageDesired hmiDisplayLanguageDesired:(SDLLanguage *)hmiDisplayLanguageDesired appID:(NSString *)appID;
++ (SDLRegisterAppInterface *)buildRegisterAppInterfaceWithAppName:(NSString *)appName ttsName:(NSMutableArray *)ttsName vrSynonyms:(NSMutableArray *)vrSynonyms isMediaApp:(NSNumber *)isMediaApp languageDesired:(SDLLanguage)languageDesired hmiDisplayLanguageDesired:(SDLLanguage)hmiDisplayLanguageDesired appID:(NSString *)appID;
-+ (SDLRegisterAppInterface *)buildRegisterAppInterfaceWithAppName:(NSString *)appName isMediaApp:(NSNumber *)isMediaApp languageDesired:(SDLLanguage *)languageDesired appID:(NSString *)appID;
++ (SDLRegisterAppInterface *)buildRegisterAppInterfaceWithAppName:(NSString *)appName isMediaApp:(NSNumber *)isMediaApp languageDesired:(SDLLanguage)languageDesired appID:(NSString *)appID;
-+ (SDLRegisterAppInterface *)buildRegisterAppInterfaceWithAppName:(NSString *)appName languageDesired:(SDLLanguage *)laguageDesired appID:(NSString *)appID;
++ (SDLRegisterAppInterface *)buildRegisterAppInterfaceWithAppName:(NSString *)appName languageDesired:(SDLLanguage)languageDesired appID:(NSString *)appID;
//*****
+ (SDLResetGlobalProperties *)buildResetGlobalPropertiesWithProperties:(NSArray *)properties correlationID:(NSNumber *)correlationID;
-+ (SDLSendLocation *)buildSendLocationWithLongitude:(NSNumber *)longitude latitude:(NSNumber *)latitude locationName:(NSString *)locationName locationDescription:(NSString *)locationDescription address:(NSArray *)address phoneNumber:(NSString *)phoneNumber image:(SDLImage *)image;
++ (SDLSendLocation *)buildSendLocationWithLongitude:(NSNumber *)longitude latitude:(NSNumber *)latitude locationName:(NSString *)locationName locationDescription:(NSString *)locationDescription address:(NSArray *)address phoneNumber:(NSString *)phoneNumber image:(SDLImage*)image;
+ (SDLScrollableMessage *)buildScrollableMessage:(NSString *)scrollableMessageBody timeout:(NSNumber *)timeout softButtons:(NSArray *)softButtons correlationID:(NSNumber *)correlationID;
@@ -178,18 +178,18 @@
//***** SetMediaClockTimer *****
-+ (SDLSetMediaClockTimer *)buildSetMediaClockTimerWithHours:(NSNumber *)hours minutes:(NSNumber *)minutes seconds:(NSNumber *)seconds updateMode:(SDLUpdateMode *)updateMode correlationID:(NSNumber *)correlationID;
++ (SDLSetMediaClockTimer *)buildSetMediaClockTimerWithHours:(NSNumber *)hours minutes:(NSNumber *)minutes seconds:(NSNumber *)seconds updateMode:(SDLUpdateMode)updateMode correlationID:(NSNumber *)correlationID;
-+ (SDLSetMediaClockTimer *)buildSetMediaClockTimerWithUpdateMode:(SDLUpdateMode *)updateMode correlationID:(NSNumber *)correlationID;
++ (SDLSetMediaClockTimer *)buildSetMediaClockTimerWithUpdateMode:(SDLUpdateMode)updateMode correlationID:(NSNumber *)correlationID;
//*****
//***** Show *****
-+ (SDLShow *)buildShowWithMainField1:(NSString *)mainField1 mainField2:(NSString *)mainField2 mainField3:(NSString *)mainField3 mainField4:(NSString *)mainField4 statusBar:(NSString *)statusBar mediaClock:(NSString *)mediaClock mediaTrack:(NSString *)mediaTrack alignment:(SDLTextAlignment *)textAlignment graphic:(SDLImage *)graphic softButtons:(NSArray *)softButtons customPresets:(NSArray *)customPresets correlationID:(NSNumber *)correlationID;
++ (SDLShow *)buildShowWithMainField1:(NSString *)mainField1 mainField2:(NSString *)mainField2 mainField3:(NSString *)mainField3 mainField4:(NSString *)mainField4 statusBar:(NSString *)statusBar mediaClock:(NSString *)mediaClock mediaTrack:(NSString *)mediaTrack alignment:(SDLTextAlignment)textAlignment graphic:(SDLImage *)graphic softButtons:(NSArray *)softButtons customPresets:(NSArray *)customPresets correlationID:(NSNumber *)correlationID;
-+ (SDLShow *)buildShowWithMainField1:(NSString *)mainField1 mainField2:(NSString *)mainField2 statusBar:(NSString *)statusBar mediaClock:(NSString *)mediaClock mediaTrack:(NSString *)mediaTrack alignment:(SDLTextAlignment *)textAlignment correlationID:(NSNumber *)correlationID;
++ (SDLShow *)buildShowWithMainField1:(NSString *)mainField1 mainField2:(NSString *)mainField2 statusBar:(NSString *)statusBar mediaClock:(NSString *)mediaClock mediaTrack:(NSString *)mediaTrack alignment:(SDLTextAlignment)textAlignment correlationID:(NSNumber *)correlationID;
-+ (SDLShow *)buildShowWithMainField1:(NSString *)mainField1 mainField2:(NSString *)mainField2 alignment:(SDLTextAlignment *)alignment correlationID:(NSNumber *)correlationID;
++ (SDLShow *)buildShowWithMainField1:(NSString *)mainField1 mainField2:(NSString *)mainField2 alignment:(SDLTextAlignment)alignment correlationID:(NSNumber *)correlationID;
//*****
@@ -199,7 +199,7 @@
+ (SDLSlider *)buildSliderStaticFooterWithNumTicks:(NSNumber *)numTicks position:(NSNumber *)position sliderHeader:(NSString *)sliderHeader sliderFooter:(NSString *)sliderFooter timeout:(NSNumber *)timeout correlationID:(NSNumber *)correlationID;
//*****
-+ (SDLSoftButton *)buildSoftButtonWithType:(SDLSoftButtonType *)type text:(NSString *)text image:(SDLImage *)image highlighted:(BOOL)highlighted buttonID:(UInt16)buttonID systemAction:(SDLSystemAction *)systemAction handler:(SDLRPCNotificationHandler)handler;
++ (SDLSoftButton *)buildSoftButtonWithType:(SDLSoftButtonType)type text:(NSString *)text image:(SDLImage *)image highlighted:(BOOL)highlighted buttonID:(UInt16)buttonID systemAction:(SDLSystemAction)systemAction handler:(SDLRPCNotificationHandler)handler;
//***** Speak *****
+ (SDLSpeak *)buildSpeakWithTTSChunks:(NSArray *)ttsChunks correlationID:(NSNumber *)correlationID;
@@ -208,9 +208,9 @@
+ (SDLSpeak *)buildSpeakWithTTS:(NSString *)ttsText correlationID:(NSNumber *)correlationID;
//*****
-+ (SDLSubscribeButton *)buildSubscribeButtonWithName:(SDLButtonName *)buttonName correlationID:(NSNumber *)correlationID __deprecated_msg("use buildSubscribeButtonWithName:handler: with SDLManager instead");
++ (SDLSubscribeButton *)buildSubscribeButtonWithName:(SDLButtonName)buttonName correlationID:(NSNumber *)correlationID __deprecated_msg("use buildSubscribeButtonWithName:handler: with SDLManager instead");
-+ (SDLSubscribeButton *)buildSubscribeButtonWithName:(SDLButtonName *)buttonName handler:(SDLRPCNotificationHandler)handler;
++ (SDLSubscribeButton *)buildSubscribeButtonWithName:(SDLButtonName)buttonName handler:(SDLRPCNotificationHandler)handler;
+ (SDLSubscribeVehicleData *)buildSubscribeVehicleDataWithGPS:(NSNumber *)gps speed:(NSNumber *)speed rpm:(NSNumber *)rpm fuelLevel:(NSNumber *)fuelLevel fuelLevelState:(NSNumber *)fuelLevelState instantFuelConsumption:(NSNumber *)instantFuelConsumption externalTemperature:(NSNumber *)externalTemperature prndl:(NSNumber *)prndl tirePressure:(NSNumber *)tirePressure odometer:(NSNumber *)odometer beltStatus:(NSNumber *)beltStatus bodyInformation:(NSNumber *)bodyInformation deviceStatus:(NSNumber *)deviceStatus driverBraking:(NSNumber *)driverBraking wiperStatus:(NSNumber *)wiperStatus headLampStatus:(NSNumber *)headLampStatus engineTorque:(NSNumber *)engineTorque accPedalPosition:(NSNumber *)accPedalPosition steeringWheelAngle:(NSNumber *)steeringWheelAngle correlationID:(NSNumber *)correlationID;
@@ -218,7 +218,7 @@
+ (SDLUnregisterAppInterface *)buildUnregisterAppInterfaceWithCorrelationID:(NSNumber *)correlationID;
-+ (SDLUnsubscribeButton *)buildUnsubscribeButtonWithName:(SDLButtonName *)buttonName correlationID:(NSNumber *)correlationID;
++ (SDLUnsubscribeButton *)buildUnsubscribeButtonWithName:(SDLButtonName)buttonName correlationID:(NSNumber *)correlationID;
+ (SDLUnsubscribeVehicleData *)buildUnsubscribeVehicleDataWithGPS:(NSNumber *)gps speed:(NSNumber *)speed rpm:(NSNumber *)rpm fuelLevel:(NSNumber *)fuelLevel fuelLevelState:(NSNumber *)fuelLevelState instantFuelConsumption:(NSNumber *)instantFuelConsumption externalTemperature:(NSNumber *)externalTemperature prndl:(NSNumber *)prndl tirePressure:(NSNumber *)tirePressure odometer:(NSNumber *)odometer beltStatus:(NSNumber *)beltStatus bodyInformation:(NSNumber *)bodyInformation deviceStatus:(NSNumber *)deviceStatus driverBraking:(NSNumber *)driverBraking wiperStatus:(NSNumber *)wiperStatus headLampStatus:(NSNumber *)headLampStatus engineTorque:(NSNumber *)engineTorque accPedalPosition:(NSNumber *)accPedalPosition steeringWheelAngle:(NSNumber *)steeringWheelAngle correlationID:(NSNumber *)correlationID;
diff --git a/SmartDeviceLink/SDLRPCRequestFactory.m b/SmartDeviceLink/SDLRPCRequestFactory.m
index 0d94c5a39..37bf35d13 100644
--- a/SmartDeviceLink/SDLRPCRequestFactory.m
+++ b/SmartDeviceLink/SDLRPCRequestFactory.m
@@ -12,7 +12,6 @@
#import "SDLAlertManeuver.h"
#import "SDLAppHMIType.h"
#import "SDLAppInfo.h"
-#import "SDLAppInfo.h"
#import "SDLChangeRegistration.h"
#import "SDLCreateInteractionChoiceSet.h"
#import "SDLDebugTool.h"
@@ -23,11 +22,9 @@
#import "SDLDeviceInfo.h"
#import "SDLDialNumber.h"
#import "SDLEndAudioPassThru.h"
-#import "SDLFileType.h"
#import "SDLGetDTCs.h"
#import "SDLGetVehicleData.h"
#import "SDLImage.h"
-#import "SDLInteractionMode.h"
#import "SDLListFiles.h"
#import "SDLMenuParams.h"
#import "SDLPerformAudioPassThru.h"
@@ -64,7 +61,7 @@ static NSString *const SDLBundleShortVersionStringKey = @"CFBundleShortVersionSt
@implementation SDLRPCRequestFactory
//***** AddCommand *****
-+ (SDLAddCommand *)buildAddCommandWithID:(NSNumber *)cmdID menuName:(NSString *)menuName parentID:(NSNumber *)parentID position:(NSNumber *)position vrCommands:(NSArray *)vrCommands iconValue:(NSString *)iconValue iconType:(SDLImageType *)iconType correlationID:(NSNumber *)correlationID {
++ (SDLAddCommand *)buildAddCommandWithID:(NSNumber *)cmdID menuName:(NSString *)menuName parentID:(NSNumber *)parentID position:(NSNumber *)position vrCommands:(NSArray *)vrCommands iconValue:(NSString *)iconValue iconType:(SDLImageType)iconType correlationID:(NSNumber *)correlationID {
SDLAddCommand *msg = [[SDLAddCommand alloc] init];
msg.cmdID = cmdID;
@@ -90,7 +87,7 @@ static NSString *const SDLBundleShortVersionStringKey = @"CFBundleShortVersionSt
return msg;
}
-+ (SDLAddCommand *)buildAddCommandWithID:(NSNumber *)cmdID menuName:(NSString *)menuName parentID:(NSNumber *)parentID position:(NSNumber *)position vrCommands:(NSArray *)vrCommands iconValue:(NSString *)iconValue iconType:(SDLImageType *)iconType handler:(SDLRPCNotificationHandler)handler {
++ (SDLAddCommand *)buildAddCommandWithID:(NSNumber *)cmdID menuName:(NSString *)menuName parentID:(NSNumber *)parentID position:(NSNumber *)position vrCommands:(NSArray *)vrCommands iconValue:(NSString *)iconValue iconType:(SDLImageType)iconType handler:(SDLRPCNotificationHandler)handler {
SDLAddCommand *msg = [[SDLAddCommand alloc] initWithHandler:handler];
msg.cmdID = cmdID;
@@ -152,7 +149,7 @@ static NSString *const SDLBundleShortVersionStringKey = @"CFBundleShortVersionSt
+ (SDLAlert *)buildAlertWithTTS:(NSString *)ttsText alertText1:(NSString *)alertText1 alertText2:(NSString *)alertText2 alertText3:(NSString *)alertText3 playTone:(NSNumber *)playTone duration:(NSNumber *)duration correlationID:(NSNumber *)correlationID {
SDLTTSChunk *simpleChunk = [[SDLTTSChunk alloc] init];
simpleChunk.text = ttsText;
- simpleChunk.type = SDLSpeechCapabilities.TEXT;
+ simpleChunk.type = SDLSpeechCapabilitiesText;
NSArray *ttsChunks = [NSArray arrayWithObject:simpleChunk];
return [SDLRPCRequestFactory buildAlertWithTTSChunks:ttsChunks alertText1:alertText1 alertText2:alertText2 alertText3:alertText3 playTone:playTone duration:duration softButtons:nil correlationID:correlationID];
@@ -207,7 +204,7 @@ static NSString *const SDLBundleShortVersionStringKey = @"CFBundleShortVersionSt
return msg;
}
-+ (SDLChangeRegistration *)buildChangeRegistrationWithLanguage:(SDLLanguage *)language hmiDisplayLanguage:(SDLLanguage *)hmiDisplayLanguage correlationID:(NSNumber *)correlationID {
++ (SDLChangeRegistration *)buildChangeRegistrationWithLanguage:(SDLLanguage)language hmiDisplayLanguage:(SDLLanguage)hmiDisplayLanguage correlationID:(NSNumber *)correlationID {
SDLChangeRegistration *msg = [[SDLChangeRegistration alloc] init];
msg.language = language;
msg.hmiDisplayLanguage = hmiDisplayLanguage;
@@ -313,7 +310,7 @@ static NSString *const SDLBundleShortVersionStringKey = @"CFBundleShortVersionSt
return msg;
}
-+ (SDLPerformAudioPassThru *)buildPerformAudioPassThruWithInitialPrompt:(NSString *)initialPrompt audioPassThruDisplayText1:(NSString *)audioPassThruDisplayText1 audioPassThruDisplayText2:(NSString *)audioPassThruDisplayText2 samplingRate:(SDLSamplingRate *)samplingRate maxDuration:(NSNumber *)maxDuration bitsPerSample:(SDLBitsPerSample *)bitsPerSample audioType:(SDLAudioType *)audioType muteAudio:(NSNumber *)muteAudio correlationID:(NSNumber *)correlationID {
++ (SDLPerformAudioPassThru *)buildPerformAudioPassThruWithInitialPrompt:(NSString *)initialPrompt audioPassThruDisplayText1:(NSString *)audioPassThruDisplayText1 audioPassThruDisplayText2:(NSString *)audioPassThruDisplayText2 samplingRate:(SDLSamplingRate)samplingRate maxDuration:(NSNumber *)maxDuration bitsPerSample:(SDLBitsPerSample)bitsPerSample audioType:(SDLAudioType)audioType muteAudio:(NSNumber *)muteAudio correlationID:(NSNumber *)correlationID {
NSArray *initialChunks = [SDLTTSChunkFactory buildTTSChunksFromSimple:initialPrompt];
SDLPerformAudioPassThru *msg = [[SDLPerformAudioPassThru alloc] init];
@@ -332,7 +329,7 @@ static NSString *const SDLBundleShortVersionStringKey = @"CFBundleShortVersionSt
//***** PerformInteraction *****
-+ (SDLPerformInteraction *)buildPerformInteractionWithInitialChunks:(NSArray *)initialChunks initialText:(NSString *)initialText interactionChoiceSetIDList:(NSArray *)interactionChoiceSetIDList helpChunks:(NSArray *)helpChunks timeoutChunks:(NSArray *)timeoutChunks interactionMode:(SDLInteractionMode *)interactionMode timeout:(NSNumber *)timeout vrHelp:(NSArray *)vrHelp correlationID:(NSNumber *)correlationID {
++ (SDLPerformInteraction *)buildPerformInteractionWithInitialChunks:(NSArray *)initialChunks initialText:(NSString *)initialText interactionChoiceSetIDList:(NSArray *)interactionChoiceSetIDList helpChunks:(NSArray *)helpChunks timeoutChunks:(NSArray *)timeoutChunks interactionMode:(SDLInteractionMode)interactionMode timeout:(NSNumber *)timeout vrHelp:(NSArray *)vrHelp correlationID:(NSNumber *)correlationID {
SDLPerformInteraction *msg = [[SDLPerformInteraction alloc] init];
msg.initialPrompt = [initialChunks mutableCopy];
msg.initialText = initialText;
@@ -348,7 +345,7 @@ static NSString *const SDLBundleShortVersionStringKey = @"CFBundleShortVersionSt
}
//***
-+ (SDLPerformInteraction *)buildPerformInteractionWithInitialPrompt:(NSString *)initialPrompt initialText:(NSString *)initialText interactionChoiceSetIDList:(NSArray *)interactionChoiceSetIDList helpPrompt:(NSString *)helpPrompt timeoutPrompt:(NSString *)timeoutPrompt interactionMode:(SDLInteractionMode *)interactionMode timeout:(NSNumber *)timeout vrHelp:(NSArray *)vrHelp correlationID:(NSNumber *)correlationID {
++ (SDLPerformInteraction *)buildPerformInteractionWithInitialPrompt:(NSString *)initialPrompt initialText:(NSString *)initialText interactionChoiceSetIDList:(NSArray *)interactionChoiceSetIDList helpPrompt:(NSString *)helpPrompt timeoutPrompt:(NSString *)timeoutPrompt interactionMode:(SDLInteractionMode)interactionMode timeout:(NSNumber *)timeout vrHelp:(NSArray *)vrHelp correlationID:(NSNumber *)correlationID {
NSArray *initialChunks = [SDLTTSChunkFactory buildTTSChunksFromSimple:initialPrompt];
NSArray *helpChunks = [SDLTTSChunkFactory buildTTSChunksFromSimple:helpPrompt];
NSArray *timeoutChunks = [SDLTTSChunkFactory buildTTSChunksFromSimple:timeoutPrompt];
@@ -360,10 +357,10 @@ static NSString *const SDLBundleShortVersionStringKey = @"CFBundleShortVersionSt
NSArray *interactionChoiceSetIDList = [NSArray arrayWithObject:interactionChoiceSetID];
NSArray *initialChunks = [SDLTTSChunkFactory buildTTSChunksFromSimple:initialPrompt];
- return [SDLRPCRequestFactory buildPerformInteractionWithInitialChunks:initialChunks initialText:initialText interactionChoiceSetIDList:interactionChoiceSetIDList helpChunks:nil timeoutChunks:nil interactionMode:SDLInteractionMode.BOTH timeout:nil vrHelp:vrHelp correlationID:correlationID];
+ return [SDLRPCRequestFactory buildPerformInteractionWithInitialChunks:initialChunks initialText:initialText interactionChoiceSetIDList:interactionChoiceSetIDList helpChunks:nil timeoutChunks:nil interactionMode:SDLInteractionModeBoth timeout:nil vrHelp:vrHelp correlationID:correlationID];
}
-+ (SDLPerformInteraction *)buildPerformInteractionWithInitialPrompt:(NSString *)initialPrompt initialText:(NSString *)initialText interactionChoiceSetIDList:(NSArray *)interactionChoiceSetIDList helpPrompt:(NSString *)helpPrompt timeoutPrompt:(NSString *)timeoutPrompt interactionMode:(SDLInteractionMode *)interactionMode timeout:(NSNumber *)timeout correlationID:(NSNumber *)correlationID {
++ (SDLPerformInteraction *)buildPerformInteractionWithInitialPrompt:(NSString *)initialPrompt initialText:(NSString *)initialText interactionChoiceSetIDList:(NSArray *)interactionChoiceSetIDList helpPrompt:(NSString *)helpPrompt timeoutPrompt:(NSString *)timeoutPrompt interactionMode:(SDLInteractionMode)interactionMode timeout:(NSNumber *)timeout correlationID:(NSNumber *)correlationID {
return [SDLRPCRequestFactory buildPerformInteractionWithInitialPrompt:initialPrompt initialText:initialText interactionChoiceSetIDList:interactionChoiceSetIDList helpPrompt:helpPrompt timeoutPrompt:timeoutPrompt interactionMode:interactionMode timeout:timeout vrHelp:nil correlationID:(NSNumber *)correlationID];
}
@@ -372,7 +369,7 @@ static NSString *const SDLBundleShortVersionStringKey = @"CFBundleShortVersionSt
}
//*****
-+ (SDLPutFile *)buildPutFileWithFileName:(NSString *)fileName fileType:(SDLFileType *)fileType persistentFile:(NSNumber *)persistentFile correlationId:(NSNumber *)correlationID {
++ (SDLPutFile *)buildPutFileWithFileName:(NSString *)fileName fileType:(SDLFileType)fileType persistentFile:(NSNumber *)persistentFile correlationId:(NSNumber *)correlationID {
SDLPutFile *msg = [[SDLPutFile alloc] init];
msg.syncFileName = fileName;
@@ -383,7 +380,7 @@ static NSString *const SDLBundleShortVersionStringKey = @"CFBundleShortVersionSt
return msg;
}
-+ (SDLPutFile *)buildPutFileWithFileName:(NSString *)syncFileName fileType:(SDLFileType *)fileType persisistentFile:(NSNumber *)persistentFile correlationID:(NSNumber *)correlationID {
++ (SDLPutFile *)buildPutFileWithFileName:(NSString *)syncFileName fileType:(SDLFileType)fileType persisistentFile:(NSNumber *)persistentFile correlationID:(NSNumber *)correlationID {
return [self buildPutFileWithFileName:syncFileName fileType:fileType persistentFile:persistentFile correlationId:correlationID];
}
@@ -397,7 +394,7 @@ static NSString *const SDLBundleShortVersionStringKey = @"CFBundleShortVersionSt
}
//***** RegisterAppInterface *****
-+ (SDLRegisterAppInterface *)buildRegisterAppInterfaceWithAppName:(NSString *)appName ttsName:(NSArray *)ttsName vrSynonyms:(NSArray *)vrSynonyms isMediaApp:(NSNumber *)isMediaApp languageDesired:(SDLLanguage *)languageDesired hmiDisplayLanguageDesired:(SDLLanguage *)hmiDisplayLanguageDesired appID:(NSString *)appID {
++ (SDLRegisterAppInterface *)buildRegisterAppInterfaceWithAppName:(NSString *)appName ttsName:(NSArray *)ttsName vrSynonyms:(NSArray *)vrSynonyms isMediaApp:(NSNumber *)isMediaApp languageDesired:(SDLLanguage)languageDesired hmiDisplayLanguageDesired:(SDLLanguage)hmiDisplayLanguageDesired appID:(NSString *)appID {
SDLRegisterAppInterface *msg = [[SDLRegisterAppInterface alloc] init];
SDLSyncMsgVersion *version = [[SDLSyncMsgVersion alloc] init];
version.majorVersion = [NSNumber numberWithInt:1];
@@ -441,12 +438,12 @@ static NSString *const SDLBundleShortVersionStringKey = @"CFBundleShortVersionSt
return appInfo;
}
-+ (SDLRegisterAppInterface *)buildRegisterAppInterfaceWithAppName:(NSString *)appName isMediaApp:(NSNumber *)isMediaApp languageDesired:(SDLLanguage *)languageDesired appID:(NSString *)appID {
++ (SDLRegisterAppInterface *)buildRegisterAppInterfaceWithAppName:(NSString *)appName isMediaApp:(NSNumber *)isMediaApp languageDesired:(SDLLanguage)languageDesired appID:(NSString *)appID {
NSMutableArray *syns = [NSMutableArray arrayWithObject:appName];
return [SDLRPCRequestFactory buildRegisterAppInterfaceWithAppName:appName ttsName:nil vrSynonyms:syns isMediaApp:isMediaApp languageDesired:languageDesired hmiDisplayLanguageDesired:languageDesired appID:appID];
}
-+ (SDLRegisterAppInterface *)buildRegisterAppInterfaceWithAppName:(NSString *)appName languageDesired:(SDLLanguage *)languageDesired appID:(NSString *)appID {
++ (SDLRegisterAppInterface *)buildRegisterAppInterfaceWithAppName:(NSString *)appName languageDesired:(SDLLanguage)languageDesired appID:(NSString *)appID {
return [SDLRPCRequestFactory buildRegisterAppInterfaceWithAppName:appName isMediaApp:@NO languageDesired:languageDesired appID:appID];
}
//*****
@@ -524,7 +521,7 @@ static NSString *const SDLBundleShortVersionStringKey = @"CFBundleShortVersionSt
//***** SetMediaClockTimer *****
-+ (SDLSetMediaClockTimer *)buildSetMediaClockTimerWithHours:(NSNumber *)hours minutes:(NSNumber *)minutes seconds:(NSNumber *)seconds updateMode:(SDLUpdateMode *)updateMode correlationID:(NSNumber *)correlationID {
++ (SDLSetMediaClockTimer *)buildSetMediaClockTimerWithHours:(NSNumber *)hours minutes:(NSNumber *)minutes seconds:(NSNumber *)seconds updateMode:(SDLUpdateMode)updateMode correlationID:(NSNumber *)correlationID {
SDLSetMediaClockTimer *msg = [[SDLSetMediaClockTimer alloc] init];
SDLStartTime *startTime = [[SDLStartTime alloc] init];
startTime.hours = hours;
@@ -537,7 +534,7 @@ static NSString *const SDLBundleShortVersionStringKey = @"CFBundleShortVersionSt
return msg;
}
-+ (SDLSetMediaClockTimer *)buildSetMediaClockTimerWithUpdateMode:(SDLUpdateMode *)updateMode correlationID:(NSNumber *)correlationID {
++ (SDLSetMediaClockTimer *)buildSetMediaClockTimerWithUpdateMode:(SDLUpdateMode)updateMode correlationID:(NSNumber *)correlationID {
SDLSetMediaClockTimer *msg = [[SDLSetMediaClockTimer alloc] init];
msg.updateMode = updateMode;
msg.correlationID = correlationID;
@@ -548,7 +545,7 @@ static NSString *const SDLBundleShortVersionStringKey = @"CFBundleShortVersionSt
//***** Show *****
-+ (SDLShow *)buildShowWithMainField1:(NSString *)mainField1 mainField2:(NSString *)mainField2 mainField3:(NSString *)mainField3 mainField4:(NSString *)mainField4 statusBar:(NSString *)statusBar mediaClock:(NSString *)mediaClock mediaTrack:(NSString *)mediaTrack alignment:(SDLTextAlignment *)textAlignment graphic:(SDLImage *)graphic softButtons:(NSArray *)softButtons customPresets:(NSArray *)customPresets correlationID:(NSNumber *)correlationID {
++ (SDLShow *)buildShowWithMainField1:(NSString *)mainField1 mainField2:(NSString *)mainField2 mainField3:(NSString *)mainField3 mainField4:(NSString *)mainField4 statusBar:(NSString *)statusBar mediaClock:(NSString *)mediaClock mediaTrack:(NSString *)mediaTrack alignment:(SDLTextAlignment)textAlignment graphic:(SDLImage *)graphic softButtons:(NSArray *)softButtons customPresets:(NSArray *)customPresets correlationID:(NSNumber *)correlationID {
SDLShow *msg = [[SDLShow alloc] init];
msg.correlationID = correlationID;
msg.mainField1 = mainField1;
@@ -566,7 +563,7 @@ static NSString *const SDLBundleShortVersionStringKey = @"CFBundleShortVersionSt
return msg;
}
-+ (SDLShow *)buildShowWithMainField1:(NSString *)mainField1 mainField2:(NSString *)mainField2 statusBar:(NSString *)statusBar mediaClock:(NSString *)mediaClock mediaTrack:(NSString *)mediaTrack alignment:(SDLTextAlignment *)textAlignment correlationID:(NSNumber *)correlationID {
++ (SDLShow *)buildShowWithMainField1:(NSString *)mainField1 mainField2:(NSString *)mainField2 statusBar:(NSString *)statusBar mediaClock:(NSString *)mediaClock mediaTrack:(NSString *)mediaTrack alignment:(SDLTextAlignment)textAlignment correlationID:(NSNumber *)correlationID {
SDLShow *msg = [[SDLShow alloc] init];
msg.correlationID = correlationID;
msg.mainField1 = mainField1;
@@ -579,7 +576,7 @@ static NSString *const SDLBundleShortVersionStringKey = @"CFBundleShortVersionSt
return msg;
}
-+ (SDLShow *)buildShowWithMainField1:(NSString *)mainField1 mainField2:(NSString *)mainField2 alignment:(SDLTextAlignment *)alignment correlationID:(NSNumber *)correlationID {
++ (SDLShow *)buildShowWithMainField1:(NSString *)mainField1 mainField2:(NSString *)mainField2 alignment:(SDLTextAlignment)alignment correlationID:(NSNumber *)correlationID {
return [SDLRPCRequestFactory buildShowWithMainField1:mainField1 mainField2:mainField2 statusBar:nil mediaClock:nil mediaTrack:nil alignment:alignment correlationID:correlationID];
}
@@ -628,7 +625,7 @@ static NSString *const SDLBundleShortVersionStringKey = @"CFBundleShortVersionSt
}
//*****
-+ (SDLSoftButton *)buildSoftButtonWithType:(SDLSoftButtonType *)type text:(NSString *)text image:(SDLImage *)image highlighted:(BOOL)highlighted buttonID:(UInt16)buttonID systemAction:(SDLSystemAction *)systemAction handler:(SDLRPCNotificationHandler)handler {
++ (SDLSoftButton *)buildSoftButtonWithType:(SDLSoftButtonType)type text:(NSString *)text image:(SDLImage *)image highlighted:(BOOL)highlighted buttonID:(UInt16)buttonID systemAction:(SDLSystemAction)systemAction handler:(SDLRPCNotificationHandler)handler {
SDLSoftButton *button = [[SDLSoftButton alloc] initWithHandler:handler];
button.type = type;
button.text = text;
@@ -654,14 +651,14 @@ static NSString *const SDLBundleShortVersionStringKey = @"CFBundleShortVersionSt
+ (SDLSpeak *)buildSpeakWithTTS:(NSString *)ttsText correlationID:(NSNumber *)correlationID {
SDLTTSChunk *simpleChunk = [[SDLTTSChunk alloc] init];
simpleChunk.text = ttsText;
- simpleChunk.type = SDLSpeechCapabilities.TEXT;
+ simpleChunk.type = SDLSpeechCapabilitiesText;
NSArray *ttsChunks = [NSMutableArray arrayWithObject:simpleChunk];
return [SDLRPCRequestFactory buildSpeakWithTTSChunks:ttsChunks correlationID:correlationID];
}
//*****
-+ (SDLSubscribeButton *)buildSubscribeButtonWithName:(SDLButtonName *)buttonName correlationID:(NSNumber *)correlationID {
++ (SDLSubscribeButton *)buildSubscribeButtonWithName:(SDLButtonName)buttonName correlationID:(NSNumber *)correlationID {
SDLSubscribeButton *msg = [[SDLSubscribeButton alloc] init];
msg.buttonName = buttonName;
msg.correlationID = correlationID;
@@ -669,7 +666,7 @@ static NSString *const SDLBundleShortVersionStringKey = @"CFBundleShortVersionSt
return msg;
}
-+ (SDLSubscribeButton *)buildSubscribeButtonWithName:(SDLButtonName *)buttonName handler:(SDLRPCNotificationHandler)handler {
++ (SDLSubscribeButton *)buildSubscribeButtonWithName:(SDLButtonName)buttonName handler:(SDLRPCNotificationHandler)handler {
SDLSubscribeButton *msg = [[SDLSubscribeButton alloc] initWithHandler:handler];
msg.buttonName = buttonName;
@@ -709,7 +706,7 @@ static NSString *const SDLBundleShortVersionStringKey = @"CFBundleShortVersionSt
return msg;
}
-+ (SDLUnsubscribeButton *)buildUnsubscribeButtonWithName:(SDLButtonName *)buttonName correlationID:(NSNumber *)correlationID {
++ (SDLUnsubscribeButton *)buildUnsubscribeButtonWithName:(SDLButtonName)buttonName correlationID:(NSNumber *)correlationID {
SDLUnsubscribeButton *msg = [[SDLUnsubscribeButton alloc] init];
msg.buttonName = buttonName;
msg.correlationID = correlationID;
diff --git a/SmartDeviceLink/SDLRPCResponse.h b/SmartDeviceLink/SDLRPCResponse.h
index 57bd500f4..13d995042 100644
--- a/SmartDeviceLink/SDLRPCResponse.h
+++ b/SmartDeviceLink/SDLRPCResponse.h
@@ -4,14 +4,14 @@
#import "SDLRPCMessage.h"
-@class SDLResult;
+#import "SDLResult.h"
@interface SDLRPCResponse : SDLRPCMessage {
}
@property (strong) NSNumber *correlationID;
@property (strong) NSNumber *success;
-@property (strong) SDLResult *resultCode;
+@property (strong) SDLResult resultCode;
@property (strong) NSString *info;
@end
diff --git a/SmartDeviceLink/SDLRPCResponse.m b/SmartDeviceLink/SDLRPCResponse.m
index 606781070..334c3191b 100644
--- a/SmartDeviceLink/SDLRPCResponse.m
+++ b/SmartDeviceLink/SDLRPCResponse.m
@@ -57,7 +57,7 @@
return [parameters objectForKey:NAMES_success];
}
-- (void)setResultCode:(SDLResult *)resultCode {
+- (void)setResultCode:(SDLResult)resultCode {
if (resultCode != nil) {
[parameters setObject:resultCode forKey:NAMES_resultCode];
} else {
@@ -65,13 +65,9 @@
}
}
-- (SDLResult *)resultCode {
+- (SDLResult)resultCode {
NSObject *obj = [parameters objectForKey:NAMES_resultCode];
- if (obj == nil || [obj isKindOfClass:SDLResult.class]) {
- return (SDLResult *)obj;
- } else {
- return [SDLResult valueOf:(NSString *)obj];
- }
+ return (SDLResult)obj;
}
- (void)setInfo:(NSString *)info {
diff --git a/SmartDeviceLink/SDLRPCStruct.m b/SmartDeviceLink/SDLRPCStruct.m
index dd96fff5d..1efe96de7 100644
--- a/SmartDeviceLink/SDLRPCStruct.m
+++ b/SmartDeviceLink/SDLRPCStruct.m
@@ -45,17 +45,9 @@
[serializedList addObject:[serializeable serializeAsDictionary:version]];
}
[ret setObject:serializedList forKey:key];
- } else if (arrayVal.count > 0 && ([[arrayVal objectAtIndex:0] isKindOfClass:SDLEnum.class])) {
- NSMutableArray *serializedList = [NSMutableArray arrayWithCapacity:arrayVal.count];
- for (SDLEnum *anEnum in arrayVal) {
- [serializedList addObject:anEnum.value];
- }
- [ret setObject:serializedList forKey:key];
} else {
[ret setObject:value forKey:key];
}
- } else if ([value isKindOfClass:SDLEnum.class]) {
- [ret setObject:((SDLEnum *)value).value forKey:key];
} else {
[ret setObject:value forKey:key];
}
diff --git a/SmartDeviceLink/SDLRegisterAppInterface.h b/SmartDeviceLink/SDLRegisterAppInterface.h
index 642edd3e3..2a6ab340b 100644
--- a/SmartDeviceLink/SDLRegisterAppInterface.h
+++ b/SmartDeviceLink/SDLRegisterAppInterface.h
@@ -3,8 +3,9 @@
#import "SDLRPCRequest.h"
+#import "SDLLanguage.h"
+
@class SDLDeviceInfo;
-@class SDLLanguage;
@class SDLSyncMsgVersion;
@class SDLAppInfo;
@@ -164,7 +165,7 @@
*
* Required
*/
-@property (strong) SDLLanguage *languageDesired;
+@property (strong) SDLLanguage languageDesired;
/**
* @abstract An enumeration indicating what language the application intends to use for user interaction (Display).
@@ -175,7 +176,7 @@
*
* @since SDL 2.0
*/
-@property (strong) SDLLanguage *hmiDisplayLanguageDesired;
+@property (strong) SDLLanguage hmiDisplayLanguageDesired;
/**
* @abstract A list of all applicable app types stating which classifications to be given to the app.
diff --git a/SmartDeviceLink/SDLRegisterAppInterface.m b/SmartDeviceLink/SDLRegisterAppInterface.m
index 36fac6627..ee09d0864 100644
--- a/SmartDeviceLink/SDLRegisterAppInterface.m
+++ b/SmartDeviceLink/SDLRegisterAppInterface.m
@@ -7,7 +7,6 @@
#import "SDLAppHMIType.h"
#import "SDLAppInfo.h"
#import "SDLDeviceInfo.h"
-#import "SDLLanguage.h"
#import "SDLNames.h"
#import "SDLSyncMsgVersion.h"
#import "SDLTTSChunk.h"
@@ -113,7 +112,7 @@
return [parameters objectForKey:NAMES_isMediaApplication];
}
-- (void)setLanguageDesired:(SDLLanguage *)languageDesired {
+- (void)setLanguageDesired:(SDLLanguage)languageDesired {
if (languageDesired != nil) {
[parameters setObject:languageDesired forKey:NAMES_languageDesired];
} else {
@@ -121,16 +120,12 @@
}
}
-- (SDLLanguage *)languageDesired {
+- (SDLLanguage)languageDesired {
NSObject *obj = [parameters objectForKey:NAMES_languageDesired];
- if (obj == nil || [obj isKindOfClass:SDLLanguage.class]) {
- return (SDLLanguage *)obj;
- } else {
- return [SDLLanguage valueOf:(NSString *)obj];
- }
+ return (SDLLanguage)obj;
}
-- (void)setHmiDisplayLanguageDesired:(SDLLanguage *)hmiDisplayLanguageDesired {
+- (void)setHmiDisplayLanguageDesired:(SDLLanguage)hmiDisplayLanguageDesired {
if (hmiDisplayLanguageDesired != nil) {
[parameters setObject:hmiDisplayLanguageDesired forKey:NAMES_hmiDisplayLanguageDesired];
} else {
@@ -138,13 +133,9 @@
}
}
-- (SDLLanguage *)hmiDisplayLanguageDesired {
+- (SDLLanguage)hmiDisplayLanguageDesired {
NSObject *obj = [parameters objectForKey:NAMES_hmiDisplayLanguageDesired];
- if (obj == nil || [obj isKindOfClass:SDLLanguage.class]) {
- return (SDLLanguage *)obj;
- } else {
- return [SDLLanguage valueOf:(NSString *)obj];
- }
+ return (SDLLanguage)obj;
}
- (void)setAppHMIType:(NSMutableArray *)appHMIType {
@@ -157,12 +148,12 @@
- (NSMutableArray *)appHMIType {
NSMutableArray *array = [parameters objectForKey:NAMES_appHMIType];
- if ([array count] < 1 || [[array objectAtIndex:0] isKindOfClass:SDLAppHMIType.class]) {
+ if ([array count] < 1) {
return array;
} else {
NSMutableArray *newList = [NSMutableArray arrayWithCapacity:[array count]];
for (NSString *enumString in array) {
- [newList addObject:[SDLAppHMIType valueOf:enumString]];
+ [newList addObject:(SDLAppHMIType)enumString];
}
return newList;
}
diff --git a/SmartDeviceLink/SDLRegisterAppInterfaceResponse.h b/SmartDeviceLink/SDLRegisterAppInterfaceResponse.h
index 9bfc0a16a..f5b3c0ed0 100644
--- a/SmartDeviceLink/SDLRegisterAppInterfaceResponse.h
+++ b/SmartDeviceLink/SDLRegisterAppInterfaceResponse.h
@@ -4,12 +4,12 @@
#import "SDLRPCResponse.h"
-@class SDLLanguage;
-@class SDLDisplayCapabilities;
-@class SDLHMICapabilities;
-@class SDLPresetBankCapabilities;
-@class SDLSyncMsgVersion;
-@class SDLVehicleType;
+#import "SDLLanguage.h"
+#import "SDLDisplayCapabilities.h"
+#import "SDLHMICapabilities.h"
+#import "SDLPresetBankCapabilities.h"
+#import "SDLSyncMsgVersion.h"
+#import "SDLVehicleType.h"
/**
@@ -46,7 +46,7 @@
*
* Optional
*/
-@property (strong) SDLLanguage *language;
+@property (strong) SDLLanguage language;
/**
* The currently active display language on Sync
@@ -56,7 +56,7 @@
*
* Optional
*/
-@property (strong) SDLLanguage *hmiDisplayLanguage;
+@property (strong) SDLLanguage hmiDisplayLanguage;
/**
* @see SDLDisplayCapabilities
diff --git a/SmartDeviceLink/SDLRegisterAppInterfaceResponse.m b/SmartDeviceLink/SDLRegisterAppInterfaceResponse.m
index 18356c34f..48f338adc 100644
--- a/SmartDeviceLink/SDLRegisterAppInterfaceResponse.m
+++ b/SmartDeviceLink/SDLRegisterAppInterfaceResponse.m
@@ -6,19 +6,12 @@
#import "SDLAudioPassThruCapabilities.h"
#import "SDLButtonCapabilities.h"
-#import "SDLDisplayCapabilities.h"
-#import "SDLHMICapabilities.h"
#import "SDLHMIZoneCapabilities.h"
-#import "SDLLanguage.h"
#import "SDLNames.h"
#import "SDLPrerecordedSpeech.h"
-#import "SDLPresetBankCapabilities.h"
#import "SDLSoftButtonCapabilities.h"
#import "SDLSpeechCapabilities.h"
-#import "SDLSyncMsgVersion.h"
#import "SDLVRCapabilities.h"
-#import "SDLVehicleType.h"
-
@implementation SDLRegisterAppInterfaceResponse
@@ -51,7 +44,7 @@
}
}
-- (void)setLanguage:(SDLLanguage *)language {
+- (void)setLanguage:(SDLLanguage)language {
if (language != nil) {
[parameters setObject:language forKey:NAMES_language];
} else {
@@ -59,16 +52,12 @@
}
}
-- (SDLLanguage *)language {
+- (SDLLanguage)language {
NSObject *obj = [parameters objectForKey:NAMES_language];
- if (obj == nil || [obj isKindOfClass:SDLLanguage.class]) {
- return (SDLLanguage *)obj;
- } else {
- return [SDLLanguage valueOf:(NSString *)obj];
- }
+ return (SDLLanguage)obj;
}
-- (void)setHmiDisplayLanguage:(SDLLanguage *)hmiDisplayLanguage {
+- (void)setHmiDisplayLanguage:(SDLLanguage)hmiDisplayLanguage {
if (hmiDisplayLanguage != nil) {
[parameters setObject:hmiDisplayLanguage forKey:NAMES_hmiDisplayLanguage];
} else {
@@ -76,16 +65,12 @@
}
}
-- (SDLLanguage *)hmiDisplayLanguage {
+- (SDLLanguage)hmiDisplayLanguage {
NSObject *obj = [parameters objectForKey:NAMES_hmiDisplayLanguage];
- if (obj == nil || [obj isKindOfClass:SDLLanguage.class]) {
- return (SDLLanguage *)obj;
- } else {
- return [SDLLanguage valueOf:(NSString *)obj];
- }
+ return (SDLLanguage)obj;
}
-- (void)setDisplayCapabilities:(SDLDisplayCapabilities *)displayCapabilities {
+- (void)setDisplayCapabilities:(SDLDisplayCapabilities*)displayCapabilities {
if (displayCapabilities != nil) {
[parameters setObject:displayCapabilities forKey:NAMES_displayCapabilities];
} else {
@@ -93,7 +78,7 @@
}
}
-- (SDLDisplayCapabilities *)displayCapabilities {
+- (SDLDisplayCapabilities*)displayCapabilities {
NSObject *obj = [parameters objectForKey:NAMES_displayCapabilities];
if (obj == nil || [obj isKindOfClass:SDLDisplayCapabilities.class]) {
return (SDLDisplayCapabilities *)obj;
@@ -158,8 +143,7 @@
return (SDLPresetBankCapabilities *)obj;
} else {
return [[SDLPresetBankCapabilities alloc] initWithDictionary:(NSMutableDictionary *)obj];
- }
-}
+ }}
- (void)setHmiZoneCapabilities:(NSMutableArray *)hmiZoneCapabilities {
if (hmiZoneCapabilities != nil) {
@@ -171,12 +155,12 @@
- (NSMutableArray *)hmiZoneCapabilities {
NSMutableArray *array = [parameters objectForKey:NAMES_hmiZoneCapabilities];
- if ([array count] < 1 || [[array objectAtIndex:0] isKindOfClass:SDLHMIZoneCapabilities.class]) {
+ if ([array count] < 1) {
return array;
} else {
NSMutableArray *newList = [NSMutableArray arrayWithCapacity:[array count]];
for (NSString *enumString in array) {
- [newList addObject:[SDLHMIZoneCapabilities valueOf:enumString]];
+ [newList addObject:(SDLHMIZoneCapabilities)enumString];
}
return newList;
}
@@ -192,12 +176,12 @@
- (NSMutableArray *)speechCapabilities {
NSMutableArray *array = [parameters objectForKey:NAMES_speechCapabilities];
- if ([array count] < 1 || [[array objectAtIndex:0] isKindOfClass:SDLSpeechCapabilities.class]) {
+ if ([array count] < 1) {
return array;
} else {
NSMutableArray *newList = [NSMutableArray arrayWithCapacity:[array count]];
for (NSString *enumString in array) {
- [newList addObject:[SDLSpeechCapabilities valueOf:enumString]];
+ [newList addObject:(SDLSpeechCapabilities)enumString];
}
return newList;
}
@@ -213,12 +197,12 @@
- (NSMutableArray *)prerecordedSpeech {
NSMutableArray *array = [parameters objectForKey:NAMES_prerecordedSpeech];
- if ([array count] < 1 || [[array objectAtIndex:0] isKindOfClass:SDLPrerecordedSpeech.class]) {
+ if ([array count] < 1) {
return array;
} else {
NSMutableArray *newList = [NSMutableArray arrayWithCapacity:[array count]];
for (NSString *enumString in array) {
- [newList addObject:[SDLPrerecordedSpeech valueOf:enumString]];
+ [newList addObject:(SDLPrerecordedSpeech)enumString];
}
return newList;
}
@@ -234,12 +218,14 @@
- (NSMutableArray *)vrCapabilities {
NSMutableArray *array = [parameters objectForKey:NAMES_vrCapabilities];
- if ([array count] < 1 || [[array objectAtIndex:0] isKindOfClass:SDLVRCapabilities.class]) {
+ if ([array count] < 1) {
return array;
} else {
NSMutableArray *newList = [NSMutableArray arrayWithCapacity:[array count]];
for (NSString *enumString in array) {
- [newList addObject:[SDLVRCapabilities valueOf:enumString]];
+ //NOTE: This was added for Sync Module Compatability, V1 module returns "Text"
+ // newer modules return "TEXT", so we force uppercase.
+ [newList addObject:(SDLVRCapabilities)[enumString uppercaseString]];
}
return newList;
}
diff --git a/SmartDeviceLink/SDLRequestType.h b/SmartDeviceLink/SDLRequestType.h
index a8d631234..5aeb79f31 100644
--- a/SmartDeviceLink/SDLRequestType.h
+++ b/SmartDeviceLink/SDLRequestType.h
@@ -4,31 +4,25 @@
#import "SDLEnum.h"
-@interface SDLRequestType : SDLEnum {
-}
+typedef SDLEnum SDLRequestType NS_EXTENSIBLE_STRING_ENUM;
-+ (SDLRequestType *)valueOf:(NSString *)value;
-+ (NSArray *)values;
-
-+ (SDLRequestType *)HTTP;
-+ (SDLRequestType *)FILE_RESUME;
-+ (SDLRequestType *)AUTH_REQUEST;
-+ (SDLRequestType *)AUTH_CHALLENGE;
-+ (SDLRequestType *)AUTH_ACK;
-+ (SDLRequestType *)PROPRIETARY;
-+ (SDLRequestType *)QUERY_APPS;
-+ (SDLRequestType *)LAUNCH_APP;
-+ (SDLRequestType *)LOCK_SCREEN_ICON_URL;
-+ (SDLRequestType *)TRAFFIC_MESSAGE_CHANNEL;
-+ (SDLRequestType *)DRIVER_PROFILE;
-+ (SDLRequestType *)VOICE_SEARCH;
-+ (SDLRequestType *)NAVIGATION;
-+ (SDLRequestType *)PHONE;
-+ (SDLRequestType *)CLIMATE;
-+ (SDLRequestType *)SETTINGS;
-+ (SDLRequestType *)VEHICLE_DIAGNOSTICS;
-+ (SDLRequestType *)EMERGENCY;
-+ (SDLRequestType *)MEDIA;
-+ (SDLRequestType *)FOTA;
-
-@end
+extern SDLRequestType const SDLRequestTypeHttp;
+extern SDLRequestType const SDLRequestTypeFileResume;
+extern SDLRequestType const SDLRequestTypeAuthRequest;
+extern SDLRequestType const SDLRequestTypeAuthChallenge;
+extern SDLRequestType const SDLRequestTypeAuthAck;
+extern SDLRequestType const SDLRequestTypeProprietary;
+extern SDLRequestType const SDLRequestTypeQueryApps;
+extern SDLRequestType const SDLRequestTypeLaunchApp;
+extern SDLRequestType const SDLRequestTypeLockScreenIconUrl;
+extern SDLRequestType const SDLRequestTypeTrafficMessageChannel;
+extern SDLRequestType const SDLRequestTypeDriverProfile;
+extern SDLRequestType const SDLRequestTypeVoiceSearch;
+extern SDLRequestType const SDLRequestTypeNavigation;
+extern SDLRequestType const SDLRequestTypePhone;
+extern SDLRequestType const SDLRequestTypeClimate;
+extern SDLRequestType const SDLRequestTypeSettings;
+extern SDLRequestType const SDLRequestTypeVehicleDiagnostics;
+extern SDLRequestType const SDLRequestTypeEmergency;
+extern SDLRequestType const SDLRequestTypeMedia;
+extern SDLRequestType const SDLRequestTypeFota;
diff --git a/SmartDeviceLink/SDLRequestType.m b/SmartDeviceLink/SDLRequestType.m
index 7332b9843..fa74991c3 100644
--- a/SmartDeviceLink/SDLRequestType.m
+++ b/SmartDeviceLink/SDLRequestType.m
@@ -4,207 +4,23 @@
#import "SDLRequestType.h"
-SDLRequestType *SDLRequestType_HTTP = nil;
-SDLRequestType *SDLRequestType_FILE_RESUME = nil;
-SDLRequestType *SDLRequestType_AUTH_REQUEST = nil;
-SDLRequestType *SDLRequestType_AUTH_CHALLENGE = nil;
-SDLRequestType *SDLRequestType_AUTH_ACK = nil;
-SDLRequestType *SDLRequestType_PROPRIETARY = nil;
-SDLRequestType *SDLRequestType_QUERY_APPS = nil;
-SDLRequestType *SDLRequestType_LAUNCH_APP = nil;
-SDLRequestType *SDLRequestType_LOCK_SCREEN_ICON_URL = nil;
-SDLRequestType *SDLRequestType_TRAFFIC_MESSAGE_CHANNEL = nil;
-SDLRequestType *SDLRequestType_DRIVER_PROFILE = nil;
-SDLRequestType *SDLRequestType_VOICE_SEARCH = nil;
-SDLRequestType *SDLRequestType_NAVIGATION = nil;
-SDLRequestType *SDLRequestType_PHONE = nil;
-SDLRequestType *SDLRequestType_CLIMATE = nil;
-SDLRequestType *SDLRequestType_SETTINGS = nil;
-SDLRequestType *SDLRequestType_VEHICLE_DIAGNOSTICS = nil;
-SDLRequestType *SDLRequestType_EMERGENCY = nil;
-SDLRequestType *SDLRequestType_MEDIA = nil;
-SDLRequestType *SDLRequestType_FOTA = nil;
-
-NSArray *SDLRequestType_values = nil;
-
-
-@implementation SDLRequestType
-
-+ (SDLRequestType *)valueOf:(NSString *)value {
- for (SDLRequestType *item in SDLRequestType.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLRequestType_values == nil) {
- SDLRequestType_values = @[
- [SDLRequestType HTTP],
- [SDLRequestType FILE_RESUME],
- [SDLRequestType AUTH_REQUEST],
- [SDLRequestType AUTH_CHALLENGE],
- [SDLRequestType AUTH_ACK],
- [SDLRequestType PROPRIETARY],
- [SDLRequestType QUERY_APPS],
- [SDLRequestType LAUNCH_APP],
- [SDLRequestType LOCK_SCREEN_ICON_URL],
- [SDLRequestType TRAFFIC_MESSAGE_CHANNEL],
- [SDLRequestType DRIVER_PROFILE],
- [SDLRequestType VOICE_SEARCH],
- [SDLRequestType NAVIGATION],
- [SDLRequestType PHONE],
- [SDLRequestType CLIMATE],
- [SDLRequestType SETTINGS],
- [SDLRequestType VEHICLE_DIAGNOSTICS],
- [SDLRequestType EMERGENCY],
- [SDLRequestType MEDIA],
- [SDLRequestType FOTA],
- ];
- }
- return SDLRequestType_values;
-}
-
-+ (SDLRequestType *)HTTP {
- if (SDLRequestType_HTTP == nil) {
- SDLRequestType_HTTP = [[SDLRequestType alloc] initWithValue:@"HTTP"];
- }
- return SDLRequestType_HTTP;
-}
-
-+ (SDLRequestType *)FILE_RESUME {
- if (SDLRequestType_FILE_RESUME == nil) {
- SDLRequestType_FILE_RESUME = [[SDLRequestType alloc] initWithValue:@"FILE_RESUME"];
- }
- return SDLRequestType_FILE_RESUME;
-}
-
-+ (SDLRequestType *)AUTH_REQUEST {
- if (SDLRequestType_AUTH_REQUEST == nil) {
- SDLRequestType_AUTH_REQUEST = [[SDLRequestType alloc] initWithValue:@"AUTH_REQUEST"];
- }
- return SDLRequestType_AUTH_REQUEST;
-}
-
-+ (SDLRequestType *)AUTH_CHALLENGE {
- if (SDLRequestType_AUTH_CHALLENGE == nil) {
- SDLRequestType_AUTH_CHALLENGE = [[SDLRequestType alloc] initWithValue:@"AUTH_CHALLENGE"];
- }
- return SDLRequestType_AUTH_CHALLENGE;
-}
-
-+ (SDLRequestType *)AUTH_ACK {
- if (SDLRequestType_AUTH_ACK == nil) {
- SDLRequestType_AUTH_ACK = [[SDLRequestType alloc] initWithValue:@"AUTH_ACK"];
- }
- return SDLRequestType_AUTH_ACK;
-}
-
-+ (SDLRequestType *)PROPRIETARY {
- if (SDLRequestType_PROPRIETARY == nil) {
- SDLRequestType_PROPRIETARY = [[SDLRequestType alloc] initWithValue:@"PROPRIETARY"];
- }
- return SDLRequestType_PROPRIETARY;
-}
-
-+ (SDLRequestType *)QUERY_APPS {
- if (SDLRequestType_QUERY_APPS == nil) {
- SDLRequestType_QUERY_APPS = [[SDLRequestType alloc] initWithValue:@"QUERY_APPS"];
- }
- return SDLRequestType_QUERY_APPS;
-}
-
-+ (SDLRequestType *)LAUNCH_APP {
- if (SDLRequestType_LAUNCH_APP == nil) {
- SDLRequestType_LAUNCH_APP = [[SDLRequestType alloc] initWithValue:@"LAUNCH_APP"];
- }
- return SDLRequestType_LAUNCH_APP;
-}
-
-+ (SDLRequestType *)LOCK_SCREEN_ICON_URL {
- if (SDLRequestType_LOCK_SCREEN_ICON_URL == nil) {
- SDLRequestType_LOCK_SCREEN_ICON_URL = [[SDLRequestType alloc] initWithValue:@"LOCK_SCREEN_ICON_URL"];
- }
- return SDLRequestType_LOCK_SCREEN_ICON_URL;
-}
-
-+ (SDLRequestType *)TRAFFIC_MESSAGE_CHANNEL {
- if (SDLRequestType_TRAFFIC_MESSAGE_CHANNEL == nil) {
- SDLRequestType_TRAFFIC_MESSAGE_CHANNEL = [[SDLRequestType alloc] initWithValue:@"TRAFFIC_MESSAGE_CHANNEL"];
- }
- return SDLRequestType_TRAFFIC_MESSAGE_CHANNEL;
-}
-
-+ (SDLRequestType *)DRIVER_PROFILE {
- if (SDLRequestType_DRIVER_PROFILE == nil) {
- SDLRequestType_DRIVER_PROFILE = [[SDLRequestType alloc] initWithValue:@"DRIVER_PROFILE"];
- }
- return SDLRequestType_DRIVER_PROFILE;
-}
-
-+ (SDLRequestType *)VOICE_SEARCH {
- if (SDLRequestType_VOICE_SEARCH == nil) {
- SDLRequestType_VOICE_SEARCH = [[SDLRequestType alloc] initWithValue:@"VOICE_SEARCH"];
- }
- return SDLRequestType_VOICE_SEARCH;
-}
-
-+ (SDLRequestType *)NAVIGATION {
- if (SDLRequestType_NAVIGATION == nil) {
- SDLRequestType_NAVIGATION = [[SDLRequestType alloc] initWithValue:@"NAVIGATION"];
- }
- return SDLRequestType_NAVIGATION;
-}
-
-+ (SDLRequestType *)PHONE {
- if (SDLRequestType_PHONE == nil) {
- SDLRequestType_PHONE = [[SDLRequestType alloc] initWithValue:@"PHONE"];
- }
- return SDLRequestType_PHONE;
-}
-
-+ (SDLRequestType *)CLIMATE {
- if (SDLRequestType_CLIMATE == nil) {
- SDLRequestType_CLIMATE = [[SDLRequestType alloc] initWithValue:@"CLIMATE"];
- }
- return SDLRequestType_CLIMATE;
-}
-
-+ (SDLRequestType *)SETTINGS {
- if (SDLRequestType_SETTINGS == nil) {
- SDLRequestType_SETTINGS = [[SDLRequestType alloc] initWithValue:@"SETTINGS"];
- }
- return SDLRequestType_SETTINGS;
-}
-
-+ (SDLRequestType *)VEHICLE_DIAGNOSTICS {
- if (SDLRequestType_VEHICLE_DIAGNOSTICS == nil) {
- SDLRequestType_VEHICLE_DIAGNOSTICS = [[SDLRequestType alloc] initWithValue:@"VEHICLE_DIAGNOSTICS"];
- }
- return SDLRequestType_VEHICLE_DIAGNOSTICS;
-}
-
-+ (SDLRequestType *)EMERGENCY {
- if (SDLRequestType_EMERGENCY == nil) {
- SDLRequestType_EMERGENCY = [[SDLRequestType alloc] initWithValue:@"EMERGENCY"];
- }
- return SDLRequestType_EMERGENCY;
-}
-
-+ (SDLRequestType *)MEDIA {
- if (SDLRequestType_MEDIA == nil) {
- SDLRequestType_MEDIA = [[SDLRequestType alloc] initWithValue:@"MEDIA"];
- }
- return SDLRequestType_MEDIA;
-}
-
-+ (SDLRequestType *)FOTA {
- if (SDLRequestType_FOTA == nil) {
- SDLRequestType_FOTA = [[SDLRequestType alloc] initWithValue:@"FOTA"];
- }
- return SDLRequestType_FOTA;
-}
-
-@end
+SDLRequestType const SDLRequestTypeHttp = @"HTTP";
+SDLRequestType const SDLRequestTypeFileResume = @"FILE_RESUME";
+SDLRequestType const SDLRequestTypeAuthRequest = @"AUTH_REQUEST";
+SDLRequestType const SDLRequestTypeAuthChallenge = @"AUTH_CHALLENGE";
+SDLRequestType const SDLRequestTypeAuthAck = @"AUTH_ACK";
+SDLRequestType const SDLRequestTypeProprietary = @"PROPRIETARY";
+SDLRequestType const SDLRequestTypeQueryApps = @"QUERY_APPS";
+SDLRequestType const SDLRequestTypeLaunchApp = @"LAUNCH_APP";
+SDLRequestType const SDLRequestTypeLockScreenIconUrl = @"LOCK_SCREEN_ICON_URL";
+SDLRequestType const SDLRequestTypeTrafficMessageChannel = @"TRAFFIC_MESSAGE_CHANNEL";
+SDLRequestType const SDLRequestTypeDriverProfile = @"DRIVER_PROFILE";
+SDLRequestType const SDLRequestTypeVoiceSearch = @"VOICE_SEARCH";
+SDLRequestType const SDLRequestTypeNavigation = @"NAVIGATION";
+SDLRequestType const SDLRequestTypePhone = @"PHONE";
+SDLRequestType const SDLRequestTypeClimate = @"CLIMATE";
+SDLRequestType const SDLRequestTypeSettings = @"SETTINGS";
+SDLRequestType const SDLRequestTypeVehicleDiagnostics = @"VEHICLE_DIAGNOSTICS";
+SDLRequestType const SDLRequestTypeEmergency = @"EMERGENCY";
+SDLRequestType const SDLRequestTypeMedia = @"MEDIA";
+SDLRequestType const SDLRequestTypeFota = @"FOTA";
diff --git a/SmartDeviceLink/SDLResetGlobalProperties.m b/SmartDeviceLink/SDLResetGlobalProperties.m
index 350f96de0..daeb532f2 100644
--- a/SmartDeviceLink/SDLResetGlobalProperties.m
+++ b/SmartDeviceLink/SDLResetGlobalProperties.m
@@ -31,12 +31,12 @@
- (NSMutableArray *)properties {
NSMutableArray *array = [parameters objectForKey:NAMES_properties];
- if ([array count] < 1 || [[array objectAtIndex:0] isKindOfClass:SDLGlobalProperty.class]) {
+ if ([array count] < 1) {
return array;
} else {
NSMutableArray *newList = [NSMutableArray arrayWithCapacity:[array count]];
for (NSString *enumString in array) {
- [newList addObject:[SDLGlobalProperty valueOf:enumString]];
+ [newList addObject:(SDLGlobalProperty)enumString];
}
return newList;
}
diff --git a/SmartDeviceLink/SDLResponseDispatcher.m b/SmartDeviceLink/SDLResponseDispatcher.m
index b4ac0b7cb..a1fbd9303 100644
--- a/SmartDeviceLink/SDLResponseDispatcher.m
+++ b/SmartDeviceLink/SDLResponseDispatcher.m
@@ -82,7 +82,7 @@ NS_ASSUME_NONNULL_BEGIN
} else if ([request isKindOfClass:[SDLSubscribeButton class]]) {
// Convert SDLButtonName to NSString, since it doesn't conform to <NSCopying>
SDLSubscribeButton *subscribeButton = (SDLSubscribeButton *)request;
- NSString *buttonName = subscribeButton.buttonName.value;
+ SDLButtonName buttonName = subscribeButton.buttonName;
if (!buttonName) {
@throw [NSException sdl_missingIdException];
}
@@ -140,7 +140,7 @@ NS_ASSUME_NONNULL_BEGIN
NSError *error = nil;
if (![response.success boolValue]) {
- error = [NSError sdl_lifecycle_rpcErrorWithDescription:response.resultCode.value andReason:response.info];
+ error = [NSError sdl_lifecycle_rpcErrorWithDescription:response.resultCode andReason:response.info];
}
// Find the appropriate request completion handler, remove the request and response handler
@@ -166,7 +166,7 @@ NS_ASSUME_NONNULL_BEGIN
[self.commandHandlerMap safeRemoveObjectForKey:deleteCommandId];
} else if ([response isKindOfClass:[SDLUnsubscribeButtonResponse class]]) {
SDLUnsubscribeButton *unsubscribeButtonRequest = (SDLUnsubscribeButton *)request;
- NSString *unsubscribeButtonName = unsubscribeButtonRequest.buttonName.value;
+ SDLButtonName unsubscribeButtonName = unsubscribeButtonRequest.buttonName;
[self.buttonHandlerMap safeRemoveObjectForKey:unsubscribeButtonName];
}
}
@@ -189,7 +189,7 @@ NS_ASSUME_NONNULL_BEGIN
__kindof SDLRPCNotification *rpcNotification = notification.userInfo[SDLNotificationUserInfoObject];
SDLRPCNotificationHandler handler = nil;
- SDLButtonName *name = nil;
+ SDLButtonName name = nil;
NSNumber *customID = nil;
if ([rpcNotification isKindOfClass:[SDLOnButtonEvent class]]) {
@@ -200,10 +200,10 @@ NS_ASSUME_NONNULL_BEGIN
customID = ((SDLOnButtonPress *)rpcNotification).customButtonID;
}
- if ([name isEqualToEnum:[SDLButtonName CUSTOM_BUTTON]]) {
+ if ([name isEqualToString:SDLButtonNameCustomButton]) {
handler = self.customButtonHandlerMap[customID];
} else {
- handler = self.buttonHandlerMap[name.value];
+ handler = self.buttonHandlerMap[name];
}
if (handler) {
diff --git a/SmartDeviceLink/SDLResult.h b/SmartDeviceLink/SDLResult.h
index f11404c5a..51836d6bd 100644
--- a/SmartDeviceLink/SDLResult.h
+++ b/SmartDeviceLink/SDLResult.h
@@ -9,26 +9,12 @@
*
* @since SDL 1.0
*/
-@interface SDLResult : SDLEnum {
-}
-
-/**
- * @abstract get SDLResult according value string
- * @param value The value of the string to get an object for
- * @return SDLResult object
- */
-+ (SDLResult *)valueOf:(NSString *)value;
-
-/**
- @abstract declare an array to store all possible SDLResult values
- @return the array
- */
-+ (NSArray *)values;
+typedef SDLEnum SDLResult NS_EXTENSIBLE_STRING_ENUM;
/**
* @abstract The request succeeded
*/
-+ (SDLResult *)SUCCESS;
+extern SDLResult const SDLResultSuccess;
/**
* @abstract Result code : Invalid Data
@@ -41,26 +27,26 @@
* <li>Invalid characters</li>
* <li>Empty string</li>
*/
-+ (SDLResult *)INVALID_DATA;
+extern SDLResult const SDLResultInvalidData;
-+ (SDLResult *)CHAR_LIMIT_EXCEEDED;
+extern SDLResult const SDLResultCharLimitExceeded;
/**
* @abstract The request is not supported by SDL
*/
-+ (SDLResult *)UNSUPPORTED_REQUEST;
+extern SDLResult const SDLResultUnsupportedRequest;
/**
* @abstract The system could not process the request because the necessary memory couldn't be allocated
*/
-+ (SDLResult *)OUT_OF_MEMORY;
+extern SDLResult const SDLResultOutOfMemory;
/**
* @abstract There are too many requests pending (means that the response has not been delivered yet).
*
* @discussion There is a limit of 1000 pending requests at a time.
*/
-+ (SDLResult *)TOO_MANY_PENDING_REQUESTS;
+extern SDLResult const SDLResultTooManyPendingRequests;
/**
* @abstract One of the provided IDs is not valid.
@@ -69,136 +55,133 @@
* <li>CommandID</li>
* <li>MenuID</li>
*/
-+ (SDLResult *)INVALID_ID;
+extern SDLResult const SDLResultInvalidId;
/**
* @abstract The provided name or synonym is a duplicate of some already-defined name or synonym.
*/
-+ (SDLResult *)DUPLICATE_NAME;
+extern SDLResult const SDLResultDuplicateName;
/**
* There are already too many registered applications.
*/
-+ (SDLResult *)TOO_MANY_APPLICATIONS;
+extern SDLResult const SDLResultTooManyApplications;
/**
* RegisterApplication has been called again, after a RegisterApplication was successful before.
*/
-+ (SDLResult *)APPLICATION_REGISTERED_ALREADY;
+extern SDLResult const SDLResultApplicationRegisteredAlready;
/**
* The Head Unit doesn't support the protocol that is requested by the mobile application.
*/
-+ (SDLResult *)UNSUPPORTED_VERSION;
+extern SDLResult const SDLResultUnsupportedVersion;
/**
* The requested language is currently not supported. Might be because of a mismatch of the currently active language on the head unit and the requested language.
*/
-+ (SDLResult *)WRONG_LANGUAGE;
+extern SDLResult const SDLResultWrongLanguage;
/**
* A command can not be executed because no application has been registered with RegisterApplication.
*/
-+ (SDLResult *)APPLICATION_NOT_REGISTERED;
+extern SDLResult const SDLResultApplicationNotRegistered;
/**
* The data may not be changed, because it is currently in use. For example when trying to delete a command set that is currently involved in an interaction.
*/
-+ (SDLResult *)IN_USE;
+extern SDLResult const SDLResultInUse;
/**
* The user has turned off access to vehicle data, and it is globally unavailable to mobile applications.
*/
-+ (SDLResult *)VEHICLE_DATA_NOT_ALLOWED;
+extern SDLResult const SDLResultVehicleDataNotAllowed;
/**
* The requested vehicle data is not available on this vehicle or is not published.
*/
-+ (SDLResult *)VEHICLE_DATA_NOT_AVAILABLE;
+extern SDLResult const SDLResultVehicleDataNotAvailable;
/**
* The requested command was rejected, e.g. because mobile app is in background and cannot perform any HMI commands. Or an HMI command (e.g. Speak) is rejected because a higher priority HMI command (e.g. Alert) is playing.
*/
-+ (SDLResult *)REJECTED;
+extern SDLResult const SDLResultRejected;
/**
* A command was aborted, for example due to user interaction (e.g. user pressed button). Or an HMI command (e.g. Speak) is aborted because a higher priority HMI command (e.g. Alert) was requested.
*/
-+ (SDLResult *)ABORTED;
+extern SDLResult const SDLResultAborted;
/**
* A command was ignored, because the intended result is already in effect. For example, SetMediaClockTimer was used to pause the media clock although the clock is paused already.
*/
-+ (SDLResult *)IGNORED;
+extern SDLResult const SDLResultIgnored;
/**
* A button that was requested for subscription is not supported under the current system.
*/
-+ (SDLResult *)UNSUPPORTED_RESOURCE;
+extern SDLResult const SDLResultUnsupportedResource;
/**
* A specified file could not be found on the head unit.
*/
-+ (SDLResult *)FILE_NOT_FOUND;
+extern SDLResult const SDLResultFileNotFound;
/**
* Provided data is valid but something went wrong in the lower layers.
*/
-+ (SDLResult *)GENERIC_ERROR;
+extern SDLResult const SDLResultGenericError;
/**
* RPC is not authorized in local policy table.
*/
-+ (SDLResult *)DISALLOWED;
+extern SDLResult const SDLResultDisallowed;
/**
* RPC is included in a functional group explicitly blocked by the user.
*/
-+ (SDLResult *)USER_DISALLOWED;
+extern SDLResult const SDLResultUserDisallowed;
/**
* Overlay reached the maximum timeout and closed.
*/
-+ (SDLResult *)TIMED_OUT;
+extern SDLResult const SDLResultTimedOut;
/**
* User selected to Cancel Route.
*/
-+ (SDLResult *)CANCEL_ROUTE;
+extern SDLResult const SDLResultCancelRoute;
/**
* The RPC (e.g. ReadDID) executed successfully but the data exceeded the platform maximum threshold and thus, only part of the data is available.
*/
-+ (SDLResult *)TRUNCATED_DATA;
-
+extern SDLResult const SDLResultTruncatedData;
/**
* The user interrupted the RPC (e.g. PerformAudioPassThru) and indicated to start over. Note, the app must issue the new RPC.
*/
-+ (SDLResult *)RETRY;
+extern SDLResult const SDLResultRetry;
/**
* The RPC (e.g. SubscribeVehicleData) executed successfully but one or more items have a warning or failure.
*/
-+ (SDLResult *)WARNINGS;
+extern SDLResult const SDLResultWarnings;
/**
* The RPC (e.g. Slider) executed successfully and the user elected to save the current position / value.
*/
-+ (SDLResult *)SAVED;
+extern SDLResult const SDLResultSaved;
/**
* The certificate provided during authentication is invalid.
*/
-+ (SDLResult *)INVALID_CERT;
+extern SDLResult const SDLResultInvalidCert;
/**
* The certificate provided during authentication is expired.
*/
-+ (SDLResult *)EXPIRED_CERT;
+extern SDLResult const SDLResultExpiredCert;
/**
* The provided hash ID does not match the hash of the current set of registered data or the core could not resume the previous data.
*/
-+ (SDLResult *)RESUME_FAILED;
-
-@end
+extern SDLResult const SDLResultResumeFailed;
diff --git a/SmartDeviceLink/SDLResult.m b/SmartDeviceLink/SDLResult.m
index 1ef2806c3..e2ec7bddf 100644
--- a/SmartDeviceLink/SDLResult.m
+++ b/SmartDeviceLink/SDLResult.m
@@ -4,324 +4,36 @@
#import "SDLResult.h"
-SDLResult *SDLResult_SUCCESS = nil;
-SDLResult *SDLResult_INVALID_DATA = nil;
-SDLResult *SDLResult_CHAR_LIMIT_EXCEEDED = nil;
-SDLResult *SDLResult_UNSUPPORTED_REQUEST = nil;
-SDLResult *SDLResult_OUT_OF_MEMORY = nil;
-SDLResult *SDLResult_TOO_MANY_PENDING_REQUESTS = nil;
-SDLResult *SDLResult_INVALID_ID = nil;
-SDLResult *SDLResult_DUPLICATE_NAME = nil;
-SDLResult *SDLResult_TOO_MANY_APPLICATIONS = nil;
-SDLResult *SDLResult_APPLICATION_REGISTERED_ALREADY = nil;
-SDLResult *SDLResult_UNSUPPORTED_VERSION = nil;
-SDLResult *SDLResult_WRONG_LANGUAGE = nil;
-SDLResult *SDLResult_APPLICATION_NOT_REGISTERED = nil;
-SDLResult *SDLResult_IN_USE = nil;
-SDLResult *SDLResult_VEHICLE_DATA_NOT_ALLOWED = nil;
-SDLResult *SDLResult_VEHICLE_DATA_NOT_AVAILABLE = nil;
-SDLResult *SDLResult_REJECTED = nil;
-SDLResult *SDLResult_ABORTED = nil;
-SDLResult *SDLResult_IGNORED = nil;
-SDLResult *SDLResult_UNSUPPORTED_RESOURCE = nil;
-SDLResult *SDLResult_FILE_NOT_FOUND = nil;
-SDLResult *SDLResult_GENERIC_ERROR = nil;
-SDLResult *SDLResult_DISALLOWED = nil;
-SDLResult *SDLResult_USER_DISALLOWED = nil;
-SDLResult *SDLResult_TIMED_OUT = nil;
-SDLResult *SDLResult_CANCEL_ROUTE = nil;
-SDLResult *SDLResult_TRUNCATED_DATA = nil;
-SDLResult *SDLResult_RETRY = nil;
-SDLResult *SDLResult_WARNINGS = nil;
-SDLResult *SDLResult_SAVED = nil;
-SDLResult *SDLResult_INVALID_CERT = nil;
-SDLResult *SDLResult_EXPIRED_CERT = nil;
-SDLResult *SDLResult_RESUME_FAILED = nil;
-
-NSArray *SDLResult_values = nil;
-
-@implementation SDLResult
-
-+ (SDLResult *)valueOf:(NSString *)value {
- for (SDLResult *item in SDLResult.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLResult_values == nil) {
- SDLResult_values = @[
- [SDLResult SUCCESS],
- [SDLResult INVALID_DATA],
- [SDLResult CHAR_LIMIT_EXCEEDED],
- [SDLResult UNSUPPORTED_REQUEST],
- [SDLResult OUT_OF_MEMORY],
- [SDLResult TOO_MANY_PENDING_REQUESTS],
- [SDLResult INVALID_ID],
- [SDLResult DUPLICATE_NAME],
- [SDLResult TOO_MANY_APPLICATIONS],
- [SDLResult APPLICATION_REGISTERED_ALREADY],
- [SDLResult UNSUPPORTED_VERSION],
- [SDLResult WRONG_LANGUAGE],
- [SDLResult APPLICATION_NOT_REGISTERED],
- [SDLResult IN_USE],
- [SDLResult VEHICLE_DATA_NOT_ALLOWED],
- [SDLResult VEHICLE_DATA_NOT_AVAILABLE],
- [SDLResult REJECTED],
- [SDLResult ABORTED],
- [SDLResult IGNORED],
- [SDLResult UNSUPPORTED_RESOURCE],
- [SDLResult FILE_NOT_FOUND],
- [SDLResult GENERIC_ERROR],
- [SDLResult DISALLOWED],
- [SDLResult USER_DISALLOWED],
- [SDLResult TIMED_OUT],
- [SDLResult CANCEL_ROUTE],
- [SDLResult TRUNCATED_DATA],
- [SDLResult RETRY],
- [SDLResult WARNINGS],
- [SDLResult SAVED],
- [SDLResult INVALID_CERT],
- [SDLResult EXPIRED_CERT],
- [SDLResult RESUME_FAILED],
- ];
- }
- return SDLResult_values;
-}
-
-+ (SDLResult *)SUCCESS {
- if (SDLResult_SUCCESS == nil) {
- SDLResult_SUCCESS = [[SDLResult alloc] initWithValue:@"SUCCESS"];
- }
- return SDLResult_SUCCESS;
-}
-
-+ (SDLResult *)INVALID_DATA {
- if (SDLResult_INVALID_DATA == nil) {
- SDLResult_INVALID_DATA = [[SDLResult alloc] initWithValue:@"INVALID_DATA"];
- }
- return SDLResult_INVALID_DATA;
-}
-
-+ (SDLResult *)CHAR_LIMIT_EXCEEDED {
- if (SDLResult_CHAR_LIMIT_EXCEEDED == nil) {
- SDLResult_CHAR_LIMIT_EXCEEDED = [[SDLResult alloc] initWithValue:@"CHAR_LIMIT_EXCEEDED"];
- }
-
- return SDLResult_CHAR_LIMIT_EXCEEDED;
-}
-
-+ (SDLResult *)UNSUPPORTED_REQUEST {
- if (SDLResult_UNSUPPORTED_REQUEST == nil) {
- SDLResult_UNSUPPORTED_REQUEST = [[SDLResult alloc] initWithValue:@"UNSUPPORTED_REQUEST"];
- }
- return SDLResult_UNSUPPORTED_REQUEST;
-}
-
-+ (SDLResult *)OUT_OF_MEMORY {
- if (SDLResult_OUT_OF_MEMORY == nil) {
- SDLResult_OUT_OF_MEMORY = [[SDLResult alloc] initWithValue:@"OUT_OF_MEMORY"];
- }
- return SDLResult_OUT_OF_MEMORY;
-}
-
-+ (SDLResult *)TOO_MANY_PENDING_REQUESTS {
- if (SDLResult_TOO_MANY_PENDING_REQUESTS == nil) {
- SDLResult_TOO_MANY_PENDING_REQUESTS = [[SDLResult alloc] initWithValue:@"TOO_MANY_PENDING_REQUESTS"];
- }
- return SDLResult_TOO_MANY_PENDING_REQUESTS;
-}
-
-+ (SDLResult *)INVALID_ID {
- if (SDLResult_INVALID_ID == nil) {
- SDLResult_INVALID_ID = [[SDLResult alloc] initWithValue:@"INVALID_ID"];
- }
- return SDLResult_INVALID_ID;
-}
-
-+ (SDLResult *)DUPLICATE_NAME {
- if (SDLResult_DUPLICATE_NAME == nil) {
- SDLResult_DUPLICATE_NAME = [[SDLResult alloc] initWithValue:@"DUPLICATE_NAME"];
- }
- return SDLResult_DUPLICATE_NAME;
-}
-
-+ (SDLResult *)TOO_MANY_APPLICATIONS {
- if (SDLResult_TOO_MANY_APPLICATIONS == nil) {
- SDLResult_TOO_MANY_APPLICATIONS = [[SDLResult alloc] initWithValue:@"TOO_MANY_APPLICATIONS"];
- }
- return SDLResult_TOO_MANY_APPLICATIONS;
-}
-
-+ (SDLResult *)APPLICATION_REGISTERED_ALREADY {
- if (SDLResult_APPLICATION_REGISTERED_ALREADY == nil) {
- SDLResult_APPLICATION_REGISTERED_ALREADY = [[SDLResult alloc] initWithValue:@"APPLICATION_REGISTERED_ALREADY"];
- }
- return SDLResult_APPLICATION_REGISTERED_ALREADY;
-}
-
-+ (SDLResult *)UNSUPPORTED_VERSION {
- if (SDLResult_UNSUPPORTED_VERSION == nil) {
- SDLResult_UNSUPPORTED_VERSION = [[SDLResult alloc] initWithValue:@"UNSUPPORTED_VERSION"];
- }
- return SDLResult_UNSUPPORTED_VERSION;
-}
-
-+ (SDLResult *)WRONG_LANGUAGE {
- if (SDLResult_WRONG_LANGUAGE == nil) {
- SDLResult_WRONG_LANGUAGE = [[SDLResult alloc] initWithValue:@"WRONG_LANGUAGE"];
- }
- return SDLResult_WRONG_LANGUAGE;
-}
-
-+ (SDLResult *)APPLICATION_NOT_REGISTERED {
- if (SDLResult_APPLICATION_NOT_REGISTERED == nil) {
- SDLResult_APPLICATION_NOT_REGISTERED = [[SDLResult alloc] initWithValue:@"APPLICATION_NOT_REGISTERED"];
- }
- return SDLResult_APPLICATION_NOT_REGISTERED;
-}
-
-+ (SDLResult *)IN_USE {
- if (SDLResult_IN_USE == nil) {
- SDLResult_IN_USE = [[SDLResult alloc] initWithValue:@"IN_USE"];
- }
- return SDLResult_IN_USE;
-}
-
-+ (SDLResult *)VEHICLE_DATA_NOT_ALLOWED {
- if (SDLResult_VEHICLE_DATA_NOT_ALLOWED == nil) {
- SDLResult_VEHICLE_DATA_NOT_ALLOWED = [[SDLResult alloc] initWithValue:@"VEHICLE_DATA_NOT_ALLOWED"];
- }
- return SDLResult_VEHICLE_DATA_NOT_ALLOWED;
-}
-
-+ (SDLResult *)VEHICLE_DATA_NOT_AVAILABLE {
- if (SDLResult_VEHICLE_DATA_NOT_AVAILABLE == nil) {
- SDLResult_VEHICLE_DATA_NOT_AVAILABLE = [[SDLResult alloc] initWithValue:@"VEHICLE_DATA_NOT_AVAILABLE"];
- }
- return SDLResult_VEHICLE_DATA_NOT_AVAILABLE;
-}
-
-+ (SDLResult *)REJECTED {
- if (SDLResult_REJECTED == nil) {
- SDLResult_REJECTED = [[SDLResult alloc] initWithValue:@"REJECTED"];
- }
- return SDLResult_REJECTED;
-}
-
-+ (SDLResult *)ABORTED {
- if (SDLResult_ABORTED == nil) {
- SDLResult_ABORTED = [[SDLResult alloc] initWithValue:@"ABORTED"];
- }
- return SDLResult_ABORTED;
-}
-
-+ (SDLResult *)IGNORED {
- if (SDLResult_IGNORED == nil) {
- SDLResult_IGNORED = [[SDLResult alloc] initWithValue:@"IGNORED"];
- }
- return SDLResult_IGNORED;
-}
-
-+ (SDLResult *)UNSUPPORTED_RESOURCE {
- if (SDLResult_UNSUPPORTED_RESOURCE == nil) {
- SDLResult_UNSUPPORTED_RESOURCE = [[SDLResult alloc] initWithValue:@"UNSUPPORTED_RESOURCE"];
- }
- return SDLResult_UNSUPPORTED_RESOURCE;
-}
-
-+ (SDLResult *)FILE_NOT_FOUND {
- if (SDLResult_FILE_NOT_FOUND == nil) {
- SDLResult_FILE_NOT_FOUND = [[SDLResult alloc] initWithValue:@"FILE_NOT_FOUND"];
- }
- return SDLResult_FILE_NOT_FOUND;
-}
-
-+ (SDLResult *)GENERIC_ERROR {
- if (SDLResult_GENERIC_ERROR == nil) {
- SDLResult_GENERIC_ERROR = [[SDLResult alloc] initWithValue:@"GENERIC_ERROR"];
- }
- return SDLResult_GENERIC_ERROR;
-}
-
-+ (SDLResult *)DISALLOWED {
- if (SDLResult_DISALLOWED == nil) {
- SDLResult_DISALLOWED = [[SDLResult alloc] initWithValue:@"DISALLOWED"];
- }
- return SDLResult_DISALLOWED;
-}
-
-+ (SDLResult *)USER_DISALLOWED {
- if (SDLResult_USER_DISALLOWED == nil) {
- SDLResult_USER_DISALLOWED = [[SDLResult alloc] initWithValue:@"USER_DISALLOWED"];
- }
- return SDLResult_USER_DISALLOWED;
-}
-
-+ (SDLResult *)TIMED_OUT {
- if (SDLResult_TIMED_OUT == nil) {
- SDLResult_TIMED_OUT = [[SDLResult alloc] initWithValue:@"TIMED_OUT"];
- }
- return SDLResult_TIMED_OUT;
-}
-
-+ (SDLResult *)CANCEL_ROUTE {
- if (SDLResult_CANCEL_ROUTE == nil) {
- SDLResult_CANCEL_ROUTE = [[SDLResult alloc] initWithValue:@"CANCEL_ROUTE"];
- }
- return SDLResult_CANCEL_ROUTE;
-}
-
-+ (SDLResult *)TRUNCATED_DATA {
- if (SDLResult_TRUNCATED_DATA == nil) {
- SDLResult_TRUNCATED_DATA = [[SDLResult alloc] initWithValue:@"TRUNCATED_DATA"];
- }
- return SDLResult_TRUNCATED_DATA;
-}
-
-+ (SDLResult *)RETRY {
- if (SDLResult_RETRY == nil) {
- SDLResult_RETRY = [[SDLResult alloc] initWithValue:@"RETRY"];
- }
- return SDLResult_RETRY;
-}
-
-+ (SDLResult *)WARNINGS {
- if (SDLResult_WARNINGS == nil) {
- SDLResult_WARNINGS = [[SDLResult alloc] initWithValue:@"WARNINGS"];
- }
- return SDLResult_WARNINGS;
-}
-
-+ (SDLResult *)SAVED {
- if (SDLResult_SAVED == nil) {
- SDLResult_SAVED = [[SDLResult alloc] initWithValue:@"SAVED"];
- }
- return SDLResult_SAVED;
-}
-
-+ (SDLResult *)INVALID_CERT {
- if (SDLResult_INVALID_CERT == nil) {
- SDLResult_INVALID_CERT = [[SDLResult alloc] initWithValue:@"INVALID_CERT"];
- }
- return SDLResult_INVALID_CERT;
-}
-
-+ (SDLResult *)EXPIRED_CERT {
- if (SDLResult_EXPIRED_CERT == nil) {
- SDLResult_EXPIRED_CERT = [[SDLResult alloc] initWithValue:@"EXPIRED_CERT"];
- }
- return SDLResult_EXPIRED_CERT;
-}
-
-+ (SDLResult *)RESUME_FAILED {
- if (SDLResult_RESUME_FAILED == nil) {
- SDLResult_RESUME_FAILED = [[SDLResult alloc] initWithValue:@"RESUME_FAILED"];
- }
- return SDLResult_RESUME_FAILED;
-}
-
-@end
+SDLResult const SDLResultSuccess = @"SUCCESS";
+SDLResult const SDLResultInvalidData = @"INVALID_DATA";
+SDLResult const SDLResultCharLimitExceeded = @"CHAR_LIMIT_EXCEEDED";
+SDLResult const SDLResultUnsupportedRequest = @"UNSUPPORTED_REQUEST";
+SDLResult const SDLResultOutOfMemory = @"OUT_OF_MEMORY";
+SDLResult const SDLResultTooManyPendingRequests = @"TOO_MANY_PENDING_REQUESTS";
+SDLResult const SDLResultInvalidId = @"INVALID_ID";
+SDLResult const SDLResultDuplicateName = @"DUPLICATE_NAME";
+SDLResult const SDLResultTooManyApplications = @"TOO_MANY_APPLICATIONS";
+SDLResult const SDLResultAppliationRegisteredAlready = @"APPLICATION_REGISTERED_ALREADY";
+SDLResult const SDLResultUnsupportedVersion = @"UNSUPPORTED_VERSION";
+SDLResult const SDLResultWrongLanguages = @"WRONG_LANGUAGE";
+SDLResult const SDLResultApplicationNotRegistered = @"APPLICATION_NOT_REGISTERED";
+SDLResult const SDLResultInUse = @"IN_USE";
+SDLResult const SDLResultVehicleDataNotAllowed = @"VEHICLE_DATA_NOT_ALLOWED";
+SDLResult const SDLResultVehicleDataNotAvailable = @"VEHICLE_DATA_NOT_AVAILABLE";
+SDLResult const SDLResultRejected = @"REJECTED";
+SDLResult const SDLResultAborted = @"ABORTED";
+SDLResult const SDLResultIgnored = @"IGNORED";
+SDLResult const SDLResultUnsupportedResource = @"UNSUPPORTED_RESOURCE";
+SDLResult const SDLResultFileNotFound = @"FILE_NOT_FOUND";
+SDLResult const SDLResultGenericError = @"GENERIC_ERROR";
+SDLResult const SDLResultDisallowed = @"DISALLOWED";
+SDLResult const SDLResultUserDisallowed = @"USER_DISALLOWED";
+SDLResult const SDLResultTimedOut = @"TIMED_OUT";
+SDLResult const SDLResultCancelRoute = @"CANCEL_ROUTE";
+SDLResult const SDLResultTruncatedData = @"TRUNCATED_DATA";
+SDLResult const SDLResultRetry = @"RETRY";
+SDLResult const SDLResultWarnings = @"WARNINGS";
+SDLResult const SDLResultSaved = @"SAVED";
+SDLResult const SDLResultInvalidCert = @"INVALID_CERT";
+SDLResult const SDLResultExpiredCert = @"EXPIRED_CERT";
+SDLResult const SDLResultResumeFailed = @"RESUME_FAILED";
diff --git a/SmartDeviceLink/SDLSamplingRate.h b/SmartDeviceLink/SDLSamplingRate.h
index 28d3d35dc..ce9db8c62 100644
--- a/SmartDeviceLink/SDLSamplingRate.h
+++ b/SmartDeviceLink/SDLSamplingRate.h
@@ -9,48 +9,24 @@
*
* @since SDL 2.0
*/
-@interface SDLSamplingRate : SDLEnum {
-}
-
-/**
- * @abstract get SDLSamplingRate according value string
- *
- * @param value The value of the string to get an object for
- *
- * @return SDLSamplingRate object
- */
-+ (SDLSamplingRate *)valueOf:(NSString *)value;
-
-/**
- * @abstract declare an array to store all possible SDLSamplingRate values
- *
- * @return the array
- */
-+ (NSArray *)values;
+typedef SDLEnum SDLSamplingRate NS_EXTENSIBLE_STRING_ENUM;
/**
* @abstract Sampling rate of 8 kHz
- *
- * @return SamplingRate of *8KHZ*
*/
-+ (SDLSamplingRate *)_8KHZ;
+extern SDLSamplingRate const SDLSamplingRate8Khz;
+
/**
* @abstract Sampling rate of 16 kHz
- *
- * @return SamplingRate of *16KHZ*
*/
-+ (SDLSamplingRate *)_16KHZ;
+extern SDLSamplingRate const SDLSamplingRate16Khz;
+
/**
* @abstract Sampling rate of 22 kHz
- *
- * @return SamplingRate of *22KHZ*
*/
-+ (SDLSamplingRate *)_22KHZ;
+extern SDLSamplingRate const SDLSamplingRate22Khz;
+
/**
* @abstract Sampling rate of 44 kHz
- *
- * @return SamplingRate of *44KHZ*
*/
-+ (SDLSamplingRate *)_44KHZ;
-
-@end
+extern SDLSamplingRate const SDLSamplingRate44Khz;
diff --git a/SmartDeviceLink/SDLSamplingRate.m b/SmartDeviceLink/SDLSamplingRate.m
index d0a36d730..dbbbe7bc7 100644
--- a/SmartDeviceLink/SDLSamplingRate.m
+++ b/SmartDeviceLink/SDLSamplingRate.m
@@ -4,62 +4,7 @@
#import "SDLSamplingRate.h"
-SDLSamplingRate *SDLSamplingRate_8KHZ = nil;
-SDLSamplingRate *SDLSamplingRate_16KHZ = nil;
-SDLSamplingRate *SDLSamplingRate_22KHZ = nil;
-SDLSamplingRate *SDLSamplingRate_44KHZ = nil;
-
-NSArray *SDLSamplingRate_values = nil;
-
-@implementation SDLSamplingRate
-
-+ (SDLSamplingRate *)valueOf:(NSString *)value {
- for (SDLSamplingRate *item in SDLSamplingRate.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLSamplingRate_values == nil) {
- SDLSamplingRate_values = @[
- SDLSamplingRate._8KHZ,
- SDLSamplingRate._16KHZ,
- SDLSamplingRate._22KHZ,
- SDLSamplingRate._44KHZ,
- ];
- }
- return SDLSamplingRate_values;
-}
-
-+ (SDLSamplingRate *)_8KHZ {
- if (SDLSamplingRate_8KHZ == nil) {
- SDLSamplingRate_8KHZ = [[SDLSamplingRate alloc] initWithValue:@"8KHZ"];
- }
- return SDLSamplingRate_8KHZ;
-}
-
-+ (SDLSamplingRate *)_16KHZ {
- if (SDLSamplingRate_16KHZ == nil) {
- SDLSamplingRate_16KHZ = [[SDLSamplingRate alloc] initWithValue:@"16KHZ"];
- }
- return SDLSamplingRate_16KHZ;
-}
-
-+ (SDLSamplingRate *)_22KHZ {
- if (SDLSamplingRate_22KHZ == nil) {
- SDLSamplingRate_22KHZ = [[SDLSamplingRate alloc] initWithValue:@"22KHZ"];
- }
- return SDLSamplingRate_22KHZ;
-}
-
-+ (SDLSamplingRate *)_44KHZ {
- if (SDLSamplingRate_44KHZ == nil) {
- SDLSamplingRate_44KHZ = [[SDLSamplingRate alloc] initWithValue:@"44KHZ"];
- }
- return SDLSamplingRate_44KHZ;
-}
-
-@end
+SDLSamplingRate const SDLSamplingRate8Khz = @"8KHZ";
+SDLSamplingRate const SDLSamplingRate16Khz = @"16KHZ";
+SDLSamplingRate const SDLSamplingRate22Khz = @"22KHZ";
+SDLSamplingRate const SDLSamplingRate44Khz = @"44KHZ";
diff --git a/SmartDeviceLink/SDLSetMediaClockTimer.h b/SmartDeviceLink/SDLSetMediaClockTimer.h
index 71de56b35..7b85a1ea1 100644
--- a/SmartDeviceLink/SDLSetMediaClockTimer.h
+++ b/SmartDeviceLink/SDLSetMediaClockTimer.h
@@ -3,9 +3,9 @@
#import "SDLRPCRequest.h"
-@class SDLStartTime;
-@class SDLUpdateMode;
+#import "SDLUpdateMode.h"
+@class SDLStartTime;
/**
* Sets the media clock/timer value and the update method (e.g.count-up,
@@ -63,6 +63,6 @@
* the timer's value when it was paused</li>
* </ul>
*/
-@property (strong) SDLUpdateMode *updateMode;
+@property (strong) SDLUpdateMode updateMode;
@end
diff --git a/SmartDeviceLink/SDLSetMediaClockTimer.m b/SmartDeviceLink/SDLSetMediaClockTimer.m
index 325d0e347..3eb77bf8c 100644
--- a/SmartDeviceLink/SDLSetMediaClockTimer.m
+++ b/SmartDeviceLink/SDLSetMediaClockTimer.m
@@ -6,8 +6,6 @@
#import "SDLNames.h"
#import "SDLStartTime.h"
-#import "SDLUpdateMode.h"
-
@implementation SDLSetMediaClockTimer
@@ -57,7 +55,7 @@
}
}
-- (void)setUpdateMode:(SDLUpdateMode *)updateMode {
+- (void)setUpdateMode:(SDLUpdateMode)updateMode {
if (updateMode != nil) {
[parameters setObject:updateMode forKey:NAMES_updateMode];
} else {
@@ -65,13 +63,9 @@
}
}
-- (SDLUpdateMode *)updateMode {
+- (SDLUpdateMode)updateMode {
NSObject *obj = [parameters objectForKey:NAMES_updateMode];
- if (obj == nil || [obj isKindOfClass:SDLUpdateMode.class]) {
- return (SDLUpdateMode *)obj;
- } else {
- return [SDLUpdateMode valueOf:(NSString *)obj];
- }
+ return (SDLUpdateMode)obj;
}
@end
diff --git a/SmartDeviceLink/SDLShow.h b/SmartDeviceLink/SDLShow.h
index 20cf84a92..fa600c2a6 100644
--- a/SmartDeviceLink/SDLShow.h
+++ b/SmartDeviceLink/SDLShow.h
@@ -3,8 +3,9 @@
#import "SDLRPCRequest.h"
+#import "SDLTextAlignment.h"
+
@class SDLImage;
-@class SDLTextAlignment;
/**
@@ -129,7 +130,7 @@
* <li>Has no effect with navigation display</li>
* </ul>
*/
-@property (strong) SDLTextAlignment *alignment;
+@property (strong) SDLTextAlignment alignment;
/**
* @abstract Text in the Status Bar
*
diff --git a/SmartDeviceLink/SDLShow.m b/SmartDeviceLink/SDLShow.m
index 933167159..1f5ab3b8c 100644
--- a/SmartDeviceLink/SDLShow.m
+++ b/SmartDeviceLink/SDLShow.m
@@ -7,7 +7,6 @@
#import "SDLImage.h"
#import "SDLNames.h"
#import "SDLSoftButton.h"
-#import "SDLTextAlignment.h"
@implementation SDLShow
@@ -72,7 +71,7 @@
return [parameters objectForKey:NAMES_mainField4];
}
-- (void)setAlignment:(SDLTextAlignment *)alignment {
+- (void)setAlignment:(SDLTextAlignment)alignment {
if (alignment != nil) {
[parameters setObject:alignment forKey:NAMES_alignment];
} else {
@@ -80,13 +79,9 @@
}
}
-- (SDLTextAlignment *)alignment {
+- (SDLTextAlignment)alignment {
NSObject *obj = [parameters objectForKey:NAMES_alignment];
- if (obj == nil || [obj isKindOfClass:SDLTextAlignment.class]) {
- return (SDLTextAlignment *)obj;
- } else {
- return [SDLTextAlignment valueOf:(NSString *)obj];
- }
+ return (SDLTextAlignment)obj;
}
- (void)setStatusBar:(NSString *)statusBar {
diff --git a/SmartDeviceLink/SDLSingleTireStatus.h b/SmartDeviceLink/SDLSingleTireStatus.h
index 897ba1bf8..bff0add38 100644
--- a/SmartDeviceLink/SDLSingleTireStatus.h
+++ b/SmartDeviceLink/SDLSingleTireStatus.h
@@ -3,8 +3,7 @@
#import "SDLRPCMessage.h"
-@class SDLComponentVolumeStatus;
-
+#import "SDLComponentVolumeStatus.h"
/**
* Tire pressure status of a single tire.
@@ -28,6 +27,6 @@
/**
* @abstract The volume status of a single tire
*/
-@property (strong) SDLComponentVolumeStatus *status;
+@property (strong) SDLComponentVolumeStatus status;
@end
diff --git a/SmartDeviceLink/SDLSingleTireStatus.m b/SmartDeviceLink/SDLSingleTireStatus.m
index 87826f32b..44d30f867 100644
--- a/SmartDeviceLink/SDLSingleTireStatus.m
+++ b/SmartDeviceLink/SDLSingleTireStatus.m
@@ -3,7 +3,6 @@
#import "SDLSingleTireStatus.h"
-#import "SDLComponentVolumeStatus.h"
#import "SDLNames.h"
@@ -21,7 +20,7 @@
return self;
}
-- (void)setStatus:(SDLComponentVolumeStatus *)status {
+- (void)setStatus:(SDLComponentVolumeStatus)status {
if (status != nil) {
[store setObject:status forKey:NAMES_status];
} else {
@@ -29,13 +28,9 @@
}
}
-- (SDLComponentVolumeStatus *)status {
+- (SDLComponentVolumeStatus)status {
NSObject *obj = [store objectForKey:NAMES_status];
- if (obj == nil || [obj isKindOfClass:SDLComponentVolumeStatus.class]) {
- return (SDLComponentVolumeStatus *)obj;
- } else {
- return [SDLComponentVolumeStatus valueOf:(NSString *)obj];
- }
+ return (SDLComponentVolumeStatus)obj;
}
@end
diff --git a/SmartDeviceLink/SDLSoftButton.h b/SmartDeviceLink/SDLSoftButton.h
index aeefc8a9c..89b859b46 100644
--- a/SmartDeviceLink/SDLSoftButton.h
+++ b/SmartDeviceLink/SDLSoftButton.h
@@ -5,10 +5,10 @@
#import "SDLNotificationConstants.h"
#import "SDLRequestHandler.h"
+#import "SDLSoftButtonType.h"
+#import "SDLSystemAction.h"
@class SDLImage;
-@class SDLSoftButtonType;
-@class SDLSystemAction;
@interface SDLSoftButton : SDLRPCStruct <SDLRequestHandler> {
@@ -20,11 +20,11 @@
@property (copy, nonatomic) SDLRPCNotificationHandler handler;
-@property (strong) SDLSoftButtonType *type;
+@property (strong) SDLSoftButtonType type;
@property (strong) NSString *text;
@property (strong) SDLImage *image;
@property (strong) NSNumber *isHighlighted;
@property (strong) NSNumber *softButtonID;
-@property (strong) SDLSystemAction *systemAction;
+@property (strong) SDLSystemAction systemAction;
@end
diff --git a/SmartDeviceLink/SDLSoftButton.m b/SmartDeviceLink/SDLSoftButton.m
index 201144f20..974e2c23c 100644
--- a/SmartDeviceLink/SDLSoftButton.m
+++ b/SmartDeviceLink/SDLSoftButton.m
@@ -5,8 +5,6 @@
#import "SDLImage.h"
#import "SDLNames.h"
-#import "SDLSoftButtonType.h"
-#import "SDLSystemAction.h"
@implementation SDLSoftButton
@@ -34,7 +32,7 @@
return self;
}
-- (void)setType:(SDLSoftButtonType *)type {
+- (void)setType:(SDLSoftButtonType)type {
if (type != nil) {
[store setObject:type forKey:NAMES_type];
} else {
@@ -42,13 +40,9 @@
}
}
-- (SDLSoftButtonType *)type {
+- (SDLSoftButtonType)type {
NSObject *obj = [store objectForKey:NAMES_type];
- if (obj == nil || [obj isKindOfClass:SDLSoftButtonType.class]) {
- return (SDLSoftButtonType *)obj;
- } else {
- return [SDLSoftButtonType valueOf:(NSString *)obj];
- }
+ return (SDLSoftButtonType)obj;
}
- (void)setText:(NSString *)text {
@@ -104,7 +98,7 @@
return [store objectForKey:NAMES_softButtonID];
}
-- (void)setSystemAction:(SDLSystemAction *)systemAction {
+- (void)setSystemAction:(SDLSystemAction)systemAction {
if (systemAction != nil) {
[store setObject:systemAction forKey:NAMES_systemAction];
} else {
@@ -112,13 +106,9 @@
}
}
-- (SDLSystemAction *)systemAction {
+- (SDLSystemAction)systemAction {
NSObject *obj = [store objectForKey:NAMES_systemAction];
- if (obj == nil || [obj isKindOfClass:SDLSystemAction.class]) {
- return (SDLSystemAction *)obj;
- } else {
- return [SDLSystemAction valueOf:(NSString *)obj];
- }
+ return (SDLSystemAction)obj;
}
@end
diff --git a/SmartDeviceLink/SDLSoftButtonType.h b/SmartDeviceLink/SDLSoftButtonType.h
index d2b59a8d5..0ce2efbf2 100644
--- a/SmartDeviceLink/SDLSoftButtonType.h
+++ b/SmartDeviceLink/SDLSoftButtonType.h
@@ -7,35 +7,19 @@
/**
SoftButtonType (TEXT / IMAGE / BOTH)
*/
-@interface SDLSoftButtonType : SDLEnum {
-}
-
-/**
- @abstract get SDLSoftButtonType according value string
- @param value NSString
- @return SDLSoftButtonType object
- */
-+ (SDLSoftButtonType *)valueOf:(NSString *)value;
-/**
- @abstract declare an array to store all possible SDLSoftButtonType values
- @return the array
- */
-+ (NSArray *)values;
+typedef SDLEnum SDLSoftButtonType NS_EXTENSIBLE_STRING_ENUM;
/**
@abstract Text kind Softbutton
- @return SDLSoftButtonType object with string value *TEXT*
*/
-+ (SDLSoftButtonType *)TEXT;
+extern SDLSoftButtonType const SDLSoftButtonTypeText;
+
/**
@abstract Image kind Softbutton
- @return SDLSoftButtonType object with string value *IMAGE*
*/
-+ (SDLSoftButtonType *)IMAGE;
+extern SDLSoftButtonType const SDLSoftButtonTypeImage;
+
/**
@abstract Both (Text & Image) kind Softbutton
- @return SDLSoftButtonType object with string value *BOTH*
*/
-+ (SDLSoftButtonType *)BOTH;
-
-@end
+extern SDLSoftButtonType const SDLSoftButtonTypeBoth;
diff --git a/SmartDeviceLink/SDLSoftButtonType.m b/SmartDeviceLink/SDLSoftButtonType.m
index 9add8edfe..38de6d703 100644
--- a/SmartDeviceLink/SDLSoftButtonType.m
+++ b/SmartDeviceLink/SDLSoftButtonType.m
@@ -4,53 +4,6 @@
#import "SDLSoftButtonType.h"
-SDLSoftButtonType *SDLSoftButtonType_TEXT = nil;
-SDLSoftButtonType *SDLSoftButtonType_IMAGE = nil;
-SDLSoftButtonType *SDLSoftButtonType_BOTH = nil;
-
-NSArray *SDLSoftButtonType_values = nil;
-
-@implementation SDLSoftButtonType
-
-+ (SDLSoftButtonType *)valueOf:(NSString *)value {
- for (SDLSoftButtonType *item in SDLSoftButtonType.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLSoftButtonType_values == nil) {
- SDLSoftButtonType_values = @[
- SDLSoftButtonType.TEXT,
- SDLSoftButtonType.IMAGE,
- SDLSoftButtonType.BOTH,
- ];
- }
- return SDLSoftButtonType_values;
-}
-
-+ (SDLSoftButtonType *)TEXT {
- if (SDLSoftButtonType_TEXT == nil) {
- SDLSoftButtonType_TEXT = [[SDLSoftButtonType alloc] initWithValue:@"TEXT"];
- }
- return SDLSoftButtonType_TEXT;
-}
-
-+ (SDLSoftButtonType *)IMAGE {
- if (SDLSoftButtonType_IMAGE == nil) {
- SDLSoftButtonType_IMAGE = [[SDLSoftButtonType alloc] initWithValue:@"IMAGE"];
- }
- return SDLSoftButtonType_IMAGE;
-}
-
-+ (SDLSoftButtonType *)BOTH {
- if (SDLSoftButtonType_BOTH == nil) {
- SDLSoftButtonType_BOTH = [[SDLSoftButtonType alloc] initWithValue:@"BOTH"];
- }
- return SDLSoftButtonType_BOTH;
-}
-
-@end
+SDLSoftButtonType const SDLSoftButtonTypeText = @"TEXT";
+SDLSoftButtonType const SDLSoftButtonTypeImage = @"IMAGE";
+SDLSoftButtonType const SDLSoftButtonTypeBoth = @"BOTH";
diff --git a/SmartDeviceLink/SDLSpeechCapabilities.h b/SmartDeviceLink/SDLSpeechCapabilities.h
index 9529e3fef..ffca2bd73 100644
--- a/SmartDeviceLink/SDLSpeechCapabilities.h
+++ b/SmartDeviceLink/SDLSpeechCapabilities.h
@@ -9,38 +9,17 @@
*
* @since SDL 1.0
*/
-@interface SDLSpeechCapabilities : SDLEnum {
-}
-
-/**
- * @abstract get SDLSpeechCapabilities according value string
- *
- * @param value The value of the string to get an object for
- *
- * @return SDLSpeechCapabilities object
- */
-+ (SDLSpeechCapabilities *)valueOf:(NSString *)value;
-
-/**
- * @abstract declare an array to store all possible SDLSpeechCapabilities values
- *
- * @return the array of all possible values
- */
-+ (NSArray *)values;
+typedef SDLEnum SDLSpeechCapabilities NS_EXTENSIBLE_STRING_ENUM;
/**
* @abstract The SDL platform can speak text phrases.
- *
- * @return SDLSpeechCapabilities of value: *TEXT*
*/
-+ (SDLSpeechCapabilities *)TEXT;
-
-+ (SDLSpeechCapabilities *)SAPI_PHONEMES;
+extern SDLSpeechCapabilities const SDLSpeechCapabilitiesText;
-+ (SDLSpeechCapabilities *)LHPLUS_PHONEMES;
+extern SDLSpeechCapabilities const SDLSpeechCapabilitiesSapiPhonemes;
-+ (SDLSpeechCapabilities *)PRE_RECORDED;
+extern SDLSpeechCapabilities const SDLSpeechCapabilitiesLhplusPhonemes;
-+ (SDLSpeechCapabilities *)SILENCE;
+extern SDLSpeechCapabilities const SDLSpeechCapabilitiesPreRecorded;
-@end
+extern SDLSpeechCapabilities const SDLSpeechCapabilitiesSilence;
diff --git a/SmartDeviceLink/SDLSpeechCapabilities.m b/SmartDeviceLink/SDLSpeechCapabilities.m
index 2018b8321..e9bf9ffc1 100644
--- a/SmartDeviceLink/SDLSpeechCapabilities.m
+++ b/SmartDeviceLink/SDLSpeechCapabilities.m
@@ -4,71 +4,8 @@
#import "SDLSpeechCapabilities.h"
-SDLSpeechCapabilities *SDLSpeechCapabilities_TEXT = nil;
-SDLSpeechCapabilities *SDLSpeechCapabilities_SAPI_PHONEMES = nil;
-SDLSpeechCapabilities *SDLSpeechCapabilities_LHPLUS_PHONEMES = nil;
-SDLSpeechCapabilities *SDLSpeechCapabilities_PRE_RECORDED = nil;
-SDLSpeechCapabilities *SDLSpeechCapabilities_SILENCE = nil;
-
-NSArray *SDLSpeechCapabilities_values = nil;
-
-@implementation SDLSpeechCapabilities
-
-+ (SDLSpeechCapabilities *)valueOf:(NSString *)value {
- for (SDLSpeechCapabilities *item in SDLSpeechCapabilities.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLSpeechCapabilities_values == nil) {
- SDLSpeechCapabilities_values = @[
- SDLSpeechCapabilities.TEXT,
- SDLSpeechCapabilities.SAPI_PHONEMES,
- SDLSpeechCapabilities.LHPLUS_PHONEMES,
- SDLSpeechCapabilities.PRE_RECORDED,
- SDLSpeechCapabilities.SILENCE,
- ];
- }
- return SDLSpeechCapabilities_values;
-}
-
-+ (SDLSpeechCapabilities *)TEXT {
- if (SDLSpeechCapabilities_TEXT == nil) {
- SDLSpeechCapabilities_TEXT = [[SDLSpeechCapabilities alloc] initWithValue:@"TEXT"];
- }
- return SDLSpeechCapabilities_TEXT;
-}
-
-+ (SDLSpeechCapabilities *)SAPI_PHONEMES {
- if (SDLSpeechCapabilities_SAPI_PHONEMES == nil) {
- SDLSpeechCapabilities_SAPI_PHONEMES = [[SDLSpeechCapabilities alloc] initWithValue:@"SAPI_PHONEMES"];
- }
- return SDLSpeechCapabilities_SAPI_PHONEMES;
-}
-
-+ (SDLSpeechCapabilities *)LHPLUS_PHONEMES {
- if (SDLSpeechCapabilities_LHPLUS_PHONEMES == nil) {
- SDLSpeechCapabilities_LHPLUS_PHONEMES = [[SDLSpeechCapabilities alloc] initWithValue:@"LHPLUS_PHONEMES"];
- }
- return SDLSpeechCapabilities_LHPLUS_PHONEMES;
-}
-
-+ (SDLSpeechCapabilities *)PRE_RECORDED {
- if (SDLSpeechCapabilities_PRE_RECORDED == nil) {
- SDLSpeechCapabilities_PRE_RECORDED = [[SDLSpeechCapabilities alloc] initWithValue:@"PRE_RECORDED"];
- }
- return SDLSpeechCapabilities_PRE_RECORDED;
-}
-
-+ (SDLSpeechCapabilities *)SILENCE {
- if (SDLSpeechCapabilities_SILENCE == nil) {
- SDLSpeechCapabilities_SILENCE = [[SDLSpeechCapabilities alloc] initWithValue:@"SILENCE"];
- }
- return SDLSpeechCapabilities_SILENCE;
-}
-
-@end
+SDLSpeechCapabilities const SDLSpeechCapabilitiesText = @"TEXT";
+SDLSpeechCapabilities const SDLSpeechCapabilitiesSapiPhonemes = @"SAPI_PHONEMES";
+SDLSpeechCapabilities const SDLSpeechCapabilitiesLhplusPhonemes = @"LHPLUS_PHONEMES";
+SDLSpeechCapabilities const SDLSpeechCapabilitiesPreRecorded = @"PRE_RECORDED";
+SDLSpeechCapabilities const SDLSpeechCapabilitiesSilence = @"SILENCE";
diff --git a/SmartDeviceLink/SDLSubscribeButton.h b/SmartDeviceLink/SDLSubscribeButton.h
index 05c2acd23..48dc7b994 100644
--- a/SmartDeviceLink/SDLSubscribeButton.h
+++ b/SmartDeviceLink/SDLSubscribeButton.h
@@ -4,10 +4,9 @@
#import "SDLRPCRequest.h"
+#import "SDLButtonName.h"
#import "SDLRequestHandler.h"
-@class SDLButtonName;
-
/**
* Establishes a subscription to button notifications for HMI buttons. Buttons
@@ -95,6 +94,6 @@
* @abstract The name of the button to subscribe to
* @discussion An enum value, see <i>SDLButtonName</i>
*/
-@property (strong) SDLButtonName *buttonName;
+@property (strong) SDLButtonName buttonName;
@end
diff --git a/SmartDeviceLink/SDLSubscribeButton.m b/SmartDeviceLink/SDLSubscribeButton.m
index ee0191943..5f131ba18 100644
--- a/SmartDeviceLink/SDLSubscribeButton.m
+++ b/SmartDeviceLink/SDLSubscribeButton.m
@@ -33,7 +33,7 @@
return self;
}
-- (void)setButtonName:(SDLButtonName *)buttonName {
+- (void)setButtonName:(SDLButtonName)buttonName {
if (buttonName != nil) {
[parameters setObject:buttonName forKey:NAMES_buttonName];
} else {
@@ -41,13 +41,9 @@
}
}
-- (SDLButtonName *)buttonName {
+- (SDLButtonName)buttonName {
NSObject *obj = [parameters objectForKey:NAMES_buttonName];
- if (obj == nil || [obj isKindOfClass:SDLButtonName.class]) {
- return (SDLButtonName *)obj;
- } else {
- return [SDLButtonName valueOf:(NSString *)obj];
- }
+ return (SDLButtonName)obj;
}
@end
diff --git a/SmartDeviceLink/SDLSystemAction.h b/SmartDeviceLink/SDLSystemAction.h
index 55371e87d..14cbf27e8 100644
--- a/SmartDeviceLink/SDLSystemAction.h
+++ b/SmartDeviceLink/SDLSystemAction.h
@@ -8,32 +8,19 @@
*
* Enumeration that describes system actions that can be triggered.
*/
-@interface SDLSystemAction : SDLEnum {
-}
-
-/**
- * Convert String to SDLSystemAction
- * @param value String
- * @return SDLSystemAction
- */
-+ (SDLSystemAction *)valueOf:(NSString *)value;
-/**
- @abstract Store the enumeration of all possible SDLSystemAction
- @return an array that store all possible SDLSystemAction
- */
-+ (NSArray *)values;
+typedef SDLEnum SDLSystemAction NS_EXTENSIBLE_STRING_ENUM;
/**
@abstract Default_Action
*/
-+ (SDLSystemAction *)DEFAULT_ACTION;
+extern SDLSystemAction const SDLSystemActionDefaultAction;
+
/**
@abstract Steal_Focus
*/
-+ (SDLSystemAction *)STEAL_FOCUS;
+extern SDLSystemAction const SDLSystemActionStealFocus;
+
/**
@abstract Keep_Context
*/
-+ (SDLSystemAction *)KEEP_CONTEXT;
-
-@end
+extern SDLSystemAction const SDLSystemActionKeepContext;
diff --git a/SmartDeviceLink/SDLSystemAction.m b/SmartDeviceLink/SDLSystemAction.m
index 15b34b08b..0dd9e5594 100644
--- a/SmartDeviceLink/SDLSystemAction.m
+++ b/SmartDeviceLink/SDLSystemAction.m
@@ -4,53 +4,6 @@
#import "SDLSystemAction.h"
-SDLSystemAction *SDLSystemAction_DEFAULT_ACTION = nil;
-SDLSystemAction *SDLSystemAction_STEAL_FOCUS = nil;
-SDLSystemAction *SDLSystemAction_KEEP_CONTEXT = nil;
-
-NSArray *SDLSystemAction_values = nil;
-
-@implementation SDLSystemAction
-
-+ (SDLSystemAction *)valueOf:(NSString *)value {
- for (SDLSystemAction *item in SDLSystemAction.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLSystemAction_values == nil) {
- SDLSystemAction_values = @[
- SDLSystemAction.DEFAULT_ACTION,
- SDLSystemAction.STEAL_FOCUS,
- SDLSystemAction.KEEP_CONTEXT,
- ];
- }
- return SDLSystemAction_values;
-}
-
-+ (SDLSystemAction *)DEFAULT_ACTION {
- if (SDLSystemAction_DEFAULT_ACTION == nil) {
- SDLSystemAction_DEFAULT_ACTION = [[SDLSystemAction alloc] initWithValue:@"DEFAULT_ACTION"];
- }
- return SDLSystemAction_DEFAULT_ACTION;
-}
-
-+ (SDLSystemAction *)STEAL_FOCUS {
- if (SDLSystemAction_STEAL_FOCUS == nil) {
- SDLSystemAction_STEAL_FOCUS = [[SDLSystemAction alloc] initWithValue:@"STEAL_FOCUS"];
- }
- return SDLSystemAction_STEAL_FOCUS;
-}
-
-+ (SDLSystemAction *)KEEP_CONTEXT {
- if (SDLSystemAction_KEEP_CONTEXT == nil) {
- SDLSystemAction_KEEP_CONTEXT = [[SDLSystemAction alloc] initWithValue:@"KEEP_CONTEXT"];
- }
- return SDLSystemAction_KEEP_CONTEXT;
-}
-
-@end
+SDLSystemAction const SDLSystemActionDefaultAction = @"DEFAULT_ACTION";
+SDLSystemAction const SDLSystemActionStealFocus = @"STEAL_FOCUS";
+SDLSystemAction const SDLSystemActionKeepContext = @"KEEP_CONTEXT";
diff --git a/SmartDeviceLink/SDLSystemContext.h b/SmartDeviceLink/SDLSystemContext.h
index 89e92e420..1a2bc066a 100644
--- a/SmartDeviceLink/SDLSystemContext.h
+++ b/SmartDeviceLink/SDLSystemContext.h
@@ -9,62 +9,33 @@
*
* @since SDL 1.0
*/
-@interface SDLSystemContext : SDLEnum {
-}
-
-/**
- * Convert String to SDLSystemContext
- *
- * @param value String value to retrieve the object for
- *
- * @return SDLSystemContext
- */
-+ (SDLSystemContext *)valueOf:(NSString *)value;
-
-/**
- * @abstract Store the enumeration of all possible SDLSystemContext
- *
- * @return an array that store all possible SDLSystemContext
- */
-+ (NSArray *)values;
+typedef SDLEnum SDLSystemContext NS_EXTENSIBLE_STRING_ENUM;
/**
* @abstract No user interaction (user-initiated or app-initiated) is in progress.
- *
- * @return SDLSystemContext object of value *MAIN*
*/
-+ (SDLSystemContext *)MAIN;
+extern SDLSystemContext SDLSystemContextMain;
/**
* @abstract VR-oriented, user-initiated or app-initiated interaction is in-progress.
- *
- * @return SDLSystemContext object of value *VRSESSION*
*/
-+ (SDLSystemContext *)VRSESSION;
+extern SDLSystemContext SDLSystemContextVrSession;
/**
* @abstract Menu-oriented, user-initiated or app-initiated interaction is in-progress.
- *
- * @return SDLSystemContext object of value *MENU*
*/
-+ (SDLSystemContext *)MENU;
+extern SDLSystemContext SDLSystemContextMenu;
/**
* @abstract The app's display HMI is currently being obscured by either a system or other app's overlay.
*
- * @return SDLSystemContext object of value *HMI_OBSCURED*
- *
* @since SDL 2.0
*/
-+ (SDLSystemContext *)HMI_OBSCURED;
+extern SDLSystemContext SDLSystemContextHmiObscured;
/**
* @abstract Broadcast only to whichever app has an alert currently being displayed.
*
- * @return SDLSystemContext object of value *ALERT*
- *
* @since SDL 2.0
*/
-+ (SDLSystemContext *)ALERT;
-
-@end
+extern SDLSystemContext SDLSystemContextAlert;
diff --git a/SmartDeviceLink/SDLSystemContext.m b/SmartDeviceLink/SDLSystemContext.m
index 76c5c9f38..f956f8b93 100644
--- a/SmartDeviceLink/SDLSystemContext.m
+++ b/SmartDeviceLink/SDLSystemContext.m
@@ -4,71 +4,8 @@
#import "SDLSystemContext.h"
-SDLSystemContext *SDLSystemContext_MAIN = nil;
-SDLSystemContext *SDLSystemContext_VRSESSION = nil;
-SDLSystemContext *SDLSystemContext_MENU = nil;
-SDLSystemContext *SDLSystemContext_HMI_OBSCURED = nil;
-SDLSystemContext *SDLSystemContext_ALERT = nil;
-
-NSArray *SDLSystemContext_values = nil;
-
-@implementation SDLSystemContext
-
-+ (SDLSystemContext *)valueOf:(NSString *)value {
- for (SDLSystemContext *item in SDLSystemContext.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLSystemContext_values == nil) {
- SDLSystemContext_values = @[
- SDLSystemContext.MAIN,
- SDLSystemContext.VRSESSION,
- SDLSystemContext.MENU,
- SDLSystemContext.HMI_OBSCURED,
- SDLSystemContext.ALERT,
- ];
- }
- return SDLSystemContext_values;
-}
-
-+ (SDLSystemContext *)MAIN {
- if (SDLSystemContext_MAIN == nil) {
- SDLSystemContext_MAIN = [[SDLSystemContext alloc] initWithValue:@"MAIN"];
- }
- return SDLSystemContext_MAIN;
-}
-
-+ (SDLSystemContext *)VRSESSION {
- if (SDLSystemContext_VRSESSION == nil) {
- SDLSystemContext_VRSESSION = [[SDLSystemContext alloc] initWithValue:@"VRSESSION"];
- }
- return SDLSystemContext_VRSESSION;
-}
-
-+ (SDLSystemContext *)MENU {
- if (SDLSystemContext_MENU == nil) {
- SDLSystemContext_MENU = [[SDLSystemContext alloc] initWithValue:@"MENU"];
- }
- return SDLSystemContext_MENU;
-}
-
-+ (SDLSystemContext *)HMI_OBSCURED {
- if (SDLSystemContext_HMI_OBSCURED == nil) {
- SDLSystemContext_HMI_OBSCURED = [[SDLSystemContext alloc] initWithValue:@"HMI_OBSCURED"];
- }
- return SDLSystemContext_HMI_OBSCURED;
-}
-
-+ (SDLSystemContext *)ALERT {
- if (SDLSystemContext_ALERT == nil) {
- SDLSystemContext_ALERT = [[SDLSystemContext alloc] initWithValue:@"ALERT"];
- }
- return SDLSystemContext_ALERT;
-}
-
-@end
+SDLSystemContext SDLSystemContextMain = @"MAIN";
+SDLSystemContext SDLSystemContextVrSession = @"VRSESSION";
+SDLSystemContext SDLSystemContextMenu = @"MENU";
+SDLSystemContext SDLSystemContextHmiObscured = @"HMI_OBSCURED";
+SDLSystemContext SDLSystemContextAlert = @"ALERT";
diff --git a/SmartDeviceLink/SDLSystemRequest.h b/SmartDeviceLink/SDLSystemRequest.h
index 479b5d18e..dd2811768 100644
--- a/SmartDeviceLink/SDLSystemRequest.h
+++ b/SmartDeviceLink/SDLSystemRequest.h
@@ -3,8 +3,7 @@
#import "SDLRPCRequest.h"
-@class SDLRequestType;
-
+#import "SDLRequestType.h"
/** An asynchronous request from the device; binary data can be included in hybrid part of message for some requests<br> (such as HTTP, Proprietary, or Authentication requests)
* <p>
@@ -17,7 +16,7 @@
- (instancetype)init;
- (instancetype)initWithDictionary:(NSMutableDictionary *)dict;
-@property (strong) SDLRequestType *requestType;
+@property (strong) SDLRequestType requestType;
@property (strong) NSString *fileName;
@end
diff --git a/SmartDeviceLink/SDLSystemRequest.m b/SmartDeviceLink/SDLSystemRequest.m
index 836b44447..6144e1a9b 100644
--- a/SmartDeviceLink/SDLSystemRequest.m
+++ b/SmartDeviceLink/SDLSystemRequest.m
@@ -5,8 +5,6 @@
#import "SDLSystemRequest.h"
#import "SDLNames.h"
-#import "SDLRequestType.h"
-
@implementation SDLSystemRequest
@@ -22,7 +20,7 @@
return self;
}
-- (void)setRequestType:(SDLRequestType *)requestType {
+- (void)setRequestType:(SDLRequestType)requestType {
if (requestType != nil) {
[parameters setObject:requestType forKey:NAMES_requestType];
} else {
@@ -30,13 +28,9 @@
}
}
-- (SDLRequestType *)requestType {
+- (SDLRequestType)requestType {
NSObject *obj = [parameters objectForKey:NAMES_requestType];
- if (obj == nil || [obj isKindOfClass:SDLRequestType.class]) {
- return (SDLRequestType *)obj;
- } else {
- return [SDLRequestType valueOf:(NSString *)obj];
- }
+ return (SDLRequestType)obj;
}
- (void)setFileName:(NSString *)fileName {
diff --git a/SmartDeviceLink/SDLTBTState.h b/SmartDeviceLink/SDLTBTState.h
index 397f500dd..5b900c540 100644
--- a/SmartDeviceLink/SDLTBTState.h
+++ b/SmartDeviceLink/SDLTBTState.h
@@ -4,21 +4,15 @@
#import "SDLEnum.h"
-@interface SDLTBTState : SDLEnum {
-}
+typedef SDLEnum SDLTBTState NS_EXTENSIBLE_STRING_ENUM;
-+ (SDLTBTState *)valueOf:(NSString *)value;
-+ (NSArray *)values;
-
-+ (SDLTBTState *)ROUTE_UPDATE_REQUEST;
-+ (SDLTBTState *)ROUTE_ACCEPTED;
-+ (SDLTBTState *)ROUTE_REFUSED;
-+ (SDLTBTState *)ROUTE_CANCELLED;
-+ (SDLTBTState *)ETA_REQUEST;
-+ (SDLTBTState *)NEXT_TURN_REQUEST;
-+ (SDLTBTState *)ROUTE_STATUS_REQUEST;
-+ (SDLTBTState *)ROUTE_SUMMARY_REQUEST;
-+ (SDLTBTState *)TRIP_STATUS_REQUEST;
-+ (SDLTBTState *)ROUTE_UPDATE_REQUEST_TIMEOUT;
-
-@end
+extern SDLTBTState const SDLTBTStateRouteUpdateRequest;
+extern SDLTBTState const SDLTBTStateRouteAccepted;
+extern SDLTBTState const SDLTBTStateRouteRefused;
+extern SDLTBTState const SDLTBTStateRouteCancelled;
+extern SDLTBTState const SDLTBTStateEtaRequest;
+extern SDLTBTState const SDLTBTStateNextTurnRequest;
+extern SDLTBTState const SDLTBTStateRouteStatusRequest;
+extern SDLTBTState const SDLTBTStateRouteSummaryRequest;
+extern SDLTBTState const SDLTBTStateTripStatusRequest;
+extern SDLTBTState const SDLTBTStateRouteUpdateRequestTimeout;
diff --git a/SmartDeviceLink/SDLTBTState.m b/SmartDeviceLink/SDLTBTState.m
index 0a2a23b8b..278c40918 100644
--- a/SmartDeviceLink/SDLTBTState.m
+++ b/SmartDeviceLink/SDLTBTState.m
@@ -4,116 +4,13 @@
#import "SDLTBTState.h"
-SDLTBTState *SDLTBTState_ROUTE_UPDATE_REQUEST = nil;
-SDLTBTState *SDLTBTState_ROUTE_ACCEPTED = nil;
-SDLTBTState *SDLTBTState_ROUTE_REFUSED = nil;
-SDLTBTState *SDLTBTState_ROUTE_CANCELLED = nil;
-SDLTBTState *SDLTBTState_ETA_REQUEST = nil;
-SDLTBTState *SDLTBTState_NEXT_TURN_REQUEST = nil;
-SDLTBTState *SDLTBTState_ROUTE_STATUS_REQUEST = nil;
-SDLTBTState *SDLTBTState_ROUTE_SUMMARY_REQUEST = nil;
-SDLTBTState *SDLTBTState_TRIP_STATUS_REQUEST = nil;
-SDLTBTState *SDLTBTState_ROUTE_UPDATE_REQUEST_TIMEOUT = nil;
-
-NSArray *SDLTBTState_values = nil;
-
-@implementation SDLTBTState
-
-+ (SDLTBTState *)valueOf:(NSString *)value {
- for (SDLTBTState *item in SDLTBTState.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLTBTState_values == nil) {
- SDLTBTState_values = @[
- SDLTBTState.ROUTE_UPDATE_REQUEST,
- SDLTBTState.ROUTE_ACCEPTED,
- SDLTBTState.ROUTE_REFUSED,
- SDLTBTState.ROUTE_CANCELLED,
- SDLTBTState.ETA_REQUEST,
- SDLTBTState.NEXT_TURN_REQUEST,
- SDLTBTState.ROUTE_STATUS_REQUEST,
- SDLTBTState.ROUTE_SUMMARY_REQUEST,
- SDLTBTState.TRIP_STATUS_REQUEST,
- SDLTBTState.ROUTE_UPDATE_REQUEST_TIMEOUT,
- ];
- }
- return SDLTBTState_values;
-}
-
-+ (SDLTBTState *)ROUTE_UPDATE_REQUEST {
- if (SDLTBTState_ROUTE_UPDATE_REQUEST == nil) {
- SDLTBTState_ROUTE_UPDATE_REQUEST = [[SDLTBTState alloc] initWithValue:@"ROUTE_UPDATE_REQUEST"];
- }
- return SDLTBTState_ROUTE_UPDATE_REQUEST;
-}
-
-+ (SDLTBTState *)ROUTE_ACCEPTED {
- if (SDLTBTState_ROUTE_ACCEPTED == nil) {
- SDLTBTState_ROUTE_ACCEPTED = [[SDLTBTState alloc] initWithValue:@"ROUTE_ACCEPTED"];
- }
- return SDLTBTState_ROUTE_ACCEPTED;
-}
-
-+ (SDLTBTState *)ROUTE_REFUSED {
- if (SDLTBTState_ROUTE_REFUSED == nil) {
- SDLTBTState_ROUTE_REFUSED = [[SDLTBTState alloc] initWithValue:@"ROUTE_REFUSED"];
- }
- return SDLTBTState_ROUTE_REFUSED;
-}
-
-+ (SDLTBTState *)ROUTE_CANCELLED {
- if (SDLTBTState_ROUTE_CANCELLED == nil) {
- SDLTBTState_ROUTE_CANCELLED = [[SDLTBTState alloc] initWithValue:@"ROUTE_CANCELLED"];
- }
- return SDLTBTState_ROUTE_CANCELLED;
-}
-
-+ (SDLTBTState *)ETA_REQUEST {
- if (SDLTBTState_ETA_REQUEST == nil) {
- SDLTBTState_ETA_REQUEST = [[SDLTBTState alloc] initWithValue:@"ETA_REQUEST"];
- }
- return SDLTBTState_ETA_REQUEST;
-}
-
-+ (SDLTBTState *)NEXT_TURN_REQUEST {
- if (SDLTBTState_NEXT_TURN_REQUEST == nil) {
- SDLTBTState_NEXT_TURN_REQUEST = [[SDLTBTState alloc] initWithValue:@"NEXT_TURN_REQUEST"];
- }
- return SDLTBTState_NEXT_TURN_REQUEST;
-}
-
-+ (SDLTBTState *)ROUTE_STATUS_REQUEST {
- if (SDLTBTState_ROUTE_STATUS_REQUEST == nil) {
- SDLTBTState_ROUTE_STATUS_REQUEST = [[SDLTBTState alloc] initWithValue:@"ROUTE_STATUS_REQUEST"];
- }
- return SDLTBTState_ROUTE_STATUS_REQUEST;
-}
-
-+ (SDLTBTState *)ROUTE_SUMMARY_REQUEST {
- if (SDLTBTState_ROUTE_SUMMARY_REQUEST == nil) {
- SDLTBTState_ROUTE_SUMMARY_REQUEST = [[SDLTBTState alloc] initWithValue:@"ROUTE_SUMMARY_REQUEST"];
- }
- return SDLTBTState_ROUTE_SUMMARY_REQUEST;
-}
-
-+ (SDLTBTState *)TRIP_STATUS_REQUEST {
- if (SDLTBTState_TRIP_STATUS_REQUEST == nil) {
- SDLTBTState_TRIP_STATUS_REQUEST = [[SDLTBTState alloc] initWithValue:@"TRIP_STATUS_REQUEST"];
- }
- return SDLTBTState_TRIP_STATUS_REQUEST;
-}
-
-+ (SDLTBTState *)ROUTE_UPDATE_REQUEST_TIMEOUT {
- if (SDLTBTState_ROUTE_UPDATE_REQUEST_TIMEOUT == nil) {
- SDLTBTState_ROUTE_UPDATE_REQUEST_TIMEOUT = [[SDLTBTState alloc] initWithValue:@"ROUTE_UPDATE_REQUEST_TIMEOUT"];
- }
- return SDLTBTState_ROUTE_UPDATE_REQUEST_TIMEOUT;
-}
-
-@end
+SDLTBTState const SDLTBTStateRouteUpdateRequest = @"ROUTE_UPDATE_REQUEST";
+SDLTBTState const SDLTBTStateRouteAccepted = @"ROUTE_ACCEPTED";
+SDLTBTState const SDLTBTStateRouteRefused = @"ROUTE_REFUSED";
+SDLTBTState const SDLTBTStateRouteCancelled = @"ROUTE_CANCELLED";
+SDLTBTState const SDLTBTStateEtaRequest = @"ETA_REQUEST";
+SDLTBTState const SDLTBTStateNextTurnRequest = @"NEXT_TURN_REQUEST";
+SDLTBTState const SDLTBTStateRouteStatusRequest = @"ROUTE_STATUS_REQUEST";
+SDLTBTState const SDLTBTStateRouteSummaryRequest = @"ROUTE_SUMMARY_REQUEST";
+SDLTBTState const SDLTBTStateTripStatusRequest = @"TRIP_STATUS_REQUEST";
+SDLTBTState const SDLTBTStateRouteUpdateRequestTimeout = @"ROUTE_UPDATE_REQUEST_TIMEOUT";
diff --git a/SmartDeviceLink/SDLTTSChunk.h b/SmartDeviceLink/SDLTTSChunk.h
index a304c3d99..6740a74c3 100644
--- a/SmartDeviceLink/SDLTTSChunk.h
+++ b/SmartDeviceLink/SDLTTSChunk.h
@@ -3,8 +3,7 @@
#import "SDLRPCMessage.h"
-@class SDLSpeechCapabilities;
-
+#import "SDLSpeechCapabilities.h"
/**
* Specifies what is to be spoken. This can be simply a text phrase, which SDL will speak according to its own rules. It can also be phonemes from either the Microsoft SAPI phoneme set, or from the LHPLUS phoneme set. It can also be a pre-recorded sound in WAV format (either developer-defined, or provided by the SDL platform).
@@ -64,6 +63,6 @@
*
* Required
*/
-@property (strong) SDLSpeechCapabilities *type;
+@property (strong) SDLSpeechCapabilities type;
@end
diff --git a/SmartDeviceLink/SDLTTSChunk.m b/SmartDeviceLink/SDLTTSChunk.m
index 7e45413eb..1ac2e0b66 100644
--- a/SmartDeviceLink/SDLTTSChunk.m
+++ b/SmartDeviceLink/SDLTTSChunk.m
@@ -4,7 +4,6 @@
#import "SDLTTSChunk.h"
#import "SDLNames.h"
-#import "SDLSpeechCapabilities.h"
@implementation SDLTTSChunk
@@ -33,7 +32,7 @@
return [store objectForKey:NAMES_text];
}
-- (void)setType:(SDLSpeechCapabilities *)type {
+- (void)setType:(SDLSpeechCapabilities)type {
if (type != nil) {
[store setObject:type forKey:NAMES_type];
} else {
@@ -41,13 +40,9 @@
}
}
-- (SDLSpeechCapabilities *)type {
+- (SDLSpeechCapabilities)type {
NSObject *obj = [store objectForKey:NAMES_type];
- if (obj == nil || [obj isKindOfClass:SDLSpeechCapabilities.class]) {
- return (SDLSpeechCapabilities *)obj;
- } else {
- return [SDLSpeechCapabilities valueOf:(NSString *)obj];
- }
+ return (SDLSpeechCapabilities)obj;
}
@end
diff --git a/SmartDeviceLink/SDLTTSChunkFactory.h b/SmartDeviceLink/SDLTTSChunkFactory.h
index 466ae2bae..9088a70e4 100644
--- a/SmartDeviceLink/SDLTTSChunkFactory.h
+++ b/SmartDeviceLink/SDLTTSChunkFactory.h
@@ -3,14 +3,15 @@
#import <Foundation/Foundation.h>
+#import "SDLSpeechCapabilities.h"
+
@class SDLTTSChunk;
-@class SDLSpeechCapabilities;
@interface SDLTTSChunkFactory : NSObject {
}
-+ (SDLTTSChunk *)buildTTSChunkForString:(NSString *)text type:(SDLSpeechCapabilities *)type;
++ (SDLTTSChunk *)buildTTSChunkForString:(NSString *)text type:(SDLSpeechCapabilities)type;
+ (NSMutableArray *)buildTTSChunksFromSimple:(NSString *)simple;
@end
diff --git a/SmartDeviceLink/SDLTTSChunkFactory.m b/SmartDeviceLink/SDLTTSChunkFactory.m
index c27983d3a..eed8efb91 100644
--- a/SmartDeviceLink/SDLTTSChunkFactory.m
+++ b/SmartDeviceLink/SDLTTSChunkFactory.m
@@ -3,13 +3,12 @@
#import "SDLTTSChunkFactory.h"
-#import "SDLSpeechCapabilities.h"
#import "SDLTTSChunk.h"
@implementation SDLTTSChunkFactory
-+ (SDLTTSChunk *)buildTTSChunkForString:(NSString *)text type:(SDLSpeechCapabilities *)type {
++ (SDLTTSChunk *)buildTTSChunkForString:(NSString *)text type:(SDLSpeechCapabilities)type {
SDLTTSChunk *ret = [[SDLTTSChunk alloc] init];
ret.text = text;
ret.type = type;
@@ -21,7 +20,7 @@
if (simple == nil)
return nil;
- return [NSMutableArray arrayWithObject:[SDLTTSChunkFactory buildTTSChunkForString:simple type:[SDLSpeechCapabilities TEXT]]];
+ return [NSMutableArray arrayWithObject:[SDLTTSChunkFactory buildTTSChunkForString:simple type:SDLSpeechCapabilitiesText]];
}
@end
diff --git a/SmartDeviceLink/SDLTextAlignment.h b/SmartDeviceLink/SDLTextAlignment.h
index 0d9913e86..0f5f921c8 100644
--- a/SmartDeviceLink/SDLTextAlignment.h
+++ b/SmartDeviceLink/SDLTextAlignment.h
@@ -9,44 +9,19 @@
*
* @since SDL 1.0
*/
-@interface SDLTextAlignment : SDLEnum {
-}
-
-/**
- * Convert String to SDLTextAlignment
- *
- * @param value The value of the string to get an object for
- *
- * @return SDLTextAlignment
- */
-+ (SDLTextAlignment *)valueOf:(NSString *)value;
-
-/**
- * @abstract Store the enumeration of all possible SDLTextAlignment
- *
- * @return an array that store all possible SDLTextAlignment
- */
-+ (NSArray *)values;
+typedef SDLEnum SDLTextAlignment NS_EXTENSIBLE_STRING_ENUM;
/**
* @abstract Text aligned left.
- *
- * @return A SDLTextAlignment object with value of *LEFT_ALIGNED*
*/
-+ (SDLTextAlignment *)LEFT_ALIGNED;
+extern SDLTextAlignment const SDLTextAlignmentLeftAligned;
/**
* @abstract Text aligned right.
- *
- * @return A SDLTextAlignment object with value of *RIGHT_ALIGNED*
*/
-+ (SDLTextAlignment *)RIGHT_ALIGNED;
+extern SDLTextAlignment const SDLTextAlignmentRightAligned;
/**
* @abstract Text aligned centered.
- *
- * @return A SDLTextAlignment object with value of *CENTERED*
*/
-+ (SDLTextAlignment *)CENTERED;
-
-@end
+extern SDLTextAlignment const SDLTextAlignmentCentered;
diff --git a/SmartDeviceLink/SDLTextAlignment.m b/SmartDeviceLink/SDLTextAlignment.m
index 30560f4a2..599efaf09 100644
--- a/SmartDeviceLink/SDLTextAlignment.m
+++ b/SmartDeviceLink/SDLTextAlignment.m
@@ -4,53 +4,6 @@
#import "SDLTextAlignment.h"
-SDLTextAlignment *SDLTextAlignment_LEFT_ALIGNED = nil;
-SDLTextAlignment *SDLTextAlignment_RIGHT_ALIGNED = nil;
-SDLTextAlignment *SDLTextAlignment_CENTERED = nil;
-
-NSArray *SDLTextAlignment_values = nil;
-
-@implementation SDLTextAlignment
-
-+ (SDLTextAlignment *)valueOf:(NSString *)value {
- for (SDLTextAlignment *item in SDLTextAlignment.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLTextAlignment_values == nil) {
- SDLTextAlignment_values = @[
- SDLTextAlignment.LEFT_ALIGNED,
- SDLTextAlignment.RIGHT_ALIGNED,
- SDLTextAlignment.CENTERED,
- ];
- }
- return SDLTextAlignment_values;
-}
-
-+ (SDLTextAlignment *)LEFT_ALIGNED {
- if (SDLTextAlignment_LEFT_ALIGNED == nil) {
- SDLTextAlignment_LEFT_ALIGNED = [[SDLTextAlignment alloc] initWithValue:@"LEFT_ALIGNED"];
- }
- return SDLTextAlignment_LEFT_ALIGNED;
-}
-
-+ (SDLTextAlignment *)RIGHT_ALIGNED {
- if (SDLTextAlignment_RIGHT_ALIGNED == nil) {
- SDLTextAlignment_RIGHT_ALIGNED = [[SDLTextAlignment alloc] initWithValue:@"RIGHT_ALIGNED"];
- }
- return SDLTextAlignment_RIGHT_ALIGNED;
-}
-
-+ (SDLTextAlignment *)CENTERED {
- if (SDLTextAlignment_CENTERED == nil) {
- SDLTextAlignment_CENTERED = [[SDLTextAlignment alloc] initWithValue:@"CENTERED"];
- }
- return SDLTextAlignment_CENTERED;
-}
-
-@end
+SDLTextAlignment const SDLTextAlignmentLeftAligned = @"LEFT_ALIGNED";
+SDLTextAlignment const SDLTextAlignmentRightAligned = @"RIGHT_ALIGNED";
+SDLTextAlignment const SDLTextAlignmentCentered = @"CENTERED";
diff --git a/SmartDeviceLink/SDLTextField.h b/SmartDeviceLink/SDLTextField.h
index 7af898fe5..65c672053 100644
--- a/SmartDeviceLink/SDLTextField.h
+++ b/SmartDeviceLink/SDLTextField.h
@@ -3,8 +3,8 @@
#import "SDLRPCMessage.h"
-@class SDLCharacterSet;
-@class SDLTextFieldName;
+#import "SDLCharacterSet.h"
+#import "SDLTextFieldName.h"
/**
@@ -78,7 +78,7 @@
*
* Required
*/
-@property (strong) SDLTextFieldName *name;
+@property (strong) SDLTextFieldName name;
/**
* @abstract The character set that is supported in this field.
@@ -87,7 +87,7 @@
*
* Required
*/
-@property (strong) SDLCharacterSet *characterSet;
+@property (strong) SDLCharacterSet characterSet;
/**
* @abstract The number of characters in one row of this field.
diff --git a/SmartDeviceLink/SDLTextField.m b/SmartDeviceLink/SDLTextField.m
index 926d258f1..9e4a875b2 100644
--- a/SmartDeviceLink/SDLTextField.m
+++ b/SmartDeviceLink/SDLTextField.m
@@ -22,7 +22,7 @@
return self;
}
-- (void)setName:(SDLTextFieldName *)name {
+- (void)setName:(SDLTextFieldName)name {
if (name != nil) {
[store setObject:name forKey:NAMES_name];
} else {
@@ -30,16 +30,12 @@
}
}
-- (SDLTextFieldName *)name {
+- (SDLTextFieldName)name {
NSObject *obj = [store objectForKey:NAMES_name];
- if (obj == nil || [obj isKindOfClass:SDLTextFieldName.class]) {
- return (SDLTextFieldName *)obj;
- } else {
- return [SDLTextFieldName valueOf:(NSString *)obj];
- }
+ return (SDLTextFieldName)obj;
}
-- (void)setCharacterSet:(SDLCharacterSet *)characterSet {
+- (void)setCharacterSet:(SDLCharacterSet)characterSet {
if (characterSet != nil) {
[store setObject:characterSet forKey:NAMES_characterSet];
} else {
@@ -47,13 +43,9 @@
}
}
-- (SDLCharacterSet *)characterSet {
+- (SDLCharacterSet)characterSet {
NSObject *obj = [store objectForKey:NAMES_characterSet];
- if (obj == nil || [obj isKindOfClass:SDLCharacterSet.class]) {
- return (SDLCharacterSet *)obj;
- } else {
- return [SDLCharacterSet valueOf:(NSString *)obj];
- }
+ return (SDLCharacterSet)obj;
}
- (void)setWidth:(NSNumber *)width {
diff --git a/SmartDeviceLink/SDLTextFieldName.h b/SmartDeviceLink/SDLTextFieldName.h
index 8fc4c9def..7496f39c3 100644
--- a/SmartDeviceLink/SDLTextFieldName.h
+++ b/SmartDeviceLink/SDLTextFieldName.h
@@ -9,259 +9,184 @@
*
* @since SDL 1.0
*/
-@interface SDLTextFieldName : SDLEnum {
-}
-
-/**
- * Convert String to SDLTextFieldName
- *
- * @param value String value to retrieve the object for
- *
- * @return SDLTextFieldName
- */
-+ (SDLTextFieldName *)valueOf:(NSString *)value;
-
-/**
- * @abstract Store the enumeration of all possible SDLTextFieldName
- *
- * @return an array that store all possible SDLTextFieldName
- */
-+ (NSArray *)values;
+typedef SDLEnum SDLTextFieldName NS_EXTENSIBLE_STRING_ENUM;
/**
* @abstract The first line of the first set of main fields of the persistent display. Applies to SDLShow.
- *
- * @return a SDLTextFieldName with value of *mainField1*
*/
-+ (SDLTextFieldName *)mainField1;
+extern SDLTextFieldName const SDLTextFieldNameMainField1;
/**
* @abstract The second line of the first set of main fields of the persistent display. Applies to SDLShow.
*
- * @return a SDLTextFieldName with value of *mainField2*
- *
* @since SDL 2.0
*/
-+ (SDLTextFieldName *)mainField2;
+extern SDLTextFieldName const SDLTextFieldNameMainField2;
/**
* @abstract The first line of the second set of main fields of the persistent display. Applies to SDLShow.
*
- * @return a SDLTextFieldName with value of *mainField3*
- *
* @since SDL 2.0
*/
-+ (SDLTextFieldName *)mainField3;
+extern SDLTextFieldName const SDLTextFieldNameMainField3;
/**
* @abstract The second line of the second set of main fields of the persistent display. Applies to SDLShow.
- *
- * @return a SDLTextFieldName with value of *mainField4*
*/
-+ (SDLTextFieldName *)mainField4;
+extern SDLTextFieldName const SDLTextFieldNameMainField4;
/**
* @abstract The status bar on the NGN display. Applies to SDLShow.
- *
- * @return a SDLTextFieldName with value of *statusBar*
*/
-+ (SDLTextFieldName *)statusBar;
+extern SDLTextFieldName const SDLTextFieldNameStatusBar;
/**
* @abstract Text value for MediaClock field. Must be properly formatted according to MediaClockFormat. Applies to SDLShow.
*
* @discussion This field is commonly used to show elapsed or remaining time in an audio track or audio capture.
- *
- * @return a SDLTextFieldName with value of *mediaClock*
*/
-+ (SDLTextFieldName *)mediaClock;
+extern SDLTextFieldName const SDLTextFieldNameMediaClock;
/**
* @abstract The track field of NGN type ACMs. This field is only available for media applications on a NGN display. Applies to SDLShow.
*
* @discussion This field is commonly used to show the current track number
- *
- * @return a SDLTextFieldName with value of *mediaTrack*
*/
-+ (SDLTextFieldName *)mediaTrack;
+extern SDLTextFieldName const SDLTextFieldNameMediaTrack;
/**
* @abstract The first line of the alert text field. Applies to SDLAlert.
- *
- * @return a SDLTextFieldName with value of *alertText1*
*/
-+ (SDLTextFieldName *)alertText1;
+extern SDLTextFieldName const SDLTextFieldNameAlertText1;
/**
* @abstract The second line of the alert text field. Applies to SDLAlert.
*
- * @return a SDLTextFieldName with value of *alertText2*
- *
* @since SDL 2.0
*/
-+ (SDLTextFieldName *)alertText2;
+extern SDLTextFieldName const SDLTextFieldNameAlertText2;
/**
* @abstract The third line of the alert text field. Applies to SDLAlert.
*
- * @return a SDLTextFieldName with value of *alertText3*
- *
* @since SDL 2.0
*/
-+ (SDLTextFieldName *)alertText3;
+extern SDLTextFieldName const SDLTextFieldNameAlertText3;
/**
* @abstract Long form body of text that can include newlines and tabs. Applies to SDLScrollableMessage.
*
- * @return a SDLTextFieldName with value of *scrollableMessageBody*
- *
* @since SDL 2.0
*/
-+ (SDLTextFieldName *)scrollableMessageBody;
+extern SDLTextFieldName const SDLTextFieldNameScrollableMessageBody;
/**
* @abstract First line suggestion for a user response (in the case of VR enabled interaction).
*
- * @return a SDLTextFieldName with value of *initialInteractionText*
- *
* @since SDL 2.0
*/
-+ (SDLTextFieldName *)initialInteractionText;
+extern SDLTextFieldName const SDLTextFieldNameInitialInteractionText;
/**
* @abstract First line of navigation text.
*
- * @return a SDLTextFieldName with value of *navigationText1*
- *
* @since SDL 2.0
*/
-+ (SDLTextFieldName *)navigationText1;
+extern SDLTextFieldName const SDLTextFieldNameNavigationText1;
/**
* @abstract Second line of navigation text.
*
- * @return a SDLTextFieldName with value of *navigationText2*
- *
* @since SDL 2.0
*/
-+ (SDLTextFieldName *)navigationText2;
+extern SDLTextFieldName const SDLTextFieldNameNavigationText2;
/**
* @abstract Estimated Time of Arrival time for navigation.
*
- * @return a SDLTextFieldName with value of *ETA*
- *
* @since SDL 2.0
*/
-+ (SDLTextFieldName *)ETA;
+extern SDLTextFieldName const SDLTextFieldNameEta;
/**
* @abstract Total distance to destination for navigation.
*
- * @return a SDLTextFieldName with value of *totalDistance*
- *
* @since SDL 2.0
*/
-+ (SDLTextFieldName *)totalDistance;
+extern SDLTextFieldName const SDLTextFieldNameTotalDistance;
/**
* @abstract First line of text for audio pass thru.
*
- * @return a SDLTextFieldName with value of *audioPassThruDisplayText1*
- *
* @since SDL 2.0
*/
-+ (SDLTextFieldName *)audioPassThruDisplayText1;
+extern SDLTextFieldName const SDLTextFieldNameAudioPassThruDisplayText1;
/**
* @abstract Second line of text for audio pass thru.
*
- * @return a SDLTextFieldName with value of *audioPassThruDisplayText2*
- *
* @since SDL 2.0
*/
-+ (SDLTextFieldName *)audioPassThruDisplayText2;
+extern SDLTextFieldName const SDLTextFieldNameAudioPassThruDisplayText2;
/**
* @abstract Header text for slider.
*
- * @return a SDLTextFieldName with value of *sliderHeader*
- *
* @since SDL 2.0
*/
-+ (SDLTextFieldName *)sliderHeader;
+extern SDLTextFieldName const SDLTextFieldNameSliderHeader;
/**
* @abstract Footer text for slider
*
- * @return a SDLTextFieldName with value of *sliderFooter*
- *
* @since SDL 2.0
*/
-+ (SDLTextFieldName *)sliderFooter;
+extern SDLTextFieldName const SDLTextFieldNameSliderFooter;
/**
* Primary text for SDLChoice
- *
- * @return a SDLTextFieldName with value of *menuName*
*/
-+ (SDLTextFieldName *)menuName;
+extern SDLTextFieldName const SDLTextFieldNameMenuName;
/**
* Secondary text for SDLChoice
- *
- * @return a SDLTextFieldName with value of *secondaryText*
*/
-+ (SDLTextFieldName *)secondaryText;
+extern SDLTextFieldName const SDLTextFieldNameSecondaryText;
/**
* Tertiary text for SDLChoice
- *
- * @return a SDLTextFieldName with value of *tertiaryText*
*/
-+ (SDLTextFieldName *)tertiaryText;
+extern SDLTextFieldName const SDLTextFieldNameTertiaryText;
/**
* Optional text to label an app menu button (for certain touchscreen platforms)
- *
- * @return a SDLTextFieldName with value of *menuTitle*
*/
-+ (SDLTextFieldName *)menuTitle;
+extern SDLTextFieldName const SDLTextFieldNameMenuTitle;
/**
* Optional name / title of intended location for SDLSendLocation
*
- * @return a SDLTextFieldName with value of *locationName*
- *
* @since SDL 4.0
*/
-+ (SDLTextFieldName *)locationName;
+extern SDLTextFieldName const SDLTextFieldNameLocationName;
/**
* Optional description of intended location / establishment (if applicable) for SDLSendLocation
*
- * @return a SDLTextFieldName with value of *locationDescription*
- *
* @since SDL 4.0
*/
-+ (SDLTextFieldName *)locationDescription;
+extern SDLTextFieldName const SDLTextFieldNameLocationDescription;
/**
* Optional location address (if applicable) for SDLSendLocation
*
- * @return a SDLTextFieldName with value of *addressLines*
- *
* @since SDL 4.0
*/
-+ (SDLTextFieldName *)addressLines;
+extern SDLTextFieldName const SDLTextFieldNameAddressLines;
/**
* Optional hone number of intended location / establishment (if applicable) for SDLSendLocation
*
- * @return a SDLTextFieldName with value of *phoneNumber*
- *
* @since SDL 4.0
*/
-+ (SDLTextFieldName *)phoneNumber;
-
-@end
+extern SDLTextFieldName const SDLTextFieldNamePhoneNumber;
diff --git a/SmartDeviceLink/SDLTextFieldName.m b/SmartDeviceLink/SDLTextFieldName.m
index 4cc1ac369..9e6b54100 100644
--- a/SmartDeviceLink/SDLTextFieldName.m
+++ b/SmartDeviceLink/SDLTextFieldName.m
@@ -4,278 +4,31 @@
#import "SDLTextFieldName.h"
-SDLTextFieldName *SDLTextFieldName_mainField1 = nil;
-SDLTextFieldName *SDLTextFieldName_mainField2 = nil;
-SDLTextFieldName *SDLTextFieldName_mainField3 = nil;
-SDLTextFieldName *SDLTextFieldName_mainField4 = nil;
-SDLTextFieldName *SDLTextFieldName_statusBar = nil;
-SDLTextFieldName *SDLTextFieldName_mediaClock = nil;
-SDLTextFieldName *SDLTextFieldName_mediaTrack = nil;
-SDLTextFieldName *SDLTextFieldName_alertText1 = nil;
-SDLTextFieldName *SDLTextFieldName_alertText2 = nil;
-SDLTextFieldName *SDLTextFieldName_alertText3 = nil;
-SDLTextFieldName *SDLTextFieldName_scrollableMessageBody = nil;
-SDLTextFieldName *SDLTextFieldName_initialInteractionText = nil;
-SDLTextFieldName *SDLTextFieldName_navigationText1 = nil;
-SDLTextFieldName *SDLTextFieldName_navigationText2 = nil;
-SDLTextFieldName *SDLTextFieldName_ETA = nil;
-SDLTextFieldName *SDLTextFieldName_totalDistance = nil;
-SDLTextFieldName *SDLTextFieldName_audioPassThruDisplayText1 = nil;
-SDLTextFieldName *SDLTextFieldName_audioPassThruDisplayText2 = nil;
-SDLTextFieldName *SDLTextFieldName_sliderHeader = nil;
-SDLTextFieldName *SDLTextFieldName_sliderFooter = nil;
-SDLTextFieldName *SDLTextFieldName_menuName = nil;
-SDLTextFieldName *SDLTextFieldName_secondaryText = nil;
-SDLTextFieldName *SDLTextFieldName_tertiaryText = nil;
-SDLTextFieldName *SDLTextFieldName_menuTitle = nil;
-SDLTextFieldName *SDLTextFieldName_locationName = nil;
-SDLTextFieldName *SDLTextFieldName_locationDescription = nil;
-SDLTextFieldName *SDLTextFieldName_addressLines = nil;
-SDLTextFieldName *SDLTextFieldName_phoneNumber = nil;
-
-NSArray *SDLTextFieldName_values = nil;
-
-@implementation SDLTextFieldName
-
-+ (SDLTextFieldName *)valueOf:(NSString *)value {
- for (SDLTextFieldName *item in SDLTextFieldName.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLTextFieldName_values == nil) {
- SDLTextFieldName_values = @[
- SDLTextFieldName.mainField1,
- SDLTextFieldName.mainField2,
- SDLTextFieldName.mainField3,
- SDLTextFieldName.mainField4,
- SDLTextFieldName.statusBar,
- SDLTextFieldName.mediaClock,
- SDLTextFieldName.mediaTrack,
- SDLTextFieldName.alertText1,
- SDLTextFieldName.alertText2,
- SDLTextFieldName.alertText3,
- SDLTextFieldName.scrollableMessageBody,
- SDLTextFieldName.initialInteractionText,
- SDLTextFieldName.navigationText1,
- SDLTextFieldName.navigationText2,
- SDLTextFieldName.ETA,
- SDLTextFieldName.totalDistance,
- SDLTextFieldName.audioPassThruDisplayText1,
- SDLTextFieldName.audioPassThruDisplayText2,
- SDLTextFieldName.sliderHeader,
- SDLTextFieldName.sliderFooter,
- SDLTextFieldName.menuName,
- SDLTextFieldName.secondaryText,
- SDLTextFieldName.tertiaryText,
- SDLTextFieldName.menuTitle,
- SDLTextFieldName.locationName,
- SDLTextFieldName.locationDescription,
- SDLTextFieldName.addressLines,
- SDLTextFieldName.phoneNumber,
- ];
- }
- return SDLTextFieldName_values;
-}
-
-+ (SDLTextFieldName *)mainField1 {
- if (SDLTextFieldName_mainField1 == nil) {
- SDLTextFieldName_mainField1 = [[SDLTextFieldName alloc] initWithValue:@"mainField1"];
- }
- return SDLTextFieldName_mainField1;
-}
-
-+ (SDLTextFieldName *)mainField2 {
- if (SDLTextFieldName_mainField2 == nil) {
- SDLTextFieldName_mainField2 = [[SDLTextFieldName alloc] initWithValue:@"mainField2"];
- }
- return SDLTextFieldName_mainField2;
-}
-
-+ (SDLTextFieldName *)mainField3 {
- if (SDLTextFieldName_mainField3 == nil) {
- SDLTextFieldName_mainField3 = [[SDLTextFieldName alloc] initWithValue:@"mainField3"];
- }
- return SDLTextFieldName_mainField3;
-}
-
-+ (SDLTextFieldName *)mainField4 {
- if (SDLTextFieldName_mainField4 == nil) {
- SDLTextFieldName_mainField4 = [[SDLTextFieldName alloc] initWithValue:@"mainField4"];
- }
- return SDLTextFieldName_mainField4;
-}
-
-+ (SDLTextFieldName *)statusBar {
- if (SDLTextFieldName_statusBar == nil) {
- SDLTextFieldName_statusBar = [[SDLTextFieldName alloc] initWithValue:@"statusBar"];
- }
- return SDLTextFieldName_statusBar;
-}
-
-+ (SDLTextFieldName *)mediaClock {
- if (SDLTextFieldName_mediaClock == nil) {
- SDLTextFieldName_mediaClock = [[SDLTextFieldName alloc] initWithValue:@"mediaClock"];
- }
- return SDLTextFieldName_mediaClock;
-}
-
-+ (SDLTextFieldName *)mediaTrack {
- if (SDLTextFieldName_mediaTrack == nil) {
- SDLTextFieldName_mediaTrack = [[SDLTextFieldName alloc] initWithValue:@"mediaTrack"];
- }
- return SDLTextFieldName_mediaTrack;
-}
-
-+ (SDLTextFieldName *)alertText1 {
- if (SDLTextFieldName_alertText1 == nil) {
- SDLTextFieldName_alertText1 = [[SDLTextFieldName alloc] initWithValue:@"alertText1"];
- }
- return SDLTextFieldName_alertText1;
-}
-
-+ (SDLTextFieldName *)alertText2 {
- if (SDLTextFieldName_alertText2 == nil) {
- SDLTextFieldName_alertText2 = [[SDLTextFieldName alloc] initWithValue:@"alertText2"];
- }
- return SDLTextFieldName_alertText2;
-}
-
-+ (SDLTextFieldName *)alertText3 {
- if (SDLTextFieldName_alertText3 == nil) {
- SDLTextFieldName_alertText3 = [[SDLTextFieldName alloc] initWithValue:@"alertText3"];
- }
- return SDLTextFieldName_alertText3;
-}
-
-+ (SDLTextFieldName *)scrollableMessageBody {
- if (SDLTextFieldName_scrollableMessageBody == nil) {
- SDLTextFieldName_scrollableMessageBody = [[SDLTextFieldName alloc] initWithValue:@"scrollableMessageBody"];
- }
- return SDLTextFieldName_scrollableMessageBody;
-}
-
-+ (SDLTextFieldName *)initialInteractionText {
- if (SDLTextFieldName_initialInteractionText == nil) {
- SDLTextFieldName_initialInteractionText = [[SDLTextFieldName alloc] initWithValue:@"initialInteractionText"];
- }
- return SDLTextFieldName_initialInteractionText;
-}
-
-+ (SDLTextFieldName *)navigationText1 {
- if (SDLTextFieldName_navigationText1 == nil) {
- SDLTextFieldName_navigationText1 = [[SDLTextFieldName alloc] initWithValue:@"navigationText1"];
- }
- return SDLTextFieldName_navigationText1;
-}
-
-+ (SDLTextFieldName *)navigationText2 {
- if (SDLTextFieldName_navigationText2 == nil) {
- SDLTextFieldName_navigationText2 = [[SDLTextFieldName alloc] initWithValue:@"navigationText2"];
- }
- return SDLTextFieldName_navigationText2;
-}
-
-+ (SDLTextFieldName *)ETA {
- if (SDLTextFieldName_ETA == nil) {
- SDLTextFieldName_ETA = [[SDLTextFieldName alloc] initWithValue:@"ETA"];
- }
- return SDLTextFieldName_ETA;
-}
-
-+ (SDLTextFieldName *)totalDistance {
- if (SDLTextFieldName_totalDistance == nil) {
- SDLTextFieldName_totalDistance = [[SDLTextFieldName alloc] initWithValue:@"totalDistance"];
- }
- return SDLTextFieldName_totalDistance;
-}
-
-+ (SDLTextFieldName *)audioPassThruDisplayText1 {
- if (SDLTextFieldName_audioPassThruDisplayText1 == nil) {
- SDLTextFieldName_audioPassThruDisplayText1 = [[SDLTextFieldName alloc] initWithValue:@"audioPassThruDisplayText1"];
- }
- return SDLTextFieldName_audioPassThruDisplayText1;
-}
-
-+ (SDLTextFieldName *)audioPassThruDisplayText2 {
- if (SDLTextFieldName_audioPassThruDisplayText2 == nil) {
- SDLTextFieldName_audioPassThruDisplayText2 = [[SDLTextFieldName alloc] initWithValue:@"audioPassThruDisplayText2"];
- }
- return SDLTextFieldName_audioPassThruDisplayText2;
-}
-
-+ (SDLTextFieldName *)sliderHeader {
- if (SDLTextFieldName_sliderHeader == nil) {
- SDLTextFieldName_sliderHeader = [[SDLTextFieldName alloc] initWithValue:@"sliderHeader"];
- }
- return SDLTextFieldName_sliderHeader;
-}
-
-+ (SDLTextFieldName *)sliderFooter {
- if (SDLTextFieldName_sliderFooter == nil) {
- SDLTextFieldName_sliderFooter = [[SDLTextFieldName alloc] initWithValue:@"sliderFooter"];
- }
- return SDLTextFieldName_sliderFooter;
-}
-
-+ (SDLTextFieldName *)menuName {
- if (SDLTextFieldName_menuName == nil) {
- SDLTextFieldName_menuName = [[SDLTextFieldName alloc] initWithValue:@"menuName"];
- }
- return SDLTextFieldName_menuName;
-}
-
-+ (SDLTextFieldName *)secondaryText {
- if (SDLTextFieldName_secondaryText == nil) {
- SDLTextFieldName_secondaryText = [[SDLTextFieldName alloc] initWithValue:@"secondaryText"];
- }
- return SDLTextFieldName_secondaryText;
-}
-
-+ (SDLTextFieldName *)tertiaryText {
- if (SDLTextFieldName_tertiaryText == nil) {
- SDLTextFieldName_tertiaryText = [[SDLTextFieldName alloc] initWithValue:@"tertiaryText"];
- }
- return SDLTextFieldName_tertiaryText;
-}
-
-+ (SDLTextFieldName *)menuTitle {
- if (SDLTextFieldName_menuTitle == nil) {
- SDLTextFieldName_menuTitle = [[SDLTextFieldName alloc] initWithValue:@"menuTitle"];
- }
- return SDLTextFieldName_menuTitle;
-}
-
-+ (SDLTextFieldName *)locationName {
- if (SDLTextFieldName_locationName == nil) {
- SDLTextFieldName_locationName = [[SDLTextFieldName alloc] initWithValue:@"locationName"];
- }
- return SDLTextFieldName_locationName;
-}
-
-+ (SDLTextFieldName *)locationDescription {
- if (SDLTextFieldName_locationDescription == nil) {
- SDLTextFieldName_locationDescription = [[SDLTextFieldName alloc] initWithValue:@"locationDescription"];
- }
- return SDLTextFieldName_locationDescription;
-}
-
-+ (SDLTextFieldName *)addressLines {
- if (SDLTextFieldName_addressLines == nil) {
- SDLTextFieldName_addressLines = [[SDLTextFieldName alloc] initWithValue:@"addressLines"];
- }
- return SDLTextFieldName_addressLines;
-}
-
-+ (SDLTextFieldName *)phoneNumber {
- if (SDLTextFieldName_phoneNumber == nil) {
- SDLTextFieldName_phoneNumber = [[SDLTextFieldName alloc] initWithValue:@"phoneNumber"];
- }
- return SDLTextFieldName_phoneNumber;
-}
-
-@end
+SDLTextFieldName const SDLTextFieldNameMainField1 = @"mainField1";
+SDLTextFieldName const SDLTextFieldNameMainField2 = @"mainField2";
+SDLTextFieldName const SDLTextFieldNameMainField3 = @"mainField3";
+SDLTextFieldName const SDLTextFieldNameMainField4 = @"mainField4";
+SDLTextFieldName const SDLTextFieldNameStatusBar = @"statusBar";
+SDLTextFieldName const SDLTextFieldNameMediaClock = @"mediaClock";
+SDLTextFieldName const SDLTextFieldNameMediaTrack = @"mediaTrack";
+SDLTextFieldName const SDLTextFieldNameAlertText1 = @"alertText1";
+SDLTextFieldName const SDLTextFieldNameAlertText2 = @"alertText2";
+SDLTextFieldName const SDLTextFieldNameAlertText3 = @"alertText3";
+SDLTextFieldName const SDLTextFieldNameScrollableMessageBody = @"scrollableMessageBody";
+SDLTextFieldName const SDLTextFieldNameInitialInteractionText = @"initialInteractionText";
+SDLTextFieldName const SDLTextFieldNameNavigationText1 = @"navigationText1";
+SDLTextFieldName const SDLTextFieldNameNavigationText2 = @"navigationText2";
+SDLTextFieldName const SDLTextFieldNameEta = @"ETA";
+SDLTextFieldName const SDLTextFieldNameTotalDistance = @"totalDistance";
+SDLTextFieldName const SDLTextFieldNameAudioPassThruDisplayText1 = @"audioPassThruDisplayText1";
+SDLTextFieldName const SDLTextFieldNameAudioPassThruDisplayText2 = @"audioPassThruDisplayText2";
+SDLTextFieldName const SDLTextFieldNameSliderHeader = @"sliderHeader";
+SDLTextFieldName const SDLTextFieldNameSliderFooter = @"sliderFooter";
+SDLTextFieldName const SDLTextFieldNameMenuName = @"menuName";
+SDLTextFieldName const SDLTextFieldNameSecondaryText = @"secondaryText";
+SDLTextFieldName const SDLTextFieldNameTertiaryText = @"tertiaryText";
+SDLTextFieldName const SDLTextFieldNameMenuTitle = @"menuTitle";
+SDLTextFieldName const SDLTextFieldNameLocationName = @"locationName";
+SDLTextFieldName const SDLTextFieldNameLocationDescription = @"locationDescription";
+SDLTextFieldName const SDLTextFieldNameAddressLines = @"addressLines";
+SDLTextFieldName const SDLTextFieldNamePhoneNumber = @"phoneNumber";
diff --git a/SmartDeviceLink/SDLTimerMode.h b/SmartDeviceLink/SDLTimerMode.h
index f625f6636..1e6bcc33d 100644
--- a/SmartDeviceLink/SDLTimerMode.h
+++ b/SmartDeviceLink/SDLTimerMode.h
@@ -4,14 +4,8 @@
#import "SDLEnum.h"
-@interface SDLTimerMode : SDLEnum {
-}
+typedef SDLEnum SDLTimerMode NS_EXTENSIBLE_STRING_ENUM;
-+ (SDLTimerMode *)valueOf:(NSString *)value;
-+ (NSArray *)values;
-
-+ (SDLTimerMode *)UP;
-+ (SDLTimerMode *)DOWN;
-+ (SDLTimerMode *)NONE;
-
-@end
+extern SDLTimerMode const SDLTimerModeUp;
+extern SDLTimerMode const SDLTimerModeDown;
+extern SDLTimerMode const SDLTimerModeNone;
diff --git a/SmartDeviceLink/SDLTimerMode.m b/SmartDeviceLink/SDLTimerMode.m
index 5787a2eb4..c5b353465 100644
--- a/SmartDeviceLink/SDLTimerMode.m
+++ b/SmartDeviceLink/SDLTimerMode.m
@@ -4,53 +4,6 @@
#import "SDLTimerMode.h"
-SDLTimerMode *SDLTimerMode_UP = nil;
-SDLTimerMode *SDLTimerMode_DOWN = nil;
-SDLTimerMode *SDLTimerMode_NONE = nil;
-
-NSArray *SDLTimerMode_values = nil;
-
-@implementation SDLTimerMode
-
-+ (SDLTimerMode *)valueOf:(NSString *)value {
- for (SDLTimerMode *item in SDLTimerMode.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLTimerMode_values == nil) {
- SDLTimerMode_values = @[
- SDLTimerMode.UP,
- SDLTimerMode.DOWN,
- SDLTimerMode.NONE,
- ];
- }
- return SDLTimerMode_values;
-}
-
-+ (SDLTimerMode *)UP {
- if (SDLTimerMode_UP == nil) {
- SDLTimerMode_UP = [[SDLTimerMode alloc] initWithValue:@"UP"];
- }
- return SDLTimerMode_UP;
-}
-
-+ (SDLTimerMode *)DOWN {
- if (SDLTimerMode_DOWN == nil) {
- SDLTimerMode_DOWN = [[SDLTimerMode alloc] initWithValue:@"DOWN"];
- }
- return SDLTimerMode_DOWN;
-}
-
-+ (SDLTimerMode *)NONE {
- if (SDLTimerMode_NONE == nil) {
- SDLTimerMode_NONE = [[SDLTimerMode alloc] initWithValue:@"NONE"];
- }
- return SDLTimerMode_NONE;
-}
-
-@end
+SDLTimerMode const SDLTimerModeUp = @"UP";
+SDLTimerMode const SDLTimerModeDown = @"DOWN";
+SDLTimerMode const SDLTimerModeNone = @"NONE";
diff --git a/SmartDeviceLink/SDLTireStatus.h b/SmartDeviceLink/SDLTireStatus.h
index 9ebd68d8e..339b6a546 100644
--- a/SmartDeviceLink/SDLTireStatus.h
+++ b/SmartDeviceLink/SDLTireStatus.h
@@ -4,8 +4,7 @@
#import "SDLRPCMessage.h"
@class SDLSingleTireStatus;
-@class SDLWarningLightStatus;
-
+#import "SDLWarningLightStatus.h"
@interface SDLTireStatus : SDLRPCStruct {
}
@@ -13,7 +12,7 @@
- (instancetype)init;
- (instancetype)initWithDictionary:(NSMutableDictionary *)dict;
-@property (strong) SDLWarningLightStatus *pressureTelltale;
+@property (strong) SDLWarningLightStatus pressureTelltale;
@property (strong) SDLSingleTireStatus *leftFront;
@property (strong) SDLSingleTireStatus *rightFront;
@property (strong) SDLSingleTireStatus *leftRear;
diff --git a/SmartDeviceLink/SDLTireStatus.m b/SmartDeviceLink/SDLTireStatus.m
index c2768565a..a925706ea 100644
--- a/SmartDeviceLink/SDLTireStatus.m
+++ b/SmartDeviceLink/SDLTireStatus.m
@@ -22,7 +22,7 @@
return self;
}
-- (void)setPressureTelltale:(SDLWarningLightStatus *)pressureTelltale {
+- (void)setPressureTelltale:(SDLWarningLightStatus)pressureTelltale {
if (pressureTelltale != nil) {
[store setObject:pressureTelltale forKey:NAMES_pressureTelltale];
} else {
@@ -30,13 +30,9 @@
}
}
-- (SDLWarningLightStatus *)pressureTelltale {
+- (SDLWarningLightStatus)pressureTelltale {
NSObject *obj = [store objectForKey:NAMES_pressureTelltale];
- if (obj == nil || [obj isKindOfClass:SDLWarningLightStatus.class]) {
- return (SDLWarningLightStatus *)obj;
- } else {
- return [SDLWarningLightStatus valueOf:(NSString *)obj];
- }
+ return (SDLWarningLightStatus)obj;
}
- (void)setLeftFront:(SDLSingleTireStatus *)leftFront {
diff --git a/SmartDeviceLink/SDLTouchManager.m b/SmartDeviceLink/SDLTouchManager.m
index f0b2e495c..be67319b5 100644
--- a/SmartDeviceLink/SDLTouchManager.m
+++ b/SmartDeviceLink/SDLTouchManager.m
@@ -119,11 +119,11 @@ static NSUInteger const MaximumNumberOfTouches = 2;
return;
}
- if ([notification.type isEqualToEnum:SDLTouchType.BEGIN]) {
+ if ([notification.type isEqualToString:SDLTouchTypeBegin]) {
[self sdl_handleTouchBegan:touch];
- } else if ([notification.type isEqualToEnum:SDLTouchType.MOVE]) {
+ } else if ([notification.type isEqualToString:SDLTouchTypeMove]) {
[self sdl_handleTouchMoved:touch];
- } else if ([notification.type isEqualToEnum:SDLTouchType.END]) {
+ } else if ([notification.type isEqualToString:SDLTouchTypeEnd]) {
[self sdl_handleTouchEnded:touch];
}
}
@@ -283,4 +283,4 @@ static NSUInteger const MaximumNumberOfTouches = 2;
@end
-NS_ASSUME_NONNULL_END \ No newline at end of file
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLTouchType.h b/SmartDeviceLink/SDLTouchType.h
index bfbb91fd4..744ebac1c 100644
--- a/SmartDeviceLink/SDLTouchType.h
+++ b/SmartDeviceLink/SDLTouchType.h
@@ -4,14 +4,8 @@
#import "SDLEnum.h"
-@interface SDLTouchType : SDLEnum {
-}
+typedef SDLEnum SDLTouchType NS_EXTENSIBLE_STRING_ENUM;
-+ (SDLTouchType *)valueOf:(NSString *)value;
-+ (NSArray *)values;
-
-+ (SDLTouchType *)BEGIN;
-+ (SDLTouchType *)MOVE;
-+ (SDLTouchType *)END;
-
-@end
+extern SDLTouchType const SDLTouchTypeBegin;
+extern SDLTouchType const SDLTouchTypeMove;
+extern SDLTouchType const SDLTouchTypeEnd;
diff --git a/SmartDeviceLink/SDLTouchType.m b/SmartDeviceLink/SDLTouchType.m
index d834d012d..d048636e6 100644
--- a/SmartDeviceLink/SDLTouchType.m
+++ b/SmartDeviceLink/SDLTouchType.m
@@ -4,53 +4,6 @@
#import "SDLTouchType.h"
-SDLTouchType *SDLTouchType_BEGIN = nil;
-SDLTouchType *SDLTouchType_MOVE = nil;
-SDLTouchType *SDLTouchType_END = nil;
-
-NSArray *SDLTouchType_values = nil;
-
-@implementation SDLTouchType
-
-+ (SDLTouchType *)valueOf:(NSString *)value {
- for (SDLTouchType *item in SDLTouchType.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLTouchType_values == nil) {
- SDLTouchType_values = @[
- SDLTouchType.BEGIN,
- SDLTouchType.MOVE,
- SDLTouchType.END,
- ];
- }
- return SDLTouchType_values;
-}
-
-+ (SDLTouchType *)BEGIN {
- if (SDLTouchType_BEGIN == nil) {
- SDLTouchType_BEGIN = [[SDLTouchType alloc] initWithValue:@"BEGIN"];
- }
- return SDLTouchType_BEGIN;
-}
-
-+ (SDLTouchType *)MOVE {
- if (SDLTouchType_MOVE == nil) {
- SDLTouchType_MOVE = [[SDLTouchType alloc] initWithValue:@"MOVE"];
- }
- return SDLTouchType_MOVE;
-}
-
-+ (SDLTouchType *)END {
- if (SDLTouchType_END == nil) {
- SDLTouchType_END = [[SDLTouchType alloc] initWithValue:@"END"];
- }
- return SDLTouchType_END;
-}
-
-@end
+SDLTouchType const SDLTouchTypeBegin = @"BEGIN";
+SDLTouchType const SDLTouchTypeMove = @"MOVE";
+SDLTouchType const SDLTouchTypeEnd = @"END";
diff --git a/SmartDeviceLink/SDLTriggerSource.h b/SmartDeviceLink/SDLTriggerSource.h
index 36e646f17..ab5a848c7 100644
--- a/SmartDeviceLink/SDLTriggerSource.h
+++ b/SmartDeviceLink/SDLTriggerSource.h
@@ -9,38 +9,19 @@
*
* @since SDL 1.0
*/
-@interface SDLTriggerSource : SDLEnum {
-}
-
-/**
- * Convert String to SDLTriggerSource
- * @param value The value of the string to get an object for
- * @return SDLTriggerSource
- */
-+ (SDLTriggerSource *)valueOf:(NSString *)value;
-
-/**
- @abstract Store the enumeration of all possible SDLTriggerSource
- @return an array that store all possible SDLTriggerSource
- */
-+ (NSArray *)values;
+typedef SDLEnum SDLTriggerSource NS_EXTENSIBLE_STRING_ENUM;
/**
* @abstract Selection made via menu
- * @return SDLTriggerSource with value of *MENU*
*/
-+ (SDLTriggerSource *)MENU;
+extern SDLTriggerSource const SDLTriggerSourceMenu;
/**
* @abstract Selection made via Voice session
- * @return SDLTriggerSource with value of *VR*
*/
-+ (SDLTriggerSource *)VR;
+extern SDLTriggerSource const SDLTriggerSourceVr;
/**
* @abstract Selection made via Keyboard
- * @return SDLTriggerSource with value of *KEYBOARD*
*/
-+ (SDLTriggerSource *)KEYBOARD;
-
-@end
+extern SDLTriggerSource const SDLTriggerSourceKeyboard;
diff --git a/SmartDeviceLink/SDLTriggerSource.m b/SmartDeviceLink/SDLTriggerSource.m
index a56b66c6f..f8f368a73 100644
--- a/SmartDeviceLink/SDLTriggerSource.m
+++ b/SmartDeviceLink/SDLTriggerSource.m
@@ -4,53 +4,6 @@
#import "SDLTriggerSource.h"
-SDLTriggerSource *SDLTriggerSource_MENU = nil;
-SDLTriggerSource *SDLTriggerSource_VR = nil;
-SDLTriggerSource *SDLTriggerSource_KEYBOARD = nil;
-
-NSArray *SDLTriggerSource_values = nil;
-
-@implementation SDLTriggerSource
-
-+ (SDLTriggerSource *)valueOf:(NSString *)value {
- for (SDLTriggerSource *item in SDLTriggerSource.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLTriggerSource_values == nil) {
- SDLTriggerSource_values = @[
- SDLTriggerSource.MENU,
- SDLTriggerSource.VR,
- SDLTriggerSource.KEYBOARD,
- ];
- }
- return SDLTriggerSource_values;
-}
-
-+ (SDLTriggerSource *)MENU {
- if (SDLTriggerSource_MENU == nil) {
- SDLTriggerSource_MENU = [[SDLTriggerSource alloc] initWithValue:@"MENU"];
- }
- return SDLTriggerSource_MENU;
-}
-
-+ (SDLTriggerSource *)VR {
- if (SDLTriggerSource_VR == nil) {
- SDLTriggerSource_VR = [[SDLTriggerSource alloc] initWithValue:@"VR"];
- }
- return SDLTriggerSource_VR;
-}
-
-+ (SDLTriggerSource *)KEYBOARD {
- if (SDLTriggerSource_KEYBOARD == nil) {
- SDLTriggerSource_KEYBOARD = [[SDLTriggerSource alloc] initWithValue:@"KEYBOARD"];
- }
- return SDLTriggerSource_KEYBOARD;
-}
-
-@end
+SDLTriggerSource const SDLTriggerSourceMenu = @"MENU";
+SDLTriggerSource const SDLTriggerSourceVr = @"VR";
+SDLTriggerSource const SDLTriggerSourceKeyboard = @"KEYBOARD";
diff --git a/SmartDeviceLink/SDLUnsubscribeButton.h b/SmartDeviceLink/SDLUnsubscribeButton.h
index bb16f43f5..c5f7301bb 100644
--- a/SmartDeviceLink/SDLUnsubscribeButton.h
+++ b/SmartDeviceLink/SDLUnsubscribeButton.h
@@ -3,7 +3,7 @@
#import "SDLRPCRequest.h"
-@class SDLButtonName;
+#import "SDLButtonName.h"
/**
@@ -38,6 +38,6 @@
* @discussion An Enumeration value, see <i>
* SDLButtonName</i>
*/
-@property (strong) SDLButtonName *buttonName;
+@property (strong) SDLButtonName buttonName;
@end
diff --git a/SmartDeviceLink/SDLUnsubscribeButton.m b/SmartDeviceLink/SDLUnsubscribeButton.m
index 9853fa9da..3147ec5de 100644
--- a/SmartDeviceLink/SDLUnsubscribeButton.m
+++ b/SmartDeviceLink/SDLUnsubscribeButton.m
@@ -22,7 +22,7 @@
return self;
}
-- (void)setButtonName:(SDLButtonName *)buttonName {
+- (void)setButtonName:(SDLButtonName)buttonName {
if (buttonName != nil) {
[parameters setObject:buttonName forKey:NAMES_buttonName];
} else {
@@ -30,13 +30,9 @@
}
}
-- (SDLButtonName *)buttonName {
+- (SDLButtonName)buttonName {
NSObject *obj = [parameters objectForKey:NAMES_buttonName];
- if (obj == nil || [obj isKindOfClass:SDLButtonName.class]) {
- return (SDLButtonName *)obj;
- } else {
- return [SDLButtonName valueOf:(NSString *)obj];
- }
+ return (SDLButtonName)obj;
}
@end
diff --git a/SmartDeviceLink/SDLUpdateMode.h b/SmartDeviceLink/SDLUpdateMode.h
index 3ff84a2e9..ff0feafbd 100644
--- a/SmartDeviceLink/SDLUpdateMode.h
+++ b/SmartDeviceLink/SDLUpdateMode.h
@@ -9,49 +9,29 @@
*
* @since SDL 1.0
*/
-@interface SDLUpdateMode : SDLEnum {
-}
-
-/**
- * Convert String to SDLUpdateMode
- * @param value The value of the string to get an object for
- * @return SDLUpdateMode
- */
-+ (SDLUpdateMode *)valueOf:(NSString *)value;
-
-/**
- * @abstract Store the enumeration of all possible SDLUpdateMode
- * @return an array that store all possible SDLUpdateMode
- */
-+ (NSArray *)values;
+typedef SDLEnum SDLUpdateMode NS_EXTENSIBLE_STRING_ENUM;
/**
* @abstract Starts the media clock timer counting upward, in increments of 1 second.
- * @return SDLUpdateMode with value of *COUNTUP*
*/
-+ (SDLUpdateMode *)COUNTUP;
+extern SDLUpdateMode const SDLUpdateModeCountUp;
/**
* @abstract Starts the media clock timer counting downward, in increments of 1 second.
- * @return SDLUpdateMode with value of *COUNTDOWN*
*/
-+ (SDLUpdateMode *)COUNTDOWN;
+extern SDLUpdateMode const SDLUpdateModeCountDown;
/**
* @abstract Pauses the media clock timer.
- * @return SDLUpdateMode with value of *PAUSE*
*/
-+ (SDLUpdateMode *)PAUSE;
+extern SDLUpdateMode const SDLUpdateModePause;
/**
* @abstract Resumes the media clock timer. The timer resumes counting in whatever mode was in effect before pausing (i.e. COUNTUP or COUNTDOWN).
- * @return SDLUpdateMode with value of *RESUME*
*/
-+ (SDLUpdateMode *)RESUME;
+extern SDLUpdateMode const SDLUpdateModeResume;
/**
* @abstract Clear the media clock timer.
*/
-+ (SDLUpdateMode *)CLEAR;
-
-@end
+extern SDLUpdateMode const SDLUpdateModeClear;
diff --git a/SmartDeviceLink/SDLUpdateMode.m b/SmartDeviceLink/SDLUpdateMode.m
index 2a2e8c7e5..fd527f24e 100644
--- a/SmartDeviceLink/SDLUpdateMode.m
+++ b/SmartDeviceLink/SDLUpdateMode.m
@@ -4,71 +4,8 @@
#import "SDLUpdateMode.h"
-SDLUpdateMode *SDLUpdateMode_COUNTUP = nil;
-SDLUpdateMode *SDLUpdateMode_COUNTDOWN = nil;
-SDLUpdateMode *SDLUpdateMode_PAUSE = nil;
-SDLUpdateMode *SDLUpdateMode_RESUME = nil;
-SDLUpdateMode *SDLUpdateMode_CLEAR = nil;
-
-NSArray *SDLUpdateMode_values = nil;
-
-@implementation SDLUpdateMode
-
-+ (SDLUpdateMode *)valueOf:(NSString *)value {
- for (SDLUpdateMode *item in SDLUpdateMode.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLUpdateMode_values == nil) {
- SDLUpdateMode_values = @[
- SDLUpdateMode.COUNTUP,
- SDLUpdateMode.COUNTDOWN,
- SDLUpdateMode.PAUSE,
- SDLUpdateMode.RESUME,
- SDLUpdateMode.CLEAR,
- ];
- }
- return SDLUpdateMode_values;
-}
-
-+ (SDLUpdateMode *)COUNTUP {
- if (SDLUpdateMode_COUNTUP == nil) {
- SDLUpdateMode_COUNTUP = [[SDLUpdateMode alloc] initWithValue:@"COUNTUP"];
- }
- return SDLUpdateMode_COUNTUP;
-}
-
-+ (SDLUpdateMode *)COUNTDOWN {
- if (SDLUpdateMode_COUNTDOWN == nil) {
- SDLUpdateMode_COUNTDOWN = [[SDLUpdateMode alloc] initWithValue:@"COUNTDOWN"];
- }
- return SDLUpdateMode_COUNTDOWN;
-}
-
-+ (SDLUpdateMode *)PAUSE {
- if (SDLUpdateMode_PAUSE == nil) {
- SDLUpdateMode_PAUSE = [[SDLUpdateMode alloc] initWithValue:@"PAUSE"];
- }
- return SDLUpdateMode_PAUSE;
-}
-
-+ (SDLUpdateMode *)RESUME {
- if (SDLUpdateMode_RESUME == nil) {
- SDLUpdateMode_RESUME = [[SDLUpdateMode alloc] initWithValue:@"RESUME"];
- }
- return SDLUpdateMode_RESUME;
-}
-
-+ (SDLUpdateMode *)CLEAR {
- if (SDLUpdateMode_CLEAR == nil) {
- SDLUpdateMode_CLEAR = [[SDLUpdateMode alloc] initWithValue:@"CLEAR"];
- }
- return SDLUpdateMode_CLEAR;
-}
-
-@end
+SDLUpdateMode const SDLUpdateModeCountUp = @"COUNTUP";
+SDLUpdateMode const SDLUpdateModeCountDown = @"COUNTDOWN";
+SDLUpdateMode const SDLUpdateModePause = @"PAUSE";
+SDLUpdateMode const SDLUpdateModeResume = @"RESUME";
+SDLUpdateMode const SDLUpdateModeClear = @"CLEAR";
diff --git a/SmartDeviceLink/SDLVehicleDataActiveStatus.h b/SmartDeviceLink/SDLVehicleDataActiveStatus.h
index dbb36b550..c98231a07 100644
--- a/SmartDeviceLink/SDLVehicleDataActiveStatus.h
+++ b/SmartDeviceLink/SDLVehicleDataActiveStatus.h
@@ -7,40 +7,29 @@
/**
Vehicle Data Activity Status
*/
-@interface SDLVehicleDataActiveStatus : SDLEnum {
-}
-
-/**
- * @abstract Convert String to SDLVehicleDataActiveStatus
- * @param value NSString
- * @return SDLVehicleDataActiveStatus
- */
-+ (SDLVehicleDataActiveStatus *)valueOf:(NSString *)value;
-
-/**
- @abstract return the array that store all possible SDLVehicleDataActiveStatus values
- */
-+ (NSArray *)values;
+typedef SDLEnum SDLVehicleDataActiveStatus NS_EXTENSIBLE_STRING_ENUM;
/**
@abstract SDLVehicleDataActiveStatus : Inactive not confirmed
*/
-+ (SDLVehicleDataActiveStatus *)INACTIVE_NOT_CONFIRMED;
+extern SDLVehicleDataActiveStatus const SDLVehicleDataActiveStatusInactiveNotConfirmed;
+
/**
@abstract SDLVehicleDataActiveStatus : Inactive confirmed
*/
-+ (SDLVehicleDataActiveStatus *)INACTIVE_CONFIRMED;
+extern SDLVehicleDataActiveStatus const SDLVehicleDataActiveStatusInactiveConfirmed;
+
/**
@abstract SDLVehicleDataActiveStatus : Active not confirmed
*/
-+ (SDLVehicleDataActiveStatus *)ACTIVE_NOT_CONFIRMED;
+extern SDLVehicleDataActiveStatus const SDLVehicleDataActiveStatusActiveNotConfirmed;
+
/**
@abstract SDLVehicleDataActiveStatus : Active confirmed
*/
-+ (SDLVehicleDataActiveStatus *)ACTIVE_CONFIRMED;
+extern SDLVehicleDataActiveStatus const SDLVehicleDataActiveStatusActiveConfirmed;
+
/**
@abstract SDLVehicleDataActiveStatus : Fault
*/
-+ (SDLVehicleDataActiveStatus *)FAULT;
-
-@end
+extern SDLVehicleDataActiveStatus const SDLVehicleDataActiveStatusFault;
diff --git a/SmartDeviceLink/SDLVehicleDataActiveStatus.m b/SmartDeviceLink/SDLVehicleDataActiveStatus.m
index 98bf85738..99450ca41 100644
--- a/SmartDeviceLink/SDLVehicleDataActiveStatus.m
+++ b/SmartDeviceLink/SDLVehicleDataActiveStatus.m
@@ -4,71 +4,8 @@
#import "SDLVehicleDataActiveStatus.h"
-SDLVehicleDataActiveStatus *SDLVehicleDataActiveStatus_INACTIVE_NOT_CONFIRMED = nil;
-SDLVehicleDataActiveStatus *SDLVehicleDataActiveStatus_INACTIVE_CONFIRMED = nil;
-SDLVehicleDataActiveStatus *SDLVehicleDataActiveStatus_ACTIVE_NOT_CONFIRMED = nil;
-SDLVehicleDataActiveStatus *SDLVehicleDataActiveStatus_ACTIVE_CONFIRMED = nil;
-SDLVehicleDataActiveStatus *SDLVehicleDataActiveStatus_FAULT = nil;
-
-NSArray *SDLVehicleDataActiveStatus_values = nil;
-
-@implementation SDLVehicleDataActiveStatus
-
-+ (SDLVehicleDataActiveStatus *)valueOf:(NSString *)value {
- for (SDLVehicleDataActiveStatus *item in SDLVehicleDataActiveStatus.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLVehicleDataActiveStatus_values == nil) {
- SDLVehicleDataActiveStatus_values = @[
- SDLVehicleDataActiveStatus.INACTIVE_NOT_CONFIRMED,
- SDLVehicleDataActiveStatus.INACTIVE_CONFIRMED,
- SDLVehicleDataActiveStatus.ACTIVE_NOT_CONFIRMED,
- SDLVehicleDataActiveStatus.ACTIVE_CONFIRMED,
- SDLVehicleDataActiveStatus.FAULT,
- ];
- }
- return SDLVehicleDataActiveStatus_values;
-}
-
-+ (SDLVehicleDataActiveStatus *)INACTIVE_NOT_CONFIRMED {
- if (SDLVehicleDataActiveStatus_INACTIVE_NOT_CONFIRMED == nil) {
- SDLVehicleDataActiveStatus_INACTIVE_NOT_CONFIRMED = [[SDLVehicleDataActiveStatus alloc] initWithValue:@"INACTIVE_NOT_CONFIRMED"];
- }
- return SDLVehicleDataActiveStatus_INACTIVE_NOT_CONFIRMED;
-}
-
-+ (SDLVehicleDataActiveStatus *)INACTIVE_CONFIRMED {
- if (SDLVehicleDataActiveStatus_INACTIVE_CONFIRMED == nil) {
- SDLVehicleDataActiveStatus_INACTIVE_CONFIRMED = [[SDLVehicleDataActiveStatus alloc] initWithValue:@"INACTIVE_CONFIRMED"];
- }
- return SDLVehicleDataActiveStatus_INACTIVE_CONFIRMED;
-}
-
-+ (SDLVehicleDataActiveStatus *)ACTIVE_NOT_CONFIRMED {
- if (SDLVehicleDataActiveStatus_ACTIVE_NOT_CONFIRMED == nil) {
- SDLVehicleDataActiveStatus_ACTIVE_NOT_CONFIRMED = [[SDLVehicleDataActiveStatus alloc] initWithValue:@"ACTIVE_NOT_CONFIRMED"];
- }
- return SDLVehicleDataActiveStatus_ACTIVE_NOT_CONFIRMED;
-}
-
-+ (SDLVehicleDataActiveStatus *)ACTIVE_CONFIRMED {
- if (SDLVehicleDataActiveStatus_ACTIVE_CONFIRMED == nil) {
- SDLVehicleDataActiveStatus_ACTIVE_CONFIRMED = [[SDLVehicleDataActiveStatus alloc] initWithValue:@"ACTIVE_CONFIRMED"];
- }
- return SDLVehicleDataActiveStatus_ACTIVE_CONFIRMED;
-}
-
-+ (SDLVehicleDataActiveStatus *)FAULT {
- if (SDLVehicleDataActiveStatus_FAULT == nil) {
- SDLVehicleDataActiveStatus_FAULT = [[SDLVehicleDataActiveStatus alloc] initWithValue:@"FAULT"];
- }
- return SDLVehicleDataActiveStatus_FAULT;
-}
-
-@end
+SDLVehicleDataActiveStatus const SDLVehicleDataActiveStatusInactiveNotConfirmed = @"INACTIVE_NOT_CONFIRMED";
+SDLVehicleDataActiveStatus const SDLVehicleDataActiveStatusInactiveConfirmed = @"INACTIVE_CONFIRMED";
+SDLVehicleDataActiveStatus const SDLVehicleDataActiveStatusActiveNotConfirmed = @"ACTIVE_NOT_CONFIRMED";
+SDLVehicleDataActiveStatus const SDLVehicleDataActiveStatusActiveConfirmed = @"ACTIVE_CONFIRMED";
+SDLVehicleDataActiveStatus const SDLVehicleDataActiveStatusFault = @"FAULT";
diff --git a/SmartDeviceLink/SDLVehicleDataEventStatus.h b/SmartDeviceLink/SDLVehicleDataEventStatus.h
index 880e4ec2d..a20c547f4 100644
--- a/SmartDeviceLink/SDLVehicleDataEventStatus.h
+++ b/SmartDeviceLink/SDLVehicleDataEventStatus.h
@@ -9,50 +9,20 @@
*
* @since SDL 2.0
*/
-@interface SDLVehicleDataEventStatus : SDLEnum {
-}
+typedef SDLEnum SDLVehicleDataEventStatus NS_EXTENSIBLE_STRING_ENUM;
-/**
- * Convert String to SDLVehicleDataEventStatus
- *
- * @param value The value of the string to get an object for
- *
- * @return SDLVehicleDataEventStatus
- */
-+ (SDLVehicleDataEventStatus *)valueOf:(NSString *)value;
+extern SDLVehicleDataEventStatus const SDLVehicleDataEventStatusNoEvent;
-/**
- * @abstract Store the enumeration of all possible SDLVehicleDataEventStatus
- *
- * @return an array that store all possible SDLVehicleDataEventStatus
- */
-+ (NSArray *)values;
+extern SDLVehicleDataEventStatus const SDLVehicleDataEventStatusNo;
-/**
- * @return The SDLVehicleDataEventStatus instance with value of *NO_EVENT*
- */
-+ (SDLVehicleDataEventStatus *)NO_EVENT;
-
-/**
- * @return The SDLVehicleDataEventStatus instance with value of *NO*
- */
-+ (SDLVehicleDataEventStatus *)_NO;
-
-/**
- * @return The SDLVehicleDataEventStatus instance with value of *YES*
- */
-+ (SDLVehicleDataEventStatus *)_YES;
+extern SDLVehicleDataEventStatus const SDLVehicleDataEventStatusYes;
/**
* @abstract Vehicle data event is not supported
- *
- * @return the SDLVehicleDataEventStatus instance with value of *NOT_SUPPORTED*
*/
-+ (SDLVehicleDataEventStatus *)NOT_SUPPORTED;
+extern SDLVehicleDataEventStatus const SDLVehicleDataEventStatusNotSupported;
/**
* @abstract The SDLVehicleDataEventStatus instance with value of *FAULT*
*/
-+ (SDLVehicleDataEventStatus *)FAULT;
-
-@end
+extern SDLVehicleDataEventStatus const SDLVehicleDataEventStatusFault;
diff --git a/SmartDeviceLink/SDLVehicleDataEventStatus.m b/SmartDeviceLink/SDLVehicleDataEventStatus.m
index a27178886..9c84a4c29 100644
--- a/SmartDeviceLink/SDLVehicleDataEventStatus.m
+++ b/SmartDeviceLink/SDLVehicleDataEventStatus.m
@@ -4,71 +4,8 @@
#import "SDLVehicleDataEventStatus.h"
-SDLVehicleDataEventStatus *SDLVehicleDataEventStatus_NO_EVENT = nil;
-SDLVehicleDataEventStatus *SDLVehicleDataEventStatus_NO = nil;
-SDLVehicleDataEventStatus *SDLVehicleDataEventStatus_YES = nil;
-SDLVehicleDataEventStatus *SDLVehicleDataEventStatus_NOT_SUPPORTED = nil;
-SDLVehicleDataEventStatus *SDLVehicleDataEventStatus_FAULT = nil;
-
-NSArray *SDLVehicleDataEventStatus_values = nil;
-
-@implementation SDLVehicleDataEventStatus
-
-+ (SDLVehicleDataEventStatus *)valueOf:(NSString *)value {
- for (SDLVehicleDataEventStatus *item in SDLVehicleDataEventStatus.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLVehicleDataEventStatus_values == nil) {
- SDLVehicleDataEventStatus_values = @[
- SDLVehicleDataEventStatus.NO_EVENT,
- SDLVehicleDataEventStatus._NO,
- SDLVehicleDataEventStatus._YES,
- SDLVehicleDataEventStatus.NOT_SUPPORTED,
- SDLVehicleDataEventStatus.FAULT,
- ];
- }
- return SDLVehicleDataEventStatus_values;
-}
-
-+ (SDLVehicleDataEventStatus *)NO_EVENT {
- if (SDLVehicleDataEventStatus_NO_EVENT == nil) {
- SDLVehicleDataEventStatus_NO_EVENT = [[SDLVehicleDataEventStatus alloc] initWithValue:@"NO_EVENT"];
- }
- return SDLVehicleDataEventStatus_NO_EVENT;
-}
-
-+ (SDLVehicleDataEventStatus *)_NO {
- if (SDLVehicleDataEventStatus_NO == nil) {
- SDLVehicleDataEventStatus_NO = [[SDLVehicleDataEventStatus alloc] initWithValue:@"NO"];
- }
- return SDLVehicleDataEventStatus_NO;
-}
-
-+ (SDLVehicleDataEventStatus *)_YES {
- if (SDLVehicleDataEventStatus_YES == nil) {
- SDLVehicleDataEventStatus_YES = [[SDLVehicleDataEventStatus alloc] initWithValue:@"YES"];
- }
- return SDLVehicleDataEventStatus_YES;
-}
-
-+ (SDLVehicleDataEventStatus *)NOT_SUPPORTED {
- if (SDLVehicleDataEventStatus_NOT_SUPPORTED == nil) {
- SDLVehicleDataEventStatus_NOT_SUPPORTED = [[SDLVehicleDataEventStatus alloc] initWithValue:@"NOT_SUPPORTED"];
- }
- return SDLVehicleDataEventStatus_NOT_SUPPORTED;
-}
-
-+ (SDLVehicleDataEventStatus *)FAULT {
- if (SDLVehicleDataEventStatus_FAULT == nil) {
- SDLVehicleDataEventStatus_FAULT = [[SDLVehicleDataEventStatus alloc] initWithValue:@"FAULT"];
- }
- return SDLVehicleDataEventStatus_FAULT;
-}
-
-@end
+SDLVehicleDataEventStatus const SDLVehicleDataEventStatusNoEvent = @"NO_EVENT";
+SDLVehicleDataEventStatus const SDLVehicleDataEventStatusNo = @"NO";
+SDLVehicleDataEventStatus const SDLVehicleDataEventStatusYes = @"YES";
+SDLVehicleDataEventStatus const SDLVehicleDataEventStatusNotSupported = @"NOT_SUPPORTED";
+SDLVehicleDataEventStatus const SDLVehicleDataEventStatusFault = @"FAULT";
diff --git a/SmartDeviceLink/SDLVehicleDataNotificationStatus.h b/SmartDeviceLink/SDLVehicleDataNotificationStatus.h
index 24a3fc372..8ca89e15e 100644
--- a/SmartDeviceLink/SDLVehicleDataNotificationStatus.h
+++ b/SmartDeviceLink/SDLVehicleDataNotificationStatus.h
@@ -9,40 +9,24 @@
*
* @since SDL 2.0
*/
-@interface SDLVehicleDataNotificationStatus : SDLEnum {
-}
-
-/**
- * Convert String to SDLVehicleDataNotificationStatus
- * @param value The value of the string to get an object for
- * @return SDLVehicleDataNotificationStatus
- */
-+ (SDLVehicleDataNotificationStatus *)valueOf:(NSString *)value;
-
-/**
- * @abstract Store the enumeration of all possible SDLVehicleDataNotificationStatus
- * @return an array that store all possible SDLVehicleDataNotificationStatus
- */
-+ (NSArray *)values;
+typedef SDLEnum SDLVehicleDataNotificationStatus NS_EXTENSIBLE_STRING_ENUM;
/**
* @abstract SDLVehicleDataNotificationStatus: *NOT_SUPPORTED*
*/
-+ (SDLVehicleDataNotificationStatus *)NOT_SUPPORTED;
+extern SDLVehicleDataNotificationStatus const SDLVehicleDataNotificationStatusNotSupported;
/**
@abstract SDLVehicleDataNotificationStatus: *NORMAL*
*/
-+ (SDLVehicleDataNotificationStatus *)NORMAL;
+extern SDLVehicleDataNotificationStatus const SDLVehicleDataNotificationStatusNormal;
/**
@abstract SDLVehicleDataNotificationStatus: *ACTIVE*
*/
-+ (SDLVehicleDataNotificationStatus *)ACTIVE;
+extern SDLVehicleDataNotificationStatus const SDLVehicleDataNotificationStatusActive;
/**
@abstract SDLVehicleDataNotificationStatus: *NOT_USED*
*/
-+ (SDLVehicleDataNotificationStatus *)NOT_USED;
-
-@end
+extern SDLVehicleDataNotificationStatus const SDLVehicleDataNotificationStatusNotUsed;
diff --git a/SmartDeviceLink/SDLVehicleDataNotificationStatus.m b/SmartDeviceLink/SDLVehicleDataNotificationStatus.m
index 40d66d163..6e3d75020 100644
--- a/SmartDeviceLink/SDLVehicleDataNotificationStatus.m
+++ b/SmartDeviceLink/SDLVehicleDataNotificationStatus.m
@@ -4,62 +4,7 @@
#import "SDLVehicleDataNotificationStatus.h"
-SDLVehicleDataNotificationStatus *SDLVehicleDataNotificationStatus_NOT_SUPPORTED = nil;
-SDLVehicleDataNotificationStatus *SDLVehicleDataNotificationStatus_NORMAL = nil;
-SDLVehicleDataNotificationStatus *SDLVehicleDataNotificationStatus_ACTIVE = nil;
-SDLVehicleDataNotificationStatus *SDLVehicleDataNotificationStatus_NOT_USED = nil;
-
-NSArray *SDLVehicleDataNotificationStatus_values = nil;
-
-@implementation SDLVehicleDataNotificationStatus
-
-+ (SDLVehicleDataNotificationStatus *)valueOf:(NSString *)value {
- for (SDLVehicleDataNotificationStatus *item in SDLVehicleDataNotificationStatus.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLVehicleDataNotificationStatus_values == nil) {
- SDLVehicleDataNotificationStatus_values = @[
- SDLVehicleDataNotificationStatus.NOT_SUPPORTED,
- SDLVehicleDataNotificationStatus.NORMAL,
- SDLVehicleDataNotificationStatus.ACTIVE,
- SDLVehicleDataNotificationStatus.NOT_USED,
- ];
- }
- return SDLVehicleDataNotificationStatus_values;
-}
-
-+ (SDLVehicleDataNotificationStatus *)NOT_SUPPORTED {
- if (SDLVehicleDataNotificationStatus_NOT_SUPPORTED == nil) {
- SDLVehicleDataNotificationStatus_NOT_SUPPORTED = [[SDLVehicleDataNotificationStatus alloc] initWithValue:@"NOT_SUPPORTED"];
- }
- return SDLVehicleDataNotificationStatus_NOT_SUPPORTED;
-}
-
-+ (SDLVehicleDataNotificationStatus *)NORMAL {
- if (SDLVehicleDataNotificationStatus_NORMAL == nil) {
- SDLVehicleDataNotificationStatus_NORMAL = [[SDLVehicleDataNotificationStatus alloc] initWithValue:@"NORMAL"];
- }
- return SDLVehicleDataNotificationStatus_NORMAL;
-}
-
-+ (SDLVehicleDataNotificationStatus *)ACTIVE {
- if (SDLVehicleDataNotificationStatus_ACTIVE == nil) {
- SDLVehicleDataNotificationStatus_ACTIVE = [[SDLVehicleDataNotificationStatus alloc] initWithValue:@"ACTIVE"];
- }
- return SDLVehicleDataNotificationStatus_ACTIVE;
-}
-
-+ (SDLVehicleDataNotificationStatus *)NOT_USED {
- if (SDLVehicleDataNotificationStatus_NOT_USED == nil) {
- SDLVehicleDataNotificationStatus_NOT_USED = [[SDLVehicleDataNotificationStatus alloc] initWithValue:@"NOT_USED"];
- }
- return SDLVehicleDataNotificationStatus_NOT_USED;
-}
-
-@end
+SDLVehicleDataNotificationStatus const SDLVehicleDataNotificationStatusNotSupported = @"NOT_SUPPORTED";
+SDLVehicleDataNotificationStatus const SDLVehicleDataNotificationStatusNormal = @"NORMAL";
+SDLVehicleDataNotificationStatus const SDLVehicleDataNotificationStatusActive = @"ACTIVE";
+SDLVehicleDataNotificationStatus const SDLVehicleDataNotificationStatusNotUsed = @"NOT_USED";
diff --git a/SmartDeviceLink/SDLVehicleDataResult.h b/SmartDeviceLink/SDLVehicleDataResult.h
index 9a03e5d07..14e1d81e3 100644
--- a/SmartDeviceLink/SDLVehicleDataResult.h
+++ b/SmartDeviceLink/SDLVehicleDataResult.h
@@ -3,9 +3,8 @@
#import "SDLRPCMessage.h"
-@class SDLVehicleDataType;
-@class SDLVehicleDataResultCode;
-
+#import "SDLVehicleDataType.h"
+#import "SDLVehicleDataResultCode.h"
@interface SDLVehicleDataResult : SDLRPCStruct {
}
@@ -13,7 +12,7 @@
- (instancetype)init;
- (instancetype)initWithDictionary:(NSMutableDictionary *)dict;
-@property (strong) SDLVehicleDataType *dataType;
-@property (strong) SDLVehicleDataResultCode *resultCode;
+@property (strong) SDLVehicleDataType dataType;
+@property (strong) SDLVehicleDataResultCode resultCode;
@end
diff --git a/SmartDeviceLink/SDLVehicleDataResult.m b/SmartDeviceLink/SDLVehicleDataResult.m
index e395717eb..b4b2a3608 100644
--- a/SmartDeviceLink/SDLVehicleDataResult.m
+++ b/SmartDeviceLink/SDLVehicleDataResult.m
@@ -4,9 +4,6 @@
#import "SDLVehicleDataResult.h"
#import "SDLNames.h"
-#import "SDLVehicleDataResultCode.h"
-#import "SDLVehicleDataType.h"
-
@implementation SDLVehicleDataResult
@@ -22,7 +19,7 @@
return self;
}
-- (void)setDataType:(SDLVehicleDataType *)dataType {
+- (void)setDataType:(SDLVehicleDataType)dataType {
if (dataType != nil) {
[store setObject:dataType forKey:NAMES_dataType];
} else {
@@ -30,16 +27,12 @@
}
}
-- (SDLVehicleDataType *)dataType {
+- (SDLVehicleDataType)dataType {
NSObject *obj = [store objectForKey:NAMES_dataType];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataType.class]) {
- return (SDLVehicleDataType *)obj;
- } else {
- return [SDLVehicleDataType valueOf:(NSString *)obj];
- }
+ return (SDLVehicleDataType)obj;
}
-- (void)setResultCode:(SDLVehicleDataResultCode *)resultCode {
+- (void)setResultCode:(SDLVehicleDataResultCode)resultCode {
if (resultCode != nil) {
[store setObject:resultCode forKey:NAMES_resultCode];
} else {
@@ -47,13 +40,9 @@
}
}
-- (SDLVehicleDataResultCode *)resultCode {
+- (SDLVehicleDataResultCode)resultCode {
NSObject *obj = [store objectForKey:NAMES_resultCode];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataResultCode.class]) {
- return (SDLVehicleDataResultCode *)obj;
- } else {
- return [SDLVehicleDataResultCode valueOf:(NSString *)obj];
- }
+ return (SDLVehicleDataResultCode)obj;
}
@end
diff --git a/SmartDeviceLink/SDLVehicleDataResultCode.h b/SmartDeviceLink/SDLVehicleDataResultCode.h
index 162ecff59..722008d5e 100644
--- a/SmartDeviceLink/SDLVehicleDataResultCode.h
+++ b/SmartDeviceLink/SDLVehicleDataResultCode.h
@@ -7,65 +7,50 @@
/**
Vehicle Data Result Code
*/
-@interface SDLVehicleDataResultCode : SDLEnum {
-}
-
-/**
- * Convert String to SDLVehicleDataResultCode
- * @param value String
- * @return SDLVehicleDataResultCode
- */
-+ (SDLVehicleDataResultCode *)valueOf:(NSString *)value;
-
-/**
- @abstract Store the enumeration of all possible SDLVehicleDataResultCode
- @return an array that store all possible SDLVehicleDataResultCode
- */
-+ (NSArray *)values;
+typedef SDLEnum SDLVehicleDataResultCode NS_EXTENSIBLE_STRING_ENUM;
/**
* Individual vehicle data item / DTC / DID request or subscription successful
*/
-+ (SDLVehicleDataResultCode *)SUCCESS;
+extern SDLVehicleDataResultCode const SDLVehicleDataResultCodeSuccess;
+
/**
* DTC / DID request successful, however, not all active DTCs or full contents of DID location available
*/
-+ (SDLVehicleDataResultCode *)TRUNCATED_DATA;
-
+extern SDLVehicleDataResultCode const SDLVehicleDataResultCodeTruncatedData;
+
/**
* This vehicle data item is not allowed for this app by SDL
*/
-+ (SDLVehicleDataResultCode *)DISALLOWED;
+extern SDLVehicleDataResultCode const SDLVehicleDataResultCodeDisallowed;
/**
* The user has not granted access to this type of vehicle data item at this time
*/
-+ (SDLVehicleDataResultCode *)USER_DISALLOWED;
+extern SDLVehicleDataResultCode const SDLVehicleDataResultCodeUserDisallowed;
/**
* The ECU ID referenced is not a valid ID on the bus / system
*/
-+ (SDLVehicleDataResultCode *)INVALID_ID;
+extern SDLVehicleDataResultCode const SDLVehicleDataResultCodeInvalidId;
/**
* The requested vehicle data item / DTC / DID is not currently available or responding on the bus / system
*/
-+ (SDLVehicleDataResultCode *)VEHICLE_DATA_NOT_AVAILABLE;
+extern SDLVehicleDataResultCode const SDLVehicleDataResultCodeVehicleDataNotAvailable;
/**
* The vehicle data item is already subscribed
*/
-+ (SDLVehicleDataResultCode *)DATA_ALREADY_SUBSCRIBED;
+extern SDLVehicleDataResultCode const SDLVehicleDataResultCodeDataAlreadySubscribed;
/**
* The vehicle data item cannot be unsubscribed because it is not currently subscribed
*/
-+ (SDLVehicleDataResultCode *)DATA_NOT_SUBSCRIBED;
+extern SDLVehicleDataResultCode const SDLVehicleDataResultCodeDataNotSubscribed;
/**
* The request for this item is ignored because it is already in progress
*/
-+ (SDLVehicleDataResultCode *)IGNORED;
-
-@end
+extern SDLVehicleDataResultCode const SDLVehicleDataResultCodeIgnored;
diff --git a/SmartDeviceLink/SDLVehicleDataResultCode.m b/SmartDeviceLink/SDLVehicleDataResultCode.m
index 8aa912568..cc32d3bdd 100644
--- a/SmartDeviceLink/SDLVehicleDataResultCode.m
+++ b/SmartDeviceLink/SDLVehicleDataResultCode.m
@@ -4,107 +4,12 @@
#import "SDLVehicleDataResultCode.h"
-SDLVehicleDataResultCode *SDLVehicleDataResultCode_SUCCESS = nil;
-SDLVehicleDataResultCode *SDLVehicleDataResultCode_TRUNCATED_DATA = nil;
-SDLVehicleDataResultCode *SDLVehicleDataResultCode_DISALLOWED = nil;
-SDLVehicleDataResultCode *SDLVehicleDataResultCode_USER_DISALLOWED = nil;
-SDLVehicleDataResultCode *SDLVehicleDataResultCode_INVALID_ID = nil;
-SDLVehicleDataResultCode *SDLVehicleDataResultCode_VEHICLE_DATA_NOT_AVAILABLE = nil;
-SDLVehicleDataResultCode *SDLVehicleDataResultCode_DATA_ALREADY_SUBSCRIBED = nil;
-SDLVehicleDataResultCode *SDLVehicleDataResultCode_DATA_NOT_SUBSCRIBED = nil;
-SDLVehicleDataResultCode *SDLVehicleDataResultCode_IGNORED = nil;
-
-NSArray *SDLVehicleDataResultCode_values = nil;
-
-@implementation SDLVehicleDataResultCode
-
-+ (SDLVehicleDataResultCode *)valueOf:(NSString *)value {
- for (SDLVehicleDataResultCode *item in SDLVehicleDataResultCode.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLVehicleDataResultCode_values == nil) {
- SDLVehicleDataResultCode_values = @[
- SDLVehicleDataResultCode.SUCCESS,
- SDLVehicleDataResultCode.TRUNCATED_DATA,
- SDLVehicleDataResultCode.DISALLOWED,
- SDLVehicleDataResultCode.USER_DISALLOWED,
- SDLVehicleDataResultCode.INVALID_ID,
- SDLVehicleDataResultCode.VEHICLE_DATA_NOT_AVAILABLE,
- SDLVehicleDataResultCode.DATA_ALREADY_SUBSCRIBED,
- SDLVehicleDataResultCode.DATA_NOT_SUBSCRIBED,
- SDLVehicleDataResultCode.IGNORED,
- ];
- }
- return SDLVehicleDataResultCode_values;
-}
-
-+ (SDLVehicleDataResultCode *)SUCCESS {
- if (SDLVehicleDataResultCode_SUCCESS == nil) {
- SDLVehicleDataResultCode_SUCCESS = [[SDLVehicleDataResultCode alloc] initWithValue:@"SUCCESS"];
- }
- return SDLVehicleDataResultCode_SUCCESS;
-}
-
-+ (SDLVehicleDataResultCode *)TRUNCATED_DATA {
- if (SDLVehicleDataResultCode_TRUNCATED_DATA == nil) {
- SDLVehicleDataResultCode_TRUNCATED_DATA = [[SDLVehicleDataResultCode alloc] initWithValue:@"TRUNCATED_DATA"];
- }
- return SDLVehicleDataResultCode_TRUNCATED_DATA;
-}
-
-+ (SDLVehicleDataResultCode *)DISALLOWED {
- if (SDLVehicleDataResultCode_DISALLOWED == nil) {
- SDLVehicleDataResultCode_DISALLOWED = [[SDLVehicleDataResultCode alloc] initWithValue:@"DISALLOWED"];
- }
- return SDLVehicleDataResultCode_DISALLOWED;
-}
-
-+ (SDLVehicleDataResultCode *)USER_DISALLOWED {
- if (SDLVehicleDataResultCode_USER_DISALLOWED == nil) {
- SDLVehicleDataResultCode_USER_DISALLOWED = [[SDLVehicleDataResultCode alloc] initWithValue:@"USER_DISALLOWED"];
- }
- return SDLVehicleDataResultCode_USER_DISALLOWED;
-}
-
-+ (SDLVehicleDataResultCode *)INVALID_ID {
- if (SDLVehicleDataResultCode_INVALID_ID == nil) {
- SDLVehicleDataResultCode_INVALID_ID = [[SDLVehicleDataResultCode alloc] initWithValue:@"INVALID_ID"];
- }
- return SDLVehicleDataResultCode_INVALID_ID;
-}
-
-+ (SDLVehicleDataResultCode *)VEHICLE_DATA_NOT_AVAILABLE {
- if (SDLVehicleDataResultCode_VEHICLE_DATA_NOT_AVAILABLE == nil) {
- SDLVehicleDataResultCode_VEHICLE_DATA_NOT_AVAILABLE = [[SDLVehicleDataResultCode alloc] initWithValue:@"VEHICLE_DATA_NOT_AVAILABLE"];
- }
- return SDLVehicleDataResultCode_VEHICLE_DATA_NOT_AVAILABLE;
-}
-
-+ (SDLVehicleDataResultCode *)DATA_ALREADY_SUBSCRIBED {
- if (SDLVehicleDataResultCode_DATA_ALREADY_SUBSCRIBED == nil) {
- SDLVehicleDataResultCode_DATA_ALREADY_SUBSCRIBED = [[SDLVehicleDataResultCode alloc] initWithValue:@"DATA_ALREADY_SUBSCRIBED"];
- }
- return SDLVehicleDataResultCode_DATA_ALREADY_SUBSCRIBED;
-}
-
-+ (SDLVehicleDataResultCode *)DATA_NOT_SUBSCRIBED {
- if (SDLVehicleDataResultCode_DATA_NOT_SUBSCRIBED == nil) {
- SDLVehicleDataResultCode_DATA_NOT_SUBSCRIBED = [[SDLVehicleDataResultCode alloc] initWithValue:@"DATA_NOT_SUBSCRIBED"];
- }
- return SDLVehicleDataResultCode_DATA_NOT_SUBSCRIBED;
-}
-
-+ (SDLVehicleDataResultCode *)IGNORED {
- if (SDLVehicleDataResultCode_IGNORED == nil) {
- SDLVehicleDataResultCode_IGNORED = [[SDLVehicleDataResultCode alloc] initWithValue:@"IGNORED"];
- }
- return SDLVehicleDataResultCode_IGNORED;
-}
-
-@end
+SDLVehicleDataResultCode const SDLVehicleDataResultCodeSuccess = @"SUCCESS";
+SDLVehicleDataResultCode const SDLVehicleDataResultCodeTruncatedData = @"TRUNCATED_DATA";
+SDLVehicleDataResultCode const SDLVehicleDataResultCodeDisallowed = @"DISALLOWED";
+SDLVehicleDataResultCode const SDLVehicleDataResultCodeUserDisallowed = @"USER_DISALLOWED";
+SDLVehicleDataResultCode const SDLVehicleDataResultCodeInvalidId = @"INVALID_ID";
+SDLVehicleDataResultCode const SDLVehicleDataResultCodeVehicleDataNotAvailable = @"VEHICLE_DATA_NOT_AVAILABLE";
+SDLVehicleDataResultCode const SDLVehicleDataResultCodeDataAlreadySubscribed = @"DATA_ALREADY_SUBSCRIBED";
+SDLVehicleDataResultCode const SDLVehicleDataResultCodeDataNotSubscribed = @"DATA_NOT_SUBSCRIBED";
+SDLVehicleDataResultCode const SDLVehicleDataResultCodeIgnored = @"IGNORED";
diff --git a/SmartDeviceLink/SDLVehicleDataStatus.h b/SmartDeviceLink/SDLVehicleDataStatus.h
index e7720c924..7011b48c3 100644
--- a/SmartDeviceLink/SDLVehicleDataStatus.h
+++ b/SmartDeviceLink/SDLVehicleDataStatus.h
@@ -9,36 +9,19 @@
*
* @since SDL 2.0
*/
-@interface SDLVehicleDataStatus : SDLEnum {
-}
-
-/**
- * Convert String to SDLVehicleDataStatus
- * @param value The value of the string to get an object for
- * @return SDLVehicleDataStatus
- */
-+ (SDLVehicleDataStatus *)valueOf:(NSString *)value;
-
-/**
- * @abstract Store the enumeration of all possible SDLVehicleDataStatus
- * @return an array that store all possible SDLVehicleDataStatus
- */
-+ (NSArray *)values;
+typedef SDLEnum SDLVehicleDataStatus NS_EXTENSIBLE_STRING_ENUM;
/**
* @abstract No data avaliable
- * @return SDLVehicleDataStatus: *NO_DATA_EXISTS*
*/
-+ (SDLVehicleDataStatus *)NO_DATA_EXISTS;
+extern SDLVehicleDataStatus const SDLVehicleDataStatusNoDataExists;
/**
* @abstract return SDLVehicleDataStatus: *OFF*
*/
-+ (SDLVehicleDataStatus *)OFF;
+extern SDLVehicleDataStatus const SDLVehicleDataStatusOff;
/**
* @abstract return SDLVehicleDataStatus: *ON*
*/
-+ (SDLVehicleDataStatus *)ON;
-
-@end
+extern SDLVehicleDataStatus const SDLVehicleDataStatusOn;
diff --git a/SmartDeviceLink/SDLVehicleDataStatus.m b/SmartDeviceLink/SDLVehicleDataStatus.m
index 0fe108a1e..3c398ce44 100644
--- a/SmartDeviceLink/SDLVehicleDataStatus.m
+++ b/SmartDeviceLink/SDLVehicleDataStatus.m
@@ -4,53 +4,6 @@
#import "SDLVehicleDataStatus.h"
-SDLVehicleDataStatus *SDLVehicleDataStatus_NO_DATA_EXISTS = nil;
-SDLVehicleDataStatus *SDLVehicleDataStatus_OFF = nil;
-SDLVehicleDataStatus *SDLVehicleDataStatus_ON = nil;
-
-NSArray *SDLVehicleDataStatus_values = nil;
-
-@implementation SDLVehicleDataStatus
-
-+ (SDLVehicleDataStatus *)valueOf:(NSString *)value {
- for (SDLVehicleDataStatus *item in SDLVehicleDataStatus.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLVehicleDataStatus_values == nil) {
- SDLVehicleDataStatus_values = @[
- SDLVehicleDataStatus.NO_DATA_EXISTS,
- SDLVehicleDataStatus.OFF,
- SDLVehicleDataStatus.ON,
- ];
- }
- return SDLVehicleDataStatus_values;
-}
-
-+ (SDLVehicleDataStatus *)NO_DATA_EXISTS {
- if (SDLVehicleDataStatus_NO_DATA_EXISTS == nil) {
- SDLVehicleDataStatus_NO_DATA_EXISTS = [[SDLVehicleDataStatus alloc] initWithValue:@"NO_DATA_EXISTS"];
- }
- return SDLVehicleDataStatus_NO_DATA_EXISTS;
-}
-
-+ (SDLVehicleDataStatus *)OFF {
- if (SDLVehicleDataStatus_OFF == nil) {
- SDLVehicleDataStatus_OFF = [[SDLVehicleDataStatus alloc] initWithValue:@"OFF"];
- }
- return SDLVehicleDataStatus_OFF;
-}
-
-+ (SDLVehicleDataStatus *)ON {
- if (SDLVehicleDataStatus_ON == nil) {
- SDLVehicleDataStatus_ON = [[SDLVehicleDataStatus alloc] initWithValue:@"ON"];
- }
- return SDLVehicleDataStatus_ON;
-}
-
-@end
+SDLVehicleDataStatus const SDLVehicleDataStatusNoDataExists = @"NO_DATA_EXISTS";
+SDLVehicleDataStatus const SDLVehicleDataStatusOff = @"OFF";
+SDLVehicleDataStatus const SDLVehicleDataStatusOn = @"ON";
diff --git a/SmartDeviceLink/SDLVehicleDataType.h b/SmartDeviceLink/SDLVehicleDataType.h
index 71ec1f4fe..78e8f60fb 100644
--- a/SmartDeviceLink/SDLVehicleDataType.h
+++ b/SmartDeviceLink/SDLVehicleDataType.h
@@ -7,153 +7,134 @@
/**
* Defines the vehicle data types that can be published and/or subscribed to using SDLSubscribeVehicleData
*/
-@interface SDLVehicleDataType : SDLEnum {
-}
-
-/**
- * Convert String to SDLVehicleDataType
- *
- * @param value String value to retrieve the object for
- *
- * @return SDLVehicleDataType
- */
-+ (SDLVehicleDataType *)valueOf:(NSString *)value;
-
-/**
- * @abstract Store the enumeration of all possible SDLVehicleDataType
- *
- * @return an array that store all possible SDLVehicleDataType
- */
-+ (NSArray *)values;
+typedef SDLEnum SDLVehicleDataType NS_EXTENSIBLE_STRING_ENUM;
/**
* @abstract SDLVehicleDataType: *VEHICLEDATA_GPS*
*/
-+ (SDLVehicleDataType *)VEHICLEDATA_GPS;
+extern SDLVehicleDataType const SDLVehicleDataTypeGps;
/**
* @abstract SDLVehicleDataType: *VEHICLEDATA_SPEED*
*/
-+ (SDLVehicleDataType *)VEHICLEDATA_SPEED;
+extern SDLVehicleDataType const SDLVehicleDataTypeSpeed;
/**
* @abstract SDLVehicleDataType: *VEHICLEDATA_RPM*
*/
-+ (SDLVehicleDataType *)VEHICLEDATA_RPM;
+extern SDLVehicleDataType const SDLVehicleDataTypeRpm;
/**
* @abstract SDLVehicleDataType: *VEHICLEDATA_FUELLEVEL*
*/
-+ (SDLVehicleDataType *)VEHICLEDATA_FUELLEVEL;
+extern SDLVehicleDataType const SDLVehicleDataTypeFuelLevel;
/**
* @abstract SDLVehicleDataType: *VEHICLEDATA_FUELLEVEL_STATE*
*/
-+ (SDLVehicleDataType *)VEHICLEDATA_FUELLEVEL_STATE;
+extern SDLVehicleDataType const SDLVehicleDataTypeFuelLevelState;
/**
* @abstract SDLVehicleDataType: *VEHICLEDATA_FUELCONSUMPTION*
*/
-+ (SDLVehicleDataType *)VEHICLEDATA_FUELCONSUMPTION;
+extern SDLVehicleDataType const SDLVehicleDataTypeFuelConsumption;
/**
* @abstract SDLVehicleDataType: *VEHICLEDATA_EXTERNTEMP*
*/
-+ (SDLVehicleDataType *)VEHICLEDATA_EXTERNTEMP;
+extern SDLVehicleDataType const SDLVehicleDataTypeExternalTemp;
/**
* @abstract SDLVehicleDataType: *VEHICLEDATA_VIN*
*/
-+ (SDLVehicleDataType *)VEHICLEDATA_VIN;
+extern SDLVehicleDataType const SDLVehicleDataTypeVin;
/**
* @abstract SDLVehicleDataType: *VEHICLEDATA_PRNDL*
*/
-+ (SDLVehicleDataType *)VEHICLEDATA_PRNDL;
+extern SDLVehicleDataType const SDLVehicleDataTypePrndl;
/**
* @abstract SDLVehicleDataType: *VEHICLEDATA_TIREPRESSURE*
*/
-+ (SDLVehicleDataType *)VEHICLEDATA_TIREPRESSURE;
+extern SDLVehicleDataType const SDLVehicleDataTypeTirePressure;
/**
* @abstract SDLVehicleDataType: *VEHICLEDATA_ODOMETER*
*/
-+ (SDLVehicleDataType *)VEHICLEDATA_ODOMETER;
+extern SDLVehicleDataType const SDLVehicleDataTypeOdometer;
/**
* @abstract SDLVehicleDataType: *VEHICLEDATA_BELTSTATUS*
*/
-+ (SDLVehicleDataType *)VEHICLEDATA_BELTSTATUS;
+extern SDLVehicleDataType const SDLVehicleDataTypeBeltStatus;
/**
* @abstract SDLVehicleDataType: *VEHICLEDATA_BODYINFO*
*/
-+ (SDLVehicleDataType *)VEHICLEDATA_BODYINFO;
+extern SDLVehicleDataType const SDLVehicleDataTypeBodyInfo;
/**
* @abstract SDLVehicleDataType: *VEHICLEDATA_DEVICESTATUS*
*/
-+ (SDLVehicleDataType *)VEHICLEDATA_DEVICESTATUS;
+extern SDLVehicleDataType const SDLVehicleDataTypeDeviceStatus;
/**
* @abstract SDLVehicleDataType: *VEHICLEDATA_ECALLINFO*
*/
-+ (SDLVehicleDataType *)VEHICLEDATA_ECALLINFO;
+extern SDLVehicleDataType const SDLVehicleDataTypeEcallInfo;
/**
* @abstract SDLVehicleDataType: *VEHICLEDATA_AIRBAGSTATUS*
*/
-+ (SDLVehicleDataType *)VEHICLEDATA_AIRBAGSTATUS;
+extern SDLVehicleDataType const SDLVehicleDataTypeAirbagStatus;
/**
* @abstract SDLVehicleDataType: *VEHICLEDATA_EMERGENCYEVENT*
*/
-+ (SDLVehicleDataType *)VEHICLEDATA_EMERGENCYEVENT;
+extern SDLVehicleDataType const SDLVehicleDataTypeEmergencyEvent;
/**
* @abstract SDLVehicleDataType: *VEHICLEDATA_CLUSTERMODESTATUS*
*/
-+ (SDLVehicleDataType *)VEHICLEDATA_CLUSTERMODESTATUS;
+extern SDLVehicleDataType const SDLVehicleDataTypeClusterModeStatus;
/**
* @abstract SDLVehicleDataType: *VEHICLEDATA_MYKEY*
*/
-+ (SDLVehicleDataType *)VEHICLEDATA_MYKEY;
+extern SDLVehicleDataType const SDLVehicleDataTypeMyKey;
/**
* @abstract SDLVehicleDataType: *VEHICLEDATA_BRAKING*
*/
-+ (SDLVehicleDataType *)VEHICLEDATA_BRAKING;
+extern SDLVehicleDataType const SDLVehicleDataTypeBraking;
/**
* @abstract SDLVehicleDataType: *VEHICLEDATA_WIPERSTATUS*
*/
-+ (SDLVehicleDataType *)VEHICLEDATA_WIPERSTATUS;
+extern SDLVehicleDataType const SDLVehicleDataTypeWiperStatus;
/**
* @abstract SDLVehicleDataType: *VEHICLEDATA_HEADLAMPSTATUS*
*/
-+ (SDLVehicleDataType *)VEHICLEDATA_HEADLAMPSTATUS;
+extern SDLVehicleDataType const SDLVehicleDataTypeHeadlampStatus;
/**
* @abstract SDLVehicleDataType: *VEHICLEDATA_BATTVOLTAGE*
*/
-+ (SDLVehicleDataType *)VEHICLEDATA_BATTVOLTAGE;
+extern SDLVehicleDataType const SDLVehicleDataTypeBatteryVoltage;
/**
* @abstract SDLVehicleDataType: *VEHICLEDATA_ENGINETORQUE*
*/
-+ (SDLVehicleDataType *)VEHICLEDATA_ENGINETORQUE;
+extern SDLVehicleDataType const SDLVehicleDataTypeEngineTorque;
/**
* @abstract SDLVehicleDataType: *VEHICLEDATA_ACCPEDAL*
*/
-+ (SDLVehicleDataType *)VEHICLEDATA_ACCPEDAL;
+extern SDLVehicleDataType const SDLVehicleDataTypeAccelerationPedal;
/**
* @abstract SDLVehicleDataType: *VEHICLEDATA_STEERINGWHEEL*
*/
-+ (SDLVehicleDataType *)VEHICLEDATA_STEERINGWHEEL;
-
-@end
+extern SDLVehicleDataType const SDLVehicleDataTypeSteeringWheel;
diff --git a/SmartDeviceLink/SDLVehicleDataType.m b/SmartDeviceLink/SDLVehicleDataType.m
index fa5573745..b7deca9ae 100644
--- a/SmartDeviceLink/SDLVehicleDataType.m
+++ b/SmartDeviceLink/SDLVehicleDataType.m
@@ -4,260 +4,29 @@
#import "SDLVehicleDataType.h"
-SDLVehicleDataType *SDLVehicleDataType_VEHICLEDATA_GPS = nil;
-SDLVehicleDataType *SDLVehicleDataType_VEHICLEDATA_SPEED = nil;
-SDLVehicleDataType *SDLVehicleDataType_VEHICLEDATA_RPM = nil;
-SDLVehicleDataType *SDLVehicleDataType_VEHICLEDATA_FUELLEVEL = nil;
-SDLVehicleDataType *SDLVehicleDataType_VEHICLEDATA_FUELLEVEL_STATE = nil;
-SDLVehicleDataType *SDLVehicleDataType_VEHICLEDATA_FUELCONSUMPTION = nil;
-SDLVehicleDataType *SDLVehicleDataType_VEHICLEDATA_EXTERNTEMP = nil;
-SDLVehicleDataType *SDLVehicleDataType_VEHICLEDATA_VIN = nil;
-SDLVehicleDataType *SDLVehicleDataType_VEHICLEDATA_PRNDL = nil;
-SDLVehicleDataType *SDLVehicleDataType_VEHICLEDATA_TIREPRESSURE = nil;
-SDLVehicleDataType *SDLVehicleDataType_VEHICLEDATA_ODOMETER = nil;
-SDLVehicleDataType *SDLVehicleDataType_VEHICLEDATA_BELTSTATUS = nil;
-SDLVehicleDataType *SDLVehicleDataType_VEHICLEDATA_BODYINFO = nil;
-SDLVehicleDataType *SDLVehicleDataType_VEHICLEDATA_DEVICESTATUS = nil;
-SDLVehicleDataType *SDLVehicleDataType_VEHICLEDATA_ECALLINFO = nil;
-SDLVehicleDataType *SDLVehicleDataType_VEHICLEDATA_AIRBAGSTATUS = nil;
-SDLVehicleDataType *SDLVehicleDataType_VEHICLEDATA_EMERGENCYEVENT = nil;
-SDLVehicleDataType *SDLVehicleDataType_VEHICLEDATA_CLUSTERMODESTATUS = nil;
-SDLVehicleDataType *SDLVehicleDataType_VEHICLEDATA_MYKEY = nil;
-SDLVehicleDataType *SDLVehicleDataType_VEHICLEDATA_BRAKING = nil;
-SDLVehicleDataType *SDLVehicleDataType_VEHICLEDATA_WIPERSTATUS = nil;
-SDLVehicleDataType *SDLVehicleDataType_VEHICLEDATA_HEADLAMPSTATUS = nil;
-SDLVehicleDataType *SDLVehicleDataType_VEHICLEDATA_BATTVOLTAGE = nil;
-SDLVehicleDataType *SDLVehicleDataType_VEHICLEDATA_ENGINETORQUE = nil;
-SDLVehicleDataType *SDLVehicleDataType_VEHICLEDATA_ACCPEDAL = nil;
-SDLVehicleDataType *SDLVehicleDataType_VEHICLEDATA_STEERINGWHEEL = nil;
-
-NSArray *SDLVehicleDataType_values = nil;
-
-@implementation SDLVehicleDataType
-
-+ (SDLVehicleDataType *)valueOf:(NSString *)value {
- for (SDLVehicleDataType *item in SDLVehicleDataType.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLVehicleDataType_values == nil) {
- SDLVehicleDataType_values = @[
- SDLVehicleDataType.VEHICLEDATA_GPS,
- SDLVehicleDataType.VEHICLEDATA_SPEED,
- SDLVehicleDataType.VEHICLEDATA_RPM,
- SDLVehicleDataType.VEHICLEDATA_FUELLEVEL,
- SDLVehicleDataType.VEHICLEDATA_FUELLEVEL_STATE,
- SDLVehicleDataType.VEHICLEDATA_FUELCONSUMPTION,
- SDLVehicleDataType.VEHICLEDATA_EXTERNTEMP,
- SDLVehicleDataType.VEHICLEDATA_VIN,
- SDLVehicleDataType.VEHICLEDATA_PRNDL,
- SDLVehicleDataType.VEHICLEDATA_TIREPRESSURE,
- SDLVehicleDataType.VEHICLEDATA_ODOMETER,
- SDLVehicleDataType.VEHICLEDATA_BELTSTATUS,
- SDLVehicleDataType.VEHICLEDATA_BODYINFO,
- SDLVehicleDataType.VEHICLEDATA_DEVICESTATUS,
- SDLVehicleDataType.VEHICLEDATA_ECALLINFO,
- SDLVehicleDataType.VEHICLEDATA_AIRBAGSTATUS,
- SDLVehicleDataType.VEHICLEDATA_EMERGENCYEVENT,
- SDLVehicleDataType.VEHICLEDATA_CLUSTERMODESTATUS,
- SDLVehicleDataType.VEHICLEDATA_MYKEY,
- SDLVehicleDataType.VEHICLEDATA_BRAKING,
- SDLVehicleDataType.VEHICLEDATA_WIPERSTATUS,
- SDLVehicleDataType.VEHICLEDATA_HEADLAMPSTATUS,
- SDLVehicleDataType.VEHICLEDATA_BATTVOLTAGE,
- SDLVehicleDataType.VEHICLEDATA_ENGINETORQUE,
- SDLVehicleDataType.VEHICLEDATA_ACCPEDAL,
- SDLVehicleDataType.VEHICLEDATA_STEERINGWHEEL,
- ];
- }
- return SDLVehicleDataType_values;
-}
-
-+ (SDLVehicleDataType *)VEHICLEDATA_GPS {
- if (SDLVehicleDataType_VEHICLEDATA_GPS == nil) {
- SDLVehicleDataType_VEHICLEDATA_GPS = [[SDLVehicleDataType alloc] initWithValue:@"VEHICLEDATA_GPS"];
- }
- return SDLVehicleDataType_VEHICLEDATA_GPS;
-}
-
-+ (SDLVehicleDataType *)VEHICLEDATA_SPEED {
- if (SDLVehicleDataType_VEHICLEDATA_SPEED == nil) {
- SDLVehicleDataType_VEHICLEDATA_SPEED = [[SDLVehicleDataType alloc] initWithValue:@"VEHICLEDATA_SPEED"];
- }
- return SDLVehicleDataType_VEHICLEDATA_SPEED;
-}
-
-+ (SDLVehicleDataType *)VEHICLEDATA_RPM {
- if (SDLVehicleDataType_VEHICLEDATA_RPM == nil) {
- SDLVehicleDataType_VEHICLEDATA_RPM = [[SDLVehicleDataType alloc] initWithValue:@"VEHICLEDATA_RPM"];
- }
- return SDLVehicleDataType_VEHICLEDATA_RPM;
-}
-
-+ (SDLVehicleDataType *)VEHICLEDATA_FUELLEVEL {
- if (SDLVehicleDataType_VEHICLEDATA_FUELLEVEL == nil) {
- SDLVehicleDataType_VEHICLEDATA_FUELLEVEL = [[SDLVehicleDataType alloc] initWithValue:@"VEHICLEDATA_FUELLEVEL"];
- }
- return SDLVehicleDataType_VEHICLEDATA_FUELLEVEL;
-}
-
-+ (SDLVehicleDataType *)VEHICLEDATA_FUELLEVEL_STATE {
- if (SDLVehicleDataType_VEHICLEDATA_FUELLEVEL_STATE == nil) {
- SDLVehicleDataType_VEHICLEDATA_FUELLEVEL_STATE = [[SDLVehicleDataType alloc] initWithValue:@"VEHICLEDATA_FUELLEVEL_STATE"];
- }
- return SDLVehicleDataType_VEHICLEDATA_FUELLEVEL_STATE;
-}
-
-+ (SDLVehicleDataType *)VEHICLEDATA_FUELCONSUMPTION {
- if (SDLVehicleDataType_VEHICLEDATA_FUELCONSUMPTION == nil) {
- SDLVehicleDataType_VEHICLEDATA_FUELCONSUMPTION = [[SDLVehicleDataType alloc] initWithValue:@"VEHICLEDATA_FUELCONSUMPTION"];
- }
- return SDLVehicleDataType_VEHICLEDATA_FUELCONSUMPTION;
-}
-
-+ (SDLVehicleDataType *)VEHICLEDATA_EXTERNTEMP {
- if (SDLVehicleDataType_VEHICLEDATA_EXTERNTEMP == nil) {
- SDLVehicleDataType_VEHICLEDATA_EXTERNTEMP = [[SDLVehicleDataType alloc] initWithValue:@"VEHICLEDATA_EXTERNTEMP"];
- }
- return SDLVehicleDataType_VEHICLEDATA_EXTERNTEMP;
-}
-
-+ (SDLVehicleDataType *)VEHICLEDATA_VIN {
- if (SDLVehicleDataType_VEHICLEDATA_VIN == nil) {
- SDLVehicleDataType_VEHICLEDATA_VIN = [[SDLVehicleDataType alloc] initWithValue:@"VEHICLEDATA_VIN"];
- }
- return SDLVehicleDataType_VEHICLEDATA_VIN;
-}
-
-+ (SDLVehicleDataType *)VEHICLEDATA_PRNDL {
- if (SDLVehicleDataType_VEHICLEDATA_PRNDL == nil) {
- SDLVehicleDataType_VEHICLEDATA_PRNDL = [[SDLVehicleDataType alloc] initWithValue:@"VEHICLEDATA_PRNDL"];
- }
- return SDLVehicleDataType_VEHICLEDATA_PRNDL;
-}
-
-+ (SDLVehicleDataType *)VEHICLEDATA_TIREPRESSURE {
- if (SDLVehicleDataType_VEHICLEDATA_TIREPRESSURE == nil) {
- SDLVehicleDataType_VEHICLEDATA_TIREPRESSURE = [[SDLVehicleDataType alloc] initWithValue:@"VEHICLEDATA_TIREPRESSURE"];
- }
- return SDLVehicleDataType_VEHICLEDATA_TIREPRESSURE;
-}
-
-+ (SDLVehicleDataType *)VEHICLEDATA_ODOMETER {
- if (SDLVehicleDataType_VEHICLEDATA_ODOMETER == nil) {
- SDLVehicleDataType_VEHICLEDATA_ODOMETER = [[SDLVehicleDataType alloc] initWithValue:@"VEHICLEDATA_ODOMETER"];
- }
- return SDLVehicleDataType_VEHICLEDATA_ODOMETER;
-}
-
-+ (SDLVehicleDataType *)VEHICLEDATA_BELTSTATUS {
- if (SDLVehicleDataType_VEHICLEDATA_BELTSTATUS == nil) {
- SDLVehicleDataType_VEHICLEDATA_BELTSTATUS = [[SDLVehicleDataType alloc] initWithValue:@"VEHICLEDATA_BELTSTATUS"];
- }
- return SDLVehicleDataType_VEHICLEDATA_BELTSTATUS;
-}
-
-+ (SDLVehicleDataType *)VEHICLEDATA_BODYINFO {
- if (SDLVehicleDataType_VEHICLEDATA_BODYINFO == nil) {
- SDLVehicleDataType_VEHICLEDATA_BODYINFO = [[SDLVehicleDataType alloc] initWithValue:@"VEHICLEDATA_BODYINFO"];
- }
- return SDLVehicleDataType_VEHICLEDATA_BODYINFO;
-}
-
-+ (SDLVehicleDataType *)VEHICLEDATA_DEVICESTATUS {
- if (SDLVehicleDataType_VEHICLEDATA_DEVICESTATUS == nil) {
- SDLVehicleDataType_VEHICLEDATA_DEVICESTATUS = [[SDLVehicleDataType alloc] initWithValue:@"VEHICLEDATA_DEVICESTATUS"];
- }
- return SDLVehicleDataType_VEHICLEDATA_DEVICESTATUS;
-}
-
-+ (SDLVehicleDataType *)VEHICLEDATA_ECALLINFO {
- if (SDLVehicleDataType_VEHICLEDATA_ECALLINFO == nil) {
- SDLVehicleDataType_VEHICLEDATA_ECALLINFO = [[SDLVehicleDataType alloc] initWithValue:@"VEHICLEDATA_ECALLINFO"];
- }
- return SDLVehicleDataType_VEHICLEDATA_ECALLINFO;
-}
-
-+ (SDLVehicleDataType *)VEHICLEDATA_AIRBAGSTATUS {
- if (SDLVehicleDataType_VEHICLEDATA_AIRBAGSTATUS == nil) {
- SDLVehicleDataType_VEHICLEDATA_AIRBAGSTATUS = [[SDLVehicleDataType alloc] initWithValue:@"VEHICLEDATA_AIRBAGSTATUS"];
- }
- return SDLVehicleDataType_VEHICLEDATA_AIRBAGSTATUS;
-}
-
-+ (SDLVehicleDataType *)VEHICLEDATA_EMERGENCYEVENT {
- if (SDLVehicleDataType_VEHICLEDATA_EMERGENCYEVENT == nil) {
- SDLVehicleDataType_VEHICLEDATA_EMERGENCYEVENT = [[SDLVehicleDataType alloc] initWithValue:@"VEHICLEDATA_EMERGENCYEVENT"];
- }
- return SDLVehicleDataType_VEHICLEDATA_EMERGENCYEVENT;
-}
-
-+ (SDLVehicleDataType *)VEHICLEDATA_CLUSTERMODESTATUS {
- if (SDLVehicleDataType_VEHICLEDATA_CLUSTERMODESTATUS == nil) {
- SDLVehicleDataType_VEHICLEDATA_CLUSTERMODESTATUS = [[SDLVehicleDataType alloc] initWithValue:@"VEHICLEDATA_CLUSTERMODESTATUS"];
- }
- return SDLVehicleDataType_VEHICLEDATA_CLUSTERMODESTATUS;
-}
-
-+ (SDLVehicleDataType *)VEHICLEDATA_MYKEY {
- if (SDLVehicleDataType_VEHICLEDATA_MYKEY == nil) {
- SDLVehicleDataType_VEHICLEDATA_MYKEY = [[SDLVehicleDataType alloc] initWithValue:@"VEHICLEDATA_MYKEY"];
- }
- return SDLVehicleDataType_VEHICLEDATA_MYKEY;
-}
-
-+ (SDLVehicleDataType *)VEHICLEDATA_BRAKING {
- if (SDLVehicleDataType_VEHICLEDATA_BRAKING == nil) {
- SDLVehicleDataType_VEHICLEDATA_BRAKING = [[SDLVehicleDataType alloc] initWithValue:@"VEHICLEDATA_BRAKING"];
- }
- return SDLVehicleDataType_VEHICLEDATA_BRAKING;
-}
-
-+ (SDLVehicleDataType *)VEHICLEDATA_WIPERSTATUS {
- if (SDLVehicleDataType_VEHICLEDATA_WIPERSTATUS == nil) {
- SDLVehicleDataType_VEHICLEDATA_WIPERSTATUS = [[SDLVehicleDataType alloc] initWithValue:@"VEHICLEDATA_WIPERSTATUS"];
- }
- return SDLVehicleDataType_VEHICLEDATA_WIPERSTATUS;
-}
-
-+ (SDLVehicleDataType *)VEHICLEDATA_HEADLAMPSTATUS {
- if (SDLVehicleDataType_VEHICLEDATA_HEADLAMPSTATUS == nil) {
- SDLVehicleDataType_VEHICLEDATA_HEADLAMPSTATUS = [[SDLVehicleDataType alloc] initWithValue:@"VEHICLEDATA_HEADLAMPSTATUS"];
- }
- return SDLVehicleDataType_VEHICLEDATA_HEADLAMPSTATUS;
-}
-
-+ (SDLVehicleDataType *)VEHICLEDATA_BATTVOLTAGE {
- if (SDLVehicleDataType_VEHICLEDATA_BATTVOLTAGE == nil) {
- SDLVehicleDataType_VEHICLEDATA_BATTVOLTAGE = [[SDLVehicleDataType alloc] initWithValue:@"VEHICLEDATA_BATTVOLTAGE"];
- }
- return SDLVehicleDataType_VEHICLEDATA_BATTVOLTAGE;
-}
-
-+ (SDLVehicleDataType *)VEHICLEDATA_ENGINETORQUE {
- if (SDLVehicleDataType_VEHICLEDATA_ENGINETORQUE == nil) {
- SDLVehicleDataType_VEHICLEDATA_ENGINETORQUE = [[SDLVehicleDataType alloc] initWithValue:@"VEHICLEDATA_ENGINETORQUE"];
- }
- return SDLVehicleDataType_VEHICLEDATA_ENGINETORQUE;
-}
-
-+ (SDLVehicleDataType *)VEHICLEDATA_ACCPEDAL {
- if (SDLVehicleDataType_VEHICLEDATA_ACCPEDAL == nil) {
- SDLVehicleDataType_VEHICLEDATA_ACCPEDAL = [[SDLVehicleDataType alloc] initWithValue:@"VEHICLEDATA_ACCPEDAL"];
- }
- return SDLVehicleDataType_VEHICLEDATA_ACCPEDAL;
-}
-
-+ (SDLVehicleDataType *)VEHICLEDATA_STEERINGWHEEL {
- if (SDLVehicleDataType_VEHICLEDATA_STEERINGWHEEL == nil) {
- SDLVehicleDataType_VEHICLEDATA_STEERINGWHEEL = [[SDLVehicleDataType alloc] initWithValue:@"VEHICLEDATA_STEERINGWHEEL"];
- }
- return SDLVehicleDataType_VEHICLEDATA_STEERINGWHEEL;
-}
-
-@end
+SDLVehicleDataType const SDLVehicleDataTypeGps = @"VEHICLEDATA_GPS";
+SDLVehicleDataType const SDLVehicleDataTypeSpeed = @"VEHICLEDATA_SPEED";
+SDLVehicleDataType const SDLVehicleDataTypeRpm = @"VEHICLEDATA_RPM";
+SDLVehicleDataType const SDLVehicleDataTypeFuelLevel = @"VEHICLEDATA_FUELLEVEL";
+SDLVehicleDataType const SDLVehicleDataTypeFuelLevelState = @"VEHICLEDATA_FUELLEVEL_STATE";
+SDLVehicleDataType const SDLVehicleDataTypeFuelConsumption = @"VEHICLEDATA_FUELCONSUMPTION";
+SDLVehicleDataType const SDLVehicleDataTypeExternalTemp = @"VEHICLEDATA_EXTERNTEMP";
+SDLVehicleDataType const SDLVehicleDataTypeVin = @"VEHICLEDATA_VIN";
+SDLVehicleDataType const SDLVehicleDataTypePrndl = @"VEHICLEDATA_PRNDL";
+SDLVehicleDataType const SDLVehicleDataTypeTirePressure = @"VEHICLEDATA_TIREPRESSURE";
+SDLVehicleDataType const SDLVehicleDataTypeOdometer = @"VEHICLEDATA_ODOMETER";
+SDLVehicleDataType const SDLVehicleDataTypeBeltStatus = @"VEHICLEDATA_BELTSTATUS";
+SDLVehicleDataType const SDLVehicleDataTypeBodyInfo = @"VEHICLEDATA_BODYINFO";
+SDLVehicleDataType const SDLVehicleDataTypeDeviceStatus = @"VEHICLEDATA_DEVICESTATUS";
+SDLVehicleDataType const SDLVehicleDataTypeEcallInfo = @"VEHICLEDATA_ECALLINFO";
+SDLVehicleDataType const SDLVehicleDataTypeAirbagStatus = @"VEHICLEDATA_AIRBAGSTATUS";
+SDLVehicleDataType const SDLVehicleDataTypeEmergencyEvent = @"VEHICLEDATA_EMERGENCYEVENT";
+SDLVehicleDataType const SDLVehicleDataTypeClusterModeStatus = @"VEHICLEDATA_CLUSTERMODESTATUS";
+SDLVehicleDataType const SDLVehicleDataTypeMyKey = @"VEHICLEDATA_MYKEY";
+SDLVehicleDataType const SDLVehicleDataTypeBraking = @"VEHICLEDATA_BRAKING";
+SDLVehicleDataType const SDLVehicleDataTypeWiperStatus = @"VEHICLEDATA_WIPERSTATUS";
+SDLVehicleDataType const SDLVehicleDataTypeHeadlampstatus = @"VEHICLEDATA_HEADLAMPSTATUS";
+SDLVehicleDataType const SDLVehicleDataTypeBatteryVoltage = @"VEHICLEDATA_BATTVOLTAGE";
+SDLVehicleDataType const SDLVehicleDataTypeEngineTorque = @"VEHICLEDATA_ENGINETORQUE";
+SDLVehicleDataType const SDLVehicleDataTypeAccelerationPedal = @"VEHICLEDATA_ACCPEDAL";
+SDLVehicleDataType const SDLVehicleDataTypeSteeringWheel = @"VEHICLEDATA_STEERINGWHEEL";
diff --git a/SmartDeviceLink/SDLVrCapabilities.h b/SmartDeviceLink/SDLVrCapabilities.h
index 0698d272f..ec479ccbc 100644
--- a/SmartDeviceLink/SDLVrCapabilities.h
+++ b/SmartDeviceLink/SDLVrCapabilities.h
@@ -9,26 +9,9 @@
*
* @since SDL 1.0
*/
-@interface SDLVRCapabilities : SDLEnum {
-}
-
-/**
- * Convert String to SDLVRCapabilities
- * @param value The value of the string to get an object for
- * @return SDLVRCapabilities
- */
-+ (SDLVRCapabilities *)valueOf:(NSString *)value;
-
-/**
- * @abstract Store the enumeration of all possible SDLVRCapabilities
- * @return an array that store all possible SDLVRCapabilities
- */
-+ (NSArray *)values;
+typedef SDLEnum SDLVRCapabilities NS_EXTENSIBLE_STRING_ENUM;
/**
* @abstract The SDL platform is capable of recognizing spoken text in the current language.
- * @return an SDLVRCapabilities instance pointer with value of *TEXT*
*/
-+ (SDLVRCapabilities *)TEXT;
-
-@end
+extern SDLVRCapabilities const SDLVRCapabilitiesText;
diff --git a/SmartDeviceLink/SDLVrCapabilities.m b/SmartDeviceLink/SDLVrCapabilities.m
index 72c8c39d2..dd769063d 100644
--- a/SmartDeviceLink/SDLVrCapabilities.m
+++ b/SmartDeviceLink/SDLVrCapabilities.m
@@ -4,39 +4,39 @@
#import "SDLVRCapabilities.h"
-SDLVRCapabilities *SDLVRCapabilities_TEXT = nil;
+SDLVRCapabilities const SDLVRCapabilitiesText = @"TEXT";
-NSArray *SDLVRCapabilities_values = nil;
-
-@implementation SDLVRCapabilities
-
-+ (SDLVRCapabilities *)valueOf:(NSString *)value {
- for (SDLVRCapabilities *item in SDLVRCapabilities.values) {
- //NOTE: This was added for Sync Module Compatability, V1 module resturns "Text" and a
- // Gen 1.1 module returns "TEXT", the new if statement makes a case insensitive
- // check instead to accept both
- //if ([item.value isEqualToString:value]) {
- if (item.value && [item.value caseInsensitiveCompare:value] == NSOrderedSame) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLVRCapabilities_values == nil) {
- SDLVRCapabilities_values = @[
- SDLVRCapabilities.TEXT,
- ];
- }
- return SDLVRCapabilities_values;
-}
-
-+ (SDLVRCapabilities *)TEXT {
- if (SDLVRCapabilities_TEXT == nil) {
- SDLVRCapabilities_TEXT = [[SDLVRCapabilities alloc] initWithValue:@"TEXT"];
- }
- return SDLVRCapabilities_TEXT;
-}
-
-@end
+//NSArray *SDLVRCapabilities_values = nil;
+//
+//@implementation SDLVRCapabilities
+//
+//+ (SDLVRCapabilities *)valueOf:(NSString *)value {
+// for (SDLVRCapabilities *item in SDLVRCapabilities.values) {
+// //NOTE: This was added for Sync Module Compatability, V1 module resturns "Text" and a
+// // Gen 1.1 module returns "TEXT", the new if statement makes a case insensitive
+// // check instead to accept both
+// //if ([item.value isEqualToString:value]) {
+// if (item.value && [item.value caseInsensitiveCompare:value] == NSOrderedSame) {
+// return item;
+// }
+// }
+// return nil;
+//}
+//
+//+ (NSArray *)values {
+// if (SDLVRCapabilities_values == nil) {
+// SDLVRCapabilities_values = @[
+// SDLVRCapabilities.TEXT,
+// ];
+// }
+// return SDLVRCapabilities_values;
+//}
+//
+//+ (SDLVRCapabilities *)TEXT {
+// if (SDLVRCapabilities_TEXT == nil) {
+// SDLVRCapabilities_TEXT = [[SDLVRCapabilities alloc] initWithValue:@"TEXT"];
+// }
+// return SDLVRCapabilities_TEXT;
+//}
+//
+//@end
diff --git a/SmartDeviceLink/SDLWarningLightStatus.h b/SmartDeviceLink/SDLWarningLightStatus.h
index 1176d5371..05f41bed7 100644
--- a/SmartDeviceLink/SDLWarningLightStatus.h
+++ b/SmartDeviceLink/SDLWarningLightStatus.h
@@ -9,44 +9,24 @@
*
* @since SDL 2.0
*/
-@interface SDLWarningLightStatus : SDLEnum {
-}
-
-/**
- * Convert String to SDLWarningLightStatus
- * @param value The value of the string to get an object for
- * @return SDLWarningLightStatus
- */
-+ (SDLWarningLightStatus *)valueOf:(NSString *)value;
-
-/**
- * @abstract Store the enumeration of all possible SDLWarningLightStatus
- * @return an array that store all possible SDLWarningLightStatus
- */
-+ (NSArray *)values;
+typedef SDLEnum SDLWarningLightStatus NS_EXTENSIBLE_STRING_ENUM;
/**
* @abstract Warninglight Off
- * @return SDLWarningLightStatus instance with value of *OFF*
*/
-+ (SDLWarningLightStatus *)OFF;
+extern SDLWarningLightStatus const SDLWarningLightStatusOff;
/**
* @abstract Warninglight On
- * @return SDLWarningLightStatus instance with value of *ON*
*/
-+ (SDLWarningLightStatus *)ON;
+extern SDLWarningLightStatus const SDLWarningLightStatusOn;
/**
* @abstract Warninglight is flashing
- * @return SDLWarningLightStatus instance with value of *FLASH*
*/
-+ (SDLWarningLightStatus *)FLASH;
+extern SDLWarningLightStatus const SDLWarningLightStatusFlash;
/**
* @abstract Not used
- * @return SDLWarningLightStatus instance with value of *NOT_USED*
*/
-+ (SDLWarningLightStatus *)NOT_USED;
-
-@end
+extern SDLWarningLightStatus const SDLWarningLightStatusNotUsed;
diff --git a/SmartDeviceLink/SDLWarningLightStatus.m b/SmartDeviceLink/SDLWarningLightStatus.m
index c9d47a407..6547275b3 100644
--- a/SmartDeviceLink/SDLWarningLightStatus.m
+++ b/SmartDeviceLink/SDLWarningLightStatus.m
@@ -4,62 +4,7 @@
#import "SDLWarningLightStatus.h"
-SDLWarningLightStatus *SDLWarningLightStatus_OFF = nil;
-SDLWarningLightStatus *SDLWarningLightStatus_ON = nil;
-SDLWarningLightStatus *SDLWarningLightStatus_FLASH = nil;
-SDLWarningLightStatus *SDLWarningLightStatus_NOT_USED = nil;
-
-NSArray *SDLWarningLightStatus_values = nil;
-
-@implementation SDLWarningLightStatus
-
-+ (SDLWarningLightStatus *)valueOf:(NSString *)value {
- for (SDLWarningLightStatus *item in SDLWarningLightStatus.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLWarningLightStatus_values == nil) {
- SDLWarningLightStatus_values = @[
- SDLWarningLightStatus.OFF,
- SDLWarningLightStatus.ON,
- SDLWarningLightStatus.FLASH,
- SDLWarningLightStatus.NOT_USED,
- ];
- }
- return SDLWarningLightStatus_values;
-}
-
-+ (SDLWarningLightStatus *)OFF {
- if (SDLWarningLightStatus_OFF == nil) {
- SDLWarningLightStatus_OFF = [[SDLWarningLightStatus alloc] initWithValue:@"OFF"];
- }
- return SDLWarningLightStatus_OFF;
-}
-
-+ (SDLWarningLightStatus *)ON {
- if (SDLWarningLightStatus_ON == nil) {
- SDLWarningLightStatus_ON = [[SDLWarningLightStatus alloc] initWithValue:@"ON"];
- }
- return SDLWarningLightStatus_ON;
-}
-
-+ (SDLWarningLightStatus *)FLASH {
- if (SDLWarningLightStatus_FLASH == nil) {
- SDLWarningLightStatus_FLASH = [[SDLWarningLightStatus alloc] initWithValue:@"FLASH"];
- }
- return SDLWarningLightStatus_FLASH;
-}
-
-+ (SDLWarningLightStatus *)NOT_USED {
- if (SDLWarningLightStatus_NOT_USED == nil) {
- SDLWarningLightStatus_NOT_USED = [[SDLWarningLightStatus alloc] initWithValue:@"NOT_USED"];
- }
- return SDLWarningLightStatus_NOT_USED;
-}
-
-@end
+SDLWarningLightStatus const SDLWarningLightStatusOff = @"OFF";
+SDLWarningLightStatus const SDLWarningLightStatusOn = @"ON";
+SDLWarningLightStatus const SDLWarningLightStatusFlash = @"FLASH";
+SDLWarningLightStatus const SDLWarningLightStatusNotUsed = @"NOT_USED";
diff --git a/SmartDeviceLink/SDLWiperStatus.h b/SmartDeviceLink/SDLWiperStatus.h
index 51a7a1f5d..282e06b1a 100644
--- a/SmartDeviceLink/SDLWiperStatus.h
+++ b/SmartDeviceLink/SDLWiperStatus.h
@@ -7,95 +7,79 @@
/**
* Wiper Status
*/
-@interface SDLWiperStatus : SDLEnum {
-}
-
-/**
- * Convert String to SDLWiperStatus
- * @param value The value of the string to get an object for
- * @return SDLWiperStatus
- */
-+ (SDLWiperStatus *)valueOf:(NSString *)value;
-
-/**
- * @abstract Store the enumeration of all possible SDLWiperStatus
- * @return An array that store all possible SDLWiperStatus
- */
-+ (NSArray *)values;
+typedef SDLEnum SDLWiperStatus NS_EXTENSIBLE_STRING_ENUM;
/**
* @abstract SDLWiperStatus: *OFF*
*/
-+ (SDLWiperStatus *)OFF;
+extern SDLWiperStatus const SDLWiperStatusOff;
/**
* @abstract SDLWiperStatus: *AUTO_OFF*
*/
-+ (SDLWiperStatus *)AUTO_OFF;
+extern SDLWiperStatus const SDLWiperStatusAutoOff;
/**
* @abstract SDLWiperStatus: *OFF_MOVING*
*/
-+ (SDLWiperStatus *)OFF_MOVING;
+extern SDLWiperStatus const SDLWiperStatusOffMoving;
/**
* @abstract SDLWiperStatus: *MAN_INT_OFF*
*/
-+ (SDLWiperStatus *)MAN_INT_OFF;
+extern SDLWiperStatus const SDLWiperStatusManIntOff;
/**
* @abstract SDLWiperStatus: *MAN_INT_ON*
*/
-+ (SDLWiperStatus *)MAN_INT_ON;
+extern SDLWiperStatus const SDLWiperStatusManIntOn;
/**
* @abstract SDLWiperStatus: *MAN_LOW*
*/
-+ (SDLWiperStatus *)MAN_LOW;
+extern SDLWiperStatus const SDLWiperStatusManLow;
/**
* @abstract SDLWiperStatus: *MAN_HIGH*
*/
-+ (SDLWiperStatus *)MAN_HIGH;
+extern SDLWiperStatus const SDLWiperStatusManHigh;
/**
* @abstract SDLWiperStatus: *MAN_FLICK*
*/
-+ (SDLWiperStatus *)MAN_FLICK;
+extern SDLWiperStatus const SDLWiperStatusManFlick;
/**
* @abstract SDLWiperStatus: *WASH*
*/
-+ (SDLWiperStatus *)WASH;
+extern SDLWiperStatus const SDLWiperStatusWash;
/**
* @abstract SDLWiperStatus: *AUTO_LOW*
*/
-+ (SDLWiperStatus *)AUTO_LOW;
+extern SDLWiperStatus const SDLWiperStatusAutoLow;
/**
* @abstract SDLWiperStatus: *AUTO_HIGH*
*/
-+ (SDLWiperStatus *)AUTO_HIGH;
+extern SDLWiperStatus const SDLWiperStatusAutoHigh;
/**
* @abstract SDLWiperStatus: *COURTESYWIPE*
*/
-+ (SDLWiperStatus *)COURTESYWIPE;
+extern SDLWiperStatus const SDLWiperStatusCourtesyWipe;
/**
* @abstract SDLWiperStatus: *AUTO_ADJUST*
*/
-+ (SDLWiperStatus *)AUTO_ADJUST;
+extern SDLWiperStatus const SDLWiperStatusAutoAdjust;
/**
* @abstract SDLWiperStatus: *STALLED*
*/
-+ (SDLWiperStatus *)STALLED;
+extern SDLWiperStatus const SDLWiperStatusStalled;
/**
* @abstract SDLWiperStatus: *NO_DATA_EXISTS*
*/
-+ (SDLWiperStatus *)NO_DATA_EXISTS;
-
-@end
+extern SDLWiperStatus const SDLWiperStatusNoDataExists;
diff --git a/SmartDeviceLink/SDLWiperStatus.m b/SmartDeviceLink/SDLWiperStatus.m
index d56749a9f..ce1fd2388 100644
--- a/SmartDeviceLink/SDLWiperStatus.m
+++ b/SmartDeviceLink/SDLWiperStatus.m
@@ -4,161 +4,18 @@
#import "SDLWiperStatus.h"
-SDLWiperStatus *SDLWiperStatus_OFF = nil;
-SDLWiperStatus *SDLWiperStatus_AUTO_OFF = nil;
-SDLWiperStatus *SDLWiperStatus_OFF_MOVING = nil;
-SDLWiperStatus *SDLWiperStatus_MAN_INT_OFF = nil;
-SDLWiperStatus *SDLWiperStatus_MAN_INT_ON = nil;
-SDLWiperStatus *SDLWiperStatus_MAN_LOW = nil;
-SDLWiperStatus *SDLWiperStatus_MAN_HIGH = nil;
-SDLWiperStatus *SDLWiperStatus_MAN_FLICK = nil;
-SDLWiperStatus *SDLWiperStatus_WASH = nil;
-SDLWiperStatus *SDLWiperStatus_AUTO_LOW = nil;
-SDLWiperStatus *SDLWiperStatus_AUTO_HIGH = nil;
-SDLWiperStatus *SDLWiperStatus_COURTESYWIPE = nil;
-SDLWiperStatus *SDLWiperStatus_AUTO_ADJUST = nil;
-SDLWiperStatus *SDLWiperStatus_STALLED = nil;
-SDLWiperStatus *SDLWiperStatus_NO_DATA_EXISTS = nil;
-
-NSArray *SDLWiperStatus_values = nil;
-
-@implementation SDLWiperStatus
-
-+ (SDLWiperStatus *)valueOf:(NSString *)value {
- for (SDLWiperStatus *item in SDLWiperStatus.values) {
- if ([item.value isEqualToString:value]) {
- return item;
- }
- }
- return nil;
-}
-
-+ (NSArray *)values {
- if (SDLWiperStatus_values == nil) {
- SDLWiperStatus_values = @[
- SDLWiperStatus.OFF,
- SDLWiperStatus.AUTO_OFF,
- SDLWiperStatus.OFF_MOVING,
- SDLWiperStatus.MAN_INT_OFF,
- SDLWiperStatus.MAN_INT_ON,
- SDLWiperStatus.MAN_LOW,
- SDLWiperStatus.MAN_HIGH,
- SDLWiperStatus.MAN_FLICK,
- SDLWiperStatus.WASH,
- SDLWiperStatus.AUTO_LOW,
- SDLWiperStatus.AUTO_HIGH,
- SDLWiperStatus.COURTESYWIPE,
- SDLWiperStatus.AUTO_ADJUST,
- SDLWiperStatus.STALLED,
- SDLWiperStatus.NO_DATA_EXISTS,
- ];
- }
- return SDLWiperStatus_values;
-}
-
-+ (SDLWiperStatus *)OFF {
- if (SDLWiperStatus_OFF == nil) {
- SDLWiperStatus_OFF = [[SDLWiperStatus alloc] initWithValue:@"OFF"];
- }
- return SDLWiperStatus_OFF;
-}
-
-+ (SDLWiperStatus *)AUTO_OFF {
- if (SDLWiperStatus_AUTO_OFF == nil) {
- SDLWiperStatus_AUTO_OFF = [[SDLWiperStatus alloc] initWithValue:@"AUTO_OFF"];
- }
- return SDLWiperStatus_AUTO_OFF;
-}
-
-+ (SDLWiperStatus *)OFF_MOVING {
- if (SDLWiperStatus_OFF_MOVING == nil) {
- SDLWiperStatus_OFF_MOVING = [[SDLWiperStatus alloc] initWithValue:@"OFF_MOVING"];
- }
- return SDLWiperStatus_OFF_MOVING;
-}
-
-+ (SDLWiperStatus *)MAN_INT_OFF {
- if (SDLWiperStatus_MAN_INT_OFF == nil) {
- SDLWiperStatus_MAN_INT_OFF = [[SDLWiperStatus alloc] initWithValue:@"MAN_INT_OFF"];
- }
- return SDLWiperStatus_MAN_INT_OFF;
-}
-
-+ (SDLWiperStatus *)MAN_INT_ON {
- if (SDLWiperStatus_MAN_INT_ON == nil) {
- SDLWiperStatus_MAN_INT_ON = [[SDLWiperStatus alloc] initWithValue:@"MAN_INT_ON"];
- }
- return SDLWiperStatus_MAN_INT_ON;
-}
-
-+ (SDLWiperStatus *)MAN_LOW {
- if (SDLWiperStatus_MAN_LOW == nil) {
- SDLWiperStatus_MAN_LOW = [[SDLWiperStatus alloc] initWithValue:@"MAN_LOW"];
- }
- return SDLWiperStatus_MAN_LOW;
-}
-
-+ (SDLWiperStatus *)MAN_HIGH {
- if (SDLWiperStatus_MAN_HIGH == nil) {
- SDLWiperStatus_MAN_HIGH = [[SDLWiperStatus alloc] initWithValue:@"MAN_HIGH"];
- }
- return SDLWiperStatus_MAN_HIGH;
-}
-
-+ (SDLWiperStatus *)MAN_FLICK {
- if (SDLWiperStatus_MAN_FLICK == nil) {
- SDLWiperStatus_MAN_FLICK = [[SDLWiperStatus alloc] initWithValue:@"MAN_FLICK"];
- }
- return SDLWiperStatus_MAN_FLICK;
-}
-
-+ (SDLWiperStatus *)WASH {
- if (SDLWiperStatus_WASH == nil) {
- SDLWiperStatus_WASH = [[SDLWiperStatus alloc] initWithValue:@"WASH"];
- }
- return SDLWiperStatus_WASH;
-}
-
-+ (SDLWiperStatus *)AUTO_LOW {
- if (SDLWiperStatus_AUTO_LOW == nil) {
- SDLWiperStatus_AUTO_LOW = [[SDLWiperStatus alloc] initWithValue:@"AUTO_LOW"];
- }
- return SDLWiperStatus_AUTO_LOW;
-}
-
-+ (SDLWiperStatus *)AUTO_HIGH {
- if (SDLWiperStatus_AUTO_HIGH == nil) {
- SDLWiperStatus_AUTO_HIGH = [[SDLWiperStatus alloc] initWithValue:@"AUTO_HIGH"];
- }
- return SDLWiperStatus_AUTO_HIGH;
-}
-
-+ (SDLWiperStatus *)COURTESYWIPE {
- if (SDLWiperStatus_COURTESYWIPE == nil) {
- SDLWiperStatus_COURTESYWIPE = [[SDLWiperStatus alloc] initWithValue:@"COURTESYWIPE"];
- }
- return SDLWiperStatus_COURTESYWIPE;
-}
-
-+ (SDLWiperStatus *)AUTO_ADJUST {
- if (SDLWiperStatus_AUTO_ADJUST == nil) {
- SDLWiperStatus_AUTO_ADJUST = [[SDLWiperStatus alloc] initWithValue:@"AUTO_ADJUST"];
- }
- return SDLWiperStatus_AUTO_ADJUST;
-}
-
-+ (SDLWiperStatus *)STALLED {
- if (SDLWiperStatus_STALLED == nil) {
- SDLWiperStatus_STALLED = [[SDLWiperStatus alloc] initWithValue:@"STALLED"];
- }
- return SDLWiperStatus_STALLED;
-}
-
-+ (SDLWiperStatus *)NO_DATA_EXISTS {
- if (SDLWiperStatus_NO_DATA_EXISTS == nil) {
- SDLWiperStatus_NO_DATA_EXISTS = [[SDLWiperStatus alloc] initWithValue:@"NO_DATA_EXISTS"];
- }
- return SDLWiperStatus_NO_DATA_EXISTS;
-}
-
-@end
+SDLWiperStatus const SDLWiperStatusOff = @"OFF";
+SDLWiperStatus const SDLWiperStatusAutoOff = @"AUTO_OFF";
+SDLWiperStatus const SDLWiperStatusOffMoving = @"OFF_MOVING";
+SDLWiperStatus const SDLWiperStatusManIntOff = @"MAN_INT_OFF";
+SDLWiperStatus const SDLWiperStatusManIntOn = @"MAN_INT_ON";
+SDLWiperStatus const SDLWiperStatusManLow = @"MAN_LOW";
+SDLWiperStatus const SDLWiperStatusManHigh = @"MAN_HIGH";
+SDLWiperStatus const SDLWiperStatusManFlick = @"MAN_FLICK";
+SDLWiperStatus const SDLWiperStatusWash = @"WASH";
+SDLWiperStatus const SDLWiperStatusAutoLow = @"AUTO_LOW";
+SDLWiperStatus const SDLWiperStatusAutoHigh = @"AUTO_HIGH";
+SDLWiperStatus const SDLWiperStatusCourtesyWipe = @"COURTESYWIPE";
+SDLWiperStatus const SDLWiperStatusAutoAdjust = @"AUTO_ADJUST";
+SDLWiperStatus const SDLWiperStatusStalled = @"STALLED";
+SDLWiperStatus const SDLWiperStatusNoDataExists = @"NO_DATA_EXISTS";
diff --git a/SmartDeviceLink_Example/Classes/ProxyManager.m b/SmartDeviceLink_Example/Classes/ProxyManager.m
index 925858356..9769c277c 100644
--- a/SmartDeviceLink_Example/Classes/ProxyManager.m
+++ b/SmartDeviceLink_Example/Classes/ProxyManager.m
@@ -97,7 +97,7 @@ NS_ASSUME_NONNULL_BEGIN
[weakSelf sdlex_updateProxyState:ProxyStateConnected];
}
- if ([weakSelf.sdlManager.hmiLevel isEqualToEnum:[SDLHMILevel FULL]]) {
+ if ([weakSelf.sdlManager.hmiLevel isEqualToString:SDLHMILevelFull]) {
[weakSelf showInitialData];
}
}];
@@ -108,13 +108,13 @@ NS_ASSUME_NONNULL_BEGIN
}
- (void)showInitialData {
- if ((self.initialShowState != SDLHMIInitialShowStateDataAvailable) || ![self.sdlManager.hmiLevel isEqualToEnum:[SDLHMILevel FULL]]) {
+ if ((self.initialShowState != SDLHMIInitialShowStateDataAvailable) || ![self.sdlManager.hmiLevel isEqualToString:SDLHMILevelFull]) {
return;
}
self.initialShowState = SDLHMIInitialShowStateShown;
- SDLShow *initialData = [SDLRPCRequestFactory buildShowWithMainField1:@"SDL" mainField2:@"Test App" alignment:[SDLTextAlignment CENTERED] correlationID:@0];
+ SDLShow *initialData = [SDLRPCRequestFactory buildShowWithMainField1:@"SDL" mainField2:@"Test App" alignment:SDLTextAlignmentCentered correlationID:@0];
SDLSoftButton *pointingSoftButton = [self.class pointingSoftButtonWithManager:self.sdlManager];
initialData.softButtons = [@[pointingSoftButton] mutableCopy];
@@ -127,7 +127,7 @@ NS_ASSUME_NONNULL_BEGIN
config.shortAppName = @"SDL Example";
config.appIcon = appIconArt;
config.voiceRecognitionCommandNames = @[@"S D L Example"];
- config.ttsName = @[[SDLTTSChunkFactory buildTTSChunkForString:config.shortAppName type:[SDLSpeechCapabilities TEXT]]];
+ config.ttsName = @[[SDLTTSChunkFactory buildTTSChunkForString:config.shortAppName type:SDLSpeechCapabilitiesText]];
return config;
}
@@ -182,21 +182,21 @@ NS_ASSUME_NONNULL_BEGIN
+ (SDLSpeak *)appNameSpeak {
SDLSpeak *speak = [[SDLSpeak alloc] init];
- speak.ttsChunks = [NSMutableArray arrayWithObject:[SDLTTSChunkFactory buildTTSChunkForString:@"S D L Example App" type:[SDLSpeechCapabilities TEXT]]];
+ speak.ttsChunks = [NSMutableArray arrayWithObject:[SDLTTSChunkFactory buildTTSChunkForString:@"S D L Example App" type:SDLSpeechCapabilitiesText]];
return speak;
}
+ (SDLSpeak *)goodJobSpeak {
SDLSpeak *speak = [[SDLSpeak alloc] init];
- speak.ttsChunks = [NSMutableArray arrayWithObject:[SDLTTSChunkFactory buildTTSChunkForString:@"Good job" type:[SDLSpeechCapabilities TEXT]]];
+ speak.ttsChunks = [NSMutableArray arrayWithObject:[SDLTTSChunkFactory buildTTSChunkForString:@"Good job" type:SDLSpeechCapabilitiesText]];
return speak;
}
+ (SDLSpeak *)youMissedItSpeak {
SDLSpeak *speak = [[SDLSpeak alloc] init];
- speak.ttsChunks = [NSMutableArray arrayWithObject:[SDLTTSChunkFactory buildTTSChunkForString:@"You missed it" type:[SDLSpeechCapabilities TEXT]]];
+ speak.ttsChunks = [NSMutableArray arrayWithObject:[SDLTTSChunkFactory buildTTSChunkForString:@"You missed it" type:SDLSpeechCapabilitiesText]];
return speak;
}
@@ -219,13 +219,13 @@ NS_ASSUME_NONNULL_BEGIN
+ (void)sendPerformOnlyChoiceInteractionWithManager:(SDLManager *)manager {
SDLPerformInteraction *performOnlyChoiceInteraction = [[SDLPerformInteraction alloc] init];
performOnlyChoiceInteraction.initialText = @"Choose the only one! You have 5 seconds...";
- performOnlyChoiceInteraction.initialPrompt = [NSMutableArray arrayWithObject:[SDLTTSChunkFactory buildTTSChunkForString:@"Choose it" type:[SDLSpeechCapabilities TEXT]]];
- performOnlyChoiceInteraction.interactionMode = [SDLInteractionMode BOTH];
+ performOnlyChoiceInteraction.initialPrompt = [NSMutableArray arrayWithObject:[SDLTTSChunkFactory buildTTSChunkForString:@"Choose it" type:SDLSpeechCapabilitiesText]];
+ performOnlyChoiceInteraction.interactionMode = SDLInteractionModeBoth;
performOnlyChoiceInteraction.interactionChoiceSetIDList = [NSMutableArray arrayWithObject:@0];
- performOnlyChoiceInteraction.helpPrompt = [NSMutableArray arrayWithObject:[SDLTTSChunkFactory buildTTSChunkForString:@"Do it" type:[SDLSpeechCapabilities TEXT]]];
- performOnlyChoiceInteraction.timeoutPrompt = [NSMutableArray arrayWithObject:[SDLTTSChunkFactory buildTTSChunkForString:@"Too late" type:[SDLSpeechCapabilities TEXT]]];
+ performOnlyChoiceInteraction.helpPrompt = [NSMutableArray arrayWithObject:[SDLTTSChunkFactory buildTTSChunkForString:@"Do it" type:SDLSpeechCapabilitiesText]];
+ performOnlyChoiceInteraction.timeoutPrompt = [NSMutableArray arrayWithObject:[SDLTTSChunkFactory buildTTSChunkForString:@"Too late" type:SDLSpeechCapabilitiesText]];
performOnlyChoiceInteraction.timeout = @5000;
- performOnlyChoiceInteraction.interactionLayout = [SDLLayoutMode LIST_ONLY];
+ performOnlyChoiceInteraction.interactionLayout = SDLLayoutModeListOnly;
[manager sendRequest:performOnlyChoiceInteraction withResponseHandler:^(__kindof SDLRPCRequest * _Nullable request, __kindof SDLPerformInteractionResponse * _Nullable response, NSError * _Nullable error) {
if ((response == nil) || (error != nil)) {
@@ -250,10 +250,10 @@ NS_ASSUME_NONNULL_BEGIN
}];
softButton.text = @"Press";
softButton.softButtonID = @100;
- softButton.type = SDLSoftButtonType.BOTH;
+ softButton.type = SDLSoftButtonTypeBoth;
SDLImage* image = [[SDLImage alloc] init];
- image.imageType = SDLImageType.DYNAMIC;
+ image.imageType = SDLImageTypeDynamic;
image.value = PointingSoftButtonArtworkName;
softButton.image = image;
@@ -309,12 +309,12 @@ NS_ASSUME_NONNULL_BEGIN
_state = ProxyStateStopped;
}
-- (void)hmiLevel:(SDLHMILevel *)oldLevel didChangeToLevel:(SDLHMILevel *)newLevel {
+- (void)hmiLevel:(SDLHMILevel)oldLevel didChangeToLevel:(SDLHMILevel)newLevel {
if (self.firstTimeState == SDLHMIFirstStateNone) {
[self prepareRemoteSystem];
}
- if (![newLevel isEqualToEnum:[SDLHMILevel NONE]] && (self.firstTimeState == SDLHMIFirstStateNone)) {
+ if (![newLevel isEqualToString:SDLHMILevelNone] && (self.firstTimeState == SDLHMIFirstStateNone)) {
// This is our first time in a non-NONE state
self.firstTimeState = SDLHMIFirstStateNonNone;
@@ -322,12 +322,12 @@ NS_ASSUME_NONNULL_BEGIN
[self prepareRemoteSystem];
}
- if ([newLevel isEqualToEnum:[SDLHMILevel FULL]] && (self.firstTimeState != SDLHMIFirstStateFull)) {
+ if ([newLevel isEqualToString:SDLHMILevelFull] && (self.firstTimeState != SDLHMIFirstStateFull)) {
// This is our first time in a FULL state
self.firstTimeState = SDLHMIFirstStateFull;
}
- if ([newLevel isEqualToEnum:[SDLHMILevel FULL]]) {
+ if ([newLevel isEqualToString:SDLHMILevelFull]) {
// We're always going to try to show the initial state, because if we've already shown it, it won't be shown, and we need to guard against some possible weird states
[self showInitialData];
}
@@ -335,4 +335,4 @@ NS_ASSUME_NONNULL_BEGIN
@end
-NS_ASSUME_NONNULL_END \ No newline at end of file
+NS_ASSUME_NONNULL_END