|
1 /* |
|
2 * Copyright (c) 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 * |
|
16 */ |
|
17 #ifndef __SIPCONSTANTS_H__ |
|
18 #define __SIPCONSTANTS_H__ |
|
19 |
|
20 // INCLUDES |
|
21 #include "TesterConstants.h" |
|
22 |
|
23 // CONSTANTS |
|
24 |
|
25 /// SIP header names |
|
26 _LIT8( KHeaderContact, "Contact"); |
|
27 _LIT8( KHeaderCSeq, "CSeq"); |
|
28 _LIT8( KHeaderFrom, "From" ); |
|
29 _LIT8( KHeaderProxy, "Proxy" ); |
|
30 _LIT8( KHeaderRoute, "Route" ); |
|
31 _LIT8( KHeaderServiceRoute, "Service-Route" ); |
|
32 _LIT8( KHeaderTo, "To"); |
|
33 _LIT8( KHeaderContentType, "Content-Type" ); |
|
34 _LIT8( KHeaderExpires, "Expires" ); |
|
35 _LIT8( KHeaderReferTo, "Refer-To" ); |
|
36 _LIT8( KHeaderSubState, "Subscription-State" ); |
|
37 _LIT8( KHeaderEvent, "Event" ); |
|
38 |
|
39 |
|
40 /// SIP Header separator character |
|
41 const TUint8 KHeaderSeparator( ':' ); |
|
42 /// Whitespace |
|
43 _LIT8( KSpace, " "); |
|
44 /// Horizontal tab |
|
45 _LIT8( KTab, "\t" ); |
|
46 |
|
47 /// CTRL parameter types |
|
48 _LIT8( KParamActionName, "action" ); |
|
49 _LIT8( KParamIAPName, "IAPName" ); |
|
50 _LIT8( KParamIAPNames, "IAPNames" ); |
|
51 _LIT8( KParamAddress, "Address" ); |
|
52 _LIT8( KParamApplicationUid, "ApplicationUid" ); |
|
53 _LIT8( KParamPluginUid, "PluginUid" ); |
|
54 _LIT8( KParamAssociationType, "AssociationType" ); |
|
55 _LIT8( KParamAuthenticationMechanism, "AuthenticationMechanism" ); |
|
56 _LIT8( KParamBoolean, "Boolean" ); |
|
57 _LIT8( KParamClientDiscoveryErrorCode, "ClientDiscoveryErrorCode" ); |
|
58 _LIT8( KParamClientDiscoveryRequestId, "ClientDiscoveryRequestId" ); |
|
59 _LIT8( KParamClientDiscoveryStatus, "ClientDiscoveryStatus" ); |
|
60 _LIT8( KParamClientInfo, "ClientInfo" ); |
|
61 _LIT8( KParamCompartmentCount, "CompartmentCount" ); |
|
62 _LIT8( KParamConnectionState, "ConnectionState" ); |
|
63 _LIT8( KParamContent, "Content" ); |
|
64 _LIT8( KParamData, "data" ); |
|
65 _LIT8( KParamDataLength, "byteLen" ); |
|
66 _LIT8( KParamDestinationPath, "dest" ); |
|
67 _LIT8( KParamDialogState, "DialogState" ); |
|
68 _LIT8( KParamDigestRealm, "DigestRealm" ); |
|
69 _LIT8( KParamDigestUsername, "DigestUsername" ); |
|
70 _LIT8( KParamDigestPassword, "DigestPassword" ); |
|
71 _LIT8( KParamExpires, "Expires" ); |
|
72 _LIT8( KParamEventType, "EventType" ); |
|
73 _LIT8( KParamFile, "File" ); |
|
74 _LIT8( KParamMethod, "Method" ); |
|
75 _LIT8( KParamProcess, "Process" ); |
|
76 _LIT8( KParamReason, "Reason" ); |
|
77 _LIT8( KParamInterfaceImpUid, "InterfaceImplemetationUid" ); |
|
78 _LIT8( KParamRefresh, "Refresh" ); |
|
79 _LIT8( KParamRefreshState, "RefreshState" ); |
|
80 _LIT8( KParamRemoteURI, "RemoteURI" ); |
|
81 _LIT8( KParamSecurityMechanisms, "SecurityMechanisms" ); |
|
82 _LIT8( KParamSecurityParams, "SecurityParams" ); |
|
83 _LIT8( KParamStackError, "StackError" ); |
|
84 _LIT8( KParamStackErrorMsg, "StackErrorMsg" ); |
|
85 _LIT8( KParamStatusCode, "StatusCode" ); |
|
86 _LIT8( KParamTimeout, "Timeout" ); |
|
87 _LIT8( KParamTransactionState, "TransactionState" ); |
|
88 _LIT8( KParamTransactionType, "TransactionType" ); |
|
89 _LIT8( KParamProfileEnabled, "ProfileEnabled" ); |
|
90 _LIT8( KParamProfileType, "ProfileType" ); |
|
91 _LIT8( KParamProfileClass, "Class" ); |
|
92 _LIT8( KParamProfileName, "ProfileName" ); |
|
93 _LIT8( KParamProfileAORs, "ProfileAORList" ); |
|
94 _LIT8( KParamProfileAOR, "ProfileAOR" ); |
|
95 _LIT8( KParamProfileHeaders, "ProfileHeadersList" ); |
|
96 _LIT8( KParamProfileHeaderParams, "ProfileHeaderParamsList" ); |
|
97 _LIT8( KParamProfilePrivateIdentity, "PrivateIdentity" ); |
|
98 _LIT8( KParamProfileSigComp, "SigComp" ); |
|
99 _LIT8( KParamProfileAutoRegistration, "AutoRegistration" ); |
|
100 _LIT8( KParamProfileSecurityNegotiation, "SecurityNegotiation" ); |
|
101 _LIT8( KParamNegotiatedSecMechanism, "NegotiatedSecMechanism" ); |
|
102 _LIT8( KParamProfileServer, "Server" ); |
|
103 _LIT8( KParamProfileAddress, "Address" ); |
|
104 _LIT8( KParamProfileServerParameter, "ServerParameter" ); |
|
105 _LIT8( KParamProfileParameter, "Parameter" ); |
|
106 _LIT8( KParamProfileExtensionParameter, "ExtensionParameter" ); |
|
107 _LIT8( KParamProfileServerExtensionParameter, "ServerExtensionParameter" ); |
|
108 _LIT8( KParamProfileValue, "Value" ); |
|
109 _LIT8( KParamProfileDefault, "ProfileDefault" ); |
|
110 _LIT8( KParamProfileId, "ProfileId" ); |
|
111 _LIT8( KParamProfileErrorCode, "ProfileErrorCode" ); |
|
112 _LIT8( KParamProfileRegStatus, "ProfileRegStatus" ); |
|
113 _LIT8( KParamProfileState, "ProfileState" ); |
|
114 _LIT8( KParamProfileProfileIdist, "ProfileIdList" ); |
|
115 _LIT8( KParamRegistryId, "RegistryId" ); |
|
116 _LIT8( KParamSourcePath, "src" ); |
|
117 _LIT8( KParamTestHang, "TestHang" ); |
|
118 _LIT8( KParamTestPanic, "TestPanic" ); |
|
119 _LIT8( KParamProxy, "Proxy" ); |
|
120 _LIT8( KInternet, "Internet" ); |
|
121 _LIT8( KIms, "Ims" ); |
|
122 _LIT8( KIETF, "IETF" ); |
|
123 _LIT8( KOther, "Other" ); |
|
124 _LIT8( KRegistrar, "Registrar" ); |
|
125 _LIT8( KOutboundProxy, "OutboundProxy" ); |
|
126 _LIT8( KDigestRealm, "DigestRealm" ); |
|
127 _LIT8( KDigestUsername, "DigestUsername" ); |
|
128 _LIT8( KDigestPassword, "DigestPassword" ); |
|
129 _LIT8( KParamAuthenticationNonce, "AuthenticationNonce" ); |
|
130 _LIT8( KParamAuthenticationRes, "AuthenticationRes" ); |
|
131 _LIT8( KParamAuthenticationIk, "AuthenticationIk" ); |
|
132 _LIT8( KParamAuthenticationCk, "AuthenticationCk" ); |
|
133 _LIT8( KParamAuthenticationAuts, "AuthenticationAuts" ); |
|
134 _LIT8( KParamUNSAFBindingRequestInterval, "BindingRequestInterval" ); |
|
135 _LIT8( KParamUNSAFUDPKeepaliveInterval, "UDPKeepAliveInterval" ); |
|
136 _LIT8( KParamUNSAFTCPKeepaliveInterval, "TCPKeepAliveInterval" ); |
|
137 _LIT8( KParamUNSAFEnableCRLFRefresh, "EnableCRLFRefresh" ); |
|
138 _LIT8( KParamUNSAFSharedSecretNotSupported, "SharedSecretNotSupported" ); |
|
139 _LIT8( KParamUNSAFBindingRequestFailed, "BindingRequestFailed" ); |
|
140 _LIT8( KParamDomainName, "DomainName" ); |
|
141 _LIT8( KParamSTUNServerDomain, "STUNServerDomain" ); |
|
142 _LIT8( KParamSTUNServerPort, "STUNServerPort" ); |
|
143 _LIT8( KParamClientMatchType, "ClientMatchType" ); |
|
144 _LIT8( KParamClientUserName, "ClientUserName" ); |
|
145 _LIT8( KParamRepositoryUid, "RepositoryUid" ); |
|
146 _LIT8( KParamRepositoryParameterKey, "RepositoryParameterKey" ); |
|
147 _LIT8( KParamRepositoryParameterValue, "RepositoryParameterValue" ); |
|
148 _LIT8( KParamRepositoryIntValue, "RepositoryIntValue" ); |
|
149 |
|
150 /// CTRL return value types |
|
151 _LIT8( KClientDiscoveryChannelResolved, "ChannelResolved" ); |
|
152 _LIT8( KClientDiscoveryClientNotFound, "ClientNotFound" ); |
|
153 _LIT8( KClientDiscoveryErrorOccured, "ErrorOccured" ); |
|
154 _LIT8( KConnectionId, "ConnectionId" ); |
|
155 _LIT8( KDialogId, "DialogId" ); |
|
156 _LIT8( KInviteDialogId, "InviteDialogId" ); |
|
157 _LIT8( KNotifyDialogId, "NotifyDialogId" ); |
|
158 _LIT8( KProfileId, "ProfileId" ); |
|
159 _LIT8( KReferDialogId, "ReferDialogId" ); |
|
160 _LIT8( KRefreshId, "RefreshId" ); |
|
161 _LIT8( KRegistrationId, "RegistrationId" ); |
|
162 _LIT8( KRegistryId, "RegistryId" ); |
|
163 _LIT8( KServerTransactionId, "ServerTransactionId" ); |
|
164 _LIT8( KSubscribeDialogId, "SubscribeDialogId" ); |
|
165 _LIT8( KTransactionId, "TransactionId" ); |
|
166 _LIT8( KProfilesIds, "ProfilesIDs" ); |
|
167 _LIT8( KProfileCreated, "ProfileCreated" ); |
|
168 _LIT8( KProfileUpdated, "ProfileUpdated" ); |
|
169 _LIT8( KProfileRegistrationStatusChanged, "ProfileRegistrationStatusChanged" ); |
|
170 _LIT8( KProfileDestroyed, "ProfileDestroyed" ); |
|
171 _LIT8( KProfileUnregistered, "ProfileUnregistered" ); |
|
172 _LIT8( KProfileRegistered, "ProfileRegistered" ); |
|
173 _LIT8( KProfileRegistryErrorOccurred, "ProfileRegistryErrorOccurred" ); |
|
174 _LIT8( KUnknown, "Unknown" ); |
|
175 _LIT8( KParamUsedMemory, "UsedMemory" ); |
|
176 _LIT8( KParamFreeMemory, "FreeMemory" ); |
|
177 |
|
178 /// Parameter names in a CTRL response |
|
179 _LIT8( KResponseTestClientIds, "TestClientIds" ); |
|
180 _LIT8( KResponseCode, "ResponseCode" ); |
|
181 _LIT8( KResponseHeaders, "Headers" ); |
|
182 _LIT8( KResponseActionReturnCode, "ActionReturnCode" ); |
|
183 |
|
184 // Misc |
|
185 _LIT8( KMethodRegister, "REGISTER" ); |
|
186 _LIT8( KMethodMessage, "MESSAGE" ); |
|
187 _LIT8( KNoHost, "NOHOST" ); |
|
188 _LIT( KInstallerPath, "c:\\" ); |
|
189 |
|
190 const TInt KSIPReasonOk( 200 ); |
|
191 const TInt KDefaultReceiveTimeout( 5 ); // 5 seconds |
|
192 const TInt KSecondAsMicros( 1000000 ); |
|
193 const TInt KMaxSecurityParamLength( 256 ); |
|
194 |
|
195 const TInt KSIPMessageAtIndex( 0 ); |
|
196 |
|
197 const TInt KFreezeAfterTimer( 3 ); // 3 seconds |
|
198 |
|
199 // - Error codes -------------------------------------------------------------- |
|
200 |
|
201 // SIP tester specific error codes |
|
202 const TInt KSIPErrBase( -100 ); |
|
203 const TInt KSIPErrQueueEmpty( KSIPErrBase - 1 ); |
|
204 const TInt KSIPErrInviteCanceled( KSIPErrBase - 2 ); |
|
205 const TInt KSIPErrOOMInNotifier( KSIPErrBase - 3 ); // actually only used as a panic |
|
206 const TInt KSIPErrMax( KSIPErrOOMInNotifier ); |
|
207 |
|
208 // SIP stack error descriptions (see TError in CSIP/sip.h) |
|
209 _LIT8( KSIPMalformedMessageErrMsg, "SIP message was malformed" ); |
|
210 _LIT8( KSIPRegistrarRespondedWithDifferentAORErrMsg, "Registrar responded with a different AOR (in the To-header)" ); |
|
211 _LIT8( KSIPRegistrarRespondedWithDifferentSipAddressInContactErrMsg, "Registrar modified Contact-header" ); |
|
212 _LIT8( KSIPRegistrarRespondedWithoutContactErrMsg, "Registrar responded without contact header" ); |
|
213 _LIT8( KSIPRequestPendingErrMsg, "Request pending" ); |
|
214 _LIT8( KSIPResponseWithExpiresZeroErrMsg, "The other end responded with expires value zero" ); |
|
215 _LIT8( KSIPResponseWithDifferentRemoteTagErrMsg, "The other end responded with a different tag in To-header" ); |
|
216 _LIT8( KSIPPortAlreadyInUseErrMsg, "Transport port is already in use" ); |
|
217 _LIT8( KSIPInvalidTransactionStateErrMsg, "The action can't be performed in the current transaction state" ); |
|
218 _LIT8( KSIPInvalidDialogStateErrMsg, "Not allowed in dialogs current state" ); |
|
219 _LIT8( KSIPInvalidDialogCreationRequestErrMsg, "Dialogs creation request invalid" ); |
|
220 _LIT8( KSIPInvalidDialogCreationResponseErrMsg, "Dialogs creation response invalid" ); |
|
221 _LIT8( KSIPInvalidResponseInDialogsErrMsg, "Response in dialogs invalid" ); |
|
222 _LIT8( KSIPInvalidRequestInDialogsErrMsg, "Request in dialogs invalid" ); |
|
223 _LIT8( KSIPOverlappingDialogRequestPendingErrMsg, "Overlapping request pending in a dialog" ); |
|
224 _LIT8( KSIPTransportFailureErrMsg, "Sending a SIP message failed. For example ICMP error occured" ); |
|
225 _LIT8( KSIPNoAckReceivedErrMsg, "No ACK was received after sending a 2xx response" ); |
|
226 _LIT8( KSIPInvalidRegistrationStateErrMsg, "Not allowed in registration's current state" ); |
|
227 _LIT8( KSIPInvalidContactErrMsg, "The contact given did not contain user part" ); |
|
228 _LIT8( KSIPResourceNotAvailableErrMsg, "Object can't access a resource, since that has been deleted by user. User is expected to delete this object as it can no longer be used." ); |
|
229 _LIT8( KSIPResolvingFailureErrMsg, "DNS query for the remote address failed" ); |
|
230 _LIT8( KSIPForbiddenErrMsg, "Authentication with a server failed" ); |
|
231 _LIT8( KSIPMaxCompartmentsInUseErrMsg, "Maximum number of SigComp compartments specified in the ini-file was exceeded" ); |
|
232 _LIT8( KSIPTerminatedWithResponseErrMsg, "Refresh initiated client transaction was terminated with 3xx, 4xx, 5xx or 6xx response." ); |
|
233 _LIT8( KSIPOutboundProxyNotRespondingErrMsg, "Outbound proxy not responding" ); |
|
234 _LIT8( KSIPInviteCanceledErrMsg, "Invite canceled" ); |
|
235 _LIT8( KSIPUnrecognizedErrMsg, "<unrecognized or non-SIP error code>" ); |
|
236 |
|
237 #endif // __SIPCONSTANTS_H__ |