|
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 "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_MULTIPLE_SA_TEST_WRAPPER_H__) |
|
24 #define __TEF_IPSEC_MULTIPLE_SA_TEST_WRAPPER_H__ |
|
25 |
|
26 |
|
27 |
|
28 #include <DataWrapper.h> |
|
29 |
|
30 class CT_IPSecMultipleSATestWrapper : public CDataWrapper |
|
31 { |
|
32 public: |
|
33 CT_IPSecMultipleSATestWrapper(); |
|
34 ~CT_IPSecMultipleSATestWrapper(); |
|
35 |
|
36 static CT_IPSecMultipleSATestWrapper* NewL(); |
|
37 |
|
38 virtual TBool DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex); |
|
39 virtual TAny* GetObject() { return iObject; } |
|
40 inline virtual void SetObjectL(TAny* aObject) |
|
41 { |
|
42 DestroyData(); |
|
43 iObject = static_cast<TInt*> (aObject); |
|
44 } |
|
45 |
|
46 inline virtual void DisownObjectL() |
|
47 { |
|
48 iObject = NULL; |
|
49 } |
|
50 |
|
51 void DestroyData() |
|
52 { |
|
53 delete iObject; |
|
54 iObject=NULL; |
|
55 } |
|
56 |
|
57 inline virtual TCleanupOperation CleanupOperation() |
|
58 { |
|
59 return CleanupOperation; |
|
60 } |
|
61 |
|
62 protected: |
|
63 void ConstructL(); |
|
64 |
|
65 private: |
|
66 static void CleanupOperation(TAny* aAny) |
|
67 { |
|
68 TInt* number = static_cast<TInt*>(aAny); |
|
69 delete number; |
|
70 } |
|
71 |
|
72 inline void DoCmdNewL(const TDesC& aEntry); |
|
73 void DoCmdTestMultipleSA(const TDesC& aSection); |
|
74 void TestMultipleSAWithEchoL(TInt aPort, TPtrC16 aIpDAddr); |
|
75 void DoCmdNegativeTestMultipleSA(const TDesC& aSection); |
|
76 |
|
77 protected: |
|
78 TInt* iObject; |
|
79 }; |
|
80 |
|
81 |
|
82 #endif // __TEF_IPSEC_MULTIPLE_SA_TEST_WRAPPER_H__ |