37
|
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 |
/**
|
|
103 |
* Audio play stopped handling
|
|
104 |
*/
|
|
105 |
IMPORT_C virtual void HandleAudioPlayStoppedL();
|
|
106 |
|
|
107 |
private: // From CPhoneState
|
|
108 |
|
|
109 |
/**
|
|
110 |
* A message handling function for EPEMessageConnected
|
|
111 |
* @param aCallId: the call id of the call
|
|
112 |
*/
|
|
113 |
void HandleConnectedL( TInt aCallId );
|
|
114 |
|
|
115 |
/**
|
|
116 |
* A message handling function for EPEMessageIdle
|
|
117 |
* @param aCallId: the call id of the call
|
|
118 |
*/
|
|
119 |
void HandleIdleL( TInt aCallId );
|
|
120 |
|
|
121 |
/**
|
|
122 |
* Handles Send key or command, when pressed from the dialer
|
|
123 |
*/
|
|
124 |
void HandleSendL();
|
|
125 |
|
|
126 |
/**
|
|
127 |
* Open soft reject message editor
|
|
128 |
*/
|
|
129 |
void OpenSoftRejectMessageL();
|
|
130 |
|
|
131 |
/**
|
|
132 |
* Answer the MT call
|
|
133 |
*/
|
|
134 |
void AnswerCallL();
|
|
135 |
|
|
136 |
/**
|
|
137 |
* Disconnects the waiting call
|
|
138 |
*/
|
|
139 |
void DisconnectWaitingCallL();
|
|
140 |
|
|
141 |
/**
|
|
142 |
* Gets resource to use when number entry is open
|
|
143 |
* @return resource id
|
|
144 |
*/
|
|
145 |
TInt GetNumberEntryVisibleMenuBar();
|
|
146 |
|
|
147 |
/**
|
|
148 |
* Gets resource to use when number entry is closed
|
|
149 |
* @return resource id
|
|
150 |
*/
|
|
151 |
TInt GetNumberEntryNotVisibleMenuBar();
|
|
152 |
|
|
153 |
/**
|
|
154 |
* Updates incoming CBA's
|
|
155 |
*/
|
|
156 |
void UpdateInCallCbaL( TInt aCallId );
|
|
157 |
|
|
158 |
/**
|
|
159 |
* Show disconnected note
|
|
160 |
*/
|
|
161 |
void ShowDisconnectingL( TInt aCallId );
|
|
162 |
|
|
163 |
/**
|
|
164 |
* Update remote data and label to the call header.
|
|
165 |
* @param aCallId - Call Id.
|
|
166 |
* @param aCallHeaderData - Call header parameters where modifications
|
|
167 |
* are made.
|
|
168 |
*/
|
|
169 |
void UpdateRemoteInfoDataAndLabelL(
|
|
170 |
TInt aCallId,
|
|
171 |
TPhoneCmdParamCallHeaderData aCallHeaderParam );
|
|
172 |
|
|
173 |
protected:
|
|
174 |
// call id of ringing call
|
|
175 |
TInt iRingingCallId;
|
|
176 |
|
|
177 |
};
|
|
178 |
|
|
179 |
#endif // CPHONESTATEINCOMING
|
|
180 |
|
|
181 |
// End of File
|