|
1 /* |
|
2 * Copyright (c) 2003-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: |
|
15 * Definitions required for RUsb |
|
16 * |
|
17 */ |
|
18 |
|
19 /** |
|
20 @file |
|
21 @internalComponent |
|
22 */ |
|
23 |
|
24 #ifndef __RUSB_H__ |
|
25 #define __RUSB_H__ |
|
26 |
|
27 #include <e32std.h> |
|
28 #include <usb/usbshared.h> |
|
29 |
|
30 const TInt KUsbSrvMajorVersionNumber = 1; |
|
31 const TInt KUsbSrvMinorVersionNumber = 1; |
|
32 const TInt KUsbSrvBuildVersionNumber = 0; |
|
33 |
|
34 const TInt KUsbMaxSupportedClasses = 64; // Max number of supported USB classes by a personality |
|
35 |
|
36 const TInt KUsbMaxSupportedPersonalities = 64; // Max number of supported personalities |
|
37 |
|
38 _LIT(KUsbServerName, "!usbman"); |
|
39 |
|
40 enum TUsbMessages |
|
41 { |
|
42 EUsbStart, |
|
43 EUsbStop, |
|
44 EUsbRegisterObserver, |
|
45 EUsbGetCurrentState, |
|
46 EUsbStartCancel, |
|
47 EUsbCancelObserver, |
|
48 EUsbStopCancel, |
|
49 EUsbGetCurrentDeviceState, |
|
50 EUsbRegisterServiceObserver, |
|
51 EUsbCancelServiceObserver, |
|
52 EUsbDbgMarkHeap, |
|
53 EUsbDbgCheckHeap, |
|
54 EUsbDbgMarkEnd, |
|
55 EUsbDbgFailNext, |
|
56 EUsbTryStart, |
|
57 EUsbTryStop, |
|
58 EUsbCancelInterest, |
|
59 EUsbGetCurrentPersonalityId, |
|
60 EUsbGetSupportedClasses, |
|
61 EUsbGetPersonalityIds, |
|
62 EUsbGetDescription, |
|
63 EUsbClassSupported, |
|
64 |
|
65 |
|
66 EUsbSetCtlSessionMode, |
|
67 EUsbBusRequest, |
|
68 EUsbBusRespondSrp, |
|
69 EUsbBusClearError, |
|
70 |
|
71 EUsbBusDrop, |
|
72 EUsbRegisterMessageObserver, |
|
73 EUsbCancelMessageObserver, |
|
74 EUsbRegisterHostObserver, |
|
75 EUsbCancelHostObserver, |
|
76 EUsbEnableFunctionDriverLoading, |
|
77 EUsbDisableFunctionDriverLoading, |
|
78 EUsbGetSupportedLanguages, |
|
79 EUsbGetManufacturerStringDescriptor, |
|
80 EUsbGetProductStringDescriptor, |
|
81 EUsbGetOtgDescriptor, |
|
82 EUsbDbgAlloc, |
|
83 EUsbRequestSession, |
|
84 EUsbGetDetailedDescription, |
|
85 EUsbGetPersonalityProperty |
|
86 }; |
|
87 |
|
88 _LIT(KUsbCliPncCat, "UsbMan-Client"); |
|
89 |
|
90 enum TUsbPanicClient |
|
91 { |
|
92 EUsbCreateFailure, |
|
93 EUsbPanicIllegalIPC, |
|
94 EUsbPanicRemovedExport |
|
95 }; |
|
96 |
|
97 const TUid KUsbmanSvrUid = {0x101fe1db}; |
|
98 |
|
99 #ifdef __USBMAN_NO_PROCESSES__ |
|
100 |
|
101 const TUint KUsbmanStackSize = 0x3000; // 12KB |
|
102 const TUint KUsbmanMinHeapSize = 0x1000; // 4KB |
|
103 const TUint KUsbmanMaxHeapSize = 0x40000; // 256KB |
|
104 |
|
105 _LIT(KUsbmanImg, "usbsvr"); |
|
106 |
|
107 #else |
|
108 |
|
109 #ifndef __OVER_DUMMYUSBDI__ |
|
110 _LIT(KUsbmanImg, "z:\\system\\programs\\usbsvr.exe"); |
|
111 #else |
|
112 _LIT(KUsbmanImg, "z:\\system\\programs\\usbsvr_over_dummyusbdi.exe"); |
|
113 #endif |
|
114 |
|
115 #endif //__USBMAN_NO_PROCESSES__ |
|
116 |
|
117 #endif //__RUSB_H__ |