|
1 /* |
|
2 * Copyright (c) 2005 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: |
|
15 * Incoming state implementation. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef CPHONESTATEINCOMING |
|
21 #define CPHONESTATEINCOMING |
|
22 |
|
23 // INCLUDES |
|
24 #include "cphonestate.h" |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class TPhoneCmdParamCallStateData; |
|
28 |
|
29 // CLASS DECLARATION |
|
30 /** |
|
31 * Incoming state |
|
32 */ |
|
33 class CPhoneStateIncoming : public CPhoneState |
|
34 { |
|
35 public: |
|
36 |
|
37 /** |
|
38 * Destructor. |
|
39 */ |
|
40 IMPORT_C virtual ~CPhoneStateIncoming(); |
|
41 |
|
42 /** |
|
43 * Creates the Incoming state class |
|
44 * @param aStateMachine: a container of state objects |
|
45 * @param aViewCommandHandle: handle to the PhoneUIView |
|
46 * @return an instance of class CPhoneStateIncoming |
|
47 */ |
|
48 static CPhoneStateIncoming* NewL( |
|
49 MPhoneStateMachine* aStateMachine, |
|
50 MPhoneViewCommandHandle* aViewCommandHandle, |
|
51 MPhoneCustomization* aPhoneCustomization ); |
|
52 |
|
53 IMPORT_C void HandleKeyMessageL( |
|
54 TPhoneKeyEventMessages aMessage, |
|
55 TKeyCode aCode ); |
|
56 |
|
57 IMPORT_C void HandleKeyEventL( |
|
58 const TKeyEvent& aKeyEvent, |
|
59 TEventCode aEventCode ); |
|
60 |
|
61 IMPORT_C virtual void HandleKeyPressDurationL( |
|
62 TKeyCode aCode, |
|
63 TTimeIntervalMicroSeconds aKeyPressDuration ); |
|
64 |
|
65 /** |
|
66 * A message handling function for Phone Engine messages |
|
67 * @param aMessage Message from Phone Engine |
|
68 * @param aCallId Call id the message concerns |
|
69 */ |
|
70 IMPORT_C virtual void HandlePhoneEngineMessageL( |
|
71 const TInt aMessage, |
|
72 TInt aCallId ); |
|
73 |
|
74 IMPORT_C TBool HandleCommandL( TInt aCommand ); |
|
75 |
|
76 /** |
|
77 * Handle state-specific behaviour when number entry is cleared |
|
78 */ |
|
79 IMPORT_C void HandleNumberEntryClearedL(); |
|
80 |
|
81 /** |
|
82 * Handle keylock state change events |
|
83 */ |
|
84 IMPORT_C void HandleKeyLockEnabled( TBool aKeylockEnabled ); |
|
85 |
|
86 protected: |
|
87 |
|
88 /** |
|
89 * By default EPOC constructor is private. |
|
90 */ |
|
91 IMPORT_C CPhoneStateIncoming( |
|
92 MPhoneStateMachine* aStateMachine, |
|
93 MPhoneViewCommandHandle* aViewCommandHandle, |
|
94 MPhoneCustomization* aPhoneCustomization ); |
|
95 |
|
96 /** |
|
97 * ConstructL() |
|
98 */ |
|
99 IMPORT_C virtual void ConstructL(); |
|
100 |
|
101 /** |
|
102 * From CAknAppUi, initialise a menupane (dynamic). |
|
103 * |
|
104 * @param aResourceId It is the resource id for the pane. |
|
105 * @param aMenuPane It is the menu pane corresponding to the resource. |
|
106 */ |
|
107 IMPORT_C virtual void DynInitMenuPaneL( |
|
108 TInt aResourceId, |
|
109 CEikMenuPane* aMenuPane ); |
|
110 |
|
111 /** |
|
112 * Audio play stopped handling |
|
113 */ |
|
114 IMPORT_C virtual void HandleAudioPlayStoppedL(); |
|
115 |
|
116 private: // From CPhoneState |
|
117 |
|
118 /** |
|
119 * A message handling function for EPEMessageConnected |
|
120 * @param aCallId: the call id of the call |
|
121 */ |
|
122 void HandleConnectedL( TInt aCallId ); |
|
123 |
|
124 /** |
|
125 * A message handling function for EPEMessageIdle |
|
126 * @param aCallId: the call id of the call |
|
127 */ |
|
128 void HandleIdleL( TInt aCallId ); |
|
129 |
|
130 /** |
|
131 * Handles Send key or command, when pressed from the dialer |
|
132 */ |
|
133 void HandleSendL(); |
|
134 |
|
135 /** |
|
136 * Open soft reject message editor |
|
137 */ |
|
138 void OpenSoftRejectMessageEditorL(); |
|
139 |
|
140 /** |
|
141 * Indicator if soft reject message editor is displayed |
|
142 */ |
|
143 TBool SoftRejectMessageEditorIsDisplayedL() const; |
|
144 |
|
145 /** |
|
146 * Open menu bar |
|
147 */ |
|
148 void OpenMenuBarL(); |
|
149 |
|
150 /** |
|
151 * Answer the MT call |
|
152 */ |
|
153 void AnswerCallL(); |
|
154 |
|
155 /** |
|
156 * Disconnects the waiting call |
|
157 */ |
|
158 void DisconnectWaitingCallL(); |
|
159 |
|
160 /** |
|
161 * Gets resource to use when number entry is open |
|
162 * @return resource id |
|
163 */ |
|
164 TInt GetNumberEntryVisibleMenuBar(); |
|
165 |
|
166 /** |
|
167 * Gets resource to use when number entry is closed |
|
168 * @return resource id |
|
169 */ |
|
170 TInt GetNumberEntryNotVisibleMenuBar(); |
|
171 |
|
172 /** |
|
173 * Updates incoming CBA's |
|
174 */ |
|
175 void UpdateInCallCbaL( TInt aCallId ); |
|
176 |
|
177 /** |
|
178 * Show disconnected note |
|
179 */ |
|
180 void ShowDisconnectingL( TInt aCallId ); |
|
181 |
|
182 /** |
|
183 * Update remote data and label to the call header. |
|
184 * @param aCallId - Call Id. |
|
185 * @param aCallHeaderData - Call header parameters where modifications |
|
186 * are made. |
|
187 */ |
|
188 void UpdateRemoteInfoDataAndLabelL( |
|
189 TInt aCallId, |
|
190 TPhoneCmdParamCallHeaderData aCallHeaderParam ); |
|
191 |
|
192 protected: |
|
193 // call id of ringing call |
|
194 TInt iRingingCallId; |
|
195 |
|
196 }; |
|
197 |
|
198 #endif // CPHONESTATEINCOMING |
|
199 |
|
200 // End of File |