phonecmdhandler/phonecmdhnlr/src/PhoneHandlerRedial.cpp
author Pat Downey <patd@symbian.org>
Wed, 01 Sep 2010 12:15:03 +0100
branchRCL_3
changeset 20 987c9837762f
parent 19 7d48bed6ce0c
child 21 0a6dd2dc9970
permissions -rw-r--r--
Revert incorrect RCL_3 drop: Revision: 201033 Kit: 201035
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     1
/*
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     2
* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). 
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     3
* All rights reserved.
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     4
* This component and the accompanying materials are made available
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     6
* which accompanies this distribution, and is available
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     8
*
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     9
* Initial Contributors:
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    11
*
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    12
* Contributors:
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    13
*
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    14
* Description:  Handles last number redial key press. 
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    15
*
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    16
*/
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    17
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    18
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    19
// INCLUDE FILES
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    20
20
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    21
#include "PhoneHandlerRedial.h"
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    22
#include "PhoneHandlerControl.h"
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    23
#include "PhoneHandlerDebug.h"
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    24
#include <RemConCallHandlingTarget.h>
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    25
#include <CPhCltCommandHandler.h>
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    26
#include <PhCltTypes.h>
0
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    27
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    28
#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    29
#include <logfilterandeventconstants.hrh>
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    30
#endif
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    31
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    32
// -----------------------------------------------------------------------------
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    33
// CPhoneHandlerLastNumberRedial::CPhoneHandlerLastNumberRedial
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    34
// C++ default constructor can NOT contain any code, that
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    35
// might leave.
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    36
// -----------------------------------------------------------------------------
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    37
//
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    38
CPhoneHandlerLastNumberRedial::CPhoneHandlerLastNumberRedial(
20
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    39
							CPhoneHandlerControl& aControl,
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    40
							TRemConExtCallHandlingApiOperationId aOperation )
0
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    41
: iControl( aControl ), 
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    42
  iOperation( aOperation )
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    43
    {
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    44
    }
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    45
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    46
// -----------------------------------------------------------------------------
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    47
// CPhoneHandlerLastNumberRedial::ConstructL
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    48
// Symbian 2nd phase constructor can leave.
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    49
// -----------------------------------------------------------------------------
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    50
//
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    51
void CPhoneHandlerLastNumberRedial::ConstructL()
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    52
    {
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    53
    COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::ConstructL() start" );
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    54
    
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    55
    User::LeaveIfError(iFsSession.Connect());
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    56
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    57
    iLogClientPtr = CLogClient::NewL(iFsSession);
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    58
    iLogViewRecentPtr = CLogViewRecent::NewL(*iLogClientPtr);
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    59
    LoadServiceL();
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    60
    
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    61
    COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::ConstructL() end" );
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    62
    }
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    63
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    64
// -----------------------------------------------------------------------------
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    65
// CPhoneHandlerLastNumberRedial::NewL
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    66
// Two-phased constructor.
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    67
// -----------------------------------------------------------------------------
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    68
//
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    69
CPhoneHandlerLastNumberRedial* CPhoneHandlerLastNumberRedial::NewL( 
20
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    70
	CPhoneHandlerControl& aControl,
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    71
	TRemConExtCallHandlingApiOperationId aOperation )
