summaryrefslogtreecommitdiff
path: root/SmartDeviceLink/SDLSendHapticData.m
blob: 48d5b897af02aa0e3705c9eca6a01f16c00757e9 (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
//
//  SDLSendHapticData.m
//  SmartDeviceLink-iOS
//
//  Created by Nicole on 8/3/17.
//  Copyright © 2017 smartdevicelink. All rights reserved.
//

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

NS_ASSUME_NONNULL_BEGIN

@implementation SDLSendHapticData

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

- (instancetype)initWithHapticSpatialData:(NSArray<SDLSpatialStruct *> *)hapticSpatialData {
    self = [self init];
    if (!self) {
        return nil;
    }

    self.hapticSpatialData = [hapticSpatialData mutableCopy];

    return self;
}

- (void)setHapticSpatialData:(nullable NSArray<SDLSpatialStruct *> *)hapticSpatialData {
    [parameters sdl_setObject:hapticSpatialData forName:SDLNameHapticSpatialData];
}

- (nullable NSArray<SDLSpatialStruct *> *)hapticSpatialData {
    return [parameters sdl_objectForName:SDLNameHapticSpatialData];
}

@end

NS_ASSUME_NONNULL_END