16 */ |
16 */ |
17 |
17 |
18 |
18 |
19 // INCLUDE FILES |
19 // INCLUDE FILES |
20 |
20 |
21 #include <stringloader.h> // Localisation stringloader |
|
22 #include <BTNotif.rsg> // Own resources |
21 #include <BTNotif.rsg> // Own resources |
23 #include <btnotif.h> |
22 #include <btnotif.h> |
|
23 #include <bluetoothuiutil.h> |
24 #include "btnotiflock.h" |
24 #include "btnotiflock.h" |
25 #include "btnpaireddevsettNotifier.h" // Own class definition |
25 #include "btnpaireddevsettnotifier.h" // Own class definition |
26 #include "BTNotifDebug.h" // Debugging macros |
26 #include "btNotifDebug.h" // Debugging macros |
27 #include <bluetooth/hci/hcierrors.h> |
27 #include <bluetooth/hci/hcierrors.h> |
28 #include "btnotifnameutils.h" |
28 #include "btnotifnameutils.h" |
29 |
29 |
30 #include <secondarydisplay/BTnotifSecondaryDisplayAPI.h> |
30 #include <SecondaryDisplay/BTnotifSecondaryDisplayAPI.h> |
31 |
31 |
32 #include <e32cmn.h> |
32 #include <e32cmn.h> |
33 #include <aknmediatorfacade.h> // CoverUI |
33 #include <AknMediatorFacade.h> // CoverUI |
34 |
34 |
35 #ifdef __SERIES60_HELP |
35 #ifdef __SERIES60_HELP |
36 #include <HLPLCH.H> |
36 #include <hlplch.h> |
37 #include <csxhelp/bt.hlp.hrh> // The bt hrh info is needed, for help launching |
37 #include <csxhelp/bt.hlp.hrh> // The bt hrh info is needed, for help launching |
38 #endif |
38 #endif |
39 |
39 |
40 // ================= MEMBER FUNCTIONS ======================= |
40 // ================= MEMBER FUNCTIONS ======================= |
41 |
41 |
125 { |
125 { |
126 FLOG(_L("[BTNOTIF]\t CBTPairedDevSettNotifier::HandleGetDeviceCompletedL >>")); |
126 FLOG(_L("[BTNOTIF]\t CBTPairedDevSettNotifier::HandleGetDeviceCompletedL >>")); |
127 TBTDeviceName name; |
127 TBTDeviceName name; |
128 BtNotifNameUtils::GetDeviceDisplayName(name, iDevice); |
128 BtNotifNameUtils::GetDeviceDisplayName(name, iDevice); |
129 |
129 |
|
130 RBuf stringholder; |
|
131 stringholder.CleanupClosePushL(); |
|
132 |
130 // 1. Show pairing status note |
133 // 1. Show pairing status note |
131 FTRACE(FPrint(_L("[BTNOTIF]\t CBTPairedDevSettNotifier iPairingStatus: %d"), iPairingStatus)); |
134 FTRACE(FPrint(_L("[BTNOTIF]\t CBTPairedDevSettNotifier iPairingStatus: %d"), iPairingStatus)); |
132 TInt resourceId = ProcessPairingErrorCode( iPairingStatus ); |
135 TInt resourceId = ProcessPairingErrorCode( iPairingStatus ); |
133 HBufC* stringholder = StringLoader::LoadLC( resourceId ); |
136 BluetoothUiUtil::LoadResourceAndSubstringL( stringholder, resourceId, name, 0 ); |
134 _LIT(PU,"%U"); |
137 |
135 if( stringholder->Find(PU) != KErrNotFound) |
|
136 { |
|
137 CleanupStack::PopAndDestroy( stringholder ); |
|
138 stringholder = StringLoader::LoadLC( resourceId, name ); |
|
139 } |
|
140 |
|
141 if (!iPairingStatus) |
138 if (!iPairingStatus) |
142 { |
139 { |
143 iNotifUiUtil->ShowConfirmationNoteL( ETrue, *stringholder, iSecondaryDisplayCommand, name ); |
140 iNotifUiUtil->ShowConfirmationNoteL( ETrue, stringholder, iSecondaryDisplayCommand, name ); |
144 } |
141 } |
145 else |
142 else |
146 { |
143 { |
147 iNotifUiUtil->ShowErrorNoteL( ETrue, *stringholder, iSecondaryDisplayCommand, name ); |
144 iNotifUiUtil->ShowErrorNoteL( EFalse, stringholder, iSecondaryDisplayCommand, name ); |
148 } |
145 } |
149 CleanupStack::PopAndDestroy( stringholder ); // stringholder |
146 CleanupStack::PopAndDestroy( &stringholder ); |
150 |
147 |
151 if( iPairingStatus || (iDevice && iDevice->GlobalSecurity().Banned() ) ) |
148 if( iPairingStatus || (iDevice && iDevice->GlobalSecurity().Banned() ) ) |
152 { |
149 { |
153 TBTNotifLockPublish::DeleteNotifLocks( |
150 TBTNotifLockPublish::DeleteNotifLocks( |
154 EBTNotiferLockPairedDeviceSetting, iDevice->BDAddr() ); |
151 EBTNotiferLockPairedDeviceSetting, iDevice->BDAddr() ); |