diff -r e686773b3f54 -r 0ba2181d7c28 phonebookengines/contactsmodel/tsrc/t_currentdb.h --- a/phonebookengines/contactsmodel/tsrc/t_currentdb.h Tue Feb 02 10:12:17 2010 +0200 +++ b/phonebookengines/contactsmodel/tsrc/t_currentdb.h Fri Mar 19 09:27:18 2010 +0200 @@ -1,17 +1,20 @@ -// Copyright (c) 1997-2009 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: -// +/* +* Copyright (c) 1997-2009 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_CURRENTDB_H__ #define __T_CURRENTDB_H__ @@ -30,14 +33,14 @@ class CTestManager; -// +//////////////////////////////////////////////////////////////////////////////////// // -------> CTestBase (header) -// +//////////////////////////////////////////////////////////////////////////////////// class CTestBase : public CActive, public MContactDbObserver { -// +//////////////////////////////////////////////////////////////////////////////////// public: // ENUMERATIONS SHARED BETWEEN DRIVER & TEST -// +//////////////////////////////////////////////////////////////////////////////////// enum { EStartTests = 0, @@ -53,49 +56,49 @@ EEndTests }; -// +//////////////////////////////////////////////////////////////////////////////////// public: // STATIC CONSTRUCT / DESTRUCT -// +//////////////////////////////////////////////////////////////////////////////////// ~CTestBase(); -// +//////////////////////////////////////////////////////////////////////////////////// public: // ACCESS -// +//////////////////////////////////////////////////////////////////////////////////// void Complete(TInt aReason); inline TInt CurrentTest() const { return iCurrentTest; } inline RThread& Thread() { return iThread; } inline TBool Waiting() const { return iWaiting || iWaitingForAnyEvent; } -// +//////////////////////////////////////////////////////////////////////////////////// protected: // INTERNAL CONSTRUCTION -// +//////////////////////////////////////////////////////////////////////////////////// CTestBase(CTestManager& aTester, TInt aClientNumber, TThreadPriority aThreadPriority, TInt aPriority); virtual void ConstructL(const TDesC& aName); // static TInt ThreadFunction(TAny *aParam); void RunTestsL(); -// +//////////////////////////////////////////////////////////////////////////////////// protected: // TEST FRAMEWORK -// +//////////////////////////////////////////////////////////////////////////////////// virtual void OpenDatabaseL() = 0; virtual TInt HandleThreadCreationL(); virtual void HandleThreadDeletionL(); -// +//////////////////////////////////////////////////////////////////////////////////// protected: // FROM MContactDbObserver -// +//////////////////////////////////////////////////////////////////////////////////// void HandleDatabaseEventL(TContactDbObserverEvent aEvent); -// +//////////////////////////////////////////////////////////////////////////////////// private: // FROM CActive -// +//////////////////////////////////////////////////////////////////////////////////// void RunL(); void DoCancel(); -// +//////////////////////////////////////////////////////////////////////////////////// protected: // TEST RELATED -// +//////////////////////////////////////////////////////////////////////////////////// void ReadyForNextTest(); void WaitForContactsEvent(TContactDbObserverEventType aEvent, TInt aTimeInSecondsToWaitFor = 30); void WaitForAnyContactsEvent(TInt aTimeInSecondsToWaitFor = 30); @@ -104,9 +107,9 @@ void OpenSemaphoreL(); void CloseSemaphore(); -// +//////////////////////////////////////////////////////////////////////////////////// protected: // MEMBER DATA -// +//////////////////////////////////////////////////////////////////////////////////// CTestManager& iTestCoordinator; // Owned by this class after the thread has been created @@ -131,21 +134,21 @@ }; -// +//////////////////////////////////////////////////////////////////////////////////// // -------> CTestThreadOne (header) -// +//////////////////////////////////////////////////////////////////////////////////// class CTestThreadOne : public CTestBase { -// +//////////////////////////////////////////////////////////////////////////////////// public: // FROM CTestBase -// +//////////////////////////////////////////////////////////////////////////////////// static CTestThreadOne* NewL(TInt aClientNumber, const TDesC& aName, CTestManager& aTester, TThreadPriority aThreadPriority = EPriorityNormal, TInt aPriority = EPriorityStandard); void DoTestL(TInt aTestNumber); void OpenDatabaseL(); -// +//////////////////////////////////////////////////////////////////////////////////// private: // INTERNAL -// +//////////////////////////////////////////////////////////////////////////////////// CTestThreadOne(CTestManager& aTester, TInt aClientNumber, TThreadPriority aThreadPriority, TInt aPriority); // void DoTest1L(); @@ -160,21 +163,21 @@ }; -// +//////////////////////////////////////////////////////////////////////////////////// // -------> CTestThreadTwo (header) -// +//////////////////////////////////////////////////////////////////////////////////// class CTestThreadTwo : public CTestBase { -// +//////////////////////////////////////////////////////////////////////////////////// public: // FROM CTestBase -// +//////////////////////////////////////////////////////////////////////////////////// static CTestThreadTwo* NewL(TInt aClientNumber, const TDesC& aName, CTestManager& aTester, TThreadPriority aThreadPriority, TInt aPriority = EPriorityStandard); void DoTestL(TInt aTestNumber); void OpenDatabaseL(); -// +//////////////////////////////////////////////////////////////////////////////////// private: // INTERNAL -// +//////////////////////////////////////////////////////////////////////////////////// CTestThreadTwo(CTestManager& aTester, TInt aClientNumber, TThreadPriority aThreadPriority, TInt aPriority); // void DoTest1L(); @@ -189,37 +192,37 @@ }; -// +//////////////////////////////////////////////////////////////////////////////////// // -------> CTestManager (header) -// +//////////////////////////////////////////////////////////////////////////////////// class CTestManager : public CTimer { -// +//////////////////////////////////////////////////////////////////////////////////// public: // STATIC CONSTRUCT -// +//////////////////////////////////////////////////////////////////////////////////// static CTestManager* NewLC(); static CTestManager* NewL(); ~CTestManager(); -// +//////////////////////////////////////////////////////////////////////////////////// private: // INTERNAL CONSTRUCT -// +//////////////////////////////////////////////////////////////////////////////////// CTestManager(TInt aPriority = EPriorityStandard); void ConstructL(); -// +//////////////////////////////////////////////////////////////////////////////////// private: // FROM CActive -// +//////////////////////////////////////////////////////////////////////////////////// void RunL(); -// +//////////////////////////////////////////////////////////////////////////////////// private: // NEW FUNCTIONS -// +//////////////////////////////////////////////////////////////////////////////////// void IssueTimerRequest(); -// +//////////////////////////////////////////////////////////////////////////////////// private: // MEMBER DATA -// +//////////////////////////////////////////////////////////////////////////////////// TInt iTestNumber; // CTestThreadOne* iClient1;