20 #include <featmgr.h> |
20 #include <featmgr.h> |
21 #include <StringLoader.h> |
21 #include <StringLoader.h> |
22 #include <btengdomainpskeys.h> |
22 #include <btengdomainpskeys.h> |
23 #include <btengdomaincrkeys.h> |
23 #include <btengdomaincrkeys.h> |
24 #include <mpeengineinfo.h> |
24 #include <mpeengineinfo.h> |
25 #include <AknNotifyStd.h> |
|
26 |
25 |
27 #include "cphoneaccessorybthandler.h" |
26 #include "cphoneaccessorybthandler.h" |
28 #include "cphonecenrepproxy.h" |
27 #include "cphonecenrepproxy.h" |
29 #include "cphonemainresourceresolver.h" |
28 #include "cphonemainresourceresolver.h" |
30 #include "mphoneneclearedhandler.h" |
29 #include "mphoneneclearedhandler.h" |
33 #include "phoneconstants.h" |
32 #include "phoneconstants.h" |
34 #include "phonelogger.h" |
33 #include "phonelogger.h" |
35 #include "phoneui.pan" |
34 #include "phoneui.pan" |
36 #include "phonerssbase.h" |
35 #include "phonerssbase.h" |
37 #include "tphonecmdparamnote.h" |
36 #include "tphonecmdparamnote.h" |
38 #include "tphonecmdparamglobalnote.h" |
|
39 |
|
40 |
37 |
41 // CONSTANTS |
38 // CONSTANTS |
42 |
39 |
43 const TInt KPhoneBtAddressTextLength = 64; |
40 const TInt KPhoneBtAddressTextLength = 64; |
44 |
41 |
75 // CPhoneAccessoryBTHandler::~CPhoneAccessoryBTHandler |
72 // CPhoneAccessoryBTHandler::~CPhoneAccessoryBTHandler |
76 // ----------------------------------------------------------------------------- |
73 // ----------------------------------------------------------------------------- |
77 // |
74 // |
78 CPhoneAccessoryBTHandler::~CPhoneAccessoryBTHandler() |
75 CPhoneAccessoryBTHandler::~CPhoneAccessoryBTHandler() |
79 { |
76 { |
80 } |
|
81 |
|
82 // ----------------------------------------------------------- |
|
83 // CPhoneAccessoryBTHandler::SetBTDebugModeL |
|
84 // Handling for message EPEMessageBTDebugMode. |
|
85 // Sets BT debug mode PS key on. |
|
86 // ----------------------------------------------------------- |
|
87 // |
|
88 void CPhoneAccessoryBTHandler::SetBTDebugModeL() |
|
89 { |
|
90 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneAccessoryBTHandler::SetBTDebugModeL( ) "); |
|
91 if ( FeatureManager::FeatureSupported( KFeatureIdOnScreenDialer ) ) |
|
92 { |
|
93 iViewCommandHandle->ExecuteCommandL( EPhoneViewClearNumberEntryContent ); |
|
94 } |
|
95 else |
|
96 { |
|
97 // Remove number entry from screen |
|
98 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
|
99 } |
|
100 iNEClearedHandler->HandleNumberEntryClearedL(); |
|
101 if ( RProperty::Set( KPSUidBluetoothDutMode, KBTSspDebugmode, EBTSspDebugModeOn )) |
|
102 { |
|
103 __PHONELOG( EOnlyFatal, EPhoneControl, "CPhoneAccessoryBTHandler::SetBTDebugModeL PS key not defined" ); |
|
104 } |
|
105 } |
77 } |
106 |
78 |
107 // --------------------------------------------------------- |
79 // --------------------------------------------------------- |
108 // CPhoneAccessoryBTHandler::SetBTHandsfreeModeL |
80 // CPhoneAccessoryBTHandler::SetBTHandsfreeModeL |
109 // --------------------------------------------------------- |
81 // --------------------------------------------------------- |
236 // Shows BT activated note. |
208 // Shows BT activated note. |
237 // ----------------------------------------------------------- |
209 // ----------------------------------------------------------- |
238 // |
210 // |
239 void CPhoneAccessoryBTHandler::ShowBTActivatedL() |
211 void CPhoneAccessoryBTHandler::ShowBTActivatedL() |
240 { |
212 { |
241 |
213 // Get localised text |
242 TPhoneCmdParamGlobalNote globalNoteParam; |
214 HBufC* buf = StringLoader::LoadLC( |
243 globalNoteParam.SetType( EAknGlobalInformationNote ); |
215 CPhoneMainResourceResolver::Instance()-> |
244 globalNoteParam.SetTone( EAvkonSIDNoSound ); |
216 ResolveResourceID( EPhoneInfoBTAccActivated ) ); |
245 |
217 |
246 globalNoteParam.SetTextResourceId( |
218 TPhoneCmdParamNote noteParam; |
247 CPhoneMainResourceResolver::Instance()-> |
219 noteParam.SetType( EPhoneNoteConfirmation ); |
248 ResolveResourceID( EPhoneInfoBTAccActivated ) ); |
220 noteParam.SetText( *buf ); |
249 |
221 |
250 // Display note |
222 // Display note |
251 iViewCommandHandle->ExecuteCommandL( |
223 iViewCommandHandle->ExecuteCommandL( EPhoneViewShowNote, ¬eParam ); |
252 EPhoneViewShowGlobalNote, &globalNoteParam ); |
224 CleanupStack::PopAndDestroy( buf ); |
253 } |
225 } |
254 |
226 |
255 // --------------------------------------------------------- |
227 // --------------------------------------------------------- |
256 // CPhoneAccessoryBTHandler::DoSetHandsfreeModeL |
228 // CPhoneAccessoryBTHandler::DoSetHandsfreeModeL |
257 // --------------------------------------------------------- |
229 // --------------------------------------------------------- |