dbcreator/commsdatcreator/Src/cdccommsdatcreator.cpp
branchRCL_3
changeset 24 05bc53fe583b
parent 0 5a93021fdf25
child 25 83ca720e2b9a
equal deleted inserted replaced
23:fc7b30ed2058 24:05bc53fe583b
   147 EXPORT_C void CCdcCommsDatCreator::CreateCommsDatL( const TFileName& aInFileName )
   147 EXPORT_C void CCdcCommsDatCreator::CreateCommsDatL( const TFileName& aInFileName )
   148     {
   148     {
   149     CLOG_WRITE( "=====================\n" )
   149     CLOG_WRITE( "=====================\n" )
   150     CLOG_WRITE( "Processing started...\n" )
   150     CLOG_WRITE( "Processing started...\n" )
   151     CLOG_WRITE( "=====================\n" )               
   151     CLOG_WRITE( "=====================\n" )               
   152 
       
   153 	iCmManager.OpenL();
       
   154 
   152 
   155     TDbCreatorInputCharSet charSet( ECharSetUnknown );//input character set
   153     TDbCreatorInputCharSet charSet( ECharSetUnknown );//input character set
   156 
   154 
   157     //Creates access points
   155     //Creates access points
   158     //----------------------
   156     //----------------------
   301                 iFileProcessor = CProcessorGlobal::NewL( iReader,
   299                 iFileProcessor = CProcessorGlobal::NewL( iReader,
   302                                                           iCmManager,
   300                                                           iCmManager,
   303                                                           iPluginArray,
   301                                                           iPluginArray,
   304                                                           iPluginNames,
   302                                                           iPluginNames,
   305                                                           iDestArray,
   303                                                           iDestArray,
   306                                                           iDestNames,
   304                                                           iDestNames ); 
   307                                                           iDefCon ); 
       
   308                 iFileProcessor->ParseFileL();
   305                 iFileProcessor->ParseFileL();
   309 
   306 
   310                 delete iFileProcessor;
   307                 delete iFileProcessor;
   311                 iFileProcessor = NULL;
   308                 iFileProcessor = NULL;
   312 
   309 
   323             
   320             
   324         }//while
   321         }//while
   325                   
   322                   
   326 
   323 
   327     // Updates the IAPs that are not in destinations.
   324     // Updates the IAPs that are not in destinations.
   328     UpdateUncatCmsL( iCmInDest /*, iPluginNames, iPluginArray*/ );
   325     UpdateUncatCmsL( iCmInDest );
   329 
   326 
   330     // Sets the underlying IAP/SNAPS for vpn IAPs    
   327     // Sets the underlying IAP/SNAPS for vpn IAPs    
   331     SetUnderlyingIapL( iUnderLying );
   328     SetUnderlyingIapL( iUnderLying );
   332 
   329 
   333     for( TInt i(0); i < iWlanSecurity.Count(); i++ )
   330     for( TInt i(0); i < iWlanSecurity.Count(); i++ )
   347     SetWlanSecurityL( iWlanSecurity );
   344     SetWlanSecurityL( iWlanSecurity );
   348     
   345     
   349     // Sets linger settings
   346     // Sets linger settings
   350     SetLingerSettingsL( iLingerSettings );
   347     SetLingerSettingsL( iLingerSettings );
   351 
   348 
   352     // Sets the default connection    
       
   353     SetDefaultConnectionL( iDefCon );
       
   354 
       
   355     // Logs IAPs in UDEB mode
   349     // Logs IAPs in UDEB mode
   356     #ifdef _DEBUG
   350     #ifdef _DEBUG
   357     LogIapIdsL();
   351     LogIapIdsL();
   358     #endif
   352     #endif
   359 }
   353 }
   414     
   408     
   415     iWlanSecurity.ResetAndDestroy();
   409     iWlanSecurity.ResetAndDestroy();
   416     
   410     
   417     iLingerSettings.ResetAndDestroy();
   411     iLingerSettings.ResetAndDestroy();
   418 
   412 
   419     iDefCon.ResetAndDestroy();
       
   420     
       
   421     iCmInDest.Close(); 
   413     iCmInDest.Close(); 
   422     
   414     
   423     iCmManager.Close();
   415     iCmManager.Close();
   424     }
   416     }
   425 
   417 
   433     CLOG_WRITE( "Initialising FeatureManager\n" )   
   425     CLOG_WRITE( "Initialising FeatureManager\n" )   
   434     //checks if Wlan feature is supported
   426     //checks if Wlan feature is supported
   435     FeatureManager::InitializeLibL();
   427     FeatureManager::InitializeLibL();
   436     iIsWlanS = FeatureManager::FeatureSupported( KFeatureIdProtocolWlan );
   428     iIsWlanS = FeatureManager::FeatureSupported( KFeatureIdProtocolWlan );
   437     FeatureManager::UnInitializeLib();
   429     FeatureManager::UnInitializeLib();
   438     CLOG_WRITE( "FeatureManager closed\n" )               
   430     CLOG_WRITE( "FeatureManager closed\n" )
       
   431 
       
   432     iCmManager.OpenL();
   439     }
   433     }
   440     
   434     
   441 //------------------------------------------------
   435 //------------------------------------------------
   442 // CCdcCommsDatCreator::InputFileType
   436 // CCdcCommsDatCreator::InputFileType
   443 //------------------------------------------------
   437 //------------------------------------------------
   581 
   575 
   582         CLOG_WRITE( "--------------------------------------\n" )
   576         CLOG_WRITE( "--------------------------------------\n" )
   583         }
   577         }
   584     }
   578     }
   585 
   579 
   586 // ---------------------------------------------------------
       
   587 // CCdcCommsDatCreator::ProcessDNL
       
   588 // ---------------------------------------------------------
       
   589 //
       
   590 void CCdcCommsDatCreator::SetDefaultConnectionL( RPointerArray< HBufC >& aDefCon )
       
   591     {
       
   592     // Sets the default connection    
       
   593     if( aDefCon.Count() > 0 )
       
   594         {
       
   595         CLOG_WRITE_FORMAT( "SetDefaultConnectionL: %d\n", aDefCon.Count() )
       
   596         CLOG_WRITE( "--------------------------------------\n" )
       
   597 
       
   598         CProcessorGlobal* glb = CProcessorGlobal::NewL( iReader,
       
   599                                                iCmManager,
       
   600                                                iPluginArray,
       
   601                                                iPluginNames,
       
   602                                                iDestArray,
       
   603                                                iDestNames,
       
   604                                                aDefCon );
       
   605         
       
   606         CleanupStack::PushL( glb );
       
   607         glb->SetDefaultConnectionL();
       
   608                 
       
   609         CleanupStack::PopAndDestroy( glb );
       
   610 
       
   611         CLOG_WRITE( "--------------------------------------\n" )
       
   612         }
       
   613     }
       
   614 
   580 
   615 // ---------------------------------------------------------
   581 // ---------------------------------------------------------
   616 // CCdcCommsDatCreator::SetUnderlyingIapL
   582 // CCdcCommsDatCreator::SetUnderlyingIapL
   617 // ---------------------------------------------------------
   583 // ---------------------------------------------------------
   618 //
   584 //