networksecurity/ipsec/te_ipsec_selector_confilict/inc/te_ipsectestserver.h
branchRCL_3
changeset 22 8d540f55e491
parent 20 7e41d162e158
equal deleted inserted replaced
21:abbed5a4b42a 22:8d540f55e491
       
     1 /*
       
     2 * Copyright (c) 2008 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 the License "Symbian Foundation License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 
       
    18 /**
       
    19 @test
       
    20 @internalComponent
       
    21 
       
    22 This contains CT_IPSecTestServer
       
    23 */
       
    24 
       
    25 #ifndef __TEF_IPSEC_TESTSERVER_H__
       
    26 #define __TEF_IPSEC_TESTSERVER_H__
       
    27 
       
    28 #include <test/testblockcontroller.h>
       
    29 #include <test/testserver2.h>
       
    30 #include "te_ipsecconst.h"
       
    31 #include "te_loadpolicy_bbd.h"
       
    32 #include "te_loadpolicy_bdd.h"
       
    33 #include "te_selectorconflict.h"
       
    34 #include "te_loadpolicy_uma.h"
       
    35 #include "te_coverage_test.h"
       
    36 
       
    37 
       
    38 class CT_LoadPolicyTestBlock : public CTestBlockController
       
    39 	{
       
    40 public:
       
    41     static CT_LoadPolicyTestBlock* NewL();
       
    42     CT_LoadPolicyTestBlock() : CTestBlockController() {}
       
    43 	~CT_LoadPolicyTestBlock() {}
       
    44 
       
    45 	CDataWrapper* CreateDataL(const TDesC& aData)
       
    46 		{	  
       
    47 		CDataWrapper* wrapper = NULL;
       
    48 		
       
    49 		if (KIPSecTestBypass() == aData)
       
    50 			{
       
    51 			wrapper = CT_LoadPolicyBBD::NewL();		
       
    52 			}
       
    53 		else if (KIPSecTestUMA() == aData)
       
    54 		    {
       
    55 		    wrapper = CT_LoadPolicyUMA::NewL();	    
       
    56 		    }		
       
    57 		else if (KIPSecTestDrop() == aData)
       
    58             {
       
    59             wrapper = CT_LoadPolicyBDD::NewL();
       
    60             }
       
    61 		else if (KIPSecCoverageTest() == aData)
       
    62 		    {
       
    63             wrapper = CT_CoverageTest::NewL();
       
    64 		    }
       
    65 		else
       
    66 			{
       
    67 			wrapper = NULL;
       
    68 			}
       
    69 		return wrapper;
       
    70 		}
       
    71 	};
       
    72 
       
    73 class CT_LoadPolicyTestServer : public CTestServer2
       
    74 	{
       
    75 public:
       
    76     CT_LoadPolicyTestServer() {}
       
    77 	~CT_LoadPolicyTestServer() {}
       
    78 
       
    79 	static CT_LoadPolicyTestServer* NewL();
       
    80 
       
    81 	CT_LoadPolicyTestBlock*	CreateTestBlock()
       
    82 		{
       
    83 		CT_LoadPolicyTestBlock* controller = new (ELeave) CT_LoadPolicyTestBlock();
       
    84 		return controller;
       
    85 		}
       
    86 	};
       
    87 
       
    88 #endif //__TEF_IPSEC_TESTSERVER_H__