|
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 getting IP version |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // @file protocolversiongetter.h |
|
21 |
|
22 #ifndef __PROTOCOL_VERSION_GETTER_H__ |
|
23 #define __PROTOCOL_VERSION_GETTER_H__ |
|
24 |
|
25 #include "sit.h" |
|
26 #include "taskhandler.h" |
|
27 #include "vpnapi.h" |
|
28 #include "eventdefssit.h" |
|
29 |
|
30 // Task handling states |
|
31 const TInt KStateGetProtocolVersion = 1; |
|
32 |
|
33 /** |
|
34 * Protocol version getter task handler |
|
35 */ |
|
36 NONSHARABLE_CLASS(CProtocolVersionGetter) : public CTaskHandler |
|
37 { |
|
38 public: |
|
39 static CProtocolVersionGetter* NewL(MTaskHandlerManager* aManager, |
|
40 const TTaskArrivedEventData& aTaskInfo); |
|
41 ~CProtocolVersionGetter(); |
|
42 |
|
43 private: // From CTaskHandler |
|
44 void StartTaskHandling(); |
|
45 void ChangeStateL(); |
|
46 void CancelOngoingOperation(); |
|
47 void ReportResult(TInt aStatus); |
|
48 |
|
49 private: |
|
50 CProtocolVersionGetter(MTaskHandlerManager* aManager, |
|
51 const TTaskArrivedEventData& aTaskInfo); |
|
52 void ConstructL(); |
|
53 |
|
54 void StateGetProtocolVersionL(); |
|
55 |
|
56 void GetProtocolVersionL(); |
|
57 void ParseProtocolVersionL(const TDesC8& aPolicyData); |
|
58 |
|
59 private: |
|
60 TPckgBuf<TGetProtocolVersionEventSpec> iEventSpecDes; |
|
61 TGetProtocolVersionEventData iEventData; |
|
62 |
|
63 RVpnServ iVpnServ; |
|
64 }; |
|
65 |
|
66 #endif // __PROTOCOL_VERSION_GETTER_H__ |