--- a/dbcreator/commsdatcreator/Src/cdcprocessorglobal.cpp Thu Aug 19 10:18:49 2010 +0300
+++ b/dbcreator/commsdatcreator/Src/cdcprocessorglobal.cpp Tue Aug 31 15:35:44 2010 +0300
@@ -38,7 +38,6 @@
#include <cmmanagerext.h>
#include <cmmanager.h>
#include <cmdestinationext.h>
-#include <cmdefconnvalues.h>
#include <WlanCdbCols.h>
#include <wlancontainer.h>
#include <featmgr.h>
@@ -106,16 +105,14 @@
RPointerArray< RCmConnectionMethodExt >& aPluginArray,
RPointerArray< HBufC >& aPluginNames,
RPointerArray< RCmDestinationExt >& aDestArray,
- RPointerArray< HBufC >& aDestNames,
- RPointerArray< HBufC >& aDefCon )
+ RPointerArray< HBufC >& aDestNames )
{
CProcessorGlobal* self = new ( ELeave ) CProcessorGlobal( aFileReader,
aCmManager,
aPluginArray,
aPluginNames,
aDestArray,
- aDestNames,
- aDefCon );
+ aDestNames );
CleanupStack::PushL( self );
// From base class
@@ -134,12 +131,10 @@
RPointerArray< RCmConnectionMethodExt >& aPluginArray,
RPointerArray< HBufC >& aPluginNames,
RPointerArray< RCmDestinationExt >& aDestArray,
- RPointerArray< HBufC >& aDestNames,
- RPointerArray< HBufC >& aDefCon ) :
+ RPointerArray< HBufC >& aDestNames ) :
CProcessorBase( aFileReader, aCmManager, aPluginArray, aPluginNames, aDestArray, aDestNames ),
iAttachWhenNeeded ( EFalse )
{
- iDefCon = &aDefCon;
}
@@ -156,7 +151,7 @@
// Create General connection settings struct and set the default values
iGenConnSettings = new (ELeave) TCmGenConnSettings;
iGenConnSettings->iUsageOfWlan = ECmUsageOfWlanKnown;
- iGenConnSettings->iCellularDataUsageHome = ECmCellularDataUsageConfirm;
+ iGenConnSettings->iCellularDataUsageHome = ECmCellularDataUsageAutomatic;
iGenConnSettings->iCellularDataUsageVisitor = ECmCellularDataUsageConfirm;
CLOG_WRITE( "Initialising FeatureManager\n" )
@@ -267,19 +262,10 @@
CCDSNAPMetadataRecord* defaultRecord = new( ELeave )
CCDSNAPMetadataRecord( snapTable->TableId() );
CleanupStack::PushL( defaultRecord );
+ defaultRecord->SetRecordId( KCDNewRecordRequest );
defaultRecord->iMetadata.SetL( 0 );
-
- if ( !defaultRecord->FindL( *iSession ) )
- {
- defaultRecord->SetRecordId( KCDNewRecordRequest );
- defaultRecord->iIcon.SetL( icon );
- defaultRecord->StoreL( *iSession );
- }
- else
- {
- defaultRecord->iIcon.SetL( icon );
- defaultRecord->ModifyL( *iSession );
- }
+ defaultRecord->iIcon.SetL( icon );
+ defaultRecord->StoreL( *iSession );
CleanupStack::PopAndDestroy( defaultRecord ); // defaultRecord
CleanupStack::PopAndDestroy( snapTable ); // snapTable
@@ -317,20 +303,6 @@
break;
}
- case EDefaultConnectionType:
- {
- iDefCon->Append( ptrTag->AllocL() );
- //SetDefaultConnectionTypeL( ptrTag )
- break;
- }
-
- case EDefaultConnectionName:
- {
- iDefCon->Append( ptrTag->AllocL() );
- //SetDefaultConnectionNameL( ptrTag )
- break;
- }
-
case EGprsLastSocketActivityTimeout:
case EGprsLastSessionClosedTimeout:
case EGprsLastSocketClosedTimeout:
@@ -620,87 +592,6 @@
}
// ---------------------------------------------------------
-// CProcessorGlobal::SetDefaultConnectionL
-// ---------------------------------------------------------
-//
-void CProcessorGlobal::SetDefaultConnectionL()
- {
- if( iDefCon->Count() > 0 )
- {
- SetDefaultConnectionTypeL( (*iDefCon)[0] );
- }
- if( iDefCon->Count() > 1 )
- {
- SetDefaultConnectionNameL( (*iDefCon)[1] );
- }
- }
-
-// ---------------------------------------------------------
-// CProcessorGlobal::SetDefaultConnectionTypeL
-// ---------------------------------------------------------
-//
-void CProcessorGlobal::SetDefaultConnectionTypeL( HBufC16* aPtrTag )
- {
- iDefaultConnectionSet = EFalse;
-
- if ( aPtrTag->CompareF( KStrAlwaysAsk ) == 0 )
- {
- iDefaultConnectionType = ECmDefConnAlwaysAsk;
- SetDefConnRecordL( 0 );
- }
- else if ( aPtrTag->CompareF( KStrAskOnce ) == 0 )
- {
- iDefaultConnectionType = ECmDefConnAskOnce;
- SetDefConnRecordL( 0 );
- }
- else if ( aPtrTag->CompareF( KStrDestination ) == 0 )
- {
- iDefaultConnectionType = ECmDefConnDestination;
- }
- else if ( aPtrTag->CompareF( KStrConnectionMethod ) == 0 )
- {
- iDefaultConnectionType = ECmDefConnConnectionMethod;
- }
- else
- {
- CLOG_WRITE(
- "Warning: Default connection type is not valid. Always ask is set.")
- iDefaultConnectionType = ECmDefConnAlwaysAsk;
- SetDefConnRecordL( 0 );
- }
- }
-
-// ---------------------------------------------------------
-// CProcessorGlobal::SetDefaultConnectionNameL
-// ---------------------------------------------------------
-//
-void CProcessorGlobal::SetDefaultConnectionNameL( HBufC16* aPtrTag )
- {
-
- // Name is ignored if the defconn has been set. It can happen e.g.
- // if iDefaultConnectionType is ECmDefConnAlwaysAsk or ECmDefConnAskOnce
- if ( iDefaultConnectionSet )
- {
- return;
- }
-
- TInt uId = KErrNotFound;
- if ( iDefaultConnectionType == ECmDefConnDestination )
- {
- uId = GetDestinationIdL( aPtrTag );
- }
- else if ( iDefaultConnectionType == ECmDefConnConnectionMethod )
- {
- uId = GetPluginIdL( aPtrTag );
- }
-
- if( uId != KErrNotFound )
- {
- SetDefConnRecordL( uId );
- }
- }
-
-// ---------------------------------------------------------
// CProcessorGlobal::SetGenConnSettingWlanUsage
// ---------------------------------------------------------
//
@@ -765,25 +656,6 @@
}
//-----------------------------------------------------------------------------
-// CProcessorGlobal::SetDefConnRecordL()
-//-----------------------------------------------------------------------------
-//
-void CProcessorGlobal::SetDefConnRecordL( const TInt aId )
- {
-
- TCmDefConnValue value;
- value.iType = iDefaultConnectionType;
- value.iId = aId;
-
- iCmManager->WriteDefConnL( value );
-
- // It gets true if the defconn was set correctly
- iDefaultConnectionSet = ETrue;
-
- }
-
-
-//-----------------------------------------------------------------------------
// CProcessorGlobal::SaveGlobalWlanParameterL()
//-----------------------------------------------------------------------------
//