author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Tue, 14 Sep 2010 22:06:05 +0300 | |
branch | RCL_3 |
changeset 62 | bb1f80fb7db2 |
parent 58 | 83ca720e2b9a |
child 65 | 14754bf06654 |
permissions | -rw-r--r-- |
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1 |
/* |
58 | 2 |
* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). |
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3 |
* All rights reserved. |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5 |
* under the terms of "Eclipse Public License v1.0" |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
8 |
* |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
9 |
* Initial Contributors: |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
10 |
* Nokia Corporation - initial contribution. |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
11 |
* |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
12 |
* Contributors: |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
13 |
* |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
14 |
* Description: MPM server implementation |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
15 |
* |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
16 |
*/ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
17 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
18 |
/** |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
19 |
@file mpmserver.cpp |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
20 |
Mobility Policy Manager server implementation. |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
21 |
*/ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
22 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
23 |
// INCLUDE FILES |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
24 |
#include <commdb.h> |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
25 |
#include <etel3rdparty.h> // Voice call notification |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
26 |
#include <mmtsy_names.h> // KMmTsyModuleName |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
27 |
#include <centralrepository.h> |
12
ea6e024ea6f9
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
28 |
#include <es_sock_partner.h> |
17
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
29 |
#include <CoreApplicationUIsSDKCRKeys.h> |
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
30 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
31 |
#include "mpmserver.h" |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
32 |
#include "mpmserversession.h" |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
33 |
#include "mpmconnmonevents.h" |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
34 |
#include "mpmlogger.h" |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
35 |
#include "mpmdtmwatcher.h" |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
36 |
#include "mpmroamingwatcher.h" |
58 | 37 |
#include "mpmdisconnectdlg.h" |
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
38 |
#include "mpmconfirmdlgroaming.h" |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
39 |
#include "mpmconfirmdlgstarting.h" |
58 | 40 |
#include "mpmdefaultconnection.h" |
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
41 |
#include "mpmcommsdataccess.h" |
58 | 42 |
#include "mpmwlanquerydialog.h" |
43 |
#include "mpmdialog.h" |
|
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
44 |
#include "mpmprivatecrkeys.h" |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
45 |
#include "mpmcsidwatcher.h" |
8
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
46 |
#include "mpmdatausagewatcher.h" |
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
47 |
#include "mpmpropertydef.h" |
58 | 48 |
#include "mpmofflinewatcher.h" |
55
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
49 |
#include "mpmconnpermquerytimer.h" |
62
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
50 |
#include "mpmofflinequerytimer.h" |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
51 |
#include "mpmconnselectiondlgtimer.h" |
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
52 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
53 |
// ============================= LOCAL FUNCTIONS =============================== |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
54 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
55 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
56 |
// PanicServer |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
57 |
// Panics the server in case of programming error. |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
58 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
59 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
60 |
void PanicServer( TInt aPanic ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
61 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
62 |
User::Panic( KMPMPanicCategory, aPanic ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
63 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
64 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
65 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
66 |
// ============================ MEMBER FUNCTIONS =============================== |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
67 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
68 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
69 |
// CMPMServer::NewL |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
70 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
71 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
72 |
CMPMServer* CMPMServer::NewL() |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
73 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
74 |
CMPMServer* self = new ( ELeave ) CMPMServer(); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
75 |
CleanupStack::PushL( self ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
76 |
self->ConstructL(); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
77 |
CleanupStack::Pop( self ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
78 |
return self; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
79 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
80 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
81 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
82 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
83 |
// CMPMServer::CMPMServer |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
84 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
85 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
86 |
CMPMServer::CMPMServer() |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
87 |
: CPolicyServer( CPolicyServer::EPriorityStandard, KMPMPolicy ), |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
88 |
iEvents( NULL ), |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
89 |
iTSYLoaded( EFalse ), |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
90 |
iPacketServLoaded( EFalse ), |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
91 |
iDtmWatcher( NULL ), |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
92 |
iWLANScanRequired( EFalse ), |
58 | 93 |
iDisconnectQueue( NULL ), |
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
94 |
iRoamingQueue( NULL ), |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
95 |
iStartingQueue( NULL ), |
58 | 96 |
iWlanQueryQueue( NULL ), |
97 |
iConnectDialogQueue( NULL ), |
|
98 |
iDefaultConnection( NULL ), |
|
17
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
99 |
iConnectionCounter( 0 ), |
58 | 100 |
iOfflineMode( ECoreAppUIsNetworkConnectionAllowed ) |
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
101 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
102 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
103 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
104 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
105 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
106 |
// CMPMServer::ConstructL |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
107 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
108 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
109 |
void CMPMServer::ConstructL() |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
110 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
111 |
// identify ourselves and open for service |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
112 |
MPMLOGSTRING( "MPMServer is starting" ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
113 |
StartL( KMPMServerName ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
114 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
115 |
// Connect to ETel server |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
116 |
// The RTelServer::Connect() might not always work with the first trial, |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
117 |
// because of a coding error related to using semaphores in the method. |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
118 |
TInt err( KErrNotReady ); |
15
4dc3bb0099b0
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
119 |
err = iTelServer.Connect(); |
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
120 |
TInt a = 0; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
121 |
while( a < KPhoneRetryCount && err != KErrNone ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
122 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
123 |
User::After( KPhoneRetryTimeout ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
124 |
err = iTelServer.Connect(); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
125 |
a++; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
126 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
127 |
User::LeaveIfError( err ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
128 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
129 |
// Try to load phone.tsy |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
130 |
TBuf< KCommsDbSvrMaxColumnNameLength > tsyName; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
131 |
tsyName.Copy( KMmTsyModuleName ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
132 |
err = iTelServer.LoadPhoneModule( tsyName ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
133 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
134 |
if ( err == KErrNone ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
135 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
136 |
iTSYLoaded = ETrue; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
137 |
// Phone info can be retrieved with value 0 if there is only 1 phone |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
138 |
RTelServer::TPhoneInfo info; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
139 |
User::LeaveIfError( iTelServer.GetPhoneInfo( 0, info ) ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
140 |
User::LeaveIfError( iMobilePhone.Open( iTelServer, info.iName ) ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
141 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
142 |
// Open packet service |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
143 |
err = iPacketService.Open( iMobilePhone ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
144 |
if ( err == KErrNone ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
145 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
146 |
iPacketServLoaded = ETrue; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
147 |
iDtmWatcher = CMPMDtmWatcher::NewL( iPacketService ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
148 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
149 |
#ifdef _DEBUG |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
150 |
else |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
151 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
152 |
MPMLOGSTRING2( |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
153 |
"CMPMServer::ConstructL iPacketService.Open error: %d", err ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
154 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
155 |
#endif // _DEBUG |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
156 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
157 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
158 |
iRoamingWatcher = CMPMRoamingWatcher::NewL(iMobilePhone); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
159 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
160 |
iCommsDatAccess = CMPMCommsDatAccess::NewL( ); |
58 | 161 |
|
162 |
iDisconnectQueue = new ( ELeave ) CArrayPtrFlat<CMPMDisconnectDlg>( KGranularity ); |
|
163 |
iDisconnectQueue->Reset(); |
|
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
164 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
165 |
iRoamingQueue = new ( ELeave ) CArrayPtrFlat<CMPMConfirmDlgRoaming>( KGranularity ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
166 |
iRoamingQueue->Reset(); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
167 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
168 |
iStartingQueue = new ( ELeave ) CArrayPtrFlat<CMPMConfirmDlgStarting>( KGranularity ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
169 |
iStartingQueue->Reset(); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
170 |
|
58 | 171 |
iWlanQueryQueue = new ( ELeave ) CArrayPtrFlat<CMPMWlanQueryDialog>( KGranularity ); |
172 |
iWlanQueryQueue->Reset(); |
|
173 |
||
174 |
iConnectDialogQueue = new ( ELeave ) CArrayPtrFlat<CMPMDialog>( KGranularity ); |
|
175 |
iConnectDialogQueue->Reset(); |
|
176 |
||
177 |
iDefaultConnection = CMPMDefaultConnection::NewL( this ); |
|
178 |
||
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
179 |
// Create central repository watcher and start it |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
180 |
iMpmCsIdWatcher = CMpmCsIdWatcher::NewL(); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
181 |
iMpmCsIdWatcher->StartL(); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
182 |
|
8
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
183 |
// Create another central repository watcher and start it |
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
184 |
TRAPD( duwErr, iMpmDataUsageWatcher = CMpmDataUsageWatcher::NewL( this ) ); |
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
185 |
if (duwErr == KErrNone) |
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
186 |
{ |
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
187 |
iMpmDataUsageWatcher->StartL(); |
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
188 |
} |
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
189 |
else |
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
190 |
{ |
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
191 |
iMpmDataUsageWatcher = NULL; |
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
192 |
MPMLOGSTRING( "CMPMServer::ConstructL: CMpmDataUsageWatcher::NewL() failed!" ) |
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
193 |
} |
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
194 |
|
58 | 195 |
// Create another central repository watcher and start it |
196 |
TRAPD( owErr, iMpmOfflineWatcher = CMpmOfflineWatcher::NewL( this ) ); |
|
197 |
if (owErr == KErrNone) |
|
198 |
{ |
|
199 |
iMpmOfflineWatcher->StartL(); |
|
200 |
} |
|
201 |
else |
|
202 |
{ |
|
203 |
iMpmOfflineWatcher = NULL; |
|
204 |
MPMLOGSTRING( "CMPMServer::ConstructL: CMpmOfflineWatcher::NewL() failed!" ) |
|
205 |
} |
|
206 |
||
207 |
// Define P&S keys (snap & iap) for the user connection |
|
208 |
TInt ret = RProperty::Define( KMPMUserConnectionCategory, |
|
209 |
KMPMPSKeyUserConnectionSnap, |
|
210 |
KMPMUserConnectionSnapType, |
|
211 |
KMPMUserConnectionReadPolicy, |
|
212 |
KMPMUserConnectionWritePolicy ); |
|
213 |
||
214 |
if ( (ret != KErrNone) && (ret != KErrAlreadyExists) ) |
|
215 |
{ |
|
216 |
User::Leave(err); |
|
217 |
} |
|
218 |
||
219 |
ret = RProperty::Define( KMPMUserConnectionCategory, |
|
220 |
KMPMPSKeyUserConnectionIap, |
|
221 |
KMPMUserConnectionIapType, |
|
222 |
KMPMUserConnectionReadPolicy, |
|
223 |
KMPMUserConnectionWritePolicy ); |
|
224 |
||
225 |
if ( (ret != KErrNone) && (ret != KErrAlreadyExists) ) |
|
226 |
{ |
|
227 |
User::Leave(err); |
|
228 |
} |
|
229 |
||
230 |
// Set initial values for the keys |
|
231 |
User::LeaveIfError(RProperty::Set( KMPMUserConnectionCategory, |
|
232 |
KMPMPSKeyUserConnectionSnap, |
|
233 |
0 )); |
|
234 |
||
235 |
User::LeaveIfError(RProperty::Set( KMPMUserConnectionCategory, |
|
236 |
KMPMPSKeyUserConnectionIap, |
|
237 |
0 )); |
|
238 |
||
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
239 |
// Read dedicated clients from the central repository |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
240 |
CRepository* repository = CRepository::NewL( KCRUidMPM ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
241 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
242 |
CleanupStack::PushL( repository ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
243 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
244 |
TUint32 baseKey = KMpmDedicatedClientBase; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
245 |
TInt value; |
58 | 246 |
ret = KErrNone; |
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
247 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
248 |
while ( ret == KErrNone ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
249 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
250 |
ret = repository->Get ( baseKey, value ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
251 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
252 |
if ( ret == KErrNone ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
253 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
254 |
iDedicatedClients.AppendL( value ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
255 |
MPMLOGSTRING2( "CMPMServer::ConstructL: Dedicated client id: %d", value) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
256 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
257 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
258 |
baseKey++; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
259 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
260 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
261 |
CleanupStack::PopAndDestroy ( repository ); |
58 | 262 |
|
263 |
// Define P&S keys for the connection dialogs |
|
264 |
ret = RProperty::Define( KMPMActiveConnectionCategory, |
|
265 |
KMPMPSKeyActiveConnectionIap, |
|
266 |
KMPMActiveConnectionIapType, |
|
267 |
KMPMActiveConnectionReadPolicy, |
|
268 |
KMPMActiveConnectionWritePolicy ); |
|
269 |
||
270 |
if ( (ret != KErrNone) && (ret != KErrAlreadyExists) ) |
|
271 |
{ |
|
272 |
User::Leave(err); |
|
273 |
} |
|
274 |
||
275 |
ret = RProperty::Define( KMPMActiveConnectionCategory, |
|
276 |
KMPMPSKeyActiveConnectionSnap, |
|
277 |
KMPMActiveConnectionSnapType, |
|
278 |
KMPMActiveConnectionReadPolicy, |
|
279 |
KMPMActiveConnectionWritePolicy ); |
|
280 |
||
281 |
if ( (ret != KErrNone) && (ret != KErrAlreadyExists) ) |
|
282 |
{ |
|
283 |
User::Leave(err); |
|
284 |
} |
|
285 |
||
286 |
ret = RProperty::Define( KMPMActiveConnectionCategory, |
|
287 |
KMPMPSKeyActiveConnectionBearer, |
|
288 |
KMPMActiveConnectionBearerType, |
|
289 |
KMPMActiveConnectionReadPolicy, |
|
290 |
KMPMActiveConnectionWritePolicy ); |
|
291 |
||
292 |
if ( (ret != KErrNone) && (ret != KErrAlreadyExists) ) |
|
293 |
{ |
|
294 |
User::Leave(err); |
|
295 |
} |
|
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
296 |
|
58 | 297 |
PublishActiveConnection(); |
298 |
||
299 |
iRoamingToWlanPeriodic = CPeriodic::NewL( CActive::EPriorityStandard ); |
|
300 |
iRoamingToHotspotWlanPeriodic = CPeriodic::NewL( CActive::EPriorityStandard ); |
|
301 |
||
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
302 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
303 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
304 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
305 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
306 |
// CMPMServer::~CMPMServer |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
307 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
308 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
309 |
CMPMServer::~CMPMServer() |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
310 |
{ |
26
0a9e01492035
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
311 |
if ( iRoamingToWlanPeriodic ) |
0a9e01492035
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
312 |
{ |
0a9e01492035
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
313 |
iRoamingToWlanPeriodic->Cancel(); |
0a9e01492035
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
314 |
delete iRoamingToWlanPeriodic; |
0a9e01492035
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
315 |
} |
58 | 316 |
if ( iRoamingToHotspotWlanPeriodic ) |
317 |
{ |
|
318 |
iRoamingToHotspotWlanPeriodic->Cancel(); |
|
319 |
delete iRoamingToHotspotWlanPeriodic; |
|
320 |
} |
|
321 |
if ( iDisconnectQueue ) |
|
322 |
{ |
|
323 |
iDisconnectQueue->ResetAndDestroy(); |
|
324 |
} |
|
325 |
delete iDisconnectQueue; |
|
326 |
||
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
327 |
if ( iRoamingQueue ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
328 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
329 |
iRoamingQueue->ResetAndDestroy(); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
330 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
331 |
delete iRoamingQueue; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
332 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
333 |
if ( iStartingQueue ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
334 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
335 |
iStartingQueue->ResetAndDestroy(); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
336 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
337 |
delete iStartingQueue; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
338 |
|
58 | 339 |
while ( iWlanQueryQueue && iWlanQueryQueue->Count() > 0 ) |
340 |
{ |
|
341 |
iWlanQueryQueue->Delete( 0 ); |
|
342 |
} |
|
343 |
delete iWlanQueryQueue; |
|
344 |
||
345 |
if ( iConnectDialogQueue ) |
|
346 |
{ |
|
347 |
iConnectDialogQueue->ResetAndDestroy(); |
|
348 |
} |
|
349 |
delete iConnectDialogQueue; |
|
350 |
||
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
351 |
delete iEvents; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
352 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
353 |
for ( TInt i = 0; i < iBlackListIdList.Count(); i++ ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
354 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
355 |
iBlackListIdList[i].Close(); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
356 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
357 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
358 |
iActiveBMConns.Close(); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
359 |
iSessions.Close(); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
360 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
361 |
delete iDtmWatcher; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
362 |
delete iRoamingWatcher; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
363 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
364 |
// Close "global" ETEL objects |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
365 |
if ( iPacketServLoaded ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
366 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
367 |
iPacketService.Close(); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
368 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
369 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
370 |
iMobilePhone.Close(); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
371 |
iTelServer.Close(); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
372 |
|
58 | 373 |
delete iDefaultConnection; |
374 |
||
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
375 |
delete iMpmCsIdWatcher; |
58 | 376 |
|
8
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
377 |
delete iMpmDataUsageWatcher; |
17
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
378 |
|
58 | 379 |
delete iMpmOfflineWatcher; |
380 |
||
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
381 |
iDedicatedClients.Close(); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
382 |
|
55
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
383 |
delete iCommsDatAccess; |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
384 |
|
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
385 |
delete iConnPermQueryTimer; |
62
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
386 |
|
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
387 |
delete iOfflineQueryTimer; |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
388 |
|
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
389 |
delete iConnSelectionDlgTimer; |
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
390 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
391 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
392 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
393 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
394 |
// CMPMServer::NewSessionL |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
395 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
396 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
397 |
CSession2* CMPMServer::NewSessionL( |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
398 |
const TVersion& aVersion, |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
399 |
const RMessage2& /*aMessage*/) const |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
400 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
401 |
MPMLOGSTRING( "CMPMServer::NewSessionL" ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
402 |
// Check we're the right version |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
403 |
if ( !User::QueryVersionSupported(TVersion(KMPMServerMajorVersionNumber, |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
404 |
KMPMServerMinorVersionNumber, |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
405 |
KMPMServerBuildVersionNumber ), |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
406 |
aVersion ) ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
407 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
408 |
User::Leave( KErrNotSupported ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
409 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
410 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
411 |
CSession2* session = CMPMServerSession::NewL( |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
412 |
*const_cast<CMPMServer*>( this )); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
413 |
return session; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
414 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
415 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
416 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
417 |
// CMPMServer::PanicClient |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
418 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
419 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
420 |
void CMPMServer::PanicClient( |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
421 |
const TInt aPanic) const |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
422 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
423 |
// let's have a look before we panic the client |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
424 |
__DEBUGGER() |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
425 |
// ok, go for it |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
426 |
RThread clientThread; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
427 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
428 |
TInt err = Message().Client( clientThread ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
429 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
430 |
if ( err == KErrNone ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
431 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
432 |
clientThread.Panic( KMPMServerName, aPanic ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
433 |
clientThread.Close(); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
434 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
435 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
436 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
437 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
438 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
439 |
// CMPMServer::AppendBMConnection |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
440 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
441 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
442 |
void CMPMServer::AppendBMConnection( const TConnectionId aConnId, |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
443 |
const TUint32 aSnap, |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
444 |
const TUint32 aIapId, |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
445 |
TConnectionState aState, |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
446 |
CMPMServerSession& aSession ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
447 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
448 |
MPMLOGSTRING3( |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
449 |
"CMPMServer::AppendBMConnection - aConnId = 0x%x, aSnap = %i", |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
450 |
aConnId, aSnap ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
451 |
|
55
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
452 |
// Set the Connection Id, SNAP, Iap Id and connection state, into TActiveBMConn |
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
453 |
TActiveBMConn conn; |
55
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
454 |
conn.iConnInfo.iConnId = aConnId; |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
455 |
conn.iConnInfo.iSnap = aSnap; |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
456 |
conn.iConnInfo.iIapId = aIapId; |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
457 |
conn.iConnInfo.iState = aState; |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
458 |
conn.iConnInfo.iAppUid = aSession.AppUid(); |
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
459 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
460 |
TInt index1 = iActiveBMConns.Find( conn, TActiveBMConn::MatchConnInfo ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
461 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
462 |
if ( index1 == KErrNotFound ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
463 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
464 |
// If this connInfo is not yet there, insert it at the end of array |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
465 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
466 |
iActiveBMConns.Append( conn ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
467 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
468 |
else |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
469 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
470 |
// connInfo already active, check whether Connection Id is there |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
471 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
472 |
if ( index1 < iActiveBMConns.Count() ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
473 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
474 |
// Set the Iap Id and connection state |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
475 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
476 |
iActiveBMConns[index1].iConnInfo.iIapId = aIapId; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
477 |
iActiveBMConns[index1].iConnInfo.iState = aState; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
478 |
iActiveBMConns[index1].iConnInfo.iAppUid = aSession.AppUid(); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
479 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
480 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
481 |
|
58 | 482 |
if ( aState == EStarted && aSession.ChooseBestIapCalled() ) |
483 |
{ |
|
484 |
UpdateActiveConnection( aSession ); |
|
485 |
} |
|
486 |
||
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
487 |
#ifdef _DEBUG |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
488 |
// Dump array of active connections to log in order to support testing. |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
489 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
490 |
DumpActiveBMConns(); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
491 |
#endif // _DEBUG |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
492 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
493 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
494 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
495 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
496 |
// CMPMServer::ResetBMConnection |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
497 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
498 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
499 |
void CMPMServer::ResetBMConnection( const TConnectionId aConnId, |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
500 |
const TUint32 aIapId, |
58 | 501 |
CMPMServerSession& aSession ) |
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
502 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
503 |
MPMLOGSTRING3( |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
504 |
"CMPMServer::ResetBMConnection - aConnId = 0x%x, aIapId = %i", |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
505 |
aConnId, aIapId ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
506 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
507 |
// Get the current connection SNAP for this Connection Id |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
508 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
509 |
TUint32 snap = GetBMSnap( aConnId ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
510 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
511 |
// Set the Connection Id and SNAP |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
512 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
513 |
TConnectionInfo connInfo; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
514 |
connInfo.iConnId = aConnId; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
515 |
connInfo.iSnap = snap; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
516 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
517 |
// Set the Iap Id |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
518 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
519 |
TActiveBMConn conn; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
520 |
conn.iConnInfo = connInfo; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
521 |
conn.iConnInfo.iIapId = aIapId; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
522 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
523 |
TInt index1 = iActiveBMConns.Find( conn, TActiveBMConn::MatchConnInfo ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
524 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
525 |
if ( ( index1 != KErrNotFound ) && ( index1 < iActiveBMConns.Count() ) ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
526 |
// && ( aIapId == iActiveBMConns[index1].iConnInfo.iIapId ) ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
527 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
528 |
// If connInfo found, reset the Iap Id as zero and |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
529 |
// update connection state as EIdle. |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
530 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
531 |
// It is expected that MPM keeps the Connection Id and SNAP |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
532 |
// relationship in a database entry and that this entry survives |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
533 |
// a roaming event (an ApplicationLeavesConnection call). |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
534 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
535 |
iActiveBMConns[index1].iConnInfo.iIapId = 0; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
536 |
iActiveBMConns[index1].iConnInfo.iState = EIdle; |
58 | 537 |
|
538 |
// Change state of P&S keys if needed |
|
539 |
if ( aSession.ChooseBestIapCalled() ) |
|
540 |
{ |
|
541 |
UpdateActiveConnection( aSession ); |
|
542 |
} |
|
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
543 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
544 |
#ifdef _DEBUG |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
545 |
// Dump array of active connections to log in order to support testing. |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
546 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
547 |
DumpActiveBMConns(); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
548 |
#endif // _DEBUG |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
549 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
550 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
551 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
552 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
553 |
// CMPMServer::RemoveBMConnection |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
554 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
555 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
556 |
void CMPMServer::RemoveBMConnection( const TConnectionId aConnId, |
58 | 557 |
CMPMServerSession& aSession ) |
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
558 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
559 |
MPMLOGSTRING2( "CMPMServer::RemoveBMConnection - aConnId = 0x%x", |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
560 |
aConnId ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
561 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
562 |
// This time we are browsing the array from the end to the beginning, |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
563 |
// because removing one element from array affects index numbering. |
58 | 564 |
// Decrement i by one, because count is n, but indexes in array are 0 .. n-1 |
565 |
for ( TInt i = iActiveBMConns.Count() - 1; i >= 0; i-- ) |
|
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
566 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
567 |
if ( iActiveBMConns[i].iConnInfo.iConnId == aConnId ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
568 |
{ |
58 | 569 |
|
570 |
TInt closeIapId = iActiveBMConns[i].iConnInfo.iIapId; |
|
571 |
if ( !closeIapId ) |
|
572 |
{ |
|
573 |
TRAP_IGNORE( closeIapId = aSession.IapSelectionL()->MpmConnPref().IapId() ); |
|
574 |
} |
|
575 |
||
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
576 |
// If Connection Id found, remove it. |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
577 |
iActiveBMConns.Remove( i ); |
58 | 578 |
|
579 |
// Update active connection |
|
580 |
if ( aSession.ChooseBestIapCalled() ) |
|
581 |
{ |
|
582 |
UpdateActiveConnection( aSession ); |
|
583 |
} |
|
584 |
||
585 |
CheckIapForDisconnect( closeIapId ); |
|
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
586 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
587 |
} |
58 | 588 |
|
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
589 |
#ifdef _DEBUG |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
590 |
// Dump array of active connections to log in order to support testing. |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
591 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
592 |
DumpActiveBMConns(); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
593 |
#endif // _DEBUG |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
594 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
595 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
596 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
597 |
// CMPMServer::GetBMIap |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
598 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
599 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
600 |
TUint32 CMPMServer::GetBMIap( const TConnectionId aConnId ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
601 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
602 |
MPMLOGSTRING2( "CMPMServer::GetBMIap - aConnId = 0x%x", aConnId ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
603 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
604 |
TUint32 connectionIapId( 0 ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
605 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
606 |
// Set the Connection Id and SNAP |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
607 |
TConnectionInfo connInfo; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
608 |
connInfo.iConnId = aConnId; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
609 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
610 |
TActiveBMConn conn; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
611 |
conn.iConnInfo = connInfo; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
612 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
613 |
TInt index1 = iActiveBMConns.Find( conn, TActiveBMConn::MatchConnInfo ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
614 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
615 |
if ( ( index1 != KErrNotFound ) && ( index1 < iActiveBMConns.Count() ) ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
616 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
617 |
// If connInfo found, set the Iap Id as connectionIapId |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
618 |
connectionIapId = iActiveBMConns[index1].iConnInfo.iIapId; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
619 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
620 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
621 |
MPMLOGSTRING2( "CMPMServer::GetBMIap - connectionIapId = %i", |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
622 |
connectionIapId ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
623 |
return connectionIapId; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
624 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
625 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
626 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
627 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
628 |
// CMPMServer::GetBMSnap |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
629 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
630 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
631 |
TUint32 CMPMServer::GetBMSnap( const TConnectionId aConnId ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
632 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
633 |
MPMLOGSTRING2( "CMPMServer::GetBMSnap - aConnId = 0x%x", aConnId ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
634 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
635 |
TUint32 snap( 0 ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
636 |
TBool snapFound( EFalse ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
637 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
638 |
for ( TInt i = 0; ( ( i < iActiveBMConns.Count() ) && !snapFound ); i++ ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
639 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
640 |
if ( iActiveBMConns[i].iConnInfo.iConnId == aConnId ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
641 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
642 |
snap = iActiveBMConns[i].iConnInfo.iSnap; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
643 |
snapFound = ETrue; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
644 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
645 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
646 |
MPMLOGSTRING2( "CMPMServer::GetBMSnap - SNAP = %i", snap ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
647 |
return snap; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
648 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
649 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
650 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
651 |
// CMPMServer::GetConnectionState |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
652 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
653 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
654 |
void CMPMServer::GetConnectionState( const TConnectionId aConnId, |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
655 |
TConnectionState& aState ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
656 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
657 |
MPMLOGSTRING2( "CMPMServer::GetConnectionState - aConnId = 0x%x", |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
658 |
aConnId ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
659 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
660 |
TConnectionInfo connInfo; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
661 |
connInfo.iConnId = aConnId; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
662 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
663 |
TActiveBMConn conn; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
664 |
conn.iConnInfo = connInfo; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
665 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
666 |
TInt index1 = iActiveBMConns.Find( conn, TActiveBMConn::MatchConnInfo ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
667 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
668 |
if ( ( index1 != KErrNotFound ) && ( index1 < iActiveBMConns.Count() ) ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
669 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
670 |
// If connInfo found |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
671 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
672 |
aState = iActiveBMConns[index1].iConnInfo.iState; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
673 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
674 |
else |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
675 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
676 |
// Since connInfo has no entry in iActiveBMConns, then |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
677 |
// the state of connection must be EStarting. |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
678 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
679 |
aState = EStarting; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
680 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
681 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
682 |
#ifdef _DEBUG |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
683 |
switch( aState ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
684 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
685 |
case EStarting: |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
686 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
687 |
MPMLOGSTRING( "CMPMServer::GetConnectionState - Starting" ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
688 |
break; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
689 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
690 |
case EStarted: |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
691 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
692 |
MPMLOGSTRING( "CMPMServer::GetConnectionState - Started" ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
693 |
break; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
694 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
695 |
case EIdle: |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
696 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
697 |
MPMLOGSTRING( "CMPMServer::GetConnectionState - Idle" ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
698 |
break; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
699 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
700 |
case ERoaming: |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
701 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
702 |
MPMLOGSTRING( "CMPMServer::GetConnectionState - Roaming" ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
703 |
break; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
704 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
705 |
default: |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
706 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
707 |
MPMLOGSTRING( "CMPMServer::GetConnectionState - Unknown" ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
708 |
break; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
709 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
710 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
711 |
#endif // _DEBUG |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
712 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
713 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
714 |
// ----------------------------------------------------------------------------- |
58 | 715 |
// CMPMServer::CheckUsageOfIap |
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
716 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
717 |
// |
58 | 718 |
TConnectionState CMPMServer::CheckUsageOfIap( const TUint32 aIapId , |
719 |
const TConnectionId aOwnConnId ) |
|
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
720 |
{ |
58 | 721 |
MPMLOGSTRING3( "CMPMServer::CheckUsageOfIap - aIapId = %i, aOwnConnId = 0x%x", |
722 |
aIapId, aOwnConnId ) |
|
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
723 |
|
58 | 724 |
TConnectionState state = EIdle; |
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
725 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
726 |
// Loop all connections until EStarted is found or no more connections |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
727 |
// |
58 | 728 |
for ( TInt i = 0; i < iActiveBMConns.Count(); i++ ) |
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
729 |
{ |
15
4dc3bb0099b0
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
730 |
// Check if IAP Id matches; exclude matching with own connection |
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
731 |
// |
15
4dc3bb0099b0
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
732 |
if ( iActiveBMConns[i].iConnInfo.iIapId == aIapId && |
58 | 733 |
iActiveBMConns[i].iConnInfo.iConnId != aOwnConnId) |
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
734 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
735 |
state = iActiveBMConns[i].iConnInfo.iState; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
736 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
737 |
// Stop looping if EStarted found |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
738 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
739 |
if ( state == EStarted ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
740 |
{ |
58 | 741 |
break; // Breaks the for loop |
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
742 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
743 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
744 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
745 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
746 |
#ifdef _DEBUG |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
747 |
switch( state ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
748 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
749 |
case EStarting: |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
750 |
{ |
58 | 751 |
MPMLOGSTRING( "CMPMServer::CheckUsageOfIap - Starting" ) |
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
752 |
break; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
753 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
754 |
case EStarted: |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
755 |
{ |
58 | 756 |
MPMLOGSTRING( "CMPMServer::CheckUsageOfIap - Started" ) |
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
757 |
break; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
758 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
759 |
case EIdle: |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
760 |
{ |
58 | 761 |
MPMLOGSTRING( "CMPMServer::CheckUsageOfIap - Idle" ) |
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
762 |
break; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
763 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
764 |
case ERoaming: |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
765 |
{ |
58 | 766 |
MPMLOGSTRING( "CMPMServer::CheckUsageOfIap - Roaming" ) |
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
767 |
break; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
768 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
769 |
default: |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
770 |
{ |
58 | 771 |
MPMLOGSTRING( "CMPMServer::CheckUsageOfIap - Unknown" ) |
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
772 |
break; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
773 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
774 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
775 |
#endif // _DEBUG |
15
4dc3bb0099b0
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
776 |
|
58 | 777 |
return state; |
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
778 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
779 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
780 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
781 |
// CMPMServer::IsWlanConnectionStartedL |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
782 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
783 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
784 |
TUint32 CMPMServer::IsWlanConnectionStartedL( const CMPMCommsDatAccess* aCdbAccess ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
785 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
786 |
TUint32 iapId( 0 ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
787 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
788 |
MPMLOGSTRING( "CMPMServer::IsWlanConnectionStartedL" ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
789 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
790 |
TBool stopLoop( EFalse ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
791 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
792 |
// Loop all connections until EStarted is found or no more connections |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
793 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
794 |
for ( TInt i = 0; ( ( i < iActiveBMConns.Count() ) && !stopLoop ); i++ ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
795 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
796 |
// Check if IAP Id matches |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
797 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
798 |
if ( iActiveBMConns[i].iConnInfo.iState == EStarting || |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
799 |
iActiveBMConns[i].iConnInfo.iState == EStarted ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
800 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
801 |
if ( aCdbAccess->CheckWlanL( iActiveBMConns[i].iConnInfo.iIapId ) != ENotWlanIap ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
802 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
803 |
stopLoop = ETrue; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
804 |
iapId = iActiveBMConns[i].iConnInfo.iIapId; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
805 |
MPMLOGSTRING2( "CMPMServer::IsWlanConnectionStartedL, found wlan iap %d", iapId ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
806 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
807 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
808 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
809 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
810 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
811 |
return iapId; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
812 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
813 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
814 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
815 |
// CMPMServer::AppendBMIAPConnectionL |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
816 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
817 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
818 |
void CMPMServer::AppendBMIAPConnectionL( const TUint32 aIapId, |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
819 |
const TConnectionId aConnId, |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
820 |
CMPMServerSession& aSession ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
821 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
822 |
MPMLOGSTRING3( |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
823 |
"CMPMServer::AppendBMIAPConnectionL - aIapId = %i, aConnId = 0x%x", |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
824 |
aIapId, aConnId ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
825 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
826 |
TActiveBMConn conn; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
827 |
conn.iConnInfo.iIapId = aIapId; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
828 |
conn.iConnInfo.iState = EStarted; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
829 |
conn.iConnInfo.iAppUid = aSession.AppUid(); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
830 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
831 |
TInt index1 = iActiveBMConns.Find( conn, TActiveBMConn::MatchIapId ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
832 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
833 |
if ( index1 == KErrNotFound ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
834 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
835 |
// If this Iap is not yet there, insert it at the end of array |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
836 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
837 |
iActiveBMConns.AppendL( conn ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
838 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
839 |
else |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
840 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
841 |
// Iap already active, update connection state as started. |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
842 |
// This Iap could be shared by multiple applications, but |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
843 |
// update only the one with matching connection id. |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
844 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
845 |
for ( TInt i = 0; i < iActiveBMConns.Count(); i++ ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
846 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
847 |
if ( iActiveBMConns[i].iConnInfo.iConnId == aConnId ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
848 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
849 |
iActiveBMConns[i].iConnInfo.iState = EStarted; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
850 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
851 |
else if ( iActiveBMConns[i].iConnInfo.iSnap == 0 && |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
852 |
iActiveBMConns[i].iConnInfo.iIapId == aIapId ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
853 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
854 |
iActiveBMConns[i].iConnInfo.iState = EStarted; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
855 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
856 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
857 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
858 |
|
58 | 859 |
if ( aSession.ChooseBestIapCalled() ) |
860 |
{ |
|
861 |
UpdateActiveConnection( aSession ); |
|
862 |
} |
|
863 |
||
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
864 |
#ifdef _DEBUG |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
865 |
// Dump array of active connections to log in order to support testing. |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
866 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
867 |
DumpActiveBMConns(); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
868 |
#endif // _DEBUG |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
869 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
870 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
871 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
872 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
873 |
// CMPMServer::RemoveBMIAPConnection |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
874 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
875 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
876 |
void CMPMServer::RemoveBMIAPConnection( const TUint32 aIapId, |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
877 |
const TConnectionId aConnId, |
58 | 878 |
CMPMServerSession& aSession ) |
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
879 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
880 |
MPMLOGSTRING3( |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
881 |
"CMPMServer::RemoveBMIAPConnection - aIapId = %i, aConnId = 0x%x", |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
882 |
aIapId, aConnId ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
883 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
884 |
// The IAP connection lifetime is determined by the two calls |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
885 |
// IAPConnectionStarted and IAPConnectionStopped. |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
886 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
887 |
// This time we are browsing the array from the end to the beginning, |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
888 |
// because removing one element from array affects index numbering. |
58 | 889 |
// Decrement i by one, because count is n, but indexes in array are 0 .. n-1 |
890 |
for ( TInt i = iActiveBMConns.Count() - 1; i >= 0; i-- ) |
|
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
891 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
892 |
if ( iActiveBMConns[i].iConnInfo.iIapId == aIapId ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
893 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
894 |
if ( iActiveBMConns[i].iConnInfo.iSnap == 0 ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
895 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
896 |
// If IAPConnectionStopped has been called and SNAP is zero, |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
897 |
// then this entry can be removed from database. |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
898 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
899 |
iActiveBMConns.Remove( i ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
900 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
901 |
else |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
902 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
903 |
// If IAP found, reset the Iap Id as zero and |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
904 |
// update connection state as idle. |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
905 |
// This Iap could be shared by multiple applications, |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
906 |
// but update only the one with matching connection id. |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
907 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
908 |
if ( iActiveBMConns[i].iConnInfo.iConnId == aConnId ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
909 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
910 |
iActiveBMConns[i].iConnInfo.iIapId = 0; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
911 |
iActiveBMConns[i].iConnInfo.iState = EIdle; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
912 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
913 |
} |
58 | 914 |
|
915 |
// Update active connection |
|
916 |
if ( aSession.ChooseBestIapCalled() ) |
|
917 |
{ |
|
918 |
UpdateActiveConnection( aSession ); |
|
919 |
} |
|
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
920 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
921 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
922 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
923 |
#ifdef _DEBUG |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
924 |
// Dump array of active connections to log in order to support testing. |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
925 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
926 |
DumpActiveBMConns(); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
927 |
#endif // _DEBUG |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
928 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
929 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
930 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
931 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
932 |
// CMPMServer::AppendSessionL |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
933 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
934 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
935 |
void CMPMServer::AppendSessionL( const CMPMServerSession* aSession ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
936 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
937 |
MPMLOGSTRING( "CMPMServer::AppendSession" ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
938 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
939 |
iSessions.AppendL( aSession ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
940 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
941 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
942 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
943 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
944 |
// CMPMServer::RemoveSession |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
945 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
946 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
947 |
void CMPMServer::RemoveSession( const CMPMServerSession* aSession ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
948 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
949 |
MPMLOGSTRING( "CMPMServer::RemoveSession" ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
950 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
951 |
TInt index = iSessions.Find( aSession ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
952 |
if ( index != KErrNotFound ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
953 |
{ |
36
04408506c6e0
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
26
diff
changeset
|
954 |
if ( Events() ) |
04408506c6e0
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
26
diff
changeset
|
955 |
{ |
04408506c6e0
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
26
diff
changeset
|
956 |
// Cancel WLAN scan request if one exists |
04408506c6e0
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
26
diff
changeset
|
957 |
TRAP_IGNORE( Events()->CancelScanL( iSessions[index] ) ) |
04408506c6e0
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
26
diff
changeset
|
958 |
} |
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
959 |
iSessions.Remove( index ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
960 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
961 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
962 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
963 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
964 |
// CMPMServer::NotifyBMPrefIapL |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
965 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
966 |
// |
15
4dc3bb0099b0
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
967 |
void CMPMServer::NotifyBMPrefIapL( const TConnMonIapInfo& aIapInfo, |
4dc3bb0099b0
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
968 |
const TPrefIAPNotifCaller aCaller ) |
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
969 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
970 |
MPMLOGSTRING2( "CMPMServer::NotifyBMPrefIapL - IAPs count: %d", |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
971 |
aIapInfo.iCount) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
972 |
TConnMonIapInfo iapInfo = aIapInfo; |
58 | 973 |
iConnMonIapInfo = aIapInfo; |
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
974 |
#ifdef _DEBUG |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
975 |
for (TUint i = 0; i < iapInfo.Count(); i++) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
976 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
977 |
MPMLOGSTRING2( "CMPMServer::NotifyBMPrefIap - IAP: %d", |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
978 |
iapInfo.iIap[i].iIapId) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
979 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
980 |
#endif // _DEBUG |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
981 |
|
58 | 982 |
// Read info for forced roaming from Commdat |
983 |
TUint32 maxOpenTransAttempts ( KMaxOpenTransAttempts ) ; |
|
984 |
TUint32 retryAfter ( KRetryAfter ); |
|
985 |
TInt err; |
|
986 |
// CommDat reading might fail because CommDat session could be locked by another process at the moment |
|
987 |
// So, we may wait/retry to read from CommDat a bit later. |
|
988 |
TCmUsageOfWlan usageOfWlan ( ECmUsageOfWlanKnown ); |
|
989 |
do |
|
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
990 |
{ |
58 | 991 |
TRAP ( err, usageOfWlan = CommsDatAccess()->ForcedRoamingL() ); |
992 |
||
993 |
if( err ) |
|
26
0a9e01492035
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
994 |
{ |
58 | 995 |
User::After( retryAfter ); |
996 |
} |
|
997 |
} while( err && maxOpenTransAttempts-- ); |
|
998 |
||
999 |
// Start possible forced roaming |
|
1000 |
if ( !err ) |
|
1001 |
{ |
|
1002 |
if ( usageOfWlan == ECmUsageOfWlanKnown || usageOfWlan == ECmUsageOfWlanKnownAndNew ) |
|
1003 |
{ |
|
1004 |
if ( IsWlanConnectionStartedL( CommsDatAccess() ) ) |
|
26
0a9e01492035
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
1005 |
{ |
0a9e01492035
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
1006 |
iRoamingToWlanPeriodic->Cancel(); |
58 | 1007 |
iRoamingToHotspotWlanPeriodic->Cancel(); |
1008 |
||
1009 |
// Start periodic object that calls StartForcedRoamingToWlanL after 10s. |
|
1010 |
// this handles the case when new wlan connection is |
|
1011 |
// started from e.g. wlan sniffer but IAP is not yet in Internet SNAP |
|
1012 |
iRoamingToWlanPeriodic->Start( |
|
1013 |
TTimeIntervalMicroSeconds32( KRoamingToWlanUpdateInterval ), |
|
1014 |
TTimeIntervalMicroSeconds32( KRoamingToWlanUpdateInterval ), |
|
1015 |
TCallBack( StartForcedRoamingToConnectedWlanL, this ) ); |
|
1016 |
||
1017 |
// Start periodic object that calls StartForcedRoamingToWlanL after 120s. |
|
1018 |
// this handles the case when new captive portal hotspot wlan |
|
1019 |
// connection is started. IAP will be moved to Internet SNAP after |
|
1020 |
// successful login only. |
|
1021 |
iRoamingToHotspotWlanPeriodic->Start( |
|
1022 |
TTimeIntervalMicroSeconds32( KRoamingToHotspotWlanUpdateInterval ), |
|
1023 |
TTimeIntervalMicroSeconds32( KRoamingToHotspotWlanUpdateInterval ), |
|
1024 |
TCallBack( StartForcedRoamingToConnectedHotspotWlanL, this ) ); |
|
26
0a9e01492035
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
1025 |
} |
0a9e01492035
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
1026 |
else |
0a9e01492035
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
1027 |
{ |
58 | 1028 |
StartForcedRoamingToWlanL( iapInfo ); |
26
0a9e01492035
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
1029 |
} |
58 | 1030 |
|
1031 |
StartForcedRoamingFromWlanL( iapInfo ); |
|
26
0a9e01492035
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
1032 |
} |
58 | 1033 |
} |
1034 |
else |
|
1035 |
{ |
|
1036 |
MPMLOGSTRING2( "CMPMServer::NotifyBMPrefIapL - \ |
|
1037 |
reading info for forced roaming fails with err %d, forced roaming fails", err ) |
|
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1038 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1039 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1040 |
MPMLOGSTRING2( |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1041 |
"CMPMServer::NotifyBMPrefIapL - Send notifications for %d sessions", |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1042 |
iSessions.Count() ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1043 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1044 |
for ( TInt i = 0; i < iSessions.Count(); i++ ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1045 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1046 |
iapInfo = iSessions[i]->GetAvailableIAPs( ); |
15
4dc3bb0099b0
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
1047 |
iSessions[i]->PrefIAPNotificationL( iapInfo, aCaller ); |
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1048 |
} |
58 | 1049 |
|
1050 |
// If a session is displaying connection selection dialog |
|
1051 |
// the contents of the dialog should be updated according to the |
|
1052 |
// current iap availability |
|
1053 |
// |
|
1054 |
for ( TInt i( 0 ); i < iSessions.Count(); i++ ) |
|
1055 |
{ |
|
1056 |
iSessions[i]->UpdateConnectionDialogL(); |
|
1057 |
} |
|
1058 |
} |
|
1059 |
||
1060 |
// ----------------------------------------------------------------------------- |
|
1061 |
// CMPMServer::UpdateSessionConnectionDlgL |
|
1062 |
// ----------------------------------------------------------------------------- |
|
1063 |
// |
|
1064 |
void CMPMServer::UpdateSessionConnectionDlgL() |
|
1065 |
{ |
|
1066 |
MPMLOGSTRING( "CMPMServer::UpdateSessionConnectionDlgL" ) |
|
1067 |
||
1068 |
// If a session is displaying connection selection dialog |
|
1069 |
// the contents of the dialog should be updated according to the |
|
1070 |
// current iap availability |
|
1071 |
// |
|
1072 |
for ( TInt i( 0 ); i < iSessions.Count(); i++ ) |
|
1073 |
{ |
|
1074 |
iSessions[i]->UpdateConnectionDialogL(); |
|
1075 |
} |
|
1076 |
} |
|
1077 |
||
1078 |
||
1079 |
// ----------------------------------------------------------------------------- |
|
1080 |
// CMPMServer::HandlePendingMsgs |
|
1081 |
// ----------------------------------------------------------------------------- |
|
1082 |
// |
|
1083 |
void CMPMServer::HandlePendingMsgs( TUint aIapId, |
|
1084 |
TInt aError, |
|
1085 |
TInt* aErrorReturned, |
|
1086 |
TBMNeededAction* aNeededAction ) |
|
1087 |
{ |
|
1088 |
MPMLOGSTRING3( "CMPMServer::HandlePendingMsgs aError = %d iapId = %d", |
|
1089 |
aError, aIapId ) |
|
1090 |
||
1091 |
for ( TInt i( 0 ); i < iSessions.Count(); i++ ) |
|
1092 |
{ |
|
1093 |
// Read the Connection Id of the application |
|
1094 |
TConnectionId connId = iSessions[i]->ConnectionId(); |
|
1095 |
||
1096 |
// Get the current connection IapId for this connId |
|
1097 |
TUint32 currentIap = iSessions[i]->MyServer().GetBMIap( connId ); |
|
1098 |
||
1099 |
MPMLOGSTRING2( "Session IapId = %d", currentIap ); |
|
1100 |
||
1101 |
if ( currentIap == aIapId && !iSessions[i]->ChooseBestIapCalled() ) |
|
1102 |
{ |
|
1103 |
iSessions[i]->ProcessErrorComplete( aError, |
|
1104 |
aErrorReturned, |
|
1105 |
aNeededAction ); |
|
1106 |
} |
|
1107 |
} |
|
55
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
1108 |
} |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
1109 |
|
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
1110 |
|
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1111 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1112 |
// CMPMServer::HandleServerBlackListIap |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1113 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1114 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1115 |
TInt CMPMServer::HandleServerBlackListIap( const TConnectionId aConnId, |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1116 |
TUint32 aIapId, |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1117 |
TBlacklistCategory aCategory ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1118 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1119 |
MPMLOGSTRING3( |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1120 |
"CMPMServer::HandleServerBlackListIap - aConnId = 0x%x, iapId = %i", |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1121 |
aConnId, aIapId ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1122 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1123 |
MPMLOGSTRING2( |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1124 |
"CMPMServer::HandleServerBlackListIap - aCategory = %i", aCategory ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1125 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1126 |
BlackListIap( aConnId, aIapId, aCategory ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1127 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1128 |
TUint32 presumedIap = Events()->PresumedIapId( aConnId, |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1129 |
aIapId ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1130 |
if ( ( presumedIap != 0 ) && |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1131 |
( presumedIap != aIapId ) ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1132 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1133 |
MPMLOGSTRING2( |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1134 |
"CMPMServer::HandleServerBlackListIap - presumedIap = %i", |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1135 |
presumedIap ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1136 |
BlackListIap( aConnId, presumedIap, aCategory ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1137 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1138 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1139 |
return KErrNone; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1140 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1141 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1142 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1143 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1144 |
// CMPMServer::BlackListIap |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1145 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1146 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1147 |
TInt CMPMServer::BlackListIap( const TConnectionId aConnId, |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1148 |
TUint32 aIapId, |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1149 |
TBlacklistCategory aCategory ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1150 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1151 |
TInt i; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1152 |
TBool found = EFalse; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1153 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1154 |
found = FindBlacklistedConnIndex( aConnId, i ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1155 |
if ( found ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1156 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1157 |
TMPMBlackListConnId connIdInfo = iBlackListIdList[i]; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1158 |
connIdInfo.Append( aIapId, aCategory ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1159 |
iBlackListIdList.Remove( i ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1160 |
iBlackListIdList.Insert( connIdInfo, 0 ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1161 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1162 |
else |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1163 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1164 |
TMPMBlackListConnId connIdInfo; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1165 |
connIdInfo.iConnId = aConnId; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1166 |
connIdInfo.Append( aIapId, aCategory ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1167 |
iBlackListIdList.Insert( connIdInfo, 0 ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1168 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1169 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1170 |
return KErrNone; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1171 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1172 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1173 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1174 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1175 |
// CMPMServer::HandleServerUnblackListIap |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1176 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1177 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1178 |
TInt CMPMServer::HandleServerUnblackListIap( |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1179 |
const TConnectionId aConnId, |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1180 |
TUint32 aIapId ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1181 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1182 |
MPMLOGSTRING3( |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1183 |
"CMPMServer::HandleServerUnblackListIap - aConnId = 0x%x, iapId = %i" |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1184 |
,aConnId, aIapId ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1185 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1186 |
TInt i; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1187 |
TBool found = EFalse; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1188 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1189 |
found = FindBlacklistedConnIndex( aConnId, i ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1190 |
if ( found ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1191 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1192 |
// found blacklisted Connection Id |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1193 |
TMPMBlackListConnId connIdInfo = iBlackListIdList[i]; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1194 |
iBlackListIdList.Remove( i ); // remove from the list |
19
22c3c67e5001
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
17
diff
changeset
|
1195 |
|
22c3c67e5001
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
17
diff
changeset
|
1196 |
MPMLOGSTRING2( "CMPMServer::HandleServerUnblackListIap - \ |
22c3c67e5001
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
17
diff
changeset
|
1197 |
connIdInfo count: %d", connIdInfo.Count() ) |
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1198 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1199 |
if ( aIapId == 0 ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1200 |
{ // 0 will reset Connection Id blacklisted iap list |
19
22c3c67e5001
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
17
diff
changeset
|
1201 |
MPMLOGSTRING( "CMPMServer::HandleServerUnblackListIap - \ |
22c3c67e5001
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
17
diff
changeset
|
1202 |
reset Connection Id blacklisted iap list" ) |
22c3c67e5001
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
17
diff
changeset
|
1203 |
|
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1204 |
connIdInfo.Close(); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1205 |
return KErrNone; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1206 |
} |
58 | 1207 |
|
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1208 |
found = EFalse; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1209 |
for (TInt j = 0; j < connIdInfo.Count(); j++) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1210 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1211 |
if ( connIdInfo.Iap( j ) == aIapId ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1212 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1213 |
// found and remove blacklisted iap |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1214 |
connIdInfo.Remove( j ); |
19
22c3c67e5001
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
17
diff
changeset
|
1215 |
MPMLOGSTRING2( "CMPMServer::HandleServerUnblackListIap - \ |
22c3c67e5001
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
17
diff
changeset
|
1216 |
removed blacklisted iap in index = %d", j ) |
22c3c67e5001
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
17
diff
changeset
|
1217 |
|
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1218 |
if ( connIdInfo.Count() == 0 ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1219 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1220 |
return KErrNone; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1221 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1222 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1223 |
// reinsert connIdInfo at the beginning to reflect activeness |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1224 |
iBlackListIdList.Insert( connIdInfo, 0 ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1225 |
return KErrNone; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1226 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1227 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1228 |
// nothing found and reinsert at the beginning |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1229 |
// connIdInfo to reflect activeness |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1230 |
iBlackListIdList.Insert( connIdInfo, 0 ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1231 |
return KErrNotFound; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1232 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1233 |
else |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1234 |
{ |
19
22c3c67e5001
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
17
diff
changeset
|
1235 |
MPMLOGSTRING( "CMPMServer::HandleServerUnblackListIap - \ |
22c3c67e5001
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
17
diff
changeset
|
1236 |
not found blacklisted Connection Id" ) |
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1237 |
return KErrNotFound; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1238 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1239 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1240 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1241 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1242 |
// CMPMServer::HandleServerUnblackListIap |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1243 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1244 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1245 |
void CMPMServer::HandleServerUnblackListIap( |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1246 |
TBlacklistCategory aCategory ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1247 |
{ |
19
22c3c67e5001
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
17
diff
changeset
|
1248 |
MPMLOGSTRING3( "CMPMServer::HandleServerUnblackListIap -\ |
22c3c67e5001
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
17
diff
changeset
|
1249 |
aCategory = %i blacklisted Id count = %d", |
22c3c67e5001
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
17
diff
changeset
|
1250 |
aCategory, iBlackListIdList.Count() ) |
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1251 |
|
55
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
1252 |
for (TInt i = iBlackListIdList.Count()-1; i >= 0; i--) |
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1253 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1254 |
// found blacklisted Connection Id |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1255 |
TMPMBlackListConnId connIdInfo = iBlackListIdList[i]; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1256 |
iBlackListIdList.Remove( i ); // remove from the list |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1257 |
|
19
22c3c67e5001
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
17
diff
changeset
|
1258 |
MPMLOGSTRING3( "CMPMServer::HandleServerUnblackListIap - \ |
22c3c67e5001
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
17
diff
changeset
|
1259 |
aConnId = 0x%x, blacklisted IapId count = %d", connIdInfo.iConnId, |
22c3c67e5001
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
17
diff
changeset
|
1260 |
connIdInfo.Count() ) |
22c3c67e5001
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
17
diff
changeset
|
1261 |
|
55
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
1262 |
for (TInt j = connIdInfo.Count()-1; j >= 0; j--) |
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1263 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1264 |
if ( connIdInfo.Category( j ) == aCategory ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1265 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1266 |
// found and remove blacklisted iap |
19
22c3c67e5001
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
17
diff
changeset
|
1267 |
MPMLOGSTRING3( "CMPMServer::HandleServerUnblackListIap - \ |
22c3c67e5001
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
17
diff
changeset
|
1268 |
removed blacklisted iap id %i in index: %d", connIdInfo.Iap( j ), j ) |
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1269 |
connIdInfo.Remove( j ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1270 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1271 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1272 |
// If any blacklisted iaps remain reinsert at the |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1273 |
// beginning connIdInfo to reflect activeness |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1274 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1275 |
if( connIdInfo.Count() > 0 ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1276 |
{ |
19
22c3c67e5001
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
17
diff
changeset
|
1277 |
MPMLOGSTRING( "reinsert connIdInfo to reflect activeness" ) |
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1278 |
iBlackListIdList.Insert( connIdInfo, 0 ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1279 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1280 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1281 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1282 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1283 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1284 |
// CMPMServer::GetBlacklistedIAP |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1285 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1286 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1287 |
TInt CMPMServer::GetBlacklistedIAP( TConnectionId aConnId, |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1288 |
RArray<TUint32> &aBlacklistedIAP ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1289 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1290 |
TInt i; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1291 |
TBool found = EFalse; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1292 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1293 |
found = FindBlacklistedConnIndex( aConnId, i ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1294 |
if ( !found ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1295 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1296 |
return KErrNotFound; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1297 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1298 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1299 |
TMPMBlackListConnId connIdInfo = iBlackListIdList[i]; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1300 |
iBlackListIdList.Remove( i ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1301 |
iBlackListIdList.Insert( connIdInfo, 0 ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1302 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1303 |
for (TInt j = 0; j < connIdInfo.Count(); j++) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1304 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1305 |
aBlacklistedIAP.Append( connIdInfo.Iap( j ) ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1306 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1307 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1308 |
return KErrNone; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1309 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1310 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1311 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1312 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1313 |
// CMPMServer::GetBlacklistedIAP |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1314 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1315 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1316 |
TInt CMPMServer::GetBlacklistedIAP( RArray<TUint32> &aBlacklistedIAP ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1317 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1318 |
// Returns all blacklisted IAPs regardless of Connection Id |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1319 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1320 |
for ( TInt i( 0 ); i < iBlackListIdList.Count(); i++ ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1321 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1322 |
for ( TInt j( 0 ); j < iBlackListIdList[i].Count(); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1323 |
j++ ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1324 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1325 |
// Inserts an object into the array in ascending unsigned |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1326 |
// key order. No duplicate entries are permitted. |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1327 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1328 |
// The array remains unchanged following an attempt to |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1329 |
// insert a duplicate entry. |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1330 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1331 |
aBlacklistedIAP.InsertInUnsignedKeyOrder( |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1332 |
iBlackListIdList[i].Iap( j ) ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1333 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1334 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1335 |
return KErrNone; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1336 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1337 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1338 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1339 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1340 |
// CMPMServer::FindId |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1341 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1342 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1343 |
TBool CMPMServer::FindBlacklistedConnIndex( const TConnectionId aConnId, |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1344 |
TInt &aIndex ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1345 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1346 |
TInt i; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1347 |
TBool found = EFalse; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1348 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1349 |
for (i = 0;( (i < iBlackListIdList.Count()) && !found ); i++) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1350 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1351 |
if ( iBlackListIdList[i].iConnId == aConnId ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1352 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1353 |
found = ETrue; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1354 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1355 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1356 |
i--; // Since i is incremented after finding the correct iConnId |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1357 |
aIndex = i; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1358 |
return found; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1359 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1360 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1361 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1362 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1363 |
// CMPMServer::IsVoiceCallActiveL |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1364 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1365 |
// Checks if voice call is active or not. |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1366 |
// Return ETrue if voice call is active. |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1367 |
// Return EFalse if voice call is not active. |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1368 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1369 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1370 |
TBool CMPMServer::IsVoiceCallActiveL() const |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1371 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1372 |
MPMLOGSTRING( "CMPMServer::IsVoiceCallActiveL" ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1373 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1374 |
CTelephony* telephony = CTelephony::NewLC(); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1375 |
CTelephony::TCallStatusV1 callStatusV1; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1376 |
CTelephony::TCallStatusV1Pckg callStatusV1Pckg( callStatusV1 ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1377 |
CTelephony::TPhoneLine line = CTelephony::EVoiceLine; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1378 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1379 |
telephony->GetLineStatus( line, callStatusV1Pckg ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1380 |
CTelephony::TCallStatus voiceLineStatus = callStatusV1.iStatus; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1381 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1382 |
CleanupStack::PopAndDestroy( telephony ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1383 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1384 |
if ( voiceLineStatus == CTelephony::EStatusDialling || |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1385 |
voiceLineStatus == CTelephony::EStatusRinging || |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1386 |
voiceLineStatus == CTelephony::EStatusAnswering || |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1387 |
voiceLineStatus == CTelephony::EStatusConnecting || |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1388 |
voiceLineStatus == CTelephony::EStatusConnected || |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1389 |
voiceLineStatus == CTelephony::EStatusReconnectPending || |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1390 |
voiceLineStatus == CTelephony::EStatusDisconnecting || |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1391 |
voiceLineStatus == CTelephony::EStatusHold || |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1392 |
voiceLineStatus == CTelephony::EStatusTransferring || |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1393 |
voiceLineStatus == CTelephony::EStatusTransferAlerting ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1394 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1395 |
MPMLOGSTRING2( |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1396 |
"CMPMServer::IsVoiceCallActiveL Voice call is active: %d", |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1397 |
voiceLineStatus ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1398 |
return ETrue; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1399 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1400 |
else if ( voiceLineStatus == CTelephony::EStatusIdle || |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1401 |
voiceLineStatus == CTelephony::EStatusUnknown ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1402 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1403 |
MPMLOGSTRING2( |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1404 |
"CMPMServer::IsVoiceCallActiveL Voice call is not active: %d", |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1405 |
voiceLineStatus ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1406 |
return EFalse; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1407 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1408 |
else |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1409 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1410 |
MPMLOGSTRING2( |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1411 |
"CMPMServer::IsVoiceCallActiveL Unknown voice line status: %d", |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1412 |
voiceLineStatus ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1413 |
return EFalse; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1414 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1415 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1416 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1417 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1418 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1419 |
// CMPMServer::IsModeGSM |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1420 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1421 |
// Checks if mode is GSM or not. |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1422 |
// Return ETrue if mode is GSM. |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1423 |
// Return EFalse if mode is something else. |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1424 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1425 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1426 |
TBool CMPMServer::IsModeGSM() const |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1427 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1428 |
MPMLOGSTRING( "CMPMServer::IsModeGSM" ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1429 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1430 |
if ( iTSYLoaded ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1431 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1432 |
RMobilePhone::TMobilePhoneNetworkMode mode( |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1433 |
RMobilePhone::ENetworkModeUnknown ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1434 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1435 |
TInt ret = iMobilePhone.GetCurrentMode( mode ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1436 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1437 |
if ( ( ret == KErrNone ) && |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1438 |
( mode == RMobilePhone::ENetworkModeGsm ) ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1439 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1440 |
MPMLOGSTRING( "CMPMServer::IsModeGSM Mode is GSM" ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1441 |
return ETrue; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1442 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1443 |
else |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1444 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1445 |
MPMLOGSTRING( "CMPMServer::IsModeGSM Mode is not GSM" ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1446 |
return EFalse; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1447 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1448 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1449 |
MPMLOGSTRING( "CMPMServer::IsModeGSM phone.tsy not loaded" ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1450 |
return EFalse; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1451 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1452 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1453 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1454 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1455 |
// CMPMServer::IsDTMSupported |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1456 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1457 |
// Checks if phone supports Dual Transfer Mode or not. |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1458 |
// Return ETrue if phone supports DTM. |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1459 |
// Return EFalse if phone does not support DTM. |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1460 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1461 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1462 |
TBool CMPMServer::IsDTMSupported() const |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1463 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1464 |
MPMLOGSTRING( "CMPMServer::IsDTMSupported" ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1465 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1466 |
if ( iPacketServLoaded ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1467 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1468 |
TBool rv = iDtmWatcher->IsInDualMode(); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1469 |
if ( rv ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1470 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1471 |
MPMLOGSTRING( "CMPMServer::IsDTMSupported DTM is supported" ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1472 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1473 |
else |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1474 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1475 |
MPMLOGSTRING( "CMPMServer::IsDTMSupported DTM is not supported" ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1476 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1477 |
return rv; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1478 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1479 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1480 |
MPMLOGSTRING( "CMPMServer::IsDTMSupported Packet service not loaded" ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1481 |
return EFalse; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1482 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1483 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1484 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1485 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1486 |
// CMPMServer::DumpActiveBMConns |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1487 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1488 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1489 |
void CMPMServer::DumpActiveBMConns() |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1490 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1491 |
#ifdef _DEBUG |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1492 |
// Dump array of active connections to log in order to support testing. |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1493 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1494 |
MPMLOGSTRING( "Display array of active connections - Start" ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1495 |
MPMLOGSTRING( "" ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1496 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1497 |
if ( iActiveBMConns.Count() == 0 ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1498 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1499 |
MPMLOGSTRING( "Array of active connections is empty" ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1500 |
MPMLOGSTRING( "" ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1501 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1502 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1503 |
for ( TInt i = 0; i < iActiveBMConns.Count(); i++ ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1504 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1505 |
MPMLOGSTRING3( "Connection Id = 0x%x Snap = %i", |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1506 |
iActiveBMConns[i].iConnInfo.iConnId, |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1507 |
iActiveBMConns[i].iConnInfo.iSnap ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1508 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1509 |
switch( iActiveBMConns[i].iConnInfo.iState ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1510 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1511 |
case EStarting: |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1512 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1513 |
MPMLOGSTRING2( "IAP %i: Connection state = Starting", |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1514 |
iActiveBMConns[i].iConnInfo.iIapId ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1515 |
break; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1516 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1517 |
case EStarted: |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1518 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1519 |
MPMLOGSTRING2( "IAP %i: Connection state = Started", |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1520 |
iActiveBMConns[i].iConnInfo.iIapId ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1521 |
break; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1522 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1523 |
case EIdle: |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1524 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1525 |
MPMLOGSTRING2( "IAP %i: Connection state = Idle", |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1526 |
iActiveBMConns[i].iConnInfo.iIapId ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1527 |
break; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1528 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1529 |
case ERoaming: |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1530 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1531 |
MPMLOGSTRING2( "IAP %i: Connection state = Roaming", |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1532 |
iActiveBMConns[i].iConnInfo.iIapId ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1533 |
break; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1534 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1535 |
default: |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1536 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1537 |
MPMLOGSTRING2( "IAP %i: Unknown connection state", |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1538 |
iActiveBMConns[i].iConnInfo.iIapId ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1539 |
break; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1540 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1541 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1542 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1543 |
MPMLOGSTRING( "" ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1544 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1545 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1546 |
MPMLOGSTRING( "Display array of active connections - End" ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1547 |
#endif // _DEBUG |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1548 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1549 |
|
58 | 1550 |
|
1551 |
// ----------------------------------------------------------------------------- |
|
1552 |
// CMPMServer::DefaultConnection |
|
1553 |
// ----------------------------------------------------------------------------- |
|
1554 |
// |
|
1555 |
CMPMDefaultConnection* CMPMServer::DefaultConnection() |
|
1556 |
{ |
|
1557 |
MPMLOGSTRING( "CMPMServer::DefaultConnection:\ |
|
1558 |
Default Connection" ) |
|
1559 |
return iDefaultConnection; |
|
1560 |
} |
|
1561 |
||
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1562 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1563 |
// CMPMServer::StartedConnectionExists |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1564 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1565 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1566 |
TInt CMPMServer::StartedConnectionExists( TInt aIapId ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1567 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1568 |
MPMLOGSTRING( "CMPMServer::StartedConnectionExists" ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1569 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1570 |
// Loop all connections until EStarted is found or no more connections |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1571 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1572 |
for ( TInt i = 0; ( i < iActiveBMConns.Count() ); i++ ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1573 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1574 |
if ( iActiveBMConns[i].iConnInfo.iState == EStarted && |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1575 |
( aIapId == KErrNotFound || aIapId == iActiveBMConns[i].iConnInfo.iIapId ) ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1576 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1577 |
MPMLOGSTRING( "CMPMServer::StartedConnectionExists: True" ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1578 |
return iActiveBMConns[i].iConnInfo.iIapId; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1579 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1580 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1581 |
// Modem connection may exist, check from connection counter |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1582 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1583 |
if ( ConnectionCounter() > 0 ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1584 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1585 |
MPMLOGSTRING( "CMPMServer::StartedConnectionExists: True (modem connection)" ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1586 |
return KMaxTInt; // arbitrary high number that is NOT from Iap range[0:255] |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1587 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1588 |
else |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1589 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1590 |
MPMLOGSTRING( "CMPMServer::StartedConnectionExists: False" ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1591 |
return KErrNotFound; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1592 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1593 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1594 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1595 |
// ----------------------------------------------------------------------------- |
58 | 1596 |
// CMPMServer::AppendWlanQueryQueueL |
1597 |
// ----------------------------------------------------------------------------- |
|
1598 |
// |
|
1599 |
void CMPMServer::AppendWlanQueryQueueL( CMPMWlanQueryDialog* aDlg ) |
|
1600 |
{ |
|
1601 |
if( aDlg ) |
|
1602 |
{ |
|
1603 |
iWlanQueryQueue->AppendL( aDlg ); |
|
1604 |
} |
|
1605 |
else |
|
1606 |
{ |
|
1607 |
MPMLOGSTRING( "CMPMServer::AppendWlanQueryQueueL argument NULL, Error" ) |
|
1608 |
} |
|
1609 |
} |
|
1610 |
||
1611 |
// ----------------------------------------------------------------------------- |
|
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1612 |
// CMPMServer::StopConnections |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1613 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1614 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1615 |
void CMPMServer::StopConnections( TInt aIapId ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1616 |
{ |
17
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
1617 |
MPMLOGSTRING2( "CMPMServer::StopConnections aIapId = %d", aIapId ) |
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1618 |
for (TInt index = 0; index < iSessions.Count(); index++) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1619 |
{ |
17
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
1620 |
CMPMServerSession* session = iSessions[index]; |
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1621 |
// Stop connection |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1622 |
if ( aIapId == 0 ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1623 |
{ |
17
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
1624 |
session->StopConnection(); |
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1625 |
} |
17
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
1626 |
else if ( GetBMIap( session->ConnectionId() ) == aIapId ) |
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1627 |
{ |
17
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
1628 |
TRAP_IGNORE( session->StopIAPNotificationL( aIapId )); |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
1629 |
} |
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1630 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1631 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1632 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1633 |
// ----------------------------------------------------------------------------- |
58 | 1634 |
// CMPMServer::UpdateActiveConnection |
1635 |
// ----------------------------------------------------------------------------- |
|
1636 |
// |
|
1637 |
void CMPMServer::UpdateActiveConnection( CMPMServerSession& aSession ) |
|
1638 |
{ |
|
1639 |
// Update active connection |
|
1640 |
TInt ret = KErrNone; |
|
1641 |
||
1642 |
TRAP ( ret, UpdateActiveConnectionL( aSession ) ); |
|
1643 |
||
1644 |
if ( ret != KErrNone ) |
|
1645 |
{ |
|
1646 |
iActiveBearerType = EMPMBearerTypeNone; |
|
1647 |
iActiveIapId = 0; |
|
1648 |
iActiveSnapId = 0; |
|
1649 |
} |
|
1650 |
} |
|
1651 |
||
1652 |
// ----------------------------------------------------------------------------- |
|
1653 |
// CMPMServer::UpdateActiveConnectionL |
|
1654 |
// ----------------------------------------------------------------------------- |
|
1655 |
// |
|
1656 |
void CMPMServer::UpdateActiveConnectionL( CMPMServerSession& aSession ) |
|
1657 |
{ |
|
1658 |
MPMLOGSTRING( "CMPMServer::UpdateActiveConnectionL" ) |
|
1659 |
||
1660 |
TBool keysUpToDate( ETrue ); |
|
1661 |
||
1662 |
// number of active iaps |
|
1663 |
TInt numberOfActive = NumberOfActiveConnections( keysUpToDate ); |
|
1664 |
||
1665 |
if ( numberOfActive == 0 ) |
|
1666 |
{ |
|
1667 |
// If no active connections then just reset keys and publish |
|
1668 |
iActiveBearerType = EMPMBearerTypeNone; |
|
1669 |
iActiveIapId = 0; |
|
1670 |
iActiveSnapId = 0; |
|
1671 |
PublishActiveConnection(); |
|
1672 |
return; |
|
1673 |
} |
|
1674 |
||
1675 |
if ( keysUpToDate ) |
|
1676 |
{ |
|
1677 |
MPMLOGSTRING( "CMPMServer::UpdateActiveConnectionL: already up-to-date" ) |
|
1678 |
return; |
|
1679 |
} |
|
1680 |
||
1681 |
if ( numberOfActive > 1 ) |
|
1682 |
{ |
|
1683 |
// Check if all active connections are in same snap |
|
1684 |
TUint32 snapId; |
|
1685 |
||
1686 |
if ( CommsDatAccess()->AreActiveIapsInSameSnapL( |
|
1687 |
iActiveBMConns, snapId, *this ) ) |
|
1688 |
{ |
|
1689 |
MPMLOGSTRING( "CMPMServer::UpdateActiveConnectionL: Active iaps are in one SNAP" ) |
|
1690 |
// Select active connection according to priority |
|
1691 |
CommsDatAccess()->SelectActiveConnectionL ( |
|
1692 |
snapId, |
|
1693 |
iActiveBMConns, |
|
1694 |
iActiveIapId, |
|
1695 |
iActiveSnapId, |
|
1696 |
iActiveBearerType, |
|
1697 |
aSession ); |
|
1698 |
||
1699 |
PublishActiveConnection(); |
|
1700 |
return; |
|
1701 |
} |
|
1702 |
||
1703 |
MPMLOGSTRING( "CMPMServer::UpdateActiveConnectionL: Active iaps are in different SNAPs" ) |
|
1704 |
} |
|
1705 |
||
1706 |
// Reset active connections |
|
1707 |
iActiveBearerType = EMPMBearerTypeNone; |
|
1708 |
iActiveIapId = 0; |
|
1709 |
iActiveSnapId = 0; |
|
1710 |
||
1711 |
// Active connections locating in different snaps |
|
1712 |
// Use priority order vpn, wlan and packet |
|
1713 |
for ( TInt index = 0; index < iActiveBMConns.Count(); index++ ) |
|
1714 |
{ |
|
1715 |
CMPMServerSession* serverSession = GetServerSession( |
|
1716 |
iActiveBMConns[index].iConnInfo.iConnId ); |
|
1717 |
||
1718 |
// Do check only for active connections |
|
1719 |
if ( iActiveBMConns[index].iConnInfo.iState == EStarted && |
|
1720 |
serverSession->ChooseBestIapCalled() ) |
|
1721 |
{ |
|
1722 |
TMPMBearerType bearerType = EMPMBearerTypeOther; |
|
1723 |
||
1724 |
TInt ret = iDedicatedClients.Find( iActiveBMConns[index].iConnInfo.iAppUid ); |
|
1725 |
if ( ret != KErrNotFound ) |
|
1726 |
{ |
|
1727 |
// Skip dedicated client |
|
1728 |
MPMLOGSTRING2( "Skip dedicated client = %d", iActiveBMConns[index].iConnInfo.iAppUid ) |
|
1729 |
continue; |
|
1730 |
} |
|
1731 |
||
1732 |
bearerType = CommsDatAccess()->GetBearerTypeL( |
|
1733 |
iActiveBMConns[index].iConnInfo.iIapId ); |
|
1734 |
||
1735 |
if ( bearerType == EMPMBearerTypeOther ) |
|
1736 |
{ |
|
1737 |
// Don't publish this connection |
|
1738 |
continue; |
|
1739 |
} |
|
1740 |
||
1741 |
// This is true if, |
|
1742 |
// bearer type is smaller or different than none |
|
1743 |
// or |
|
1744 |
// bearer type is same and iap is different. |
|
1745 |
if ( ( bearerType < iActiveBearerType ) || |
|
1746 |
( iActiveBearerType == EMPMBearerTypeNone ) || |
|
1747 |
( ( bearerType == iActiveBearerType) && |
|
1748 |
( iActiveIapId != iActiveBMConns[index].iConnInfo.iIapId ) ) ) |
|
1749 |
{ |
|
1750 |
iActiveBearerType = bearerType; |
|
1751 |
iActiveIapId = iActiveBMConns[index].iConnInfo.iIapId; |
|
1752 |
iActiveSnapId = iActiveBMConns[index].iConnInfo.iSnap; |
|
1753 |
} |
|
1754 |
} |
|
1755 |
} |
|
1756 |
PublishActiveConnection(); |
|
1757 |
} |
|
1758 |
||
1759 |
// ----------------------------------------------------------------------------- |
|
1760 |
// CMPMServer::MapBearerType |
|
1761 |
// ----------------------------------------------------------------------------- |
|
1762 |
// |
|
1763 |
TUint32 CMPMServer::MapBearerType(TMPMBearerType aBearerType) |
|
1764 |
{ |
|
1765 |
MPMLOGSTRING( "CMPMServer::MapBearerType" ) |
|
1766 |
||
1767 |
switch ( aBearerType ) |
|
1768 |
{ |
|
1769 |
case EMPMBearerTypeNone: |
|
1770 |
return 0; |
|
1771 |
||
1772 |
case EMPMBearerTypeVpn: |
|
1773 |
return KCommDbBearerVirtual; |
|
1774 |
||
1775 |
case EMPMBearerTypeWlan: |
|
1776 |
return KCommDbBearerWLAN; |
|
1777 |
||
1778 |
case EMPMBearerTypePacketData: |
|
1779 |
return KCommDbBearerWcdma; |
|
1780 |
||
1781 |
case EMPMBearerTypeOther: |
|
1782 |
return KCommDbBearerUnknown; |
|
1783 |
||
1784 |
default: |
|
1785 |
MPMLOGSTRING( "CMPMServer::MapBearerType: Unknown bearer type" ) |
|
1786 |
break; |
|
1787 |
} |
|
1788 |
||
1789 |
return KCommDbBearerUnknown; |
|
1790 |
} |
|
1791 |
||
1792 |
// ----------------------------------------------------------------------------- |
|
1793 |
// CMPMServer::PublishActiveConnection |
|
1794 |
// ----------------------------------------------------------------------------- |
|
1795 |
// |
|
1796 |
void CMPMServer::PublishActiveConnection() |
|
1797 |
{ |
|
1798 |
MPMLOGSTRING( "CMPMServer::PublishActiveConnection" ) |
|
1799 |
||
1800 |
// update active connection keys |
|
1801 |
RProperty::Set( KMPMActiveConnectionCategory, |
|
1802 |
KMPMPSKeyActiveConnectionIap, |
|
1803 |
iActiveIapId ); |
|
1804 |
||
1805 |
RProperty::Set( KMPMActiveConnectionCategory, |
|
1806 |
KMPMPSKeyActiveConnectionSnap, |
|
1807 |
iActiveSnapId ); |
|
1808 |
||
1809 |
RProperty::Set( KMPMActiveConnectionCategory, |
|
1810 |
KMPMPSKeyActiveConnectionBearer, |
|
1811 |
MapBearerType( iActiveBearerType ) ); |
|
1812 |
||
1813 |
MPMLOGSTRING4( "CMPMServer::PublishActiveConnection: Set to: %d, %d, %d", |
|
1814 |
iActiveIapId, iActiveSnapId, iActiveBearerType ) |
|
1815 |
} |
|
1816 |
||
1817 |
// ----------------------------------------------------------------------------- |
|
1818 |
// CMPMServer::NumberOfActiveConnections |
|
1819 |
// Returns number of active iaps. |
|
1820 |
// ----------------------------------------------------------------------------- |
|
1821 |
// |
|
1822 |
TInt CMPMServer::NumberOfActiveConnections( TBool& aKeysUpToDate ) |
|
1823 |
{ |
|
1824 |
MPMLOGSTRING( "CMPMServer::NumberOfActiveConnections" ) |
|
1825 |
||
1826 |
aKeysUpToDate = ETrue; |
|
1827 |
TInt count( 0 ); |
|
1828 |
RArray<TUint32> activeIaps; |
|
1829 |
||
1830 |
activeIaps.Reset(); |
|
1831 |
||
1832 |
for ( TInt index = 0; index < iActiveBMConns.Count(); index++ ) |
|
1833 |
{ |
|
1834 |
CMPMServerSession* serverSession = GetServerSession( |
|
1835 |
iActiveBMConns[index].iConnInfo.iConnId ); |
|
1836 |
||
1837 |
if ( iActiveBMConns[index].iConnInfo.iState == EStarted && |
|
1838 |
serverSession->ChooseBestIapCalled() ) |
|
1839 |
{ |
|
1840 |
TInt ret = activeIaps.Find( iActiveBMConns[index].iConnInfo.iIapId ); |
|
1841 |
||
1842 |
if ( ret == KErrNotFound ) |
|
1843 |
{ |
|
1844 |
activeIaps.Append ( iActiveBMConns[index].iConnInfo.iIapId ); |
|
1845 |
count++; |
|
1846 |
} |
|
1847 |
||
1848 |
if ( iActiveIapId != iActiveBMConns[index].iConnInfo.iIapId ) |
|
1849 |
{ |
|
1850 |
// iap that is different from current active iap was found |
|
1851 |
aKeysUpToDate = EFalse; |
|
1852 |
} |
|
1853 |
} |
|
1854 |
} |
|
1855 |
||
1856 |
activeIaps.Close(); |
|
1857 |
MPMLOGSTRING2( "CMPMServer::NumberOfActiveConnections: count = %d", count ) |
|
1858 |
||
1859 |
return count; |
|
1860 |
} |
|
1861 |
||
1862 |
// ----------------------------------------------------------------------------- |
|
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1863 |
// CMPMServer::UserConnectionInInternet |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1864 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1865 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1866 |
TBool CMPMServer::UserConnectionInInternet() const |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1867 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1868 |
TBool isInternet = EFalse; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1869 |
TInt ret = KErrNone; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1870 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1871 |
TRAP( ret, isInternet = iCommsDatAccess->IsInternetSnapL( |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1872 |
UserConnPref()->IapId(), UserConnPref()->SnapId() ) ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1873 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1874 |
if ( ret != KErrNone ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1875 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1876 |
isInternet = EFalse; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1877 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1878 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1879 |
return isInternet; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1880 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1881 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1882 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1883 |
// CMPMServer::StartForcedRoamingToWlanL |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1884 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1885 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1886 |
void CMPMServer::StartForcedRoamingToWlanL( const TConnMonIapInfo& aIapInfo ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1887 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1888 |
MPMLOGSTRING( "CMPMServer::StartForcedRoamingToWlan" ) |
58 | 1889 |
|
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1890 |
// Copy all available wlan iap ids to own array |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1891 |
RArray<TUint32> wlanIapIds; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1892 |
CleanupClosePushL( wlanIapIds ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1893 |
RAvailableIAPList iapList; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1894 |
CleanupClosePushL( iapList ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1895 |
|
8
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
1896 |
for ( TUint index = 0; index < aIapInfo.iCount; index++ ) |
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1897 |
{ |
58 | 1898 |
TWlanIapType iapType ( ENotWlanIap ); |
1899 |
TRAPD (leave, iapType = CommsDatAccess()->CheckWlanL( aIapInfo.iIap[index].iIapId ) ); |
|
1900 |
if ( ( iapType != ENotWlanIap ) && ( leave == KErrNone ) ) |
|
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1901 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1902 |
// Accept only wlan iaps in internet snap |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1903 |
if ( iCommsDatAccess->IsInternetSnapL( aIapInfo.iIap[index].iIapId, 0 ) ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1904 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1905 |
wlanIapIds.AppendL( aIapInfo.iIap[index].iIapId ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1906 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1907 |
} |
58 | 1908 |
// Fill iap list to be used later to check best iap; |
1909 |
if ( leave == KErrNone ) |
|
1910 |
{ |
|
1911 |
iapList.AppendL( aIapInfo.iIap[index].iIapId ); |
|
1912 |
} |
|
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1913 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1914 |
// No wlans available -> no reason to continue |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1915 |
if ( !wlanIapIds.Count() ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1916 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1917 |
CleanupStack::PopAndDestroy( &iapList ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1918 |
CleanupStack::PopAndDestroy( &wlanIapIds ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1919 |
return; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1920 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1921 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1922 |
// Go through all active connections and start roaming for the ones connected |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1923 |
// to snap containing wlan and not using mobility api |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1924 |
for ( TInt index = 0; index < iActiveBMConns.Count(); index++ ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1925 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1926 |
// Check if snap is internet snap |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1927 |
TBool internetSnap = |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1928 |
iCommsDatAccess->IsInternetSnapL( |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1929 |
iActiveBMConns[index].iConnInfo.iIapId, |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1930 |
iActiveBMConns[index].iConnInfo.iSnap ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1931 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1932 |
CMPMServerSession* serverSession = GetServerSession( |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1933 |
iActiveBMConns[index].iConnInfo.iConnId ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1934 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1935 |
// Check that connection is started, established to snap and |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1936 |
// choose best iap is called for the connection |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1937 |
if ( ( iActiveBMConns[index].iConnInfo.iState == EStarted ) && |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1938 |
( iActiveBMConns[index].iConnInfo.iSnap ) && |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1939 |
( serverSession->ChooseBestIapCalled() ) && |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1940 |
( internetSnap ) ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1941 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1942 |
// Notify client to disconnect |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1943 |
NotifyDisconnectL( index, wlanIapIds, iapList, ETrue, |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1944 |
EMPMBearerTypeWlan ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1945 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1946 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1947 |
CleanupStack::PopAndDestroy( &iapList ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1948 |
CleanupStack::PopAndDestroy( &wlanIapIds ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1949 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1950 |
|
26
0a9e01492035
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
1951 |
|
0a9e01492035
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
1952 |
// --------------------------------------------------------------------------- |
0a9e01492035
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
1953 |
// CMPMServer::StartForcedRoamingToConnectedWlanL |
0a9e01492035
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
1954 |
// --------------------------------------------------------------------------- |
0a9e01492035
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
1955 |
// |
0a9e01492035
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
1956 |
TInt CMPMServer::StartForcedRoamingToConnectedWlanL( TAny* aUpdater ) |
0a9e01492035
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
1957 |
{ |
58 | 1958 |
MPMLOGSTRING( "CMPMServer::StartForcedRoamingToConnectedWlanL" ) |
1959 |
CMPMServer* self = static_cast<CMPMServer*>( aUpdater ); |
|
1960 |
if ( self ) |
|
1961 |
{ |
|
1962 |
// cancel the periodic object |
|
1963 |
self->iRoamingToWlanPeriodic->Cancel(); |
|
1964 |
self->StartForcedRoamingToWlanL( self->iConnMonIapInfo ); |
|
62
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
1965 |
// Added also execution of policy based roaming logic because |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
1966 |
// connections that are in EStarting state, when WLAN signal |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
1967 |
// gets weak, would remain in WLAN as long as signal is weak. |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
1968 |
self->StartForcedRoamingFromWlanL( self->iConnMonIapInfo ); |
58 | 1969 |
} |
26
0a9e01492035
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
1970 |
return 0; |
0a9e01492035
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
1971 |
} |
0a9e01492035
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
1972 |
|
58 | 1973 |
// --------------------------------------------------------------------------- |
1974 |
// CMPMServer::StartForcedRoamingToConnectedHotspotWlanL |
|
1975 |
// --------------------------------------------------------------------------- |
|
1976 |
// |
|
1977 |
TInt CMPMServer::StartForcedRoamingToConnectedHotspotWlanL( TAny* aUpdater ) |
|
1978 |
{ |
|
1979 |
MPMLOGSTRING( "CMPMServer::StartForcedRoamingToConnectedHotspotWlanL" ) |
|
1980 |
CMPMServer* self = static_cast<CMPMServer*>( aUpdater ); |
|
1981 |
if ( self ) |
|
1982 |
{ |
|
1983 |
// cancel the periodic object |
|
1984 |
self->iRoamingToHotspotWlanPeriodic->Cancel(); |
|
1985 |
self->StartForcedRoamingToWlanL( self->iConnMonIapInfo ); |
|
62
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
1986 |
// Added also execution of policy based roaming logic because |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
1987 |
// connections that are in EStarting state, when WLAN signal |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
1988 |
// gets weak, would remain in WLAN as long as signal is weak. |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
1989 |
self->StartForcedRoamingFromWlanL( self->iConnMonIapInfo ); |
58 | 1990 |
} |
1991 |
return 0; |
|
1992 |
} |
|
26
0a9e01492035
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
1993 |
|
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1994 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1995 |
// CMPMServer::StartForcedRoamingFromWlanL |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1996 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1997 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1998 |
void CMPMServer::StartForcedRoamingFromWlanL( const TConnMonIapInfo& aIapInfo ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1999 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2000 |
MPMLOGSTRING( "CMPMServer::StartForcedRoamingFromWlan" ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2001 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2002 |
// Copy all available packet data iap ids to own array |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2003 |
RArray<TUint32> packetDataIapIds; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2004 |
CleanupClosePushL( packetDataIapIds ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2005 |
|
8
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2006 |
for ( TUint index = 0; index < aIapInfo.iCount; index++ ) |
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2007 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2008 |
if ( CommsDatAccess()->GetBearerTypeL( aIapInfo.iIap[index].iIapId ) == |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2009 |
EMPMBearerTypePacketData ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2010 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2011 |
// Accept only packet data iaps in internet snap |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2012 |
if ( iCommsDatAccess->IsInternetSnapL( aIapInfo.iIap[index].iIapId, 0 ) ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2013 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2014 |
packetDataIapIds.AppendL( aIapInfo.iIap[index].iIapId ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2015 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2016 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2017 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2018 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2019 |
// No packet data iaps available -> no reason to continue |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2020 |
if ( !packetDataIapIds.Count() ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2021 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2022 |
CleanupStack::PopAndDestroy( &packetDataIapIds ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2023 |
return; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2024 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2025 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2026 |
// Go through all active connections and start roaming for the ones connected |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2027 |
// to a wlan not anymore listed in available iaps and not using mobility api |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2028 |
for ( TInt index = 0; index < iActiveBMConns.Count(); index++ ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2029 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2030 |
if ( iCommsDatAccess->CheckWlanL( iActiveBMConns[index].iConnInfo.iIapId ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2031 |
== EWlanIap ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2032 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2033 |
// Check if used WLAN is still available |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2034 |
TBool currentWlanIapAvailable = EFalse; |
8
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2035 |
for ( TUint iapIndex = 0; iapIndex < aIapInfo.iCount; iapIndex++ ) |
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2036 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2037 |
if ( aIapInfo.iIap[iapIndex].iIapId == |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2038 |
iActiveBMConns[index].iConnInfo.iIapId ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2039 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2040 |
// Current WLAN IAP found from list of available IAPs |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2041 |
currentWlanIapAvailable = ETrue; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2042 |
break; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2043 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2044 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2045 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2046 |
if ( !currentWlanIapAvailable ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2047 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2048 |
// Current WLAN not available anymore |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2049 |
// Check if snap is internet snap |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2050 |
TBool internetSnap = iCommsDatAccess->IsInternetSnapL( |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2051 |
iActiveBMConns[index].iConnInfo.iIapId, |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2052 |
iActiveBMConns[index].iConnInfo.iSnap ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2053 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2054 |
CMPMServerSession* serverSession = GetServerSession( |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2055 |
iActiveBMConns[index].iConnInfo.iConnId ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2056 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2057 |
// Check that connection is started, established to snap, |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2058 |
// choose best iap is called for the connection |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2059 |
if ( ( iActiveBMConns[index].iConnInfo.iState == EStarted ) && |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2060 |
( iActiveBMConns[index].iConnInfo.iSnap ) && |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2061 |
( serverSession->ChooseBestIapCalled() ) && |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2062 |
( internetSnap ) ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2063 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2064 |
// Notify client to disconnect, don't check if current |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2065 |
// WLAN IAP is the best because we want to disconnect |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2066 |
// it anyway (it was not included in available IAP |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2067 |
// list anymore) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2068 |
RAvailableIAPList iapList; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2069 |
CleanupClosePushL( iapList ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2070 |
NotifyDisconnectL( index, packetDataIapIds, iapList, EFalse, |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2071 |
EMPMBearerTypePacketData ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2072 |
CleanupStack::PopAndDestroy( &iapList ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2073 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2074 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2075 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2076 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2077 |
CleanupStack::PopAndDestroy( &packetDataIapIds ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2078 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2079 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2080 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2081 |
// CMPMServer::NotifyDisconnectL |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2082 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2083 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2084 |
void CMPMServer::NotifyDisconnectL( TInt aConnIndex, |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2085 |
RArray<TUint32>& aAvailIapIds, |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2086 |
RAvailableIAPList& aIapList, |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2087 |
TBool aCheckForBestIap, |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2088 |
TMPMBearerType aDestinationBearerType ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2089 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2090 |
MPMLOGSTRING( "CMPMServer::NotifyDisconnectL" ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2091 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2092 |
// Get iaps in internet snap |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2093 |
RArray<TNetIap> destNetIds; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2094 |
CleanupClosePushL( destNetIds ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2095 |
CommsDatAccess()->SearchDNEntriesL( iActiveBMConns[aConnIndex].iConnInfo.iSnap, |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2096 |
destNetIds ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2097 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2098 |
// Save available iaps in internet snap |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2099 |
RArray<TUint32> iapIdsInInternet; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2100 |
CleanupClosePushL( iapIdsInInternet ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2101 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2102 |
for ( TInt iIndex = 0; iIndex < destNetIds.Count(); iIndex++ ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2103 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2104 |
for ( TInt wIndex = 0; wIndex < aAvailIapIds.Count(); wIndex++ ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2105 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2106 |
if ( destNetIds[iIndex].iIapId == aAvailIapIds[wIndex] ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2107 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2108 |
iapIdsInInternet.AppendL( destNetIds[iIndex].iIapId ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2109 |
break; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2110 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2111 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2112 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2113 |
if ( iapIdsInInternet.Count() ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2114 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2115 |
// Leave loop when count is non-zero |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2116 |
break; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2117 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2118 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2119 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2120 |
// Check if an iap in internet snap is available |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2121 |
if ( iapIdsInInternet.Count() ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2122 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2123 |
// Find session and notify error |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2124 |
for (TInt sIndex = 0; sIndex < iSessions.Count(); sIndex++ ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2125 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2126 |
// Check that CMPMIapSelection object exists for the session. |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2127 |
TRAPD( error, iSessions[sIndex]->IapSelectionL() ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2128 |
if ( error == KErrNone ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2129 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2130 |
MPMLOGSTRING( "CMPMServer::NotifyDisconnectL: IapSelectionL() != NULL" ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2131 |
// Check the connection preferences for forced roaming |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2132 |
if ( iSessions[sIndex]->ForcedRoaming() ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2133 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2134 |
MPMLOGSTRING( "CMPMServer::NotifyDisconnectL: ForcedRoaming == ETrue" ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2135 |
// Notify disconnect error for session, |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2136 |
// if mobility api is not used |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2137 |
if ( ( iSessions[sIndex]->ConnectionId() == |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2138 |
iActiveBMConns[aConnIndex].iConnInfo.iConnId ) && |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2139 |
!iSessions[sIndex]->PreferredIapRequested() && |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2140 |
iSessions[sIndex]->IsBearerAccepted( aDestinationBearerType ) ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2141 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2142 |
if ( aCheckForBestIap ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2143 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2144 |
// Check whether current IAP and the best IAP are the same. |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2145 |
// Disconnection not done if IAPs are the same |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2146 |
TMpmConnPref connPref; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2147 |
connPref.SetIapId( 0 ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2148 |
connPref.SetSnapId( |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2149 |
iActiveBMConns[aConnIndex].iConnInfo.iSnap ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2150 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2151 |
iSessions[sIndex]->IapSelectionL()->ChooseBestIAPL( connPref, aIapList ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2152 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2153 |
// if the best iap is the current iap, don't roam, move to next item |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2154 |
if ( ( aIapList.Count() > 0 ) && |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2155 |
( connPref.IapId() == iActiveBMConns[aConnIndex].iConnInfo.iIapId ) ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2156 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2157 |
MPMLOGSTRING( "CMPMServer::NotifyDisconnectL: Same IAP selected. Disconnection not done." ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2158 |
break; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2159 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2160 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2161 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2162 |
MPMLOGSTRING2( "CMPMServer::NotifyDisconnectL: \ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2163 |
Disconnected Connection Id = 0x%x", iSessions[sIndex]->ConnectionId() ) |
12
ea6e024ea6f9
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
2164 |
iSessions[sIndex]->ClientErrorNotificationL( KErrForceDisconnected ); |
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2165 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2166 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2167 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2168 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2169 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2170 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2171 |
CleanupStack::PopAndDestroy( &iapIdsInInternet ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2172 |
CleanupStack::PopAndDestroy( &destNetIds ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2173 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2174 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2175 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2176 |
// CMPMServer::IsVisitorNetwork |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2177 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2178 |
// Checks if phone is in visitor network or in home network. |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2179 |
// Return ETrue if phone is in visitor network. |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2180 |
// Return EFalse if phone is not in visitor network. |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2181 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2182 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2183 |
TBool CMPMServer::IsVisitorNetwork() const |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2184 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2185 |
MPMLOGSTRING( "CMPMServer::IsVisitorNetwork" ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2186 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2187 |
if ( iRoamingWatcher->RoamingStatus()== EMPMInternationalRoaming ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2188 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2189 |
MPMLOGSTRING( "CMPMServer::IsVisitorNetwork: TRUE" ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2190 |
return ETrue; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2191 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2192 |
else |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2193 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2194 |
MPMLOGSTRING( "CMPMServer::IsVisitorNetwork: FALSE" ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2195 |
return EFalse; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2196 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2197 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2198 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2199 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2200 |
// CMPMServer::GetServerSession |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2201 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2202 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2203 |
CMPMServerSession* CMPMServer::GetServerSession( TConnectionId aConnId ) const |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2204 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2205 |
MPMLOGSTRING2( "CMPMServer::GetServerSession: \ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2206 |
Connection Id = 0x%x", aConnId ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2207 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2208 |
CMPMServerSession* serverSession = NULL; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2209 |
for ( TInt sIndex = 0; sIndex < iSessions.Count(); sIndex++ ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2210 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2211 |
if ( iSessions[sIndex]->ConnectionId() == aConnId ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2212 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2213 |
serverSession = iSessions[sIndex]; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2214 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2215 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2216 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2217 |
ASSERT( serverSession != NULL ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2218 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2219 |
return serverSession; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2220 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2221 |
|
8
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2222 |
// --------------------------------------------------------------------------- |
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2223 |
// CMPMServer::StopCellularConns |
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2224 |
// Stop all cellular connections except MMS |
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2225 |
// --------------------------------------------------------------------------- |
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2226 |
// |
58 | 2227 |
void CMPMServer::StopCellularConns( TBool aSilentOnly ) |
8
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2228 |
{ |
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2229 |
MPMLOGSTRING( "CMPMServer::StopCellularConns" ) |
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2230 |
|
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2231 |
TUint32 iapId; |
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2232 |
TMPMBearerType bearerType = EMPMBearerTypeNone; |
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2233 |
|
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2234 |
// No cleanup stack used cause this function doesn't leave. |
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2235 |
RArray<TUint32> stoppedIaps; |
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2236 |
|
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2237 |
// Check through active connections |
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2238 |
for (TInt i = 0; i < iActiveBMConns.Count(); i++) |
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2239 |
{ |
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2240 |
iapId = iActiveBMConns[i].iConnInfo.iIapId; |
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2241 |
|
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2242 |
// Don't stop the same IAP twice. |
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2243 |
if (stoppedIaps.Find( iapId ) == KErrNotFound) |
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2244 |
{ |
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2245 |
TRAPD( err, bearerType = CommsDatAccess()->GetBearerTypeL( iapId ) ); |
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2246 |
if (err == KErrNone && |
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2247 |
iapId != 0 && |
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2248 |
bearerType == EMPMBearerTypePacketData) |
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2249 |
{ |
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2250 |
TInt mmsIap( 0 ); |
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2251 |
err = RProperty::Get( KMPMCathegory, KMPMPropertyKeyMMS, mmsIap ); |
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2252 |
// Check that it's not MMS IAP. |
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2253 |
if (!(err == KErrNone && iapId == mmsIap)) |
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2254 |
{ |
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2255 |
// Stop the conn / IAP. |
58 | 2256 |
if ( aSilentOnly ) |
2257 |
{ |
|
2258 |
CheckIapForDisconnect( iapId ); |
|
2259 |
} |
|
2260 |
else |
|
2261 |
{ |
|
2262 |
StopConnections( iapId ); |
|
2263 |
} |
|
8
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2264 |
stoppedIaps.Append( iapId ); |
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2265 |
} |
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2266 |
} |
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2267 |
} |
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2268 |
} |
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2269 |
stoppedIaps.Close(); |
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2270 |
} |
2e6c4614c58e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2271 |
|
17
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2272 |
// --------------------------------------------------------------------------- |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2273 |
// CMPMServer::UpdateOfflineMode |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2274 |
// Offline watcher listens the offline mode and calls this when it's changed. |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2275 |
// --------------------------------------------------------------------------- |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2276 |
// |
58 | 2277 |
void CMPMServer::UpdateOfflineMode( TInt newModeValue ) |
17
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2278 |
{ |
58 | 2279 |
MPMLOGSTRING2( "CMPMServer::UpdateOfflineMode: Value %d", newModeValue ) |
17
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2280 |
|
58 | 2281 |
iOfflineMode = newModeValue; |
17
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2282 |
|
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2283 |
if ( iOfflineMode == ECoreAppUIsNetworkConnectionAllowed ) |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2284 |
{ |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2285 |
// Offline mode finished, reset the QueryResponse variable. |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2286 |
iOfflineWlanQueryResponse = EOfflineResponseUndefined; |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2287 |
} |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2288 |
} |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2289 |
|
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2290 |
// --------------------------------------------------------------------------- |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2291 |
// CMPMServer::IsPhoneOffline |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2292 |
// Returns the current offline mode. |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2293 |
// --------------------------------------------------------------------------- |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2294 |
// |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2295 |
TBool CMPMServer::IsPhoneOffline() |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2296 |
{ |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2297 |
MPMLOGSTRING( "CMPMServer::IsPhoneOffline" ) |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2298 |
|
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2299 |
TBool retval = EFalse; |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2300 |
if ( iOfflineMode == ECoreAppUIsNetworkConnectionNotAllowed) |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2301 |
{ |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2302 |
retval = ETrue; |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2303 |
MPMLOGSTRING( "CMPMServer::IsPhoneOffline: Yes." ) |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2304 |
} |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2305 |
return retval; |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2306 |
} |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2307 |
|
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2308 |
// --------------------------------------------------------------------------- |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2309 |
// CMPMServer::OfflineWlanQueryResponse |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2310 |
// Tells the "Use WLAN in offline mode" query's response during the |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2311 |
// current offline mode session. |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2312 |
// --------------------------------------------------------------------------- |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2313 |
// |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2314 |
TOfflineWlanQueryResponse CMPMServer::OfflineWlanQueryResponse() |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2315 |
{ |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2316 |
MPMLOGSTRING( "CMPMServer::OfflineWlanQueryResponse" ) |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2317 |
|
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2318 |
#ifndef _PLATFORM_SIMULATOR_ |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2319 |
MPMLOGSTRING2( "CMPMServer::IsOfflineWlanQueryAccepted: %d", iOfflineWlanQueryResponse ) |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2320 |
return iOfflineWlanQueryResponse; |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2321 |
#else |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2322 |
// Platsim simulates WLAN and offline-mode. To ease automated testing, |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2323 |
// offline connection confirmation is not asked in Platsim-variant |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2324 |
MPMLOGSTRING( "CMPMServer::OfflineWlanQueryResponse: yes for Platsim" ) |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2325 |
return EOfflineResponseYes; |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2326 |
#endif |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2327 |
} |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2328 |
|
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2329 |
// --------------------------------------------------------------------------- |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2330 |
// CMPMServer::SetOfflineWlanQueryResponse |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2331 |
// Called when the "Use WLAN in offline mode" note has been responded. |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2332 |
// --------------------------------------------------------------------------- |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2333 |
// |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2334 |
void CMPMServer::SetOfflineWlanQueryResponse( TOfflineWlanQueryResponse aResponse) |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2335 |
{ |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2336 |
MPMLOGSTRING( "CMPMServer::SetOfflineWlanQueryResponse" ) |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2337 |
|
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2338 |
iOfflineWlanQueryResponse = aResponse; |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2339 |
} |
c14618f9de99
Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
2340 |
|
55
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2341 |
// --------------------------------------------------------------------------- |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2342 |
// CMPMServer::StartConnPermQueryTimer |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2343 |
// Starts the connection permission query timer. |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2344 |
// --------------------------------------------------------------------------- |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2345 |
// |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2346 |
void CMPMServer::StartConnPermQueryTimer() |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2347 |
{ |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2348 |
MPMLOGSTRING( "CMPMServer::StartConnPermQueryTimer" ) |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2349 |
|
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2350 |
if ( !iConnPermQueryTimer ) |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2351 |
{ |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2352 |
TRAPD( err, iConnPermQueryTimer = CMPMConnPermQueryTimer::NewL( this ) ); |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2353 |
if ( err == KErrNone ) |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2354 |
{ |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2355 |
iConnPermQueryTimer->StartTimer(); |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2356 |
MPMLOGSTRING( "CMPMServer::StartConnPermQueryTimer: Ok." ) |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2357 |
} |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2358 |
} |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2359 |
} |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2360 |
|
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2361 |
// --------------------------------------------------------------------------- |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2362 |
// CMPMServer::ResetConnPermQueryTimer |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2363 |
// Resets the connection permission query timer. |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2364 |
// --------------------------------------------------------------------------- |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2365 |
// |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2366 |
void CMPMServer::ResetConnPermQueryTimer() |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2367 |
{ |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2368 |
MPMLOGSTRING( "CMPMServer::ResetConnPermQueryTimer" ) |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2369 |
|
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2370 |
if ( iConnPermQueryTimer ) |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2371 |
{ |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2372 |
delete iConnPermQueryTimer; |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2373 |
iConnPermQueryTimer = NULL; |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2374 |
MPMLOGSTRING( "CMPMServer::ResetConnPermQueryTimer: Ok." ) |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2375 |
} |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2376 |
} |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2377 |
|
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2378 |
// --------------------------------------------------------------------------- |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2379 |
// CMPMServer::IsConnPermQueryTimerOn |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2380 |
// Tells if the connection permission query timer is on. |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2381 |
// --------------------------------------------------------------------------- |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2382 |
// |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2383 |
TBool CMPMServer::IsConnPermQueryTimerOn() |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2384 |
{ |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2385 |
MPMLOGSTRING( "CMPMServer::IsConnPermQueryTimerOn" ) |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2386 |
|
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2387 |
TBool retval = EFalse; |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2388 |
if ( iConnPermQueryTimer ) |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2389 |
{ |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2390 |
retval = ETrue; |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2391 |
MPMLOGSTRING( "CMPMServer::IsConnPermQueryTimerOn: Yes." ) |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2392 |
} |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2393 |
return retval; |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2394 |
} |
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2395 |
|
62
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2396 |
// --------------------------------------------------------------------------- |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2397 |
// CMPMServer::StartOfflineQueryTimer |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2398 |
// Starts the offline query timer. |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2399 |
// --------------------------------------------------------------------------- |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2400 |
// |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2401 |
void CMPMServer::StartOfflineQueryTimer() |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2402 |
{ |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2403 |
MPMLOGSTRING( "CMPMServer::StartOfflineQueryTimer" ) |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2404 |
|
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2405 |
if ( !iOfflineQueryTimer ) |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2406 |
{ |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2407 |
TRAPD( err, iOfflineQueryTimer = CMPMOfflineQueryTimer::NewL( this ) ); |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2408 |
if ( err == KErrNone ) |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2409 |
{ |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2410 |
iOfflineQueryTimer->StartTimer(); |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2411 |
MPMLOGSTRING( "CMPMServer::StartOfflineQueryTimer: Ok." ) |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2412 |
} |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2413 |
} |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2414 |
} |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2415 |
|
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2416 |
// --------------------------------------------------------------------------- |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2417 |
// CMPMServer::ResetOfflineQueryTimer |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2418 |
// Resets the offline query timer. |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2419 |
// --------------------------------------------------------------------------- |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2420 |
// |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2421 |
void CMPMServer::ResetOfflineQueryTimer() |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2422 |
{ |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2423 |
MPMLOGSTRING( "CMPMServer::ResetOfflineQueryTimer" ) |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2424 |
|
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2425 |
if ( iOfflineQueryTimer ) |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2426 |
{ |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2427 |
delete iOfflineQueryTimer; |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2428 |
iOfflineQueryTimer = NULL; |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2429 |
MPMLOGSTRING( "CMPMServer::ResetOfflineQueryTimer: Ok." ) |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2430 |
} |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2431 |
} |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2432 |
|
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2433 |
// --------------------------------------------------------------------------- |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2434 |
// CMPMServer::IsOfflineQueryTimerOn |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2435 |
// Tells if the offline query timer is on. |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2436 |
// --------------------------------------------------------------------------- |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2437 |
// |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2438 |
TBool CMPMServer::IsOfflineQueryTimerOn() |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2439 |
{ |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2440 |
MPMLOGSTRING( "CMPMServer::IsOfflineQueryTimerOn" ) |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2441 |
|
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2442 |
TBool retval = EFalse; |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2443 |
if ( iOfflineQueryTimer ) |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2444 |
{ |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2445 |
retval = ETrue; |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2446 |
MPMLOGSTRING( "CMPMServer::IsOfflineQueryTimerOn: Yes." ) |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2447 |
} |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2448 |
return retval; |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2449 |
} |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2450 |
|
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2451 |
// --------------------------------------------------------------------------- |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2452 |
// CMPMServer::StartConnSelectionDlgTimer |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2453 |
// Starts the connection selection dialog timer. |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2454 |
// --------------------------------------------------------------------------- |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2455 |
// |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2456 |
void CMPMServer::StartConnSelectionDlgTimer() |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2457 |
{ |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2458 |
MPMLOGSTRING( "CMPMServer::StartConnSelectionDlgTimer" ) |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2459 |
|
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2460 |
if ( !iConnSelectionDlgTimer ) |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2461 |
{ |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2462 |
TRAPD( err, iConnSelectionDlgTimer = CMPMConnSelectionDlgTimer::NewL( this ) ); |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2463 |
if ( err == KErrNone ) |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2464 |
{ |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2465 |
iConnSelectionDlgTimer->StartTimer(); |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2466 |
MPMLOGSTRING( "CMPMServer::StartConnSelectionDlgTimer: Ok." ) |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2467 |
} |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2468 |
} |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2469 |
} |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2470 |
|
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2471 |
// --------------------------------------------------------------------------- |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2472 |
// CMPMServer::ResetConnSelectionDlgTimer |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2473 |
// Resets the connection selection dialog timer. |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2474 |
// --------------------------------------------------------------------------- |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2475 |
// |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2476 |
void CMPMServer::ResetConnSelectionDlgTimer() |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2477 |
{ |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2478 |
MPMLOGSTRING( "CMPMServer::ResetConnSelectionDlgTimer" ) |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2479 |
|
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2480 |
if ( iConnSelectionDlgTimer ) |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2481 |
{ |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2482 |
delete iConnSelectionDlgTimer; |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2483 |
iConnSelectionDlgTimer = NULL; |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2484 |
MPMLOGSTRING( "CMPMServer::ResetConnSelectionDlgTimer: Ok." ) |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2485 |
} |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2486 |
} |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2487 |
|
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2488 |
// --------------------------------------------------------------------------- |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2489 |
// CMPMServer::IsConnSelectionDlgTimerOn |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2490 |
// Tells if the connection selection dialog timer is on. |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2491 |
// --------------------------------------------------------------------------- |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2492 |
// |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2493 |
TBool CMPMServer::IsConnSelectionDlgTimerOn() |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2494 |
{ |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2495 |
MPMLOGSTRING( "CMPMServer::IsConnSelectionDlgTimerOn" ) |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2496 |
|
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2497 |
TBool retval = EFalse; |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2498 |
if ( iConnSelectionDlgTimer ) |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2499 |
{ |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2500 |
retval = ETrue; |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2501 |
MPMLOGSTRING( "CMPMServer::IsConnSelectionDlgTimerOn: Yes." ) |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2502 |
} |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2503 |
return retval; |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2504 |
} |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
2505 |
|
55
fc7b30ed2058
Revision: 201030
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
2506 |
// ----------------------------------------------------------------------------- |
58 | 2507 |
// CMPMServer::CheckIapForDisconnect |
2508 |
// ----------------------------------------------------------------------------- |
|
2509 |
// |
|
2510 |
void CMPMServer::CheckIapForDisconnect( TInt aIapId ) |
|
2511 |
{ |
|
2512 |
MPMLOGSTRING2( "CMPMServer::CheckIapForDisconnect - aIapId = 0x%x", |
|
2513 |
aIapId ) |
|
2514 |
||
2515 |
// Fix for case ou1cimx1#468999: stop sessions to cellular iap |
|
2516 |
// when there is only silent connections to it, and cellular usage is set |
|
2517 |
// to always ask |
|
2518 |
||
2519 |
// Check iap type and usage policy |
|
2520 |
TMPMBearerType bearerType( EMPMBearerTypeNone ); |
|
2521 |
TRAP_IGNORE( bearerType = CommsDatAccess()->GetBearerTypeL( aIapId ) ); |
|
2522 |
||
2523 |
TBool closeIap = ( bearerType == EMPMBearerTypePacketData |
|
2524 |
&& DataUsageWatcher()->CellularDataUsage() == ECmCellularDataUsageConfirm ); |
|
2525 |
||
2526 |
// No need to put iapSessions to CleanupStack; there are no leaves |
|
2527 |
RPointerArray<CMPMServerSession> iapSessions; |
|
2528 |
if ( closeIap ) |
|
2529 |
{ |
|
2530 |
// Check for non-silent sessions to iap |
|
2531 |
// closeIap is left true also when there are no sessions using the iap |
|
2532 |
for ( TInt i = 0; i < iActiveBMConns.Count(); i++ ) |
|
2533 |
{ |
|
2534 |
||
2535 |
CMPMServerSession* session |
|
2536 |
= GetServerSession( iActiveBMConns[i].iConnInfo.iConnId ); |
|
2537 |
||
2538 |
TInt sessionIapId = iActiveBMConns[i].iConnInfo.iIapId; |
|
2539 |
if ( !sessionIapId ) |
|
2540 |
{ |
|
2541 |
TRAP_IGNORE( sessionIapId = session->IapSelectionL()->MpmConnPref().IapId() ); |
|
2542 |
} |
|
2543 |
||
2544 |
if ( sessionIapId == aIapId ) |
|
2545 |
{ |
|
2546 |
iapSessions.Append( session ); // Don't mind if Append fails |
|
2547 |
||
2548 |
TBool silent( ETrue ); |
|
2549 |
TRAP_IGNORE( silent = session->IapSelectionL()->MpmConnPref().NoteBehaviour() |
|
2550 |
& TExtendedConnPref::ENoteBehaviourConnDisableNotes ); |
|
2551 |
if ( !silent ) |
|
2552 |
{ |
|
2553 |
// Non-silent session to iap found |
|
2554 |
closeIap = EFalse; |
|
2555 |
break; // for |
|
2556 |
} |
|
2557 |
} |
|
2558 |
} |
|
2559 |
} |
|
2560 |
||
2561 |
if ( closeIap ) |
|
2562 |
{ |
|
2563 |
MPMLOGSTRING2( "CMPMServer::CheckIapForDisconnect - stopping silent sessions to iap 0x%x", |
|
2564 |
aIapId ) |
|
2565 |
// Stop all (silent) sessions to iap |
|
2566 |
for ( TInt i = 0; i < iapSessions.Count(); i++) |
|
2567 |
{ |
|
2568 |
MPMLOGSTRING2( "CMPMServer::CheckIapForDisconnect - stopping connId 0x%x", |
|
2569 |
iapSessions[i]->ConnectionId()); |
|
2570 |
iapSessions[i]->StopConnection(); |
|
2571 |
} |
|
2572 |
} |
|
2573 |
||
2574 |
iapSessions.Close(); |
|
2575 |
||
2576 |
} |
|
2577 |
||
2578 |
||
2579 |
// ----------------------------------------------------------------------------- |
|
0
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2580 |
// TMPMBlackListConnId::Append |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2581 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2582 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2583 |
void TMPMBlackListConnId::Append( TUint32 aIap, TBlacklistCategory aCategory ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2584 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2585 |
iBlackListIap.Append( aIap ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2586 |
iCategory.Append( aCategory ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2587 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2588 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2589 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2590 |
// TMPMBlackListConnId::Remove |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2591 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2592 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2593 |
void TMPMBlackListConnId::Remove( TInt aIndex ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2594 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2595 |
iBlackListIap.Remove( aIndex ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2596 |
iCategory.Remove( aIndex ); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2597 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2598 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2599 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2600 |
// TMPMBlackListConnId::Close |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2601 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2602 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2603 |
void TMPMBlackListConnId::Close() |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2604 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2605 |
iBlackListIap.Close(); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2606 |
iCategory.Close(); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2607 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2608 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2609 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2610 |
// TMPMBlackListConnId::Count |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2611 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2612 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2613 |
TInt TMPMBlackListConnId::Count() const |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2614 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2615 |
return iBlackListIap.Count(); |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2616 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2617 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2618 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2619 |
// TConnectionInfo::TConnectionInfo |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2620 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2621 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2622 |
TConnectionInfo::TConnectionInfo() |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2623 |
: iConnId( 0 ), |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2624 |
iSnap( 0 ), |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2625 |
iIapId( 0 ), |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2626 |
iState( EIdle ), |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2627 |
iAppUid( 0 ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2628 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2629 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2630 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2631 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2632 |
// TConnectionInfo::MatchId |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2633 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2634 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2635 |
TBool TConnectionInfo::MatchId( const TConnectionInfo& aFirst, |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2636 |
const TConnectionInfo& aSecond ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2637 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2638 |
if ( aFirst.iConnId == aSecond.iConnId ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2639 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2640 |
return ETrue; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2641 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2642 |
else |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2643 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2644 |
return EFalse; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2645 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2646 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2647 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2648 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2649 |
// TConnectionInfo::MatchIdSnap |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2650 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2651 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2652 |
TBool TConnectionInfo::MatchIdSnap( const TConnectionInfo& aFirst, |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2653 |
const TConnectionInfo& aSecond ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2654 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2655 |
if ( ( aFirst.iConnId == aSecond.iConnId ) && |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2656 |
( aFirst.iSnap == aSecond.iSnap ) ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2657 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2658 |
return ETrue; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2659 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2660 |
else |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2661 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2662 |
return EFalse; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2663 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2664 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2665 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2666 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2667 |
// TActiveBMConn::TActiveBMConn |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2668 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2669 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2670 |
TActiveBMConn::TActiveBMConn() |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2671 |
: iConnInfo() |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2672 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2673 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2674 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2675 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2676 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2677 |
// TActiveBMConn::MatchIapId |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2678 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2679 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2680 |
TBool TActiveBMConn::MatchIapId( const TActiveBMConn& aFirst, |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2681 |
const TActiveBMConn& aSecond ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2682 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2683 |
if ( aFirst.iConnInfo.iIapId == aSecond.iConnInfo.iIapId ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2684 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2685 |
return ETrue; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2686 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2687 |
else |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2688 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2689 |
return EFalse; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2690 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2691 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2692 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2693 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2694 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2695 |
// TActiveBMConn::MatchConnInfo |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2696 |
// ----------------------------------------------------------------------------- |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2697 |
// |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2698 |
TBool TActiveBMConn::MatchConnInfo( const TActiveBMConn& aFirst, |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2699 |
const TActiveBMConn& aSecond ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2700 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2701 |
if ( TConnectionInfo::MatchId( aFirst.iConnInfo, aSecond.iConnInfo ) ) |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2702 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2703 |
return ETrue; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2704 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2705 |
else |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2706 |
{ |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2707 |
return EFalse; |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2708 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2709 |
} |
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2710 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2711 |
|
5a93021fdf25
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2712 |
// End of File |