|
1 /* |
|
2 * Copyright (c) 2007 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 * VoIP-specific single state implementation. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef CPHONESTATESINGLEVOIP_H |
|
21 #define CPHONESTATESINGLEVOIP_H |
|
22 |
|
23 // INCLUDES |
|
24 #include "cphonesinglecall.h" |
|
25 |
|
26 // CLASS DECLARATION |
|
27 class CPhoneStateUtilsVoip; |
|
28 |
|
29 /** |
|
30 * VoIP-specific single state |
|
31 */ |
|
32 NONSHARABLE_CLASS( CPhoneStateSingleVoIP ): public CPhoneSingleCall |
|
33 { |
|
34 public: |
|
35 |
|
36 /** |
|
37 * Destructor. |
|
38 */ |
|
39 virtual ~CPhoneStateSingleVoIP(); |
|
40 |
|
41 /** |
|
42 * Creates the VoIP specific Single state class. |
|
43 * @param aStateMachine A state machine. |
|
44 * @param aViewCommandHandle Handle to the PhoneUIView. |
|
45 * @param aCustomization Handle to the phone customization. |
|
46 * @return An instance of class CPhoneStateSingleVoIP. |
|
47 */ |
|
48 static CPhoneStateSingleVoIP* NewL( |
|
49 MPhoneStateMachine& aStateMachine, |
|
50 MPhoneViewCommandHandle& aViewCommandHandle, |
|
51 MPhoneCustomization& aCustomization ); |
|
52 |
|
53 /** |
|
54 * A message handling function for Phone Engine messages |
|
55 * @param aMessage Message from Phone Engine |
|
56 * @param aCallId Call id the message concerns |
|
57 */ |
|
58 void HandlePhoneEngineMessageL( |
|
59 const TInt aMessage, |
|
60 TInt aCallId ); |
|
61 |
|
62 /** |
|
63 * Handles commands. |
|
64 * @param aCommand It is the code of the command to be handled. |
|
65 * @returns boolean value was the command handled by the state |
|
66 * (ETrue) or not (EFalse) |
|
67 */ |
|
68 TBool HandleCommandL( TInt aCommand ); |
|
69 |
|
70 /** |
|
71 * Handle processed (short, long) key messages from the key event |
|
72 * handler |
|
73 * @param aMessage a key message |
|
74 * @param aCode key event code |
|
75 */ |
|
76 void HandleKeyMessageL( TPhoneKeyEventMessages aMessage, |
|
77 TKeyCode aKeyCode ); |
|
78 |
|
79 protected: |
|
80 |
|
81 /** |
|
82 * By default EPOC constructor is private. |
|
83 */ |
|
84 CPhoneStateSingleVoIP( |
|
85 MPhoneStateMachine& aStateMachine, |
|
86 MPhoneViewCommandHandle& aViewCommandHandle, |
|
87 MPhoneCustomization& aCustomization ); |
|
88 |
|
89 /** |
|
90 * ConstructL() |
|
91 */ |
|
92 virtual void ConstructL(); |
|
93 |
|
94 private: |
|
95 |
|
96 /** |
|
97 * Start calling |
|
98 */ |
|
99 void StartCallingL(); |
|
100 |
|
101 /** |
|
102 * Launches unattended call transfer acceptance query dialog. |
|
103 */ |
|
104 void LaunchUnattendedTransferAcceptanceQueryL(); |
|
105 |
|
106 /** |
|
107 * Resolves dialog text to be shown in unattended call transfer query |
|
108 * dialog. |
|
109 * @param aQueryText On return contains resolved query text. |
|
110 */ |
|
111 void ResolveUnattendedTransferAcceptanceQueryDialogTextL( |
|
112 RBuf& aQueryText ) const; |
|
113 |
|
114 /** |
|
115 * Handles user response to unattended transfer request. |
|
116 * @param aRequestAccepted ETrue if request is accepted, |
|
117 * EFalse otherwise. |
|
118 */ |
|
119 void HandleUnattendedTransferRequestResponseL( TBool aRequestAccepted ); |
|
120 |
|
121 /** |
|
122 * Returns VoIP state utils. |
|
123 * @return VoIP state utils. |
|
124 */ |
|
125 CPhoneStateUtilsVoip& StateUtils(); |
|
126 }; |
|
127 |
|
128 #endif // CPHONESTATESINGLEVOIP_H |
|
129 |
|
130 // End of File |