diff options
| author | Muller, Alexander (A.) <amulle19@ford.com> | 2016-09-21 12:13:36 -0700 |
|---|---|---|
| committer | Muller, Alexander (A.) <amulle19@ford.com> | 2016-09-21 12:13:36 -0700 |
| commit | be7622fe60babba90276101db79a515597a9fea1 (patch) | |
| tree | 8bbcc0a3433ae8e42fa2204c9a36712cce0203ca /SmartDeviceLink_Example/Classes | |
| parent | e6e84cc8c23609ab286c64a2c6a3037313f29908 (diff) | |
| download | sdl_ios-be7622fe60babba90276101db79a515597a9fea1.tar.gz | |
Initial conversion of all enum objects to SDLEnum typedef.
Diffstat (limited to 'SmartDeviceLink_Example/Classes')
| -rw-r--r-- | SmartDeviceLink_Example/Classes/ProxyManager.m | 38 |
1 files changed, 19 insertions, 19 deletions
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 |
