|
1 /* |
|
2 * Copyright (c) 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 //utility class for tests |
|
18 //all utility methods should be implemented here |
|
19 #ifndef CA_RUNNING_APP_MONITOR_TEST_UTILS_H |
|
20 #define CA_RUNNING_APP_MONITOR_TEST_UTILS_H |
|
21 |
|
22 #include "casrvengutils.h" |
|
23 #include "casrvplugin.h" |
|
24 |
|
25 class CCaStorageProxy; |
|
26 class CCaInnerEntry; |
|
27 |
|
28 class CTestUtils: public CBase |
|
29 { |
|
30 public: |
|
31 /**/ |
|
32 virtual ~CTestUtils(); |
|
33 |
|
34 /**/ |
|
35 static CTestUtils* NewL(); |
|
36 |
|
37 /**/ |
|
38 static CTestUtils* NewLC(); |
|
39 |
|
40 TInt CopyDb(); |
|
41 |
|
42 TInt LaunchApplicationL( const TUid aUid ); |
|
43 |
|
44 TInt TerminateApplicationL( const TUid aUid ); |
|
45 |
|
46 void WaitL(TInt aMicroSec); |
|
47 |
|
48 TBool IsRunningL(TUid aAppUid, CCaStorageProxy& aStorage)const; |
|
49 |
|
50 private: |
|
51 /** |
|
52 * Copys files |
|
53 */ |
|
54 TInt Copy( const TDesC& aSource, const TDesC& aDest ); |
|
55 |
|
56 CTestUtils(); |
|
57 |
|
58 void ConstructL(); |
|
59 |
|
60 RFs iFs; |
|
61 CFileMan* iFileManager; |
|
62 |
|
63 /** |
|
64 * Local Active Sheduler. |
|
65 * Own. |
|
66 */ |
|
67 CActiveSchedulerWait* iActiveWait; |
|
68 |
|
69 }; |
|
70 |
|
71 #endif |