1 /* |
|
2 * Copyright (c) 2007 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 * Header file for CWsfDbObserver class. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef C_WLAN_PLUGIN_DB_OBSERVER |
|
21 #define C_WLAN_PLUGIN_DB_OBSERVER |
|
22 |
|
23 // System includes |
|
24 #include <e32base.h> |
|
25 #include <wlancontainer.h> |
|
26 #include <d32dbms.h> |
|
27 #include <WlanCdbCols.h> |
|
28 #include <commsdat.h> |
|
29 #include <wlanmgmtclient.h> |
|
30 |
|
31 //forward declaration |
|
32 class TWsfAiController; |
|
33 |
|
34 /** |
|
35 * Database observer class. |
|
36 */ |
|
37 NONSHARABLE_CLASS( CWsfDbObserver ) : public CActive |
|
38 { |
|
39 public: |
|
40 /** |
|
41 * The Constructor. |
|
42 */ |
|
43 CWsfDbObserver(); |
|
44 |
|
45 /** |
|
46 * First phase of two phased construction. |
|
47 */ |
|
48 static CWsfDbObserver* NewL(); |
|
49 |
|
50 /** |
|
51 * This function activates this object as an active object. |
|
52 */ |
|
53 void ActivateItL(); |
|
54 |
|
55 /** |
|
56 * Destructor. |
|
57 */ |
|
58 virtual ~CWsfDbObserver(); |
|
59 |
|
60 /** |
|
61 * Set the controller |
|
62 */ |
|
63 void SetController( TWsfAiController* aController ); |
|
64 |
|
65 /** |
|
66 * Set WLAN availablity to scanning |
|
67 */ |
|
68 void EnableScanL(); |
|
69 |
|
70 /* |
|
71 * Set WLAN availablity to not scanning |
|
72 */ |
|
73 void DisableScanL(); |
|
74 |
|
75 protected: |
|
76 /** |
|
77 * When the WLAN device settings table is accessed this function |
|
78 * is called. Handle of the active object. |
|
79 */ |
|
80 void RunL(); |
|
81 |
|
82 /** |
|
83 * Whan waiting for a database access is stopped this function |
|
84 * is called. |
|
85 */ |
|
86 void DoCancel(); |
|
87 |
|
88 /** |
|
89 * @see CActive |
|
90 */ |
|
91 TInt RunError( TInt aError ); |
|
92 |
|
93 private: |
|
94 /** |
|
95 * Second phase of two phase construction. |
|
96 */ |
|
97 void ConstructL(); |
|
98 |
|
99 /* |
|
100 * Get default scanning interval |
|
101 */ |
|
102 TInt DefaultScanIntervalL(); |
|
103 |
|
104 private: |
|
105 /** |
|
106 * A CommsDat session fod database access. |
|
107 */ |
|
108 CMDBSession* iSession; |
|
109 |
|
110 /** |
|
111 * A class representing a recor of WLAN Devive Settings table. |
|
112 */ |
|
113 CCDWlanDeviceSettingsRecord* iRecord; |
|
114 |
|
115 /** |
|
116 * The value of it shows the scan state of the WLAN availablity |
|
117 */ |
|
118 TBool iOuterScanState; |
|
119 |
|
120 /** |
|
121 * Reference to the controller class of the module. |
|
122 */ |
|
123 TWsfAiController* iController; |
|
124 |
|
125 /** |
|
126 * Handle to the WLAN management client (owned) |
|
127 */ |
|
128 CWlanMgmtClient* iWlanMgmtClient; |
|
129 |
|
130 }; |
|
131 |
|
132 |
|
133 #endif //C_WLAN_PLUGIN_DB_OBSERVER |
|