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: QT C++ and Symbian C++ combination Class. |
|
15 * Call STIF UI engine and UI interface to perform test operation. |
|
16 * All the public methods are QT C++ based object. |
|
17 * |
|
18 */ |
|
19 #ifndef STIFEXECUTOR_H_ |
|
20 #define STIFEXECUTOR_H_ |
|
21 |
|
22 //#include <TestModuleInfo.h> |
|
23 #include "cstfcase.h" |
|
24 #include "cstfmodule.h" |
|
25 #include <UIStoreIf.h> |
|
26 #include <UIStore.h> |
|
27 #include <UIEngine.h> |
|
28 #include <QList> |
|
29 |
|
30 class IStifCaseUpdateListener |
|
31 { |
|
32 public: |
|
33 virtual void OnGetCaseUpdated(CStartedTestCase* aCase,CSTFCase& stfcase, int flags) = 0; |
|
34 virtual void OnGetCaseOutput(CStartedTestCase* aCase, QString& msg) = 0; |
|
35 }; |
|
36 |
|
37 |
|
38 class CStifExecutor : public CUIStoreIf |
|
39 { |
|
40 public: |
|
41 CStifExecutor(); |
|
42 ~CStifExecutor(); |
|
43 public: |
|
44 void AddStifCaseUpdateListener(IStifCaseUpdateListener* listener); |
|
45 void RemoveStifCaseUpdateListener(IStifCaseUpdateListener* listener); |
|
46 bool OpenIniFile(const QString& filename); |
|
47 QList<CSTFModule> GetModuleList(); |
|
48 QList<CSTFCase> GetCaseList(const QString& moduleName); |
|
49 void ExecuteSingleCase(const QString& moduleName, int caseIndex); |
|
50 QList<QString> GetSetList(); |
|
51 QList<CSTFCase> GetCaseListFromSet(const QString& setName); |
|
52 void CreateSet(const QString& setName); |
|
53 void SaveSet(QString& setName); |
|
54 void RemoveSet(const QString& setName); |
|
55 void AddtoSet(const QString& setName, CSTFCase& caseInfo); |
|
56 void ExecuteSet(const QString& SetName, const int startIndex, const TSTFCaseRunningType type); |
|
57 |
|
58 public://implement CUIStoreIf |
|
59 void Update( CStartedTestCase* aTestCase, |
|
60 TInt aFlags); |
|
61 |
|
62 public: |
|
63 TPtrC QString2TPtrC(const QString& aString); |
|
64 QString TDesC2QString(const TDesC& des); |
|
65 //CTestInfo* GetTestInfo(CSTFCase aCase); |
|
66 private: |
|
67 QList<IStifCaseUpdateListener*> *listenerList; |
|
68 HBufC* iBuffer; |
|
69 }; |
|
70 |
|
71 |
|
72 |
|
73 #endif /* STIFEXECUTOR_H_ */ |
|