diff options
author | Muller, Alexander (A.) <amulle19@ford.com> | 2016-09-21 16:40:21 -0700 |
---|---|---|
committer | Muller, Alexander (A.) <amulle19@ford.com> | 2016-09-21 16:40:21 -0700 |
commit | dd05e5044ee245e26b132698f860bd534198705b (patch) | |
tree | 65537bfa5844986dc2d3c6c317056362949d330c /SmartDeviceLink/SDLOnButtonPress.m | |
parent | e6e84cc8c23609ab286c64a2c6a3037313f29908 (diff) | |
download | sdl_ios-dd05e5044ee245e26b132698f860bd534198705b.tar.gz |
Replaced all defines with constant strings of the SDLName typedef. Also modified SDLFunctionID to use a static dictionary.
Diffstat (limited to 'SmartDeviceLink/SDLOnButtonPress.m')
-rw-r--r-- | SmartDeviceLink/SDLOnButtonPress.m | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/SmartDeviceLink/SDLOnButtonPress.m b/SmartDeviceLink/SDLOnButtonPress.m index 8926b7951..fe5df171a 100644 --- a/SmartDeviceLink/SDLOnButtonPress.m +++ b/SmartDeviceLink/SDLOnButtonPress.m @@ -5,13 +5,13 @@ #import "SDLButtonName.h" #import "SDLButtonPressMode.h" -#import "SDLNames.h" + @implementation SDLOnButtonPress - (instancetype)init { - if (self = [super initWithName:NAMES_OnButtonPress]) { + if (self = [super initWithName:SDLNameOnButtonPress]) { } return self; } @@ -24,14 +24,14 @@ - (void)setButtonName:(SDLButtonName *)buttonName { if (buttonName != nil) { - [parameters setObject:buttonName forKey:NAMES_buttonName]; + [parameters setObject:buttonName forKey:SDLNameButtonName]; } else { - [parameters removeObjectForKey:NAMES_buttonName]; + [parameters removeObjectForKey:SDLNameButtonName]; } } - (SDLButtonName *)buttonName { - NSObject *obj = [parameters objectForKey:NAMES_buttonName]; + NSObject *obj = [parameters objectForKey:SDLNameButtonName]; if (obj == nil || [obj isKindOfClass:SDLButtonName.class]) { return (SDLButtonName *)obj; } else { @@ -41,14 +41,14 @@ - (void)setButtonPressMode:(SDLButtonPressMode *)buttonPressMode { if (buttonPressMode != nil) { - [parameters setObject:buttonPressMode forKey:NAMES_buttonPressMode]; + [parameters setObject:buttonPressMode forKey:SDLNameButtonPressMode]; } else { - [parameters removeObjectForKey:NAMES_buttonPressMode]; + [parameters removeObjectForKey:SDLNameButtonPressMode]; } } - (SDLButtonPressMode *)buttonPressMode { - NSObject *obj = [parameters objectForKey:NAMES_buttonPressMode]; + NSObject *obj = [parameters objectForKey:SDLNameButtonPressMode]; if (obj == nil || [obj isKindOfClass:SDLButtonPressMode.class]) { return (SDLButtonPressMode *)obj; } else { @@ -58,14 +58,14 @@ - (void)setCustomButtonID:(NSNumber *)customButtonID { if (customButtonID != nil) { - [parameters setObject:customButtonID forKey:NAMES_customButtonID]; + [parameters setObject:customButtonID forKey:SDLNameCustomButtonId]; } else { - [parameters removeObjectForKey:NAMES_customButtonID]; + [parameters removeObjectForKey:SDLNameCustomButtonId]; } } - (NSNumber *)customButtonID { - return [parameters objectForKey:NAMES_customButtonID]; + return [parameters objectForKey:SDLNameCustomButtonId]; } @end |