blob: b6048249e826922d5ee759fe0f8399f70c5cd134 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
// SDLOnCommand.m
//
#import "SDLOnCommand.h"
#import "NSMutableDictionary+Store.h"
#import "SDLRPCParameterNames.h"
#import "SDLRPCFunctionNames.h"
NS_ASSUME_NONNULL_BEGIN
@implementation SDLOnCommand
- (instancetype)init {
if (self = [super initWithName:SDLRPCFunctionNameOnCommand]) {
}
return self;
}
- (void)setCmdID:(NSNumber<SDLInt> *)cmdID {
[parameters sdl_setObject:cmdID forName:SDLRPCParameterNameCommandId];
}
- (NSNumber<SDLInt> *)cmdID {
NSError *error = nil;
return [parameters sdl_objectForName:SDLRPCParameterNameCommandId ofClass:NSNumber.class error:&error];
}
- (void)setTriggerSource:(SDLTriggerSource)triggerSource {
[parameters sdl_setObject:triggerSource forName:SDLRPCParameterNameTriggerSource];
}
- (SDLTriggerSource)triggerSource {
NSError *error = nil;
return [parameters sdl_enumForName:SDLRPCParameterNameTriggerSource error:&error];
}
@end
NS_ASSUME_NONNULL_END
|