realtimenetprots/sipfw/SIP/SIPSec/IpSecPlugin/inc/CState.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          : CState.h
       
    16 * Part of       : SIPSec
       
    17 * Version       : SIP/5.0
       
    18 *
       
    19 */
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 /**
       
    25  @internalComponent
       
    26 */
       
    27 
       
    28 #ifndef CSTATE_H
       
    29 #define CSTATE_H
       
    30 
       
    31 #include <e32base.h>
       
    32 
       
    33 #include "Lwtimer.h"
       
    34 
       
    35 class CSIPSecurityVerifyHeader;
       
    36 class CSIPRequest;
       
    37 class CSIPResponse;
       
    38 class CSipSecAgreeRecord;
       
    39 class TSIPTransportParams;
       
    40 
       
    41 /**
       
    42  * @brief base state of CSipSecAgreeRecord states
       
    43  */
       
    44 class CState : public CBase
       
    45 	{
       
    46 public:
       
    47 
       
    48     // States of IpSec SecAgree record
       
    49     enum TSecAgreeRecordState
       
    50     	{
       
    51         ETentative = 0,
       
    52         EPendingKey,
       
    53         EPendingSa,
       
    54         EPendingPolicy,
       
    55         ETemporal,
       
    56         EInUse,
       
    57         EOld,
       
    58     	EDying,
       
    59     	EDeleting,
       
    60     	EClearing
       
    61         };
       
    62 	
       
    63 	virtual ~CState();
       
    64 		
       
    65 	virtual CState::TSecAgreeRecordState State() = 0;
       
    66 	
       
    67 	virtual void SaAddedL( CSipSecAgreeRecord& aRecord );
       
    68 	
       
    69 	virtual void SaDeleted( CSipSecAgreeRecord& aRecord );
       
    70 	
       
    71 	virtual void PolicyActivatedL( CSipSecAgreeRecord& aRec );
       
    72 	
       
    73 	virtual void PolicyUnloaded( CSipSecAgreeRecord& aRec );
       
    74 	
       
    75 	virtual void TimerExpiredL( CSipSecAgreeRecord& aRecord, 
       
    76 								TTimerId aTimerId, 
       
    77 								TAny* aTimerParam );	
       
    78 										  	  	
       
    79 	virtual void Resp4xxL( CSipSecAgreeRecord& aRecord, 
       
    80 	                       CSIPResponse& aResponse,
       
    81 	                       CSIPRequest& aRequest );
       
    82 							  
       
    83     virtual TBool AuthKeyL( CSipSecAgreeRecord& aRecord,
       
    84 						    const TDesC8& aAuthKey );
       
    85 						    
       
    86     virtual void AuthKeyFailedL( CSipSecAgreeRecord& aRec );
       
    87 							  
       
    88 	virtual void RegisterL( CSipSecAgreeRecord& aRecord, 
       
    89 						    CSIPRequest& aRequest,
       
    90 						    TSIPTransportParams& aTransportParams,
       
    91 						    const TDesC8& aOutboundProxy );
       
    92 
       
    93 	virtual void ReguestL( CSipSecAgreeRecord& aRecord, 
       
    94 						   CSIPRequest& aRequest,
       
    95 						   TSIPTransportParams& aTransportParams,
       
    96 						   const TDesC8& aOutboundProxy );
       
    97 	
       
    98 	virtual void Resp2xxL( CSipSecAgreeRecord& aRecord,
       
    99 					       CSIPResponse& aResponse );
       
   100 					       
       
   101 	virtual void ProcessSecVerifyL( 
       
   102 	                CSipSecAgreeRecord& aRec,
       
   103 	                RPointerArray<CSIPSecurityVerifyHeader>& aSecurityVerify );
       
   104 					   
       
   105 	virtual void ClearSaL( CSipSecAgreeRecord& aRecord );
       
   106 			
       
   107 protected:
       
   108 		
       
   109 	virtual void ReInitializeL( CSipSecAgreeRecord& aRecord,
       
   110 								CSIPResponse& aResponse,
       
   111 								TBool aFullReInitialize );
       
   112 								
       
   113 	virtual void DeleteSasL( CSipSecAgreeRecord& aRec );
       
   114 	
       
   115 	virtual void DoClearSaL( CSipSecAgreeRecord& aRec );	
       
   116 	
       
   117 	virtual void DeleteSasAndPolicyL( CSipSecAgreeRecord& aRec );
       
   118 
       
   119 	virtual void UpdateExpirationTimeL( CSipSecAgreeRecord& aRec,
       
   120                                     	CSIPResponse& aResponse );
       
   121 	};
       
   122 
       
   123 #endif // CSTATE_H
       
   124 
       
   125 // End of File