|
1 /* |
|
2 * Copyright (c) 2005 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 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 #include <s32strm.h> // RWriteStream |
|
29 #include <SenXmlReader.h> |
|
30 #include "senvtcptransportproperties.h" |
|
31 #include "senpropertiesfragment.h" |
|
32 #include "MSenProperty.h" |
|
33 #include <SenXmlUtils.h> |
|
34 |
|
35 EXPORT_C CSenVtcpTransportProperties* CSenVtcpTransportProperties::NewL() |
|
36 { |
|
37 CSenVtcpTransportProperties* pNew = NewLC(); |
|
38 CleanupStack::Pop(); // pNew |
|
39 return pNew; |
|
40 } |
|
41 |
|
42 EXPORT_C CSenVtcpTransportProperties* CSenVtcpTransportProperties::NewLC() |
|
43 { |
|
44 CSenVtcpTransportProperties* pNew = new (ELeave) CSenVtcpTransportProperties; |
|
45 CleanupStack::PushL(pNew); |
|
46 |
|
47 // omit parsing by passing zero-length descriptor |
|
48 pNew->BaseConstructL(KSenXmlPropertiesLocalname, |
|
49 KNullDesC8, |
|
50 NULL); |
|
51 return pNew; |
|
52 } |
|
53 |
|
54 EXPORT_C CSenVtcpTransportProperties* CSenVtcpTransportProperties::NewL(const TDesC8& aXmlUtf8, |
|
55 CSenXmlReader& aParser) |
|
56 { |
|
57 CSenVtcpTransportProperties* pNew = NewLC(aXmlUtf8, aParser); |
|
58 CleanupStack::Pop(); // pNew |
|
59 return pNew; |
|
60 } |
|
61 |
|
62 EXPORT_C CSenVtcpTransportProperties* CSenVtcpTransportProperties::NewLC(const TDesC8& aXmlUtf8, |
|
63 CSenXmlReader& aParser) |
|
64 { |
|
65 CSenVtcpTransportProperties* pNew = new (ELeave) CSenVtcpTransportProperties; |
|
66 CleanupStack::PushL(pNew); |
|
67 |
|
68 // parse the XML document descriptor into DOM fragment |
|
69 pNew->BaseConstructL(KSenXmlPropertiesLocalname, |
|
70 aXmlUtf8, |
|
71 &aParser); |
|
72 return pNew; |
|
73 } |
|
74 |
|
75 EXPORT_C CSenVtcpTransportProperties* CSenVtcpTransportProperties::NewL(const CSenElement& aElement) |
|
76 { |
|
77 CSenVtcpTransportProperties* pNew = NewLC(aElement); |
|
78 CleanupStack::Pop(); // pNew |
|
79 return pNew; |
|
80 } |
|
81 |
|
82 EXPORT_C CSenVtcpTransportProperties* CSenVtcpTransportProperties::NewLC(const CSenElement& aElement) |
|
83 { |
|
84 CSenVtcpTransportProperties* pNew = new (ELeave) CSenVtcpTransportProperties; |
|
85 CleanupStack::PushL(pNew); |
|
86 |
|
87 // parse the XML document descriptor into DOM fragment |
|
88 pNew->BaseConstructL(aElement); |
|
89 return pNew; |
|
90 } |
|
91 |
|
92 void CSenVtcpTransportProperties::SetReader(CSenXmlReader& aReader) |
|
93 { |
|
94 CSenTransportProperties::SetReader(aReader); |
|
95 } |
|
96 |
|
97 MSenProperties::TSenPropertiesClassType CSenVtcpTransportProperties::PropertiesClassType() |
|
98 { |
|
99 return ESenVtcpTransportProperties; |
|
100 } |
|
101 |
|
102 void CSenVtcpTransportProperties::WriteToL(RWriteStream& aWriteStream) |
|
103 { |
|
104 CSenTransportProperties::WriteToL(aWriteStream); |
|
105 } |
|
106 |
|
107 void CSenVtcpTransportProperties::ReadFromL(const TDesC8& aBuffer) |
|
108 { |
|
109 CSenTransportProperties::ReadFromL(aBuffer); |
|
110 } |
|
111 |
|
112 HBufC8* CSenVtcpTransportProperties::AsUtf8L() |
|
113 { |
|
114 return CSenTransportProperties::AsUtf8L(); |
|
115 } |
|
116 |
|
117 HBufC8* CSenVtcpTransportProperties::AsUtf8LC() |
|
118 { |
|
119 return CSenTransportProperties::AsUtf8LC(); |
|
120 } |
|
121 |
|
122 TBool CSenVtcpTransportProperties::IsSafeToCast(TSenPropertiesClassType aClass) |
|
123 { |
|
124 if ( aClass == MSenProperties::ESenVtcpTransportProperties ) |
|
125 { |
|
126 return ETrue; |
|
127 } |
|
128 else |
|
129 { |
|
130 return CSenTransportProperties::IsSafeToCast(aClass); |
|
131 } |
|
132 } |
|
133 |
|
134 TInt CSenVtcpTransportProperties::SetPropertyL(const TDesC8& aName, |
|
135 const TDesC8& aValue, |
|
136 const TDesC8& aType) |
|
137 { |
|
138 return CSenTransportProperties::SetPropertyL(aName, aValue, aType); |
|
139 } |
|
140 |
|
141 TInt CSenVtcpTransportProperties::PropertyL(const TDesC8& aName, |
|
142 TPtrC8& aValue, |
|
143 TPtrC8& aType) |
|
144 { |
|
145 return CSenTransportProperties::PropertyL(aName, aValue, aType); |
|
146 } |
|
147 |
|
148 |
|
149 TInt CSenVtcpTransportProperties::SetPropertyL(const TDesC8& aName, |
|
150 const TDesC8& aValue) |
|
151 { |
|
152 return CSenTransportProperties::SetPropertyL(aName, aValue); |
|
153 } |
|
154 |
|
155 TInt CSenVtcpTransportProperties::PropertyL(const TDesC8& aName, |
|
156 TPtrC8& aValue) |
|
157 { |
|
158 return CSenTransportProperties::PropertyL(aName, aValue); |
|
159 } |
|
160 |
|
161 TInt CSenVtcpTransportProperties::SetIntPropertyL(const TDesC8& aName, |
|
162 const TInt aValue) |
|
163 { |
|
164 return CSenTransportProperties::SetIntPropertyL(aName, aValue); |
|
165 } |
|
166 |
|
167 TInt CSenVtcpTransportProperties::IntPropertyL(const TDesC8& aName, |
|
168 TInt& aValue) |
|
169 { |
|
170 return CSenTransportProperties::IntPropertyL(aName, aValue); |
|
171 } |
|
172 |
|
173 TInt CSenVtcpTransportProperties::SetBoolPropertyL(const TDesC8& aName, |
|
174 const TBool aValue) |
|
175 { |
|
176 return CSenTransportProperties::SetBoolPropertyL(aName, aValue); |
|
177 } |
|
178 |
|
179 TInt CSenVtcpTransportProperties::BoolPropertyL(const TDesC8& aName, |
|
180 TBool& aValue) |
|
181 { |
|
182 return CSenTransportProperties::BoolPropertyL(aName, aValue); |
|
183 } |
|
184 |
|
185 CSenVtcpTransportProperties::~CSenVtcpTransportProperties() |
|
186 { |
|
187 } |
|
188 |
|
189 void CSenVtcpTransportProperties::BaseConstructL(const TDesC8& aLocalname, |
|
190 const TDesC8& aXml, |
|
191 CSenXmlReader* aParser) |
|
192 { |
|
193 CSenTransportProperties::BaseConstructL(aLocalname, aXml, aParser); |
|
194 } |
|
195 |
|
196 void CSenVtcpTransportProperties::BaseConstructL(const CSenElement& aElement) |
|
197 { |
|
198 CSenTransportProperties::BaseConstructL(aElement); |
|
199 } |
|
200 |
|
201 CSenVtcpTransportProperties::CSenVtcpTransportProperties() |
|
202 { |
|
203 } |
|
204 |
|
205 TInt CSenVtcpTransportProperties::DeviceLCIDL(TPtrC8& aDeviceLCID) |
|
206 { |
|
207 return PropertyL(KDeviceLCIDLocalName, aDeviceLCID); |
|
208 } |
|
209 |
|
210 void CSenVtcpTransportProperties::SetDeviceLCIDL(const TDesC8& aDeviceLCID) |
|
211 { |
|
212 SetPropertyL(KDeviceLCIDLocalName, aDeviceLCID); |
|
213 } |
|
214 |
|
215 TInt CSenVtcpTransportProperties::ConnectionBoundL(TBool& aConnectionBound) |
|
216 { |
|
217 return BoolPropertyL(KConnectionBoundLocalName, aConnectionBound); |
|
218 } |
|
219 |
|
220 void CSenVtcpTransportProperties::SetConnectionBoundL(const TBool& aConnectionBound) |
|
221 { |
|
222 SetBoolPropertyL(KConnectionBoundLocalName, aConnectionBound); |
|
223 } |
|
224 |
|
225 TInt CSenVtcpTransportProperties::ConnectionTimeOutL(TInt& aConnectionTimeOut) |
|
226 { |
|
227 return IntPropertyL(KConnectionTimeOutLocalName, aConnectionTimeOut); |
|
228 } |
|
229 |
|
230 void CSenVtcpTransportProperties::SetConnectionTimeOutL(const TInt& aConnectionTimeOut) |
|
231 { |
|
232 SetIntPropertyL(KConnectionTimeOutLocalName, aConnectionTimeOut); |
|
233 } |
|
234 |
|
235 //override |
|
236 TInt CSenVtcpTransportProperties::IapIdL(TUint32& aCurrentIapId) |
|
237 { |
|
238 return CSenTransportProperties::IapIdL(aCurrentIapId); |
|
239 } |
|
240 |
|
241 void CSenVtcpTransportProperties::SetIapIdL(TUint32 aIapId) |
|
242 { |
|
243 CSenTransportProperties::SetIapIdL(aIapId); |
|
244 } |
|
245 |
|
246 void CSenVtcpTransportProperties::SetSnapIdL(TUint32 aSnapId) |
|
247 { |
|
248 CSenTransportProperties::SetSnapIdL(aSnapId); |
|
249 } |
|
250 |
|
251 TInt CSenVtcpTransportProperties::SnapIdL(TUint32& aCurrentSnapId) |
|
252 { |
|
253 return CSenTransportProperties::SnapIdL(aCurrentSnapId); |
|
254 } |
|
255 |
|
256 TInt CSenVtcpTransportProperties::ProxyPortL(TInt& aProxyPort) |
|
257 { |
|
258 return CSenTransportProperties::ProxyPortL(aProxyPort); |
|
259 } |
|
260 |
|
261 void CSenVtcpTransportProperties::SetProxyPortL(TInt aProxyPort) |
|
262 { |
|
263 CSenTransportProperties::SetProxyPortL(aProxyPort); |
|
264 } |
|
265 |
|
266 TInt CSenVtcpTransportProperties::ProxyHostL(TPtrC8& aProxyHost) |
|
267 { |
|
268 return CSenTransportProperties::ProxyHostL(aProxyHost); |
|
269 } |
|
270 |
|
271 void CSenVtcpTransportProperties::SetProxyHostL(const TDesC8& aProxyHost) |
|
272 { |
|
273 CSenTransportProperties::SetProxyHostL(aProxyHost); |
|
274 } |
|
275 |
|
276 TInt CSenVtcpTransportProperties::ProxyUsageL(TBool& aValue) |
|
277 { |
|
278 return CSenTransportProperties::ProxyUsageL(aValue); |
|
279 } |
|
280 |
|
281 void CSenVtcpTransportProperties::SetProxyUsageL(TBool aProxyUsage) |
|
282 { |
|
283 CSenTransportProperties::SetProxyUsageL(aProxyUsage); |
|
284 } |
|
285 |
|
286 TInt CSenVtcpTransportProperties::SecureDialogL(TBool& aValue) |
|
287 { |
|
288 return CSenTransportProperties::SecureDialogL(aValue); |
|
289 } |
|
290 |
|
291 void CSenVtcpTransportProperties::SetSecureDialogL(TBool aSecureDialog) |
|
292 { |
|
293 CSenTransportProperties::SetSecureDialogL(aSecureDialog); |
|
294 } |
|
295 |
|
296 TInt CSenVtcpTransportProperties::UserAgentL(TPtrC8& aUserAgent) |
|
297 { |
|
298 return CSenTransportProperties::UserAgentL(aUserAgent); |
|
299 } |
|
300 |
|
301 void CSenVtcpTransportProperties::SetUserAgentL(const TDesC8& aUserAgent) |
|
302 { |
|
303 CSenTransportProperties::SetUserAgentL(aUserAgent); |
|
304 } |
|
305 |
|
306 |
|
307 TInt CSenVtcpTransportProperties::DeviceIDL(TPtrC8& aDeviceID) |
|
308 { |
|
309 return CSenTransportProperties::DeviceIDL(aDeviceID); |
|
310 } |
|
311 |
|
312 void CSenVtcpTransportProperties::SetDeviceIDL(const TDesC8& aDeviceID) |
|
313 { |
|
314 CSenTransportProperties::SetDeviceIDL(aDeviceID); |
|
315 } |
|
316 |
|
317 TInt CSenVtcpTransportProperties::SoapActionL(TPtrC8& aAction) |
|
318 { |
|
319 return CSenTransportProperties::SoapActionL(aAction); |
|
320 } |
|
321 |
|
322 void CSenVtcpTransportProperties::SetSoapActionL(const TDesC8& aAction) |
|
323 { |
|
324 CSenTransportProperties::SetSoapActionL(aAction); |
|
325 } |
|
326 |
|
327 void CSenVtcpTransportProperties::ApplyBindingL(TSOAPVersion aSoapVersion) |
|
328 { |
|
329 CSenTransportProperties::ApplyBindingL(aSoapVersion); |
|
330 } |
|
331 |
|
332 TInt CSenVtcpTransportProperties::DownloadFolderL(TPtrC8& aDownloadFolder) |
|
333 { |
|
334 return CSenTransportProperties::DownloadFolderL(aDownloadFolder); |
|
335 } |
|
336 |
|
337 void CSenVtcpTransportProperties::SetDownloadFolderL(const TDesC8& aDownloadFolder) |
|
338 { |
|
339 CSenTransportProperties::SetDownloadFolderL(aDownloadFolder); |
|
340 } |
|
341 |
|
342 TInt CSenVtcpTransportProperties::FileAttachmentL(const TDesC8& aCid, HBufC8*& aFileName) |
|
343 { |
|
344 return CSenTransportProperties::FileAttachmentL(aCid, aFileName); |
|
345 } |
|
346 |
|
347 TInt CSenVtcpTransportProperties::SetFileAttachmentL(const TDesC8& aCid, const TDesC8& aFileName) |
|
348 { |
|
349 return CSenTransportProperties::SetFileAttachmentL(aCid, aFileName); |
|
350 } |
|
351 |
|
352 MSenProperties* CSenVtcpTransportProperties::CloneL() const |
|
353 { |
|
354 CSenElement& element = ipFragment->AsElement(); |
|
355 |
|
356 CSenVtcpTransportProperties* pProperties = NewLC(element); |
|
357 CleanupStack::Pop(pProperties); |
|
358 return pProperties; |
|
359 } |
|
360 |
|
361 TInt CSenVtcpTransportProperties::MwsNamespaceL( TPtrC8& aMwsNamespace ) |
|
362 { |
|
363 return CSenTransportProperties::MwsNamespaceL(aMwsNamespace); |
|
364 } |
|
365 |
|
366 void CSenVtcpTransportProperties::SetMwsNamespaceL( const TDesC8& aMwsNamespace ) |
|
367 { |
|
368 CSenTransportProperties::SetMwsNamespaceL(aMwsNamespace); |
|
369 } |
|
370 |
|
371 TInt CSenVtcpTransportProperties::MessageIdL( TPtrC8& aMessageId ) |
|
372 { |
|
373 return CSenTransportProperties::MessageIdL( aMessageId ); |
|
374 } |
|
375 |
|
376 void CSenVtcpTransportProperties::SetMessageIdL( const TDesC8& aMessageId ) |
|
377 { |
|
378 CSenTransportProperties::SetMessageIdL( aMessageId ); |
|
379 } |
|
380 |
|
381 TInt CSenVtcpTransportProperties::OnewayMessageOnOffL( TBool& aOnewayMessageOnOff ) |
|
382 { |
|
383 return CSenTransportProperties::OnewayMessageOnOffL( aOnewayMessageOnOff ); |
|
384 } |
|
385 |
|
386 void CSenVtcpTransportProperties::SetOnewayMessageOnOffL( TBool aOnewayMessageOnOff ) |
|
387 { |
|
388 CSenTransportProperties::SetOnewayMessageOnOffL( aOnewayMessageOnOff ); |
|
389 } |
|
390 |
|
391 TInt CSenVtcpTransportProperties::HeartbeatL(TInt& aHeartbeat) |
|
392 { |
|
393 return CSenTransportProperties::HeartbeatL( aHeartbeat ); |
|
394 } |
|
395 |
|
396 TInt CSenVtcpTransportProperties::SetHeartbeatL(TInt aHeartbeat) |
|
397 { |
|
398 return CSenTransportProperties::SetHeartbeatL( aHeartbeat ); |
|
399 } |
|
400 |
|
401 TInt CSenVtcpTransportProperties::SetMaxTimeToLiveL(TInt aMaxTTL) |
|
402 { |
|
403 return CSenTransportProperties::SetMaxTimeToLiveL( aMaxTTL ); |
|
404 } |
|
405 |
|
406 TInt CSenVtcpTransportProperties::MaxTimeToLiveL(TInt& aMaxTTL) |
|
407 { |
|
408 return CSenTransportProperties::MaxTimeToLiveL( aMaxTTL ); |
|
409 } |
|
410 |
|
411 TInt CSenVtcpTransportProperties::SetMinTimeToLiveL(TInt aMinTTL) |
|
412 { |
|
413 return CSenTransportProperties::SetMinTimeToLiveL( aMinTTL ); |
|
414 } |
|
415 |
|
416 TInt CSenVtcpTransportProperties::MinTimeToLiveL(TInt& aMinTTL) |
|
417 { |
|
418 return CSenTransportProperties::MinTimeToLiveL( aMinTTL ); |
|
419 } |
|
420 |
|
421 TInt CSenVtcpTransportProperties::SetMaxRetryTTLL(TInt aMaxRetryTTL) |
|
422 { |
|
423 return SetIntPropertyL( KSenConnectionRetryMaxTTL, aMaxRetryTTL ); |
|
424 } |
|
425 |
|
426 TInt CSenVtcpTransportProperties::MaxRetryTTLL(TInt& aMaxRetryTTL) |
|
427 { |
|
428 return IntPropertyL( KSenConnectionRetryMaxTTL, aMaxRetryTTL ); |
|
429 } |
|
430 |
|
431 TInt CSenVtcpTransportProperties::SetMinRetryTTLL(TInt aMinRetryTTL) |
|
432 { |
|
433 return SetIntPropertyL( KSenConnectionRetryMinTTL, aMinRetryTTL ); |
|
434 } |
|
435 |
|
436 TInt CSenVtcpTransportProperties:: MinRetryTTLL(TInt& aMinRetryTTL) |
|
437 { |
|
438 return IntPropertyL( KSenConnectionRetryMinTTL, aMinRetryTTL ); |
|
439 } |
|
440 |
|
441 TInt CSenVtcpTransportProperties::SetRetryDeltaTimeoutL(TInt aTimeout) |
|
442 { |
|
443 return SetIntPropertyL( KSenConnectionRetryDelta, aTimeout ); |
|
444 } |
|
445 |
|
446 TInt CSenVtcpTransportProperties::RetryDeltaTimeoutL(TInt& aTimeout) |
|
447 { |
|
448 return IntPropertyL( KSenConnectionRetryDelta, aTimeout ); |
|
449 } |
|
450 |
|
451 |
|
452 |
|
453 |
|
454 // END OF FILE |
|
455 |
|
456 |