|
1 /* |
|
2 * Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: This header provides the common Name/Value defintions of Name/Value |
|
15 * pairs. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef ACCPOLCOMMONNAMEVALUEPAIRS_H |
|
22 #define ACCPOLCOMMONNAMEVALUEPAIRS_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32std.h> |
|
26 |
|
27 // CONSTANTS |
|
28 |
|
29 // Maximum length for name definitions - don't exceed this or a panic will occur |
|
30 const TInt KSBMaxNameLength ( 45 ); |
|
31 |
|
32 // Maximum length for value definitions - don't exceed this or a panic will occur |
|
33 const TInt KSBMaxValueLength ( 10 ); |
|
34 |
|
35 // Accessory capabilities can be described as name/value pairs. To use accessorys |
|
36 // capabilities from generic identification, the user needs constants. These |
|
37 // constants are referenced with name/value pairs. |
|
38 // Name constants are defined to a certain numerical space. |
|
39 // In this numerical space each of these constats is presented with a term called |
|
40 // "name const literal". E.g. For name KAccAcousticEchoControl name const literal is |
|
41 // "1#1#1". |
|
42 // Accessory capabilities can be described the following values: name, value type, |
|
43 // dynamic type, I/O type, description and bitmask. |
|
44 // Name: Acoustic Echo Control |
|
45 // --------------> Name of the capability |
|
46 // Value Type: TBool |
|
47 // --------------> Type of the value |
|
48 // Dynamic Type: Dynamic/Static |
|
49 // --------------> Indicates if value can change while accessory is connected. |
|
50 // If value is dynamic type the client should registrate for |
|
51 // listening indications for value changes. |
|
52 // I/O Type: From accessory to terminal, input. |
|
53 // --------------> I/O type indicates the direction how the state update is done. |
|
54 // E.g.output indicated that user can use setValueL method. If |
|
55 // accessory updates the value I/O type is input and if it done |
|
56 // by the terminal I/O type is output. |
|
57 // Description: Accessory supports acoustic echo control. If value is true terminal |
|
58 // must disable its own echo control. To indicate if accessory has |
|
59 // internal acoustic echo control. |
|
60 // --------------> Description of the capability. |
|
61 // Bitmask: 00000000000000000000000000000001 |
|
62 // --------------> The bitmask for the capability. |
|
63 // |
|
64 // Format of capability: |
|
65 // ===================== |
|
66 // |
|
67 // 0b 000001 00000 00010 |
|
68 // ------ ----- ----- |
|
69 // | | | |
|
70 // | | |_5 bits for capability. Tells which bit is one (*). |
|
71 // | |_5 bits for namespace, |
|
72 // |_6 bits for capability group. Tells which bit is one (*). |
|
73 // |
|
74 // (*): |
|
75 // 0b00 -> bit number 0 is one -> value is 0b0001=1 |
|
76 // 0b01 -> bit number 1 is one -> value is 0b0010=2 |
|
77 // 0b10 -> bit number 2 is one -> value is 0b0100=4 |
|
78 // 0b11 -> bit number 3 is one -> value is 0b1000=8 |
|
79 // |
|
80 |
|
81 |
|
82 // COMMON AUDIO SB NAME-VALUE PAIRS: |
|
83 |
|
84 // Name: Acoustic Echo Control |
|
85 // Value Type: TBool |
|
86 // Dynamic Type: Dynamic |
|
87 // I/O Type: From accessory to terminal, input. |
|
88 // Description: Accessory supports acoustic echo control. If value is true |
|
89 // terminal must disable its own echo control. To indicate if |
|
90 // accessory has internal acoustic echo control. |
|
91 // Bitmask: 000000 00000 00000 |
|
92 const TUint32 KAccAcousticEchoControl = 0x0000; |
|
93 |
|
94 |
|
95 // Name: Noise reduction. |
|
96 // Value: TBool |
|
97 // Dynamic Type: Dynamic |
|
98 // I/O: From accessory to terminal, input. |
|
99 // Description: To indicate if accessory has internal noise reduction. |
|
100 // If value is true terminal must disable its own noise reduction. |
|
101 // Bitmask: 000000 00000 00001 |
|
102 const TUint32 KAccNoiseReduction = 0x0001; |
|
103 |
|
104 // Name: Stereo audio output |
|
105 // Value: N/A |
|
106 // Dynamic Type: Static |
|
107 // I/O: N/A |
|
108 // Description: To indicate if accessory has stereo audio output. |
|
109 // Bitmask: 000000 00000 00010 |
|
110 const TUint32 KAccStereoAudio = 0x0002; |
|
111 |
|
112 // Name: Mono audio output |
|
113 // Value: N/A |
|
114 // Dynamic Type: Static |
|
115 // I/O: N/A |
|
116 // Description: To indicate if accessory has mono audio output. |
|
117 // Bitmask: 000000 00000 00011 |
|
118 const TUint32 KAccMonoAudio = 0x0003; |
|
119 |
|
120 // Name: Audio in Connector |
|
121 // Value: TBool. |
|
122 // Dynamic Type: Dynamic |
|
123 // I/O: From accessory to terminal, input. |
|
124 // Description: If capability exists it indicates that accessory has connector |
|
125 // enabling audio input from external audio device. If the value |
|
126 // is ETrue it indicates that external audio device is connected. |
|
127 // Bitmask: 000000 00000 00100 |
|
128 const TUint32 KAccAudioInConnector = 0x0004; |
|
129 |
|
130 // Name: External Audio in Activation |
|
131 // Value: TBool |
|
132 // Dynamic Type: Dynamic |
|
133 // I/O: From terminal to accessory, output. |
|
134 // Description: If capability exists it indicates that accessory supports |
|
135 // activating(ETrue)/deactivating(EFalse) the external audio input. |
|
136 // External audio in activation capability requiers that accessory |
|
137 // has audio in connector capability. |
|
138 // Bitmask: 000000 00000 00101 |
|
139 const TUint32 KAccExternalAudioInActivation = 0x0005; |
|
140 |
|
141 // Name: External Audio out Connector |
|
142 // Value: TBool |
|
143 // I/O: From accessory to terminal, input |
|
144 // Dynamic Type: Dynamic |
|
145 // Description: Audio out connector capability indicates that accessory has a |
|
146 // connector enabling audio output to external audio device. Value |
|
147 // indicates if the external audio device is removed(EFalse) or |
|
148 // connected(ETrue). |
|
149 // Bitmask: 000000 00000 00110 |
|
150 const TUint32 KAccAudioOutConnector = 0x0006; |
|
151 |
|
152 // Name: Integrated Audio Output |
|
153 // Value: N/A |
|
154 // I/O: N/A |
|
155 // Dynamic Type: N/A |
|
156 // Description: Indicates that accessory has integrated audio output. |
|
157 // E.g. integrated headset. |
|
158 // Bitmask: 000000 00000 00111 |
|
159 const TUint32 KAccIntegratedAudioOutput = 0x0007; |
|
160 |
|
161 // Name: Integrated Audio Input |
|
162 // Value: N/A |
|
163 // I/O: N/A |
|
164 // Dynamic Type: N/A |
|
165 // Description: Indicates that accessory has integrated audio input. |
|
166 // E.g. To check that accessory has integrated microphone. |
|
167 // Bitmask: 000000 00000 01000 |
|
168 const TUint32 KAccIntegratedAudioInput = 0x0008; |
|
169 |
|
170 // 0x0009 reserved for future use |
|
171 |
|
172 // Name: No DRM output |
|
173 // Value: N/A |
|
174 // Dynamic Type: Static |
|
175 // I/O: From accessory to terminal, input. |
|
176 // Description: indicates that accessory is NOT allowed to handle DRM protected audio output. |
|
177 // Bitmask: 000000 00000 01010 |
|
178 const TUint32 KAccNoDRMOutput = 0x000A; |
|
179 |
|
180 // Name: Audio Output Type |
|
181 // Value: TAccAudioOutPutType |
|
182 // Dynamic Type: Static |
|
183 // I/O: N/A |
|
184 // Description: Audio Output Type definition corresponds to audio output type |
|
185 // definition in MMF. It is used to decide how audio is routed. |
|
186 // Bitmask: 000000 00000 01011 |
|
187 const TUint32 KAccAudioOutputType = 0x000B; |
|
188 |
|
189 enum TAccAudioOutPutType |
|
190 { |
|
191 EAccAudioOutPutTypePrivate = 0, |
|
192 EAccAudioOutPutTypePublic |
|
193 }; |
|
194 |
|
195 // Name: Set Volume Level |
|
196 // Value: KAccSetVolumeLevel bitmask constants are declared in AccPolCommonNameValuePairs.h. |
|
197 // Dynamic Type: Static |
|
198 // I/O: From accessory to terminal, input. |
|
199 // Description: Indicates that accessory supports an interface for setting |
|
200 // the volume level from terminal to accessory. |
|
201 // If a bit is on then volume can be adjusted from the terminal. |
|
202 // If a bit is off then volume can not be adjusted from the terminal. |
|
203 // |
|
204 // This capability can also be used to enable/disable proprietary specific |
|
205 // volume control. In such case this capability can only be used to transfer |
|
206 // proprietary information. |
|
207 // |
|
208 // Following example shows how to set AVRCP remote volume control feature bit on. |
|
209 // Existing values must be read first to be able to set only AVRCP specific value. |
|
210 // |
|
211 // @code |
|
212 // RAccessoryControl accessoryControl; |
|
213 // accessoryControl.CreateSubSession( iAccessoryServer ); |
|
214 // |
|
215 // CAccPolSubblockNameArray* nameArray = CAccPolSubblockNameArray::NewL(); |
|
216 // CleanupStack::PushL( nameArray ); |
|
217 // accessoryControl.GetSubblockNameArrayL( iGenericID, *nameArray ); |
|
218 // |
|
219 // TAccPolNameRecord nameRecord; |
|
220 // nameRecord.SetNameL( KAccSetVolumeLevel ); |
|
221 // TAccValueTypeTInt value; |
|
222 // |
|
223 // if( nameArray->HasName( KAccSetVolumeLevel ) ) |
|
224 // { |
|
225 // accessoryControl.GetValueL( iGenericID, nameRecord, value ); |
|
226 // value.iValue = value.iValue | KAccSetVolumeLevelAVRCP; |
|
227 // accessoryControl.AccessoryValueChangedNotifyL( iGenericID, nameRecord, value ); |
|
228 // } |
|
229 // |
|
230 // CleanupStack::PopAndDestroy( nameArray ); |
|
231 // accessoryControl.CloseSubSession(); |
|
232 // @endcode |
|
233 // Bitmask: 000000 00000 01100 |
|
234 const TUint32 KAccSetVolumeLevel = 0x000C; |
|
235 const TInt KAccSetVolumeLevelHSP = 0x1; //HSP remote volume control feature is supported. |
|
236 const TInt KAccSetVolumeLevelHFP = 0x2; //HFP remote volume control feature is supported. |
|
237 const TInt KAccSetVolumeLevelAVRCP = 0x4; //AVRCP remote volume control feature is supported. |
|
238 |
|
239 // Name: Mute All Audio |
|
240 // Value: TBool |
|
241 // Dynamic Type: Dynamic |
|
242 // I/O: From accessory to terminal, input. |
|
243 // Description: Mute capability indicates that accessory supports muting all audio |
|
244 // outputs (e.g. any speakers). The value indicates that any |
|
245 // accessory audio outputs need to be muted (ETrue)/unmuted (EFalse). |
|
246 // Bitmask: 000000 00000 01101 |
|
247 const TUint32 KAccMuteAllAudio = 0x000D; |
|
248 |
|
249 // Name: Audio Out |
|
250 // Value: TAccAudioOut |
|
251 // Dynamic Type: Static |
|
252 // I/O: N/A |
|
253 // Description: The audio out capability indicates that the accessory supports |
|
254 // audio out signal. |
|
255 // Bitmask: 000000 00000 01110 |
|
256 const TUint32 KAccAudioOut = 0x000E; |
|
257 |
|
258 enum TAccAudioOut |
|
259 { |
|
260 TAccAudioOutLineout = 0 //Line Out |
|
261 }; |
|
262 |
|
263 // Name: Audio Latency |
|
264 // Value: TInt ( value in milliseconds ) |
|
265 // Dynamic Type: Dynamic |
|
266 // I/O: From audio source to terminal, input. |
|
267 // Description: Latency capability indicates that the audio source |
|
268 // provides latency information. |
|
269 // Bitmask: 000000 00000 01111 |
|
270 const TUint32 KAccAudioLatency = 0x000F; |
|
271 |
|
272 // Name: Audio Streams Format |
|
273 // Value Type: Object, inherited CAccPolObjectBase. |
|
274 // Dynamic Type: Dynamic |
|
275 // I/O Type: From accessory to terminal / From terminal to accessory. |
|
276 // Description: Accessory supports to Get/Set audio stream(s) format related parameters |
|
277 // for input and output streams ( e.g. mic and speaker ). |
|
278 // Bitmask: 000000 00000 10000 |
|
279 const TUint32 KAccAudioStreamsFormat = 0x0010; |
|
280 |
|
281 // Name: Audio Units |
|
282 // Value Type: Object, inherited CAccPolObjectBase. |
|
283 // Dynamic Type: static |
|
284 // I/O Type: From accessory to terminal. |
|
285 // Description: Indicates an audio units which are supported by the accessory. |
|
286 // Bitmask: 000000 00000 10001 |
|
287 const TUint32 KAccAudioUnits = 0x0011; |
|
288 |
|
289 // Name: Get/Set Audio Control |
|
290 // Value Type: Object, inherited CAccPolObjectBase. |
|
291 // |
|
292 // Dynamic Type: static |
|
293 // I/O Type: From terminal to accessory. |
|
294 // Description: Gets value(s) of specific Audio Control object(s). |
|
295 // Sets value(s) for specific Audio Control object(s). |
|
296 // Bitmask: 000000 00000 10011 |
|
297 const TUint32 KAccAudioControl = 0x0012; |
|
298 |
|
299 // CAR KIT SB NAME-VALUE PAIRS: |
|
300 |
|
301 |
|
302 // Name: Audio To Privacy Handset |
|
303 // Value: TBool |
|
304 // Dynamic Type: Dynamic |
|
305 // I/O: From terminal to accessory, output. |
|
306 // Description: Audio To Privacy Handset capability indicates that car kit supports |
|
307 // an interface for routing the audio from default audio output to |
|
308 // privacy handset. The name is also used to route audio back to the |
|
309 // default audio output. Control handset audio in Car Handfree |
|
310 // peripherals. Audio is routed to handset when call is active and |
|
311 // handset is removed from it's holder. audio needs to be |
|
312 // activated (ETrue) / deactivated (EFalse). |
|
313 // Bitmask: 000001 00000 00000 |
|
314 const TUint32 KAccAudioToHandset = 0x0400; |
|
315 |
|
316 // Name: Privacy Handset |
|
317 // Value: TBool |
|
318 // Dynamic Type: Dynamic |
|
319 // I/O: From accessory to terminal, input. |
|
320 // Description: Indicate if handset is in the holder(ETrue) or not(EFalse). |
|
321 // Bitmask: 000001 00000 00001 |
|
322 const TUint32 KAccPrivacyHandset = 0x0401; |
|
323 |
|
324 // Name: Car Radio Mute |
|
325 // Value: TBool |
|
326 // I/O: From terminal to accessory, output. |
|
327 // Description: Car Radio Mute, indicates that accessory supports an interface for |
|
328 // muting the peripheral car radio. The value (dynamic) indicates that |
|
329 // Car Radio needs to be muted(ETrue)/ unmuted(EFalse). |
|
330 // Bitmask: 1 00000 00010 |
|
331 const TUint32 KAccCarRadioMute = 0x0402; |
|
332 |
|
333 |
|
334 // CHARGING SB NAME-VALUE PAIRS: |
|
335 |
|
336 |
|
337 // Name: External Power Supply |
|
338 // Value: TBool |
|
339 // I/O: From accessory to terminal, input. |
|
340 // Description: When connected, the power supply of the enhancement is active and |
|
341 // enhancement can work properly. When disconnected, the enhancement |
|
342 // doesn’t have power supply and the enhancement is detected, |
|
343 // but not indicated to the user and not activated, |
|
344 // e.g. required audios are not routed to enhancement |
|
345 // The value (dynamic) indicates that external power supply is |
|
346 // connected (ETrue) / disconnected (EFalse). |
|
347 // Bitmask: 000010 00000 00000 |
|
348 const TUint32 KAccExtPowerSupply = 0x0800; |
|
349 |
|
350 |
|
351 // BLUETOOTH SB NAME-VALUE PAIRS: |
|
352 |
|
353 |
|
354 // Name: Headset Profile (HS), Bluetooth device supports HFP. |
|
355 // Value: N/A |
|
356 // Bitmask: 000011 00000 00000 |
|
357 const TUint32 KAccBTHSP = 0x0C00; |
|
358 |
|
359 // Name: Object Push Profile (OPP), the device supports Object Push Profile. |
|
360 // Value: N/A |
|
361 // Bitmask: 000011 00000 00001 |
|
362 const TUint32 KAccBTOPP = 0x0C01; |
|
363 |
|
364 // Name: Generic Object Exchange Profile (GOEP), The device supports Generic Object |
|
365 // Exchange Profile. |
|
366 // Value: N/A |
|
367 // Bitmask: 000011 00000 00010 |
|
368 const TUint32 KAccBTGOEP = 0x0C02; |
|
369 |
|
370 // Name: File Transfer Profile (FTP), the name indicates that device supports File |
|
371 // Transfer Profile. |
|
372 // Value: N/A |
|
373 // Bitmask: 000011 00000 00011 |
|
374 const TUint32 KAccBTFTP = 0x0C03; |
|
375 |
|
376 // Name: Generic Access Profile (GAP), the name indicates that device supports |
|
377 // Generic Access Profile. |
|
378 // Value: N/A |
|
379 // Bitmask: 000011 00000 00100 |
|
380 const TUint32 KAccBTGAP = 0x0C04; |
|
381 |
|
382 // Name: Serial Port Profile (SPP), the name indicates that device supports Serial |
|
383 // Port Profile. |
|
384 // Value: N/A |
|
385 // Bitmask: 000011 00000 00101 |
|
386 const TUint32 KAccBTSPP = 0x0C05; |
|
387 |
|
388 // Name: Handsfree Profile (HFP), Bluetooth device supports HFP. |
|
389 // Value: N/A |
|
390 // Bitmask: 00011 00000 00110 |
|
391 const TUint32 KAccBTHFP = 0x0C06; |
|
392 |
|
393 // Name: Audio Video Remote Control Profile (AVRCP), the device supports AVRCP. |
|
394 // Value: N/A |
|
395 // Bitmask: 000011 00000 00111 |
|
396 const TUint32 KAccBTAVRCP = 0x0C07; |
|
397 |
|
398 // Name: Generic Audio Video Distribution Profile (GAVDP), the device supports AVRCP. |
|
399 // Value: N/A |
|
400 // Bitmask: 000011 00000 01000 |
|
401 const TUint32 KAccBTGAVDP = 0x0C08; |
|
402 |
|
403 // Name: Advanced Audio Distribution Profile (A2DP), the name indicates that device |
|
404 // supports Advanced Audio Distribution Profile. |
|
405 // Value: N/A |
|
406 // Bitmask: 000011 00000 01001 |
|
407 const TUint32 KAccBTA2DP = 0x0C09; |
|
408 |
|
409 // Name: Human Interface Device Profile (HID), the device supports Human Interface |
|
410 // Device Profile. |
|
411 // Value: N/A |
|
412 // Bitmask: 000011 00000 01010 |
|
413 const TUint32 KAccHID = 0x0C0A; |
|
414 |
|
415 // Name: Personal Area Networking Profile (PAN), the device supports Personal Area |
|
416 // Networking Profile.. |
|
417 // Value: N/A |
|
418 // Bitmask: 000011 00000 01011 |
|
419 const TUint32 KAccBTPAN = 0x0C0B; |
|
420 |
|
421 // Name: SIM Access Profile (SAP), the device supports SIM Access Profile. |
|
422 // Value: N/A |
|
423 // Bitmask: 000011 00000 01100 |
|
424 const TUint32 KAccBTSAP = 0x0C0C; |
|
425 |
|
426 // Name: Basic Imaging Profile (BIP), the device supports this Profile. |
|
427 // Value: N/A |
|
428 // Bitmask: 000011 00000 01101 |
|
429 const TUint32 KAccBTBIP = 0x0C0D; |
|
430 |
|
431 // Name: Basic Printing Profile (BPP), the device supports this Profile. |
|
432 // Value: N/A |
|
433 // Bitmask: 000011 00000 01110 |
|
434 const TUint32 KAccBTBPP = 0x0C0E; |
|
435 |
|
436 // Name: Voice Recognition |
|
437 // Value: N/A |
|
438 // Dynamic Type: Static |
|
439 // I/O: N/A |
|
440 // Description: Indicates that the bluetooth HFP profile supports the voice recognition. |
|
441 // Bitmask: 000011 00000 01111 |
|
442 const TUint32 KAccBTVoiceRecognition = 0x0C0F; |
|
443 |
|
444 // VIDEO OUT SB NAME-VALUE PAIRS: |
|
445 |
|
446 // Name: Video out |
|
447 // Value: TAccVideoOut |
|
448 // Dynamic Type: Static |
|
449 // I/O: N/A. |
|
450 // Description: The Video out capability indicates that the accessory supports video |
|
451 // out signal |
|
452 // Bitmask: 000100 00000 00000 |
|
453 const TUint32 KAccVideoOut = 0x1000; |
|
454 |
|
455 enum TAccVideoOut |
|
456 { |
|
457 EAccVideoOutCVideo = 0, //C-Video |
|
458 EAccVideoOutEHDMI //HDMI |
|
459 }; |
|
460 |
|
461 // HDMI SB NAME-VALUE PAIRS: |
|
462 |
|
463 // Name: Get HDMI attributes. |
|
464 // Value Type: Object, inherited CAccPolObjectBase. |
|
465 // Dynamic Type: dynamic |
|
466 // I/O Type: From accessory to terminal. |
|
467 // Description: Get audio and video attributes of the currently connected |
|
468 // HDMI device. |
|
469 // Bitmask: 000100 00000 00001 |
|
470 const TUint32 KAccVideoHdmiAttributes = 0x1001; |
|
471 |
|
472 // Name: Set HDCP support. |
|
473 // Value Type: TBool |
|
474 // Dynamic Type: dynamic |
|
475 // I/O Type: N/A |
|
476 // Description: Set HDCP support |
|
477 // Bitmask: 000100 00000 00010 |
|
478 const TUint32 KAccVideoHdcpSupport = 0x1002; |
|
479 |
|
480 // Name: Get HDCP support status. |
|
481 // Value Type: TBool |
|
482 // Dynamic Type: dynamic |
|
483 // I/O Type: N/A |
|
484 // Description: Get HDCP support status. When the status changes |
|
485 // a notification is received. |
|
486 // Bitmask: 000100 00000 00011 |
|
487 const TUint32 KAccVideoHdcpSupportStatus = 0x1003; |
|
488 |
|
489 // Name: Get active HDMI video format. |
|
490 // Value Type: Object, inherited CAccPolObjectBase. |
|
491 // Dynamic Type: static |
|
492 // I/O Type: N/A |
|
493 // Description: Get active HDMI video format information. |
|
494 // Bitmask: 000100 00000 00100 |
|
495 const TUint32 KAccVideoFormat = 0x1004; |
|
496 |
|
497 #endif // ACCPOLCOMMONNAMEVALUEPAIRS_H |
|
498 |
|
499 // End of File |