summaryrefslogtreecommitdiff
path: root/SmartDeviceLink/SDLChoice.h
blob: 9abdb5630f5267c42a351571533d120c4ee8f95c (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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
//  SDLChoice.h
//

#import "SDLRPCMessage.h"

@class SDLImage;


/**
 * A choice is an option which a user can select either via the menu or via voice recognition (VR) during an application initiated interaction.
 *
 * Since SmartDeviceLink 1.0
 */
NS_ASSUME_NONNULL_BEGIN

@interface SDLChoice : SDLRPCStruct

- (instancetype)initWithId:(UInt16)choiceId menuName:(NSString *)menuName vrCommands:(nullable NSArray<NSString *> *)vrCommands;

- (instancetype)initWithId:(UInt16)choiceId menuName:(NSString *)menuName vrCommands:(nullable NSArray<NSString *> *)vrCommands image:(nullable SDLImage *)image secondaryText:(nullable NSString *)secondaryText secondaryImage:(nullable SDLImage *)secondaryImage tertiaryText:(nullable NSString *)tertiaryText;

/**
 * The application-scoped identifier that uniquely identifies this choice
 * 
 * Required, Integer 0 - 65535
 */
@property (strong, nonatomic) NSNumber<SDLInt> *choiceID;

/**
 * Text which appears in menu, representing this choice
 *
 * Required, Max string length 500 chars
 */
@property (strong, nonatomic) NSString *menuName;

/**
 * VR synonyms for this choice
 *
 * Optional, Array of Strings, Array length 1 - 100, Max String length 99 chars
 *
 * @discussion, VR commands are optional beginning with SDL Core v.5.0. They are required for previous versions.
 */
@property (nullable, strong, nonatomic) NSArray<NSString *> *vrCommands;

/**
 * The image of the choice
 *
 * Optional
 */
@property (nullable, strong, nonatomic) SDLImage *image;

/**
 * Secondary text to display; e.g. address of POI in a search result entry
 *
 * Optional, Max String length 500 chars
 */
@property (nullable, strong, nonatomic) NSString *secondaryText;

/**
 * Tertiary text to display; e.g. distance to POI for a search result entry
 *
 * Optional, Max String length 500 chars
 */
@property (nullable, strong, nonatomic) NSString *tertiaryText;

/**
 * Secondary image for choice
 *
 * Optional
 */
@property (nullable, strong, nonatomic) SDLImage *secondaryImage;

@end

NS_ASSUME_NONNULL_END