24
|
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 |
// cetelsesscleanup.cpp
|
|
15 |
//
|
|
16 |
//
|
|
17 |
|
|
18 |
#include "cetelsessionmgr.h"
|
|
19 |
|
|
20 |
/**
|
|
21 |
* This file contains methods for closing the session objects at cleanup time
|
|
22 |
* and also for tidying the notification queues
|
|
23 |
* @file
|
|
24 |
*/
|
|
25 |
|
|
26 |
|
|
27 |
//
|
|
28 |
// The following CloseXXXMethods are called in cascade from DoCloseAllSessL
|
|
29 |
//
|
|
30 |
|
|
31 |
/**
|
|
32 |
* Close phone subsession and all associated subsessions
|
|
33 |
*/
|
|
34 |
void CEtelSessionMgr::ClosePhoneSessL(TServerId aServerId, TPhoneId aPhoneId )
|
|
35 |
{
|
|
36 |
|
|
37 |
// Tidy associated sessions
|
|
38 |
|
|
39 |
// Lines
|
|
40 |
for (TLineId lineId = KVoiceLine; lineId < KMaxLines; lineId = TLineId(lineId+1))
|
|
41 |
{
|
|
42 |
CloseLineSessL( aServerId, aPhoneId, lineId );
|
|
43 |
}
|
|
44 |
|
|
45 |
// Conference calls
|
|
46 |
for (TConferenceCallId ccId = KMainConferenceCall; ccId < KMaxConferenceCall; ccId = TConferenceCallId(ccId+1))
|
|
47 |
{
|
|
48 |
CloseConfCallSessL( aServerId, aPhoneId, ccId );
|
|
49 |
}
|
|
50 |
|
|
51 |
// Packet services
|
|
52 |
for (TPacketServiceId packetServiceId = KMainPacketService;
|
|
53 |
packetServiceId < KMaxPacketService;
|
|
54 |
packetServiceId = TPacketServiceId(packetServiceId+1))
|
|
55 |
{
|
|
56 |
ClosePacketServiceSessL( aServerId, aPhoneId, packetServiceId );
|
|
57 |
}
|
|
58 |
|
|
59 |
// PhoneBookStore
|
|
60 |
for (TPhoneBookStoreId phoneBookId = KMeAdnPhoneBook;
|
|
61 |
phoneBookId < KMaxPhoneBookStore;
|
|
62 |
phoneBookId = TPhoneBookStoreId(phoneBookId+1))
|
|
63 |
{
|
|
64 |
ClosePhoneBookStoreSessL( aServerId, aPhoneId, phoneBookId );
|
|
65 |
}
|
|
66 |
|
|
67 |
// ENStore
|
|
68 |
for (TENStoreId enStoreId = KMainENStore;
|
|
69 |
enStoreId < KMaxENStore;
|
|
70 |
enStoreId = TENStoreId(enStoreId+1))
|
|
71 |
{
|
|
72 |
CloseENStoreSessL( aServerId, aPhoneId, enStoreId );
|
|
73 |
}
|
|
74 |
|
|
75 |
// ONStore
|
|
76 |
for (TONStoreId onStoreId = KMainONStore;
|
|
77 |
onStoreId < KMaxONStore;
|
|
78 |
onStoreId = TONStoreId(onStoreId+1))
|
|
79 |
{
|
|
80 |
CloseONStoreSessL( aServerId, aPhoneId, onStoreId );
|
|
81 |
}
|
|
82 |
|
|
83 |
// SmsMessaging
|
|
84 |
for (TSmsMessagingId smsMsgId = KMainSmsMessaging;
|
|
85 |
smsMsgId < KMaxSmsMessaging;
|
|
86 |
smsMsgId = TSmsMessagingId(smsMsgId+1))
|
|
87 |
{
|
|
88 |
CloseSmsMessagingSessL( aServerId, aPhoneId, smsMsgId );
|
|
89 |
}
|
|
90 |
|
|
91 |
// BroadcastMessaging
|
|
92 |
for (TBroadcastMessagingId bcastMsgId = KMainBroadcastMessaging;
|
|
93 |
bcastMsgId < KMaxBroadcastMessaging;
|
|
94 |
bcastMsgId = TBroadcastMessagingId(bcastMsgId+1))
|
|
95 |
{
|
|
96 |
CloseBroadcastMessagingSessL( aServerId, aPhoneId, bcastMsgId );
|
|
97 |
}
|
|
98 |
|
|
99 |
// UssdMessaging
|
|
100 |
for (TUssdMessagingId ussdMsgId = KMainUssdMessaging;
|
|
101 |
ussdMsgId < KMaxUssdMessaging;
|
|
102 |
ussdMsgId = TUssdMessagingId(ussdMsgId+1))
|
|
103 |
{
|
|
104 |
CloseUssdMessagingSessL( aServerId, aPhoneId, ussdMsgId );
|
|
105 |
}
|
|
106 |
|
|
107 |
// CustomAPI
|
|
108 |
for (TCustomApiId customApiId = KMainCustomApi;
|
|
109 |
customApiId < KMaxCustomApi;
|
|
110 |
customApiId = TCustomApiId(customApiId+1))
|
|
111 |
{
|
|
112 |
CloseCustomApiSessL( aServerId, aPhoneId, customApiId);
|
|
113 |
}
|
|
114 |
|
|
115 |
// Finally, close phone
|
|
116 |
TSessionStatus &stat= iPhonesStatus[aServerId][aPhoneId];
|
|
117 |
if ( stat >= iStatusCloseThresh)
|
|
118 |
{
|
|
119 |
DoClosePhoneL(aServerId, aPhoneId);
|
|
120 |
stat = ESessClosed;
|
|
121 |
}
|
|
122 |
}
|
|
123 |
|
|
124 |
|
|
125 |
/**
|
|
126 |
* Close lines
|
|
127 |
*/
|
|
128 |
void CEtelSessionMgr::CloseLineSessL(TServerId aServerId, TPhoneId aPhoneId, TLineId aLineId )
|
|
129 |
{
|
|
130 |
|
|
131 |
// Tidy associated call sessions
|
|
132 |
for (TCallId callId = KCall1; callId < KMaxCalls; callId = TCallId(callId+1))
|
|
133 |
{
|
|
134 |
CloseCallSessL( aServerId, aPhoneId, aLineId, callId );
|
|
135 |
}
|
|
136 |
|
|
137 |
// Tidy this object
|
|
138 |
if (iLinesStatus[aServerId][aPhoneId][aLineId] >= iStatusCloseThresh)
|
|
139 |
{
|
|
140 |
DoCloseLineL(aServerId, aPhoneId,aLineId);
|
|
141 |
iLinesStatus[aServerId][aPhoneId][aLineId] = ESessClosed;
|
|
142 |
}
|
|
143 |
}
|
|
144 |
|
|
145 |
|
|
146 |
/**
|
|
147 |
* Close calls
|
|
148 |
*/
|
|
149 |
void CEtelSessionMgr::CloseCallSessL(TServerId aServerId, TPhoneId aPhoneId, TLineId aLineId, TCallId aCallId )
|
|
150 |
{
|
|
151 |
|
|
152 |
// Tidy associated fax sessions
|
|
153 |
for (TFaxId faxId = KMainFax; faxId < KMaxFax; faxId = TFaxId(faxId+1))
|
|
154 |
{
|
|
155 |
CloseFaxSessL( aServerId, aPhoneId, aLineId,aCallId,faxId);
|
|
156 |
}
|
|
157 |
|
|
158 |
|
|
159 |
// Tidy this object
|
|
160 |
if (iCallsStatus[aServerId][aPhoneId][aLineId][aCallId] >= iStatusCloseThresh)
|
|
161 |
{
|
|
162 |
DoCloseCallL(aServerId, aPhoneId,aLineId,aCallId);
|
|
163 |
iCallsStatus[aServerId][aPhoneId][aLineId][aCallId] = ESessClosed;
|
|
164 |
}
|
|
165 |
}
|
|
166 |
|
|
167 |
/**
|
|
168 |
* Close fax
|
|
169 |
*/
|
|
170 |
void CEtelSessionMgr::CloseFaxSessL(TServerId aServerId, TPhoneId aPhoneId, TLineId aLineId, TCallId aCallId, TFaxId aFaxId )
|
|
171 |
{
|
|
172 |
if (iFaxesStatus[aServerId][aPhoneId][aLineId][aCallId][aFaxId] >= iStatusCloseThresh)
|
|
173 |
{
|
|
174 |
DoCloseFaxL(aServerId, aPhoneId,aLineId,aCallId,aFaxId);
|
|
175 |
iFaxesStatus[aServerId][aPhoneId][aLineId][aCallId][aFaxId] = ESessClosed;
|
|
176 |
}
|
|
177 |
}
|
|
178 |
|
|
179 |
|
|
180 |
/**
|
|
181 |
* Close conf calls
|
|
182 |
*/
|
|
183 |
void CEtelSessionMgr::CloseConfCallSessL(TServerId aServerId, TPhoneId aPhoneId,
|
|
184 |
TConferenceCallId aConfCallId )
|
|
185 |
{
|
|
186 |
|
|
187 |
TSessionStatus &stat= iConferenceCallsStatus[aServerId][aPhoneId][aConfCallId];
|
|
188 |
if ( stat >= iStatusCloseThresh)
|
|
189 |
{
|
|
190 |
DoCloseConferenceCallL(aServerId, aPhoneId, aConfCallId);
|
|
191 |
stat = ESessClosed;
|
|
192 |
}
|
|
193 |
}
|
|
194 |
|
|
195 |
/**
|
|
196 |
* Close packet service
|
|
197 |
*/
|
|
198 |
void CEtelSessionMgr::ClosePacketServiceSessL(TServerId aServerId, TPhoneId aPhoneId,
|
|
199 |
TPacketServiceId aPacketServiceId )
|
|
200 |
{
|
|
201 |
// Tidy associated primary contexts
|
|
202 |
for (TPrimaryPacketContextId priCtxId = KPrimaryPacketContext1;
|
|
203 |
priCtxId < KMaxPrimaryPacketContext; priCtxId=TPrimaryPacketContextId(priCtxId+1) )
|
|
204 |
{
|
|
205 |
ClosePacketServiceContextSessL( aServerId, aPhoneId, aPacketServiceId,priCtxId);
|
|
206 |
}
|
|
207 |
|
|
208 |
// Tidy this object
|
|
209 |
TSessionStatus &stat= iPacketServicesStatus[aServerId][aPhoneId][aPacketServiceId];
|
|
210 |
if ( stat >= iStatusCloseThresh)
|
|
211 |
{
|
|
212 |
DoClosePacketServiceL(aServerId, aPhoneId, aPacketServiceId);
|
|
213 |
stat = ESessClosed;
|
|
214 |
}
|
|
215 |
}
|
|
216 |
|
|
217 |
/**
|
|
218 |
* Close packet context and associated secondaries / QoS
|
|
219 |
*/
|
|
220 |
void CEtelSessionMgr::ClosePacketServiceContextSessL(TServerId aServerId, TPhoneId aPhoneId,
|
|
221 |
TPacketServiceId aPacketServiceId,
|
|
222 |
TPrimaryPacketContextId aContextId)
|
|
223 |
{
|
|
224 |
|
|
225 |
// Tidy secondaries and associated QoS
|
|
226 |
for (TSecondaryPacketContextId secCtxId = KSecondaryPacketContext1;
|
|
227 |
secCtxId < KMaxSecondaryPacketContext; secCtxId=TSecondaryPacketContextId(secCtxId+1) )
|
|
228 |
{
|
|
229 |
|
|
230 |
// If the secondary has a QoS, close it first
|
|
231 |
TSessionStatus &secQoSStat = iSecondaryPacketContextQoSsStatus[aServerId][aPhoneId]
|
|
232 |
[aPacketServiceId][aContextId][secCtxId];
|
|
233 |
|
|
234 |
if( secQoSStat >= iStatusCloseThresh )
|
|
235 |
{
|
|
236 |
DoCloseSecondaryPacketContextQoSL( aServerId, aPhoneId, aPacketServiceId, aContextId, secCtxId );
|
|
237 |
secQoSStat = ESessClosed;
|
|
238 |
}
|
|
239 |
|
|
240 |
// Tidy the secondary context
|
|
241 |
TSessionStatus &secStat = iSecondaryPacketContextsStatus[aServerId][aPhoneId]
|
|
242 |
[aPacketServiceId][aContextId][secCtxId];
|
|
243 |
|
|
244 |
if( secStat >= iStatusCloseThresh )
|
|
245 |
{
|
|
246 |
DoCloseSecondaryPacketContextL( aServerId, aPhoneId, aPacketServiceId, aContextId, secCtxId );
|
|
247 |
secStat = ESessClosed;
|
|
248 |
}
|
|
249 |
|
|
250 |
}
|
|
251 |
|
|
252 |
// Tidy our QoS
|
|
253 |
TSessionStatus &priQoSStat = iPrimaryPacketContextQoSsStatus[aServerId][aPhoneId]
|
|
254 |
[aPacketServiceId][aContextId];
|
|
255 |
|
|
256 |
if( priQoSStat >= iStatusCloseThresh )
|
|
257 |
{
|
|
258 |
DoClosePrimaryPacketContextQoSL( aServerId, aPhoneId, aPacketServiceId, aContextId );
|
|
259 |
priQoSStat = ESessClosed;
|
|
260 |
}
|
|
261 |
|
|
262 |
|
|
263 |
// Tidy the primary context
|
|
264 |
TSessionStatus &priStat = iPrimaryPacketContextsStatus[aServerId][aPhoneId]
|
|
265 |
[aPacketServiceId][aContextId];
|
|
266 |
if ( priStat >= iStatusCloseThresh )
|
|
267 |
{
|
|
268 |
DoClosePrimaryPacketContextL(aServerId, aPhoneId, aPacketServiceId, aContextId);
|
|
269 |
priStat = ESessClosed;
|
|
270 |
}
|
|
271 |
}
|
|
272 |
|
|
273 |
/**
|
|
274 |
* Close PhoneBookStore
|
|
275 |
*/
|
|
276 |
void CEtelSessionMgr::ClosePhoneBookStoreSessL(TServerId aServerId, TPhoneId aPhoneId,
|
|
277 |
TPhoneBookStoreId aPhoneBookId )
|
|
278 |
{
|
|
279 |
TSessionStatus &stat= iPhoneBookStoresStatus[aServerId][aPhoneId][aPhoneBookId];
|
|
280 |
if ( stat >= iStatusCloseThresh)
|
|
281 |
{
|
|
282 |
DoClosePhoneBookStoreL(aServerId, aPhoneId, aPhoneBookId);
|
|
283 |
stat = ESessClosed;
|
|
284 |
}
|
|
285 |
}
|
|
286 |
|
|
287 |
/**
|
|
288 |
* Close ENStore
|
|
289 |
*/
|
|
290 |
void CEtelSessionMgr::CloseENStoreSessL(TServerId aServerId, TPhoneId aPhoneId,
|
|
291 |
TENStoreId aEnStoreId )
|
|
292 |
{
|
|
293 |
TSessionStatus &stat= iENStoresStatus[aServerId][aPhoneId][aEnStoreId];
|
|
294 |
if ( stat >= iStatusCloseThresh)
|
|
295 |
{
|
|
296 |
DoCloseENStoreL(aServerId, aPhoneId, aEnStoreId);
|
|
297 |
stat = ESessClosed;
|
|
298 |
}
|
|
299 |
}
|
|
300 |
|
|
301 |
/**
|
|
302 |
* Close ONStore
|
|
303 |
*/
|
|
304 |
void CEtelSessionMgr::CloseONStoreSessL(TServerId aServerId, TPhoneId aPhoneId,
|
|
305 |
TONStoreId aOnStoreId )
|
|
306 |
{
|
|
307 |
TSessionStatus &stat= iONStoresStatus[aServerId][aPhoneId][aOnStoreId];
|
|
308 |
if ( stat >= iStatusCloseThresh)
|
|
309 |
{
|
|
310 |
DoCloseONStoreL(aServerId, aPhoneId, aOnStoreId);
|
|
311 |
stat = ESessClosed;
|
|
312 |
}
|
|
313 |
}
|
|
314 |
|
|
315 |
/**
|
|
316 |
* Close SmsMessaging
|
|
317 |
*/
|
|
318 |
void CEtelSessionMgr::CloseSmsMessagingSessL(TServerId aServerId, TPhoneId aPhoneId,
|
|
319 |
TSmsMessagingId aSmsMsgId )
|
|
320 |
{
|
|
321 |
|
|
322 |
// Tidy associated SmsStore
|
|
323 |
for (TSmsStoreId smsStoreId = KMeSmsStore;
|
|
324 |
smsStoreId < KMaxSmsStore;
|
|
325 |
smsStoreId = TSmsStoreId(smsStoreId+1))
|
|
326 |
{
|
|
327 |
CloseSmsStoreSessL( aServerId, aPhoneId, aSmsMsgId, smsStoreId );
|
|
328 |
}
|
|
329 |
|
|
330 |
|
|
331 |
TSessionStatus &stat= iSmsMessagingsStatus[aServerId][aPhoneId][aSmsMsgId];
|
|
332 |
if ( stat >= iStatusCloseThresh)
|
|
333 |
{
|
|
334 |
DoCloseSmsMessagingL(aServerId, aPhoneId, aSmsMsgId);
|
|
335 |
stat = ESessClosed;
|
|
336 |
}
|
|
337 |
}
|
|
338 |
|
|
339 |
/**
|
|
340 |
* Close SmsStore
|
|
341 |
*/
|
|
342 |
void CEtelSessionMgr::CloseSmsStoreSessL(TServerId aServerId, TPhoneId aPhoneId,
|
|
343 |
TSmsMessagingId aSmsMsgId, TSmsStoreId aSmsStoreId )
|
|
344 |
{
|
|
345 |
TSessionStatus &stat= iSmsStoresStatus[aServerId][aPhoneId][aSmsMsgId][aSmsStoreId];
|
|
346 |
if ( stat >= iStatusCloseThresh)
|
|
347 |
{
|
|
348 |
DoCloseSmsStoreL(aServerId, aPhoneId, aSmsMsgId, aSmsStoreId);
|
|
349 |
stat = ESessClosed;
|
|
350 |
}
|
|
351 |
}
|
|
352 |
|
|
353 |
/**
|
|
354 |
* Close BroadcastMessaging
|
|
355 |
*/
|
|
356 |
void CEtelSessionMgr::CloseBroadcastMessagingSessL(TServerId aServerId, TPhoneId aPhoneId,
|
|
357 |
TBroadcastMessagingId aBcastMsgId )
|
|
358 |
{
|
|
359 |
TSessionStatus &stat= iBroadcastMessagingsStatus[aServerId][aPhoneId][aBcastMsgId];
|
|
360 |
if ( stat >= iStatusCloseThresh)
|
|
361 |
{
|
|
362 |
DoCloseBroadcastMessagingL(aServerId, aPhoneId, aBcastMsgId);
|
|
363 |
stat = ESessClosed;
|
|
364 |
}
|
|
365 |
}
|
|
366 |
|
|
367 |
/**
|
|
368 |
* Close UssdMessaging
|
|
369 |
*/
|
|
370 |
void CEtelSessionMgr::CloseUssdMessagingSessL(TServerId aServerId, TPhoneId aPhoneId,
|
|
371 |
TUssdMessagingId aUssdMsgId )
|
|
372 |
{
|
|
373 |
TSessionStatus &stat= iUssdMessagingsStatus[aServerId][aPhoneId][aUssdMsgId];
|
|
374 |
if ( stat >= iStatusCloseThresh)
|
|
375 |
{
|
|
376 |
DoCloseUssdMessagingL(aServerId, aPhoneId, aUssdMsgId);
|
|
377 |
stat = ESessClosed;
|
|
378 |
}
|
|
379 |
}
|
|
380 |
|
|
381 |
/**
|
|
382 |
* Close CustomAPI
|
|
383 |
*/
|
|
384 |
void CEtelSessionMgr::CloseCustomApiSessL(TServerId aServerId, TPhoneId aPhoneId, TCustomApiId aCustomApiId)
|
|
385 |
{
|
|
386 |
TSessionStatus &stat= iUssdMessagingsStatus[aServerId][aPhoneId][aCustomApiId];
|
|
387 |
if ( stat >= iStatusCloseThresh)
|
|
388 |
{
|
|
389 |
DoCloseCustomApiL(aServerId, aPhoneId, aCustomApiId);
|
|
390 |
stat = ESessClosed;
|
|
391 |
}
|
|
392 |
}
|
|
393 |
|
|
394 |
//
|
|
395 |
// Tidy notification cascade
|
|
396 |
//
|
|
397 |
|
|
398 |
|
|
399 |
/**
|
|
400 |
* Tidy notifiers for phone subsession and all associated subsessions
|
|
401 |
*/
|
|
402 |
void CEtelSessionMgr::TidyPhoneNotifiers(TServerId aServerId, TPhoneId aPhoneId)
|
|
403 |
{
|
|
404 |
|
|
405 |
// Tidy associated sessions
|
|
406 |
|
|
407 |
// Lines
|
|
408 |
for (TLineId lineId = KVoiceLine; lineId < KMaxLines; lineId = TLineId(lineId+1))
|
|
409 |
{
|
|
410 |
TidyLineNotifiers( aServerId, aPhoneId, lineId );
|
|
411 |
}
|
|
412 |
|
|
413 |
// Conference calls
|
|
414 |
for (TConferenceCallId ccId = KMainConferenceCall; ccId < KMaxConferenceCall;
|
|
415 |
ccId = TConferenceCallId(ccId+1))
|
|
416 |
{
|
|
417 |
TidyConfCallNotifiers( aServerId, aPhoneId, ccId );
|
|
418 |
}
|
|
419 |
|
|
420 |
// Packet services
|
|
421 |
for (TPacketServiceId packetServiceId = KMainPacketService;
|
|
422 |
packetServiceId < KMaxPacketService;
|
|
423 |
packetServiceId = TPacketServiceId(packetServiceId+1))
|
|
424 |
{
|
|
425 |
TidyPacketServiceNotifiers( aServerId, aPhoneId, packetServiceId );
|
|
426 |
}
|
|
427 |
|
|
428 |
// PhoneBookStore
|
|
429 |
for (TPhoneBookStoreId phoneBookId = KMeAdnPhoneBook;
|
|
430 |
phoneBookId < KMaxPhoneBookStore;
|
|
431 |
phoneBookId = TPhoneBookStoreId(phoneBookId+1))
|
|
432 |
{
|
|
433 |
TidyPhoneBookStoreNotifiers( aServerId, aPhoneId, phoneBookId );
|
|
434 |
}
|
|
435 |
|
|
436 |
// ENStore
|
|
437 |
for (TENStoreId enStoreId = KMainENStore;
|
|
438 |
enStoreId < KMaxENStore;
|
|
439 |
enStoreId = TENStoreId(enStoreId+1))
|
|
440 |
{
|
|
441 |
TidyENStoreNotifiers( aServerId, aPhoneId, enStoreId );
|
|
442 |
}
|
|
443 |
|
|
444 |
// ONStore
|
|
445 |
for (TONStoreId onStoreId = KMainONStore;
|
|
446 |
onStoreId < KMaxONStore;
|
|
447 |
onStoreId = TONStoreId(onStoreId+1))
|
|
448 |
{
|
|
449 |
TidyONStoreNotifiers( aServerId, aPhoneId, onStoreId );
|
|
450 |
}
|
|
451 |
|
|
452 |
// SmsMessaging
|
|
453 |
for (TSmsMessagingId smsMsgId = KMainSmsMessaging;
|
|
454 |
smsMsgId < KMaxSmsMessaging;
|
|
455 |
smsMsgId = TSmsMessagingId(smsMsgId+1))
|
|
456 |
{
|
|
457 |
TidySmsMessagingNotifiers( aServerId, aPhoneId, smsMsgId );
|
|
458 |
}
|
|
459 |
|
|
460 |
// BroadcastMessaging
|
|
461 |
for (TBroadcastMessagingId bcastMsgId = KMainBroadcastMessaging;
|
|
462 |
bcastMsgId < KMaxBroadcastMessaging;
|
|
463 |
bcastMsgId = TBroadcastMessagingId(bcastMsgId+1))
|
|
464 |
{
|
|
465 |
TidyBroadcastMessagingNotifiers( aServerId, aPhoneId, bcastMsgId );
|
|
466 |
}
|
|
467 |
|
|
468 |
// UssdMessaging
|
|
469 |
for (TUssdMessagingId ussdMsgId = KMainUssdMessaging;
|
|
470 |
ussdMsgId < KMaxUssdMessaging;
|
|
471 |
ussdMsgId = TUssdMessagingId(ussdMsgId+1))
|
|
472 |
{
|
|
473 |
TidyUssdMessagingNotifiers( aServerId, aPhoneId, ussdMsgId );
|
|
474 |
}
|
|
475 |
|
|
476 |
// CustomAPI
|
|
477 |
for (TCustomApiId customApiId = KMainCustomApi;
|
|
478 |
customApiId < KMaxCustomApi;
|
|
479 |
customApiId = TCustomApiId(customApiId+1))
|
|
480 |
{
|
|
481 |
TidyCustomApiNotifiers( aServerId, aPhoneId, customApiId );
|
|
482 |
}
|
|
483 |
|
|
484 |
// Finally, tidy phone
|
|
485 |
if ( iPhonesStatus[aServerId][aPhoneId] > ESessClosed)
|
|
486 |
{
|
|
487 |
// Cleanup both sets of notification for base and derived
|
|
488 |
CleanupPhoneNotifiers( iPhones[aServerId][aPhoneId] );
|
|
489 |
CleanupMobilePhoneNotifiers( iPhones[aServerId][aPhoneId] );
|
|
490 |
}
|
|
491 |
}
|
|
492 |
|
|
493 |
/**
|
|
494 |
* Tidy notifiers for lines
|
|
495 |
*/
|
|
496 |
void CEtelSessionMgr::TidyLineNotifiers(TServerId aServerId, TPhoneId aPhoneId, TLineId aLineId )
|
|
497 |
{
|
|
498 |
|
|
499 |
// Tidy associated call sessions
|
|
500 |
for (TCallId callId = KCall1; callId < KMaxCalls; callId = TCallId(callId+1))
|
|
501 |
{
|
|
502 |
TidyCallNotifiers( aServerId, aPhoneId, aLineId, callId );
|
|
503 |
}
|
|
504 |
|
|
505 |
// Tidy this object
|
|
506 |
if( iLinesStatus[aServerId][aPhoneId][aLineId] > ESessClosed)
|
|
507 |
{
|
|
508 |
// Cleanup both sets of notification for base and derived
|
|
509 |
CleanupLineNotifiers(iLines[aServerId][aPhoneId][aLineId]);
|
|
510 |
CleanupMobileLineNotifiers(iLines[aServerId][aPhoneId][aLineId]);
|
|
511 |
}
|
|
512 |
}
|
|
513 |
|
|
514 |
|
|
515 |
/**
|
|
516 |
* Tidy notifiers for calls
|
|
517 |
*/
|
|
518 |
void CEtelSessionMgr::TidyCallNotifiers(TServerId aServerId, TPhoneId aPhoneId, TLineId aLineId,
|
|
519 |
TCallId aCallId )
|
|
520 |
{
|
|
521 |
|
|
522 |
// Tidy associated fax sessions
|
|
523 |
for (TFaxId faxId = KMainFax; faxId < KMaxFax; faxId = TFaxId(faxId+1))
|
|
524 |
{
|
|
525 |
TidyFaxNotifiers( aServerId, aPhoneId, aLineId,aCallId,faxId);
|
|
526 |
}
|
|
527 |
|
|
528 |
|
|
529 |
// Tidy this object
|
|
530 |
if ( iCallsStatus[aServerId][aPhoneId][aLineId][aCallId] > ESessClosed )
|
|
531 |
{
|
|
532 |
CleanupCallNotifiers( iCalls[aServerId][aPhoneId][aLineId][aCallId] );
|
|
533 |
CleanupMobileCallNotifiers( iCalls[aServerId][aPhoneId][aLineId][aCallId] );
|
|
534 |
}
|
|
535 |
}
|
|
536 |
|
|
537 |
/**
|
|
538 |
* Tidy notifiers for fax
|
|
539 |
*/
|
|
540 |
void CEtelSessionMgr::TidyFaxNotifiers(TServerId, TPhoneId, TLineId, TCallId, TFaxId )
|
|
541 |
{
|
|
542 |
|
|
543 |
// No notifiers at present
|
|
544 |
//
|
|
545 |
//if (iFaxesStatus[aServerId][aPhoneId][aLineId][aCallId][aFaxId] > ESessClosed)
|
|
546 |
// {
|
|
547 |
// CleanupFaxNotifiers( iFaxes[aServerId][aPhoneId][aLineId][aCallId][aFaxId] );
|
|
548 |
// }
|
|
549 |
}
|
|
550 |
|
|
551 |
|
|
552 |
/**
|
|
553 |
* Tidy notifiers for conf calls
|
|
554 |
*/
|
|
555 |
void CEtelSessionMgr::TidyConfCallNotifiers(TServerId aServerId, TPhoneId aPhoneId,
|
|
556 |
TConferenceCallId aConfCallId )
|
|
557 |
{
|
|
558 |
|
|
559 |
TSessionStatus &stat= iConferenceCallsStatus[aServerId][aPhoneId][aConfCallId];
|
|
560 |
if ( stat > ESessClosed)
|
|
561 |
{
|
|
562 |
CleanupMobileConferenceCallNotifiers( iConferenceCalls[aServerId][aPhoneId][aConfCallId]);
|
|
563 |
}
|
|
564 |
}
|
|
565 |
|
|
566 |
/**
|
|
567 |
* Tidy notifiers for packet service
|
|
568 |
*/
|
|
569 |
void CEtelSessionMgr::TidyPacketServiceNotifiers(TServerId aServerId, TPhoneId aPhoneId,
|
|
570 |
TPacketServiceId aPacketServiceId )
|
|
571 |
{
|
|
572 |
// Tidy associated primary contexts
|
|
573 |
for (TPrimaryPacketContextId priCtxId = KPrimaryPacketContext1;
|
|
574 |
priCtxId < KMaxPrimaryPacketContext; priCtxId=TPrimaryPacketContextId(priCtxId+1) )
|
|
575 |
{
|
|
576 |
TidyPacketServiceContextNotifiers( aServerId, aPhoneId, aPacketServiceId,priCtxId);
|
|
577 |
}
|
|
578 |
|
|
579 |
// Tidy this object
|
|
580 |
TSessionStatus &stat= iPacketServicesStatus[aServerId][aPhoneId][aPacketServiceId];
|
|
581 |
if ( stat > ESessClosed)
|
|
582 |
{
|
|
583 |
CleanupPacketServiceNotifiers(iPacketServices[aServerId][aPhoneId][aPacketServiceId]);
|
|
584 |
}
|
|
585 |
}
|
|
586 |
|
|
587 |
/**
|
|
588 |
* Tidy notifiers for packet context and associated secondaries / QoS
|
|
589 |
*/
|
|
590 |
void CEtelSessionMgr::TidyPacketServiceContextNotifiers(TServerId aServerId, TPhoneId aPhoneId,
|
|
591 |
TPacketServiceId aPacketServiceId,
|
|
592 |
TPrimaryPacketContextId aContextId)
|
|
593 |
{
|
|
594 |
|
|
595 |
// Tidy secondaries and associated QoS
|
|
596 |
for (TSecondaryPacketContextId secCtxId = KSecondaryPacketContext1;
|
|
597 |
secCtxId < KMaxSecondaryPacketContext; secCtxId=TSecondaryPacketContextId(secCtxId+1) )
|
|
598 |
{
|
|
599 |
|
|
600 |
// If the secondary has a QoS, close it first
|
|
601 |
TSessionStatus &secQoSStat = iSecondaryPacketContextQoSsStatus[aServerId][aPhoneId]
|
|
602 |
[aPacketServiceId][aContextId][secCtxId];
|
|
603 |
|
|
604 |
if( secQoSStat > ESessClosed )
|
|
605 |
{
|
|
606 |
CleanupPacketQoSNotifiers( iSecondaryPacketContextQoSs[aServerId][aPhoneId]
|
|
607 |
[aPacketServiceId][aContextId][secCtxId] );
|
|
608 |
|
|
609 |
}
|
|
610 |
|
|
611 |
// Tidy the secondary context
|
|
612 |
TSessionStatus &secStat = iSecondaryPacketContextsStatus[aServerId][aPhoneId]
|
|
613 |
[aPacketServiceId][aContextId][secCtxId];
|
|
614 |
|
|
615 |
if( secStat > ESessClosed )
|
|
616 |
{
|
|
617 |
CleanupPacketContextNotifiers( iSecondaryPacketContexts[aServerId][aPhoneId]
|
|
618 |
[aPacketServiceId][aContextId][secCtxId] );
|
|
619 |
}
|
|
620 |
|
|
621 |
}
|
|
622 |
|
|
623 |
// Tidy our QoS
|
|
624 |
TSessionStatus &priQoSStat = iPrimaryPacketContextQoSsStatus[aServerId][aPhoneId]
|
|
625 |
[aPacketServiceId][aContextId];
|
|
626 |
|
|
627 |
if( priQoSStat > ESessClosed )
|
|
628 |
{
|
|
629 |
CleanupPacketQoSNotifiers( iPrimaryPacketContextQoSs[aServerId][aPhoneId]
|
|
630 |
[aPacketServiceId][aContextId] );
|
|
631 |
|
|
632 |
}
|
|
633 |
|
|
634 |
|
|
635 |
// Tidy the primary context
|
|
636 |
TSessionStatus &priStat = iPrimaryPacketContextsStatus[aServerId][aPhoneId]
|
|
637 |
[aPacketServiceId][aContextId];
|
|
638 |
if ( priStat > ESessClosed )
|
|
639 |
{
|
|
640 |
CleanupPacketContextNotifiers(iPrimaryPacketContexts[aServerId][aPhoneId]
|
|
641 |
[aPacketServiceId][aContextId]);
|
|
642 |
|
|
643 |
}
|
|
644 |
}
|
|
645 |
|
|
646 |
/**
|
|
647 |
* Tidy PhoneBookStore
|
|
648 |
*/
|
|
649 |
void CEtelSessionMgr::TidyPhoneBookStoreNotifiers(TServerId aServerId, TPhoneId aPhoneId,
|
|
650 |
TPhoneBookStoreId aPhoneBookStoreId )
|
|
651 |
{
|
|
652 |
TSessionStatus &stat= iPhoneBookStoresStatus[aServerId][aPhoneId][aPhoneBookStoreId];
|
|
653 |
if ( stat > ESessClosed)
|
|
654 |
{
|
|
655 |
CleanupMobilePhoneStoreNotifiers(iPhoneBookStores[aServerId][aPhoneId][aPhoneBookStoreId]);
|
|
656 |
}
|
|
657 |
}
|
|
658 |
|
|
659 |
/**
|
|
660 |
* Tidy ENStore
|
|
661 |
*/
|
|
662 |
void CEtelSessionMgr::TidyENStoreNotifiers(TServerId aServerId, TPhoneId aPhoneId, TENStoreId aENStoreId)
|
|
663 |
{
|
|
664 |
TSessionStatus &stat= iENStoresStatus[aServerId][aPhoneId][aENStoreId];
|
|
665 |
if ( stat > ESessClosed)
|
|
666 |
{
|
|
667 |
CleanupMobilePhoneStoreNotifiers(iENStores[aServerId][aPhoneId][aENStoreId]);
|
|
668 |
}
|
|
669 |
}
|
|
670 |
|
|
671 |
/**
|
|
672 |
* Tidy ONStore
|
|
673 |
*/
|
|
674 |
void CEtelSessionMgr::TidyONStoreNotifiers(TServerId aServerId, TPhoneId aPhoneId, TONStoreId aONStoreId)
|
|
675 |
{
|
|
676 |
TSessionStatus &stat= iONStoresStatus[aServerId][aPhoneId][aONStoreId];
|
|
677 |
if ( stat > ESessClosed)
|
|
678 |
{
|
|
679 |
CleanupMobilePhoneStoreNotifiers(iONStores[aServerId][aPhoneId][aONStoreId]);
|
|
680 |
}
|
|
681 |
}
|
|
682 |
|
|
683 |
/**
|
|
684 |
* Tidy SmsMessaging
|
|
685 |
*/
|
|
686 |
void CEtelSessionMgr::TidySmsMessagingNotifiers(TServerId aServerId, TPhoneId aPhoneId,
|
|
687 |
TSmsMessagingId aSmsMsgId )
|
|
688 |
{
|
|
689 |
|
|
690 |
// Tidy associated Sms
|
|
691 |
for (TSmsStoreId smsStoreId = KMeSmsStore;
|
|
692 |
smsStoreId < KMaxSmsStore;
|
|
693 |
smsStoreId = TSmsStoreId(smsStoreId+1))
|
|
694 |
{
|
|
695 |
TidySmsStoreNotifiers( aServerId, aPhoneId, aSmsMsgId, smsStoreId );
|
|
696 |
}
|
|
697 |
|
|
698 |
|
|
699 |
TSessionStatus &stat= iSmsMessagingsStatus[aServerId][aPhoneId][aSmsMsgId];
|
|
700 |
if ( stat > ESessClosed)
|
|
701 |
{
|
|
702 |
CleanupMobileSmsMessagingNotifiers(iSmsMessagings[aServerId][aPhoneId][aSmsMsgId]);
|
|
703 |
|
|
704 |
}
|
|
705 |
}
|
|
706 |
|
|
707 |
/**
|
|
708 |
* Tidy SmsStore
|
|
709 |
*/
|
|
710 |
void CEtelSessionMgr::TidySmsStoreNotifiers(TServerId aServerId, TPhoneId aPhoneId,
|
|
711 |
TSmsMessagingId aSmsMsgId, TSmsStoreId aSmsStoreId )
|
|
712 |
{
|
|
713 |
TSessionStatus &stat= iSmsStoresStatus[aServerId][aPhoneId][aSmsMsgId][aSmsStoreId];
|
|
714 |
if( stat > ESessClosed)
|
|
715 |
{
|
|
716 |
CleanupMobilePhoneStoreNotifiers(iSmsStores[aServerId][aPhoneId][aSmsMsgId][aSmsStoreId]);
|
|
717 |
}
|
|
718 |
}
|
|
719 |
|
|
720 |
/**
|
|
721 |
* Tidy BroadcastMessaging
|
|
722 |
*/
|
|
723 |
void CEtelSessionMgr::TidyBroadcastMessagingNotifiers(TServerId aServerId, TPhoneId aPhoneId,
|
|
724 |
TBroadcastMessagingId aBcastMsgId )
|
|
725 |
{
|
|
726 |
TSessionStatus &stat= iBroadcastMessagingsStatus[aServerId][aPhoneId][aBcastMsgId];
|
|
727 |
if ( stat > ESessClosed)
|
|
728 |
{
|
|
729 |
CleanupMobileBroadcastMessagingNotifiers(iBroadcastMessagings[aServerId][aPhoneId][aBcastMsgId]);
|
|
730 |
|
|
731 |
}
|
|
732 |
}
|
|
733 |
|
|
734 |
/**
|
|
735 |
* Tidy UssdMessaging
|
|
736 |
*/
|
|
737 |
void CEtelSessionMgr::TidyUssdMessagingNotifiers(TServerId aServerId, TPhoneId aPhoneId,
|
|
738 |
TUssdMessagingId aUssdMsgId )
|
|
739 |
{
|
|
740 |
TSessionStatus &stat= iUssdMessagingsStatus[aServerId][aPhoneId][aUssdMsgId];
|
|
741 |
if ( stat > ESessClosed)
|
|
742 |
{
|
|
743 |
CleanupMobileUssdMessagingNotifiers(iUssdMessagings[aServerId][aPhoneId][aUssdMsgId]);
|
|
744 |
}
|
|
745 |
}
|
|
746 |
|
|
747 |
|
|
748 |
/**
|
|
749 |
* Tidy CustomApi
|
|
750 |
*/
|
|
751 |
void CEtelSessionMgr::TidyCustomApiNotifiers(TServerId aServerId, TPhoneId aPhoneId, TCustomApiId aCustomApiId)
|
|
752 |
{
|
|
753 |
TSessionStatus &stat= iCustomApisStatus[aServerId][aPhoneId][aCustomApiId];
|
|
754 |
if ( stat > ESessClosed)
|
|
755 |
{
|
|
756 |
CleanupCustomAPINotifiers(iCustomApis[aServerId][aPhoneId][aCustomApiId]);
|
|
757 |
}
|
|
758 |
}
|