|
1 /* |
|
2 * Copyright (c) 2005-2006 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: Manages console. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef C_COMASUPLCONSOLEMANAGER_H |
|
19 #define C_COMASUPLCONSOLEMANAGER_H |
|
20 |
|
21 #include <e32base.h> |
|
22 #include <e32cons.h> |
|
23 #include <ecom/implementationinformation.h> |
|
24 |
|
25 class COMASuplConsoleView; |
|
26 class MPosEventObserver; |
|
27 class CPosTesterModule; |
|
28 |
|
29 /** Title of the console. */ |
|
30 _LIT(KConsoleTitle, "UserInterface"); |
|
31 |
|
32 /** |
|
33 * Manages console and user input for selecting any implementation. |
|
34 * |
|
35 * Provides console for displaying implementations and monitors user input |
|
36 * for selecting any implementation. If there is only one implementation |
|
37 * then it is considered selected. |
|
38 * |
|
39 * @lib epos_comasuplpostestermodulecfg.lib |
|
40 * @since S60 v3.1u |
|
41 */ |
|
42 class COMASuplConsoleManager : public CBase |
|
43 { |
|
44 public: |
|
45 static COMASuplConsoleManager* NewL(const RImplInfoPtrArray& aImplInfoArray); |
|
46 virtual ~COMASuplConsoleManager(); |
|
47 |
|
48 /** |
|
49 * Identifies the implementation selected by the user from console. |
|
50 * |
|
51 * @since S60 v3.1 |
|
52 * @return TInt Index of the implementation selected. |
|
53 */ |
|
54 TInt GetUserSelection(); |
|
55 |
|
56 /** |
|
57 * Index of the implementation selected. |
|
58 * |
|
59 * @since S60 v3.1 |
|
60 * @return TInt Index of the implementation selected. |
|
61 */ |
|
62 TInt GetSelectedIndex(); |
|
63 |
|
64 /** |
|
65 * Returns the console which is used for displaying an monitoring |
|
66 * user input. |
|
67 * |
|
68 * @since S60 v3.1 |
|
69 * @return CConsoleBase& Reference to the console. |
|
70 */ |
|
71 CConsoleBase& GetConsole(); |
|
72 |
|
73 private: |
|
74 COMASuplConsoleManager(const RImplInfoPtrArray& aImplInfoArray); |
|
75 |
|
76 void ConstructL(); |
|
77 |
|
78 private: |
|
79 /** |
|
80 * Points to the console. |
|
81 * Own. |
|
82 */ |
|
83 CConsoleBase* iConsole; |
|
84 |
|
85 /** |
|
86 * Points to the console view which displays list of implementations. |
|
87 * Own. |
|
88 */ |
|
89 COMASuplConsoleView* iConsoleView; |
|
90 |
|
91 /** |
|
92 * Reference to an array of implementations. |
|
93 */ |
|
94 const RImplInfoPtrArray& iImplementationList; |
|
95 |
|
96 /** |
|
97 * Index selected by the user. |
|
98 */ |
|
99 TInt iSelectedIndex; |
|
100 }; |
|
101 #endif |