|
1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 |
|
17 #ifndef __CMAINMENU_H__ |
|
18 #define __CMAINMENU_H__ |
|
19 |
|
20 #include <e32base.h> |
|
21 #include <etel3rdparty.h> |
|
22 |
|
23 |
|
24 #include "CISVAPIAsync.h" |
|
25 |
|
26 #include "CBaseMenuAsync.h" |
|
27 |
|
28 // Active objects |
|
29 #include "CPhoneId.h" |
|
30 #include "CGetLockInfo.h" |
|
31 #include "CFlightModeInfo.h" |
|
32 #include "CNetworkRegInfo.h" |
|
33 #include "CDialCall.h" |
|
34 #include "CHold.h" |
|
35 #include "CResume.h" |
|
36 #include "CSwap.h" |
|
37 #include "CHangup.h" |
|
38 #include "CLineStatus.h" |
|
39 #include "CCallStatus.h" |
|
40 #include "CCurrentNetworkName.h" |
|
41 #include "CCurrentNetworkInfo.h" |
|
42 #include "COperatorName.h" |
|
43 #include "CCallWaitingStatus.h" |
|
44 #include "CAnswerIncomingCall.h" |
|
45 |
|
46 |
|
47 _LIT(KPhoneIdMsg, "Phone Id:\n"); |
|
48 _LIT(KNetworkInfoMsg, "Network Info:\n"); |
|
49 _LIT(KNetworkNameMsg, "Network Name:\n"); |
|
50 _LIT(KOperatorNameMsg, "Operator Name:\n"); |
|
51 _LIT(KNetworkRegMsg, "Network Registration Status:\n"); |
|
52 _LIT(KCallWaitingStatusMsg, "Call Waiting Status:\n"); |
|
53 _LIT(KMenuMsg, "*~Outgoing Call~*\nPress E to exit\n"); |
|
54 _LIT(KIncomingMsg, "Press I to simulate an incoming call\n"); |
|
55 _LIT(KHoldMsg, "Press H to put current call on Hold\n"); |
|
56 _LIT(KResumeMsg, "Press R to resume the on hold call\n"); |
|
57 _LIT(KSwapMsg, "Press S to swap the active and on hold calls\n"); |
|
58 _LIT(KHangupMsg, "Press Esc Hangup the active Call\n"); |
|
59 _LIT(KDialMsg, "Press D to Dial a Call\n"); |
|
60 _LIT(KAnswerMsg, "Press A to Answer the incoming Call\n"); |
|
61 |
|
62 _LIT(KTheNumber, "01632960000"); |
|
63 |
|
64 /** |
|
65 Provides the required functionality for the application to run correctly. Owns |
|
66 required objects to make Etel 3rd Party calls required by the application. |
|
67 */ |
|
68 class CMainMenu : public CBaseMenuAsync |
|
69 { |
|
70 |
|
71 // Methods |
|
72 public: |
|
73 static CMainMenu* NewLC(CConsoleBase& aConsole); |
|
74 ~CMainMenu(); |
|
75 |
|
76 void ExecComplete(TTelISVExampleType aDerivedType); |
|
77 void ExecNotify(TTelISVExampleType aDerivedType); |
|
78 |
|
79 private: |
|
80 CMainMenu(CConsoleBase& aConsole); |
|
81 void ConstructL(); |
|
82 |
|
83 void RunL(); // Handles Key presses |
|
84 void DoCancel(); |
|
85 |
|
86 /** |
|
87 Prints the correct menu with the correct options that can be selected. |
|
88 */ |
|
89 void PrintCorrectMenu(CTelephony::TCallCapsV1 callCapsV1); |
|
90 |
|
91 /** |
|
92 Retrieves the call capabilities of the currently active call ID. |
|
93 */ |
|
94 CTelephony::TCallCapsV1 GetCurrentDynamicCaps(); |
|
95 |
|
96 /** |
|
97 Places a request for input to the console. Reads the character input from the |
|
98 keypad/keyboard etc. |
|
99 */ |
|
100 void GetInput(); |
|
101 |
|
102 // Data |
|
103 private: |
|
104 |
|
105 // Owned active objects |
|
106 /** |
|
107 Active object which demonstrates the use of CTelephony::GetPhoneId() |
|
108 */ |
|
109 CISVAPIAsync* iPhoneId; |
|
110 /** |
|
111 Active object which demonstrates the use of CTelephony::GetCurrentNetworkInfo() |
|
112 */ |
|
113 CISVAPIAsync* iNetworkInfo; |
|
114 /** |
|
115 Active object which demonstrates the use of CTelephony::GetCurrentNetworkName() |
|
116 */ |
|
117 CISVAPIAsync* iNetworkName; |
|
118 /** |
|
119 Active object which demonstrates the use of CTelephony::GetOperatorName() |
|
120 */ |
|
121 CISVAPIAsync* iOperatorName; |
|
122 /** |
|
123 Active object which demonstrates the use of CTelephony::DialNewCall() |
|
124 */ |
|
125 CISVAPIAsync* iDialCall; |
|
126 /** |
|
127 Active object which demonstrates the use of CTelephony::Hangup() |
|
128 */ |
|
129 CISVAPIAsync* iHangup; |
|
130 /** |
|
131 Active object which demonstrates the use of CTelephony::Hold() |
|
132 */ |
|
133 CISVAPIAsync* iHold; |
|
134 /** |
|
135 Active object which demonstrates the use of CTelephony::Swap() |
|
136 */ |
|
137 CISVAPIAsync* iSwap; |
|
138 /** |
|
139 Active object which demonstrates the use of CTelephony::Resume() |
|
140 */ |
|
141 CISVAPIAsync* iResume; |
|
142 /** |
|
143 Active object which demonstrates the use of CTelephony::GetFlightMode() |
|
144 */ |
|
145 CISVAPIAsync* iFlightModeInfo; |
|
146 /** |
|
147 Active object which demonstrates the use of CTelephony::GetNetworkRegistrationStatus() |
|
148 */ |
|
149 CISVAPIAsync* iNetworkRegInfo; |
|
150 /** |
|
151 Active object which demonstrates the use of CTelephony::GetLineStatus() |
|
152 */ |
|
153 CISVAPIAsync* iLineStatus; |
|
154 /** |
|
155 Active object which demonstrates the use of CTelephony::GetLockInfo() |
|
156 */ |
|
157 CISVAPIAsync* iGetLockInfo; |
|
158 /** |
|
159 Active object which demonstrates the use of CTelephony::GetCallWaitingStatus() |
|
160 */ |
|
161 CISVAPIAsync* iCallWaiting; |
|
162 /** |
|
163 Active object which demonstrates the use of CTelephony::AnswerIncomingCall() |
|
164 */ |
|
165 CISVAPIAsync* iAnswerIncomingCall; |
|
166 /** |
|
167 Active object which demonstrates the use of CTelephony::GetCallStatus() |
|
168 */ |
|
169 CISVAPIAsync* iCallStatus; |
|
170 /** |
|
171 Active object which demonstrates the use of CTelephony::GetCallStatus() |
|
172 */ |
|
173 CISVAPIAsync* iCallStatus2; |
|
174 /** |
|
175 The call status of active call. |
|
176 */ |
|
177 CISVAPIAsync* iLastCallStatus; |
|
178 /** |
|
179 The call Id of the active call. |
|
180 */ |
|
181 CTelephony::TCallId iCallId; |
|
182 /** |
|
183 The call Id of another active call. |
|
184 */ |
|
185 CTelephony::TCallId iCallId2; |
|
186 /** |
|
187 Is the call waiting supplementary service provisioned. |
|
188 */ |
|
189 TBool iCallWaitingOn; |
|
190 /** |
|
191 Specifies if the phone is ringing or not. Used to set how the |
|
192 EAnswerIncomingCall iState is handled. |
|
193 */ |
|
194 TBool iRinging; |
|
195 /** |
|
196 Specifies that the active call is put on hold and then the ringing call |
|
197 should be answered. |
|
198 */ |
|
199 TBool iThenAnswer; |
|
200 |
|
201 }; |
|
202 |
|
203 #endif // __CMAINMENU_H__ |
|
204 |