phonebookengines/contactsmodel/tsrc/performance/T_SampProf.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 11 Jun 2010 13:29:23 +0300
changeset 40 b46a585f6909
parent 24 0ba2181d7c28
permissions -rw-r--r--
Revision: 201021 Kit: 2010123

/*
* 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_SAMPPROF_H__
#define __T_SAMPPROF_H__


//************************************************************************************************************
#include "t_perfdbcreator.h"


//************************************************************************************************************
enum TSortOrder
   {
   ELFP=0x00,
   ELFC=0x01
   };


//************************************************************************************************************
//   CTestLoop
//************************************************************************************************************
class CTestLoop : public CActive, MContactViewObserver
   {
   public:
	   static CTestLoop* NewL(TInt aTes, TInt aCount, TSortOrder aSortOrder, TBool aProf);

   private:
      CTestLoop(TInt aTes, TInt aCount, TSortOrder aSortOrder, TBool aProf);
	   void ConstructL();
	   ~CTestLoop();
	   
	   virtual void RunL();
	   virtual void DoCancel();
      virtual TInt RunError(TInt aError);
	   void CompleteSelf(TInt aReason=KErrNone);	         
      	   
	   void CreateRemoteViewL();
      virtual void HandleContactViewEvent(const CContactViewBase &aView, const TContactViewEvent &aEvent);	   	   

	   void OpenDatabaseL(const TDesC& aDbName);
	   void CloseDb();
	   
   private:
      CContactDatabase*       iContactsDb;
      CContactRemoteView*     iContactRemoteView;
      TInt                    iTest;
      TInt                    iCount;
		TInt							iLoopCounter;
      TSortOrder					iSortOrder;
      TBool 						iProf;
   };

#endif  //__T_SAMPPROF_H__