eapol/eapol_framework/eapol_symbian/am/type/aka/symbian/plugin/src/EapAkaDbUtils.cpp
changeset 34 ad1f037f1ac2
parent 26 9abfd4f00d37
equal deleted inserted replaced
31:372d2d6c5cf9 34:ad1f037f1ac2
    14 * Description:  EAP and WLAN authentication protocols.
    14 * Description:  EAP and WLAN authentication protocols.
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 /*
    18 /*
    19 * %version: 47 %
    19 * %version: 54 %
    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 "EapAkaDbDefaults.h"
    33 #include "EapAkaDbDefaults.h"
    34 #include "EapAkaDbParameterNames.h"
    34 #include "EapAkaDbParameterNames.h"
    35 #include "eap_type_aka_types.h"
    35 #include "eap_type_aka_types.h"
    36 
    36 
    37 #include <EapTraceSymbian.h>
    37 #include <EapTraceSymbian.h>
    38 #include <EapPluginTools.h>
    38 #include "EapPluginTools.h"
    39 
    39 
    40 const TInt KMaxSqlQueryLength = 2048;
    40 const TInt KMaxSqlQueryLength = 2048;
    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 =======================
   740 	RFs aFileServerSession;
   740 	RFs aFileServerSession;
   741 
   741 
   742 	TInt error(KErrNone);
   742 	TInt error(KErrNone);
   743 	TFileName aPrivateDatabasePathName;
   743 	TFileName aPrivateDatabasePathName;
   744 	
   744 	
       
   745 	error = aFileServerSession.Connect();
       
   746 	EAP_TRACE_DEBUG_SYMBIAN((_L("EapAkaDbUtils::DeleteConfigurationL(): - aFileServerSession.Connect(), error=%d\n"), error));
       
   747 	User::LeaveIfError(error);
       
   748 
   745 	EapPluginTools::CreateDatabaseLC(
   749 	EapPluginTools::CreateDatabaseLC(
   746 		aDatabase,
   750 		aDatabase,
   747 		aFileServerSession,
   751 		aFileServerSession,
   748 		error,
   752 		error,
   749 		KEapAkaDatabaseName,
   753 		KEapAkaDatabaseName,
   792 	CleanupClosePushL(view);
   796 	CleanupClosePushL(view);
   793 	User::LeaveIfError(view.EvaluateAll());
   797 	User::LeaveIfError(view.EvaluateAll());
   794 
   798 
   795 	// Delete rows
   799 	// Delete rows
   796 	if (view.FirstL())
   800 	if (view.FirstL())
   797 	{		
   801 	{
   798 		do {
   802 		do {
   799 			view.DeleteL();
   803 			view.DeleteL();
   800 		} while (view.NextL() != EFalse);
   804 		} while (view.NextL() != EFalse);
   801 	}
   805 	}
   802 
   806