phoneapp/phoneuicontrol/src/cphonestate.cpp
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 14 Sep 2010 21:18:17 +0300
branchRCL_3
changeset 69 8baf28733c3d
parent 62 5266b1f337bd
child 81 c26cc2a7c548
permissions -rw-r--r--
Revision: 201033 Kit: 201035
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     1
/*
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
     2
* Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     3
* All rights reserved.
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     4
* This component and the accompanying materials are made available
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     6
* which accompanies this distribution, and is available
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     8
*
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     9
* Initial Contributors:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    11
*
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    12
* Contributors:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    13
*
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    14
* Description: Implementation of CPhoneState class.
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    15
*
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    16
*/
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    17
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    18
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    19
// INCLUDE FILES
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    20
#include <avkon.rsg>
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    21
#include <bautils.h>
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    22
#include <eikenv.h>
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    23
#include <StringLoader.h>
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    24
#include <pevirtualengine.h>
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    25
#include <mpeclientinformation.h>
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    26
#include <mpeengineinfo.h>
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    27
#include <cpephonemodelif.h>
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    28
#include <featmgr.h>
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    29
#include <rconnmon.h>
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    30
#include <Profile.hrh>
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    31
#include <PUAcodes.hrh>
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    32
#include <AknUtils.h>
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    33
#include <telephonyvariant.hrh>
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    34
#include <aknsoundsystem.h>
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
    35
#include <cphcntprofileengine.h>
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    36
#include <wlaninternalpskeys.h>
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    37
#include <btengdomainpskeys.h>
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    38
#include <btengdomaincrkeys.h>
9
8871b09be73b Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 0
diff changeset
    39
#include <settingsinternalcrkeys.h>
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    40
#include <starterclient.h>
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
    41
#include <RSSSettings.h>
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    42
#include <UikonInternalPSKeys.h>
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    43
#include <telephonydomainpstypes.h>
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    44
#include <telinformationpskeys.h>
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
    45
#include <activeidle2domainpskeys.h>
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    46
#include <coreapplicationuisdomainpskeys.h>
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    47
#include <mccecall.h>
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    48
#include <ccpdefs.h>
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    49
#include <LogsDomainCRKeys.h>
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    50
#include <spsettings.h>
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
    51
#include <ScreensaverInternalPSKeys.h>
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    52
#include <startupdomainpskeys.h>
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    53
#include <MediatorDomainUIDs.h>
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    54
#include <videotelcontrolmediatorapi.h>
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    55
#include <textresolver.h>
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    56
#include <phoneappvoipcommands.hrh>
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    57
#include <hwrmdomainpskeys.h>
31
ba54057fe027 Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
    58
#include <hal.h>
69
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
    59
#include <phoneui.rsg>
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    60
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    61
#include "phoneui.pan"
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    62
#include "cphonestate.h"
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    63
#include "mphonestatemachine.h"
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    64
#include "mphoneviewcommandhandle.h"
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    65
#include "tphonecmdparamboolean.h"
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    66
#include "tphonecmdparaminteger.h"
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    67
#include "tphonecmdparamkeyevent.h"
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    68
#include "tphonecmdparamdynmenu.h"
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    69
#include "tphonecmdparamcallheaderdata.h"
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    70
#include "tphonecmdparamincallindicatordata.h"
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    71
#include "tphonecmdparamnote.h"
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
    72
#include "tphonecmdparamKeycapture.h"
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    73
#include "tphonecmdparamglobalnote.h"
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    74
#include "tphonecmdparamquery.h"
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    75
#include "tphonecmdparamstring.h"
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
    76
#include "tphonecmdparammessageeditor.h"
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    77
#include "tphonecmdparamcallstatedata.h"
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    78
#include "tphonecmdparambitmap.h"
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    79
#include "tphonecmdparamaudiooutput.h"
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    80
#include "tphonecmdparamaudioavailability.h"
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    81
#include "tphonecmdparamappinfo.h"
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    82
#include "tphonecmdparamringtone.h"
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    83
#include "tphonecmdparamcustomdialer.h"
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    84
#include "cphonekeys.h"
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    85
#include "phoneui.hrh"
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    86
#include "phonerssbase.h"
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    87
#include "cphonebtaadisconnecthandler.h"
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    88
#include "cphonemainresourceresolver.h"
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    89
#include "cphonecenrepproxy.h"
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    90
#include "cphonepubsubproxy.h"
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    91
#include "phoneviewcommanddefinitions.h"
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    92
#include "phonelogger.h"
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    93
#include "phonestatedefinitions.h"
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    94
#include "cphonetimer.h"
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    95
#include "cphonereconnectquery.h"
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    96
#include "mphoneerrormessageshandler.h"
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    97
#include "cphoneclearblacklist.h"
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    98
#include "mphonecustomization.h"
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    99
#include "cphonemainerrormessageshandler.h"
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   100
#include "cphoneaccessorybthandler.h"
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   101
#include "cphonemediatorfactory.h"
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   102
#include "mphonemediatormessage.h"
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   103
#include "cphonemediatorsender.h"
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   104
#include "cphonereleasecommand.h"
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   105
#include "cphonecontinueemergencycallcommand.h"
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   106
#include "cphonecallheadermanager.h"
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   107
#include "cphonenumberentrymanager.h"
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   108
#include "mphonesecuritymodeobserver.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   109
#include "easydialingcommands.hrh"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   110
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   111
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   112
// ================= MEMBER FUNCTIONS =======================
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   113
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   114
EXPORT_C CPhoneState::CPhoneState(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   115
    MPhoneStateMachine* aStateMachine,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   116
    MPhoneViewCommandHandle* aViewCommandHandle,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   117
    MPhoneCustomization* aCustomization) :
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   118
    iStateMachine( aStateMachine ),
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   119
    iViewCommandHandle( aViewCommandHandle ),
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   120
    iCustomization( aCustomization )
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   121
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   122
    // Need to get current SimState for inherited classis
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   123
    iPreviousSimState = SimState();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   124
    __ASSERT_ALWAYS(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   125
        aStateMachine && aViewCommandHandle,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   126
        Panic( EPhoneCtrlParameterNotInitialized ) );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   127
    if ( FeatureManager::FeatureSupported( KFeatureIdOnScreenDialer ) )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   128
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   129
        iOnScreenDialer = ETrue;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   130
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   131
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   132
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   133
EXPORT_C void CPhoneState::BaseConstructL()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   134
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   135
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::BaseConstructL() ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   136
    if ( !iCbaManager )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   137
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   138
        iCbaManager = CPhoneCbaManager::NewL(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   139
                        this,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   140
                        *iViewCommandHandle,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   141
                        *iStateMachine );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   142
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   143
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   144
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   145
EXPORT_C CPhoneState::~CPhoneState()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   146
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   147
    if( iAlsLineChangeKeyPressTimer )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   148
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   149
        if( iAlsLineChangeKeyPressTimer->IsActive() )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   150
            {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   151
            iAlsLineChangeKeyPressTimer->CancelTimer();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   152
            }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   153
        delete iAlsLineChangeKeyPressTimer;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   154
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   155
    delete iNumberEntryManager;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   156
    delete iCallHeaderManager;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   157
    delete iCbaManager;
69
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
   158
    delete iTransitionHandler;
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   159
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   160
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   161
// <-------------------------- PHONE ENGINE EVENTS --------------------------->
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   162
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   163
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   164
// CPhoneState::HandlePhoneEngineMessageL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   165
// Default handling for Phone Engine messages
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   166
// (other items were commented in a header).
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   167
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   168
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   169
EXPORT_C void CPhoneState::HandlePhoneEngineMessageL(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   170
    const TInt aMessage,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   171
    TInt aCallId )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   172
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   173
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandlePhoneEngineMessageL() ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   174
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   175
    CPhoneAccessoryBTHandler* accessoryBtHandler;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   176
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   177
    switch ( aMessage )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   178
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   179
        case MEngineMonitor::EPEMessageNetworkRegistrationStatusChange:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   180
            {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   181
            __PHONELOG1( EBasic, EPhoneControl,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   182
               "PHONEUI_ERROR: EPEMessageNetworkRegistrationStatusChange - RegistrationStatus =%d ",
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   183
               iStateMachine->PhoneEngineInfo()->NetworkRegistrationStatus());
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   184
            }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   185
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   186
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   187
        case MEngineMonitor::EPEMessageAudioMuteChanged:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   188
            HandleAudioMuteChangedL();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   189
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   190
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   191
        case MEngineMonitor::EPEMessageAudioOutputChanged:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   192
            HandleAudioOutputChangedL();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   193
            // Go to current state implementation
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   194
            iCbaManager->UpdateInCallCbaL();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   195
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   196
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   197
        case MEngineMonitor::EPEMessageAvailableAudioOutputsChanged:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   198
            HandleAudioAvailableOutputChangedL();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   199
            if ( iStateMachine->PhoneEngineInfo()->AudioOutput() != EPENotActive )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   200
                {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   201
                // Go to current state implementation
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   202
                iCbaManager->UpdateInCallCbaL();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   203
                }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   204
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   205
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   206
        case MEngineMonitor::EPEMessageChangedCallDuration:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   207
            HandleChangedCallDurationL( aCallId );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   208
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   209
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   210
        case MEngineMonitor::EPEMessageRemoteBusy:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   211
            HandleRemoteBusyL( aCallId );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   212
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   213
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   214
        case MEngineMonitor::EPEMessageCallWaiting:
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   215
            SendGlobalInfoNoteL( EPhoneWaitingText );
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   216
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   217
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   218
        case MEngineMonitor::EPEMessageProfileChanged:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   219
            {
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   220
            TPhoneCmdParamBoolean keypadVolumeParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   221
            if ( iStateMachine->PhoneEngineInfo()->KeypadVolume() == 0 )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   222
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   223
                iViewCommandHandle->ExecuteCommandL( EPhoneViewKeypadAudioDisabled );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   224
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   225
            else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   226
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   227
                iViewCommandHandle->ExecuteCommandL( EPhoneViewKeypadAudioEnabled );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   228
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   229
            UpdateProfileDisplayL();
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   230
            }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   231
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   232
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   233
        case MEngineMonitor::EPEMessageRemoteTerminated:
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   234
            // Close menu bar, if it is displayed, for call ending note
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   235
            iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose );
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   236
            /* Flow through */
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   237
        case MEngineMonitor::EPEMessageDisconnecting:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   238
            HandleDisconnectingL( aCallId );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   239
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   240
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   241
        case MEngineMonitor::EPEMessageTransferDone:
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   242
            SendGlobalInfoNoteL( EPhoneInCallTransferred );
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   243
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   244
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   245
       case MEngineMonitor::EPEMessageInitiatedEmergencyCall:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   246
            HandleInitiatedEmergencyCallL( aCallId );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   247
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   248
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   249
       case MEngineMonitor::EPEMessageInitiatedEmergencyWhileActiveVideo:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   250
           HandleInitiatedEmergencyWhileActiveVideoL();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   251
           break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   252
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   253
        case MEngineMonitor::EPEMessageShowIMEI:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   254
            // Stop playing DTMF tone
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   255
            iStateMachine->SendPhoneEngineMessage( MPEPhoneModel::EPEMessageEndDTMF );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   256
            HandleShowImeiL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   257
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   258
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   259
        case MEngineMonitor::EPEMessageCallSecureStatusChanged:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   260
            HandleCallSecureStatusChangeL( aCallId );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   261
            ForwardPEMessageToPhoneCustomizationL( aMessage, aCallId );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   262
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   263
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   264
        case MEngineMonitor::EPEMessageActivateWarrantyMode:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   265
            // Stop playing DTMF tone
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   266
            iStateMachine->SendPhoneEngineMessage( MPEPhoneModel::EPEMessageEndDTMF );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   267
            HandleShowLifeTimerL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   268
            break;
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   269
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   270
        case MEngineMonitor::EPEMessageIssuingUSSDRequest:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   271
            {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   272
             // Enable global notes
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   273
            TPhoneCmdParamBoolean globalNotifierParam;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   274
            globalNotifierParam.SetBoolean( EFalse );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   275
            iViewCommandHandle->ExecuteCommandL(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   276
                EPhoneViewSetGlobalNotifiersDisabled,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   277
                &globalNotifierParam );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   278
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   279
            if ( !IsOnScreenDialerSupported() && IsNumberEntryUsedL() )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   280
                {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   281
                // Remove number entry from screen
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   282
                iViewCommandHandle->ExecuteCommandL(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   283
                    EPhoneViewRemoveNumberEntry );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   284
                }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   285
            else if ( IsOnScreenDialerSupported() )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   286
                {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   287
                NumberEntryClearL();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   288
                }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   289
            }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   290
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   291
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   292
        case MEngineMonitor::EPEMessageIssuedUSSDRequest:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   293
            // Go to current state implementation
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   294
            iCbaManager->UpdateInCallCbaL();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   295
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   296
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   297
        // *#9990#
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   298
        case MEngineMonitor::EPEMessageShowBTLoopback:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   299
            // Stop playing DTMF tone
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   300
            iStateMachine->SendPhoneEngineMessage( MPEPhoneModel::EPEMessageEndDTMF );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   301
            accessoryBtHandler = CPhoneAccessoryBTHandler::NewLC(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   302
                iViewCommandHandle, iStateMachine, this );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   303
            accessoryBtHandler->ShowBTLoopbackL();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   304
            CleanupStack::PopAndDestroy( accessoryBtHandler );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   305
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   306
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   307
        // *#2820#
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   308
        case MEngineMonitor::EPEMessageShowBTDeviceAddress:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   309
            // Stop playing DTMF tone
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   310
            iStateMachine->SendPhoneEngineMessage( MPEPhoneModel::EPEMessageEndDTMF );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   311
            accessoryBtHandler = CPhoneAccessoryBTHandler::NewLC(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   312
                iViewCommandHandle, iStateMachine, this );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   313
            accessoryBtHandler->ShowBTAddressL();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   314
            CleanupStack::PopAndDestroy( accessoryBtHandler );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   315
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   316
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   317
        // *#7370#
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   318
        case MEngineMonitor::EPEMessageActivateRfsDeep:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   319
            // Stop playing DTMF tone
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   320
            iStateMachine->SendPhoneEngineMessage( MPEPhoneModel::EPEMessageEndDTMF );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   321
            // Launch RFS
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   322
            iViewCommandHandle->ExecuteCommandL( EPhoneViewLaunchRfsDeep );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   323
            if ( !IsOnScreenDialerSupported() )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   324
                {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   325
                // Do state-specific operation when number entry is cleared
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   326
                HandleNumberEntryClearedL();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   327
                }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   328
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   329
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   330
        // *#7780#
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   331
        case MEngineMonitor::EPEMessageActivateRfsNormal:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   332
            // Stop playing DTMF tone
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   333
            iStateMachine->SendPhoneEngineMessage( MPEPhoneModel::EPEMessageEndDTMF );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   334
            // Launch RFS
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   335
            iViewCommandHandle->ExecuteCommandL( EPhoneViewLaunchRfsNormal );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   336
            if ( !IsOnScreenDialerSupported() )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   337
                {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   338
                // Do state-specific operation when number entry is cleared
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   339
                HandleNumberEntryClearedL();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   340
                }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   341
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   342
        // *#62209526#
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   343
        case MEngineMonitor::EPEMessageShowWlanMacAddress:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   344
            // Stop playing DTMF tone
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   345
            iStateMachine->SendPhoneEngineMessage( MPEPhoneModel::EPEMessageEndDTMF );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   346
            ShowWlanMacAddressL();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   347
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   348
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   349
        case MEngineMonitor::EPEMessageThumbnailLoadingCompleted:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   350
            // Update call buble
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   351
            UpdateRemoteInfoDataL( aCallId );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   352
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   353
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   354
        case MEngineMonitor::EPEMessageRemotePartyInfoChanged:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   355
            UpdateRemoteInfoDataL ( aCallId );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   356
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   357
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   358
        case MEngineMonitor::EPEMessageSIMStateChanged:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   359
            __PHONELOG1( EBasic, EPhoneControl, "CPhoneState::HandlePhoneEngineMessageL - simStateChanged =%d", SimState()  );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   360
            HandleSimStateChangedL();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   361
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   362
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   363
        case MEngineMonitor::EPEMessageShowIncCallGroupIndex:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   364
            HandleCugInUseNoteL();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   365
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   366
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   367
        // *#2873#
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   368
        case MEngineMonitor::EPEMessageBTDebugMode:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   369
            accessoryBtHandler = CPhoneAccessoryBTHandler::NewLC(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   370
                iViewCommandHandle, iStateMachine, this );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   371
            accessoryBtHandler->SetBTDebugModeL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   372
            CleanupStack::PopAndDestroy( accessoryBtHandler );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   373
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   374
        
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   375
        case MEngineMonitor::EPEMessageInitiatedMoCall:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   376
            // Message should be only handled by CPhoneStateIdle, 
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   377
            // if state is something else than idle then do nothing.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   378
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   379
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   380
        default:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   381
            TBool handled( EFalse );
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   382
            handled = ForwardPEMessageToPhoneCustomizationL( aMessage, aCallId );
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   383
            if ( EFalse == handled )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   384
                {
58
40a3f856b14d Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 44
diff changeset
   385
                MPhoneMediatorMessage* mediatorMessage = CPhoneMediatorFactory::Instance()->MediatorMessage( aMessage, aCallId );
40a3f856b14d Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 44
diff changeset
   386
                if( mediatorMessage )
40a3f856b14d Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 44
diff changeset
   387
                    {
40a3f856b14d Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 44
diff changeset
   388
                    CleanupDeletePushL( mediatorMessage );
40a3f856b14d Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 44
diff changeset
   389
                    mediatorMessage->ExecuteL();
40a3f856b14d Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 44
diff changeset
   390
                    CleanupStack::PopAndDestroy( mediatorMessage );
40a3f856b14d Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 44
diff changeset
   391
                    mediatorMessage = NULL;
40a3f856b14d Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 44
diff changeset
   392
                    }
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   393
                }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   394
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   395
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   396
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   397
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   398
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   399
// CPhoneState::HandleAudioMuteChangedL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   400
// Default handling for EPEMessageAudioMuteChanged message
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   401
// (other items were commented in a header).
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   402
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   403
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   404
EXPORT_C void CPhoneState::HandleAudioMuteChangedL()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   405
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   406
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandleAudioMuteChangedL() ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   407
    __ASSERT_DEBUG( iStateMachine->PhoneEngineInfo(),
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   408
        Panic( EPhoneCtrlInvariant ) );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   409
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   410
    TPhoneCmdParamBoolean booleanParam;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   411
    const TBool audioMute = iStateMachine->PhoneEngineInfo()->AudioMute();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   412
    booleanParam.SetBoolean( audioMute );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   413
    iViewCommandHandle->ExecuteCommandL( EPhoneViewActivateMuteUIChanges,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   414
        &booleanParam );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   415
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   416
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   417
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   418
// CPhoneState::HandleAudioOutputChangedL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   419
// Default handling for EPEMessageAudioOutputChanged message
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   420
// (other items were commented in a header).
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   421
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   422
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   423
EXPORT_C void CPhoneState::HandleAudioOutputChangedL()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   424
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   425
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandleAudioOutputChangedL() ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   426
    __ASSERT_DEBUG( iStateMachine->PhoneEngineInfo(),
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   427
        Panic( EPhoneCtrlInvariant ) );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   428
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   429
    TPhoneCmdParamAudioOutput outputParam;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   430
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   431
    // Output
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   432
    const TPEAudioOutput audioOutput =
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   433
        iStateMachine->PhoneEngineInfo()->AudioOutput();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   434
    outputParam.SetAudioOutput( audioOutput );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   435
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   436
    // view update
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   437
    iViewCommandHandle->ExecuteCommandL( EPhoneViewActivateAudioPathUIChanges,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   438
        &outputParam );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   439
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   440
    // Previous Output
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   441
    TPEPhoneAudioRouteParameters RouteParameters = iStateMachine->
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   442
        PhoneEngineInfo()->RouteParameters();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   443
    const TPEAudioOutput previousOutput =
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   444
        RouteParameters.iPreviousOutput;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   445
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   446
    // BT availability
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   447
    TBool btAvailable = iStateMachine->PhoneEngineInfo()->AudioOutputAvailable(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   448
            EPEBTAudioAccessory );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   449
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   450
    // Show note or BT disconnect handler
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   451
    if ( audioOutput != EPENotActive &&
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   452
         previousOutput == EPEBTAudioAccessory &&
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   453
         !btAvailable )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   454
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   455
        CPhoneBtaaDisconnectHandler::InstanceL()->HandleConnectionLostL();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   456
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   457
    else if ( audioOutput == EPEBTAudioAccessory && 
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   458
    		previousOutput > EPENotActive && 
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   459
    		previousOutput != EPEBTAudioAccessory &&
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   460
            btAvailable )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   461
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   462
        CPhoneAccessoryBTHandler* bt = CPhoneAccessoryBTHandler::NewLC(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   463
            iViewCommandHandle, iStateMachine, this );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   464
        bt->ShowBTActivatedL();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   465
        CleanupStack::PopAndDestroy( bt );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   466
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   467
    else if ( audioOutput == EPENotActive &&
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   468
              CPhoneBtaaDisconnectHandler::InstanceL()->IsQuery() )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   469
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   470
        CPhoneBtaaDisconnectHandler::InstanceL()->Cancel();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   471
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   472
    else if ( RouteParameters.iShowNote && audioOutput == EPELoudspeaker )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   473
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   474
        CAknKeySoundSystem* keySounds =
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   475
               static_cast<CAknAppUi*>( EikonEnv()->EikAppUi() )->KeySounds();
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   476
        keySounds->PlaySound( EAvkonSIDIHFActive );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   477
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   478
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   479
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   480
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   481
// CPhoneState::HandleSimStateChangedL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   482
// Handles changes in the SIM card state.
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   483
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   484
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   485
void CPhoneState::HandleSimStateChangedL()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   486
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   487
    __LOGMETHODSTARTEND( EPhoneControl, "CPhoneState::HandleSimStateChangedL()" );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   488
    CPhoneMainResourceResolver& resolver = *CPhoneMainResourceResolver::Instance();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   489
    TPESimState simState = SimState();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   490
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   491
    __PHONELOG2( EBasic, EPhoneControl, "SIM state was changed from %d to %d", iPreviousSimState, simState );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   492
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   493
    switch ( simState )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   494
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   495
        case EPESimUsable: // Falls through.
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   496
        case EPESimReadable: // Falls through.
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   497
        case EPESimNotReady:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   498
            {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   499
            if ( iPreviousSimState == EPESimNotPresent )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   500
                {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   501
                __PHONELOG( EBasic, EPhoneControl, "SIM card was inserted, rebooting the phone" );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   502
                RStarterSession starterSession;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   503
                User::LeaveIfError( starterSession.Connect() );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   504
                CleanupClosePushL( starterSession );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   505
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   506
                HBufC* queryText = StringLoader::LoadLC( resolver.ResolveResourceID( EPhoneRebootRequired ) );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   507
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   508
                TPhoneCmdParamQuery queryParams;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   509
                queryParams.SetCommandParamId( TPhoneCommandParam::EPhoneParamRebootQuery );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   510
                queryParams.SetQueryPrompt( *queryText );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   511
                queryParams.SetDefaultCba( R_AVKON_SOFTKEYS_OK_EMPTY );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   512
                iViewCommandHandle->ExecuteCommandL( EPhoneViewShowQuery, &queryParams );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   513
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   514
                starterSession.Reset( RStarterSession::ESIMStatusChangeReset );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   515
                CleanupStack::PopAndDestroy( 2, &starterSession ); // queryText
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   516
                }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   517
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   518
            }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   519
        case EPESimNotPresent:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   520
            {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   521
            if ( iPreviousSimState == EPESimUsable ||
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   522
                 iPreviousSimState == EPESimReadable ||
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   523
                 iPreviousSimState == EPESimNotReady )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   524
                {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   525
                __PHONELOG( EBasic, EPhoneControl, "SIM card was removed" );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   526
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   527
                TPhoneCmdParamGlobalNote globalNoteParam;
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   528
                globalNoteParam.SetType( EAknGlobalInformationNote );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   529
                globalNoteParam.SetTone( EAvkonSIDNoSound );
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   530
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   531
                globalNoteParam.SetTextResourceId(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   532
                    CPhoneMainResourceResolver::Instance()->
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   533
                    ResolveResourceID( EPhoneSimRemoved ) );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   534
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   535
                iViewCommandHandle->ExecuteCommandL(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   536
                    EPhoneViewShowGlobalNote, &globalNoteParam );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   537
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   538
                }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   539
            // Show security note, if SIM not present and KFeatureIdFfSimlessOfflineSupport is disabled.
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   540
            else if ( !FeatureManager::FeatureSupported( KFeatureIdFfSimlessOfflineSupport ) &&
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   541
                    ( iPreviousSimState != EPESimNotSupported ) )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   542
                {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   543
                StartShowSecurityNoteL();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   544
                }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   545
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   546
            }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   547
        default:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   548
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   549
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   550
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   551
    iPreviousSimState = simState;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   552
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   553
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   554
// -----------------------------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   555
// CPhoneState::IsValidAlphaNumericKey
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   556
// Checks is the key event a number, a special character
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   557
// or if VoIP is enabled some other character
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   558
// -----------------------------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   559
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   560
TBool CPhoneState::IsValidAlphaNumericKey( const TKeyEvent& aKeyEvent,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   561
        TEventCode aEventCode )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   562
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   563
    TBool ret(EFalse);
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   564
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   565
    const TBool numericKeyEntered( CPhoneKeys::IsNumericKey(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   566
          aKeyEvent, aEventCode ) );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   567
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   568
    // a numeric key (1,2,3,4,6,7,8,9,0,+,*,p,w )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   569
    // or
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   570
    // a letter from fullscreen qwerty, miniqwerty or handwriting
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   571
    // when voip is enabled
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   572
    if ( numericKeyEntered
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   573
        || IsAlphanumericSupportedAndCharInput( aKeyEvent ) )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   574
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   575
        ret= ETrue;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   576
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   577
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   578
    return ret;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   579
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   580
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   581
// -----------------------------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   582
// CPhoneState::CustomizeCBAForPhoneNumber
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   583
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   584
// -----------------------------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   585
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   586
void CPhoneState::CustomizeCbaForPhoneNumberL()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   587
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   588
    if ( !FeatureManager::FeatureSupported( KFeatureIdTouchCallHandling ) &&
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   589
         iCustomization &&
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   590
         iCustomization->AllowAlphaNumericMode() )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   591
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   592
        // Get the number entry contents
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   593
        HBufC* phoneNumber = PhoneNumberFromEntryLC();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   594
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   595
        TPhoneCmdParamInteger integerParam;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   596
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   597
        //only charaters from set { 0, .., 9, *, #, +, p, w, P, W } used
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   598
        if ( CPhoneKeys::Validate( phoneNumber->Des()) )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   599
            {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   600
            integerParam.SetInteger( CPhoneMainResourceResolver::Instance()->
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   601
                                    ResolveResourceID( EPhoneNumberAcqCBA ) );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   602
            }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   603
        //other characters
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   604
        else
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   605
            {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   606
            integerParam.SetInteger( iCustomization->CustomizeSoftKeys() );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   607
            }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   608
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   609
        iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateCba, &integerParam );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   610
        CleanupStack::PopAndDestroy( phoneNumber );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   611
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   612
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   613
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   614
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   615
// -----------------------------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   616
// CPhoneState::IsTouchDTmfDialerOn
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   617
// -----------------------------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   618
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   619
TBool CPhoneState::IsTouchDTmfDialerOn() const
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   620
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   621
    TBool status( EFalse );
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   622
    if ( IsOnScreenDialerSupported() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   623
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   624
        TBool isDialerVisible( EFalse );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   625
        TRAP_IGNORE( isDialerVisible = IsDTMFEditorVisibleL() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   626
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   627
        if ( isDialerVisible )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   628
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   629
            status = ETrue;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   630
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   631
        }
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   632
    return status;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   633
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   634
// -----------------------------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   635
// CPhoneState::SendDtmfKeyEventL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   636
// send dtmf event when,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   637
// -touch dtmf dialer is NOT visible
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   638
// -query is not active
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   639
// -menubar is not open
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   640
// -----------------------------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   641
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   642
void CPhoneState::SendDtmfKeyEventL( const TKeyEvent& aKeyEvent,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   643
               TEventCode aEventCode  )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   644
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   645
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   646
    if ( !IsTouchDTmfDialerOn()
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   647
        && !IsAnyQueryActiveL()
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   648
        && !IsMenuBarVisibleL() )
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   649
        {
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   650
        if( IsKeyEventFurtherProcessedL( aKeyEvent ))
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   651
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   652
            // Send the key event to the phone engine.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   653
            SendKeyEventL( aKeyEvent, aEventCode );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   654
            }
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   655
        }
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   656
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   657
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   658
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   659
// -----------------------------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   660
// CPhoneState::IsKeyEventFurtherProcessed
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   661
// -----------------------------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   662
//
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   663
TBool CPhoneState::IsKeyEventFurtherProcessedL( const TKeyEvent& aKeyEvent ) const
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   664
    {
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   665
    // While being in some special keyboard mode (Full Screen&mini QWERTY,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   666
    // handwriting mode) FEP sends only EEventKey -event and thus manual
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   667
    // DTMFs can not be played with the user specified tone lengths. Also,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   668
    // in general, DTMFs are tried to play only in numeric mode.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   669
    TBool numericMode = iViewCommandHandle->HandleCommandL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   670
      EPhoneViewIsNumberEntryNumericMode ) == EPhoneViewResponseSuccess;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   671
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   672
    // Key presses simulated by dialer are played even if in alphanumeric mode.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   673
    const TBool simulatedByDialer = 
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   674
        ( ( aKeyEvent.iModifiers & ( EModifierNumLock | EModifierKeypad ) ) 
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   675
                == ( EModifierNumLock | EModifierKeypad ) );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   676
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   677
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   678
    if ( ( ( aKeyEvent.iModifiers & EModifierSpecial ) != 0 || !numericMode ) && !simulatedByDialer )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   679
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   680
        return EFalse;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   681
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   682
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   683
    return ETrue;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   684
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   685
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   686
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   687
// CPhoneState::HandleErrorL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   688
// Default handling for HandleError message
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   689
// (other items were commented in a header).
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   690
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   691
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   692
EXPORT_C void CPhoneState::HandleErrorL( const TPEErrorInfo& aErrorInfo )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   693
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   694
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandleErrorL()");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   695
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   696
    __PHONELOG1( EBasic, EPhoneControl,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   697
            "PhoneUIControl: CPhoneState::HandleErrorL - aErrorInfo.iErrorCode =%d ",
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   698
            aErrorInfo.iErrorCode );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   699
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   700
    __PHONELOG1( EBasic, EPhoneControl,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   701
        "PhoneUIControl: CPhoneState::HandleErrorL - aErrorInfo.iCallId =%d ",
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   702
        aErrorInfo.iCallId );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   703
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   704
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   705
    // Sets touch buttons to correct status if error has occured.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   706
    if ( FeatureManager::FeatureSupported( KFeatureIdTouchCallHandling ) )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   707
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   708
        iViewCommandHandle->ExecuteCommand( EPhoneResetTouchButtons );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   709
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   710
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   711
    // Do the common error handling (display proper notes etc)
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   712
    CPhoneMainErrorMessagesHandler::Instance()->ShowErrorSpecificNoteL( aErrorInfo );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   713
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   714
    switch( aErrorInfo.iErrorCode )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   715
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   716
        case ECCPErrorCCUserAlertingNoAnswer:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   717
        case ECCPErrorCCResourceNotAvailable:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   718
            {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   719
            if( aErrorInfo.iCallId > KErrNotFound )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   720
                {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   721
                if ( iStateMachine->PhoneEngineInfo()->CallDirection(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   722
                        aErrorInfo.iCallId ) != RMobileCall::EMobileTerminated )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   723
                    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   724
                    if( IsVideoCall( aErrorInfo.iCallId ) )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   725
                        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   726
                        // Active MO video call lost 3G network.
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   727
                        __PHONELOG1( EBasic, EPhoneControl,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   728
                        "PhoneUIControl: CPhoneState::HandleErrorL - ShowReconnectQueryL vid 1, callid%d ",
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   729
                        aErrorInfo.iCallId );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   730
                        CPhoneReconnectQuery::InstanceL()->ShowReconnectQueryL( ETrue );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   731
                        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   732
                    else
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   733
                        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   734
                         __PHONELOG1( EBasic, EPhoneControl,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   735
                            "PhoneUIControl: CPhoneState::HandleErrorL - No video call =%d ",
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   736
                            aErrorInfo.iCallId );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   737
                        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   738
                    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   739
                }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   740
            }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   741
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   742
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   743
        case ECCPErrorCCServiceNotAvailable:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   744
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   745
            if( IsVideoCall( aErrorInfo.iCallId ) )
