summaryrefslogtreecommitdiff
path: root/SmartDeviceLink/SDLSeatControlCapabilities.m
blob: b9955b03c715597144a75257596a182dd1edd480 (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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
//  SDLSeatControlCapabilities.m
//

#import "SDLSeatControlCapabilities.h"
#import "SDLRPCParameterNames.h"
#import "NSMutableDictionary+Store.h"

NS_ASSUME_NONNULL_BEGIN

@implementation SDLSeatControlCapabilities

- (instancetype)initWithName:(NSString *)moduleName {
    if (self = [super init]) {
        self.moduleName = moduleName;
    }
    return self;
}

- (instancetype)initWithName:(NSString *)moduleName heatingEnabledAvailable:(BOOL)heatingEnabledAvail coolingEnabledAvailable:(BOOL)coolingEnabledAvail heatingLevelAvailable:(BOOL)heatingLevelAvail coolingLevelAvailable:(BOOL)coolingLevelAvail horizontalPositionAvailable:(BOOL)horizontalPositionAvail verticalPositionAvailable:(BOOL)verticalPositionAvail frontVerticalPositionAvailable:(BOOL)frontVerticalPositionAvail backVerticalPositionAvailable:(BOOL)backVerticalPositionAvail backTiltAngleAvailable:(BOOL)backTitlAngleAvail headSupportHorizontalPositionAvailable:(BOOL)headSupportHorizontalPositionAvail headSupportVerticalPositionAvailable:(BOOL)headSupportVerticalPositionAvail massageEnabledAvailable:(BOOL)massageEnabledAvail massageModeAvailable:(BOOL)massageModeAvail massageCushionFirmnessAvailable:(BOOL)massageCushionFirmnessAvail memoryAvailable:(BOOL)memoryAvail {

    self = [super init];
    if (!self) {
        return nil;
    }

    self.moduleName = moduleName;
    self.heatingEnabledAvailable = @(heatingEnabledAvail);
    self.coolingEnabledAvailable = @(coolingEnabledAvail);
    self.heatingLevelAvailable = @(heatingLevelAvail);
    self.coolingLevelAvailable = @(coolingLevelAvail);
    self.horizontalPositionAvailable = @(horizontalPositionAvail);
    self.verticalPositionAvailable = @(verticalPositionAvail);
    self.frontVerticalPositionAvailable = @(frontVerticalPositionAvail);
    self.backVerticalPositionAvailable = @(backVerticalPositionAvail);
    self.backTiltAngleAvailable = @(backTitlAngleAvail);
    self.headSupportVerticalPositionAvailable = @(headSupportVerticalPositionAvail);
    self.headSupportHorizontalPositionAvailable = @(headSupportHorizontalPositionAvail);
    self.massageEnabledAvailable = @(massageEnabledAvail);
    self.massageModeAvailable = @(massageModeAvail);
    self.massageCushionFirmnessAvailable = @(massageCushionFirmnessAvail);
    self.memoryAvailable = @(memoryAvail);

    return self;
}

- (void)setModuleName:(NSString *)moduleName {
    [store sdl_setObject:moduleName forName:SDLRPCParameterNameModuleName];
}

- (NSString *)moduleName {
    NSError *error;
    return [store sdl_objectForName:SDLRPCParameterNameModuleName ofClass:NSString.class error:&error];
}

- (void)setHeatingEnabledAvailable:(nullable NSNumber<SDLBool> *)heatingEnabledAvailable {
    [store sdl_setObject:heatingEnabledAvailable forName:SDLRPCParameterNameHeatingEnabledAvailable];
}

- (nullable NSNumber<SDLBool> *)heatingEnabledAvailable {
    return [store sdl_objectForName:SDLRPCParameterNameHeatingEnabledAvailable ofClass:NSNumber.class];
}

- (void)setCoolingEnabledAvailable:(nullable NSNumber<SDLBool> *)coolingEnabledAvailable {
    [store sdl_setObject:coolingEnabledAvailable forName:SDLRPCParameterNameCoolingEnabledAvailable];

}

- (nullable NSNumber<SDLBool> *)coolingEnabledAvailable {
    return [store sdl_objectForName:SDLRPCParameterNameCoolingEnabledAvailable ofClass:NSNumber.class];

}

- (void)setHeatingLevelAvailable:(nullable NSNumber<SDLBool> *)heatingLevelAvailable {
    [store sdl_setObject:heatingLevelAvailable forName:SDLRPCParameterNameHeatingLevelAvailable];

}

- (nullable NSNumber<SDLBool> *)heatingLevelAvailable {
    return [store sdl_objectForName:SDLRPCParameterNameHeatingLevelAvailable ofClass:NSNumber.class];

}

- (void)setCoolingLevelAvailable:(nullable NSNumber<SDLBool> *)coolingLevelAvailable {
    [store sdl_setObject:coolingLevelAvailable forName:SDLRPCParameterNameCoolingLevelAvailable];

}

- (nullable NSNumber<SDLBool> *)coolingLevelAvailable {
    return [store sdl_objectForName:SDLRPCParameterNameCoolingLevelAvailable ofClass:NSNumber.class];

}

- (void)setHorizontalPositionAvailable:(nullable NSNumber<SDLBool> *)horizontalPositionAvailable {
    [store sdl_setObject:horizontalPositionAvailable forName:SDLRPCParameterNameHorizontalPositionAvailable];

}

- (nullable NSNumber<SDLBool> *)horizontalPositionAvailable {
    return [store sdl_objectForName:SDLRPCParameterNameHorizontalPositionAvailable ofClass:NSNumber.class];

}

- (void)setVerticalPositionAvailable:(nullable NSNumber<SDLBool> *)verticalPositionAvailable {
    [store sdl_setObject:verticalPositionAvailable forName:SDLRPCParameterNameVerticalPositionAvailable];

}

- (nullable NSNumber<SDLBool> *)verticalPositionAvailable {
    return [store sdl_objectForName:SDLRPCParameterNameVerticalPositionAvailable ofClass:NSNumber.class];

}

- (void)setFrontVerticalPositionAvailable:(nullable NSNumber<SDLBool> *)frontVerticalPositionAvailable {
    [store sdl_setObject:frontVerticalPositionAvailable forName:SDLRPCParameterNameFrontVerticalPositionAvailable];

}

- (nullable NSNumber<SDLBool> *)frontVerticalPositionAvailable {
    return [store sdl_objectForName:SDLRPCParameterNameFrontVerticalPositionAvailable ofClass:NSNumber.class];

}

- (void)setBackVerticalPositionAvailable:(nullable NSNumber<SDLBool> *)backVerticalPositionAvailable {
    [store sdl_setObject:backVerticalPositionAvailable forName:SDLRPCParameterNameBackVerticalPositionAvailable];

}

- (nullable NSNumber<SDLBool> *)backVerticalPositionAvailable {
    return [store sdl_objectForName:SDLRPCParameterNameBackVerticalPositionAvailable ofClass:NSNumber.class];

}

- (void)setBackTiltAngleAvailable:(nullable NSNumber<SDLBool> *)backTiltAngleAvailable {
    [store sdl_setObject:backTiltAngleAvailable forName:SDLRPCParameterNameBackTiltAngleAvailable];

}

- (nullable NSNumber<SDLBool> *)backTiltAngleAvailable {
    return [store sdl_objectForName:SDLRPCParameterNameBackTiltAngleAvailable ofClass:NSNumber.class];

}

- (void)setHeadSupportHorizontalPositionAvailable:(nullable NSNumber<SDLBool> *)headSupportHorizontalPositionAvailable {
    [store sdl_setObject:headSupportHorizontalPositionAvailable forName:SDLRPCParameterNameHeadSupportHorizontalPositionAvailable];

}

- (nullable NSNumber<SDLBool> *)headSupportHorizontalPositionAvailable {
    return [store sdl_objectForName:SDLRPCParameterNameHeadSupportHorizontalPositionAvailable ofClass:NSNumber.class];

}

- (void)setHeadSupportVerticalPositionAvailable:(nullable NSNumber<SDLBool> *)headSupportVerticalPositionAvailable {
    [store sdl_setObject:headSupportVerticalPositionAvailable forName:SDLRPCParameterNameHeadSupportVerticalPositionAvailable];

}

- (nullable NSNumber<SDLBool> *)headSupportVerticalPositionAvailable {
    return [store sdl_objectForName:SDLRPCParameterNameHeadSupportVerticalPositionAvailable ofClass:NSNumber.class];

}

- (void)setMassageEnabledAvailable:(nullable NSNumber<SDLBool> *)massageEnabledAvailable {
    [store sdl_setObject:massageEnabledAvailable forName:SDLRPCParameterNameMassageEnabledAvailable];

}

- (nullable NSNumber<SDLBool> *)massageEnabledAvailable {
    return [store sdl_objectForName:SDLRPCParameterNameMassageEnabledAvailable ofClass:NSNumber.class];

}

- (void)setMassageModeAvailable:(nullable NSNumber<SDLBool> *)massageModeAvailable {
    [store sdl_setObject:massageModeAvailable forName:SDLRPCParameterNameMassageModeAvailable];

}

- (nullable NSNumber<SDLBool> *)massageModeAvailable {
    return [store sdl_objectForName:SDLRPCParameterNameMassageModeAvailable ofClass:NSNumber.class];

}

- (void)setMassageCushionFirmnessAvailable:(nullable NSNumber<SDLBool> *)massageCushionFirmnessAvailable {
    [store sdl_setObject:massageCushionFirmnessAvailable forName:SDLRPCParameterNameMassageCushionFirmnessAvailable];

}

- (nullable NSNumber<SDLBool> *)massageCushionFirmnessAvailable {
    return [store sdl_objectForName:SDLRPCParameterNameMassageCushionFirmnessAvailable ofClass:NSNumber.class];

}

- (void)setMemoryAvailable:(nullable NSNumber<SDLBool> *)memoryAvailable {
    [store sdl_setObject:memoryAvailable forName:SDLRPCParameterNameMemoryAvailable];

}

- (nullable NSNumber<SDLBool> *)memoryAvailable {
    return [store sdl_objectForName:SDLRPCParameterNameMemoryAvailable ofClass:NSNumber.class];
}

@end

NS_ASSUME_NONNULL_END