summaryrefslogtreecommitdiff
path: root/SmartDeviceLink/SDLSubscribeButton.m
diff options
context:
space:
mode:
Diffstat (limited to 'SmartDeviceLink/SDLSubscribeButton.m')
-rw-r--r--SmartDeviceLink/SDLSubscribeButton.m42
1 files changed, 42 insertions, 0 deletions
diff --git a/SmartDeviceLink/SDLSubscribeButton.m b/SmartDeviceLink/SDLSubscribeButton.m
new file mode 100644
index 000000000..58a28a797
--- /dev/null
+++ b/SmartDeviceLink/SDLSubscribeButton.m
@@ -0,0 +1,42 @@
+// SDLSubscribeButton.m
+//
+
+
+#import "SDLSubscribeButton.h"
+
+#import "SDLButtonName.h"
+#import "SDLNames.h"
+
+
+@implementation SDLSubscribeButton
+
+- (instancetype)init {
+ if (self = [super initWithName:NAMES_SubscribeButton]) {
+ }
+ return self;
+}
+
+- (instancetype)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 == nil || [obj isKindOfClass:SDLButtonName.class]) {
+ return (SDLButtonName *)obj;
+ } else {
+ return [SDLButtonName valueOf:(NSString *)obj];
+ }
+}
+
+@end