0
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    72
    {
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    73
    CPhoneHandlerLastNumberRedial* self = 
20
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    74
    	new (ELeave) CPhoneHandlerLastNumberRedial( aControl, aOperation );
0
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    75
    CleanupStack::PushL( self );
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    76
    self->ConstructL();
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    77
    CleanupStack::Pop( self );
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    78
    return self;
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    79
    }
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    80
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    81
// Destructor
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    82
CPhoneHandlerLastNumberRedial::~CPhoneHandlerLastNumberRedial()
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    83
    {
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    84
    COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::CPhoneHandlerLastNumberRedial() start" );
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    85
    
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    86
    delete iLogViewRecentPtr;
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    87
    delete iLogClientPtr;
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    88
    iFsSession.Close();
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    89
    
20
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    90
	COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::CPhoneHandlerLastNumberRedial() end" );
0
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    91
    }
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    92
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    93
// -----------------------------------------------------------------------------
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    94
// CPhoneHandlerLastNumberRedial::Process
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    95
// Starts to process service.
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    96
// (other items were commented in a header).
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    97
// -----------------------------------------------------------------------------
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    98
//
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    99
void CPhoneHandlerLastNumberRedial::Process()
20
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   100
	{
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   101
	COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::Process() start" );
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   102
	
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   103
	TBool ret = EFalse;
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   104
	    
0
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   105
    TRAPD( err, ret = iLogViewRecentPtr->
20
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   106
		SetRecentListL( KLogRecentOutgoingCalls, GetStatus() ) ); 
0
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   107
    if( KErrNone == err && ret )
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   108
        {
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   109
        COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::Process() There is last redial number" );
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   110
        Activate();
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   111
        }
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   112
    else
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   113
        {
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   114
        if( err != KErrNone )
20
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   115
        	{
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   116
	        COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::Process() failed err=%d", err );
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   117
		    RequestCompleted( err ); 
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   118
        	}
0
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   119
        else
20
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   120
        	{
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   121
        	COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::Process() failed err=%d", KErrNotFound );
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   122
        	RequestCompleted( KErrNotFound ); 
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   123
        	}
0
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   124
        }
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   125
        
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   126
    COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::Process() end" );
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   127
    }
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   128
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   129
// -----------------------------------------------------------------------------
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   130
// CPhoneHandlerLastNumberRedial::Delete
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   131
// (other items were commented in a header).
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   132
// -----------------------------------------------------------------------------
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   133
//
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   134
void CPhoneHandlerLastNumberRedial::Delete()
20
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   135
	{
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   136
	COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::Delete()" );
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   137
		
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   138
	delete this;
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   139
	}
0
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   140
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   141
// -----------------------------------------------------------------------------
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   142
// CPhoneHandlerLastNumberRedial::RequestCompleted
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   143
// Handler for completed asynchronous calls.
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   144
// (other items were commented in a header).
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   145
// -----------------------------------------------------------------------------
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   146
//
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   147
void CPhoneHandlerLastNumberRedial::RequestCompleted( const TInt aError )
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   148
    {
20
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   149
   	COM_TRACE_2( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::RequestCompleted() aError=%d, iState=%d", aError, iState );
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   150
	
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   151
	if( KErrNone != aError )
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   152
		{
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   153
		// cancel process and return an error code
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   154
		iState = EPhoneHandlerState2;
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   155
		}
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   156
	
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   157
	switch( iState )
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   158
		{
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   159
		case EPhoneHandlerState1:
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   160
			{
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   161
			NextState();
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   162
			
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   163
			const TDesC& number = iLogViewRecentPtr->Event().Number();
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   164
    		COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::RequestCompleted() phone number is %S", &number );
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   165
			// make a call with last dialed phone number
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   166
			iCommandHandler->Atd( GetStatus(), number );
0
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   167
20
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   168
			Activate(); 
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   169
			break;
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   170
			}
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   171
		
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   172
		case EPhoneHandlerState2:
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   173
			{
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   174
			NextState();
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   175
			iControl.CommandInitiator().SendResponse( GetStatus(), 
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   176
													  iOperation,
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   177
													  aError );
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   178
			Activate();
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   179
			break;
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   180
			}
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   181
			
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   182
		case EPhoneHandlerState3:
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   183
			{
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   184
			IdleState();
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   185
			delete this; 
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   186
			break;
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   187
			}
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   188
				
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   189
		default:
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   190
			{
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   191
			COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::RequestCompleted() Unspecified state" );
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   192
			break;
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   193
			}
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   194
		};
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   195
		
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   196
	COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::RequestCompleted() end" );
0
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   197
    }
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   198
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   199
// ========================== OTHER EXPORTED FUNCTIONS =========================
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   200
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   201
//  End of File