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
|
//
// SDLAppServiceData.h
// SmartDeviceLink
//
// Created by Nicole on 2/1/19.
// Copyright © 2019 smartdevicelink. All rights reserved.
//
#import "SDLRPCRequest.h"
#import "SDLAppServiceType.h"
@class SDLMediaServiceData;
@class SDLNavigationServiceData;
@class SDLWeatherServiceData;
NS_ASSUME_NONNULL_BEGIN
/**
* Contains all the current data of the app service. The serviceType will link to which of the service data objects are included in this object (e.g. if the service type is MEDIA, the mediaServiceData param should be included).
*
* @since RPC 5.1
*/
@interface SDLAppServiceData : SDLRPCStruct
/**
* Convenience init for service type and service id.
*
* @param serviceType The type of service that is to be offered by this app.
* @param serviceId A unique ID tied to this specific service record.
* @return A SDLAppServiceData object
*/
- (instancetype)initWithAppServiceType:(SDLAppServiceType)serviceType serviceId:(NSString *)serviceId NS_DESIGNATED_INITIALIZER;
/**
* Convenience init for media service data.
*
* @param mediaServiceData The media service data
* @param serviceId A unique ID tied to this specific service record.
* @return A SDLAppServiceData object
*/
- (instancetype)initWithMediaServiceData:(SDLMediaServiceData *)mediaServiceData serviceId:(NSString *)serviceId;
/**
* Convenience init for weather service data.
*
* @param weatherServiceData The weather service data
* @param serviceId A unique ID tied to this specific service record.
* @return A SDLAppServiceData object
*/
- (instancetype)initWithWeatherServiceData:(SDLWeatherServiceData *)weatherServiceData serviceId:(NSString *)serviceId;
/**
* Convenience init for navigation service data.
*
* @param navigationServiceData The navigation service data
* @param serviceId A unique ID tied to this specific service record.
* @return A SDLAppServiceData object
*/
- (instancetype)initWithNavigationServiceData:(SDLNavigationServiceData *)navigationServiceData serviceId:(NSString *)serviceId;
/**
* Convenience init for all parameters.
*
* @param serviceType The type of service that is to be offered by this app.
* @param serviceId A unique ID tied to this specific service record.
* @param mediaServiceData The media service data
* @param weatherServiceData The weather service data
* @param navigationServiceData The navigation service data
* @return A SDLAppServiceData object
*/
- (instancetype)initWithAppServiceType:(SDLAppServiceType)serviceType serviceId:(NSString *)serviceId mediaServiceData:(nullable SDLMediaServiceData *)mediaServiceData weatherServiceData:(nullable SDLWeatherServiceData *)weatherServiceData navigationServiceData:(nullable SDLNavigationServiceData *)navigationServiceData;
/**
* The type of service that is to be offered by this app. See `AppServiceType` for known enum equivalent types. Parameter is a string to allow for new service types to be used by apps on older versions of SDL Core.
*
* String, See `SDLAppServiceType`, Required
*/
@property (strong, nonatomic) NSString *serviceType;
/**
* A unique ID tied to this specific service record. The ID is supplied by the module that services publish themselves.
*
* String, Required
*/
@property (strong, nonatomic) NSString *serviceId;
/**
* The media service data.
*
* SDLMediaServiceData, Optional
*/
@property (nullable, strong, nonatomic) SDLMediaServiceData *mediaServiceData;
/**
* The weather service data.
*
* SDLWeatherServiceData, Optional
*/
@property (nullable, strong, nonatomic) SDLWeatherServiceData *weatherServiceData;
/**
* The navigation service data.
*
* SDLNavigationServiceData, Optional
*/
@property (nullable, strong, nonatomic) SDLNavigationServiceData *navigationServiceData;
@end
NS_ASSUME_NONNULL_END
|