20 #include <avkon.hrh> // AVKON components |
20 #include <avkon.hrh> // AVKON components |
21 #include <AknIconArray.h> |
21 #include <AknIconArray.h> |
22 #include <aknlists.h> |
22 #include <aknlists.h> |
23 #include <aknPopup.h> |
23 #include <aknPopup.h> |
24 #include <avkon.mbg> |
24 #include <avkon.mbg> |
25 #include <StringLoader.h> // Localisation stringloader |
|
26 #include <wlaninternalpskeys.h> // For WLAN state checking |
25 #include <wlaninternalpskeys.h> // For WLAN state checking |
27 #include <ctsydomainpskeys.h> |
26 #include <ctsydomainpskeys.h> |
28 #include <AknNotiferAppServerApplication.h> |
27 #include <AknNotiferAppServerApplication.h> |
29 #include <barsread.h> // Resource reader |
28 #include <barsread.h> // Resource reader |
30 #include <BTNotif.rsg> // Own resources |
29 #include <BTNotif.rsg> // Own resources |
31 #include <bt_subscribe.h> |
30 #include <bt_subscribe.h> |
32 #include <btnotif.mbg> |
31 #include <btnotif.mbg> |
33 #include <wlanplugin.mbg> // Borrow WLan signal strenth bar to show RSSI |
32 #include <wlanplugin.mbg> // Borrow WLan signal strenth bar to show RSSI |
34 #include <devui_const.h> |
33 #include <devui_const.h> |
35 #include <btengutil.h> |
34 #include <btengutil.h> |
|
35 #include <bluetoothuiutil.h> |
36 #include "btninqui.h" // Own class definition |
36 #include "btninqui.h" // Own class definition |
37 #include "btNotifDebug.h" // Debugging macros |
37 #include "btNotifDebug.h" // Debugging macros |
38 #include "btnotifnameutils.h" |
38 #include "btnotifnameutils.h" |
39 |
39 |
40 |
40 |
1045 // CBTInqUI::QueryUnblockDeviceL |
1045 // CBTInqUI::QueryUnblockDeviceL |
1046 //---------------------------------------------------------- |
1046 //---------------------------------------------------------- |
1047 TInt CBTInqUI::QueryUnblockDeviceL(CBTDevice* aDevice) |
1047 TInt CBTInqUI::QueryUnblockDeviceL(CBTDevice* aDevice) |
1048 { |
1048 { |
1049 FLOG(_L("[BTNOTIF]\t CBTInqUI::QueryUnblockDeviceL()")); |
1049 FLOG(_L("[BTNOTIF]\t CBTInqUI::QueryUnblockDeviceL()")); |
1050 |
1050 RBuf stringholder; |
1051 HBufC* stringholder = NULL; |
1051 stringholder.CleanupClosePushL(); |
1052 |
1052 TBTDeviceName name; |
1053 if (aDevice->IsValidFriendlyName()) |
1053 BtNotifNameUtils::GetDeviceDisplayName( name, aDevice ); |
1054 { |
1054 BluetoothUiUtil::LoadResourceAndSubstringL( |
1055 stringholder = StringLoader::LoadLC(R_BT_UNBLOCK_DEVICE, aDevice->FriendlyName()); |
1055 stringholder, R_BT_UNBLOCK_DEVICE, name, 0 ); |
1056 } |
|
1057 else |
|
1058 { |
|
1059 stringholder = StringLoader::LoadLC(R_BT_UNBLOCK_DEVICE, BTDeviceNameConverter::ToUnicodeL(aDevice->DeviceName())); |
|
1060 } |
|
1061 |
|
1062 TBTDeviceName name(KNullDesC); |
|
1063 TInt keypress(0); |
1056 TInt keypress(0); |
1064 keypress = iUiUtil->ShowQueryL( *stringholder, R_BT_UNBLOCK_QUERY, |
1057 keypress = iUiUtil->ShowQueryL( stringholder, R_BT_UNBLOCK_QUERY, |
1065 ECmdBTnotifUnavailable, name, CAknQueryDialog::EConfirmationTone ); |
1058 ECmdBTnotifUnavailable, name, CAknQueryDialog::EConfirmationTone ); |
1066 CleanupStack::PopAndDestroy(); // stringholder |
1059 CleanupStack::PopAndDestroy(); // stringholder |
1067 FTRACE(FPrint(_L("[BTNOTIF]\t CBTInqUI::QueryUnblockDeviceL() keypress= %d"),keypress)); |
1060 FTRACE(FPrint(_L("[BTNOTIF]\t CBTInqUI::QueryUnblockDeviceL() keypress= %d"),keypress)); |
1068 |
1061 |
1069 return keypress; |
1062 return keypress; |