diff options
author | Joel Fischer <joeljfischer@gmail.com> | 2019-05-14 09:16:12 -0400 |
---|---|---|
committer | Joel Fischer <joeljfischer@gmail.com> | 2019-05-14 09:16:12 -0400 |
commit | 0fc61791bce71e76fb8ff0b6b3f2ddfc124bb40e (patch) | |
tree | 9bdb62e1ee94fb91d013b69a4b11192a05b19dd4 /SmartDeviceLink/SDLOnButtonEvent.m | |
parent | 7b5666be83b6cad4f905285e5a17dbb0572286a3 (diff) | |
download | sdl_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.m | 15 |
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 |