summaryrefslogtreecommitdiff
path: root/SmartDeviceLink/SDLGetInteriorVehicleData.m
blob: efdf2c3b4004b37be42bbb6b9fc8be7c8ad07ff0 (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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
//
//  SDLGetInteriorVehicleData.m
//

#import "SDLGetInteriorVehicleData.h"
#import "SDLNames.h"
#import "NSMutableDictionary+Store.h"

NS_ASSUME_NONNULL_BEGIN

@implementation SDLGetInteriorVehicleData

- (instancetype)init {
    if (self = [super initWithName:SDLNameGetInteriorVehicleData]) {
    }
    return self;
}

- (instancetype)initWithModuleType:(SDLModuleType)moduleType; {
    self = [self init];
    if (!self) {
        return nil;
    }
    
    self.moduleType = moduleType;
    
    return self;
}

- (instancetype)initAndSubscribeToModuleType:(SDLModuleType)moduleType {
    self = [self init];
    if (!self) {
        return nil;
    }

    self.moduleType = moduleType;
    self.subscribe = @(YES);

    return self;
}

- (instancetype)initAndUnsubscribeToModuleType:(SDLModuleType)moduleType {
    self = [self init];
    if (!self) {
        return nil;
    }

    self.moduleType = moduleType;
    self.subscribe = @(NO);

    return self;
}

- (void)setModuleType:(SDLModuleType)moduleType {
    [parameters sdl_setObject:moduleType forName:SDLNameModuleType];
}

- (SDLModuleType)moduleType {
    return [parameters sdl_objectForName:SDLNameModuleType];
}

- (void)setSubscribe:(nullable NSNumber<SDLBool> *)subscribe {
    [parameters sdl_setObject:subscribe forName:SDLNameSubscribe];
}

- (nullable NSNumber<SDLBool> *)subscribe {
    return [parameters sdl_objectForName:SDLNameSubscribe];
}

@end

NS_ASSUME_NONNULL_END