|
1 /* |
|
2 * Copyright (c) 2007-2008 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 the License "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 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef SATFLIGHTMODESTATUS_H |
|
21 #define SATFLIGHTMODESTATUS_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> // class cactive |
|
25 #include <e32property.h> // class rproperty |
|
26 |
|
27 // CONSTANTS |
|
28 //None |
|
29 |
|
30 // MACROS |
|
31 //None |
|
32 |
|
33 // DATA TYPES |
|
34 //None |
|
35 |
|
36 // FUNCTION PROTOTYPES |
|
37 //None |
|
38 |
|
39 // FORWARD DECLARATION |
|
40 class CSatMessHandler; |
|
41 class CTsySatMessaging; |
|
42 |
|
43 // CLASS DECLARATION |
|
44 |
|
45 /** |
|
46 * CSatFlightModeStatus |
|
47 * SimAtkTSY Flight mode support Active object for checking flight mode status |
|
48 * values. |
|
49 */ |
|
50 class CSatFlightModeStatus : public CActive |
|
51 { |
|
52 public: // Constructors and destructor |
|
53 |
|
54 /** |
|
55 * Two-phased constructor. |
|
56 * @param aSatMessHandler pointer to satmessagehandler class |
|
57 * @param aSatMessaging pointer to TsySatMessaging class |
|
58 */ |
|
59 static CSatFlightModeStatus* NewL( |
|
60 CSatMessHandler* aSatMessHandler, |
|
61 CTsySatMessaging* aSatMessaging ); |
|
62 |
|
63 /** |
|
64 * Destructor. |
|
65 */ |
|
66 virtual ~CSatFlightModeStatus(); |
|
67 |
|
68 private: // Constructors |
|
69 |
|
70 /** |
|
71 * C++ constructor. |
|
72 * @param aSatMessHandler pointer to satmessagehandler class |
|
73 * @param aSatMessaging pointer to satmessaging class |
|
74 */ |
|
75 CSatFlightModeStatus( |
|
76 CSatMessHandler* aSatMessHandler, |
|
77 CTsySatMessaging* aSatMessaging ); |
|
78 |
|
79 /** |
|
80 * 2nd phase constructor. |
|
81 */ |
|
82 void ConstructL(); |
|
83 |
|
84 public: // New functions |
|
85 |
|
86 /** |
|
87 * Flight mode status value |
|
88 * @return Flight mode status value, True or False. |
|
89 */ |
|
90 TBool FlightModeStatusValue(); |
|
91 |
|
92 public: // Functions from base classes |
|
93 //None |
|
94 |
|
95 protected: // New functions |
|
96 //None |
|
97 |
|
98 protected: // Functions from base classes |
|
99 //None |
|
100 |
|
101 private: // New functions |
|
102 |
|
103 /** |
|
104 * Checks Flight mode statuses and sends indication of status state |
|
105 * changes |
|
106 */ |
|
107 void CheckStatusChange(); |
|
108 |
|
109 private: // Functions from base classes |
|
110 |
|
111 /** |
|
112 * Activates active object when request is completed. |
|
113 */ |
|
114 void RunL(); |
|
115 |
|
116 /** |
|
117 * When RunL leaves, RunError is called. |
|
118 * @param TInt aError: Error from RunL |
|
119 * @return TInt: KErrNone |
|
120 */ |
|
121 TInt RunError( TInt aError ); |
|
122 |
|
123 /** |
|
124 * From CActive |
|
125 * Cancels active object request. |
|
126 */ |
|
127 void DoCancel(); |
|
128 |
|
129 public: // Data |
|
130 // None |
|
131 |
|
132 protected: // Data |
|
133 // None |
|
134 |
|
135 private: // Data |
|
136 |
|
137 // Satmesshandler class, responsible for |
|
138 // sending ISI messages to via NokiaTSY CMmPhonetSender and receiving |
|
139 // ISI messages via Nokia TSY CMmPhonetReceiver. |
|
140 CSatMessHandler* iSatMessHandler; |
|
141 |
|
142 // This object receives and sends messages to the external world |
|
143 // using the message handler and messaging classes. |
|
144 CTsySatMessaging* iSatMessaging; |
|
145 |
|
146 // Flight mode status value. True if Flight Mode is ON. |
|
147 TBool iFlightModeActive; |
|
148 |
|
149 // Handling to Pub sub key |
|
150 RProperty iProperty; |
|
151 |
|
152 public: // Friend classes |
|
153 //None |
|
154 |
|
155 protected: // Friend classes |
|
156 //None |
|
157 |
|
158 private: // Friend classes |
|
159 //None |
|
160 |
|
161 }; |
|
162 |
|
163 #endif // SATFLIGHTMODESTATUS_H |
|
164 |
|
165 // End of File |