|
1 /* |
|
2 * Copyright (c) 2002 - 2007 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: TestView module implementation |
|
15 * |
|
16 */ |
|
17 |
|
18 // INCLUDE FILES |
|
19 #include <e32base.h> |
|
20 #include "testBaseview.h" |
|
21 #include "consolemain.h" |
|
22 |
|
23 // |
|
24 //=========================================================================== * |
|
25 // Implementation for Class CTestBaseView * |
|
26 //=========================================================================== * |
|
27 // |
|
28 |
|
29 // --------------------------------------------------------------------------- |
|
30 // Method: ~CTestBaseView |
|
31 // Description: Destructor |
|
32 // Parameters: None |
|
33 // Return Values: None |
|
34 // --------------------------------------------------------------------------- |
|
35 // |
|
36 EXPORT_C CTestBaseView::~CTestBaseView() |
|
37 { |
|
38 if(iChild) |
|
39 delete iChild; |
|
40 |
|
41 } |
|
42 |
|
43 // --------------------------------------------------------------------------- |
|
44 // Method: Name |
|
45 // Description: Returns menu name |
|
46 // Parameters: None |
|
47 // Return Values: TDesC& - View Name |
|
48 // --------------------------------------------------------------------------- |
|
49 // |
|
50 EXPORT_C const TDesC& CTestBaseView::Name( ) const |
|
51 { |
|
52 return iName; |
|
53 } |
|
54 |
|
55 // --------------------------------------------------------------------------- |
|
56 // Method: SetName |
|
57 // Description: Sets menu name |
|
58 // Parameters: TDesC& aName :in: Name to be set |
|
59 // Return Values: None |
|
60 // --------------------------------------------------------------------------- |
|
61 // |
|
62 EXPORT_C void CTestBaseView::SetName ( const TDesC& aName ) |
|
63 { |
|
64 iName = aName; |
|
65 } |
|
66 |
|
67 // --------------------------------------------------------------------------- |
|
68 // Method: SetParent |
|
69 // Description: Sets menu parent menu. |
|
70 // Parameters: CTestBaseView* aMenu :in: Parent View |
|
71 // Return Values: None |
|
72 // --------------------------------------------------------------------------- |
|
73 // |
|
74 EXPORT_C void CTestBaseView::SetParent ( CTestBaseView* aView ) |
|
75 { |
|
76 iParent = aView; |
|
77 } |
|
78 |
|
79 // --------------------------------------------------------------------------- |
|
80 // Method: Parent |
|
81 // Description: Get the parent view |
|
82 // Parameters: None |
|
83 // Return Values: CTestBaseView* Parent view |
|
84 // --------------------------------------------------------------------------- |
|
85 // |
|
86 EXPORT_C CTestBaseView* CTestBaseView::Parent() |
|
87 { |
|
88 return iParent; |
|
89 } |
|
90 |
|
91 // --------------------------------------------------------------------------- |
|
92 // Method: CTestBaseView |
|
93 // Description: Default Constructor |
|
94 // Parameters: None |
|
95 // Return Values: None |
|
96 // --------------------------------------------------------------------------- |
|
97 // |
|
98 EXPORT_C CTestBaseView::CTestBaseView(CConsoleMain* aConsoleMain, |
|
99 CTestBaseView* aParent, |
|
100 const TDesC& aName) |
|
101 { |
|
102 iConsole = aConsoleMain->GetConsole(); |
|
103 iConsoleMain = aConsoleMain; |
|
104 iParent = aParent; |
|
105 iChild = NULL; |
|
106 iName = aName; |
|
107 } |
|
108 |
|
109 // --------------------------------------------------------------------------- |
|
110 // Method: NextViewL |
|
111 // Description: Creating child view |
|
112 // Parameters: aChild - a new child view |
|
113 // Return Values: None |
|
114 // --------------------------------------------------------------------------- |
|
115 // |
|
116 EXPORT_C void CTestBaseView::NextViewL(CTestBaseView* aChild) |
|
117 { |
|
118 iConsoleMain->NextViewL(aChild); |
|
119 } |
|
120 |
|
121 // --------------------------------------------------------------------------- |
|
122 // Method: NextViewL |
|
123 // Description: Creating child view |
|
124 // Parameters: aChild - a new child view |
|
125 // Return Values: None |
|
126 // --------------------------------------------------------------------------- |
|
127 // |
|
128 EXPORT_C void CTestBaseView::CurrentViewDoneL() |
|
129 { |
|
130 iConsoleMain->CurrentViewDoneL(); |
|
131 } |
|
132 |
|
133 // ================= OTHER EXPORTED FUNCTIONS ================================= |
|
134 |
|
135 // ----------------------------------------------------------------------------- |
|
136 // E32Dll is a DLL entry point function |
|
137 // Returns: KErrNone: No error |
|
138 // ----------------------------------------------------------------------------- |
|
139 // |
|
140 #ifndef EKA2 |
|
141 GLDEF_C TInt E32Dll( |
|
142 TDllReason /*aReason*/) // Reason |
|
143 { |
|
144 return(KErrNone); |
|
145 |
|
146 } |
|
147 #endif |