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: WLAN availability check. |
|
15 * |
|
16 */ |
|
17 |
|
18 /** |
|
19 @file mpmwlanavailability.h |
|
20 WLAN availability check definition. |
|
21 */ |
|
22 |
|
23 #ifndef MPMWLANAVAILABILITY_H |
|
24 #define MPMWLANAVAILABILITY_H |
|
25 |
|
26 // INCLUDES |
|
27 #include <e32base.h> |
|
28 #include <rconnmon.h> |
|
29 #include "mpmconnmonevents.h" |
|
30 |
|
31 // FORWARD DECLARATIONS |
|
32 class CMPMConnMonEvents; |
|
33 |
|
34 // CLASS DECLARATION |
|
35 /** |
|
36 * WLAN availability check |
|
37 * |
|
38 * @lib MPMServer.exe |
|
39 * @since 5.2 |
|
40 */ |
|
41 class MWlanAvailability |
|
42 { |
|
43 public: |
|
44 /** |
|
45 * WLAN availability check response |
|
46 * @since 5.2 |
|
47 * @param aError generic Symbian error response code |
|
48 * @param aResult Result of WLAN availability check |
|
49 * @return void |
|
50 */ |
|
51 virtual void WlanAvailabilityResponse( const TInt aError, |
|
52 const TBool aResult ) = 0; |
|
53 }; |
|
54 |
|
55 // CLASS DECLARATION |
|
56 /** |
|
57 * WLAN availability check implementation |
|
58 * |
|
59 * @lib MPMServer.exe |
|
60 * @since 5.2 |
|
61 */ |
|
62 NONSHARABLE_CLASS( CWlanAvailability ) : public CActive |
|
63 { |
|
64 public: |
|
65 |
|
66 /** |
|
67 * Two-phased constructor. |
|
68 */ |
|
69 static CWlanAvailability* NewL( CMPMConnMonEvents* aConnMonEvents, |
|
70 RConnectionMonitor& aConnMon ); |
|
71 |
|
72 /** |
|
73 * Destructor. |
|
74 */ |
|
75 virtual ~CWlanAvailability(); |
|
76 |
|
77 /** |
|
78 * For starting the active object. |
|
79 * @since 5.2 |
|
80 */ |
|
81 void Start( MWlanAvailability* aObserver ); |
|
82 |
|
83 /** |
|
84 * For cancelling the request for an observer. |
|
85 * @since 5.2 |
|
86 */ |
|
87 void CancelObserver( MWlanAvailability* aObserver ); |
|
88 |
|
89 private: |
|
90 |
|
91 /** |
|
92 * C++ default constructor. |
|
93 */ |
|
94 CWlanAvailability( CMPMConnMonEvents* aConnMonEvents, |
|
95 RConnectionMonitor& aConnMon ); |
|
96 |
|
97 /** |
|
98 * 2nd phase constructor. |
|
99 */ |
|
100 void ConstructL(); |
|
101 |
|
102 private: // from CActive |
|
103 |
|
104 /** |
|
105 * Active Object RunL. |
|
106 */ |
|
107 void RunL(); |
|
108 |
|
109 /** |
|
110 * Active Object DoCancel. |
|
111 */ |
|
112 void DoCancel(); |
|
113 |
|
114 private: |
|
115 |
|
116 CMPMConnMonEvents* iConnMonEvents; |
|
117 RConnectionMonitor& iConnMon; |
|
118 RPointerArray< MWlanAvailability > iObserver; |
|
119 TRequestStatus iRequestStatus; |
|
120 TBool iResult; |
|
121 }; |
|
122 |
|
123 #endif // MPMWLANAVAILABILITY_H |
|