|
1 // Copyright (c) 2007-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 /** |
|
17 @file |
|
18 @internalTechnology |
|
19 |
|
20 */ |
|
21 |
|
22 #include "suplmessagecommon.h" |
|
23 #include "supldevloggermacros.h" |
|
24 |
|
25 /** |
|
26 * Supl IPAddress container |
|
27 */ |
|
28 EXPORT_C CSuplIpAddress* CSuplIpAddress::NewL() |
|
29 { |
|
30 SUPLLOG(ELogP1, "CSuplIpAddress::NewL() Begin\n"); |
|
31 CSuplIpAddress* self = CSuplIpAddress::NewLC(); |
|
32 SUPLLOG(ELogP1, "CSuplIpAddress::NewL() End\n"); |
|
33 CleanupStack::Pop(self); |
|
34 return self; |
|
35 } |
|
36 |
|
37 EXPORT_C CSuplIpAddress* CSuplIpAddress::NewLC() |
|
38 { |
|
39 SUPLLOG(ELogP1, "CSuplIpAddress::NewLC() Begin\n"); |
|
40 CSuplIpAddress* self = new (ELeave) CSuplIpAddress(); |
|
41 CleanupStack::PushL(self); |
|
42 self->ConstructL(); |
|
43 SUPLLOG(ELogP1, "CSuplIpAddress::NewLC() End\n"); |
|
44 return self; |
|
45 } |
|
46 |
|
47 EXPORT_C CSuplIpAddress::~CSuplIpAddress() |
|
48 { |
|
49 SUPLLOG(ELogP1, "CSuplIpAddress::~CSuplIpAddress() Begin\n"); |
|
50 SUPLLOG(ELogP1, "CSuplIpAddress::~CSuplIpAddress() End\n"); |
|
51 } |
|
52 |
|
53 EXPORT_C TBool CSuplIpAddress::operator==(const CSuplIpAddress& other) const |
|
54 { |
|
55 return (iIpAddressType==other.iIpAddressType && |
|
56 iIpAddress==other.iIpAddress); |
|
57 } |
|
58 |
|
59 CSuplIpAddress::CSuplIpAddress() |
|
60 { |
|
61 } |
|
62 |
|
63 void CSuplIpAddress::ConstructL() |
|
64 { |
|
65 } |
|
66 |
|
67 |
|
68 /** |
|
69 * Supl FQDN container |
|
70 */ |
|
71 EXPORT_C CSuplFqdn* CSuplFqdn::NewL() |
|
72 { |
|
73 SUPLLOG(ELogP1, "CSuplFqdn::NewL() Begin\n"); |
|
74 CSuplFqdn* self = new (ELeave) CSuplFqdn(); |
|
75 CleanupStack::PushL(self); |
|
76 self->ConstructL(); |
|
77 SUPLLOG(ELogP1, "CSuplFqdn::NewL() End\n"); |
|
78 CleanupStack::Pop(self); |
|
79 return self; |
|
80 } |
|
81 |
|
82 EXPORT_C CSuplFqdn::~CSuplFqdn() |
|
83 { |
|
84 SUPLLOG(ELogP1, "CSuplFqdn::~CSuplFqdn() Begin\n"); |
|
85 SUPLLOG(ELogP1, "CSuplFqdn::~CSuplFqdn() End\n"); |
|
86 } |
|
87 |
|
88 EXPORT_C TBool CSuplFqdn::operator==(const CSuplFqdn& other) const |
|
89 { |
|
90 return (iFqdn==other.iFqdn); |
|
91 } |
|
92 |
|
93 CSuplFqdn::CSuplFqdn() |
|
94 { |
|
95 } |
|
96 |
|
97 void CSuplFqdn::ConstructL() |
|
98 { |
|
99 } |
|
100 |
|
101 |
|
102 /** |
|
103 * Supl SLP Address container |
|
104 */ |
|
105 EXPORT_C CSuplSlpAddress* CSuplSlpAddress::NewL() |
|
106 { |
|
107 SUPLLOG(ELogP1, "CSuplSlpAddress::NewL() Begin\n"); |
|
108 CSuplSlpAddress* self = new (ELeave) CSuplSlpAddress(); |
|
109 CleanupStack::PushL(self); |
|
110 self->ConstructL(); |
|
111 SUPLLOG(ELogP1, "CSuplSlpAddress::NewL() End\n"); |
|
112 CleanupStack::Pop(self); |
|
113 return self; |
|
114 } |
|
115 |
|
116 EXPORT_C CSuplSlpAddress::~CSuplSlpAddress() |
|
117 { |
|
118 SUPLLOG(ELogP1, "CSuplSlpAddress::~CSuplSlpAddress() Begin\n"); |
|
119 delete iIpAddress; |
|
120 delete iFqdn; |
|
121 SUPLLOG(ELogP1, "CSuplSlpAddress::~CSuplSlpAddress() End\n"); |
|
122 } |
|
123 |
|
124 EXPORT_C TBool CSuplSlpAddress::operator==(const CSuplSlpAddress& other) const |
|
125 { |
|
126 return (iSlpAddressType==other.iSlpAddressType && |
|
127 *iIpAddress==*other.iIpAddress && |
|
128 *iFqdn==*other.iFqdn); |
|
129 } |
|
130 |
|
131 CSuplSlpAddress::CSuplSlpAddress() |
|
132 { |
|
133 } |
|
134 |
|
135 void CSuplSlpAddress::ConstructL() |
|
136 { |
|
137 iIpAddress = CSuplIpAddress::NewL(); |
|
138 iFqdn = CSuplFqdn::NewL(); |
|
139 } |
|
140 |
|
141 |
|
142 /** |
|
143 * Supl SLP Session ID container |
|
144 */ |
|
145 EXPORT_C CSuplSlpSessionId* CSuplSlpSessionId::NewL() |
|
146 { |
|
147 SUPLLOG(ELogP1, "CSuplSlpSessionId::NewL() Begin\n"); |
|
148 CSuplSlpSessionId* self = new (ELeave) CSuplSlpSessionId(); |
|
149 CleanupStack::PushL(self); |
|
150 self->ConstructL(); |
|
151 CleanupStack::Pop(self); |
|
152 SUPLLOG(ELogP1, "CSuplSlpSessionId::NewL() End\n"); |
|
153 return self; |
|
154 } |
|
155 |
|
156 EXPORT_C CSuplSlpSessionId::~CSuplSlpSessionId() |
|
157 { |
|
158 SUPLLOG(ELogP1, "CSuplSlpSessionId::~CSuplSlpSessionId() Begin\n"); |
|
159 delete iSlpAddress; |
|
160 SUPLLOG(ELogP1, "CSuplSlpSessionId::~CSuplSlpSessionId() End\n"); |
|
161 } |
|
162 |
|
163 EXPORT_C TBool CSuplSlpSessionId::operator==(const CSuplSlpSessionId& other) const |
|
164 { |
|
165 return (iSessionId==other.iSessionId && |
|
166 *iSlpAddress==*other.iSlpAddress); |
|
167 } |
|
168 |
|
169 void CSuplSlpSessionId::ConstructL() |
|
170 { |
|
171 iSlpAddress = CSuplSlpAddress::NewL(); |
|
172 } |
|
173 |
|
174 |
|
175 /** |
|
176 * Supl SET ID container |
|
177 */ |
|
178 EXPORT_C CSuplSetId* CSuplSetId::NewL() |
|
179 { |
|
180 SUPLLOG(ELogP1, "CSuplSetId::NewL() Begin\n"); |
|
181 CSuplSetId* self = new (ELeave) CSuplSetId(); |
|
182 CleanupStack::PushL(self); |
|
183 self->ConstructL(); |
|
184 SUPLLOG(ELogP1, "CSuplSetId::NewL() End\n"); |
|
185 CleanupStack::Pop(self); |
|
186 return self; |
|
187 } |
|
188 |
|
189 EXPORT_C CSuplSetId::~CSuplSetId() |
|
190 { |
|
191 SUPLLOG(ELogP1, "CSuplSetId::~CSuplSetId() Begin\n"); |
|
192 delete iIpAddress; |
|
193 SUPLLOG(ELogP1, "CSuplSetId::~CSuplSetId() End\n"); |
|
194 } |
|
195 |
|
196 EXPORT_C TBool CSuplSetId::operator==(const CSuplSetId& other) const |
|
197 { |
|
198 return (iSetIdType==other.iSetIdType && |
|
199 *iIpAddress==*other.iIpAddress && |
|
200 iSetId == other.iSetId); |
|
201 } |
|
202 |
|
203 CSuplSetId::CSuplSetId() |
|
204 { |
|
205 } |
|
206 |
|
207 void CSuplSetId::ConstructL() |
|
208 { |
|
209 iIpAddress = CSuplIpAddress::NewL(); |
|
210 } |
|
211 |
|
212 |
|
213 /** |
|
214 * Supl SET Session ID container |
|
215 */ |
|
216 EXPORT_C CSuplSetSessionId* CSuplSetSessionId::NewL() |
|
217 { |
|
218 SUPLLOG(ELogP1, "CSuplSetSessionId::NewL() Begin\n"); |
|
219 CSuplSetSessionId* self = new (ELeave) CSuplSetSessionId(); |
|
220 CleanupStack::PushL(self); |
|
221 self->ConstructL(); |
|
222 SUPLLOG(ELogP1, "CSuplSetSessionId::NewL() End\n"); |
|
223 CleanupStack::Pop(self); |
|
224 return self; |
|
225 } |
|
226 |
|
227 EXPORT_C CSuplSetSessionId::~CSuplSetSessionId() |
|
228 { |
|
229 SUPLLOG(ELogP1, "CSuplSetSessionId::~CSuplSetSessionId() Begin\n"); |
|
230 delete iSetId; |
|
231 SUPLLOG(ELogP1, "CSuplSetSessionId::~CSuplSetSessionId() End\n"); |
|
232 } |
|
233 |
|
234 EXPORT_C TBool CSuplSetSessionId::operator==(const CSuplSetSessionId& other) const |
|
235 { |
|
236 return (iSessionId==other.iSessionId && |
|
237 *iSetId==*other.iSetId); |
|
238 } |
|
239 |
|
240 CSuplSetSessionId::CSuplSetSessionId() |
|
241 { |
|
242 } |
|
243 |
|
244 void CSuplSetSessionId::ConstructL() |
|
245 { |
|
246 iSetId = CSuplSetId::NewL(); |
|
247 } |
|
248 |
|
249 |
|
250 /** |
|
251 * Supl Session ID container |
|
252 */ |
|
253 EXPORT_C CSuplSessionId* CSuplSessionId::NewL() |
|
254 { |
|
255 SUPLLOG(ELogP1, "CSuplSessionId::NewL() \n"); |
|
256 CSuplSessionId* self = CSuplSessionId::NewLC(); |
|
257 CleanupStack::Pop(self); |
|
258 return self; |
|
259 } |
|
260 |
|
261 EXPORT_C CSuplSessionId* CSuplSessionId::NewLC() |
|
262 { |
|
263 SUPLLOG(ELogP1, "CSuplSessionId::NewLC() Begin\n"); |
|
264 CSuplSessionId* self = new (ELeave) CSuplSessionId(); |
|
265 CleanupStack::PushL(self); |
|
266 self->ConstructL(); |
|
267 SUPLLOG(ELogP1, "CSuplSessionId::NewLC() End\n"); |
|
268 return self; |
|
269 } |
|
270 |
|
271 EXPORT_C CSuplSessionId::~CSuplSessionId() |
|
272 { |
|
273 SUPLLOG(ELogP1, "CSuplSessionId::~CSuplSessionId() Begin\n"); |
|
274 delete iSetSessionId; |
|
275 delete iSlpSessionId; |
|
276 SUPLLOG(ELogP1, "CSuplSessionId::~CSuplSessionId() End\n"); |
|
277 } |
|
278 |
|
279 EXPORT_C TBool CSuplSessionId::operator==(const CSuplSessionId& other) const |
|
280 { |
|
281 return (iSetSessionIdPresent==other.iSetSessionIdPresent && |
|
282 iSlpSessionIdPresent==other.iSlpSessionIdPresent && |
|
283 *iSetSessionId==*other.iSetSessionId && |
|
284 *iSlpSessionId==*other.iSlpSessionId); |
|
285 } |
|
286 |
|
287 CSuplSessionId::CSuplSessionId() |
|
288 { |
|
289 } |
|
290 |
|
291 void CSuplSessionId::ConstructL() |
|
292 { |
|
293 iSetSessionId = CSuplSetSessionId::NewL(); |
|
294 iSlpSessionId = CSuplSlpSessionId::NewL(); |
|
295 } |
|
296 |
|
297 /** |
|
298 * Supl Version container |
|
299 */ |
|
300 EXPORT_C CSuplVersion* CSuplVersion::NewL() |
|
301 { |
|
302 SUPLLOG(ELogP1, "CSuplVersion::NewL() Begin\n"); |
|
303 CSuplVersion* self = new (ELeave) CSuplVersion(); |
|
304 CleanupStack::PushL(self); |
|
305 self->ConstructL(); |
|
306 SUPLLOG(ELogP1, "CSuplVersion::NewL() End\n"); |
|
307 CleanupStack::Pop(self); |
|
308 return self; |
|
309 } |
|
310 |
|
311 CSuplVersion::CSuplVersion() |
|
312 { |
|
313 } |
|
314 |
|
315 EXPORT_C CSuplVersion::~CSuplVersion() |
|
316 { |
|
317 SUPLLOG(ELogP1, "CSuplVersion::~CSuplVersion() Begin\n"); |
|
318 SUPLLOG(ELogP1, "CSuplVersion::~CSuplVersion() End\n"); |
|
319 } |
|
320 |
|
321 EXPORT_C TBool CSuplVersion::operator==(const CSuplVersion& other) const |
|
322 { |
|
323 return (iMaj==other.iMaj && |
|
324 iMin==other.iMin && |
|
325 iServind==other.iServind); |
|
326 } |
|
327 |
|
328 void CSuplVersion::ConstructL() |
|
329 { |
|
330 } |
|
331 |
|
332 /** |
|
333 * Supl GSM Cell Info container |
|
334 */ |
|
335 EXPORT_C CSuplGsmCellInfo* CSuplGsmCellInfo::NewL() |
|
336 { |
|
337 SUPLLOG(ELogP1, "CSuplGsmCellInfo::NewL() Begin\n"); |
|
338 CSuplGsmCellInfo* self = new (ELeave) CSuplGsmCellInfo(); |
|
339 CleanupStack::PushL(self); |
|
340 self->ConstructL(); |
|
341 SUPLLOG(ELogP1, "CSuplGsmCellInfo::NewL() End\n"); |
|
342 CleanupStack::Pop(self); |
|
343 return self; |
|
344 } |
|
345 |
|
346 EXPORT_C CSuplGsmCellInfo::~CSuplGsmCellInfo() |
|
347 { |
|
348 SUPLLOG(ELogP1, "CSuplGsmCellInfo::~CSuplGsmCellInfo() Begin\n"); |
|
349 SUPLLOG(ELogP1, "CSuplGsmCellInfo::~CSuplGsmCellInfo() End\n"); |
|
350 } |
|
351 |
|
352 CSuplGsmCellInfo::CSuplGsmCellInfo() |
|
353 { |
|
354 } |
|
355 |
|
356 void CSuplGsmCellInfo::ConstructL() |
|
357 { |
|
358 } |
|
359 |
|
360 /** |
|
361 * Supl CDMA Cell Info container |
|
362 */ |
|
363 EXPORT_C CSuplCdmaCellInfo* CSuplCdmaCellInfo::NewL() |
|
364 { |
|
365 SUPLLOG(ELogP1, "CSuplCdmaCellInfo::NewL() Begin\n"); |
|
366 CSuplCdmaCellInfo* self = new (ELeave) CSuplCdmaCellInfo(); |
|
367 CleanupStack::PushL(self); |
|
368 self->ConstructL(); |
|
369 SUPLLOG(ELogP1, "CSuplCdmaCellInfo::NewL() End\n"); |
|
370 CleanupStack::Pop(self); |
|
371 return self; |
|
372 } |
|
373 |
|
374 EXPORT_C CSuplCdmaCellInfo::~CSuplCdmaCellInfo() |
|
375 { |
|
376 SUPLLOG(ELogP1, "CSuplCdmaCellInfo::~CSuplCdmaCellInfo() Begin\n"); |
|
377 SUPLLOG(ELogP1, "CSuplCdmaCellInfo::~CSuplCdmaCellInfo() End\n"); |
|
378 } |
|
379 |
|
380 CSuplCdmaCellInfo::CSuplCdmaCellInfo() |
|
381 { |
|
382 } |
|
383 |
|
384 void CSuplCdmaCellInfo::ConstructL() |
|
385 { |
|
386 } |
|
387 |
|
388 /** |
|
389 * Supl WCDMA Cell Info container |
|
390 */ |
|
391 EXPORT_C CSuplWcdmaCellInfo* CSuplWcdmaCellInfo::NewL() |
|
392 { |
|
393 SUPLLOG(ELogP1, "CSuplWcdmaCellInfo::NewL() Begin\n"); |
|
394 CSuplWcdmaCellInfo* self = new (ELeave) CSuplWcdmaCellInfo(); |
|
395 CleanupStack::PushL(self); |
|
396 self->ConstructL(); |
|
397 SUPLLOG(ELogP1, "CSuplWcdmaCellInfo::NewL() End\n"); |
|
398 CleanupStack::Pop(self); |
|
399 return self; |
|
400 } |
|
401 |
|
402 EXPORT_C CSuplWcdmaCellInfo::~CSuplWcdmaCellInfo() |
|
403 { |
|
404 SUPLLOG(ELogP1, "CSuplWcdmaCellInfo::~CSuplWcdmaCellInfo() Begin\n"); |
|
405 SUPLLOG(ELogP1, "CSuplWcdmaCellInfo::~CSuplWcdmaCellInfo() End\n"); |
|
406 } |
|
407 |
|
408 CSuplWcdmaCellInfo::CSuplWcdmaCellInfo() |
|
409 { |
|
410 } |
|
411 |
|
412 void CSuplWcdmaCellInfo::ConstructL() |
|
413 { |
|
414 } |
|
415 |
|
416 /** |
|
417 * Supl Location ID container |
|
418 */ |
|
419 EXPORT_C CSuplLocationId* CSuplLocationId::NewL(TSuplLocationType aType) |
|
420 { |
|
421 SUPLLOG(ELogP1, "CSuplLocationId::NewL() Begin\n"); |
|
422 CSuplLocationId* self = new (ELeave) CSuplLocationId(aType); |
|
423 CleanupStack::PushL(self); |
|
424 self->ConstructL(); |
|
425 SUPLLOG(ELogP1, "CSuplLocationId::NewL() End\n"); |
|
426 CleanupStack::Pop(self); |
|
427 return self; |
|
428 } |
|
429 |
|
430 EXPORT_C CSuplLocationId::~CSuplLocationId() |
|
431 { |
|
432 SUPLLOG(ELogP1, "CSuplLocationId::~CSuplLocationId() Begin\n"); |
|
433 delete iGsmCellInfo; |
|
434 delete iCdmaCellInfo; |
|
435 delete iWcdmaCellInfo; |
|
436 SUPLLOG(ELogP1, "CSuplLocationId::~CSuplLocationId() End\n"); |
|
437 } |
|
438 |
|
439 CSuplLocationId::CSuplLocationId(TSuplLocationType aType) |
|
440 : iType(aType) |
|
441 { |
|
442 } |
|
443 |
|
444 void CSuplLocationId::ConstructL() |
|
445 { |
|
446 switch (iType) |
|
447 { |
|
448 case ESuplLocationTypeGsm: |
|
449 iGsmCellInfo = CSuplGsmCellInfo::NewL(); |
|
450 break; |
|
451 |
|
452 case ESuplLocationTypeCdma: |
|
453 iCdmaCellInfo = CSuplCdmaCellInfo::NewL(); |
|
454 break; |
|
455 |
|
456 case ESuplLocationTypeWcdma: |
|
457 iWcdmaCellInfo = CSuplWcdmaCellInfo::NewL(); |
|
458 break; |
|
459 |
|
460 default: |
|
461 User::Leave(KErrNotSupported); |
|
462 break; |
|
463 } |
|
464 } |
|
465 |
|
466 |
|
467 |
|
468 |