Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Documentation
Sidebar

SDLRPCMessage Class Reference

Section Contents

Overview

Undocumented

function

Undocumented

Objective-C

NSMutableDictionary<NSString *, id> *function

parameters

Undocumented

Objective-C

NSMutableDictionary<NSString *, id> *parameters

messageType

Undocumented

Objective-C

NSString *messageType

-initWithName:

Convenience init

Objective-C

- (nonnull instancetype)initWithName:(nonnull NSString *)name;

Swift

init(name: String)

Parameters

name

The name of the message

Return Value

A SDLRPCMessage object

-initWithDictionary:

Convenience init

Objective-C

- (nonnull instancetype)initWithDictionary:
    (nonnull NSDictionary<NSString *, id> *)dict;

Swift

init(dictionary dict: [String : Any])

Parameters

dict

A dictionary with the format @{messageType: @{parameters}}

Return Value

A SDLRPCMessage object

-getFunctionName

Returns the function name.

Objective-C

- (nullable NSString *)getFunctionName;

Swift

func getFunctionName() -> String?

Return Value

The function name

-setFunctionName:

Sets the function name.

Objective-C

- (void)setFunctionName:(nullable NSString *)functionName;

Swift

func setFunctionName(_ functionName: String?)

Parameters

functionName

The function name

-getParameters:

Returns the value associated with the provided key. If the key does not exist, null is returned.

Objective-C

- (nullable NSObject *)getParameters:(nonnull NSString *)functionName;

Swift

func getParameters(_ functionName: String) -> NSObject?

Parameters

functionName

The key name

Return Value

The value associated with the function name

-setParameters:value:

Sets a key-value pair using the function name as the key.

Objective-C

- (void)setParameters:(nonnull NSString *)functionName
                value:(nullable NSObject *)value;

Swift

func setParameters(_ functionName: String, value: NSObject?)

Parameters

functionName

The name for the key

value

The value associated with the function name

bulkData

The data in the message

Objective-C

@property (readwrite, strong, nonatomic, nullable) NSData *bulkData;

Swift

var bulkData: Data? { get set }

name

The name of the message

Objective-C

@property (readonly, strong, nonatomic) NSString *_Nonnull name;

Swift

var name: String { get }

messageType

The type of data in the message

Objective-C

@property (readonly, strong, nonatomic) NSString *_Nonnull messageType;

Swift

var messageType: String { get }
View on GitHub.com
Previous Section Next Section