1 /* |
|
2 * Copyright (c) 2010 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 /** |
|
19 @file |
|
20 */ |
|
21 |
|
22 #ifndef __USBMAN_H__ |
|
23 #define __USBMAN_H__ |
|
24 |
|
25 #include <e32std.h> |
|
26 #include <usberrors.h> |
|
27 #include <usbstates.h> |
|
28 #include <usb/usbshared.h> |
|
29 |
|
30 // The propery of a personality is a bitmap, and bit 0 is used to identify |
|
31 // whether a personality is hidden. |
|
32 const TUint32 KUsbPersonalityPropertyHidden = 0x00000001; |
|
33 |
|
34 NONSHARABLE_CLASS(RUsb) : public RSessionBase |
|
35 /** |
|
36 The RUsb class implements the Symbian OS USB Management API RUsb |
|
37 |
|
38 @publishedPartner |
|
39 @released |
|
40 */ |
|
41 { |
|
42 public: |
|
43 |
|
44 // Request types, the interest of which can be cancelled by clients |
|
45 enum TUsbReqType |
|
46 { |
|
47 EStart, |
|
48 EStop, |
|
49 ETryStart, |
|
50 ETryStop |
|
51 }; |
|
52 |
|
53 /** |
|
54 Constructor |
|
55 |
|
56 |
|
57 @since 7.0 |
|
58 |
|
59 @publishedPartner |
|
60 @released |
|
61 */ |
|
62 IMPORT_C RUsb(); |
|
63 |
|
64 /** |
|
65 Destructor |
|
66 |
|
67 |
|
68 @since 7.0 |
|
69 |
|
70 @publishedPartner |
|
71 @released |
|
72 */ |
|
73 IMPORT_C ~RUsb(); |
|
74 |
|
75 /** |
|
76 Extract the version of the server providing the RUsb API |
|
77 |
|
78 |
|
79 @since 7.0 |
|
80 |
|
81 @return Version of the server |
|
82 |
|
83 @publishedPartner |
|
84 @released |
|
85 */ |
|
86 IMPORT_C TVersion Version() const; |
|
87 |
|
88 /** |
|
89 Connect the Handle to the Server |
|
90 Must be called before all other methods except Version() |
|
91 |
|
92 |
|
93 @since 7.0 |
|
94 |
|
95 @return KErrNone if successful, otherwise the error that occurred |
|
96 |
|
97 @publishedPartner |
|
98 @released |
|
99 */ |
|
100 IMPORT_C TInt Connect(); |
|
101 |
|
102 /** |
|
103 Start the device's USB service. Should not be called if the USB services |
|
104 have already been started |
|
105 Note: Asynchonous Version, outcome returned when the status is completed |
|
106 |
|
107 |
|
108 @since 7.0 |
|
109 @param aStatus Status to complete once the start operation has completed |
|
110 @capability NetworkControl |
|
111 |
|
112 @publishedPartner |
|
113 @released |
|
114 */ |
|
115 IMPORT_C void Start(TRequestStatus& aStatus); |
|
116 |
|
117 /** |
|
118 Cancels the pending start operation of the device's USB service. |
|
119 |
|
120 |
|
121 @since 7.0 |
|
122 @capability NetworkControl |
|
123 |
|
124 @publishedPartner |
|
125 @released |
|
126 */ |
|
127 IMPORT_C void StartCancel(); |
|
128 |
|
129 /** |
|
130 Stops the device's USB service. Should not be called if the USB services |
|
131 have not been started. This is the synchronous variant of this function. |
|
132 This function is deprecated- use the asynchronous version. |
|
133 |
|
134 |
|
135 @since 7.0 |
|
136 @capability NetworkControl |
|
137 |
|
138 @publishedPartner |
|
139 @released |
|
140 */ |
|
141 IMPORT_C void Stop(); |
|
142 |
|
143 /** |
|
144 Stops the device's USB service. Should not be called if the USB services |
|
145 have not been started. This is the asynchronous variant of this function. |
|
146 |
|
147 |
|
148 @since 7.0s |
|
149 @param aStatus Status to complete once the stop operation has completed |
|
150 @capability NetworkControl |
|
151 |
|
152 @publishedPartner |
|
153 @released |
|
154 */ |
|
155 IMPORT_C void Stop(TRequestStatus& aStatus); |
|
156 |
|
157 /** |
|
158 Cancels the pending stop operation of the device's USB service. |
|
159 |
|
160 |
|
161 @since 7.0s |
|
162 @capability NetworkControl |
|
163 |
|
164 @publishedPartner |
|
165 @released |
|
166 */ |
|
167 IMPORT_C void StopCancel(); |
|
168 |
|
169 /** |
|
170 Get the current state of the device's USB service. |
|
171 |
|
172 |
|
173 @since 7.0s |
|
174 @param aState Set by the method to the current state of the USB service |
|
175 |
|
176 @return KErrNone if successful, otherwise the error that occurred |
|
177 |
|
178 @publishedPartner |
|
179 @released |
|
180 */ |
|
181 IMPORT_C TInt GetServiceState(TUsbServiceState& aState); |
|
182 |
|
183 /** |
|
184 Request to be notified of a change in service state of the USB device. The |
|
185 request only completes when the service state changes. |
|
186 |
|
187 |
|
188 @since 7.0s |
|
189 @param aState State variable to be written to upon completion of the request |
|
190 @param aStatus Status to complete when required state change occurs |
|
191 |
|
192 @publishedPartner |
|
193 @released |
|
194 */ |
|
195 IMPORT_C void ServiceStateNotification( |
|
196 TUsbServiceState& aState, |
|
197 TRequestStatus& aStatus |
|
198 ); |
|
199 |
|
200 /** |
|
201 Cancel the outstanding service state notification request. |
|
202 |
|
203 |
|
204 @since 7.0s |
|
205 |
|
206 @publishedPartner |
|
207 @released |
|
208 */ |
|
209 IMPORT_C void ServiceStateNotificationCancel(); |
|
210 |
|
211 /** |
|
212 Gets the current device state (eg. powered, configured...). |
|
213 |
|
214 |
|
215 @since 7.0s |
|
216 @param aState Set by the method to the current state of the USB device |
|
217 @return KErrNone if successful, otherwise the error that occurred |
|
218 |
|
219 @publishedPartner |
|
220 @released |
|
221 */ |
|
222 IMPORT_C TInt GetDeviceState(TUsbDeviceState& aState); |
|
223 |
|
224 /** |
|
225 Request to be notified of a change in state of the USB device. |
|
226 |
|
227 |
|
228 @since 7.0s |
|
229 @param aStateMask State mask of the states the client is interested in |
|
230 @param aState State variable to be written to upon completion of the request |
|
231 @param aStatus Status to complete when required state change occurs |
|
232 |
|
233 @publishedPartner |
|
234 @released |
|
235 */ |
|
236 IMPORT_C void DeviceStateNotification( |
|
237 TUint aStateMask, |
|
238 TUsbDeviceState& aState, |
|
239 TRequestStatus& aStatus |
|
240 ); |
|
241 |
|
242 /** |
|
243 Cancel the outstanding device state notification request. |
|
244 |
|
245 |
|
246 @since 7.0s |
|
247 |
|
248 @publishedPartner |
|
249 @released |
|
250 */ |
|
251 IMPORT_C void DeviceStateNotificationCancel(); |
|
252 |
|
253 /** |
|
254 Try to start the device's USB service. It starts the current personality |
|
255 only if the service is in the idle state. Calling this API while the server |
|
256 is in any other states has no any effect on the service state. |
|
257 |
|
258 Note: Asynchonous version, outcome returned when the status is completed |
|
259 |
|
260 @param aPersonalityId a personality id |
|
261 @param aStatus Status to complete once the start operation has completed. |
|
262 It may be one of the following: |
|
263 KErrNotSupported |
|
264 KErrAccessDenied |
|
265 KErrServerBusy |
|
266 KErrAbort |
|
267 KErrNone |
|
268 @capability NetworkControl |
|
269 @publishedPartner |
|
270 @released |
|
271 */ |
|
272 IMPORT_C void TryStart(TInt aPersonalityId, TRequestStatus& aStatus); |
|
273 |
|
274 /** |
|
275 Try to stop the device's USB service. It stops the service only if the serice |
|
276 is in the started state. Calling this API while the server is in the other states |
|
277 has no any effect on the service state. |
|
278 |
|
279 Note: Asynchonous version, outcome returned when the status is completed |
|
280 |
|
281 @param aStatus Status to complete once the stop operation has completed. |
|
282 It may be one of the following: |
|
283 KErrNotSupported |
|
284 KErrAccessDenied |
|
285 KErrServerBusy |
|
286 KErrNone |
|
287 @capability NetworkControl |
|
288 @publishedPartner |
|
289 @released |
|
290 */ |
|
291 IMPORT_C void TryStop(TRequestStatus& aStatus); |
|
292 |
|
293 /** |
|
294 Cancels the interest of the pending operation of the device's USB service, |
|
295 either starting or stopping. The pending request will run to the completion. |
|
296 The caller of this function receives a status of KErrCancel. |
|
297 |
|
298 @param aMessageId a message id to identify the request to be cancelled |
|
299 @publishedPartner |
|
300 @released |
|
301 */ |
|
302 IMPORT_C TInt CancelInterest(TUsbReqType aMessageId); |
|
303 |
|
304 /** |
|
305 Gets the textual description of the personality identified by the aPersonalityId. |
|
306 Caller is repsonsible for freeing up memories allocated to |
|
307 aLocalizedPersonalityDescriptor. |
|
308 |
|
309 @param aPersonalityId a personality id |
|
310 @param aLocalizedPersonalityDescriptor a localize text string |
|
311 @return KErrNone if successful, otherwise the error that occurred |
|
312 @publishedPartner |
|
313 @released |
|
314 */ |
|
315 IMPORT_C TInt GetDescription(TInt aPersonalityId, HBufC*& aLocalizedPersonalityDescriptor); |
|
316 |
|
317 /** |
|
318 Gets the current personality id of the device's USb service |
|
319 |
|
320 @param aPersonalityId set to the current personality of USB device |
|
321 @return KErrNone if successful, otherwise the error that occurred |
|
322 @publishedPartner |
|
323 @released |
|
324 */ |
|
325 IMPORT_C TInt GetCurrentPersonalityId(TInt& aPersonalityId); |
|
326 |
|
327 /** |
|
328 Gets supported classes by the given personality identified by the aPersonalityId |
|
329 |
|
330 @param aPersonalityId a personality id |
|
331 @param aClassUids an array of class uids |
|
332 @return KErrNone if successful, otherwise the error that occurred |
|
333 @publishedPartner |
|
334 @released |
|
335 */ |
|
336 IMPORT_C TInt GetSupportedClasses(TInt aPersonalityId, RArray<TUid>& aClassUids); |
|
337 |
|
338 /** |
|
339 Queries the USB manager to determine if a given class is supported |
|
340 |
|
341 @param aPersonalityId a personality id |
|
342 @param aClassUid a class uid |
|
343 @param aSupported set upon return |
|
344 @return KErrNone if successful, otherwise the error that occurred |
|
345 @publishedPartner |
|
346 @released |
|
347 */ |
|
348 IMPORT_C TInt ClassSupported(TInt aPersonalityId, TUid aClassUid, TBool& aSupported); |
|
349 |
|
350 /** |
|
351 Gets all supported personality ids of the device's USB service. |
|
352 |
|
353 @param aPersonalityIds populated with all supported personality ids of the USB device |
|
354 @return KErrNone if successful, otherwise the error that occurred |
|
355 @publishedPartner |
|
356 @released |
|
357 */ |
|
358 IMPORT_C TInt GetPersonalityIds(RArray<TInt>& aPersonalityIds); |
|
359 |
|
360 /** |
|
361 Marks the start of heap cell checking for the USB Manager. This function is only defined |
|
362 in debug builds. |
|
363 |
|
364 @return KErrNone if successful, otherwise the error that occurred |
|
365 |
|
366 @publishedPartner |
|
367 @released |
|
368 */ |
|
369 IMPORT_C TInt __DbgMarkHeap(); |
|
370 |
|
371 /** |
|
372 Checks that the number of allocated cells on the USB Manager's heap is correct. The USB |
|
373 Manager will be panicked if it is not. This function is only defined in debug builds. |
|
374 |
|
375 @param aCount The expected number of heap cells allocated |
|
376 @return KErrNone if successful, otherwise the error that occurred |
|
377 |
|
378 @publishedPartner |
|
379 @released |
|
380 */ |
|
381 IMPORT_C TInt __DbgCheckHeap(TInt aCount); |
|
382 |
|
383 /** |
|
384 Marks the end of heap cell checking for the USB Manager. Checks that the number of heap |
|
385 cells allocated since the last __DbgMarkHeap() is aCount; the most common value to pass |
|
386 here is zero. This function is only defined in debug builds. |
|
387 |
|
388 @param aCount The expected number of heap cells allocated |
|
389 @return KErrNone if successful, otherwise the error that occurred |
|
390 |
|
391 @publishedPartner |
|
392 @released |
|
393 */ |
|
394 IMPORT_C TInt __DbgMarkEnd(TInt aCount); |
|
395 |
|
396 /** |
|
397 Simulates memory allocation failure in the USB Manager. This function is only defined in |
|
398 debug builds. |
|
399 |
|
400 @param aCount The number of allocations after which memory allocation should fail |
|
401 @return KErrNone if successful, otherwise the error that occurred |
|
402 |
|
403 @publishedPartner |
|
404 @released |
|
405 */ |
|
406 IMPORT_C TInt __DbgFailNext(TInt aCount); |
|
407 |
|
408 /** |
|
409 Functions below this point are deprecated and should not be used. |
|
410 */ |
|
411 |
|
412 /** |
|
413 Get the current state of the device's USB service. This function is deprecated and has been |
|
414 replaced by the GetServiceState function from version 7.0s onwards. |
|
415 |
|
416 |
|
417 @since 7.0 |
|
418 @param aState Set by the method to the current state of the USB service |
|
419 |
|
420 @return KErrNone if successful, otherwise the error that occurred |
|
421 |
|
422 @publishedPartner |
|
423 @deprecated |
|
424 */ |
|
425 IMPORT_C TInt GetCurrentState(TUsbServiceState& aState); |
|
426 |
|
427 /** |
|
428 Request to be notified of a change in state of the USB device. This function is deprecated |
|
429 and has been replaced by the DeviceStateNotification function from version 7.0s onwards. |
|
430 |
|
431 |
|
432 @since 7.0 |
|
433 @param aStateMask State mask of the states the client is interested in |
|
434 @param aState State variable to be written to upon completion of the request |
|
435 @param aStatus Status to complete when required state change occurs |
|
436 |
|
437 @publishedPartner |
|
438 @deprecated |
|
439 */ |
|
440 IMPORT_C void StateNotification( |
|
441 TUint aStateMask, |
|
442 TUsbDeviceState& aState, |
|
443 TRequestStatus& aStatus |
|
444 ); |
|
445 |
|
446 /** |
|
447 Cancel the outstanding device state notification request. This function is deprecated and |
|
448 has been replaced by the DeviceStateNotificationCancel function from version 7.0s onwards. |
|
449 |
|
450 |
|
451 @since 7.0 |
|
452 |
|
453 @publishedPartner |
|
454 @deprecated |
|
455 */ |
|
456 IMPORT_C void StateNotificationCancel(); |
|
457 |
|
458 /** |
|
459 * Set or reset the mode in which current RUsb session operates. |
|
460 * Recent implementation assumes that there is the one and only application |
|
461 * which controls USBMAN, all other clients act as listeners to notification |
|
462 * requests. Only application which was previously granted 'control' mode is |
|
463 * allowed to reset it at later stage. Any calls from other applications will |
|
464 * generate an error. |
|
465 * |
|
466 * @param aValue True to inform USBMAN that Application wants to 'control' |
|
467 * USBMAN |
|
468 * False otherwise |
|
469 * |
|
470 * @capability NetworkControl |
|
471 * @return KErrNone if successful |
|
472 * KErrAccessDenied otherwise |
|
473 */ |
|
474 IMPORT_C TInt SetCtlSessionMode(TBool aValue); |
|
475 |
|
476 /** |
|
477 * Cable watcher wants to assert Bus_request. |
|
478 * If ID-Pin is present this is an A-Device and this will result in an attempt |
|
479 * to raise VBus. Second attempt to raise VBus causes KErrUsbOtgVbusAlreadyRaised |
|
480 * error. |
|
481 * If ID-Pin is absent this is a B-Device and this will result in an attempt to |
|
482 * use SRP. Recently does nothing |
|
483 * |
|
484 * When BusRequest() returns an error, VBus remains low until the errors are cleared by |
|
485 * BusDrop() or BusClearErr() calls |
|
486 * |
|
487 * @capability NetworkControl |
|
488 * @return KErrNone if successful, otherwise an error code returned by OTGDI |
|
489 */ |
|
490 IMPORT_C TInt BusRequest(); |
|
491 |
|
492 /** |
|
493 * Cable watcher wants to assert Bus_request after SRP. |
|
494 * If ID-Pin is present this is an A-Device and this will result in an attempt |
|
495 * to raise VBus |
|
496 * |
|
497 * @capability NetworkControl |
|
498 * @return KErrNone if successful, otherwise an error code returned by OTGDI |
|
499 */ |
|
500 IMPORT_C TInt BusRespondSrp(); |
|
501 |
|
502 /** |
|
503 * Cable watcher wants to clear the Bus Error after A_VBUS_ERR |
|
504 * Only works if ID-Pin is present (this is an A-Device) and there |
|
505 * has already been a bus erorr. |
|
506 * This will not result in any attempt to raise or drop VBus |
|
507 * |
|
508 * @capability NetworkControl |
|
509 * @return KErrNone if successful, otherwise an error code returned by OTGDI |
|
510 */ |
|
511 IMPORT_C TInt BusClearError(); |
|
512 |
|
513 /** |
|
514 * Cable watcher wants to drop VBus. |
|
515 * If ID-Pin is present this is an A-Device and this will result in stopping VBus |
|
516 * power-up |
|
517 * |
|
518 * @capability NetworkControl |
|
519 * @return KErrNone if successful, otherwise an error code returned by OTGDI |
|
520 */ |
|
521 IMPORT_C TInt BusDrop(); |
|
522 |
|
523 /** |
|
524 * Register for Messages notifications |
|
525 * The request only completes when the new message arrives. |
|
526 * Calling this function the first time initializes Messages queue |
|
527 * |
|
528 * |
|
529 * @param aMessage UI Message variable to be written to upon completion |
|
530 * of the request |
|
531 * @param aStatus Status to complete when required state change occurs |
|
532 * KErrNone - if successful |
|
533 * KErrInUse - if there is another outstanding nofitication request |
|
534 * for the same session |
|
535 * otherwise an error code returned by OTGDI or Host |
|
536 */ |
|
537 IMPORT_C void MessageNotification(TRequestStatus& aStatus, TInt& aMessage); |
|
538 |
|
539 /** |
|
540 * Cancel the outstanding Messages notification request. |
|
541 */ |
|
542 IMPORT_C void MessageNotificationCancel(); |
|
543 |
|
544 /** |
|
545 * Register for Host Device Event notifications. |
|
546 * The request only completes when the host event occurs. |
|
547 * Calling this function the first time initializes Host Events queue |
|
548 * |
|
549 * @param aStatus Status to complete when required event occurs |
|
550 * |
|
551 * KErrNone - if successful |
|
552 * KErrInUse - if there is another outstanding nofitication |
|
553 * request for the same session |
|
554 * otherwise an error code returned by FDF |
|
555 * @param aDeviceInformation device info to be written to upon completion |
|
556 * of the request |
|
557 */ |
|
558 IMPORT_C void HostEventNotification(TRequestStatus& aStatus, |
|
559 TDeviceEventInformation& aDeviceInformation); |
|
560 /** |
|
561 * Cancel the outstanding FDF Device Event notification request. |
|
562 */ |
|
563 IMPORT_C void HostEventNotificationCancel(); |
|
564 |
|
565 /** |
|
566 * Enable Function Driver Loading. |
|
567 * |
|
568 * @capability NetworkControl |
|
569 * @return KErrNone - if successful |
|
570 * KErrNotSupported - if FDF is not included in current configuration |
|
571 * otherwise an error code returned by FDF |
|
572 */ |
|
573 IMPORT_C TInt EnableFunctionDriverLoading(); |
|
574 |
|
575 /** |
|
576 * Disable Function Driver Loading. |
|
577 * |
|
578 * @capability NetworkControl |
|
579 */ |
|
580 IMPORT_C void DisableFunctionDriverLoading(); |
|
581 |
|
582 /** |
|
583 * Get Supported Languages from USB Device |
|
584 * |
|
585 * @param aDeviceId DeviceID of given device |
|
586 * @param aLangIds an array of language IDs supported by given device. |
|
587 * These language IDs are supplied by USB-IF and are |
|
588 * different from standard Symbian TLanguage enumeration |
|
589 * |
|
590 * @return KErrNone - if successful |
|
591 * otherwise an error code returned by FDF |
|
592 */ |
|
593 IMPORT_C TInt GetSupportedLanguages(TUint aDeviceId, RArray<TUint>& aLangIds); |
|
594 |
|
595 /** |
|
596 * Get Manufacturer Descriptor |
|
597 * |
|
598 * @param aDeviceId DeviceID of given device |
|
599 * @param aLangId required language ID which is supplied by USB-IF and is |
|
600 * different from standard Symbian TLanguage enumeration |
|
601 * @param aString manufacturer descriptor value at output |
|
602 * |
|
603 * @return KErrNone - if successful |
|
604 * otherwise an error code returned by FDF |
|
605 */ |
|
606 IMPORT_C TInt GetManufacturerStringDescriptor(TUint aDeviceId, TUint aLangId, TName& aString); |
|
607 |
|
608 /** |
|
609 * Get Product Descriptor |
|
610 * |
|
611 * @param aDeviceId DeviceID of given device |
|
612 * @param aLangId required language ID which is supplied by USB-IF and is |
|
613 * different from standard Symbian TLanguage enumeration |
|
614 * @param aString product descriptor value at output |
|
615 * |
|
616 * @return KErrNone - if successful |
|
617 * otherwise an error code returned by FDF |
|
618 */ |
|
619 IMPORT_C TInt GetProductStringDescriptor(TUint aDeviceId, TUint aLangId, TName& aString); |
|
620 |
|
621 /** |
|
622 * Retrieve Otg Descriptor for device which has given device Id. |
|
623 * Currently TOtgDescriptor has following fields: |
|
624 * - HNP supported |
|
625 * - SRP supported |
|
626 * An OTG device should support them both. |
|
627 * |
|
628 * @param aDeviceId DeviceID of given device |
|
629 * @param aDescriptor OTG descriptor value at output |
|
630 * |
|
631 * @return KErrNone - if successful |
|
632 * otherwise an error code returned by FDF |
|
633 */ |
|
634 IMPORT_C TInt GetOtgDescriptor(TUint aDeviceId, TOtgDescriptor& aDescriptor); |
|
635 |
|
636 /** |
|
637 Simulates memory allocation in the USB Manager. This function is only defined in |
|
638 debug builds. |
|
639 |
|
640 @return KErrNone if successful, otherwise the error that occurred |
|
641 |
|
642 @publishedPartner |
|
643 @released |
|
644 */ |
|
645 IMPORT_C TInt __DbgAlloc(); |
|
646 |
|
647 /** |
|
648 Informs USB Manager that the client would like to initialte USB session. |
|
649 On A-Device, it results in sending a notification to 'controller' application |
|
650 On B-Device, it may trigger either SRP or HNP sequence depending on the state of VBus |
|
651 |
|
652 @return KErrNone if successful, otherwise the error that occurred |
|
653 |
|
654 @publishedPartner |
|
655 @released |
|
656 */ |
|
657 IMPORT_C TInt RequestSession(); |
|
658 |
|
659 |
|
660 /** |
|
661 Gets the property of the personality identified by the aPersonalityId. |
|
662 |
|
663 @param aPersonalityId a personality id |
|
664 @return the personality property |
|
665 @publishedPartner |
|
666 @released |
|
667 */ |
|
668 IMPORT_C TInt GetPersonalityProperty(TInt aPersonalityId, TUint32& aProperty); |
|
669 |
|
670 /** |
|
671 Gets the detailed textual description of the personality identified by the aPersonalityId. |
|
672 Caller is repsonsible for freeing up memories allocated to |
|
673 aLocalizedPersonalityDescriptor. |
|
674 |
|
675 @param aPersonalityId a personality id |
|
676 @param aLocalizedPersonalityDescriptor a localize text string |
|
677 @return KErrNone if successful, otherwise the error that occurred |
|
678 @publishedPartner |
|
679 @released |
|
680 */ |
|
681 IMPORT_C TInt GetDetailedDescription(TInt aPersonalityId, HBufC*& aLocalizedPersonalityDescriptor); |
|
682 |
|
683 private: |
|
684 /** |
|
685 Used to register device state notifications. |
|
686 */ |
|
687 TPckg<TUint32> iDeviceStatePkg; |
|
688 |
|
689 /** |
|
690 Used to register service state notifications. |
|
691 */ |
|
692 TPckg<TUint32> iServiceStatePkg; |
|
693 |
|
694 /** |
|
695 Used to register OTG/Host message notifications. |
|
696 */ |
|
697 TPckg<TUint32> iMessagePkg; |
|
698 |
|
699 /** |
|
700 Used to register Host state notifications. |
|
701 */ |
|
702 TPckg<TDeviceEventInformation> iHostPkg; |
|
703 }; |
|
704 |
|
705 #endif //__USBMAN_H__ |
|