phoneapp/phoneuiview/src/cphoneviewcontroller.cpp
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Wed, 15 Sep 2010 12:12:21 +0300
branchRCL_3
changeset 73 e30d4a1b8bad
parent 69 8baf28733c3d
child 81 c26cc2a7c548
permissions -rw-r--r--
Revision: 201035 Kit: 201036
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     1
/*
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     2
* Copyright (c) 2005 - 2010 Nokia Corporation and/or its subsidiary(-ies).
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     3
* All rights reserved.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     4
* This component and the accompanying materials are made available
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     6
* which accompanies this distribution, and is available
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     8
*
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     9
* Initial Contributors:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    11
*
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    12
* Contributors:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    13
*
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    14
* Description:  The control class of phone ui view in PhoneUI
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    15
*
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    16
*/
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    17
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    18
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    19
// INCLUDE FILES
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    20
#include "cphoneviewcontroller.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    21
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    22
#include "phoneui.pan"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    23
#include "cphonetoolbarcontroller.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    24
#include "cphonebuttonscontroller.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    25
#include "cphonedialercontroller.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    26
#include "cphoneeasydialingcontroller.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    27
#include "cphonedtmfdialercontroller.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    28
#include "cphonemenucontroller.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    29
#include "cphonenotecontroller.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    30
#include "cphonequerycontroller.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    31
#include "cphonekeycapturecontroller.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    32
#include "cphoneview.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    33
#include "cphonedialerview.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    34
#include "tphonecommandparam.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    35
#include "cphonebubblewrapper.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    36
#include "tphonecmdparamcallstatedata.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    37
#include "tphonecmdparamKeycapture.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    38
#include "tphonecmdparaminteger.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    39
#include "tphonecmdparamboolean.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    40
#include "tphonecmdparamstring.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    41
#include "tphonecmdparamappinfo.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    42
#include "tphonecmdparammessageeditor.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    43
#include "tphonecmdparamcallheaderdata.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    44
#include "tphonecmdparamsingleitemfetch.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    45
#include "tphonecmdparamaudiooutput.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    46
#include "tphonecmdparamaudioavailability.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    47
#include "tphonecmdparamquery.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    48
#include "tphonecmdparamsfidata.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    49
#include "tphonecmdparamtranseffect.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    50
#include "phoneconstants.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    51
#include "cphonestatuspane.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    52
#include "cphonepubsubproxy.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    53
#include "cphoneincallindicator.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    54
#include "phonelogger.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    55
#include "cphonetimer.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    56
#include "cphonecenrepproxy.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    57
#include "cphonerecoverysystem.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    58
#include "cphonecontactcontroller.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    59
#include "cphoneapplicationexit.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    60
#include "cphoneaudiocontroller.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    61
#include "cphoneringingtoneplayerao.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    62
#include "cphonevmbxhandler.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    63
#include "cphonemainresourceresolver.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    64
#include "phonerssbase.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    65
#include "telprivatecrkeys.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    66
#include "cphonesingleitemfetch.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    67
#include "mnumberentry.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    68
#include "cdialer.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    69
#include "dialer.hrh"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    70
#include "cphonemediatorfactory.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    71
#include "cphonemediatorsender.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    72
#include "mphoneviewcustomization.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    73
#include "tphonecmdparamcustomdialer.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    74
#include "tphonecmdparampointer.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    75
#include "dialer.hrh"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    76
#include "phoneui.hrh"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    77
#include "musmanager.h"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    78
#include <apgtask.h>
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    79
#include <apgwgnam.h>
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    80
#include <apacmdln.h>
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    81
#include <coedef.h>  // TKeyResponse
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    82
#include <eikenv.h>
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    83
#include <eikappui.h>
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    84
#include <eikapp.h>
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    85
#include <eikmenub.h>
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    86
#include <eikspane.h>
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    87
#include <aknkeylock.h>
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    88
#include <SpdiaControl.h>
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    89
#include <hlplch.h>
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    90
#include <aknnavide.h>
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    91
#include <aknnavilabel.h>
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    92
#include <AknNotifierController.h>
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    93
#include <CMessageData.h> // CMessageData
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    94
#include <sendui.h> // CSendUi
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    95
#include <SenduiMtmUids.h> // KSenduiMtmIrUid
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    96
#include <cphonecntsaveaddtoname.h>
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    97
#include <PbkDataSaveAppUi.hrh>
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    98
#include <PhCltUtils.h>
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    99
#include <telephonyvariant.hrh>
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   100
#include <ConeResLoader.h>
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   101
#include <bldvariant.hrh>
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   102
#include <data_caging_path_literals.hrh>
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   103
#include <AknDlgShut.h> // Avkon dialog shutter.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   104
#include <cphcntrfshandler.h>
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   105
#include <bautils.h>
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   106
#include <CPbkContactEngine.h>
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   107
#include <CPbkContactItem.h>
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   108
#include <CPbkFieldInfo.h>
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   109
#include <PbkFields.hrh>
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   110
#include <cphcntcontactid.h>
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   111
#include <AknUtils.h>
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   112
#include <AknSgcc.h>
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   113
#include <settingsinternalcrkeys.h>
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   114
#include <UikonInternalPSKeys.h>
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   115
#include <startupdomainpskeys.h>
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   116
#include <utf.h>
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   117
#include <activeidle2domainpskeys.h>
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   118
#include <telinternalpskeys.h>
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   119
#include <featmgr.h>
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   120
#include <layoutmetadata.cdl.h>
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   121
#include <akntoolbar.h>
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   122
#include <LogsUiCmdStarter.h>
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   123
#include <AknIndicatorContainer.h>
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   124
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   125
#include <SoftReject.rsg>
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   126
#include <ConeResLoader.h>
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   127
#include <StringLoader.h>
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   128
#include <txtrich.h>
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   129
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   130
#include <vmnumber.h>
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   131
#include <coreapplicationuisdomainpskeys.h>
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   132
#include <gfxtranseffect/gfxtranseffect.h>
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   133
#include <akntranseffect.h>
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   134
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   135
#include <gslauncher.h> // Call Settings launch.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   136
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   137
#include <dialingextensioninterface.h>
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   138
#include <easydialingcommands.hrh>
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   139
#include <AknIncallBubbleNotify.h>
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   140
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   141
// Kastor effect IDs, aknskincontent/101f84b9.sel
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   142
// These effects cannot be used for internal transitions (Call UI<->Dialer)
69
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
   143
const TInt KTouchPhoneUiOpenEffect  = 3;
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
   144
