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/SDLKeypressMode.m | |
parent | e6e84cc8c23609ab286c64a2c6a3037313f29908 (diff) | |
download | sdl_ios-be7622fe60babba90276101db79a515597a9fea1.tar.gz |
Initial conversion of all enum objects to SDLEnum typedef.
Diffstat (limited to 'SmartDeviceLink/SDLKeypressMode.m')
-rw-r--r-- | SmartDeviceLink/SDLKeypressMode.m | 53 |
1 files changed, 3 insertions, 50 deletions
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"; |