27 |
27 |
28 #include <btengdiscovery.h> |
28 #include <btengdiscovery.h> |
29 #include <btengsettings.h> |
29 #include <btengsettings.h> |
30 #include <obexutilsdialog.h> |
30 #include <obexutilsdialog.h> |
31 #include <msvapi.h> |
31 #include <msvapi.h> |
32 #include <hbdevicedialogsymbian.h> |
|
33 #include <hb/hbwidgets/hbdeviceprogressdialogsymbian.h> |
|
34 #include <hbsymbianvariant.h> |
|
35 |
32 |
36 // DATA TYPES |
33 // DATA TYPES |
37 |
34 |
38 enum TBTServiceProfile |
35 enum TBTServiceProfile |
39 { |
36 { |
52 |
49 |
53 // FORWARD DECLARATIONS |
50 // FORWARD DECLARATIONS |
54 class CObexUtilsUiLayer; |
51 class CObexUtilsUiLayer; |
55 class MBTServiceProgressGetter; |
52 class MBTServiceProgressGetter; |
56 class CBTSController; |
53 class CBTSController; |
57 class CBTSProgressTimer; |
|
58 |
54 |
59 |
55 |
60 const TUint KBTSdpObjectPush = 0x1105; |
56 const TUint KBTSdpObjectPush = 0x1105; |
61 const TUint KBTSdpBasicImaging = 0x111b; |
57 const TUint KBTSdpBasicImaging = 0x111b; |
62 const TUint KBTSdpBasicPrinting = 0x1120; |
58 const TUint KBTSdpBasicPrinting = 0x1120; |
81 /** |
77 /** |
82 * Informs the observer that a progress note should be shown. |
78 * Informs the observer that a progress note should be shown. |
83 * @param aGetter A pointer to a progess status getter object. |
79 * @param aGetter A pointer to a progess status getter object. |
84 * @return None. |
80 * @return None. |
85 */ |
81 */ |
86 virtual void LaunchProgressNoteL( MBTServiceProgressGetter* aGetter, TInt aTotalSize, TInt aFileCount ) = 0; |
82 //todo reusing the second param aTotalsize to aFileCount as it wass no longer used check it being used in other places |
|
83 virtual void LaunchProgressNoteL( MBTServiceProgressGetter* aGetter, TInt aFileCount) = 0; |
87 |
84 |
88 |
85 |
89 /** |
86 /** |
90 * Informs the observer that a progress note should be shown. |
87 * Informs the observer that a progress note should be shown. |
91 * @param aGetter A pointer to a progess status getter object. |
88 * @param aGetter A pointer to a progess status getter object. |
92 * @return None. |
89 * @return None. |
93 */ |
90 */ |
94 virtual void UpdateProgressNoteL(TInt aFileSize,TInt aFileIndex, const TDesC& aFileName ) = 0; |
91 virtual void UpdateProgressNoteL(TInt aFileSize,TInt aFileIndex, const TDesC& aFileName ) = 0; |
95 |
92 |
96 |
|
97 /** |
|
98 * Informs the observer that a progress note should be shown. |
|
99 * @param aGetter A pointer to a progess status getter object. |
|
100 * @return None. |
|
101 */ |
|
102 virtual void UpdateProgressInfoL() = 0; |
|
103 |
|
104 |
|
105 /** |
93 /** |
106 * Informs the observer that a confirmation query for sending |
94 * Informs the observer that a confirmation query for sending |
107 * should be shouwn for BIP sendign |
95 * should be shouwn for BIP sending |
108 * @return |
96 * @return |
109 */ |
97 */ |
110 virtual TInt LaunchConfirmationQuery(TInt aResouceId)=0; |
98 virtual void LaunchConfirmationQuery(const TDesC& aConfirmText)=0; |
111 |
99 |
112 /** |
100 /** |
113 * Informs the observer that a connect is timedout |
101 * Informs the observer that a connect is timedout |
114 * @return |
102 * @return |
115 */ |
103 */ |
124 NONSHARABLE_CLASS (CBTServiceStarter) : public CActive, |
112 NONSHARABLE_CLASS (CBTServiceStarter) : public CActive, |
125 public MBTServiceObserver, |
113 public MBTServiceObserver, |
126 public MObexUtilsDialogObserver, |
114 public MObexUtilsDialogObserver, |
127 public MObexUtilsProgressObserver, |
115 public MObexUtilsProgressObserver, |
128 public MBTEngSdpResultReceiver, |
116 public MBTEngSdpResultReceiver, |
129 public MBTEngSettingsObserver, |
117 public MBTEngSettingsObserver |
130 public MHbDeviceProgressDialogObserver, |
|
131 public MHbDeviceDialogObserver |
|
132 { |
118 { |
133 public: // Constructors and destructor |
119 public: // Constructors and destructor |
134 |
120 |
135 /** |
121 /** |
136 * Two-phased constructor. |
122 * Two-phased constructor. |
168 |
154 |
169 /** |
155 /** |
170 * From MBTServiceObserver A progress note should be shown. |
156 * From MBTServiceObserver A progress note should be shown. |
171 * @param aGetter A pointer to a progess status getter object. |
157 * @param aGetter A pointer to a progess status getter object. |
172 * @param aTotalSize Max size of the progress bar. |
158 * @param aTotalSize Max size of the progress bar. |
173 * @return None. |
159 * @param aFileCount Total Number of files to be sent |
174 */ |
160 * @return None. |
175 void LaunchProgressNoteL( MBTServiceProgressGetter* aGetter, TInt aTotalSize, TInt aFileCount ); |
161 */ |
|
162 //todo reuse the second param as it is no longer used check it being used in other places |
|
163 void LaunchProgressNoteL( MBTServiceProgressGetter* aGetter, TInt aFileCount); |
176 |
164 |
177 |
165 |
178 /** |
166 /** |
179 * From MBTServiceObserver Updating progress note when multiple files are sent. |
167 * From MBTServiceObserver Updating progress note when multiple files are sent. |
180 * @param aFileSize Size of the file to be send. |
168 * @param aFileSize Size of the file to be send. |
182 * @param aFileName name of the file to be send. |
170 * @param aFileName name of the file to be send. |
183 * @return None. |
171 * @return None. |
184 */ |
172 */ |
185 void UpdateProgressNoteL(TInt aFileSize,TInt aFileIndex, const TDesC& aFileName ); |
173 void UpdateProgressNoteL(TInt aFileSize,TInt aFileIndex, const TDesC& aFileName ); |
186 |
174 |
187 /** |
|
188 * From MBTServiceObserver Updating progress note info about the progress percentage |
|
189 * @return None. |
|
190 */ |
|
191 void UpdateProgressInfoL(); |
|
192 |
175 |
193 /** |
176 /** |
194 * From MObexUtilsWaitDialogObserver The wait note has been dismissed. |
177 * From MObexUtilsWaitDialogObserver The wait note has been dismissed. |
195 * @param aButtonId The button id that was used to dismiss the dialog. |
178 * @param aButtonId The button id that was used to dismiss the dialog. |
196 * @return None. |
179 * @return None. |
197 */ |
180 */ |
198 void DialogDismissed( TInt aButtonId ); |
181 void DialogDismissed(TInt aButtonId); |
199 |
182 |
200 /** |
|
201 * From MHbDeviceProgressDialogObserver |
|
202 * |
|
203 */ |
|
204 void ProgressDialogCancelled(const CHbDeviceProgressDialogSymbian * aDialog); |
|
205 |
|
206 /** |
|
207 * From MHbDeviceProgressDialogObserver |
|
208 * |
|
209 */ |
|
210 void ProgressDialogClosed(const CHbDeviceProgressDialogSymbian * aDialog ) ; |
|
211 |
|
212 /** |
183 /** |
213 * From MObexUtilsProgressObserver request for number of bytes sent |
184 * From MObexUtilsProgressObserver request for number of bytes sent |
214 * @Param None. |
185 * @Param None. |
215 * @return Number of bytes sent. |
186 * @return Number of bytes sent. |
216 */ |
187 */ |
220 * From MBTServiceObserver A confirmation query for BIP |
191 * From MBTServiceObserver A confirmation query for BIP |
221 * profile should be shown. |
192 * profile should be shown. |
222 * @return key |
193 * @return key |
223 */ |
194 */ |
224 TInt LaunchConfirmationQuery(TInt aResourceId); |
195 TInt LaunchConfirmationQuery(TInt aResourceId); |
|
196 |
|
197 |
|
198 /** |
|
199 * From MBTServiceObserver A confirmation query for BIP |
|
200 * profile should be shown. |
|
201 */ |
|
202 void LaunchConfirmationQuery(const TDesC& aConfirmText); |
225 |
203 |
226 /** |
204 /** |
227 * From MBTServiceObserver a connect request is timedout |
205 * From MBTServiceObserver a connect request is timedout |
228 * @return |
206 * @return |
229 */ |
207 */ |
447 * @param aState The current BT power state. |
425 * @param aState The current BT power state. |
448 * @return None. |
426 * @return None. |
449 */ |
427 */ |
450 void TurnBTPowerOnL( const TBTPowerStateValue aState ); |
428 void TurnBTPowerOnL( const TBTPowerStateValue aState ); |
451 |
429 |
452 void DataReceived(CHbSymbianVariantMap& aData); |
|
453 |
|
454 void DeviceDialogClosed(TInt aCompletionCode); |
|
455 private: // Data definitions |
430 private: // Data definitions |
456 |
431 |
457 enum TBTServiceStarterState |
432 enum TBTServiceStarterState |
458 { |
433 { |
459 EBTSStarterIdle, |
434 EBTSStarterIdle, |
466 private: // Data |
441 private: // Data |
467 |
442 |
468 CBTDevice* iDevice; |
443 CBTDevice* iDevice; |
469 CBTEngDiscovery* iBTEngDiscovery; |
444 CBTEngDiscovery* iBTEngDiscovery; |
470 CBTServiceParameterList* iList; |
445 CBTServiceParameterList* iList; |
471 // CObexUtilsDialog* iDialog; |
446 CObexUtilsDialog* iDialog; |
472 CBTSController* iController; |
447 CBTSController* iController; |
473 |
448 |
474 TBTServiceType iService; |
449 TBTServiceType iService; |
475 TInt iClientChannel; |
450 TInt iClientChannel; |
476 TBTServiceStarterState iState; |
451 TBTServiceStarterState iState; |
491 TBool iSendToBIPOnlyDevice; |
466 TBool iSendToBIPOnlyDevice; |
492 TBTActiveNotifier iActiveNotifier; |
467 TBTActiveNotifier iActiveNotifier; |
493 TBool iFeatureManagerInitialized; |
468 TBool iFeatureManagerInitialized; |
494 TBool iTriedBIP; |
469 TBool iTriedBIP; |
495 TBool iTriedOPP; |
470 TBool iTriedOPP; |
496 CHbDeviceDialogSymbian *iDeviceDialog; |
|
497 CHbDeviceProgressDialogSymbian *iProgressDialog; |
|
498 TInt iFileCount; |
|
499 TInt iFileIndex; |
|
500 CBTSProgressTimer *iProgressTimer; |
|
501 }; |
471 }; |
502 |
472 |
503 #endif // BT_SERVICE_CONTROLLER_H |
473 #endif // BT_SERVICE_CONTROLLER_H |
504 |
474 |
505 // End of File |
475 // End of File |