persistentstorage/sql/SRC/Server/SqlSrvMain.cpp
branchRCL_3
changeset 9 667e88a979d7
parent 8 fa9941cf3867
child 11 211563e4b919
equal deleted inserted replaced
8:fa9941cf3867 9:667e88a979d7
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
    28 #include "UTraceSql.h"
    28 #include "UTraceSql.h"
    29 #ifdef _DEBUG
    29 #ifdef _DEBUG
    30 #include <stdio.h>
    30 #include <stdio.h>
    31 #endif
    31 #endif
    32 
    32 
    33 static CSqlServer* TheServer = NULL;//The single CSqlServer instance
    33 #ifndef SQLSRV_STARTUP_TEST
       
    34 static  
       
    35 #endif
       
    36 CSqlServer* TheServer = NULL;//The single CSqlServer instance
    34 
    37 
    35 _LIT(KMatchAllDbFiles, "*");
    38 _LIT(KMatchAllDbFiles, "*");
    36 _LIT(KDefaultICollationDllName, "");
    39 _LIT(KDefaultICollationDllName, "");
    37 
    40 
    38 //Constants for enabling/disabling the shared cache
    41 //Constants for enabling/disabling the shared cache
   418 @see MSqlPolicyInspector
   421 @see MSqlPolicyInspector
   419 @see MSqlPolicyInspector::Check()
   422 @see MSqlPolicyInspector::Check()
   420 */
   423 */
   421 TBool CSqlServer::Check(const TSecurityPolicy& aPolicy) const
   424 TBool CSqlServer::Check(const TSecurityPolicy& aPolicy) const
   422 	{
   425 	{
       
   426 #ifdef SQLSRV_STARTUP_TEST
       
   427 	aPolicy.Package();//to prevent compiler warning
       
   428 	return ETrue;
       
   429 #else	
   423 	return aPolicy.CheckPolicy(CServer2::Message());
   430 	return aPolicy.CheckPolicy(CServer2::Message());
       
   431 #endif
   424 	}
   432 	}
   425 
   433 
   426 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
   434 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
   427 ////////////////////////////////////////   MSqlSrvBurInterface implementation   //////////////////////////////
   435 ////////////////////////////////////////   MSqlSrvBurInterface implementation   //////////////////////////////
   428 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
   436 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
   496 				}
   504 				}
   497 			CleanupStack::PopAndDestroy(fileNameCol);
   505 			CleanupStack::PopAndDestroy(fileNameCol);
   498 			fileNameCol = NULL;
   506 			fileNameCol = NULL;
   499 			} while((err = findFile.FindWild(fileNameCol)) == KErrNone);//Get the next set of files
   507 			} while((err = findFile.FindWild(fileNameCol)) == KErrNone);//Get the next set of files
   500 		}//end of "if(err == KErrNone)"
   508 		}//end of "if(err == KErrNone)"
   501 	//TODO: once DEF144134 gets fixed, the next 2 lines shall be removed
       
   502 	delete fileNameCol;
       
   503 	fileNameCol = NULL;
       
   504 	__SQLASSERT(!fileNameCol, ESqlPanicInternalError);
   509 	__SQLASSERT(!fileNameCol, ESqlPanicInternalError);
   505 	if(err != KErrNotFound && err != KErrNone)
   510 	if(err != KErrNotFound && err != KErrNone)
   506 		{
   511 		{
   507 		__SQLLEAVE(err);
   512 		__SQLLEAVE(err);
   508 		}
   513 		}