|
1 // Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #ifndef LINKUTIL_H |
|
17 #define LINKUTIL_H |
|
18 |
|
19 _LIT(KLinkPanicName, "LinkMgr Panic"); |
|
20 |
|
21 enum TLinkPanic |
|
22 { |
|
23 ELinkEntryNotFound =0, |
|
24 ELinkMgrPacketMTUUseBeforeSet =1, |
|
25 EHCIBufferMgrBadState =2, |
|
26 EHostResolverTwoRequests =3, |
|
27 ELinkMgrFIFOLevelZeroOrBelowZero =4, |
|
28 EHCICommandCreditsAreZero =5, |
|
29 EHCICommandCouldNotBeCommited =6, |
|
30 EHCIACLDataControllerDataCreditsZeroBeforeIssue =7, |
|
31 EHCIACLDataControllerConnectionCouldNotBeFound =8, |
|
32 EHCIACLDataControllerDataCreditsNotConsistentAfterReset =9, |
|
33 EHCIACLDataControllerDroppedConnectionCouldNotBeFound =10, |
|
34 EHCIACLDataControllerMaxAllowedDataCreditsExceeded =11, |
|
35 EHCIACLDataControllerConnectionListConnectionNotFound =12, |
|
36 EHCIACLDataControllerFlushCompleteError =13, |
|
37 ELinkMgrFIFOLevelAboveCeiling =14, |
|
38 EHCIFIFOLevelBelowZero =15, |
|
39 ELinkMgrNoSuchFlowControlMode =16, |
|
40 ELinkMgrNoFlowControlSetInReleaseBuild =17, |
|
41 ELinkMgrDataQBufferIsNotSufficient =18, |
|
42 ELinkMgrClientHasOutstandingQueueObject =19, |
|
43 ELinkMgrBadFlowControlSetInReleaseBuild =20, |
|
44 ELinkMgrOverflowedHostController =21, |
|
45 ELinkMgrBadSCOState =22, |
|
46 EBTConnectionUnknownLowPowerMode =23, |
|
47 EBTLinkMgrConnectionEventInWrongSAP =24, |
|
48 ELinkMgrBadBasebandArray =25, |
|
49 ELinkMgrBadDeviceChangeArray =26, |
|
50 EBTLinkMgrBasebandModelInvalid =27, |
|
51 EBTConnectionPINRequestedTwice =28, |
|
52 EBTConnectionBadDeviceAddress =29, |
|
53 EBTConnectionListenerUsingRegistry =30, |
|
54 EBTBaseSAPUnimplementedEvent =31, |
|
55 EBTProxySAPUnexpectedEvent =32, |
|
56 EBTProxySAPBadCanClose =33, |
|
57 EBTBasebandSAPTwoPhysicalLinks =34, |
|
58 EBTACLSAPUnexpectedEvent =35, |
|
59 EBTACLAlreadyBoundToPhysicalLink =36, |
|
60 EBTACLLogicalLinkBadDebind =37, |
|
61 EBTPHYWithoutACLLogicalLinkBound =38, |
|
62 EBTSCOAlreadyBoundToPhysicalChannel =39, |
|
63 EBTSCOLogicalLinkBadDebind =40, |
|
64 EBTUnknownLogicalLink =41, |
|
65 EBTConnectionMgrCountBelowZero =42, |
|
66 EBTACLSAPUnsupportedQueSize =43, |
|
67 EBTConnectionRequestWithNoListeners =44, |
|
68 EBTConnectionMgrBadListener =45, |
|
69 EBTACLSAPChildlessParent =46, |
|
70 EBTACLSAPParentlessChild =47, |
|
71 EBTACLSAPDataForWrongSAP =48, |
|
72 EBTACLSAPNullSocket =49, |
|
73 EBTACLSAPWrongPhysicalLink =50, |
|
74 EBTSCOSAPWrongPhysicalLink =51, |
|
75 EBTSCOSAPExistsWhenParking =52, |
|
76 EBTSCOSAPChildlessParent =53, |
|
77 EBTSCOSAPParentlessChild =54, |
|
78 EBTSCOSAPDataForWrongSAP =55, |
|
79 EBTSCOSAPNullSocket =56, |
|
80 EBTSCOSAPMaxDataLengthExceeded =57, |
|
81 EBTProxySAPCannotFindPhysicalLink =58, |
|
82 EBTProxyUserAttemptingToTransmitL2CAPDirectData =59, |
|
83 EBTProxySAPNotReadyToSendRawData =60, |
|
84 EBTProxySAPNoRawConduit =61, |
|
85 EBTProxySAPRawConduitAlreadyExists =62, |
|
86 EBTProxySAPInvalidCreate =63, |
|
87 EBTProxySAPInvalidIoctl =64, |
|
88 EBTProxySAPInvalidEventMask =65, |
|
89 EBTACLRawConduitError =66, |
|
90 EBTACLSAPDidntAcceptInTime =67, |
|
91 EBTACLSAPListenerSettingName =68, |
|
92 EBTACLSAPCorruptInboundStore =69, |
|
93 EBTSCOSAPUnexpectedEvent =70, |
|
94 EBTSCOSAPWrongSCOSAP =71, |
|
95 EBTProxySAPInvalidTerminate =72, |
|
96 EBTProxySAPNullCallback =73, |
|
97 EBTPhysicalLinkBadPort =74, |
|
98 EBTBasebandSAPBadChild =75, |
|
99 EBTACLSAPBadFlagsOnWrite =76, |
|
100 EBTACLSAPNotSupportedFeature =77, |
|
101 EBTBasebandModelBadRecord =78, |
|
102 EBTACLSAPToldRoleSwitchWhenParked =79, |
|
103 EBTACLSAPDoesNotSupportBroadcastL2CAP =80, |
|
104 EBTACLSAPDoesNotSupportPiconetBroadcast =81, |
|
105 EVendorSAPBadCall =82, |
|
106 EVendorTwoIoctls =83, |
|
107 EBTPhysicalLinksManagerConnectingToNullAddress =84, |
|
108 ELinkMgrHostControllerHasOverflowedHost =85, |
|
109 ELinkMgrCouldNotSendHostNumberOfCompletedPackets =86, |
|
110 EBTPhysicalLinkNotAuthenticated =87, |
|
111 EBTPhysicalLinksInvalidAddress =88, |
|
112 EBTNonSyncConnectInSyncConnectFunc =89, |
|
113 EHCIDirectAccessSAPBadCall =90, |
|
114 EHCIDirectAccessTwoIoctls =91, |
|
115 EHCIDirectAccessBadIoctlCompletion =92, |
|
116 EHCIDirectAccessBadIoctlCancel =93, |
|
117 EBTPhysicalLinkModeChangeErrorLeavingSniffMode =94, |
|
118 EHCICommandNullItem =95, |
|
119 EBTBasebandInvalidLinkState =96, |
|
120 ERoleSwitcherInvalidState =97, |
|
121 ERoleSwitcherStateMachineInvalidEvent =98, |
|
122 ERoleSwitchersNotDeleted =99, |
|
123 EBTACLSAPWriteDataItemWithNullFrame =100, |
|
124 EAclSapChildStillPresentAtDestruction =101, |
|
125 EPendingConnectionNotCleared =102, |
|
126 EPairedBDAddrGetterUnexpectedState =103, |
|
127 EBTPairingsCacheRemovalOfUnpairedDevice =104, |
|
128 EBTPairingsCacheDuplicatePairingInCache =105, |
|
129 EBTPairingsCacheBadState =106, |
|
130 EPhysicalLinkNoConnectionPending =107, |
|
131 EBTPairingsCacheNotEmpty =108, |
|
132 EHostResolverBadHWState =109, |
|
133 //Panic code values between 110 and 159 are reserved |
|
134 //to distinguish older code. |
|
135 //Please do not use these values in future upgrades. |
|
136 EACLLinkStateOutOfBounds =160, |
|
137 ESCOInboundPacketTooLarge =161, |
|
138 EVendorSpecificCommandIncorrectSize =162, |
|
139 EEncryptionEnforcerBadState =163, |
|
140 EBTInvalidEncryptionDisableRequest =164, |
|
141 EBTProxySAPAlreadySubscribed =165, |
|
142 EBTProxySAPSubscribedToBroadcastHandle =166, |
|
143 EVendorSAPBadIoctlCancel =167, |
|
144 EDisconnectRequestedNotOnACLLink =168, |
|
145 EInvalidLinkStateDuringDisconnect =169, |
|
146 EHCIControllerInitialisation =170, |
|
147 EHCIIncompleteInterfaces =171, |
|
148 EHCIMultipleCoreHciImplementations =172, |
|
149 EHCIUnknownDataEvent =173, |
|
150 EHCIUnknownCommandEvent =174, |
|
151 EHCIUnknownUnsolicitedEvent =175, |
|
152 EHCIUnknownCommandCompleteOpcode =176, |
|
153 EHCICmdQNotInitialising =177, |
|
154 EHCICommandBadArgument =178, |
|
155 EHCICtrlrInitFailedToRemoveCmd =179, |
|
156 EHCICtrlrInitNoOutstandingCmds =180, |
|
157 EHCICtrlrInitCmdNotFound =181, |
|
158 EHCIUnknownHardResetState =182, |
|
159 EHCIUnknownPowerState =183, |
|
160 EBTPhysicalLinksInvalidArgument =184, |
|
161 EHCIPowerStateError =185, |
|
162 EIncorrectStateOnPreResetCallback =186, |
|
163 EIncorrectStateOnPostResetCallback =187, |
|
164 EBTNameLookupResultNotFound =188, |
|
165 EBTInvalidInquiryMode =189, |
|
166 EBTInvalidInquiryLogEntry =190, |
|
167 EBTUnexpectedLinkKeyType =191, |
|
168 EBTInvalidDataInPhysicalLinkMetric =192, |
|
169 EBTHostControllerQueueNotEmpty =193, |
|
170 EBTCommandQueueAlreadyExist =194, |
|
171 EBTCommandQueueNotFound =195, |
|
172 EBTUnexpectedIAC =196, |
|
173 ETRegistryDevBeingModUnexpectedCompleted=197, |
|
174 EDiscCtrlUnexpectedConnectionHandle =198, |
|
175 EDiscCtrlUnmatchedCommandEvent =199, |
|
176 EDiscCtrlUnexpectedCommandEvent =200, |
|
177 EHCIUnmatchedInquiryEvent =201, |
|
178 EBTInquiryMgrMismatchedStatusEvent =202, |
|
179 EBTInquiryMgrUnmatchedEvent =203, |
|
180 EBTPhysicalLinkPinHandlerStillPresent =204, |
|
181 EBTPrefetchManagerReplyForNoRequest =205, |
|
182 EHCIUnexpectedEvent =206, |
|
183 EUnexpectedIOCapability =207, |
|
184 EEIRPublisherUpdateNameTooLong =208, |
|
185 EBTSSPModeChangedDuringConnection =209, |
|
186 EHCICtrlrInitAddingInitialisationCommandInBadState =210, |
|
187 EHCICtrlrInitOnlyOneResetCmdAllowed =211, |
|
188 |
|
189 //Please add new panic codes common to all versions of linkmgr here. |
|
190 EVendorSAPBadVendorEvent =250, |
|
191 EBTACLSAPIndeterminateInitiator =251, |
|
192 EBTACLSAPUnexpectedSecurityResult =252, |
|
193 }; |
|
194 |
|
195 /** |
|
196 Panics raised by state machine default behaviour are multiplied by this |
|
197 factor. The less signifigant digits are then available to carry a state |
|
198 index, allowing more information when fixing defects. |
|
199 |
|
200 For example, a bad event passed to the ACL state machine may raise panic |
|
201 'Link Panic 351008' if it occurs in the 'Open' state. |
|
202 */ |
|
203 const TInt KStatePanicMultiplier = 10000; |
|
204 |
|
205 /** |
|
206 A delimiter to prevent a panic code of 0 creating ambigious panics. |
|
207 Without this panic code 0 in state 8 and panic code 8 (not in the state |
|
208 machine) would be identical. |
|
209 */ |
|
210 const TInt KStatePanicDelimiter = 1000; // '1' is the delimiter |
|
211 |
|
212 /** |
|
213 If for any reason the current state cannot be found, this value is placed |
|
214 in the state field of a panic. |
|
215 */ |
|
216 const TInt KUnknownState = KStatePanicDelimiter - 1; |
|
217 |
|
218 void Panic(TLinkPanic aPanic); |
|
219 |
|
220 void Panic(TLinkPanic aPanic, TInt aState); |
|
221 |
|
222 |
|
223 |
|
224 #endif |