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 |
* Single And Waiting state implementation.
|
|
16 |
*
|
|
17 |
*/
|
|
18 |
|
|
19 |
|
|
20 |
#ifndef CPHONESINGLEANDWAITING_H
|
|
21 |
#define CPHONESINGLEANDWAITING_H
|
|
22 |
|
|
23 |
// INCLUDES
|
|
24 |
#include "cphonegsmincall.h"
|
|
25 |
|
|
26 |
// FORWARD DECLARATIONS
|
|
27 |
|
|
28 |
// CLASS DECLARATION
|
|
29 |
/**
|
|
30 |
* Incoming call at single state implementation.
|
|
31 |
*/
|
|
32 |
class CPhoneSingleAndWaiting : public CPhoneGsmInCall
|
|
33 |
{
|
|
34 |
public:
|
|
35 |
|
|
36 |
/**
|
|
37 |
* Destructor.
|
|
38 |
*/
|
|
39 |
virtual ~CPhoneSingleAndWaiting();
|
|
40 |
|
|
41 |
/**
|
|
42 |
* Creates the Single And Waiting state class
|
|
43 |
* @param aStateMachine: a container of state objects
|
|
44 |
* @param aViewCommandHandle: handle to the PhoneUIView
|
|
45 |
* @return an instance of class CPhoneStateIncoming
|
|
46 |
*/
|
|
47 |
static CPhoneSingleAndWaiting* NewL(
|
|
48 |
MPhoneStateMachine* aStateMachine,
|
|
49 |
MPhoneViewCommandHandle* aViewCommandHandle,
|
|
50 |
MPhoneCustomization* aPhoneCustomization );
|
|
51 |
|
|
52 |
/**
|
|
53 |
* A message handling function for Phone Engine messages
|
|
54 |
* @param aMessage Message from Phone Engine
|
|
55 |
* @param aCallId Call id the message concerns
|
|
56 |
*/
|
|
57 |
virtual void HandlePhoneEngineMessageL(
|
|
58 |
const TInt aMessage,
|
|
59 |
TInt aCallId );
|
|
60 |
|
|
61 |
/**
|
|
62 |
* Handles user selected UI commands.
|
|
63 |
* @param aCommand - selected command
|
|
64 |
*/
|
|
65 |
TBool HandleCommandL( TInt aCommand );
|
|
66 |
|
|
67 |
protected:
|
|
68 |
|
|
69 |
/**
|
|
70 |
* By default constructor is private.
|
|
71 |
*/
|
|
72 |
CPhoneSingleAndWaiting(
|
|
73 |
MPhoneStateMachine* aStateMachine,
|
|
74 |
MPhoneViewCommandHandle* aViewCommandHandle,
|
|
75 |
MPhoneCustomization* aPhoneCustomization );
|
|
76 |
|
|
77 |
/**
|
|
78 |
* HandleError
|
|
79 |
* Implements error handling framework
|
|
80 |
* @param aErrorInfo: the error info
|
|
81 |
*/
|
|
82 |
IMPORT_C virtual void HandleErrorL(
|
|
83 |
const TPEErrorInfo& aErrorInfo );
|
|
84 |
|
|
85 |
/**
|
|
86 |
* ConstructL()
|
|
87 |
*/
|
|
88 |
virtual void ConstructL();
|
|
89 |
|
|
90 |
/**
|
|
91 |
* Handles key messages.
|
|
92 |
* @param aMessage - key event message
|
|
93 |
* @param aScanCode - standard Symbian scan code
|
|
94 |
*/
|
|
95 |
virtual void HandleKeyMessageL(
|
|
96 |
TPhoneKeyEventMessages aMessage,
|
|
97 |
TKeyCode aCode );
|
|
98 |
|
|
99 |
virtual void HandleKeyEventL(
|
|
100 |
const TKeyEvent& aKeyEvent,
|
|
101 |
TEventCode aEventCode );
|
|
102 |
|
|
103 |
/**
|
|
104 |
* Sets correct in call CBAs.
|
|
105 |
*/
|
|
106 |
virtual void UpdateInCallCbaL();
|
|
107 |
|
|
108 |
|
|
109 |
private:
|
|
110 |
|
|
111 |
/**
|
|
112 |
* Unholds the call.
|
|
113 |
* @param aCallId - call id to unhold
|
|
114 |
*/
|
|
115 |
void HandleUnholdL( TInt aCallId );
|
|
116 |
|
|
117 |
/**
|
|
118 |
* Performs a state transition to Two Singles.
|
|
119 |
* @param aCallId - call id that got connected
|
|
120 |
*/
|
|
121 |
void MakeStateTransitionToTwoSinglesL( TInt aCallId );
|
|
122 |
|
|
123 |
/**
|
|
124 |
* Handles received idle message from Phone Engine.
|
|
125 |
* @param aCallId - call id that received the event
|
|
126 |
*/
|
|
127 |
void HandleIdleL( TInt aCallId );
|
|
128 |
|
|
129 |
/**
|
|
130 |
* Handles received held message from Phone Engine.
|
|
131 |
* @param aCallId - call id that received the event
|
|
132 |
*/
|
|
133 |
void HandleHeldL( TInt aCallId );
|
|
134 |
|
|
135 |
/**
|
|
136 |
* Handles received connected message from Phone Engine.
|
|
137 |
* @param aCallId - call id that received the event
|
|
138 |
*/
|
|
139 |
void HandleConnectedL( TInt aCallId );
|
|
140 |
|
|
141 |
/**
|
|
142 |
* Handles received dialing message from Phone Engine.
|
|
143 |
* @param aCallId - call id that received the event
|
|
144 |
*/
|
|
145 |
void HandleDiallingL( TInt aCallId );
|
|
146 |
|
|
147 |
/**
|
|
148 |
* Sets up all call setup to display.
|
|
149 |
* @param aCallId - call id to set up
|
|
150 |
*/
|
|
151 |
void DisplayCallSetupL( TInt aCallId );
|
|
152 |
|
|
153 |
/**
|
|
154 |
* Handles received EPEMessageDisconnecting message from Phone Engine.
|
|
155 |
* @param aCallId: the call id of the call
|
|
156 |
*/
|
|
157 |
void HandleDisconnectingL( TInt aCallId );
|
|
158 |
|
|
159 |
/**
|
|
160 |
* Handles received EPhoneCmdUpdateUiControls command.
|
|
161 |
*/
|
|
162 |
void UpdateUiControlsL();
|
|
163 |
|
|
164 |
private: //Data
|
|
165 |
|
|
166 |
// Store single call id
|
|
167 |
TInt iSingleCallId;
|
|
168 |
|
|
169 |
};
|
|
170 |
|
|
171 |
#endif // CPHONESINGLEANDWAITING_H
|
|
172 |
|
|
173 |
// End of File
|