realtimenetprots/sipfw/SIP/ConnectionMgr/src/TStateSuspended.cpp
changeset 0 307788aac0a8
equal deleted inserted replaced
-1:000000000000 0:307788aac0a8
       
     1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // Name        : TStateSuspended.cpp
       
    15 // Part of     : ConnectionMgr
       
    16 // Implementation
       
    17 // Version     : SIP/4.0
       
    18 //
       
    19 
       
    20 
       
    21 
       
    22 #include "TStateSuspended.h"
       
    23 
       
    24 // ----------------------------------------------------------------------------
       
    25 // TStateSuspended::NetworkStateChanged
       
    26 // ----------------------------------------------------------------------------
       
    27 //
       
    28 void TStateSuspended::NetworkStateChanged(
       
    29     MSIPNetworkObserver::TNetworkState aState,
       
    30     TInt aError )
       
    31 	{
       
    32 	if( aError || aState == MSIPNetworkObserver::ENetworkInactive )
       
    33 		{
       
    34 		EnterState( MStateModel::EInactiveMonitoring );
       
    35 		}
       
    36 	else if( aState == MSIPNetworkObserver::ENetworkActive )
       
    37 		{
       
    38 		EnterState( MStateModel::EActiveResolving );
       
    39 		}
       
    40 
       
    41 	else if( aState == MSIPNetworkObserver::EConnectionLost )
       
    42 		{
       
    43 		EnterState( MStateModel::EInactiveConnecting );
       
    44 		}		
       
    45 	else
       
    46 		{
       
    47 		// do nothing, "else" required by PC-Lint..
       
    48 		}
       
    49 	}