44
3c221667e687 Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
   746
                {
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   747
                CPhoneReconnectQuery::InstanceL()->ShowReconnectQueryL( EFalse );
44
3c221667e687 Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
   748
                }
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   749
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   750
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   751
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   752
        case ECCPErrorBadRequest:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   753
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   754
            TPECallType callType =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   755
                iStateMachine->PhoneEngineInfo()->CallTypeCommand();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   756
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   757
            if( callType == EPECallTypeVideo )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   758
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   759
                    // Dialling MO video call cannot reach 3G network.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   760
                    __PHONELOG1( EBasic, EPhoneControl,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   761
                        "PhoneUIControl: CPhoneState::HandleErrorL - ShowReconnectQueryL vid 2, callid%d ",
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   762
                        aErrorInfo.iCallId );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   763
                    CPhoneReconnectQuery::InstanceL()->ShowReconnectQueryL( ETrue );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   764
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   765
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   766
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   767
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   768
        case ECCPErrorVideoCallNotSupportedByNetwork: // Flow trough
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   769
        case ECCPErrorVideoCallSetupFailed:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   770
        case ECCPErrorNotReached:
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   771
        case ECCPErrorCCBearerCapabilityNotCurrentlyAvailable:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   772
        case ECCPErrorCCBearerCapabilityNotAuthorised:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   773
        case ECCPErrorServiceSettingError:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   774
        case ECCPErrorNoAnswerForVideo:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   775
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   776
            // If call id found and seems to be Video Call
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   777
            if ( IsVideoCall( aErrorInfo.iCallId ) )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   778
                {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   779
                // Get active call count
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   780
                TPhoneCmdParamInteger activeCallCount;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   781
                iViewCommandHandle->ExecuteCommandL(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   782
                    EPhoneViewGetCountOfActiveCalls, &activeCallCount );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   783
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   784
                if ( activeCallCount.Integer() == 0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   785
                     || iStateMachine->PhoneEngineInfo()->CallDirection(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   786
                        aErrorInfo.iCallId ) != RMobileCall::EMobileTerminated )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   787
                    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   788
                    // Dialling MO video call attempted in 2G network or
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   789
                    // dialing MO video to unvalid number
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   790
                    // Reconnect query include video label if errorcode is unvalid number.
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   791
                    __PHONELOG1( EBasic, EPhoneControl,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   792
                    "PhoneUIControl: CPhoneState::HandleErrorL - ShowReconnectQueryL vid 3, callid%d ",
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   793
                    aErrorInfo.iCallId );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   794
                    CPhoneReconnectQuery::InstanceL()->ShowReconnectQueryL(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   795
                              ECCPErrorNotReached == aErrorInfo.iErrorCode );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   796
                    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   797
                }
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   798
            }
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   799
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   800
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   801
        case ECCPErrorNoService:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   802
            // No network -> hide volume popup
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   803
            iViewCommandHandle->ExecuteCommandL( EPhoneViewHideNaviPaneAudioVolume );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   804
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   805
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   806
        case ECCPErrorSatControl:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   807
            {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   808
            // check, that there really was a call established before completing SAT request
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   809
            if( aErrorInfo.iCallId != KPECallIdNotUsed )
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   810
                {                
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   811
                // Complete sat request
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   812
                if ( iStateMachine->PhoneEngineInfo()->CallOrigin( aErrorInfo.iCallId ) == EPECallOriginSAT )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   813
                    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   814
                    CompleteSatRequestL( aErrorInfo.iCallId );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   815
                    }
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   816
                }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   817
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   818
            // remove number entry
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   819
            if ( !IsOnScreenDialerSupported() && IsNumberEntryUsedL() )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   820
                {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   821
                iViewCommandHandle->ExecuteCommandL(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   822
                    EPhoneViewRemoveNumberEntry );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   823
                }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   824
            else if ( IsOnScreenDialerSupported() )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   825
                {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   826
                NumberEntryClearL();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   827
                }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   828
            }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   829
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   830
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   831
        default:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   832
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   833
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   834
    // clear call blacklist if call failure occurs
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   835
    CPhoneClearBlacklist::Instance()->ClearBlackListOnNextKey();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   836
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   837
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   838
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   839
// CPhoneState::HandleChangedCallDurationL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   840
// Default handling for EPEMessageChangedCallDuration message
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   841
// (other items were commented in a header).
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   842
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   843
void CPhoneState::HandleChangedCallDurationL( TInt aCallId )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   844
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   845
     __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandleChangedCallDurationL() ");
31
ba54057fe027 Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   846
    
ba54057fe027 Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   847
    TInt ret = KErrNone;
ba54057fe027 Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   848
    TInt isDisplayOn;
ba54057fe027 Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   849
    
ba54057fe027 Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   850
    ret = HAL::Get( HALData::EDisplayState, isDisplayOn );
ba54057fe027 Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   851
    
ba54057fe027 Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   852
    // Update only if the display is on or if HAL::Get returns an error, 
ba54057fe027 Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   853
    // in which case display value cannot be trusted.
ba54057fe027 Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   854
    if ( ret || isDisplayOn )
ba54057fe027 Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   855
        {
ba54057fe027 Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   856
        // Get the call duration
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   857
        TTime time( 0 );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   858
        TTimeIntervalSeconds timeInterval =
31
ba54057fe027 Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   859
            iStateMachine->PhoneEngineInfo()->CallDuration( aCallId );
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   860
        time += timeInterval;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   861
        
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   862
        // Read format string from AVKON resource
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   863
        TBuf<KPhoneMaxCharsInNote> timeDurationFormatString( KNullDesC );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   864
        LoadResource( timeDurationFormatString, EPhoneCallDurationFormatString );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   865
        
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   866
        // Format the time
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   867
        TBuf<KPhoneMaxTimeDisplayTextLength> timeString( KNullDesC );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   868
        time.FormatL( timeString, timeDurationFormatString );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   869
        
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   870
        // Localize time format
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   871
        AknTextUtils::LanguageSpecificNumberConversion( timeString );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   872
        
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   873
        // update the call header call duration
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   874
        iViewCommandHandle->ExecuteCommandL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   875
            EPhoneViewUpdateCallHeaderCallDuration,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   876
            aCallId,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   877
            timeString );
