|
1 /* |
|
2 * Copyright (c) 2003-2006 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: Task handler for closing VPN connection |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // @file vpnconncloser.h |
|
21 |
|
22 #ifndef __VPN_CONN_CLOSER_H__ |
|
23 #define __VPN_CONN_CLOSER_H__ |
|
24 |
|
25 #include "sit.h" |
|
26 #include "taskhandler.h" |
|
27 #include "kmdapi.h" |
|
28 #include "ipsecpolapi.h" |
|
29 #include "eventlogger.h" |
|
30 #include "eventdefssit.h" |
|
31 |
|
32 // Task handling states |
|
33 const TInt KStateDeactivateKmd = 1; |
|
34 const TInt KStateUnloadIpsecPolicy = 2; |
|
35 const TInt KStateAfterUnloadIpsecPolicy = 3; |
|
36 |
|
37 /** |
|
38 * Protocol version getter task handler |
|
39 */ |
|
40 NONSHARABLE_CLASS(CVpnConnCloser) : public CTaskHandler |
|
41 { |
|
42 public: |
|
43 static CVpnConnCloser* NewL(MTaskHandlerManager* aManager, |
|
44 const TTaskArrivedEventData& aTaskInfo); |
|
45 ~CVpnConnCloser(); |
|
46 |
|
47 private: // From CTaskHandler |
|
48 void StartTaskHandling(); |
|
49 void ChangeStateL(); |
|
50 void CancelOngoingOperation(); |
|
51 void ReportResult(TInt aStatus); |
|
52 |
|
53 private: |
|
54 CVpnConnCloser(MTaskHandlerManager* aManager, |
|
55 const TTaskArrivedEventData& aTaskInfo); |
|
56 void ConstructL(); |
|
57 |
|
58 void StateDeactivateKmdL(); |
|
59 void StateUnloadIpsecPolicy(); |
|
60 void StateAfterUnloadIpsecPolicy(); |
|
61 |
|
62 private: |
|
63 TPckgBuf<TCloseVpnConnEventSpec> iEventSpecDes; |
|
64 |
|
65 RKMD iKmdServ; |
|
66 RIpsecPolicyServ iPolicyServ; |
|
67 |
|
68 DEFINE_EVENT_LOGGER |
|
69 }; |
|
70 |
|
71 #endif // __VPN_CONN_CLOSER_H__ |