realtimenetprots/sipfw/SampleApp/sipengine/src/SIPExSIPTerminatingState.cpp
changeset 0 307788aac0a8
equal deleted inserted replaced
-1:000000000000 0:307788aac0a8
       
     1 
       
     2 // Copyright (c) 2004-2009 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:
       
    15 //
       
    16 
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 #include	"SIPExSIPTerminatingState.h"
       
    21 #include	"SIPExSIPEngine.h"
       
    22 
       
    23 // ============================ MEMBER FUNCTIONS ===============================
       
    24 
       
    25 // -----------------------------------------------------------------------------
       
    26 // CSIPExSIPTerminatingState::CSIPExSIPTerminatingState
       
    27 // (other items were commented in a header).
       
    28 // -----------------------------------------------------------------------------
       
    29 //
       
    30 CSIPExSIPTerminatingState::CSIPExSIPTerminatingState()
       
    31 	{
       
    32 	}
       
    33 
       
    34 // -----------------------------------------------------------------------------
       
    35 // CSIPExSIPTerminatingState::~CSIPExSIPTerminatingState
       
    36 // (other items were commented in a header).
       
    37 // -----------------------------------------------------------------------------
       
    38 //
       
    39 EXPORT_C CSIPExSIPTerminatingState::~CSIPExSIPTerminatingState()
       
    40 	{
       
    41 	}
       
    42 
       
    43 // -----------------------------------------------------------------------------
       
    44 // CSIPExSIPTerminatingState::NewL()
       
    45 // (other items were commented in a header).
       
    46 // -----------------------------------------------------------------------------
       
    47 //
       
    48 EXPORT_C CSIPExSIPTerminatingState* CSIPExSIPTerminatingState::NewL()
       
    49 	{
       
    50 	CSIPExSIPTerminatingState* self =
       
    51 		new (ELeave) CSIPExSIPTerminatingState();
       
    52 	return self;
       
    53 	}
       
    54 
       
    55 // -----------------------------------------------------------------------------
       
    56 // CSIPExSIPTerminatingState::LinkStates()
       
    57 // (other items were commented in a header).
       
    58 // -----------------------------------------------------------------------------
       
    59 //
       
    60 void CSIPExSIPTerminatingState::LinkStates(
       
    61 	CSIPExSIPStateBase& aIdleState )
       
    62 	{
       
    63 	iIdleState = &aIdleState;
       
    64 	}
       
    65 
       
    66 
       
    67 // -----------------------------------------------------------------------------
       
    68 // CSIPExSIPTerminatingState::ResponseReceivedL()
       
    69 // (other items were commented in a header).
       
    70 // -----------------------------------------------------------------------------
       
    71 void CSIPExSIPTerminatingState::ResponseReceivedL(
       
    72 	CSIPExSIPEngine& aEngine,
       
    73 	CSIPClientTransaction& aTransaction )
       
    74 	{
       
    75 	const CSIPResponseElements* respElem = aTransaction.ResponseElements();
       
    76 
       
    77 	if ( respElem->StatusCode() == 200 )
       
    78 		{
       
    79 		aEngine.Observer()->SessionEnded();
       
    80 		aEngine.ClearClientTx();
       
    81 		aEngine.SetCurrentState( iIdleState );
       
    82 		}
       
    83 	else
       
    84 		{
       
    85 		// Hmmm...
       
    86 		}
       
    87 	}
       
    88 
       
    89 // End of file