|
1 /* |
|
2 * Copyright (c) 2010 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: |
|
15 * Connection Monitor interface implementation. |
|
16 */ |
|
17 |
|
18 #ifndef WSFKEEPALIVECONNMON_H |
|
19 #define WSFKEEPALIVECONNMON_H |
|
20 |
|
21 // System includes |
|
22 |
|
23 #include <e32base.h> |
|
24 #include <rconnmon.h> |
|
25 |
|
26 // User includes |
|
27 |
|
28 // Forward declarations |
|
29 |
|
30 class CWsfKeepalive; |
|
31 |
|
32 // External data types |
|
33 |
|
34 // Global function prototypes |
|
35 |
|
36 // Constants |
|
37 |
|
38 // Class declaration |
|
39 |
|
40 /** |
|
41 * Connection Monitor interface implementation. |
|
42 * |
|
43 * This class uses the Connection Monitor interface to monitor status |
|
44 * of Wlan connections we might be interested in. |
|
45 */ |
|
46 class CWsfKeepaliveConnMon : public CBase, public MConnectionMonitorObserver |
|
47 { |
|
48 // Friend classes: |
|
49 |
|
50 public: |
|
51 |
|
52 // Data types |
|
53 |
|
54 /** Constructors */ |
|
55 |
|
56 /** |
|
57 * Two-phased constructor. |
|
58 * |
|
59 * @param aNotify Status of Wlan connections is notified to this class |
|
60 * @return New object allocated from heap |
|
61 */ |
|
62 static CWsfKeepaliveConnMon* NewL( CWsfKeepalive& aNotify ); |
|
63 |
|
64 /**> Destructor */ |
|
65 virtual ~CWsfKeepaliveConnMon(); |
|
66 |
|
67 public: |
|
68 |
|
69 /** |
|
70 * Connection Monitor connection client info getter. |
|
71 * |
|
72 * @param aClientInfo Where to store information |
|
73 * @param aConnectionId ID of the connection, whose info is requested |
|
74 */ |
|
75 void GetClientInfo( |
|
76 TConnMonClientEnumBuf& aClientInfo, |
|
77 TUint aConnectionId ); |
|
78 |
|
79 protected: |
|
80 |
|
81 private: |
|
82 |
|
83 CWsfKeepaliveConnMon( CWsfKeepalive& aNotify ); |
|
84 |
|
85 void ConstructL(); |
|
86 |
|
87 void EventL( const CConnMonEventBase& aConnMonEvent ); |
|
88 |
|
89 private: // Data |
|
90 |
|
91 /** |
|
92 * Status of Wlan connections is notified to this class |
|
93 */ |
|
94 CWsfKeepalive& iNotify; |
|
95 |
|
96 /** |
|
97 * Handle to Connection Monitor Server |
|
98 */ |
|
99 RConnectionMonitor iMonitor; |
|
100 |
|
101 /** |
|
102 * Id of the connection we are currently monitoring |
|
103 */ |
|
104 TUint iMonitoringConnectionId; |
|
105 }; |
|
106 |
|
107 #endif // WSFKEEPALIVECONNMON_H |