phonebookengines/contactsmodel/tsrc/Integration/CntPerfTest/inc/ViewObserver.h
changeset 0 e686773b3f54
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /**
       
     2 * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 /**
       
    21  @file
       
    22  @publishedAll
       
    23  @released
       
    24 */
       
    25  
       
    26 #ifndef __VIEW_OBSERVER_H__
       
    27 #define __VIEW_OBSERVER_H__
       
    28 
       
    29 #include <cntviewbase.h>
       
    30 #include "ContactViewTest.h"
       
    31 
       
    32 class CViewObserver : public CActive, public MContactViewObserver
       
    33 	{
       
    34 public:
       
    35 	static CViewObserver* NewLC(const CContactViewTest &aTest, void (CContactViewTest::*aFunc)() );
       
    36 	~CViewObserver();
       
    37 	void SetView(const CContactViewBase *aLocalView);
       
    38 	void Activate();
       
    39 	void CleanView();
       
    40 private:
       
    41 	CViewObserver(	const CContactViewTest &aTest, void (CContactViewTest::*aFunc)());
       
    42 	
       
    43 private: // From CActive.
       
    44 	void RunL();
       
    45 	void DoCancel();
       
    46 	TInt RunError(TInt aError);
       
    47 private: // From MContactViewObserver.
       
    48 	virtual void HandleContactViewEvent(const CContactViewBase& aView, 
       
    49 										const TContactViewEvent& aEvent);
       
    50 public:
       
    51 	void (CContactViewTest::*iMainFunc)(); 
       
    52 	void (CContactViewTest::*iDoFunc)(const CContactViewBase & ); 
       
    53 	
       
    54 public:
       
    55 	TContactViewEvent iEvent;
       
    56 
       
    57 private:
       
    58 	CContactViewTest 	&iTest;
       
    59 	CContactViewBase	*iLocalView;
       
    60 
       
    61 	};
       
    62 	
       
    63 #endif