|
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 #if (!defined __TIMEOUT_BASE_STEP_H__) |
|
26 #define __TIMEOUT_BASE_STEP_H__ |
|
27 #include <test/testexecutestepbase.h> |
|
28 #include "PerformanceFunctionalityBase.h" |
|
29 |
|
30 class CTimeoutBaseStep : public CPerformanceFunctionalityBase |
|
31 { |
|
32 protected: |
|
33 CTimeoutBaseStep(const TInt aContacts, const TInt aDeviation); |
|
34 void SetTimeOutL(CContactDatabase *aContactsDatabase = NULL); |
|
35 TBool CheckTimeOutL(TInt (CTimeoutBaseStep::*aFunc)(CContactDatabase *, const TContactItemId), |
|
36 CContactDatabase *aContactsDatabase, |
|
37 const TContactItemId aCid, |
|
38 const TInt aLockErr, |
|
39 const TInt aTimeout, |
|
40 const TBool aSetTime=ETrue); |
|
41 |
|
42 //methods to perform and cleanup a single CRUD operation |
|
43 protected: |
|
44 TInt CheckOpenL(CContactDatabase *aContactsDatabase, const TContactItemId aCid); |
|
45 TInt CheckUpdateL(CContactDatabase *aContactsDatabase, const TContactItemId aCid); |
|
46 TInt CheckRead(CContactDatabase *aContactsDatabase, const TContactItemId aCid); |
|
47 TInt CheckAddL(CContactDatabase *aContactsDatabase, const TContactItemId aCid); |
|
48 TInt CheckDelete(CContactDatabase *aContactsDatabase, const TContactItemId aCid); |
|
49 |
|
50 protected: |
|
51 TInt iTimeOut; |
|
52 TTime iStart; |
|
53 TTime iEnd; |
|
54 const TInt iDeviation; |
|
55 TBool iTransaction; |
|
56 }; |
|
57 |
|
58 #endif |