networksecurity/ipsec/te_ipsec/inc/t_ipsecikev2.h
changeset 0 af10295192d8
child 37 052078dda061
equal deleted inserted replaced
-1:000000000000 0:af10295192d8
       
     1 /*
       
     2 * Copyright (c) 2003 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 *
       
    16 */
       
    17 
       
    18 
       
    19 /**
       
    20  * @file ts_ipsec_crypto.h header file for main test code for IPsec
       
    21  */
       
    22 
       
    23 #if (!defined __TEF_IPSEC_IKEV2_TEST_WRAPPER_H__)
       
    24 #define __TEF_IPSEC_IKEV2_TEST_WRAPPER_H__
       
    25 
       
    26 #include <DataWrapper.h>
       
    27 
       
    28 class CT_IPSecIKEv2TestWrapper : public CDataWrapper
       
    29 	{
       
    30 public:
       
    31 	CT_IPSecIKEv2TestWrapper();
       
    32 	~CT_IPSecIKEv2TestWrapper();
       
    33 	
       
    34 	static	CT_IPSecIKEv2TestWrapper*	NewL();
       
    35 	
       
    36 	virtual TBool	DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
       
    37 	virtual TAny*	GetObject() { return iObject; }
       
    38 	inline virtual void	SetObjectL(TAny* aObject)
       
    39 		{
       
    40 		DestroyData();
       
    41 		iObject	= static_cast<TInt*> (aObject);
       
    42 		}
       
    43 
       
    44 	inline virtual void	DisownObjectL()
       
    45 		{
       
    46 		iObject = NULL;
       
    47 		}
       
    48 
       
    49 	void DestroyData()
       
    50 		{
       
    51 		delete iObject;
       
    52 		iObject=NULL;
       
    53 		}
       
    54 
       
    55 	inline virtual TCleanupOperation CleanupOperation()
       
    56 		{
       
    57 		return CleanupOperation;
       
    58 		}
       
    59 		
       
    60 protected:
       
    61 	void ConstructL();
       
    62 	
       
    63 private:
       
    64 	static void CleanupOperation(TAny* aAny)
       
    65 		{
       
    66 		TInt* number = static_cast<TInt*>(aAny);
       
    67 		delete number;
       
    68 		}
       
    69 	
       
    70 	inline void DoCmdNewL(const TDesC& aEntry);
       
    71 	void DoCmdTestIKEv2(const TDesC& aSection);
       
    72 	void DoCmdNegativeTestIKEv2(const TDesC& aSection);
       
    73 	void TestIKEv2WithEchoL(TInt aPort, TPtrC16 aIpDAddr);
       
    74 				
       
    75 protected:
       
    76 	TInt*						iObject;
       
    77 	};
       
    78 
       
    79 
       
    80 #endif // __TEF_IPSEC_IKEV2_TEST_WRAPPER_H__