bearermanagement/mpm/src/mpmserver.cpp
changeset 32 5c4486441ae6
parent 30 8dde790cab74
child 40 c5b848e6c7d1
equal deleted inserted replaced
31:c16e04725da3 32:5c4486441ae6
    35 #include "mpmdtmwatcher.h"
    35 #include "mpmdtmwatcher.h"
    36 #include "mpmroamingwatcher.h"
    36 #include "mpmroamingwatcher.h"
    37 #include "mpmdisconnectdlg.h"
    37 #include "mpmdisconnectdlg.h"
    38 #include "mpmconfirmdlgroaming.h"
    38 #include "mpmconfirmdlgroaming.h"
    39 #include "mpmconfirmdlgstarting.h"
    39 #include "mpmconfirmdlgstarting.h"
    40 #include "mpmdefaultconnection.h"
       
    41 #include "mpmcommsdataccess.h"
    40 #include "mpmcommsdataccess.h"
    42 #include "mpmwlanquerydialog.h"
       
    43 #include "mpmprivatecrkeys.h"
    41 #include "mpmprivatecrkeys.h"
    44 #include "mpmcsidwatcher.h"
    42 #include "mpmcsidwatcher.h"
    45 #include "mpmdatausagewatcher.h"
    43 #include "mpmdatausagewatcher.h"
    46 #include "mpmpropertydef.h"
    44 #include "mpmpropertydef.h"
    47 #include "mpmofflinewatcher.h"
    45 #include "mpmofflinewatcher.h"
    87       iDtmWatcher( NULL ), 
    85       iDtmWatcher( NULL ), 
    88       iWLANScanRequired( EFalse ), 
    86       iWLANScanRequired( EFalse ), 
    89       iDisconnectQueue( NULL ), 
    87       iDisconnectQueue( NULL ), 
    90       iRoamingQueue( NULL ), 
    88       iRoamingQueue( NULL ), 
    91       iStartingQueue( NULL ),
    89       iStartingQueue( NULL ),
    92       iWlanQueryQueue( NULL ),
       
    93       iDefaultConnection( NULL ), 
       
    94       iConnectionCounter( 0 ),
    90       iConnectionCounter( 0 ),
    95       iOfflineMode( ECoreAppUIsNetworkConnectionAllowed )
    91       iOfflineMode( ECoreAppUIsNetworkConnectionAllowed )
    96     {
    92     {
    97     }
    93     }
    98 
    94 
   161     iRoamingQueue->Reset();
   157     iRoamingQueue->Reset();
   162 
   158 
   163     iStartingQueue = new ( ELeave ) CArrayPtrFlat<CMPMConfirmDlgStarting>( KGranularity ); 
   159     iStartingQueue = new ( ELeave ) CArrayPtrFlat<CMPMConfirmDlgStarting>( KGranularity ); 
   164     iStartingQueue->Reset();
   160     iStartingQueue->Reset();
   165 
   161 
   166     iWlanQueryQueue = new ( ELeave ) CArrayPtrFlat<CMPMWlanQueryDialog>( KGranularity );
       
   167     iWlanQueryQueue->Reset();
       
   168     
       
   169     iDefaultConnection = CMPMDefaultConnection::NewL( this );    
       
   170 
       
   171     // Create central repository watcher and start it
   162     // Create central repository watcher and start it
   172     iMpmCsIdWatcher = CMpmCsIdWatcher::NewL();
   163     iMpmCsIdWatcher = CMpmCsIdWatcher::NewL();
   173     iMpmCsIdWatcher->StartL();
   164     iMpmCsIdWatcher->StartL();
   174 
   165 
   175     // Create another central repository watcher and start it
   166     // Create another central repository watcher and start it
   251         {
   242         {
   252         iStartingQueue->ResetAndDestroy();
   243         iStartingQueue->ResetAndDestroy();
   253         }
   244         }
   254     delete iStartingQueue;
   245     delete iStartingQueue;
   255 
   246 
   256     while ( iWlanQueryQueue && iWlanQueryQueue->Count() > 0 )
       
   257         {
       
   258         iWlanQueryQueue->Delete( 0 );
       
   259         }
       
   260     delete iWlanQueryQueue;
       
   261 
       
   262     delete iEvents;
   247     delete iEvents;
   263 
   248 
   264     for ( TInt i = 0; i < iBlackListIdList.Count(); i++ )
   249     for ( TInt i = 0; i < iBlackListIdList.Count(); i++ )
   265         {
   250         {
   266         iBlackListIdList[i].Close();
   251         iBlackListIdList[i].Close();
   278         iPacketService.Close();
   263         iPacketService.Close();
   279         }    
   264         }    
   280 
   265 
   281     iMobilePhone.Close();
   266     iMobilePhone.Close();
   282     iTelServer.Close();
   267     iTelServer.Close();
   283     
       
   284     delete iDefaultConnection;
       
   285     
   268     
   286     delete iMpmCsIdWatcher;    
   269     delete iMpmCsIdWatcher;    
   287     
   270     
   288     delete iMpmDataUsageWatcher;    
   271     delete iMpmDataUsageWatcher;    
   289 
   272 
  1364 
  1347 
  1365     MPMLOGSTRING( "Display array of active connections - End" )
  1348     MPMLOGSTRING( "Display array of active connections - End" )
  1366 #endif // _DEBUG
  1349 #endif // _DEBUG
  1367     }
  1350     }
  1368 
  1351 
  1369 
       
  1370 // -----------------------------------------------------------------------------
       
  1371 // CMPMServer::DefaultConnection
       
  1372 // -----------------------------------------------------------------------------
       
  1373 //
       
  1374 CMPMDefaultConnection* CMPMServer::DefaultConnection()
       
  1375     {
       
  1376     MPMLOGSTRING( "CMPMServer::DefaultConnection:\
       
  1377  Default Connection" )
       
  1378     return iDefaultConnection;
       
  1379     }
       
  1380 
       
  1381 // -----------------------------------------------------------------------------
  1352 // -----------------------------------------------------------------------------
  1382 // CMPMServer::StartedConnectionExists
  1353 // CMPMServer::StartedConnectionExists
  1383 // -----------------------------------------------------------------------------
  1354 // -----------------------------------------------------------------------------
  1384 //
  1355 //
  1385 TInt CMPMServer::StartedConnectionExists( TInt aIapId )
  1356 TInt CMPMServer::StartedConnectionExists( TInt aIapId )
  1406         }
  1377         }
  1407     else
  1378     else
  1408         {
  1379         {
  1409         MPMLOGSTRING( "CMPMServer::StartedConnectionExists: False" )
  1380         MPMLOGSTRING( "CMPMServer::StartedConnectionExists: False" )
  1410         return KErrNotFound;
  1381         return KErrNotFound;
  1411         }
       
  1412     }
       
  1413 
       
  1414 // -----------------------------------------------------------------------------
       
  1415 // CMPMServer::AppendWlanQueryQueueL
       
  1416 // -----------------------------------------------------------------------------
       
  1417 //
       
  1418 void CMPMServer::AppendWlanQueryQueueL( CMPMWlanQueryDialog* aDlg )
       
  1419     {
       
  1420     if( aDlg )
       
  1421         {
       
  1422         iWlanQueryQueue->AppendL( aDlg );
       
  1423         }
       
  1424     else
       
  1425         {
       
  1426         MPMLOGSTRING( "CMPMServer::AppendWlanQueryQueueL argument NULL, Error" )
       
  1427         }
  1382         }
  1428     }
  1383     }
  1429 
  1384 
  1430 // -----------------------------------------------------------------------------
  1385 // -----------------------------------------------------------------------------
  1431 // CMPMServer::StopConnections
  1386 // CMPMServer::StopConnections