realtimenetprots/sipfw/SampleApp/sipengine/inc/SIPExSIPEstablishedState.h
changeset 0 307788aac0a8
equal deleted inserted replaced
-1:000000000000 0:307788aac0a8
       
     1 
       
     2 /*
       
     3 * Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     4 * All rights reserved.
       
     5 * This component and the accompanying materials are made available
       
     6 * under the terms of "Eclipse Public License v1.0"
       
     7 * which accompanies this distribution, and is available
       
     8 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     9 *
       
    10 * Initial Contributors:
       
    11 * Nokia Corporation - initial contribution.
       
    12 *
       
    13 * Contributors:
       
    14 *
       
    15 * Description:
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 #ifndef _SIPEXSIPESTABLISHEDSTATE_H_
       
    22 #define _SIPEXSIPESTABLISHEDSTATE_H_
       
    23 
       
    24 
       
    25 //  INCLUDES
       
    26 #include "SIPExSIPStateBase.h"
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class CSIPExSIPEngine;
       
    30 
       
    31 
       
    32 // CLASS DECLARATION
       
    33 /**
       
    34 * Reacts to events that are possible in 
       
    35 * "Established" state.
       
    36 */
       
    37 class CSIPExSIPEstablishedState: public CSIPExSIPStateBase
       
    38 	{
       
    39 	public:// Constructors and destructor
       
    40         /**
       
    41         * Two-phased constructor.
       
    42         */
       
    43 		IMPORT_C static CSIPExSIPEstablishedState* NewL();
       
    44 
       
    45 		/**
       
    46 		* Destructor
       
    47 		*/
       
    48 		IMPORT_C virtual ~CSIPExSIPEstablishedState();
       
    49 
       
    50 	public://new functions
       
    51 		/**
       
    52 		* Links the states
       
    53 		* @param aTerminatingState BYE sent, waiting for response.
       
    54 		* @param aTerminatedState SIP Session has been ended.
       
    55 		*/
       
    56 		void LinkStates(
       
    57 			CSIPExSIPStateBase& aTerminatingState,
       
    58 			CSIPExSIPStateBase& aTerminatedState );
       
    59 
       
    60 	public://functions from base class
       
    61 
       
    62 		/**
       
    63 		* EndSessionL
       
    64 		* Send BYE in an established session.
       
    65 		* @param aEngine Reference to Engine object.
       
    66 		*/
       
    67 		void EndSessionL( CSIPExSIPEngine& aEngine );
       
    68 
       
    69 
       
    70 		/**
       
    71 		* ByeReceivedL
       
    72 		* BYE has been received.
       
    73 		* @param aEngine Reference to Engine object.
       
    74 		* @param aTransaction Contains response elements.
       
    75 		*/
       
    76 		void ByeReceivedL( CSIPExSIPEngine& aEngine,
       
    77 						   CSIPServerTransaction& aTransaction );
       
    78 
       
    79 		/**
       
    80 		* ResponseReceivedL
       
    81 		* A SIP response has been received from the network.
       
    82 		* @param aEngine Reference to Engine object.
       
    83 		* @param aTransaction Contains response elements.
       
    84 		*/
       
    85 		void ResponseReceivedL( CSIPExSIPEngine& aEngine,
       
    86 								CSIPClientTransaction& aTransaction );
       
    87 
       
    88 
       
    89 		/**
       
    90 		* AckReceivedL
       
    91 		* ACK has been received.
       
    92 		* @param aEngine Reference to Engine object.
       
    93 		* @param aTransaction Contains response elements.
       
    94 		*/
       
    95 		void AckReceivedL(
       
    96 						   CSIPExSIPEngine& aEngine,
       
    97 						   CSIPServerTransaction& aTransaction );
       
    98 
       
    99 	private:
       
   100 	    /**
       
   101 		* C++ default constructor.
       
   102 		*/
       
   103 		CSIPExSIPEstablishedState();
       
   104 
       
   105 	private://data members
       
   106 		CSIPExSIPStateBase* iTerminatingState;
       
   107 		CSIPExSIPStateBase* iTerminatedState;
       
   108 	};
       
   109 
       
   110 #endif // _SIPEXSIPESTABLISHEDSTATE_H_
       
   111