|
1 /* |
|
2 * Copyright (c) 2008-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: IKE protocol plugin session interface |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef M_IKEPLUGINSESSIONIF_H |
|
20 #define M_IKEPLUGINSESSIONIF_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include "vpnmandefs.h" |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 class CIkeData; |
|
27 class MIkeDataInterface; |
|
28 |
|
29 /** |
|
30 * IKE protocol plugin session interface. |
|
31 * |
|
32 * Session interface for handling an IKE connection with a remote host. |
|
33 * Separate session is required for each VPN connection. |
|
34 * |
|
35 * @lib internal (kmdserver.exe) |
|
36 */ |
|
37 class MIkePluginSessionIf |
|
38 { |
|
39 public: |
|
40 |
|
41 /** |
|
42 * Destructor. |
|
43 */ |
|
44 virtual ~MIkePluginSessionIf() {}; |
|
45 |
|
46 /** |
|
47 * Starts negotiation with a remote host. |
|
48 * @param aIkeData IKE policy data |
|
49 * @param aInternalAddress Internal address (returned) |
|
50 * @param aStatus Completion status (returned) |
|
51 */ |
|
52 virtual void NegotiateWithHost( const CIkeData& aIkeData, |
|
53 TVPNAddress& aInternalAddress, |
|
54 TRequestStatus& aStatus ) = 0; |
|
55 |
|
56 /** |
|
57 * Cancels negotiate request. DeleteSession() method needs to be called |
|
58 * after this method to delete session. |
|
59 */ |
|
60 virtual void CancelNegotiateWithHost() = 0; |
|
61 |
|
62 /** |
|
63 * Deletes session. IKE/IPSec SA:s are deleted. |
|
64 * @param aSilentClose Specified if a silent close in question (Delete |
|
65 * payloads not transmitted to remote host) |
|
66 * @param aStatus Completion status (returned) |
|
67 */ |
|
68 virtual void DeleteSession( const TBool aSilentClose, |
|
69 TRequestStatus& aStatus ) = 0; |
|
70 |
|
71 /** |
|
72 * Cancels deletion requests. IKE/IPSec SA:s are deleted. |
|
73 */ |
|
74 virtual void CancelDeleteSession() = 0; |
|
75 |
|
76 /** |
|
77 * Requests notification about error condition. Error notification causes |
|
78 * IKE plugin session to be deleted silently and link disconnected. IKE |
|
79 * plugin session needs to cleanup session, before notifying error. |
|
80 * @param aStatus Completion status (returned) |
|
81 */ |
|
82 virtual void NotifyError( TRequestStatus& aStatus ) = 0; |
|
83 |
|
84 /** |
|
85 * Cancels error notification request. |
|
86 */ |
|
87 virtual void CancelNotifyError() = 0; |
|
88 |
|
89 /** |
|
90 * Requests notification about change of internal address. |
|
91 * @param aInternalAddress Internal address (returned) |
|
92 * @param aStatus KErrNone or KErrCancel. Error condition needs to be |
|
93 * indicated via NotifyError() method. (returned) |
|
94 */ |
|
95 virtual void NotifyInternalAddressChanged( TVPNAddress& aInternalAddress, |
|
96 TRequestStatus& aStatus ) = 0; |
|
97 |
|
98 /** |
|
99 * Cancels internal address change notification request. |
|
100 */ |
|
101 virtual void CancelNotifyInternalAddressChanged() = 0; |
|
102 |
|
103 }; |
|
104 |
|
105 |
|
106 #endif // M_IKEPLUGINSESSIONIF_H |