equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2005-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: Common keep alive object |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef _IKEV2KEEPALIVE_H_ |
|
19 #define _IKEV2KEEPALIVE_H_ |
|
20 |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <in_sock.h> |
|
24 |
|
25 class CIkev2PluginSession; |
|
26 |
|
27 /** |
|
28 * IKE keepalive event handler |
|
29 * @internalComponent |
|
30 */ |
|
31 class MIkeV2DpdHeartBeatEventHandler |
|
32 { |
|
33 public: |
|
34 /** |
|
35 * IKE PKI service operation completed |
|
36 * @internalComponent |
|
37 * @param aStatus completion status of operation |
|
38 * @param aObject pointer to CIkePkiService object |
|
39 * |
|
40 */ |
|
41 virtual void EventHandlerL()=0; |
|
42 }; |
|
43 |
|
44 |
|
45 NONSHARABLE_CLASS(CIkeV2KeepAlive) : public CTimer |
|
46 { |
|
47 public: |
|
48 static CIkeV2KeepAlive* NewL(TInt DpdKeepAlive, |
|
49 MIkeV2DpdHeartBeatEventHandler& aHandler); |
|
50 ~CIkeV2KeepAlive(); |
|
51 |
|
52 protected: |
|
53 // |
|
54 // CActive methods |
|
55 // |
|
56 void DoCancel(); |
|
57 void RunL(); |
|
58 |
|
59 private: // implementation |
|
60 CIkeV2KeepAlive(TInt DpdKeepAlive, |
|
61 MIkeV2DpdHeartBeatEventHandler& aHandler); |
|
62 void ConstructL(); |
|
63 void StartTimer(); |
|
64 |
|
65 private: // data |
|
66 MIkeV2DpdHeartBeatEventHandler& iCallback; |
|
67 |
|
68 TInt iDpdKeepAlive; |
|
69 TInt iRemainingTime; |
|
70 }; |
|
71 |
|
72 #endif //_IKEV2KEEPALIVE_H_ |