realtimenetprots/sipfw/SIP/ConnectionMgr/inc/MStateModel.h
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 * Name        : MStateModel.h
       
    16 * Part of     : NetworkMonitor
       
    17 * See class definition below.
       
    18 * Version     : SIP/4.0
       
    19 *
       
    20 */
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 /**
       
    26  @internalComponent
       
    27 */
       
    28 #ifndef __MSTATEMODEL_H__
       
    29 #define __MSTATEMODEL_H__
       
    30 
       
    31 // INCLUDES
       
    32 #include <in_sock.h>	// TInetAddr
       
    33 #include "SipStackServerDefs.h"	// TTransactionId
       
    34 #include "sipnetworkobserver.h"
       
    35 
       
    36 // FORWARD DECLARATIONS
       
    37 class CSIPRequest;
       
    38 class CSIPResponse;
       
    39 class TSIPTransportParams;
       
    40 class CUri8;
       
    41 
       
    42 // CLASS DEFINITION
       
    43 /**
       
    44  * MStateModel defines an interface for the CSIPConnection state model
       
    45  */
       
    46 class MStateModel
       
    47 	: public MSIPNetworkObserver
       
    48 	{
       
    49 	public: // Enumerations
       
    50 
       
    51 		/// Network states
       
    52 		enum TState
       
    53 			{
       
    54 			EInit,
       
    55 			EInactiveMonitoring,
       
    56 			EInactiveConnecting,
       
    57 			EActiveResolving,
       
    58 			EActiveResolved,
       
    59 			ESuspended,
       
    60 			EUnavailable,
       
    61 			EMaxStates
       
    62 			};
       
    63 
       
    64 	public:	// Constructors and destructor
       
    65 
       
    66 		/// Virtual destructor
       
    67 		virtual ~MStateModel() {};
       
    68 
       
    69 	public: // Abstract methods
       
    70 
       
    71 		virtual void SendL( const TSIPTransportParams& aParams,
       
    72 		                    CSIPRequest& aRequest,
       
    73 		                    TBool aForceUDP,
       
    74 		                    const CUri8* aOutboundProxy,
       
    75 							const TInetAddr& aRemoteAddr,
       
    76 							TRequestStatus& aStatus ) = 0;
       
    77 
       
    78  		virtual void SendL( const TSIPTransportParams& aParams,
       
    79  		                    CSIPResponse& aResponse,
       
    80                   			TTransactionId aId,
       
    81 							TRequestStatus& aStatus ) = 0;
       
    82 
       
    83 		virtual MStateModel::TState StateValue() const = 0;
       
    84 
       
    85 		virtual void EnterState( MStateModel::TState aState,
       
    86 								 TInt aError ) = 0;
       
    87 		
       
    88 		virtual TInt Error() const = 0;
       
    89 
       
    90 	};
       
    91 
       
    92 #endif // __MSTATEMODEL_H__