|
1 /* |
|
2 * Copyright (c) 2005 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: The stub implementation of MSysApOfflineModeController. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef SYSAPOFFLINEMODECONTROLLERIMPL_H |
|
20 #define SYSAPOFFLINEMODECONTROLLERIMPL_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include <centralrepository.h> |
|
25 #include "MSysApOfflineModeController.h" |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 |
|
29 class CSysApAppUi; |
|
30 |
|
31 // CLASS DECLARATION |
|
32 /** |
|
33 * CSysApOfflineModeController |
|
34 * |
|
35 * @lib sysap |
|
36 * @since 2.X |
|
37 */ |
|
38 |
|
39 class CSysApOfflineModeController : public CBase, public MSysApOfflineModeController |
|
40 { |
|
41 public: |
|
42 |
|
43 /** |
|
44 * Two-phased constructor. |
|
45 */ |
|
46 static CSysApOfflineModeController* NewL( CSysApAppUi& aSysApAppUi ); |
|
47 |
|
48 /** |
|
49 * Destructor. |
|
50 */ |
|
51 ~CSysApOfflineModeController(); |
|
52 |
|
53 private: |
|
54 |
|
55 /** |
|
56 * Constructor. |
|
57 */ |
|
58 //CSysApOfflineModeController(); |
|
59 |
|
60 /** |
|
61 * Constructor. |
|
62 */ |
|
63 CSysApOfflineModeController( CSysApAppUi& aSysApAppUi ); |
|
64 |
|
65 protected: // From MSysApOfflineModeController |
|
66 |
|
67 /** |
|
68 * Returns the status of offline mode |
|
69 * @param None |
|
70 * @return TBool |
|
71 */ |
|
72 TBool OfflineModeActive(); |
|
73 |
|
74 /** |
|
75 * Handles switch from online to offline. Called by |
|
76 * CSysApAppUi::HandleProfileChangedL(). |
|
77 * @param None |
|
78 * @return void |
|
79 */ |
|
80 void SwitchFromOnlineToOfflineModeL(); |
|
81 |
|
82 /** |
|
83 * Handles switch from offline to online. Called by |
|
84 * CSysApAppUi::HandleProfileChangedL(). |
|
85 * @param None |
|
86 * @return void |
|
87 */ |
|
88 void SwitchFromOfflineToOnlineModeL(); |
|
89 |
|
90 /** |
|
91 * Checks both DOS and S60 offline mode statuses in startup. If |
|
92 * they differ, the device will be set to the mode indicated |
|
93 * by DOS. Called by |
|
94 * CSysApAppUi::DoSwStateNormalConstructionL() |
|
95 * @param None |
|
96 * @return void |
|
97 */ |
|
98 void CheckOfflineModeInitialStatusesL(); |
|
99 |
|
100 /** |
|
101 * To notify MSysApOfflineModeController not to activate |
|
102 * BT when going back on-line. |
|
103 * @param None |
|
104 * @return void |
|
105 */ |
|
106 void DoNotActivateBt(); |
|
107 |
|
108 /** |
|
109 * Checks whether BT should be activated. |
|
110 * @param None |
|
111 * @return void |
|
112 */ |
|
113 TBool MustBtBeActivated(); |
|
114 |
|
115 /** |
|
116 * Checks whether it's ok to go back online. |
|
117 * @param None |
|
118 * @return void |
|
119 */ |
|
120 void GoOnlineIfOkL(); |
|
121 |
|
122 /** |
|
123 * Notifies MSysApOfflineModeController not to activate RF e.g. during |
|
124 * BT SAP connection. |
|
125 * @param None |
|
126 * @return void |
|
127 */ |
|
128 void DoNotActivateRF(); |
|
129 |
|
130 private: |
|
131 |
|
132 /** |
|
133 * Two-phased constructor. |
|
134 * @param None |
|
135 * @return void |
|
136 */ |
|
137 void ConstructL(); |
|
138 |
|
139 /** |
|
140 * Returns ETrue if network connections allowed |
|
141 * @param None |
|
142 * @return TBool |
|
143 */ |
|
144 TBool GetNetworkConnectionAllowed(); |
|
145 |
|
146 /** |
|
147 * Sets the status of the "BT active" setting |
|
148 * @param TBool |
|
149 * @return void |
|
150 */ |
|
151 void SetBtActiveBeforeOfflineMode( TBool aBtActive ); |
|
152 |
|
153 /** |
|
154 * Returns ETrue if BT was active before Offline Mode. |
|
155 * @param None |
|
156 * @return TBool |
|
157 */ |
|
158 TBool BtActiveBeforeOfflineMode(); |
|
159 |
|
160 private: |
|
161 |
|
162 CSysApAppUi& iSysApAppUi; |
|
163 |
|
164 TBool iOfflineModeActive; |
|
165 TBool iDoNotActivateRF; |
|
166 }; |
|
167 |
|
168 #endif // SYSAPOFFLINEMODECONTROLLERIMPL_H |
|
169 |
|
170 // End of File |