sipvoipprovider/svptransfer/src/svptransferpendingstate.cpp
changeset 0 a4daefaec16c
equal deleted inserted replaced
-1:000000000000 0:a4daefaec16c
       
     1 /*
       
     2 * Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Transfer state representing the pending state
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "svptransferpendingstate.h"
       
    20 #include "svptransferstatecontext.h"
       
    21 #include "svptransferobserver.h"            // MSVPTransferObserver
       
    22 #include "svplogger.h"
       
    23 
       
    24 // ---------------------------------------------------------------------------
       
    25 // CSVPTransferPendingState::CSVPTransferPendingState
       
    26 // ---------------------------------------------------------------------------
       
    27 //
       
    28 CSVPTransferPendingState::CSVPTransferPendingState()
       
    29     {
       
    30     }
       
    31 
       
    32 // ---------------------------------------------------------------------------
       
    33 // CSVPTransferPendingState::NewLC
       
    34 // ---------------------------------------------------------------------------
       
    35 //
       
    36 CSVPTransferPendingState* CSVPTransferPendingState::NewLC()
       
    37     {
       
    38     CSVPTransferPendingState* self = new( ELeave ) CSVPTransferPendingState;
       
    39     CleanupStack::PushL( self );
       
    40     return self;
       
    41     }
       
    42 
       
    43 // ---------------------------------------------------------------------------
       
    44 // CSVPTransferPendingState::~CSVPTransferPendingState
       
    45 // ---------------------------------------------------------------------------
       
    46 //
       
    47 CSVPTransferPendingState::~CSVPTransferPendingState()
       
    48     {
       
    49     }
       
    50 
       
    51 // ---------------------------------------------------------------------------
       
    52 // CSVPTransferPendingState::DoApplyL
       
    53 // ---------------------------------------------------------------------------
       
    54 //
       
    55 void CSVPTransferPendingState::DoApplyL( CSVPTransferStateContext& aContext )
       
    56     {
       
    57     SVPDEBUG1( "CSVPTransferPendingState::DoApplyL In" )
       
    58 
       
    59     if ( aContext.CurrentState() == KSVPTransferPendingStateIndex )         
       
    60         {        
       
    61         if ( aContext.IsIncoming() )
       
    62             {
       
    63             // Incoming new refer received
       
    64             
       
    65             // Notify the observer
       
    66             aContext.TransferObserver().TransferNotification( 
       
    67                                                 ESVPIncomingRefer );
       
    68 
       
    69             // Next state is defined & applied when user action 
       
    70             // event received in CSVPTransferController::AcceptTransfer
       
    71             
       
    72             }
       
    73 
       
    74         // For outgoing refer -
       
    75         // Next state is defined & applied when event received 
       
    76         // in CSVPTransferController::HandleReferStateChangeL
       
    77         }
       
    78     else
       
    79         {
       
    80         // Notify the observer about the error.
       
    81         aContext.TransferObserver().TransferFailed( KSVPErrTransferStateError );
       
    82         // Set and apply to the terminating state
       
    83         aContext.SetCurrentStateL( KSVPTransferTerminatingStateIndex );
       
    84         aContext.ApplyCurrentStateL();
       
    85         }
       
    86     
       
    87     SVPDEBUG1( "CSVPTransferPendingState::DoApplyL Out" )
       
    88     }
       
    89 
       
    90 // ---------------------------------------------------------------------------
       
    91 // CSVPTransferPendingState::DoEnter
       
    92 // ---------------------------------------------------------------------------
       
    93 //
       
    94 void CSVPTransferPendingState::DoEnter( 
       
    95                                 CSVPTransferStateContext& /*aContext*/ )
       
    96     {
       
    97     }
       
    98