realtimenetprots/sipfw/SIP/Transaction/src/NormalServerTaStates.h
changeset 0 307788aac0a8
equal deleted inserted replaced
-1:000000000000 0:307788aac0a8
       
     1 /*
       
     2 * Copyright (c) 2006-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          : NormalServerTaStates.h
       
    16 * Part of       : Transaction
       
    17 * Version       : SIP/5.0
       
    18 *
       
    19 */
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 /**
       
    25  @internalComponent
       
    26 */
       
    27 
       
    28 #ifndef NORMALSERVERTASTATES_H
       
    29 #define NORMALSERVERTASTATES_H
       
    30 
       
    31 // INCLUDES
       
    32 #include "TransactionState.h"
       
    33 
       
    34 // CLASS DECLARATION
       
    35 
       
    36 //Waiting for a SIP response from UAS
       
    37 class CNormalServerTa_Trying : public CTransactionState
       
    38 	{
       
    39 public: // Constructors and destructor
       
    40 
       
    41 	CNormalServerTa_Trying();
       
    42 	~CNormalServerTa_Trying();
       
    43 
       
    44 public: // From CTransactionState
       
    45 
       
    46     void GetState(CSIPInternalStates::TState& aState) const;	
       
    47 
       
    48     void ReceiveL(CTransaction& aTransaction, CSIPRequest* aRequest) const;
       
    49 
       
    50 	void SendResponseL(CTransaction& aTransaction,
       
    51 					   CSIPResponse* aResp,
       
    52 					   RStringF aProtocol,
       
    53 					   const TSIPTransportParams& aParams) const;
       
    54 
       
    55 	void TimerExpiredL(CTransaction& aTransaction,
       
    56 					   TTimerId aTimerId,
       
    57 					   TAny* aTimerParam) const;
       
    58 
       
    59 public: // New functions
       
    60 
       
    61 	void SetNeighbourStates(CTransactionState& aProceeding,
       
    62 							CTransactionState& aCompleted);
       
    63 private: // Data
       
    64 
       
    65 	//Next possible states, not owned.
       
    66 	CTransactionState* iProceeding;
       
    67 	CTransactionState* iCompleted;	
       
    68 
       
    69 #ifdef CPPUNIT_TEST
       
    70 	friend class CNormalSTa_Trying_Test;
       
    71 	friend class CNormalUAS_GetTxOwner_Test;
       
    72 	friend class CNormalUAS_Start_Test;
       
    73 	friend class CNormalUAS_WaitRespFromApp_Test;
       
    74 	friend class CNormalUAS_FinalRespSent_Test;
       
    75 	friend class CUserAgentServer_Test;
       
    76 #endif
       
    77 	};
       
    78 
       
    79 
       
    80 
       
    81 //Waiting for a final response from UAS
       
    82 class CNormalServerTa_Proceeding : public CTransactionState
       
    83 	{
       
    84 public: // Constructors and destructor
       
    85 
       
    86 	CNormalServerTa_Proceeding();
       
    87 	~CNormalServerTa_Proceeding();
       
    88 
       
    89 public: // From CTransactionState
       
    90 
       
    91     void GetState(CSIPInternalStates::TState& aState) const;
       
    92 
       
    93 	void SendCompleteL(CTransaction& aTransaction) const;
       
    94 	void SendFailedL(CTransaction& aTransaction, TInt aError) const;
       
    95 
       
    96     void ReceiveL(CTransaction& aTransaction, CSIPRequest* aRequest) const;
       
    97 
       
    98 	void SendResponseL(CTransaction& aTransaction,
       
    99 					   CSIPResponse* aResp,
       
   100 					   RStringF aProtocol,
       
   101 					   const TSIPTransportParams& aParams) const;
       
   102 
       
   103 	void TimerExpiredL(CTransaction& aTransaction,
       
   104 					   TTimerId aTimerId,
       
   105 					   TAny* aTimerParam) const;
       
   106 
       
   107 public: // New functions
       
   108 
       
   109 	void SetNeighbourStates(CTransactionState& aCompleted);
       
   110 
       
   111 private: // Data
       
   112 
       
   113 	//Next possible state, not owned.
       
   114 	CTransactionState* iCompleted;
       
   115 
       
   116 #ifdef CPPUNIT_TEST
       
   117 	friend class CNormalSTa_Proceeding_Test;
       
   118 #endif
       
   119 	};
       
   120 
       
   121 
       
   122 
       
   123 //Waiting for timer J to expire. If a retransmission of the original request is
       
   124 //received, the most recent response is retransmitted.
       
   125 class CNormalServerTa_Completed : public CTransactionState
       
   126 	{
       
   127 public: // Constructors and destructor
       
   128 
       
   129 	CNormalServerTa_Completed();
       
   130 	~CNormalServerTa_Completed();
       
   131 
       
   132 public: // From CTransactionState
       
   133 
       
   134     void GetState(CSIPInternalStates::TState& aState) const;
       
   135 
       
   136 	void SendCompleteL(CTransaction& aTransaction) const;
       
   137 	void SendFailedL(CTransaction& aTransaction, TInt aError) const;
       
   138 
       
   139     void ReceiveL(CTransaction& aTransaction, CSIPRequest* aRequest) const;
       
   140 
       
   141 	void TimerExpiredL(CTransaction& aTransaction,
       
   142 					   TTimerId aTimerId,
       
   143 					   TAny* aTimerParam) const;
       
   144 	};
       
   145 
       
   146 #endif // end of NORMALSERVERTASTATES_H
       
   147 
       
   148 // End of File