common/tools/ats/smoketest/contacts/inc/TestContactsBase.h
author victorp@symbian.org
Wed, 03 Feb 2010 16:06:24 +0000
changeset 872 17498133d9ad
parent 117 483f966c6335
permissions -rw-r--r--
adding EPL headers to smoke test
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
117
483f966c6335 Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff changeset
     1
// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
483f966c6335 Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff changeset
     2
// All rights reserved.
483f966c6335 Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff changeset
     3
// This component and the accompanying materials are made available
872
17498133d9ad adding EPL headers to smoke test
victorp@symbian.org
parents: 117
diff changeset
     4
// under the terms of the License "Eclipse Public License v1.0"
117
483f966c6335 Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff changeset
     5
// which accompanies this distribution, and is available
872
17498133d9ad adding EPL headers to smoke test
victorp@symbian.org
parents: 117
diff changeset
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
117
483f966c6335 Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff changeset
     7
//
483f966c6335 Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff changeset
     8
// Initial Contributors:
483f966c6335 Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff changeset
     9
// Nokia Corporation - initial contribution.
483f966c6335 Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff changeset
    10
//
483f966c6335 Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff changeset
    11
// Contributors:
483f966c6335 Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff changeset
    12
//
483f966c6335 Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff changeset
    13
// Description:
483f966c6335 Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff changeset
    14
// This contains CTestContactsBase
483f966c6335 Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff changeset
    15
// 
483f966c6335 Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff changeset
    16
//
483f966c6335 Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff changeset
    17
483f966c6335 Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff changeset
    18
#ifndef TEST_CONTACTS_BASE_H
483f966c6335 Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff changeset
    19
#define TEST_CONTACTS_BASE_H
483f966c6335 Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff changeset
    20
483f966c6335 Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff changeset
    21
483f966c6335 Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff changeset
    22
#include <cntdb.h>
483f966c6335 Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff changeset
    23
#include <TestExecuteStepBase.h>
483f966c6335 Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff changeset
    24
#include <cntitem.h>
483f966c6335 Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff changeset
    25
483f966c6335 Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff changeset
    26
#include "TestContact.h"
483f966c6335 Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff changeset
    27
483f966c6335 Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff changeset
    28
const TInt KMaxScriptLineLength = 200;
483f966c6335 Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff changeset
    29
483f966c6335 Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff changeset
    30
class CTestContactsBase : public CTestStep, protected MTestContactInstrumentation
483f966c6335 Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff changeset
    31
{
483f966c6335 Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff changeset
    32
public:
483f966c6335 Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff changeset
    33
	CTestContactsBase();
483f966c6335 Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff changeset
    34
	~CTestContactsBase();
483f966c6335 Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff changeset
    35
	virtual enum TVerdict	doTestStepPreambleL();
483f966c6335 Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff changeset
    36
	virtual enum TVerdict	doTestStepPostambleL();
483f966c6335 Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff changeset
    37
483f966c6335 Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff changeset
    38
protected:
483f966c6335 Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff changeset
    39
	void				CreateDatabase();
483f966c6335 Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff changeset
    40
	void				OpenDatabase();
483f966c6335 Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff changeset
    41
	void				CleanupDatabase();
483f966c6335 Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff changeset
    42
	void				RaiseInstrumentationEventNotificationL(TInt aEventTag);
483f966c6335 Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff changeset
    43
	CContactIdArray*	SearchEntriesL();
483f966c6335 Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff changeset
    44
483f966c6335 Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff changeset
    45
protected:
483f966c6335 Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff changeset
    46
	CContactDatabase*			iDatabase;
483f966c6335 Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff changeset
    47
	CContactItemFieldDef*		iFieldDef;
483f966c6335 Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff changeset
    48
483f966c6335 Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff changeset
    49
private:
483f966c6335 Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff changeset
    50
	CActiveScheduler*			iSchedular;
483f966c6335 Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff changeset
    51
};
483f966c6335 Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff changeset
    52
483f966c6335 Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff changeset
    53
#endif /* TEST_CONTACTS_BASE_H */