|
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: Implementation of CPhoneStateAlertingVoIP class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDES |
|
20 #include <bmbubblemanager.h> |
|
21 #include <mpeengineinfo.h> |
|
22 |
|
23 #include "cphonestatealertingvoip.h" |
|
24 #include "phonelogger.h" |
|
25 #include "mphonestatemachine.h" |
|
26 |
|
27 // ================= MEMBER FUNCTIONS ======================= |
|
28 |
|
29 // C++ default constructor can NOT contain any code, that |
|
30 // might leave. |
|
31 // |
|
32 CPhoneStateAlertingVoIP::CPhoneStateAlertingVoIP( |
|
33 MPhoneStateMachine& aStateMachine, |
|
34 MPhoneViewCommandHandle& aViewCommandHandle, |
|
35 MPhoneCustomization& aPhoneCustomization ) : |
|
36 CPhoneAlerting( &aStateMachine, &aViewCommandHandle, &aPhoneCustomization ) |
|
37 { |
|
38 |
|
39 } |
|
40 |
|
41 // ----------------------------------------------------------- |
|
42 // CPhoneStateAlertingVoIP::~CPhoneStateAlertingVoIP() |
|
43 // Destructor |
|
44 // (other items were commented in a header). |
|
45 // ----------------------------------------------------------- |
|
46 |
|
47 CPhoneStateAlertingVoIP::~CPhoneStateAlertingVoIP() |
|
48 { |
|
49 } |
|
50 |
|
51 // ----------------------------------------------------------- |
|
52 // CPhoneStateAlertingVoIP::ConstructL() |
|
53 // Constructor |
|
54 // (other items were commented in a header). |
|
55 // ----------------------------------------------------------- |
|
56 // |
|
57 void CPhoneStateAlertingVoIP::ConstructL() |
|
58 { |
|
59 __LOGMETHODSTARTEND( PhoneUIVoIPExtension, "CPhoneStateAlertingVoIP::ConstructL()"); |
|
60 CPhoneAlerting::ConstructL(); |
|
61 } |
|
62 |
|
63 // ----------------------------------------------------------- |
|
64 // CPhoneStateAlertingVoIP::NewL() |
|
65 // Constructor |
|
66 // (other items were commented in a header). |
|
67 // ----------------------------------------------------------- |
|
68 // |
|
69 CPhoneStateAlertingVoIP* CPhoneStateAlertingVoIP::NewL( |
|
70 MPhoneStateMachine& aStateMachine, |
|
71 MPhoneViewCommandHandle& aViewCommandHandle, |
|
72 MPhoneCustomization& aPhoneCustomization ) |
|
73 { |
|
74 CPhoneStateAlertingVoIP* self = new (ELeave) |
|
75 CPhoneStateAlertingVoIP( aStateMachine, aViewCommandHandle, aPhoneCustomization ); |
|
76 |
|
77 CleanupStack::PushL( self ); |
|
78 self->ConstructL(); |
|
79 CleanupStack::Pop( self ); |
|
80 |
|
81 return self; |
|
82 } |
|
83 |
|
84 // ----------------------------------------------------------- |
|
85 // CPhoneStateAlertingVoIP::HandlePhoneEngineMessageL |
|
86 // ----------------------------------------------------------- |
|
87 // |
|
88 void CPhoneStateAlertingVoIP::HandlePhoneEngineMessageL( |
|
89 const TInt aMessage, |
|
90 TInt aCallId ) |
|
91 { |
|
92 __LOGMETHODSTARTEND( PhoneUIVoIPExtension, |
|
93 "CPhoneStateAlertingVoIP::HandlePhoneEngineMessageL() "); |
|
94 switch ( aMessage ) |
|
95 { |
|
96 case MEngineMonitor::EPEMessageConnected: |
|
97 HandleConnectedL( aCallId ); |
|
98 break; |
|
99 |
|
100 default: |
|
101 CPhoneAlerting::HandlePhoneEngineMessageL( |
|
102 aMessage, aCallId ); |
|
103 break; |
|
104 } |
|
105 } |
|
106 |
|
107 // ----------------------------------------------------------- |
|
108 // CPhoneStateAlertingVoIP::HandleConnectedL |
|
109 // ----------------------------------------------------------- |
|
110 // |
|
111 void CPhoneStateAlertingVoIP::HandleConnectedL( TInt aCallId ) |
|
112 { |
|
113 __LOGMETHODSTARTEND( PhoneUIVoIPExtension, |
|
114 "CPhoneStateAlertingVoIP::HandleConnectedL() "); |
|
115 |
|
116 if( iStateMachine->PhoneEngineInfo()->CallType( aCallId ) == EPECallTypeVoIP ) |
|
117 { |
|
118 SetCallHeaderType( CBubbleManager::EVoIPCall ); |
|
119 } |
|
120 |
|
121 CPhoneAlerting::HandleConnectedL( aCallId ); |
|
122 } |
|
123 |
|
124 // End of File |