|
1 /* |
|
2 * Copyright (c) 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: Event definitions for SIT |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef EVENTDEFSSIT_H |
|
21 #define EVENTDEFSSIT_H |
|
22 |
|
23 /* |
|
24 * The following event types are "SIT events". When a client |
|
25 * makes a SIT event listening request, the Event Mediator |
|
26 * uses the SIT to fulfill the request. |
|
27 * |
|
28 * When the SIT completes the task that is needed to fulfill |
|
29 * a certain SIT event listening request, the SIT reports an |
|
30 * event to the Event Mediator. The event report contains |
|
31 * event data that the Event Mediator passes further to the |
|
32 * listeners of the SIT event. |
|
33 * |
|
34 * EGetProtocolVersionEvent |
|
35 * Event specification: VPN policy ID |
|
36 * Event data: Status of the task |
|
37 * Protocol type enumeration |
|
38 * |
|
39 * EStartVpnConnEvent |
|
40 * Event specification: VPN IAP ID |
|
41 * VPN network ID |
|
42 * Real IAP ID |
|
43 * Real network ID |
|
44 * VPN policy ID |
|
45 * VPN NIF name |
|
46 * Event data: Status of the task |
|
47 * IKE policy handle |
|
48 * IPSec policy handle |
|
49 * VPN internal address information |
|
50 * |
|
51 * ECloseVpnConnEvent |
|
52 * Event specification: IKE policy handle |
|
53 * IPSec policy handle |
|
54 * Event data: Status of the task |
|
55 * |
|
56 * EStartRealIapConnEvent |
|
57 * Event specification: Real IAP ID |
|
58 * Real network ID |
|
59 * Event data: Status of the task |
|
60 * |
|
61 * EObserveRealIapConnEvent |
|
62 * Event specification: Real IAP ID |
|
63 * Real network ID |
|
64 * Event data: Status of the task |
|
65 * Real IAP connection event |
|
66 * |
|
67 * The following event types are SIT related event types that are |
|
68 * used by the SIT for fetching task related information from the |
|
69 * Event Mediator. These event types are meant only for internal |
|
70 * use between the SIT and the Event Mediator. |
|
71 * |
|
72 * ETaskArrivedEvent |
|
73 * Event specification: - |
|
74 * Event data: Event type of the task request |
|
75 * that requires fulfilling |
|
76 * Event specification ID of the task |
|
77 * request that requires fulfilling |
|
78 * |
|
79 * EFetchTaskInfoEvent |
|
80 * Event specification: Event type of the task request |
|
81 * that requires fulfilling |
|
82 * Event specification ID of the task |
|
83 * request that requires fulfilling |
|
84 * Event data: One of the event specifications |
|
85 * listed below (depends on the event |
|
86 * type) |
|
87 * |
|
88 */ |
|
89 |
|
90 /** |
|
91 * Protocol version information used with EGetProtocolVersionEvent |
|
92 */ |
|
93 enum TProtocolVersion |
|
94 { |
|
95 EVersionUnknown = 0, |
|
96 EVersionIp, |
|
97 EVersionIp6 |
|
98 }; |
|
99 |
|
100 /** |
|
101 * |
|
102 * Enumeration of deactivation types. |
|
103 * |
|
104 */ |
|
105 enum TDeactivateType |
|
106 { |
|
107 EDeactivateNormal = 0, |
|
108 EDeactivateForced |
|
109 }; |
|
110 |
|
111 |
|
112 /** |
|
113 * Event specification for EGetProtocolVersionEvent and |
|
114 * EGetProtocolVersionCancelEvent |
|
115 */ |
|
116 class TGetProtocolVersionEventSpec : public TEventSpec |
|
117 { |
|
118 public: |
|
119 inline TGetProtocolVersionEventSpec() : TEventSpec() |
|
120 { |
|
121 iPolicyId.Zero(); |
|
122 } |
|
123 TVpnPolicyId iPolicyId; |
|
124 }; |
|
125 |
|
126 /** |
|
127 * Event data for EGetProtocolVersionEvent |
|
128 */ |
|
129 class TGetProtocolVersionEventData : public TEventData |
|
130 { |
|
131 public: |
|
132 inline TGetProtocolVersionEventData() : TEventData(), iProtocolVersion(EVersionUnknown) |
|
133 {} |
|
134 TProtocolVersion iProtocolVersion; |
|
135 }; |
|
136 |
|
137 /** |
|
138 * Event specification for EStartVpnConnEvent and EStartVpnConnCancelEvent |
|
139 */ |
|
140 class TStartVpnConnEventSpec : public TEventSpec |
|
141 { |
|
142 public: |
|
143 inline TStartVpnConnEventSpec() : TEventSpec() |
|
144 { |
|
145 iPolicyId.Zero(); |
|
146 } |
|
147 TRealConfig iIfInfo; |
|
148 TVpnPolicyId iPolicyId; |
|
149 }; |
|
150 |
|
151 /** |
|
152 * Event data for EStartVpnConnEvent |
|
153 */ |
|
154 class TStartVpnConnEventData : public TEventData |
|
155 { |
|
156 public: |
|
157 inline TStartVpnConnEventData() : TEventData() |
|
158 { |
|
159 iIkePolicyHandle.iHandle = 0; |
|
160 iIpsecPolicyHandle.iHandle = 0; |
|
161 } |
|
162 TPolicyHandle iIkePolicyHandle; |
|
163 TPolicyHandle iIpsecPolicyHandle; |
|
164 TVPNAddress iVpnAddressInfo; |
|
165 TUint32 iIapId; |
|
166 TUint32 iNetId; |
|
167 }; |
|
168 |
|
169 /** |
|
170 * Event specification for ECloseVpnConnEvent and ECloseVpnConnCancelEvent |
|
171 */ |
|
172 class TCloseVpnConnEventSpec : public TEventSpec |
|
173 { |
|
174 public: |
|
175 inline TCloseVpnConnEventSpec() |
|
176 :TEventSpec(), |
|
177 iDeactivateType(EDeactivateNormal), |
|
178 iVpnIapId(0), |
|
179 iRealIapId(0) |
|
180 { |
|
181 iIkePolicyHandle.iHandle = 0; |
|
182 iIpsecPolicyHandle.iHandle = 0; |
|
183 } |
|
184 TPolicyHandle iIkePolicyHandle; |
|
185 TPolicyHandle iIpsecPolicyHandle; |
|
186 TDeactivateType iDeactivateType; |
|
187 TUint32 iVpnIapId; |
|
188 TUint32 iRealIapId; |
|
189 }; |
|
190 |
|
191 /** |
|
192 * Event data for ECloseVpnConnEvent |
|
193 */ |
|
194 typedef TEventData TCloseVpnConnEventData; |
|
195 |
|
196 /** |
|
197 * Event specification for EStartRealIapConnEvent and |
|
198 * EStartRealIapConnCancelEvent |
|
199 */ |
|
200 class TStartRealIapConnEventSpec : public TEventSpec |
|
201 { |
|
202 public: |
|
203 inline TStartRealIapConnEventSpec() |
|
204 :TEventSpec(), iRealIapConnInfo(), iVpnIapId(0), iRealIapId(0) |
|
205 {} |
|
206 TConnectionInfo iRealIapConnInfo; |
|
207 TUint32 iVpnIapId; |
|
208 TUint32 iRealIapId; |
|
209 }; |
|
210 |
|
211 /** |
|
212 * Event data for EStartRealIapConnEvent |
|
213 */ |
|
214 typedef TEventData TStartRealIapConnEventData; |
|
215 |
|
216 /** |
|
217 * Event specification for EObserveRealIapConnEvent and |
|
218 * EObserveRealIapConnCancelEvent |
|
219 */ |
|
220 typedef TStartRealIapConnEventSpec TObserveRealIapConnEventSpec; |
|
221 |
|
222 /** |
|
223 * Event data for EObserveRealIapConnEvent |
|
224 */ |
|
225 class TObserveRealIapConnEventData : public TEventData |
|
226 { |
|
227 public: |
|
228 inline TObserveRealIapConnEventData() |
|
229 : TEventData(), iInterfaceState(ESingleInterfaceStateUnknown) |
|
230 {} |
|
231 TSingleConnInterfaceState iInterfaceState; |
|
232 }; |
|
233 |
|
234 |
|
235 #endif // EVENTDEFSSIT_H |