|
1 /* |
|
2 * Copyright (c) 2009-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: Holds default values for VoIP XML Processor. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef VOIPXMLPROCESSORDEFAULTS_H |
|
20 #define VOIPXMLPROCESSORDEFAULTS_H |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 // ============================== |
|
25 // XML constants |
|
26 // ============================== |
|
27 // |
|
28 // Node names. |
|
29 _LIT( KNodeNokiaConfDoc, "nokia-confdoc" ); |
|
30 _LIT( KNodeConfDescription, "confdescription" ); |
|
31 _LIT( KNodeConfBrandUrl, "confbrandurl" ); |
|
32 _LIT( KNodeSettings, "settings" ); |
|
33 _LIT( KNodeParam, "param" ); |
|
34 // Node attributes. |
|
35 _LIT( KAttributeType, "type" ); |
|
36 _LIT( KAttributeName, "name" ); |
|
37 _LIT( KAttributeValue, "value" ); |
|
38 // Setting types (i.e. supported values for 'type' attribute). |
|
39 _LIT( KSettingsTypeVoip, "voip" ); |
|
40 _LIT( KSettingsTypeSip, "sip" ); |
|
41 _LIT( KSettingsTypePresence, "presence" ); |
|
42 _LIT( KSettingsTypeXdm, "xdm" ); |
|
43 _LIT( KSettingsTypeNatFw, "natfw" ); |
|
44 _LIT( KSettingsTypeWlan, "wlan" ); |
|
45 _LIT( KSettingsTypeCodec, "codec" ); |
|
46 _LIT( KSettingsTypeVmbx, "voicemailbox" ); |
|
47 _LIT( KSettingsTypeProxy, "proxy" ); |
|
48 _LIT( KSettingsTypeRegistrar, "registrar" ); |
|
49 _LIT( KSettingsTypeAdditionalStun, "additionalstun" ); |
|
50 _LIT( KSettingsTypeWepKey, "wepkey" ); |
|
51 _LIT( KSettingsTypeDestination, "destination" ); |
|
52 _LIT( KSettingsTypeEap, "eap" ); |
|
53 // Parameter names (i.e. supported values for 'value' attribute). |
|
54 // Generic. |
|
55 _LIT( KParamValueName, "name" ); |
|
56 _LIT( KParamValueUri, "uri" ); |
|
57 _LIT( KParamValueTransport, "transport" ); |
|
58 _LIT( KParamValuePort, "port" ); |
|
59 _LIT( KParamValueUsername, "username" ); |
|
60 _LIT( KParamValuePassword, "password" ); |
|
61 _LIT( KParamValueType, "type" ); |
|
62 _LIT( KParamValueDomain, "domain" ); |
|
63 _LIT( KParamValueStartPort, "startport" ); |
|
64 _LIT( KParamValueEndPort, "endport" ); |
|
65 // VoIP specific. |
|
66 _LIT( KParamValueMediaQos, "mediaqos" ); |
|
67 _LIT( KParamValueDtmfInband, "dtmfinband" ); |
|
68 _LIT( KParamValueDtmfOutband, "dtmfoutband" ); |
|
69 _LIT( KParamValueSecureCallPref, "securecallpreference" ); |
|
70 _LIT( KParamValueVoipOverWcdma, "allowvoipoverwcdma" ); |
|
71 _LIT( KParamValueRtcp, "rtcp" ); |
|
72 _LIT( KParamValueUserAgentTerminalType, "useragentterminaltype" ); |
|
73 _LIT( KParamValueUserAgentWlanMac, "useragentwlanmac" ); |
|
74 _LIT( KParamValueUserAgentFreeString, "useragentfreestring" ); |
|
75 _LIT( KParamValueCallerIdDigits, "calleriddigits" ); |
|
76 _LIT( KParamValueIgnoreDomainPart, "ignoredomainpart" ); |
|
77 _LIT( KParamValueAutoAcceptBuddyRequests, "autoacceptbuddyrequests" ); |
|
78 _LIT( KParamValueAddUserPhone, "adduserphone" ); |
|
79 _LIT( KParamValueProviderUrl, "providerurl" ); |
|
80 _LIT( KParamValueMinSessionInterval, "minsessioninterval" ); |
|
81 _LIT( KParamValueSessionInterval, "sessioninterval" ); |
|
82 _LIT( KParamValueBrandingUri, "brandinguri" ); |
|
83 _LIT( KParamValueAutoEnable, "autoenable" ); |
|
84 _LIT( KParamValueEnableSipIm, "enablesipim" ); |
|
85 _LIT( KParamValueBrandId, "brandid" ); |
|
86 _LIT( KParamValueDefault, "default" ); |
|
87 // Voice mailbox specific. |
|
88 _LIT( KParamValueMwiUri, "mwiuri" ); |
|
89 _LIT( KParamValueListeningUri, "listeninguri" ); |
|
90 _LIT( KParamValueReSubscribeInterval, "resubscribeinterval" ); |
|
91 // Codec specific |
|
92 _LIT( KParamValueJitterBuffer, "jitterbuffer" ); |
|
93 _LIT( KParamValueOctetAlign, "octetalign" ); |
|
94 _LIT( KParamValuePTime, "ptime" ); |
|
95 _LIT( KParamValueMaxPTime, "maxptime" ); |
|
96 _LIT( KParamValueModeSet, "modeset" ); |
|
97 _LIT( KParamValueModeChangePeriod, "modechangeperiod" ); |
|
98 _LIT( KParamValueModeChangeNeighbor, "modechangeneighbor" ); |
|
99 _LIT( KParamValueMaxRed, "maxred" ); |
|
100 _LIT( KParamValueVad, "vad" ); |
|
101 _LIT( KParamValueAnnexB, "annexb" ); |
|
102 // SIP specific |
|
103 _LIT( KParamValueSignalingQos, "signalingqos" ); |
|
104 _LIT( KParamValuePublicUserId, "publicuserid" ); |
|
105 _LIT( KParamValueSignalCompression, "signalcompression" ); |
|
106 _LIT( KParamValueSecurityNegotiation, "securitynegotiation" ); |
|
107 _LIT( KParamValueProfileLock, "profilelock" ); |
|
108 _LIT( KParamValueAutoRegistration, "autoregistration" ); |
|
109 // Proxy |
|
110 _LIT( KParamValueLooseRouting, "looserouting" ); |
|
111 // Presence specific |
|
112 _LIT( KParamValueMaxObjectSize, "maxobjectsize" ); |
|
113 _LIT( KParamValuePublishInterval, "publishinterval" ); |
|
114 _LIT( KParamValueMaxSubscriptions, "maxsubscriptions" ); |
|
115 _LIT( KParamValueMaxContacts, "maxcontacts" ); |
|
116 _LIT( KParamValueDomainSyntax, "domainsyntax" ); |
|
117 // NAT/FW sepcific |
|
118 _LIT( KParamValueTcpRefreshInterval, "tcprefreshinterval" ); |
|
119 _LIT( KParamValueUdpRefreshInterval, "udprefreshinterval" ); |
|
120 _LIT( KParamValueCrlfRefresh, "crlfrefresh" ); |
|
121 _LIT( KParamValueStunSharedSecret, "stunsharedsecret" ); |
|
122 // Access point specific |
|
123 _LIT( KParamSsid, "ssid" ); |
|
124 _LIT( KParamHidden, "hidden" ); |
|
125 _LIT( KParamNetworkMode, "networkmode" ); |
|
126 _LIT( KParamPreSharedKey, "presharedkey" ); |
|
127 _LIT( KParamWepAuthMode, "wepauthmode" ); |
|
128 // WEP |
|
129 _LIT( KParamLength, "length" ); |
|
130 _LIT( KParamData, "data" ); |
|
131 |
|
132 // Other. |
|
133 const TInt KMaxNodeNameLength = 32; |
|
134 const TInt KMaxDestinationNameLength = 32; |
|
135 const TInt KSpaceForParenthesis = 4; |
|
136 const TInt KMaxNodeValueLength = 256; |
|
137 const TInt KMaxProfileNameAppendLength = 4; // e.g. (10) as in Provider(10) |
|
138 const TInt KMaxProfileNames = 99; |
|
139 _LIT( KOpenParenthesis, "(" ); |
|
140 _LIT( KClosedParenthesis, ")" ); |
|
141 const TUint KComma = ','; |
|
142 |
|
143 // ============================== |
|
144 // VoIP constants |
|
145 // ============================== |
|
146 // |
|
147 _LIT( KILbc, "ILBC" ); |
|
148 const TInt KDefaultResubscribe = 600; |
|
149 |
|
150 // ============================== |
|
151 // SIP constants |
|
152 // ============================== |
|
153 // |
|
154 _LIT8( KIetf, "IETF" ); |
|
155 _LIT8( KIms, "IMS" ); |
|
156 _LIT8( KOpenParenthesis8, "(" ); |
|
157 _LIT8( KClosedParenthesis8, ")" ); |
|
158 _LIT8( KSip, "sip:" ); |
|
159 _LIT8( KSips, "sips:" ); |
|
160 _LIT8( KTransport, ";transport=" ); |
|
161 _LIT8( KLr, ";lr" ); |
|
162 _LIT8( KEscaped, "%" ); |
|
163 _LIT8( KColon, ":" ); |
|
164 _LIT8( KTcp, "TCP" ); |
|
165 _LIT8( KUdp, "UDP" ); |
|
166 _LIT8( KTls, "TLS" ); |
|
167 _LIT8( KUserAgent, "User-Agent" ); |
|
168 _LIT8( KSpace, " " ); |
|
169 const TInt KMaxTerminalTypeLength = 64; |
|
170 const TInt KMaxWlanMacAddressLength = 20; |
|
171 const TInt KMaxUserAgentHeaderLength = 200; |
|
172 const TInt KUserAgentHeaderDataArrayInitSize = 4; |
|
173 const TInt KDefaultSigQos = 40; |
|
174 |
|
175 // ============================== |
|
176 // XDM and Presence constants |
|
177 // ============================== |
|
178 // |
|
179 const TInt KMaxObjectSize = 5120; |
|
180 const TInt KPublishInterval = 60; |
|
181 _LIT( KDefaultXdmUri, "http://localhost" ); |
|
182 _LIT( KDefaultXdmAuthType, "HTTP-DIGEST" ); |
|
183 |
|
184 // ============================== |
|
185 // NAT/Firewall constants |
|
186 // ============================== |
|
187 // |
|
188 const TInt KDefaultStunServerPort = 3478; |
|
189 const TInt KDefaultTcpRefreshInterval = 1200; |
|
190 const TInt KDefaultUdpRefreshInterval = 28; |
|
191 const TInt KDefaultStartPortRange = 49152; |
|
192 const TInt KDefaultEndPortRange = 49200; |
|
193 _LIT( KDefaultNatProtocol, "nokia.stun" ); |
|
194 |
|
195 // ============================== |
|
196 // WLAN access point constants. |
|
197 // ============================== |
|
198 // |
|
199 const TInt KMaxWepKeyDataLength = 26; |
|
200 const TInt KMaxWepKeyCount = 4; |
|
201 // Enumeration for WEP key lengths. |
|
202 enum TWepKeyLengths |
|
203 { |
|
204 // Length of WEP encryption |
|
205 EWepEncryption64 = 64, |
|
206 EWepEncryption128 = 128, |
|
207 // Length of WEP key data |
|
208 EWepKey64Hex = 10, |
|
209 EWepKey64Ascii = 5, |
|
210 EWepKey128Hex = KMaxWepKeyDataLength, |
|
211 EWepKey128Ascii = 13 |
|
212 }; |
|
213 _LIT( KNetworkModeInfra, "infra" ); |
|
214 _LIT( KNetworkModeAdhoc, "adhoc" ); |
|
215 _LIT( KSecurityTypeWep, "WEP" ); |
|
216 _LIT( KSecurityTypeWpa, "WPA" ); |
|
217 _LIT( KSecurityTypeWpa2, "WPA2" ); |
|
218 _LIT( KSecurityType8021x, "8021X" ); |
|
219 _LIT( KEapTypeLeap, "LEAP" ); |
|
220 _LIT( KWepAuthModeOpen, "open" ); |
|
221 _LIT( KWepAuthModeShared, "shared" ); |
|
222 |
|
223 // ============================== |
|
224 // General constants |
|
225 // ============================== |
|
226 // |
|
227 // Enumeration for type of settings being deployed. |
|
228 enum TSettingsType |
|
229 { |
|
230 EUnknown = KErrNotSupported, |
|
231 EVoip = 0, |
|
232 ESip, |
|
233 EPresence, |
|
234 EXdm, |
|
235 ENatFw, |
|
236 EDestination, |
|
237 EWlan, |
|
238 ECodec, |
|
239 EVmbx, |
|
240 EProxy, |
|
241 ERegistrar, |
|
242 EAdditionalStun, |
|
243 EWepKey, |
|
244 EEap |
|
245 }; |
|
246 |
|
247 // Enumeration for parameters. |
|
248 enum TParameters |
|
249 { |
|
250 EUnSupported = KErrNotSupported, |
|
251 // Generic parameters |
|
252 EName = 0, |
|
253 EUri, |
|
254 ETransport, |
|
255 EPort, |
|
256 EUsername, |
|
257 EPassword, |
|
258 EType, |
|
259 EDomain, |
|
260 EStartPort, |
|
261 EEndPort, |
|
262 // VoIP parameters |
|
263 EMediaQos, |
|
264 EDtmfInband, |
|
265 EDtmfOutband, |
|
266 ESecureCallPreference, |
|
267 EAllowVoipOverWcdma, |
|
268 ERtcp, |
|
269 EUserAgentHeaderTerminalType, |
|
270 EUserAgentHeaderWlanMac, |
|
271 EUserAgentHeaderFreeString, |
|
272 ECallerIdDigits, |
|
273 EIgnoreDomainPart, |
|
274 EAutoAcceptBuddyRequests, |
|
275 EAddUserPhone, |
|
276 EProviderUrl, |
|
277 EMinSessionInterval, |
|
278 ESessionInterval, |
|
279 EBrandingUri, |
|
280 EAutoEnable, |
|
281 EEnableSipIm, |
|
282 EBrandId, |
|
283 EDefault, |
|
284 // Voice mailbox parameters |
|
285 EMwiUri, |
|
286 EListeningUri, |
|
287 EReSubscribeInterval, |
|
288 // Codec parameters |
|
289 EJitterBuffer, |
|
290 EOctetAlign, |
|
291 EPTime, |
|
292 EMaxPTime, |
|
293 EModeSet, |
|
294 EModeChangePeriod, |
|
295 EModeChangeNeighbor, |
|
296 EMaxRed, |
|
297 EVad, |
|
298 EAnnexb, |
|
299 // SIP parameters |
|
300 ESignalingQos, |
|
301 EPublicUserId, |
|
302 ESignalCompression, |
|
303 ESecurityNegotiation, |
|
304 EProfileLock, |
|
305 EAutoRegistration, |
|
306 // Proxy parameters |
|
307 ELooseRouting, |
|
308 // Presence parameters |
|
309 EMaxObjectSize, |
|
310 EPublishInterval, |
|
311 EMaxSubscriptions, |
|
312 EMaxContacts, |
|
313 EDomainSyntax, |
|
314 // NAT/Firewall parameters |
|
315 ETcpRefreshInterval, |
|
316 EUdpRefreshInterval, |
|
317 ECrlfRefresh, |
|
318 EStunSharedSecret, |
|
319 // WLAN access point parameters |
|
320 ESsid, |
|
321 EHidden, |
|
322 ENetworkMode, |
|
323 EPreSharedKey, |
|
324 EWepAuthMode, |
|
325 // WEP key parameters |
|
326 ELength, |
|
327 EData |
|
328 }; |
|
329 |
|
330 #endif // VOIPXMLPROCESSORDEFAULTS_H |
|
331 |
|
332 // End of file |