28
|
1 |
// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
|
2 |
// All rights reserved.
|
|
3 |
// This component and the accompanying materials are made available
|
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
|
5 |
// which accompanies this distribution, and is available
|
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
7 |
//
|
|
8 |
// Initial Contributors:
|
|
9 |
// Nokia Corporation - initial contribution.
|
|
10 |
//
|
|
11 |
// Contributors:
|
|
12 |
//
|
|
13 |
// Description:
|
|
14 |
//
|
|
15 |
|
|
16 |
#ifndef T_SQLCMDLINEUTIL_H
|
|
17 |
#define T_SQLCMDLINEUTIL_H
|
|
18 |
|
|
19 |
#include <f32file.h>
|
|
20 |
|
|
21 |
class RTest;
|
|
22 |
|
|
23 |
struct TCmdLineParams
|
|
24 |
{
|
|
25 |
enum TDbEncoding
|
|
26 |
{
|
|
27 |
EDbUtf8,
|
|
28 |
EDbUtf16
|
|
29 |
};
|
|
30 |
|
|
31 |
inline TCmdLineParams(TDbEncoding aDefaultEncoding = EDbUtf16,
|
|
32 |
TInt aDefaultPageSize = 1024,
|
|
33 |
TInt aDefaultCacheSize = 1000) :
|
|
34 |
iDefaultEncoding(aDefaultEncoding),
|
|
35 |
iDefaultPageSize(aDefaultPageSize),
|
|
36 |
iDefaultCacheSize(aDefaultCacheSize)
|
|
37 |
{
|
|
38 |
SetDefaults();
|
|
39 |
}
|
|
40 |
|
|
41 |
inline void SetDefaults()
|
|
42 |
{
|
|
43 |
iDbEncoding = iDefaultEncoding;
|
|
44 |
iPageSize = iDefaultPageSize;
|
|
45 |
iCacheSize = iDefaultCacheSize;
|
|
46 |
iDriveName.Copy(_L("c:"));
|
|
47 |
iSoftHeapLimitKb = 0;
|
|
48 |
}
|
|
49 |
|
|
50 |
const TDbEncoding iDefaultEncoding;
|
|
51 |
const TInt iDefaultPageSize;
|
|
52 |
const TInt iDefaultCacheSize;
|
|
53 |
|
|
54 |
TDbEncoding iDbEncoding;
|
|
55 |
TInt iPageSize;
|
|
56 |
TInt iCacheSize;
|
|
57 |
TDriveName iDriveName;
|
|
58 |
TInt iSoftHeapLimitKb;
|
|
59 |
};
|
|
60 |
|
|
61 |
void GetCmdLineParamsAndSqlConfigString(RTest& aTest, const TDesC& aTestName, TCmdLineParams& aCmdLineParams, TDes8& aConfigStr);
|
|
62 |
void PrepareDbName(const TDesC& aDeafultDbName, const TDriveName& aDriveName, TDes& aDbName);
|
|
63 |
void SetSoftHeapLimit(TInt aSoftHeapLimit);
|
|
64 |
void ResetSoftHeapLimit();
|
|
65 |
|
|
66 |
#endif//T_SQLCMDLINEUTIL_H
|