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

SDLButtonPress Class Reference

Section Contents

Overview

This RPC allows a remote control type mobile application to simulate a hardware button press event.

@since RPC 4.5

-initWithButtonName:moduleType:

Constructs a newly allocated SDLButtonPress object with the given parameters

Objective-C

- (nonnull instancetype)initWithButtonName:(nonnull SDLButtonName)buttonName
                                moduleType:(nonnull SDLModuleType)moduleType;

Swift

init(buttonName: SDLButtonName, moduleType: SDLModuleType)

Parameters

buttonName

the name of the button

moduleType

the module where the button should be pressed

Return Value

An instance of the SDLButtonPress class.

-initWithButtonName:moduleType:moduleId:

Constructs a newly allocated SDLButtonPress object with the given parameters

Objective-C

- (nonnull instancetype)initWithButtonName:(nonnull SDLButtonName)buttonName
                                moduleType:(nonnull SDLModuleType)moduleType
                                  moduleId:(nullable NSString *)moduleId;

Swift

init(buttonName: SDLButtonName, moduleType: SDLModuleType, moduleId: String?)

Parameters

buttonName

the name of the button

moduleType

the module where the button should be pressed

moduleId

the id of the module

Return Value

An instance of the SDLButtonPress class.

moduleType

The module where the button should be pressed.

Objective-C

@property (readwrite, strong, nonatomic) SDLModuleType _Nonnull moduleType;

Swift

var moduleType: SDLModuleType { get set }

moduleId

Id of a module, published by System Capability.

Optional

Objective-C

@property (readwrite, strong, nonatomic, nullable) NSString *moduleId;

Swift

var moduleId: String? { get set }

buttonName

The name of supported RC climate or radio button.

Objective-C

@property (readwrite, strong, nonatomic) SDLButtonName _Nonnull buttonName;

Swift

var buttonName: SDLButtonName { get set }

buttonPressMode

Indicates whether this is a LONG or SHORT button press event.

Objective-C

@property (readwrite, strong, nonatomic)
    SDLButtonPressMode _Nonnull buttonPressMode;

Swift

var buttonPressMode: SDLButtonPressMode { get set }
View on GitHub.com
Previous Section Next Section