31
ba54057fe027 Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   878
        }
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   879
    }
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   880
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   881
// -----------------------------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   882
// CPhoneState::HandleRemoteBusyL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   883
// -----------------------------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   884
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   885
void CPhoneState::HandleRemoteBusyL( TInt aCallId )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   886
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   887
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandleRemoteBusyL( ) ");
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   888
    ShowNumberBusyNoteL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   889
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   890
    const TPECallType callType =
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   891
        iStateMachine->PhoneEngineInfo()->CallTypeCommand();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   892
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   893
    if( callType == EPECallTypeVideo )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   894
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   895
         // Launch reconnect query including video call menu item
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   896
         __PHONELOG1( EBasic, EPhoneControl,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   897
            "PhoneUIControl: CPhoneState::HandleRemoteBusyL - ShowReconnectQueryL vid 5, callid%d ",
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   898
                aCallId );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   899
        CPhoneReconnectQuery::InstanceL()->ShowReconnectQueryL( ETrue );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   900
        }
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   901
    else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   902
        {        
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   903
        // Complete sat request
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   904
        if ( iStateMachine->PhoneEngineInfo()->CallOrigin( aCallId ) == EPECallOriginSAT )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   905
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   906
            CompleteSatRequestL( aCallId );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   907
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   908
        }
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   909
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   910
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   911
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   912
// CPhoneState::HandleDisconnectingL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   913
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   914
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   915
EXPORT_C void CPhoneState::HandleDisconnectingL( TInt aCallId )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   916
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   917
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandleDisconnectingL( ) ");
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   918
    // If there is no call in connected state then EPhoneDtmfTextQuery and EPhoneDtmfListQueryDialog
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   919
    // must be dismmissed from UI, therefore we must set EPhoneViewSetNoConnectedCalls to ETrue this
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   920
    // way we can ensure that CPhoneQueryController doesnt relaunch EPhoneDtmfListQueryDialog.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   921
    if ( !IsAnyConnectedCalls() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   922
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   923
        TPhoneCmdParamBoolean booleanParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   924
        booleanParam.SetBoolean(ETrue);
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   925
        iViewCommandHandle->ExecuteCommandL( EPhoneViewSetNoConnectedCalls, &booleanParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   926
        }
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   927
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   928
    TPhoneCmdParamCallHeaderData callHeaderParam;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   929
    callHeaderParam.SetCallState( EPEStateDisconnecting );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   930
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   931
    TBuf<KPhoneCallHeaderLabelMaxLength> labelText( KNullDesC );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   932
    LoadResource( labelText, EPhoneInCallDisconnected );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   933
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   934
    callHeaderParam.SetLabelText( labelText );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   935
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   936
    iViewCommandHandle->ExecuteCommandL( EPhoneViewStopRingTone );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   937
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   938
    iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId,
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
   939
        &callHeaderParam );
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   940
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   941
    CPhoneClearBlacklist::Instance()->ClearBlackListOnNextKey();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   942
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   943
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   944
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   945
// CPhoneState::IsCustomizedDialerVisibleL()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   946
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   947
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   948
EXPORT_C TBool CPhoneState::IsCustomizedDialerVisibleL() const
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   949
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   950
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::IsCustomizedDialerVisibleL( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   951
    return iViewCommandHandle->HandleCommandL(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   952
        EPhoneIsCustomizedDialerVisible ) == EPhoneViewResponseSuccess;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   953
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   954
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   955
// <------------------------------- KEY EVENTS ------------------------------->
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   956
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   957
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   958
// CPhoneState::HandleKeyMessageL( aMessage, aKeyCode )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   959
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   960
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   961
EXPORT_C void CPhoneState::HandleKeyMessageL(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   962
    TPhoneKeyEventMessages /*aMessage*/,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   963
    TKeyCode /*aKeyCode*/ )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   964
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   965
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandleKeyMessageL( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   966
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   967
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   968
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   969
// CPhoneState::HandleKeyEventL( aKeyEvent, aEventCode )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   970
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   971
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   972
EXPORT_C void CPhoneState::HandleKeyEventL(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   973
    const TKeyEvent& aKeyEvent,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   974
    TEventCode aEventCode )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   975
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   976
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandleKeyEventL( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   977
    if ( ( IsNumberEntryVisibleL() ) || OnlySideVolumeKeySupported() )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   978
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   979
        // Handle numeric keys when key events are received in single state
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   980
        HandleNumericKeyEventL( aKeyEvent, aEventCode );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   981
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   982
    else if ( aKeyEvent.iScanCode == EStdKeyUpArrow &&
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   983
              aEventCode == EEventKey )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   984
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   985
        // Increace audio volume
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   986
        IncreaseAudioVolumeL();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   987
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   988
    else if ( aKeyEvent.iScanCode == EStdKeyDownArrow &&
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   989
            aEventCode == EEventKey )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   990
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   991
        // Decreace audio volume
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   992
        DecreaseAudioVolumeL();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   993
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   994
    else
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   995
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   996
        // Handle numeric keys when key events are received in single state
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   997
        HandleNumericKeyEventL( aKeyEvent, aEventCode );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   998
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   999
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1000
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1001
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1002
// CPhoneState::OnlySideVolumeKeySupported
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1003
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1004
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1005
TBool CPhoneState::OnlySideVolumeKeySupported()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1006
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1007
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::OnlySideVolumeKeySupported( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1008
    TBool onlySideVolumeKeySupported(EFalse);
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1009
    if ( !CPhoneCenRepProxy::Instance()->
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1010
            IsTelephonyFeatureSupported( KTelephonyLVFlagScrollVolumeKeys ) &&
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1011
         FeatureManager::FeatureSupported( KFeatureIdSideVolumeKeys ) )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1012
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1013
        onlySideVolumeKeySupported = ETrue;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1014
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1015
    __PHONELOG1( EBasic, EPhoneControl,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1016
            "OnlySideVolumeKeySupported: %d",
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1017
            onlySideVolumeKeySupported );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1018
    return onlySideVolumeKeySupported;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1019
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1020
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1021
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1022
// CPhoneState::HandleKeyPressDurationL( aScanCode, aKeyPressDuration )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1023
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1024
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1025
EXPORT_C void CPhoneState::HandleKeyPressDurationL(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1026
    TKeyCode aCode,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1027
    TTimeIntervalMicroSeconds /*aKeyPressDuration*/ )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1028
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1029
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandleKeyPressDurationL( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1030
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1031
    if( aCode == KPhoneDtmfHashCharacter )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1032
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1033
        if( iAlsLineChangeKeyPressTimer )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1034
            {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1035
            if( iAlsLineChangeKeyPressTimer->IsActive() )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1036
                {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1037
                iAlsLineChangeKeyPressTimer->Cancel();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1038
                }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1039
            }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1040
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1041
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1042
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1043
// -----------------------------------------------------------
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1044
// CPhoneState::IsNoteVisibleL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1045
// -----------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1046
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1047
EXPORT_C TBool CPhoneState::IsNoteVisibleL()
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1048
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1049
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::IsNoteVisibleL( ) ");
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1050
    TPhoneCmdParamBoolean booleanParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1051
    iViewCommandHandle->ExecuteCommandL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1052
        EPhoneViewGetIsNoteVisible, &booleanParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1053
    return booleanParam.Boolean();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1054
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1055
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1056
// -----------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1057
// CPhoneState::IsMenuBarVisibleL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1058
// -----------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1059
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1060
EXPORT_C TBool CPhoneState::IsMenuBarVisibleL() const
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1061
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1062
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::IsMenuBarVisibleL( ) ");
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1063
    return iViewCommandHandle->HandleCommandL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1064
        EPhoneViewIsMenuBarVisible ) ==
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1065
        EPhoneViewResponseSuccess;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1066
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1067
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1068
// -----------------------------------------------------------
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1069
// CPhoneState::HandleNumericKeyEventL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1070
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1071
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1072
EXPORT_C void CPhoneState::HandleNumericKeyEventL(
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1073
    const TKeyEvent& aKeyEvent,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1074
    TEventCode aEventCode )
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1075
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1076
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandleNumericKeyEventL( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1077
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1078
    TBool numberEntryUsed = IsNumberEntryUsedL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1079
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1080
    if ( numberEntryUsed && ( aKeyEvent.iRepeats == 0 ||
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1081
              aKeyEvent.iScanCode == EStdKeyBackspace ||
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1082
              aKeyEvent.iScanCode == EStdKeyLeftArrow ||
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1083
              aKeyEvent.iScanCode == EStdKeyUpArrow   ||
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1084
              aKeyEvent.iScanCode == EStdKeyDownArrow ||
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1085
              aKeyEvent.iScanCode == EStdKeyRightArrow ))
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1086
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1087
        // Number entry exists but may be hidden
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1088
        KeyEventForExistingNumberEntryL( aKeyEvent, aEventCode );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1089
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1090
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1091
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1092
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1093
// -----------------------------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1094
// CPhoneState::IsAnyQueryActiveL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1095
// -----------------------------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1096
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1097
EXPORT_C TBool CPhoneState::IsAnyQueryActiveL()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1098
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1099
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::IsAnyQueryActiveL( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1100
    TBool isActive( EFalse );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1101
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1102
    // If IsNoteDismissableL returns true then shown note is dismissable by key event
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1103
    // and then there is no actual query and IsAnyQueryActiveL returns false.
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1104
    if ( !IsNoteDismissableL() )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1105
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1106
        // Check is query displayed
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1107
        TPhoneCmdParamBoolean isQueryDisplayed;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1108
        iViewCommandHandle->ExecuteCommandL( EPhoneViewIsQuery, &isQueryDisplayed );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1109
        // Check is Blocking Dialog active ( e.g. RFS query )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1110
        TPhoneCmdParamBoolean blockingDialogStatus;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1111
        iViewCommandHandle->ExecuteCommandL( EPhoneViewGetBlockingDialogStatus,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1112
            &blockingDialogStatus );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1113
        // Check is note displayed
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1114
        TPhoneCmdParamBoolean isNoteActive;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1115
        iViewCommandHandle->ExecuteCommandL(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1116
            EPhoneViewIsNoteActive, &isNoteActive );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1117
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1118
        if ( isQueryDisplayed.Boolean() || blockingDialogStatus.Boolean() || isNoteActive.Boolean() )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1119
            {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1120
            isActive = ETrue;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1121
            }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1122
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1123
    __PHONELOG1( EBasic, EPhoneControl, "CPhoneState::IsAnyQueryActiveL: %d ", isActive );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1124
    return isActive;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1125
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1126
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1127
// -----------------------------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1128
// CPhoneState::IsNoteDismissable
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1129
// -----------------------------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1130
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1131
TBool CPhoneState::IsNoteDismissableL()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1132
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1133
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::IsNoteDismissableL( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1134
    TBool dismiss = EFalse;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1135
    if ( !FeatureManager::FeatureSupported( KFeatureIdFfSimlessOfflineSupport ) ||
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1136
         (FeatureManager::FeatureSupported( KFeatureIdFfSimlessOfflineSupport ) &&
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1137
                  SimSecurityStatus() == ESimRejected )  )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1138
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1139
        // Check if note is dismissed by key event.
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1140
        TPhoneCmdParamBoolean isNoteDismissed;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1141
        iViewCommandHandle->ExecuteCommandL(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1142
                EPhoneViewIsActiveNoteDissmissableByKeyEvent, &isNoteDismissed );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1143
        if ( isNoteDismissed.Boolean() )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1144
            {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1145
            dismiss = ETrue;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1146
            }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1147
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1148
    __PHONELOG1( EBasic, EPhoneControl, "CPhoneState::IsNoteDismissableL: %d ", dismiss );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1149
    return dismiss;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1150
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1151
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1152
// -----------------------------------------------------------
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1153
// CPhoneState::IsDialingExtensionInFocusL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1154
// -----------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1155
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1156
EXPORT_C TBool CPhoneState::IsDialingExtensionInFocusL() const
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1157
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1158
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::IsDialingExtensionInFocusL( ) ");
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1159
    return iViewCommandHandle->HandleCommandL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1160
        EPhoneViewGetEasyDialingInFocusStatus ) ==
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1161
        EPhoneViewResponseSuccess;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1162
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1163
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1164
// -----------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1165
// CPhoneState::EikonEnv
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1166
// -----------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1167
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1168
EXPORT_C CEikonEnv* CPhoneState::EikonEnv() const
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1169
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1170
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::EikonEnv( ) ");
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1171
    return iEnv;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1172
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1173
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1174
// -----------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1175
// CPhoneState::SetEikonEnv
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1176
// -----------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1177
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1178
EXPORT_C void CPhoneState::SetEikonEnv( CEikonEnv* aEnv )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1179
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1180
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::SetEikonEnv( ) ");
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1181
    iEnv = aEnv;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1182
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1183
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1184
// -----------------------------------------------------------
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1185
// CPhoneState::SendKeyEventL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1186
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1187
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1188
void CPhoneState::SendKeyEventL(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1189
    const TKeyEvent& aKeyEvent,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1190
    TEventCode aEventCode )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1191
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1192
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::SendKeyEventL( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1193
    switch( aEventCode )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1194
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1195
        // EEventKey
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1196
        case EEventKey:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1197
            // Send the key press to the phone engine, if applicable
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1198
            SendKeyPressL( aKeyEvent, aEventCode );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1199
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1200
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1201
        // EEventKeyUp
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1202
        case EEventKeyUp:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1203
            // Send a key up event for the last key code sent to
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1204
            // the phone engine
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1205
            iStateMachine->SendPhoneEngineMessage(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1206
                MPEPhoneModel::EPEMessageEndDTMF );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1207
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1208
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1209
        default:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1210
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1211
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1212
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1213
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1214
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1215
// CPhoneState::SendKeyPressL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1216
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1217
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1218
void CPhoneState::SendKeyPressL(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1219
    const TKeyEvent& aKeyEvent,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1220
    TEventCode aEventCode )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1221
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1222
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::SendKeyPressL( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1223
    const TBool dtmfToneKeyEntered =
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1224
        CPhoneKeys::IsDtmfTone( aKeyEvent, aEventCode );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1225
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1226
    if ( dtmfToneKeyEntered ||
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1227
        aKeyEvent.iCode == EKeyBackspace )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1228
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1229
        // Get the number entry contents, if it exists
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1230
        if ( IsNumberEntryUsedL() )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1231
            {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1232
            HBufC* phoneNumber = PhoneNumberFromEntryLC();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1233
            // Save the phone number
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1234
            __PHONELOG1( EBasic, EPhoneControl, "SetPhoneNumber: %S ", &phoneNumber->Des() );
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1235
            iStateMachine->PhoneEngineInfo()->SetPhoneNumber( *phoneNumber );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1236
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1237
            // Convert key code to western.
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1238
            TBuf<1> buffer; // one character
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1239
            buffer.Append( aKeyEvent.iCode );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1240
            __PHONELOG1( EBasic, EPhoneControl,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1241
                "CPhoneState::SendKeyPressL(%S)",
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1242
                &buffer );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1243
            AknTextUtils::ConvertDigitsTo( buffer, EDigitTypeWestern );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1244
            __PHONELOG1( EBasic, EPhoneControl,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1245
                "CPhoneState::SendKeyPressL(%S)",
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1246
                &buffer );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1247
            TLex code( buffer );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1248
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1249
            // Save the key code
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1250
            iStateMachine->PhoneEngineInfo()->SetKeyCode( code.Peek() );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1251
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1252
            // Plays a DTMF tone if active call
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1253
            iStateMachine->SendPhoneEngineMessage(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1254
                MPEPhoneModel::EPEMessagePlayDTMF );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1255
            // remove the phone number from the cleanup stack
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1256
            CleanupStack::PopAndDestroy( phoneNumber );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1257
            }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1258
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1259
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1260
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1261
// <------------------------------ SYSTEM EVENTS ----------------------------->
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1262
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1263
// -----------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1264
// CPhoneState::DynInitMenuPaneL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1265
// -----------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1266
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1267
EXPORT_C void CPhoneState::DynInitMenuPaneL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1268
    TInt aResourceId,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1269
    CEikMenuPane* aMenuPane )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1270
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1271
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::DynInitMenuPaneL( ) ");
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1272
    __ASSERT_DEBUG( aMenuPane && aResourceId,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1273
        Panic( EPhoneCtrlParameterNotInitialized ) );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1274
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1275
    // Save the number of digits in the number entry before processing
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1276
    // the menu pane
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1277
    if ( IsNumberEntryUsedL() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1278
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1279
        TPhoneCmdParamBoolean serviceCodeParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1280
            serviceCodeParam.SetBoolean(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1281
            iStateMachine->PhoneEngineInfo()->PhoneNumberIsServiceCode() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1282
        iViewCommandHandle->ExecuteCommandL( EPhoneViewSetServiceCodeFlag,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1283
            &serviceCodeParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1284
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1285
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1286
    // Process the menu pane
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1287
    TPhoneCmdParamDynMenu dynMenuPane;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1288
    dynMenuPane.SetResourceId( aResourceId );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1289
    dynMenuPane.SetDynMenu( aMenuPane );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1290
    iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuPane, &dynMenuPane );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1291
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1292
    if ( iCustomization )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1293
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1294
        // Menu pane is customized after default items are decided
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1295
        iCustomization->CustomizeMenuPaneL(aResourceId, aMenuPane);
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1296
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1297
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1298
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1299
// -----------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1300
// CPhoneState::DynInitMenuBarL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1301
// -----------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1302
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1303
EXPORT_C void CPhoneState::DynInitMenuBarL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1304
    TInt aResourceId,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1305
    CEikMenuBar* aMenuBar )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1306
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1307
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::DynInitMenuBarL( ) ");
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1308
    __ASSERT_DEBUG( aMenuBar && aResourceId,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1309
        Panic( EPhoneCtrlParameterNotInitialized ) );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1310
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1311
    TPhoneCmdParamDynMenu dynMenuBar;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1312
    dynMenuBar.SetResourceId( aResourceId );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1313
    dynMenuBar.SetDynMenu( aMenuBar );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1314
    iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBar, &dynMenuBar );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1315
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1316
    if ( iCustomization )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1317
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1318
        // Menu bar is customized after default items are decided
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1319
        iCustomization->CustomizeMenuBarL(aResourceId, aMenuBar);
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1320
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1321
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1322
    }
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1323
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1324
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1325
// CPhoneState::HandleSystemEventL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1326
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1327
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1328
EXPORT_C void CPhoneState::HandleSystemEventL( const TWsEvent& /*aEvent*/ )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1329
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1330
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandleSystemEventL( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1331
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1332
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1333
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1334
// CPhoneState::HandleForegroundEventL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1335
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1336
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1337
EXPORT_C void CPhoneState::HandleForegroundEventL( TBool aForeground )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1338
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1339
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandleForegroundEventL( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1340
    if ( !aForeground && IsNumberEntryUsedL() )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1341
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1342
        // Going out from foreground and number entry is open.
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1343
        // Make sure that dtmf playing is stopped ( EEventKeyUp may be missed ).
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1344
        iStateMachine->SendPhoneEngineMessage( MPEPhoneModel::EPEMessageEndDTMF );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1345
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1346
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1347
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1348
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1349
// CPhoneState::HandlePhoneForegroundEventL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1350
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1351
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1352
EXPORT_C void CPhoneState::HandlePhoneForegroundEventL()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1353
    {
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1354
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandlePhoneForegroundEventL( ) ");
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1355
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1356
    // Force Idle to the foreground if a foreground event is received,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1357
    // but Idle is the top application
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1358
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1359
    const TBool idleIsTopApp = iViewCommandHandle->HandleCommandL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1360
        EPhoneViewIsIdleTopApp ) ==
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1361
        EPhoneViewResponseSuccess ;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1362
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1363
    if ( !IsOnScreenDialerSupported() && idleIsTopApp )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1364
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1365
        TBool activatePhone = CPhonePubSubProxy::Instance()->Value(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1366
            KPSUidAiInformation, KActiveIdleState ) == EPSAiNumberEntry;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1367
        if ( activatePhone )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1368
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1369
            // Set Phone as the top application
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1370
            TPhoneCmdParamInteger uidParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1371
            uidParam.SetInteger( KUidPhoneApplication.iUid );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1372
            iViewCommandHandle->ExecuteCommandL( EPhoneViewSetTopApplication,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1373
                &uidParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1374
            NumberEntryManagerL()->CreateNumberEntryL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1375
            SetNumberEntryVisibilityL(ETrue);
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1376
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1377
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1378
        else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1379
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1380
            if ( !iStateMachine->SecurityMode()->IsSecurityMode() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1381
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1382
                __PHONELOG( EBasic, EPhoneControl,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1383
                  "CPhoneState::HandlePhoneForegroundEventL - Force Idle to the foreground" );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1384
                // Bring Idle app to the foreground
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1385
                iViewCommandHandle->ExecuteCommandL( EPhoneViewBringIdleToForeground );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1386
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1387
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1388
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1389
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1390
    if( NumberEntryManagerL()->IsNumberEntryUsedL() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1391
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1392
        iViewCommandHandle->ExecuteCommandL( EPhoneViewSetIncallBubbleTrue );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1393
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1394
    else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1395
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1396
        iViewCommandHandle->ExecuteCommandL( EPhoneViewSetIncallBubbleFalse );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1397
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1398
     }
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1399
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1400
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1401
// CPhoneState::HandlePhoneFocusLostEventL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1402
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1403
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1404
EXPORT_C void CPhoneState::HandlePhoneFocusLostEventL()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1405
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1406
    // Notify that this method is called always when Idle is brought to foreground
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1407
    // See implementation in CPhoneAppUI::HandleWsEventL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1408
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1409
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandlePhoneFocusLostEventL( ) ");
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1410
    // Phone app focus lost -> close Dtmf dialer when visible
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1411
    if ( IsOnScreenDialerSupported() && IsDTMFEditorVisibleL() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1412
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1413
        CloseDTMFEditorL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1414
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1415
    else if ( IsOnScreenDialerSupported() && IsCustomizedDialerVisibleL() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1416
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1417
        CloseCustomizedDialerL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1418
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1419
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1420
    iViewCommandHandle->ExecuteCommandL( EPhoneViewSetIncallBubbleTrue );
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1421
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1422
// ---------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1423
// CPhoneState::HandleIdleForegroundEventL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1424
// ---------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1425
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1426
EXPORT_C void CPhoneState::HandleIdleForegroundEventL()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1427
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1428
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandleIdleForegroundEventL( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1429
    // Empty implementation
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1430
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1431
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1432
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1433
// CPhoneState::HandleEnvironmentChangeL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1434
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1435
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1436
EXPORT_C void CPhoneState::HandleEnvironmentChangeL( const TInt aChanges )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1437
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1438
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandleEnvironmentChangeL( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1439
    __PHONELOG1( EBasic, EPhoneControl, "CPhoneState::HandleEnvironmentChangeL - Changes:  %d ", aChanges );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1440
    // Update the profile display if required
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1441
    if ( aChanges &
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1442
        ( EChangesLocale | EChangesMidnightCrossover | EChangesSystemTime ) )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1443
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1444
        UpdateProfileDisplayL();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1445
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1446
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1447
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1448
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1449
// CPhoneState::HandlePhoneStartupL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1450
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1451
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1452
EXPORT_C void CPhoneState::HandlePhoneStartupL()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1453
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1454
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandlePhoneStartupL( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1455
    // Empty implementation
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1456
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1457
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1458
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1459
// CPhoneState::HandlePropertyChangedL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1460
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1461
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1462
EXPORT_C void CPhoneState::HandlePropertyChangedL(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1463
    const TUid& aCategory,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1464
    const TUint aKey,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1465
    const TInt aValue )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1466
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1467
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1468
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandlePropertyChangedL( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1469
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1470
    __PHONELOG1( EBasic, EPhoneControl,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1471
            "CPhoneState::HandlePropertyChangedL - aCategory= %d", aCategory  );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1472
    __PHONELOG1( EBasic, EPhoneControl,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1473
            "CPhoneState::HandlePropertyChangedL - aKey= %d", aKey  );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1474
    __PHONELOG1( EBasic, EPhoneControl,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1475
            "CPhoneState::HandlePropertyChangedL - aValue= %d", aValue  );
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1476
    if ( aCategory == KPSUidCtsyCallInformation )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1477
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1478
        // Call state event
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1479
        if ( aKey == KCTsyCallState )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1480
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1481
            // Update the incall indicator
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1482
            UpdateIncallIndicatorL( aValue );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1483
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1484
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1485
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1486
    // Telephony information category
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1487
    else if ( aCategory == KPSUidTelInformation
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1488
              && SimState() == EPESimUsable )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1489
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1490
        // Telephony display event
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1491
        if ( aKey == KTelDisplayInfo )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1492
            {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1493
            __PHONELOG( EBasic, EPhoneControl, "CPhoneState::HandlePropertyChangedL - telephony display info received" );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1494
            // Update the operator and profile display
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1495
            UpdateProfileDisplayL();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1496
            }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1497
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1498
    else if ( aCategory == KPSUidStartup && aKey == KStartupSimSecurityStatus )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1499
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1500
        // Show security note, SIM is not valid.
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1501
        if ( aValue == ESimRejected 
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1502
                || aValue == ESimUnaccepted 
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1503
                || aValue == ESimInvalid )
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1504
            {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1505
            __PHONELOG( EBasic, EPhoneControl, "CPhoneStateStartup::HandlePropertyChangedL - SimSecurity status received" );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1506
            StartShowSecurityNoteL();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1507
            }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1508
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1509
    else if ( aCategory == KPSUidHWRM && aKey == KHWRMGripStatus )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1510
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1511
        UpdateCbaSwivelStateChangedL();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1512
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1513
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1514
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1515
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1516
// CPhoneState::HandleCenRepChangeL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1517
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1518
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1519
EXPORT_C void CPhoneState::HandleCenRepChangeL(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1520
    const TUid& /*aUid*/,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1521
    const TUint /*aId*/ )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1522
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1523
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandleCenRepChangeL( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1524
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1525
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1526
// -----------------------------------------------------------
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1527
// CPhoneState::NeedToReturnToForegroundAppL
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1528
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1529
//
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1530
EXPORT_C TBool CPhoneState::NeedToReturnToForegroundAppL() const
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1531
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1532
    return iViewCommandHandle->HandleCommandL(
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1533
        EPhoneViewGetNeedToReturnToForegroundAppStatus ) ==
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1534
        EPhoneViewResponseSuccess;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1535
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1536
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1537
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1538
// CPhoneState::TopAppIsDisplayedL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1539
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1540
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1541
EXPORT_C TBool CPhoneState::TopAppIsDisplayedL() const
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1542
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1543
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::TopAppIsDisplayedL( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1544
    return iViewCommandHandle->HandleCommandL(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1545
        EPhoneViewGetTopApplicationIsDisplayedStatus ) ==
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1546
        EPhoneViewResponseSuccess;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1547
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1548
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1549
// -----------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1550
// CPhoneState::TitlePaneIsVisibleL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1551
// -----------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1552
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1553
TBool CPhoneState::TitlePaneIsVisibleL() const
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1554
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1555
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::TitlePaneIsVisibleL( ) ");
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1556
    return iViewCommandHandle->HandleCommandL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1557
        EPhoneViewGetTitlePaneIsVisibleStatus ) ==
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1558
        EPhoneViewResponseSuccess;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1559
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1560
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1561
// <---------------------------- MENU AND CBA EVENTS ------------------------->
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1562
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1563
EXPORT_C TBool CPhoneState::HandleCommandL( TInt aCommand )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1564
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1565
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandleCommandL( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1566
    TBool commandStatus = ETrue;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1567
    switch( aCommand )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1568
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1569
        case EPhoneEmergencyCmdExit:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1570
            // this should be bypasses?
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1571
        case EPhoneDialerCallHandling:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1572
        case EPhoneCmdBack:
69
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  1573
            CloseClearNumberEntryAndLoadEffectL( EPhoneTransEffectCallUiAppear );
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1574
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1575
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1576
        case EPhoneDialerCmdTouchInput:
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1577
            OpenVkbL();
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1578
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1579
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1580
        case EPhoneNumberAcqCmdSendMessage:
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1581
            // Open the mms editor
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1582
            iViewCommandHandle->ExecuteCommandL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1583
                EPhoneViewSendMessage );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1584
            if ( !IsOnScreenDialerSupported() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1585
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1586
                // Remove number entry from screen
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1587
                iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1588
                // Do state-specific behaviour if number entry is cleared
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1589
                HandleNumberEntryClearedL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1590
                }
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1591
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1592
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1593
        case EPhoneNumberAcqCmdSave:
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1594
            // Open Create contact
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1595
            iViewCommandHandle->ExecuteCommandL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1596
                EPhoneViewAddContact );
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1597
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1598
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1599
        case EPhoneNumberAcqCmdAddToName:
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1600
            // Open the message editor
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1601
            iViewCommandHandle->ExecuteCommandL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1602
                EPhoneViewUpdateContact );
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1603
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1604
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1605
        case EPhoneNumberAcqCmdAddToContacts:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1606
            {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1607
            if ( IsOnScreenDialerSupported() )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1608
                {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1609
                TPhoneCmdParamQuery queryDialogParam;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1610
                    queryDialogParam.SetQueryType( EPhoneContactsListQuery );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1611
                    queryDialogParam.SetQueryResourceId(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1612
                    CPhoneMainResourceResolver::Instance()->
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1613
                    ResolveResourceID( EPhoneAddtoContactsListQuery )  );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1614
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1615
                 // Display dialog
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1616
                iViewCommandHandle->ExecuteCommandL( EPhoneViewShowQuery,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1617
                    &queryDialogParam );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1618
                }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1619
            }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1620
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1621
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1622
        case EPhoneCmdWaitNoteOk:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1623
            // Remove number entry from screen
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1624
            iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNote );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1625
            if ( !IsOnScreenDialerSupported() )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1626
                {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1627
                HandleNumberEntryClearedL();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1628
                }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1629
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1630
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1631
        case EPhoneInCallCmdEndThisOutgoingCall:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1632
            DisconnectCallL();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1633
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1634
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1635
        case EPhoneCmdYesAlsLineChange:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1636
            if( IsAlsLineChangePossible() )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1637
                {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1638
                ChangeAlsLineL();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1639
                }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1640
            else
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1641
                {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1642
                SendGlobalErrorNoteL( EPhoneLineBlockingNote );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1643
                HandleNumberEntryClearedL(); // Set back CBAs
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1644
                }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1645
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1646
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1647
        case EPhoneCmdNoAlsLineChange:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1648
            if ( !IsOnScreenDialerSupported() )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1649
                {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1650
                HandleNumberEntryClearedL();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1651
                }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1652
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1653
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1654
        case EPhoneCmdYesBtDisconnectQuery:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1655
        case EPhoneCmdNoBtDisconnectQuery:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1656
            CPhoneBtaaDisconnectHandler::InstanceL()->HandleQueryDismissL( aCommand );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1657
            // Make sure that query is removed
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1658
            // if there has been also another ( by Cover UI ).
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1659
            iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveQuery );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1660
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1661
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1662
        case EPhoneInCallCmdDeactivateIhf: // fall through
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1663
        case EPhoneInCallCmdActivateIhf:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1664
            SetHandsfreeModeL( aCommand == EPhoneInCallCmdActivateIhf );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1665
             break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1666
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1667
        case EPhoneInCallCmdHandset:    // fall through
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1668
        case EPhoneInCallCmdBtHandsfree:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1669
            CPhoneState::SetBTHandsfreeModeL(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1670
                 aCommand == EPhoneInCallCmdBtHandsfree );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1671
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1672
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1673
        case EPhoneInCallCmdActivatEPhonebook:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1674
            {
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1675
            // Launch Phonebook application
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1676
            TPhoneCmdParamAppInfo appInfoParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1677
            appInfoParam.SetAppUid( KPhoneUidAppPhonebook );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1678
            iViewCommandHandle->ExecuteCommandL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1679
                EPhoneViewActivateApp, &appInfoParam );
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1680
            }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1681
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1682
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1683
        case EPhoneViewYesSingleItemFetch:
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1684
            {
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1685
            if ( IsOnScreenDialerSupported() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1686
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1687
                TBuf<KPhoneNumberEntryBufferSize> fetchContent;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1688
                fetchContent = iViewCommandHandle->FetchContent();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1689
                if ( fetchContent.Length() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1690
                    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1691
                    iViewCommandHandle->ExecuteCommandL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1692
                                            EPhoneViewSetNumberEntryContent,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1693
                                            0,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1694
                                            fetchContent );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1695
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1696
                    CallFromNumberEntryL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1697
                    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1698
                }
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1699
            }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1700
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1701
        case EPhoneNumberAcqCmdToggleNeAlphaMode:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1702
        case EPhoneNumberAcqCmdToggleNeNumericMode:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1703
            {
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1704
            // Toggle mode
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1705
            NumberEntryManagerL()->NumberEntryToggleAlphaNumericModeL();
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1706
            }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1707
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1708
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1709
        case EPhoneCmdYesVideoFailedNoMemorySwitchToVoice:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1710
            DialVoiceCallL();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1711
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1712
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1713
        case EPhoneCmdNoVideoFailedNoMemorySwitchToVoice:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1714
            if ( IsNumberEntryUsedL() )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1715
                {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1716
                // Show the number entry if it exists
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1717
                SetNumberEntryVisibilityL(ETrue);
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1718
                }
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1719
            else if ( NeedToReturnToForegroundAppL() )
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1720
                {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1721
                // Continue displaying current app but set up the
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1722
                // idle screen in the background
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1723
                SetupIdleScreenInBackgroundL();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1724
                }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1725
            else
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1726
                {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1727
                 // Display idle screen
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1728
                DisplayIdleScreenL();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1729
                }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1730
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1731
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1732
        case EPhoneInCallCmdSetVolumeLevel:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1733
            {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1734
            // This command comes from ui control, no need to update
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1735
            // value to control (second parameter set false).
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1736
            ChangeAudioVolumeL( GetVolumeLevel(), EFalse );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1737
            }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1738
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1739
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1740
        case EPhoneDialerCmdHelp:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1741
            if ( FeatureManager::FeatureSupported( KFeatureIdHelp ) )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1742
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1743
                TPtrC contextName;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1744
                contextName.Set( KDATA_DIALER_HLP_MAIN() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1745
                iViewCommandHandle->ExecuteCommandL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1746
                    EPhoneViewLaunchHelpApplication, 0, contextName );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1747
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1748
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1749
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1750
        case EPhoneCmdVideoCallOutOfMemory:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1751
            ShowVideoCallOutOfMemoryNoteL();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1752
            DisconnectCallL();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1753
            break;
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1754
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1755
        case EPhoneCmdUpdateCba:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1756
        case EPhoneDialerValidNumber:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1757
        case EPhoneDialerInvalidNumber:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1758
        case EPhoneCmdBlockingDialogLaunched:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1759
        case EPhoneCmdBlockingDialogClosed:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1760
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1761
            // these command ids are sent by easydialing to communicate to phone app
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1762
            HandleEasyDialingCommandsL( aCommand );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1763
            }
9
8871b09be73b Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 0
diff changeset
  1764
            break;
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1765
                
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1766
        default:
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1767
            if ( IsOnScreenDialerSupported() )
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1768
                {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1769
                // Offer command to view.
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1770
                // Easydialing commands are handled in view, too.
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1771
                TPhoneViewResponseId resId =
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1772
                            iViewCommandHandle->HandleCommandL( aCommand );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1773
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1774
                if( resId == EPhoneViewResponseFailed )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1775
                    {
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1776
                     commandStatus = EFalse;
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1777
                    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1778
                }
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1779
            else
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1780
                {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1781
                commandStatus = EFalse;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1782
                }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1783
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1784
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1785
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1786
    if( !commandStatus && iCustomization )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1787
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1788
        commandStatus = iCustomization->HandleCommandL( aCommand );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1789
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1790
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1791
    return commandStatus;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1792
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1793
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1794
// -----------------------------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1795
// CPhoneState::ProcessCommandL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1796
// -----------------------------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1797
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1798
EXPORT_C TBool CPhoneState::ProcessCommandL( TInt /*aCommand*/ )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1799
    {
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1800
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::ProcessCommandL() ");
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1801
    // no implementation.
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1802
    return EFalse;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1803
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1804
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1805
// <-------------------------- REMOTE CONTROL EVENTS ------------------------->
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1806
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1807
// -----------------------------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1808
// CPhoneState::HandleRemConCommandL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1809
// -----------------------------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1810
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1811
EXPORT_C TBool CPhoneState::HandleRemConCommandL(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1812
    TRemConCoreApiOperationId aOperationId,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1813
    TRemConCoreApiButtonAction /*aButtonAct*/ )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1814
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1815
    TBool handled = EFalse;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1816
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1817
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::MrccatoCommand() ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1818
    switch ( aOperationId )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1819
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1820
        case ERemConCoreApiVolumeUp:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1821
            __PHONELOG( EBasic, EPhoneControl, "CPhoneState::MrccatoCommand ERemConCoreApiVolumeUp" );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1822
            IncreaseAudioVolumeL();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1823
            handled = ETrue;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1824
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1825
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1826
        case ERemConCoreApiVolumeDown:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1827
            __PHONELOG( EBasic, EPhoneControl, "CPhoneState::MrccatoCommand ERemConCoreApiVolumeDown" );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1828
            DecreaseAudioVolumeL();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1829
            handled = ETrue;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1830
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1831
        case ERemConCoreApiMute:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1832
            {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1833
            __PHONELOG( EBasic, EPhoneControl, "CPhoneState::MrccatoCommand ERemConCoreApiMute" );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1834
            iStateMachine->PhoneEngineInfo()->AudioMute() ?
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1835
                iStateMachine->PhoneEngineInfo()->SetAudioMuteCommand( EFalse ):
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1836
                iStateMachine->PhoneEngineInfo()->SetAudioMuteCommand( ETrue );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1837
            iStateMachine->SendPhoneEngineMessage(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1838
                MPEPhoneModel::EPEMessageSetAudioMute );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1839
            handled = ETrue;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1840
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1841
            }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1842
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1843
         default:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1844
             __PHONELOG1( EBasic, EPhoneControl, "CPhoneState::MrccatoCommand MrccatoCmd.Other(%d)", aOperationId );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1845
            // Other commands ignored.
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1846
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1847
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1848
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1849
    return handled;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1850
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1851
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1852
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1853
// CPhoneState::DecreaseAudioVolume()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1854
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1855
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1856
EXPORT_C void CPhoneState::DecreaseAudioVolumeL()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1857
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1858
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::DecreaceAudioVolumeL( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1859
    __ASSERT_DEBUG( iStateMachine->PhoneEngineInfo(),
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1860
        Panic( EPhoneCtrlInvariant ) );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1861
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1862
    TPEAudioOutput output( iStateMachine->PhoneEngineInfo()->AudioOutput() );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1863
     __PHONELOG1( EBasic, EPhoneControl, "CPhoneState::DecreaseAudioVolumeL - audio output =%d", output );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1864
    if( output == EPETTY )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1865
        {
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1866
        SendGlobalInfoNoteL( EPhoneNoteTTYNoAudioControl );
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1867
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1868
    else
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1869
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1870
        TInt audioVolume( iStateMachine->PhoneEngineInfo()->AudioVolume() );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1871
        audioVolume--;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1872
        ChangeAudioVolumeL( audioVolume, ETrue );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1873
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1874
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1875
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1876
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1877
// CPhoneState::IncreaceAudioVolume()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1878
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1879
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1880
EXPORT_C void CPhoneState::IncreaseAudioVolumeL()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1881
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1882
     __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::IncreaceAudioVolumeL( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1883
    __ASSERT_DEBUG( iStateMachine->PhoneEngineInfo(),
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1884
        Panic( EPhoneCtrlInvariant ) );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1885
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1886
    TPEAudioOutput output( iStateMachine->PhoneEngineInfo()->AudioOutput() );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1887
     __PHONELOG1( EBasic, EPhoneControl, "CPhoneState::IncreaseAudioVolumeL - audio output =%d", output );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1888
    if( output == EPETTY )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1889
        {
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1890
        SendGlobalInfoNoteL( EPhoneNoteTTYNoAudioControl );
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1891
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1892
    else
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1893
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1894
        TInt audioVolume( iStateMachine->PhoneEngineInfo()->AudioVolume() );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1895
        audioVolume++;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1896
        ChangeAudioVolumeL( audioVolume, ETrue );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1897
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1898
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1899
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1900
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1901
// CPhoneState::ChangeAudioVolumeL()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1902
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1903
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1904
void CPhoneState::ChangeAudioVolumeL( TInt aLevel, TBool aUpdateControl )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1905
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1906
     __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::ChangeAudioVolumeL( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1907
     __PHONELOG1( EBasic, EPhoneControl, "CPhoneState::ChangeAudioVolumeL - set volume =%d", aLevel );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1908
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1909
    TInt valueToControl = aLevel;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1910
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1911
    // sets value between 1 -10
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1912
    if ( aLevel>=KPhoneVolumeMinValue && aLevel<=KPhoneVolumeMaxValue )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1913
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1914
        iStateMachine->PhoneEngineInfo()->SetAudioVolumeCommand( aLevel );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1915
        // Syncronizes audio volume level between engine and ui
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1916
        // causes EPEMessageAudioVolumeChanged message to phoneUI
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1917
        iStateMachine->SendPhoneEngineMessage(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1918
            MPEPhoneModel::EPEMessageSetAudioVolume );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1919
        }
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1920
    else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1921
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1922
        CAknKeySoundSystem* keySounds =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1923
            static_cast<CAknAppUi*>( EikonEnv()->EikAppUi() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1924
                ->KeySounds();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1925
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1926
        if ( aLevel < KPhoneVolumeMinValue )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1927
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1928
            // Set the volume value to volume control
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1929
            valueToControl = KPhoneVolumeMinValue;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1930
            keySounds->PlaySound( EAvkonSIDVolumeMinTone );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1931
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1932
        else // aLevel > KPhoneVolumeMaxValue
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1933
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1934
            // Set the volume value to volume control
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1935
            valueToControl = KPhoneVolumeMaxValue;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1936
            keySounds->PlaySound( EAvkonSIDVolumeMaxTone );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1937
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1938
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1939
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1940
    if ( aUpdateControl )
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1941
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1942
        // Update the volume display.
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1943
        // Upper max (11) and under min (-1)
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1944
        // values are also updated to volume popup.
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1945
        TPhoneCmdParamInteger volumeParam;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1946
        volumeParam.SetInteger( valueToControl );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1947
        iViewCommandHandle->ExecuteCommandL(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1948
            EPhoneViewSetNaviPaneAudioVolume,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1949
            &volumeParam );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1950
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1951
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1952
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1953
// <-------------------------- COMMON STATE FUNCTIONS ------------------------>
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1954
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1955
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1956
// CPhoneState::DialMultimediaCallL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1957
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1958
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1959
EXPORT_C void CPhoneState::DialMultimediaCallL()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1960
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1961
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::DialMultimediaCall() ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1962
    __ASSERT_DEBUG( iStateMachine->PhoneEngineInfo(),
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1963
        Panic( EPhoneCtrlInvariant ) );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1964
    iStateMachine->PhoneEngineInfo()->SetCallTypeCommand( EPECallTypeVideo );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1965
    iStateMachine->SendPhoneEngineMessage( MPEPhoneModel::EPEMessageDial );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1966
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1967
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1968
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1969
// CPhoneState::DialVoiceCallL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1970
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1971
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1972
EXPORT_C void CPhoneState::DialVoiceCallL()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1973
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1974
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::DialVoiceCallL() ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1975
    __ASSERT_DEBUG( iStateMachine->PhoneEngineInfo(),
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1976
        Panic( EPhoneCtrlInvariant ) );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1977
    // Disable global notes
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1978
    TPhoneCmdParamBoolean globalNotifierParam;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1979
    globalNotifierParam.SetBoolean( ETrue );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1980
    iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1981
            &globalNotifierParam );
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1982
    iStateMachine->PhoneEngineInfo()->SetCallTypeCommand( EPECallTypeCSVoice );
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1983
    iStateMachine->SendPhoneEngineMessage( MPEPhoneModel::EPEMessageDial );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1984
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1985
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1986
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1987
// CPhoneState::DisconnectCallL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1988
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1989
//
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1990
EXPORT_C void CPhoneState::DisconnectCallL()
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1991
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1992
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::DisconnectCallL( ) ");
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1993
    // Fetch active call's id from view
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1994
    TPhoneCmdParamCallStateData callStateData;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1995
    callStateData.SetCallState( EPEStateConnected );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1996
    iViewCommandHandle->HandleCommandL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1997
        EPhoneViewGetCallIdByState, &callStateData );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1998
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  1999
    if( callStateData.CallId() == KErrNotFound )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2000
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2001
        // No connected call, find the hold call
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2002
        callStateData.SetCallState( EPEStateHeld );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2003
        iViewCommandHandle->HandleCommandL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2004
            EPhoneViewGetCallIdByState, &callStateData );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2005
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2006
        if( callStateData.CallId() == KErrNotFound )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2007
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2008
            // No hold call, find the dialing call
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2009
            callStateData.SetCallState( EPEStateDialing );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2010
            iViewCommandHandle->HandleCommandL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2011
                EPhoneViewGetCallIdByState, &callStateData );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2012
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2013
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2014
        if( callStateData.CallId() == KErrNotFound )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2015
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2016
            // No dialing call, find the outgoing call
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2017
            callStateData.SetCallState( EPEStateConnecting );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2018
            iViewCommandHandle->HandleCommandL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2019
                EPhoneViewGetCallIdByState, &callStateData );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2020
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2021
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2022
        if( callStateData.CallId() == KErrNotFound )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2023
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2024
            // No active call, find the disconnectinging call
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2025
            callStateData.SetCallState( EPEStateDisconnecting );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2026
            iViewCommandHandle->HandleCommandL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2027
                EPhoneViewGetCallIdByState, &callStateData );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2028
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2029
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2030
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2031
    if( callStateData.CallId() > KErrNotFound )
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2032
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2033
        // Release the call
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2034
        iStateMachine->SetCallId( callStateData.CallId() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2035
        if( IsVideoCall( callStateData.CallId() ) )
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2036
            {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2037
            // Video call can be released only after we get response to VT Shutdown Command
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2038
            CPhoneMediatorFactory::Instance()->Sender()->IssueCommand( KMediatorVideoTelephonyDomain,
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2039
			                                                           			 KCatPhoneToVideotelCommands,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2040
			                                                           			 EVtCmdReleaseDataport,
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2041
                                                                       TVersion( KPhoneToVideotelCmdVersionMajor,
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2042
                              	                                                 KPhoneToVideotelCmdVersionMinor,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2043
                              	                                                 KPhoneToVideotelCmdVersionBuild ),
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2044
                                                                       KNullDesC8,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2045
                                                                       CPhoneReleaseCommand::NewL( *iStateMachine ) );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2046
            }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2047
        else
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2048
            {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2049
            // Release the call
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2050
            iStateMachine->SendPhoneEngineMessage(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2051
                MPEPhoneModel::EPEMessageRelease );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2052
            }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2053
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2054
    else
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2055
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2056
        __PHONELOG( EOnlyFatal, EPhoneControl,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2057
            "CPhoneState::DisconnectCallL has negative call id!" );
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2058
        }   
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2059
   }
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2060
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2061
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2062
// CPhoneState::DisplayIdleScreenL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2063
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2064
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2065
EXPORT_C void CPhoneState::DisplayIdleScreenL()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2066
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2067
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::DisplayIdleScreenL( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2068
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2069
    // Don't remove reconnect query if it's shown
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2070
    if( !CPhoneReconnectQuery::InstanceL()->IsDisplayingQuery() )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2071
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2072
        // Remove dialogs if necessary
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2073
        iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2074
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2075
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2076
    // Set Empty CBA
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2077
    iCbaManager->SetCbaL( EPhoneEmptyCBA );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2078
    // Bring Idle app to the foreground
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2079
    iViewCommandHandle->ExecuteCommandL( EPhoneViewBringIdleToForeground );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2080
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2081
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2082
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2083
// CPhoneState::SetupIdleScreenInBackgroundL()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2084
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2085
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2086
EXPORT_C void CPhoneState::SetupIdleScreenInBackgroundL()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2087
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2088
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::SetupIdleScreenInBackgroundL( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2089
    // Don't remove reconnect query if it's shown
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2090
    if( !CPhoneReconnectQuery::InstanceL()->IsDisplayingQuery() )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2091
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2092
        iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2093
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2094
    // Return phone to the background
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2095
    iViewCommandHandle->ExecuteCommandL( EPhoneViewSendToBackground );
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2096
    // Set Idle app as the top app to PS key this way we know if need to 
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2097
    // bring idle to fore in next phone acitvation event.
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2098
    iViewCommandHandle->ExecuteCommandL( EPhoneViewSetIdleTopApplication );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2099
    iCbaManager->SetCbaL( EPhoneEmptyCBA );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2100
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2101
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2102
// ---------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2103
// CPhoneState::CallFromNumberEntryL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2104
// ---------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2105
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2106
EXPORT_C void CPhoneState::CallFromNumberEntryL()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2107
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2108
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::CallFromNumberEntryL( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2109
    __ASSERT_DEBUG( iStateMachine->PhoneEngineInfo(),
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2110
        Panic( EPhoneCtrlInvariant ) );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2111
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2112
    if ( IsOnScreenDialerSupported() )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2113
        {
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2114
        if ( IsDTMFEditorVisibleL() ||
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2115
             IsCustomizedDialerVisibleL() )
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2116
            {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2117
            return;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2118
            }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2119
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2120
        else if( IsNumberEntryUsedL() )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2121
            {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2122
            // Query on top of dialer
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2123
            if ( IsAnyQueryActiveL() )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2124
                {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2125
                return;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2126
                }
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2127
            else if ( IsMenuBarVisibleL() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2128
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2129
                iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2130
                return;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2131
                }
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2132
            // Open recent calls list when the number entry is empty
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2133
            TPhoneCmdParamInteger numberEntryCountParam;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2134
            iViewCommandHandle->ExecuteCommandL( EPhoneViewGetNumberEntryCount,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2135
            &numberEntryCountParam );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2136
            TInt neLength( numberEntryCountParam.Integer() );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2137
            TBool startLogs = neLength == 0 ? ETrue : EFalse;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2138
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2139
            if ( startLogs )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2140
                {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2141
                iViewCommandHandle->HandleCommandL(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2142
                EPhoneDialerCmdLog );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2143
                return;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2144
                }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2145
            }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2146
        }
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2147
    
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2148
    // If easydialing has focus, call should be initiated to focused contact.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2149
    if ( IsDialingExtensionInFocusL() )
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2150
        {
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2151
        iViewCommandHandle->HandleCommandL( EEasyDialingVoiceCall );
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2152
        }
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2153
    else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2154
        {  
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2155
        // Get the number entry contents
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2156
        HBufC* phoneNumber = PhoneNumberFromEntryLC();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2157
        
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2158
        // Call the number
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2159
        iStateMachine->PhoneEngineInfo()->SetPhoneNumber( *phoneNumber );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2160
    
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2161
        if ( phoneNumber->Des().Length() < KPhoneValidPhoneNumberLength )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2162
            {
69
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  2163
            CloseClearNumberEntryAndLoadEffectL( EPhoneTransEffectCallUiAppear );
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2164
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2165
    
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2166
        CleanupStack::PopAndDestroy( phoneNumber );        
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2167
    
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2168
        if ( !iCustomization || 
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2169
             !iCustomization->HandleCallFromNumberEntryL() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2170
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2171
            // Customization didn't handle call. Dial voice call
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2172
            // as normally
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2173
            DialVoiceCallL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2174
            }
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2175
        }
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2176
    
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2177
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2178
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2179
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2180
// CPhoneState::DisplayHeaderForCallComingInL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2181
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2182
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2183
EXPORT_C void CPhoneState::DisplayHeaderForCallComingInL(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2184
    TInt aCallId,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2185
    TBool aWaitingCall )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2186
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2187
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::DisplayHeaderForCallComingInL( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2188
    CallheaderManagerL()->DisplayHeaderForCallComingInL( aCallId, aWaitingCall );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2189
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2190
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2191
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2192
// CPhoneState::SetCallHeaderTextsForCallComingInL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2193
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2194
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2195
EXPORT_C void CPhoneState::SetCallHeaderTextsForCallComingInL(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2196
        TInt aCallId,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2197
        TBool aWaitingCall,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2198
        TPhoneCmdParamCallHeaderData* aCallHeaderData )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2199
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2200
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::SetCallHeaderTextsForCallComingInL( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2201
    CallheaderManagerL()->SetCallHeaderTextsForCallComingIn( aCallId, aWaitingCall, aCallHeaderData );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2202
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2203
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2204
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2205
// CPhoneState::DisplayHeaderForOutgoingCallL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2206
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2207
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2208
EXPORT_C void CPhoneState::DisplayHeaderForOutgoingCallL(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2209
    TInt aCallId )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2210
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2211
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::DisplayHeaderForOutgoingCallL( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2212
    CallheaderManagerL()->DisplayHeaderForOutgoingCallL(aCallId);
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2213
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2214
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2215
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2216
// CPhoneState::UpdateSingleActiveCallL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2217
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2218
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2219
EXPORT_C void CPhoneState::UpdateSingleActiveCallL( TInt aCallId )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2220
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2221
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::UpdateSingleActiveCallL( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2222
    // Stop capturing keys
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2223
    CaptureKeysDuringCallNotificationL( EFalse );
69
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  2224
    TransitionHandlerL().BeginUiUpdateLC();
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2225
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2226
    SetTouchPaneButtonEnabled( EPhoneInCallCmdHold );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2227
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2228
    // Update call state
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2229
    TPhoneCmdParamCallHeaderData callHeaderParam;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2230
    callHeaderParam.SetCallState( EPEStateConnected );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2231
    iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2232
        &callHeaderParam );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2233
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2234
    // Update remote info data
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2235
    UpdateRemoteInfoDataL( aCallId );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2236
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2237
    // Create call duration label if enabled
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2238
    TBool callDuration( EFalse );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2239
    CPhoneCenRepProxy::Instance()->GetInt(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2240
            KCRUidLogs, KLogsShowCallDuration, callDuration );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2241
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2242
    if ( callDuration )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2243
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2244
        HandleChangedCallDurationL( aCallId );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2245
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2246
69
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  2247
    TransitionHandlerL().EndUiUpdate();
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2248
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2249
     // Go to current state implementation
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2250
    iCbaManager->UpdateInCallCbaL();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2251
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2252
    //Update state of switch to video or voice call touch button.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2253
    TPECallType type = iStateMachine->PhoneEngineInfo()->CallType( aCallId );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2254
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2255
    if( type == EPECallTypeVideo )
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2256
        {
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2257
        TPhoneCmdParamBoolean booleanParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2258
        booleanParam.SetBoolean( ETrue );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2259
        iViewCommandHandle->ExecuteCommandL( EPhoneViewSetVideoCallFlag, &booleanParam );
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2260
        }
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2261
    else
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2262
        {
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2263
        TPhoneCmdParamBoolean booleanParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2264
        booleanParam.SetBoolean( EFalse );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2265
        iViewCommandHandle->ExecuteCommandL( EPhoneViewSetVideoCallFlag, &booleanParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2266
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2267
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2268
    // Check if application and number entry was open before incoming call. If so give control to number entry 
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2269
	// to prevent flickering
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2270
    if ( NeedToReturnToForegroundAppL() ||  IsAutoLockOn() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2271
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2272
        // If number entry is used set control and visibility.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2273
        if ( IsNumberEntryUsedL() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2274
           {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2275
           iViewCommandHandle->ExecuteCommandL( EPhoneViewSetControlAndVisibility );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2276
           }
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2277
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2278
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2279
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2280
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2281
// CPhoneState::CaptureKeysDuringCallNotificationL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2282
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2283
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2284
EXPORT_C void CPhoneState::CaptureKeysDuringCallNotificationL(
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2285
    TBool aCaptured )
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2286
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2287
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::CaptureKeysDuringCallNotificationL( ) ");
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2288
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2289
    if ( AknLayoutUtils::PenEnabled() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2290
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2291
        //Capture pointer events
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2292
        TPhoneCmdParamBoolean booleanParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2293
        booleanParam.SetBoolean( aCaptured );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2294
        iViewCommandHandle->ExecuteCommandL( EPhoneViewSetPointerCapture, &booleanParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2295
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2296
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2297
    // Determine which view command to execute based on the capture status
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2298
    const TInt viewCommandId = aCaptured ?
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2299
        EPhoneViewStartCapturingKey :
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2300
        EPhoneViewStopCapturingKey;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2301
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2302
    // Capture the App key
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2303
    TPhoneCmdParamKeyCapture appKeyCaptureParam;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2304
    appKeyCaptureParam.SetKey( EStdKeyApplication0 );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2305
    appKeyCaptureParam.SetKeyCode( EKeyApplication0 );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2306
    appKeyCaptureParam.SetCaptureType( EPhoneKeyAllEvents );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2307
    iViewCommandHandle->ExecuteCommandL( viewCommandId, &appKeyCaptureParam );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2308
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2309
    // Capture the Camera key, if it exists
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2310
    if ( FeatureManager::FeatureSupported( KFeatureIdCamera ) )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2311
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2312
        TPhoneCmdParamKeyCapture cameraKeyCaptureParam;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2313
        cameraKeyCaptureParam.SetKey( EStdKeyDevice7 );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2314
        cameraKeyCaptureParam.SetKeyCode( EKeyDevice7 );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2315
        cameraKeyCaptureParam.SetCaptureType( EPhoneKeyAllEvents );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2316
        iViewCommandHandle->ExecuteCommandL( viewCommandId,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2317
            &cameraKeyCaptureParam );
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2318
        }
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2319
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2320
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2321
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2322
// CPhoneState::IsWaitingCallL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2323
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2324
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2325
TBool CPhoneState::IsWaitingCallL( const TInt aCallId  )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2326
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2327
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::IsWaitingCallL( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2328
    return CallheaderManagerL()->IsWaitingCallL( aCallId );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2329
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2330
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2331
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2332
// CPhoneState::UpdateCallHeaderInfoL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2333
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2334
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2335
TPhoneCmdParamCallHeaderData CPhoneState::UpdateCallHeaderInfoL( TInt aCallId )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2336
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2337
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::UpdateCallHeaderInfoL( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2338
    return CallheaderManagerL()->UpdateCallHeaderInfoL( aCallId );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2339
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2340
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2341
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2342
// CPhoneState::UpdateRemoteInfoDataL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2343
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2344
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2345
EXPORT_C void CPhoneState::UpdateRemoteInfoDataL( TInt aCallId )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2346
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2347
    __LOGMETHODSTARTEND( EPhoneControl, "CPhoneState::UpdateRemoteInfoDataL() ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2348
    TPhoneCmdParamCallHeaderData callHeaderParam = UpdateCallHeaderInfoL( aCallId );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2349
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2350
    if( iCustomization )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2351
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2352
        TBuf<KCntMaxTextFieldLength> inCallNumberText( KNullDesC );
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2353
        // incall number text could be 'Call 1', 'Call 2', ...
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2354
        CallheaderManagerL()->GetInCallNumberTextL( aCallId, inCallNumberText );
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2355
        // to check if we have VoIP call in question and fix
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2356
        // parameters if needed
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2357
        iCustomization->ModifyCallHeaderTexts( aCallId, &callHeaderParam,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2358
            inCallNumberText );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2359
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2360
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2361
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2362
    // Update the remote info data in the call header
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2363
    iViewCommandHandle->ExecuteCommandL(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2364
        EPhoneViewUpdateCallHeaderRemoteInfoData,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2365
        aCallId,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2366
        &callHeaderParam );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2367
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2368
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2369
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2370
// CPhoneState::SetCallHeaderType
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2371
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2372
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2373
EXPORT_C void CPhoneState::SetCallHeaderType(
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2374
    const CBubbleManager::TPhoneCallTypeFlags aCallHeaderType )
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2375
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2376
    __LOGMETHODSTARTEND( EPhoneControl, "CPhoneState::SetCallHeaderType() ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2377
    TRAP_IGNORE( CallheaderManagerL()->SetCallHeaderType( aCallHeaderType ) );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2378
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2379
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2380
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2381
// CPhoneState::GetRemoteInfoDataL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2382
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2383
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2384
EXPORT_C void CPhoneState::GetRemoteInfoDataL(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2385
    TInt aCallId,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2386
    TDes& aData )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2387
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2388
    __LOGMETHODSTARTEND( EPhoneControl, "CPhoneState::GetRemoteInfoDataL() ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2389
    CallheaderManagerL()->GetRemoteInfoDataL( aCallId, aData );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2390
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2391
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2392
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2393
// CPhoneState::UpdateCbaSwivelStateChangedL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2394
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2395
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2396
void CPhoneState::UpdateCbaSwivelStateChangedL()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2397
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2398
    __LOGMETHODSTARTEND(EPhoneControl,"CPhoneState::UpdateCbaSwivelStateChangedL()" );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2399
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2400
    TPhoneCmdParamCallStateData callStateData;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2401
    callStateData.SetCallState( EPEStateRinging );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2402
    iViewCommandHandle->HandleCommandL(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2403
        EPhoneViewGetCallIdByState, &callStateData );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2404
    TInt incomingCall = callStateData.CallId();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2405
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2406
    TPhoneCmdParamInteger activeCallCount;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2407
    iViewCommandHandle->ExecuteCommandL(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2408
            EPhoneViewGetCountOfActiveCalls, &activeCallCount );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2409
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2410
    if ( incomingCall > KErrNotFound )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2411
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2412
       if( activeCallCount.Integer() == ENoActiveCalls )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2413
            {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2414
            iCbaManager->UpdateIncomingCbaL( incomingCall );
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2415
            UpdateSilenceButtonDimming();
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2416
            }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2417
        else
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2418
            {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2419
            iCbaManager->UpdateCbaL( EPhoneCallHandlingCallWaitingCBA );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2420
            }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2421
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2422
    else if ( activeCallCount.Integer() != ENoActiveCalls )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2423
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2424
        iCbaManager->UpdateInCallCbaL();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2425
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2426
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2427
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2428
// -----------------------------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2429
// CPhoneState::IsSwivelClosed
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2430
// This function checks from PubSubProxy that is
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2431
// Swivel closed or not in product.
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2432
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2433
// -----------------------------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2434
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2435
EXPORT_C TBool CPhoneState::IsSwivelClosed() const
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2436
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2437
    if( CPhoneCenRepProxy::Instance()->
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2438
            IsTelephonyFeatureSupported( KTelephonyLVFlagSwivelInDevice ))
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2439
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2440
        return CPhonePubSubProxy::Instance()->
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2441
            Value( KPSUidHWRM, KHWRMGripStatus ) == EPSHWRMGripClosed;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2442
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2443
    else
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2444
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2445
        return EFalse;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2446
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2447
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2448
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2449
// <-------------------------- CONTEXT MENU ------------------------->
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2450
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2451
// -----------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2452
// CPhoneState::SetContextMenu
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2453
// -----------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2454
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2455
EXPORT_C void CPhoneState::SetContextMenuL( TInt aResourceId )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2456
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2457
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::SetContextMenuL() ");
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2458
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2459
    TPhoneCmdParamInteger integerParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2460
    TInt resId( CPhoneMainResourceResolver::Instance()->
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2461
                            ResolveResourceID( aResourceId ) );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2462
    integerParam.SetInteger( resId );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2463
    __PHONELOG1( EBasic, EPhoneControl,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2464
                  "CPhoneState::SetContextMenuL : resId =%d",resId );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2465
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2466
    iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateContextMenu,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2467
                                      &integerParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2468
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2469
// -----------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2470
// CPhoneState::UpdateInCallContextMenuL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2471
// -----------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2472
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2473
EXPORT_C void CPhoneState::UpdateInCallContextMenuL()
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2474
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2475
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::UpdateInCallContextMenuL() ");
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2476
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2477
    SetContextMenuL( EPhoneNumberAcqMenubar );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2478
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2479
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2480
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2481
// -----------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2482
// CPhoneState::UpdateIncomingContextMenuL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2483
// -----------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2484
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2485
EXPORT_C void CPhoneState::UpdateIncomingContextMenuL( TInt aCallId )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2486
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2487
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::UpdateIncomingContextMenuL() ");
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2488
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2489
    if( CPhoneState::IsVideoCall ( aCallId ) )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2490
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2491
        SetContextMenuL( EPhoneIncomingVideoCallMenubar );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2492
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2493
    else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2494
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2495
        SetContextMenuL( EPhoneIncomingCallMenubar );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2496
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2497
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2498
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2499
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2500
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2501
// CPhoneState::ShowNoteL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2502
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2503
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2504
EXPORT_C void CPhoneState::ShowNoteL( TInt aResourceId )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2505
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2506
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::ShowNoteL( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2507
    __ASSERT_DEBUG( aResourceId, Panic( EPhoneCtrlParameterNotInitialized ) );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2508
    TPhoneCmdParamNote noteParam;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2509
    noteParam.SetType( EPhoneNotePermanent );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2510
    noteParam.SetResourceId( CPhoneMainResourceResolver::Instance()->
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2511
        ResolveResourceID( aResourceId ) );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2512
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2513
    iViewCommandHandle->ExecuteCommandL( EPhoneViewShowNote, &noteParam );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2514
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2515
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2516
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2517
// CPhoneState::ShowQueryL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2518
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2519
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2520
EXPORT_C void CPhoneState::ShowQueryL( TInt aResourceId )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2521
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2522
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::ShowQueryL( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2523
    __ASSERT_DEBUG( aResourceId, Panic( EPhoneCtrlParameterNotInitialized ) );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2524
    TPhoneCmdParamQuery queryParam;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2525
    queryParam.SetQueryType( EPhoneQueryDialog );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2526
    queryParam.SetQueryResourceId( CPhoneMainResourceResolver::Instance()->
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2527
        ResolveResourceID( aResourceId ) );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2528
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2529
    iViewCommandHandle->ExecuteCommandL( EPhoneViewShowQuery, &queryParam );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2530
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2531
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2532
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2533
// CPhoneState::ShowTextQueryL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2534
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2535
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2536
EXPORT_C void CPhoneState::ShowTextQueryL(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2537
    TInt aDialogResourceId,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2538
    TInt aDefaultCbaResourceId,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2539
    TInt aContentCbaResourceId,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2540
    TDes* aDataText,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2541
    TBool aSendKeyEnabled )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2542
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2543
    __ASSERT_DEBUG( aDialogResourceId &&
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2544
        aDefaultCbaResourceId &&
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2545
        aContentCbaResourceId &&
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2546
        aDataText,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2547
        Panic( EPhoneCtrlParameterNotInitialized ) );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2548
    TPhoneCmdParamQuery queryDialogParam;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2549
    queryDialogParam.SetQueryType( EPhoneTextQueryDialog );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2550
    queryDialogParam.SetQueryResourceId( aDialogResourceId );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2551
    queryDialogParam.SetDefaultCba( aDefaultCbaResourceId );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2552
    queryDialogParam.SetContentCba( aContentCbaResourceId );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2553
    queryDialogParam.SetDataText( aDataText );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2554
    queryDialogParam.SetSendKeyEnabled( aSendKeyEnabled );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2555
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2556
    // Display dialog
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2557
    iViewCommandHandle->ExecuteCommandL( EPhoneViewShowQuery,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2558
        &queryDialogParam );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2559
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2560
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2561
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2562
// CPhoneState::DisplayCallTerminationNoteL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2563
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2564
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2565
EXPORT_C void CPhoneState::DisplayCallTerminationNoteL()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2566
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2567
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::DisplayCallTerminationNoteL( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2568
    __ASSERT_DEBUG( iStateMachine->PhoneEngineInfo(),
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2569
        Panic( EPhoneCtrlInvariant ) );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2570
    if ( CheckIfShowCallTerminationNote() )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2571
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2572
        TBuf<KPhoneMaxCharsInNote> noteText;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2573
        TBuf<KPhoneMaxCharsInNote> postCallLineText;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2574
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2575
        // Post call Line 1: Call Summary
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2576
        LoadResource( postCallLineText, EPhoneNoteTextCallSummary );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2577
        noteText.Append( postCallLineText );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2578
        noteText.Append( KPhoneLineFeed );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2579
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2580
        // Post call Line 2: Duration
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2581
        LoadResource( postCallLineText, EPhoneNoteTextCallDuration );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2582
        noteText.Append( postCallLineText );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2583
        noteText.Append( KPhoneLineFeed );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2584
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2585
        // Post call Line 3: Time, get the format for last call time.
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2586
        LoadResource( postCallLineText, EPhoneCallDurationFormatString );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2587
        TPtrC durationFormat( postCallLineText );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2588
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2589
        // Get the last call duration
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2590
        TTime time( 0 );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2591
        TTimeIntervalSeconds timeInterval =
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2592
            iStateMachine->PhoneEngineInfo()->CallDuration();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2593
        time += timeInterval;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2594
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2595
        // Format the time
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2596
        TBuf<KPhoneMaxTimeDisplayTextLength> timeString( KNullDesC );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2597
        time.FormatL( timeString, durationFormat );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2598
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2599
        AknTextUtils::DisplayTextLanguageSpecificNumberConversion( timeString );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2600
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2601
        noteText.Append( timeString );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2602
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2603
        TPhoneCmdParamGlobalNote globalNoteParam;
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2604
        globalNoteParam.SetType( EAknGlobalInformationNote );
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2605
        globalNoteParam.SetText( noteText );
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2606
        globalNoteParam.SetTone( CAknNoteDialog::ENoTone );
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2607
        iViewCommandHandle->ExecuteCommandL(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2608
            EPhoneViewShowGlobalNote, &globalNoteParam );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2609
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2610
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2611
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2612
// ---------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2613
// CPhoneState::SendGlobalInfoNoteL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2614
// ---------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2615
//
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2616
EXPORT_C void CPhoneState::SendGlobalInfoNoteL( TInt aResourceId )
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2617
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2618
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::SendGlobalInfoNoteL( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2619
    __ASSERT_DEBUG( aResourceId, Panic( EPhoneCtrlParameterNotInitialized ) );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2620
    if ( CPhonePubSubProxy::Instance()->Value(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2621
            KPSUidUikon, KUikGlobalNotesAllowed ) == 1 )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2622
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2623
        // Re-enable global notes
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2624
        TPhoneCmdParamBoolean globalNotifierParam;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2625
        globalNotifierParam.SetBoolean( EFalse );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2626
        iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2627
            &globalNotifierParam );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2628
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2629
        TPhoneCmdParamGlobalNote globalNoteParam;
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2630
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2631
        globalNoteParam.SetType( EAknGlobalInformationNote );
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2632
        globalNoteParam.SetTextResourceId(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2633
            CPhoneMainResourceResolver::Instance()->
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2634
            ResolveResourceID( aResourceId ) );
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2635
        globalNoteParam.SetTone( EAvkonSIDInformationTone );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2636
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2637
        iViewCommandHandle->ExecuteCommandL(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2638
            EPhoneViewShowGlobalNote, &globalNoteParam );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2639
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2640
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2641
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2642
// ---------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2643
//  CPhoneUIController::SendGlobalWarningNoteL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2644
// ---------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2645
//
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2646
EXPORT_C void CPhoneState::SendGlobalWarningNoteL( TInt aResourceId )
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2647
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2648
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::SendGlobalWarningNoteL( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2649
    __ASSERT_DEBUG( aResourceId, Panic( EPhoneCtrlParameterNotInitialized ) );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2650
    if ( CPhonePubSubProxy::Instance()->Value(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2651
            KPSUidUikon, KUikGlobalNotesAllowed ) == 1 ||
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2652
            SimState() == EPESimReadable )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2653
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2654
        // Re-enable global notes
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2655
        TPhoneCmdParamBoolean globalNotifierParam;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2656
        globalNotifierParam.SetBoolean( EFalse );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2657
        iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2658
            &globalNotifierParam );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2659
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2660
        TPhoneCmdParamGlobalNote globalNoteParam;
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2661
        globalNoteParam.SetType( EAknGlobalWarningNote );
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2662
        globalNoteParam.SetTextResourceId(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2663
            CPhoneMainResourceResolver::Instance()->
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2664
            ResolveResourceID( aResourceId ) );
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2665
        globalNoteParam.SetTone( EAvkonSIDWarningTone );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2666
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2667
        iViewCommandHandle->ExecuteCommandL(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2668
            EPhoneViewShowGlobalNote, &globalNoteParam );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2669
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2670
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2671
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2672
// ---------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2673
//  CPhoneUIController::SendGlobalErrorNoteL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2674
// ---------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2675
//
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2676
EXPORT_C void CPhoneState::SendGlobalErrorNoteL( TInt aResourceId )
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2677
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2678
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::SendGlobalErrorNoteL( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2679
    __ASSERT_DEBUG( aResourceId, Panic( EPhoneCtrlParameterNotInitialized ) );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2680
    if ( CPhonePubSubProxy::Instance()->Value(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2681
            KPSUidUikon, KUikGlobalNotesAllowed ) == 1 )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2682
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2683
        // Re-enable global notes
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2684
        TPhoneCmdParamBoolean globalNotifierParam;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2685
        globalNotifierParam.SetBoolean( EFalse );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2686
        iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2687
            &globalNotifierParam );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2688
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2689
        TPhoneCmdParamGlobalNote globalNoteParam;
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2690
        globalNoteParam.SetType( EAknGlobalErrorNote );
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2691
        globalNoteParam.SetTextResourceId(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2692
            CPhoneMainResourceResolver::Instance()->
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2693
            ResolveResourceID( aResourceId ) );
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2694
        globalNoteParam.SetTone( CAknNoteDialog::EErrorTone );
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2695
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2696
        iViewCommandHandle->ExecuteCommandL(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2697
            EPhoneViewShowGlobalNote, &globalNoteParam );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2698
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2699
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2700
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2701
// ---------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2702
// CPhoneState::SetHandsfreeModeL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2703
// ---------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2704
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2705
EXPORT_C void CPhoneState::SetHandsfreeModeL( TBool aHandsfreeMode )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2706
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2707
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::SetHandsfreeModeL( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2708
    CPhoneAccessoryBTHandler* bt = CPhoneAccessoryBTHandler::NewLC(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2709
        iViewCommandHandle, iStateMachine, this );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2710
    if ( !bt->SetHandsfreeModeL( aHandsfreeMode ))
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2711
        {
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2712
        SendGlobalErrorNoteL( EPhoneNoteTextNotAllowed );
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2713
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2714
    CleanupStack::PopAndDestroy( bt );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2715
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2716
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2717
// ---------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2718
// CPhoneState::SetBTHandsfreeModeL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2719
// ---------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2720
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2721
EXPORT_C void CPhoneState::SetBTHandsfreeModeL( TBool aHandsfreeMode )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2722
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2723
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::SetBTHandsfreeModeL( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2724
    CPhoneAccessoryBTHandler* bt = CPhoneAccessoryBTHandler::NewLC(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2725
        iViewCommandHandle, iStateMachine, this );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2726
    if ( !bt->SetBTHandsfreeModeL( aHandsfreeMode ))
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2727
        {
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2728
        SendGlobalErrorNoteL( EPhoneNoteTextNotAllowed );
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2729
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2730
    CleanupStack::PopAndDestroy( bt );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2731
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2732
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2733
// <-------------------------- INTERNAL FUNCTIONS ------------------------>
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2734
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2735
// -----------------------------------------------------------
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2736
// CPhoneState::UpdateIncallIndicatorL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2737
// -----------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2738
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2739
void CPhoneState::UpdateIncallIndicatorL( TInt aCallState )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2740
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2741
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::UpdateIncallIndicatorL( ) ");
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2742
    TPhoneCmdParamIncallIndicatorData incallIndicatorParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2743
    // Set the state.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2744
    incallIndicatorParam.SetCallState( aCallState );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2745
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2746
    if((aCallState == EPSCTsyCallStateUninitialized) || 
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2747
       (aCallState == EPSCTsyCallStateNone))
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2748
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2749
        incallIndicatorParam.SetLittleBubbleVisible( EFalse );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2750
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2751
    else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2752
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2753
        SetLittleBubbleVisibilityL(&incallIndicatorParam);
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2754
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2755
    
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2756
    // Set mode
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2757
    incallIndicatorParam.SetMode(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2758
       CPhonePubSubProxy::Instance()->Value(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2759
            KPSUidCtsyCallInformation,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2760
            KCTsyCallType ) );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2761
            
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2762
    TInt activeCallId = GetActiveCallIdL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2763
    if ( activeCallId > KErrNone )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2764
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2765
        if ( iStateMachine->PhoneEngineInfo()->CallALSLine( activeCallId )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2766
             == CCCECallParameters::ECCELineTypeAux )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2767
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2768
            incallIndicatorParam.SetLine2( ETrue );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2769
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2770
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2771
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2772
    // Set the mute status
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2773
    const TBool audioMute = iStateMachine->PhoneEngineInfo()->AudioMute();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2774
    incallIndicatorParam.SetMute( audioMute );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2775
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2776
    // Set the voice privacy status
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2777
    if ( activeCallId > KErrNotFound && activeCallId != KConferenceCallId  )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2778
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2779
        incallIndicatorParam.SetCiphering(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2780
            iStateMachine->PhoneEngineInfo()->IsSecureCall( activeCallId ) );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2781
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2782
    else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2783
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2784
        incallIndicatorParam.SetCiphering( ETrue );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2785
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2786
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2787
    incallIndicatorParam.SetCipheringIndicatorAllowed(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2788
        iStateMachine->PhoneEngineInfo()->SecureSpecified() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2789
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2790
    // Set the emergency status
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2791
    if( EPEStateIdle != iStateMachine->PhoneEngineInfo()->CallState( KPEEmergencyCallId ) )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2792
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2793
        incallIndicatorParam.SetEmergency( ETrue );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2794
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2795
    
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2796
    // Update the in-call indicator
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2797
    iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateIncallIndicator,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2798
        &incallIndicatorParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2799
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2800
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2801
// -----------------------------------------------------------
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2802
// CPhoneState::UpdateProfileDisplayL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2803
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2804
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2805
void CPhoneState::UpdateProfileDisplayL()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2806
    {
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2807
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::UpdateProfileDisplayL( ) ");
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2808
    // Get the profile information
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2809
    const TInt profileId =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2810
        iStateMachine->PhoneEngineInfo()->ProfileId();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2811
    TPEProfileName profileName =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2812
        iStateMachine->PhoneEngineInfo()->ProfileName();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2813
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2814
    HBufC* profileString = HBufC::NewLC( profileName.Length() +
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2815
        KPhoneMaxDateDisplayTextLength );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2816
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2817
    TPtr profileNameBuf = profileString->Des();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2818
    profileNameBuf.Zero();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2819
    profileNameBuf.Append( profileName );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2820
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2821
    if ( ( profileId == EProfileGeneralId ) ||
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2822
        ( profileId == EProfileOffLineId ) )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2823
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2824
        // Show date instead of profile name on navi pane
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2825
        HBufC* buffer = HBufC::NewLC( KPhoneMaxDateDisplayTextLength );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2826
        TPtr dateString( buffer->Des() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2827
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2828
        TTime time;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2829
        time.HomeTime();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2830
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2831
        // Get date string
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2832
        CCoeEnv* coeEnv = CCoeEnv::Static();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2833
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2834
        HBufC* dateFormatString =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2835
            StringLoader::LoadLC( R_QTN_DATE_USUAL_WITH_ZERO, coeEnv );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2836
        time.FormatL( dateString, *dateFormatString );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2837
        CleanupStack::PopAndDestroy( dateFormatString );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2838
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2839
        // To arabic
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2840
        AknTextUtils::DisplayTextLanguageSpecificNumberConversion(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2841
            dateString );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2842
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2843
        //Get week day abbreviation
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2844
        TDayNameAbb wkDayAbb = TDayNameAbb();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2845
        wkDayAbb.Set(time.DayNoInWeek());
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2846
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2847
        //Get time format string
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2848
        HBufC* timeFormat = StringLoader::LoadLC(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2849
            CPhoneMainResourceResolver::Instance()->
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2850
                ResolveResourceID( EPhoneIdleTimeFormat ),
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2851
            coeEnv );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2852
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2853
        //Set date and weekdays to time format
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2854
        profileNameBuf.Zero();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2855
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2856
        StringLoader::Format(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2857
            profileNameBuf,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2858
            *timeFormat,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2859
            1, // date
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2860
            dateString );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2861
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2862
        dateString.Copy( profileNameBuf );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2863
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2864
        StringLoader::Format(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2865
            profileNameBuf,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2866
            dateString,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2867
            0, // weekday
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2868
            wkDayAbb );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2869
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2870
        CleanupStack::PopAndDestroy( timeFormat );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2871
        CleanupStack::PopAndDestroy( buffer );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2872
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2873
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2874
    // Set silence indicator based on the ringing profile
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2875
    const TProfileRingingType ringingType =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2876
        iStateMachine->PhoneEngineInfo()->RingingType();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2877
    if ( ringingType == EProfileRingingTypeSilent )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2878
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2879
        TBuf< 1 > silent;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2880
        silent.Append( KPuaCodeSilentSymbol );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2881
        profileNameBuf.Insert( 0, silent );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2882
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2883
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2884
    // Update the profile display on the navi pane
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2885
    iViewCommandHandle->ExecuteCommandL( EPhoneViewSetNaviPaneContent, 0,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2886
        profileNameBuf );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2887
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2888
    if ( profileId == EProfileOffLineId )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2889
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2890
        iViewCommandHandle->ExecuteCommandL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2891
            EPhoneViewSetTitlePaneContent,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2892
            0,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2893
            profileName );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2894
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2895
    else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2896
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2897
        UpdateOperatorDisplayL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2898
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2899
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2900
    CleanupStack::PopAndDestroy( profileString );
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2901
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  2902
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2903
// -----------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2904
// CPhoneState::UpdateOperatorDisplayL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2905
// -----------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2906
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2907
void CPhoneState::UpdateOperatorDisplayL()
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2908
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2909
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::UpdateOperatorDisplayL( ) ");
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2910
    __PHONELOG( EBasic, EPhoneControl, "CPhoneState::UpdateOperatorDisplayL" );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2911
    // Get current title pane content.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2912
    TTelTitleDisplay titleContent;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2913
    titleContent.iDisplayTag.Zero();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2914
    titleContent.iLogoHandle = 0;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2915
    TPckg<TTelTitleDisplay> titlePckg( titleContent );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2916
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2917
    RProperty::Get(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2918
        KPSUidTelInformation,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2919
        KTelDisplayInfo,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2920
        titlePckg );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2921
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2922
    if ( TitlePaneIsVisibleL() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2923
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2924
        // There is a title pane icon.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2925
        if ( titleContent.iLogoHandle != 0 )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2926
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2927
            // Set new logo.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2928
            __PHONELOG( EBasic, EPhoneControl,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2929
                "CPhoneState::UpdateOperatorDisplayL - logo found" );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2930
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2931
            if( iLogoHandle != titleContent.iLogoHandle )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2932
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2933
                 __PHONELOG( EBasic, EPhoneControl,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2934
                  "CPhoneState::UpdateOperatorDisplayL - set new logo" );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2935
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2936
                 TPhoneCmdParamBitmap bitmapParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2937
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2938
                 // Duplicate bitmap from handle.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2939
                 CFbsBitmap* bitmap = new (ELeave) CFbsBitmap;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2940
                 CleanupStack::PushL( bitmap );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2941
                 User::LeaveIfError(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2942
                         bitmap->Duplicate( titleContent.iLogoHandle ) );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2943
                 bitmapParam.SetBitmap( bitmap );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2944
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2945
                 // Duplicate and set bitmap mask if needed
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2946
                 CFbsBitmap* maskBitmap = NULL;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2947
                 if( titleContent.iLogoMaskHandle != 0 )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2948
                     {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2949
                     maskBitmap = new( ELeave )CFbsBitmap;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2950
                     CleanupStack::PushL( maskBitmap );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2951
                     User::LeaveIfError( maskBitmap->Duplicate(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2952
                             titleContent.iLogoMaskHandle ) );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2953
                     bitmapParam.SetMaskBitmap( maskBitmap );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2954
                     }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2955
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2956
                 iViewCommandHandle->ExecuteCommandL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2957
                         EPhoneViewSetTitlePanePicture,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2958
                         &bitmapParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2959
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2960
                 // The title pane takes ownership of the bitmaps so no need
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2961
                 // to destroy it here.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2962
                 if( maskBitmap )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2963
                     {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2964
                     // Pop maskBitmap only, if it has been created
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2965
                     CleanupStack::Pop( maskBitmap );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2966
                     }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2967
                 CleanupStack::Pop( bitmap );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2968
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2969
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2970
        else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2971
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2972
            __PHONELOG1( EBasic, EPhoneControl,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2973
            "CPhoneState::UpdateOperatorDisplayL - set text=%S", &titleContent.iDisplayTag );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2974
            iLogoHandle = titleContent.iLogoHandle;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2975
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2976
            iViewCommandHandle->ExecuteCommandL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2977
                EPhoneViewSetTitlePaneContent,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2978
                0,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2979
                titleContent.iDisplayTag );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2980
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2981
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2982
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2983
    // Check background image.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2984
    TPhoneCmdParamBitmap savedBitmapParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2985
    iViewCommandHandle->ExecuteCommandL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2986
        EPhoneViewGetBackgroundImageBitmap,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2987
        &savedBitmapParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2988
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2989
    if ( titleContent.iBackgroundImageHandle !=
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2990
        savedBitmapParam.Bitmap()->Handle() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2991
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2992
        __PHONELOG2( EBasic, EPhoneControl,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2993
        "CPhoneState::UpdateOperatorDisplayL - update background image since different titleContent(%d), saved(%d)",
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2994
            titleContent.iBackgroundImageHandle, savedBitmapParam.Bitmap()->Handle() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2995
        // Background image has changed. Duplicate bitmap from handle if
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2996
        // available; otherwise reset the background image
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2997
        CFbsBitmap* bitmap = new (ELeave) CFbsBitmap;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2998
        CleanupStack::PushL( bitmap );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  2999
        TInt err = KErrNone;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3000
        if ( titleContent.iBackgroundImageHandle != 0 )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3001
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3002
            err = bitmap->Duplicate( titleContent.iBackgroundImageHandle );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3003
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3004
        else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3005
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3006
            bitmap->Reset();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3007
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3008
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3009
        if ( err == KErrNone )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3010
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3011
            iBitmapRedrawCounter = titleContent.iBackgroundImageRedrawCounter;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3012
            TPhoneCmdParamBitmap bitmapParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3013
            bitmapParam.SetBitmap( bitmap );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3014
            iViewCommandHandle->ExecuteCommandL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3015
                EPhoneViewSetBackgroundImageBitmap,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3016
                &bitmapParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3017
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3018
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3019
        CleanupStack::PopAndDestroy( bitmap );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3020
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3021
    else if ( titleContent.iBackgroundImageRedrawCounter !=
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3022
                  iBitmapRedrawCounter  )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3023
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3024
        iBitmapRedrawCounter = titleContent.iBackgroundImageRedrawCounter;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3025
        iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateView );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3026
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3027
    }
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3028
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3029
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3030
// CPhoneState::HandleInitiatedEmergencyCallL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3031
// Default handling for EPEMessageInitiatedEmergencyCallL message
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3032
// (other items were commented in a header).
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3033
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3034
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3035
void CPhoneState::HandleInitiatedEmergencyCallL( TInt /*aCallId*/ )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3036
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3037
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandleInitiatedEmergencyCallL( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3038
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3039
    iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3040
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3041
    // Stop tone playing, if necessary
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3042
    iViewCommandHandle->ExecuteCommandL( EPhoneViewStopRingTone );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3043
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3044
    // Reset Hold flag to view
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3045
    TPhoneCmdParamBoolean holdFlag;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3046
    holdFlag.SetBoolean( EFalse );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3047
    iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3048
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3049
    // Undim Answer button for sure.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3050
    SetTouchPaneButtonEnabled( EPhoneCallComingCmdAnswer );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3051
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3052
    // Go to emergency call state
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3053
    // No need update cba
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3054
    iStateMachine->ChangeState( EPhoneStateEmergency );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3055
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3056
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3057
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3058
// CPhoneState::HandleInitiatedEmergencyWhileActiveVideoL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3059
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3060
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3061
void CPhoneState::HandleInitiatedEmergencyWhileActiveVideoL()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3062
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3063
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandleInitiatedEmergencyWhileActiveVideoL( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3064
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3065
    // We have existing video call so need to release dataport before continuing
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3066
    // emergency call. Otherwise we will face problems with dataport use later.
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3067
    CPhoneMediatorFactory::Instance()->Sender()->IssueCommand( 
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3068
            KMediatorVideoTelephonyDomain,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3069
            KCatPhoneToVideotelCommands,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3070
            EVtCmdReleaseDataport,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3071
            TVersion( KPhoneToVideotelCmdVersionMajor,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3072
                    KPhoneToVideotelCmdVersionMinor,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3073
                    KPhoneToVideotelCmdVersionBuild ),
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3074
            KNullDesC8,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3075
            CPhoneContinueEmergencyCallCommand::NewL( *iStateMachine ) );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3076
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3077
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3078
// -----------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3079
// CPhoneState::HandleShowImeiL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3080
// -----------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3081
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3082
void CPhoneState::HandleShowImeiL()
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3083
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3084
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandleShowImeiL( ) ");
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3085
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3086
    if ( IsOnScreenDialerSupported() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3087
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3088
        NumberEntryClearL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3089
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3090
    else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3091
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3092
        // Remove number entry from screen
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3093
        iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3094
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3095
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3096
    // Fetch IMEI
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3097
    TBuf<RMobilePhone::KPhoneSerialNumberSize> serialNumber;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3098
    TPEPhoneIdentityParameters phoneIdentityParameters = iStateMachine->
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3099
        PhoneEngineInfo()->PhoneIdentityParameters();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3100
    serialNumber = phoneIdentityParameters.iSerialNumber;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3101
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3102
    // Add it to the resource string
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3103
    HBufC* buf = StringLoader::LoadLC(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3104
        CPhoneMainResourceResolver::Instance()->
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3105
        ResolveResourceID(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3106
        EPhonePhoneImeiString ), serialNumber );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3107
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3108
    TPhoneCmdParamNote noteParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3109
    noteParam.SetType( EPhoneNoteCustom );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3110
    noteParam.SetResourceId( CPhoneMainResourceResolver::Instance()->
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3111
        ResolveResourceID( EPhoneInformationWaitNote ) );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3112
    noteParam.SetText( *buf );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3113
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3114
    // Display note
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3115
    iViewCommandHandle->ExecuteCommandL( EPhoneViewShowNote, &noteParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3116
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3117
    CleanupStack::PopAndDestroy( buf );
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3118
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3119
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3120
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3121
// CPhoneState::HandleCallSecureStatusChangeL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3122
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3123
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3124
void CPhoneState::HandleCallSecureStatusChangeL( TInt aCallId )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3125
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3126
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandleCallSecureStatusChangeL( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3127
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3128
    TBool ciphering( ETrue );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3129
    TBool secureSpecified( ETrue );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3130
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3131
    if ( aCallId > KErrNotFound )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3132
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3133
        ciphering = iStateMachine->PhoneEngineInfo()->IsSecureCall( aCallId );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3134
        secureSpecified = iStateMachine->PhoneEngineInfo()->SecureSpecified();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3135
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3136
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3137
    TPhoneCmdParamCallHeaderData callHeaderParam;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3138
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3139
    callHeaderParam.SetCiphering( ciphering );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3140
    callHeaderParam.SetCipheringIndicatorAllowed( secureSpecified );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3141
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3142
    iViewCommandHandle->ExecuteCommandL(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3143
        EPhoneViewCipheringInfoChange,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3144
        aCallId,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3145
        &callHeaderParam );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3146
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3147
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3148
// -----------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3149
// CPhoneState::HandleShowLifeTimerL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3150
// -----------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3151
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3152
void CPhoneState::HandleShowLifeTimerL()
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3153
   {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3154
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandleShowLifeTimerL( ) ");
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3155
    if ( IsOnScreenDialerSupported() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3156
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3157
        NumberEntryClearL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3158
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3159
    else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3160
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3161
        // Remove number entry from screen
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3162
        iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3163
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3164
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3165
    // Fetch LifeTime
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3166
    TPELifeTimeData lifeTimeData = iStateMachine->
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3167
        PhoneEngineInfo()->LifeTimerData();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3168
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3169
    TLocale locale;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3170
    TBuf<KTimerTextLength> lifetimerText;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3171
    lifetimerText.NumFixedWidth(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3172
        lifeTimeData.iHours,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3173
        EDecimal,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3174
        KPhoneLifeTimerHoursLength );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3175
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3176
    lifetimerText.Append(locale.TimeSeparator( KTimerMinuteSeparator ) );   // minute seperator
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3177
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3178
    TBuf<KPhoneLifeTimerMinutesLength> mins;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3179
    mins.NumFixedWidth(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3180
        lifeTimeData.iMinutes,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3181
        EDecimal,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3182
        KPhoneLifeTimerMinutesLength );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3183
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3184
    lifetimerText.Append(mins);
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3185
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3186
    // Add it to the resource string
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3187
    HBufC* buf = StringLoader::LoadLC(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3188
        CPhoneMainResourceResolver::Instance()->
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3189
        ResolveResourceID(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3190
        EPhoneLifeTimeFormat ), lifetimerText );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3191
    TPhoneCmdParamNote noteParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3192
    noteParam.SetType( EPhoneNoteCustom );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3193
    noteParam.SetResourceId( CPhoneMainResourceResolver::Instance()->
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3194
        ResolveResourceID( EPhoneInformationWaitNote ) );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3195
    noteParam.SetText( *buf );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3196
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3197
    // Display note
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3198
    iViewCommandHandle->ExecuteCommandL( EPhoneViewShowNote, &noteParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3199
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3200
    CleanupStack::PopAndDestroy( buf );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3201
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3202
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3203
// ---------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3204
// CPhoneState::IsVideoCall
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3205
// ---------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3206
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3207
EXPORT_C TBool CPhoneState::IsVideoCall( const TInt aCallId )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3208
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3209
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::IsVideoCall( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3210
    TBool isVideoCall( EFalse );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3211
    TRAP_IGNORE( isVideoCall = CallheaderManagerL()->IsVideoCall( aCallId ) );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3212
    __PHONELOG1( EBasic, EPhoneControl, 
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3213
        "CPhoneState::IsVideoCall isVideoCall(%d)",
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3214
        isVideoCall );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3215
    return isVideoCall;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3216
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3217
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3218
// ---------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3219
// CPhoneState::ChangeAlsLineL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3220
// ---------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3221
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3222
void CPhoneState::ChangeAlsLineL()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3223
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3224
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::ChangeAlsLineL( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3225
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3226
    if ( !IsOnScreenDialerSupported() )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3227
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3228
        // Do state-specific operation when number entry is cleared
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3229
        HandleNumberEntryClearedL();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3230
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3231
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3232
    CCCECallParameters::TCCELineType currentLine;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3233
    TSSSettingsAlsValue newLine( ESSSettingsAlsPrimary );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3234
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3235
    currentLine = iStateMachine->PhoneEngineInfo()->ALSLine();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3236
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3237
    if ( currentLine == CCCECallParameters::ECCELineTypePrimary )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3238
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3239
        newLine = ESSSettingsAlsAlternate;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3240
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3241
    else if ( currentLine == CCCECallParameters::ECCELineTypeAux )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3242
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3243
        newLine = ESSSettingsAlsPrimary;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3244
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3245
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3246
    RSSSettings ssSettings;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3247
    TInt retValue = ssSettings.Open();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3248
    __PHONELOG1( EBasic, EPhoneControl,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3249
            "CPhoneState::ChangeAlsLineL : Open %d", retValue );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3250
    if ( retValue == KErrNone )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3251
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3252
        retValue = ssSettings.Set( ESSSettingsAls, newLine );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3253
        __PHONELOG1( EBasic, EPhoneControl,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3254
            "CPhoneState::ChangeAlsLineL : Set %d", retValue );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3255
        ssSettings.Close();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3256
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3257
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3258
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3259
// ---------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3260
// CPhoneState::GetActiveCallIdL()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3261
// ---------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3262
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3263
TInt CPhoneState::GetActiveCallIdL()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3264
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3265
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::GetActiveCallId()( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3266
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3267
    // Fetch active call's id from view
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3268
    TPhoneViewResponseId response;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3269
    TPhoneCmdParamCallStateData callStateData;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3270
    callStateData.SetCallState( EPEStateConnected );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3271
    response = iViewCommandHandle->HandleCommandL(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3272
        EPhoneViewGetCallIdByState, &callStateData );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3273
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3274
    if ( response == EPhoneViewResponseSuccess &&
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3275
         callStateData.CallId() < 0 )  // no connected calls
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3276
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3277
        // check for held call
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3278
        callStateData.SetCallState( EPEStateHeld );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3279
        response = iViewCommandHandle->HandleCommandL(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3280
            EPhoneViewGetCallIdByState, &callStateData );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3281
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3282
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3283
    return callStateData.CallId();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3284
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3285
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3286
// ---------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3287
// CPhoneState::SimState()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3288
// ---------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3289
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3290
EXPORT_C TPESimState CPhoneState::SimState() const
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3291
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3292
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3293
    /*
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3294
    SIM states:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3295
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3296
    EPESimStatusUninitialized = KPEStartupEnumerationFirstValue =100,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3297
    EPESimUsable,       // The Sim card is fully usable.
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3298
    EPESimReadable,     // The SIM card is not fully usable, but the emergency number can be read.
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3299
    EPESimNotReady,     // The Sim card is present but not ready or usable.
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3300
    EPESimNotPresent,   // The Sim card is not present.
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3301
    EPESimNotSupported  // SIM/RUIM is not supported. Some CDMA phones do not support a SIM/RUIM at all.
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3302
    */
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3303
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::SimState()");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3304
    __ASSERT_DEBUG( iStateMachine->PhoneEngineInfo(),
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3305
        Panic( EPhoneCtrlInvariant ) );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3306
    TPESimState simState = iStateMachine->PhoneEngineInfo()->SimState();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3307
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3308
    __PHONELOG1( EBasic, EPhoneControl,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3309
            "CPhoneState::SimState - value= %d", simState );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3310
    return simState;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3311
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3312
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3313
// ---------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3314
// CPhoneState::IsSimOk()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3315
// ---------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3316
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3317
EXPORT_C TBool CPhoneState::IsSimOk()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3318
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3319
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3320
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::IsSimOk()");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3321
    // Phone is interested on Sim state and sim security statuses
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3322
    // Check first Sim state status:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3323
    TBool retVal( ETrue );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3324
    switch ( SimState() )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3325
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3326
        case EPESimNotSupported:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3327
            retVal = EFalse;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3328
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3329
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3330
        case EPESimNotPresent:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3331
            {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3332
            if ( !FeatureManager::FeatureSupported( KFeatureIdOfflineMode ) ||
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3333
                 !FeatureManager::FeatureSupported( KFeatureIdFfSimlessOfflineSupport ) )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3334
                {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3335
                retVal = EFalse;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3336
                }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3337
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3338
            }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3339
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3340
        default:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3341
            break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3342
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3343
    if ( retVal != EFalse )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3344
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3345
        // Sim state is valid, check also Sim security status
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3346
        switch ( SimSecurityStatus() )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3347
            {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3348
            case ESimRejected:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3349
            case ESimUnaccepted:
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3350
            case ESimInvalid:
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3351
                retVal = EFalse;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3352
                break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3353
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3354
            default:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3355
                break;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3356
            }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3357
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3358
    __PHONELOG1( EBasic, EPhoneControl,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3359
            "CPhoneState::IsSimOK - value= %d", retVal );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3360
    return retVal;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3361
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3362
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3363
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3364
// CPhoneState::IsSimStateNotPresentWithSecurityModeEnabled
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3365
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3366
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3367
EXPORT_C TBool CPhoneState::IsSimStateNotPresentWithSecurityModeEnabled()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3368
    {
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3369
    if ( SimState() == EPESimNotPresent && iStateMachine->SecurityMode()->IsSecurityMode() )
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3370
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3371
        return ETrue;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3372
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3373
    else
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3374
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3375
        return EFalse;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3376
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3377
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3378
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3379
// ---------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3380
// CPhoneState::StartAlsLineChangeTimerL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3381
// ---------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3382
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3383
EXPORT_C void CPhoneState::StartAlsLineChangeTimerL()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3384
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3385
    __LOGMETHODSTARTEND( EPhoneControl, "CPhoneState::StartAlsLineChangeTimerL()");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3386
    TBool alsLineAvailable = iStateMachine->PhoneEngineInfo()->ALSLineSupport();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3387
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3388
    if( alsLineAvailable )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3389
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3390
        if( !iAlsLineChangeKeyPressTimer )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3391
            {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3392
            iAlsLineChangeKeyPressTimer = CPhoneTimer::NewL();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3393
            }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3394
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3395
        iAlsLineChangeKeyPressTimer->After( KAlsLineChangeTimerValue,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3396
            TCallBack( AlsLineChangeTimerCallbackL, this ) );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3397
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3398
    else
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3399
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3400
         // Don't bother launching the timer. ALS not supported.
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3401
        __PHONELOG( EBasic, EPhoneControl,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3402
            "CPhoneState::StartAlsLineChangeTimerL - ALS not supported " );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3403
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3404
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3405
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3406
// -----------------------------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3407
// CPhoneState::StartShowSecurityNoteL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3408
// -----------------------------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3409
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3410
EXPORT_C void CPhoneState::StartShowSecurityNoteL()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3411
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3412
    __LOGMETHODSTARTEND( EPhoneControl, "CPhoneState::StartShowSecurityNoteL ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3413
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3414
    // Remove number entry from screen
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3415
    iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry );
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3416
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3417
    TPhoneCmdParamBoolean visibleMode;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3418
    visibleMode.SetBoolean( EFalse );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3419
    iViewCommandHandle->ExecuteCommandL( EPhoneViewSetStatusPaneVisible, &visibleMode );
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3420
    
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3421
    iCbaManager->UpdateCbaL( EPhoneEmptyCBA );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3422
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3423
    TPhoneCmdParamInteger uidParam;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3424
    // Bring Phone app in the foreground
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3425
    uidParam.SetInteger( KUidPhoneApplication.iUid );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3426
    iViewCommandHandle->ExecuteCommandL( EPhoneViewBringAppToForeground,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3427
        &uidParam );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3428
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3429
    // Set Phone as the top application
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3430
    iViewCommandHandle->ExecuteCommandL( EPhoneViewSetTopApplication,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3431
        &uidParam );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3432
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3433
    TInt resourceId ( KErrNone );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3434
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3435
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3436
    switch( SimSecurityStatus() )
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3437
        {
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3438
			  case ESimRejected:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3439
			      {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3440
			      resourceId = CPhoneMainResourceResolver::Instance()->
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3441
              ResolveResourceID( EPhoneSimRejected );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3442
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3443
			      }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3444
			  case ESimUnaccepted:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3445
			      {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3446
			      // insert sim card -note
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3447
            resourceId = CPhoneMainResourceResolver::Instance()->
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3448
              ResolveResourceID( EPhoneSimUnaccepted );	
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3449
			      break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3450
			      }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3451
			  case ESimInvalid:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3452
			      {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3453
			      resourceId = CPhoneMainResourceResolver::Instance()->
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3454
              ResolveResourceID( EPhoneSIMInvalidUICC );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3455
			      break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3456
			      }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3457
        default:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3458
	          {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3459
	          if ( SimState() == EPESimNotPresent )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3460
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3461
                // insert sim card -note
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3462
                resourceId = CPhoneMainResourceResolver::Instance()->
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3463
                    ResolveResourceID( EPhoneSimRemoved );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3464
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3465
	          break;	
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3466
	          }
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3467
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3468
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3469
    if ( resourceId != KErrNone )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3470
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3471
        // Add it to the resource string
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3472
        HBufC* buf = StringLoader::LoadLC( resourceId );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3473
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3474
        TPhoneCmdParamNote noteParam;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3475
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3476
        noteParam.SetResourceId( CPhoneMainResourceResolver::Instance()->
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3477
           ResolveResourceID( EPhoneSecurityInformationNote ) );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3478
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3479
        noteParam.SetText( *buf );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3480
        noteParam.SetTone( CAknNoteDialog::EConfirmationTone );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3481
        noteParam.SetType( EPhoneNoteSecurity );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3482
        // Display note
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3483
        iViewCommandHandle->ExecuteCommandL( EPhoneViewShowNote, &noteParam );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3484
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3485
        CleanupStack::PopAndDestroy( buf );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3486
           
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3487
           
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3488
        // Capture the App key
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3489
        TPhoneCmdParamKeyCapture appKeyCaptureParam;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3490
        appKeyCaptureParam.SetKey( EStdKeyApplication0 );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3491
        appKeyCaptureParam.SetKeyCode( EKeyApplication0 );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3492
        appKeyCaptureParam.SetCaptureType( EPhoneKeyAllEvents );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3493
        iViewCommandHandle->ExecuteCommandL( 
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3494
               EPhoneViewStartCapturingKey, &appKeyCaptureParam );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3495
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3496
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3497
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3498
// ---------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3499
// CPhoneState::AlsLineChangeTimerCallbackL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3500
// ---------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3501
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3502
TInt CPhoneState::AlsLineChangeTimerCallbackL( TAny* aAny )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3503
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3504
    __LOGMETHODSTARTEND( EPhoneControl, "CPhoneState::AlsLineChangeTimerCallbackL()");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3505
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3506
    // Send a key up event for stopping keypad tone
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3507
    reinterpret_cast<CPhoneState*>( aAny )->
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3508
        iStateMachine->SendPhoneEngineMessage(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3509
        MPEPhoneModel::EPEMessageEndDTMF );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3510
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3511
    if ( !( reinterpret_cast<CPhoneState*>( aAny )->
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3512
            IsOnScreenDialerSupported() ) )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3513
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3514
        // If dialer is undefined remove the number entry.
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3515
        reinterpret_cast<CPhoneState*>( aAny )->
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3516
            iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3517
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3518
    else
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3519
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3520
        // If on screen dialer is in use just clear entry
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3521
        // do not remove dialer.
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3522
        reinterpret_cast<CPhoneState*>( aAny )->
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3523
            NumberEntryClearL();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3524
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3525
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3526
    // Show the als line changing confirmation query
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3527
    reinterpret_cast<CPhoneState*>( aAny )->
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3528
        ShowQueryL( EPhoneAlsLineChangeConfirmationQuery );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3529
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3530
    return KErrNone;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3531
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3532
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3533
// ---------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3534
// CPhoneState::ShowWlanMacAddressL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3535
// ---------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3536
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3537
void CPhoneState::ShowWlanMacAddressL()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3538
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3539
    __LOGMETHODSTARTEND( EPhoneControl, "CPhoneState::ShowWlanMacAddressL()");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3540
    if ( IsOnScreenDialerSupported() )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3541
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3542
        NumberEntryClearL();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3543
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3544
    else
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3545
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3546
        // Remove number entry from screen
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3547
        iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3548
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3549
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3550
    // Fetch WLAN MAC address
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3551
    TBuf8<KPhoneWlanMacAddressLength> address;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3552
    RProperty::Get(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3553
        KPSUidWlan,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3554
        KPSWlanMacAddress,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3555
        address );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3556
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3557
    // Format fetched address
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3558
    TBuf<KPhoneWlanMacAddressLength> wlanMACAddress;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3559
    for ( TInt i( 0 ); i < address.Length(); i++ )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3560
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3561
        // Set separator
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3562
        if( i > 0 )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3563
            {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3564
            wlanMACAddress.Append( KPhoneWlanSeparator );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3565
            }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3566
        // Set data
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3567
        TBuf<10> tmp;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3568
        tmp.Format( KWLanMACDataFormat, address[i] );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3569
        wlanMACAddress.Append( tmp );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3570
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3571
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3572
    // Now we need the localised text
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3573
    HBufC* wlanMacAddress = StringLoader::LoadLC(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3574
        CPhoneMainResourceResolver::Instance()->
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3575
        ResolveResourceID( EPhoneWlanMacAddress ), wlanMACAddress );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3576
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3577
    TPhoneCmdParamNote noteParam;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3578
    noteParam.SetType( EPhoneNoteCustom );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3579
    noteParam.SetResourceId( CPhoneMainResourceResolver::Instance()->
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3580
        ResolveResourceID( EPhoneInformationWaitNote ) );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3581
    noteParam.SetText( *wlanMacAddress );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3582
    noteParam.SetTone( CAknNoteDialog::EConfirmationTone );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3583
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3584
    // Display note
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3585
    iViewCommandHandle->ExecuteCommandL( EPhoneViewShowNote, &noteParam );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3586
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3587
    CleanupStack::PopAndDestroy( wlanMacAddress );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3588
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3589
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3590
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3591
// CPhoneState::HandleAudioAvailableOutputChangedL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3592
// Default handling for EPEMessageAvailableAudioOutputsChanged message
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3593
// (other items were commented in a header).
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3594
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3595
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3596
void CPhoneState::HandleAudioAvailableOutputChangedL()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3597
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3598
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandleAudioAvailableOutputChangedL() ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3599
    __ASSERT_DEBUG( iStateMachine->PhoneEngineInfo(),
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3600
        Panic( EPhoneCtrlInvariant ) );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3601
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3602
    TPhoneCmdParamAudioAvailability outputParam;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3603
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3604
    // Output
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3605
    const TPEAudioOutput audioOutput =
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3606
        iStateMachine->PhoneEngineInfo()->AudioOutput();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3607
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3608
    // BT availability
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3609
    TBool btAvailable = iStateMachine->PhoneEngineInfo()->AudioOutputAvailable(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3610
            EPEBTAudioAccessory );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3611
    outputParam.SetBTAccAvailable( btAvailable );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3612
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3613
    // Wired availability
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3614
    TBool wiredAvailable = iStateMachine->PhoneEngineInfo()->AudioOutputAvailable(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3615
            EPEWiredAudioAccessory );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3616
    outputParam.SetWiredAccAvailable( wiredAvailable );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3617
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3618
    // BTA disconnect handler check
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3619
    if( btAvailable )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3620
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3621
        CPhoneBtaaDisconnectHandler::InstanceL()->Cancel();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3622
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3623
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3624
    // view update
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3625
    iViewCommandHandle->ExecuteCommandL( EPhoneViewActivateAudioAvailabilityUIChanges,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3626
        &outputParam );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3627
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3628
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3629
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3630
// ---------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3631
// CPhoneState::IsAlsLineChangePossible
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3632
// ---------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3633
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3634
TBool CPhoneState::IsAlsLineChangePossible()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3635
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3636
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::IsAlsLineChangePossible( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3637
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3638
    TBool isAlsLineChangePossible( ETrue );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3639
    TSSSettingsAlsBlockingValue AlsBlockingValue( ESSSettingsAlsBlockingNotSupported );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3640
    TInt value( 0 );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3641
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3642
    RSSSettings ssSettings;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3643
    TInt retValue = ssSettings.Open();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3644
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3645
    if ( retValue == KErrNone )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3646
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3647
        ssSettings.Get( ESSSettingsAlsBlocking, value );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3648
        ssSettings.Close();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3649
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3650
        AlsBlockingValue = static_cast< TSSSettingsAlsBlockingValue > ( value );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3651
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3652
        if( AlsBlockingValue == ESSSettingsAlsAlternate )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3653
            {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3654
            isAlsLineChangePossible = EFalse;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3655
            }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3656
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3657
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3658
    return isAlsLineChangePossible;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3659
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3660
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3661
// ---------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3662
// CPhoneState::ShowNumberBusyNoteL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3663
// ---------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3664
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3665
EXPORT_C void CPhoneState::ShowNumberBusyNoteL()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3666
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3667
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::ShowNumberBusyNoteL( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3668
    // Re-enable global notes
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3669
    TPhoneCmdParamBoolean globalNotifierParam;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3670
    globalNotifierParam.SetBoolean( EFalse );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3671
    iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3672
        &globalNotifierParam );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3673
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3674
    TInt resource( EPhoneNumberBusy );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3675
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3676
    if( iCustomization )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3677
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3678
        // Get customized text resource for busy note
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3679
        resource = iCustomization->CustomizeBusyNoteText();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3680
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3681
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3682
    // Show number busy note
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3683
    TPhoneCmdParamGlobalNote globalNoteParam;
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3684
    globalNoteParam.SetType( EAknGlobalInformationNote );
69
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  3685
    
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  3686
    if ( CPhoneCenRepProxy::Instance()->
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  3687
            IsTelephonyFeatureSupported( KTelephonyLVFlagClearCodeCustomization ) )
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  3688
        {
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  3689
		// Show varied Number busy -note when clear code customization 
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  3690
		// is enabled
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  3691
        globalNoteParam.SetTextResourceId( R_NOTE_VAR_CAUSE_17 );
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  3692
        }
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  3693
    else
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  3694
        {
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  3695
        globalNoteParam.SetTextResourceId(
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  3696
                CPhoneMainResourceResolver::Instance()->
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  3697
                ResolveResourceID( resource ) );
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  3698
        }
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  3699
    
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3700
    globalNoteParam.SetTone( EAvkonSIDInformationTone );
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3701
    iViewCommandHandle->ExecuteCommandL( EPhoneViewShowGlobalNote,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3702
        &globalNoteParam );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3703
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3704
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3705
// ---------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3706
// CPhoneState::IsAutoLockOn
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3707
// ---------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3708
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3709
EXPORT_C TBool CPhoneState::IsAutoLockOn() const
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3710
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3711
    // Check if phone is locked
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3712
    const TBool phoneIsLocked =
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3713
                CPhonePubSubProxy::Instance()->Value(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3714
                KPSUidCoreApplicationUIs,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3715
                KCoreAppUIsAutolockStatus ) > EAutolockOff;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3716
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3717
    return phoneIsLocked;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3718
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3719
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3720
// ---------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3721
// CPhoneState::IsKeyLockOn
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3722
// ---------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3723
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3724
EXPORT_C TBool CPhoneState::IsKeyLockOn() const
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3725
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3726
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::IsKeyLockOn( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3727
    TPhoneCmdParamBoolean keyLockStatus;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3728
    keyLockStatus.SetBoolean( EFalse );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3729
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3730
    iViewCommandHandle->ExecuteCommand(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3731
            EPhoneViewGetKeyLockStatus,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3732
            &keyLockStatus );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3733
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3734
    __PHONELOG1( EBasic,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3735
            EPhoneControl,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3736
            "CPhoneState::IsKeyLockOn() Lock Status: %d",
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3737
            keyLockStatus.Boolean() );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3738
    return keyLockStatus.Boolean();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3739
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3740
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3741
// ---------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3742
// CPhoneState::CompleteSatRequestL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3743
// ---------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3744
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3745
EXPORT_C void CPhoneState::CompleteSatRequestL( const TInt aCallId )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3746
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3747
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::CompleteSatRequestL( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3748
    iStateMachine->SetCallId( aCallId );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3749
    iStateMachine->SendPhoneEngineMessage(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3750
        MPEPhoneModel::EPEMessageSatCallRequestCompleted );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3751
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3752
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3753
// ---------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3754
// CPhoneState::SetTouchPaneButtons
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3755
// ---------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3756
//
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3757
EXPORT_C void CPhoneState::SetTouchPaneButtons( TInt aResourceId )
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3758
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3759
    if ( FeatureManager::FeatureSupported( KFeatureIdTouchCallHandling ) )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3760
        {
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3761
        TPhoneCmdParamInteger integerParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3762
        integerParam.SetInteger( CPhoneMainResourceResolver::Instance()->
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3763
                                 ResolveResourceID( aResourceId ) );
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3764
        TRAP_IGNORE( iViewCommandHandle->ExecuteCommandL(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3765
                     EPhoneViewSetTouchPaneButtons,
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3766
                     &integerParam ) );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3767
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3768
        SetTouchPaneVisible( ETrue );
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3769
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3770
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3771
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3772
// ---------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3773
// CPhoneState::DeleteTouchPaneButtons
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3774
// ---------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3775
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3776
EXPORT_C void CPhoneState::DeleteTouchPaneButtons()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3777
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3778
    if ( FeatureManager::FeatureSupported( KFeatureIdTouchCallHandling ) )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3779
        {
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3780
        TPhoneCmdParamInteger integerParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3781
        integerParam.SetInteger( 0 );
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3782
        TRAP_IGNORE( iViewCommandHandle->ExecuteCommandL(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3783
                        EPhoneViewSetTouchPaneButtons,
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3784
                        &integerParam ) );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3785
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3786
        SetTouchPaneVisible( EFalse );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3787
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3788
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3789
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3790
// ---------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3791
// CPhoneState::SetTouchPaneVisible
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3792
// ---------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3793
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3794
EXPORT_C void CPhoneState::SetTouchPaneVisible( TBool aVisible )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3795
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3796
    if ( FeatureManager::FeatureSupported( KFeatureIdTouchCallHandling ) )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3797
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3798
        TPhoneCmdParamBoolean booleanParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3799
        booleanParam.SetBoolean( aVisible );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3800
        TRAP_IGNORE( iViewCommandHandle->ExecuteCommandL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3801
                        EPhoneViewSetTouchPaneVisible,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3802
                        &booleanParam ) );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3803
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3804
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3805
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3806
// ----------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3807
// CPhoneState::SetTouchButtonEnabled
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3808
// ----------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3809
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3810
EXPORT_C void CPhoneState::SetTouchPaneButtonEnabled( TInt aCommandId )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3811
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3812
    if ( FeatureManager::FeatureSupported( KFeatureIdTouchCallHandling ) )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3813
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3814
        TPhoneCmdParamInteger commandParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3815
        commandParam.SetInteger( aCommandId );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3816
        iViewCommandHandle->ExecuteCommand( EPhoneViewEnableTouchButton,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3817
                                            &commandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3818
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3819
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3820
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3821
// ----------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3822
// CPhoneState::SetTouchButtonDisabled
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3823
// ----------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3824
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3825
EXPORT_C void CPhoneState::SetTouchPaneButtonDisabled( TInt aCommandId )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3826
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3827
    if ( FeatureManager::FeatureSupported( KFeatureIdTouchCallHandling ) )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3828
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3829
        TPhoneCmdParamInteger commandParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3830
        commandParam.SetInteger( aCommandId );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3831
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3832
        iViewCommandHandle->ExecuteCommand( EPhoneViewDisableTouchButton,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3833
                                            &commandParam );
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3834
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3835
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3836
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3837
// ---------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3838
// CPhoneState::HandleLongHashL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3839
// ---------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3840
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3841
EXPORT_C void CPhoneState::HandleLongHashL()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3842
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3843
    __LOGMETHODSTARTEND( EPhoneControl, "CPhoneState::HandleLongHashL() ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3844
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3845
    TPhoneCmdParamInteger numberEntryCountParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3846
    iViewCommandHandle->ExecuteCommandL( EPhoneViewGetNumberEntryCount,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3847
            &numberEntryCountParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3848
    TInt neLength( numberEntryCountParam.Integer() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3849
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3850
    if( neLength == 1 )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3851
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3852
         if ( !iStateMachine->SecurityMode()->IsSecurityMode() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3853
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3854
            OnlyHashInNumberEntryL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3855
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3856
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3857
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3858
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3859
// -----------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3860
// CPhoneState::OpenVKBL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3861
// -----------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3862
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3863
void CPhoneState::OpenVkbL()
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3864
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3865
    __LOGMETHODSTARTEND( EPhoneControl, "CPhoneState::OpenVKB() ");
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3866
    iViewCommandHandle->ExecuteCommandL( EPhoneViewOpenVirtualKeyBoard );
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3867
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3868
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3869
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3870
// CPhoneState::CheckIfShowTerminationNote
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3871
// This method is intended to be overridden in states
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3872
// that contain more info about decision.
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3873
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3874
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3875
EXPORT_C TBool CPhoneState::CheckIfShowCallTerminationNote( )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3876
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3877
    TBool show = EFalse;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3878
    TInt callSummaryActivated = 0;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3879
    const TInt err = CPhoneCenRepProxy::Instance()->GetInt(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3880
        KCRUidCommonTelephonySettings,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3881
        KSettingsSummaryAfterCall,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3882
        callSummaryActivated );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3883
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3884
    if ( err == KErrNone && callSummaryActivated )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3885
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3886
          show = ETrue;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3887
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3888
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3889
    return show;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3890
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3891
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3892
// -----------------------------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3893
// CPhoneState::HandleDtmfKeyTone
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3894
// Called from KeyEventForwarder
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3895
// Allow only special characters to pass from
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3896
// keyEventForwarder to phoneEngine
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3897
// -----------------------------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3898
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3899
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3900
EXPORT_C void CPhoneState::HandleDtmfKeyToneL( const TKeyEvent& aKeyEvent,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3901
                TEventCode aEventCode )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3902
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3903
    SendDtmfKeyEventL( aKeyEvent, aEventCode );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3904
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3905
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3906
// -----------------------------------------------------------------------------
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3907
// CPhoneState::IsDTMFEditorVisibleL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3908
// -----------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3909
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3910
EXPORT_C TBool CPhoneState::IsDTMFEditorVisibleL() const
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3911
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3912
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::IsDTMFEditorVisibleL( ) ");
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3913
    return iViewCommandHandle->HandleCommandL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3914
        EPhoneViewIsDTMFEditorVisible ) ==
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3915
        EPhoneViewResponseSuccess;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3916
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3917
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3918
// -----------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3919
// CPhoneState::CloseDTMFEditorL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3920
// -----------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3921
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3922
EXPORT_C void CPhoneState::CloseDTMFEditorL()
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3923
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3924
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::CloseDTMFEditorL()");
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3925
    if ( iOnScreenDialer ) // Touch
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3926
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3927
        TPhoneCmdParamBoolean booleanParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3928
        booleanParam.SetBoolean( EFalse );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3929
        iViewCommandHandle->ExecuteCommandL( 
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3930
                EPhoneViewSetDtmfDialerViewVisible,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3931
                &booleanParam );
69
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  3932
        CloseClearNumberEntryAndLoadEffectL( EPhoneTransEffectCallUiAppear );
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3933
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3934
    else // Non-Touch
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3935
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3936
        // If dtmf query is visible then remove number entry
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3937
        // because it should not be shown if user has pressed end key.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3938
        iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3939
        iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveQuery );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3940
        // Do state-specific behaviour if number entry is cleared
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3941
        HandleNumberEntryClearedL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3942
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3943
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3944
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3945
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3946
// CPhoneState::SetDefaultFlagsL()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3947
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3948
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3949
EXPORT_C void CPhoneState::SetDefaultFlagsL()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3950
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3951
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::SetDefaultFlagsL()");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3952
    iViewCommandHandle->ExecuteCommandL( EPhoneViewHideNaviPaneAudioVolume );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3953
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3954
    // Reset Hold flag to view
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3955
    TPhoneCmdParamBoolean holdFlag;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3956
    holdFlag.SetBoolean( EFalse );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3957
    iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3958
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3959
    // Update FSW
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3960
    iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateFSW );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3961
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3962
    // Re-enable global notes
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3963
    TPhoneCmdParamBoolean globalNotifierParam;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3964
    globalNotifierParam.SetBoolean( EFalse );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3965
    iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3966
        &globalNotifierParam );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3967
    iViewCommandHandle->ExecuteCommandL( EPhoneViewSetEikonNotifiersDisabled,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3968
        &globalNotifierParam );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3969
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3970
    // uncapture App and Camera keys if not security mode
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3971
    if ( !iStateMachine->SecurityMode()->IsSecurityMode() )
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3972
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3973
        CaptureKeysDuringCallNotificationL( EFalse );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3974
        }
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3975
    
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3976
    CPhonePubSubProxy::Instance()->ChangePropertyValue(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3977
                    KPSUidScreenSaver,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3978
                    KScreenSaverAllowScreenSaver,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  3979
                    EPhoneScreensaverAllowed );
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3980
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3981
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3982
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3983
// CPhoneState::GetVolumeLevel
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3984
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3985
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3986
TInt CPhoneState::GetVolumeLevel()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3987
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3988
    TPhoneCmdParamInteger integerParam;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3989
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3990
    iViewCommandHandle->ExecuteCommand( EPhoneViewGetAudioVolumeLevel,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3991
                                        &integerParam );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3992
    return integerParam.Integer();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3993
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3994
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3995
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3996
// CPhoneState::ShowVideoCallOutOfMemoryNoteL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3997
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3998
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  3999
void CPhoneState::ShowVideoCallOutOfMemoryNoteL()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4000
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4001
    __LOGMETHODSTARTEND(EPhoneControl,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4002
        "CPhoneState::ShowVideoCallOutOfMemoryNoteL()" );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4003
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4004
    // Re-enable global notes
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4005
    TPhoneCmdParamBoolean globalNotifierParam;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4006
    globalNotifierParam.SetBoolean( EFalse );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4007
    iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4008
        &globalNotifierParam );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4009
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4010
    // Bring Phone app in the foreground
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4011
    TPhoneCmdParamInteger uidParam;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4012
    uidParam.SetInteger( KUidPhoneApplication.iUid );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4013
    iViewCommandHandle->ExecuteCommandL( EPhoneViewBringAppToForeground,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4014
        &uidParam );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4015
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4016
    // Set Phone as the top application
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4017
    iViewCommandHandle->ExecuteCommandL( EPhoneViewSetTopApplication,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4018
        &uidParam );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4019
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4020
    // Display error note
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4021
    SExtendedError ext;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4022
    ext.iComponent = KUidPhoneApplication;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4023
    ext.iErrorNumber = KErrNoMemory;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4024
    ext.iInformation = EFalse;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4025
    TBuf<1> ignore;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4026
    iAvkonAppUi->HandleError( KErrNoMemory, ext, ignore, ignore );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4027
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4028
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4029
// -----------------------------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4030
// CPhoneState::SimSecurityStatus
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4031
// -----------------------------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4032
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4033
TInt CPhoneState::SimSecurityStatus() const
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4034
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4035
    /*
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4036
    Sim security statuses:
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4037
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4038
    ESimSecurityStatusUninitialized = KStartupEnumerationFirstValue,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4039
    ESimRejected,   // The PUK code has been entered incorrectly, so the card is rejected.
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4040
    ESimUnaccepted  // The SIM lock is on, so the card is unaccepted.
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4041
    ESimInvalid     // The Sim inserted is not same as the one provided by the
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4042
                    // operator, so card is invalid.
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4043
    */
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4044
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::SimSecurityStatus()" );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4045
    return CPhonePubSubProxy::Instance()->Value(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4046
                    KPSUidStartup, KStartupSimSecurityStatus );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4047
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4048
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4049
// -----------------------------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4050
// CPhoneState::CallWaitingNoteL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4051
// -----------------------------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4052
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4053
EXPORT_C void CPhoneState::CallWaitingNoteL( TInt aCallId )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4054
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4055
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::CallWaitingNoteL()" );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4056
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4057
    TBuf< KPhoneContactNameMaxLength > callText( KNullDesC );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4058
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4059
    // Set CLI text for the call header
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4060
    const TBool contactInfoAvailable =
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4061
        iStateMachine->PhoneEngineInfo()->RemoteName( aCallId ).Length() ||
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4062
        iStateMachine->PhoneEngineInfo()->RemoteCompanyName( aCallId ).Length();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4063
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4064
    __PHONELOG1( EBasic, EPhoneControl,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4065
        "CPhoneState::CallWaitingNoteL - contactInfoAvailable(%d)", contactInfoAvailable );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4066
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4067
    __PHONELOG1( EBasic, EPhoneControl,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4068
        "CPhoneState::CallWaitingNoteL - remote name(%S)",
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4069
        &iStateMachine->PhoneEngineInfo()->RemoteName( aCallId ) );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4070
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4071
    __PHONELOG1( EBasic, EPhoneControl,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4072
        "CPhoneState::CallWaitingNoteL - company name(%S)",
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4073
        &iStateMachine->PhoneEngineInfo()->RemoteCompanyName( aCallId ) );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4074
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4075
    if ( contactInfoAvailable )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4076
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4077
        // Set Call Text flag to waiting note
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4078
        callText = iStateMachine->PhoneEngineInfo()->RemoteName( aCallId );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4079
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4080
        // if no remote name available then set company name
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4081
        if ( callText == KNullDesC )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4082
            {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4083
            callText = iStateMachine->PhoneEngineInfo()->RemoteCompanyName( aCallId );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4084
            }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4085
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4086
        TPhoneCmdParamGlobalNote globalNoteParam;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4087
        globalNoteParam.SetText( callText );
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4088
        globalNoteParam.SetType( EAknGlobalInformationNote );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4089
        globalNoteParam.SetTone( EAvkonSIDInformationTone );
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4090
        globalNoteParam.SetTextResourceId(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4091
            CPhoneMainResourceResolver::Instance()->
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4092
            ResolveResourceID( EPhoneCallWaitingWithLabel ) );
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4093
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4094
        iViewCommandHandle->ExecuteCommandL(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4095
                EPhoneViewShowGlobalNote, &globalNoteParam );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4096
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4097
    else
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4098
        {
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4099
        SendGlobalInfoNoteL( EPhoneCallWaitingWithoutLabel );
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4100
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4101
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4102
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4103
// ----------------------------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4104
// CPhoneState::SetRingingTonePlaybackL()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4105
// ----------------------------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4106
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4107
EXPORT_C void CPhoneState::SetRingingTonePlaybackL( TInt aCallId )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4108
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4109
    __LOGMETHODSTARTEND(EPhoneControl,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4110
        "CPhoneState::SetRingingTonePlaybackL()" );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4111
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4112
    TPhoneCmdParamRingTone ringToneParam;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4113
    ringToneParam.SetVolume(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4114
        iStateMachine->PhoneEngineInfo()->RingingVolume() );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4115
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4116
    TArray< TContactItemId > alertGroups =
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4117
        iStateMachine->PhoneEngineInfo()->AlertForGroup();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4118
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4119
    TInt alertGroupCount = alertGroups.Count();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4120
    TInt contactGroupCount =
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4121
        iStateMachine->PhoneEngineInfo()->ContactGroups( aCallId ).Count();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4122
    TBool alertingGroupFound( EFalse );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4123
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4124
    // Check contents of both the alerting groups array and call contact group
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4125
    // array, if any of the group ids match then allow playing.
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4126
    if ( alertGroupCount > 0 )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4127
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4128
        for ( TInt i = 0 ; i < alertGroupCount ; i++ )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4129
            {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4130
            for ( TInt j = 0 ; j < contactGroupCount ; j++ )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4131
                {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4132
                if ( alertGroups[ i ] ==
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4133
                     ( iStateMachine->PhoneEngineInfo()->ContactGroups(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4134
                           aCallId ) )[ j ] )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4135
                    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4136
                    alertingGroupFound = ETrue;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4137
                    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4138
                }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4139
            }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4140
        if ( alertingGroupFound == EFalse )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4141
            {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4142
            ringToneParam.SetRingingType( EProfileRingingTypeSilent );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4143
            }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4144
        else
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4145
            {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4146
            ringToneParam.SetRingingType(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4147
                iStateMachine->PhoneEngineInfo()->RingingType() );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4148
            }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4149
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4150
    else // no alerting groups set
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4151
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4152
        ringToneParam.SetRingingType(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4153
            iStateMachine->PhoneEngineInfo()->RingingType() );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4154
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4155
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4156
    // Set ring tone
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4157
    if ( iStateMachine->PhoneEngineInfo()->PersonalRingingTone(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4158
             aCallId ).Length() )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4159
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4160
        // Set the personal ring tone
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4161
        ringToneParam.SetRingTone(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4162
            iStateMachine->PhoneEngineInfo()->PersonalRingingTone( aCallId ) );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4163
        ringToneParam.SetType( EPhoneRingTonePersonal );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4164
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4165
    else if ( iStateMachine->PhoneEngineInfo()->RingingTone(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4166
                  aCallId ).Length() )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4167
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4168
        // Set the profile ring tone
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4169
        ringToneParam.SetRingTone(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4170
            iStateMachine->PhoneEngineInfo()->RingingTone( aCallId ) );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4171
        ringToneParam.SetType( EPhoneRingToneProfile );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4172
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4173
        if ( ( iStateMachine->PhoneEngineInfo()->CallerImage( aCallId ).Length() > 0 &&
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4174
                BaflUtils::FileExists( CCoeEnv::Static()->FsSession(),
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4175
                        iStateMachine->PhoneEngineInfo()->CallerImage( aCallId ) ) ) ||
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4176
               iStateMachine->PhoneEngineInfo()->HasCallerThumbnail( aCallId ) )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4177
            {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4178
            // Caller image set
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4179
            ringToneParam.SetCallerImageStatus( ETrue );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4180
            }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4181
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4182
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4183
    // Set text to say, if enabled
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4184
    if ( iStateMachine->PhoneEngineInfo()->TextToSpeech() )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4185
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4186
        ringToneParam.SetTextToSay(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4187
            iStateMachine->PhoneEngineInfo()->RemoteTextToSpeechText(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4188
                aCallId ) );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4189
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4190
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4191
    if ( iStateMachine->PhoneEngineInfo()->CallerText( aCallId ).Length() > 0 )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4192
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4193
        ringToneParam.SetCallerTextStatus( ETrue );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4194
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4195
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4196
    // Play the ring tone
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4197
    iViewCommandHandle->ExecuteCommandL( EPhoneViewPlayRingTone, &ringToneParam );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4198
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4199
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4200
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4201
// CPhoneState::HandleCugNoteL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4202
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4203
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4204
void CPhoneState::HandleCugInUseNoteL()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4205
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4206
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandleCugInUseNoteL() ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4207
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4208
    TInt cugIndex( 0 );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4209
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4210
    RSSSettings ssSettings;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4211
    TInt retValue = ssSettings.Open();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4212
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4213
    if ( retValue == KErrNone )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4214
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4215
        ssSettings.Get( ESSSettingsCug, cugIndex  );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4216
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4217
    ssSettings.Close();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4218
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4219
    if ( cugIndex )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4220
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4221
        // Add it to the resource string
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4222
        HBufC* buf = StringLoader::LoadLC(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4223
            CPhoneMainResourceResolver::Instance()->
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4224
            ResolveResourceID(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4225
            EPhoneInfoCugInUse ), cugIndex );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4226
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4227
        TPhoneCmdParamGlobalNote globalNoteParam;
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4228
	    globalNoteParam.SetText( *buf );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4229
	    globalNoteParam.SetType( EAknGlobalInformationNote );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4230
	    globalNoteParam.SetTone( EAvkonSIDInformationTone );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4231
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4232
	    iViewCommandHandle->ExecuteCommandL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4233
	            EPhoneViewShowGlobalNote, &globalNoteParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4234
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4235
	    CleanupStack::PopAndDestroy( buf );
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4236
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4237
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4238
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4239
// -----------------------------------------------------------
69
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  4240
// CPhoneState::TransitionHandlerL
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  4241
// -----------------------------------------------------------
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  4242
//
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  4243
EXPORT_C TPhoneTransitionHandler& CPhoneState::TransitionHandlerL()
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  4244
    {
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  4245
    __LOGMETHODSTARTEND( EPhoneControl, "CPhoneState::TransitionHandlerL() ");
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  4246
    if ( !iTransitionHandler )
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  4247
        {
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  4248
        iTransitionHandler = new (ELeave)TPhoneTransitionHandler(
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  4249
                *this, *iViewCommandHandle );
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  4250
        }
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  4251
    return *iTransitionHandler;
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  4252
    }
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  4253
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  4254
// -----------------------------------------------------------
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4255
// CPhoneState::CallheaderManagerL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4256
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4257
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4258
CPhoneCallHeaderManager* CPhoneState::CallheaderManagerL()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4259
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4260
    __LOGMETHODSTARTEND( EPhoneControl, "CPhoneState::CallheaderManagerL() ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4261
    if ( !iCallHeaderManager )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4262
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4263
        iCallHeaderManager = CPhoneCallHeaderManager::NewL(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4264
                *iViewCommandHandle,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4265
                *iStateMachine,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4266
                iCustomization );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4267
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4268
    return iCallHeaderManager;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4269
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4270
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4271
// -----------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4272
// CPhoneState::CloseCustomizedDialerL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4273
// -----------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4274
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4275
EXPORT_C void CPhoneState::CloseCustomizedDialerL()
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4276
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4277
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::CloseCustomizedDialerL( ) ");
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4278
    // Set dialer back to default mode.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4279
    iViewCommandHandle->HandleCommandL( EPhoneViewHideCustomizedDialer );
69
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  4280
    CloseClearNumberEntryAndLoadEffectL( EPhoneTransEffectPhoneUiClose );
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4281
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4282
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4283
// -----------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4284
// CPhoneState::CustomizedDialerMenuResourceId
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4285
// -----------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4286
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4287
EXPORT_C TInt CPhoneState::CustomizedDialerMenuResourceIdL()
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4288
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4289
    __LOGMETHODSTARTEND(EPhoneControl,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4290
        "CPhoneState::CustomizedDialerMenuResourceId( ) ");
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4291
    // Get and return customized dialer menu resource id
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4292
    TPhoneCmdParamInteger integerParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4293
    iViewCommandHandle->HandleCommandL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4294
        EPhoneViewGetCustomizedDialerMenuResourceId,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4295
        &integerParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4296
    return integerParam.Integer();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4297
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4298
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4299
// -----------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4300
// CPhoneState::CustomizedDialerCbaResourceId
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4301
// -----------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4302
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4303
EXPORT_C TInt CPhoneState::CustomizedDialerCbaResourceIdL()
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4304
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4305
    __LOGMETHODSTARTEND(EPhoneControl,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4306
           "CPhoneState::CustomizedDialerCbaResourceId( ) ");
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4307
    // Get and return customized dialer CBA resource id
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4308
    TPhoneCmdParamInteger integerParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4309
    iViewCommandHandle->HandleCommandL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4310
            EPhoneViewGetCustomizedDialerCbaResourceId,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4311
        &integerParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4312
    return integerParam.Integer();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4313
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4314
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4315
// -----------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4316
// CPhoneState::ShowDtmfDialerL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4317
// -----------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4318
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4319
void CPhoneState::ShowDtmfDialerL()
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4320
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4321
    __LOGMETHODSTARTEND(EPhoneControl,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4322
        "CPhoneState::ShowDtmfDialerL()" );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4323
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4324
    // Set dialer to DTMF mode.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4325
    TPhoneCmdParamBoolean booleanParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4326
    booleanParam.SetBoolean( ETrue );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4327
    iViewCommandHandle->ExecuteCommandL( EPhoneViewSetDtmfDialerViewVisible,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4328
                                         &booleanParam );
69
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  4329
    TransitionHandlerL().
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  4330
            BeginTransEffectLC( EPhoneTransEffectCallUiDisappear );
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4331
    if ( IsNumberEntryUsedL() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4332
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4333
        // Store the number entry content to cache
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4334
        if ( !IsNumberEntryContentStored() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4335
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4336
            StoreNumberEntryContentL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4337
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4338
        // Clear and display DTMF dialer
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4339
        NumberEntryClearL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4340
        SetNumberEntryVisibilityL(ETrue);
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4341
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4342
    else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4343
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4344
        // Create and display DTMF dialer
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4345
        NumberEntryManagerL()->CreateNumberEntryL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4346
        }
69
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  4347
    TransitionHandlerL().EndTransEffect();
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4348
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4349
    // Update CBA
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4350
    iCbaManager->UpdateInCallCbaL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4351
    
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4352
    if( EPSCTsyCallStateDialling == 
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4353
        CPhonePubSubProxy::Instance()->Value(KPSUidCtsyCallInformation, KCTsyCallState ) )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4354
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4355
        // Call indicator update to ensure that small call 
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4356
        // bubble is shown in dtmf dialer during dialing
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4357
        // call this needs to be done because when call is 
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4358
        // initialized small call bubble visibility is set to false.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4359
        UpdateIncallIndicatorL(EPSCTsyCallStateDialling);
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4360
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4361
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4362
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4363
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4364
// CPhoneState::CheckIfRestoreNEContentAfterDtmfDialer
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4365
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4366
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4367
EXPORT_C void CPhoneState::CheckIfRestoreNEContentAfterDtmfDialer()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4368
    {
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4369
    if ( IsOnScreenDialerSupported() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4370
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4371
        TBool isDialerVisible( EFalse );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4372
        TRAP_IGNORE( isDialerVisible = IsDTMFEditorVisibleL() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4373
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4374
         if ( isDialerVisible )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4375
             {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4376
             TRAP_IGNORE( CloseDTMFEditorL() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4377
             }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4378
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4379
         // if the DTMF dialer is used before the idle message, we have to
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4380
         // restore the original content of the number entry
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4381
         if ( IsNumberEntryContentStored() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4382
             {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4383
             TBool isNumberEntryUsed( EFalse );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4384
             TRAP_IGNORE( isNumberEntryUsed = IsNumberEntryUsedL() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4385
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4386
             if ( !isNumberEntryUsed )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4387
                 {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4388
                 TRAP_IGNORE( NumberEntryManagerL()->CreateNumberEntryL() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4389
                 }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4390
             // Restore the number entry content from cache
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4391
             TRAP_IGNORE( RestoreNumberEntryContentL() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4392
             }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4393
         }
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4394
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4395
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4396
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4397
// CPhoneState::IsOnScreenDialerSupported
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4398
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4399
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4400
EXPORT_C TBool CPhoneState::IsOnScreenDialerSupported() const
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4401
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4402
    return iOnScreenDialer;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4403
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4404
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4405
// ---------------------------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4406
// CPhoneState::LoadResource
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4407
// ---------------------------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4408
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4409
void CPhoneState::LoadResource( TDes& aData, const TInt aResource ) const
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4410
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4411
    __LOGMETHODSTARTEND( EPhoneControl, "CPhoneState::LoadResource() ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4412
    __PHONELOG1( EBasic, EPhoneControl, "CPhoneState::LoadResource - aResource: %d", aResource );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4413
    StringLoader::Load(  aData,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4414
                         CPhoneMainResourceResolver::Instance()->ResolveResourceID( aResource ),
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4415
                         EikonEnv() );
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4416
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4417
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4418
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4419
// CPhoneState::IsAnyConnectedCalls
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4420
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4421
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4422
TBool CPhoneState::IsAnyConnectedCalls()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4423
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4424
    __LOGMETHODSTARTEND( EPhoneControl, "CPhoneState::IsAnyConnectedCalls() ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4425
    TBool connectedCall(EFalse);
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4426
    if ( iStateMachine->PhoneEngineInfo()->CheckIfCallStateExists( EPEStateConnected ) ||
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4427
        iStateMachine->PhoneEngineInfo()->CheckIfCallStateExists( EPEStateConnecting ) ||
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4428
        iStateMachine->PhoneEngineInfo()->CheckIfCallStateExists( EPEStateConnectedConference ) )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4429
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4430
        connectedCall = ETrue;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4431
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4432
    __PHONELOG1( EBasic, EPhoneControl, "CPhoneState::IsAnyConnectedCalls: (%d)", connectedCall );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4433
    return connectedCall;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4434
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4435
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4436
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4437
// CPhoneState::NumberEntryContentL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4438
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4439
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4440
CPhoneNumberEntryManager* CPhoneState::NumberEntryManagerL()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4441
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4442
    __LOGMETHODSTARTEND( EPhoneControl, "CPhoneState::NumberEntryContentL() ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4443
    if ( !iNumberEntryManager )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4444
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4445
        iNumberEntryManager = CPhoneNumberEntryManager::NewL(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4446
                this,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4447
                *iViewCommandHandle,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4448
                *iStateMachine,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4449
                iCustomization,
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4450
                *iCbaManager );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4451
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4452
    return iNumberEntryManager;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4453
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4454
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4455
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4456
// CPhoneState::PhoneNumberFromEntryLC()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4457
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4458
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4459
EXPORT_C HBufC* CPhoneState::PhoneNumberFromEntryLC()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4460
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4461
    return NumberEntryManagerL()->PhoneNumberFromEntryLC();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4462
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4463
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4464
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4465
// CPhoneState::IsNumberEntryUsedL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4466
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4467
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4468
EXPORT_C TBool CPhoneState::IsNumberEntryUsedL()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4469
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4470
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::IsNumberEntryUsedL( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4471
    return NumberEntryManagerL()->IsNumberEntryUsedL();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4472
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4473
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4474
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4475
// CPhoneState::IsNumberEntryVisibleL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4476
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4477
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4478
EXPORT_C TBool CPhoneState::IsNumberEntryVisibleL()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4479
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4480
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::IsNumberEntryVisibleL( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4481
    return NumberEntryManagerL()->IsNumberEntryVisibleL();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4482
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4483
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4484
// -----------------------------------------------------------
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4485
// CPhoneState::KeyEventForExistingNumberEntryL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4486
// -----------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4487
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4488
void CPhoneState::KeyEventForExistingNumberEntryL( const TKeyEvent& aKeyEvent,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4489
    TEventCode aEventCode )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4490
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4491
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::KeyEventForExistingNumberEntryL( ) ");
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4492
    NumberEntryManagerL()->KeyEventForExistingNumberEntryL( aKeyEvent, aEventCode );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4493
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4494
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4495
// -----------------------------------------------------------
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4496
// CPhoneState::HandleNumberEntryClearedL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4497
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4498
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4499
EXPORT_C void CPhoneState::HandleNumberEntryClearedL()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4500
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4501
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandleNumberEntryClearedL( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4502
    NumberEntryManagerL()->HandleNumberEntryClearedL();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4503
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4504
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4505
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4506
// CPhoneState::SetNumberEntryVisibilityL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4507
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4508
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4509
EXPORT_C void CPhoneState::SetNumberEntryVisibilityL( const TBool aVisible )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4510
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4511
    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::SetNumberEntryVisibilityL( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4512
    TPhoneCmdParamBoolean booleanParam;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4513
    booleanParam.SetBoolean( ETrue );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4514
    if ( !aVisible )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4515
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4516
        booleanParam.SetBoolean( EFalse );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4517
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4518
    NumberEntryManagerL()->SetNumberEntryVisibilityL( booleanParam );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4519
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4520
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4521
// ---------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4522
// CPhoneState::HandleCreateNumberEntryL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4523
// ---------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4524
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4525
EXPORT_C void CPhoneState::HandleCreateNumberEntryL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4526
        const TKeyEvent& /*aKeyEvent*/,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4527
        TEventCode /*aEventCode*/ )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4528
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4529
    NumberEntryManagerL()->HandleCreateNumberEntryL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4530
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4531
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4532
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4533
// CPhoneState::IsNumberEntryContentStored
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4534
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4535
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4536
EXPORT_C TBool CPhoneState::IsNumberEntryContentStored()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4537
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4538
    TBool isNumberEntryContentStored( EFalse );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4539
    TRAP_IGNORE( isNumberEntryContentStored = NumberEntryManagerL()->IsNumberEntryContentStored() );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4540
    return isNumberEntryContentStored;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4541
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4542
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4543
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4544
// CPhoneState::StoreNumberEntryContentL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4545
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4546
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4547
EXPORT_C void CPhoneState::StoreNumberEntryContentL()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4548
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4549
    NumberEntryManagerL()->StoreNumberEntryContentL();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4550
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4551
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4552
// -----------------------------------------------------------
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4553
// CPhoneState::RestoreNumberEntryContentL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4554
// -----------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4555
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4556
EXPORT_C void CPhoneState::RestoreNumberEntryContentL()
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4557
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4558
    NumberEntryManagerL()->RestoreNumberEntryContentL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4559
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4560
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4561
// -----------------------------------------------------------
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4562
// CPhoneState::ClearNumberEntryContentCache
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4563
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4564
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4565
EXPORT_C void CPhoneState::ClearNumberEntryContentCache()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4566
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4567
    TRAP_IGNORE( NumberEntryManagerL()->ClearNumberEntryContentCache() );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4568
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4569
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4570
// -----------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4571
// CPhoneState::HandleNumberEntryEdited
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4572
// -----------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4573
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4574
EXPORT_C void CPhoneState::HandleNumberEntryEdited()
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4575
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4576
    __LOGMETHODSTARTEND( EPhoneControl, "CPhoneState::HandleNumberEntryEdited() ");
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4577
    TRAP_IGNORE( NumberEntryManagerL()->HandleNumberEntryEdited() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4578
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4579
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4580
// -----------------------------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4581
// CPhoneState::IsAlphanumericSupportedAndCharInput
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4582
// -----------------------------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4583
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4584
EXPORT_C TBool CPhoneState::IsAlphanumericSupportedAndCharInput(
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4585
        const TKeyEvent& aKeyEvent )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4586
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4587
    __LOGMETHODSTARTEND( EPhoneControl, "CPhoneState::IsAlphanumericSupportedAndCharInput() ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4588
    TBool alphaNumericSupport(EFalse);
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4589
    TRAP_IGNORE( alphaNumericSupport = NumberEntryManagerL()->IsAlphanumericSupportedAndCharInput( aKeyEvent ) );
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4590
    return alphaNumericSupport;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4591
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4592
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4593
// ---------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4594
// CPhoneState::OnlyHashInNumberEntryL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4595
// ---------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4596
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4597
EXPORT_C void CPhoneState::OnlyHashInNumberEntryL()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4598
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4599
    __LOGMETHODSTARTEND( EPhoneControl, "CPhoneState::OnlyHashInNumberEntryL( ) ");
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4600
    // 0.8 seconds has passed, start ALS line change timer
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4601
    StartAlsLineChangeTimerL();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4602
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4603
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4604
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4605
// CPhoneState::NumberEntryClearL
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4606
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4607
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4608
void CPhoneState::NumberEntryClearL()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4609
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4610
    NumberEntryManagerL()->NumberEntryClearL();
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4611
    }
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4612
	
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4613
// -----------------------------------------------------------
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4614
// CPhoneState::UpdateSilenceButtonDimming
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4615
// -----------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4616
//
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4617
EXPORT_C void CPhoneState::UpdateSilenceButtonDimming()
61
41a7f70b3818 Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 58
diff changeset
  4618
    {
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4619
    if ( FeatureManager::FeatureSupported( KFeatureIdTouchCallHandling ) )
61
41a7f70b3818 Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 58
diff changeset
  4620
        {
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4621
        const TProfileRingingType ringingType =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4622
            iStateMachine->PhoneEngineInfo()->RingingType();
61
41a7f70b3818 Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 58
diff changeset
  4623
        
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4624
        TBool callIsAlerting =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4625
                !(( ringingType == EProfileRingingTypeSilent ) ||
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4626
                  ( ringingType == EProfileRingingTypeBeepOnce ));
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4627
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4628
        if ( !callIsAlerting )
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4629
            {
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4630
            SetTouchPaneButtonDisabled( EPhoneCallComingCmdSilent );
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4631
            }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4632
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4633
    }
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4634
	
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4635
// ---------------------------------------------------------
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4636
// CPhoneState::SetToolbarDimming
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4637
// ---------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4638
//
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4639
EXPORT_C void CPhoneState::SetToolbarDimming( TBool aDimmed )
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4640
    {
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4641
	if ( FeatureManager::FeatureSupported( KFeatureIdTouchCallHandling ) )
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4642
        {
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4643
		// Check that we are not undimming toolbar in security mode
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4644
		if ( !( !aDimmed && iStateMachine->SecurityMode()->IsSecurityMode() ) )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4645
			{
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4646
			TPhoneCmdParamBoolean booleanParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4647
			booleanParam.SetBoolean( aDimmed );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4648
			TRAP_IGNORE( iViewCommandHandle->ExecuteCommandL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4649
				EPhoneViewSetToolbarDimming, &booleanParam ));
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4650
			}
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4651
        }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4652
    }
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4653
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4654
// ---------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4655
// CPhoneState::SetToolbarButtonLoudspeakerEnabled
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4656
// ---------------------------------------------------------
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4657
//
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4658
EXPORT_C void CPhoneState::SetToolbarButtonLoudspeakerEnabled()
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4659
    {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4660
    if ( FeatureManager::FeatureSupported( KFeatureIdTouchCallHandling ) )
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4661
        {
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4662
        TPhoneCmdParamInteger integerParam;
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4663
        integerParam.SetInteger( EPhoneInCallCmdActivateIhf );
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4664
        iViewCommandHandle->ExecuteCommand(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4665
            EPhoneViewEnableToolbarButton, &integerParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4666
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4667
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4668
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4669
// ---------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4670
// CPhoneState::SetToolbarButtonHandsetEnabled
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4671
// ---------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4672
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4673
EXPORT_C void CPhoneState::SetToolbarButtonHandsetEnabled()
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4674
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4675
    if ( FeatureManager::FeatureSupported( KFeatureIdTouchCallHandling ) )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4676
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4677
        TPhoneCmdParamInteger integerParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4678
        integerParam.SetInteger( EPhoneInCallCmdHandset );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4679
        iViewCommandHandle->ExecuteCommand(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4680
            EPhoneViewEnableToolbarButton, &integerParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4681
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4682
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4683
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4684
// ---------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4685
// CPhoneState::SetToolbarButtonBTHFEnabled
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4686
// ---------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4687
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4688
EXPORT_C void CPhoneState::SetToolbarButtonBTHFEnabled()
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4689
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4690
    if ( FeatureManager::FeatureSupported( KFeatureIdTouchCallHandling ) )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4691
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4692
        TPhoneCmdParamInteger integerParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4693
        integerParam.SetInteger( EPhoneInCallCmdBtHandsfree );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4694
        iViewCommandHandle->ExecuteCommand(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4695
            EPhoneViewEnableToolbarButton, &integerParam );
58
40a3f856b14d Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 44
diff changeset
  4696
        }
40a3f856b14d Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 44
diff changeset
  4697
    }
40a3f856b14d Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 44
diff changeset
  4698
40a3f856b14d Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 44
diff changeset
  4699
// ---------------------------------------------------------
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4700
// CPhoneState::HandleEasyDialingCommandsL
9
8871b09be73b Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 0
diff changeset
  4701
// ---------------------------------------------------------
8871b09be73b Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 0
diff changeset
  4702
//
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4703
void CPhoneState::HandleEasyDialingCommandsL( TInt aCommandId )
9
8871b09be73b Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 0
diff changeset
  4704
    {
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4705
    switch ( aCommandId )
9
8871b09be73b Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 0
diff changeset
  4706
        {
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4707
        case EPhoneCmdUpdateCba:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4708
            iCbaManager->UpdateInCallCbaL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4709
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4710
                
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4711
        case EPhoneDialerValidNumber:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4712
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4713
            TPhoneCmdParamBoolean command;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4714
            command.SetBoolean( EFalse );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4715
            iViewCommandHandle->ExecuteCommandL( EPhoneViewSetInvalidCsPhoneNumberFlag, &command );           
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4716
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4717
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4718
                
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4719
        case EPhoneDialerInvalidNumber:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4720
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4721
            TPhoneCmdParamBoolean command;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4722
            command.SetBoolean( ETrue );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4723
            iViewCommandHandle->ExecuteCommandL( EPhoneViewSetInvalidCsPhoneNumberFlag, &command );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4724
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4725
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4726
            
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4727
        case EPhoneCmdBlockingDialogLaunched:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4728
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4729
            TPhoneCmdParamBoolean param;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4730
            param.SetBoolean( ETrue );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4731
            iViewCommandHandle->ExecuteCommandL( EPhoneViewSetBlockingDialogStatus, &param );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4732
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4733
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4734
            
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4735
        case EPhoneCmdBlockingDialogClosed:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4736
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4737
            TPhoneCmdParamBoolean param;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4738
            param.SetBoolean( EFalse );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4739
            iViewCommandHandle->ExecuteCommandL( EPhoneViewSetBlockingDialogStatus, &param );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4740
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4741
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4742
            
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4743
        default:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4744
            break;
9
8871b09be73b Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 0
diff changeset
  4745
        }
8871b09be73b Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 0
diff changeset
  4746
    }
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4747
31
ba54057fe027 Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
  4748
// -----------------------------------------------------------
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4749
// CPhoneState::ForwardPEMessageToPhoneCustomizationL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4750
// Forward Phone Engine messages to Phone customization
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4751
// (other items were commented in a header).
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4752
// -----------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4753
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4754
EXPORT_C TBool CPhoneState::ForwardPEMessageToPhoneCustomizationL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4755
    const TInt aMessage,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4756
    TInt aCallId )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4757
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4758
    __LOGMETHODSTARTEND( EPhoneControl, "CPhoneState::ForwardPEMessageToPhoneCustomizationL() " );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4759
    TBool handled = EFalse;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4760
    
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4761
    if ( iCustomization )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4762
       {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4763
       handled = iCustomization->HandlePhoneEngineMessageL( aMessage, aCallId );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4764
       }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4765
    return handled;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4766
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4767
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4768
// -----------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4769
// CPhoneState::SetLittleBubbleVisibilityL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4770
// -----------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4771
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4772
void CPhoneState::SetLittleBubbleVisibilityL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4773
        TPhoneCommandParam* aCommandParam)
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4774
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4775
    __LOGMETHODSTARTEND( EPhoneControl, "CPhoneState::SetLittleBubbleVisibilityL() " );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4776
    // If user has opened dtmfeditor(dtmfdialer) then do not make any changes 
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4777
    // to SetLittleBubbleVisible value. SetLittleBubbleVisible value is true by default.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4778
    if( !IsDTMFEditorVisibleL() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4779
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4780
        TPhoneCmdParamIncallIndicatorData* incallIndicatorParam =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4781
                   static_cast<TPhoneCmdParamIncallIndicatorData*>( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4782
        TInt activeCallId = GetActiveCallIdL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4783
        switch( incallIndicatorParam->CallState() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4784
           {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4785
           case EPSCTsyCallStateRinging:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4786
           case EPSCTsyCallStateDialling:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4787
               {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4788
               // If we have single ringing or dialling call then it is ok
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4789
               // to set visibility to false.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4790
               if ( activeCallId < KErrNone )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4791
                   {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4792
                   incallIndicatorParam->SetLittleBubbleVisible( EFalse );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4793
                   }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4794
               }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4795
               break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4796
           default:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4797
               incallIndicatorParam->SetLittleBubbleVisible( ETrue );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4798
               break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4799
           }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4800
        } 
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4801
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4802
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4803
// -----------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4804
// CPhoneState::DisplayCallSetupL
58
40a3f856b14d Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 44
diff changeset
  4805
// -----------------------------------------------------------
40a3f856b14d Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 44
diff changeset
  4806
//
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4807
EXPORT_C void CPhoneState::DisplayCallSetupL( TInt aCallId )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4808
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4809
    __LOGMETHODSTARTEND( EPhoneControl, "CPhoneState::DisplayCallSetupL() ");
69
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  4810
    TransitionHandlerL().BeginTransEffectLC( EPhoneTransEffectCallUiAppear );
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  4811
    TransitionHandlerL().BeginUiUpdateLC();
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4812
    SetNumberEntryVisibilityL( EFalse );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4813
    CaptureKeysDuringCallNotificationL( ETrue );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4814
    iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4815
    iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4816
    TPhoneCmdParamInteger uidParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4817
    uidParam.SetInteger( KUidPhoneApplication.iUid );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4818
    iViewCommandHandle->ExecuteCommandL( EPhoneViewBringAppToForeground,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4819
        &uidParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4820
    // Do state-specific operations.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4821
    DoStateSpecificCallSetUpDefinitionsL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4822
    DisplayHeaderForOutgoingCallL(aCallId);
69
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  4823
    TransitionHandlerL().EndUiUpdateAndEffect();
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4824
    iCbaManager->UpdateCbaL(EPhoneCallHandlingCallSetupCBA);
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4825
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4826
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4827
// -----------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4828
// Sends command to viewcontroller to store the flag
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4829
// -----------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4830
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4831
EXPORT_C void CPhoneState::SetNeedToReturnToForegroundAppStatusL( 
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4832
    TBool aNeedToReturn )
58
40a3f856b14d Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 44
diff changeset
  4833
    {
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4834
    TPhoneCmdParamBoolean booleanParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4835
    booleanParam.SetBoolean( aNeedToReturn );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4836
    iViewCommandHandle->ExecuteCommandL( 
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4837
        EPhoneViewSetNeedToReturnToForegroundAppStatus,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4838
        &booleanParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4839
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4840
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4841
// -----------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4842
// CPhoneState::DoStateSpecificCallSetUpDefinitionsL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4843
// -----------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4844
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4845
EXPORT_C void CPhoneState::DoStateSpecificCallSetUpDefinitionsL()
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4846
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4847
    // do nothing
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4848
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4849
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4850
// -----------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4851
// CPhoneState::CloseClearNumberEntryAndLoadEffect
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4852
// -----------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4853
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4854
EXPORT_C void CPhoneState::CloseClearNumberEntryAndLoadEffectL( 
69
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  4855
        TPhoneTransEffectType aType )
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4856
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4857
    __LOGMETHODSTARTEND( EPhoneControl, 
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4858
            "CPhoneState::CloseClearNumberEntryAndLoadEffectL() ");
69
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  4859
    TransitionHandlerL().BeginTransEffectLC( aType );
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4860
    iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry );
69
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  4861
    TransitionHandlerL().EndTransEffect();
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4862
    // Do state-specific operation when number entry is cleared
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 61
diff changeset
  4863
    HandleNumberEntryClearedL();
58
40a3f856b14d Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 44
diff changeset
  4864
    }
40a3f856b14d Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 44
diff changeset
  4865
0
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4866
//  End of File
5f000ab63145 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  4867