summaryrefslogtreecommitdiff
path: root/SmartDeviceLink/SDLGetFileResponse.h
blob: 52a2fb5f4cdb0a112f007fdc8088f1f81da16d4e (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
60
61
//
//  SDLGetFileResponse.h
//  SmartDeviceLink
//
//  Created by Nicole on 2/7/19.
//  Copyright © 2019 smartdevicelink. All rights reserved.
//

#import "SDLRPCResponse.h"

#import "SDLFileType.h"

NS_ASSUME_NONNULL_BEGIN

/// Response to GetFiles
///
/// @since RPC 5.1
@interface SDLGetFileResponse : SDLRPCResponse

/**
 *  Convenience init for all parameters.
 *
 *  @param offset      Optional offset in bytes for resuming partial data chunks
 *  @param length      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
 *  @param fileType    File type that is being sent in response
 *  @param crc         Additional CRC32 checksum to protect data integrity up to 512 Mbits
 *  @return            A SDLGetFileResponse object
 */
- (instancetype)initWithOffset:(UInt32)offset length:(UInt32)length fileType:(nullable SDLFileType)fileType crc:(UInt32)crc;

/**
 *  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;

/**
 *  File type that is being sent in response.
 *
 *  SDLFileType, Optional
 */
@property (nullable, strong, nonatomic) SDLFileType fileType;

/**
 *  Additional CRC32 checksum to protect data integrity up to 512 Mbits.
 *
 *  Integer, Optional, minvalue="0" maxvalue="4294967295"
 */
@property (nullable, strong, nonatomic) NSNumber<SDLUInt> *crc;

@end

NS_ASSUME_NONNULL_END