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
|
//
// SDLGetFile.h
// SmartDeviceLink
//
// Created by Nicole on 2/7/19.
// Copyright © 2019 smartdevicelink. All rights reserved.
//
#import "SDLRPCRequest.h"
#import "SDLFileType.h"
NS_ASSUME_NONNULL_BEGIN
/**
* This request is sent to the module to retrieve a file.
*/
@interface SDLGetFile : SDLRPCRequest
/**
* Convenience init for required parameters.
*
* @param fileName File name that should be retrieved.
* @return A SDLGetFile object
*/
- (instancetype)initWithFileName:(NSString *)fileName;
/**
* Convenience init for sending a small file.
*
* @param fileName File name that should be retrieved.
* @param appServiceId ID of the service that should have uploaded the requested file
* @param fileType Selected file type
* @return A SDLGetFile object
*/
- (instancetype)initWithFileName:(NSString *)fileName appServiceId:(nullable NSString *)appServiceId fileType:(nullable SDLFileType)fileType;
/**
* Convenience init for sending a large file in multiple data chunks.
*
* @param fileName File name that should be retrieved.
* @param appServiceId ID of the service that should have uploaded the requested file
* @param fileType Selected file type
* @param offset Offset in bytes for resuming partial data chunks
* @param length Length in bytes for resuming partial data chunks
* @return A SDLGetFile object
*/
- (instancetype)initWithFileName:(NSString *)fileName appServiceId:(nullable NSString *)appServiceId fileType:(nullable SDLFileType)fileType offset:(UInt32)offset length:(UInt32)length;
/**
* File name that should be retrieved.
*
* String, Required, Max string length 255 chars
*/
@property (strong, nonatomic) NSString *fileName;
/**
* ID of the service that should have uploaded the requested file.
*
* String, Optional
*/
@property (nullable, strong, nonatomic) NSString *appServiceId;
/**
* Selected file type.
*
* SDLFileType, Optional
*/
@property (nullable, strong, nonatomic) SDLFileType fileType;
/**
* Optional offset in bytes for resuming partial data chunks.
*
* Integer, Optional, minvalue="0" maxvalue="2000000000"
*/
@property (nullable, strong, nonatomic) NSNumber<SDLUInt> *offset;
/**
* Optional length in bytes for resuming partial data chunks. If offset is set to 0, then length is the total length of the file to be downloaded.
*
* Integer, Optional, minvalue="0" maxvalue="2000000000"
*/
@property (nullable, strong, nonatomic) NSNumber<SDLUInt> *length;
@end
NS_ASSUME_NONNULL_END
|