const TInt KTouchPhoneUiCloseEffect = 5;
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   145
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   146
const TInt KTouchCallUiOpenEffect  = 1000;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   147
const TInt KTouchCallUiCloseEffect = 1001;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   148
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   149
const TInt KDialerInputMaxChars( 100 );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   150
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   151
// ================= MEMBER FUNCTIONS =======================
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   152
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   153
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   154
// CPhoneViewController::CPhoneViewController
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   155
// C++ default constructor can NOT contain any code, that
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   156
// might leave.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   157
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   158
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   159
CPhoneViewController::CPhoneViewController() :
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   160
    iEikEnv( *CEikonEnv::Static() ),
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   161
    iHelpCommand( KINCAL_HLP_CALL_HANDLING ),
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   162
    iBlockingDialogIsDisplayed( EFalse ),
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   163
    iIdleUid( KErrNotFound ),
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   164
    iFetchContent( KNullDesC ),
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   165
    iEffectOngoing( EFalse ),
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   166
    iSendBack( ETrue ),
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   167
    iDialerActive( EFalse ),
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   168
    iPriotityChanged( EFalse ),
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   169
    iSecurityMode( ETrue ),
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   170
    iNeedToReturnToForegroundAppAfterCall( EFalse )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   171
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   172
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   173
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   174
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   175
// CPhoneViewController::ConstructL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   176
// Symbian 2nd phase constructor can leave.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   177
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   178
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   179
void CPhoneViewController::ConstructL( TRect aRect )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   180
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   181
    __LOGMETHODSTARTEND(EPhoneUIView, "CPhoneViewController::ConstructL()");
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   182
    // Create the status pane singleton
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   183
    iStatusPane = CPhoneStatusPane::Instance();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   184
    // Reserve the title pane
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   185
    iStatusPane->AddTitlePaneHandlerL( *this );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   186
    iStatusPane->ReserveTitlePane( *this );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   187
    // Set status pane dimming
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   188
    iStatusPane->StatusPane().SetDimmed( iSecurityMode );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   189
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   190
    iAppui = (CAknAppUi*)iEikEnv.EikAppUi();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   191
    iCba = iEikEnv.AppUiFactory()->Cba();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   192
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   193
    iPhoneView = CPhoneView::NewL( aRect, *iCba, this );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   194
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   195
    iBubbleWrapper = CPhoneBubbleWrapper::NewL( iPhoneView, aRect  );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   196
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   197
    iPhoneView->SetControl( iBubbleWrapper->Control() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   198
    iPhoneView->ActivateL(); // We're ready to activate view after the bubble is initialized
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   199
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   200
    iIncallIndicator = CPhoneIncallIndicator::NewL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   201
    iMenuController = CPhoneMenuController::NewL( iEikEnv );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   202
    iNoteController = CPhoneNoteController::NewL( iEikEnv );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   203
    iQueryController = CPhoneQueryController::NewL( iEikEnv );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   204
    iAudioController = CPhoneAudioController::NewL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   205
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   206
    iRingingTonePlayerAO = CPhoneRingingTonePlayerAO::NewL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   207
    // Set display provider for ringing tone player.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   208
    // Display access is needed for visual ringing tones.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   209
    iRingingTonePlayerAO->SetVideoPlayer( iBubbleWrapper );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   210
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   211
    // Contact
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   212
    CPhoneContactController* contactManager =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   213
        CPhoneContactController::NewL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   214
    iContactController = contactManager;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   215
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   216
    iContactControllerId =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   217
        CPhoneRecoverySystem::Instance()->AddL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   218
            TCallBack( DoConstructContactControllerL, this ),
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   219
            CTeleRecoverySystem::EPhonePriorityHigh,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   220
            CTeleRecoverySystem::EPhoneStateStarting );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   221
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   222
    iKeyCaptureController = CPhoneKeyCaptureController::NewL( iEikEnv );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   223
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   224
    iApplicationExit = CPhoneApplicationExit::NewL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   225
        this,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   226
        iEikEnv.WsSession(),
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   227
        iEikEnv.WsSession().FindWindowGroupIdentifier( 0, KPhoneEikonServer ) );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   228
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   229
    CCoeEnv* coeEnv = CCoeEnv::Static();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   230
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   231
    if ( FeatureManager::FeatureSupported( KFeatureIdTouchCallHandling ) )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   232
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   233
        iButtonsController = CPhoneButtonsController::NewL( iBubbleWrapper->TouchPane() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   234
        iToolbarController = CPhoneToolbarController::NewL( *coeEnv );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   235
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   236
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   237
    if ( FeatureManager::FeatureSupported( KFeatureIdOnScreenDialer ) )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   238
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   239
        iDialerActive = EFalse;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   240
        // Create dialer controller
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   241
        iDialerController = CPhoneDialerController::NewL( iBubbleWrapper,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   242
                                                          *coeEnv );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   243
        // Create dialer view
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   244
        iDialerView = CPhoneDialerView::NewL( aRect );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   245
        iDialerView->DrawableWindow()->SetOrdinalPosition( -1 );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   246
        iDialerView->MakeVisible( EFalse );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   247
        // Create dialer
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   248
        iDialer = CDialer::NewL( *iDialerView, aRect, iDialerController );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   249
        // Set NE for bubbleWrapper
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   250
        iBubbleWrapper->SetNumberEntry( iDialer->NumberEntry() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   251
        iBubbleWrapper->SetNumberEntryObserver( *this );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   252
        // Finalise dialer view
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   253
        iDialerView->SetControl( iDialer );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   254
        iDialerView->ActivateL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   255
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   256
        // Create controller for Easy Dialing
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   257
        iEasyDialingController = CPhoneEasyDialingController::NewL( *iDialer );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   258
        iDialerController->SetEasyDialingController( iEasyDialingController );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   259
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   260
        // Create controller for DTMF mode of the dialer
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   261
        iDtmfDialerController = CPhoneDtmfDialerController::NewL( iBubbleWrapper,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   262
                                                                  *coeEnv );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   263
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   264
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   265
    User::LeaveIfError( iKeyLock.Connect() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   266
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   267
    // if you are using sgc-client's session to capserver,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   268
    //you are not allowed to close the session.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   269
    iAknUiServerClient = CAknSgcClient::AknSrv();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   270
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   271
    iIncallBubble = CAknIncallBubble::NewL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   272
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   273
    User::LeaveIfError( iSkinServerSession.Connect( this ) );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   274
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   275
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   276
// -----------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   277
// CPhoneViewController::NewL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   278
// Two-phased constructor.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   279
// -----------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   280
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   281
EXPORT_C CPhoneViewController* CPhoneViewController::NewL( TRect aRect )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   282
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   283
    __PHONELOG( EBasic, EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   284
            "CPhoneViewController::NewL()" );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   285
    CPhoneViewController* self = new (ELeave) CPhoneViewController;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   286
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   287
    CleanupStack::PushL( self );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   288
    self->ConstructL( aRect );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   289
    CleanupStack::Pop( self );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   290
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   291
    return self;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   292
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   293
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   294
// Destructor
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   295
CPhoneViewController::~CPhoneViewController()
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   296
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   297
    __LOGMETHODSTARTEND( EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   298
                        "CPhoneViewController::~CPhoneViewController()" );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   299
    iSkinServerSession.Close();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   300
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   301
    delete iButtonsController;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   302
    delete iDialerController;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   303
    delete iToolbarController;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   304
    iKeyLock.Close();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   305
    delete iApplicationExit;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   306
    delete iSpeedDialController;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   307
    if ( iVmbxHandler )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   308
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   309
        delete iVmbxHandler;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   310
        iVmbxHandler = NULL;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   311
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   312
    delete iKeyCaptureController;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   313
    CPhoneRecoverySystem::Remove( iContactControllerId );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   314
    delete iContactController;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   315
    delete iRingingTonePlayerAO;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   316
    delete iAudioController;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   317
    delete iQueryController;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   318
    delete iNoteController;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   319
    delete iMenuController;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   320
    delete iIncallIndicator;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   321
    delete iBubbleWrapper;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   322
    delete iPhoneView;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   323
    delete iIndiContainer;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   324
    if ( iDialerView )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   325
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   326
        if(iAppui) //for codescanner
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   327
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   328
            iAppui->RemoveFromStack( iDialerView );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   329
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   330
        delete iDialerView;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   331
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   332
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   333
    delete iEasyDialingController;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   334
    delete iDtmfDialerController;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   335
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   336
    delete iDialer;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   337
    if ( iSingleItemFetch )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   338
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   339
        delete iSingleItemFetch;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   340
        iSingleItemFetch = NULL;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   341
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   342
    delete iRfsHandler;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   343
    RemoveAddToContactDialog();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   344
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   345
//    delete iStatusPane; <-- CCoeStatic are destroyed outside application
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   346
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   347
    iApaLsSession.Close();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   348
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   349
    delete iIncallBubble;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   350
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   351
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   352
// ---------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   353
// CPhoneViewController::PhoneView
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   354
// ---------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   355
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   356
EXPORT_C CPhoneView* CPhoneViewController::PhoneView()
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   357
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   358
    return iPhoneView;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   359
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   360
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   361
// ---------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   362
// CPhoneViewController::ExecuteCommandL( aCmdId )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   363
// ---------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   364
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   365
EXPORT_C void CPhoneViewController::ExecuteCommandL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   366
    TPhoneViewCommandId aCmdId )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   367
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   368
    __PHONELOGVIEWMSG( aCmdId, 0 );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   369
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   370
    switch ( aCmdId )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   371
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   372
        case EPhoneViewLaunchApplication:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   373
            LaunchApplicationL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   374
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   375
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   376
        case EPhoneViewMenuBarClose:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   377
             iMenuController->CloseMenuBar();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   378
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   379
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   380
        case EPhoneViewRemoveNumberEntry:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   381
            if ( iDialer && iDialerActive )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   382
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   383
                SetControltoCallHandlingL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   384
                iBubbleWrapper->RemoveNumberEntry();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   385
                iPhoneView->SetActivatePreviousApp( EFalse );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   386
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   387
                TPhoneCmdParamCallStateData callStateData;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   388
                callStateData.SetCallState( EPEStateConnected );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   389
                iBubbleWrapper->GetCallIdByState( &callStateData );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   390
                TInt connected = callStateData.CallId();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   391
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   392
                // If video call
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   393
                if( connected == KVideoTelephonyCallId1 ||
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   394
                        connected == KVideoTelephonyCallId2 )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   395
                    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   396
                    TPhoneCmdParamInteger uidParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   397
                    // Bring video telephone app in the foreground
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   398
                    uidParam.SetInteger( KVtUiAppUidValue.iUid );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   399
                    BringAppToForeground( &uidParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   400
                    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   401
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   402
            else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   403
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   404
                iBubbleWrapper->RemoveNumberEntry();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   405
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   406
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   407
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   408
        case EPhoneViewRemoveNote:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   409
            iNoteController->DestroyNote();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   410
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   411
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   412
        case EPhoneViewRemoveDtmfNote:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   413
            iNoteController->DestroyDTMFNote();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   414
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   415
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   416
        case EPhoneViewRemoveGlobalNote:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   417
            iNoteController->DestroyGlobalNoteL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   418
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   419
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   420
        case EPhoneViewRemoveQuery:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   421
            iQueryController->DestroyQuery();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   422
            iQueryController->DestroyGlobalQuery();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   423
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   424
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   425
        case EPhoneViewRemoveGlobalWaitNote:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   426
            iQueryController->DestroyGlobalWaitNote();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   427
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   428
        case EPhoneViewRemoveProgressNote:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   429
            iNoteController->DestroyProgressNote();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   430
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   431
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   432
        case EPhoneViewSendToBackground:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   433
            SendToBackgroundL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   434
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   435
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   436
        case EPhoneViewExitApplications:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   437
            iApplicationExit->ExitApplication();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   438
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   439
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   440
        case EPhoneViewHideNaviPaneAudioVolume:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   441
            iAudioController->DeactivateVolumeControl();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   442
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   443
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   444
        case EPhoneViewShowNaviPaneAudioVolume:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   445
            iAudioController->ActivateVolumeControlL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   446
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   447
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   448
        case EPhoneViewRemovePhoneDialogs:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   449
            RemovePhoneDialogsL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   450
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   451
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   452
        case EPhoneViewRemoveAllCallHeaders:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   453
            iBubbleWrapper->RemoveAllCallHeadersL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   454
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   455
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   456
        case EPhoneViewMuteRingToneOnAnswer:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   457
            iRingingTonePlayerAO->MuteRingingToneOnAnswer();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   458
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   459
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   460
        case EPhoneViewStopRingTone:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   461
            iRingingTonePlayerAO->StopPlaying();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   462
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   463
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   464
        case EPhoneViewMuteRingTone:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   465
            iRingingTonePlayerAO->MuteRingingTone();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   466
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   467
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   468
        case EPhoneViewAddToConference:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   469
            iBubbleWrapper->AddToConferenceL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   470
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   471
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   472
        case EPhoneViewCreateNumberEntry:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   473
            // Keep menu controller in synch with number entry mode
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   474
            iMenuController->SetAlphaModeFlag( EFalse );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   475
            iBubbleWrapper->CreateNumberEntry();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   476
            if ( iDialer && !iDialerActive )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   477
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   478
                SetControltoDialerL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   479
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   480
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   481
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   482
        case EPhoneViewUpdateMaxConfMemberFlag:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   483
            iMenuController->SetMaxConfMembersFlag(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   484
                iBubbleWrapper->IsMaxMembersInConf() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   485
            if ( iButtonsController )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   486
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   487
                TPhoneCmdParamBoolean joinParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   488
                joinParam.SetBoolean( iBubbleWrapper->IsMaxMembersInConf() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   489
                iButtonsController->SetInCallJoinEnabled( &joinParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   490
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   491
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   492
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   493
        case EPhoneViewLaunchRfsDeep:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   494
            LaunchRfsL( ETrue );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   495
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   496
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   497
        case EPhoneViewLaunchRfsNormal:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   498
            LaunchRfsL( EFalse );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   499
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   500
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   501
        case EPhoneViewUpdateView:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   502
            iPhoneView->DrawDeferred();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   503
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   504
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   505
        case EPhoneViewUpdateContact:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   506
            OpenAddToContactL( EPbkCmdDataSaveAddToExisting );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   507
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   508
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   509
        case EPhoneViewAddContact:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   510
            OpenAddToContactL( EPbkCmdDataSaveCreateNew );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   511
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   512
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   513
        case EPhoneViewSendMessage:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   514
            SendMessageL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   515
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   516
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   517
        case EPhoneViewEnableKeyLock:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   518
            iKeyLock.EnableKeyLock();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   519
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   520
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   521
        case EPhoneViewDisableKeyLockWithoutNote:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   522
            iKeyLock.DisableWithoutNote();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   523
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   524
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   525
        case EPhoneViewUpdateFSW:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   526
            SetHiddenL( !iBubbleWrapper->IsNumberEntryUsed() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   527
            UpdateFSW();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   528
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   529
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   530
        case EPhoneViewUpdatePhoneIconToFSW:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   531
            SetHiddenL( EFalse );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   532
            UpdateFSW();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   533
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   534
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   535
        case EPhoneViewCloseFSW:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   536
            iEikEnv.DismissTaskList();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   537
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   538
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   539
        case EPhoneViewBringIdleToForeground:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   540
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   541
            // bringe idle application to fore.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   542
            TPhoneCmdParamInteger uidParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   543
            uidParam.SetInteger( IdleAppUid() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   544
            BringAppToForeground( &uidParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   545
            if ( iSingleItemFetch )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   546
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   547
                // Cancel the Single Item Fetch
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   548
                iSingleItemFetch->Delete();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   549
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   550
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   551
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   552
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   553
        case EPhoneViewSetIdleTopApplication:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   554
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   555
            TPhoneCmdParamInteger uidParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   556
            uidParam.SetInteger( IdleAppUid() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   557
            SetTopApplicationL( &uidParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   558
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   559
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   560
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   561
        case EPhoneViewRemoveConferenceBubble:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   562
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   563
            iBubbleWrapper->RemoveConferenceL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   564
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   565
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   566
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   567
        case EPhoneViewClearNumberEntryContent:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   568
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   569
            iBubbleWrapper->SetNumberEntryContent( KNullDesC );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   570
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   571
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   572
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   573
        case EPhoneViewUpdateToolbar:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   574
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   575
            if ( iDialer )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   576
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   577
                iDialer->UpdateToolbar();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   578
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   579
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   580
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   581
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   582
        case EPhoneViewSetControlAndVisibility:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   583
            if ( iDialer )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   584
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   585
                SetDialerControlAndVisibilityL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   586
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   587
            else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   588
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   589
                // If iDialer is false then set numberentry
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   590
                // visible.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   591
                TPhoneCmdParamBoolean booleanParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   592
                booleanParam.SetBoolean( ETrue );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   593
                iBubbleWrapper->SetNumberEntryVisible( &booleanParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   594
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   595
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   596
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   597
        case EPhoneViewActivatePreviousApp:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   598
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   599
            TApaTaskList appList( iEikEnv.WsSession() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   600
            TApaTask bring = appList.FindApp( KUidPhoneApplication );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   601
            // If CheckSendBackRoundEventNeed returns false then the
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   602
            // active/foreground application is phone&singleitemfetch and
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   603
            // there is no need to make SendToBackRound event or update
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   604
            // window group position.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   605
            if ( bring.Exists() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   606
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   607
                CAknSgcClient::MoveApp( bring.WgId(),
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   608
                                        ESgcMoveAppToBackground );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   609
                // Position needs to be updated to ensure that exit works
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   610
                // from previous view.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   611
                SetWindowGroupPosition();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   612
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   613
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   614
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   615
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   616
        case EPhoneViewKeypadAudioEnabled:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   617
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   618
            iBubbleWrapper->KeypadAudioEnabled();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   619
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   620
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   621
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   622
        case EPhoneViewKeypadAudioDisabled:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   623
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   624
            iBubbleWrapper->KeypadAudioDisabled();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   625
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   626
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   627
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   628
        case EPhoneViewCancelAllNotications:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   629
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   630
            CancelAllNotications();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   631
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   632
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   633
        case EPhoneViewOpenVirtualKeyBoard:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   634
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   635
            iBubbleWrapper->OpenVkbL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   636
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   637
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   638
        case EPhoneViewCreatePhoneBookServices:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   639
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   640
            // Open and create phonebook services(phonebook stores etc).
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   641
            iContactController->CreatePhoneBookServiceL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   642
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   643
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   644
        case EPhoneViewHideToolbar:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   645
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   646
            iToolbarController->HideToolbar();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   647
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   648
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   649
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   650
        case EPhoneViewLaunchMultimediaSharing:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   651
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   652
            LaunchMultimediaSharingL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   653
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   654
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   655
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   656
        case EPhoneViewSetIncallBubbleTrue:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   657
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   658
            // Allow small call bubble, if call handling view is in background and allow for dialer also
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   659
            SetIncallBubbleVisibility( ETrue );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   660
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   661
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   662
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   663
        case EPhoneViewSetIncallBubbleFalse:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   664
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   665
            // Don't allow small call bubble, if call handling view is not in foreground
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   666
            SetIncallBubbleVisibility( EFalse );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   667
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   668
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   669
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   670
        default:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   671
            __PHONELOG( EBasic, EPhonePhoneapp,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   672
                "CPhoneViewController::ExecuteCommandL -> UnKnownMessage !");
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   673
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   674
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   675
    CPhoneMediatorFactory::Instance()->Sender()->SendEvent( aCmdId );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   676
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   677
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   678
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   679
// CPhoneViewController::ExecuteCommandL( aCmdId, aCallId )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   680
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   681
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   682
EXPORT_C void CPhoneViewController::ExecuteCommandL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   683
    TPhoneViewCommandId aCmdId,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   684
    TInt aCallId )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   685
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   686
    __PHONELOGVIEWMSG( aCmdId, aCallId );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   687
    __ASSERT_DEBUG( aCallId > KErrNotFound,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   688
                    Panic( EPhoneViewParameterNotInitialized ) );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   689
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   690
    switch ( aCmdId )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   691
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   692
        case EPhoneViewRemoveCallHeader:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   693
            iBubbleWrapper->RemoveCallHeaderL( aCallId );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   694
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   695
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   696
        case EPhoneViewRemoveFromConference:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   697
            iBubbleWrapper->RemoveFromConferenceL( aCallId );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   698
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   699
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   700
        case EPhoneViewPrivateFromConference:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   701
            iBubbleWrapper->ConferenceMemberToPrivateL( aCallId );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   702
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   703
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   704
        default:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   705
            __PHONELOG( EBasic, EPhonePhoneapp,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   706
             "CPhoneViewController::ExecuteCommandL -> UnKnownMessage !!! ");
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   707
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   708
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   709
    CPhoneMediatorFactory::Instance()->Sender()->SendEvent( aCmdId, aCallId );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   710
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   711
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   712
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   713
// CPhoneViewController::ExecuteCommandL( aCmdId, aCommandParam )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   714
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   715
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   716
EXPORT_C void CPhoneViewController::ExecuteCommandL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   717
    TPhoneViewCommandId aCmdId,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   718
    TPhoneCommandParam* aCommandParam )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   719
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   720
    __PHONELOGVIEWMSG( aCmdId, 0 );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   721
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   722
    switch ( aCmdId )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   723
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   724
        case EPhoneViewSetSendKeyDialerActivationFlag:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   725
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   726
            TPhoneCmdParamBoolean* booleanParam =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   727
                static_cast<TPhoneCmdParamBoolean*>( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   728
            iPhoneView->SetDialerActivation( booleanParam->Boolean() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   729
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   730
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   731
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   732
        case EPhoneViewAllowWaitingCallHeader:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   733
            AllowWaitingCallHeaderL( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   734
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   735
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   736
        case EPhoneViewCreateNumberEntry:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   737
            iBubbleWrapper->CreateNumberEntry();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   738
            if ( iDialer && !iDialerActive )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   739
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   740
                SetControltoDialerL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   741
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   742
            // Pass the key event to number entry
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   743
            iBubbleWrapper->HandleKeyEventL( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   744
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   745
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   746
        case EPhoneViewUpdateContextMenu:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   747
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   748
            iMenuController->SetContextMenu( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   749
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   750
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   751
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   752
        case EPhoneViewGetLocalizedNumberFromEntry:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   753
            iBubbleWrapper->GetLocalizedNumberEntryContent( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   754
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   755
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   756
        case EPhoneViewSetNumberEntryVisible:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   757
            if ( iDialer )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   758
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   759
                TPhoneCmdParamBoolean* booleanParam =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   760
                    static_cast<TPhoneCmdParamBoolean*>( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   761
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   762
                if ( booleanParam->Boolean() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   763
                    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   764
                    SetControltoDialerL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   765
                    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   766
                else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   767
                    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   768
                    // Set activate previous to false since dialer was set to
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   769
                    // hidden status.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   770
                    iPhoneView->SetActivatePreviousApp( EFalse );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   771
                    SetControltoCallHandlingL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   772
                    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   773
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   774
            else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   775
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   776
                iBubbleWrapper->SetNumberEntryVisible( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   777
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   778
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   779
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   780
        case EPhoneViewGetNumberEntryCount:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   781
            iBubbleWrapper->GetNumberEntryCount( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   782
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   783
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   784
        case EPhoneViewMenuBarOpen:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   785
            iMenuController->SetNEVisibleFlag(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   786
                iBubbleWrapper->IsNumberEntryVisible() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   787
            iMenuController->OpenMenuBarL( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   788
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   789
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   790
        case EPhoneViewUpdateCba:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   791
            SetCbaL( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   792
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   793
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   794
        case EPhoneViewMenuPane:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   795
            // First offer initialization to easydialing, and if no
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   796
            // initialization done, give it to the menu controller.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   797
            if ( !iEasyDialingController->InitializeEasyDialingMenuL( aCommandParam ) )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   798
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   799
                iMenuController->SetReplaceFlag( IsReplaceAllowed() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   800
                iMenuController->DynInitMenuPaneL( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   801
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   802
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   803
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   804
        case EPhoneViewMenuBar:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   805
            iMenuController->DynInitMenuBar( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   806
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   807
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   808
        case EPhoneViewShowNote:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   809
            iNoteController->CreateNoteL( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   810
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   811
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   812
        case EPhoneViewShowGlobalNote:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   813
            iNoteController->CreateGlobalNoteL( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   814
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   815
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   816
        case EPhoneViewShowQuery:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   817
            iQueryController->CreateQueryL( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   818
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   819
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   820
        case EPhoneViewSetListQueryString:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   821
            iQueryController->SetListQueryStringL( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   822
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   823
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   824
        case EPhoneViewUpdateNoteSoftkeys:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   825
            iNoteController->UpdateNoteSoftkeysL( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   826
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   827
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   828
        case EPhoneViewShowProgressNote:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   829
            iNoteController->CreateProgressNoteL( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   830
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   831
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   832
        case EPhoneViewActivateAudioPathUIChanges:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   833
            UpdateAudioPathOptions( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   834
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   835
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   836
        case EPhoneViewActivateAudioAvailabilityUIChanges:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   837
            UpdateAudioAvailabilityOptions( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   838
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   839
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   840
        case EPhoneViewActivateMuteUIChanges:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   841
            iMenuController->SetMuteFlag( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   842
            iBubbleWrapper->SetPhoneMuted( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   843
            iIncallIndicator->HandleMuteChange( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   844
            iToolbarController->SetMuteFlag( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   845
            if ( iButtonsController )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   846
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   847
                iButtonsController->SetMuteFlag( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   848
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   849
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   850
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   851
        case EPhoneViewBringAppToForeground:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   852
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   853
            TPhoneCmdParamInteger* integerParam =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   854
                   static_cast<TPhoneCmdParamInteger*>( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   855
            // If uid is phone app then call phone app specific foreground
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   856
            // method.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   857
            if ( KUidPhoneApplication.iUid == integerParam->Integer() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   858
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   859
                BringPhoneAppToForeground( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   860
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   861
            else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   862
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   863
                BringAppToForeground( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   864
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   865
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   866
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   867
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   868
        case EPhoneViewSetNeedToReturnToForegroundAppStatus:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   869
            SetNeedToReturnToForegroundAppAfterCall( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   870
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   871
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   872
       case EPhoneViewSetBlockingDialogStatus:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   873
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   874
            TPhoneCmdParamBoolean* booleanParam =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   875
                static_cast<TPhoneCmdParamBoolean*>( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   876
            SetBlockingDialogIsDisplayed( booleanParam->Boolean() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   877
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   878
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   879
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   880
       case EPhoneViewGetBlockingDialogStatus:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   881
            GetBlockingDialogIsDisplayed( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   882
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   883
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   884
        case EPhoneViewGetForegroundApplication:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   885
            GetForegroundApplication( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   886
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   887
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   888
        case EPhoneViewSetTopApplication:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   889
            SetTopApplicationL( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   890
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   891
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   892
        case EPhoneViewActivateApp:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   893
            ActivateAppL( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   894
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   895
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   896
        case EPhoneViewActivateAppView:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   897
            ActivateAppViewL( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   898
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   899
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   900
        case EPhoneViewActivateAppViewWithCustomMessage:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   901
            ActivateAppViewWithCustomMessageL( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   902
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   903
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   904
        case EPhoneViewActivateAppViewConventional:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   905
            ActivateAppViewConventionalL( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   906
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   907
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   908
        case EPhoneViewUpdateIncallIndicator:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   909
            iMenuController->CloseMenuBar();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   910
            iIncallIndicator->Update( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   911
            iMenuController->SetCallInProgressFlag( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   912
            iToolbarController->SetCallInProgressFlag( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   913
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   914
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   915
        case EPhoneViewStartCapturingKey:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   916
            iKeyCaptureController->StartCapturingKey( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   917
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   918
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   919
        case EPhoneViewStopCapturingKey:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   920
            iKeyCaptureController->StopCapturingKey( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   921
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   922
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   923
        case EPhoneViewSetPointerCapture:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   924
            CapturePointerEvents( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   925
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   926
        case EPhoneViewSetGlobalNotifiersDisabled:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   927
            SetGlobalNotifiersDisabledL( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   928
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   929
        case EPhoneViewSetEikonNotifiersDisabled:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   930
            SetEikonNotifiersDisabled( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   931
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   932
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   933
        case EPhoneViewGetHoldFlag:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   934
            iMenuController->GetHoldFlag( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   935
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   936
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   937
        case EPhoneViewSetHoldFlag:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   938
            iMenuController->SetHoldFlag( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   939
            if ( iButtonsController )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   940
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   941
                iButtonsController->SetHoldFlag( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   942
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   943
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   944
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   945
        case EPhoneViewSetVideoCallFlag:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   946
            if ( iButtonsController )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   947
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   948
                iButtonsController->SetVideoCallFlag( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   949
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   950
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   951
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   952
        case EPhoneViewGetConferenceAndSingleFlag:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   953
            iMenuController->GetConferenceAndSingleFlag( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   954
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   955
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   956
        case EPhoneViewSetConferenceAndSingleFlag:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   957
            iMenuController->SetConferenceAndSingleFlag( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   958
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   959
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   960
        case EPhoneViewGetSoftRejectFlag:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   961
            iMenuController->GetSoftRejectFlag( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   962
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   963
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   964
        case EPhoneViewSetSoftRejectFlag:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   965
            iMenuController->SetSoftRejectFlag( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   966
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   967
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   968
        case EPhoneViewSetServiceCodeFlag:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   969
            iMenuController->SetServiceCodeFlag( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   970
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   971
            if ( iDialer )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   972
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   973
                iDialerController->SetServiceCodeFlag( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   974
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   975
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   976
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   977
        case EPhoneViewGetTextQueryContent:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   978
            iQueryController->GetTextQueryContentL( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   979
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   980
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   981
        case EPhoneViewOpenSoftRejectEditor:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   982
            OpenSoftRejectMessageEditorL( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   983
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   984
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   985
        case EPhoneViewOpenMessageEditor:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   986
            OpenMessageEditorL( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   987
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   988
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   989
        case EPhoneViewOpenConferenceList:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   990
            iBubbleWrapper->OpenConferenceList( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   991
            iMenuController->SetConferenceParticipantsListVisibleFlag(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   992
                                                              aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   993
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   994
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   995
        case EPhoneViewGetConferenceListVisibleFlag:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   996
            iMenuController->GetConferenceParticipantsListVisibleFlag(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   997
                                                              aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   998
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   999
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1000
        case EPhoneViewMoveHighLightInList:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1001
            iBubbleWrapper->MoveHighlightInConference( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1002
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1003
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1004
        case EPhoneViewGetCountOfActiveCalls:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1005
            iBubbleWrapper->GetActiveCallsCount( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1006
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1007
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1008
        case EPhoneViewSetNaviPaneAudioVolume:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1009
            iAudioController->HandleVolumeChangeL( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1010
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1011
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1012
        case EPhoneViewSetTitlePanePicture:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1013
            iStatusPane->SetTitlePanePictureL( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1014
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1015
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1016
       case EPhoneViewSetStatusPaneVisible:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1017
            SetStatusPaneVisible( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1018
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1019
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1020
        case EPhoneViewSetBackgroundImageBitmap:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1021
            iPhoneView->SetBitmap( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1022
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1023
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1024
        case EPhoneViewGetBackgroundImageBitmap:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1025
            iPhoneView->GetBitmap( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1026
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1027
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1028
        case EPhoneViewGetIsConference:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1029
            iBubbleWrapper->GetIsConference( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1030
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1031
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1032
        case EPhoneViewPlayRingTone:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1033
            iRingingTonePlayerAO->PlayRingToneL( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1034
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1035
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1036
        case EPhoneViewGetIsNoteVisible:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1037
            iNoteController->IsNoteVisible( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1038
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1039
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1040
        case EPhoneViewIsNoteActive:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1041
            iNoteController->IsNoteActive( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1042
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1043
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1044
        case EPhoneViewIsActiveNoteDissmissableByKeyEvent:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1045
            iNoteController->IsActiveNoteDissmissableByKeyEvent( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1046
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1047
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1048
        case EPhoneViewGetIsProgressNoteVisible:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1049
            iNoteController->IsProgressNoteVisible( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1050
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1051
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1052
        case EPhoneViewSetPhoneNumberAvailableInPhoneEngine:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1053
            iMenuController->SetPhoneNumberAvailableInPhoneEngine(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1054
            aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1055
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1056
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1057
        case EPhoneViewSendAiwCommand:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1058
            iMenuController->SendAiwCommandL( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1059
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1060
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1061
        case EPhoneViewIsQuery:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1062
            iQueryController->IsQueryActive( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1063
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1064
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1065
        case EPhoneViewToggleNumberEntryAlphaNumericMode:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1066
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1067
            iBubbleWrapper->ToggleNumberEntryAlphaNumericMode( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1068
            TPhoneCmdParamBoolean*  modeAlpha =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1069
                static_cast<TPhoneCmdParamBoolean*>( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1070
            iMenuController->SetAlphaModeFlag( modeAlpha->Boolean() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1071
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1072
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1073
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1074
        case EPhoneViewSetConfrenceOptionsFlag:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1075
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1076
            TPhoneCmdParamBoolean* param =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1077
                            static_cast<TPhoneCmdParamBoolean*>(aCommandParam);
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1078
            iMenuController->SetRemoveConfrenceOptionsFlag( param->Boolean() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1079
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1080
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1081
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1082
        case EPhoneViewGetSoftRejectWindowGroupId:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1083
            GetSoftRejectWindowGroupId( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1084
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1085
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1086
        case EPhoneViewSetTouchPaneButtons:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1087
            iButtonsController->SetButtonSet( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1088
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1089
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1090
        case EPhoneViewSetTouchPaneVisible:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1091
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1092
            TPhoneCmdParamBoolean* booleanParam =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1093
                static_cast<TPhoneCmdParamBoolean*>( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1094
            iBubbleWrapper->SetTouchPaneVisible( booleanParam->Boolean() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1095
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1096
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1097
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1098
        case EPhoneViewSetDtmfDialerViewVisible:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1099
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1100
            if ( iDialer )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1101
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1102
                TPhoneCmdParamBoolean* booleanParam =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1103
                    static_cast<TPhoneCmdParamBoolean*>( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1104
                if ( booleanParam->Boolean() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1105
                    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1106
                    iDialer->SetControllerL( iDtmfDialerController );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1107
                    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1108
                else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1109
                    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1110
                    iDialer->SetControllerL( iDialerController );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1111
                    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1112
                 }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1113
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1114
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1115
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1116
         case EPhoneViewSetDtmfOptionsFlag:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1117
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1118
            TPhoneCmdParamBoolean*  booleanParam =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1119
                static_cast<TPhoneCmdParamBoolean*>( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1120
            iMenuController->SetAllowDtmfOptionsFlag(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1121
                                                booleanParam->Boolean() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1122
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1123
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1124
		 
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1125
		 case EPhoneViewSetVoipCallDTMFVisibilityFlag:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1126
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1127
            TPhoneCmdParamBoolean*  booleanParam =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1128
                static_cast<TPhoneCmdParamBoolean*>( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1129
            iMenuController->SetHideVoipCallDTMFVisibilityFlag(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1130
                                                    booleanParam->Boolean() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1131
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1132
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1133
        case EPhoneViewSetVideoCallDTMFVisibilityFlag:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1134
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1135
            TPhoneCmdParamBoolean*  booleanParam =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1136
                static_cast<TPhoneCmdParamBoolean*>( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1137
            iMenuController->SetHideVideoCallDTMFVisibilityFlag(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1138
                                                    booleanParam->Boolean() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1139
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1140
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1141
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1142
        case EPhoneViewShowVTSetupFailedCreateCallToSameContactQuery:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1143
            iQueryController->CreateQueryL( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1144
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1145
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1146
        case EPhoneViewGetActivatePreviousApp:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1147
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1148
            TPhoneCmdParamBoolean*  booleanParam =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1149
                static_cast<TPhoneCmdParamBoolean*>( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1150
            booleanParam->SetBoolean( iPhoneView->GetActivatePreviousApp() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1151
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1152
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1153
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1154
        case EPhoneViewShowCustomizedDialer:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1155
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1156
            if ( iDialer )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1157
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1158
                TPhoneCmdParamCustomDialer* customDialerParam =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1159
                    static_cast<TPhoneCmdParamCustomDialer*>( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1160
                iDialer->SetControllerL( customDialerParam->DialerController() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1161
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1162
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1163
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1164
        case EPhoneViewGetNumberFromEntry:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1165
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1166
            iBubbleWrapper->GetNumberEntryContent( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1167
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1168
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1169
        case EPhoneViewUpdateContactByString:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1170
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1171
            TPhoneCmdParamString* paramString =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1172
                    static_cast<TPhoneCmdParamString*>( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1173
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1174
            OpenAddToContactL( EPbkCmdDataSaveAddToExisting,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1175
                               *paramString->String() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1176
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1177
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1178
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1179
        case EPhoneViewAddContactByString:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1180
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1181
            TPhoneCmdParamString* paramString =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1182
                    static_cast<TPhoneCmdParamString*>( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1183
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1184
            OpenAddToContactL( EPbkCmdDataSaveCreateNew,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1185
                               *paramString->String() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1186
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1187
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1188
        case EPhoneViewSetNoConnectedCalls:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1189
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1190
            iQueryController->SetNoConnectedCalls( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1191
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1192
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1193
        case EPhoneViewSetToolbarDimming:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1194
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1195
            TPhoneCmdParamBoolean*  booleanParam =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1196
                static_cast<TPhoneCmdParamBoolean*>( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1197
            iToolbarController->DimToolbar( booleanParam->Boolean());
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1198
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1199
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1200
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1201
        case EPhoneViewSetInvalidCsPhoneNumberFlag:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1202
            iMenuController->SetInvalidCsPhoneNumberFlag( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1203
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1204
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1205
        case EPhoneViewGetInvalidCsPhoneNumberFlag:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1206
            iMenuController->GetInvalidCsPhoneNumberFlag( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1207
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1208
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1209
        case EPhoneViewGetEasyDialingMenuId:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1210
        case EPhoneViewGetEasyDialingCbaId:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1211
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1212
                iEasyDialingController->ExecuteCommandL( aCmdId, aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1213
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1214
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1215
        case EPhoneViewSetConferenceAndWaitingVideo:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1216
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1217
            TPhoneCmdParamBoolean*  booleanParam =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1218
                            static_cast<TPhoneCmdParamBoolean*>( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1219
            iMenuController->SetConferenceAndWaitingVideoFlag( booleanParam->Boolean() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1220
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1221
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1222
        default:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1223
            __PHONELOG( EBasic, EPhonePhoneapp,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1224
             "CPhoneViewController::ExecuteCommandL -> UnKnownMessage !!! " );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1225
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1226
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1227
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1228
    CPhoneMediatorFactory::Instance()->Sender()->SendEvent( aCmdId,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1229
                                                            *aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1230
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1231
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1232
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1233
// CPhoneViewController::ExecuteCommandL( aCmdId, aCallId, aCommandParam )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1234
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1235
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1236
EXPORT_C void CPhoneViewController::ExecuteCommandL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1237
    TPhoneViewCommandId aCmdId,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1238
    TInt aCallId,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1239
    TPhoneCommandParam* aCommandParam )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1240
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1241
    __PHONELOGVIEWMSG( aCmdId, aCallId );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1242
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1243
    switch ( aCmdId )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1244
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1245
        case EPhoneViewUpdateBubble:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1246
            HandleUpdateBubbleL( aCallId, aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1247
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1248
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1249
        case EPhoneViewCreateCallHeader:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1250
            iBubbleWrapper->CreateCallHeaderL( aCallId, aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1251
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1252
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1253
        case EPhoneViewUpdateCallHeaderRemoteInfoData:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1254
            iBubbleWrapper->UpdateCallHeaderDisplay( aCallId, aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1255
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1256
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1257
        case EPhoneViewUpdateCallHeaderRemoteInfoDataAndLabel:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1258
            iBubbleWrapper->UpdateCallHeaderAndLabel( aCallId, aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1259
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1260
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1261
        case EPhoneViewCreateEmergencyCallHeader:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1262
            iBubbleWrapper->CreateEmergencyCallHeaderL( aCallId,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1263
                                                        aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1264
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1265
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1266
        case EPhoneViewCreateConference:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1267
            iBubbleWrapper->CreateConferenceL( aCallId, aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1268
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1269
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1270
        case EPhoneViewGetCallExistsInConference:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1271
            iBubbleWrapper->CallExistsInConference( aCallId, aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1272
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1273
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1274
        case EPhoneViewCipheringInfoChange:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1275
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1276
            iBubbleWrapper->UpdateCipheringIndicator( aCallId, aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1277
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1278
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1279
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1280
        default:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1281
            __PHONELOG( EBasic, EPhonePhoneapp,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1282
             "CPhoneViewController::ExecuteCommandL -> UnKnownMessage !!! " );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1283
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1284
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1285
    CPhoneMediatorFactory::Instance()->Sender()->SendEvent( aCmdId, aCallId,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1286
                                                            *aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1287
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1288
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1289
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1290
// CPhoneViewController::ExecuteCommandL( aCmdId, aCallId, aMessage )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1291
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1292
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1293
EXPORT_C void CPhoneViewController::ExecuteCommandL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1294
    TPhoneViewCommandId aCmdId,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1295
    TInt aCallId,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1296
    TDesC& aMessage )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1297
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1298
    __PHONELOGVIEWMSG( aCmdId, aCallId );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1299
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1300
    switch( aCmdId )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1301
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1302
        case EPhoneViewSetNumberEntryContent:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1303
            iBubbleWrapper->SetNumberEntryContent( aMessage );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1304
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1305
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1306
        case EPhoneViewSetTitlePaneContent:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1307
            iStatusPane->SetTitlePaneContentL( aMessage );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1308
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1309
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1310
        case EPhoneViewSetNaviPaneContent:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1311
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1312
            if ( !iDialer )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1313
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1314
                CAknNaviLabel* naviLabel = static_cast<CAknNaviLabel*>(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1315
                    iStatusPane->NaviDecorator().DecoratedControl() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1316
                naviLabel->SetTextL( aMessage );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1317
                iStatusPane->NaviDecorator().DrawDeferred();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1318
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1319
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1320
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1321
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1322
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1323
        case EPhoneViewLaunchHelpApplication:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1324
            LaunchHelpApplicationL( aMessage );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1325
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1326
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1327
        case EPhoneViewUpdateCallHeaderCallDuration:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1328
            iBubbleWrapper->UpdateCallDuration( aCallId, aMessage );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1329
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1330
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1331
        default:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1332
            __PHONELOG (EBasic, EPhonePhoneapp, " CPhoneViewController::ExecuteCommandL -> UnHandledMessage !!! ");
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1333
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1334
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1335
    CPhoneMediatorFactory::Instance()->Sender()->SendEvent( aCmdId, aCallId, &aMessage );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1336
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1337
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1338
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1339
// CPhoneViewController::ExecuteCommand( aCmdId )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1340
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1341
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1342
EXPORT_C void CPhoneViewController::ExecuteCommand(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1343
    TPhoneViewCommandId aCmdId )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1344
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1345
    switch( aCmdId )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1346
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1347
        case EPhoneResetTouchButtons:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1348
            if ( iButtonsController )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1349
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1350
                iButtonsController->SetToggleButtons();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1351
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1352
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1353
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1354
        case EPhoneViewBeginUpdate:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1355
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1356
            iBubbleWrapper->StartChanges();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1357
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1358
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1359
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1360
        case EPhoneViewEndUpdate:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1361
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1362
            iBubbleWrapper->EndChanges();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1363
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1364
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1365
        case EPhoneViewCloseSingleItemFetchDialog:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1366
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1367
            if ( iSingleItemFetch )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1368
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1369
                // Cancel the Single Item Fetch
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1370
                iSingleItemFetch->Delete();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1371
                iSingleItemFetch = NULL;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1372
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1373
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1374
          break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1375
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1376
        case EPhoneViewPrepareIcons:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1377
          iBubbleWrapper->BubbleManager().PrepareIcons();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1378
          break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1379
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1380
        case EPhoneViewLoadPlugins:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1381
          iBubbleWrapper->LoadPlugins();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1382
          break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1383
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1384
        case EPhoneViewCipheringInfoChangePlayTone:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1385
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1386
            iRingingTonePlayerAO->PlayUnsecureVoIPTone();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1387
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1388
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1389
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1390
        default:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1391
            __PHONELOG (EBasic, EPhonePhoneapp, " CPhoneViewController::ExecuteCommand -> UnHandledMessage !!! ");
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1392
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1393
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1394
    CPhoneMediatorFactory::Instance()->Sender()->SendEvent( aCmdId );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1395
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1396
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1397
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1398
// CPhoneViewController::ExecuteCommand( aCmdId, aCommandParam )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1399
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1400
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1401
EXPORT_C void CPhoneViewController::ExecuteCommand(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1402
    TPhoneViewCommandId aCmdId,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1403
    TPhoneCommandParam* aCommandParam )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1404
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1405
    __PHONELOGVIEWMSG( aCmdId, 0 );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1406
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1407
    switch ( aCmdId )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1408
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1409
        case EPhoneViewGetIsConferenceInSelectionMode:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1410
            static_cast<TPhoneCmdParamBoolean*>( aCommandParam )->SetBoolean(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1411
                iBubbleWrapper->BubbleManager().SelectionIdInConference() !=
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1412
                KBubbleInvalidId );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1413
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1414
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1415
        case EPhoneViewEnableTouchButton:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1416
            if ( iButtonsController )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1417
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1418
                iButtonsController->SetButtonEnabled( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1419
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1420
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1421
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1422
        case EPhoneViewDisableTouchButton:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1423
            if ( iButtonsController )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1424
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1425
                iButtonsController->SetButtonDisabled( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1426
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1427
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1428
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1429
        case EPhoneViewGetAudioVolumeLevel:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1430
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1431
            TInt level = iAudioController->VolumeLevelFromControl();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1432
            static_cast<TPhoneCmdParamInteger*>( aCommandParam )->SetInteger(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1433
                level );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1434
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1435
           break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1436
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1437
        case EPhoneViewBeginTransEffect:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1438
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1439
            if ( iDialer )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1440
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1441
                TPhoneTransEffectType type =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1442
                    static_cast<TPhoneCmdParamTransEffect*>( aCommandParam )->Type();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1443
                if ( CanTransEffectBeUsed( type ) )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1444
                    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1445
                    HandleTransitionEffect( type,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1446
                        static_cast<TPhoneCmdParamTransEffect*>( aCommandParam )->AppUid());
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1447
                    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1448
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1449
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1450
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1451
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1452
        case EPhoneViewEndTransEffect:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1453
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1454
            if ( iDialer )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1455
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1456
                HandleTransitionEffect(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1457
                    static_cast<TPhoneCmdParamTransEffect*>( aCommandParam )->Type() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1458
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1459
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1460
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1461
        case EPhoneViewGetNumberFromEntry:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1462
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1463
            iBubbleWrapper->GetNumberEntryContent( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1464
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1465
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1466
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1467
        case EPhoneViewGetKeyLockStatus:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1468
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1469
            TPhoneCmdParamBoolean*  booleanParam = static_cast<TPhoneCmdParamBoolean*>( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1470
            booleanParam->SetBoolean( iKeyLock.IsKeyLockEnabled() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1471
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1472
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1473
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1474
        case EPhoneViewSetNumberEntryObserver:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1475
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1476
            iBubbleWrapper->SetNumberEntryChangedCallBack( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1477
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1478
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1479
        case EPhoneViewGetSingleItemFetchType:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1480
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1481
            static_cast<TPhoneCmdParamInteger*>( aCommandParam )->SetInteger( SingleItemFetchType() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1482
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1483
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1484
        case EPhoneViewSetPhoneCustomization:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1485
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1486
            TPhoneCmdParamPointer* pointerParam =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1487
                static_cast<TPhoneCmdParamPointer*>( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1488
            MPhoneCustomization* phoneCustomization =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1489
                static_cast<MPhoneCustomization*>( pointerParam->Pointer() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1490
            iBubbleWrapper->SetPhoneCustomization( phoneCustomization );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1491
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1492
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1493
     case EPhoneViewSetViewCustomization:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1494
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1495
            TPhoneCmdParamPointer* pointerParam =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1496
                static_cast<TPhoneCmdParamPointer*>( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1497
            iCustomization =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1498
                static_cast<MPhoneViewCustomization*>( pointerParam->Pointer() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1499
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1500
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1501
        case EPhoneViewSetButtonCustomization:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1502
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1503
            if ( iButtonsController )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1504
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1505
                TPhoneCmdParamPointer* pointerParam =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1506
                    static_cast<TPhoneCmdParamPointer*>( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1507
                MPhoneButtonCustomization* customization =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1508
                    static_cast<MPhoneButtonCustomization*>( pointerParam->Pointer() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1509
                iButtonsController->SetCustomization( customization );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1510
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1511
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1512
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1513
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1514
        case EPhoneViewEnableToolbarButton:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1515
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1516
            TPhoneCmdParamInteger*  integerParam =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1517
                static_cast<TPhoneCmdParamInteger*>( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1518
            iToolbarController->SetToolbarButtonDimmed( integerParam->Integer(), EFalse );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1519
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1520
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1521
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1522
        case EPhoneViewGetQwertyModeObserver:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1523
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1524
            TPhoneCmdParamPointer* ptrParam = static_cast<TPhoneCmdParamPointer*>( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1525
            ptrParam->SetPointer( static_cast<TAny*>( iDialer ) );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1526
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1527
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1528
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1529
        default:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1530
            __PHONELOG( EBasic, EPhonePhoneapp, "CPhoneViewController::ExecuteCommand -> UnHandledMessage !!! " );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1531
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1532
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1533
    CPhoneMediatorFactory::Instance()->Sender()->SendEvent( aCmdId, *aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1534
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1535
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1536
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1537
// CPhoneViewController::HandleCommandL( aCmdId )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1538
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1539
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1540
EXPORT_C TPhoneViewResponseId CPhoneViewController::HandleCommandL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1541
    TPhoneViewCommandId aCmdId )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1542
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1543
    __PHONELOGVIEWMSG( aCmdId, 0 );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1544
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1545
    TPhoneViewResponseId viewResponse = EPhoneViewResponseSuccess;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1546
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1547
    switch ( aCmdId )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1548
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1549
        case EPhoneViewGetNumberEntryIsUsedStatus:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1550
            viewResponse = iBubbleWrapper->IsNumberEntryUsed() ?
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1551
                EPhoneViewResponseSuccess :
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1552
                EPhoneViewResponseFailed;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1553
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1554
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1555
        case EPhoneViewGetNumberEntryIsVisibleStatus:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1556
            if ( iDialer )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1557
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1558
                viewResponse = iDialerActive ?
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1559
                    EPhoneViewResponseSuccess :
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1560
                    EPhoneViewResponseFailed;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1561
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1562
            else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1563
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1564
                viewResponse = iBubbleWrapper->IsNumberEntryVisible() ?
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1565
                EPhoneViewResponseSuccess :
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1566
                EPhoneViewResponseFailed;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1567
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1568
             break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1569
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1570
         case EPhoneViewGetEasyDialingInFocusStatus:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1571
         case EEasyDialingVoiceCall:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1572
         case EEasyDialingVideoCall:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1573
         case EEasyDialingSendMessage:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1574
         case EEasyDialingOpenContact:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1575
         case EEasyDialingCallHandlingActivated:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1576
         case EEasyDialingEnterKeyAction:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1577
         case EEasyDialingOn:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1578
         case EEasyDialingOff:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1579
             if ( iDialer )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1580
                 {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1581
                 viewResponse = iEasyDialingController->HandleCommandL( aCmdId );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1582
                 }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1583
             else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1584
                 {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1585
                 viewResponse = EPhoneViewResponseFailed;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1586
                 }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1587
             break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1588
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1589
         case EPhoneViewIsNumberEntryNumericMode:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1590
            viewResponse = iBubbleWrapper->IsNENumericMode() ?
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1591
                EPhoneViewResponseSuccess :
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1592
                EPhoneViewResponseFailed;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1593
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1594
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1595
        case EPhoneViewGetNeedToReturnToForegroundAppStatus:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1596
            viewResponse = GetNeedToReturnToForegroundAppAfterCallL() ?
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1597
                EPhoneViewResponseSuccess :
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1598
                EPhoneViewResponseFailed;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1599
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1600
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1601
        case EPhoneViewGetTopApplicationIsDisplayedStatus:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1602
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1603
            const TInt foregroundWg = ForegroundApplicationWindowGroupId();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1604
            const TBool topAppDisplayed = ( IdleWindowGroupId() == foregroundWg ) ||
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1605
                ( ApplicationWindowGroupId() == foregroundWg );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1606
            viewResponse = topAppDisplayed ?
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1607
                EPhoneViewResponseSuccess :
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1608
                EPhoneViewResponseFailed;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1609
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1610
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1611
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1612
        case EPhoneViewGetTitlePaneIsVisibleStatus:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1613
            viewResponse = iStatusPane->IsTitlePaneVisible( *this ) ?
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1614
                EPhoneViewResponseSuccess :
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1615
                EPhoneViewResponseFailed;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1616
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1617
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1618
        case EPhoneViewIsMenuBarVisible:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1619
            viewResponse = iMenuController->IsMenuBarVisible() ?
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1620
                EPhoneViewResponseSuccess :
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1621
                EPhoneViewResponseFailed;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1622
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1623
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1624
        case EPhoneViewIsStraightCallToVideoMailBox:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1625
          {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1626
          if( !iVmbxHandler )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1627
              {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1628
              iVmbxHandler = CPhoneVmbxHandler::NewL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1629
              }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1630
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1631
          viewResponse = iVmbxHandler->IsStraightCallToVideoMailBox() ?
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1632
              EPhoneViewResponseSuccess :
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1633
              EPhoneViewResponseFailed;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1634
          }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1635
          break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1636
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1637
    // Dialer specific commands start
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1638
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1639
    // Dialer handles these commands.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1640
    // ** TODO Here we need just to flag if functionality creates blocking dialog.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1641
        case EPhoneDialerCmdLog:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1642
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1643
            BeginTransEffectForAppStartFromDialerLC( LogsUiCmdStarterConsts::KLogsUID3 );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1644
            LogsUiCmdStarter::CmdStartL( LogsUiCmdStarterConsts::KDialledView());
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1645
            EndTransEffect();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1646
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1647
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1648
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1649
        case EPhoneDialerCmdContacts:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1650
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1651
            // Launch Phonebook application
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1652
            TPhoneCmdParamAppInfo appInfoParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1653
            appInfoParam.SetAppUid( KPhoneUidAppPhonebook );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1654
            BeginTransEffectForAppStartFromDialerLC( appInfoParam.AppUid() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1655
            ExecuteCommandL( EPhoneViewActivateApp, &appInfoParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1656
            EndTransEffect();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1657
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1658
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1659
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1660
        case EPhoneDialerCmdSpeedDial:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1661
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1662
            // Launch speeddial application.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1663
            TPhoneCmdParamAppInfo appInfoParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1664
            appInfoParam.SetAppUid( KUidSpdia );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1665
            ExecuteCommandL( EPhoneViewActivateApp, &appInfoParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1666
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1667
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1668
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1669
        case EPhoneDialerCallSettings:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1670
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1671
            CGSLauncher* launcher = CGSLauncher::NewLC();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1672
            launcher->LaunchGSViewL( TUid::Uid( 0x102824A2),
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1673
                                    TUid::Uid( 0x100058B3),
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1674
                                    KNullDesC8 );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1675
            CleanupStack::PopAndDestroy( launcher );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1676
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1677
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1678
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1679
        case EPhoneViewIsDTMFEditorVisible:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1680
            if ( iDialer )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1681
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1682
                viewResponse = ( IsDtmfDialerActive() ?
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1683
                    EPhoneViewResponseSuccess :
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1684
                    EPhoneViewResponseFailed );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1685
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1686
            else // non-touch.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1687
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1688
                viewResponse = iQueryController->IsDTMFQueryVisible() ?
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1689
                    EPhoneViewResponseSuccess :
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1690
                    EPhoneViewResponseFailed;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1691
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1692
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1693
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1694
        case EPhoneViewIsConferenceInExpandedMode:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1695
            viewResponse = iBubbleWrapper->IsConferenceInExpandedMode() ?
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1696
                EPhoneViewResponseSuccess :
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1697
                EPhoneViewResponseFailed;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1698
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1699
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1700
        case EPhoneViewOpenNumberEntry:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1701
            if ( iDialer )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1702
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1703
                TPhoneCmdParamBoolean booleanParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1704
                booleanParam.SetBoolean( ETrue );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1705
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1706
                if ( iBubbleWrapper->IsNumberEntryUsed() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1707
                    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1708
                    // Launch dialer.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1709
                    ExecuteCommandL( EPhoneViewSetNumberEntryVisible, &booleanParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1710
                    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1711
                else // dialer doesnt exist.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1712
                    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1713
                     // Create and launch dialer.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1714
                    ExecuteCommandL( EPhoneViewCreateNumberEntry, &booleanParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1715
                    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1716
                // Set Number Entry CBA
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1717
                TPhoneCmdParamInteger integerParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1718
                if ( iSecurityMode )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1719
                    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1720
                    iNoteController->DestroyNote();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1721
                    integerParam.SetInteger(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1722
                            CPhoneMainResourceResolver::Instance()->
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1723
                                ResolveResourceID( EPhoneEmergencyModeNoteCBA ) );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1724
                    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1725
                else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1726
                    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1727
                    integerParam.SetInteger(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1728
                            CPhoneMainResourceResolver::Instance()->
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1729
                                ResolveResourceID( EPhoneNumberAcqCBA ) );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1730
                    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1731
                ExecuteCommandL( EPhoneViewUpdateCba, &integerParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1732
                // Set flag to false because dialler is set to open status.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1733
                iPhoneView->SetPhoneAppViewToDialer( EFalse );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1734
              }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1735
          break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1736
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1737
        case EPhoneViewOpenCallHandling:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1738
            if ( iDialer )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1739
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1740
                if ( iBlockingDialogIsDisplayed )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1741
                    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1742
                    RemovePhoneDialogsL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1743
                    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1744
                // Remove DTMF dialer when exist
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1745
                if ( IsDtmfDialerActive() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1746
                    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1747
                    static_cast<MEikCommandObserver*>( CEikonEnv::Static()->EikAppUi() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1748
                    ->ProcessCommandL( EPhoneDtmfDialerExit );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1749
                    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1750
                else if ( iCustomization &&
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1751
                          IsCustomDialerActive() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1752
                    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1753
                    iCustomization->HandleCommandL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1754
                       *this, EPhoneViewOpenCallHandling, NULL );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1755
                    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1756
                else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1757
                    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1758
                    SetControltoCallHandlingL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1759
                    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1760
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1761
          break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1762
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1763
        case EPhoneViewIsIdleTopApp:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1764
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1765
            viewResponse = CPhonePubSubProxy::Instance()->Value(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1766
                    KPSUidUikon, KUikVideoCallTopApp ) == IdleAppUid() ?
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1767
                EPhoneViewResponseSuccess :
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1768
                EPhoneViewResponseFailed;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1769
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1770
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1771
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1772
        case EPhoneViewSetDialerControlVisible:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1773
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1774
            // If dialer was not active and needtosendback is false
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1775
            // then check if dialer view is to be opened.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1776
            if ( !iDialerActive &&
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1777
                 !iNeedToReturnToForegroundAppAfterCall &&
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1778
                 iPhoneView->PhoneAppViewToDialer() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1779
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1780
                SetControltoDialerL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1781
                // Reset flag.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1782
                iPhoneView->SetPhoneAppViewToDialer( EFalse );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1783
                viewResponse = EPhoneViewResponseSuccess;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1784
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1785
            else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1786
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1787
                // Reset flag.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1788
                iPhoneView->SetPhoneAppViewToDialer( EFalse );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1789
                viewResponse = EPhoneViewResponseFailed;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1790
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1791
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1792
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1793
// Dialer specific commands end.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1794
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1795
        case EPhoneIsCustomizedDialerVisible:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1796
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1797
            viewResponse = IsCustomDialerActive() ?
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1798
                EPhoneViewResponseSuccess :
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1799
                EPhoneViewResponseFailed;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1800
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1801
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1802
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1803
        case EPhoneViewHideCustomizedDialer:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1804
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1805
            if ( iDialer )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1806
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1807
                iDialer->SetControllerL( iDialerController );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1808
                viewResponse = EPhoneViewResponseSuccess;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1809
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1810
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1811
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1812
        case EPhoneViewShowToolbar:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1813
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1814
            iToolbarController->ShowToolbar();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1815
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1816
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1817
            
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1818
        case EPhoneViewIsDisplayingMenuOrDialog:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1819
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1820
            viewResponse = iEikEnv.EikAppUi()->IsDisplayingMenuOrDialog() ?
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1821
                EPhoneViewResponseSuccess :
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1822
                EPhoneViewResponseFailed;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1823
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1824
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1825
        default:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1826
            viewResponse = EPhoneViewResponseFailed;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1827
            __PHONELOG( EBasic, EPhonePhoneapp, "CPhoneViewController::HandleCommandL -> UnKnownMessage !!! ");
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1828
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1829
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1830
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1831
    return viewResponse;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1832
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1833
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1834
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1835
// CPhoneViewController::HandleCommand( aCmdId, aCommandParam )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1836
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1837
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1838
EXPORT_C TPhoneViewResponseId CPhoneViewController::HandleCommandL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1839
    TPhoneViewCommandId aCmdId,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1840
    TPhoneCommandParam* aCommandParam )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1841
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1842
    __PHONELOGVIEWMSG( aCmdId, 0 );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1843
    TPhoneViewResponseId viewResponse = EPhoneViewResponseSuccess;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1844
    TInt err;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1845
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1846
    switch ( aCmdId )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1847
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1848
        case EPhoneViewSendKeyEventToNumberEntry:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1849
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1850
            // Pass the key event to the Bubble Manager (ignore key
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1851
            // reponse)
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1852
            iBubbleWrapper->HandleKeyEventL( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1853
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1854
            // Indicate whether the number entry has been cleared
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1855
            if ( iBubbleWrapper->CountNumberEntryCharacters() == 0 && !iDialer )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1856
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1857
                viewResponse = EPhoneViewResponseNumberEntryCleared;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1858
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1859
            else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1860
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1861
                viewResponse = EPhoneViewResponseSuccess;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1862
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1863
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1864
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1865
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1866
        case EPhoneViewAssignSpeedDialLocation:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1867
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1868
            if ( AssignSpeedDialLocation( aCommandParam ) )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1869
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1870
                viewResponse = EPhoneViewResponseSuccess;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1871
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1872
            else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1873
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1874
                viewResponse = EPhoneViewResponseFailed;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1875
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1876
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1877
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1878
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1879
        case EPhoneViewSelectedConfMember:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1880
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1881
            if ( iBubbleWrapper->SelectedConfMemberCallIdL( aCommandParam ) )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1882
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1883
                viewResponse = EPhoneViewResponseSuccess;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1884
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1885
            else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1886
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1887
                viewResponse = EPhoneViewResponseFailed;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1888
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1889
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1890
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1891
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1892
        case EPhoneViewGetCallState:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1893
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1894
            if ( iBubbleWrapper->GetCallState( aCommandParam ) )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1895
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1896
                viewResponse = EPhoneViewResponseSuccess;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1897
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1898
            else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1899
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1900
                viewResponse = EPhoneViewResponseFailed;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1901
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1902
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1903
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1904
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1905
        case EPhoneViewGetCallIdByState:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1906
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1907
            if ( iBubbleWrapper->GetCallIdByState( aCommandParam ) )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1908
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1909
                viewResponse = EPhoneViewResponseFailed;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1910
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1911
            else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1912
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1913
                viewResponse = EPhoneViewResponseSuccess;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1914
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1915
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1916
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1917
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1918
        case EPhoneViewOpenSingleItemFetchDialog:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1919
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1920
            // Create CPhoneSingleItemFetch, if not exist
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1921
            if ( !iSingleItemFetch )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1922
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1923
                iSingleItemFetch = CPhoneSingleItemFetch::NewL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1924
                    iEikEnv, *this, *iContactController, *iStatusPane );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1925
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1926
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1927
            iBlockingDialogIsDisplayed = ETrue;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1928
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1929
            TRAP( err, iSingleItemFetch->OpenSingleItemFetchDialogL( aCommandParam ))
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1930
            if ( err )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1931
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1932
                iBlockingDialogIsDisplayed = EFalse;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1933
                User::Leave( err );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1934
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1935
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1936
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1937
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1938
        case EPhoneViewGetNumberFromSpeedDialLocation:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1939
            if ( iBlockingDialogIsDisplayed )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1940
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1941
                viewResponse = EPhoneViewResponseFailed;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1942
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1943
            else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1944
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1945
                TBool status( EFalse );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1946
                TRAP( err, status = GetNumberFromSpeedDialLocationL( aCommandParam ))
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1947
                if ( err )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1948
                    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1949
                    viewResponse = EPhoneViewResponseFailed;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1950
                    // Set and reset in GetNumberFromSpeedDialLocationL when not leave
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1951
                    iBlockingDialogIsDisplayed = EFalse;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1952
                    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1953
                else if ( status )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1954
                    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1955
                    viewResponse = EPhoneViewResponseSuccess;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1956
                    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1957
                else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1958
                    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1959
                    viewResponse = EPhoneViewResponseFailed;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1960
                    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1961
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1962
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1963
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1964
        case EPhoneViewGetCustomizedDialerMenuResourceId:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1965
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1966
            TInt resId = iDialer->Controller()->MenuResourceId(); // easydialing change
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1967
            static_cast<TPhoneCmdParamInteger*>( aCommandParam )->SetInteger( resId );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1968
            viewResponse = EPhoneViewResponseSuccess;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1969
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1970
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1971
        case EPhoneViewGetCustomizedDialerCbaResourceId:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1972
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1973
            TInt resId = iDialer->Controller()->CbaResourceId(); // easydialing change
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1974
            static_cast<TPhoneCmdParamInteger*>( aCommandParam )->SetInteger( resId );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1975
            viewResponse = EPhoneViewResponseSuccess;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1976
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1977
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1978
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1979
        default:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1980
            if ( iCustomization )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1981
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1982
                // Let customization handle view command
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1983
                if ( iCustomization->HandleCommandL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1984
                        *this, aCmdId, aCommandParam ) )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1985
                    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1986
                    viewResponse = EPhoneViewResponseSuccess;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1987
                    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1988
                else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1989
                    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1990
                    viewResponse = EPhoneViewResponseFailed;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1991
                    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1992
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1993
            else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1994
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1995
                __PHONELOG( EBasic, EPhonePhoneapp, "CPhoneViewController::HandleCommandL -> UnKnownMessage !!! ");
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1996
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1997
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1998
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1999
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2000
    return viewResponse;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2001
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2002
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2003
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2004
// CPhoneViewController::HandleTitlePaneActiveL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2005
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2006
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2007
void CPhoneViewController::HandleTitlePaneActiveL( TBool aActive )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2008
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2009
    if ( aActive )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2010
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2011
        iStatusPane->UpdateTitlePane();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2012
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2013
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2014
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2015
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2016
// CPhoneViewController::ApplicationWindowGroupId
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2017
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2018
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2019
EXPORT_C TInt CPhoneViewController::ApplicationWindowGroupId()
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2020
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2021
    TInt phoneAppWg = iEikEnv.RootWin().Identifier();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2022
    __PHONELOG1( EBasic, EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2023
      "CPhoneViewController::ApplicationWindowGroupId - PhoneApplicationWindowGroupId = (%d)",
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2024
      phoneAppWg );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2025
    return phoneAppWg;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2026
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2027
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2028
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2029
// CPhoneViewController::IdleWindowGroupId
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2030
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2031
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2032
EXPORT_C TInt CPhoneViewController::IdleWindowGroupId()
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2033
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2034
    if ( !iIdleWg )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2035
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2036
        // Save Idle window group.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2037
        TApaTaskList appList( iEikEnv.WsSession() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2038
        TApaTask bring = appList.FindApp( TUid::Uid( IdleAppUid() ) );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2039
        if ( bring.Exists() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2040
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2041
            iIdleWg = bring.WgId();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2042
            __PHONELOG1( EBasic, EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2043
              "CPhoneViewController::ConstructL -> iIdleWindowGroupId = (%d)",
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2044
              iIdleWg );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2045
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2046
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2047
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2048
    return iIdleWg;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2049
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2050
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2051
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2052
// CPhoneViewController::GetSoftRejectWindowGroupId
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2053
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2054
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2055
void CPhoneViewController::GetSoftRejectWindowGroupId(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2056
                                    TPhoneCommandParam* aCommandParam )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2057
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2058
    TInt softRejectWg( KErrNotFound );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2059
    TPhoneCmdParamInteger* integerParam =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2060
        static_cast<TPhoneCmdParamInteger*>( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2061
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2062
    TApaTaskList appList( iEikEnv.WsSession() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2063
    TApaTask bring = appList.FindApp( TUid::Uid( KSenduiUniEditorUidValue ) );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2064
    if ( bring.Exists() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2065
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2066
        softRejectWg = bring.WgId();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2067
        __PHONELOG1( EBasic, EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2068
            "CPhoneViewController::SoftRejectWindowGroupId = (%d)",
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2069
            softRejectWg );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2070
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2071
    integerParam->SetInteger( softRejectWg );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2072
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2073
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2074
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2075
// CPhoneViewController::ForegroundApplicationWindowGroupId
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2076
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2077
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2078
EXPORT_C TInt CPhoneViewController::ForegroundApplicationWindowGroupId()
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2079
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2080
    TInt result(0);
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2081
    TRAP_IGNORE( result = DoFetchForegroundApplicationWindowGroupIdL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2082
                          iEikEnv ) );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2083
    __PHONELOG1( EBasic,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2084
            EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2085
            "CPhoneViewController::ForegroundApplicationWindowGroupId() GroupId %d",
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2086
            result );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2087
    return result;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2088
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2089
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2090
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2091
// CPhoneViewController::DoFetchForegroundApplicationWindowGroupIdL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2092
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2093
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2094
EXPORT_C TInt CPhoneViewController::DoFetchForegroundApplicationWindowGroupIdL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2095
    CEikonEnv& aEnv )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2096
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2097
    TInt result = 0;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2098
    RWsSession& wsSession = aEnv.WsSession();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2099
    const TInt numWg = wsSession.NumWindowGroups(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2100
            KPhoneApplicationWindowGroupPriority );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2101
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2102
    CArrayFixFlat<TInt>* wgList =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2103
        new (ELeave) CArrayFixFlat<TInt>( numWg );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2104
    CleanupStack::PushL( wgList );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2105
    wgList->SetReserveL( numWg );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2106
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2107
    // Get list of window groups; all applications should be at priority 0.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2108
    //
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2109
    if ( wsSession.WindowGroupList(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2110
        KPhoneApplicationWindowGroupPriority,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2111
        wgList ) == KErrNone )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2112
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2113
        if ( wgList->Count() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2114
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2115
            result = wgList->At( 0 ); // The very first window group id
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2116
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2117
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2118
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2119
    CleanupStack::PopAndDestroy( wgList );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2120
    return result;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2121
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2122
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2123
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2124
// CPhoneViewController::SetHiddenL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2125
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2126
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2127
EXPORT_C void CPhoneViewController::SetHiddenL( const TBool aHidden )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2128
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2129
    __PHONELOG( EBasic, EPhoneUIView,"CPhoneViewController::SetHiddenL()" )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2130
    CApaWindowGroupName* windowGroupName =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2131
        CApaWindowGroupName::NewLC(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2132
            iEikEnv.WsSession(),
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2133
            iEikEnv.RootWin().Identifier() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2134
    windowGroupName->SetHidden( aHidden );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2135
    User::LeaveIfError(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2136
        windowGroupName->SetWindowGroupName(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2137
            iEikEnv.RootWin() ) );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2138
    CleanupStack::PopAndDestroy( windowGroupName );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2139
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2140
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2141
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2142
// CPhoneViewController::HandleResourceChangeL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2143
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2144
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2145
EXPORT_C void CPhoneViewController::HandleResourceChangeL( TInt aType )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2146
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2147
    __PHONELOG( EBasic, EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2148
                        "CPhoneViewController::HandleResourceChangeL()" )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2149
    // Notify the bubble that there has been a resource change
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2150
    iBubbleWrapper->Control()->HandleResourceChange( aType );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2151
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2152
    // Notify dialer and switch statuspane layout.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2153
    if ( iDialer )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2154
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2155
        if ( aType == KEikDynamicLayoutVariantSwitch )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2156
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2157
            SwitchLayoutToFlatStatusPaneL( iDialerActive );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2158
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2159
        static_cast<CCoeControl*>(iDialer)->HandleResourceChange( aType );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2160
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2161
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2162
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2163
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2164
// CPhoneViewController::BlockingDialogIsDisplayed
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2165
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2166
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2167
EXPORT_C TBool CPhoneViewController::BlockingDialogIsDisplayed() const
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2168
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2169
    return iBlockingDialogIsDisplayed;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2170
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2171
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2172
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2173
// CPhoneViewController::HandleLayoutChange
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2174
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2175
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2176
EXPORT_C void CPhoneViewController::HandleLayoutChange( TRect aRect )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2177
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2178
    __PHONELOG( EBasic, EPhoneUIView,"CPhoneViewController::HandleLayoutChange()" )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2179
    iPhoneView->SetRect( aRect );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2180
    if ( iDialerView )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2181
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2182
        iDialerView->SetRect( aRect );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2183
        iStatusPane->UpdateTitlePane();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2184
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2185
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2186
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2187
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2188
// CPhoneViewController::StatusPaneDisplayed
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2189
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2190
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2191
EXPORT_C TBool CPhoneViewController::StatusPaneDisplayed()
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2192
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2193
    return  CPhoneStatusPane::Instance()->IsVisible();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2194
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2195
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2196
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2197
// CPhoneViewController::IsEmergencyCallOngoing()
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2198
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2199
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2200
TBool CPhoneViewController::IsEmergencyCallOngoing()
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2201
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2202
    __LOGMETHODSTARTEND( EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2203
                         "CPhoneViewController::IsEmergencyCallOngoing()");
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2204
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2205
    TPhoneCmdParamCallStateData callStateData;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2206
    callStateData.SetCallState( EPEStateConnected );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2207
    iBubbleWrapper->GetCallIdByState( &callStateData );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2208
    TInt connected = callStateData.CallId();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2209
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2210
    callStateData.SetCallState( EPEStateConnecting );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2211
    iBubbleWrapper->GetCallIdByState( &callStateData );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2212
    TInt connecting = callStateData.CallId();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2213
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2214
    return ( ( connected == KEmergencyCallId ) ||
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2215
             ( connecting == KEmergencyCallId ) );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2216
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2217
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2218
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2219
// CPhoneViewController::HandleSecurityModeChanged
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2220
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2221
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2222
EXPORT_C void CPhoneViewController::HandleSecurityModeChanged( TBool aIsEnabled )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2223
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2224
    __PHONELOG1( EBasic, EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2225
            "CPhoneViewController::HandleSecurityModeChanged Mode = (%d)", aIsEnabled );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2226
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2227
    TBool emergencyCallOngoing = IsEmergencyCallOngoing();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2228
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2229
    // Don't undim toolbar if emergency call is ongoing 
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2230
    if ( !emergencyCallOngoing )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2231
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2232
        iToolbarController->DimToolbar( aIsEnabled );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2233
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2234
    iPhoneView->SetSecurityMode( aIsEnabled );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2235
    iMenuController->SetSecurityMode( aIsEnabled );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2236
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2237
    TBool securityModeChanged = ( iSecurityMode != aIsEnabled );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2238
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2239
    iSecurityMode = aIsEnabled;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2240
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2241
    if ( iDialer )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2242
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2243
        iDialerController->SetRestrictedDialer( aIsEnabled );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2244
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2245
        if ( iDialerActive && securityModeChanged )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2246
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2247
            CDialingExtensionInterface* easyDialing = iDialer->GetEasyDialingInterface();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2248
            if ( easyDialing )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2249
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2250
                if ( aIsEnabled )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2251
                    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2252
                    // Reset the Easy Dialing just in case, this clears the existing matches
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2253
                    // when restricted mode is activated
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2254
                    easyDialing->Reset();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2255
                    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2256
                else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2257
                    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2258
                    if ( easyDialing->IsEnabled() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2259
                        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2260
                        // If Easy Dialing is enabled, set the input from the numeric entry
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2261
                        // field for updating the search result when restricted mode is
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2262
                        // deactivated.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2263
                        TBuf<KDialerInputMaxChars> buf;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2264
                        iDialer->NumberEntry()->GetTextFromNumberEntry( buf );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2265
                        TRAP_IGNORE( easyDialing->SetInputL( buf ) );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2266
                        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2267
                    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2268
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2269
            iDialer->RelayoutAndDraw();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2270
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2271
            // Don't update cba here if emergency call is ongoing 
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2272
            if ( !emergencyCallOngoing )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2273
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2274
                // also update cba if security mode changes while dialer is open
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2275
                TPhoneCmdParamInteger integerParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2276
                if ( aIsEnabled )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2277
                    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2278
                    iNoteController->DestroyNote();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2279
                    integerParam.SetInteger( CPhoneMainResourceResolver::Instance()->
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2280
                            ResolveResourceID( EPhoneEmergencyModeNoteCBA ) );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2281
                    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2282
                else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2283
                    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2284
                    integerParam.SetInteger( CPhoneMainResourceResolver::Instance()->
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2285
                            ResolveResourceID( EPhoneNumberAcqCBA ) );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2286
                    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2287
                TRAP_IGNORE( ExecuteCommandL( EPhoneViewUpdateCba, &integerParam ) );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2288
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2289
            if ( !aIsEnabled )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2290
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2291
                TRAP_IGNORE( SwitchLayoutToFlatStatusPaneL( ETrue ) );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2292
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2293
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2294
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2295
    if ( securityModeChanged )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2296
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2297
        // Update cba if security mode changes while emergency call is ongoing
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2298
        if ( emergencyCallOngoing )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2299
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2300
            TRAP_IGNORE( static_cast<MEikCommandObserver*>( CEikonEnv::Static()->EikAppUi() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2301
                                ->ProcessCommandL( EPhoneCmdUpdateEmergencyCba ) );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2302
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2303
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2304
        // Update status pane dimming
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2305
        iStatusPane->StatusPane().SetDimmed( aIsEnabled );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2306
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2307
        // Uncapture the App key for sure
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2308
        TPhoneCmdParamKeyCapture appKeyCaptureParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2309
        appKeyCaptureParam.SetKey( EStdKeyApplication0 );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2310
        appKeyCaptureParam.SetKeyCode( EKeyApplication0 );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2311
        appKeyCaptureParam.SetCaptureType( EPhoneKeyAllEvents );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2312
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2313
        iKeyCaptureController->StopCapturingKey( &appKeyCaptureParam );
73
e30d4a1b8bad Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 69
diff changeset
  2314
        
e30d4a1b8bad Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 69
diff changeset
  2315
        // Uncapture the Camera key for sure, if it exists
e30d4a1b8bad Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 69
diff changeset
  2316
        if ( !iSecurityMode && FeatureManager::FeatureSupported( KFeatureIdCamera ) )
e30d4a1b8bad Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 69
diff changeset
  2317
            {
e30d4a1b8bad Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 69
diff changeset
  2318
            TPhoneCmdParamKeyCapture cameraKeyCaptureParam;
e30d4a1b8bad Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 69
diff changeset
  2319
            cameraKeyCaptureParam.SetKey( EStdKeyDevice7 );
e30d4a1b8bad Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 69
diff changeset
  2320
            cameraKeyCaptureParam.SetKeyCode( EKeyDevice7 );
e30d4a1b8bad Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 69
diff changeset
  2321
            cameraKeyCaptureParam.SetCaptureType( EPhoneKeyAllEvents );
e30d4a1b8bad Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 69
diff changeset
  2322
            iKeyCaptureController->StopCapturingKey( &cameraKeyCaptureParam );
e30d4a1b8bad Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 69
diff changeset
  2323
            }
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2324
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2325
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2326
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2327
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2328
// CPhoneViewController::IdleAppUid
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2329
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2330
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2331
TInt CPhoneViewController::IdleAppUid()
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2332
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2333
    if ( iIdleUid == KErrNotFound )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2334
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2335
        // Get Idle's UID from PubSub.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2336
        iIdleUid = CPhonePubSubProxy::Instance()->Value(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2337
            KPSUidAiInformation,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2338
            KActiveIdleUid );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2339
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2340
        __PHONELOG1( EBasic, EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2341
            "CPhoneViewController::ConstructL -> iIdleUid = (%d)", iIdleUid );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2342
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2343
    return iIdleUid;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2344
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2345
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2346
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2347
// CPhoneViewController::SetBlockingDialogIsDisplayed
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2348
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2349
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2350
EXPORT_C void CPhoneViewController::SetBlockingDialogIsDisplayed(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2351
        TBool aBlockingDialog )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2352
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2353
    iBlockingDialogIsDisplayed = aBlockingDialog;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2354
    __PHONELOG1( EBasic, EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2355
        "CPhoneViewController::SetBlockingDialogIsDisplayed(%d)",
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2356
        iBlockingDialogIsDisplayed );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2357
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2358
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2359
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2360
// CPhoneViewController::NumberEntryStateChanged
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2361
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2362
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2363
void CPhoneViewController::NumberEntryStateChanged( TBool aEntryHasText )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2364
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2365
    iMenuController->SetNumberEntryEmptyFlag( !aEntryHasText );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2366
    iBubbleWrapper->HandleNumberEntryChanged();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2367
    TRAP_IGNORE( ExecuteCommandL( EPhoneViewUpdateToolbar ) );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2368
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2369
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2370
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2371
// CPhoneViewController::GetBlockingDialogIsDisplayed
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2372
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2373
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2374
void CPhoneViewController::GetBlockingDialogIsDisplayed(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2375
    TPhoneCommandParam* aCommandParam )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2376
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2377
    if( aCommandParam->ParamId() == TPhoneCommandParam::EPhoneParamIdBoolean )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2378
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2379
        TPhoneCmdParamBoolean* booleanValue =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2380
            static_cast<TPhoneCmdParamBoolean*>( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2381
        booleanValue->SetBoolean( iBlockingDialogIsDisplayed );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2382
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2383
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2384
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2385
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2386
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2387
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2388
// CPhoneViewController::SendToBackgroundL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2389
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2390
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2391
void CPhoneViewController::SendToBackgroundL()
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2392
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2393
    __PHONELOG( EBasic, EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2394
        "CPhoneViewController::SendToBackgroundL" );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2395
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2396
    TApaTaskList appList( iEikEnv.WsSession() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2397
    TApaTask phoneApp = appList.FindApp( KUidPhoneApplication );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2398
    iSendBack = EFalse;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2399
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2400
    __PHONELOG1( EBasic, EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2401
        "CPhoneViewController::SendToBackgroundL - phoneApp.WgId() (%d)",  phoneApp.WgId() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2402
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2403
    // no need for sending phone background if it is not front
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2404
    if ( ( phoneApp.Exists() ) && phoneApp.WgId() ==
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2405
            ForegroundApplicationWindowGroupId() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2406
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2407
        // make sure that previous application window group id is not
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2408
        //telephony's
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2409
        if( iPrevForegroundAppWg > 0 &&
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2410
            iPrevForegroundAppWg != phoneApp.WgId() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2411
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2412
            // check that previous app still exists. It might be for example
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2413
            // add to contact - dialog that is allready destroyed.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2414
            TInt previousApp = FindAppByWgIDL( iPrevForegroundAppWg );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2415
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2416
            if( previousApp != KErrNotFound )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2417
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2418
                __PHONELOG1( EBasic, EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2419
                 "CPhoneViewController::SendToBackgroundL - Bring previous app to foreground (%d)"
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2420
                        ,  iPrevForegroundAppWg );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2421
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2422
                CAknSgcClient::MoveApp( iPrevForegroundAppWg, ESgcMoveAppToForeground );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2423
                iSendBack = ETrue;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2424
                SetWindowGroupPosition();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2425
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2426
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2427
        else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2428
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2429
            __PHONELOG( EBasic, EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2430
                "CPhoneViewController::SendToBackgroundL - send telephony to background" );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2431
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2432
            iSendBack = ETrue;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2433
            CAknSgcClient::MoveApp( phoneApp.WgId(),
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2434
                                    ESgcMoveAppToBackground );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2435
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2436
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2437
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2438
    // Clear the send to background flag
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2439
    iNeedToReturnToForegroundAppAfterCall = EFalse;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2440
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2441
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2442
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2443
// CPhoneViewController::FindAppByWgIDL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2444
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2445
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2446
TInt CPhoneViewController::FindAppByWgIDL( TInt aAppWgID ) const
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2447
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2448
    __LOGMETHODSTARTEND( EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2449
        "CPhoneViewController::FindAppByWgIDL() ")
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2450
    TInt appExists( KErrNotFound );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2451
    RWsSession& wsSession = iEikEnv.WsSession();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2452
    const TInt numWg = wsSession.NumWindowGroups(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2453
            KPhoneApplicationWindowGroupPriority );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2454
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2455
    CArrayFixFlat<TInt>* wgList =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2456
        new (ELeave) CArrayFixFlat<TInt>( numWg );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2457
    CleanupStack::PushL( wgList );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2458
    wgList->SetReserveL( numWg );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2459
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2460
    // Get list of window groups; all applications should be at priority 0.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2461
    if ( wsSession.WindowGroupList(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2462
        KPhoneApplicationWindowGroupPriority,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2463
        wgList ) == KErrNone )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2464
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2465
        for( TInt i = 0; i < wgList->Count(); i++ )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2466
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2467
            if( aAppWgID == wgList->At( i ) )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2468
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2469
                appExists = i;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2470
                break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2471
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2472
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2473
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2474
    CleanupStack::PopAndDestroy( wgList );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2475
    return appExists;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2476
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2477
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2478
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2479
// CPhoneViewController::SetWindowGroupPosition
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2480
// This is used when dialer has opened some other
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2481
// app(Logs) and MT call arrives, when MT call is
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2482
// answered phone is put to backround and it isnt anymore next
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2483
// active app which means that when previous app is opened
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2484
// after answer and user presses exit we need to update
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2485
// ordinal position so that dialer is activated.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2486
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2487
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2488
void CPhoneViewController::SetWindowGroupPosition()
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2489
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2490
    iEikEnv.WsSession().SetWindowGroupOrdinalPosition(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2491
        ApplicationWindowGroupId(),
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2492
        KPhoneWindowGroupPositionBackground );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2493
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2494
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2495
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2496
// CPhoneViewController::BringAppToForeground
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2497
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2498
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2499
void CPhoneViewController::BringAppToForeground(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2500
    TPhoneCommandParam* aCommandParam )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2501
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2502
    TPhoneCmdParamInteger* integerParam =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2503
            static_cast<TPhoneCmdParamInteger*>( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2504
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2505
   TApaTaskList appList( iEikEnv.WsSession() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2506
   TApaTask application = appList.FindApp(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2507
                                   TUid::Uid( integerParam->Integer() ) );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2508
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2509
   __PHONELOG1( EBasic, EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2510
                 "CPhoneViewController::BringAppToForeground - App WG ID: %d",
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2511
                 application.WgId() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2512
   if( application.Exists() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2513
       {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2514
       iPrevForegroundAppWg = ForegroundApplicationWindowGroupId();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2515
       CAknSgcClient::MoveApp( application.WgId(), ESgcMoveAppToForeground );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2516
       __PHONELOG1( EBasic, EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2517
                     "CPhoneViewController::BringAppToForeground - Previous App WG ID: %d",
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2518
                     iPrevForegroundAppWg );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2519
       }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2520
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2521
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2522
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2523
// CPhoneViewController::BringPhoneAppToForeground
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2524
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2525
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2526
void CPhoneViewController::BringPhoneAppToForeground(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2527
    TPhoneCommandParam* aCommandParam )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2528
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2529
    __PHONELOG( EBasic, EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2530
        "CPhoneViewController::BringPhoneAppToForeground()" );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2531
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2532
    TPhoneCmdParamInteger* integerParam =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2533
        static_cast<TPhoneCmdParamInteger*>( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2534
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2535
    TApaTaskList appList( iEikEnv.WsSession() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2536
    TApaTask phoneApp = appList.FindApp(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2537
                                    TUid::Uid( integerParam->Integer() ) );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2538
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2539
    // Saves previous window group id. Test if app is allready in front.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2540
    if( phoneApp.Exists() &&
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2541
        ForegroundApplicationWindowGroupId() !=  phoneApp.WgId() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2542
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2543
        iPrevForegroundAppWg = ForegroundApplicationWindowGroupId();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2544
        CAknSgcClient::MoveApp( phoneApp.WgId(), ESgcMoveAppToForeground );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2545
        __PHONELOG1( EBasic, EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2546
                      "CPhoneViewController::BringPhoneAppToForeground - Previous App WG ID: %d",
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2547
                      iPrevForegroundAppWg );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2548
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2549
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2550
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2551
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2552
// CPhoneViewController::SetTopApplicationL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2553
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2554
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2555
void CPhoneViewController::SetTopApplicationL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2556
    TPhoneCommandParam* aCommandParam )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2557
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2558
    // Set the top application
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2559
    TPhoneCmdParamInteger* integerParam =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2560
        static_cast<TPhoneCmdParamInteger*>( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2561
    CPhonePubSubProxy::Instance()->ChangePropertyValue(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2562
        KPSUidUikon,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2563
        KUikVideoCallTopApp,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2564
        integerParam->Integer() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2565
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2566
    // Hide the Phone icon if it is not the top application
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2567
    SetHiddenL( integerParam->Integer() != KUidPhoneApplication.iUid );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2568
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2569
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2570
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2571
// CPhoneViewController::GetForegroundApplication
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2572
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2573
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2574
void CPhoneViewController::GetForegroundApplication(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2575
    TPhoneCommandParam* aCommandParam )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2576
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2577
    // Get the foreground application window group id
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2578
    TPhoneCmdParamInteger* integerParam =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2579
        static_cast<TPhoneCmdParamInteger*>( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2580
    integerParam->SetInteger( ForegroundApplicationWindowGroupId() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2581
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2582
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2583
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2584
// CPhoneViewController::ActivateAppViewConventionalL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2585
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2586
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2587
void CPhoneViewController::ActivateAppViewConventionalL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2588
    TPhoneCommandParam* aCommandParam )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2589
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2590
    TPhoneCmdParamAppInfo* appInfoParam =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2591
        static_cast<TPhoneCmdParamAppInfo*>( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2592
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2593
    TApaTaskList taskList( iEikEnv.WsSession() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2594
    TApaTask task = taskList.FindApp( appInfoParam->AppUid() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2595
    if ( task.Exists() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2596
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2597
        CAknSgcClient::MoveApp( task.WgId(), ESgcMoveAppToForeground );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2598
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2599
    else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2600
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2601
        CreateConnectionL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2602
        HBufC* param = HBufC::NewLC( appInfoParam->Param().Length() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2603
        param->Des().Copy( appInfoParam->Param() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2604
        TThreadId id;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2605
        User::LeaveIfError(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2606
            iApaLsSession.StartDocument( *param,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2607
            appInfoParam->AppUid(), id ) );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2608
        CleanupStack::PopAndDestroy( param );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2609
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2610
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2611
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2612
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2613
// CPhoneViewController::ActivateAppL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2614
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2615
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2616
void CPhoneViewController::ActivateAppL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2617
    TPhoneCommandParam* aCommandParam )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2618
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2619
    TPhoneCmdParamAppInfo* appInfoParam =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2620
        static_cast<TPhoneCmdParamAppInfo*>( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2621
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2622
    __PHONELOG( EBasic, EPhoneUIView,"CPhoneViewController::ActivateAppL()" );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2623
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2624
    CreateConnectionL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2625
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2626
    if ( appInfoParam->MultipleInstances() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2627
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2628
        ActivateAppInstanceL( appInfoParam->AppUid() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2629
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2630
    else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2631
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2632
        TApaTaskList apaTaskList( iEikEnv.WsSession() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2633
        TApaTask apaTask = apaTaskList.FindApp( appInfoParam->AppUid() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2634
        if ( apaTask.Exists() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2635
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2636
            __PHONELOG( EBasic, EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2637
                "CPhoneViewController::ActivateAppL() bring to foreground" );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2638
            CAknSgcClient::MoveApp( apaTask.WgId(), ESgcMoveAppToForeground );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2639
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2640
        else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2641
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2642
            ActivateAppInstanceL( appInfoParam->AppUid() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2643
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2644
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2645
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2646
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2647
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2648
// CPhoneViewController::ActivateAppInstanceL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2649
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2650
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2651
void CPhoneViewController::ActivateAppInstanceL( TUid aUid )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2652
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2653
    __PHONELOG( EBasic, EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2654
        "CPhoneViewController::ActivateAppInstanceL()" );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2655
    CreateConnectionL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2656
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2657
    TApaAppInfo appInfo;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2658
    User::LeaveIfError( iApaLsSession.GetAppInfo( appInfo, aUid ) );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2659
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2660
#ifdef SYMBIAN_SUPPORT_UI_FRAMEWORKS_V1
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2661
    CApaCommandLine* apaCommandLine = CApaCommandLine::NewLC(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2662
        appInfo.iFullName );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2663
#else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2664
    CApaCommandLine* apaCommandLine = CApaCommandLine::NewLC();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2665
    apaCommandLine->SetExecutableNameL( appInfo.iFullName );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2666
    apaCommandLine->SetCommandL( EApaCommandRun );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2667
#endif // SYMBIAN_SUPPORT_UI_FRAMEWORKS_V1
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2668
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2669
    User::LeaveIfError ( iApaLsSession.StartApp( *apaCommandLine ) );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2670
    CleanupStack::PopAndDestroy( apaCommandLine );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2671
    __PHONELOG( EBasic, EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2672
        "CPhoneViewController::ActivateAppInstanceL() done" );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2673
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2674
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2675
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2676
// CPhoneViewController::ActivateAppViewL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2677
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2678
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2679
void CPhoneViewController::ActivateAppViewL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2680
    TPhoneCommandParam* aCommandParam )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2681
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2682
    TPhoneCmdParamAppInfo* appInfoParam =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2683
        static_cast<TPhoneCmdParamAppInfo*>( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2684
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2685
    __PHONELOG( EBasic, EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2686
                "CPhoneViewController::ActivateAppViewL()" );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2687
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2688
    TVwsViewId view( appInfoParam->AppUid(), appInfoParam->ViewUid() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2689
    iEikEnv.EikAppUi()->ActivateViewL( view );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2690
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2691
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2692
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2693
// CPhoneViewController::ActivateAppViewL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2694
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2695
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2696
void CPhoneViewController::ActivateAppViewWithCustomMessageL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2697
    TPhoneCommandParam* aCommandParam )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2698
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2699
    TPhoneCmdParamAppInfo* appInfoParam =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2700
        static_cast<TPhoneCmdParamAppInfo*>( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2701
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2702
    __PHONELOG( EBasic, EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2703
        "CPhoneViewController::ActivateAppViewWithCustomMessageL()" );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2704
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2705
    TVwsViewId view( appInfoParam->AppUid(), appInfoParam->ViewUid() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2706
    iEikEnv.EikAppUi()->ActivateViewL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2707
        view,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2708
        appInfoParam->CustomMessageId(),
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2709
        appInfoParam->CustomMessage() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2710
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2711
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2712
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2713
// CPhoneViewController::CreateConnectionL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2714
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2715
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2716
void CPhoneViewController::CreateConnectionL()
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2717
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2718
    if ( !iApaLsSession.Handle() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2719
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2720
        User::LeaveIfError( iApaLsSession.Connect() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2721
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2722
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2723
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2724
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2725
// CPhoneViewController::LaunchMultimediaSharingL (static)
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2726
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2727
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2728
void CPhoneViewController::LaunchMultimediaSharingL()
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2729
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2730
    CMusManager* manager = CMusManager::NewLC();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2731
    manager->StartApplicationL( MultimediaSharing::EMusLiveVideo );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2732
    CleanupStack::PopAndDestroy( manager );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2733
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2734
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2735
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2736
// CPhoneViewController::LaunchApplicationL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2737
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2738
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2739
void CPhoneViewController::LaunchApplicationL()
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2740
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2741
    //long 0 launches application defined in KTelAppLaunch key.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2742
    TInt appId(0);
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2743
    TUid appUid;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2744
    User::LeaveIfError( CPhoneCenRepProxy::Instance()->GetInt(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2745
        KCRUidTelPrivateVariation,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2746
        KTelAppLaunch,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2747
        appId ) );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2748
    appUid.iUid = appId;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2749
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2750
    __PHONELOG1( EBasic, EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2751
        "CPhoneViewController::LaunchApplicationL appId: %d",
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2752
        appId );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2753
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2754
    HBufC* params = HBufC::NewLC( KPhoneMaxParamLength );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2755
    TPtr ptr = params->Des();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2756
    User::LeaveIfError( CPhoneCenRepProxy::Instance()->GetString(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2757
        KCRUidTelPrivateVariation,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2758
        KTelAppLaunchParam,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2759
        ptr ) );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2760
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2761
    TApaTaskList taskList( iEikEnv.WsSession() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2762
    TApaTask task = taskList.FindApp( appUid );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2763
    if ( task.Exists() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2764
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2765
        // Uid is not used.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2766
        HBufC8* param = CnvUtfConverter::ConvertFromUnicodeToUtf8L( *params );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2767
        User::LeaveIfError( task.SendMessage( TUid::Uid( 0 ), *param ) );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2768
        delete param;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2769
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2770
    else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2771
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2772
        CreateConnectionL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2773
        TThreadId thread;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2774
        User::LeaveIfError(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2775
            iApaLsSession.StartDocument(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2776
                *params,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2777
                appUid,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2778
                thread ) );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2779
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2780
    CleanupStack::PopAndDestroy( params ); // params
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2781
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2782
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2783
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2784
// CPhoneViewController::LaunchHelpApplicationL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2785
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2786
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2787
void CPhoneViewController::LaunchHelpApplicationL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2788
    const TDesC& aHelpCommand )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2789
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2790
    // Save the help command
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2791
    iHelpCommand.Set( aHelpCommand );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2792
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2793
    // Activate Help application
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2794
    HlpLauncher::LaunchHelpApplicationL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2795
       CCoeEnv::Static()->WsSession(),
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2796
       iEikEnv.EikAppUi()->AppHelpContextL() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2797
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2798
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2799
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2800
// CPhoneViewController::HelpContext
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2801
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2802
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2803
EXPORT_C const TDesC& CPhoneViewController::HelpContext()
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2804
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2805
    return iHelpCommand;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2806
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2807
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2808
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2809
// CPhoneViewController::SetCbaL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2810
// Set the CBA to the specified setting
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2811
// (other items were commented in a header).
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2812
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2813
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2814
void CPhoneViewController::SetCbaL( TPhoneCommandParam* aCommandParam )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2815
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2816
    TPhoneCmdParamInteger* cbaResource =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2817
        static_cast<TPhoneCmdParamInteger*>( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2818
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2819
    TInt resourceId = cbaResource->Integer();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2820
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2821
    iCba->SetCommandSetL( resourceId );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2822
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2823
    iCba->DrawDeferred();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2824
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2825
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2826
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2827
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2828
// CPhoneViewController::SetEikonNotifiersDisabled
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2829
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2830
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2831
void CPhoneViewController::SetEikonNotifiersDisabled(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2832
    TPhoneCommandParam* aCommandParam )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2833
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2834
    TPhoneCmdParamBoolean* booleanParam =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2835
        static_cast<TPhoneCmdParamBoolean*>( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2836
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2837
    if ( booleanParam->Boolean() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2838
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2839
        if ( !iPriotityChanged )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2840
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2841
            //Store current ordinal priority.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2842
            iPrevious = CEikonEnv::Static()->RootWin().OrdinalPriority();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2843
            iPriotityChanged = ETrue;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2844
            //Rise window priority in order to get phoneview on top of eikon
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2845
            //notifiers. e.g. Select USB mode notifier is the one which using
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2846
            //eikon notiers.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2847
            CEikonEnv::Static()->RootWin().SetOrdinalPosition(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2848
                    0,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2849
                    ECoeWinPriorityAlwaysAtFront-1 );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2850
            __PHONELOG( EBasic, EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2851
            "CPhoneViewController::SetEikonNotifiersDisabled()_priority_rise" );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2852
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2853
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2854
    // enable notifiers, sametime reset previous rootwin priority
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2855
    else if ( iPriotityChanged )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2856
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2857
        TInt ordinalPos = CEikonEnv::Static()->RootWin().OrdinalPosition();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2858
        CEikonEnv::Static()->RootWin().SetOrdinalPosition(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2859
                ordinalPos,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2860
                iPrevious );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2861
        iPriotityChanged = EFalse;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2862
        __PHONELOG( EBasic, EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2863
        "CPhoneViewController::SetEikonNotifiersDisabled()_priority_reset" );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2864
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2865
    __PHONELOG1( EBasic, EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2866
        "CPhoneViewController::SetEikonNotifiersDisabled(%d)",
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2867
        booleanParam->Boolean() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2868
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2869
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2870
// CPhoneViewController::SetGlobalNotifiersDisabledL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2871
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2872
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2873
void CPhoneViewController::SetGlobalNotifiersDisabledL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2874
    TPhoneCommandParam* aCommandParam )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2875
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2876
    TPhoneCmdParamBoolean* booleanParam =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2877
        static_cast<TPhoneCmdParamBoolean*>( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2878
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2879
    // Global note always removed if exists when notifiers disabled
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2880
    if ( booleanParam->Boolean() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2881
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2882
        ExecuteCommandL( EPhoneViewRemoveGlobalNote );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2883
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2884
    iKeyLock.EnableSoftNotifications( !booleanParam->Boolean() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2885
    __PHONELOG1( EBasic, EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2886
        "CPhoneViewController::SetGlobalNotifiersDisabledL(%d)",
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2887
        booleanParam->Boolean() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2888
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2889
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2890
// CPhoneViewController::CancelAllNotications
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2891
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2892
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2893
void CPhoneViewController::CancelAllNotications()
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2894
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2895
    iKeyLock.CancelAllNotifications();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2896
    __PHONELOG( EBasic, EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2897
        "CPhoneViewController::CancelAllNotications()");
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2898
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2899
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2900
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2901
// CPhoneViewController::HandleUpdateBubbleL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2902
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2903
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2904
void CPhoneViewController::HandleUpdateBubbleL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2905
    TInt aCallId,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2906
    TPhoneCommandParam* aCommandParam )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2907
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2908
     // Check is the given parameter valid
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2909
    if ( aCommandParam->ParamId() ==
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2910
        TPhoneCommandParam::EPhoneParamIdCallHeaderData )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2911
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2912
        __PHONELOG( EBasic, EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2913
            "CPhoneViewController::HandleUpdateBubble()" );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2914
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2915
        TPhoneCmdParamCallHeaderData* callHeaderParam =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2916
            static_cast<TPhoneCmdParamCallHeaderData*>( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2917
        iBubbleWrapper->PrepareCallStateL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2918
            aCallId,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2919
            callHeaderParam->CallState(),
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2920
            callHeaderParam->LabelText(),
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2921
            callHeaderParam->ShortLabelText() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2922
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2923
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2924
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2925
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2926
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2927
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2928
// CPhoneViewController::SoftRejectIsEnabled
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2929
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2930
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2931
TBool CPhoneViewController::SoftRejectIsEnabled() const
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2932
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2933
    // Check if phone is locked
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2934
    const TBool phoneIsLocked =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2935
        CPhonePubSubProxy::Instance()->Value(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2936
        KPSUidCoreApplicationUIs,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2937
        KCoreAppUIsAutolockStatus ) > EAutolockOff;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2938
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2939
    if ( phoneIsLocked || IsSecurityCodeQuery() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2940
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2941
        // Soft Reject is enabled if the phone is not locked.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2942
        // Security Code query is checked because in the boot
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2943
        // autolock status value is OFF even when it's actually
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2944
        // ON so we need to do this double checking.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2945
        return EFalse;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2946
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2947
    return ETrue;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2948
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2949
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2950
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2951
// CPhoneViewController::IsSecurityCodeQuery
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2952
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2953
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2954
TBool CPhoneViewController::IsSecurityCodeQuery() const
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2955
  {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2956
  return CPhonePubSubProxy::Instance()->Value(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2957
    KPSUidStartup,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2958
    KStartupSecurityCodeQueryStatus ) == ESecurityQueryActive;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2959
  }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2960
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2961
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2962
// CPhoneViewController::GetNumberFromSpeedDialLocationL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2963
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2964
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2965
TBool CPhoneViewController::GetNumberFromSpeedDialLocationL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2966
    TPhoneCommandParam* aCommandParam )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2967
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2968
    __LOGMETHODSTARTEND(EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2969
        "CPhoneViewController::GetNumberFromSpeedDialLocationL() ");
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2970
    TPhoneCmdParamSpeedDial* speedDialContent =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2971
        static_cast<TPhoneCmdParamSpeedDial*>( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2972
    TBool retValue( ETrue );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2973
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2974
    if ( speedDialContent->Location() != KErrNotFound )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2975
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2976
        TBuf<KPhoneNumberEntryBufferSize> speedDialNumber;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2977
        speedDialNumber.Zero(); // empty the string
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2978
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2979
        // Indicate that the speed dial controller is blocking key
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2980
        // events from the Phone
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2981
        iBlockingDialogIsDisplayed = ETrue;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2982
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2983
        CreateSpeedDialControllerL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2984
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2985
        TInt err = iVmbxHandler->GetStraightSpeedDialNumber(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2986
                        speedDialContent->Location(),
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2987
                        speedDialNumber );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2988
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2989
        // Straight number founded
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2990
        if ( err == KErrNone && speedDialNumber.Length() != 0)
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2991
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2992
            if ( iVmbxHandler->GetMailboxType() == EVmbxVideo )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2993
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2994
                speedDialContent->SetNumberType( EPhoneNumberTypeVideo );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2995
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2996
            else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2997
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2998
                speedDialContent->SetNumberType( EPhoneNumberTypeCS );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  2999
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3000
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3001
        else if ( iVmbxHandler->IsStraightCallToVideoMailBox() &&
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3002
              ( speedDialContent->Location() == KPhoneVideoMbxLocation ||
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3003
              speedDialContent->Location() == KPhoneVoiceMailBoxLocation ))
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3004
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3005
            // Mbx number field of given type was empty and assigning cancelled
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3006
            retValue = EFalse;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3007
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3008
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3009
        else if ( speedDialContent->Location() == KPhoneVoiceMailBoxLocation )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3010
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3011
            // Get the voice mail box type and service ID
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3012
            TUint serviceId( 0 );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3013
            TInt mailboxType = iVmbxHandler->SelectMailboxTypeL( serviceId );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3014
            speedDialContent->SetServiceId( serviceId );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3015
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3016
            // Get the voice mail box number
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3017
            if ( mailboxType == EVmbxNone )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3018
              {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3019
              // Nothing selected from the mailbox selection
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3020
              retValue = EFalse;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3021
              }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3022
            else if ( iVmbxHandler->LaunchMbx( mailboxType, speedDialNumber )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3023
                      == KErrNone )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3024
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3025
                if ( mailboxType == EVmbxVideo )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3026
                    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3027
                    speedDialContent->SetNumberType( EPhoneNumberTypeVideo );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3028
                    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3029
                else if ( mailboxType == EVmbxIP )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3030
                    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3031
                    speedDialContent->SetNumberType( EPhoneNumberTypeVoip );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3032
                    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3033
                else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3034
                    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3035
                    speedDialContent->SetNumberType( EPhoneNumberTypeCS );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3036
                    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3037
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3038
            else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3039
              {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3040
              // Mbx number field of given type was empty and assigning cancelled
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3041
              retValue = EFalse;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3042
              }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3043
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3044
        else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3045
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3046
            // Get the number from the speed dial location
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3047
            iSpeedDialController->GetSpeedDialFieldL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3048
                speedDialContent->Location(), speedDialNumber );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3049
            if (speedDialNumber.Length() == 0 )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3050
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3051
                AssignSpeedDialLocationL( speedDialContent->Location() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3052
                // Get the number from the speed dial location
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3053
                iSpeedDialController->GetSpeedDialFieldL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3054
                    speedDialContent->Location(), speedDialNumber );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3055
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3056
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3057
            // If assigned
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3058
            if ( speedDialNumber.Length() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3059
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3060
                speedDialContent->SetNumberType(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3061
                    SpeedDialNumberTypeL( speedDialContent->Location() ) );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3062
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3063
            else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3064
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3065
                retValue = EFalse;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3066
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3067
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3068
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3069
        // Reset the flag
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3070
        iBlockingDialogIsDisplayed = EFalse;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3071
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3072
        TPtr* phoneNumber = speedDialContent->PhoneNumber();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3073
        phoneNumber->Append( speedDialNumber );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3074
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3075
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3076
    return retValue;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3077
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3078
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3079
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3080
// CPhoneViewController::SpeedDialNumberTypeL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3081
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3082
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3083
TPhoneNumberType CPhoneViewController::SpeedDialNumberTypeL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3084
        TInt aSpeedDialLocation )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3085
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3086
    __LOGMETHODSTARTEND( EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3087
            "CPhoneViewController::SpeedDialNumberTypeL() ");
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3088
    CPhCntSpeedDialMonitor::TSpdDialFieldInfo fieldInfo;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3089
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3090
    TBuf<KPhoneNumberEntryBufferSize> number;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3091
    TContactItemId itemId = iSpeedDialController->GetSpeedDialFieldL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3092
                                aSpeedDialLocation,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3093
                                number,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3094
                                fieldInfo );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3095
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3096
    __PHONELOG1( EBasic, EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3097
        "CPhoneViewController::SpeedDialNumberTypeL - itemId = %d ", itemId );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3098
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3099
    return ConvertNumberTypeFromSpeedDialFieldInfo( fieldInfo );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3100
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3101
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3102
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3103
// CPhoneViewController::ConvertNumberTypeFromSpeedDialFieldInfo
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3104
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3105
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3106
TPhoneNumberType CPhoneViewController::ConvertNumberTypeFromSpeedDialFieldInfo(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3107
    const CPhCntSpeedDialMonitor::TSpdDialFieldInfo& aFieldInfo )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3108
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3109
    __LOGMETHODSTARTEND(EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3110
        "CPhoneViewController::ConvertNumberTypeFromSpeedDialFieldInfo() ");
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3111
    TPhoneNumberType retValue;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3112
    switch( aFieldInfo.iNumberType )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3113
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3114
        case MPhCntMatch::EVideoNumber:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3115
            retValue =  EPhoneNumberTypeVideo;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3116
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3117
        case MPhCntMatch::EVoipNumber:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3118
            retValue =  EPhoneNumberTypeVoip;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3119
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3120
        case KErrNotFound:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3121
            retValue = EPhoneNumberTypeNotFound;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3122
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3123
        default:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3124
            retValue = EPhoneNumberTypeCS;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3125
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3126
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3127
    __PHONELOG1( EBasic, EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3128
        "CPhoneViewController::ConvertNumberTypeFromSpeedDialFieldInfo - number type = %d ",
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3129
        retValue );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3130
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3131
    return retValue;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3132
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3133
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3134
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3135
// CPhoneViewController::AssignSpeedDialLocation
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3136
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3137
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3138
TBool CPhoneViewController::AssignSpeedDialLocation(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3139
    TPhoneCommandParam* aCommandParam )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3140
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3141
    __LOGMETHODSTARTEND(EPhoneUIView, "CPhoneViewController::AssignSpeedDialLocation( ) ")
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3142
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3143
    TPhoneCmdParamInteger* locationParam =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3144
        static_cast<TPhoneCmdParamInteger*>( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3145
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3146
    // Indicate that the contact operation is blocking key
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3147
    // events from the Phone
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3148
    iBlockingDialogIsDisplayed = ETrue;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3149
    TBool numberAssigned = EFalse;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3150
    TRAP_IGNORE( numberAssigned = AssignSpeedDialLocationL(locationParam->Integer()) );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3151
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3152
    // Reset the flag
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3153
    iBlockingDialogIsDisplayed = EFalse;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3154
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3155
    return numberAssigned;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3156
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3157
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3158
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3159
// CPhoneViewController::AssignSpeedDialLocationL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3160
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3161
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3162
TBool CPhoneViewController::AssignSpeedDialLocationL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3163
    TInt aLocation )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3164
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3165
    CreateSpeedDialControllerL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3166
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3167
    // Assign speed dial location
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3168
    TBuf<KPhoneNumberEntryBufferSize> number;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3169
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3170
    const TBool numberAssigned =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3171
        iSpeedDialController->AssignSpeedDialFieldL( aLocation, number );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3172
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3173
    return numberAssigned;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3174
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3175
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3176
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3177
// CPhoneViewController::OpenMessageEditorL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3178
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3179
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3180
void CPhoneViewController::OpenMessageEditorL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3181
    TPhoneCommandParam* aCommandParam )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3182
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3183
    TPhoneCmdParamMessageEditor* messageEditorParam =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3184
        static_cast<TPhoneCmdParamMessageEditor*>( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3185
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3186
    //Launch message editor standalone
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3187
    TUid mtmUid = { KSenduiMtmUniMessageUidValue };
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3188
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3189
    CSendUi* messageEditor = CSendUi::NewL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3190
    CleanupStack::PushL( messageEditor );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3191
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3192
    // Inform the SendUi to open the message editor. This is not a blocking
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3193
    // dialog so the flag does not need to be set.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3194
    messageEditor->CreateAndSendMessageL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3195
        mtmUid,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3196
        messageEditorParam->MessageData(),
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3197
        KNullUid,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3198
        EFalse );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3199
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3200
    CleanupStack::PopAndDestroy( messageEditor );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3201
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3202
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3203
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3204
// CPhoneViewController::OpenContactL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3205
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3206
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3207
void CPhoneViewController::OpenAddToContactL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3208
    TInt aCommand,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3209
    const TDesC& aString )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3210
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3211
    __LOGMETHODSTARTEND(EPhoneUIView, "CPhoneViewController::OpenAddToContactL( ) ")
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3212
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3213
    TPhoneCmdParamString phoneNumberString;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3214
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3215
    HBufC *phoneNumber = HBufC::NewL( KPhoneNumberEntryBufferSize );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3216
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3217
    if ( KErrNone == aString.Compare( KNullDesC ) )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3218
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3219
        // get the number entry contents
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3220
        TPtr ptr( phoneNumber->Des() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3221
        phoneNumberString.SetString( &ptr );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3222
        iBubbleWrapper->GetNumberEntryContent( &phoneNumberString );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3223
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3224
    else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3225
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3226
        phoneNumber->Des().Copy( aString );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3227
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3228
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3229
    // Indicate that the contact operation is blocking key
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3230
    // events from the Phone
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3231
    iBlockingDialogIsDisplayed = ETrue;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3232
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3233
    TRAPD( err,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3234
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3235
        // Create the contact dialog
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3236
        iContactSaveAddToName = iContactController->CreateSaveAddToNameL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3237
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3238
        // The contact operation may be cancelled if the END key
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3239
        // is pressed. If so, the blocking dialog will be removed.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3240
        if ( iBlockingDialogIsDisplayed )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3241
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3242
            // Inform the Contact to open the contacts
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3243
            iContactSaveAddToName->HandlePbkOperationL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3244
                *phoneNumber, // TelNum
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3245
                aCommand );//CreateNew/Update
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3246
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3247
        }) //TRAPD
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3248
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3249
    RemoveAddToContactDialog();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3250
    delete phoneNumber;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3251
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3252
    // Reset the flag
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3253
    iBlockingDialogIsDisplayed = EFalse;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3254
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3255
    User::LeaveIfError( err );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3256
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3257
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3258
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3259
// CPhoneViewController::RemovePhoneDialogsL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3260
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3261
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3262
void CPhoneViewController::RemovePhoneDialogsL()
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3263
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3264
    __PHONELOG( EBasic, EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3265
        "CPhoneViewController::RemovePhoneDialogsL()" );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3266
    // Remove the note, if necessary
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3267
    iNoteController->DestroyNote();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3268
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3269
    // Remove the query, if necessary.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3270
    // Global query not allowed to destroy in this phase.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3271
    iQueryController->DestroyQuery();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3272
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3273
    // Remove contact dialog.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3274
    RemoveAddToContactDialog();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3275
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3276
    // Dismiss queries from customization, if necessary
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3277
   if ( iCustomization )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3278
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3279
        iCustomization->RemoveDialog();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3280
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3281
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3282
    // Remove speeddial dialogs.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3283
    if ( iSpeedDialController )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3284
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3285
        iSpeedDialController->Cancel();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3286
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3287
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3288
    if ( iSingleItemFetch )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3289
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3290
        // Cancel the Single Item Fetch
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3291
        iSingleItemFetch->Delete();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3292
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3293
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3294
    if ( iVmbxHandler )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3295
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3296
        iVmbxHandler->CancelVmbx();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3297
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3298
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3299
    if ( iRfsHandler )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3300
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3301
        __PHONELOG( EBasic, EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3302
            "CPhoneViewController::RemovePhoneDialogsL() CPhCntRfsHandler::ERfsCmdCancel" );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3303
        iRfsHandler->ProcessCommandL( CPhCntRfsHandler::ERfsCmdCancel );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3304
        delete iRfsHandler;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3305
        iRfsHandler = NULL;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3306
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3307
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3308
    // Remove all blocking dialogs
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3309
    if ( iBlockingDialogIsDisplayed )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3310
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3311
        // Reset the flag
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3312
        iBlockingDialogIsDisplayed = EFalse;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3313
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3314
        __PHONELOG( EBasic, EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3315
            "CPhoneViewController::RemovePhoneDialogsL() AknDialogShutter::ShutDialogsL" );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3316
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3317
        TRAP_IGNORE(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3318
            AknDialogShutter::ShutDialogsL( iEikEnv ) );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3319
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3320
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3321
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3322
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3323
// CPhoneViewController::RemoveAddToContactDialog
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3324
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3325
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3326
void CPhoneViewController::RemoveAddToContactDialog()
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3327
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3328
    if ( iContactSaveAddToName )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3329
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3330
        delete iContactSaveAddToName;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3331
        iContactSaveAddToName = NULL;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3332
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3333
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3334
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3335
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3336
// CPhoneViewController::DoConstructContactControllerL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3337
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3338
// Callback function.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3339
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3340
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3341
TInt CPhoneViewController::DoConstructContactControllerL( TAny* aAny )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3342
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3343
    CPhoneViewController* viewController =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3344
        static_cast< CPhoneViewController* >( aAny );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3345
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3346
    return viewController->iContactController->ContinueConstructL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3347
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3348
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3349
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3350
// CPhoneViewController::UpdateAudioPathOptions
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3351
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3352
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3353
void CPhoneViewController::UpdateAudioPathOptions(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3354
    TPhoneCommandParam* aCommandParam )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3355
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3356
    __PHONELOG( EBasic, EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3357
        "CPhoneViewController::UpdateAudioPathOptions()" );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3358
    TPhoneCmdParamBoolean ihfParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3359
    TPhoneCmdParamBoolean wiredParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3360
    TPhoneCmdParamBoolean btaaParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3361
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3362
    TPhoneCmdParamAudioOutput* outputParam =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3363
        static_cast<TPhoneCmdParamAudioOutput*>( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3364
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3365
    ihfParam.SetBoolean(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3366
        outputParam->AudioOutput() == EPELoudspeaker );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3367
    wiredParam.SetBoolean(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3368
       ( outputParam->AudioOutput() == EPEWiredAudioAccessory ) ||
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3369
       ( outputParam->AudioOutput() == EPETTY ) );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3370
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3371
    btaaParam.SetBoolean(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3372
        outputParam->AudioOutput() == EPEBTAudioAccessory );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3373
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3374
    // Wired options
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3375
    iMenuController->SetWiredAccFlag( &wiredParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3376
    iToolbarController->SetWiredAccFlag( &wiredParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3377
    iMenuController->SetIhfFlag( &ihfParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3378
    iToolbarController->SetIhfFlag( &ihfParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3379
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3380
    // btaa menu options
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3381
    iMenuController->SetBTAccFlag( &btaaParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3382
	iToolbarController->SetBTAccFlag( &btaaParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3383
    iAudioController->HandleIhfChange( &ihfParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3384
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3385
    if ( iButtonsController )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3386
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3387
        iButtonsController->SetIhfFlag( &ihfParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3388
        iButtonsController->SetWiredAccFlag( &wiredParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3389
        iButtonsController->SetBTAccFlag( &btaaParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3390
        iButtonsController->ReplaceAudioButton();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3391
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3392
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3393
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3394
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3395
// CPhoneViewController::UpdateAudioAvailabilityOptions
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3396
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3397
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3398
void CPhoneViewController::UpdateAudioAvailabilityOptions(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3399
    TPhoneCommandParam* aCommandParam )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3400
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3401
    __PHONELOG( EBasic, EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3402
        "CPhoneViewController::UpdateAudioAvailabilityOptions()" );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3403
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3404
    TPhoneCmdParamBoolean wiredAvailableParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3405
    TPhoneCmdParamBoolean btAvailableParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3406
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3407
    TPhoneCmdParamAudioAvailability* outputParam =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3408
        static_cast<TPhoneCmdParamAudioAvailability*>( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3409
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3410
    wiredAvailableParam.SetBoolean(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3411
        outputParam->IsWiredAccAvailable() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3412
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3413
    btAvailableParam.SetBoolean(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3414
        outputParam->IsBTAccAvailable());
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3415
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3416
    // Wired options
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3417
    iMenuController->SetWiredAccAvailableFlag( &wiredAvailableParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3418
    iToolbarController->SetWiredAccFlag( &wiredAvailableParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3419
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3420
    // btaa menu options
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3421
    iMenuController->SetBTAccAvailableFlag( &btAvailableParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3422
	iToolbarController->SetBTAccAvailableFlag( &btAvailableParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3423
	
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3424
    if ( iButtonsController )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3425
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3426
        iButtonsController->SetBTAccAvailableFlag( &btAvailableParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3427
        iButtonsController->ReplaceAudioButton();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3428
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3429
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3430
    __PHONELOG2(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3431
        EBasic,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3432
        EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3433
        "CPhoneViewController::UpdateAudioAvailabilityOptions( BT: (%d), Wired: (%d) ) )",
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3434
        btAvailableParam.Boolean(),
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3435
        wiredAvailableParam.Boolean() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3436
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3437
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3438
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3439
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3440
// CPhoneViewController::LaunchRfsL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3441
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3442
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3443
void CPhoneViewController::LaunchRfsL( TBool aDeepRfs )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3444
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3445
    __LOGMETHODSTARTEND(EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3446
        "CPhoneViewController::LaunchRfsL()" );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3447
    CPhCntRfsHandler::TRfsCommand command;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3448
    if ( !iRfsHandler )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3449
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3450
        iRfsHandler = iContactController->CreateRfsHandlerL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3451
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3452
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3453
    if( aDeepRfs )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3454
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3455
        command = CPhCntRfsHandler::ERfsCmdActivateDeep;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3456
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3457
    else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3458
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3459
        command = CPhCntRfsHandler::ERfsCmdActivateNormal;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3460
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3461
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3462
    // Indicate that the rfs dialog is blocking key
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3463
    // events from the Phone
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3464
    iBlockingDialogIsDisplayed = ETrue;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3465
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3466
    TRAPD( err,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3467
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3468
        if ( iDialer )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3469
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3470
            ExecuteCommandL( EPhoneViewClearNumberEntryContent );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3471
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3472
        else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3473
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3474
            // Remove number entry
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3475
            ExecuteCommandL( EPhoneViewRemoveNumberEntry );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3476
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3477
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3478
        iRfsHandler->ProcessCommandL( command );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3479
        })
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3480
    delete iRfsHandler;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3481
    iRfsHandler = NULL;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3482
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3483
    iBlockingDialogIsDisplayed = EFalse;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3484
    User::LeaveIfError( err );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3485
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3486
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3487
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3488
// CPhoneViewController::OpenSoftRejectMessageEditorL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3489
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3490
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3491
void CPhoneViewController::OpenSoftRejectMessageEditorL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3492
    TPhoneCommandParam* aCommandParam )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3493
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3494
    __LOGMETHODSTARTEND(EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3495
        "CPhoneViewController::OpenSoftRejectMessageEditorL ()" );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3496
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3497
    TPhoneCmdParamSfiData* sfiParam =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3498
        static_cast<TPhoneCmdParamSfiData*>( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3499
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3500
    CMessageData* messageData = CMessageData::NewL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3501
    CleanupStack::PushL( messageData );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3502
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3503
    // Get message body
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3504
    HBufC* softRejectTxt = HBufC::NewLC( KPhoneSMSLength );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3505
    TPtr string( softRejectTxt->Des() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3506
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3507
    TInt softRejectDefaultInUseValue = 0;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3508
    const TInt err = CPhoneCenRepProxy::Instance()->GetInt(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3509
        KCRUidTelephonySettings,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3510
        KSettingsSoftRejectDefaultInUse,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3511
        softRejectDefaultInUseValue );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3512
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3513
    if ( err == KErrNone && softRejectDefaultInUseValue )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3514
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3515
        // Default txt used or not
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3516
        CPhoneCenRepProxy::Instance()->GetString(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3517
            KCRUidTelephonySettings,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3518
            KSettingsSoftRejectText,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3519
            string );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3520
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3521
    else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3522
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3523
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3524
        TParse fp;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3525
        fp.Set( KPhoneSoftRejectResource, &KDC_RESOURCE_FILES_DIR, NULL );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3526
        TFileName name( fp.FullName() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3527
        // Open soft reject resource file
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3528
        RConeResourceLoader coneResourceLoader( iEikEnv );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3529
        TInt softRejectResourceError = coneResourceLoader.Open( name );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3530
        if ( softRejectResourceError != KErrNone )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3531
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3532
            // Indicate that the soft reject feature cannot be enabled
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3533
            Panic( EPhoneViewErrorInAddingResourceFile );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3534
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3535
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3536
        CleanupStack::PopAndDestroy( softRejectTxt );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3537
        softRejectTxt = StringLoader::LoadLC( R_SOFT_REJECT_DEFAULT_TXT );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3538
        string.Set( softRejectTxt->Des() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3539
        coneResourceLoader.Close();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3540
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3541
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3542
    CRichText* text = CRichText::NewL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3543
        iEikEnv.SystemParaFormatLayerL(),
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3544
        iEikEnv.SystemCharFormatLayerL());
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3545
    CleanupStack::PushL( text );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3546
    text->Reset();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3547
    text->InsertL( 0, string );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3548
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3549
    // Set body text
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3550
    messageData->SetBodyTextL( text );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3551
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3552
    // store the remote caller's info
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3553
    if ( sfiParam->Name().Length() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3554
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3555
        // store both the name and the number
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3556
        messageData->AppendToAddressL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3557
            sfiParam->Number(), sfiParam->Name() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3558
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3559
    else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3560
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3561
        // store the number
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3562
        messageData->AppendToAddressL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3563
            sfiParam->Number() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3564
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3565
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3566
    // Inform SysAp not to re-activate keyguard even if the call ends.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3567
    CPhonePubSubProxy::Instance()->ChangePropertyValue(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3568
        KPSUidCoreApplicationUIs,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3569
        KCoreAppUIsSoftReject,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3570
        ECoreAppUIsSoftReject );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3571
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3572
    // Launch the Soft Reject message Editor.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3573
    TPhoneCmdParamMessageEditor messageEditorParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3574
    messageEditorParam.SetMessageData( messageData );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3575
    OpenMessageEditorL( &messageEditorParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3576
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3577
    CleanupStack::PopAndDestroy( text );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3578
    CleanupStack::PopAndDestroy( softRejectTxt );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3579
    CleanupStack::PopAndDestroy( messageData );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3580
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3581
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3582
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3583
// CPhoneViewController::SendMessageL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3584
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3585
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3586
void CPhoneViewController::SendMessageL()
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3587
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3588
    __LOGMETHODSTARTEND(EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3589
        "CPhoneViewController::SendMessageL()" );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3590
    // get the number entry contents
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3591
    HBufC *phoneNumber = HBufC::NewLC( KPhoneNumberEntryBufferSize );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3592
    TPtr ptr( phoneNumber->Des() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3593
    TPhoneCmdParamString stringParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3594
    stringParam.SetString( &ptr );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3595
    iBubbleWrapper->GetNumberEntryContent( &stringParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3596
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3597
    // Launch the message Editor.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3598
    TPhoneCmdParamMessageEditor messageEditorParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3599
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3600
    // create the message data
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3601
    CMessageData* messageData = CMessageData::NewLC();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3602
    messageData->AppendToAddressL( ptr );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3603
    messageEditorParam.SetMessageData( messageData );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3604
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3605
    if ( !iDialer )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3606
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3607
        // Remove number entry from screen
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3608
        iPhoneView->SetControl( iBubbleWrapper->Control() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3609
        ExecuteCommandL( EPhoneViewRemoveNumberEntry );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3610
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3611
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3612
    // Open the message editor
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3613
    OpenMessageEditorL( &messageEditorParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3614
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3615
    CleanupStack::PopAndDestroy( messageData );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3616
    CleanupStack::PopAndDestroy( phoneNumber );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3617
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3618
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3619
// -----------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3620
// CPhoneViewController::SetStatusPaneVisible
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3621
// -----------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3622
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3623
void CPhoneViewController::SetStatusPaneVisible(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3624
                                        TPhoneCommandParam* aCommandParam )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3625
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3626
    __LOGMETHODSTARTEND(EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3627
        "CPhoneViewController::SetStatusPaneVisible()" );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3628
    TPhoneCmdParamBoolean* booleanParam = static_cast<TPhoneCmdParamBoolean*>(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3629
        aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3630
    iStatusPane->StatusPane().MakeVisible( booleanParam->Boolean() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3631
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3632
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3633
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3634
// CPhoneViewController::UpdateFSW()
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3635
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3636
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3637
void CPhoneViewController::UpdateFSW()
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3638
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3639
    __LOGMETHODSTARTEND( EPhoneUIView, "CPhoneViewController::UpdateFSW()" );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3640
    iAknUiServerClient->UpdateTaskList();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3641
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3642
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3643
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3644
// CPhoneViewController::CreateSpeedDialControllerL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3645
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3646
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3647
void CPhoneViewController::CreateSpeedDialControllerL()
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3648
  {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3649
    __LOGMETHODSTARTEND( EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3650
        "CPhoneViewController::CreateSpeedDialControllerL()" );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3651
    if( !iSpeedDialController )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3652
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3653
        iSpeedDialController = iContactController->CreateSpeedDialMonitorL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3654
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3655
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3656
    if( !iVmbxHandler )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3657
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3658
        iVmbxHandler = CPhoneVmbxHandler::NewL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3659
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3660
  }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3661
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3662
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3663
// CPhoneViewController::IsReplaceAllowed()
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3664
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3665
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3666
TBool CPhoneViewController::IsReplaceAllowed()
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3667
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3668
    __LOGMETHODSTARTEND( EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3669
                         "CPhoneViewController::IsReplaceAllowed()");
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3670
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3671
    TPhoneCmdParamCallStateData callStateData;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3672
    callStateData.SetCallState( EPEStateConnected );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3673
    iBubbleWrapper->GetCallIdByState( &callStateData );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3674
    TInt connected = callStateData.CallId();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3675
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3676
    callStateData.SetCallState( EPEStateRinging );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3677
    iBubbleWrapper->GetCallIdByState( &callStateData );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3678
    TInt waiting = callStateData.CallId();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3679
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3680
    return // both video or
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3681
        (( connected == KVideoTelephonyCallId1 ||
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3682
           connected == KVideoTelephonyCallId2 ) &&
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3683
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3684
         ( waiting == KVideoTelephonyCallId1 ||
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3685
           waiting == KVideoTelephonyCallId2 )) ||
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3686
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3687
           // both voice ( including active conference )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3688
        ((( connected >= KVoiceCallIdFirst &&
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3689
            connected < KEmergencyCallId ) ||
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3690
            connected == KConferenceCallId ) &&
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3691
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3692
         ( waiting >= KVoiceCallIdFirst &&
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3693
           waiting < KEmergencyCallId ));
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3694
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3695
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3696
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3697
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3698
// CPhoneViewController::SingleItemFetchL()
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3699
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3700
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3701
void CPhoneViewController::SingleItemFetchL()
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3702
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3703
    __LOGMETHODSTARTEND(EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3704
        "CPhoneViewController::SingleItemFetchL()" );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3705
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3706
    TPhoneCmdParamInteger integerParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3707
    integerParam.SetInteger( EPhoneNewCallFetchTitle );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3708
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3709
    // Make sure the dialog is not ended prematurely
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3710
    HandleCommandL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3711
        EPhoneViewOpenSingleItemFetchDialog,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3712
        &integerParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3713
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3714
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3715
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3716
// CPhoneViewController::SetFetchContent
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3717
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3718
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3719
void CPhoneViewController::SetFetchContent( TDesC& aFetchContent )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3720
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3721
    __LOGMETHODSTARTEND(EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3722
        "CPhoneViewController::SetFetchContent()" );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3723
    iFetchContent = aFetchContent;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3724
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3725
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3726
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3727
// CPhoneViewController::FetchContent
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3728
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3729
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3730
EXPORT_C const TDesC& CPhoneViewController::FetchContent()
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3731
   {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3732
   __LOGMETHODSTARTEND(EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3733
       "CPhoneViewController::FetchContent()" );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3734
   return iFetchContent;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3735
   }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3736
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3737
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3738
// CPhoneViewController::SetSingleItemFetchType
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3739
// -----------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3740
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3741
void CPhoneViewController::SetSingleItemFetchType( TInt aType )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3742
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3743
    __LOGMETHODSTARTEND(EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3744
        "CPhoneViewController::SetSingleItemFetchType()" );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3745
    iSingleItemFetchType = aType;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3746
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3747
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3748
// -----------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3749
// CPhoneViewController::SingleItemFetchType
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3750
// -----------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3751
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3752
TInt CPhoneViewController::SingleItemFetchType() const
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3753
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3754
    __LOGMETHODSTARTEND(EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3755
       "CPhoneViewController::SingleItemFetchType()" );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3756
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3757
    return iSingleItemFetchType;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3758
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3759
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3760
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3761
// CPhoneViewController::SwitchLayoutToFlatStatusPaneL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3762
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3763
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3764
void CPhoneViewController::SwitchLayoutToFlatStatusPaneL( TBool aSwitch )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3765
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3766
    __LOGMETHODSTARTEND(EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3767
        "CPhoneViewController::SwitchLayoutToFlatStatusPaneL()" );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3768
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3769
    if ( aSwitch )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3770
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3771
        SwapEmptyIndicatorPaneL( ETrue );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3772
        if ( !Layout_Meta_Data::IsLandscapeOrientation() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3773
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3774
            iStatusPane->StatusPane().SwitchLayoutL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3775
                    ( R_AVKON_STATUS_PANE_LAYOUT_USUAL_FLAT );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3776
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3777
        else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3778
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3779
            iStatusPane->StatusPane().SwitchLayoutL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3780
                    ( R_AVKON_WIDESCREEN_PANE_LAYOUT_USUAL_FLAT );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3781
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3782
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3783
    else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3784
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3785
        SwapEmptyIndicatorPaneL( EFalse );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3786
        if ( !Layout_Meta_Data::IsLandscapeOrientation() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3787
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3788
            iStatusPane->StatusPane().SwitchLayoutL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3789
                    ( R_AVKON_STATUS_PANE_LAYOUT_IDLE );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3790
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3791
        else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3792
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3793
            iStatusPane->StatusPane().SwitchLayoutL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3794
                    ( R_AVKON_WIDESCREEN_PANE_LAYOUT_USUAL_FLAT );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3795
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3796
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3797
    // ApplyCurrentSettingsL is called whenever statuspane
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3798
    // visibility status or pane layout changes.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3799
    iStatusPane->StatusPane().ApplyCurrentSettingsL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3800
    iStatusPane->StatusPane().DrawNow();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3801
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3802
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3803
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3804
// CPhoneViewController::SwapEmptyIndicatorPaneL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3805
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3806
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3807
void CPhoneViewController::SwapEmptyIndicatorPaneL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3808
                                    const TBool aSwapEmpty )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3809
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3810
    __LOGMETHODSTARTEND(EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3811
        "CPhoneViewController::SwapEmptyIndicatorPaneL()" );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3812
    if ( iSecurityMode )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3813
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3814
        if ( aSwapEmpty )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3815
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3816
            if ( !iIndiContainer )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3817
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3818
                iIndiContainer =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3819
                iStatusPane->CreateEmptyIndicatorContainerL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3820
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3821
            //Save previous indicator control
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3822
            iPreviousIndicatorControl =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3823
                                    iStatusPane->StatusPane().SwapControlL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3824
            TUid::Uid( EEikStatusPaneUidIndic ), iIndiContainer );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3825
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3826
        else if ( iPreviousIndicatorControl )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3827
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3828
            //Restore previous indicator control
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3829
            iStatusPane->StatusPane().SwapControlL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3830
            TUid::Uid( EEikStatusPaneUidIndic ), iPreviousIndicatorControl );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3831
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3832
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3833
    else if ( iPreviousIndicatorControl 
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3834
              && iIndiContainer
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3835
              && ( iIndiContainer ==
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3836
                      iStatusPane->StatusPane().ControlL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3837
                              TUid::Uid( EEikStatusPaneUidIndic ) ) ) )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3838
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3839
        //Restore previous indicator control if security mode is not on anymore 
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3840
        // and empty indicator pane is still in status pane.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3841
        iStatusPane->StatusPane().SwapControlL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3842
        TUid::Uid( EEikStatusPaneUidIndic ), iPreviousIndicatorControl );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3843
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3844
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3845
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3846
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3847
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3848
// CPhoneViewController::HandleTransitionEffect
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3849
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3850
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3851
void CPhoneViewController::HandleTransitionEffect(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3852
    TPhoneTransEffectType aType, const TUid& aAppUidEffectParam )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3853
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3854
    __LOGMETHODSTARTEND(EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3855
        "CPhoneViewController::HandleTransitionEffect()" );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3856
    __PHONELOG1( EBasic, EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3857
        "CPhoneViewController::HandleTransitionEffect aType:(%d)", aType );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3858
    TInt useEffect(KErrNotFound);
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3859
    switch ( aType )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3860
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3861
        case EPhoneTransEffectDialerCreate:
69
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  3862
        case EPhoneTransEffectPhoneUiOpen:
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  3863
            useEffect = KTouchPhoneUiOpenEffect;
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3864
            break;
69
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  3865
        case EPhoneTransEffectPhoneUiClose:
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  3866
            useEffect = KTouchPhoneUiCloseEffect;
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3867
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3868
        case EPhoneTransEffectAppStartFromDialer:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3869
            useEffect = AknTransEffect::EApplicationStart;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3870
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3871
        case EPhoneTransEffectCallUiAppear:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3872
            useEffect = KTouchCallUiOpenEffect;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3873
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3874
        case EPhoneTransEffectCallUiDisappear:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3875
            useEffect = KTouchCallUiCloseEffect;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3876
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3877
        case EPhoneTransEffectStop:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3878
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3879
            if ( iEffectOngoing )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3880
                {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3881
                GfxTransEffect::EndFullScreen();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3882
                iEffectOngoing = EFalse;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3883
                }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3884
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3885
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3886
        default:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3887
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3888
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3889
    
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3890
    if ( KErrNotFound < useEffect )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3891
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3892
        GfxTransEffect::BeginFullScreen(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3893
            useEffect,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3894
            TRect(),
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3895
            AknTransEffect::EParameterType,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3896
            AknTransEffect::GfxTransParam( aAppUidEffectParam,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3897
                    AknTransEffect::TParameter::EActivateExplicitCancel ) );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3898
        iEffectOngoing = ETrue;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3899
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3900
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3901
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3902
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3903
// CPhoneViewController::SetControltoDialerL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3904
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3905
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3906
void CPhoneViewController::SetControltoDialerL()
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3907
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3908
    __PHONELOG1( EBasic, EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3909
        "CPhoneViewController::SetControltoDialerL iDialerActive (%d)", iDialerActive );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3910
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3911
    SetIncallBubbleVisibility( ETrue );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3912
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3913
    if ( !iDialerActive )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3914
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3915
        iDialerActive = ETrue;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3916
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3917
        // Ensure that toolbar and menu commands are up-to-date
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3918
        TBuf<1> temp; // we are only interested if the text is empty or not
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3919
        iDialer->GetTextFromNumberEntry( temp );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3920
        NumberEntryStateChanged( temp.Length() > 0 );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3921
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3922
        // Make dialer view top most
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3923
        iDialerView->DrawableWindow()->SetOrdinalPosition(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3924
            iPhoneView->DrawableWindow()->OrdinalPosition() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3925
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3926
        // Hide in-call view toolbar
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3927
        iToolbarController->HideToolbar();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3928
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3929
        SwitchLayoutToFlatStatusPaneL( ETrue );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3930
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3931
        // Don't make dialer view visible before status pane is updated.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3932
        // This prevents unnecessary resizings.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3933
        // But do it right away after it. Otherwice a black toolbar area is shortly shown.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3934
        iDialerView->MakeVisible( ETrue );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3935
        // Number entry is emptied when dialer is hidden but drawing doesn't
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3936
        // succeed at that point as dialer is hidden first. So must draw
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3937
        // dialer as soon as it becomes visible to prevent the flashing of
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3938
        // number entry (DrawDeferred() isn't fast enough here).
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3939
        iDialerView->DrawNow();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3940
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3941
        iPhoneView->DrawableWindow()->SetOrdinalPosition( -1 );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3942
        iPhoneView->MakeVisible( EFalse );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3943
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3944
        // Update control stack
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3945
        iAppui->AddToStackL( iDialerView );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3946
        iAppui->RemoveFromStack( iPhoneView );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3947
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3948
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3949
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3950
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3951
// CPhoneViewController::SetControltoCallHandlingL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3952
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3953
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3954
void CPhoneViewController::SetControltoCallHandlingL()
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3955
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3956
    __PHONELOG1( EBasic, EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3957
        "CPhoneViewController::SetControltoCallHandlingL iDialerActive (%d)", iDialerActive );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3958
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3959
    SetIncallBubbleVisibility( EFalse );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3960
    iToolbarController->ShowToolbar();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3961
    if ( iDialerActive )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3962
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3963
        iDialerActive = EFalse;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3964
        // Hide dialer view. Do this before resizing status pane to prevent unnecessary
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3965
        // resizing of dialer components. Hiding dialer view already before showing
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3966
        // phone view might cause screen flickering but tests have proven it doesn't happen.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3967
        iDialerView->MakeVisible( EFalse );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3968
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3969
        SwitchLayoutToFlatStatusPaneL( EFalse );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3970
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3971
        // Make call handling view top most
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3972
        iPhoneView->DrawableWindow()->SetOrdinalPosition(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3973
            iDialerView->DrawableWindow()->OrdinalPosition() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3974
        iPhoneView->MakeVisible( ETrue );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3975
        iPhoneView->DrawNow();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3976
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3977
        iDialerView->DrawableWindow()->SetOrdinalPosition( -1 );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3978
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3979
        // Update control stack
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3980
        iAppui->AddToStackL( iPhoneView );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3981
        iAppui->RemoveFromStack( iDialerView );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3982
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3983
        iEasyDialingController->HandleCommandL( EEasyDialingCallHandlingActivated );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3984
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3985
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3986
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3987
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3988
// CPhoneViewController::SetDialerControlAndVisibilityL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3989
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3990
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3991
void CPhoneViewController::SetDialerControlAndVisibilityL()
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3992
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3993
    __PHONELOG( EBasic, EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3994
        "CPhoneViewController::SetDialerControlAndVisibilityL" );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3995
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3996
    if ( iBubbleWrapper->IsNumberEntryUsed() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3997
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3998
        if ( !iSendBack )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  3999
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4000
            SetControltoDialerL();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4001
            // Reset flag to default value.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4002
            iSendBack = ETrue;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4003
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4004
        // next active phone app view is dialer.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4005
        iPhoneView->SetPhoneAppViewToDialer( ETrue );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4006
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4007
    else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4008
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4009
        // Reset flag.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4010
        iPhoneView->SetPhoneAppViewToDialer( EFalse );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4011
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4012
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4013
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4014
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4015
// CPhoneViewController::CapturePointerEvents
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4016
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4017
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4018
void CPhoneViewController::CapturePointerEvents(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4019
                                    TPhoneCommandParam* aCommandParam )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4020
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4021
    __LOGMETHODSTARTEND(EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4022
        "CPhoneViewController::CapturePointerEvents()" );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4023
    TPhoneCmdParamBoolean* booleanParam = static_cast<TPhoneCmdParamBoolean*>(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4024
        aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4025
    iPhoneView->CapturePointerEvents( booleanParam->Boolean() );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4026
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4027
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4028
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4029
// CPhoneViewController::AllowWaitingCallHeaderL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4030
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4031
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4032
void CPhoneViewController::AllowWaitingCallHeaderL(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4033
                                           TPhoneCommandParam* aCommandParam )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4034
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4035
    __LOGMETHODSTARTEND(EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4036
        "CPhoneViewController::AllowWaitingCallHeaderL()" );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4037
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4038
    TPhoneCmdParamBoolean* booleanParam =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4039
        static_cast<TPhoneCmdParamBoolean*>( aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4040
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4041
    // Phone in foreground and control is in dialer ->
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4042
    //do not show waiting call header.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4043
    if ( ( ( ApplicationWindowGroupId() ==
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4044
             ForegroundApplicationWindowGroupId() ) &&
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4045
         ( iDialerActive ) ) )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4046
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4047
        booleanParam->SetBoolean( EFalse );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4048
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4049
    // Phone isnt in foreground but since control is in dialer and save add to
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4050
    // name service is active -> do not show waiting call header.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4051
    else if ( ( ( ApplicationWindowGroupId() !=
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4052
                  ForegroundApplicationWindowGroupId() ) &&
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4053
              ( iDialerActive ) && iContactSaveAddToName ) )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4054
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4055
        booleanParam->SetBoolean( EFalse );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4056
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4057
    // If Phone is in foreground and control is in bubble we need to check
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4058
    // query status -> if query is active do not show waiting call header, if
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4059
    // query is not active then show waiting call header.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4060
    else if ( ( ( ApplicationWindowGroupId() ==
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4061
                  ForegroundApplicationWindowGroupId() ) &&
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4062
              ( !iDialerActive ) ) )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4063
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4064
        TPhoneCmdParamBoolean isQueryDisplayed;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4065
        // Check is query displayed
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4066
        ExecuteCommandL( EPhoneViewIsQuery, &isQueryDisplayed );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4067
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4068
        if ( isQueryDisplayed.Boolean() )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4069
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4070
            booleanParam->SetBoolean( EFalse );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4071
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4072
        else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4073
            {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4074
            booleanParam->SetBoolean( ETrue );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4075
            }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4076
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4077
    // Phone isnt in foreground but since control is in bubble and single item
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4078
    // service is active(note! iBlockingDialogIsDisplayed must be true if it
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4079
    // not then iSingleItemFetch is not active anymore) -> do not show waiting
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4080
    // call header.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4081
    else if ( ( ( ApplicationWindowGroupId() !=
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4082
                  ForegroundApplicationWindowGroupId() ) &&
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4083
              ( !iDialerActive ) &&
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4084
              ( iSingleItemFetch && iBlockingDialogIsDisplayed ) ) )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4085
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4086
        booleanParam->SetBoolean( EFalse );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4087
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4088
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4089
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4090
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4091
// CPhoneViewController::IsDtmfDialerActive
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4092
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4093
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4094
TBool CPhoneViewController::IsDtmfDialerActive() const
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4095
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4096
    TBool ret =
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4097
            ( iDialer && iDtmfDialerController &&
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4098
              iDialer->Controller() == iDtmfDialerController );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4099
    return ret;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4100
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4101
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4102
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4103
// CPhoneViewController::IsCustomDialerActive
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4104
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4105
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4106
TBool CPhoneViewController::IsCustomDialerActive() const
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4107
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4108
    TBool ret = EFalse;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4109
    if ( iDialer )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4110
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4111
        MPhoneDialerController* curController = iDialer->Controller();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4112
        ret = ( curController &&
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4113
                curController != iDialerController &&
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4114
                curController != iDtmfDialerController );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4115
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4116
    return ret;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4117
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4118
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4119
// -----------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4120
// CPhoneViewController::CanTransEffectBeUsed
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4121
// -----------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4122
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4123
TBool CPhoneViewController::CanTransEffectBeUsed(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4124
    TPhoneTransEffectType aType )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4125
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4126
    TBool okToUseEffect( EFalse );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4127
    TBool isPhoneForeground = iAppui->IsForeground();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4128
    TBool isIdleInForeground = 
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4129
            ForegroundApplicationWindowGroupId() == IdleWindowGroupId() ?
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4130
            ETrue : EFalse;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4131
    if ( isPhoneForeground && 
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4132
         IsOkToUseThisTypeOfEffectInsidePhoneApp( aType ) )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4133
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4134
        okToUseEffect = ETrue;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4135
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4136
    /* In case transition is from idle to dialer or to incoming call 
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4137
    show transition effects as well. */
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4138
    else if ( isIdleInForeground && 
69
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  4139
              ( aType == EPhoneTransEffectPhoneUiOpen ||
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4140
                aType == EPhoneTransEffectCallUiAppear ) )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4141
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4142
        okToUseEffect = ETrue;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4143
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4144
    /* isPhoneForeground/isIdleInForeground are false
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4145
    when call is created from some other then phone app for example logs or from phonebook*/
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4146
    else if ( !isPhoneForeground && 
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4147
              !isIdleInForeground && 
69
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  4148
              ( aType == EPhoneTransEffectPhoneUiOpen ||
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4149
                aType == EPhoneTransEffectCallUiAppear ) )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4150
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4151
        okToUseEffect = ETrue;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4152
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4153
    return okToUseEffect;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4154
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4155
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4156
// -----------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4157
// CPhoneViewController::IsOkToUseThisTypeOfEffectInsidePhoneApp
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4158
// -----------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4159
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4160
TBool CPhoneViewController::IsOkToUseThisTypeOfEffectInsidePhoneApp(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4161
        TPhoneTransEffectType aType )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4162
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4163
    TBool okToUse(EFalse);
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4164
    switch ( aType )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4165
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4166
        case EPhoneTransEffectDialerCreate:
69
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  4167
        case EPhoneTransEffectPhoneUiOpen:
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4168
            okToUse = !iDialerActive;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4169
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4170
        case EPhoneTransEffectAppStartFromDialer:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4171
            okToUse = iDialerActive;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4172
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4173
        /* No need to check dialer activity below because effects are 
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4174
        common to callhandling/dialer */
69
8baf28733c3d Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
  4175
        case EPhoneTransEffectPhoneUiClose:
62
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4176
        case EPhoneTransEffectCallUiAppear:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4177
        case EPhoneTransEffectCallUiDisappear:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4178
            okToUse = ETrue;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4179
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4180
        default:
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4181
            break;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4182
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4183
    __PHONELOG1( EBasic, EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4184
                "CPhoneViewController::IsOkToUseThisTypeOfEffectInsidePhoneApp(%d)",
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4185
                okToUse );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4186
    return okToUse;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4187
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4188
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4189
// -----------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4190
// CPhoneViewController::BeginTransEffectForAppStartFromDialerLC
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4191
// -----------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4192
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4193
void CPhoneViewController::BeginTransEffectForAppStartFromDialerLC(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4194
    const TUid& aAppUid )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4195
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4196
    TPhoneCmdParamTransEffect effectParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4197
    effectParam.SetType( EPhoneTransEffectAppStartFromDialer );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4198
    effectParam.SetAppUid( aAppUid );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4199
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4200
    ExecuteCommand( EPhoneViewBeginTransEffect,  &effectParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4201
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4202
    TCleanupItem operation( EffectCleanup, this );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4203
    CleanupStack::PushL( operation );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4204
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4205
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4206
// -----------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4207
// CPhoneViewController::EndTransEffect
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4208
// -----------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4209
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4210
void CPhoneViewController::EndTransEffect()
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4211
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4212
    CleanupStack::PopAndDestroy(); // Call EffectCleanup
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4213
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4214
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4215
// -----------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4216
// CPhoneViewController::EffectCleanup
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4217
// -----------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4218
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4219
void CPhoneViewController::EffectCleanup(TAny* aThis )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4220
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4221
    TPhoneCmdParamTransEffect effectParam;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4222
    effectParam.SetType( EPhoneTransEffectStop );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4223
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4224
    static_cast<CPhoneViewController*>( aThis )->ExecuteCommand(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4225
        EPhoneViewEndTransEffect, &effectParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4226
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4227
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4228
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4229
// CPhoneViewController::SetNeedToReturnToForegroundAppAfterCall
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4230
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4231
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4232
void CPhoneViewController::SetNeedToReturnToForegroundAppAfterCall(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4233
    TPhoneCommandParam* aCommandParam )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4234
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4235
    TPhoneCmdParamBoolean* booleanParam = static_cast<TPhoneCmdParamBoolean*>(
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4236
        aCommandParam );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4237
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4238
    iNeedToReturnToForegroundAppAfterCall = booleanParam->Boolean();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4239
    __PHONELOG1( EBasic, EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4240
        "CPhoneViewController::SetNeedToReturnToForegroundAppAfterCall(%d)",
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4241
        iNeedToReturnToForegroundAppAfterCall );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4242
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4243
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4244
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4245
// CPhoneViewController::GetNeedToReturnToForegroundAppAfterCallL
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4246
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4247
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4248
TBool CPhoneViewController::GetNeedToReturnToForegroundAppAfterCallL()
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4249
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4250
    // Check that previous app still exists. It might be for example
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4251
    // add to contact - dialog that is allready destroyed or user has closed
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4252
    // app using task swapper.
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4253
    if( KErrNotFound == FindAppByWgIDL( iPrevForegroundAppWg ) )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4254
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4255
        iNeedToReturnToForegroundAppAfterCall = EFalse;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4256
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4257
    return iNeedToReturnToForegroundAppAfterCall;
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4258
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4259
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4260
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4261
// CPhoneViewController::AllowInCallBubbleInSpecialCases
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4262
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4263
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4264
void CPhoneViewController::AllowInCallBubbleInSpecialCases()
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4265
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4266
    // this method can be used for special cases like dialer
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4267
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4268
    if( iDialerActive )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4269
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4270
        SetIncallBubbleVisibility( ETrue );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4271
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4272
    else
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4273
        {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4274
        SetIncallBubbleVisibility( EFalse );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4275
        }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4276
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4277
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4278
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4279
// CPhoneViewController::SetIncallBubbleVisibility
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4280
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4281
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4282
void CPhoneViewController::SetIncallBubbleVisibility( TBool aVisible )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4283
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4284
    __PHONELOG1( EBasic, EPhoneUIView,
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4285
        "CPhoneViewController::SetIncallBubbleVisibility(%d)",
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4286
        aVisible );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4287
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4288
    TRAP_IGNORE( iIncallBubble->SetIncallBubbleAllowedInUsualL( aVisible ) );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4289
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4290
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4291
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4292
// CPhoneViewController::SkinContentChanged
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4293
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4294
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4295
void CPhoneViewController::SkinContentChanged()
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4296
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4297
    __LOGMETHODSTARTEND( EPhoneUIView, "CPhoneViewController::SkinContentChanged()" );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4298
    iPhoneView->DrawNow();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4299
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4300
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4301
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4302
// CPhoneViewController::SkinConfigurationChanged
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4303
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4304
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4305
void CPhoneViewController::SkinConfigurationChanged( const TAknsSkinStatusConfigurationChangeReason /*aReason*/ )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4306
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4307
    __LOGMETHODSTARTEND( EPhoneUIView, "CPhoneViewController::SkinConfigurationChanged()" );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4308
    iPhoneView->DrawNow();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4309
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4310
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4311
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4312
// CPhoneViewController::SkinPackageChanged
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4313
// ---------------------------------------------------------------------------
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4314
//
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4315
void CPhoneViewController::SkinPackageChanged( const TAknsSkinStatusPackageChangeReason /*aReason*/ )
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4316
    {
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4317
    __LOGMETHODSTARTEND( EPhoneUIView, "CPhoneViewController::SkinPackageChanged()" );
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4318
    iPhoneView->DrawNow();
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4319
    }
5266b1f337bd Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  4320
// End of File