phonebookengines_old/contactsmodel/tsrc/t_groupviewmodifiedContact.h
changeset 40 b46a585f6909
equal deleted inserted replaced
37:fd64c38c277d 40:b46a585f6909
       
     1 // Copyright (c) 2001-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".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #include <cntview.h>
       
    17 #include "t_utils2.h"
       
    18 
       
    19 
       
    20 //
       
    21 // Forward declarations.
       
    22 //
       
    23 
       
    24 class CGroupViewTesterBase;
       
    25 
       
    26 
       
    27 //
       
    28 // CTestConductor.
       
    29 //
       
    30 
       
    31 class CTestConductor : public CBase
       
    32 	{
       
    33 public:
       
    34 	static CTestConductor* NewL();
       
    35 	void SetTestError(TInt aTestError);
       
    36 	~CTestConductor();
       
    37 private:
       
    38 	CTestConductor();
       
    39 	void ConstructL();
       
    40 	void RunTestsL();
       
    41 	void AddContactsL();
       
    42 
       
    43 private:
       
    44 	RFs iFs;
       
    45 	CLog* iLog;
       
    46 	CContactDatabase* iDb;
       
    47 	TInt iTestError;
       
    48 	};
       
    49 
       
    50 
       
    51 //
       
    52 // CGroupViewTester.
       
    53 //
       
    54 
       
    55 class CGroupViewTester : public CActive, public MContactViewObserver
       
    56 	{
       
    57 public:
       
    58 	static CGroupViewTester* NewL(CLog& aLog, CTestConductor* aTestConductor, CContactDatabase& iDb);
       
    59 	~CGroupViewTester();
       
    60 private:
       
    61 	CGroupViewTester(CLog& aLog, CTestConductor* iTestConductor, CContactDatabase& iDb);
       
    62 	void ConstructL();
       
    63 	void NextTest();
       
    64 private: // From CActive.
       
    65 	void RunL();
       
    66 	TInt RunError(TInt aError);
       
    67 	void DoCancel();
       
    68 private: // From MContactViewObserver.
       
    69 	virtual void HandleContactViewEvent(const CContactViewBase& aView,const TContactViewEvent& aEvent);
       
    70 private:
       
    71 	enum TTest
       
    72 		{
       
    73 		ECreateLocalView,
       
    74 		ECreateGroupOne,
       
    75 		ECreateGroupOneView,
       
    76 		EAddContact,
       
    77 		EAddContactToGroupOne,
       
    78 		EModifyContactInGroupOne,
       
    79 		ENumTests
       
    80 		};
       
    81 private:
       
    82 	CLog& iLog;
       
    83 	CTestConductor* iTestConductor;
       
    84 	CContactDatabase& iDb;
       
    85 	TInt iCurrentTest;
       
    86 	RContactViewSortOrder iSortOrder_1;
       
    87 	CContactLocalView* iLocalView;
       
    88 	//GroupView_One
       
    89 	CContactGroup* iGroupOne;
       
    90 	TContactItemId iGroupOneId;
       
    91 	CContactGroupView* iGroupViewOne;
       
    92 
       
    93 	//
       
    94 
       
    95 	TContactItemId iSingleContactId;
       
    96 	TInt iNumNotificationExpected;
       
    97 	};