summaryrefslogtreecommitdiff
path: root/SmartDeviceLink/SDLOnButtonEvent.m
diff options
context:
space:
mode:
authorJoel Fischer <joeljfischer@gmail.com>2019-05-14 09:16:12 -0400
committerJoel Fischer <joeljfischer@gmail.com>2019-05-14 09:16:12 -0400
commit0fc61791bce71e76fb8ff0b6b3f2ddfc124bb40e (patch)
tree9bdb62e1ee94fb91d013b69a4b11192a05b19dd4 /SmartDeviceLink/SDLOnButtonEvent.m
parent7b5666be83b6cad4f905285e5a17dbb0572286a3 (diff)
downloadsdl_ios-0fc61791bce71e76fb8ff0b6b3f2ddfc124bb40e.tar.gz
Deprecate RPC superclass initializers
* So that they won’t appear on every RPC initializer in autocomplete and confuse developers
Diffstat (limited to 'SmartDeviceLink/SDLOnButtonEvent.m')
-rw-r--r--SmartDeviceLink/SDLOnButtonEvent.m15
1 files changed, 9 insertions, 6 deletions
diff --git a/SmartDeviceLink/SDLOnButtonEvent.m b/SmartDeviceLink/SDLOnButtonEvent.m
index 61a033e8a..3e9c57cd6 100644
--- a/SmartDeviceLink/SDLOnButtonEvent.m
+++ b/SmartDeviceLink/SDLOnButtonEvent.m
@@ -11,36 +11,39 @@ NS_ASSUME_NONNULL_BEGIN
@implementation SDLOnButtonEvent
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- (instancetype)init {
if (self = [super initWithName:SDLRPCFunctionNameOnButtonEvent]) {
}
return self;
}
+#pragma clang diagnostic pop
- (void)setButtonName:(SDLButtonName)buttonName {
- [parameters sdl_setObject:buttonName forName:SDLRPCParameterNameButtonName];
+ [self.parameters sdl_setObject:buttonName forName:SDLRPCParameterNameButtonName];
}
- (SDLButtonName)buttonName {
NSError *error = nil;
- return [parameters sdl_enumForName:SDLRPCParameterNameButtonName error:&error];
+ return [self.parameters sdl_enumForName:SDLRPCParameterNameButtonName error:&error];
}
- (void)setButtonEventMode:(SDLButtonEventMode)buttonEventMode {
- [parameters sdl_setObject:buttonEventMode forName:SDLRPCParameterNameButtonEventMode];
+ [self.parameters sdl_setObject:buttonEventMode forName:SDLRPCParameterNameButtonEventMode];
}
- (SDLButtonEventMode)buttonEventMode {
NSError *error = nil;
- return [parameters sdl_enumForName:SDLRPCParameterNameButtonEventMode error:&error];
+ return [self.parameters sdl_enumForName:SDLRPCParameterNameButtonEventMode error:&error];
}
- (void)setCustomButtonID:(nullable NSNumber<SDLInt> *)customButtonID {
- [parameters sdl_setObject:customButtonID forName:SDLRPCParameterNameCustomButtonId];
+ [self.parameters sdl_setObject:customButtonID forName:SDLRPCParameterNameCustomButtonId];
}
- (nullable NSNumber<SDLInt> *)customButtonID {
- return [parameters sdl_objectForName:SDLRPCParameterNameCustomButtonId ofClass:NSNumber.class error:nil];
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameCustomButtonId ofClass:NSNumber.class error:nil];
}
@end