|
1 /* |
|
2 * Copyright (c) 2008-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: Central place for debug-type macros & functions |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef USBWATCHER_PANIC_H |
|
19 #define USBWATCHER_PANIC_H |
|
20 #include <e32base.h> |
|
21 #include <e32debug.h> |
|
22 _LIT(KUsbWatcherPanic, "UsbOTGWatcher"); |
|
23 |
|
24 enum TUsbWatcherPanic |
|
25 { |
|
26 ECanNotGetIdPinProperty, //0 |
|
27 EWrongIdPinState, //1 |
|
28 ECanNotGetVBusProperty, //2 |
|
29 EWrongVBusState, //3 |
|
30 ECanNotGetOtgStateProperty, //4 |
|
31 ENotifierIsActiveAlready, //5 |
|
32 EWrongNotifierCategory, //6 |
|
33 EUsbWatcherBadErrorCode, //7 |
|
34 ECanNotFindIdPinObserver, //8 |
|
35 ECanNotFindVBusObserver, //9 |
|
36 EWrongOtgState, //10 |
|
37 ECanNotGetBusActivityProperty, //11 |
|
38 EWrongBusState, //12 |
|
39 ECanNotFindBusActivityObserver, //13 |
|
40 EWrongDriverLoadStatus, //14 |
|
41 EWrongHostEventNotification, //15 |
|
42 ECanNotFindMessageNotificationObserver, //16 |
|
43 ECanNotFindOtgStateObserver, //17 |
|
44 EBadState, //18 |
|
45 EBadHostState, // 19 |
|
46 |
|
47 //From IdPin observer |
|
48 EIdPinOnNotExpected, //20 |
|
49 EIdPinOffNotExpected, //21 |
|
50 |
|
51 // From VBus observer |
|
52 EVBusDownNotExpected, //22 |
|
53 EVBusUpNotExpected, //23 |
|
54 |
|
55 // From OTG state observer |
|
56 EAIdleNotExpected, //24 |
|
57 EAHostNotExpected, //25 |
|
58 EAPeripheralNotExpected, //26 |
|
59 EAVBusErrorNotExpected, //27 |
|
60 EBIdleNotExpected, //28 |
|
61 EBPeripheralNotExpected, //29 |
|
62 EBHostNotExpected, //30 |
|
63 |
|
64 // From bus activity observer |
|
65 EBusIdleNotExpected, //31 |
|
66 EBusActiveNotExpected, //32 |
|
67 |
|
68 // From Host Event notification observer |
|
69 EDeviceAttachedNotExpected, //33 |
|
70 EDeviceDetachedNotExpected, //34 |
|
71 EDriverLoadSuccessNotExpected, //35 |
|
72 EDriverLoadPartialSuccessNotExpected, //36 |
|
73 EDriverLoadFailureNotExpected, //37 |
|
74 |
|
75 // From message notification observer |
|
76 EMessageNotificationNotExpected, //38 |
|
77 EBadHubPositionNotExpected, //39 |
|
78 EVBusErrorNotExpected, //40 |
|
79 ESrpNotExpected, //41 |
|
80 ESessionRequestNotExpected, //42 |
|
81 |
|
82 EIdPinObserverNULLPointer, //43 |
|
83 ECanNotStartUsbServices, //44 |
|
84 ECanNotStopUsbServices, //45 |
|
85 |
|
86 EDanglingCable, //46 |
|
87 EPartiallySupportedDevice, //47 |
|
88 EDriversLoadingFail, //48 |
|
89 EUnsupportedDevice, //49 |
|
90 EBadHubPosition, //50 |
|
91 ETooMuchPower, //51 |
|
92 EBusRespondSrpError, //52 |
|
93 EEnableFunctionDriverLoadingError, //53 |
|
94 EErrorInConnection, //54 |
|
95 EWatcherDriverLoadPartialSuccess, //55 |
|
96 EUnsupportedDeviceOrErrorInConnection, //56 |
|
97 EBusRequestError, //57 |
|
98 EAttachmentError, //58 |
|
99 EVBusError, // 59 |
|
100 ENoActivity, //60 |
|
101 EDeviceDetached, //61 |
|
102 EBadHubPositionEventNotExpected, //62 |
|
103 EUnhandledMessage, //63 |
|
104 EUnexpectedSituationToHandle, //64 |
|
105 EConnectedToOTGNotExpected, //65 |
|
106 |
|
107 EWrongTimerId, //66 |
|
108 EUnexpectedNotifId, //67 |
|
109 EUnknownUsbServiceState, //68 |
|
110 EUnexpectedUsbServiceState, //69 |
|
111 EUnexpectedUsbSwitchPersonalityState //70 |
|
112 |
|
113 }; |
|
114 |
|
115 /** |
|
116 * Shows application name and panic code |
|
117 * @param aPanicId panic id |
|
118 */ |
|
119 void Panic(TUsbWatcherPanic aPanicId); |
|
120 |
|
121 #endif // USBWATCHER_PANIC_H |