bearermanagement/mpm/src/mpmconnmonevents.cpp
branchRCL_3
changeset 36 04408506c6e0
parent 15 4dc3bb0099b0
child 57 05bc53fe583b
equal deleted inserted replaced
26:0a9e01492035 36:04408506c6e0
    33 
    33 
    34 // -----------------------------------------------------------------------------
    34 // -----------------------------------------------------------------------------
    35 // CMPMConnMonEvents::NewL
    35 // CMPMConnMonEvents::NewL
    36 // -----------------------------------------------------------------------------
    36 // -----------------------------------------------------------------------------
    37 //             
    37 //             
    38 CMPMConnMonEvents* CMPMConnMonEvents::NewL( CMPMServer& aServer, 
    38 CMPMConnMonEvents* CMPMConnMonEvents::NewL( CMPMServer& aServer )
    39                                             CMPMServerSession& aSession )
       
    40     {
    39     {
    41     CMPMConnMonEvents* self = new ( ELeave ) CMPMConnMonEvents( aServer );
    40     CMPMConnMonEvents* self = new ( ELeave ) CMPMConnMonEvents( aServer );
    42     CleanupStack::PushL( self );
    41     CleanupStack::PushL( self );
    43     self->ConstructL( aSession );
    42     self->ConstructL();
    44     CleanupStack::Pop( self );
    43     CleanupStack::Pop( self );
    45     return self;
    44     return self;
    46     }
    45     }
    47 
    46 
    48 
    47 
    72 
    71 
    73 // -----------------------------------------------------------------------------
    72 // -----------------------------------------------------------------------------
    74 // CMPMConnMonEvents::ConstructL
    73 // CMPMConnMonEvents::ConstructL
    75 // -----------------------------------------------------------------------------
    74 // -----------------------------------------------------------------------------
    76 // 
    75 // 
    77 void CMPMConnMonEvents::ConstructL( CMPMServerSession& aSession )
    76 void CMPMConnMonEvents::ConstructL()
    78     {
    77     {
    79     MPMLOGSTRING( "CMPMConnMonEvents::ConstructL" )
    78     MPMLOGSTRING( "CMPMConnMonEvents::ConstructL" )
    80     // Connect to Connection Monitor
    79     // Connect to Connection Monitor
    81     //
    80     //
    82     TInt rv = iConnMon.ConnectL();
    81     TInt rv = iConnMon.ConnectL();
    91     // Request for available IAPs
    90     // Request for available IAPs
    92     //
    91     //
    93     CMPMConnMonReqs* req = CMPMConnMonReqs::NewL( 
    92     CMPMConnMonReqs* req = CMPMConnMonReqs::NewL( 
    94                                 *const_cast<CMPMConnMonEvents*>( this ),
    93                                 *const_cast<CMPMConnMonEvents*>( this ),
    95                                 iConnMon,
    94                                 iConnMon,
    96                                 aSession.ConnectionId(), aSession );
    95                                 0,
       
    96                                 NULL );
    97     CleanupStack::PushL( req );
    97     CleanupStack::PushL( req );
    98     iReqPtrs.AppendL( req ); 
    98     iReqPtrs.AppendL( req ); 
    99     req->AvailableIapsSync();
    99     req->AvailableIapsSync();
   100 
   100 
   101     UpdateIAPRefreshTime();
   101     UpdateIAPRefreshTime();
   571     //
   571     //
   572     CMPMConnMonReqs* req = CMPMConnMonReqs::NewL( 
   572     CMPMConnMonReqs* req = CMPMConnMonReqs::NewL( 
   573                                 *const_cast<CMPMConnMonEvents*>( this ),
   573                                 *const_cast<CMPMConnMonEvents*>( this ),
   574                                 iConnMon,
   574                                 iConnMon,
   575                                 aId, 
   575                                 aId, 
   576                                 *aSession );
   576                                 aSession );
   577     CleanupStack::PushL( req );
   577     CleanupStack::PushL( req );
   578     iReqPtrs.AppendL( req ); 
   578     iReqPtrs.AppendL( req ); 
   579     req->RefreshAvailableIAPs( aCallback, aForceRefreshIntervalSeconds );
   579     req->RefreshAvailableIAPs( aCallback, aForceRefreshIntervalSeconds );
   580     CleanupStack::Pop( req );
   580     CleanupStack::Pop( req );
   581     }
   581     }
   583 
   583 
   584 // -----------------------------------------------------------------------------
   584 // -----------------------------------------------------------------------------
   585 // CMPMConnMonEvents::CancelScanL
   585 // CMPMConnMonEvents::CancelScanL
   586 // -----------------------------------------------------------------------------
   586 // -----------------------------------------------------------------------------
   587 // 
   587 // 
   588 void CMPMConnMonEvents::CancelScanL( CMPMServerSession& aSession )
   588 void CMPMConnMonEvents::CancelScanL( CMPMServerSession* aSession )
   589     {
   589     {
   590     MPMLOGSTRING( "CMPMConnMonEvents::CancelScanL" )
   590     MPMLOGSTRING( "CMPMConnMonEvents::CancelScanL" )
   591 
   591 
   592     // Disable discarding availability notifications from Connection Monitor.
   592     // Disable discarding availability notifications from Connection Monitor.
   593     // 
   593     // 
   594     DisableDiscarding(); 
   594     DisableDiscarding(); 
   595 
   595 
   596     CMPMConnMonReqs* req = CMPMConnMonReqs::NewL( 
   596     CMPMConnMonReqs* req = CMPMConnMonReqs::NewL( 
   597                                 *const_cast<CMPMConnMonEvents*>( this ),
   597                                 *const_cast<CMPMConnMonEvents*>( this ),
   598                                 iConnMon,
   598                                 iConnMon,
   599                                 aSession.ConnectionId(), 
   599                                 aSession->ConnectionId(), 
   600                                 aSession );
   600                                 aSession );
   601     // Delete ongoing req, if found
   601     // Delete ongoing req, if found
   602     TInt index = iReqPtrs.Find(req, CMPMConnMonReqs::CompareConnIds);
   602     TInt index = iReqPtrs.Find(req, CMPMConnMonReqs::CompareConnIds);
   603     if (index != KErrNotFound)
   603     if (index != KErrNotFound)
   604         {
   604         {