summaryrefslogtreecommitdiff
path: root/SmartDeviceLink/SDLResetGlobalProperties.m
blob: 331f560bd201970ed1eea933ab22f38cb31cde6d (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
//  SDLResetGlobalProperties.m
//


#import "SDLResetGlobalProperties.h"

#import "NSMutableDictionary+Store.h"
#import "SDLGlobalProperty.h"
#import "SDLRPCParameterNames.h"
#import "SDLRPCFunctionNames.h"

NS_ASSUME_NONNULL_BEGIN

@implementation SDLResetGlobalProperties

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

- (instancetype)initWithProperties:(NSArray<SDLGlobalProperty> *)properties {
    self = [self init];
    if (!self) {
        return nil;
    }

    self.properties = [properties mutableCopy];

    return self;
}

- (void)setProperties:(NSArray<SDLGlobalProperty> *)properties {
    [parameters sdl_setObject:properties forName:SDLRPCParameterNameProperties];
}

- (NSArray<SDLGlobalProperty> *)properties {
    NSError *error = nil;
    return [parameters sdl_enumsForName:SDLRPCParameterNameProperties error:&error];
}

@end

NS_ASSUME_NONNULL_END