phonebookengines_old/contactsmodel/tsrc/t_speeddialtest.h
changeset 40 b46a585f6909
equal deleted inserted replaced
37:fd64c38c277d 40:b46a585f6909
       
     1 // Copyright (c) 2005-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 #ifndef __T_SPEEDDIALTEST_H__
       
    17 #define __T_SPEEDDIALTEST_H__
       
    18 
       
    19 #include "t_utils2.h"
       
    20 
       
    21 //
       
    22 // Class CLockServerTester Definition
       
    23 //
       
    24 
       
    25 class CLockServerTester : public CBase
       
    26 	{
       
    27 public:
       
    28 	static CLockServerTester* NewL();
       
    29 	~CLockServerTester();	
       
    30 private:
       
    31 	CLockServerTester();
       
    32 	void ConstructL();
       
    33 public:
       
    34     void FindServerAndKillItL();
       
    35 	void SetupProcessL();
       
    36 	void DeleteProcess();
       
    37 	void OpenAndKillProcess();
       
    38 private:	
       
    39 	struct
       
    40 		{
       
    41 		TFindProcess* iFind;
       
    42 		RProcess* iExecution;
       
    43 		} iProcess;
       
    44 		
       
    45 	TFullName iProcessFullName;
       
    46 	
       
    47 	};
       
    48 
       
    49 //
       
    50 // Function prototypes
       
    51 //
       
    52 
       
    53 TInt DeleteIniFile();
       
    54 void AddContactsL(CRandomContactGenerator& aGenerator);
       
    55 CContactDatabase* ReplaceDatabaseAndCreateContactsLC();
       
    56 void CreateContactsL(CContactDatabase& aDb);
       
    57 CContactDatabase* SetupLC();
       
    58 void AssignSpeedDialL( TInt aContact, TInt aSpeedDialID, CContactDatabase& database );
       
    59 void UpdateSpeedDialL( TInt aContact, TInt aSpeedDialID, CContactDatabase& database );
       
    60 void RemoveSpeedDialWhenOpenL( TInt aContact, TInt aSpeedDialID, CContactDatabase& database );
       
    61 void DoTestL();
       
    62 TBool ContactIsASpeedDial(const CContactItem& aItem);
       
    63 
       
    64 void TestDatabaseWithSpeedDialsL();
       
    65 void TestOneL();
       
    66 void TestTwoL();
       
    67 void TestThreeL();
       
    68 void TestFourL();
       
    69 
       
    70 #endif