diff -r d6ef85bc5971 -r a7ba600cb39d persistentstorage/sql/TEST/t_sqlcmdlineutil.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/persistentstorage/sql/TEST/t_sqlcmdlineutil.h Thu May 27 14:29:47 2010 +0300 @@ -0,0 +1,62 @@ +// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef T_SQLCMDLINEUTIL_H +#define T_SQLCMDLINEUTIL_H + +#include + +class RTest; + +struct TCmdLineParams + { + enum TDbEncoding + { + EDbUtf8, + EDbUtf16 + }; + + inline TCmdLineParams(TDbEncoding aDefaultEncoding = EDbUtf16, + TInt aDefaultPageSize = 1024, + TInt aDefaultCacheSize = 1000) : + iDefaultEncoding(aDefaultEncoding), + iDefaultPageSize(aDefaultPageSize), + iDefaultCacheSize(aDefaultCacheSize) + { + SetDefaults(); + } + + inline void SetDefaults() + { + iDbEncoding = iDefaultEncoding; + iPageSize = iDefaultPageSize; + iCacheSize = iDefaultCacheSize; + iDriveName.Copy(_L("c:")); + } + + const TDbEncoding iDefaultEncoding; + const TInt iDefaultPageSize; + const TInt iDefaultCacheSize; + + TDbEncoding iDbEncoding; + TInt iPageSize; + TInt iCacheSize; + TDriveName iDriveName; + }; + +void GetCmdLineParamsAndSqlConfigString(RTest& aTest, const TDesC& aTestName, TCmdLineParams& aCmdLineParams, TDes8& aConfigStr); +void PrepareDbName(const TDesC& aDeafultDbName, const TDriveName& aDriveName, TDes& aDbName); + +#endif//T_SQLCMDLINEUTIL_H