37
|
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 CPhoneStateIncomingVoIP class.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
// INCLUDES
|
|
20 |
#include <mpeengineinfo.h>
|
|
21 |
#include "cphonestateincomingvoip.h"
|
|
22 |
#include "phonelogger.h"
|
|
23 |
#include "cphonecustomizationvoip.h"
|
|
24 |
#include "phonerssbase.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 |
CPhoneStateIncomingVoIP::CPhoneStateIncomingVoIP(
|
|
33 |
MPhoneStateMachine& aStateMachine,
|
|
34 |
MPhoneViewCommandHandle& aViewCommandHandle,
|
|
35 |
MPhoneCustomization& aPhoneCustomization ) :
|
|
36 |
CPhoneIncoming( &aStateMachine, &aViewCommandHandle, &aPhoneCustomization )
|
|
37 |
{
|
|
38 |
}
|
|
39 |
|
|
40 |
|
|
41 |
// -----------------------------------------------------------
|
|
42 |
// CPhoneStateIncomingVoIP::~CPhoneStateIncomingVoIP()
|
|
43 |
// Destructor
|
|
44 |
// (other items were commented in a header).
|
|
45 |
// -----------------------------------------------------------
|
|
46 |
|
|
47 |
CPhoneStateIncomingVoIP::~CPhoneStateIncomingVoIP()
|
|
48 |
{
|
|
49 |
}
|
|
50 |
|
|
51 |
|
|
52 |
// -----------------------------------------------------------
|
|
53 |
// CPhoneStateIncomingVoIP::ConstructL()
|
|
54 |
// Constructor
|
|
55 |
// (other items were commented in a header).
|
|
56 |
// -----------------------------------------------------------
|
|
57 |
//
|
|
58 |
void CPhoneStateIncomingVoIP::ConstructL()
|
|
59 |
{
|
|
60 |
__LOGMETHODSTARTEND(
|
|
61 |
PhoneUIVoIPExtension, "CPhoneStateIncomingVoIP::ConstructL()");
|
|
62 |
|
|
63 |
CPhoneIncoming::ConstructL();
|
|
64 |
}
|
|
65 |
|
|
66 |
|
|
67 |
// -----------------------------------------------------------
|
|
68 |
// CPhoneStateIncomingVoIP::NewL()
|
|
69 |
// Constructor
|
|
70 |
// (other items were commented in a header).
|
|
71 |
// -----------------------------------------------------------
|
|
72 |
//
|
|
73 |
CPhoneStateIncomingVoIP* CPhoneStateIncomingVoIP::NewL(
|
|
74 |
MPhoneStateMachine& aStateMachine,
|
|
75 |
MPhoneViewCommandHandle& aViewCommandHandle,
|
|
76 |
MPhoneCustomization& aPhoneCustomization )
|
|
77 |
{
|
|
78 |
CPhoneStateIncomingVoIP* self = new (ELeave) CPhoneStateIncomingVoIP(
|
|
79 |
aStateMachine, aViewCommandHandle, aPhoneCustomization );
|
|
80 |
|
|
81 |
CleanupStack::PushL( self );
|
|
82 |
self->ConstructL();
|
|
83 |
CleanupStack::Pop( self );
|
|
84 |
|
|
85 |
return self;
|
|
86 |
}
|
|
87 |
|
|
88 |
|
|
89 |
// -----------------------------------------------------------
|
|
90 |
// CPhoneStateIncomingVoIP::HandleLongHashL
|
|
91 |
// -----------------------------------------------------------
|
|
92 |
//
|
|
93 |
void CPhoneStateIncomingVoIP::HandleLongHashL()
|
|
94 |
{
|
|
95 |
__LOGMETHODSTARTEND( PhoneUIVoIPExtension,
|
|
96 |
"CPhoneStateIncomingVoIP::HandleLongHashL( ) ");
|
|
97 |
|
|
98 |
CPhoneState::HandleLongHashL();
|
|
99 |
}
|
|
100 |
|
|
101 |
|
|
102 |
// -----------------------------------------------------------
|
|
103 |
// CPhoneStateIncomingVoIP::HandleAudioPlayStoppedL
|
|
104 |
// -----------------------------------------------------------
|
|
105 |
//
|
|
106 |
void CPhoneStateIncomingVoIP::HandleAudioPlayStoppedL()
|
|
107 |
{
|
|
108 |
__LOGMETHODSTARTEND(EPhoneControl,
|
|
109 |
"CPhoneStateIncomingVoIP::HandleAudioPlayStoppedL()" );
|
|
110 |
|
|
111 |
// Update the CBA
|
|
112 |
if ( iStateMachine->PhoneEngineInfo()->
|
|
113 |
CallType( iRingingCallId ) == EPECallTypeVoIP )
|
|
114 |
{
|
|
115 |
TInt resourceId = EPhoneCallHandlingIncomingRejectCBA;
|
|
116 |
|
|
117 |
if ( IsNumberEntryVisibleL() && !IsOnScreenDialerSupported() )
|
|
118 |
{
|
|
119 |
resourceId = EPhoneNumberAcqCBA;
|
|
120 |
}
|
|
121 |
|
|
122 |
iCbaManager->SetCbaL( resourceId );
|
|
123 |
}
|
|
124 |
else
|
|
125 |
{
|
|
126 |
CPhoneIncoming::HandleAudioPlayStoppedL();
|
|
127 |
}
|
|
128 |
}
|
|
129 |
|
|
130 |
// End of File
|