summaryrefslogtreecommitdiff
path: root/SmartDeviceLink/SDLSoftButton.m
diff options
context:
space:
mode:
Diffstat (limited to 'SmartDeviceLink/SDLSoftButton.m')
-rw-r--r--SmartDeviceLink/SDLSoftButton.m28
1 files changed, 15 insertions, 13 deletions
diff --git a/SmartDeviceLink/SDLSoftButton.m b/SmartDeviceLink/SDLSoftButton.m
index a50bb4bcd..a2b526c23 100644
--- a/SmartDeviceLink/SDLSoftButton.m
+++ b/SmartDeviceLink/SDLSoftButton.m
@@ -5,7 +5,7 @@
#import "NSMutableDictionary+Store.h"
#import "SDLImage.h"
-#import "SDLNames.h"
+#import "SDLRPCParameterNames.h"
NS_ASSUME_NONNULL_BEGIN
@@ -40,51 +40,53 @@ NS_ASSUME_NONNULL_BEGIN
}
- (void)setType:(SDLSoftButtonType)type {
- [store sdl_setObject:type forName:SDLNameType];
+ [store sdl_setObject:type forName:SDLRPCParameterNameType];
}
- (SDLSoftButtonType)type {
- return [store sdl_objectForName:SDLNameType];
+ NSError *error = nil;
+ return [store sdl_enumForName:SDLRPCParameterNameType error:&error];
}
- (void)setText:(nullable NSString *)text {
- [store sdl_setObject:text forName:SDLNameText];
+ [store sdl_setObject:text forName:SDLRPCParameterNameText];
}
- (nullable NSString *)text {
- return [store sdl_objectForName:SDLNameText];
+ return [store sdl_objectForName:SDLRPCParameterNameText ofClass:NSString.class error:nil];
}
- (void)setImage:(nullable SDLImage *)image {
- [store sdl_setObject:image forName:SDLNameImage];
+ [store sdl_setObject:image forName:SDLRPCParameterNameImage];
}
- (nullable SDLImage *)image {
- return [store sdl_objectForName:SDLNameImage ofClass:SDLImage.class];
+ return [store sdl_objectForName:SDLRPCParameterNameImage ofClass:SDLImage.class error:nil];
}
- (void)setIsHighlighted:(nullable NSNumber<SDLBool> *)isHighlighted {
- [store sdl_setObject:isHighlighted forName:SDLNameIsHighlighted];
+ [store sdl_setObject:isHighlighted forName:SDLRPCParameterNameIsHighlighted];
}
- (nullable NSNumber<SDLBool> *)isHighlighted {
- return [store sdl_objectForName:SDLNameIsHighlighted];
+ return [store sdl_objectForName:SDLRPCParameterNameIsHighlighted ofClass:NSNumber.class error:nil];
}
- (void)setSoftButtonID:(NSNumber<SDLInt> *)softButtonID {
- [store sdl_setObject:softButtonID forName:SDLNameSoftButtonId];
+ [store sdl_setObject:softButtonID forName:SDLRPCParameterNameSoftButtonId];
}
- (NSNumber<SDLInt> *)softButtonID {
- return [store sdl_objectForName:SDLNameSoftButtonId];
+ NSError *error = nil;
+ return [store sdl_objectForName:SDLRPCParameterNameSoftButtonId ofClass:NSNumber.class error:&error];
}
- (void)setSystemAction:(nullable SDLSystemAction)systemAction {
- [store sdl_setObject:systemAction forName:SDLNameSystemAction];
+ [store sdl_setObject:systemAction forName:SDLRPCParameterNameSystemAction];
}
- (nullable SDLSystemAction)systemAction {
- return [store sdl_objectForName:SDLNameSystemAction];
+ return [store sdl_enumForName:SDLRPCParameterNameSystemAction error:nil];
}
-(id)copyWithZone:(nullable NSZone *)zone {