First public contribution.
1 // Copyright (c) 1998-2009 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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
21 GLREF_D RDbNamedDatabase TheDatabase;
23 GLREF_C void Connect();
24 GLREF_C void Disconnect();
25 GLREF_C void PrepareDbFmtString();
26 GLREF_C void TestOpen2();
27 GLREF_C void Origins2();
32 virtual void Mark() const =0;
33 virtual void Fail(TInt aCount) const =0;
34 virtual void Reset() const =0;
35 virtual void Check() const =0;
41 virtual void OpenDbL() const =0;
47 void Test(const THeapFail& aHeap,const TContext* aContext);
56 inline void Test(const THeapFail& aHeap,const TContext& aContext)
58 Test(aHeap,&aContext);
60 inline void Test(const THeapFail& aHeap)
66 class TClientHeap : public THeapFail
76 User::__DbgMarkStart(RHeap::EUser);
78 void Fail(TInt aCount) const
80 User::__DbgSetAllocFail(RHeap::EUser,RHeap::EFailNext,aCount);
84 User::__DbgSetAllocFail(RHeap::EUser,RHeap::ENone,1);
88 User::__DbgMarkEnd(RHeap::EUser,0);
93 class TServerHeap : public THeapFail
104 void Fail(TInt aCount) const
106 TheDbs.SetHeapFailure(RHeap::EFailNext,aCount);
110 TheDbs.SetHeapFailure(RHeap::ENone,0);
118 GLREF_D TClientHeap KClientHeap;
119 GLREF_D TServerHeap KServerHeap;