summaryrefslogtreecommitdiff
path: root/SmartDeviceLink/SDLAppServicesCapabilities.m
blob: a31b5d40089736b40aaed3fd23140e0bce55efab (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
//
//  SDLAppServicesCapabilities.m
//  SmartDeviceLink
//
//  Created by Nicole on 1/30/19.
//  Copyright © 2019 smartdevicelink. All rights reserved.
//

#import "SDLAppServicesCapabilities.h"

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

NS_ASSUME_NONNULL_BEGIN

@implementation SDLAppServicesCapabilities

- (instancetype)initWithAppServices:(nullable NSArray<SDLAppServiceCapability *> *)appServices {
    self = [self init];
    if (!self) {
        return self;
    }

    self.appServices = appServices;

    return self;
}

- (void)setAppServices:(nullable NSArray<SDLAppServiceCapability *> *)appServices {
    [self.store sdl_setObject:appServices forName:SDLRPCParameterNameAppServices];
}

- (nullable NSArray<SDLAppServiceCapability *> *)appServices {
    return [self.store sdl_objectsForName:SDLRPCParameterNameAppServices ofClass:SDLAppServiceCapability.class error:nil];
}

@end

NS_ASSUME_NONNULL_END