equal
deleted
inserted
replaced
19 #ifndef BLUETOOTHNOTIFICATION_H |
19 #ifndef BLUETOOTHNOTIFICATION_H |
20 #define BLUETOOTHNOTIFICATION_H |
20 #define BLUETOOTHNOTIFICATION_H |
21 |
21 |
22 #include <e32base.h> |
22 #include <e32base.h> |
23 #include <hb/hbcore/hbdevicedialogsymbian.h> |
23 #include <hb/hbcore/hbdevicedialogsymbian.h> |
|
24 #include <btservices/btsimpleactive.h> |
24 #include "bluetoothdevicedialogs.h" |
25 #include "bluetoothdevicedialogs.h" |
25 #include "btnotificationresult.h" |
26 #include "btnotificationresult.h" |
26 #include "bluetoothtrace.h" |
27 #include "bluetoothtrace.h" |
27 |
28 |
28 class CBTNotificationManager; |
29 class CBTNotificationManager; |
32 * CBluetoothNotification manages and controls notifications. |
33 * CBluetoothNotification manages and controls notifications. |
33 * |
34 * |
34 * @since Symbian^4 |
35 * @since Symbian^4 |
35 */ |
36 */ |
36 NONSHARABLE_CLASS( CBluetoothNotification ) : public CBase, |
37 NONSHARABLE_CLASS( CBluetoothNotification ) : public CBase, |
37 public MHbDeviceDialogObserver |
38 public MHbDeviceDialogObserver, |
|
39 public MBtSimpleActiveObserver |
38 { |
40 { |
39 |
41 |
40 |
42 |
41 public: |
43 public: |
42 |
44 |
99 * @return Error code |
101 * @return Error code |
100 */ |
102 */ |
101 inline void SetNotificationType( TBluetoothDialogParams::TBTDialogType aType, |
103 inline void SetNotificationType( TBluetoothDialogParams::TBTDialogType aType, |
102 TBTDialogResourceId aResourceId ) |
104 TBTDialogResourceId aResourceId ) |
103 { iType = aType; iResourceId = aResourceId; } |
105 { iType = aType; iResourceId = aResourceId; } |
|
106 |
|
107 /** |
|
108 * Creates New Notification Data to be shown to the user |
|
109 * |
|
110 * @since Symbian^4 |
|
111 * @return CHbSymbianVariantMap newly created notification data for the device dialog |
|
112 */ |
|
113 CHbSymbianVariantMap* CreateNotificationDataL(); |
|
114 |
104 |
115 |
105 /** |
116 /** |
106 * Sets the data to be shown to the user. |
117 * Sets the data to be shown to the user. |
107 * |
118 * |
108 * @since Symbian^4 |
119 * @since Symbian^4 |
128 * @since Symbian^4 |
139 * @since Symbian^4 |
129 * @param ?arg1 ?description |
140 * @param ?arg1 ?description |
130 * @return Error code |
141 * @return Error code |
131 */ |
142 */ |
132 TInt Update( const TDesC& aData =KNullDesC ); |
143 TInt Update( const TDesC& aData =KNullDesC ); |
|
144 |
|
145 /** |
|
146 * Updates the data to be shown to the user. |
|
147 * |
|
148 * @since Symbian^4 |
|
149 * @param ?arg1 ?description |
|
150 * @return Error code |
|
151 */ |
|
152 TInt Update( TInt aData); |
133 |
153 |
134 /** |
154 /** |
135 * Show the notification, which means that it |
155 * Show the notification, which means that it |
136 * is added to the queue. |
156 * is added to the queue. |
137 * |
157 * |
148 * @param ?arg1 ?description |
168 * @param ?arg1 ?description |
149 * @return Error code |
169 * @return Error code |
150 */ |
170 */ |
151 TInt Close(); |
171 TInt Close(); |
152 |
172 |
|
173 /** |
|
174 * Set a dialog shutdown timer. |
|
175 * This is used by passkey input entry when incoming |
|
176 * pairing failed since the phone is the only |
|
177 * display. |
|
178 * |
|
179 * @since Symbian^4 |
|
180 * @param a time after which the dialog is automatically closed. |
|
181 */ |
|
182 void SetCloseTimer(TInt aAfter); |
|
183 |
|
184 /** |
|
185 * From MBtSimpleActiveObserver |
|
186 */ |
|
187 void RequestCompletedL( CBtSimpleActive* aActive, TInt aStatus ); |
|
188 |
|
189 /** |
|
190 * From MBtSimpleActiveObserver |
|
191 */ |
|
192 void CancelRequest( TInt aRequestId ); |
|
193 |
|
194 /** |
|
195 * From MBtSimpleActiveObserver |
|
196 */ |
|
197 void HandleError( CBtSimpleActive* aActive, TInt aError ); |
153 |
198 |
154 private: |
199 private: |
155 |
200 |
156 CBluetoothNotification( CBTNotificationManager* aManager ); |
201 CBluetoothNotification( CBTNotificationManager* aManager ); |
157 |
202 |
172 * @since Symbian^4 |
217 * @since Symbian^4 |
173 * @param aType Identifies the type of data parameter to be set. |
218 * @param aType Identifies the type of data parameter to be set. |
174 * @param aData Additional integer data to be shown in the dialog. |
219 * @param aData Additional integer data to be shown in the dialog. |
175 */ |
220 */ |
176 void SetDataL( TInt aType, TInt aData ); |
221 void SetDataL( TInt aType, TInt aData ); |
|
222 |
|
223 /** |
|
224 * Update the data to be shown to the user, leaves on error. |
|
225 * |
|
226 * @since Symbian^4 |
|
227 * @param aType Identifies the type of data parameter to be set. |
|
228 * @param aData Additional descriptor data to be shown in the dialog. |
|
229 */ |
|
230 void UpdateDataL( TInt aType, const TDesC& aData ); |
|
231 |
|
232 /** |
|
233 * Update the data to be shown to the user, leaves on error. |
|
234 * |
|
235 * @since Symbian^4 |
|
236 * @param aType Identifies the type of data parameter to be set. |
|
237 * @param aData Additional integer data to be shown in the dialog. |
|
238 */ |
|
239 void UpdateDataL( TInt aType, TInt aData ); |
177 |
240 |
178 /** |
241 /** |
179 * From MHbDeviceDialogObserver. |
242 * From MHbDeviceDialogObserver. |
180 * This callback is called when data is received from a device dialog. |
243 * This callback is called when data is received from a device dialog. |
181 * |
244 * |
241 * Session object with the notification server. |
304 * Session object with the notification server. |
242 * Own. |
305 * Own. |
243 */ |
306 */ |
244 CHbDeviceDialogSymbian *iDialog; |
307 CHbDeviceDialogSymbian *iDialog; |
245 |
308 |
|
309 /** |
|
310 * Active object helper for asynchronous operations. |
|
311 * Own. |
|
312 * Used by the closing dialog timer |
|
313 */ |
|
314 CBtSimpleActive* iActive; |
|
315 |
|
316 RTimer iClosingTimer; |
|
317 |
246 BTUNITTESTHOOK |
318 BTUNITTESTHOOK |
247 |
319 |
248 }; |
320 }; |
249 |
321 |
250 #endif // BLUETOOTHNOTIFICATION_H |
322 #endif // BLUETOOTHNOTIFICATION_H |