Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Internet Explorer alert
This browser is not recommended for use with smartdevicelink.com, and may not function properly. Upgrade to a different browser to guarantee support of all features.
close alert
To Top Created with Sketch. To Top
To Bottom Created with Sketch. To Bottom
iOS Documentation
SDLPutFile

SDLPutFile Class Reference

Section Contents

Overview

Used to push a binary data onto the SDL module from a mobile device, such as icons and album art.

Since SmartDeviceLink 2.0

See

SDLDeleteFile, SDLListFiles

-init

Init

Objective-C

- (nonnull instancetype)init;

Swift

init()

Return Value

A SDLPutFile object

-initWithFileName:fileType:

Convenience init for creating a putfile with a name and file format.

Objective-C

- (nonnull instancetype)initWithFileName:(nonnull NSString *)fileName
                                fileType:(nonnull SDLFileType)fileType;

Swift

init(fileName: String, fileType: SDLFileType)

Parameters

fileName

The file’s name

fileType

The file’s format

Return Value

A SDLPutFile object

-initWithFileName:fileType:persistentFile:

Convenience init for creating a putfile with a name, file format, and persistence.

Objective-C

- (nonnull instancetype)initWithFileName:(nonnull NSString *)fileName
                                fileType:(nonnull SDLFileType)fileType
                          persistentFile:(BOOL)persistentFile;

Swift

init(fileName: String, fileType: SDLFileType, persistentFile: Bool)

Parameters

fileName

The file’s name

fileType

The file’s format

persistentFile

Whether or not the image should persist between ignition cycles

Return Value

A SDLPutFile object

-initWithFileName:fileType:persistentFile:systemFile:offset:length:crc:

Convenience init for creating a putfile that is part of a multiple frame payload.

Objective-C

- (nonnull instancetype)initWithFileName:(nonnull NSString *)fileName
                                fileType:(nonnull SDLFileType)fileType
                          persistentFile:(BOOL)persistentFile
                              systemFile:(BOOL)systemFile
                                  offset:(UInt32)offset
                                  length:(UInt32)length
                                     crc:(UInt64)crc;

Swift

init(fileName: String, fileType: SDLFileType, persistentFile: Bool, systemFile: Bool, offset: UInt32, length: UInt32, crc: UInt64)

Parameters

fileName

The file’s name

fileType

The file’s format

persistentFile

Whether or not the image should persist between ignition cycles

systemFile

Whether or not the file is meant to be passed through Core to elsewhere on the system

offset

Offset in bytes for resuming partial data chunks

length

Length in bytes for resuming partial data chunks

crc

Checksum of the bulk data. Used by Core to check data integrity

Return Value

A SDLPutFile object

-initWithFileName:fileType:persistentFile:systemFile:offset:length:bulkData:

Convenience init for creating a putfile that is part of a multiple frame payload. A CRC checksum is calculated for the bulk data.

Objective-C

- (nonnull instancetype)initWithFileName:(nonnull NSString *)fileName
                                fileType:(nonnull SDLFileType)fileType
                          persistentFile:(BOOL)persistentFile
                              systemFile:(BOOL)systemFile
                                  offset:(UInt32)offset
                                  length:(UInt32)length
                                bulkData:(nonnull NSData *)bulkData;

Swift

init(fileName: String, fileType: SDLFileType, persistentFile: Bool, systemFile: Bool, offset: UInt32, length: UInt32, bulkData: Data)

Parameters

fileName

The file’s name

fileType

The file’s format

persistentFile

Whether or not the image should persist between ignition cycles

systemFile

Whether or not the file is meant to be passed through Core to elsewhere on the system

offset

Offset in bytes for resuming partial data chunks

length

Length in bytes for resuming partial data chunks

bulkData

Data being sent in the putfile

Return Value

A SDLPutFile object

sdlFileName

File reference name

Required, max length 255 characters

Objective-C

@property (nonatomic, strong) NSString *_Nonnull sdlFileName;

Swift

var sdlFileName: String { get set }

fileType

A FileType value representing a selected file type

Required

Objective-C

@property (nonatomic, strong) SDLFileType _Nonnull fileType;

Swift

var fileType: SDLFileType { get set }

persistentFile

A value to indicates if the file is meant to persist between sessions / ignition cycles. If set to TRUE, then the system will aim to persist this file through session / cycles. While files with this designation will have priority over others, they are subject to deletion by the system at any time. In the event of automatic deletion by the system, the app will receive a rejection and have to resend the file. If omitted, the value will be set to false.

Boolean, Optional, default = NO

Objective-C

@property (nonatomic, strong, nullable) NSNumber<SDLBool> *persistentFile;

Swift

var persistentFile: (NSNumber & SDLBool)? { get set }

systemFile

Indicates if the file is meant to be passed through core to elsewhere on the system. If set to TRUE, then the system will instead pass the data thru as it arrives to a predetermined area outside of core.

Boolean, Optional, default = NO

Objective-C

@property (nonatomic, strong, nullable) NSNumber<SDLBool> *systemFile;

Swift

var systemFile: (NSNumber & SDLBool)? { get set }

offset

Offset in bytes for resuming partial data chunks.

Integer, Optional, 0 - 100,000,000,000

Objective-C

@property (nonatomic, strong, nullable) NSNumber<SDLUInt> *offset;

Swift

var offset: (NSNumber & SDLUInt)? { get set }

length

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, 0 - 100,000,000,000

Objective-C

@property (nonatomic, strong, nullable) NSNumber<SDLUInt> *length;

Swift

var length: (NSNumber & SDLUInt)? { get set }

crc

Additional CRC32 checksum to protect data integrity up to 512 Mbits.

Integer, Optional, 0 - 4,294,967,295

Objective-C

@property (nonatomic, strong, nullable) NSNumber<SDLUInt> *crc;

Swift

var crc: (NSNumber & SDLUInt)? { get set }
View on GitHub.com
Previous Section Next Section