|
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 #ifndef __CMAINMENU_H__ |
|
17 #define __CMAINMENU_H__ |
|
18 |
|
19 #include <e32base.h> |
|
20 #include <etel3rdparty.h> |
|
21 |
|
22 #include "CISVAPIAsync.h" |
|
23 #include "CBaseMenuAsync.h" |
|
24 |
|
25 // Active objects |
|
26 #include "CPhoneId.h" |
|
27 |
|
28 #include "CFlightModeInfo.h" |
|
29 #include "CCallBarringStatus.h" |
|
30 #include "CCallForwardingStatus.h" |
|
31 #include "CIdentityServiceStatus.h" |
|
32 #include "CCallWaitingStatus.h" |
|
33 |
|
34 #include "CLineStatus.h" |
|
35 #include "CCallStatus.h" |
|
36 #include "CAnswerIncomingCall.h" |
|
37 #include "CDummyAnswer.h" |
|
38 #include "CCallInfo.h" |
|
39 #include "CHangup.h" |
|
40 |
|
41 _LIT(KPhoneIdMsg, "Phone Id:\n"); |
|
42 _LIT(KCallForwardingStatusMsg, "Call Forwarding Status:\n"); |
|
43 _LIT(KCallBarringStatusMsg, "Call Barring Status:\n"); |
|
44 _LIT(KIdentityServiceStatusMsg, "Identity Service Status:\n"); |
|
45 _LIT(KCallWaitingStatusMsg, "Call Waiting Status:\n"); |
|
46 _LIT(KMenuMsg, "~* Answer Phone *~\nPress E to exit\n"); |
|
47 _LIT(KHangupMsg, "Press H to simulate a remote hangup\n"); |
|
48 _LIT(KAnyMsg, "Press Any key to simulate an incoming Call\n"); |
|
49 |
|
50 /** |
|
51 Provides the required functionality for the application to run correctly. Owns the |
|
52 required objects to make Etel 3rd party calls required by the application. |
|
53 */ |
|
54 class CMainMenu : public CBaseMenuAsync |
|
55 { |
|
56 |
|
57 // Methods |
|
58 public: |
|
59 static CMainMenu* NewLC(CConsoleBase& aConsole); |
|
60 ~CMainMenu(); |
|
61 |
|
62 void ExecComplete(TTelISVExampleType aDerivedType); |
|
63 void ExecNotify(TTelISVExampleType aDerivedType); |
|
64 |
|
65 private: |
|
66 CMainMenu(CConsoleBase& aConsole); |
|
67 void ConstructL(); |
|
68 |
|
69 void RunL(); // Handles Key presses |
|
70 void DoCancel(); |
|
71 |
|
72 /** |
|
73 Prints message if you have recieved messages. Also alerts if people have |
|
74 called and left no message. |
|
75 */ |
|
76 void CallsCount(); |
|
77 |
|
78 private: |
|
79 // Owned active objects |
|
80 /** |
|
81 Active object which demonstrates the use of CTelephony::GetPhoneId(). |
|
82 */ |
|
83 CISVAPIAsync* iPhoneId; |
|
84 /** |
|
85 Active object which demonstrates the use of CTelephony::GetIdentityServiceStatus(). |
|
86 */ |
|
87 CISVAPIAsync* iIdentityService; |
|
88 /** |
|
89 Active object which demonstrates the use of CTelephony::GetCallForwardingStatus(). |
|
90 */ |
|
91 CISVAPIAsync* iCallForwarding; |
|
92 /** |
|
93 Active object which demonstrates the use of CTelephony::GetCallBarringStatus(). |
|
94 */ |
|
95 CISVAPIAsync* iCallBarring; |
|
96 /** |
|
97 Active object which demonstrates the use of CTelephony::GetCallWaitingStatus(). |
|
98 */ |
|
99 CISVAPIAsync* iCallWaiting; |
|
100 /** |
|
101 Active object which demonstrates the use of CTelephony::GetFlightMode(). |
|
102 */ |
|
103 CISVAPIAsync* iFlightModeInfo; |
|
104 /** |
|
105 Active object which demonstrates the use of CTelephony::GetLineStatus(). |
|
106 */ |
|
107 CISVAPIAsync* iLineStatus; |
|
108 /** |
|
109 Active object which demonstrates the use of CTelephony::GetCallStatus(). |
|
110 */ |
|
111 CISVAPIAsync* iCallStatus; |
|
112 /** |
|
113 Active object which demonstrates the use of CTelephony::AnswerIncomingCall(). |
|
114 */ |
|
115 CISVAPIAsync* iAnswerIncomingCall; |
|
116 /** |
|
117 Active object which demonstrates the use of CTelephony::Hangup(). |
|
118 */ |
|
119 CISVAPIAsync* iHangup; |
|
120 /** |
|
121 Owned CDummyAnswer object that simulates answering a call. |
|
122 */ |
|
123 CDummyAnswer* iDummyAnswer; |
|
124 /** |
|
125 Active object which demonstrates the use of CTelephony::GetCallInfo(). |
|
126 */ |
|
127 CISVAPIAsync* iCallInfo; |
|
128 /** |
|
129 The call ID of the currently active call. |
|
130 */ |
|
131 CTelephony::TCallId iCallId; |
|
132 /** |
|
133 Specifies if this is the first run of the application so initialisation |
|
134 data is only set once. |
|
135 */ |
|
136 TInt iCount; |
|
137 /** |
|
138 Counts how many messages have been received. |
|
139 */ |
|
140 TInt iMessages; |
|
141 /** |
|
142 Counts the number of recieved calls regardless of whether they left messages or |
|
143 not. |
|
144 */ |
|
145 TInt iRecievedCalls; |
|
146 /** |
|
147 Stores whether the call waiting supplementary service is provisioned. |
|
148 */ |
|
149 TBool iCallWaitingOn; |
|
150 }; |
|
151 |
|
152 #endif // __CMAINMENU_H__ |