summaryrefslogtreecommitdiff
path: root/SmartDeviceLink/SDLSystemRequest.h
blob: b029d37c9bff457325f1627d5d903203a42fe9a3 (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
//  SDLSystemRequest.h
//

#import "SDLRPCRequest.h"

#import "SDLRequestType.h"

/*
 *  An asynchronous request from the device; binary data can be included in hybrid part of message for some requests (such as HTTP, Proprietary, or Authentication requests)
 *
 *  @since SmartDeviceLink 3.0
 */

NS_ASSUME_NONNULL_BEGIN

@interface SDLSystemRequest : SDLRPCRequest

/**
 Create a generic system request with a file name

 @param requestType The request type to use
 @param fileName The name of the file to use
 @return The request
 */
- (instancetype)initWithType:(SDLRequestType)requestType fileName:(nullable NSString *)fileName;

/**
 Create an OEM_PROPRIETARY system request with a subtype and file name

 @param proprietaryType The proprietary requestSubType to be used
 @param fileName The name of the file to use
 @return The request
 */
- (instancetype)initWithProprietaryType:(NSString *)proprietaryType fileName:(nullable NSString *)fileName;

/**
 *  The type of system request. Note that Proprietary requests should forward the binary data to the known proprietary module on the system.
 *
 *  Required
 */
@property (strong, nonatomic) SDLRequestType requestType;

/**
 A request subType used when the `requestType` is `OEM_SPECIFIC`.

 Optional, Max length 255
 */
@property (strong, nonatomic, nullable) NSString *requestSubType;

/**
 *  Filename of HTTP data to store in predefined system staging area.
 *
 *  Required if requestType is HTTP. PROPRIETARY requestType should ignore this parameter.
 */
@property (strong, nonatomic, nullable) NSString *fileName;

@end

NS_ASSUME_NONNULL_END