summaryrefslogtreecommitdiff
path: root/docs/Classes/SDLChoice.html
blob: 2293a9c8a9216c5486b82aa96b4833197643b5b6 (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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
<h1>SDLChoice Class Reference</h1>

<h3>Section Contents</h3>

<ul>
  <li><a href="#section--initWithId:menuName:vrCommands:">-initWithId:menuName:vrCommands:</a></li>
  <li><a href="#section--initWithId:menuName:vrCommands:image:secondaryText:secondaryImage:tertiaryText:">-initWithId:menuName:vrCommands:image:secondaryText:secondaryImage:tertiaryText:</a></li>
  <li><a href="#section-choiceID">choiceID</a></li>
  <li><a href="#section-menuName">menuName</a></li>
  <li><a href="#section-vrCommands">vrCommands</a></li>
  <li><a href="#section-image">image</a></li>
  <li><a href="#section-secondaryText">secondaryText</a></li>
  <li><a href="#section-tertiaryText">tertiaryText</a></li>
  <li><a href="#section-secondaryImage">secondaryImage</a></li>
</ul>

<h3>Overview</h3>

<p>A choice is an option which a user can select either via the menu or via voice recognition (VR) during an application initiated interaction.
 <p><b> Parameter List</b>
 <table border="1" rules="all">
        <tr>
            <th>Name</th>
            <th>Type</th>
            <th>Description</th>
            <th>SmartDeviceLink Ver. Available</th>
        </tr>
        <tr>
            <td>choiceID</td>
            <td>NSNumber * </td>
            <td>Application-scoped identifier that uniquely identifies this choice.
             <br/>Min: 0
                <br/>Max: 65535
            </td>
            <td>SmartDeviceLink 1.0</td>
        </tr>
        <tr>
            <td>menuName</td>
            <td>NSString * </td>
            <td>Text which appears in menu, representing this choice.
                <br/>Min: 1
                <br/>Max: 100
            </td>
            <td>SmartDeviceLink 1.0</td>
        </tr>
     <tr>
            <td>vrCommands</td>
            <td>NSArray *</td>
            <td>An array of strings to be used as VR synonyms for this choice. If this array is provided, it must have at least one non-empty element</td>
            <td>SmartDeviceLink 1.0</td>
        </tr>
     <tr>
            <td>image</td>
            <td>SDLImage * </td>
            <td>Either a static hex icon value or a binary image file  name identifier (sent by PutFile).</td>
            <td>SmartDeviceLink 2.0</td>
        </tr>
 </table></p>

<p>Since <b>SmartDeviceLink 1.0</b><br></p>


<section class="section task-group-section">
  <h3 id="section--initWithId:menuName:vrCommands:">
      -initWithId:menuName:vrCommands:
  </h3>
  
  <p>Undocumented</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight"><code><span class="k">@interface</span> <span class="nc">SDLChoice</span> <span class="p">:</span> <span class="nc"><a href="../Classes/SDLRPCStruct.html">SDLRPCStruct</a></span></code></pre>

  
  
  
  
  <h3 id="section--initWithId:menuName:vrCommands:image:secondaryText:secondaryImage:tertiaryText:">
      -initWithId:menuName:vrCommands:image:secondaryText:secondaryImage:tertiaryText:
  </h3>
  
  <p>Undocumented</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight"><code><span class="k">@interface</span> <span class="nc">SDLChoice</span> <span class="p">:</span> <span class="nc"><a href="../Classes/SDLRPCStruct.html">SDLRPCStruct</a></span></code></pre>

  
  
  
  
  <h3 id="section-choiceID">
      choiceID
  </h3>
  
  <p>@abstract the application-scoped identifier that uniquely identifies this choice</p>

<p>Required, Integer 0 - 65535</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight"><code><span class="k">@property</span> <span class="p">(</span><span class="n">readwrite</span><span class="p">,</span> <span class="n">strong</span><span class="p">,</span> <span class="n">nonatomic</span><span class="p">)</span> <span class="n">NSNumber</span><span class="o">&lt;</span><span class="n"><a href="../Protocols.html#/c:objc(pl)SDLInt">SDLInt</a></span><span class="o">&gt;</span> <span class="o">*</span><span class="n">_Nonnull</span> <span class="n">choiceID</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight"><code><span class="k">var</span> <span class="nv">choiceID</span><span class="p">:</span> <span class="kt">NSNumber</span> </code></pre>

  
  
  
  <h3 id="section-menuName">
      menuName
  </h3>
  
  <p>@abstract Text which appears in menu, representing this choice</p>

<p>Required, Max string length 500 chars</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight"><code><span class="k">@property</span> <span class="p">(</span><span class="n">readwrite</span><span class="p">,</span> <span class="n">strong</span><span class="p">,</span> <span class="n">nonatomic</span><span class="p">)</span> <span class="n">NSString</span> <span class="o">*</span><span class="n">_Nonnull</span> <span class="n">menuName</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight"><code><span class="k">var</span> <span class="nv">menuName</span><span class="p">:</span> <span class="kt">String</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>

  
  
  
  <h3 id="section-vrCommands">
      vrCommands
  </h3>
  
  <p>@abstract VR synonyms for this choice</p>

<p>Required, Array of Strings, Array length 1 - 100, Max String length 99 chars</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight"><code><span class="k">@property</span> <span class="p">(</span><span class="n">readwrite</span><span class="p">,</span> <span class="n">strong</span><span class="p">,</span> <span class="n">nonatomic</span><span class="p">)</span>
    <span class="n">NSArray</span><span class="o">&lt;</span><span class="n">NSString</span> <span class="o">*&gt;</span> <span class="o">*</span><span class="n">_Nonnull</span> <span class="n">vrCommands</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight"><code><span class="k">var</span> <span class="nv">vrCommands</span><span class="p">:</span> <span class="p">[</span><span class="kt">String</span><span class="p">]</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>

  
  
  
  <h3 id="section-image">
      image
  </h3>
  
  <p>@abstract The image of the choice</p>

<p>Optional</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight"><code><span class="k">@property</span> <span class="p">(</span><span class="n">readwrite</span><span class="p">,</span> <span class="n">strong</span><span class="p">,</span> <span class="n">nonatomic</span><span class="p">,</span> <span class="n">nullable</span><span class="p">)</span> <span class="n"><a href="../Classes/SDLImage.html">SDLImage</a></span> <span class="o">*</span><span class="n">image</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight"><code><span class="k">var</span> <span class="nv">image</span><span class="p">:</span> <span class="kt"><a href="../Classes/SDLImage.html">SDLImage</a></span><span class="p">?</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>

  
  
  
  <h3 id="section-secondaryText">
      secondaryText
  </h3>
  
  <p>@abstract Optional secondary text to display; e.g. address of POI in a search result entry</p>

<p>Optional, Max String length 500 chars</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight"><code><span class="k">@property</span> <span class="p">(</span><span class="n">readwrite</span><span class="p">,</span> <span class="n">strong</span><span class="p">,</span> <span class="n">nonatomic</span><span class="p">,</span> <span class="n">nullable</span><span class="p">)</span> <span class="n">NSString</span> <span class="o">*</span><span class="n">secondaryText</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight"><code><span class="k">var</span> <span class="nv">secondaryText</span><span class="p">:</span> <span class="kt">String</span><span class="p">?</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>

  
  
  
  <h3 id="section-tertiaryText">
      tertiaryText
  </h3>
  
  <p>@abstract Optional tertiary text to display; e.g. distance to POI for a search result entry</p>

<p>Optional, Max String length 500 chars</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight"><code><span class="k">@property</span> <span class="p">(</span><span class="n">readwrite</span><span class="p">,</span> <span class="n">strong</span><span class="p">,</span> <span class="n">nonatomic</span><span class="p">,</span> <span class="n">nullable</span><span class="p">)</span> <span class="n">NSString</span> <span class="o">*</span><span class="n">tertiaryText</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight"><code><span class="k">var</span> <span class="nv">tertiaryText</span><span class="p">:</span> <span class="kt">String</span><span class="p">?</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>

  
  
  
  <h3 id="section-secondaryImage">
      secondaryImage
  </h3>
  
  <p>@abstract Optional secondary image for choice</p>

<p>Optional</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight"><code><span class="k">@property</span> <span class="p">(</span><span class="n">readwrite</span><span class="p">,</span> <span class="n">strong</span><span class="p">,</span> <span class="n">nonatomic</span><span class="p">,</span> <span class="n">nullable</span><span class="p">)</span> <span class="n"><a href="../Classes/SDLImage.html">SDLImage</a></span> <span class="o">*</span><span class="n">secondaryImage</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight"><code><span class="k">var</span> <span class="nv">secondaryImage</span><span class="p">:</span> <span class="kt"><a href="../Classes/SDLImage.html">SDLImage</a></span><span class="p">?</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>

  
  
  
</section>