diff options
Diffstat (limited to 'SmartDeviceLink-iOS/SmartDeviceLink/SDLSubscribeButton.m')
-rw-r--r-- | SmartDeviceLink-iOS/SmartDeviceLink/SDLSubscribeButton.m | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSubscribeButton.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSubscribeButton.m new file mode 100644 index 000000000..95e7f26ff --- /dev/null +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSubscribeButton.m @@ -0,0 +1,38 @@ +// SDLSubscribeButton.m +// +// Copyright (c) 2014 Ford Motor Company. All rights reserved. + +#import "SDLSubscribeButton.h" + +#import "SDLNames.h" + +@implementation SDLSubscribeButton + +-(id) init { + if (self = [super initWithName:NAMES_SubscribeButton]) {} + return self; +} + +-(id) initWithDictionary:(NSMutableDictionary*) dict { + if (self = [super initWithDictionary:dict]) {} + return self; +} + +-(void) setButtonName:(SDLButtonName*) buttonName { + if (buttonName != nil) { + [parameters setObject:buttonName forKey:NAMES_buttonName]; + } else { + [parameters removeObjectForKey:NAMES_buttonName]; + } +} + +-(SDLButtonName*) buttonName { + NSObject* obj = [parameters objectForKey:NAMES_buttonName]; + if ([obj isKindOfClass:SDLButtonName.class]) { + return (SDLButtonName*)obj; + } else { + return [SDLButtonName valueOf:(NSString*)obj]; + } +} + +@end |