gba/gbaserver/src/dataretriever.cpp
branchRCL_3
changeset 49 09b1ac925e3f
parent 5 3b17fc5c9564
child 50 03674e5abf46
child 66 67b3e3c1fc87
equal deleted inserted replaced
47:63339781d179 49:09b1ac925e3f
    19 #include <e32math.h> 
    19 #include <e32math.h> 
    20 #include <hash.h>
    20 #include <hash.h>
    21 #include <commdb.h>
    21 #include <commdb.h>
    22 #include <es_enum.h>
    22 #include <es_enum.h>
    23 #include <centralrepository.h>
    23 #include <centralrepository.h>
    24 #include <cmconnectionmethodext.h>
       
    25 #include <cmconnectionmethoddef.h>
    24 #include <cmconnectionmethoddef.h>
    26 #include <cmpluginpacketdatadef.h>
    25 #include <cmpluginpacketdatadef.h>
    27 #include <cmdestinationext.h>
    26 #include <cmdestination.h>
    28 #include <http/thttpevent.h>
    27 #include <http/thttpevent.h>
    29 #include "dataretriever.h"
    28 #include "dataretriever.h"
    30 #include "GbaCommon.h"
    29 #include "GbaCommon.h"
    31 #include "GBALogger.h"
    30 #include "GBALogger.h"
    32 #include "bootstrap.h"	 
    31 #include "bootstrap.h"	 
   101 //
   100 //
   102 void CDataRetriever::ConstructL()
   101 void CDataRetriever::ConstructL()
   103     {
   102     {
   104     iHttpHandler = C3GPPBootstrapHttpHandler::NewL( this, iBootstrapCallBack );
   103     iHttpHandler = C3GPPBootstrapHttpHandler::NewL( this, iBootstrapCallBack );
   105     iInternalState = EReadyForRequest;
   104     iInternalState = EReadyForRequest;
   106     iCmManagerExt.OpenL();
   105     iCmManager.OpenL();
   107     }
   106     }
   108 
   107 
   109 
   108 
   110 // ---------------------------------------------------------------------------
   109 // ---------------------------------------------------------------------------
   111 // CDataRetriever::~CDataRetriever()
   110 // CDataRetriever::~CDataRetriever()
   118     delete iHttpHandler;
   117     delete iHttpHandler;
   119     iHTTPTransaction.Close();
   118     iHTTPTransaction.Close();
   120     iHTTPSession.Close();
   119     iHTTPSession.Close();
   121     iConnection.Close();
   120     iConnection.Close();
   122     iSockServ.Close();
   121     iSockServ.Close();
   123     iCmManagerExt.Close();
   122     iCmManager.Close();
   124     
   123     
   125     if ( iInternalState == EMakeRequestCalled )
   124     if ( iInternalState == EMakeRequestCalled )
   126         {
   125         {
   127         GBA_TRACE_DEBUG(("CDataRetriever::~CDataRetriever EMakeRequestCalled"));
   126         GBA_TRACE_DEBUG(("CDataRetriever::~CDataRetriever EMakeRequestCalled"));
   128         User::RequestComplete(iCallerRequestStatus, KErrCancel);
   127         User::RequestComplete(iCallerRequestStatus, KErrCancel);
   354         TInt CleanupCounter = 0;
   353         TInt CleanupCounter = 0;
   355    
   354    
   356         RArray<TUint32> destIdArray;
   355         RArray<TUint32> destIdArray;
   357         CleanupClosePushL( destIdArray );
   356         CleanupClosePushL( destIdArray );
   358         CleanupCounter++;
   357         CleanupCounter++;
   359         iCmManagerExt.AllDestinationsL( destIdArray );
   358         iCmManager.AllDestinationsL( destIdArray );
   360 
   359 
   361         for ( TInt i = 0; i< destIdArray.Count(); i++ )
   360         for ( TInt i = 0; i< destIdArray.Count(); i++ )
   362            {
   361            {
   363            RCmDestinationExt dest = iCmManagerExt.DestinationL( destIdArray[i] );
   362            RCmDestination dest = iCmManager.DestinationL( destIdArray[i] );
   364            CleanupClosePushL( dest );
   363            CleanupClosePushL( dest );
   365            CleanupCounter++;
   364            CleanupCounter++;
   366          
   365          
   367            for ( TInt j=0; j < dest.ConnectionMethodCount(); j++ )
   366            for ( TInt j=0; j < dest.ConnectionMethodCount(); j++ )
   368               {
   367               {
   407     TInt CleanupCounter = 0;
   406     TInt CleanupCounter = 0;
   408    
   407    
   409     RArray<TUint32> destIdArray;
   408     RArray<TUint32> destIdArray;
   410     CleanupClosePushL( destIdArray );
   409     CleanupClosePushL( destIdArray );
   411     CleanupCounter++;
   410     CleanupCounter++;
   412     iCmManagerExt.AllDestinationsL( destIdArray );
   411     iCmManager.AllDestinationsL( destIdArray );
   413 
   412 
   414     for ( TInt i = 0; i< destIdArray.Count(); i++ )
   413     for ( TInt i = 0; i< destIdArray.Count(); i++ )
   415          {
   414          {
   416          RCmDestinationExt dest = iCmManagerExt.DestinationL( destIdArray[i] );
   415          RCmDestination dest = iCmManager.DestinationL( destIdArray[i] );
   417          CleanupClosePushL( dest );
   416          CleanupClosePushL( dest );
   418          CleanupCounter++;
   417          CleanupCounter++;
   419          
   418          
   420          if ( dest.MetadataL( ESnapMetadataInternet ) )
   419          if ( dest.MetadataL( ESnapMetadataInternet ) )
   421              {
   420              {