eapol/eapol_framework/eapol_symbian/am/type/mschapv2/symbian/plugin/src/EapMsChapV2DbUtils.cpp
changeset 39 fe6b6762fccd
parent 33 938269283a16
child 36 c98682f98478
equal deleted inserted replaced
38:7a0216d033ac 39:fe6b6762fccd
    14 * Description:  EAP and WLAN authentication protocols.
    14 * Description:  EAP and WLAN authentication protocols.
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 /*
    18 /*
    19 * %version: 46 %
    19 * %version: 53 %
    20 */
    20 */
    21 
    21 
    22 // This is enumeration of EAPOL source code.
    22 // This is enumeration of EAPOL source code.
    23 #if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
    23 #if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
    24 	#undef EAP_FILE_NUMBER_ENUM
    24 	#undef EAP_FILE_NUMBER_ENUM
    33 #include "EapMsChapV2DbUtils.h"
    33 #include "EapMsChapV2DbUtils.h"
    34 #include "EapMsChapV2DbDefaults.h"
    34 #include "EapMsChapV2DbDefaults.h"
    35 #include "EapMsChapV2DbParameterNames.h"
    35 #include "EapMsChapV2DbParameterNames.h"
    36 
    36 
    37 #include <EapTraceSymbian.h>
    37 #include <EapTraceSymbian.h>
    38 #include <EapPluginTools.h>
    38 #include "EapPluginTools.h"
    39 
    39 
    40 const TUint KMaxSqlQueryLength = 512;
    40 const TUint KMaxSqlQueryLength = 512;
    41 const TInt KMicroSecsInAMinute = 60000000; // 60000000 micro seconds is 1 minute.
    41 const TInt KMicroSecsInAMinute = 60000000; // 60000000 micro seconds is 1 minute.
    42 
    42 
    43 // ================= MEMBER FUNCTIONS =======================
    43 // ================= MEMBER FUNCTIONS =======================
   430 	}
   430 	}
   431 			
   431 			
   432 	if (aSettings.iShowPassWordPromptPresent)
   432 	if (aSettings.iShowPassWordPromptPresent)
   433 		{	
   433 		{	
   434 		// If password was supplied set password prompting off
   434 		// If password was supplied set password prompting off
   435 		view.SetColL(colSet->ColNo(cf_str_EAP_MSCHAPV2_password_prompt_literal), aSettings.iShowPassWordPrompt);		
   435 		if (aSettings.iShowPassWordPrompt == EFalse)
       
   436 			{
       
   437 				view.SetColL(colSet->ColNo(cf_str_EAP_MSCHAPV2_password_prompt_literal), EEapDbFalse );
       
   438 			}
       
   439 		else
       
   440 			{
       
   441 				view.SetColL(colSet->ColNo(cf_str_EAP_MSCHAPV2_password_prompt_literal), EEapDbTrue );
       
   442 			}		
   436 		}
   443 		}
   437 
   444 
   438 	// Session validity time
   445 	// Session validity time
   439 	if (aSettings.iSessionValidityTimePresent)
   446 	if (aSettings.iSessionValidityTimePresent)
   440 	{
   447 	{
   667 	RFs aFileServerSession;
   674 	RFs aFileServerSession;
   668 
   675 
   669 	TInt error(KErrNone);
   676 	TInt error(KErrNone);
   670 	TFileName aPrivateDatabasePathName;
   677 	TFileName aPrivateDatabasePathName;
   671 	
   678 	
       
   679 	error = aFileServerSession.Connect();
       
   680 	EAP_TRACE_DEBUG_SYMBIAN((_L("EapMsChapV2DbUtils::DeleteConfigurationL(): - aFileServerSession.Connect(), error=%d\n"), error));
       
   681 	User::LeaveIfError(error);
       
   682 
   672 	EapPluginTools::CreateDatabaseLC(
   683 	EapPluginTools::CreateDatabaseLC(
   673 		aDatabase,
   684 		aDatabase,
   674 		aFileServerSession,
   685 		aFileServerSession,
   675 		error,
   686 		error,
   676 		KEapMsChapV2DatabaseName,
   687 		KEapMsChapV2DatabaseName,
   720 	CleanupClosePushL(view);
   731 	CleanupClosePushL(view);
   721 	User::LeaveIfError(view.EvaluateAll());
   732 	User::LeaveIfError(view.EvaluateAll());
   722 
   733 
   723 	// Delete rows
   734 	// Delete rows
   724 	if (view.FirstL())
   735 	if (view.FirstL())
   725 	{		
   736 	{
   726 		do {
   737 		do {
   727 			view.DeleteL();
   738 			view.DeleteL();
   728 		} while (view.NextL() != EFalse);
   739 		} while (view.NextL() != EFalse);
   729 	}
   740 	}
   730 
   741