201025
authorhgs
Mon, 12 Jul 2010 18:51:05 +0300
changeset 42 b72428996822
parent 32 19bd632b5100
child 43 7d241e669870
201025
bluetoothappprofiles/avrcp/mediabrowseapi/group/bld.inf
bluetoothappprofiles/avrcp/nowplayingapi/group/bld.inf
bluetoothappprofiles/avrcp/remconbeareravrcp/inc/avrcpincomingcommandhandler.h
bluetoothappprofiles/avrcp/remconbeareravrcp/inc/avrcpoutgoingcommandhandler.h
bluetoothappprofiles/avrcp/remconbeareravrcp/inc/avrcpremotedevice.h
bluetoothappprofiles/avrcp/remconbeareravrcp/inc/avrcputils.h
bluetoothappprofiles/avrcp/remconbeareravrcp/inc/controlbearer.h
bluetoothappprofiles/avrcp/remconbeareravrcp/inc/passthroughhelper.h
bluetoothappprofiles/avrcp/remconbeareravrcp/inc/remconcommandinterface.h
bluetoothappprofiles/avrcp/remconbeareravrcp/src/avrcpMetadataTransfer.cpp
bluetoothappprofiles/avrcp/remconbeareravrcp/src/avrcpincomingcommandhandler.cpp
bluetoothappprofiles/avrcp/remconbeareravrcp/src/avrcpoutgoingcommandhandler.cpp
bluetoothappprofiles/avrcp/remconbeareravrcp/src/avrcpremotedevice.cpp
bluetoothappprofiles/avrcp/remconbeareravrcp/src/avrcpsdputils.cpp
bluetoothappprofiles/avrcp/remconbeareravrcp/src/passthroughhelper.cpp
bluetoothappprofiles/avrcp/remconbeareravrcp/src/remconbeareravrcp.cpp
bluetoothengine/btaudioman/src/basrvmain.cpp
bluetoothengine/btaudiostreamer/tsrc/BtAudioStreamerApiTest/conf/BtAudioStreamerApiTest.cfg
bluetoothengine/bteng/btbearer/inc/btpluginnotifier.h
bluetoothengine/bteng/btbearer/src/btpluginnotifier.cpp
bluetoothengine/bteng/conf/CI_bteng.confml
bluetoothengine/bteng/conf/bteng.confml
bluetoothengine/bteng/group/bld.inf
bluetoothengine/bteng/group/btbearer.mmp
bluetoothengine/bteng/group/bteng.mmp
bluetoothengine/bteng/inc/btengincpair.h
bluetoothengine/bteng/inc/btengotgpair.h
bluetoothengine/bteng/inc/btengpairbase.h
bluetoothengine/bteng/inc/btengpairman.h
bluetoothengine/bteng/inc/btengsrvsettingsmgr.h
bluetoothengine/bteng/inc/btotgpairpub.inl
bluetoothengine/bteng/src/btengincpair.cpp
bluetoothengine/bteng/src/btengotgpair.cpp
bluetoothengine/bteng/src/btengpairbase.cpp
bluetoothengine/bteng/src/btengpairman.cpp
bluetoothengine/bteng/src/btengserver.cpp
bluetoothengine/bteng/src/btengsrvsettingsmgr.cpp
bluetoothengine/bthid/bthidkbdsettings/inc/bthidsettingcontainer.h
bluetoothengine/bthid/bthidkbdsettings/inc/bthidsettinglist.h
bluetoothengine/bthid/bthidkbdsettings/inc/bthidsettingview.h
bluetoothengine/bthid/bthidkbdsettings/inc/btkeyenumtextsettingitem.h
bluetoothengine/bthid/bthidkbdsettings/src/bthidpluginimplementationtable.cpp
bluetoothengine/bthid/bthidkbdsettings/src/bthidsettingcontainer.cpp
bluetoothengine/bthid/bthidkbdsettings/src/bthidsettingview.cpp
bluetoothengine/bthid/bthidkbdsettings/src/btkeyenumtextsettingitem.cpp
bluetoothengine/bthid/bthidkbdsettings/src/btkeysettinglist.cpp
bluetoothengine/bthid/bthidserver/src/bthidserver.cpp
bluetoothengine/bthid/common/inc/bthidPsKey.h
bluetoothengine/bthid/keyboard/group/keyboard.mmp
bluetoothengine/bthid/keyboard/inc/keyboard.h
bluetoothengine/bthid/keyboard/src/keyboard.cpp
bluetoothengine/bthid/mouse/PaintCursor/src/paintcursorappview.cpp
bluetoothengine/bthid/mouse/Sesame_client/src/clientimagecommander.cpp
bluetoothengine/bthid/mouse/Sesame_server/bwins/btcursor_serveru.def
bluetoothengine/bthid/mouse/Sesame_server/eabi/btcursor_serveru.def
bluetoothengine/bthid/mouse/hidmousedriver/group/mouse.mmp
bluetoothengine/bthid/mouse/hidmousedriver/inc/mouse.h
bluetoothengine/bthid/mouse/hidmousedriver/src/mouse.cpp
bluetoothengine/btindicator/btindicator.pro
bluetoothengine/btindicator/inc/btindicator.h
bluetoothengine/btindicator/inc/btindicatorconstants.h
bluetoothengine/btindicator/inc/btindicatorplugin.h
bluetoothengine/btindicator/rom/btindicator.iby
bluetoothengine/btindicator/src/btindicator.cpp
bluetoothengine/btindicator/src/btindicatorplugin.cpp
bluetoothengine/btmac/inc/btmonocmdhandler/btmc_defs.h
bluetoothengine/btnotif/bmarm/Btnotifu.def
bluetoothengine/btnotif/btdevicedialogplugin/btdevicedialogplugin.pro
bluetoothengine/btnotif/btdevicedialogplugin/btdevicedialogplugin.qrc
bluetoothengine/btnotif/btdevicedialogplugin/docml/bt-device-search-dialog.docml
bluetoothengine/btnotif/btdevicedialogplugin/docml/bt-more-devices-dialog.docml
bluetoothengine/btnotif/btdevicedialogplugin/docml/bt-receive-auth-dialog.docml
bluetoothengine/btnotif/btdevicedialogplugin/docml/bt-recv-progress-dialog.docml
bluetoothengine/btnotif/btdevicedialogplugin/docml/bt-send-dialog.docml
bluetoothengine/btnotif/btdevicedialogplugin/inc/btdevicedialognotifwidget.h
bluetoothengine/btnotif/btdevicedialogplugin/inc/btdevicedialogplugin.h
bluetoothengine/btnotif/btdevicedialogplugin/inc/btdevicedialogrecvquerywidget.h
bluetoothengine/btnotif/btdevicedialogplugin/inc/btdevicesearchdialogwidget.h
bluetoothengine/btnotif/btdevicedialogplugin/inc/btmoredevicesdialogwidget.h
bluetoothengine/btnotif/btdevicedialogplugin/inc/btrecvprgrsdialogwidget.h
bluetoothengine/btnotif/btdevicedialogplugin/inc/btsenddialogwidget.h
bluetoothengine/btnotif/btdevicedialogplugin/src/btdevicedialoginputwidget.cpp
bluetoothengine/btnotif/btdevicedialogplugin/src/btdevicedialognotifwidget.cpp
bluetoothengine/btnotif/btdevicedialogplugin/src/btdevicedialogplugin.cpp
bluetoothengine/btnotif/btdevicedialogplugin/src/btdevicedialogquerywidget.cpp
bluetoothengine/btnotif/btdevicedialogplugin/src/btdevicedialogrecvquerywidget.cpp
bluetoothengine/btnotif/btdevicedialogplugin/src/btdevicesearchdialogwidget.cpp
bluetoothengine/btnotif/btdevicedialogplugin/src/btmoredevicesdialogwidget.cpp
bluetoothengine/btnotif/btdevicedialogplugin/src/btrecvprgrsdialogwidget.cpp
bluetoothengine/btnotif/btdevicedialogplugin/src/btsenddialogwidget.cpp
bluetoothengine/btnotif/btnotifsrv/inc/btnotifbasepairinghandler.h
bluetoothengine/btnotif/btnotifsrv/inc/btnotifconnectiontracker.h
bluetoothengine/btnotif/btnotifsrv/inc/btnotifincomingpairinghandler.h
bluetoothengine/btnotif/btnotifsrv/inc/btnotifoutgoingpairinghandler.h
bluetoothengine/btnotif/btnotifsrv/inc/btnotifpairingmanager.h
bluetoothengine/btnotif/btnotifsrv/inc/btnotifpairnotifier.h
bluetoothengine/btnotif/btnotifsrv/inc/btnotifsecuritymanager.h
bluetoothengine/btnotif/btnotifsrv/inc/btnotifserviceauthorizer.h
bluetoothengine/btnotif/btnotifsrv/inc/btnotifutil.h
bluetoothengine/btnotif/btnotifsrv/src/bluetoothnotification.cpp
bluetoothengine/btnotif/btnotifsrv/src/btnotifbasepairinghandler.cpp
bluetoothengine/btnotif/btnotifsrv/src/btnotifconnectiontracker.cpp
bluetoothengine/btnotif/btnotifsrv/src/btnotifdeviceselector.cpp
bluetoothengine/btnotif/btnotifsrv/src/btnotificationmanager.cpp
bluetoothengine/btnotif/btnotifsrv/src/btnotifincomingpairinghandler.cpp
bluetoothengine/btnotif/btnotifsrv/src/btnotifoutgoingpairinghandler.cpp
bluetoothengine/btnotif/btnotifsrv/src/btnotifpairingmanager.cpp
bluetoothengine/btnotif/btnotifsrv/src/btnotifpairnotifier.cpp
bluetoothengine/btnotif/btnotifsrv/src/btnotifsecuritymanager.cpp
bluetoothengine/btnotif/btnotifsrv/src/btnotifserver.cpp
bluetoothengine/btnotif/btnotifsrv/src/btnotifserviceauthorizer.cpp
bluetoothengine/btnotif/btnotifsrv/src/btnotifsession.cpp
bluetoothengine/btnotif/btnotifsrv/src/btnotifutil.cpp
bluetoothengine/btnotif/bwins/Btnotifu.def
bluetoothengine/btnotif/data/BTNotif.rss
bluetoothengine/btnotif/eabi/BTNotifu.DEF
bluetoothengine/btnotif/ecom/101FD68F.rss
bluetoothengine/btnotif/ecom/BtnotifWrapper.cpp
bluetoothengine/btnotif/ecom/BtnotifWrapper.mmp
bluetoothengine/btnotif/group/BTNotif.mmp
bluetoothengine/btnotif/group/btnotif_icons_dc.mk
bluetoothengine/btnotif/group/btnotifsrv.mmp
bluetoothengine/btnotif/inc/BTNGenericInfoNotifier.h
bluetoothengine/btnotif/inc/BTNGenericQueryNotifier.h
bluetoothengine/btnotif/inc/bluetoothdevicedialogs.h
bluetoothengine/btnotif/inc/btNotifDebug.h
bluetoothengine/btnotif/inc/btnauthnotifier.h
bluetoothengine/btnotif/inc/btnenterpriseitsecurityinfonotifier.h
bluetoothengine/btnotif/inc/btninqnotifier.h
bluetoothengine/btnotif/inc/btninqui.h
bluetoothengine/btnotif/inc/btnobexpinnotifier.h
bluetoothengine/btnotif/inc/btnotif.hrh
bluetoothengine/btnotif/inc/btnotifactive.h
bluetoothengine/btnotif/inc/btnotifactive.inl
bluetoothengine/btnotif/inc/btnotifier.h
bluetoothengine/btnotif/inc/btnotiflock.h
bluetoothengine/btnotif/inc/btnotiflock.inl
bluetoothengine/btnotif/inc/btnotifnameutils.h
bluetoothengine/btnotif/inc/btnotifpanic.h
bluetoothengine/btnotif/inc/btnotifuiutil.h
bluetoothengine/btnotif/inc/btnpaireddevsettnotifier.h
bluetoothengine/btnotif/inc/btnpairnotifier.h
bluetoothengine/btnotif/inc/btnpbappinnotifier.h
bluetoothengine/btnotif/inc/btnpinnotifier.h
bluetoothengine/btnotif/inc/btnpwrnotifier.h
bluetoothengine/btnotif/inc/btnssppasskeyentrynotifier.h
bluetoothengine/btnotif/inc/btnumcmpnotifier.h
bluetoothengine/btnotif/inc/btuserconfnotifier.h
bluetoothengine/btnotif/inc/devui_const.h
bluetoothengine/btnotif/loc/btnotif.loc
bluetoothengine/btnotif/rom/BtnotifResources.iby
bluetoothengine/btnotif/src/BTNAuthNotifier.cpp
bluetoothengine/btnotif/src/BTNGenericInfoNotifier.cpp
bluetoothengine/btnotif/src/BTNGenericQueryNotifier.cpp
bluetoothengine/btnotif/src/BTNInqNotifier.cpp
bluetoothengine/btnotif/src/BTNInqUI.cpp
bluetoothengine/btnotif/src/BTNInquiAO.cpp
bluetoothengine/btnotif/src/BTNMain.cpp
bluetoothengine/btnotif/src/BTNObexPinNotifier.cpp
bluetoothengine/btnotif/src/BTNPBAPPinNotifier.cpp
bluetoothengine/btnotif/src/BTNPinNotifier.cpp
bluetoothengine/btnotif/src/BTNPwrNotifier.cpp
bluetoothengine/btnotif/src/BTNotifier.cpp
bluetoothengine/btnotif/src/btnenterpriseitsecurityinfonotifier.cpp
bluetoothengine/btnotif/src/btnotifactive.cpp
bluetoothengine/btnotif/src/btnotifnameutils.cpp
bluetoothengine/btnotif/src/btnotifuiutil.cpp
bluetoothengine/btnotif/src/btnpaireddevsettnotifier.cpp
bluetoothengine/btnotif/src/btnpairnotifier.cpp
bluetoothengine/btnotif/src/btnssppasskeyentrynotifier.cpp
bluetoothengine/btnotif/src/btnumcmpnotifier.cpp
bluetoothengine/btnotif/src/btuserconfnotifier.cpp
bluetoothengine/btnotif/tsrc/BtNotifApiTest/Bmarm/BtNotifApiTestU.DEF
bluetoothengine/btnotif/tsrc/BtNotifApiTest/Bwins/BtNotifApiTestU.DEF
bluetoothengine/btnotif/tsrc/BtNotifApiTest/EABI/BtNotifApiTestU.def
bluetoothengine/btnotif/tsrc/BtNotifApiTest/conf/ui_BtNotifApiTest.cfg
bluetoothengine/btnotif/tsrc/BtNotifApiTest/group/BtNotifApiTest.mmp
bluetoothengine/btnotif/tsrc/BtNotifApiTest/group/BtNotifApiTest.pkg
bluetoothengine/btnotif/tsrc/BtNotifApiTest/group/BtNotifApiTest_phone.pkg
bluetoothengine/btnotif/tsrc/BtNotifApiTest/group/bld.inf
bluetoothengine/btnotif/tsrc/BtNotifApiTest/group/build_sis.bat
bluetoothengine/btnotif/tsrc/BtNotifApiTest/group/build_sis_phone.bat
bluetoothengine/btnotif/tsrc/BtNotifApiTest/inc/BtEngDevManObserver.h
bluetoothengine/btnotif/tsrc/BtNotifApiTest/inc/BtNotifApiTest.h
bluetoothengine/btnotif/tsrc/BtNotifApiTest/inc/BtSettingsObserver.h
bluetoothengine/btnotif/tsrc/BtNotifApiTest/init/BtNotifApiTest.ini
bluetoothengine/btnotif/tsrc/BtNotifApiTest/init/BtNotifApiTest_phone.ini
bluetoothengine/btnotif/tsrc/BtNotifApiTest/src/BtEngDevManObserver.cpp
bluetoothengine/btnotif/tsrc/BtNotifApiTest/src/BtNotifApiTest.cpp
bluetoothengine/btnotif/tsrc/BtNotifApiTest/src/BtNotifApiTestBlocks.cpp
bluetoothengine/btnotif/tsrc/BtNotifApiTest/src/BtSettingsObserver.cpp
bluetoothengine/btserviceutil/bwins/btserviceutilu.def
bluetoothengine/btserviceutil/eabi/btserviceutilu.def
bluetoothengine/btserviceutil/export/btdevextension.h
bluetoothengine/btserviceutil/src/btdevextension.cpp
bluetoothengine/btui/Ecom/data/1020742B.rss
bluetoothengine/btui/Ecom/data/BtuiViewResources.rss
bluetoothengine/btui/Ecom/group/BtuiPlugin.mmp
bluetoothengine/btui/Ecom/group/bld.inf
bluetoothengine/btui/Ecom/inc/BTUIActive.h
bluetoothengine/btui/Ecom/inc/BTUIBlockedDevicesView.h
bluetoothengine/btui/Ecom/inc/BTUIDeviceContainer.h
bluetoothengine/btui/Ecom/inc/BTUIKeyWatcher.h
bluetoothengine/btui/Ecom/inc/BTUIListedDevicesView.h
bluetoothengine/btui/Ecom/inc/BTUIMainContainer.h
bluetoothengine/btui/Ecom/inc/BTUIMainView.h
bluetoothengine/btui/Ecom/inc/BTUIPairedDevicesView.h
bluetoothengine/btui/Ecom/inc/BTUIRegistryWatcher.h
bluetoothengine/btui/Ecom/inc/BTUIViewsCommonUtils.h
bluetoothengine/btui/Ecom/inc/bluetoothuiutil.h
bluetoothengine/btui/Ecom/inc/bluetoothuiutil.inl
bluetoothengine/btui/Ecom/inc/btuipluginman.h
bluetoothengine/btui/Ecom/src/BTUIActive.cpp
bluetoothengine/btui/Ecom/src/BTUIBlockedDevicesView.cpp
bluetoothengine/btui/Ecom/src/BTUIDeviceContainer.cpp
bluetoothengine/btui/Ecom/src/BTUIKeyWatcher.cpp
bluetoothengine/btui/Ecom/src/BTUIMainContainer.cpp
bluetoothengine/btui/Ecom/src/BTUIMainView.cpp
bluetoothengine/btui/Ecom/src/BTUINonSap.cpp
bluetoothengine/btui/Ecom/src/BTUIPairedDevicesView.cpp
bluetoothengine/btui/Ecom/src/BTUIRegistryWatcher.cpp
bluetoothengine/btui/Ecom/src/BTUISap.cpp
bluetoothengine/btui/Ecom/src/BTUIViewsCommonUtils.cpp
bluetoothengine/btui/Ecom/src/BtuiPluginImplementationTable.cpp
bluetoothengine/btui/Ecom/src/btuipluginman.cpp
bluetoothengine/btui/aif/BTUI_caption.rss
bluetoothengine/btui/aif/BTUIaif.rss
bluetoothengine/btui/btcpplugin/btcpplugin.cpp
bluetoothengine/btui/btcpplugin/btcpplugin.h
bluetoothengine/btui/btcpplugin/btcpplugin.pro
bluetoothengine/btui/btcpplugin/btcpplugin.qrc
bluetoothengine/btui/btcpplugin/btcpuibaseview.cpp
bluetoothengine/btui/btcpplugin/btcpuibaseview.h
bluetoothengine/btui/btcpplugin/btcpuidevicedetail.cpp
bluetoothengine/btui/btcpplugin/btcpuidevicedetail.h
bluetoothengine/btui/btcpplugin/btcpuidevicedetailsview.cpp
bluetoothengine/btui/btcpplugin/btcpuidevicedetailsview.h
bluetoothengine/btui/btcpplugin/btcpuideviceview.cpp
bluetoothengine/btui/btcpplugin/btcpuideviceview.h
bluetoothengine/btui/btcpplugin/btcpuimainlistviewitem.cpp
bluetoothengine/btui/btcpplugin/btcpuimainlistviewitem.h
bluetoothengine/btui/btcpplugin/btcpuimainview.cpp
bluetoothengine/btui/btcpplugin/btcpuimainview.h
bluetoothengine/btui/btcpplugin/btcpuisearchlistviewitem.cpp
bluetoothengine/btui/btcpplugin/btcpuisearchlistviewitem.h
bluetoothengine/btui/btcpplugin/btcpuisearchview.cpp
bluetoothengine/btui/btcpplugin/btcpuisearchview.h
bluetoothengine/btui/btcpplugin/btcpuisettingitem.cpp
bluetoothengine/btui/btcpplugin/btcpuisettingitem.h
bluetoothengine/btui/btcpplugin/btuiviewutil.h
bluetoothengine/btui/btcpplugin/docml/bt-advanced-view.docml
bluetoothengine/btui/btcpplugin/docml/bt-device-details-view.docml
bluetoothengine/btui/btcpplugin/docml/bt-device-view.docml
bluetoothengine/btui/btcpplugin/docml/bt-main-view.docml
bluetoothengine/btui/btcpplugin/docml/bt-search-view.docml
bluetoothengine/btui/btdevsettingframework/btdevsettingframework.pro
bluetoothengine/btui/btdevsettingframework/bwins/btdevsettingframeworku.def
bluetoothengine/btui/btdevsettingframework/eabi/btdevsettingframeworku.def
bluetoothengine/btui/btdevsettingframework/rom/btdevsettingframework.iby
bluetoothengine/btui/btdevsettingframework/src/btabstractdevsetting.cpp
bluetoothengine/btui/btdevsettingframework/src/btdevsettingpluginloader.cpp
bluetoothengine/btui/btui.pro
bluetoothengine/btui/btuidelegate/btabstractdelegate.cpp
bluetoothengine/btui/btuidelegate/btabstractdelegate.h
bluetoothengine/btui/btuidelegate/btdelegateInquiry.cpp
bluetoothengine/btui/btuidelegate/btdelegateInquiry.h
bluetoothengine/btui/btuidelegate/btdelegateconnect.cpp
bluetoothengine/btui/btuidelegate/btdelegateconnect.h
bluetoothengine/btui/btuidelegate/btdelegateconsts.h
bluetoothengine/btui/btuidelegate/btdelegatedevsecurity.cpp
bluetoothengine/btui/btuidelegate/btdelegatedevsecurity.h
bluetoothengine/btui/btuidelegate/btdelegatedisconnect.cpp
bluetoothengine/btui/btuidelegate/btdelegatedisconnect.h
bluetoothengine/btui/btuidelegate/btdelegatefactory.cpp
bluetoothengine/btui/btuidelegate/btdelegateinquiry.cpp
bluetoothengine/btui/btuidelegate/btdelegateinquiry.h
bluetoothengine/btui/btuidelegate/btdelegatepair.cpp
bluetoothengine/btui/btuidelegate/btdelegatepair.h
bluetoothengine/btui/btuidelegate/btdelegatepower.cpp
bluetoothengine/btui/btuidelegate/btdelegatepower.h
bluetoothengine/btui/btuidelegate/btdelegateremotedevname.cpp
bluetoothengine/btui/btuidelegate/btdelegateremotedevname.h
bluetoothengine/btui/btuidelegate/btdelegatevisibility.cpp
bluetoothengine/btui/btuidelegate/btdelegatevisibility.h
bluetoothengine/btui/btuidelegate/btuidelegate.pro
bluetoothengine/btui/btuidelegate/bwins/btuidelegateu.def
bluetoothengine/btui/btuidelegate/docml/pairwaitingdialog.docml
bluetoothengine/btui/btuidelegate/eabi/btuidelegateu.def
bluetoothengine/btui/btuimodel/btdevicedata.cpp
bluetoothengine/btui/btuimodel/btdevicedata.h
bluetoothengine/btui/btuimodel/btdevicemodel.cpp
bluetoothengine/btui/btuimodel/btdevicemodel_p.cpp
bluetoothengine/btui/btuimodel/btdevicemodel_p.h
bluetoothengine/btui/btuimodel/btlocalsetting.cpp
bluetoothengine/btui/btuimodel/btlocalsetting.h
bluetoothengine/btui/btuimodel/btsettingmodel.cpp
bluetoothengine/btui/btuimodel/btsettingmodel_p.cpp
bluetoothengine/btui/btuimodel/btsettingmodel_p.h
bluetoothengine/btui/btuimodel/btuimodel.pro
bluetoothengine/btui/btuimodel/btuimodelsortfilter.cpp
bluetoothengine/btui/btuimodel/bwins/btuimodelu.def
bluetoothengine/btui/btuimodel/eabi/btuimodelu.def
bluetoothengine/btui/bwins/btuidelegateu.def
bluetoothengine/btui/bwins/btuimodelu.def
bluetoothengine/btui/data/BTUI.rss
bluetoothengine/btui/data/Btui_reg.rss
bluetoothengine/btui/devmodel/BWINS/btdevmodelU.DEF
bluetoothengine/btui/devmodel/eabi/btdevmodelu.DEF
bluetoothengine/btui/devmodel/group/bld.inf
bluetoothengine/btui/devmodel/group/btdevmodel.mmp
bluetoothengine/btui/devmodel/inc/btblockedmodel.h
bluetoothengine/btui/devmodel/inc/btdevmodel.h
bluetoothengine/btui/devmodel/inc/btdevmodelbase.h
bluetoothengine/btui/devmodel/inc/btpairedmodel.h
bluetoothengine/btui/devmodel/inc/btregistryobserver.h
bluetoothengine/btui/devmodel/src/btblockedmodel.cpp
bluetoothengine/btui/devmodel/src/btdevice.cpp
bluetoothengine/btui/devmodel/src/btdevmodel.cpp
bluetoothengine/btui/devmodel/src/btdevmodelbase.cpp
bluetoothengine/btui/devmodel/src/btpairedmodel.cpp
bluetoothengine/btui/devmodel/src/btregistryobserver.cpp
bluetoothengine/btui/eabi/btuidelegateu.def
bluetoothengine/btui/eabi/btuimodelu.def
bluetoothengine/btui/group/BTUI.mmp
bluetoothengine/btui/group/bld.inf
bluetoothengine/btui/group/btui_Icons_aif_bitmaps_dc.mk
bluetoothengine/btui/group/btui_Icons_aif_scalable_dc.mk
bluetoothengine/btui/group/btui_icons_dc.mk
bluetoothengine/btui/help/data/xhtml.zip
bluetoothengine/btui/help/group/bld.inf
bluetoothengine/btui/help/inc/bt.hlp.hrh
bluetoothengine/btui/help/rom/btuihelps_variant.iby
bluetoothengine/btui/inc/BTUIApp.h
bluetoothengine/btui/inc/BTUIAppUi.h
bluetoothengine/btui/inc/BTUIDocument.h
bluetoothengine/btui/inc/BtuiPluginInterface.h
bluetoothengine/btui/inc/BtuiPluginInterface.inl
bluetoothengine/btui/inc/bluetoothtrace.h
bluetoothengine/btui/inc/bluetoothuitrace.h
bluetoothengine/btui/inc/btdevicemodel.h
bluetoothengine/btui/inc/btqtconstants.h
bluetoothengine/btui/inc/btsettingmodel.h
bluetoothengine/btui/inc/btui.h
bluetoothengine/btui/inc/btui.hrh
bluetoothengine/btui/inc/btuidevtypemap.h
bluetoothengine/btui/inc/btuiiconutil.h
bluetoothengine/btui/inc/btuiutil.h
bluetoothengine/btui/inc/debug.h
bluetoothengine/btui/inc/debugconfig.h
bluetoothengine/btui/inc/prjconfig.h
bluetoothengine/btui/inc/traceconfig.h
bluetoothengine/btui/loc/btui.loc
bluetoothengine/btui/rom/BtuiResources.iby
bluetoothengine/btui/rom/btui_resources.iby
bluetoothengine/btui/src/BTUIApp.cpp
bluetoothengine/btui/src/BTUIAppUi.cpp
bluetoothengine/btui/src/BTUIDocument.cpp
bluetoothengine/conf/TestFramework.ini
bluetoothengine/group/bld.inf
btobexprofiles/obexreceiveservices/bip/group/obexservicebip.mmp
btobexprofiles/obexreceiveservices/bip/inc/BIPController.h
btobexprofiles/obexreceiveservices/bip/inc/BIPXMLWriter.h
btobexprofiles/obexreceiveservices/bip/src/BIPController.cpp
btobexprofiles/obexreceiveservices/btmsgviewer/btmsgviewer.pro
btobexprofiles/obexreceiveservices/btmsgviewer/inc/btmsgviewer.h
btobexprofiles/obexreceiveservices/btmsgviewer/inc/btmsgviewerutils.h
btobexprofiles/obexreceiveservices/btmsgviewer/rom/btmsgviewer.iby
btobexprofiles/obexreceiveservices/btmsgviewer/service_conf.xml
btobexprofiles/obexreceiveservices/btmsgviewer/src/btmsgviewer.cpp
btobexprofiles/obexreceiveservices/btmsgviewer/src/btmsgviewerutils.cpp
btobexprofiles/obexreceiveservices/btmsgviewer/src/main.cpp
btobexprofiles/obexreceiveservices/mtmuibluetooth/data/btmtmui.rss
btobexprofiles/obexreceiveservices/mtmuibluetooth/group/btmtmui.mmp
btobexprofiles/obexreceiveservices/mtmuibluetooth/inc/btmtmui.h
btobexprofiles/obexreceiveservices/mtmuibluetooth/inc/btmtmuidata.h
btobexprofiles/obexreceiveservices/mtmuibluetooth/src/btmtmui.cpp
btobexprofiles/obexreceiveservices/mtmuibluetooth/src/btmtmuidata.cpp
btobexprofiles/obexreceiveservices/mtmuiinfrared/data/irmtmui.rss
btobexprofiles/obexreceiveservices/mtmuiinfrared/inc/irmtmui.h
btobexprofiles/obexreceiveservices/mtmuiinfrared/inc/irmtmuidata.h
btobexprofiles/obexreceiveservices/mtmuiinfrared/src/irmtmui.cpp
btobexprofiles/obexreceiveservices/mtmuiinfrared/src/irmtmuidata.cpp
btobexprofiles/obexreceiveservices/opp/group/obexserviceopp.mmp
btobexprofiles/obexreceiveservices/opp/inc/oppcontroller.h
btobexprofiles/obexreceiveservices/opp/src/oppcontroller.cpp
btobexprofiles/obexsendservices/group/sendutils.mmp
btobexprofiles/obexsendservices/obexservicesendutils/inc/BTSBIPController.h
btobexprofiles/obexsendservices/obexservicesendutils/inc/BTSBPPController.h
btobexprofiles/obexsendservices/obexservicesendutils/inc/BTSController.h
btobexprofiles/obexsendservices/obexservicesendutils/inc/BTSProgresstimer.h
btobexprofiles/obexsendservices/obexservicesendutils/inc/BTServiceDelayedDestroyer.h
btobexprofiles/obexsendservices/obexservicesendutils/inc/BTServiceStarter.h
btobexprofiles/obexsendservices/obexservicesendutils/src/BTSBIPController.cpp
btobexprofiles/obexsendservices/obexservicesendutils/src/BTSBPPController.cpp
btobexprofiles/obexsendservices/obexservicesendutils/src/BTSController.cpp
btobexprofiles/obexsendservices/obexservicesendutils/src/BTSOPPController.cpp
btobexprofiles/obexsendservices/obexservicesendutils/src/BTSProgresstimer.cpp
btobexprofiles/obexsendservices/obexservicesendutils/src/BTServiceDelayedDestroyer.cpp
btobexprofiles/obexsendservices/obexservicesendutils/src/BTServiceStarter.cpp
btobexprofiles/obexserviceman/group/bld.inf
btobexprofiles/obexserviceman/obexservicemanserver/inc/SrcsServiceManager.h
btobexprofiles/obexserviceman/obexservicemanserver/src/SrcsServiceManager.cpp
btobexprofiles/obexserviceman/obexservicemanserver/src/obexsmmain.cpp
btobexprofiles/obexserviceman/rom/ObexUtils.iby
btobexprofiles/obexserviceman/rom/ObexUtilsResources.iby
btobexprofiles/obexserviceman/utils/bmarm/OBEXUTILSU.DEF
btobexprofiles/obexserviceman/utils/bwins/OBEXUTILSU.DEF
btobexprofiles/obexserviceman/utils/data/Obexutils.hrh
btobexprofiles/obexserviceman/utils/data/Obexutils.rss
btobexprofiles/obexserviceman/utils/eabi/obexutilsu.DEF
btobexprofiles/obexserviceman/utils/group/bld.inf
btobexprofiles/obexserviceman/utils/group/obexutils.mmp
btobexprofiles/obexserviceman/utils/inc/obexutilsdialog.h
btobexprofiles/obexserviceman/utils/inc/obexutilsglobalprogressdialog.h
btobexprofiles/obexserviceman/utils/inc/obexutilslaunchwaiter.h
btobexprofiles/obexserviceman/utils/inc/obexutilsuilayer.h
btobexprofiles/obexserviceman/utils/loc/Obexutils.loc
btobexprofiles/obexserviceman/utils/loc/btdialogs_en_GB.qm
btobexprofiles/obexserviceman/utils/src/obexutilsdialog.cpp
btobexprofiles/obexserviceman/utils/src/obexutilsglobaldialog.cpp
btobexprofiles/obexserviceman/utils/src/obexutilsglobalprogressdialog.cpp
btobexprofiles/obexserviceman/utils/src/obexutilslaunchwaiter.cpp
btobexprofiles/obexserviceman/utils/src/obexutilsmessagehandler.cpp
btobexprofiles/obexserviceman/utils/src/obexutilsuilayer.cpp
btobexprofiles/obexserviceman/utils/src/vMessageHandler.cpp
btservices.pro
btservices_plat/bt_remote_device_setting_api/bt_remote_device_setting_api.metaxml
btservices_plat/bt_remote_device_setting_api/bt_remote_device_setting_api.pri
btservices_plat/bt_remote_device_setting_api/inc/btabstractdevsetting.h
btservices_plat/bt_remote_device_setting_api/inc/btdevsettingglobal.h
btservices_plat/bt_remote_device_setting_api/inc/btdevsettinginterface.h
btservices_plat/bt_remote_device_setting_api/inc/btdevsettingpluginloader.h
btservices_plat/btservices_plat.pro
btservices_plat/obex_service_utils_api/tsrc/src/ObexServAPItestBlocks.cpp
cbsatplugin/atmisccmdplugin/src/cfuncommandhandler.cpp
cbsatplugin/atmisccmdplugin/src/clckcommandhandler.cpp
layers.sysdef.xml
sysdef_1_4_0.dtd
tsrc/public/basic/btengapitest/group/rd-key.pem
tsrc/public/basic/btengapitest/group/rd.cer
tsrc/public/basic/obexservapitest/Bmarm/ObexServAPItestU.DEF
tsrc/public/basic/obexservapitest/Bwins/ObexServAPItestU.DEF
tsrc/public/basic/obexservapitest/EABI/ObexServAPItestU.def
tsrc/public/basic/obexservapitest/group/bld.inf
tsrc/public/basic/obexservapitest/group/obexservapitest.mmp
tsrc/public/basic/obexservapitest/inc/ObexServAPItest.h
tsrc/public/basic/obexservapitest/inc/testlogger.h
tsrc/public/basic/obexservapitest/rom/obexservapitest.iby
tsrc/public/basic/obexservapitest/src/ObexServAPItest.cpp
tsrc/public/basic/obexservapitest/src/ObexServAPItestBlocks.cpp
tsrc/public/basic/obexservapitest/src/testlogger.cpp
--- a/bluetoothappprofiles/avrcp/mediabrowseapi/group/bld.inf	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothappprofiles/avrcp/mediabrowseapi/group/bld.inf	Mon Jul 12 18:51:05 2010 +0300
@@ -40,5 +40,5 @@
 ../public/remconmediabrowsetypes.h SYMBIAN_MW_LAYER_PUBLIC_EXPORT_PATH(remconmediabrowsetypes.h)
 ../public/remconmediabrowsepanic.h SYMBIAN_MW_LAYER_PUBLIC_EXPORT_PATH(remconmediabrowsepanic.h)
 
-../public/remconmediabrowsetargetbase.h	SYMBIAN_MW_LAYER_PLATFORM_EXPORT_PATH(remcon/remconmediabrowsetargetbase.h)
+../public/remconmediabrowsetargetbase.h	SYMBIAN_MW_LAYER_PUBLIC_EXPORT_PATH(remcon/remconmediabrowsetargetbase.h)
 
--- a/bluetoothappprofiles/avrcp/nowplayingapi/group/bld.inf	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothappprofiles/avrcp/nowplayingapi/group/bld.inf	Mon Jul 12 18:51:05 2010 +0300
@@ -30,4 +30,4 @@
 ../public/remcondatabaseunawarenowplayingtarget.h SYMBIAN_MW_LAYER_PUBLIC_EXPORT_PATH(remcondatabaseunawarenowplayingtarget.h)
 ../public/remcondatabaseunawarenowplayingtargetobserver.h SYMBIAN_MW_LAYER_PUBLIC_EXPORT_PATH(remcondatabaseunawarenowplayingtargetobserver.h)
 
-../public/remconnowplayingtargetbase.h SYMBIAN_MW_LAYER_PLATFORM_EXPORT_PATH(remcon/remconnowplayingtargetbase.h)
+../public/remconnowplayingtargetbase.h SYMBIAN_MW_LAYER_PUBLIC_EXPORT_PATH(remcon/remconnowplayingtargetbase.h)
--- a/bluetoothappprofiles/avrcp/remconbeareravrcp/inc/avrcpincomingcommandhandler.h	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothappprofiles/avrcp/remconbeareravrcp/inc/avrcpincomingcommandhandler.h	Mon Jul 12 18:51:05 2010 +0300
@@ -32,13 +32,13 @@
 
 class CPassthroughHelper;
 class CRcpRouter;
-class CRemConBearerAvrcp;
+class MRemConControlCommandInterface;
 class CAVCFrame;
 class TBTDevAddr;
 NONSHARABLE_CLASS(CRcpIncomingCommandHandler) : public CBase, public MPlayerChangeObserver, public MIncomingCommandHandler
 	{
 public:
-	static CRcpIncomingCommandHandler* NewL(CRemConBearerAvrcp& aBearer, 
+	static CRcpIncomingCommandHandler* NewL(MRemConControlCommandInterface& aCommandInterface, 
 		MRemConBearerObserver& aObserver,
 		CRcpRouter& aRouter,
 		CDeltaTimer& aTimer,
@@ -59,7 +59,7 @@
 	void SendReject(TUid aInterfaceUid, TUint aId);
 
 private:
-	CRcpIncomingCommandHandler(CRemConBearerAvrcp& aBearer, 
+	CRcpIncomingCommandHandler(MRemConControlCommandInterface& aCommandInterface, 
 		MRemConBearerObserver& aObserver,
 		CRcpRouter& aRouter,
 		CDeltaTimer& aTimer,
@@ -92,6 +92,8 @@
 
 	void SendInternalResponse(TUint aId, RBuf8& aData);
 	void SendResponse(TDblQue<CControlCommand>& aCommandQueue, TUint aId, RBuf8& aData);
+	
+	void EnterAddressedMode();
 
 	// Timer functions
 	TBool DuplicateNotify(TDblQue<CControlCommand>& aCommandQueue, const CControlCommand& aCommand) const;
@@ -100,15 +102,15 @@
 	TDblQue<CControlCommand>	iCommandQueue;
 	TDblQue<CControlCommand>	iInternalCommandQueue;
 	
-	CAVRCPFragmenter*		iFragmenter;
-	CRemConBearerAvrcp&		iBearer;
-	MRemConBearerObserver&	iObserver;
-	CRcpRouter&				iRouter;
-	CDeltaTimer& 			iTimer;
-	TRemConClientId			iClientId; // We store the client id even if we aren't
-									   // in addressed mode as we may switch into
-									   // it and need to know the current local
-									   // addressed player
+	CAVRCPFragmenter*					iFragmenter;
+	MRemConControlCommandInterface&		iCommandInterface;
+	MRemConBearerObserver&				iObserver;
+	CRcpRouter&							iRouter;
+	CDeltaTimer& 						iTimer;
+	TRemConClientId						iClientId;	// We store the client id even if we aren't
+													// in addressed mode as we may switch into
+													// it and need to know the current local
+													// addressed player
 	TBool					iAddressedMode;
 	
 	CAvrcpPlayerInfoManager&	iPlayerInfoManager;
--- a/bluetoothappprofiles/avrcp/remconbeareravrcp/inc/avrcpoutgoingcommandhandler.h	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothappprofiles/avrcp/remconbeareravrcp/inc/avrcpoutgoingcommandhandler.h	Mon Jul 12 18:51:05 2010 +0300
@@ -30,13 +30,13 @@
 
 class CControlCommand;
 class CRcpRouter;
-class CRemConBearerAvrcp;
+class MRemConControlCommandInterface;
 class MRemConBearerObserver;
 NONSHARABLE_CLASS(CRcpOutgoingCommandHandler) : public CBase, public MOutgoingCommandHandler
 	{
 public:
 	// Construction/Destruction
-	static CRcpOutgoingCommandHandler* NewL(CRemConBearerAvrcp& aBearer, 
+	static CRcpOutgoingCommandHandler* NewL(MRemConControlCommandInterface& aCommandInterface, 
 		MRemConBearerObserver& aObserver,
 		CRcpRouter& aRouter,
 		CDeltaTimer& aTimer);
@@ -68,7 +68,7 @@
 			const TBTDevAddr& aAddr);
 
 private:
-	CRcpOutgoingCommandHandler(CRemConBearerAvrcp& aBearer, 
+	CRcpOutgoingCommandHandler(MRemConControlCommandInterface& aCommandInterface, 
 		MRemConBearerObserver& aObserver,
 		CRcpRouter& aRouter,
 		CDeltaTimer& aTimer);
@@ -105,14 +105,14 @@
 								CControlCommand* aCommand, 
 								TBool aNotify);
 private:
-	TTransactionLabel		iCurrentTrans;
+	TTransactionLabel			iCurrentTrans;
 	TDblQue<CControlCommand>	iCommandQueue;
 	TDblQue<CControlCommand>	iNotifyCommandQueue;
 	
-	CRemConBearerAvrcp&		iBearer;
-	MRemConBearerObserver&	iObserver;
-	CRcpRouter&				iRouter;
-	CDeltaTimer&			iTimer;
+	MRemConControlCommandInterface& iCommandInterface;
+	MRemConBearerObserver&			iObserver;
+	CRcpRouter&						iRouter;
+	CDeltaTimer&					iTimer;
 	
 	CControlCommand*			iUnreleasedCommand;
 	TBool					iUnreleasedHasResponse;
--- a/bluetoothappprofiles/avrcp/remconbeareravrcp/inc/avrcpremotedevice.h	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothappprofiles/avrcp/remconbeareravrcp/inc/avrcpremotedevice.h	Mon Jul 12 18:51:05 2010 +0300
@@ -24,7 +24,7 @@
 
 #include <e32std.h>
 
-class CRemConBearerAvrcp;
+class MRemConControlCommandInterface;
 class MIncomingCommandHandler;
 class MOutgoingCommandHandler;
 class CRcpIncomingCommandHandler;
@@ -41,7 +41,7 @@
 public:
 	static CRcpRemoteDevice* NewL(const TBTDevAddr& aAddr,
 		CRcpRouter& aRouter, 
-		CRemConBearerAvrcp& aBearer,
+		MRemConControlCommandInterface& aCommandInterface,
 		MRemConBearerObserver& aObserver,
 		CDeltaTimer& aTimer,
 		CAvrcpPlayerInfoManager& aPlayerInfoManager);
@@ -58,7 +58,7 @@
 private:
 	CRcpRemoteDevice(const TBTDevAddr& aAddr,
 		CRcpRouter& aRouter, 
-		CRemConBearerAvrcp& aBearer,
+		MRemConControlCommandInterface& aCommandInterface,
 		CDeltaTimer& aTimer);
 		
 	void ConstructL(MRemConBearerObserver& aObserver,
@@ -73,7 +73,7 @@
 	CRcpOutgoingCommandHandler*		iOutgoing;
 
 	CRcpRouter&						iRouter;
-	CRemConBearerAvrcp&				iBearer;
+	MRemConControlCommandInterface& iCommandInterface;
 	CDeltaTimer&					iTimer;
 	};
 
--- a/bluetoothappprofiles/avrcp/remconbeareravrcp/inc/avrcputils.h	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothappprofiles/avrcp/remconbeareravrcp/inc/avrcputils.h	Mon Jul 12 18:51:05 2010 +0300
@@ -80,6 +80,8 @@
 	ECommandAlreadyQueuedForSending = 52,
 	EPassthroughQueueNotEmptyAfterDisconnect = 53,
 	EPreviousPassthroughNonNullReplacing = 54,
+	ETooManyRemotesRegisterForLocalAddressedPlayerUpdates = 55,
+	ETooFewRemotesRegisterForLocalAddressedPlayerUpdates = 56,
 	};
 
 template <typename XAny>
--- a/bluetoothappprofiles/avrcp/remconbeareravrcp/inc/controlbearer.h	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothappprofiles/avrcp/remconbeareravrcp/inc/controlbearer.h	Mon Jul 12 18:51:05 2010 +0300
@@ -62,6 +62,8 @@
     void MrcciCommandExpired(TUint aTransactionId);
     
 	void MrccciSetAddressedClient(const TRemConClientId& aClient);
+	void MrccciRegisterForLocalAddressedClientUpdates();
+	void MrccciUnregisterForLocalAddressedClientUpdates();
 
 private: // MRemConBearerInterfaceV3 functions called from RemCon
 	virtual TInt GetResponse(TUid& aInterfaceUid, 
@@ -184,6 +186,8 @@
 	CAvrcpBulkBearer*			iBulkBearer;
 	
 	RAvctp						iAvctp;
+	
+	TInt						iRemotesInterestedInLocalAddressedClient;
 	};
 
 #endif //CONTROLBEARER_H
--- a/bluetoothappprofiles/avrcp/remconbeareravrcp/inc/passthroughhelper.h	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothappprofiles/avrcp/remconbeareravrcp/inc/passthroughhelper.h	Mon Jul 12 18:51:05 2010 +0300
@@ -19,19 +19,19 @@
 #include <e32base.h>
 
 class CRcpRouter;
-class CRemConBearerAvrcp;
+class MRemConControlCommandInterface;
 class CControlCommand;
 NONSHARABLE_CLASS(CPassthroughHelper) : public CBase
 	{
 public:
-	static CPassthroughHelper* NewL(CRcpRouter& aRouter, CRemConBearerAvrcp& aBearer, CDeltaTimer& aTimer);
+	static CPassthroughHelper* NewL(CRcpRouter& aRouter, MRemConControlCommandInterface& aCommandInterface, CDeltaTimer& aTimer);
 	~CPassthroughHelper();
 	
 	void Disconnect();
 	
 	void HandlePassthrough(CControlCommand& aCommand); // FIXME for now
 private:
-	CPassthroughHelper(CRcpRouter& aRouter, CRemConBearerAvrcp& aAvrcp, CDeltaTimer& aTimer);
+	CPassthroughHelper(CRcpRouter& aRouter, MRemConControlCommandInterface& aCommandInterface, CDeltaTimer& aTimer);
 	void ConstructL();
 	
 	void Respond(CControlCommand& aCommand, TInt aErr);
@@ -52,7 +52,7 @@
 
 private:
 	CRcpRouter& iRouter;
-	CRemConBearerAvrcp& iBearer;
+	MRemConControlCommandInterface& iCommandInterface;
 	CDeltaTimer& iTimer;
 	CControlCommand* iPreviousPassthrough;
 	};
--- a/bluetoothappprofiles/avrcp/remconbeareravrcp/inc/remconcommandinterface.h	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothappprofiles/avrcp/remconbeareravrcp/inc/remconcommandinterface.h	Mon Jul 12 18:51:05 2010 +0300
@@ -51,7 +51,8 @@
 	virtual void MrccciNewNotifyResponse(CControlCommand& aCommand) = 0;
 	
 	virtual void MrccciSetAddressedClient(const TRemConClientId& aClient) = 0;
-
+	virtual void MrccciRegisterForLocalAddressedClientUpdates() = 0;
+	virtual void MrccciUnregisterForLocalAddressedClientUpdates() = 0;
 	};
 
 #endif //REMCONCOMMANDINTERFACE_H
--- a/bluetoothappprofiles/avrcp/remconbeareravrcp/src/avrcpMetadataTransfer.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothappprofiles/avrcp/remconbeareravrcp/src/avrcpMetadataTransfer.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -901,11 +901,16 @@
 			eventsBuf.Append(ERegisterNotificationUidsChanged );
 			}
 		
-		// Always mark support for stuff that's handled internally rather than
-		// by the player
-		count+= 2;
-		eventsBuf.Append(ERegisterNotificationAvailablePlayersChanged );
-		eventsBuf.Append(ERegisterNotificationAddressedPlayerChanged );
+		// If there are any browsing clients then mark support for the player addressing
+		// events.  Without browsing support the remote will not be able to see the 
+		// information about the players so it is better not to let them see events
+		// relating to the them
+		if(iPlayerInfoManager->BrowsingSupportedL(KNullClientId))
+			{
+			count+= 2;
+			eventsBuf.Append(ERegisterNotificationAvailablePlayersChanged );
+			eventsBuf.Append(ERegisterNotificationAddressedPlayerChanged );
+			}
 		
 		responseData[1] += count;
 
--- a/bluetoothappprofiles/avrcp/remconbeareravrcp/src/avrcpincomingcommandhandler.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothappprofiles/avrcp/remconbeareravrcp/src/avrcpincomingcommandhandler.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -54,7 +54,7 @@
 @return A fully constructed CRcpIncomingCommandHandler.
 @leave System wide error codes.
 */
-CRcpIncomingCommandHandler* CRcpIncomingCommandHandler::NewL(CRemConBearerAvrcp& aBearer,
+CRcpIncomingCommandHandler* CRcpIncomingCommandHandler::NewL(MRemConControlCommandInterface& aCommandInterface,
 	MRemConBearerObserver& aObserver,
 	CRcpRouter& aRouter,
 	CDeltaTimer& aTimer,
@@ -62,7 +62,7 @@
 	TBTDevAddr& aDevice) 
 	{
 	LOG_STATIC_FUNC
-	CRcpIncomingCommandHandler* handler = new(ELeave)CRcpIncomingCommandHandler(aBearer, aObserver, aRouter, aTimer, aPlayerInfoManager, aDevice);
+	CRcpIncomingCommandHandler* handler = new(ELeave)CRcpIncomingCommandHandler(aCommandInterface, aObserver, aRouter, aTimer, aPlayerInfoManager, aDevice);
 	CleanupStack::PushL(handler);
 	handler->ConstructL();
 	CleanupStack::Pop(handler);
@@ -78,7 +78,7 @@
 @return A partially constructed CRcpIncomingCommandHandler.
 @leave System wide error codes.
 */	
-CRcpIncomingCommandHandler::CRcpIncomingCommandHandler(CRemConBearerAvrcp& aBearer, 
+CRcpIncomingCommandHandler::CRcpIncomingCommandHandler(MRemConControlCommandInterface& aCommandInterface, 
 	MRemConBearerObserver& aObserver,
 	CRcpRouter& aRouter,
 	CDeltaTimer& aTimer,
@@ -87,7 +87,7 @@
 	: iCommandQueue(_FOFF(CControlCommand, iHandlingLink))
 	, iInternalCommandQueue(_FOFF(CControlCommand, iHandlingLink))
 	, iFragmenter(NULL)
-	, iBearer(aBearer)
+	, iCommandInterface(aCommandInterface)
 	, iObserver(aObserver)
 	, iRouter(aRouter)
 	, iTimer(aTimer)
@@ -121,7 +121,7 @@
 	
 	CleanupStack::PopAndDestroy(&players);
 	
-	iPassthroughHelper = CPassthroughHelper::NewL(iRouter, iBearer, iTimer);
+	iPassthroughHelper = CPassthroughHelper::NewL(iRouter, iCommandInterface, iTimer);
 	}
 
 /** Destructor.
@@ -130,6 +130,7 @@
 	{
 	LOG_FUNC
 
+	iCommandInterface.MrccciUnregisterForLocalAddressedClientUpdates();
 	iPlayerInfoManager.RemoveObserver( *this );
 	delete iFragmenter;
 	delete iPassthroughHelper;
@@ -207,7 +208,7 @@
 	{
 	LOG_FUNC
 		
-	TUint id = iBearer.MrcciNewTransactionId();
+	TUint id = iCommandInterface.MrcciNewTransactionId();
 	
 	// If there's nothing beyond a header this is bobs.  Dump it now.
 	if(aMessageInformation.Length() <= KAVCFrameHeaderLength)
@@ -508,11 +509,11 @@
 		// can go directly to client (unlike passthrough which may need to map 2 commands to 1 click
 		if (aCommand.Frame().Type() == AVC::ENotify)
 			{
-			iBearer.MrccciNewNotifyCommand(aCommand, aCommand.ClientId());
+			iCommandInterface.MrccciNewNotifyCommand(aCommand, aCommand.ClientId());
 			}
 		else
 			{
-			iBearer.MrcciNewCommand(aCommand, aCommand.ClientId());
+			iCommandInterface.MrcciNewCommand(aCommand, aCommand.ClientId());
 			}
 		}
 	}
@@ -522,7 +523,7 @@
 	LOG_FUNC
 	
 	// Once we respond to this we've told the remote that we're using a particular player
-	iAddressedMode = ETrue;
+	EnterAddressedMode();
 	
 	// SetAddressedPlayer involves not just responding to this command but
 	// also rejecting a bunch of notifies and completing the addressed player
@@ -568,7 +569,7 @@
 			};
 	
 		SendInternalResponse(aId, responseBuf);
-		iBearer.MrccciSetAddressedClient(iClientId);
+		iCommandInterface.MrccciSetAddressedClient(iClientId);
 	
 		responseBuf.Close();
 		}
@@ -662,7 +663,7 @@
 	LOG_FUNC
 
 	// Once we respond to this we've told the remote that we're using a particular player
-	iAddressedMode = ETrue;
+	EnterAddressedMode();
 	
 	RBuf8 responseBuf;
 	TRAPD(err, DoHandleRegisterAddressedPlayerNotificationL(responseBuf, aCommand));
@@ -720,7 +721,7 @@
 
 	// Although we haven't strictly told the remote which player we're using this is 
 	// a 1.4 command, and implies use of a specific player so switch into addressed mode
-	iAddressedMode = ETrue;
+	EnterAddressedMode();
 
 	RBuf8 responseBuf;
 	TUint16 uidCounter = 0;
@@ -823,6 +824,12 @@
 	aData.Close();
 	}
 
+void CRcpIncomingCommandHandler::EnterAddressedMode()
+	{
+	iAddressedMode = ETrue;
+	iCommandInterface.MrccciRegisterForLocalAddressedClientUpdates();
+	}
+
 TBool CRcpIncomingCommandHandler::DuplicateNotify(TDblQue<CControlCommand>& aCommandQueue, const CControlCommand& aCommand) const
 	{
 	TUid interfaceUid = aCommand.RemConInterfaceUid();
--- a/bluetoothappprofiles/avrcp/remconbeareravrcp/src/avrcpoutgoingcommandhandler.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothappprofiles/avrcp/remconbeareravrcp/src/avrcpoutgoingcommandhandler.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -45,13 +45,13 @@
 @return A fully constructed CRcpOutgoingCommandHandler.
 @leave System wide error codes.
 */
-CRcpOutgoingCommandHandler* CRcpOutgoingCommandHandler::NewL(CRemConBearerAvrcp& aBearer, 
+CRcpOutgoingCommandHandler* CRcpOutgoingCommandHandler::NewL(MRemConControlCommandInterface& aCommandInterface, 
 	MRemConBearerObserver& aObserver,
 	CRcpRouter& aRouter,
 	CDeltaTimer& aTimer)
 	{
 	LOG_STATIC_FUNC
-	CRcpOutgoingCommandHandler* handler = new(ELeave)CRcpOutgoingCommandHandler(aBearer, aObserver, aRouter, aTimer);
+	CRcpOutgoingCommandHandler* handler = new(ELeave)CRcpOutgoingCommandHandler(aCommandInterface, aObserver, aRouter, aTimer);
 	return handler;
 	}
 
@@ -64,12 +64,12 @@
 @return A partially constructed CRcpIncomingCommandHandler.
 @leave System wide error codes.
 */		
-CRcpOutgoingCommandHandler::CRcpOutgoingCommandHandler(CRemConBearerAvrcp& aBearer, 
+CRcpOutgoingCommandHandler::CRcpOutgoingCommandHandler(MRemConControlCommandInterface& aCommandInterface, 
 	MRemConBearerObserver& aObserver,
 	CRcpRouter& aRouter,
 	CDeltaTimer& aTimer) : iCommandQueue(_FOFF(CControlCommand, iHandlingLink)),
 	iNotifyCommandQueue(_FOFF(CControlCommand, iHandlingLink)),
-	iBearer(aBearer), iObserver(aObserver), iRouter(aRouter), iTimer(aTimer)
+	iCommandInterface(aCommandInterface), iObserver(aObserver), iRouter(aRouter), iTimer(aTimer)
 	{
 	LOG_FUNC
 	}
@@ -281,11 +281,11 @@
 		
 		if ( aNotify )
 		    {//This is a notify command
-		    iBearer.MrccciNewNotifyResponse(*aCommand);
+		    iCommandInterface.MrccciNewNotifyResponse(*aCommand);
 		    }
 		else
 			{
-			iBearer.MrccciNewResponse(*aCommand);
+			iCommandInterface.MrccciNewResponse(*aCommand);
 			}
 		}
 
@@ -331,7 +331,7 @@
 		if(command)
 			{
 			command->SetNotifyVolumeChangeResult(command->Frame());
-			iBearer.MrccciNewNotifyResponse(*command);
+			iCommandInterface.MrccciNewNotifyResponse(*command);
 			}
 		else
 			{
@@ -353,7 +353,7 @@
 					}
 				}
 			
-			iBearer.MrccciNewResponse(*command);
+			iCommandInterface.MrccciNewResponse(*command);
 			}
 		
 		command->iHandlingLink.Deque();
@@ -578,7 +578,7 @@
 				aCommand.SetCoreButtonAction(ERemConCoreApiButtonRelease, ETrue);
 				}
 
-			iBearer.MrccciNewResponse(aCommand);
+			iCommandInterface.MrccciNewResponse(aCommand);
            }
 		}	
 	}
--- a/bluetoothappprofiles/avrcp/remconbeareravrcp/src/avrcpremotedevice.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothappprofiles/avrcp/remconbeareravrcp/src/avrcpremotedevice.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -31,13 +31,13 @@
 */
 CRcpRemoteDevice* CRcpRemoteDevice::NewL(const TBTDevAddr& aAddr, 
 	CRcpRouter& aRouter, 
-	CRemConBearerAvrcp& aBearer,
+	MRemConControlCommandInterface& aCommandInterface,
 	MRemConBearerObserver& aObserver,
 	CDeltaTimer& aTimer,
 	CAvrcpPlayerInfoManager& aPlayerInfoManager)
 	{
 	LOG_STATIC_FUNC
-	CRcpRemoteDevice* engine = new(ELeave) CRcpRemoteDevice(aAddr, aRouter, aBearer, aTimer);
+	CRcpRemoteDevice* engine = new(ELeave) CRcpRemoteDevice(aAddr, aRouter, aCommandInterface, aTimer);
 	CleanupStack::PushL(engine);
 	engine->ConstructL(aObserver, aPlayerInfoManager);
 	CleanupStack::Pop(engine);
@@ -56,9 +56,9 @@
 */
 CRcpRemoteDevice::CRcpRemoteDevice(const TBTDevAddr& aAddr,
 	CRcpRouter& aRouter, 
-	CRemConBearerAvrcp& aBearer,
+	MRemConControlCommandInterface& aCommandInterface,
 	CDeltaTimer& aTimer) : 
-	iDevice(aAddr), iRouter(aRouter), iBearer(aBearer), iTimer(aTimer)
+	iDevice(aAddr), iRouter(aRouter), iCommandInterface(aCommandInterface), iTimer(aTimer)
 	{
 	LOG_FUNC
 	}
@@ -72,8 +72,8 @@
 	CAvrcpPlayerInfoManager& aPlayerInfoManager)
 	{
 	LOG_FUNC	
-	iIncoming = CRcpIncomingCommandHandler::NewL(iBearer, aObserver, iRouter, iTimer, aPlayerInfoManager, iDevice);
-	iOutgoing = CRcpOutgoingCommandHandler::NewL(iBearer, aObserver, iRouter, iTimer);
+	iIncoming = CRcpIncomingCommandHandler::NewL(iCommandInterface, aObserver, iRouter, iTimer, aPlayerInfoManager, iDevice);
+	iOutgoing = CRcpOutgoingCommandHandler::NewL(iCommandInterface, aObserver, iRouter, iTimer);
 	}
 
 /** Destructor.
--- a/bluetoothappprofiles/avrcp/remconbeareravrcp/src/avrcpsdputils.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothappprofiles/avrcp/remconbeareravrcp/src/avrcpsdputils.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
 // All rights reserved.
 // This component and the accompanying materials are made available
 // under the terms of "Eclipse Public License v1.0"
@@ -29,18 +29,14 @@
 		if(aProfileVersion == AvrcpSdp::KAvrcpProfileVersion13)
 			{
 			serviceClassUuids->StartListL()
-				->BuildDESL()->StartListL()
 					->BuildUUIDL(TUUID(TUint16(KAVRemoteControlUUID)))
-				->EndListL()
 			->EndListL();
 			}
 		else
 			{
 			serviceClassUuids->StartListL()
-				->BuildDESL()->StartListL()
 					->BuildUUIDL(TUUID(TUint16(KAVRemoteControlUUID)))
 					->BuildUUIDL(TUUID(TUint16(KAVRemoteControlControllerUUID)))
-				->EndListL()
 			->EndListL();
 			}
 		
--- a/bluetoothappprofiles/avrcp/remconbeareravrcp/src/passthroughhelper.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothappprofiles/avrcp/remconbeareravrcp/src/passthroughhelper.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -21,9 +21,9 @@
 #include "controlbearer.h"
 
 
-CPassthroughHelper* CPassthroughHelper::NewL(CRcpRouter& aRouter, CRemConBearerAvrcp& aBearer, CDeltaTimer& aTimer)
+CPassthroughHelper* CPassthroughHelper::NewL(CRcpRouter& aRouter, MRemConControlCommandInterface& aCommandInterface, CDeltaTimer& aTimer)
 	{
-	CPassthroughHelper* helper = new(ELeave)CPassthroughHelper(aRouter, aBearer, aTimer);
+	CPassthroughHelper* helper = new(ELeave)CPassthroughHelper(aRouter, aCommandInterface, aTimer);
 	CleanupStack::PushL(helper);
 	helper->ConstructL();
 	CleanupStack::Pop(helper);
@@ -34,9 +34,9 @@
 	{
 	}
 	
-CPassthroughHelper::CPassthroughHelper(CRcpRouter& aRouter, CRemConBearerAvrcp& aBearer, CDeltaTimer& aTimer)
+CPassthroughHelper::CPassthroughHelper(CRcpRouter& aRouter, MRemConControlCommandInterface& aCommandInterface, CDeltaTimer& aTimer)
 	: iRouter(aRouter)
-	, iBearer(aBearer)
+	, iCommandInterface(aCommandInterface)
 	, iTimer(aTimer)
 	{
 	}
@@ -164,7 +164,7 @@
 					{
 					iPreviousPassthrough->SetClick(EFalse);
 					iPreviousPassthrough->SetCoreButtonAction(ERemConCoreApiButtonPress, ETrue);
-					iBearer.MrcciNewCommand(*iPreviousPassthrough, iPreviousPassthrough->ClientId());
+					iCommandInterface.MrcciNewCommand(*iPreviousPassthrough, iPreviousPassthrough->ClientId());
 					}
 				StartReleaseTimer(*iPreviousPassthrough);
 				}
@@ -174,7 +174,7 @@
 				// to RemCon then start waiting for click.
 				iPreviousPassthrough->CancelTimer(iTimer);
 				iPreviousPassthrough->SetCoreButtonAction(ERemConCoreApiButtonClick, ETrue);
-				iBearer.MrcciNewCommand(*iPreviousPassthrough, iPreviousPassthrough->ClientId());
+				iCommandInterface.MrcciNewCommand(*iPreviousPassthrough, iPreviousPassthrough->ClientId());
 				
 				HandledCommand(*iPreviousPassthrough);
 									
@@ -214,7 +214,7 @@
 				// Cancel hold timer and send the previous command as a click.
 				iPreviousPassthrough->CancelTimer(iTimer); 
 				iPreviousPassthrough->SetCoreButtonAction(ERemConCoreApiButtonClick, ETrue);
-				iBearer.MrcciNewCommand(*iPreviousPassthrough, iPreviousPassthrough->ClientId());
+				iCommandInterface.MrcciNewCommand(*iPreviousPassthrough, iPreviousPassthrough->ClientId());
 				
 				HandledCommand(*iPreviousPassthrough);
 				}
@@ -228,7 +228,7 @@
 					{
 					aCommand.SetCoreButtonAction(ERemConCoreApiButtonRelease, ETrue);
 					}
-				iBearer.MrcciNewCommand(aCommand, aCommand.ClientId());
+				iCommandInterface.MrcciNewCommand(aCommand, aCommand.ClientId());
 				aCommand.DecrementUsers();
 				}
 			}
@@ -267,7 +267,7 @@
 		}
 	else
 		{
-		iBearer.MrcciNewCommand(aCommand, aCommand.ClientId());
+		iCommandInterface.MrcciNewCommand(aCommand, aCommand.ClientId());
 		StartReleaseTimer(aCommand);
 		}
 	}
@@ -303,7 +303,7 @@
 			TRAPD(err, aCommand.ReSetCoreButtonActionL(ERemConCoreApiButtonRelease, ETrue));
 			if (err == KErrNone)
 				{
-				iBearer.MrcciNewCommand(aCommand, aCommand.ClientId());
+				iCommandInterface.MrcciNewCommand(aCommand, aCommand.ClientId());
 				}
 				else
 				{
@@ -386,7 +386,7 @@
 	aCommand.CancelTimer(iTimer);
 	aCommand.SetClick(EFalse);
 	aCommand.SetCoreButtonAction(ERemConCoreApiButtonPress, ETrue);
-	iBearer.MrcciNewCommand(aCommand, aCommand.ClientId());
+	iCommandInterface.MrcciNewCommand(aCommand, aCommand.ClientId());
 	StartReleaseTimer(aCommand);
 	}
 
--- a/bluetoothappprofiles/avrcp/remconbeareravrcp/src/remconbeareravrcp.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothappprofiles/avrcp/remconbeareravrcp/src/remconbeareravrcp.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -870,6 +870,54 @@
 	Observer().SetRemoteAddressedClient(TUid::Uid(KRemConBearerAvrcpImplementationUid), aClientId);
 	}
 
+void CRemConBearerAvrcp::MrccciRegisterForLocalAddressedClientUpdates()
+	{
+	// Addressed player observers are registered with RemCon on a per-bearer basis
+	// so we aggregate interest from remote here
+	iRemotesInterestedInLocalAddressedClient++;
+	if(iRemotesInterestedInLocalAddressedClient == 1)
+		{
+		// Weren't any registered before, tell RemCon we care
+		Observer().RegisterLocalAddressedClientObserver(TUid::Uid(KRemConBearerAvrcpImplementationUid));
+		}
+	
+#ifdef __DEBUG
+	TInt numRemotes = 0;
+	CRcpRemoteDevice* remote = NULL;
+	
+	TDblQueIter<CRcpRemoteDevice> iter(iRemotes);
+	while (iter++)
+		{
+		numRemotes++;
+		}
+	__ASSERT_DEBUG(iRemotesInterestedInLocalAddressedClient <= numRemotes, AVRCP_PANIC(ETooManyRemotesRegisterForLocalAddressedPlayerUpdates));
+#endif
+	}
+
+void CRemConBearerAvrcp::MrccciUnregisterForLocalAddressedClientUpdates()
+	{
+#ifdef __DEBUG
+	TInt numRemotes = 0;
+	CRcpRemoteDevice* remote = NULL;
+	
+	TDblQueIter<CRcpRemoteDevice> iter(iRemotes);
+	while (iter++)
+		{
+		numRemotes++;
+		}
+	__ASSERT_DEBUG(iRemotesInterestedInLocalAddressedClient <= numRemotes, AVRCP_PANIC(ETooManyRemotesRegisterForLocalAddressedPlayerUpdates));
+	__ASSERT_DEBUG(iRemotesInterestedInLocalAddressedClient > 0, AVRCP_PANIC(ETooFewRemotesRegisterForLocalAddressedPlayerUpdates));
+#endif
+
+	iRemotesInterestedInLocalAddressedClient--;
+	if(iRemotesInterestedInLocalAddressedClient == 0)
+		{
+		// No-one left who cares.  Tell RemCon not to bother updating
+		// us anymore.
+		Observer().UnregisterLocalAddressedClientObserver(TUid::Uid(KRemConBearerAvrcpImplementationUid));
+		}
+	}
+
 /** Called from outgoing handlers to notify that a response
 for a notify command is ready for RemCon. 
 
--- a/bluetoothengine/btaudioman/src/basrvmain.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btaudioman/src/basrvmain.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -30,8 +30,8 @@
 GLDEF_C TInt E32Main()
     {
     TRACE_STATIC_FUNC
-
-    __UHEAP_MARK;
+    //TODO uncomment UHEAP macros after orbit & Qt memory leaks are resolved till then it should be commented.
+//    __UHEAP_MARK;
     CTrapCleanup* cleanup=CTrapCleanup::New();
     TInt r=KErrNoMemory;
     if (cleanup)
@@ -40,7 +40,7 @@
         delete cleanup;
         }
     //
-    __UHEAP_MARKEND;
+//    __UHEAP_MARKEND;
     return r;
     }
 
--- a/bluetoothengine/btaudiostreamer/tsrc/BtAudioStreamerApiTest/conf/BtAudioStreamerApiTest.cfg	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btaudiostreamer/tsrc/BtAudioStreamerApiTest/conf/BtAudioStreamerApiTest.cfg	Mon Jul 12 18:51:05 2010 +0300
@@ -1,23 +1,23 @@
-//BtAudioStreamer tests
-
-[Test]
-title BT Initialization Test
-create BtAudioStreamerApiTest tester
-tester InitializationTest
-delete tester
-[Endtest] 
-
-[Test]
-title BT Start/Stop Audio Streamer Test
-create BtAudioStreamerApiTest tester
-tester StartStopTest
-delete tester
-[Endtest] 
-
-
-[Test]
-title BT Set New Frame Length Test
-create BtAudioStreamerApiTest tester
-tester SetNewFrameLengthTest
-delete tester
-[Endtest] 
+//BtAudioStreamer tests
+
+[Test]
+title BT Initialization Test
+create BtAudioStreamerApiTest tester
+tester InitializationTest
+delete tester
+[Endtest] 
+
+[Test]
+title BT Start/Stop Audio Streamer Test
+create BtAudioStreamerApiTest tester
+tester StartStopTest
+delete tester
+[Endtest] 
+
+
+[Test]
+title BT Set New Frame Length Test
+create BtAudioStreamerApiTest tester
+tester SetNewFrameLengthTest
+delete tester
+[Endtest] 
--- a/bluetoothengine/bteng/btbearer/inc/btpluginnotifier.h	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/bteng/btbearer/inc/btpluginnotifier.h	Mon Jul 12 18:51:05 2010 +0300
@@ -25,6 +25,7 @@
 #include <locodbearerpluginparams.h>      
 #include <centralrepository.h>      
 #include <locodbearer.h>
+#include <hbindicatorsymbian.h>
 
 
 /**
@@ -149,6 +150,8 @@
      * Own.
      */
     CRepository* iSession;
+    
+    CHbIndicatorSymbian* iBTIndicator;
 
     };
 
--- a/bluetoothengine/bteng/btbearer/src/btpluginnotifier.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/bteng/btbearer/src/btpluginnotifier.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -24,6 +24,8 @@
 #include "debug.h"
 #include <btfeaturescfg.h>
 #include <btnotifclient.h>
+#include "btindicatorconstants.h"
+#include <hbsymbianvariant.h>
 
 // ======== MEMBER FUNCTIONS ========
 
@@ -60,6 +62,7 @@
 	delete repository;
 	
 	CBTEngSettings* settings = CBTEngSettings::NewL();
+	iBTIndicator = CHbIndicatorSymbian::NewL(); 
 	
 	BluetoothFeatures::TEnterpriseEnablementMode mode = BluetoothFeatures::EnterpriseEnablementL();
 	TRACE_INFO( ( _L( "mode = %d" ), mode) )
@@ -78,6 +81,14 @@
         {
         TRACE_INFO( ( _L( "Turning BT off" ) ) )
         (void) settings->SetPowerState( EBTPowerOff );	// Result is not important here
+        TInt state =  EBTIndicatorOff;
+        CHbSymbianVariant* parameters = CHbSymbianVariant::NewL(&state,CHbSymbianVariant::EInt );
+        TBool success = iBTIndicator->Activate(KIndicatorType(),parameters); 
+        delete parameters;
+        if(!success)
+            {
+            User::Leave(iBTIndicator->Error());
+            }
         }
     delete settings;
 	if ( mode != BluetoothFeatures::EDisabled ) // only subscribe if there's any point (NB changing Enterprise Disabling mode requires a reboot)
@@ -112,6 +123,7 @@
     TRACE_FUNC_ENTRY
     Cancel();
     delete iSession;
+    delete iBTIndicator;
     }
 
 
Binary file bluetoothengine/bteng/conf/CI_bteng.confml has changed
Binary file bluetoothengine/bteng/conf/bteng.confml has changed
--- a/bluetoothengine/bteng/group/bld.inf	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/bteng/group/bld.inf	Mon Jul 12 18:51:05 2010 +0300
@@ -37,6 +37,10 @@
 ../conf/bteng_10204DAB.crml 	            MW_LAYER_CRML(bteng_10204DAB.crml)
 ../conf/bteng_10204DAC.crml 	            MW_LAYER_CRML(bteng_10204DAC.crml)
 
+/*remove the following exportation, when SCB CR is approved*/
+../conf/CI_bteng.confml                     MW_LAYER_CONFML(CI_bteng.confml)
+
+
 ../data/btrfs.txt                           z:/resource/btrfs.txt
 
 
--- a/bluetoothengine/bteng/group/btbearer.mmp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/bteng/group/btbearer.mmp	Mon Jul 12 18:51:05 2010 +0300
@@ -43,6 +43,7 @@
 MW_LAYER_SYSTEMINCLUDE
 SYSTEMINCLUDE           /epoc32/include/ecom
 SYSTEMINCLUDE           ../../../inc
+SYSTEMINCLUDE  /epoc32/include/mw/hb/hbcore
 
 LIBRARY                 euser.lib
 LIBRARY                 ecom.lib
@@ -50,4 +51,5 @@
 LIBRARY                 btengsettings.lib
 LIBRARY                 btfeatures.lib
 LIBRARY                 btnotifclient.lib
+LIBRARY 				hbcore.lib
 DEBUGLIBRARY            flogger.lib             // File logging services
--- a/bluetoothengine/bteng/group/bteng.mmp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/bteng/group/bteng.mmp	Mon Jul 12 18:51:05 2010 +0300
@@ -43,6 +43,7 @@
 
 USERINCLUDE             ../inc  
 SYSTEMINCLUDE           ../../inc
+SYSTEMINCLUDE  /epoc32/include/mw/hb/hbcore
 MW_LAYER_SYSTEMINCLUDE
 
 LIBRARY                 euser.lib
@@ -59,6 +60,7 @@
 LIBRARY                 featmgr.lib
 LIBRARY                 aknnotify.lib
 LIBRARY                 btfeatures.lib
+LIBRARY 				hbcore.lib
 
 LIBRARY                 btpowercontrol.lib
 #ifndef __WINS__
--- a/bluetoothengine/bteng/inc/btengincpair.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,182 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Incoming Pairing handler definition
-*
-*/
-
-
-#ifndef BTENGINCPAIR_H_
-#define BTENGINCPAIR_H_
-
-#include <bt_sock.h>
-#include "btengpairbase.h"
-
-/**
- *  Class CBTEngIncPair
- *
- *  Handles an incoming pairing.
- *
- *  @since S60 S60 v5.1
- */
-NONSHARABLE_CLASS( CBTEngIncPair ) : public CBTEngPairBase
-    {
-public:
-
-    /**
-     * Two-phase constructor
-     * @param aParent the owner of this observer
-     * @param aAddr the remote device this observer is targeted to
-     */
-    static CBTEngIncPair* NewL( CBTEngPairMan& aParent, 
-            const TBTDevAddr& aAddr);
-
-    /**
-     * Destructor
-     */
-    ~CBTEngIncPair();
-    
-    
-private: // From CBTEngPairBase
-    
-    /**
-     * Start observing the result of pairing which was originated from
-     * the remote device.
-     * @param the address of the remote device to be paired
-     * @return KErrNone if this request is accepted; otherwise an error code
-     */
-    TInt ObserveIncomingPair( const TBTDevAddr& aAddr );
-
-    /**
-     * Start an outgoing pairing with the remote device.
-     * @param the address of the remote device to be paired
-     * @return KErrNone if this request is accepted; otherwise an error code
-     */
-    void HandleOutgoingPairL( const TBTDevAddr& aAddr, TUint aCod );
-
-    /**
-     * Cancels pairing handling with the specified device
-     * @param aAddr the address of the device the pairing is with
-     */
-    void StopPairHandling( const TBTDevAddr& aAddr );
-    
-    /**
-     * Handle a pairing result with the remote device which this is for.
-     * Must be specialized by subclass.
-     *
-     * @param aResult The status code of the pairing or authentication result.
-     */
-    void DoHandlePairServerResult( TInt aResult );
-    
-    /**
-     * Handles event of registry new paired event with the remote 
-     * device this is for.
-     * @aType the type of authentication with the device.
-     */
-    void DoHandleRegistryNewPairedEvent( const TBTNamelessDevice& aDev );
-    
-private: // from base class MBTEngActiveObserver
-
-    /**
-     * From MBTEngActiveObserver.
-     * Callback to notify that an outstanding request has completed.
-     *
-     * @since S60 v5.1
-     * @param aActive Pointer to the active object that completed.
-     * @param aId The ID that identifies the outstanding request.
-     * @param aStatus The status of the completed request.
-     */
-    virtual void RequestCompletedL( CBTEngActive* aActive, TInt aId, TInt aStatus );
-
-    /**
-     * From MBTEngActiveObserver.
-     * Callback to notify that an error has occurred in RunL.
-     *
-     * @since S60 v5.1
-     * @param aActive Pointer to the active object that completed.
-     * @param aId The ID that identifies the outstanding request.
-     * @param aStatus The status of the completed request.
-     */
-    virtual void HandleError( CBTEngActive* aActive, TInt aId, TInt aError );
-    
-private:
-    
-    /**
-     * C++ default constructor
-     */
-    CBTEngIncPair(CBTEngPairMan& aParent, const TBTDevAddr& aAddr);
-    
-    /**
-     * 2nd phase constructor.
-     */
-    void ConstructL();
-    
-    /**
-     * Start monitoring physical link events if it hasn't yet.
-     *
-     * @since S60 v5.1
-     * 
-     */
-    void MonitorPhysicalLink();
-    
-    /**
-     * Opens physical link adaptor with the device.
-     * 
-     * @since S60 v5.1
-     * @return KErrNone if the physical link exists.
-     * 
-     */
-    TInt OpenPhysicalLinkAdaptor();
-    
-    /**
-     * Cancel all outstanding requests.
-     *
-     * @since S60 v5.1
-     */
-    void CancelPlaNotification();
-    
-    /**
-     * Handle a physical link event.
-     *
-     * @since S60 v5.1
-     * @param aResult The status code of the event.
-     */
-    void HandlePhysicalLinkResultL( TInt aResult );
-
-private:
-    
-    /**
-     * Package buffer for retrieving physical link events.
-     */
-    TBTBasebandEvent iBbEvent;
-
-    /**
-     * Subsession with the socket server for 
-     * getting physical link event notifications.
-     */
-    RBTPhysicalLinkAdapter iPla;
-    
-    /**
-     * iPairingOkTimer is activated if the link goes down.
-     * If it expires it means the pairing process has failed, 
-     * then the error popup will be shown.
-     * If the pairing process ends correctly, DoHandleRegistryNewPairedEvent 
-     * will be called and it will cancel the timer. 
-     * iActivePairingOk is the active object associated to the timer.  
-     */
-    RTimer iPairingOkTimer;
-    CBTEngActive* iActivePairingOk;
-    TBool iUserAwarePairing;
-    };
-
-#endif /*BTENGINCPAIR_H_*/
--- a/bluetoothengine/bteng/inc/btengotgpair.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,181 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Helper class for performing pairing (i.e. bonding) 
-*                with another device.
-*
-*/
-
-#ifndef BTENGOTGPAIR_H_
-#define BTENGOTGPAIR_H_
-
-#include <bttypes.h>
-#include <bluetooth/pairing.h>
-#include <e32property.h>
-#include "btengpairbase.h"
-#include "btengprivatepskeys.h"
-
-/**
- *  Perform a outgoing pair with a BT device.
- *
- *  @lib ?library
- *  @since S60 v5.1
- */
-NONSHARABLE_CLASS( CBTEngOtgPair ) : public CBTEngPairBase
-    {
-
-public:
-
-    /**
-     * Two-phase constructor
-     * @param aParent the owner of this object
-     * @param aAddr the remote device this observer is targeted to
-     */
-    static CBTEngPairBase* NewL( CBTEngPairMan& aParent, 
-            const TBTDevAddr& aAddr );
-
-    /**
-     * Destructor
-     */
-    ~CBTEngOtgPair();
-    
-private: // From CBTEngPairBase
-    
-    /**
-     * Start observing the result of pairing which was originated from
-     * the remote device.
-     * @param the address of the remote device to be paired
-     * @return KErrNone if this request is accepted; otherwise an error code
-     */
-    TInt ObserveIncomingPair( const TBTDevAddr& aAddr );
-
-    /**
-     * Start an outgoing pairing with the remote device.
-     * @param the address of the remote device to be paired
-     * @return KErrNone if this request is accepted; otherwise an error code
-     */
-    void HandleOutgoingPairL( const TBTDevAddr& aAddr, TUint aCod );
-    
-    /**
-     * Cancel any outstanding pairing operation.
-     */
-    void CancelOutgoingPair();
-
-    /**
-     * Cancels pairing handling with the specified device
-     * @param aAddr the address of the device the pairing is with
-     */
-    void StopPairHandling( const TBTDevAddr& aAddr );
-    
-    /**
-     * Handle a pairing result with the remote device which this is for.
-     * Must be specialized by subclass.
-     *
-     * @param aResult The status code of the pairing or authentication result.
-     */
-    void DoHandlePairServerResult( TInt aResult );
-    
-    /**
-     * Handles registry new paired event for the remote 
-     * device this is pairing with.
-     * @aType the type of authentication with the device.
-     */
-    void DoHandleRegistryNewPairedEvent( const TBTNamelessDevice& aDev );
-    
-private: // from base class MBTEngActiveObserver
-
-    /**
-     * From MBTEngActiveObserver.
-     * Callback to notify that an outstanding request has completed.
-     *
-     * @since S60 v5.1
-     * @param aActive Pointer to the active object that completed.
-     * @param aId The ID that identifies the outstanding request.
-     * @param aStatus The status of the completed request.
-     */
-    void RequestCompletedL( CBTEngActive* aActive, TInt aId, TInt aStatus );
-
-    /**
-     * From MBTEngActiveObserver.
-     * Callback to notify that an error has occurred in RunL.
-     *
-     * @since S60 v5.1
-     * @param aActive Pointer to the active object that completed.
-     * @param aId The ID that identifies the outstanding request.
-     * @param aStatus The status of the completed request.
-     */
-    void HandleError( CBTEngActive* aActive, TInt aId, TInt aError );
-
-private:
-
-    /**
-     * C++ default constructor
-     */
-    CBTEngOtgPair( CBTEngPairMan& aParent, const TBTDevAddr& aAddr );
-
-    /**
-     * Symbian 2nd-phase constructor
-     */
-    void ConstructL();
-    
-    /**
-     * Starts an actual pair operation.
-     */
-    void DoPairingL();
-    
-    /**
-     * Cancel any outstanding pairing operation.
-     */
-    void DoCancelOutgoingPair();
-    
-private: // data
-	
-    /**
-     * Socket address of the remote device to pair with.
-     */	
-	TBTSockAddr iSockAddr;
-	
-	/**
-	 * The CoD of the device to be paired
-	 */
-	TUint32 iCod;
-
-    /**
-     * Dedicated bonding session to the pairing server.
-     */
-    RBluetoothDedicatedBondingInitiator iBondingSession;
-    
-    /**
-     * socket for creating L2CAP link with the remote device.
-     */
-    RSocket iSocket;
-	
-    /**
-     * Timer for recovery from Repeated Attempts
-     */
-    RTimer iTimer;
-    
-    /**
-     * used for getting and setting outgoing pair state
-     */
-    RProperty iOutgoProperty;
-    
-    /**
-     * the current pairing mode this class is in
-     */
-    TBTOutgoingPairMode iPairMode;
-    
-    };
-
-
-#endif // BTENGOTGPAIR_H_
--- a/bluetoothengine/bteng/inc/btengpairbase.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,200 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  the base class of pairing handling
-*
-*/
-
-
-#ifndef BTENGPAIRBASE_H_
-#define BTENGPAIRBASE_H_
-
-#include <e32base.h>
-#include <bttypes.h>
-#include <btnotif.h>
-#include "btengactive.h"
-
-class CBTEngPairMan;
-
-/**  Identification for asynchronous operations */
-enum TPairBaseActiveRequestId
-    {
-    EDevicePairUserNotification = 1
-    };
-
-/**
- *  Class CBTEngPairBase
- *
- *  The base class for pairing handling. 
- *  When the pairing has completed (successfully or unsuccessfully), the user
- *  is informed of the result
- *
- *  @since S60 S60 v5.1
- */
-NONSHARABLE_CLASS( CBTEngPairBase ) : public CBase, public MBTEngActiveObserver
-    {
-public:
-    
-    /**
-     * Destructor
-     */
-    virtual ~CBTEngPairBase();
-    
-    /**
-     * Handle a pairing result from the pairing server.
-     *
-     * @param aAddr the address of the remote device which the result is for.
-     * @param aResult The status code of the pairing or authentication result.
-     */
-    void HandlePairServerResult( const TBTDevAddr& aAddr, TInt aResult );
-    
-    /**
-     * Handles event of new paired device event in registry.
-     * @param aDev the remote device which the pair is with.
-     */
-    void HandleRegistryNewPairedEvent( const TBTNamelessDevice& aDev );
-    
-    /**
-     * Start observing the result of the pairing originated by
-     * the remote device.
-     * Must be specialized by subclass.
-     * @param the address of the remote device to be paired
-     * @return KErrNone if this request is accepted; otherwise an error code
-     */
-    virtual TInt ObserveIncomingPair( const TBTDevAddr& aAddr ) = 0;
-
-    /**
-     * Start an outgoing pairing with the remote device.
-     * Must be specialized by subclass.
-     * @param the address of the remote device to be paired
-     * @return KErrNone if this request is accepted; otherwise an error code
-     */
-    virtual void HandleOutgoingPairL( const TBTDevAddr& aAddr, TUint aCod ) = 0;
-    
-    /**
-     * Cancel the outstanding pairing operation.
-     */
-    virtual void CancelOutgoingPair();
-
-    /**
-     * Cancels pairing handling with the specified device
-     * @param aAddr the address of the device the pairing is with
-     */
-    virtual void StopPairHandling( const TBTDevAddr& aAddr ) = 0;
-    
-protected:
-    
-    /**
-     * Handle a pairing result with the remote device which this is for.
-     * Must be specialized by subclass.
-     *
-     * @param aResult The status code of the pairing or authentication result.
-     */
-    virtual void DoHandlePairServerResult( TInt aResult ) = 0;
-    
-    /**
-     * Handles event of registry new paired event with the remote 
-     * device this is for.
-     * Must be specialized by subclass.
-     * @aType the type of authentication with the device.
-     */
-    virtual void DoHandleRegistryNewPairedEvent( const TBTNamelessDevice& aDev ) = 0;
-    
-protected:
-    
-    /**
-     * C++ default constructor
-     */
-    CBTEngPairBase(CBTEngPairMan& aParent, const TBTDevAddr& aAddr);
-    
-    /**
-     * Symbian 2nd-phase constructor
-     */
-    void BaseConstructL();
-
-    /**
-     * Cancels notifying user about the pairing result.
-     */
-    void CancelNotifier();
-    
-    /**
-     * Show the pairing result and ask the user to authorize the device if
-     * pair succeeded.
-     *
-     * @since S60 v5.1
-     */
-    void ShowPairingNoteAndAuthorizeQuery();    
-    
-    /**
-     * Invalidate the pair result flag of this 
-     */
-    void UnSetPairResult();
-    
-    /**
-     * Sets the pair result and validate pair result flag
-     */
-    void SetPairResult( TInt aResult );
-    
-    /**
-     * Tells if the pair result has been set.
-     * @ETrue if the result has been set.
-     */
-    TBool IsPairResultSet();
-    
-    /**
-     * Tells if this is notifying user the pairing result.
-     * @return ETrue if this is is notifying user the pairing result
-     */
-    TBool IsNotifyingPairResult();
-    
-protected:
-
-    /**
-     * Address of the remote device we are trying to pair.
-     */
-    TBTDevAddr iAddr;
-    
-    /**
-     * Contains the final result of pairing with the remote device
-     */
-    TInt iPairResult;
-    
-    /**
-     * Pair result flag, ETrue if iPairResult is been set.
-     */
-    TBool iPairResultSet;
-    
-    /**
-     * Reference to the owner of this object.
-     */
-    CBTEngPairMan& iParent;
-
-    /**
-     * Package buffer for passing parameters to authorization notifier.
-     */
-    TBTPairedDeviceSettingParamsPckg iAuthoPckg;
-
-    /**
-     * Session with the notifier server.
-     * Own.
-     */
-    RNotifier iNotifier;
-    
-    /**
-     * Active object helper for asynchronous operations.
-     * Own.
-     */
-    CBTEngActive* iActive;
-    };
-
-#endif /*BTENGPAIRBASE_H_*/
--- a/bluetoothengine/bteng/inc/btengpairman.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,355 +0,0 @@
-/*
-* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Pairing manager header definition
-*
-*/
-
-#ifndef BTENGPAIRMANAGER_H_
-#define BTENGPAIRMANAGER_H_
-
-#include <bttypes.h>
-#include <bt_sock.h>
-#include <bluetooth/pairing.h>
-#include "btengactive.h"
-#include "btengconstants.h"
-
-class CBTEngPairBase;
-class CBTEngServer;
-
-/**
- *  Class CBTEngPairMan
- *
- *  This class manages pairing with BT devices.
- *  The responsibility of handling incoming and outgoing pairings is
- *  delegated to CBTEngIncPair and CBTEngOtgPair respectively.
- *
- *  @since S60 S60 v5.1
- */
-NONSHARABLE_CLASS( CBTEngPairMan ) : public CBase, public MBTEngActiveObserver
-    {
-public:
-
-    /**
-     * Two-phase constructor
-     */
-    static CBTEngPairMan* NewL( CBTEngServer& aServer );
-
-    /**
-     * Destructor
-     */
-    ~CBTEngPairMan();
-
-    /**
-     * Cancels an outstanding pairing request.
-     */
-    void CancelOutgoingPair();    
-    
-    /**
-     * Process commands relevant to pairing
-     */
-    void ProcessCommandL( const RMessage2& aMessage );
-    
-    /**
-     * Handle a change in BTRegistry remote device table.
-     *
-     * @since S60 v5.1
-     */
-    void RemoteRegistryChangeDetected();
-
-    /**
-     * Gets the instance of pairing server.
-     * @return the server instance. NULL if dedicated bonding is unavailable.
-     */
-    RBluetoothPairingServer* PairingServer();
-    
-    /**
-     * gets the reference of socket server session
-     */
-    RSocketServ& SocketServ();
-    
-    /**
-     * gets the reference of registry session.
-     */
-    RBTRegServ& BTRegServ();
-    
-    /**
-     *  Transfer responsiblity to the specified object.
-     *  @param aPairer the object to which the responsibility is transfered.
-     */
-    void RenewPairer( CBTEngPairBase* aPairer );
-    
-    /**
-     * Be notified when handling of an outgoing pair has been completed.
-     * @param aErr the result of pairing
-     * 
-     */
-    void OutgoingPairCompleted( TInt aErr );
-    
-    /**
-     * Be informed that a session will be closed.
-     *
-     * @since Symbian^3
-     * @param aSession the session to be cloased.
-     */
-    void SessionClosed(CSession2* aSession );
-    
-    /**
-     * Unpair a device via registry
-     */
-    void UnpairDevice( const TBTDevAddr& aAddr );
-    
-    /**
-     * Add the bit indicating the device is user-aware Just worked paired to
-     * UI cookie.
-     */
-    TInt AddUiCookieJustWorksPaired( const TBTNamelessDevice& aDev );
-    
-    /**
-     * Update a nameless device in registry
-     */
-    TInt UpdateRegDevice( const TBTNamelessDevice& aDev );
-    
-    
-    /**
-     * Returns the service (limited to services managed in bteng scope)
-     * level connection status of the specified device.
-     *
-     * @param aAddr the address of the device
-     * @return one of TBTEngConnectionStatus enums
-     */
-    TBTEngConnectionStatus IsDeviceConnected( const TBTDevAddr& aAddr );
-    
-private: // from base class MBTEngActiveObserver
-
-    /**
-     * From MBTEngActiveObserver.
-     * Callback to notify that an outstanding request has completed.
-     *
-     * @since S60 v5.1
-     * @param aActive Pointer to the active object that completed.
-     * @param aId The ID that identifies the outstanding request.
-     * @param aStatus The status of the completed request.
-     */
-    virtual void RequestCompletedL( CBTEngActive* aActive, TInt aId, TInt aStatus );
-
-    /**
-     * From MBTEngActiveObserver.
-     * Callback to notify that an error has occurred in RunL.
-     *
-     * @since S60 v5.1
-     * @param aActive Pointer to the active object that completed.
-     * @param aId The ID that identifies the outstanding request.
-     * @param aStatus The status of the completed request.
-     */
-    virtual void HandleError( CBTEngActive* aActive, TInt aId, TInt aError );
-
-private:
-    
-    /**
-     * C++ default constructor
-     */
-    CBTEngPairMan( CBTEngServer& aServer );
-    
-    /**
-     * Symbian 2nd-phase constructor
-     */
-    void ConstructL();
-
-    /**
-     * Initialiases the paired devices list
-     */
-    void InitPairedDevicesList();
-
-    /**
-     * Initialises the paired devices list (second stage)
-     */
-    void DoInitPairedDevicesList();
-
-    /**
-     * Activate / deactivate a pair observer
-     */
-    TInt SetPairObserver(const TBTDevAddr& aAddr, TBool aActivate);
-    
-    /**
-     * Pair a BT device.
-     */
-    void PairDeviceL( const TBTDevAddr& aAddr, TUint32 aCod );
-    
-    /**
-     * Cancel all subscribes to pairng server
-     */
-    void CancelSubscribe();
-    
-    /**
-     * subscribe to receive SSP pairing result from pairing server
-     */
-    void SubscribeSspPairingResult();
-    
-    /**
-     * Subscribe to receive authentication result from pairing server
-     */
-    void SubscribeAuthenticateResult();
-
-    /**
-     * Handle a pairing result from the pairing server.
-     *
-     * @since S60 v5.1
-     * @param aResult The status code of the authentication result.
-     */
-    void HandlePairingResultL( const TBTDevAddr& aAddr, TInt aResult );
-    
-    /**
-     * Creates a registry view which shall contain all paired devices.
-     */    
-    void CreatePairedDevicesView( TInt aReqId );
-    
-    /**
-     * retrieves paired devices from registry.
-     */
-    void GetPairedDevices( TInt aReqId );
-    
-    /**
-     * handles the completion of paired device view creation
-     */
-    void HandleCreatePairedDevicesViewCompletedL( TInt aStatus, TInt aReqId );
-    
-    /**
-     * handles the completion of getting paired devices
-     */
-    void HandleGetPairedDevicesCompletedL( TInt aStatus, TInt aReqId );
-    
-    /**
-     * Copy the paired devices to internal array storage.
-     */
-    void UpdatePairedDeviceListL();
-    
-    /**
-     * Checks if any devices have been paired or unpaired. For each new paired device,
-     * the pair event will be delegated to corresponding pair observer if it exists;
-     * otherwise create a new pair observer for this pair event.
-     */
-    void CheckPairEventL();
-    
-private:
-
-    /**
-     * Owner of this class.
-     * Not owned.
-     */
-    CBTEngServer& iServer;
-    
-    /**
-     * Registry sub session for remote device db
-     */
-    RBTRegistry iBTRegistry;
-    
-    /**
-     * contains the list of all paired devices.
-     * Using heap here to make efficient array swap.
-     */
-    RArray<TBTNamelessDevice>* iPairedDevices;
-    
-    /**
-     * temporary instance to retrieve paired devices.
-     */
-    CBTRegistryResponse* iPairedDevicesResp;
-    
-    /**
-     * the counter of not handled registry events.
-     */
-    TInt iNotHandledRegEventCounter;
-    
-    /**
-     * Session with the pairing server.
-     * Allocate it in heap to ease the handling for 
-     * situation of unavailable dedicated pairing service.
-     * 
-     * own.
-     */
-    RBluetoothPairingServer* iPairingServ;
-
-    /**
-     * Subsession with the pairing server for 
-     * getting the simple pairing result.
-     * own
-     */
-    RBluetoothPairingResult iPairingResult;
-
-    /**
-     * Subsession with the pairing server for 
-     * getting the authentication result.
-     * own
-     */
-    RBluetoothAuthenticationResult iAuthenResult;
-
-    /**
-     * the address with which a simple pairing has been performed
-     */
-    TBTDevAddr iSimplePairingRemote;
-
-    /**
-     * the address with which an authentication has been performed
-     */
-    TBTDevAddr iAuthenticateRemote;
-    
-    /**
-     * Active object helper for receiving simple pairing results.
-     * Own.
-     */
-    CBTEngActive* iSSPResultActive;
-
-    /**
-     * Active object helper for receiving authentication results.
-     * Own.
-     */
-    CBTEngActive* iAuthenResultActive;
-
-    /**
-     * AO for registry operations
-     */
-    CBTEngActive* iRegistryActive;
-    
-    /**
-     * pair hanlder at the time.
-     * Own.
-     */
-    CBTEngPairBase* iPairer;
-    
-    /**
-     * Client-server message for power change requests.
-     */
-    RMessage2 iMessage;
-
-    /**
-     * AO for local address updates.
-     */
-    CBTEngActive* iLocalAddrActive;
-
-    /**
-     * Provides access to the BT local device address.
-     */
-    RProperty iPropertyLocalAddr;
-
-    /**
-     * Records whether or not this CBTEngPairMan has ever been involed in a pairing operaton.
-     */
-    TBool iPairingOperationAttempted;
-
-    /**
-     * Counter of unhandled paired device view initialisation requests.
-     */
-    TInt iNotHandledInitEventCounter;
-    };
-
-#endif /*BTENGPAIRMANAGER_H_*/
--- a/bluetoothengine/bteng/inc/btengsrvsettingsmgr.h	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/bteng/inc/btengsrvsettingsmgr.h	Mon Jul 12 18:51:05 2010 +0300
@@ -29,6 +29,7 @@
 #include "btengactive.h"
 
 class CBTEngServer;
+class CHbIndicatorSymbian;
 
 
 /**
@@ -130,12 +131,11 @@
     
     /**
     * ?description
-    *
-    * @since S60 v3.2
-    * @param ?arg1 ?description
+    * 
+    * @param aState Current State of the Bluetooth
     */
-    void SetIndicatorStateL( const TInt aIndicator, const TInt aState );
-
+    void SetIndicatorStateL( const TInt aState );
+    
     /**
      * Update the Bluetooth visibility mode.
      *
@@ -305,6 +305,15 @@
      */
     RMessage2 iMessage;
     
+    /**
+     *  Orbit Indicator to display Bluetooth Status
+     */
+    CHbIndicatorSymbian* iBTIndicator;
+    
+    /*
+     *  Indicator State
+     */
+    TInt iIndicatorState;
     };
 
 
--- a/bluetoothengine/bteng/inc/btotgpairpub.inl	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,137 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Implements getting/setting outgoing pair status
-*               from/to P&S KBTOutgoingPairing from btengprivatepskeys.h.
-*
-*/
-
-#include "btengprivatepskeys.h"
-#include <e32property.h>
-
-// ----------------------------------------------------------
-// Get outgoing pair status from PS
-// ----------------------------------------------------------
-//
-inline void OutgoPairingProperty(RProperty& aProperty, 
-        TBTDevAddr& aAddr, TBTOutgoingPairMode& aMode)
-    {
-    TBuf8<sizeof( TBTOutgoingPairProperty )> propDes;
-    TInt err = aProperty.Get( propDes );
-    if ( !err && propDes.Length() == sizeof( TBTOutgoingPairProperty ) )
-        {
-        TBTOutgoingPairProperty prop;
-        TPckgC<TBTOutgoingPairProperty> tmpPckg( prop );
-        tmpPckg.Set( propDes );
-        aAddr = tmpPckg().iAddr;
-        aMode = tmpPckg().iMode;
-        }
-    else
-        {
-        aMode = EBTOutgoingPairNone;
-        }
-    }
-
-// ----------------------------------------------------------
-// Get outgoing pair status from PS
-// ----------------------------------------------------------
-//
-inline void OutgoPairingProperty(TBTDevAddr& aAddr, TBTOutgoingPairMode& aMode)
-    {
-    RProperty property;
-    TInt err = property.Attach( 
-                KPSUidBluetoothEnginePrivateCategory, KBTOutgoingPairing );
-    if ( !err )
-        {
-        OutgoPairingProperty( property, aAddr, aMode );
-        }
-    else
-        {
-        aMode = EBTOutgoingPairNone;
-        }
-    property.Close();
-    }
-
-// ----------------------------------------------------------
-// Tells if another outgoing pairing is ongoing with a device
-// other than the specified one.
-// ----------------------------------------------------------
-//
-inline TBool OtherOutgoPairing( const TBTDevAddr& aAddr )
-    {
-    TBTDevAddr outpaddr;
-    TBTOutgoingPairMode mode;
-    OutgoPairingProperty( outpaddr, mode );
-    return mode != EBTOutgoingPairNone && outpaddr != aAddr;
-    }
-
-// ----------------------------------------------------------
-// Gets the status of outgoing pair with the specified device.
-// ----------------------------------------------------------
-//
-inline TBTOutgoingPairMode OutgoPairingMode(
-        RProperty& aProperty, const TBTDevAddr& aAddr )
-    {
-    TBTDevAddr addr;
-    TBTOutgoingPairMode mode;
-    OutgoPairingProperty(aProperty, addr, mode );
-    return ( addr == aAddr ) ? mode : EBTOutgoingPairNone;
-    }
-
-// ----------------------------------------------------------
-// Gets the status of outgoing pair with the specified device.
-// ----------------------------------------------------------
-//
-inline TBTOutgoingPairMode OutgoPairingMode(const TBTDevAddr& aAddr)
-    {
-    TBTDevAddr addr;
-    TBTOutgoingPairMode mode;
-    OutgoPairingProperty( addr, mode );
-    return ( addr == aAddr ) ? mode : EBTOutgoingPairNone;
-    }
-
-// ----------------------------------------------------------
-// publish outgoing pairing status to PS
-// ----------------------------------------------------------
-//
-inline void SetOutgoPairProperty(RProperty& aProperty, 
-        const TBTDevAddr& aAddr,
-        TBTOutgoingPairMode aMode )
-    {
-    if ( aMode == EBTOutgoingPairNone )
-        {
-        (void) aProperty.Set( KNullDesC8 );
-        return;
-        }
-    TPckgBuf<TBTOutgoingPairProperty> tmpPckg;
-    tmpPckg().iAddr = aAddr;
-    tmpPckg().iMode = aMode;
-    (void) aProperty.Set( tmpPckg );
-    }
-
-// ----------------------------------------------------------
-// Locally instantiate a RProperty and Set Outgoing Pair Property
-// ----------------------------------------------------------
-//
-inline void SetOutgoPairProperty(const TBTDevAddr& aAddr,
-        TBTOutgoingPairMode aMode )
-    {
-    RProperty property;
-    TInt err = property.Attach( 
-                KPSUidBluetoothEnginePrivateCategory, KBTOutgoingPairing );
-    if ( !err )
-        {
-        SetOutgoPairProperty( property, aAddr, aMode );
-        }
-    property.Close();
-    }
--- a/bluetoothengine/bteng/src/btengincpair.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,362 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  BT determines pairing status 
-*
-*/
-
-#include "btengincpair.h"
-#include "btengpairman.h"
-#include "btengotgpair.h"
-#include "btengconstants.h"
-#include "debug.h"
-
-const TInt KBTEngWaitingForPairingOkDelay = 500000; // 0.5s
-
-enum TPairingStageId
-    {
-    /**
-     * is monitoring physical link status
-     */
-    EPhysicalLinkNotify = EDevicePairUserNotification + 1,
-    EWaitingForPairingOk,
-    };
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// C++ default constructor
-// ---------------------------------------------------------------------------
-//
-CBTEngIncPair::CBTEngIncPair( CBTEngPairMan& aParent, 
-    const TBTDevAddr& aAddr) : CBTEngPairBase( aParent, aAddr )
-    {
-    }
-
-// ---------------------------------------------------------------------------
-// 2nd phase constructor
-// ---------------------------------------------------------------------------
-//
-void CBTEngIncPair::ConstructL()
-    {
-    BaseConstructL();
-    iActivePairingOk = CBTEngActive::NewL(*this, EWaitingForPairingOk, CActive::EPriorityStandard);
-    User::LeaveIfError( iPairingOkTimer.CreateLocal() );
-    }
-
-// ---------------------------------------------------------------------------
-// NewL
-// ---------------------------------------------------------------------------
-//
-CBTEngIncPair* CBTEngIncPair::NewL( CBTEngPairMan& aParent, 
-    const TBTDevAddr& aAddr)
-    {
-    CBTEngIncPair* self = new (ELeave) CBTEngIncPair(aParent, aAddr);
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-// Destructor
-// ---------------------------------------------------------------------------
-//
-CBTEngIncPair::~CBTEngIncPair()
-    {
-    TRACE_FUNC_ENTRY
-    // Cancel all outstanding requests
-    CancelPlaNotification();
-    iPla.Close();
-    iPairingOkTimer.Cancel();
-    iPairingOkTimer.Close();
-    if(iActivePairingOk)
-        {
-        iActivePairingOk->CancelRequest();
-        delete iActivePairingOk;
-        }
-    TRACE_FUNC_EXIT
-    }
-
-// ---------------------------------------------------------------------------
-// Accept this message only if the specified device is the same as this is
-// dealing with.
-// ---------------------------------------------------------------------------
-//
-TInt CBTEngIncPair::ObserveIncomingPair( const TBTDevAddr& aAddr )
-    {
-    TInt err( KErrServerBusy );
-    if ( iAddr == aAddr )
-        {
-        err = KErrNone;
-        iUserAwarePairing = ETrue; // This function is called by a notifier, which means the UI has been involved
-        // Therefore we can display it in the paired devices list
-        if ( !iActive->IsActive() && !OpenPhysicalLinkAdaptor() )
-            {
-            // If we are observing physical link, or showing user a note,
-            // we won't interrupt it.
-            UnSetPairResult();
-            MonitorPhysicalLink();
-            }
-        }
-    return err;
-    }
-
-// ---------------------------------------------------------------------------
-// Assign the responsibility of outgoing pair handling to CBTEngOtgPair
-// ---------------------------------------------------------------------------
-//
-void CBTEngIncPair::HandleOutgoingPairL( const TBTDevAddr& aAddr, TUint aCod )
-    {
-    TRACE_FUNC_ENTRY
-    // Outgoing pairing always takes highest priority:
-    CBTEngPairBase* pairer = CBTEngOtgPair::NewL( iParent, aAddr );
-    pairer->HandleOutgoingPairL( aAddr, aCod );
-    iParent.RenewPairer( pairer );
-    TRACE_FUNC_EXIT
-    }
-
-// ---------------------------------------------------------------------------
-// Accept this message only if the specified device is the same as this is
-// dealing with.
-// ---------------------------------------------------------------------------
-//
-void CBTEngIncPair::StopPairHandling( const TBTDevAddr& aAddr )
-    {
-    if ( aAddr == iAddr )
-        {
-        TRACE_FUNC_ENTRY
-        iParent.RenewPairer( NULL );
-        TRACE_FUNC_EXIT
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Notify user if pairing failed.
-// ---------------------------------------------------------------------------
-//
-void CBTEngIncPair::DoHandlePairServerResult( TInt aResult )
-    {
-    CancelPlaNotification();
-    // For a successful pairing, we need wait for registry table change.
-    if( aResult != KErrNone && aResult != KHCIErrorBase )
-        {
-        // Pair failure situation.
-        SetPairResult( aResult );
-        ShowPairingNoteAndAuthorizeQuery();
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Kill this if the linkkey type indicates OBEX authentication.
-// Otherwise notify user the pair result.
-// ---------------------------------------------------------------------------
-//
-void CBTEngIncPair::DoHandleRegistryNewPairedEvent( const TBTNamelessDevice& aDev )
-    {
-    TRACE_FUNC_ENTRY
-    
-    // First of all cancel the iPairingOkTimer timer, if active
-    if (iActivePairingOk->IsActive())
-        {
-        iPairingOkTimer.Cancel();
-        iActivePairingOk->CancelRequest();
-        UnSetPairResult();  // we might have set it before (if the link went down) so we want to reset it.   
-        }
-    if (aDev.LinkKeyType() == ELinkKeyUnauthenticatedNonUpgradable && !iUserAwarePairing)
-		{
-		// If an application uses btengconnman API to connect a service of 
-		// this device and JW pairing occurred as part of security enforcement,
-		// it shall be a user aware pairing, and we shall add this device in paired
-		// view. In this way, user is able to disconnect the device from our UI.
-		// Otherwise the link key has been created by a device without IO requesting 
-		// a service connection with phone. We won't take any action (e.g. remove 
-		// link key) in this case. As the result, this device can't be seen in our UI, 
-		// however other applications are still freely to use its services.
-		TRACE_INFO(_L("[BTEng]: CBTEngIncPair: JW pairing with no IO device" ) )
-		TBTEngConnectionStatus status = iParent.IsDeviceConnected( aDev.Address() );
-		if ( status == EBTEngConnecting || status == EBTEngConnected )
-			{
-			// the return error is ingore as we can not have other proper 
-			// exception handling option:
-			(void) iParent.AddUiCookieJustWorksPaired( aDev );
-			}
-		iParent.RenewPairer( NULL );
-		}
-    else if (aDev.LinkKeyType() == ELinkKeyUnauthenticatedUpgradable && !iUserAwarePairing)
-		{
-		// The linkkey has been created  by an incoming OBEX service request
-		// which resulted a pairing event received from pair server.
-		TRACE_INFO(_L("[BTEng]: CBTEngIncPair: JW pairing with IO device" ) )
-		iParent.RenewPairer( NULL );
-		}
-    else
-		{
-		if (aDev.LinkKeyType() == ELinkKeyUnauthenticatedNonUpgradable || aDev.LinkKeyType() == ELinkKeyUnauthenticatedUpgradable)
-			{
-			// The user was involved in the pairing, so display in the paired devices list
-			(void) iParent.AddUiCookieJustWorksPaired(aDev);
-			}
-		TRACE_INFO(_L("[BTEng]: CBTEngIncPair: Non-JW pairing"))
-		// Other pairing model than Just Works:
-		CancelPlaNotification();
-		SetPairResult( KErrNone );
-		ShowPairingNoteAndAuthorizeQuery();
-		}
-    TRACE_FUNC_EXIT
-    }
-
-// ---------------------------------------------------------------------------
-// From class MBTEngActiveObserver.
-// ---------------------------------------------------------------------------
-//
-void CBTEngIncPair::RequestCompletedL( CBTEngActive* /*aActive*/, TInt aId, TInt aStatus )
-    {
-    TRACE_FUNC_ARG( ( _L( "aId: %d, aStatus: %d"), aId, aStatus ) )
-        // Check which request completed.
-    switch( aId )
-        {
-        case EPhysicalLinkNotify:
-            {
-                // Check if the link has disconnected.
-            HandlePhysicalLinkResultL( aStatus );
-            break;
-            }
-        case EDevicePairUserNotification:
-            {
-                // the user has been informed of the result, kill this:
-            TRACE_INFO(_L("[BTENG]:CBTEngIncPair authorization notifier completed") )
-            iParent.RenewPairer( NULL );
-            break;
-            }
-        case EWaitingForPairingOk:
-            {
-            // pairing failed, inform user:
-            if (iPairResult == KErrNone)
-                {
-                // iPairResult must have been set as an error. if it's not it means somewhere else
-                // it has been reset. But we need to have it set to an error as we are notifying 
-                // the "unable to pair" message.
-                SetPairResult(KErrGeneral);
-                }
-            ShowPairingNoteAndAuthorizeQuery();
-            break;
-            }    
-        default:
-                // Should not be possible, but no need for handling.
-            TRACE_INFO( (_L("[BTEng]: CBTEngIncPair::RequestCompletedL unhandled event!!") ) )
-            break;
-        }
-    TRACE_FUNC_EXIT
-    }
-
-// ---------------------------------------------------------------------------
-// From class MBTEngActiveObserver.
-// Handles a leave in RequestCompleted by simply self-destructing.
-// ---------------------------------------------------------------------------
-//
-void CBTEngIncPair::HandleError( CBTEngActive* aActive, TInt aId, TInt aError )
-    {
-    TRACE_FUNC_ARG( ( _L( "request id: %d, error: %d" ), aId, aError ) )
-    (void) aActive;
-    (void) aId;
-    (void) aError;
-        // Our error handling is to just stop observing. 
-        // Nothing critical to be preserved herer, the user 
-        // just won't get any notification of pairing result.
-    iParent.RenewPairer( NULL );
-    }
-
-// ---------------------------------------------------------------------------
-// Subscribe to physical link notifications. 
-// physical link must exist when calling this function.
-// ---------------------------------------------------------------------------
-//
-void CBTEngIncPair::MonitorPhysicalLink()
-    {
-    TRACE_FUNC_ENTRY
-    iActive->SetRequestId( EPhysicalLinkNotify );
-        // Subscribe to disconnect and error events.
-    iPla.NotifyNextBasebandChangeEvent( iBbEvent, 
-                            iActive->RequestStatus(), 
-                            ENotifyPhysicalLinkDown | ENotifyPhysicalLinkError );
-    iActive->GoActive();
-    TRACE_FUNC_EXIT
-    }
-
-// ---------------------------------------------------------------------------
-// Opens the adaptor if physical link exists.
-// ---------------------------------------------------------------------------
-//
-TInt CBTEngIncPair::OpenPhysicalLinkAdaptor()
-    {
-    TRACE_FUNC_ENTRY
-    TInt err ( KErrNone );
-    if( !iPla.IsOpen() )
-        {
-            // Try to open the adapter in case it failed earlier.
-            // This can happen for outgoing dedicated bonding with 
-            // non-SSP device, as the PIN dialog can be kept open even 
-            // though the link has dropped because of a time-out.
-        err = iPla.Open( iParent.SocketServ(), iAddr );
-        }
-    TRACE_INFO( (_L("[BTEng]: CBTEngIncPair::HasPhysicalLink ? %d"), iPla.IsOpen() ) )
-    return err;
-    }
-
-// ---------------------------------------------------------------------------
-// Cancel outstanding physical link notification
-// ---------------------------------------------------------------------------
-//
-void CBTEngIncPair::CancelPlaNotification()
-    {
-    TRACE_FUNC_ENTRY
-    if( iActive && iActive->IsActive() && 
-            iActive->RequestId() == EPhysicalLinkNotify )
-        {
-        // cancel Baseband monitor
-        iPla.CancelNextBasebandChangeEventNotifier();
-        iActive->Cancel();
-        }
-    TRACE_FUNC_EXIT
-    }
-
-// ---------------------------------------------------------------------------
-// Handle a physical link event. Notify pair failed if physical link is down.
-// ---------------------------------------------------------------------------
-//
-void CBTEngIncPair::HandlePhysicalLinkResultL( TInt aResult )
-    {
-    TRACE_FUNC_ARG( ( _L( " BBEvent 0x%08X, code %d"), 
-                            iBbEvent().EventType(), iBbEvent().SymbianErrorCode() ) )
-        // Check if the connection is still alive.
-    TBool physicalLinkDown = 
-        ( iBbEvent().EventType() == ENotifyPhysicalLinkDown | ENotifyPhysicalLinkError );
-
-    if( aResult || physicalLinkDown )
-        {
-        // link went down. It might be because of pairing failed or the remote device disconnected the
-        // physical link after a successful pairing.
-        // we wait for 0.5 secs before notifying the "unable to pair" message as, if the pair is 
-        // successful, we manage it to show the right confirmation message.
-        SetPairResult( (aResult == 0) ? KErrGeneral : aResult );
-        iPairingOkTimer.After(iActivePairingOk->iStatus, KBTEngWaitingForPairingOkDelay);
-        iActivePairingOk->GoActive();
-        }
-    else
-        {
-        // Uninteresting event, re-subscribe.
-        MonitorPhysicalLink();
-        }
-    TRACE_FUNC_EXIT
-    }
--- a/bluetoothengine/bteng/src/btengotgpair.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,368 +0,0 @@
-/*
-* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Helper class for performing pairing (i.e. bonding) 
-*                with another device.
-*
-*/
-
-#include "btengotgpair.h"
-#include <btengconstants.h>
-#include "btengpairman.h"
-#include "btotgpairpub.inl"
-#include "debug.h"
-
-enum TPairingStageId
-    {
-    /**
-     * no pairing operation ongoing
-     */
-    ENoBonding = 0,
-    
-    /**
-     * pair with dedicated bonding method
-     */
-    EDedicatedBonding = EDevicePairUserNotification + 1,
-    
-    /**
-     * pair with general bonding by establishing L2CAP connection.
-     */
-    EGeneralBonding,  
-    
-    /**
-     * delaying next pairing request for a while
-     */
-    EGeneralBondingRetryTimer,
-    
-    /**
-     * The last pairing retry
-     */
-    EGeneralBondingRetry
-    };
-
-/**  SDP PSM (used for pairing) */
-const TInt KSDPPSM = 0x0001;
-
-// Delay time to void Repeated Attempts on pairing
-const TInt KBTEngGeneralBondingRetryDelayMicroSeconds = 5000000; // 5.0s
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// C++ default constructor
-// ---------------------------------------------------------------------------
-//
-CBTEngOtgPair::CBTEngOtgPair( CBTEngPairMan& aParent, const TBTDevAddr& aAddr)
-    :  CBTEngPairBase( aParent, aAddr )
-    {
-    }
-
-// ---------------------------------------------------------------------------
-// Symbian 2nd-phase constructor
-// ---------------------------------------------------------------------------
-//
-void CBTEngOtgPair::ConstructL()
-    {
-    TRACE_FUNC_ENTRY
-    BaseConstructL();
-    User::LeaveIfError( iOutgoProperty.Attach( KPSUidBluetoothEnginePrivateCategory, 
-            KBTOutgoingPairing ) );
-    User::LeaveIfError( iTimer.CreateLocal() );
-    TRACE_FUNC_EXIT
-    }
-
-// ---------------------------------------------------------------------------
-// NewL
-// ---------------------------------------------------------------------------
-//
-CBTEngPairBase* CBTEngOtgPair::NewL( CBTEngPairMan& aParent, 
-        const TBTDevAddr& aAddr )
-    {
-    CBTEngOtgPair* self = new( ELeave ) CBTEngOtgPair( aParent, aAddr );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-// Destructor
-// ---------------------------------------------------------------------------
-//
-CBTEngOtgPair::~CBTEngOtgPair()
-    {
-    TRACE_FUNC_ENTRY
-    SetOutgoPairProperty( iOutgoProperty, TBTDevAddr(), EBTOutgoingPairNone );
-    CancelNotifier();
-    DoCancelOutgoingPair();
-    iBondingSession.Close();
-    iSocket.Close();
-    iTimer.Close();
-    iOutgoProperty.Close();
-    TRACE_FUNC_EXIT
-    }
-
-// ---------------------------------------------------------------------------
-// Simply deny the request as this is handing outgoing pairing
-// ---------------------------------------------------------------------------
-//
-TInt CBTEngOtgPair::ObserveIncomingPair( const TBTDevAddr& /*aAddr*/ )
-    {
-    return KErrServerBusy;
-    }
-
-// ---------------------------------------------------------------------------
-// Accept the request only this device is not busy with another pairing request.
-// ---------------------------------------------------------------------------
-//
-void CBTEngOtgPair::HandleOutgoingPairL( const TBTDevAddr& aAddr, TUint aCod )
-    {
-    TRACE_FUNC_ARG( ( _L(" cod 0x%08x"), aCod ) )
-    if ( iActive->IsActive() || aAddr != iAddr )
-        {
-        // we don't allow another pairing request.
-        User::Leave( KErrServerBusy );
-        }
-    
-    iAddr = aAddr;
-    iCod = aCod;
-    UnSetPairResult();
-    iParent.UnpairDevice( iAddr );
-    TBTDeviceClass decls( iCod );
-    if ( decls.MajorDeviceClass() == EMajorDeviceAV && 
-            decls.MinorDeviceClass() != EMinorDeviceAVHandsfree )
-        {
-        // If the devie is a headset, set to 0000 pin auto pairing
-        iPairMode = EBTOutgoingHeadsetAutoPairing;
-        }
-    else
-        {
-        iPairMode = EBTOutgoingNoneHeadsetPairing;
-        }
-    SetOutgoPairProperty( iOutgoProperty, iAddr, iPairMode );
-    DoPairingL();
-    TRACE_FUNC_EXIT
-    }
-
-// ---------------------------------------------------------------------------
-// Cancels an outstanding pair request by self-destruct
-// ---------------------------------------------------------------------------
-//
-void CBTEngOtgPair::CancelOutgoingPair()
-    {
-    TRACE_FUNC_ENTRY
-    iParent.RenewPairer( NULL );
-    TRACE_FUNC_EXIT
-    }
-
-// ---------------------------------------------------------------------------
-// Abort pairing handling, request the owner to destroy this.
-// ---------------------------------------------------------------------------
-//
-void CBTEngOtgPair::StopPairHandling( const TBTDevAddr& aAddr )
-    {
-    if ( aAddr == iAddr )
-        {
-        TRACE_FUNC_ENTRY
-        iParent.OutgoingPairCompleted( KErrCancel );
-        iParent.RenewPairer( NULL );
-        TRACE_FUNC_EXIT
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Pairing result will be received when pairing operation completes.
-// ---------------------------------------------------------------------------
-//
-void CBTEngOtgPair::DoHandlePairServerResult( TInt aResult )
-    {
-	if (aResult == (KHCIErrorBase-EPairingNotAllowed))
-		{
-		// if EPairingNotAllowed is recieved then any further pairing attempts will fail
-		// so don't attampt to pair
-        iPairMode = EBTOutgoingPairNone;
-		}
-    }
-
-// ---------------------------------------------------------------------------
-// Cancels possible outstanding pairing and notify user pair success.
-// ---------------------------------------------------------------------------
-//
-void CBTEngOtgPair::DoHandleRegistryNewPairedEvent( const TBTNamelessDevice& aDev )
-    {
-    TRACE_FUNC_ENTRY
-    if ( !IsNotifyingPairResult() )
-        {
-        TInt err( KErrNone );
-        // If pairing was performed using Just Works mode, we set a 
-        // UICookie to indicate that the device is successfully 
-        // bonded so that this device will be listed in paired device view of
-        // bluetooth application:
-        if ( aDev.LinkKeyType() == ELinkKeyUnauthenticatedNonUpgradable )
-            {
-            TRACE_INFO( ( _L( "[BTENG] CBTEngOtgPair, Just Works pairing" ) ) );
-            err = iParent.AddUiCookieJustWorksPaired( aDev );
-            }
-        DoCancelOutgoingPair();
-        SetPairResult( err ? err : KErrNone );
-        ShowPairingNoteAndAuthorizeQuery();
-        }
-    TRACE_FUNC_EXIT
-    }
-
-// ---------------------------------------------------------------------------
-// From class MBTEngActiveObserver.
-// Based on the result code, decides the next operation, either try pairing 
-// with another mode, or complete pair request.
-// ---------------------------------------------------------------------------
-//
-void CBTEngOtgPair::RequestCompletedL( CBTEngActive* aActive, TInt aId, 
-    TInt aStatus )
-    {
-    TRACE_FUNC_ARG( ( _L( "reqid %d, status: %d, pair mode %d " ), aId, aStatus, iPairMode ) )
-    (void) aActive;
-    (void) aId;
- 
-    if ( aId == EDevicePairUserNotification)
-        {
-        // user notification completes:
-        iParent.OutgoingPairCompleted( aStatus ? aStatus : iPairResult );
-        iParent.RenewPairer( NULL );
-        return;
-        }
-    
-    if( aId == EDedicatedBonding && 
-				( aStatus == KErrRemoteDeviceIndicatedNoBonding || 
-					( aStatus && iPairMode != EBTOutgoingNoneHeadsetPairing && iPairMode != EBTOutgoingPairNone ) )   )
-        {
-        // try general pairing if the remote doesn't have dedicated bonding, or
-        // pairing fails with a headset.
-        DoPairingL();
-        }
-    else if ( aStatus && iPairMode == EBTOutgoingHeadsetAutoPairing )
-        {
-        iPairMode = EBTOutgoingHeadsetManualPairing;
-        // auto pairing with headset failed, try to pair again with manual pin:
-        ( void ) SetOutgoPairProperty( iOutgoProperty, iAddr, iPairMode );
-        TRACE_INFO( _L( " auto pairing failed, switch to manual pairing") );     
-        DoPairingL();
-        }
-    else if ( aStatus && aId == EGeneralBonding && 
-              iPairMode == EBTOutgoingHeadsetManualPairing )
-        {
-        // pairing headset with manual pin failed, wait for a while and try again:
-        iActive->SetRequestId( EGeneralBondingRetryTimer );
-        iTimer.After( iActive->iStatus, KBTEngGeneralBondingRetryDelayMicroSeconds );
-        iActive->GoActive();
-        }
-    else if( aId == EGeneralBondingRetryTimer )
-        {
-        // try to pair headset again with manual pin again:
-        DoPairingL();
-        }
-    else if ( aStatus )
-        {
-        // we only starts showing note if pairing failed.
-        // For a successful pair, we must wait until registry has been updated.
-        if ( !IsPairResultSet() )
-            {
-            SetPairResult( aStatus );
-            }
-        if ( aStatus )
-            {
-            ShowPairingNoteAndAuthorizeQuery();
-            }
-        }
-    TRACE_FUNC_EXIT
-    }
-
-// ---------------------------------------------------------------------------
-// From class MBTEngActiveObserver.
-// Handles a leave in RequestCompleted by self-destructing.
-// ---------------------------------------------------------------------------
-//
-void CBTEngOtgPair::HandleError( CBTEngActive* aActive, TInt aId, 
-    TInt aError )
-    {
-    TRACE_FUNC_ARG( ( _L( "error: %d" ), aError ) )
-    // Our RunL can actually not leave, so we should never reach here.
-    (void) aActive;
-    (void) aId;
-    iParent.OutgoingPairCompleted( aError );
-    iParent.RenewPairer( NULL );
-    }
-
-// ---------------------------------------------------------------------------
-// decide the next state and issue pair request
-// ---------------------------------------------------------------------------
-//
-void CBTEngOtgPair::DoPairingL()
-    {
-    TRACE_FUNC_ENTRY
-    TPairingStageId currentMode = ( TPairingStageId ) iActive->RequestId();
-    ASSERT( !iActive->IsActive() );
-    TPairingStageId nextMode( EGeneralBonding );
-    
-    // if running BTv2.0 stack, dedicated bonding method 
-    // is not available.
-    if ( currentMode == ENoBonding && iParent.PairingServer() != NULL )
-        {
-        nextMode = EDedicatedBonding;
-        }
-    else if(currentMode == EGeneralBondingRetryTimer)
-        {
-        nextMode = EGeneralBondingRetry;
-        }
-    
-    TRACE_INFO( ( _L( "[BTENG] CBTEngOtgPair::DoPairingL: bonding mode: pre %d, next %d"), currentMode, nextMode ) );
-    
-    iActive->SetRequestId( nextMode );
-    if ( nextMode == EDedicatedBonding )
-        {
-        iBondingSession.Start( *iParent.PairingServer(), iAddr, iActive->RequestStatus() );          
-        }
-    else
-        {
-        TBTServiceSecurity sec;
-        sec.SetAuthentication( ETrue );
-        iSockAddr.SetBTAddr( iAddr );
-        iSockAddr.SetPort(KSDPPSM);
-        iSockAddr.SetSecurity( sec );    
-        iSocket.Close();
-        User::LeaveIfError( iSocket.Open( iParent.SocketServ(), KL2CAPDesC ) );
-        iSocket.Connect( iSockAddr, iActive->RequestStatus() );
-        }
-    iActive->GoActive();
-    TRACE_FUNC_EXIT
-    }
-
-// ---------------------------------------------------------------------------
-// Make sure no outstanding pairing request is existing
-// ---------------------------------------------------------------------------
-//
-void CBTEngOtgPair::DoCancelOutgoingPair()
-    {
-    TRACE_FUNC_ENTRY
-    if( iActive->IsActive() )
-        {
-        iBondingSession.Close();
-        if( iSocket.SubSessionHandle() )
-            {
-            iSocket.CancelConnect();
-            iSocket.Close();
-            }
-        iTimer.Cancel();
-        iActive->CancelRequest();
-        }
-    TRACE_FUNC_EXIT
-    }
--- a/bluetoothengine/bteng/src/btengpairbase.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,176 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  the base class of pairing handling 
-*
-*/
-
-#include "btengpairman.h"
-#include "btengpairbase.h"
-#include "debug.h"
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// C++ default constructor
-// ---------------------------------------------------------------------------
-//
-CBTEngPairBase::CBTEngPairBase( CBTEngPairMan& aParent, const TBTDevAddr& aAddr)
-    : iAddr( aAddr ), iParent( aParent )
-    {
-    }
-
-// ---------------------------------------------------------------------------
-// Symbian 2nd-phase constructor
-// ---------------------------------------------------------------------------
-//
-void CBTEngPairBase::BaseConstructL( )
-    {
-    iActive = CBTEngActive::NewL(*this, 0, CActive::EPriorityStandard);  
-    TRACE_BDADDR( iAddr );
-    }
-
-// ---------------------------------------------------------------------------
-// Destructor
-// ---------------------------------------------------------------------------
-//
-CBTEngPairBase::~CBTEngPairBase()
-    {
-    CancelNotifier();
-    iNotifier.Close();
-    delete iActive;
-    }
-
-// ---------------------------------------------------------------------------
-// Message passes through only if the result is for the same device this 
-// object is for.
-// ---------------------------------------------------------------------------
-//
-void CBTEngPairBase::HandlePairServerResult( const TBTDevAddr& aAddr, TInt aResult )
-    {
-    if ( aAddr == iAddr )
-        {
-        TRACE_FUNC_ENTRY
-        DoHandlePairServerResult( aResult );
-        TRACE_FUNC_EXIT
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Message passes through only if the result is for the same device this 
-// object is for.
-// ---------------------------------------------------------------------------
-//
-void CBTEngPairBase::HandleRegistryNewPairedEvent( const TBTNamelessDevice& aDev )
-    {
-    if ( aDev.Address() == iAddr )
-        {
-        TRACE_FUNC_ENTRY
-        DoHandleRegistryNewPairedEvent( aDev );
-        TRACE_FUNC_EXIT
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Default impl of virtual function. do nothing
-// ---------------------------------------------------------------------------
-//
-void CBTEngPairBase::CancelOutgoingPair()
-    {
-    }
-
-// ---------------------------------------------------------------------------
-// Cancel outstanding notifier
-// ---------------------------------------------------------------------------
-//
-void CBTEngPairBase::CancelNotifier()
-    {
-    if( iActive && iActive->IsActive() && 
-        iActive->RequestId() == EDevicePairUserNotification )
-        {
-        TRACE_FUNC_ENTRY
-        iNotifier.CancelNotifier( KBTPairedDeviceSettingNotifierUid );
-        iActive->Cancel();
-        TRACE_FUNC_EXIT
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Show the pairing result and ask the user to authorize the device.
-// ---------------------------------------------------------------------------
-//
-void CBTEngPairBase::ShowPairingNoteAndAuthorizeQuery()
-    {
-    TRACE_FUNC_ENTRY
-    if ( iActive->IsActive() )
-        {
-        // In profress of showing note, won't interrupt it:
-        return;
-        }
-    TInt err ( KErrNone );
-    if (!iNotifier.Handle())
-        {
-        err = iNotifier.Connect();
-        }
-    if ( !err )
-        {
-        // Inform the user of the pairing status.
-        iActive->SetRequestId( EDevicePairUserNotification );
-        iAuthoPckg().iPairingStatus = iPairResult;
-        iAuthoPckg().iRemoteAddr = iAddr;
-        iNotifier.StartNotifierAndGetResponse( iActive->RequestStatus(), 
-            KBTPairedDeviceSettingNotifierUid, 
-            iAuthoPckg, iAuthoPckg ); 
-        iActive->GoActive();
-        }
-    TRACE_FUNC_EXIT
-    }
-
-// ---------------------------------------------------------------------------
-// Invalidate iPairResultSet
-// ---------------------------------------------------------------------------
-//
-void CBTEngPairBase::UnSetPairResult()
-    {
-    iPairResultSet = EFalse;
-    }
-
-// ---------------------------------------------------------------------------
-// Save the result and validate the flag
-// ---------------------------------------------------------------------------
-//
-void CBTEngPairBase::SetPairResult( TInt aResult )
-    {
-    iPairResult = aResult;
-    iPairResultSet = ETrue;
-    }
-
-// ---------------------------------------------------------------------------
-// Returns the flag
-// ---------------------------------------------------------------------------
-//
-TBool CBTEngPairBase::IsPairResultSet()
-    {
-    return iPairResultSet;
-    }
-
-// ---------------------------------------------------------------------------
-// check AO validity and its request information
-// ---------------------------------------------------------------------------
-//
-TBool CBTEngPairBase::IsNotifyingPairResult()
-    {
-    return iActive && iActive->IsActive() && 
-        iActive->RequestId() == EDevicePairUserNotification ;
-    }
-
--- a/bluetoothengine/bteng/src/btengpairman.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,916 +0,0 @@
-/*
-* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Pairing result receiver in Bluetooth engine subsystem
-*
-*/
-
-#include "btengpairman.h"
-#include "btengserver.h"
-#include "btengsrvsession.h"
-#include "btengotgpair.h"
-#include "btengincpair.h"
-#include "btengclientserver.h"
-#include "debug.h"
-#include <e32property.h>
-
-/**  Identification for active object */
-enum TPairManActiveRequestId
-    {
-    ESimplePairingResult,
-    EAuthenticationResult,
-    ERegistryInitiatePairedDevicesView,
-    ERegistryPairedDevicesNewView,
-    ERegistryInitiatePairedDevicesList,
-    ERegistryGetPairedDevices,
-    ERegistryGetLocalAddress,
-    };
-
-/**  The message argument which holds the Bluetooth address. */
-const TInt KBTEngAddrSlot = 0;
-
-// ---------------------------------------------------------------------------
-// Tells if two TBTNamelessDevice instances are for the same remote device
-// ---------------------------------------------------------------------------
-//
-TBool CompareDeviceByAddress( const TBTNamelessDevice& aDevA, const TBTNamelessDevice& aDevB )
-    {
-    return aDevA.Address() == aDevB.Address();
-    }
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// C++ default constructor
-// ---------------------------------------------------------------------------
-//
-CBTEngPairMan::CBTEngPairMan( CBTEngServer& aServer )
-    : iServer( aServer )
-    {
-    }
-
-// ---------------------------------------------------------------------------
-// Symbian 2nd-phase constructor
-// ---------------------------------------------------------------------------
-//
-void CBTEngPairMan::ConstructL()
-    {
-    TRACE_FUNC_ENTRY
-        // Connect to pairing server for authentication & simple pairing 
-        // results directly from the BT stack.
-        // Pairing server doesn't exist if we run BT 2.0 stack:
-    iPairingServ = new (ELeave) RBluetoothPairingServer;
-    TInt err = iPairingServ->Connect();
-    if ( err)
-        {
-        delete iPairingServ;
-        iPairingServ = NULL;
-        }
-    else
-        {
-        User::LeaveIfError( iPairingResult.Open( *iPairingServ ) );
-        User::LeaveIfError( iAuthenResult.Open( *iPairingServ ) );
-        iSSPResultActive = CBTEngActive::NewL( *this, ESimplePairingResult, CActive::EPriorityStandard );
-        iAuthenResultActive = CBTEngActive::NewL( *this, EAuthenticationResult, CActive::EPriorityStandard );        
-        }
-
-    // RProperty for accessing the local device address
-    User::LeaveIfError( iPropertyLocalAddr.Attach(KPropertyUidBluetoothCategory, KPropertyKeyBluetoothGetLocalDeviceAddress) );
-
-    // connect to registry
-    User::LeaveIfError( iBTRegistry.Open( BTRegServ() ) );    
-    iRegistryActive = CBTEngActive::NewL( *this, ERegistryInitiatePairedDevicesView, CActive::EPriorityStandard );
-    iPairedDevices = new (ELeave) RArray<TBTNamelessDevice>; 
-
-    // Initialise paired devices list
-    iLocalAddrActive = CBTEngActive::NewL( *this, ERegistryGetLocalAddress, CActive::EPriorityStandard );
-    InitPairedDevicesList();
- 
-    TRACE_FUNC_EXIT
-    }
-
-// ---------------------------------------------------------------------------
-// NewL
-// ---------------------------------------------------------------------------
-//
-CBTEngPairMan* CBTEngPairMan::NewL( CBTEngServer& aServer )
-    {
-    CBTEngPairMan* self = NULL;
-    self = new  CBTEngPairMan( aServer );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-// Destructor
-// ---------------------------------------------------------------------------
-//
-CBTEngPairMan::~CBTEngPairMan()
-    {
-    TRACE_FUNC_ENTRY
-    CancelSubscribe();
-    delete iSSPResultActive;
-    delete iAuthenResultActive;
-    delete iRegistryActive;
-    delete iPairedDevicesResp;
-    delete iPairer;
-    if ( iPairedDevices )
-        {
-        iPairedDevices->Close();
-        delete iPairedDevices;
-        }
-    iBTRegistry.Close();
-    iPairingResult.Close();
-    iAuthenResult.Close();
-    if ( iPairingServ )
-        {
-        iPairingServ->Close();
-        delete iPairingServ;
-        }
-    if ( !iMessage.IsNull() )
-        {
-        iMessage.Complete( KErrCancel );
-        }
-    iPropertyLocalAddr.Cancel();
-    iPropertyLocalAddr.Close();
-    delete iLocalAddrActive;
-    TRACE_FUNC_EXIT
-    }
-
-// ---------------------------------------------------------------------------
-// Initialises the paired devices list.
-// If the local address is not available from the P&S key 
-// KPropertyKeyBluetoothGetLocalDeviceAddress, then the list may need to be 
-// updated once the H/W is switched on. This is so that any registry update 
-// from a restore operation can be included in the list, without mistaking the 
-// new devices for new pairings.
-// ---------------------------------------------------------------------------
-//
-void CBTEngPairMan::InitPairedDevicesList()
-    {
-    TRACE_FUNC_ENTRY
-
-    // Check that we have the Bluetooth local address. If we don't then initialise anyway, but subscribe for an update.
-    // This allows us to refresh our paired devices list to include updates made to the remote devices table of the 
-    // Bluetooth registry from a restore operation. We need to include these devices without mistaking them for new 
-    // pairings. We look solely at the P&S key for the address to avoid the condition whereby the address has been
-    // entered into the reigstry but the Bluetooth Manager server has not begun the restore process yet. The signalling
-    // of the P&S key will cause Bluetooth Manager to update the registry with any restored devices before fulfilling
-    // any further requests.
-
-    // Subscribe to local address property in case we need an update.
-    iPropertyLocalAddr.Subscribe( iLocalAddrActive->iStatus );
-    iLocalAddrActive->SetRequestId( ERegistryGetLocalAddress );
-    iLocalAddrActive->GoActive();
-
-    // Attempt to read address from P&S key.
-    TBuf8<KBTDevAddrSize> btAddrDes;
-    TInt err = iPropertyLocalAddr.Get( btAddrDes );
-
-    // Is the P&S key defined yet? (if not, stack not up yet)
-    if ( err == KErrNone )
-        {
-        // P&S key defined, is local address set? (if not, H/W not initialised yet)
-        if ( btAddrDes.Length() == KBTDevAddrSize )
-            {
-            TBTDevAddr btAddr = btAddrDes;
-
-            if ( btAddr != TBTDevAddr() )
-                {
-                // Non-zero local address is available.
-                iPropertyLocalAddr.Cancel();
-                iLocalAddrActive->CancelRequest();
-                }
-            }
-        }
-
-    // Perform initialisation of the paired devices list.
-    DoInitPairedDevicesList();
-
-    TRACE_FUNC_EXIT
-    }
-
-// ---------------------------------------------------------------------------
-// Initialises the paired devices list (second stage)
-// This method performs the actual initialisation, now that the local BT H/W
-// address had been made available.
-// ---------------------------------------------------------------------------
-//
-void CBTEngPairMan::DoInitPairedDevicesList()
-    {
-    TRACE_FUNC_ENTRY
-
-    if ( !iRegistryActive->IsActive() )
-        {
-        // Start to get the list of all paired devices.
-        CreatePairedDevicesView( ERegistryInitiatePairedDevicesView );
-        }
-    else
-        {
-        iNotHandledInitEventCounter++;
-        }
-
-    TRACE_FUNC_EXIT
-    }
-
-// ---------------------------------------------------------------------------
-// Handles pairing related commands from BTEng clients.
-// ---------------------------------------------------------------------------
-//
-void CBTEngPairMan::ProcessCommandL( const RMessage2& aMessage )
-    {
-    TRACE_FUNC_ENTRY
-    TInt opcode = aMessage.Function();
-    TBTDevAddrPckgBuf addrPkg;
-    switch( opcode )
-        {
-        case EBTEngSetPairingObserver:
-            {
-            aMessage.ReadL( KBTEngAddrSlot, addrPkg );
-            SetPairObserver( addrPkg(), aMessage.Int1() );
-            break;
-            }
-        case EBTEngPairDevice:
-            {
-            if ( !iMessage.IsNull() )
-                {
-                User::Leave( KErrServerBusy );
-                }
-            TBTDevAddrPckgBuf addrPkg;
-            aMessage.ReadL( KBTEngAddrSlot, addrPkg );
-            PairDeviceL( addrPkg(), aMessage.Int1() );
-            iMessage = RMessage2( aMessage );
-            break;
-            }
-        case EBTEngCancelPairDevice:
-            {
-            // Only the client who requested pairing can cancel it:
-            if ( !iMessage.IsNull() && aMessage.Session() == iMessage.Session() )
-                {
-                iPairer->CancelOutgoingPair();
-                iMessage.Complete( KErrCancel );
-                }
-            break;
-            }
-        default:
-            {
-            TRACE_INFO( ( _L( "CBTEngPairMan ProcessCommandL: bad request (%d)" ), 
-                           aMessage.Function() ) )
-            User::Leave( KErrArgument );
-            }
-        }
-    TRACE_FUNC_EXIT    
-    }
-
-// ---------------------------------------------------------------------------
-// Handle a change in BTRegistry remote devices table.
-// ---------------------------------------------------------------------------
-//
-void CBTEngPairMan::RemoteRegistryChangeDetected()
-    {
-    if ( !iRegistryActive->IsActive() )
-        {
-        CreatePairedDevicesView( ERegistryPairedDevicesNewView );
-        }
-    else
-        {
-        iNotHandledRegEventCounter++;
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Returns the RBluetoothPairingServer instance.
-// ---------------------------------------------------------------------------
-//
-RBluetoothPairingServer* CBTEngPairMan::PairingServer()
-    {
-    return iPairingServ;
-    }
-
-// ---------------------------------------------------------------------------
-// Access the reference of RSockServ
-// ---------------------------------------------------------------------------
-//
-RSocketServ& CBTEngPairMan::SocketServ()
-    {
-    return iServer.SocketServer();
-    }
-
-// ---------------------------------------------------------------------------
-// Access the reference of RBTRegSrv
-// ---------------------------------------------------------------------------
-//
-RBTRegServ& CBTEngPairMan::BTRegServ()
-    {
-    return iServer.RegistrServer();
-    }
-
-// ---------------------------------------------------------------------------
-// Deletes the current pairing handler and transfer the responsibility
-// to the specified.
-// ---------------------------------------------------------------------------
-//
-void CBTEngPairMan::RenewPairer( CBTEngPairBase* aPairer )
-    {
-    delete iPairer;
-    iPairer = aPairer;
-    }
-
-// ---------------------------------------------------------------------------
-// Find the session who requested this and completes its request.
-// ---------------------------------------------------------------------------
-//
-void CBTEngPairMan::OutgoingPairCompleted( TInt aErr )
-    {
-    TRACE_FUNC_ENTRY
-    // the meaning of KHCIErrorBase equals KErrNone. Hide this specific BT stack
-	// detail from clients:
-    if ( aErr == KHCIErrorBase )
-        {
-        aErr = KErrNone;
-        }
-    // we must complete client's pairing request:
-    if ( !iMessage.IsNull()  )
-        {
-        iMessage.Complete( aErr );
-        }
-    TRACE_FUNC_EXIT
-    }
-
-// ---------------------------------------------------------------------------
-// A session will be ended, completes the pending request for this session.
-// ---------------------------------------------------------------------------
-//
-void CBTEngPairMan::SessionClosed( CSession2* aSession )
-    {
-    TRACE_FUNC_ARG( ( _L( " session %x"), aSession ) )
-    if ( !iMessage.IsNull() && iMessage.Session() == aSession )
-        {
-        iMessage.Complete( KErrCancel );
-        }
-    TRACE_FUNC_EXIT
-    }
-
-// ---------------------------------------------------------------------------
-// Unpair the device from registry
-// ---------------------------------------------------------------------------
-//
-void CBTEngPairMan::UnpairDevice( const TBTDevAddr& aAddr )
-    {
-    TRACE_FUNC_ENTRY
-    TIdentityRelation<TBTNamelessDevice> addrComp( CompareDeviceByAddress );
-    TBTNamelessDevice dev;
-    dev.SetAddress( aAddr );
-    // only do unpairing if the we have a link key with it.
-    TInt index = iPairedDevices->Find( dev, addrComp );
-    if ( index > KErrNotFound )
-        {
-        dev = (*iPairedDevices)[index];
-        
-        TRequestStatus status( KRequestPending );
-        // Unpair the device in registry (synchronously)
-        iBTRegistry.UnpairDevice( dev.Address(), status );
-        User::WaitForRequest( status );
-        TRACE_INFO( ( _L( "Delete link key, res %d"), status.Int() ) )
-        
-        if ( status == KErrNone )
-            {
-            TBTDeviceSecurity security = dev.GlobalSecurity();
-            // Clear trust setting so that correct icon will be shown in ui applications.
-            security.SetNoAuthenticate(EFalse );
-            security.SetNoAuthorise(EFalse );
-            dev.SetGlobalSecurity(security);
-            dev.DeleteLinkKey();
-            if ( dev.IsValidUiCookie() && 
-                 ( dev.UiCookie() & EBTUiCookieJustWorksPaired ) )
-                {
-                // Remove the UI cookie bit for Just Works pairing.
-                TInt32 cookie = dev.UiCookie() & ~EBTUiCookieJustWorksPaired;
-                dev.SetUiCookie( cookie );
-                TRACE_INFO( ( _L( "UI cookie %x cleared"), EBTUiCookieJustWorksPaired ) );
-                }
-            // modify the device in registry synchronously
-            // status.Int() could be -1 if the device is not in registry 
-            // which is totally fine for us.
-            (void) UpdateRegDevice( dev );
-            }
-        }
-    TRACE_FUNC_EXIT
-    }
-
-TInt CBTEngPairMan::AddUiCookieJustWorksPaired( const TBTNamelessDevice& aDev )
-    {
-	TRACE_FUNC_ENTRY
-    TInt err( KErrNone );
-    // There might be UI cookies used by other applications,
-    // we should not overwrite them. 
-    TInt32 cookie = aDev.IsValidUiCookie() ? aDev.UiCookie() : EBTUiCookieUndefined;
-    if ( !( cookie & EBTUiCookieJustWorksPaired ) )
-        {
-        // Only update the cookie if the wanted one is not in registry yet
-        // to keep minimal operations with registry.
-        TBTNamelessDevice dev = aDev;		
-        cookie |= EBTUiCookieJustWorksPaired;
-        dev.SetUiCookie( cookie );
-        err = UpdateRegDevice( dev );
-        TRACE_INFO( ( _L( "[BTENG] CBTEngOtgPair write Ui cookie ret %d"), err ) );
-        }
-    TRACE_FUNC_EXIT
-    return err;
-    }
-
-// ---------------------------------------------------------------------------
-// update a nameless device in registry
-// ---------------------------------------------------------------------------
-//
-TInt CBTEngPairMan::UpdateRegDevice( const TBTNamelessDevice& aDev )
-    {
-    TRequestStatus status( KRequestPending );
-    // update the device in registry synchronously
-    iBTRegistry.ModifyDevice( aDev, status );
-    User::WaitForRequest( status );
-    TRACE_INFO( ( _L( "UpdateRegDevice, ret %d"), status.Int() ) )
-    return status.Int();
-    }
-
-// ---------------------------------------------------------------------------
-// Ask server class the connection status of the specified device
-// ---------------------------------------------------------------------------
-//
-TBTEngConnectionStatus CBTEngPairMan::IsDeviceConnected( const TBTDevAddr& aAddr )
-    {
-    return iServer.IsDeviceConnected( aAddr );
-    }
-
-// ---------------------------------------------------------------------------
-// From class MBTEngActiveObserver.
-// Checks if there is an authentication result.
-// ---------------------------------------------------------------------------
-//
-void CBTEngPairMan::RequestCompletedL( CBTEngActive* /*aActive*/, TInt aId, TInt aStatus )
-    {
-    TRACE_FUNC_ARG( ( _L( "aId: %d, aStatus: %d"), aId, aStatus ) )
-        // Check which request completed.
-    switch( aId )
-        {
-        case ESimplePairingResult:
-            {
-            TBTDevAddr tmpAddr = iSimplePairingRemote;
-            if (aStatus != KErrServerTerminated)
-                {
-                SubscribeSspPairingResult();
-                }
-            HandlePairingResultL( tmpAddr, aStatus );
-            break;
-            }
-        case EAuthenticationResult:
-            {
-            TBTDevAddr tmpAddr = iAuthenticateRemote;
-            if (aStatus != KErrServerTerminated)
-                {
-                SubscribeAuthenticateResult();
-                }
-            HandlePairingResultL( tmpAddr, aStatus );
-            break;
-            }
-        case ERegistryInitiatePairedDevicesView:
-        case ERegistryPairedDevicesNewView:
-            {
-            HandleCreatePairedDevicesViewCompletedL( aStatus, aId );
-            break;
-            }
-        case ERegistryInitiatePairedDevicesList:
-            {			
-			if (iSSPResultActive && iAuthenResultActive)
-				{
-				SubscribeSspPairingResult();
-				SubscribeAuthenticateResult();
-				}
-            HandleGetPairedDevicesCompletedL( aStatus, aId );
-            break;
-            }
-        case ERegistryGetPairedDevices:    
-            {
-            HandleGetPairedDevicesCompletedL( aStatus, aId );
-            break;
-            }
-        case ERegistryGetLocalAddress:
-            {
-            // Refresh paired devices list to include any restored devices.
-            DoInitPairedDevicesList();
-            break;
-            }
-        default:
-                // Should not be possible, but no need for handling.
-            TRACE_INFO( (_L("[BTEng]: CBTEngPairMan::RequestCompletedL unhandled event!!") ) )
-            break;
-        }
-    TRACE_FUNC_EXIT
-    }
-
-// ---------------------------------------------------------------------------
-// From class MBTEngActiveObserver.
-// ---------------------------------------------------------------------------
-//
-void CBTEngPairMan::HandleError( CBTEngActive* aActive, TInt aId, TInt aError )
-    {
-    TRACE_FUNC_ARG( ( _L( "request id: %d, error: %d" ), aId, aError ) )
-    (void) aActive;
-    (void) aError;
-    if ( aId == ERegistryInitiatePairedDevicesList || 
-         aId == ERegistryGetPairedDevices )
-        {// leave happened in registry operation, delete registry response:
-        delete iPairedDevicesResp;
-        iPairedDevicesResp = NULL;
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Activate or deactivate a pairing handler
-// ---------------------------------------------------------------------------
-//
-TInt CBTEngPairMan::SetPairObserver(const TBTDevAddr& aAddr, TBool aActivate)
-    {
-    TRACE_FUNC_ARG( ( _L( "%d" ), aActivate ) )
-    TRACE_BDADDR( aAddr )
-    iPairingOperationAttempted = ETrue;
-    TInt err( KErrNone );
-    if ( !aActivate )
-        {
-        if ( iPairer )
-            {
-            iPairer->StopPairHandling( aAddr );
-            }
-        return err;
-        }
-    
-    if ( !iPairer)
-        {
-        // This is an incoming pair, unpair it from registry and 
-        // create the handler:
-        UnpairDevice( aAddr );
-        TRAP( err, iPairer = CBTEngIncPair::NewL( *this, aAddr ));     
-        }
-    if ( iPairer)
-        {
-        // let the handler decide what to do:
-        err = iPairer->ObserveIncomingPair( aAddr );        
-        }    
-    TRACE_FUNC_EXIT
-    return err;
-    }
-
-// ---------------------------------------------------------------------------
-// Delegates the request to current pair handler
-// ---------------------------------------------------------------------------
-//
-void CBTEngPairMan::PairDeviceL( const TBTDevAddr& aAddr, TUint32 aCod )
-    {
-    iPairingOperationAttempted = ETrue;
-    if ( !iPairer)
-        {
-        // no existing pair handling, create one:
-        iPairer = CBTEngOtgPair::NewL( *this, aAddr );
-        }
-    // let pair handler decide what to do:
-    iPairer->HandleOutgoingPairL( aAddr, aCod );
-    }
-
-// ---------------------------------------------------------------------------
-// cancel Subscribings to simple pairing result and authentication result from
-// Pairing Server
-// ---------------------------------------------------------------------------
-//
-void CBTEngPairMan::CancelSubscribe()
-    {
-    TRACE_FUNC_ENTRY
-    if( iSSPResultActive && iSSPResultActive->IsActive() )
-        {
-            // Cancel listening Simple pairing result
-        iPairingResult.CancelSimplePairingResult();
-        iSSPResultActive->Cancel();
-        }
-    if( iAuthenResultActive && iAuthenResultActive->IsActive() )
-        {
-            // Cancel listening authentication result
-        iAuthenResult.CancelAuthenticationResult();
-        iAuthenResultActive->Cancel();
-        }
-    TRACE_FUNC_EXIT
-    }
-
-// ---------------------------------------------------------------------------
-// Subscribes to simple pairing result from Pairing Server (if not already 
-// subscribed).
-// ---------------------------------------------------------------------------
-//
-void CBTEngPairMan::SubscribeSspPairingResult()
-    {
-    TRACE_FUNC_ENTRY
-    if ( !iSSPResultActive->IsActive() )
-        {
-        iPairingResult.SimplePairingResult( iSimplePairingRemote, iSSPResultActive->RequestStatus() );
-        iSSPResultActive->GoActive();
-        }
-    TRACE_FUNC_EXIT
-    }
-
-// ---------------------------------------------------------------------------
-// Subscribes to authentication result from Pairing Server (if not already
-// subscribed).
-// ---------------------------------------------------------------------------
-//
-void CBTEngPairMan::SubscribeAuthenticateResult()
-    {
-    TRACE_FUNC_ENTRY
-    if ( !iAuthenResultActive->IsActive() )
-        {
-        // Subscribe authentication result (which requires pairing for unpaired devices)
-        iAuthenResult.AuthenticationResult( iAuthenticateRemote, iAuthenResultActive->RequestStatus() );
-        iAuthenResultActive->GoActive();
-        }
-    TRACE_FUNC_EXIT
-    }
-
-// ---------------------------------------------------------------------------
-// Handle a pairing result from the pairing server.
-// ---------------------------------------------------------------------------
-//
-void CBTEngPairMan::HandlePairingResultL( const TBTDevAddr& aAddr, TInt aResult )
-    {
-    TRACE_FUNC_ARG( (_L("result %d"), aResult ) )
-    TRACE_BDADDR( aAddr );
-    if ( !iPairer && ( aResult == KErrNone || aResult == KHCIErrorBase ) )
-        {
-        // we only create new handler if incoming pairing succeeds.
-        // Pairing failure could be caused by user local cancellation, as the  
-        // result, the handler was destroyed by notifier. We shall not
-        // instantiate the handler again.
-        // If a pairing failed due to other reasons than user local cancelling,
-        // it will be catched by the already started handler 
-        // (except Just Works pairing - no handler for it at all until we receive
-        // registry change event. Thus if incoming JWs pairing failed, no user
-        // notification will be shown.)
-        TBTNamelessDevice dev;
-        dev.SetAddress( aAddr );
-        TIdentityRelation<TBTNamelessDevice> addrComp( CompareDeviceByAddress );
-        TInt index = iPairedDevices->Find( dev, addrComp );
-        
-        // If the device is not found in the old paired device list, it is a new
-        // paired device:
-        if ( index == KErrNotFound)
-            {
-            // No handler yet, create incoming pairing handler:
-            iPairer = CBTEngIncPair::NewL( *this, aAddr );
-            }
-        }
-    if ( iPairer )
-        {
-        iPairer->HandlePairServerResult( aAddr, aResult );
-        }  
-
-    TRACE_FUNC_EXIT
-    }
-
-// ---------------------------------------------------------------------------
-// issue creating a bonded devices view
-// ---------------------------------------------------------------------------
-//
-void CBTEngPairMan::CreatePairedDevicesView( TInt aReqId )
-    {
-    TRACE_FUNC_ENTRY
-    if ( aReqId == ERegistryInitiatePairedDevicesView )
-        {
-        iNotHandledInitEventCounter = 0;
-        }
-    else
-        {
-        iNotHandledRegEventCounter = 0;
-        }
-    TBTRegistrySearch searchPattern;
-    searchPattern.FindBonded();
-    iRegistryActive->SetRequestId( aReqId );
-    iBTRegistry.CreateView( searchPattern, iRegistryActive->iStatus );
-    iRegistryActive->GoActive();
-    TRACE_FUNC_EXIT
-    }
-
-// ---------------------------------------------------------------------------
-// gets the paired devices from the view created by CreatePairedDevicesView
-// ---------------------------------------------------------------------------
-//
-void CBTEngPairMan::GetPairedDevices( TInt aReqId )
-    {
-    TRACE_FUNC_ENTRY
-    delete iPairedDevicesResp;
-    iPairedDevicesResp = NULL;
-    TRAP_IGNORE( iPairedDevicesResp = CBTRegistryResponse::NewL( iBTRegistry ) );
-    if ( iPairedDevicesResp )
-        {
-        iRegistryActive->SetRequestId( aReqId );
-        iPairedDevicesResp->Start( iRegistryActive->iStatus );
-        iRegistryActive->GoActive();
-        }
-    TRACE_FUNC_EXIT
-    }
-
-// ---------------------------------------------------------------------------
-// re-create a paired device view if registry was changed during the previous
-// operation. otherwise if the view is not empty, get the paired devices.
-// ---------------------------------------------------------------------------
-//
-void CBTEngPairMan::HandleCreatePairedDevicesViewCompletedL( TInt aStatus, TInt aReqId )
-    {
-    TRACE_FUNC_ENTRY
-
-    if ( aReqId == ERegistryInitiatePairedDevicesView )
-        {// Initialization phase, list paired devices if there are any.
-        if ( iNotHandledInitEventCounter )
-            {
-            // Reinitialisaton detected, create paired device view again:
-            (void) iBTRegistry.CloseView();
-            CreatePairedDevicesView( ERegistryInitiatePairedDevicesView );
-            }
-        else if ( aStatus > KErrNone )
-            {
-            GetPairedDevices( ERegistryInitiatePairedDevicesList );
-            }
-        else
-            {//no paired device, close the view.
-            (void) iBTRegistry.CloseView();
-            }
-        }
-    else
-        {
-        if ( iNotHandledInitEventCounter )
-            {
-            // We need to reinitialise but we may be pairing.
-            // This situation is not expected to arise, as reinitialisation means
-            // that the H/W was only just switched on.
-            // If we have ever started to take part in a pairing, then prioritise that
-            // pairing.
-            (void) iBTRegistry.CloseView();
-            if ( iPairingOperationAttempted )
-                {
-                iNotHandledInitEventCounter = 0;
-                CreatePairedDevicesView( ERegistryPairedDevicesNewView );
-                }
-            else
-                {
-                CreatePairedDevicesView( ERegistryInitiatePairedDevicesView );
-                }
-            }
-        else if (iNotHandledRegEventCounter)
-            { // more registry change detected, create paired device view again:
-            (void) iBTRegistry.CloseView();
-            CreatePairedDevicesView( ERegistryPairedDevicesNewView );
-            }          
-        else if ( aStatus > KErrNone )
-            { // paired device available, get them:
-            GetPairedDevices( ERegistryGetPairedDevices );
-            }
-        else
-            {
-            // No paired devices in registry, empty local db:
-            (void) iBTRegistry.CloseView();
-            iPairedDevices->Reset();
-            }
-        }
-    TRACE_FUNC_EXIT
-    }
-
-// ---------------------------------------------------------------------------
-// update paired device list. if registry was changed, create a new view.
-// otherwise check for new pairing event.
-// ---------------------------------------------------------------------------
-//
-void CBTEngPairMan::HandleGetPairedDevicesCompletedL( TInt /*aStatus*/, TInt aReqId )
-    {
-    TRACE_FUNC_ENTRY
-    (void) iBTRegistry.CloseView();
-    if ( aReqId == ERegistryInitiatePairedDevicesList )
-        {
-        if ( iNotHandledInitEventCounter )
-            {
-            // Reinitialisation required, create paired device view again:
-            CreatePairedDevicesView( ERegistryInitiatePairedDevicesView );
-            }
-        else
-            {
-            // We completed the initialisation of paired device list, 
-            // move all paired devices to the array:
-            UpdatePairedDeviceListL();
-            }
-        }
-    else
-        {
-        if (iNotHandledInitEventCounter)
-            {
-            // We need to reinitialise but we may be pairing.
-            // This situation is not expected to arise, as reinitialisation means
-            // that the H/W was only just switched on.
-            // If we have ever started to take part in a pairing, then prioritise that
-            // pairing.
-            if ( iPairingOperationAttempted )
-                {
-                iNotHandledInitEventCounter = 0;
-                CreatePairedDevicesView( ERegistryPairedDevicesNewView );
-                }
-            else
-                {
-                CreatePairedDevicesView( ERegistryInitiatePairedDevicesView );
-                }		
-            }     
-        else if (iNotHandledRegEventCounter)
-            { // more registry change detected, create paired device view again:
-            CreatePairedDevicesView( ERegistryPairedDevicesNewView );
-            }
-        else if ( aReqId == ERegistryGetPairedDevices)
-           {
-            // no more registry change detected, find new pairings:
-            CheckPairEventL();
-           }
-        }
-
-    TRACE_FUNC_EXIT
-    }
-
-// ---------------------------------------------------------------------------
-// copy the nameless devices to local array
-// ---------------------------------------------------------------------------
-//
-void CBTEngPairMan::UpdatePairedDeviceListL()
-    {
-    TRACE_FUNC_ENTRY
-    iPairedDevices->Reset();
-    for ( TInt i = 0; i < iPairedDevicesResp->Results().Count(); i++ )
-        {
-        TRACE_BDADDR( iPairedDevicesResp->Results()[i]->BDAddr() );
-        TRACE_INFO((_L("[BTENG]\t linkkeytype %d"), 
-                iPairedDevicesResp->Results()[i]->LinkKeyType()))
-        iPairedDevices->AppendL( iPairedDevicesResp->Results()[i]->AsNamelessDevice() );
-        }
-    delete iPairedDevicesResp;
-    iPairedDevicesResp = NULL;
-    TRACE_FUNC_EXIT
-    }
-
-// ---------------------------------------------------------------------------
-// find new paired devices. for each, delegate the information to
-// current pair handler.
-// ---------------------------------------------------------------------------
-//
-void CBTEngPairMan::CheckPairEventL()
-    {
-    TRACE_FUNC_ENTRY
-    RArray<TBTNamelessDevice>* pairedDevicesOld;
-    pairedDevicesOld = iPairedDevices;
-    CleanupStack::PushL( pairedDevicesOld );
-    CleanupClosePushL( *pairedDevicesOld );
-    iPairedDevices = NULL;
-    iPairedDevices = new (ELeave) RArray<TBTNamelessDevice>;
-    UpdatePairedDeviceListL();
-    
-    TIdentityRelation<TBTNamelessDevice> addrComp( CompareDeviceByAddress );
-    for ( TInt i = 0; i < iPairedDevices->Count(); i++ )
-        {
-        TBTNamelessDevice& dev = (*iPairedDevices)[i];        
-        TInt index = pairedDevicesOld->Find( dev, addrComp );
- 
-        // If the device is not found in the old paired device list or
-        // the link key type has been changed from 
-        // ELinkKeyUnauthenticatedUpgradable, the device is a new 
-        // paired device:
-        TBool newPaired = dev.LinkKeyType() != ELinkKeyUnauthenticatedUpgradable && 
-             ( index == KErrNotFound  || 
-                 ( index > KErrNotFound &&
-                 dev.LinkKeyType() != (*pairedDevicesOld)[index].LinkKeyType() ) );
-        TRACE_BDADDR( dev.Address() );
-        if ( newPaired && !iPairer)
-            {
-            iPairingOperationAttempted = ETrue;
-            iPairer = CBTEngIncPair::NewL( *this, dev.Address() );
-            }
-        if ( newPaired && iPairer )
-            {
-            // Ask pair handler to decide what to do:
-            iPairer->HandleRegistryNewPairedEvent( dev );
-            }
-        }
-    // Free old paired device list resource:
-    CleanupStack::PopAndDestroy( 2 );
-    TRACE_FUNC_EXIT
-    }
-
--- a/bluetoothengine/bteng/src/btengserver.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/bteng/src/btengserver.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -600,7 +600,8 @@
 //
 GLDEF_C TInt E32Main()
     {
-    __UHEAP_MARK;
+    //TODO uncomment UHEAP macros after orbit memory leaks are resolved till then it should be commented.
+//    __UHEAP_MARK;
     TRACE_FUNC_ENTRY
     CTrapCleanup* cleanup = CTrapCleanup::New();
     TInt err = KErrNoMemory;
@@ -609,6 +610,6 @@
         TRAP( err, RunServerL() );
         delete cleanup;
         }
-    __UHEAP_MARKEND;
+//    __UHEAP_MARKEND;
     return err;
     }
--- a/bluetoothengine/bteng/src/btengsrvsettingsmgr.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/bteng/src/btengsrvsettingsmgr.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -22,13 +22,14 @@
 #include <btengdomainpskeys.h>
 #include <centralrepository.h>
 #include <featmgr.h>
-#include <AknSmallIndicator.h>
-//#include <avkon.hrh>
 #include "btengserver.h"
 #include "btengsrvpluginmgr.h"
 #include "btengsrvbbconnectionmgr.h"
 #include "btengsrvstate.h"
 #include "debug.h"
+#include <btindicatorconstants.h>
+#include <hbindicatorsymbian.h>
+#include <hbsymbianvariant.h>
 
 /** ID of active object helper */
 const TInt KBTEngSettingsActive = 30;
@@ -48,7 +49,7 @@
 // ---------------------------------------------------------------------------
 //
 CBTEngSrvSettingsMgr::CBTEngSrvSettingsMgr( CBTEngServer* aServer )
-:   iServer( aServer )
+:   iServer( aServer ),iIndicatorState(-1)
     {
     }
 
@@ -61,6 +62,7 @@
     {
     TRACE_FUNC_ENTRY
     iActive = CBTEngActive::NewL( *this, KBTEngSettingsActive );
+    iBTIndicator = CHbIndicatorSymbian::NewL(); 
     LoadBTPowerManagerL();
     iEnterpriseEnablementMode = BluetoothFeatures::EnterpriseEnablementL();
     TRACE_INFO( ( _L( "iEnterpriseEnablementMode = %d" ), iEnterpriseEnablementMode) )
@@ -93,6 +95,7 @@
 CBTEngSrvSettingsMgr::~CBTEngSrvSettingsMgr()
     {
     delete iActive;  
+    delete iBTIndicator;
     iPowerMgr.Close();
     }
 
@@ -726,7 +729,7 @@
     TBTVisibilityMode visibilityMode = EBTVisibilityModeHidden;
     CRepository* cenrep = NULL;
     TInt phys = 0;
-    TInt connecting = 0;
+ //   TInt connecting = 0;
 
     cenrep = CRepository::NewLC( KCRUidBluetoothPowerState );
     User::LeaveIfError( cenrep->Get( KBTPowerState, (TInt&) powerState ) );
@@ -734,17 +737,13 @@
     
     if( powerState == EBTPowerOff )
         {
-        // To be migrated
-        //SetIndicatorStateL( EAknIndicatorBluetoothModuleOn, EAknIndicatorStateOff );
-        //SetIndicatorStateL( EAknIndicatorBluetooth, EAknIndicatorStateOff );
-        //SetIndicatorStateL( EAknIndicatorBluetoothModuleOnVisible, EAknIndicatorStateOff );
-        //SetIndicatorStateL( EAknIndicatorBluetoothVisible, EAknIndicatorStateOff );
+        SetIndicatorStateL(EBTIndicatorOff);
         }
     else
         {
         // Power is on.
         RProperty::Get( KPropertyUidBluetoothCategory, KPropertyKeyBluetoothPHYCount, phys );
-        RProperty::Get( KPropertyUidBluetoothCategory, KPropertyKeyBluetoothConnecting, connecting );
+ //       RProperty::Get( KPropertyUidBluetoothCategory, KPropertyKeyBluetoothConnecting, connecting );
         
         cenrep = CRepository::NewLC( KCRUidBTEngPrivateSettings );
         User::LeaveIfError( cenrep->Get( KBTDiscoverable, (TInt&) visibilityMode ) );
@@ -752,61 +751,44 @@
         
         if( visibilityMode == EBTVisibilityModeHidden )
             {
-             if ( connecting ) // BT connecting and hidden
+            if ( phys > 0 ) // BT connection active and hidden     
                 {
-                // To be migrated to QT
-                //SetIndicatorStateL( EAknIndicatorBluetoothModuleOn, EAknIndicatorStateOff );
-                //SetIndicatorStateL( EAknIndicatorBluetooth, EAknIndicatorStateAnimate );
-                }
-            else if ( phys > 0 ) // BT connection active and hidden     
-                {
-                //SetIndicatorStateL( EAknIndicatorBluetoothModuleOn, EAknIndicatorStateOff );
-                //SetIndicatorStateL( EAknIndicatorBluetooth, EAknIndicatorStateOn );
+                SetIndicatorStateL(EBTIndicatorHiddenConnected);
                 }
             else  // BT connection not active and hidden
                 {
-                //SetIndicatorStateL( EAknIndicatorBluetoothModuleOn, EAknIndicatorStateOn );
-                //SetIndicatorStateL( EAknIndicatorBluetooth, EAknIndicatorStateOff );
+                SetIndicatorStateL(EBTIndicatorOnHidden);
                 }
-            //SetIndicatorStateL( EAknIndicatorBluetoothModuleOnVisible, EAknIndicatorStateOff );
-            //SetIndicatorStateL( EAknIndicatorBluetoothVisible, EAknIndicatorStateOff );
             }           
         else if( visibilityMode == EBTVisibilityModeGeneral || visibilityMode == EBTVisibilityModeTemporary )
             {     
-            if ( connecting ) // BT connecting and visible
+            if ( phys > 0 ) // BT connection active and visible 
                 {
-                //SetIndicatorStateL( EAknIndicatorBluetoothModuleOnVisible, EAknIndicatorStateOff );
-                //SetIndicatorStateL( EAknIndicatorBluetoothVisible, EAknIndicatorStateAnimate );
-                }
-            else if ( phys > 0 ) // BT connection active and visible 
-                {
-                //SetIndicatorStateL( EAknIndicatorBluetoothModuleOnVisible, EAknIndicatorStateOff );
-                //SetIndicatorStateL( EAknIndicatorBluetoothVisible, EAknIndicatorStateOn );
+                SetIndicatorStateL(EBTIndicatorVisibleConnected);
                 }
             else  // BT connection not active and visible
                 {
-                //SetIndicatorStateL( EAknIndicatorBluetoothModuleOnVisible, EAknIndicatorStateOn );
-                //SetIndicatorStateL( EAknIndicatorBluetoothVisible, EAknIndicatorStateOff );
+                SetIndicatorStateL(EBTIndicatorOnVisible);
                 }
-            //SetIndicatorStateL( EAknIndicatorBluetoothModuleOn, EAknIndicatorStateOff );
-            //SetIndicatorStateL( EAknIndicatorBluetooth, EAknIndicatorStateOff );
             }
         }
     TRACE_FUNC_EXIT
     }
 
-// ---------------------------------------------------------------------------
-// ?implementation_description
-// ---------------------------------------------------------------------------
-//
-void CBTEngSrvSettingsMgr::SetIndicatorStateL( const TInt aIndicator, const TInt aState )
+void CBTEngSrvSettingsMgr::SetIndicatorStateL( const TInt aState )
     {
-    // To be migrated to QT
-    (void) aIndicator;
-    (void) aState;
-    //CAknSmallIndicator* indicator = CAknSmallIndicator::NewLC( TUid::Uid( aIndicator ) );
-    //indicator->SetIndicatorStateL( aState );
-    //CleanupStack::PopAndDestroy( indicator ); //indicator
+    TBool success = EFalse;
+    if(iIndicatorState != aState)
+        {
+        CHbSymbianVariant* parameters = CHbSymbianVariant::NewL(&aState,CHbSymbianVariant::EInt );
+        success = iBTIndicator->Activate(KIndicatorType(),parameters); 
+        delete parameters;
+        if(!success)
+            {
+            User::Leave(iBTIndicator->Error());
+            }
+        iIndicatorState = aState;
+        }
     }
 
 
--- a/bluetoothengine/bthid/bthidkbdsettings/inc/bthidsettingcontainer.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,98 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declares setting container class.
- *
-*/
-
-#ifndef BTHIDSETTINGCONTAINER_H
-#define BTHIDSETTINGCONTAINER_H
-
-/**
- *  CBTHidSettingContainer  
- *  container control class.
- */
-class CBTHidSettingContainer : public CCoeControl, public MCoeControlObserver
-    {
-public:
-    // Constructors and destructor
-
-    /**
-     * EPOC default constructor.
-     * @param aRect Frame rectangle for container.
-     */
-    void ConstructL(const TRect& aRect);
-
-    /**
-     * Constructs common parts of the container.
-     * @param aRect control's rect.
-     */
-    void BaseConstructL(const TRect& aRect);
-
-    /**
-     * Destructor.
-     */
-    ~CBTHidSettingContainer();
-
-private:
-    // Functions from base classes
-
-    /**
-     * From CCoeControl,Draw.
-     */
-    void Draw(const TRect& aRect) const;
-
-    /**
-     * From CCoeControl
-     */
-    void HandleResourceChange(TInt aType);
-
-    /**
-     * From CoeControl,SizeChanged.
-     */
-    void SizeChanged();
-
-    /**
-     * From CoeControl,CountComponentControls.
-     */
-    TInt CountComponentControls() const;
-
-    /**
-     * From CCoeControl,ComponentControl.
-     */
-    CCoeControl* ComponentControl(TInt aIndex) const;
-
-    /**
-     * From MCoeControlObserver
-     */
-    void HandleControlEventL(CCoeControl* aControl, TCoeEvent aEventType);
-
-    /**
-     * Pass skin information if needed.
-     */
-    TTypeUid::Ptr MopSupplyObject(TTypeUid aId);
-
-    /**
-     * From CCoeControl
-     */
-    void GetHelpContext(TCoeHelpContext& aContext) const;
-
-private:
-    //data
-    CAknsBasicBackgroundControlContext* iBackGround; //for skins support
-
-
-    };
-
-#endif // BTHIDSETTINGCONTAINER_H
-// End of File
--- a/bluetoothengine/bthid/bthidkbdsettings/inc/bthidsettinglist.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declares settings list class.
- *
-*/
-
-
-#ifndef __BTHIDSETTINGLIST_H__
-#define __BTHIDSETTINGLIST_H__
-
-#include <aknsettingitemlist.h>
-
-class CBtHidSettings;
-class CBtHidSettingView;
-
-class CBTKeySettingList : public CAknSettingItemList
-    {
-public:
-    CBTKeySettingList(CBtHidSettings& aSettings,
-            CBtHidSettingView* aBtHidSettingView);
-
-    CAknSettingItem* CreateSettingItemL(TInt identifier);
-
-    // handles the listbox events
-    virtual void HandleListBoxEventL(CEikListBox* aListBox,
-            TListBoxEvent aEventType);
-
-    void EditCurrentItemL(TInt aCommand);
-
-private:
-    void SizeChanged();
-
-private:
-    // From CCoeControl
-
-private:
-    /*! A reference to the BtHidSettings object */
-    CBtHidSettings& iSettings;
-
-    /*! Temporary layout code variable */
-    TInt iLayoutCode;
-
-    CBtHidSettingView* iBtHidSettingView;
-    };
-
-#endif
-
--- a/bluetoothengine/bthid/bthidkbdsettings/inc/bthidsettingview.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,169 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declares the setting view for keyboard device.
- *
-*/
-
-
-#ifndef BTHIDSETTINGVIEW_H
-#define BTHIDSETTINGVIEW_H
-
-// INCLUDES
-
-#include <aknview.h>        // AVKON components
-#include <akncontext.h>
-#include <eikmenup.h>       // Menu pane definitions
-#include <ConeResLoader.h>
-#include <btdevice.h>
-#include "BtuiPluginInterface.h"
-#include "bthidsettings.h"
-#include "bthidsettinglist.h"
-#include "bthidcenrepwatcher.h"
-// FORWARD DECLARATIONS
-class CBTHidSettingContainer;
-class CBTKeySettingList;
-#include "bthidsettings.h"
-#include "layoutmgr.h"
-#include "hidlayoutids.h"
-// CONSTANTS
-_LIT(KFileDrive,"z:");
-_LIT(KResourceFileName, "BthidResource.rsc");
-
-// CLASS DECLARATION
-
-/**
- * Main view of the application. Handles view activation, 
- * deactivation, commands and dynamic options menus.
- */
-class CBtHidSettingView : public CBtuiPluginInterface,
-        public MBtHidCenRepObserver
-    {
-public:
-    // Constructors and destructor
-
-    /**
-     * ECOM implementation instantiation function of 
-     * interface "CBtuiPluginInterface", to be used by BtuiPairedView.
-     */
-    static CBtHidSettingView* NewBtuiPluginL( /* TAny* aAppUi */);
-
-    /**
-     * Destructor.
-     */
-    virtual ~CBtHidSettingView();
-
-protected:
-
-    /**
-     * C++ default constructor.
-     */
-    CBtHidSettingView(/* CAknViewAppUi* aAppUi */);
-
-    /**
-     * Symbian 2nd phase constructor.
-     */
-    void ConstructL();
-
-public:
-    // Functions from base classes
-
-    /**
-     * From CAknView Returns view id.
-     * @param None.
-     * @return View id.
-     */
-    TUid Id() const;
-
-    /**
-     * From CAknView Handles user commands.
-     * @param aCommand A command id.        
-     * @return None.
-     */
-    void HandleCommandL(TInt aCommand);
-    void CenRepDataChanged(TUid& aUid, TUint32 aKey);
-
-private:
-    // Functions from base classes
-
-    /**
-     * From CAknView Activates view.
-     * @param aPrevViewId Id of previous view.
-     * @param aCustomMessageId Custom message id.
-     * @param aCustomMessage Custom message.
-     * @return None.
-     */
-    void DoActivateL(const TVwsViewId& aPrevViewId, TUid aCustomMessageId,
-            const TDesC8& aCustomMessage);
-
-    /**
-     * From CAknView Deactivates view.        
-     * @param None.
-     * @return None.
-     */
-    void DoDeactivate();
-
-    /**
-     * From CAknView Dynamically initialises options menu.
-     * @param aResourceId Id identifying the menu pane to initialise.
-     * @param aMenuPane The in-memory representation of the menu pane.
-     * @return None.
-     */
-    void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane);
-
-public:
-    // New functions
-
-
-private:
-
-    /**
-     * Creates List Box
-     */
-    void CreateSettingListL();
-    THidKeyboardLayoutId CurrentLayoutL() const;
-
-    void SetNavipaneTextL(const TDesC8& aDeviceName);
-
-public:
-    void SetCurrentLayoutL(THidKeyboardLayoutId aLayoutValue);
-
-private:
-    // Data
-    CBTHidSettingContainer* iContainer;
-    CBtHidSettings* iSettings; // Settings handler class
-    CBTKeySettingList* iSettingList; // The settings-list list view
-
-    //CIdle*                          iIdle;              	// Idle time class (for doing operation delayed)
-    TVwsViewId iPrevViewId; // Previous view of GS app.
-    TInt iResourceFileFlag; // Flag for eikon env.
-    CEikonEnv* iEikEnv;
-
-    /*! The Layout Manager Server session */
-    RLayoutManager iLayoutSession;
-
-    /*! The last keyboard layout selected by the user */
-    THidKeyboardLayoutId iLastSelectedLayout;
-    TBool iIsNokiaKeyboard;
-    /**
-     * Needed when creating navipane text
-     * Own this pointer
-     */
-    CAknNavigationDecorator* iNaviDecorator;
-    CAknContextPane* iContextPane;
-    CBtHidCenRepWatcher* iCenRepWatcher;
-
-    };
-
-#endif // BTHIDSETTINGVIEW_H
-// End of File
--- a/bluetoothengine/bthid/bthidkbdsettings/inc/btkeyenumtextsettingitem.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declares the setting view for keyboard device.
- *
-*/
-
-
-#ifndef __BTKEYENUMTEXTSETTINGITEM_H__
-#define __BTKEYENUMTEXTSETTINGITEM_H__
-
-#include <aknsettingitemlist.h>
-
-class CBtHidSettings;
-class CBtHidSettingView;
-
-class CBTKeyEnumTextSettingItem : public CAknEnumeratedTextPopupSettingItem
-    {
-public:
-
-    /*!
-     Constructs this object
-     */
-    CBTKeyEnumTextSettingItem(TInt aResourceId, TInt& aValue,
-            CBtHidSettings& aSettings, CBtHidSettingView* aBtHidSettingView);
-
-    /*!
-     Destroy the object and release all memory objects
-     */
-    ~CBTKeyEnumTextSettingItem();
-
-public:
-    // from CAknSettingItem
-    void HandleSettingPageEventL(CAknSettingPage *aSettingPage,
-            TAknSettingPageEvent aEventType);
-
-private:
-    CBtHidSettings& iSettings;
-    CBtHidSettingView* iBtHidSettingView;
-    };
-
-#endif // __BTKEYENUMTEXTSETTINGITEM_H__
--- a/bluetoothengine/bthid/bthidkbdsettings/src/bthidpluginimplementationtable.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*        ECOM proxy table for this plugin
-*
-*/
-
-
-// System includes
-//
-#include <e32std.h>
-#include <ecom/implementationproxy.h>
-
-// User includes
-//
-#include "bthidsettingview.h"
-#include "hiduids.h"
-
-// Constants
-//
-const TImplementationProxy KBtHidPluginImplementationTable[] =
-    {
-        // UPDATE THIS - Uid for plugin implementation:
-
-        //This impl is for BtuiPluginInterface.
-        IMPLEMENTATION_PROXY_ENTRY( KBDSETTINGS_UIPLUGIN_IMP,	CBtHidSettingView::NewBtuiPluginL ),
-    };
-
-
-// ---------------------------------------------------------------------------
-// ImplementationGroupProxy
-// Gate/factory function
-//
-// ---------------------------------------------------------------------------
-//
-EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
-    {
-    aTableCount = sizeof(KBtHidPluginImplementationTable)
-                  / sizeof(TImplementationProxy);
-    return KBtHidPluginImplementationTable;
-    }
--- a/bluetoothengine/bthid/bthidkbdsettings/src/bthidsettingcontainer.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,199 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This is the implementation of setting container class
-*
-*/
-
-
-// INCLUDE FILES
-#include <AknUtils.h>  // for font
-#include <AknsDrawUtils.h>// skin
-#include <AknsBasicBackgroundControlContext.h> //skin
-#include <BthidResource.rsg>
-#include "bthidsettingcontainer.h"
-#ifdef __SERIES60_HELP
-#include <hlplch.h>
-#include <csxhelp/bt.hlp.hrh> // The bt hrh info is needed, for help launching
-#endif
-#include "btui.h"
-#include "debug.h"
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------
-// CBTHidSettingContainer::ConstructL(const TRect& aRect)
-// EPOC two phased constructor
-// ---------------------------------------------------------
-//
-void CBTHidSettingContainer::ConstructL(const TRect& aRect)
-    {
-    CreateWindowL(); //makes the control a window-owning control
-    BaseConstructL( aRect );
-    }
-
-// ---------------------------------------------------------
-// CBTHidBaseContainer::BaseConstructL()
-// ---------------------------------------------------------
-//
-void CBTHidSettingContainer::BaseConstructL( const TRect& aRect )
-    {
-    SetRect(aRect);
-    iBackGround = CAknsBasicBackgroundControlContext::NewL( KAknsIIDQsnBgAreaMain, Rect(), EFalse );
-    ActivateL();
-    }
-
-
-// Destructor
-CBTHidSettingContainer::~CBTHidSettingContainer()
-    {
-    delete iBackGround;
-    }
-
-
-// ---------------------------------------------------------------------------
-// CBTHidSettingContainer::SizeChanged
-// called by framwork when the view size is changed
-//
-// ---------------------------------------------------------------------------
-//
-void CBTHidSettingContainer::SizeChanged()
-    {
-    TRACE_INFO( (_L("[BTHID]\t CBTHidBaseContainer::SizeChanged(); Width %d Height %d "),Rect().Height(), Rect().Width()));
-
-    //Handle SizeChanged for Skin
-    TRect parentRect(Rect());
-    if (iBackGround)
-        iBackGround->SetRect(parentRect);
-    }
-
-// ---------------------------------------------------------------------------
-// CBTHidSettingContainer::CountComponentControls
-//
-//
-// ---------------------------------------------------------------------------
-//
-TInt CBTHidSettingContainer::CountComponentControls() const
-    {
-    return 0;
-    }
-
-// ---------------------------------------------------------------------------
-// CBTHidSettingContainer::ComponentControl
-//
-//
-// ---------------------------------------------------------------------------
-//
-CCoeControl* CBTHidSettingContainer::ComponentControl(TInt /*aIndex*/) const
-    {
-    return NULL;
-    }
-
-void CBTHidSettingContainer::HandleControlEventL(CCoeControl* /*aControl*/,TCoeEvent /*aEventType*/)
-    {
-    // TODO: Add your control event handler code here
-    }
-
-// ---------------------------------------------------------
-// CBTHidBaseContainer::HandleResourceChange
-// ---------------------------------------------------------
-//
-
-void CBTHidSettingContainer::HandleResourceChange( TInt aType )
-    {
-
-    //Handle change in layout orientation
-    if (aType == KEikDynamicLayoutVariantSwitch)
-        {
-
-        //TRect rect = iAvkonAppUi->ClientRect();
-        // The line above provides to big rectangle in the bottom causing cba's overdrawn by by blank area.
-        // Correct way to do this is below.
-        TRect mainPaneRect;
-        AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane, mainPaneRect);
-        SetRect(mainPaneRect);
-        DrawNow();
-        }
-
-    else
-        {
-        CCoeControl::HandleResourceChange(aType);
-        }
-    }
-
-// ---------------------------------------------------------
-// CBTHidBaseContainer::Draw(const TRect& aRect) const
-// ---------------------------------------------------------
-//
-void CBTHidSettingContainer::Draw(const TRect& aRect) const
-    {
-    TRACE_FUNC(_L("[BTHID]\t CBTHidSettingContainer::Draw()"));
-    TRgb color;
-
-    CWindowGc& gc = SystemGc();
-
-    // draw background
-    MAknsSkinInstance* skin = AknsUtils::SkinInstance();
-
-    // get skin text color
-    AknsUtils::GetCachedColor( skin, color , KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG6);
-    gc.SetPenColor( color );
-
-    MAknsControlContext* cc = AknsDrawUtils::ControlContext( this );
-    AknsDrawUtils::Background( skin, cc, this, gc, aRect );
-    }
-
-// ---------------------------------------------------------
-// CBTHidBaseContainer::MopSupplyObject()
-// Pass skin information if needed.
-// ---------------------------------------------------------
-//
-TTypeUid::Ptr CBTHidSettingContainer::MopSupplyObject(TTypeUid aId)
-    {
-    if(aId.iUid == MAknsControlContext::ETypeId && iBackGround)
-        {
-        return MAknsControlContext::SupplyMopObject( aId, iBackGround);
-        }
-
-    return CCoeControl::MopSupplyObject( aId );
-    }
-
-#ifdef __SERIES60_HELP
-
-// ---------------------------------------------------------
-// From CCoeControl
-// CBTHidSettingContainer::GetHelpContext
-// ---------------------------------------------------------
-//
-void CBTHidSettingContainer::GetHelpContext(TCoeHelpContext& aContext) const
-    {
-    TRACE_FUNC_ENTRY
-
-    aContext.iMajor = KBtuiUid3;
-    aContext.iContext = KBTKEYBOARD_HLP_SETTINGS;
-    }
-
-#else
-
-// ---------------------------------------------------------
-// From CCoeControl
-// CBTHidSettingContainer::GetHelpContext
-// ---------------------------------------------------------
-//
-void CBTHidSettingContainer::GetHelpContext(TCoeHelpContext& /*aContext*/) const
-    {
-    TRACE_FUNC_ENTRY    
-    }
-
-#endif
-// End of File
--- a/bluetoothengine/bthid/bthidkbdsettings/src/bthidsettingview.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,436 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This is the implementation of setting view class
-*
-*/
-
-#include <aknViewAppUi.h>
-#include <avkon.hrh>
-#include <eiklabel.h>
-#include <akntitle.h>
-#include <StringLoader.h>
-#include <hlplch.h>                   // Help launcher
-#include <aknradiobuttonsettingpage.h>
-#include <bautils.h>
-#include <BthidResource.rsg>
-#include <csxhelp/bt.hlp.hrh>           // Help IDs
-#include <aknnavide.h>
-#include <akncontext.h>
-#include "bthidsettingview.h"
-#include "bthidsettingcontainer.h"
-#include "bthidsettings.h"
-#include "bthidsettinglist.h"
-#include "btkeyboard.hrh"
-#include <btkeyboard.mbg>
-#include "btengprivatecrkeys.h"
-#include "layoutmgr.h"
-#include "hidlayoutids.h"
-#include "debug.h"
-
-const TUid KBtHidSettingViewId =
-    {
-        0x2001E30B
-    }
-    ; // UID of HID device setting view.
-// ---------------------------------------------------------
-// CBtHidSettingView::NewNewGsPluginL
-// Two phased constructor
-// ---------------------------------------------------------
-//
-CBtHidSettingView* CBtHidSettingView::NewBtuiPluginL()
-    {
-    //TRACE_FUNC(_L("[BTHID]\t CBtHidSettingView::NewBtuiPluginL(), BEGIN"));
-
-    CBtHidSettingView* self = new (ELeave) CBtHidSettingView();
-
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop();
-
-    //TRACE_INFO( (_L("[BTHID]\t CBtHidSettingView[0x%08x]::NewBtuiPluginL, END"),self) );
-
-    return self;
-    }
-
-
-// ----------------------------------------------------
-// CBtHidSettingView::CBtHidSettingView
-// default constructor
-// ----------------------------------------------------
-//
-CBtHidSettingView::CBtHidSettingView()
-    {}
-
-// ----------------------------------------------------
-// CBtHidSettingView::ConstructL
-// ----------------------------------------------------
-//
-void CBtHidSettingView::ConstructL()
-    {
-    TRACE_INFO( (_L("[BTHID]\t CBtHidSettingView[0x%08x]:ConstructL(), BEGIN"),this) );
-
-    User::LeaveIfError(iLayoutSession.Connect());
-
-    // Check to see what type of layout code the layout manager will return
-    // us. (i.e nokia or standard)
-    // This is used to know which settings page to display.
-    TBool ignore;
-    TRACE_INFO(_L("[BTHID]\t CBtHidMainView::ConstructL(), get layout info..."));
-    User::LeaveIfError(iLayoutSession.GetDeviceInfo(iIsNokiaKeyboard, ignore));
-
-    iEikEnv = CEikonEnv::Static();
-    TFileName filename;
-    filename += KFileDrive;
-    filename += KDC_RESOURCE_FILES_DIR;
-    filename += KResourceFileName;
-    BaflUtils::NearestLanguageFile( iEikEnv->FsSession(), filename );
-    iResourceFileFlag=iEikEnv->AddResourceFileL(filename);
-    BaseConstructL( R_BTKEYBOARD_SETTING_VIEW );
-
-    CEikStatusPane *sp = ((CAknAppUi*)iEikonEnv->EikAppUi())->StatusPane();
-    // Fetch pointer to the default title pane control
-    iContextPane = (CAknContextPane *)sp->ControlL(TUid::Uid(EEikStatusPaneUidContext));
-
-    iSettings = CBtHidSettings::NewL();
-
-    TRACE_INFO( (_L("[BTHID]\t CBtHidSettingView[0x%08x]:ConstructL(), END"),this) );
-    }
-// ----------------------------------------------------
-// CBtHidSettingView::~CBtHidSettingView()
-// Destructor
-// Frees reserved resources
-// ----------------------------------------------------
-//
-CBtHidSettingView::~CBtHidSettingView()
-    {
-    TRACE_INFO( (_L("[BTHID]\t CBtHidSettingView[0x%08x]::~CBtHidSettingView()"), this) );
-    iLayoutSession.Close();
-
-    delete iNaviDecorator;
-    iEikEnv->DeleteResourceFile(iResourceFileFlag);
-
-    if ( iSettingList )
-        {
-        AppUi()->RemoveFromStack( (CCoeControl*) iSettingList );
-        delete iSettingList;
-        }
-    if ( iContainer )
-        {
-        AppUi()->RemoveFromStack(iContainer );
-        delete iContainer;
-        }
-    if( iCenRepWatcher )
-        delete iCenRepWatcher;
-
-    if (iSettings )
-        delete iSettings;
-    TRACE_FUNC_EXIT
-    }
-
-// ---------------------------------------------------------
-// TUid CBtHidSettingView::Id
-// ---------------------------------------------------------
-//
-TUid CBtHidSettingView::Id() const
-    {
-    TUid id = KBtHidSettingViewId;    //view id
-    return id;
-    }
-
-// ----------------------------------------------------
-// CBtHidSettingView::HandleCommandL(TInt aCommand)
-// takes care of command handling
-// ----------------------------------------------------
-//
-void CBtHidSettingView::HandleCommandL(TInt aCommand)
-    {
-    TRACE_INFO( (_L("[BTHID]\t CBtHidSettingView[0x%08x]::HandleCommandL(%d)"),this, aCommand) );
-    switch ( aCommand )
-        {
-        case EEikCmdExit:           // fall-through, handled similarily
-        case EAknSoftkeyExit:       // fall-through, handled similarily
-        //case EBTKeyCmdExit:
-            {
-            AppUi()->HandleCommandL( EEikCmdExit);
-            }
-        case EAknSoftkeyChange:
-        case EBTKeyCmdAppChange:
-            {
-            if( iSettingList )
-                {
-                iCenRepWatcher->DisableNotifications();
-                iSettingList->EditCurrentItemL( aCommand );
-                iCenRepWatcher->EnableNotifications();
-                }
-            break;
-            }
-        case EAknSoftkeyBack:
-            {
-            AppUi()->ActivateLocalViewL( iPrevViewId.iViewUid );
-            break;
-            }
-
-#ifdef __SERIES60_HELP
-        case EBTKeyCmdAppHelp:
-            {
-            HlpLauncher::LaunchHelpApplicationL(
-                    iEikEnv->WsSession(), AppUi()->AppHelpContextL());
-            break;
-            }
-
-#endif
-        default:
-            {
-            AppUi()->HandleCommandL( aCommand );
-            break;
-            }
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// CBtHidSettingView::DoActivateL()
-// ---------------------------------------------------------------------------
-//
-void CBtHidSettingView::DoActivateL( const TVwsViewId& aPrevViewId,
-                                     TUid aCustomMessageId,
-                                     const TDesC8& aCustomMessage )
-    {
-    TRACE_INFO( (_L("[BTHID]\t CBtHidSettingView[0x%08x]::DoActivateL, BEGIN"),this) );
-    iPrevViewId = aPrevViewId;
-    (void) aCustomMessageId;
-
-    // Setup the title
-    HBufC* title;
-    title = iCoeEnv->AllocReadResourceLC(R_BTKEYBOARD_SETTINGS_STATUS_PANE_TITLE);
-
-    CEikStatusPane* statusPane = StatusPane();
-    CAknTitlePane* titlePane;
-    titlePane = (CAknTitlePane*) statusPane->ControlL(TUid::Uid(EEikStatusPaneUidTitle));
-    titlePane->SetTextL(title->Des());
-    CleanupStack::PopAndDestroy(); // title
-    title = NULL;
-
-    TRACE_INFO( (_L("[BTHID]\t CBtHidSettingView[0x%08x]::DoActivateL(), Creating container..."),this) );
-    iContainer = new (ELeave) CBTHidSettingContainer;
-    iContainer->SetMopParent(this);
-    iContainer->ConstructL( ClientRect());
-    iContainer->MakeVisible( ETrue );
-    iContainer->ActivateL();
-    AppUi()->AddToStackL(iContainer);
-
-    CreateSettingListL();
-    iCenRepWatcher = CBtHidCenRepWatcher::NewL( KCRUidBTEngPrivateSettings, *this ); // create listener for cenrep events.
-    SetNavipaneTextL(aCustomMessage);
-
-    TRACE_INFO((_L("[BTHID]\t CBtHidSettingView[0x%08x]::DoActivateL, END"),this) );
-    }
-
-
-// ---------------------------------------------------------------------------
-// CBtHidSettingView::DoDeactivate
-//
-// Deactivate the settings view.
-// ---------------------------------------------------------------------------
-//
-void CBtHidSettingView::DoDeactivate()
-    {
-    TRACE_INFO( (_L("[BTHID]\t CBtHidSettingView[0x%08x]::DoDeactivate, BEGIN"),this) );
-    if ( iSettingList )
-        {
-        AppUi()->RemoveFromStack( (CCoeControl*) iSettingList );
-        delete iSettingList;
-        iSettingList = NULL;
-        }
-    if( iContainer )
-        {
-        iContainer->MakeVisible(EFalse);
-        AppUi()->RemoveFromStack( iContainer );
-        delete iContainer;
-        iContainer = NULL;
-        }
-
-    if (iNaviDecorator)
-        {
-        delete iNaviDecorator;
-        iNaviDecorator = NULL;
-        }
-    iLastSelectedLayout = iSettings->LoadLayoutSetting();
-    iLayoutSession.SetLayout(iLastSelectedLayout);
-    delete iCenRepWatcher;
-    iCenRepWatcher = NULL;
-    TRACE_FUNC_EXIT
-    }
-
-// ----------------------------------------------------
-// CBtHidSettingView::DynInitMenuPaneL
-// ----------------------------------------------------
-//
-void CBtHidSettingView::DynInitMenuPaneL(
-    TInt aResourceId, CEikMenuPane* aMenuPane)
-    {
-    if (aResourceId == R_BTKEYBOARD_SETTING_MENU )
-        {
-        aMenuPane->SetItemDimmed(EBTKeyCmdAppChange, ETrue); 
-        }
-    
-    
-    }
-
-// ----------------------------------------------------
-// CBtHidSettingView::CreateSettingListL
-// ----------------------------------------------------
-//
-void CBtHidSettingView::CreateSettingListL()
-    {
-    TRACE_INFO( (_L("[BTHID]\t CBtHidSettingView[0x%08x]::CreateSettingListL, BEGIN"),this) );
-
-    TInt resourceId = R_BTKEYBOARD_STANDARD_SETTING_LIST;
-
-    TBool foundLayout;
-    User::LeaveIfError(iLayoutSession.GetDeviceInfo(iIsNokiaKeyboard, foundLayout));
-
-    if(iIsNokiaKeyboard)
-        {
-        resourceId = R_BTKEYBOARD_NOKIA_SETTING_LIST;
-        }
-    else
-        {
-        resourceId = R_BTKEYBOARD_STANDARD_SETTING_LIST;
-        }
-
-    TInt layoutCode;
-    if ( !foundLayout )
-        {
-        //No layout found, find an appropriate one.
-        layoutCode = CurrentLayoutL();
-        SetCurrentLayoutL(static_cast<THidKeyboardLayoutId>(layoutCode));
-        }
-    else
-        {
-        //Layout found, load it as default
-        iLayoutSession.GetLayout(layoutCode);
-        SetCurrentLayoutL(static_cast<THidKeyboardLayoutId>(layoutCode));
-        }
-
-    if ( iSettingList )
-        {
-        AppUi()->RemoveFromStack( (CCoeControl*) iSettingList );
-        }
-    delete iSettingList;
-    iSettingList = NULL;
-
-    iSettingList = new (ELeave) CBTKeySettingList( *iSettings, this);
-    iSettingList->SetMopParent(this);
-    iSettingList->ConstructFromResourceL(resourceId);
-    AppUi()->AddToStackL( (CCoeControl*) iSettingList );
-    iSettingList->MakeVisible(ETrue);
-    iSettingList->SetRect(ClientRect());
-    iSettingList->ActivateL();
-    iSettingList->DrawNow();
-    TRACE_INFO( (_L("[BTHID]\t CBtHidSettingView[0x%08x]::CreateSettingListL, END"),this) );
-    }
-
-// ----------------------------------------------------
-// CBtHidSettingView::SetCurrentLayoutL
-// ----------------------------------------------------
-//
-void CBtHidSettingView::SetCurrentLayoutL(THidKeyboardLayoutId aLayoutValue)
-    {
-    // Ask the layout manager to change layout.
-    // Use the leaving version so we the user can't confirm a selection
-    // if an error occurs.
-    iLayoutSession.SetLayoutL(aLayoutValue);
-
-    iSettings->SaveLayoutSettingL( aLayoutValue );
-    }
-
-THidKeyboardLayoutId CBtHidSettingView::CurrentLayoutL() const
-    {
-    // Ask the layout manager for the current layout.
-    // Use the leaving version.
-    TInt layoutCode = iLayoutSession.GetLayoutL();
-
-    // Convert the Int to the enum.
-    THidKeyboardLayoutId layoutID =
-        static_cast<THidKeyboardLayoutId>(layoutCode);
-
-    // If we believe this to be a Nokia keyboard then the layout settings
-    // page will contain the list of Nokia Su8 items.
-    // Conversly if we think this is a Standard keyboard the layout settings
-    // page will contain the list of Standard layouts.
-    // We must pass a valid value to the Settings page or it will panic.
-    // Validate the code from the Layout Manager before returning it.
-    if ( iIsNokiaKeyboard )
-        {
-        CLayoutUtils::ValidateNokiaSU8Layout(layoutID);
-        }
-    else
-        {
-        CLayoutUtils::ValidateStandardLayout(layoutID);
-        }
-
-    return layoutID;
-    }
-
-void CBtHidSettingView::SetNavipaneTextL(const TDesC8& aDeviceName)
-    {
-    TRACE_INFO(_L("[BTHID]\t CBtHidSettingView::SetNavipaneTextL Start"));
-    CEikStatusPane* sp =
-        iEikonEnv->AppUiFactory()->StatusPane();
-
-    CAknNavigationControlContainer* np =
-        static_cast<CAknNavigationControlContainer*>(
-            sp->ControlL( TUid::Uid( EEikStatusPaneUidNavi ) ) );
-
-    delete iNaviDecorator;
-    iNaviDecorator = NULL;
-
-    TInt blank(1);
-    if (aDeviceName.Length()>0 )
-        {
-        HBufC* stringHolder = HBufC::NewLC(aDeviceName.Length() + blank);
-        stringHolder->Des().Copy(aDeviceName);
-        stringHolder->Des().Append(_L(" "));
-        iNaviDecorator = np->CreateNavigationLabelL( *stringHolder );
-        np->PushL( *iNaviDecorator );
-        sp->DrawNow();
-        CleanupStack::PopAndDestroy(stringHolder);  // stringHolder
-        }
-    else
-        {
-        HBufC* temp = HBufC::NewLC(aDeviceName.Length());
-        temp->Des().Copy(aDeviceName);
-        iNaviDecorator = np->CreateNavigationLabelL( *temp );
-        np->PushL( *iNaviDecorator );
-        sp->DrawNow();
-        CleanupStack::PopAndDestroy(temp);  // temp
-        }
-    TRACE_INFO(_L("[BTHID]\t CBtHidSettingView::SetNavipaneTextL End"));
-    }
-// ----------------------------------------------------
-// CBtHidSettingView::CenRepDataChanged
-// ----------------------------------------------------
-//
-void CBtHidSettingView::CenRepDataChanged(TUid& aUid, TUint32 aKey)
-    {
-    // just recreate the setting list
-    TRACE_INFO((_L("[BTHID]\t CBtHidSettingView[0x%08x]::CenRepDataChanged"),this));
-    (void) aUid;
-    if ( aKey == KBtHidKeyboardLayout )
-        {
-        TRAPD( err, CreateSettingListL());
-        err = err;
-        }
-    }
-// End of File
--- a/bluetoothengine/bthid/bthidkbdsettings/src/btkeyenumtextsettingitem.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +0,0 @@
-/*
-* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#include "btkeyenumtextsettingitem.h"
-#include "btkeyboard.hrh"
-#include "bthidsettingview.h"
-#include "bthidsettings.h"
-#include "debug.h"
-
-//-----------------------------------------------------------------------------
-// CBTKeyEnumTextSettingItem::CBTKeyEnumTextSettingItem
-//-----------------------------------------------------------------------------
-//
-CBTKeyEnumTextSettingItem::CBTKeyEnumTextSettingItem(
-    TInt aResourceId, TInt& aValue, CBtHidSettings& aSettings, CBtHidSettingView* aBtHidSettingView) :
-        CAknEnumeratedTextPopupSettingItem ( aResourceId, aValue ),
-        iSettings(aSettings),
-        iBtHidSettingView(aBtHidSettingView)
-    {}
-
-
-//-----------------------------------------------------------------------------
-// CBTKeyEnumTextSettingItem::~CBTKeyEnumTextSettingItem
-//-----------------------------------------------------------------------------
-//
-CBTKeyEnumTextSettingItem::~CBTKeyEnumTextSettingItem()
-    {}
-
-//-----------------------------------------------------------------------------
-// CBTKeyEnumTextSettingItem::HandleSettingPageEventL
-//-----------------------------------------------------------------------------
-//
-void CBTKeyEnumTextSettingItem::HandleSettingPageEventL(
-    CAknSettingPage *aSettingPage, TAknSettingPageEvent aEventType)
-    {
-    switch( aEventType )
-        {
-        case EEventSettingOked:
-            {
-            TRACE_INFO(_L("[BTHID]\t CBTKeyEnumTextSettingItem::HandleSettingPageEventL: OK"));
-            // Get the new index and new value
-            TInt newIndex = QueryValue()->CurrentValueIndex();
-            TInt newValue = EnumeratedTextArray()->At(newIndex)->EnumerationValue();
-
-            // Reset the index to the initial value, so if we leave when
-            // trying to use the new value and the user then selects cancel
-            // the setting item won't set the new value on the display.
-            QueryValue()->SetCurrentValueIndex(IndexFromValue(InternalValue()));
-
-            switch ( Identifier() )
-                {
-                case EBTKeySettingLayout:
-                    {
-                    THidKeyboardLayoutId newLayout =
-                        static_cast<THidKeyboardLayoutId>(newValue);
-                    iSettings.SaveLayoutSettingL(newLayout);
-                    iBtHidSettingView->SetCurrentLayoutL(newLayout);
-                    }
-                break;
-
-                default:
-                break;
-                }
-
-            // We have finished using the new value. Set the index to the new
-            // value so the UI is updated when this function exits
-            QueryValue()->SetCurrentValueIndex(newIndex);
-
-            // store the setting page internal value to the external variable
-            StoreL();
-            break;
-            }
-        case EEventSettingCancelled:
-            {
-            TRACE_INFO(_L("[BTHID]\t CBTKeyEnumTextSettingItem::HandleSettingPageEventL: Cancel"));
-            // Reset the index to the initial value
-            QueryValue()->SetCurrentValueIndex(IndexFromValue(InternalValue()));
-            break;
-            }
-        case EEventSettingChanged:
-            {
-            TRACE_INFO(_L("[BTHID]\t CBTKeyEnumTextSettingItem::HandleSettingPageEventL: Changed"));
-            // Flow through
-            }
-        default:
-            {
-            //do nothing
-            break;
-            }
-        }
-    // call the base class handler to take care of other event types
-    CAknSettingItem::HandleSettingPageEventL(aSettingPage, aEventType);
-    }
-
-
--- a/bluetoothengine/bthid/bthidkbdsettings/src/btkeysettinglist.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +0,0 @@
-/*
-* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#include "bthidsettingview.h"
-#include "bthidsettings.h"
-#include "bthidsettinglist.h"
-#include "btkeyenumtextsettingitem.h"
-#include "btkeyboard.hrh"
-
-//-----------------------------------------------------------------------------
-// CBTKeySettingList::CBTKeySettingList
-//-----------------------------------------------------------------------------
-//
-CBTKeySettingList::CBTKeySettingList(CBtHidSettings& aSettings, CBtHidSettingView* aBtHidSettingView):
-    CAknSettingItemList(), iSettings(aSettings), iBtHidSettingView(aBtHidSettingView)
-    {
-    }
-
-//-----------------------------------------------------------------------------
-// CBTKeySettingList::CreateSettingItemL
-//-----------------------------------------------------------------------------
-//
-CAknSettingItem* CBTKeySettingList::CreateSettingItemL( TInt aIdentifier )
-    {
-    CAknSettingItem* settingItem = 0;
-    switch ( aIdentifier )
-        {
-        case EBTKeySettingLayout:
-            iLayoutCode = iSettings.LoadLayoutSetting();
-            settingItem = new (ELeave) CBTKeyEnumTextSettingItem(
-                                            aIdentifier, iLayoutCode, iSettings, iBtHidSettingView);
-            break;      
-        default:
-            break;
-        }
-
-    return settingItem;
-    }
-
-//-----------------------------------------------------------------------------
-// CBTKeySettingList::HandleListBoxEventL
-//-----------------------------------------------------------------------------
-//
-void CBTKeySettingList::HandleListBoxEventL(
-            CEikListBox* aListBox, TListBoxEvent aEventType)
-    {
-        // call the base classes handler to handle this event.
-    CAknSettingItemList::HandleListBoxEventL(aListBox, aEventType);
-    
-    // store the values from all setting items to their external variables
-    StoreSettingsL();
-    }
-
-//-----------------------------------------------------------------------------
-// CBTKeySettingList::SizeChanged
-//-----------------------------------------------------------------------------
-//
-void CBTKeySettingList::SizeChanged()
-    {
-    if ( ListBox() ) 
-        {
-        ListBox()->SetRect(Rect());
-        }
-    }
-
-//-----------------------------------------------------------------------------
-// CBTKeySettingList::EditCurrentItemL
-//-----------------------------------------------------------------------------
-//
-void CBTKeySettingList::EditCurrentItemL( TInt aCommand )
-    {
-    if ( ListBox() )
-        {
-        TInt index = ListBox()->CurrentItemIndex();
-        EditItemL(index, EBTKeyCmdAppChange == aCommand);
-        StoreSettingsL();        
-        }
-    }    
-//End of file   
--- a/bluetoothengine/bthid/bthidserver/src/bthidserver.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/bthid/bthidserver/src/bthidserver.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -101,7 +101,7 @@
     
     delete iHidSdpClient;
     
-    RProperty::Delete( KPSUidBthidSrv, KBTMouseCursorState );
+
     }
 
 CBTHidServer* CBTHidServer::NewL()
@@ -210,13 +210,8 @@
         }
 
     TRACE_INFO(_L("[BTHID]\tCBTHidServer::ConstructL(): Starting the server"));
-
-    User::LeaveIfError( RProperty::Define( KPSUidBthidSrv,
-                                            KBTMouseCursorState,
-                                            RProperty::EInt,
-                                            KBTHIDPSKeyReadPolicy,
-                                            KBTHIDPSKeyWritePolicy) );
-
+    
+    
     StartL(KBTHidSrvName);
 
     iActiveState = EFalse;
--- a/bluetoothengine/bthid/common/inc/bthidPsKey.h	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/bthid/common/inc/bthidPsKey.h	Mon Jul 12 18:51:05 2010 +0300
@@ -20,7 +20,9 @@
 #ifndef BTHIDPSKEY_H_
 #define BTHIDPSKEY_H_
 
-const TUid KPSUidBthidSrv = {0x2001E301};
+
+
+const TUid KPSUidBthidSrv = { 0x2001FE5C };
  
 const TUint KBTMouseCursorState = 0x00000001;
 
--- a/bluetoothengine/bthid/keyboard/group/keyboard.mmp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/bthid/keyboard/group/keyboard.mmp	Mon Jul 12 18:51:05 2010 +0300
@@ -22,7 +22,7 @@
 TARGETTYPE    PLUGIN
 UID           ECOM_UID KEYBOARD_UID
 
-CAPABILITY    CAP_APPLICATION
+CAPABILITY    CAP_APPLICATION CommDD ProtServ
 VENDORID      VID_DEFAULT
 
 USERINCLUDE   ../inc
--- a/bluetoothengine/bthid/keyboard/inc/keyboard.h	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/bthid/keyboard/inc/keyboard.h	Mon Jul 12 18:51:05 2010 +0300
@@ -27,9 +27,6 @@
 #include "hidkeys.h"
 #include "layoutmgr.h"
 #include "timeoutnotifier.h"
-#include <e32msgqueue.h>
-#include <e32cmn.h>
-#include "pointmsgqueue.h"
 #include "bthidsettings.h"
 
 class CField;
@@ -67,16 +64,6 @@
         KNumInputFieldTypes
         };
 
-    // The types of keyboard input report fields that we handle:
-    enum TMouseFieldType
-        {
-        EMouseButtons = 0,
-        EMouseXY = 1,
-        EMouseWheel = 2,
-        EMouseMediaKeys = 3,
-        EMousePowerKeys = 4,
-        KMouseInputFieldTypes
-        };
 public:
     // Constructors and destructor
     /*!
@@ -210,14 +197,6 @@
 
     // Handles the states of the modifier keys
     void UpdateModifiers(TInt aFieldIndex, const TDesC8& aReport);
-    // Handles the states of the XY (mouse up, down, left, right)
-    void UpdateXY(TInt aFieldIndex, const TDesC8& aReport);
-
-    // Handles the states of the Buttons (left & right button)
-    void UpdateButtons(TInt aFieldIndex, const TDesC8& aReport);
-
-    // Handles the states of the wheel
-    void UpdateWheel(TInt aFieldIndex, const TDesC8& aReport);
 
     // Handle key presses
     void ProcessKeys(TInt aFieldIndex, const TDesC8& aReport);
@@ -302,17 +281,10 @@
     // ----------------------------------------
 
     static TInt ResetArrayToSize(RArray<TInt>& aArray, TInt aSize);
-    void MoveCursor(const TPoint& aPoint);
-    TInt PostPointer(const TPoint& aPoint);
-    TInt SendButtonEvent(TBool aButtonDown);
 
     TBool IsDigitKey(TInt aScanCode);
     TBool IsSpecialHandleKey(TInt aUniCode);
 
-    void LaunchApplicationL(const TDesC& aName);
-    
-    //Redraw cursor
-    void CursorRedraw();
 private:
 
     TKeyboardDriverState iDriverState;
@@ -333,9 +305,6 @@
     // various types of key:
     const CField* iField[KNumInputFieldTypes];
 
-    // Pointers to the fields in the report descriptor containing the
-    // various types of key:
-    const CField* iMouseField[KMouseInputFieldTypes];
     // Pointer to the field in the report descriptor containing the LEDs:
     const CField* iLedField;
 
@@ -371,13 +340,6 @@
 
     // This timer stops key repeating after defined time to prevent endless key repeats in error cases. Fix for EMKD-7FBB9H
     CTimeOutTimer* iRepeatEndTimer;
-
-    TBool iComboDevice;
-
-    RMsgQueue<TPointBuffer> iPointBufQueue;
-    TPointBuffer iPointerBuffer;
-    TBool iButtonDown;
-    TBool iButton2Down;
     };
 
 // ----------------------------------------------------------------------
--- a/bluetoothengine/bthid/keyboard/src/keyboard.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/bthid/keyboard/src/keyboard.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -23,8 +23,6 @@
 #include <eiksvdef.h>
 #include <apgcli.h>
 #include <apgtask.h>
-#include <apacmdln.h>
-#include <e32property.h>
 
 #include "hidtranslate.h"
 #include "finder.h"
@@ -52,7 +50,6 @@
 
 const TInt KKeyRepeatDelay = 500000;
 const TInt KKeyRepeatInterval = 75000;
-_LIT(KAppName, "PaintCursor.exe");
 //----------------------------------------------------------------------------
 // CHidKeyboardDriver::CHidKeyboardDriver
 //----------------------------------------------------------------------------
@@ -112,8 +109,6 @@
     iPhoneAppId = PhoneAppId();
     iIdleAppId = IdleAppId();
 
-    iComboDevice = EFalse;
-
     iSettings = CBtHidSettings::NewL();
     }
 
@@ -136,58 +131,10 @@
         iKeys[i].Reset();
         }
 
-    iPointBufQueue.Close();
-
-    if (iComboDevice)
-        {
-        RProperty::Set( KPSUidBthidSrv, KBTMouseCursorState, ECursorNotInitialized );
-        }
-
     if (iSettings)
         delete iSettings;
     }
 
-void CHidKeyboardDriver::MoveCursor(const TPoint& aPoint)
-    {
-    DBG(RDebug::Print(
-                    _L("CHidKeyboard::MoveCursor")));
-
-    PostPointer(aPoint);
-    }
-// ---------------------------------------------------------------------------
-// CHidMouseDriver::PostPointer
-// Save the event to the buffer
-// ---------------------------------------------------------------------------
-//
-TInt CHidKeyboardDriver::PostPointer(const TPoint& aPoint)
-    {
-    DBG(RDebug::Print(_L("CHidKeyboard::PostPointer")));
-    iPointerBuffer.iPoint[iPointerBuffer.iNum] = aPoint;
-    iPointerBuffer.iType[iPointerBuffer.iNum] = KBufferPlainPointer;
-    iPointerBuffer.iNum++;
-    TInt ret = KErrNone;
-
-    if (iPointerBuffer.iNum > KPMaxEvent)
-        {
-        ret = iPointBufQueue.Send(iPointerBuffer);
-        iPointerBuffer.iNum = 0;
-        }
-    return ret;
-    }
-
-TInt CHidKeyboardDriver::SendButtonEvent(TBool aButtonDown)
-    {
-    DBG(RDebug::Print(
-                    _L("CHidKeyboard::SendButtonEvent")));
-    iPointerBuffer.iPoint[iPointerBuffer.iNum] = TPoint(0, 0);
-    iPointerBuffer.iType[iPointerBuffer.iNum] = aButtonDown
-                                                            ? KBufferPenDown
-                                                               : KBufferPenUp;
-    iPointerBuffer.iNum++;
-    TInt ret = iPointBufQueue.Send(iPointerBuffer);
-    iPointerBuffer.iNum = 0;
-    return ret;
-    }
 //----------------------------------------------------------------------------
 // CHidKeyboardDriver:::StartL
 //----------------------------------------------------------------------------
@@ -233,25 +180,10 @@
         //Used the layoutID from CenRep
         iLayoutMgr.SetLayout(iLastSelectedLayout);
         }
-    TInt err = iPointBufQueue.OpenGlobal(KMsgBTMouseBufferQueue);   
-    if (err == KErrNotFound)
-        {
-        User::LeaveIfError(iPointBufQueue.CreateGlobal(KMsgBTMouseBufferQueue, KPointQueueLen));    
-        }
-    else
-        {
-        User::LeaveIfError( err );
-        }    
 
     // Ready to process keyboard events:
     iDriverState = EInitialised;
 
-    if (iComboDevice)
-        {
-        LaunchApplicationL(KAppName);
-        RProperty::Set( KPSUidBthidSrv, KBTMouseCursorState, ECursorShow );
-        }
-
     }
 
 //----------------------------------------------------------------------------
@@ -286,41 +218,6 @@
     {
     iDriverState = EDisabled;
     CancelAllKeys();
-    if (iComboDevice)
-        {
-        RProperty::Set( KPSUidBthidSrv, KBTMouseCursorState, ECursorNotInitialized );
-        }
-    }
-
-//----------------------------------------------------------------------------
-// CHidMouseDriver::LaunchApplicationL
-//----------------------------------------------------------------------------
-//
-void CHidKeyboardDriver::LaunchApplicationL(const TDesC& aName)
-    {
-    //Check if application is already running in the background
-    TApaTaskList tasks(iWsSession);
-    TApaTask task = tasks.FindApp(aName);
-    if (task.Exists())
-        {
-        // Application is active, so just bring to foreground
-        }
-    else
-        {
-        // If application is not running, then create a new one
-        CApaCommandLine* cmd = CApaCommandLine::NewLC();
-        cmd->SetExecutableNameL(aName);
-        cmd->SetCommandL(EApaCommandBackground); // EApaCommandRun
-
-        RApaLsSession arcSession;
-        //connect to AppArc server
-        User::LeaveIfError(arcSession.Connect());
-        CleanupClosePushL(arcSession);
-        User::LeaveIfError(arcSession.StartApp(*cmd));
-        arcSession.Close();
-        CleanupStack::PopAndDestroy(2);
-        }
-
     }
 
 // ----------------------------------------------------------------------
@@ -339,21 +236,6 @@
         case CHidTransport::EHidChannelInt:
             if (EInitialised == iDriverState)
                 {
-                if (iComboDevice)
-                    {
-                    TInt mouseStatus;
-                    TInt err = RProperty::Get( KPSUidBthidSrv, KBTMouseCursorState, mouseStatus );
-                    if ( !err &&
-                        ((static_cast<THidMouseCursorState>(mouseStatus) == ECursorRedraw)|| 
-                         (static_cast<THidMouseCursorState>(mouseStatus) == ECursorReset)) )
-                        {
-                        err = RProperty::Set( KPSUidBthidSrv, KBTMouseCursorState, ECursorShow );
-                        DBG(RDebug::Print(
-                                 _L("[BTHID]\tCHidKeyboardDriver::DataIn() ECursorRedraw ||ECursorReset ")) );
-                        }
-
-                    CursorRedraw();
-                    }
                 InterruptData(aPayload);
                 }
             break;
@@ -386,127 +268,6 @@
     Stop();
     }
 
-void CHidKeyboardDriver::UpdateXY(TInt aFieldIndex, const TDesC8& aReport)
-    {
-    //    DBG(RDebug::Print(_L("[HID]\tCHidMouseDriver::UpdateModifiers()")));
-
-    // Translate the HID usage values into a boot protocol style
-    // modifier bitmask:
-    //
-    TReportTranslator report(aReport, iMouseField[aFieldIndex]);
-
-    TInt Xvalue = 0;
-    TInt Yvalue = 0;
-
-    TInt errX = report.GetValue(Xvalue, EGenericDesktopUsageX);
-    TInt errY = report.GetValue(Yvalue, EGenericDesktopUsageY);
-
-    DBG(RDebug::Print(_L("[HID]\tCHidMouseDriver::UpdateXY (%d,%d)"), Xvalue, Yvalue));
-    if ((Xvalue != 0) || (Yvalue != 0))
-        {
-        MoveCursor(TPoint(Xvalue, Yvalue));
-        }
-    }
-
-void CHidKeyboardDriver::UpdateWheel(TInt aFieldIndex, const TDesC8& aReport)
-    {
-    TReportTranslator report(aReport, iMouseField[aFieldIndex]);
-
-    TInt Yvalue = 0;
-
-    TInt errY = report.GetValue(Yvalue, EGenericDesktopUsageWheel);
-    DBG(RDebug::Print(_L("[HID]\tCHidMouseDriver::UpdateWheel (%d)"), Yvalue));
-    TInt absValue(Abs(Yvalue));
-    if ((errY == KErrNone) && (absValue >= 1))
-        {
-        TRawEvent rawEvent;
-        for (TInt ii = 0; ii < absValue; ii++)
-            {
-            rawEvent.Set(TRawEvent::EKeyDown,
-                    (Yvalue > 0) ? EStdKeyUpArrow : EStdKeyDownArrow);
-            UserSvr::AddEvent(rawEvent);
-            rawEvent.Set(TRawEvent::EKeyUp,
-                    (Yvalue > 0) ? EStdKeyUpArrow : EStdKeyDownArrow);
-            UserSvr::AddEvent(rawEvent);
-            }
-        }
-    DBG(RDebug::Print(_L("[HID]\t  new iModifiers = %02x"), iModifiers));
-    }
-
-void CHidKeyboardDriver::UpdateButtons(TInt aFieldIndex,
-        const TDesC8& aReport)
-    {
-    DBG(RDebug::Print(_L("[HID]\tCHidMouseDriver::UpdateButtons()")));
-    // Translate the HID usage values into a boot protocol style
-    // modifier bitmask:
-    //
-    const TInt KButton1 = 1;
-    const TInt KButton2 = 2;
-    const TInt KButton3 = 3;
-
-    TBool buttonPressed(EFalse);
-
-    DBG(RDebug::Print(_L("[HID]\tCHidMouseDriver::UpdateButtons() %d, %d, %d"),
-                    iMouseField[aFieldIndex]->UsagePage(),
-                    iMouseField[aFieldIndex]->UsageMin(),
-                    iMouseField[aFieldIndex]->UsageMax()));
-    (void) aFieldIndex;
-    // Hack but works
-    // We dont come here if the report is wrong?
-    TInt buttonByte = aReport[1];
-    if (KButton1 == buttonByte)
-        {
-        DBG(RDebug::Print(_L("[HID]\tCHidMouseDriver::UpdateButtons() Button1")));
-        buttonPressed = ETrue;
-        }
-
-    if (KButton2 == buttonByte)
-        {
-        DBG(RDebug::Print(_L("[HID]\tCHidMouseDriver::UpdateButtons() Button2")));
-        if (!iButton2Down)
-            {
-            iButton2Down = ETrue;
-            TRawEvent rawEvent;
-            rawEvent.Set(TRawEvent::EKeyDown, EStdKeyApplication0);
-            CursorRedraw();
-            UserSvr::AddEvent(rawEvent);
-            }
-        }
-    else
-        {
-        if (iButton2Down)
-            {
-            iButton2Down = EFalse;
-            TRawEvent rawEvent;
-            rawEvent.Set(TRawEvent::EKeyUp, EStdKeyApplication0);
-            CursorRedraw();
-            UserSvr::AddEvent(rawEvent);
-            }
-        }
-
-    if (KButton3 == buttonByte)
-        {
-        DBG(RDebug::Print(_L("[HID]\tCHidMouseDriver::UpdateButtons() Button3")));
-        buttonPressed = ETrue;
-        }
-
-    if (buttonPressed)
-        {
-        if (!iButtonDown)
-            {
-            iButtonDown = ETrue;
-            SendButtonEvent(ETrue);//Send Mouse Button Down
-            }
-        }
-    else
-        {
-        if (iButtonDown)
-            {
-            iButtonDown = EFalse;
-            SendButtonEvent(EFalse); //Send Mouse Button Up
-            }
-        }
-    }
 //----------------------------------------------------------------------------
 // CHidKeyboardDriver::InterruptData
 //----------------------------------------------------------------------------
@@ -531,30 +292,6 @@
                         ii, nextByte));
         }
 #endif
-    TBool mouseEvent(EFalse);
-    if (iMouseField[EMouseXY] && iMouseField[EMouseXY]->IsInReport(firstByte))
-        {
-        UpdateXY(EMouseXY, aPayload);
-        mouseEvent = ETrue;
-        }
-
-    if (iMouseField[EMouseButtons] && iMouseField[EMouseButtons]->IsInReport(
-            firstByte))
-        {
-        UpdateButtons(EMouseButtons, aPayload);
-        mouseEvent = ETrue;
-        }
-    if (iMouseField[EMouseXY] && iMouseField[EMouseXY]->IsInReport(firstByte))
-        {
-        UpdateWheel(EMouseWheel, aPayload);
-        mouseEvent = ETrue;
-        }
-    DBG(RDebug::Print(_L("[HID]\tCHidKeyboardDriver::InterruptData()  mouseevent %d"),
-                    mouseEvent));
-    if (mouseEvent)
-        {
-        return;
-        }
     // First check for any rollover errors:
     //
     TInt i;
@@ -1523,18 +1260,6 @@
         {
         valid = KErrNone;
         }
-
-    TMouseFinder mousefinder;
-    search.SearchL(aReportRoot, &mousefinder);
-    iMouseField[EMouseButtons] = mousefinder.ButtonsField();
-    iMouseField[EMouseXY] = mousefinder.XYField();
-    iMouseField[EMouseWheel] = mousefinder.WheelField();
-
-    if ((iMouseField[EMouseButtons] != 0) && (iMouseField[EMouseXY] != 0))
-        {
-        iComboDevice = ETrue;
-        }
-
         TRACE_INFO( (
                         _L("CHidKeyboard::CanHandleReport() returning %d"), valid));
 
@@ -1937,18 +1662,5 @@
     CancelAllKeys();
     }
 
-void CHidKeyboardDriver::CursorRedraw()
-    {
-    TInt mouseStatus;
-
-    TInt err = RProperty::Get( KPSUidBthidSrv, KBTMouseCursorState, mouseStatus );
-    if ( !err )
-        {
-        err = RProperty::Set( KPSUidBthidSrv, KBTMouseCursorState, ECursorRedraw );
-        DBG(RDebug::Print(
-             _L("[BTHID]\tCHidKeyboardDriver::CursorRedraw() X->ECursorRedraw") ) );
-        }
-    }
-
 // ----------------------------------------------------------------------
 // End of file
--- a/bluetoothengine/bthid/mouse/PaintCursor/src/paintcursorappview.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/bthid/mouse/PaintCursor/src/paintcursorappview.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -16,11 +16,20 @@
 */
 
 #include <coecntrl.h>
+#include <e32property.h> 
+#include <bthidPsKey.h>
 #include "paintcursorappview.h"
 #include "pointmsgqueue.h"
 #include "debug.h"
 
 
+/**  PubSub key read and write policies */
+_LIT_SECURITY_POLICY_C2( KBTHIDPSKeyReadPolicy, 
+                          ECapabilityLocalServices, ECapabilityReadDeviceData );
+_LIT_SECURITY_POLICY_C2( KBTHIDPSKeyWritePolicy, 
+                          ECapabilityLocalServices, ECapabilityWriteDeviceData );
+
+
 CPaintCursorAppView* CPaintCursorAppView::NewL(const TRect& aRect)
     {
     CPaintCursorAppView* self = CPaintCursorAppView::NewLC(aRect);
@@ -38,6 +47,13 @@
 
 void CPaintCursorAppView::ConstructL(const TRect& aRect)
     {
+    
+    User::LeaveIfError( RProperty::Define( KPSUidBthidSrv,
+                                            KBTMouseCursorState,
+                                            RProperty::EInt,
+                                            KBTHIDPSKeyReadPolicy,
+                                            KBTHIDPSKeyWritePolicy) );
+                                                
     // Create a window for this application view
     CreateWindowL();
 
@@ -110,6 +126,8 @@
 
     // Close the animation server
     iMouseCursorDll.Close();
+    
+    RProperty::Delete( KPSUidBthidSrv, KBTMouseCursorState );
     }
 
 void CPaintCursorAppView::SizeChanged()
--- a/bluetoothengine/bthid/mouse/Sesame_client/src/clientimagecommander.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/bthid/mouse/Sesame_client/src/clientimagecommander.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -27,6 +27,7 @@
 #include <coecntrl.h>
 #include <w32std.h>
 #include <BTMouseBitMaps.mbg>
+#include <e32svr.h>
 #include "clientimagecommander.h"
 
 #ifndef DBG
--- a/bluetoothengine/bthid/mouse/Sesame_server/bwins/btcursor_serveru.def	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-EXPORTS
-	?CreateCAnimDllL@@YAPAVCAnimDll@@XZ @ 1 NONAME ; class CAnimDll * CreateCAnimDllL(void)
-	?CreateInstanceL@CMouseCursorSrv@@UAEPAVCAnim@@H@Z @ 2 NONAME ; class CAnim * CMouseCursorSrv::CreateInstanceL(int)
-
--- a/bluetoothengine/bthid/mouse/Sesame_server/eabi/btcursor_serveru.def	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-EXPORTS
-	_Z15CreateCAnimDllLv @ 1 NONAME
-	_ZTI15CMouseCursorSrv @ 2 NONAME ; #<TI>#
-	_ZTI6CImage @ 3 NONAME ; #<TI>#
-	_ZTV15CMouseCursorSrv @ 4 NONAME ; #<VT>#
-	_ZTV6CImage @ 5 NONAME ; #<VT>#
-
--- a/bluetoothengine/bthid/mouse/hidmousedriver/group/mouse.mmp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/bthid/mouse/hidmousedriver/group/mouse.mmp	Mon Jul 12 18:51:05 2010 +0300
@@ -23,7 +23,7 @@
 TARGETTYPE    PLUGIN
 UID           ECOM_UID MOUSE_UID
 
-CAPABILITY    CAP_APPLICATION
+CAPABILITY    CAP_APPLICATION CommDD ProtServ
 VENDORID      VID_DEFAULT
 
 
--- a/bluetoothengine/bthid/mouse/hidmousedriver/inc/mouse.h	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/bthid/mouse/hidmousedriver/inc/mouse.h	Mon Jul 12 18:51:05 2010 +0300
@@ -176,7 +176,8 @@
     TInt SendButtonEvent(TBool aButtonDown);
 
     void LaunchApplicationL(const TDesC& aName);
-    //void LaunchApplicationL(TInt aAppUid);
+    
+    TBool IsAlreadyRunning();
 
 private:
     // The Generic HID layer
--- a/bluetoothengine/bthid/mouse/hidmousedriver/src/mouse.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/bthid/mouse/hidmousedriver/src/mouse.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -183,10 +183,7 @@
 void CHidMouseDriver::LaunchApplicationL(const TDesC& aName)
     {
     //Check if application is already running in the background
-    TApaTaskList tasks( iWsSession );
-    TApaTask task = tasks.FindApp( aName );
-
-    if ( task.Exists() )
+    if (IsAlreadyRunning())
         {
         // Application is active, so just bring to foreground
         }
@@ -208,6 +205,32 @@
         CleanupStack::PopAndDestroy(2);
         }
     }
+
+TBool CHidMouseDriver::IsAlreadyRunning()
+    {
+    TFindProcess processFinder(_L("*[2001fe5c]*")); //search by paintcursor.exe UID3  
+
+    TBool found = EFalse;
+    TFullName result;
+    if (processFinder.Next(result) == KErrNone)
+        {
+        DBG(RDebug::Print(_L("[BTHID] CHidMouseDriver::IsAlreadyRunning - process found Inside while")) );
+        found = ETrue;
+        }
+
+    if (found)
+        {
+        DBG(RDebug::Print(_L("[BTHID] CHidMouseDriver::IsAlreadyRunning - Process found ")) );
+        }
+    else
+        {
+        DBG(RDebug::Print(_L("[BTHID] CHidMouseDriver::IsAlreadyRunning - Process was never found")) );
+        }
+        
+    return found;
+}
+
+
 // ----------------------------------------------------------------------
 // CHidDriver mandatory functions:
 
@@ -231,6 +254,7 @@
                          _L("[BTHID]\tCHidMouseDriver::DataIn() ECursorRedraw ||ECursorReset ")) );
                 }
 
+            LaunchApplicationL(KAppName);
 
             CursorRedraw();
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/btindicator/btindicator.pro	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,45 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+
+TEMPLATE = lib
+TARGET = btindicator
+CONFIG += hb plugin
+
+HEADERS += inc/btindicatorplugin.h \
+    inc/btindicator.h \
+    inc/btindicatorconstants.h
+	
+SOURCES += src/btindicatorplugin.cpp \
+    src/btindicator.cpp
+    
+MOC_DIR = moc
+OBJECTS_DIR = obj    
+
+LIBS += -lxqservice -lcpframework
+symbian { 
+    TARGET.EPOCALLOWDLLDATA = 1
+    TARGET.CAPABILITY = CAP_GENERAL_DLL
+    TARGET.UID3 = 0x200315E9
+    pluginstub.sources = $${TARGET}.dll
+    pluginstub.path = /resource/plugins/indicators
+    DEPLOYMENT += pluginstub
+	
+BLD_INF_RULES.prj_exports += "$${LITERAL_HASH}include <platform_paths.hrh>" \
+    "qmakepluginstubs/$${TARGET}.qtplugin /epoc32/data/z/pluginstub/$${TARGET}.qtplugin" \
+    "rom/btindicator.iby CORE_MW_LAYER_IBY_EXPORT_PATH(btindicator.iby)" \
+	"inc/btindicatorconstants.h |../inc/btindicatorconstants.h"
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/btindicator/inc/btindicator.h	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Bluetooth Indicator class
+ *
+ */
+
+#ifndef BTINDICATOR_H
+#define BTINDICATOR_H
+
+
+#include <hbindicatorinterface.h>
+//#include <xqappmgr.h>
+/**
+ * Bluetooth indicator class. 
+ * Handles client request and showing the indications. 
+ */
+class BTIndicator : public HbIndicatorInterface
+{
+public:
+    /**
+     * Constructor
+     */
+    BTIndicator(const QString &indicatorType);
+    
+    /**
+     * Destructor
+     */
+    ~BTIndicator();
+    
+    /**
+     * @see HbIndicatorInterface
+     */
+    bool handleInteraction(InteractionType type);
+    
+    /**
+     * @see HbIndicatorInterface
+     */
+    QVariant indicatorData(int role) const;
+    
+protected:
+    /**
+     * @see HbIndicatorInterface
+     */
+    bool handleClientRequest(RequestType type, const QVariant &parameter);
+    
+private:
+//    void launchBTCpSettingView(); 
+    
+/*private slots:
+    void handleReturnValue(const QVariant &returnValue);
+    void handleError(int errorCode,const QString &errorMessage);*/
+    
+private: 
+
+    QString mSecDisplayName;
+//    XQApplicationManager mAppMgr;
+    int mIndicatorStatus;
+    
+private:
+
+};
+
+#endif /* BTINDICATOR_H */
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/btindicator/inc/btindicatorconstants.h	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Bluetooth Indicator constants
+ *
+ */
+
+#ifndef BTINDCONSTANTS_H
+#define BTINDCONSTANTS_H
+
+
+
+/**
+ * Bluetooth indicator constants 
+ *  
+ */
+
+_LIT(KIndicatorType, "com.nokia.bluetooth.indicatorplugin/1.0");
+
+enum TBTDisplayStatus
+    {
+    EBTIndicatorOff,
+    EBTIndicatorOnVisible,
+    EBTIndicatorOnHidden,
+    EBTIndicatorVisibleConnected,
+    EBTIndicatorHiddenConnected
+    };
+
+#endif /* BTINDCONSTANTS_H */
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/btindicator/inc/btindicatorplugin.h	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Bluetooth Indicator Plugin Class 
+ *
+ */
+
+#ifndef BTINDICATORPLUGIN_H
+#define BTINDICATORPLUGIN_H
+
+
+#include <hbindicatorplugininterface.h>
+#include <hbindicatorinterface.h>
+
+class HbTranslator;
+
+/**
+ * Bluetooth indicator plugin class. 
+ * Main class of bluetooth indicator plugin. 
+ */
+class BTIndicatorPlugin : public QObject, public HbIndicatorPluginInterface
+{
+    Q_OBJECT
+    Q_INTERFACES(HbIndicatorPluginInterface)
+
+public:
+    /**
+     * Constructor
+     */
+    BTIndicatorPlugin();
+     
+     /**
+      * Destructor
+      */
+    ~BTIndicatorPlugin();
+    
+    /**
+     * @see HbIndicatorPluginInterface
+     */
+    QStringList indicatorTypes() const;
+    
+    /**
+     * @see HbIndicatorPluginInterface
+     */
+    bool accessAllowed(const QString &indicatorType,
+            const QVariantMap &securityInfo) const;   
+    /**
+     * @see HbIndicatorPluginInterface
+     */
+    HbIndicatorInterface* createIndicator(const QString &indicatorType);
+    
+    /**
+     * @see HbIndicatorPluginInterface
+     */
+    int error() const;
+    
+private:
+    Q_DISABLE_COPY(BTIndicatorPlugin)
+    
+    /**
+     * Error value
+     */
+    int mError;
+    
+    /**
+     * Indicator types 
+     * supported indicator types. 
+     */
+    QStringList mIndicatorTypes;
+    
+    HbTranslator* mIndicatorTranslator;
+};
+
+
+#endif /* BTINDICATORPLUGIN_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/btindicator/rom/btindicator.iby	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,23 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#ifndef __BTINDICATOR_IBY__
+#define __BTINDICATOR_IBY__
+
+REM DLL
+file=ABI_DIR\UREL\btindicator.dll               SHARED_LIB_DIR\btindicator.dll
+data=\epoc32\data\z\pluginstub\btindicator.qtplugin   \resource\plugins\indicators\btindicator.qtplugin
+#endif
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/btindicator/src/btindicator.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,195 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+#include "btindicator.h" 
+#include <QVariant.h>
+//#include <hbmessagebox.h>
+//#include <xqaiwrequest.h>
+#include "btindicatorconstants.h"
+//#include <XQServiceRequest.h>
+//#include <cpbasesettingview.h>
+//#include <cppluginlauncher.h>
+#define LOC_BLUETOOTH hbTrId("txt_bt_dblist_bluetooth")
+#define LOC_BLUETOOTH_OFF hbTrId("txt_bt_dblist_bluetooth_val_off")
+#define LOC_BLUETOOTH_ON_VISIBLE hbTrId("txt_bt_dblist_bluetooth_val_on_and_visible")
+#define LOC_BLUETOOTH_VISIBLE_CONNECTED hbTrId("txt_bt_dblist_bluetooth_val_visible_and_connected")
+#define LOC_BLUETOOTH_ON_HIDDEN hbTrId("txt_bt_dblist_bluetooth_val_on_and_hidden")
+#define LOC_BLUETOOTH_HIDDEN_CONNECTED hbTrId("txt_bt_dblist_bluetooth_val_hidden_and_connected")
+
+struct BTIndicatorInfo
+    {
+     QString icon;
+     QString secondaryText;
+    };
+
+static const int BTIndicatorCount = 5;
+
+
+static const BTIndicatorInfo IndicatorInfo[BTIndicatorCount] = { 
+     { "qtg_large_bluetooth_off", "LOC_BLUETOOTH_OFF" }, 
+     { "qtg_large_bluetooth", "LOC_BLUETOOTH_ON_VISIBLE" }, 
+     { "qtg_large_bluetooth_hide","LOC_BLUETOOTH_ON_HIDDEN" },
+     { "qtg_large_bluetooth_active_connection", "LOC_BT_VISIBLE_CONNECT" }, 
+     { "qtg_large_bluetooth_hide_connection","LOC_BT_HIDDEN_CONNECT"  }
+ };
+
+
+// ----------------------------------------------------------------------------
+// BTIndicator::BTIndicator
+// ----------------------------------------------------------------------------
+BTIndicator::BTIndicator(const QString &indicatorType) :
+HbIndicatorInterface(indicatorType,
+        HbIndicatorInterface::SettingCategory ,
+        InteractionActivated)
+    {
+    mIndicatorStatus = 0;
+    }
+
+// ----------------------------------------------------------------------------
+// BTIndicator::~BTIndicator
+// ----------------------------------------------------------------------------
+BTIndicator::~BTIndicator()
+    {
+    }
+
+
+// ----------------------------------------------------------------------------
+// BTIndicator::handleInteraction
+// ----------------------------------------------------------------------------
+bool BTIndicator::handleInteraction(InteractionType type)
+    {
+  //  bool handled = false;
+    if (type == InteractionActivated) 
+        {
+    //@TODO need to code for launching the BT Control Panel Plugin is available
+
+ //       launchBTCpSettingView();
+        }
+    return true;
+    }
+
+// ----------------------------------------------------------------------------
+// BTIndicator::indicatorData
+// returns the data and icon that needs to be displayed in the universal pop up and indicator menu 
+// ----------------------------------------------------------------------------
+QVariant BTIndicator::indicatorData(int role) const
+{
+    switch(role)
+    {
+    case PrimaryTextRole: 
+        {
+        QString text(LOC_BLUETOOTH);
+        return text;
+        }
+    case SecondaryTextRole:
+        {
+        return IndicatorInfo[mIndicatorStatus].secondaryText;//mSecDisplayName;
+        }
+    case DecorationNameRole:
+        {
+        //QString iconName("qtg_large_bluetooth");
+        return IndicatorInfo[mIndicatorStatus].icon;//iconName;
+        }
+    case MonoDecorationNameRole :
+        {
+       // QString iconName("qtg_large_bluetooth");
+        return IndicatorInfo[mIndicatorStatus].icon;//iconName;
+        }
+
+    default: 
+        return QVariant();      
+     }
+}
+
+// ----------------------------------------------------------------------------
+// BTIndicator::handleClientRequest
+// handles client's activate and deactivate request
+// ----------------------------------------------------------------------------
+bool BTIndicator::handleClientRequest( RequestType type, 
+        const QVariant &parameter)
+    {
+    bool handled(false);
+    switch (type) {
+        case RequestActivate:
+            {
+            mSecDisplayName.clear();
+/*            if(parameter.toInt() == EBTIndicatorOff)
+                mSecDisplayName.append("LOC_BLUETOOTH_OFF");
+            else if(parameter.toInt() == EBTIndicatorOnVisible)
+                mSecDisplayName.append("LOC_BLUETOOTH_ON_VISIBLE");
+            else if(parameter.toInt() == EBTIndicatorOnHidden)
+                mSecDisplayName.append("LOC_BLUETOOTH_ON_HIDDEN");
+            else if(parameter.toInt() == EBTIndicatorVisibleConnected)
+                mSecDisplayName.append("LOC_BT_VISIBLE_CONNECT");
+            else if(parameter.toInt() == EBTIndicatorHiddenConnected)
+                mSecDisplayName.append("LOC_BT_HIDDEN_CONNECT");*/
+            mIndicatorStatus = parameter.toInt();
+            emit dataChanged();
+            handled =  true;
+            }
+            break;
+        default:
+            {
+            mSecDisplayName.clear();
+            emit deactivate();
+            }
+            break;
+    }
+    return handled;
+    }
+
+
+/*void BTIndicator::launchBTCpSettingView()
+    {
+    XQAiwRequest *request = mAppMgr.create("obexhighway","com.nokia.symbian.IFileShare","send(QVariant)",true);
+
+    if (!request)
+    {
+       qDebug("BTIndicator request returned with NULL");
+        return;
+    }
+    else
+    {
+        connect(request, SIGNAL(requestOk(QVariant)), SLOT(handleReturnValue(QVariant)));
+        connect(request, SIGNAL(requestError(int,QString)), SLOT(handleError(int,QString)));
+    }
+    // Set arguments for request 
+    QList<QVariant> args;
+    //c:\resource\qt\plugins\controlpanel\nfccpplugin.qtplugin
+    args << QVariant( "c:\\two.jpg" );//btcpplugin.dll
+//    args << QVariant ( "c:\\two.jpg" );
+    request->setArguments(args);
+
+    // Make the request
+    if (!request->send())
+    {
+        //report error  
+        qDebug("BTIndicator::launchBTCpSettingView request not sent");
+    }
+    
+    delete request;
+    
+    }*/
+
+
+/*void BTIndicator::handleReturnValue(const QVariant &returnValue)
+{
+}
+
+void BTIndicator::handleError(int errorCode,const QString &errorMessage)
+    {
+    Q_UNUSED(errorCode);
+    }*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/btindicator/src/btindicatorplugin.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+
+#include "btindicatorplugin.h"
+#include "btindicator.h"
+#include <hbtranslator.h>
+
+const char* BTINDICATOR_TRANSLATION = "btindimenu";
+
+Q_EXPORT_PLUGIN(BTIndicatorPlugin)
+
+// ----------------------------------------------------------------------------
+// BTIndicatorPlugin::BTIndicatorPlugin
+// ----------------------------------------------------------------------------
+BTIndicatorPlugin::BTIndicatorPlugin() : mError(0),mIndicatorTranslator(0)
+{
+}
+
+// ----------------------------------------------------------------------------
+// BTIndicatorPlugin::~BTIndicatorPlugin
+// ----------------------------------------------------------------------------
+BTIndicatorPlugin::~BTIndicatorPlugin()
+    {
+    delete mIndicatorTranslator;
+    }
+
+// ----------------------------------------------------------------------------
+// BTIndicatorPlugin::indicatorTypes
+// Return notification types this plugin implements
+// ----------------------------------------------------------------------------
+QStringList BTIndicatorPlugin::indicatorTypes() const
+{
+  QStringList types; 
+  types << "com.nokia.bluetooth.indicatorplugin/1.0";
+  return types;
+}
+
+// ----------------------------------------------------------------------------
+// BTIndicatorPlugin::accessAllowed
+// ----------------------------------------------------------------------------
+bool BTIndicatorPlugin::accessAllowed(const QString &indicatorType,
+        const QVariantMap &securityInfo) const
+{
+    Q_UNUSED(indicatorType)
+    Q_UNUSED(securityInfo)
+
+    // This plugin doesn't perform operations that may compromise security.
+    // All clients are allowed to use.
+    return true;
+}
+
+
+// ----------------------------------------------------------------------------
+// BTIndicatorPlugin::createIndicator
+// Creates and returns the HbIndicatorInterface
+// ----------------------------------------------------------------------------
+HbIndicatorInterface* BTIndicatorPlugin::createIndicator(const QString &indicatorType)
+{
+    if(!mIndicatorTranslator)
+        {
+        mIndicatorTranslator = new HbTranslator(BTINDICATOR_TRANSLATION);
+        }
+    HbIndicatorInterface *indicator = new BTIndicator(indicatorType);
+    return indicator;
+}
+
+// ----------------------------------------------------------------------------
+// BTIndicatorPlugin::error
+// ----------------------------------------------------------------------------
+int BTIndicatorPlugin::error() const
+{
+    return mError;
+}
+
--- a/bluetoothengine/btmac/inc/btmonocmdhandler/btmc_defs.h	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btmac/inc/btmonocmdhandler/btmc_defs.h	Mon Jul 12 18:51:05 2010 +0300
@@ -35,6 +35,16 @@
     EBTMonoVoiceRecognitionDeactivatedByRemote,
     };
 
+#ifndef NO101APPDEPFIXES
+// Local definition of application-layer PubSub key 
+// (TSINDKeys::ERecognitionState, in KSINDUID = KUidSystemCategoryValue):
+const TInt KBTMonoVoiceRecognitionStateKey = 0;
+
+// Local definition of application-layer key value
+// (TRecognitionStateValues::ERecognitionStarted):
+const TInt KBTMonoVoiceRecognitionStarted = 0;
+#endif  //NO101APPDEPFIXES
+
 enum TBTMonoATPhoneIndicatorId
     {
     EBTMonoATNetworkIndicator = 1,
--- a/bluetoothengine/btnotif/bmarm/Btnotifu.def	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
-	NotifierArray__Fv @ 1 NONAME R3UNUSED ; NotifierArray(void)
-
--- a/bluetoothengine/btnotif/btdevicedialogplugin/btdevicedialogplugin.pro	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btnotif/btdevicedialogplugin/btdevicedialogplugin.pro	Mon Jul 12 18:51:05 2010 +0300
@@ -17,7 +17,7 @@
 TEMPLATE = lib
 TARGET = btdevicedialogplugin
 CONFIG += hb plugin
-INCLUDEPATH += . ../inc
+INCLUDEPATH += . ../inc ../../btui/inc
 DEPENDPATH += .
 DESTDIR = $${HB_BUILD_DIR}/plugins/devicedialogs
 
@@ -33,7 +33,9 @@
     inc/btdevicesearchdialogwidget.h \
     inc/btmoredevicesdialogwidget.h \
     inc/btsenddialogwidget.h \
-    inc/btdevicedialogplugintrace.h 
+    inc/btdevicedialogplugintrace.h \
+    inc/btdevicedialogrecvquerywidget.h \
+    inc/btrecvprgrsdialogwidget.h
 
     
 SOURCES += src/btdevicedialogplugin.cpp \
@@ -42,7 +44,9 @@
     src/btdevicedialognotifwidget.cpp \
     src/btdevicesearchdialogwidget.cpp \
     src/btmoredevicesdialogwidget.cpp \
-    src/btsenddialogwidget.cpp
+    src/btsenddialogwidget.cpp \
+    src/btdevicedialogrecvquerywidget.cpp \
+    src/btrecvprgrsdialogwidget.cpp
 
 RESOURCES += btdevicedialogplugin.qrc
     
@@ -51,10 +55,13 @@
     TARGET.EPOCALLOWDLLDATA = 1
     TARGET.CAPABILITY = CAP_GENERAL_DLL
     TARGET.UID3 = 0x2002E6DF
+    
+    LIBS += -lbtdevice
+    
     hblib.sources = Hb.dll
     hblib.path = \sys\bin
     hblib.depends = "(0xEEF9EA38), 1, 0, 0, {\"Hb\"}"
-    pluginstub.sources = btdevicedialogplugin.dll
+    pluginstub.sources = $${TARGET}.dll
     pluginstub.path = /resource/plugins/devicedialogs
     DEPLOYMENT += pluginstub
 }
@@ -66,4 +73,4 @@
 BLD_INF_RULES.prj_exports += \
   "$${LITERAL_HASH}include <platform_paths.hrh>" \
   	"rom/btdevicedialogplugin.iby CORE_MW_LAYER_IBY_EXPORT_PATH(btdevicedialogplugin.iby)" \
-    "qmakepluginstubs/btdevicedialogplugin.qtplugin /epoc32/data/z/pluginstub/btdevicedialogplugin.qtplugin"
+    "qmakepluginstubs/$${TARGET}.qtplugin /epoc32/data/z/pluginstub/$${TARGET}.qtplugin"
--- a/bluetoothengine/btnotif/btdevicedialogplugin/btdevicedialogplugin.qrc	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btnotif/btdevicedialogplugin/btdevicedialogplugin.qrc	Mon Jul 12 18:51:05 2010 +0300
@@ -4,6 +4,8 @@
         <file>docml/bt-more-devices-dialog.docml</file>
         <file>docml/bt-send-dialog.docml</file>
         <file>icons/qgn_prop_sml_bt.svg</file>
-	<file>icons/qtg_large_bluetooth.svg</file>
+        <file>icons/qtg_large_bluetooth.svg</file>
+        <file>docml/bt-receive-auth-dialog.docml</file>
+        <file>docml/bt-recv-progress-dialog.docml</file>
     </qresource>
 </RCC>
--- a/bluetoothengine/btnotif/btdevicedialogplugin/docml/bt-device-search-dialog.docml	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btnotif/btdevicedialogplugin/docml/bt-device-search-dialog.docml	Mon Jul 12 18:51:05 2010 +0300
@@ -1,19 +1,27 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<hbdocument version="1.0">
-    <widget name="dialog" type="HbDialog">
+<hbdocument version="1.1">
+    <object name="viewaction" type="HbAction">
+        <string locid="txt_common_button_show" name="text"/>
+    </object>
+    <object name="stopretryaction" type="HbAction">
+        <string locid="txt_common_button_stop" name="text"/>
+    </object>
+    <widget name="searchdialog" type="HbDialog">
+        <rect height="72.07463un" name="geometry" width="49.73134un" x="1.73134un" y="11.64179un"/>
         <widget name="heading" role="HbDialog:headingWidget" type="HbLabel">
             <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+            <string locid="txt_bt_subhead_bluetooth_found_devices" name="plainText"/>
         </widget>
         <widget name="container" role="HbDialog:contentWidget" type="HbWidget">
             <widget name="container_1" type="HbWidget">
                 <widget name="searchDoneLabel" type="HbLabel">
                     <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
                     <sizehint height="3.8806un" type="PREFERRED" width="26.86567un"/>
-                    <string name="plainText" value="Search Done"/>
+                    <string locid="txt_bt_subhead_search_done" name="plainText"/>
                 </widget>
                 <widget name="searchLabel" type="HbLabel">
                     <sizehint height="3.8806un" type="PREFERRED" width="18.95522un"/>
-                    <string name="plainText" value="Searching..."/>
+                    <string locid="txt_bt_subhead_searching" name="plainText"/>
                 </widget>
                 <widget name="iconLabel" type="HbLabel">
                     <sizehint height="3.8806un" type="PREFERRED" width="3.43284un"/>
@@ -31,32 +39,18 @@
             </widget>
             <widget name="listView" type="HbListView">
                 <widget name="listItemPrototype" role="HbAbstractView:prototype" type="HbListViewItem"/>
+                <enums name="verticalScrollBarPolicy" value="ScrollBarAsNeeded"/>
                 <sizehint height="47.7612un" type="PREFERRED" width="35.8209un"/>
-                <enums name="verticalScrollBarPolicy" value="ScrollBarAsNeeded"/>
-            </widget>
-            <widget name="container_3" type="HbWidget">
-                <widget name="viewby" type="HbPushButton">
-                    <string name="text" value="View"/>
-                </widget>
-                <widget name="stop" type="HbPushButton">
-                    <string name="text" value="Stop"/>
-                </widget>
-                <real name="z" value="0"/>
-                <sizehint height="9.85821un" type="PREFERRED" width="23.8806un"/>
-                <sizehint height="8.85821un" type="MINIMUM"/>
-                <layout orientation="Horizontal" type="linear">
-                    <linearitem itemname="viewby"/>
-                    <linearitem itemname="stop"/>
-                </layout>
             </widget>
             <layout type="grid">
+                <griditem column="0" itemname="container_1" row="0"/>
                 <griditem column="0" itemname="listView" row="1"/>
-                <griditem column="0" itemname="container_1" row="0"/>
-                <griditem column="0" itemname="container_3" row="2"/>
             </layout>
         </widget>
+        <ref object="stopretryaction" role="HbWidget:addAction"/>
+        <ref object="viewaction" role="HbWidget:addAction"/>
     </widget>
-    <metadata activeUIState="Common ui state" display="NHD portrait" unit="un">
+    <metadata activeUIState="Common ui state" display="NHD-3.2-inch_portrait" unit="un">
         <uistate name="Common ui state" sections="#common"/>
         <dummydata objectName="listView" section="#common" value="empty_dummydata_template"/>
     </metadata>
--- a/bluetoothengine/btnotif/btdevicedialogplugin/docml/bt-more-devices-dialog.docml	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btnotif/btdevicedialogplugin/docml/bt-more-devices-dialog.docml	Mon Jul 12 18:51:05 2010 +0300
@@ -1,45 +1,35 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<hbdocument version="1.0">
-    <widget name="dialog" type="HbDialog">
-        <widget name="container" role="HbDialog:headingWidget" type="HbWidget">
-            <widget name="container_1" type="HbWidget">
-                <widget name="moreDevices" type="HbPushButton">
-                    <string name="text" value="More devices"/>
-                    <string name="state" value="normal"/>
-                </widget>
-                <widget name="cancel" type="HbPushButton">
-                    <string name="text" value="Cancel"/>
-                    <string name="state" value="normal"/>
-                </widget>
-                <real name="z" value="2"/>
-                <sizehint height="10un" type="PREFERRED" width="27un"/>
-                <layout spacing="0.5un" type="grid">
-                    <griditem column="0" itemname="moreDevices" row="0"/>
-                    <griditem column="1" itemname="cancel" row="0"/>
-                </layout>
+<hbdocument version="1.1">
+    <object name="moreaction" type="HbAction">
+        <enums name="softKeyRole" value="NoSoftKey"/>
+        <string locid="txt_bt_button_more_devices" name="text"/>
+        <string name="toolTip" value="txt_bt_button_more_devices"/>
+    </object>
+    <object name="cancelaction" type="HbAction">
+        <string locid="txt_common_button_cancel" name="text"/>
+    </object>
+    <widget name="lastuseddialog" type="HbDialog">
+        <rect height="68.20896un" name="geometry" width="49.73134un" x="1.73134un" y="11.64179un"/>
+        <widget name="useddeviceslabel" role="HbDialog:headingWidget" type="HbLabel">
+            <real name="z" value="1"/>
+            <string locid="txt_bt_title_send_to" name="plainText"/>
+        </widget>
+        <widget name="container_2" role="HbDialog:contentWidget" type="HbWidget">
+            <widget name="listView" type="HbListView">
+                <widget name="listItemPrototype_1" role="HbAbstractView:prototype" type="HbListViewItem"/>
+                <enums name="verticalScrollBarPolicy" value="ScrollBarAsNeeded"/>
+                <sizehint height="47.7612un" type="PREFERRED" width="35.8209un"/>
             </widget>
-            <widget name="listView" type="HbListView">
-                <widget name="listItemPrototype" role="HbAbstractView:prototype" type="HbListViewItem">
-                    <string name="state" value="normal"/>
-                </widget>
-                <enums name="horizontalScrollBarPolicy" value="ScrollBarAutoHide"/>
-                <real name="z" value="2"/>
-                <sizehint height="47.7612un" type="PREFERRED" width="35.8209un"/>
-                <enums name="verticalScrollBarPolicy" value="ScrollBarAsNeeded"/>
-            </widget>
-            <widget name="label" type="HbLabel"/>
-            <real name="z" value="3"/>
-            <layout orientation="Vertical" type="linear">
-                <contentsmargins bottom="1.34328un" left="1.34328un" right="1.34328un" top="1.34328un"/>
-                <linearitem itemname="label"/>
-                <linearitem itemname="listView"/>
-                <linearitem itemname="container_1"/>
+            <real name="z" value="2"/>
+            <layout type="grid">
+                <griditem column="0" itemname="listView" row="0"/>
             </layout>
         </widget>
-        <rect height="73.43284un" name="geometry" width="45.22388un" x="4.62687un" y="6.86567un"/>
+        <ref object="moreaction" role="HbWidget:addAction"/>
+        <ref object="cancelaction" role="HbWidget:addAction"/>
     </widget>
-    <metadata activeUIState="Common ui state" display="NHD portrait" unit="un">
+    <metadata activeUIState="Common ui state" display="NHD-3.2-inch_portrait" unit="un">
         <uistate name="Common ui state" sections="#common"/>
-        <dummydata objectName="listView" section="#common" value="0"/>
+        <dummydata objectName="listView" section="#common" value="empty_dummydata_template"/>
     </metadata>
 </hbdocument>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/btnotif/btdevicedialogplugin/docml/bt-receive-auth-dialog.docml	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="1.1">
+    <object name="noaction" type="HbAction">
+        <string locid="txt_common_button_no" name="iconText"/>
+        <string locid="txt_common_button_no" name="text"/>
+        <string locid="txt_common_button_no" name="toolTip"/>
+    </object>
+    <object name="yesaction" type="HbAction">
+        <string locid="txt_common_button_yes" name="iconText"/>
+        <string locid="txt_common_button_yes" name="text"/>
+        <string locid="txt_common_button_yes" name="toolTip"/>
+    </object>
+    <widget name="senddialog" type="HbDialog">
+        <rect height="40.59702un" name="geometry" width="49.73134un" x="1.49254un" y="36.26866un"/>
+        <widget name="heading" role="HbDialog:headingWidget" type="HbLabel">
+            <real name="z" value="1"/>
+            <string name="plainText"/>
+        </widget>
+        <ref object="yesaction" role="HbWidget:addAction"/>
+        <ref object="noaction" role="HbWidget:addAction"/>
+        <widget name="container" role="HbDialog:contentWidget" type="HbWidget">
+            <widget name="filecontainer" type="HbWidget">
+                <widget name="deviceIcon" type="HbLabel">
+                    <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+                    <real name="z" value="1"/>
+                </widget>
+                <widget name="deviceType" type="HbLabel">
+                    <real name="z" value="3"/>
+                    <sizehint height="4.02985un" type="PREFERRED" width="24.32836un"/>
+                    <string name="plainText"/>
+                </widget>
+                <widget name="deviceName" type="HbLabel">
+                    <real name="z" value="4"/>
+                    <sizehint height="4.1791un" type="PREFERRED" width="35.07463un"/>
+                    <string name="plainText"/>
+                </widget>
+                <real name="z" value="0"/>
+                <sizehint height="9.8806un" type="PREFERRED" width="23.8806un"/>
+                <layout type="anchor">
+                    <anchoritem dst="deviceIcon" dstEdge="LEFT" spacing="1.04478un" src="" srcEdge="LEFT"/>
+                    <anchoritem dst="deviceIcon" dstEdge="BOTTOM" spacing="-0.71767un" src="" srcEdge="BOTTOM"/>
+                    <anchoritem dst="deviceType" dstEdge="LEFT" spacing="9.30448un" src="" srcEdge="LEFT"/>
+                    <anchoritem dst="deviceType" dstEdge="BOTTOM" spacing="-0.26991un" src="" srcEdge="BOTTOM"/>
+                    <anchoritem dst="deviceName" dstEdge="LEFT" spacing="9.30448un" src="" srcEdge="LEFT"/>
+                    <anchoritem dst="deviceName" dstEdge="TOP" spacing="0.44776un" src="" srcEdge="TOP"/>
+                </layout>
+            </widget>
+            <widget name="checkbox" type="HbCheckBox">
+                <string locid="txt_bt_list_dont_ask_again_with_this_device" name="text"/>
+            </widget>
+            <real name="z" value="2"/>
+            <layout orientation="Vertical" type="linear">
+                <linearitem itemname="filecontainer"/>
+                <linearitem itemname="checkbox"/>
+            </layout>
+        </widget>
+    </widget>
+    <metadata activeUIState="Common ui state" display="NHD-3.2-inch_portrait" unit="un">
+        <uistate name="Common ui state" sections="#common"/>
+    </metadata>
+</hbdocument>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/btnotif/btdevicedialogplugin/docml/bt-recv-progress-dialog.docml	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="1.1">
+    <object name="hideaction" type="HbAction">
+        <string locid="txt_common_button_hide" name="iconText"/>
+        <string locid="txt_common_button_hide" name="text"/>
+        <string locid="txt_common_button_hide" name="toolTip"/>
+    </object>
+    <object name="cancelaction" type="HbAction">
+        <string locid="txt_common_button_cancel" name="iconText"/>
+        <string locid="txt_common_button_cancel" name="text"/>
+        <string locid="txt_common_button_cancel" name="toolTip"/>
+    </object>
+    <widget name="senddialog" type="HbDialog">
+        <rect height="37.46269un" name="geometry" width="49.73134un" x="1.49254un" y="36.26866un"/>
+        <widget name="heading" role="HbDialog:headingWidget" type="HbLabel">
+            <real name="z" value="1"/>
+            <string name="plainText"/>
+        </widget>
+        <widget name="container" role="HbDialog:contentWidget" type="HbWidget">
+            <widget name="filecontainer" type="HbWidget">
+                <widget name="fileiconlabel" type="HbLabel">
+                    <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+                    <icon iconName="qtg_small_smiley_very_cool" name="icon"/>
+                    <real name="z" value="1"/>
+                </widget>
+                <widget name="fileSize" type="HbLabel">
+                    <real name="z" value="3"/>
+                    <sizehint height="4.02985un" type="PREFERRED" width="24.32836un"/>
+                    <string name="plainText"/>
+                </widget>
+                <widget name="fileName" type="HbLabel">
+                    <real name="z" value="4"/>
+                    <sizehint height="4.1791un" type="PREFERRED" width="35.07463un"/>
+                    <string name="plainText"/>
+                </widget>
+                <real name="z" value="0"/>
+                <sizehint height="9.8806un" type="PREFERRED" width="23.8806un"/>
+                <layout type="anchor">
+                    <anchoritem dst="fileiconlabel" dstEdge="LEFT" spacing="1.04478un" src="" srcEdge="LEFT"/>
+                    <anchoritem dst="fileiconlabel" dstEdge="BOTTOM" spacing="-0.71767un" src="" srcEdge="BOTTOM"/>
+                    <anchoritem dst="fileSize" dstEdge="LEFT" spacing="9.30448un" src="" srcEdge="LEFT"/>
+                    <anchoritem dst="fileSize" dstEdge="BOTTOM" spacing="-0.26991un" src="" srcEdge="BOTTOM"/>
+                    <anchoritem dst="fileName" dstEdge="LEFT" spacing="9.30448un" src="" srcEdge="LEFT"/>
+                    <anchoritem dst="fileName" dstEdge="TOP" spacing="0.44776un" src="" srcEdge="TOP"/>
+                </layout>
+            </widget>
+            <widget name="progresscontainer" type="HbWidget">
+                <widget name="horizontalProgressBar" type="HbProgressBar">
+                    <integer name="progressValue" value="30"/>
+                    <integer name="minimum" value="0"/>
+                    <sizehint height="3un" type="PREFERRED" width="7.46un"/>
+                    <enums name="orientation" value="Horizontal"/>
+                    <integer name="maximum" value="100"/>
+                </widget>
+                <real name="z" value="0"/>
+                <sizehint height="4un" type="PREFERRED" width="11.9403un"/>
+                <sizehint height="1un" type="MINIMUM"/>
+                <layout orientation="Vertical" spacing="0un" type="linear">
+                    <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+                    <linearitem itemname="horizontalProgressBar"/>
+                </layout>
+            </widget>
+            <widget name="fileCount_label" type="HbLabel">
+                <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+                <string name="plainText"/>
+            </widget>
+            <real name="z" value="2"/>
+            <layout orientation="Vertical" type="linear">
+                <linearitem itemname="filecontainer"/>
+                <linearitem itemname="fileCount_label"/>
+                <linearitem itemname="progresscontainer"/>
+            </layout>
+        </widget>
+        <ref object="hideaction" role="HbWidget:addAction"/>
+        <ref object="cancelaction" role="HbWidget:addAction"/>
+    </widget>
+    <metadata activeUIState="Common ui state" display="NHD-3.2-inch_portrait" unit="un">
+        <uistate name="Common ui state" sections="#common"/>
+    </metadata>
+</hbdocument>
--- a/bluetoothengine/btnotif/btdevicedialogplugin/docml/bt-send-dialog.docml	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btnotif/btdevicedialogplugin/docml/bt-send-dialog.docml	Mon Jul 12 18:51:05 2010 +0300
@@ -1,37 +1,71 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<hbdocument version="1.0">
-    <widget name="dialog" type="HbDialog">
-        <widget name="container" role="HbDialog:headingWidget" type="HbWidget">
-            <widget name="heading" type="HbLabel">
-                <sizehint height="3.92537un" type="PREFERRED" width="0un"/>
-            </widget>
-            <widget name="container_1" type="HbWidget">
-                <widget name="listView" type="HbListView">
-                    <sizehint height="47.7612un" type="PREFERRED" width="35.8209un"/>
+<hbdocument version="1.1">
+    <object name="hideaction" type="HbAction">
+        <string locid="txt_common_button_hide" name="text"/>
+    </object>
+    <object name="cancelaction" type="HbAction">
+        <string locid="txt_common_button_cancel" name="text"/>
+    </object>
+    <widget name="senddialog" type="HbDialog">
+        <rect height="32.68657un" name="geometry" width="49.73134un" x="1.49254un" y="36.26866un"/>
+        <widget name="heading" role="HbDialog:headingWidget" type="HbLabel">
+            <real name="z" value="1"/>
+            <string name="plainText" value="Sending File x/y to Device"/>
+        </widget>
+        <ref object="cancelaction" role="HbWidget:addAction"/>
+        <ref object="hideaction" role="HbWidget:addAction"/>
+        <widget name="container" role="HbDialog:contentWidget" type="HbWidget">
+            <widget name="filecontainer" type="HbWidget">
+                <widget name="fileiconlabel" type="HbLabel">
+                    <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+                    <icon iconName="qtg_small_smiley_very_cool" name="icon"/>
+                    <real name="z" value="1"/>
+                </widget>
+                <widget name="filesizelabel" type="HbLabel">
+                    <real name="z" value="3"/>
+                    <sizehint height="4.02985un" type="PREFERRED" width="24.32836un"/>
+                    <string name="plainText" value="Label"/>
+                </widget>
+                <widget name="filenamelabel" type="HbLabel">
+                    <real name="z" value="4"/>
+                    <sizehint height="4.1791un" type="PREFERRED" width="35.07463un"/>
+                    <string name="plainText" value="Label"/>
                 </widget>
                 <real name="z" value="0"/>
-                <sizehint height="23.8806un" type="PREFERRED" width="11.9403un"/>
-                <layout orientation="Vertical" type="linear">
-                    <linearitem itemname="listView"/>
+                <sizehint height="9.8806un" type="PREFERRED" width="23.8806un"/>
+                <layout type="anchor">
+                    <anchoritem dst="fileiconlabel" dstEdge="LEFT" spacing="1.04478un" src="" srcEdge="LEFT"/>
+                    <anchoritem dst="fileiconlabel" dstEdge="BOTTOM" spacing="-0.71767un" src="" srcEdge="BOTTOM"/>
+                    <anchoritem dst="filesizelabel" dstEdge="LEFT" spacing="9.30448un" src="" srcEdge="LEFT"/>
+                    <anchoritem dst="filesizelabel" dstEdge="BOTTOM" spacing="-0.26991un" src="" srcEdge="BOTTOM"/>
+                    <anchoritem dst="filenamelabel" dstEdge="LEFT" spacing="9.30448un" src="" srcEdge="LEFT"/>
+                    <anchoritem dst="filenamelabel" dstEdge="TOP" spacing="0.44776un" src="" srcEdge="TOP"/>
                 </layout>
             </widget>
-            <widget name="horizontalProgressBar" type="HbProgressBar">
-                <integer name="progressValue" value="30"/>
-                <integer name="minimum" value="0"/>
-                <enums name="orientation" value="Horizontal"/>
-                <integer name="maximum" value="100"/>
+            <widget name="progresscontainer" type="HbWidget">
+                <widget name="horizontalProgressBar" type="HbProgressBar">
+                    <integer name="progressValue" value="30"/>
+                    <integer name="minimum" value="0"/>
+                    <sizehint height="3un" type="PREFERRED" width="7.46un"/>
+                    <enums name="orientation" value="Horizontal"/>
+                    <integer name="maximum" value="100"/>
+                </widget>
+                <real name="z" value="0"/>
+                <sizehint height="4un" type="PREFERRED" width="11.9403un"/>
+                <sizehint height="1un" type="MINIMUM"/>
+                <layout orientation="Vertical" spacing="0un" type="linear">
+                    <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+                    <linearitem itemname="horizontalProgressBar"/>
+                </layout>
             </widget>
-            <real name="z" value="1"/>
+            <real name="z" value="2"/>
             <layout orientation="Vertical" type="linear">
-                <linearitem itemname="heading"/>
-                <linearitem itemname="container_1"/>
-                <linearitem itemname="horizontalProgressBar"/>
+                <linearitem itemname="filecontainer"/>
+                <linearitem itemname="progresscontainer"/>
             </layout>
         </widget>
-        <rect height="17.46269un" name="geometry" width="47.01493un" x="2.68657un" y="46.26866un"/>
     </widget>
-    <metadata activeUIState="Common ui state" display="NHD portrait" unit="un">
+    <metadata activeUIState="Common ui state" display="NHD-3.2-inch_portrait" unit="un">
         <uistate name="Common ui state" sections="#common"/>
-        <dummydata objectName="listView" section="#common" value="app_list_template5"/>
     </metadata>
 </hbdocument>
--- a/bluetoothengine/btnotif/btdevicedialogplugin/inc/btdevicedialognotifwidget.h	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btnotif/btdevicedialogplugin/inc/btdevicedialognotifwidget.h	Mon Jul 12 18:51:05 2010 +0300
@@ -21,12 +21,13 @@
 
 #include <QVariantMap>
 
+#include <hbpopup.h>
 #include <hbdevicedialoginterface.h>
 #include <hbdevicedialog.h>
 #include <hbnotificationdialog.h>
 
 /*!
-    \class BtDeviceDialogQueryWidget
+    \class BtDeviceDialogNotifWidget
     \brief Widget class with properties setting. 
 
     BtDeviceDialogQueryWidget, inherited from HbNotificationDialog, 
@@ -36,38 +37,42 @@
     
  */
 class BtDeviceDialogNotifWidget :
-    public HbNotificationDialog, public HbDeviceDialogInterface
+    public QObject, public HbDeviceDialogInterface
 {
     Q_OBJECT
     
 public:
     BtDeviceDialogNotifWidget(const QVariantMap &parameters);
+    ~BtDeviceDialogNotifWidget();
     
     // From base class HbDeviceDialogInterface
     virtual bool setDeviceDialogParameters(const QVariantMap &parameters);
     virtual int deviceDialogError() const;
     virtual void closeDeviceDialog(bool byClient);
-    virtual HbDialog *deviceDialogWidget() const;
+    HbPopup *deviceDialogWidget() const;
+    virtual QObject *signalSender() const;
 
 signals: 
     // Required by the framework
     void deviceDialogClosed();
+    void deviceDialogData(QVariantMap data);
     
 private:
+    
     void processParam(const QVariantMap &parameters);
-    bool constructQueryDialog(const QVariantMap &parameters);
+    bool constructNotifDialog(const QVariantMap &parameters);
     void resetProperties();
         
-    // From base HbInputDialog, reimplement and emit signals. 
-    void hideEvent(QHideEvent *event);
-    void showEvent(QShowEvent *event);
-
+public slots:
+    void NotifClosed(HbAction *action);
+    
 private:
     Q_DISABLE_COPY(BtDeviceDialogNotifWidget)
 
     int mLastError;
     int mSendAction;
     bool mShowEventReceived;
+    HbNotificationDialog* mNotificationDialog;
 };
 
 #endif // BTDEVICEDIALOGNOTIFWIDGET_H
--- a/bluetoothengine/btnotif/btdevicedialogplugin/inc/btdevicedialogplugin.h	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btnotif/btdevicedialogplugin/inc/btdevicedialogplugin.h	Mon Jul 12 18:51:05 2010 +0300
@@ -26,6 +26,7 @@
 
 // Forward declarations
 class BtDeviceDialogPluginPrivate;
+class HbTranslator;
 
 /*!
     \class BtDeviceDialogPlugin
@@ -67,6 +68,8 @@
 private:
     Q_DISABLE_COPY(BtDeviceDialogPlugin)
     BtDeviceDialogPluginPrivate *d;
+    HbTranslator* mDialogTranslator;
+    HbTranslator* mViewTranslator;
 };
 
 #endif // BTDEVICEDIALOGPLUGIN_P_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/btnotif/btdevicedialogplugin/inc/btdevicedialogrecvquerywidget.h	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,77 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  BtDeviceDialogWidget class declaration.
+*
+*/
+
+
+#ifndef BTDEVICEDIALOGRECVQUERYWIDGET_H_
+#define BTDEVICEDIALOGRECVQUERYWIDGET_H_
+
+#include <QObject>
+#include <QVariantMap>
+#include <hbdialog.h>
+#include <hbdevicedialoginterface.h>
+#include <hbpopup.h>
+#include <hbdocumentloader.h>
+#include <qstandarditemmodel.h>
+#include <hbcheckbox.h>
+#include <hblabel.h>
+#include <hbaction.h>
+
+
+class BTRecvQueryDialogWidget : public QObject, 
+                                public HbDeviceDialogInterface
+    {
+    Q_OBJECT
+    
+public:
+    BTRecvQueryDialogWidget(const QVariantMap &parameters);
+    ~BTRecvQueryDialogWidget();
+    
+public: // from HbDeviceDialogInterface
+    bool setDeviceDialogParameters(const QVariantMap &parameters);
+    int deviceDialogError() const;
+    void closeDeviceDialog(bool byClient);
+    HbPopup *deviceDialogWidget() const;
+    virtual QObject *signalSender() const;
+    
+public slots:
+    void yesClicked();
+    void noClicked();
+    void checkBoxStateChanged(bool checked);
+
+private:
+    bool constructDialog(const QVariantMap &parameters);
+    
+signals:
+    void deviceDialogClosed();
+    void deviceDialogData(QVariantMap data);
+    
+private:
+    HbDocumentLoader    *mLoader;
+    QStandardItemModel  *mContentItemModel;
+    HbLabel             *mHeading;
+    HbLabel             *mDeviceName;
+    HbLabel             *mDeviceType;
+    HbLabel             *mDeviceIcon;
+    HbAction            *mYes;
+    HbAction            *mNo;
+    HbCheckBox          *mCheckBox;
+    HbDialog            *mDialog;
+    
+    Q_DISABLE_COPY(BTRecvQueryDialogWidget)
+    };
+
+#endif /* BTDEVICEDIALOGRECVQUERYWIDGET_H_ */
--- a/bluetoothengine/btnotif/btdevicedialogplugin/inc/btdevicesearchdialogwidget.h	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btnotif/btdevicedialogplugin/inc/btdevicesearchdialogwidget.h	Mon Jul 12 18:51:05 2010 +0300
@@ -28,8 +28,9 @@
 #include <qstandarditemmodel.h>
 #include <hbradiobuttonlist.h>
 #include <hblistwidget.h>
-#include <hbpushbutton.h>
 #include <hblabel.h>
+#include <hbaction.h>
+
 
 struct device
     {
@@ -38,7 +39,8 @@
     int     mDeviceIdx;
     };
 
-class BTDeviceSearchDialogWidget : public HbDialog,
+
+class BTDeviceSearchDialogWidget : public QObject,
                                 public HbDeviceDialogInterface
     {
     Q_OBJECT
@@ -52,6 +54,7 @@
     int deviceDialogError() const;
     void closeDeviceDialog(bool byClient);
     HbPopup *deviceDialogWidget() const;
+    virtual QObject *signalSender() const;
     
 public slots:
     void stopRetryClicked();
@@ -59,7 +62,8 @@
     void viewByClicked();
     void deviceSelected(const QModelIndex& modelIndex);
 //    void viewByItemSelected(int index);
-    void selectionDialogClosed(HbAction*);
+    void selectionDialogClosed(HbAction *action);
+    void searchDialogClosed(); 
     
 private:
     bool constructDialog(const QVariantMap &parameters);
@@ -87,8 +91,6 @@
     QList<QString>      mDeviceTypeList;
     QList<device>       mDeviceList;
     HbListView*         mListView;
-    HbPushButton*       mStopRetryBtn;
-    HbPushButton*       mViewByBtn;
     HbLabel*            mSearchLabel; 
     HbLabel*            mSearchIconLabel;
     HbLabel*            mSearchDoneLabel;
@@ -97,6 +99,11 @@
     int                 mDeviceLstIdx;
     int                 mSelectedType;
     int                 mDeviceDialogData;
+    HbDialog *mSearchDevicesDialog;
+    HbAction *mStopRetryAction;
+    HbAction *mViewByAction;
+
+    int mStopRetryFlag;
     
     Q_DISABLE_COPY(BTDeviceSearchDialogWidget)
     };
--- a/bluetoothengine/btnotif/btdevicedialogplugin/inc/btmoredevicesdialogwidget.h	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btnotif/btdevicedialogplugin/inc/btmoredevicesdialogwidget.h	Mon Jul 12 18:51:05 2010 +0300
@@ -16,8 +16,8 @@
  */
 
 
-#ifndef BTMOREDEVICESDIALOGWIDGET_H_
-#define BTMOREDEVICESDIALOGWIDGET_H_
+#ifndef BTMOREDEVICESDIALOGWIDGET_H
+#define BTMOREDEVICESDIALOGWIDGET_H
 
 #include <QObject>
 #include <QVariantMap>
@@ -26,10 +26,9 @@
 #include <hbpopup.h>
 #include <hbdocumentloader.h>
 #include <qstandarditemmodel.h>
-
+#include <hbaction.h>
 
-class BTMoreDevicesDialogWidget : public HbDialog,
-                                public HbDeviceDialogInterface
+class BTMoreDevicesDialogWidget : public QObject,  public HbDeviceDialogInterface
     {
     Q_OBJECT
     
@@ -37,12 +36,12 @@
     BTMoreDevicesDialogWidget(const QVariantMap &parameters);
     ~BTMoreDevicesDialogWidget();
     
-public: // from HbDeviceDialogInterface
+public: // from HbDeviceDialogInterface`
     bool setDeviceDialogParameters(const QVariantMap &parameters);
     int deviceDialogError() const;
     void closeDeviceDialog(bool byClient);
     HbPopup *deviceDialogWidget() const;
-  //  virtual QObject *signalSender() const;
+    virtual QObject *signalSender() const;
     
 public slots:
     void moreDevicesClicked();
@@ -52,8 +51,8 @@
     
 private:
     bool constructDialog(const QVariantMap &parameters);
-    void hideEvent(QHideEvent *event);
-    void showEvent(QShowEvent *event);
+ //   void hideEvent(QHideEvent *event);
+ //   void showEvent(QShowEvent *event);
     QIcon icon(/*QString deviceType*/);
     
 signals:
@@ -63,8 +62,9 @@
 private:
     HbDocumentLoader *mLoader;
     int              mDeviceDialogData;
-//    HbAction *mMoreAction;
-//    HbAction *mCancelAction;
+    HbDialog *mMoreDeviceDialog;
+    HbAction *mMoreAction;
+    HbAction *mCancelAction;
     
     /**
      * 
@@ -76,4 +76,4 @@
     Q_DISABLE_COPY(BTMoreDevicesDialogWidget)
     };
 
-#endif /* BTMOREDEVICESDIALOGWIDGET_H_ */
+#endif /* BTMOREDEVICESDIALOGWIDGET_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/btnotif/btdevicedialogplugin/inc/btrecvprgrsdialogwidget.h	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,76 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  BtDeviceDialogWidget class declaration.
+*
+*/
+
+#ifndef BTRECVPRGRSDIALOGWIDGET_H_
+#define BTRECVPRGRSDIALOGWIDGET_H_
+
+#include <QObject>
+#include <QVariantMap>
+#include <hbdialog.h>
+#include <hbdevicedialoginterface.h>
+#include <hbpopup.h>
+#include <hbdocumentloader.h>
+#include <qstandarditemmodel.h>
+#include <hbprogressbar.h>
+#include <hblabel.h>
+#include <hbaction.h>
+
+
+class BTRecvPrgrsDialogWidget : public QObject, 
+                                public HbDeviceDialogInterface
+    {
+    Q_OBJECT
+    
+public:
+    BTRecvPrgrsDialogWidget(const QVariantMap &parameters);
+    ~BTRecvPrgrsDialogWidget();
+    
+public: // from HbDeviceDialogInterface
+    bool setDeviceDialogParameters(const QVariantMap &parameters);
+    int deviceDialogError() const;
+    void closeDeviceDialog(bool byClient);
+    HbPopup *deviceDialogWidget() const;
+    virtual QObject *signalSender() const;
+    
+public slots:
+    void hideClicked();
+    void cancelClicked();
+
+private:
+    bool constructDialog(const QVariantMap &parameters);
+    
+signals:
+    void deviceDialogClosed();
+    void deviceDialogData(QVariantMap data);
+    
+private:
+    HbDocumentLoader    *mLoader;
+    QStandardItemModel  *mContentItemModel;
+    HbLabel             *mHeading;
+    HbLabel             *mFileName;
+    HbLabel             *mFileSize;
+    HbLabel             *mFileCount;
+    HbAction            *mHide;
+    HbAction            *mCancel;
+    HbDialog            *mDialog;
+    HbProgressBar       *mProgressBar;
+    int                 mFileSz;
+    
+    Q_DISABLE_COPY(BTRecvPrgrsDialogWidget)
+    };
+
+#endif /* BTRECVPRGRSDIALOGWIDGET_H_ */
--- a/bluetoothengine/btnotif/btdevicedialogplugin/inc/btsenddialogwidget.h	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btnotif/btdevicedialogplugin/inc/btsenddialogwidget.h	Mon Jul 12 18:51:05 2010 +0300
@@ -16,8 +16,8 @@
  */
 
 
-#ifndef BTSENDDIALOGWIDGET_H_
-#define BTSENDDIALOGWIDGET_H_
+#ifndef BTSENDDIALOGWIDGET_H
+#define BTSENDDIALOGWIDGET_H
 
 #include <QObject>
 #include <QVariantMap>
@@ -29,9 +29,10 @@
 #include <hbprogressbar.h>
 #include <hblabel.h>
 #include <hblistview.h>
+#include <hbaction.h>
 
 
-class BTSendDialogWidget : public HbDialog,
+class BTSendDialogWidget : public QObject,
                                 public HbDeviceDialogInterface
     {
     Q_OBJECT
@@ -49,8 +50,8 @@
     
 public slots:
 //    void hideClicked();
-//    void cancelClicked();
-    void inputClosed(HbAction* action);
+    void cancelClicked();
+//    void inputClosed(HbAction* action);
 private:
     bool constructDialog(const QVariantMap &parameters);
     void hideEvent(QHideEvent *event);
@@ -61,13 +62,21 @@
     
 private:
     HbDocumentLoader *mLoader;
-    QStandardItemModel* mContentItemModel;
+ //   QStandardItemModel* mContentItemModel;
     HbProgressBar*      mProgressBar;
-    HbLabel*            mLabel;
-    HbListView*         mListView;
-    int                 mFileIndex;
+    HbLabel*            mDialogHeading;
+    HbLabel*            mFileIconLabel;
+	HbLabel*			mFileNameLabel;
+	HbLabel*			mFileSizeLabel;
+    
+//    HbListView*         mListView;
+    HbDialog *mSendDialog;
+    HbAction *mHideAction;
+    HbAction *mCancelAction;
+    int       mFileIndex;
+
     
     Q_DISABLE_COPY(BTSendDialogWidget)
     };
 
-#endif /* BTSENDDIALOGWIDGET_H_ */
+#endif /* BTSENDDIALOGWIDGET_H */
--- a/bluetoothengine/btnotif/btdevicedialogplugin/src/btdevicedialoginputwidget.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btnotif/btdevicedialogplugin/src/btdevicedialoginputwidget.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -21,8 +21,12 @@
 #include <bluetoothdevicedialogs.h>
 #include <hbaction.h>
 #include <hbdialog.h>
+#include <hblabel.h>
+#include <hbvalidator.h>
 #include "btdevicedialogpluginerrors.h"
 
+const int PASSCODE_MAX_LEN = 16; // from BT specs
+
 /*!
     class Constructor
  */
@@ -118,7 +122,8 @@
 {
     TRACE_ENTRY
 
-    QString keyStr, prompt;
+    QString keyStr, prompt,title,regExp;
+    QVariant name;
     keyStr.setNum( TBluetoothDialogParams::EResource );
     // Validate if the resource item exists.
     QVariantMap::const_iterator i = parameters.constFind( keyStr );
@@ -130,7 +135,11 @@
 
     QVariant param = parameters.value( keyStr );
     if ( param.toInt() == EPinInput ) {
-        prompt = QString( tr( "Passcode for device %1:" ) );
+        // Numeric value only
+        mInputDialog->setInputMode(HbInputDialog::RealInput);
+        title = QString(hbTrId("txt_bt_title_pairing_with_1"));
+        // todo: Fixe the multiline problem
+        prompt = QString( hbTrId( "txt_bt_dialog_please_enter_the_passcode_for_1" ) );
     }
     else {
         mLastError = ParameterError;
@@ -141,23 +150,46 @@
     keyStr.setNum( TBluetoothDeviceDialog::EAdditionalDesc );
     i = parameters.constFind( keyStr );
     // Mini Length required, update prompt
-    // ToDo: use Validator to check input length. 
+    // ToDo: The validator doesn't seem to work properly 
     if ( i != parameters.constEnd() ) {
-        prompt = QString( tr( "Enter %1 digit passcode for device %2:" ) );
+        // Todo : The string ID for the localization is not available yet
+        // for string : "Enter %1 digit passcode for device %2:"
+        // I'm using the "Enter the passcode for device %1" instead
+        prompt = QString( hbTrId( "txt_bt_dialog_please_enter_the_passcode_for_1" ) );
         param = parameters.value( keyStr );
+        regExp = tr("^\\d{%1,}$");
+        regExp.arg(param.toString());
+        HbValidator* validator = new HbValidator(mInputDialog->lineEdit());
+        validator->addField(
+                new QRegExpValidator(
+                        QRegExp(regExp, Qt::CaseInsensitive), validator ),"");
+        mInputDialog->setValidator(validator);
+    }else{
+    // Minimum requirement is to have at least 1 digit
+        regExp = tr("^\\d{1,}$");
+        HbValidator* validator = new HbValidator(mInputDialog->lineEdit());
+        validator->addField(
+                new QRegExpValidator(
+                        QRegExp(regExp, Qt::CaseInsensitive), validator ),"");
+        mInputDialog->setValidator(validator);    
     }
-    
     // replace % with the miniLength and device name
     int repls = prompt.count( QString( "%" ) );
     if ( repls > 1 ) {
         prompt = prompt.arg( param.toString() );
     }
     if ( repls > 0 ) {
-        QVariant name = parameters.value( QString::number( TBluetoothDeviceDialog::EDeviceName ) );
+        name = parameters.value( QString::number( TBluetoothDeviceDialog::EDeviceName ) );
         prompt = prompt.arg( name.toString() );
     }
-    // set property value to this dialog widget
-    mInputDialog->setPromptText( prompt );
+    repls = title.count(QString("%"));
+    if(repls > 0){
+        title = title.arg( name.toString() );
+    }
+    mInputDialog->setHeadingWidget(new HbLabel(title));
+    mInputDialog->lineEdit(0)->setMaxLength(PASSCODE_MAX_LEN);
+    mInputDialog->lineEdit(0)->setText(tr("")); // clear the input field
+    mInputDialog->setPromptText(prompt);
     TRACE_EXIT
 }
 
--- a/bluetoothengine/btnotif/btdevicedialogplugin/src/btdevicedialognotifwidget.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btnotif/btdevicedialogplugin/src/btdevicedialognotifwidget.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -22,7 +22,7 @@
 #include <hbaction.h>
 #include <hbdialog.h>
 #include "btdevicedialogpluginerrors.h"
-
+#include <btuiiconutil.h>
 /*!
     class Constructor
  */
@@ -32,12 +32,23 @@
     // set properties
     mLastError = NoError;
     mShowEventReceived = false;
+    mNotificationDialog = new HbNotificationDialog();
     resetProperties();
-    constructQueryDialog(parameters);
+    constructNotifDialog(parameters);
     TRACE_EXIT
 }
 
 /*!
+    class Constructor
+ */
+BtDeviceDialogNotifWidget::~BtDeviceDialogNotifWidget()
+{
+    TRACE_ENTRY
+    delete mNotificationDialog;
+    return;
+}
+
+/*!
     Set parameters, implementation of interface
     Invoked when HbDeviceDialog::update calls.
  */
@@ -70,8 +81,8 @@
     Q_UNUSED(byClient);
     // Closed by client or internally by server -> no action to be transmitted.
     mSendAction = false;
-    close();
-    // If show event has been received, close is signalled from hide event. If not,
+    mNotificationDialog->close();
+     // If show event has been received, close is signalled from hide event. If not,
     // hide event does not come and close is signalled from here.
     if (!mShowEventReceived) {
         emit deviceDialogClosed();
@@ -82,22 +93,27 @@
 /*!
     Return display widget, implementation of interface
  */
-HbDialog *BtDeviceDialogNotifWidget::deviceDialogWidget() const
+HbPopup *BtDeviceDialogNotifWidget::deviceDialogWidget() const
 {
     TRACE_ENTRY
     TRACE_EXIT
+    return mNotificationDialog;
+}
+
+QObject* BtDeviceDialogNotifWidget::signalSender() const
+    {
     return const_cast<BtDeviceDialogNotifWidget*>(this);
-}
+    }
 
 /*!
     Construct display widget
  */
-bool BtDeviceDialogNotifWidget::constructQueryDialog(const QVariantMap &parameters)
+bool BtDeviceDialogNotifWidget::constructNotifDialog(const QVariantMap &parameters)
 {
     TRACE_ENTRY
     // analyze the parameters to compose the properties of the message box widget 
     processParam(parameters);
- 
+    connect(mNotificationDialog, SIGNAL(finished(HbAction*)), this, SLOT(NotifClosed(HbAction*)));
     TRACE_EXIT
     return true;
 }
@@ -108,7 +124,8 @@
 void BtDeviceDialogNotifWidget::processParam(const QVariantMap &parameters)
 {
     TRACE_ENTRY
-    QString keyStr, prompt;
+    QString keyStr, prompt,title;
+    QVariant classOfDevice;
     keyStr.setNum( TBluetoothDialogParams::EResource );
     // Validate if the resource item exists.
     QVariantMap::const_iterator i = parameters.constFind( keyStr );
@@ -117,32 +134,41 @@
         mLastError = UnknownDeviceDialogError;
         return;
     }
-
+    HbIcon icon;
     QVariant param = parameters.value( keyStr );
     int key = param.toInt();
     switch ( key ) {
-        // Note dialogs
         case EPairingSuccess:
-            prompt = QString( tr( "Pairing with %1 complete" ) );
+            title = QString(hbTrId( "txt_bt_dpophead_paired" ));
+            prompt = QString( hbTrId( "txt_bt_dpopinfo_paired_to_1" ) );
+            classOfDevice = parameters.value(QString::number( TBluetoothDeviceDialog::EDeviceClass ));
+            icon = getBadgedDeviceTypeIcon(classOfDevice.toInt());
+            mNotificationDialog->setIcon(icon);
             break;
-        case EPairingFailure:
-            prompt = QString( tr( "Unable to pair with %1" ) );
-            break;            
+        // todo: remove this Unpaired notification if not used
+        case EUnpairedDevice:
+            title = QString(hbTrId( "txt_bt_dpophead_unpaired" ));
+            prompt = QString( hbTrId( "txt_bt_dpopinfo_with_1" ) );
+            classOfDevice = parameters.value(QString::number( TBluetoothDeviceDialog::EDeviceClass ));
+            icon = getBadgedDeviceTypeIcon(classOfDevice.toInt());
+            mNotificationDialog->setIcon(icon);
+            break;
         case EVisibilityTimeout:
-            prompt = QString( tr( "Phone is not detectable in searches made by other devices" ) );
+            title = QString(hbTrId( "txt_bt_dpophead_bluetooth" ));
+            prompt = QString( hbTrId( "txt_bt_dpopinfo_is_now_hidden" ) );
+            mNotificationDialog->setIcon(HbIcon("qtg_large_bluetooth"));
             break;
         default:
             mLastError = ParameterError;
             break;
     }
-    // Could use QChar with ReplacementCharacter?
     int repls = prompt.count( QString( "%" ) );
     if ( repls > 0 ) {
         QVariant name = parameters.value( QString::number( TBluetoothDeviceDialog::EDeviceName ) );
         prompt = prompt.arg( name.toString() );
     }
-    // set property value to this dialog widget
-    HbNotificationDialog::setTitle( prompt );
+    mNotificationDialog->setTitle( title );
+    mNotificationDialog->setText( prompt );
     TRACE_EXIT
 }
 
@@ -157,20 +183,10 @@
     return;
 }
 
-/*!
-    Widget is about to hide. Closing effect has ended.
- */
-void BtDeviceDialogNotifWidget::hideEvent(QHideEvent *event)
+void BtDeviceDialogNotifWidget::NotifClosed(HbAction *action)
 {
-    HbNotificationDialog::hideEvent(event);
+    Q_UNUSED(action);
     emit deviceDialogClosed();
+    mSendAction = false;
 }
 
-/*!
-    Widget is about to show
- */
-void BtDeviceDialogNotifWidget::showEvent(QShowEvent *event)
-{
-    HbNotificationDialog::showEvent(event);
-    mShowEventReceived = true;
-}
--- a/bluetoothengine/btnotif/btdevicedialogplugin/src/btdevicedialogplugin.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btnotif/btdevicedialogplugin/src/btdevicedialogplugin.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -24,14 +24,20 @@
 #include "btdevicedialoginputwidget.h"
 #include "btdevicedialogquerywidget.h"
 #include "btdevicedialognotifwidget.h"
+#include "btrecvprgrsdialogwidget.h"
 
 #include "btdevicedialogpluginerrors.h"
 #include "btdevicesearchdialogwidget.h"
 #include "btmoredevicesdialogwidget.h"
 #include "btsenddialogwidget.h"
+#include "btdevicedialogrecvquerywidget.h"
+#include <hbtranslator.h>
 
 Q_EXPORT_PLUGIN2(btdevicedialogplugin, BtDeviceDialogPlugin)
 
+const char* BTDIALOG_TRANSLATION = "btdialogs";
+const char* BTVIEW_TRANSLATION = "btviews";        
+
 // This plugin implements one device dialog type
 static const struct {
     const char *mTypeString;
@@ -57,7 +63,8 @@
 /*! 
     BtDeviceDialogPlugin Constructor
  */
-BtDeviceDialogPlugin::BtDeviceDialogPlugin()
+BtDeviceDialogPlugin::BtDeviceDialogPlugin():
+ mDialogTranslator(0),mViewTranslator(0)
 {
     d = new BtDeviceDialogPluginPrivate;
 }
@@ -68,6 +75,8 @@
 BtDeviceDialogPlugin::~BtDeviceDialogPlugin()
 {
     delete d;
+    delete mDialogTranslator;
+    delete mViewTranslator;
 }
 
 /*! 
@@ -95,6 +104,15 @@
     d->mError = NoError;
 
     int i;
+    
+    if(!mDialogTranslator)
+        {
+        mDialogTranslator = new HbTranslator(BTDIALOG_TRANSLATION);
+        }
+    if(!mViewTranslator)
+        {
+        mViewTranslator = new HbTranslator(BTVIEW_TRANSLATION);
+        }
     // verify that requested dialog type is supported
     const int numTypes = sizeof(noteInfos) / sizeof(noteInfos[0]);
     for(i = 0; i < numTypes; i++) {
@@ -184,7 +202,7 @@
     switch ( i.value().toInt() ) {
         case TBluetoothDialogParams::ENote:
             deviceDialog =
-                new BtDeviceDialogQueryWidget(HbMessageBox::MessageTypeInformation, parameters);
+                new BtDeviceDialogNotifWidget(parameters);
             break;
         case TBluetoothDialogParams::EQuery:
             deviceDialog =
@@ -205,6 +223,12 @@
         case TBluetoothDialogParams::EGlobalNotif:
             deviceDialog = new BtDeviceDialogNotifWidget(parameters);
             break;
+        case TBluetoothDialogParams::EUserAuthorization:
+            deviceDialog = new BTRecvQueryDialogWidget(parameters);
+            break;
+        case TBluetoothDialogParams::EReceiveProgress:
+            deviceDialog = new BTRecvPrgrsDialogWidget(parameters);
+            break;
         default:
             d->mError = UnknownDeviceDialogError;
             break;
--- a/bluetoothengine/btnotif/btdevicedialogplugin/src/btdevicedialogquerywidget.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btnotif/btdevicedialogplugin/src/btdevicedialogquerywidget.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -21,6 +21,7 @@
 #include <bluetoothdevicedialogs.h>
 #include <hbaction.h>
 #include <hbdialog.h>
+#include <hblabel.h>
 #include "btdevicedialogpluginerrors.h"
 
 /*!
@@ -118,7 +119,8 @@
 void BtDeviceDialogQueryWidget::processParam(const QVariantMap &parameters)
 {
     TRACE_ENTRY
-    QString keyStr, prompt;
+    QString keyStr, prompt,title;
+    QVariant name,param,addval;
     keyStr.setNum( TBluetoothDialogParams::EResource );
     // Validate if the resource item exists.
     QVariantMap::const_iterator i = parameters.constFind( keyStr );
@@ -127,31 +129,15 @@
         mLastError = UnknownDeviceDialogError;
         return;
     }
-
-    QVariant param = parameters.value( keyStr );
+    title = QString(hbTrId("txt_bt_title_pairing_with_1"));
+    param = parameters.value( keyStr );
     int key = param.toInt();
     switch ( key ) {
-        // Query dialogs:
-        case EAuthorization:
-            prompt = QString( tr( "Accept connection request from:\n%1" ) );
-            break;
-        case EIncomingPairing:
-            prompt = QString( tr( "Device '%1' is trying to pair with you. Allow pairing?" ) );
-            break;
         case ENumericComparison:
-            prompt = QString( tr( "Does this code match the one on %1?\n\n%2" ) );
+            prompt = QString( hbTrId( "txt_bt_info_does_this_code_match_the_code_on_1" ) );
             break;
         case EPasskeyDisplay:
-            prompt = QString( tr( "Enter on %1:\n\n%2" ) );
-            break;
-        case ESetTrusted:
-            prompt = QString( tr( "Authorise this device to make connections automatically?" ) );
-            break;
-        case EBlockUnpairedDevice:
-            prompt = QString( tr( "Do you want to block all future connection attempts from device %1?" ) );
-            break;
-        case EBlockPairedDevice:
-            prompt = QString( tr( "Do you want to block all future connection attempts from paired device %1? \nThis will delete your pairing with the device." ) );
+            prompt = QString( hbTrId( "txt_bt_info_enter_the_following_code_to_the_1" ) );
             break;
         // Note dialogs, but not Notification dialogs
         // Input dialogs
@@ -164,18 +150,22 @@
             mLastError = ParameterError;
             break;
     }
-    // Could use QChar with ReplacementCharacter?
     int repls = prompt.count( QString( "%" ) );
     if ( repls > 0 ) {
-        QVariant name = parameters.value( QString::number( TBluetoothDeviceDialog::EDeviceName ) );
+        name = parameters.value( QString::number( TBluetoothDeviceDialog::EDeviceName ) );
         prompt = prompt.arg( name.toString() );
-        if ( repls > 1 ) {
-            QVariant addval = parameters.value( QString::number( TBluetoothDeviceDialog::EAdditionalDesc ) );
-            prompt = prompt.arg( addval.toString() );
-        }
+        addval = parameters.value( QString::number( TBluetoothDeviceDialog::EAdditionalDesc ) );
+        // todo: Formating the prompt need to be discussed with UI designer
+        // The passcode could be displayed on a separate row if it the label did support
+        // the use of newline escape character.
+        prompt.append(tr(" "));
+        prompt.append(addval.toString());
     }
+    title = title.arg(name.toString());
     // set property value to this dialog widget
+    mMessageBox->setHeadingWidget(new HbLabel(title));
     mMessageBox->setText( prompt );
+    mMessageBox->setIconVisible(false);
     TRACE_EXIT
 }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/btnotif/btdevicedialogplugin/src/btdevicedialogrecvquerywidget.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,160 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  BtDeviceDialogWidget class declaration.
+*
+*/
+
+
+#include "btdevicedialogrecvquerywidget.h"
+#include "bluetoothdevicedialogs.h"
+#include <btuiiconutil.h>
+
+const char* DOCML_BT_RECV_QUERY_DIALOG = ":/docml/bt-receive-auth-dialog.docml";
+
+
+BTRecvQueryDialogWidget::BTRecvQueryDialogWidget(const QVariantMap &parameters)
+{
+    mLoader = 0;
+    constructDialog(parameters);
+}
+
+BTRecvQueryDialogWidget::~BTRecvQueryDialogWidget()
+{
+    if(mLoader)
+    {
+        delete mLoader;
+        mLoader = NULL;
+    }
+}
+
+bool BTRecvQueryDialogWidget::setDeviceDialogParameters(const QVariantMap &parameters)
+{
+    Q_UNUSED(parameters);
+    return true;
+}
+
+int BTRecvQueryDialogWidget::deviceDialogError() const
+{
+    return 0;
+}
+
+void BTRecvQueryDialogWidget::closeDeviceDialog(bool byClient)
+{
+    Q_UNUSED(byClient);
+    mDialog->close();
+}
+
+HbPopup* BTRecvQueryDialogWidget::deviceDialogWidget() const
+{
+    return mDialog;
+}
+
+QObject* BTRecvQueryDialogWidget::signalSender() const
+{
+    return const_cast<BTRecvQueryDialogWidget*>(this);
+}
+
+bool BTRecvQueryDialogWidget::constructDialog(const QVariantMap &parameters)
+{
+    mLoader = new HbDocumentLoader();
+    bool ok = false;
+    
+    mLoader->load(DOCML_BT_RECV_QUERY_DIALOG, &ok);
+    if(ok)
+    {
+        mDialog = qobject_cast<HbDialog*>(mLoader->findWidget("senddialog"));
+        mHeading = qobject_cast<HbLabel*>(mLoader->findWidget("heading"));
+        
+        mDeviceName = qobject_cast<HbLabel*>(mLoader->findWidget("deviceName"));
+        mDeviceType = qobject_cast<HbLabel*>(mLoader->findWidget("deviceType"));
+        mDeviceIcon = qobject_cast<HbLabel*>(mLoader->findWidget("deviceIcon"));
+        
+        int classOfDevice = parameters.value(QString::number(TBluetoothDeviceDialog::EDeviceClass)).toDouble();
+        HbIcon icon = getBadgedDeviceTypeIcon(classOfDevice);
+        mDeviceIcon->setIcon(icon);
+                
+        mDeviceName->setPlainText(parameters.value(QString::number(TBluetoothDeviceDialog::EDeviceName)).toString());
+        mDeviceType->setPlainText(getDeviceTypeString(classOfDevice));
+        
+        mYes = qobject_cast<HbAction*>(mLoader->findObject("yesaction"));
+        mNo = qobject_cast<HbAction*>(mLoader->findObject("noaction"));
+        
+        mCheckBox = qobject_cast<HbCheckBox*>(mLoader->findWidget("checkbox"));
+
+        int dialogType = parameters.value(QString::number(TBluetoothDialogParams::EDialogTitle)).toInt();
+        switch(dialogType)
+        {
+            case TBluetoothDialogParams::EReceive:
+            {
+                mHeading->setPlainText(hbTrId("txt_bt_title_receive_messages_from"));
+            }break;
+                
+            case TBluetoothDialogParams::EReceiveFromPairedDevice:
+            {
+                mHeading->setPlainText(hbTrId("txt_bt_title_receive_messages_from_paired_device"));
+                mCheckBox->setCheckState(Qt::Checked);
+            }break;
+            
+            case TBluetoothDialogParams::EConnect:
+            {
+                mHeading->setPlainText(hbTrId("txt_bt_title_connect_to"));
+                mCheckBox->setCheckState(Qt::Checked);
+            }break;
+            case TBluetoothDialogParams::EPairingRequest:
+                mHeading->setPlainText(hbTrId("txt_bt_title_pair_with"));
+                mCheckBox->setCheckState(Qt::Checked);                
+                break;
+            default:
+                break;
+
+        }
+        mDialog->setHeadingWidget(mHeading);
+    }
+
+    mDialog->setBackgroundFaded(false);
+    mDialog->setDismissPolicy(HbPopup::NoDismiss);
+    mDialog->setTimeout(HbPopup::NoTimeout);
+     
+    connect(mYes, SIGNAL(triggered()), this, SLOT(yesClicked()));
+    connect(mNo, SIGNAL(triggered()), this, SLOT(noClicked()));
+    connect(mCheckBox, SIGNAL(clicked(bool)), this, SLOT(checkBoxStateChanged(bool)));
+    
+    return true;
+}
+
+void BTRecvQueryDialogWidget::yesClicked()
+{
+    QVariantMap data;
+    data.insert(QString("actionResult"), QVariant(true));
+    emit deviceDialogData(data);
+    emit deviceDialogClosed();
+}
+
+void BTRecvQueryDialogWidget::noClicked()
+{
+    QVariantMap data;
+    data.insert(QString("actionResult"), QVariant(false));
+    emit deviceDialogData(data);
+    emit deviceDialogClosed();
+}
+
+void BTRecvQueryDialogWidget::checkBoxStateChanged(bool checked)
+{
+    QVariantMap data;
+    data.insert(QString("checkBoxState"), QVariant(checked));
+    emit deviceDialogData(data);
+}
+
+
+
--- a/bluetoothengine/btnotif/btdevicedialogplugin/src/btdevicesearchdialogwidget.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btnotif/btdevicedialogplugin/src/btdevicesearchdialogwidget.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -24,32 +24,36 @@
 
 #include <qstandarditemmodel.h>
 #include <hbaction.h>
+#include <xqconversions.h>
+#include <qtranslator.h>
+#include <qcoreapplication.h>
 
 const char* DOCML_BTDEV_SEARCH_DIALOG = ":/docml/bt-device-search-dialog.docml";
 
 
+#define LOC_SEARCHING_DEVICE hbTrId("txt_bt_subhead_searching")
+#define LOC_SEARCH_DONE hbTrId("txt_bt_subhead_search_done")
+#define LOC_SEARCH_STOP hbTrId("txt_common_button_stop")
+#define LOC_SEARCH_RETRY hbTrId("txt_common_button_retry")
+
+
 BTDeviceSearchDialogWidget::BTDeviceSearchDialogWidget(const QVariantMap &parameters)
-:HbDialog()
     {
     mDeviceLstIdx = 0;
     mViewByChosen = false;
     mSelectedType = 0;
     mDeviceDialogData = 0;
+    mLoader = 0;
+    mContentItemModel = 0;
+    mStopRetryFlag = 0; // Stop 
     constructDialog(parameters);
     }
 
 BTDeviceSearchDialogWidget::~BTDeviceSearchDialogWidget()
     {
-    if(mLoader)
-        {
-        delete mLoader;
-        mLoader = NULL;
-        }
-    if(mContentItemModel)
-        {
-        delete mContentItemModel;
-        mContentItemModel = NULL;
-        }
+    delete mLoader;
+    delete mContentItemModel;
+    
  //   delete mRbl;
  //   delete mViewByDialog;
     }
@@ -65,9 +69,9 @@
         mSearchDoneLabel->show();
         mSearchDoneLabel->setTextWrapping(Hb::TextWordWrap);
         mSearchDoneLabel->setAlignment(Qt::AlignLeft);
-        mSearchDoneLabel->setPlainText("Search Done");
+        mSearchDoneLabel->setPlainText(LOC_SEARCH_DONE);
         
-        mStopRetryBtn->setText("Retry");
+        mStopRetryAction->setText(LOC_SEARCH_RETRY);
         }
     else
         {
@@ -121,33 +125,47 @@
 void BTDeviceSearchDialogWidget::closeDeviceDialog(bool byClient)
     {
     Q_UNUSED(byClient);
-    this->close();
+    mSearchDevicesDialog->close();
+    //@ TODO to check below code is required which is written based on the documentation of closeDeviceDialog API
+    
+ /*   QVariantMap val;
+    QVariant index(-1);
+    val.insert("selectedindex",index);
+    emit deviceDialogData(val);    
+    emit deviceDialogClosed();*/
     }
 
 HbPopup* BTDeviceSearchDialogWidget::deviceDialogWidget() const
     {
+    return mSearchDevicesDialog;
+    }
+
+QObject* BTDeviceSearchDialogWidget::signalSender() const
+    {
     return const_cast<BTDeviceSearchDialogWidget*>(this);
     }
 
 bool BTDeviceSearchDialogWidget::constructDialog(const QVariantMap &parameters)
     {
     (void) parameters;
-    mLoader = new HbDocumentLoader();
     bool ok = false;
     
+    mLoader = new HbDocumentLoader();
     mLoader->load(DOCML_BTDEV_SEARCH_DIALOG, &ok);
     if(ok)
         {
-        HbLabel* heading = qobject_cast<HbLabel*>(mLoader->findWidget("heading"));
+        mSearchDevicesDialog = qobject_cast<HbDialog*>(mLoader->findWidget("searchdialog"));
+
+ /*       HbLabel* heading = qobject_cast<HbLabel*>(mLoader->findWidget("heading"));
         heading->setTextWrapping(Hb::TextWordWrap);
         heading->setAlignment(Qt::AlignHCenter);
         heading->setPlainText("Bluetooth - Found devices");
-        setHeadingWidget(heading);
+        setHeadingWidget(heading);*/
         
         mSearchLabel = qobject_cast<HbLabel*>(mLoader->findWidget("searchLabel"));
         mSearchLabel->setTextWrapping(Hb::TextWordWrap);
         mSearchLabel->setAlignment(Qt::AlignHCenter);
-        mSearchLabel->setPlainText("Searching...");
+        mSearchLabel->setPlainText(LOC_SEARCHING_DEVICE);
  
         mSearchIconLabel = qobject_cast<HbLabel*>(mLoader->findWidget("iconLabel"));
         mSearchIconLabel->setIcon(icon());
@@ -155,11 +173,12 @@
         mSearchDoneLabel = qobject_cast<HbLabel*>(mLoader->findWidget("searchDoneLabel"));
         mSearchDoneLabel->hide();
         
-        setFrameType(HbDialog::Strong);
-        setBackgroundFaded(false);
+        
+        mSearchDevicesDialog->setFrameType(HbDialog::Strong);
+        mSearchDevicesDialog->setBackgroundFaded(false);
 
-        mViewByBtn = qobject_cast<HbPushButton*>(mLoader->findWidget("viewby"));
-        mStopRetryBtn = qobject_cast<HbPushButton*>(mLoader->findWidget("stop"));
+ //       mViewByBtn = qobject_cast<HbPushButton*>(mLoader->findWidget("viewby"));
+  //      mStopRetryBtn = qobject_cast<HbPushButton*>(mLoader->findWidget("stop"));
         
         mListView = qobject_cast<HbListView*>(mLoader->findWidget("listView"));
         mListView->setSelectionMode(HbAbstractItemView::SingleSelection);
@@ -168,15 +187,27 @@
         mListView->setModel(mContentItemModel);//, prototype);
 
         connect(mListView, SIGNAL(activated(QModelIndex)), this, SLOT(deviceSelected(QModelIndex)));
-        connect(mStopRetryBtn, SIGNAL(clicked()), this, SLOT(stopRetryClicked()));
-        connect(mViewByBtn, SIGNAL(clicked()), this, SLOT(viewByClicked()));
+ //       connect(mStopRetryBtn, SIGNAL(clicked()), this, SLOT(stopRetryClicked()));
+ //       connect(mViewByBtn, SIGNAL(clicked()), this, SLOT(viewByClicked()));
+        
+        mViewByAction = static_cast<HbAction*>( mLoader->findObject( "viewaction" ) );
+        mViewByAction->disconnect(mSearchDevicesDialog);
+        
+        mStopRetryAction = static_cast<HbAction*>( mLoader->findObject( "stopretryaction" ) );
+        mStopRetryAction->disconnect(mSearchDevicesDialog);
         
-        QGraphicsWidget *widget = mLoader->findWidget(QString("container"));
-        setContentWidget(widget);
+        connect(mViewByAction, SIGNAL(triggered()), this, SLOT(viewByClicked()));
+        connect(mStopRetryAction, SIGNAL(triggered()), this, SLOT(stopRetryClicked()));
+
+        connect(mSearchDevicesDialog, SIGNAL(aboutToClose()), this, SLOT(searchDialogClosed()));
+        
+//        QGraphicsWidget *widget = mLoader->findWidget(QString("container"));
+        //setContentWidget(widget);
         }
-    setBackgroundFaded(false);
-    setDismissPolicy(HbPopup::TapOutside);
-    setTimeout(HbPopup::NoTimeout);
+    mSearchDevicesDialog->setBackgroundFaded(false);
+    mSearchDevicesDialog->setDismissPolicy(HbPopup::TapOutside);
+    mSearchDevicesDialog->setTimeout(HbPopup::NoTimeout);
+    mSearchDevicesDialog->setAttribute(Qt::WA_DeleteOnClose);
     
  /*   mViewByDialog = new HbDialog();
     mRbl = new HbRadioButtonList(mViewByDialog);
@@ -185,9 +216,9 @@
     return true;
     }
 
-void BTDeviceSearchDialogWidget::hideEvent(QHideEvent *event)
+/*void BTDeviceSearchDialogWidget::hideEvent(QHideEvent *event)
     {
-    HbDialog::hideEvent(event);
+ //   HbDialog::hideEvent(event);
     QVariantMap val;
     QVariant index(-1);
     val.insert("selectedindex",index);
@@ -197,25 +228,26 @@
 
 void BTDeviceSearchDialogWidget::showEvent(QShowEvent *event)
     {
-    HbDialog::showEvent(event);
-    }
+ //   HbDialog::showEvent(event);
+    }*/
 
 void BTDeviceSearchDialogWidget::stopRetryClicked()
     {
     QVariantMap val;
-    if(mStopRetryBtn->text().compare("Retry")==0)
+    if(mStopRetryFlag == 1)//mStopRetryAction->text().compare(LOC_SEARCH_RETRY)==0
         {
+        mStopRetryFlag = 0; // Stop 
         QVariant index("Retry");
         val.insert("Retry",index); 
         emit deviceDialogData(val);
         delete mContentItemModel;
         mContentItemModel = new QStandardItemModel(this);
         mListView->setModel(mContentItemModel);
-        mStopRetryBtn->setText("Stop");
+        mStopRetryAction->setText(LOC_SEARCH_STOP);
         
         mSearchLabel->setTextWrapping(Hb::TextWordWrap);
         mSearchLabel->setAlignment(Qt::AlignHCenter);
-        mSearchLabel->setPlainText("Searching...");
+        mSearchLabel->setPlainText(LOC_SEARCHING_DEVICE);
         
         mSearchIconLabel->setIcon(icon());     
         mSearchLabel->show();
@@ -226,7 +258,8 @@
         }
     else
         {
-        mStopRetryBtn->setText("Retry");
+        mStopRetryFlag = 1; //Retry 
+        mStopRetryAction->setText(LOC_SEARCH_RETRY);
         
         mSearchLabel->hide();
         
@@ -235,7 +268,7 @@
         mSearchDoneLabel->show();
         mSearchDoneLabel->setTextWrapping(Hb::TextWordWrap);
         mSearchDoneLabel->setAlignment(Qt::AlignLeft);
-        mSearchDoneLabel->setPlainText("Search Done");        
+        mSearchDoneLabel->setPlainText(LOC_SEARCH_DONE);        
         
         QVariantMap val;
         QVariant index("Stop");
@@ -313,6 +346,15 @@
     mViewByDialog->show();*/
     }
 
+void BTDeviceSearchDialogWidget::searchDialogClosed() 
+    {
+    QVariantMap val;
+    QVariant index(-1);
+    val.insert("selectedindex",index);
+    emit deviceDialogData(val);    
+    emit deviceDialogClosed();
+    }
+
 void BTDeviceSearchDialogWidget::selectionDialogClosed(HbAction* action)
     {
     Q_UNUSED(action);
--- a/bluetoothengine/btnotif/btdevicedialogplugin/src/btmoredevicesdialogwidget.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btnotif/btdevicedialogplugin/src/btmoredevicesdialogwidget.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -29,24 +29,28 @@
 
 
 BTMoreDevicesDialogWidget::BTMoreDevicesDialogWidget(const QVariantMap &parameters)
-:HbDialog()
     {
     mDeviceDialogData = 0;
+    mLoader = 0;
+    mContentItemModel = 0;
     constructDialog(parameters);
+/*    try 
+            {
+            //May throws badAlloc on exception
+            constructDialog(parameters);
+            }
+        catch(std::bad_alloc &badAlloc)
+            {
+            //Failure to allocate memory
+            Q_UNUSED(badAlloc);
+          //   = UnknownDeviceDialogError;
+            }*/
     }
 
 BTMoreDevicesDialogWidget::~BTMoreDevicesDialogWidget()
     {
-    if(mLoader)
-        {
-        delete mLoader;
-        mLoader = NULL;
-        }
-    if(mContentItemModel)
-        {
-        delete mContentItemModel;
-        mContentItemModel =NULL;
-        }
+    delete mLoader;
+    delete mContentItemModel;
     }
 
 bool BTMoreDevicesDialogWidget::setDeviceDialogParameters(const QVariantMap &parameters)
@@ -75,11 +79,23 @@
 void BTMoreDevicesDialogWidget::closeDeviceDialog(bool byClient)
     {
     Q_UNUSED(byClient);
-    this->close();
+    // below code is required and written based on the documentation of closeDeviceDialog API
+    mMoreDeviceDialog->close();
+    QVariantMap val;
+    QVariant index(-1);
+    val.insert("selectedindex",index);
+    emit deviceDialogData(val);    
+    //below signal is emitted to make dialog server aware that our dialog is closed
+    emit deviceDialogClosed();
     }
 
 HbPopup* BTMoreDevicesDialogWidget::deviceDialogWidget() const
     {
+    return mMoreDeviceDialog;
+    }
+
+QObject* BTMoreDevicesDialogWidget::signalSender() const
+    {
     return const_cast<BTMoreDevicesDialogWidget*>(this);
     }
 
@@ -91,15 +107,18 @@
     mLoader->load(DOCML_BT_MORE_DEV_DIALOG, &ok);
     if(ok)
         {
-        HbLabel* label = qobject_cast<HbLabel*>(mLoader->findWidget("label"));
+        mMoreDeviceDialog = qobject_cast<HbDialog*>(mLoader->findWidget("lastuseddialog"));
+        mMoreDeviceDialog->setFrameType(HbDialog::Strong);
+        mMoreDeviceDialog->setBackgroundFaded(false);
+/*        HbLabel* label = qobject_cast<HbLabel*>(mLoader->findWidget("label"));
         if(label)
             {
             label->setTextWrapping(Hb::TextWordWrap);
             label->setPlainText("Send to:");
             }
-        this->setHeadingWidget(label);
-        HbPushButton* moreDevices = qobject_cast<HbPushButton*>(mLoader->findWidget("moreDevices"));
-        HbPushButton* cancel = qobject_cast<HbPushButton*>(mLoader->findWidget("cancel"));
+        this->setHeadingWidget(label);*/
+   //     HbPushButton* moreDevices = qobject_cast<HbPushButton*>(mLoader->findWidget("moreDevices"));
+    //    HbPushButton* cancel = qobject_cast<HbPushButton*>(mLoader->findWidget("cancel"));
         
         HbListView* listView = qobject_cast<HbListView*>(mLoader->findWidget("listView"));
         listView->setSelectionMode(HbAbstractItemView::SingleSelection);
@@ -125,23 +144,33 @@
             }*/
         
         connect(listView, SIGNAL(activated(QModelIndex)), this, SLOT(deviceSelected(QModelIndex)));
-        connect(moreDevices, SIGNAL(clicked()), this, SLOT(moreDevicesClicked()));
-        connect(cancel, SIGNAL(clicked()), this, SLOT(cancelClicked()));
+  //      connect(moreDevices, SIGNAL(clicked()), this, SLOT(moreDevicesClicked()));
+   //     connect(cancel, SIGNAL(clicked()), this, SLOT(cancelClicked()));
+        mMoreAction = static_cast<HbAction*>( mLoader->findObject( "moreaction" ) );
+        mMoreAction->disconnect(mMoreDeviceDialog);
         
-        QGraphicsWidget *widget = mLoader->findWidget(QString("container"));
-        this->setContentWidget(widget);
+        mCancelAction = static_cast<HbAction*>( mLoader->findObject( "cancelaction" ) );
+        mCancelAction->disconnect(mMoreDeviceDialog);
+//        QGraphicsWidget *widget = mLoader->findWidget(QString("container"));
+  //      mMoreDeviceDialog->setContentWidget(widget);
+        
+         connect(mMoreAction, SIGNAL(triggered()), this, SLOT(moreDevicesClicked()));
+         connect(mCancelAction, SIGNAL(triggered()), this, SLOT(cancelClicked()));
+               
         }
 
 
-    this->setBackgroundFaded(false);
-    setDismissPolicy(HbPopup::NoDismiss);
-    setTimeout(HbPopup::NoTimeout);
+    mMoreDeviceDialog->setBackgroundFaded(false);
+    mMoreDeviceDialog->setDismissPolicy(HbPopup::NoDismiss);
+    mMoreDeviceDialog->setTimeout(HbPopup::NoTimeout);
+    mMoreDeviceDialog->setAttribute(Qt::WA_DeleteOnClose);
     return true;
     }
 
-void BTMoreDevicesDialogWidget::hideEvent(QHideEvent *event)
+/*void BTMoreDevicesDialogWidget::hideEvent(QHideEvent *event)
     {
-    HbDialog::hideEvent(event);
+    //HbDialog::hideEvent(event);
+    mMoreDeviceDialog->hideEvent(event);
 //    if(mDeviceDialogData == 0)
         {
         QVariantMap val;
@@ -149,14 +178,14 @@
         val.insert("selectedindex",index);
         emit deviceDialogData(val);    
         emit deviceDialogClosed();
-        }    
+        }*/    
  //   
-    }
+   // }
 
-void BTMoreDevicesDialogWidget::showEvent(QShowEvent *event)
+/*void BTMoreDevicesDialogWidget::showEvent(QShowEvent *event)
     {
-    HbDialog::showEvent(event);
-    }
+    //HbDialog::showEvent(event);
+    }*/
 
 void BTMoreDevicesDialogWidget::moreDevicesClicked()
     {
@@ -172,7 +201,12 @@
 void BTMoreDevicesDialogWidget::cancelClicked()
     {
     // TODO
-    this->close();
+    mMoreDeviceDialog->close();
+    QVariantMap val;
+    QVariant index(-1);
+    val.insert("selectedindex",index);
+    emit deviceDialogData(val);    
+    emit deviceDialogClosed();
     }
 
 void BTMoreDevicesDialogWidget::deviceSelected(const QModelIndex& modelIndex)
@@ -181,10 +215,6 @@
     QVariantMap val;
     QVariant index(row);
     val.insert("selectedindex",index);
-    
-
-
-    
     emit deviceDialogData(val);
   //  mDeviceDialogData = 1;//flag is to say that device dialog data is emitted required when we cancel the dialog    
    // this->close();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/btnotif/btdevicedialogplugin/src/btrecvprgrsdialogwidget.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,179 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  BtDeviceDialogWidget class declaration.
+*
+*/
+
+
+#include "btrecvprgrsdialogwidget.h"
+#include "bluetoothdevicedialogs.h"
+
+const char* DOCML_BT_RECV_PRGRS_DIALOG = ":/docml/bt-recv-progress-dialog.docml";
+
+
+BTRecvPrgrsDialogWidget::BTRecvPrgrsDialogWidget(const QVariantMap &parameters)
+{
+    mLoader = 0;
+    constructDialog(parameters);
+}
+
+BTRecvPrgrsDialogWidget::~BTRecvPrgrsDialogWidget()
+{
+    if(mLoader)
+    {
+        delete mLoader;
+        mLoader = NULL;
+    }
+}
+
+bool BTRecvPrgrsDialogWidget::setDeviceDialogParameters(const QVariantMap &parameters)
+{
+    mProgressBar->setMinimum(0);
+    mProgressBar->setMaximum(mFileSz);
+    mProgressBar->setProgressValue(parameters.value("progress").toInt());
+    return true;
+}
+
+int BTRecvPrgrsDialogWidget::deviceDialogError() const
+{
+    return 0;
+}
+
+void BTRecvPrgrsDialogWidget::closeDeviceDialog(bool byClient)
+{
+    Q_UNUSED(byClient);
+    mDialog->close();
+}
+
+HbPopup* BTRecvPrgrsDialogWidget::deviceDialogWidget() const
+{
+    return mDialog;
+}
+
+QObject* BTRecvPrgrsDialogWidget::signalSender() const
+{
+    return const_cast<BTRecvPrgrsDialogWidget*>(this);
+}
+
+bool BTRecvPrgrsDialogWidget::constructDialog(const QVariantMap &parameters)
+{
+    mLoader = new HbDocumentLoader();
+    bool ok = false;
+    
+    mLoader->load(DOCML_BT_RECV_PRGRS_DIALOG, &ok);
+    if(ok)
+    {
+        mDialog = qobject_cast<HbDialog*>(mLoader->findWidget("senddialog"));
+        mHeading = qobject_cast<HbLabel*>(mLoader->findWidget("heading"));
+        
+        mFileName = qobject_cast<HbLabel*>(mLoader->findWidget("fileName"));
+        mFileSize = qobject_cast<HbLabel*>(mLoader->findWidget("fileSize"));
+        mFileCount = qobject_cast<HbLabel*>(mLoader->findWidget("fileCount_label"));
+        mFileCount->setVisible(false);
+        
+        //TODO - set icon based on the file icon.
+        
+        mHide = qobject_cast<HbAction*>(mLoader->findObject("hideaction"));
+        mCancel = qobject_cast<HbAction*>(mLoader->findObject("cancelaction"));
+        
+        mProgressBar = qobject_cast<HbProgressBar*>(mLoader->findWidget("horizontalProgressBar"));
+        
+        int dialogType = parameters.value(QString::number(TBluetoothDialogParams::EDialogTitle)).toInt();
+        switch(dialogType)
+        {
+            case TBluetoothDialogParams::EReceive:
+            {
+                QString headingStr(hbTrId("txt_bt_title_receiving_files_from_1"));
+                QString senderName(parameters.value(QString::number(TBluetoothDeviceDialog::EDeviceName)).toString());
+                mHeading->setPlainText(headingStr.arg(senderName));
+            }break;
+
+            default:
+                break;
+        }
+        mDialog->setHeadingWidget(mHeading);
+        
+        mFileName->setPlainText(parameters.value(QString::number(TBluetoothDeviceDialog::EReceivingFileName)).toString());
+        
+        mFileSz = parameters.value(QString::number(TBluetoothDeviceDialog::EReceivingFileSize)).toInt();
+        mProgressBar->setMinimum(0);
+        mProgressBar->setMaximum(mFileSz);
+        mProgressBar->setProgressValue(0);
+        
+        //Format the file size into a more readable format
+        if ( mFileSz >> 20 )    // size in MB
+            {       
+            float sizeInMB = 0;
+            sizeInMB = ((float)mFileSz ) / (1024*1024);
+            QString fileSzMb;
+            fileSzMb.setNum(sizeInMB);
+            fileSzMb.append(QString(" Mb"));
+            mFileSize->setPlainText(fileSzMb);
+            }
+        
+        else if( mFileSz >> 10 )        // size in KB
+            {
+            TInt64 sizeInKB = 0;
+            sizeInKB = mFileSz >> 10;
+            QString fileSzKb;
+            fileSzKb.setNum(sizeInKB);
+            fileSzKb.append(QString(" Kb"));
+            mFileSize->setPlainText(fileSzKb);
+            }
+
+        else                              // size is unknown or less than 1K
+            {
+            QString fileSzB;
+            fileSzB.setNum(mFileSz);
+            fileSzB.append(QString(" Bytes"));
+            mFileSize->setPlainText(fileSzB);
+            }
+
+        //Set the received file count
+        int fCnt = parameters.value(QString::number(TBluetoothDeviceDialog::EReceivedFileCount)).toInt();
+        if(fCnt > 0)
+            {
+            mFileCount->setVisible(true);  
+            
+            QString fCntStr(hbTrId("txt_bt_info_ln_files_already_received"));
+            mFileCount->setPlainText(fCntStr.arg(fCnt));
+            }
+    }
+
+    mDialog->setBackgroundFaded(false);
+    mDialog->setDismissPolicy(HbPopup::NoDismiss);
+    mDialog->setTimeout(HbPopup::NoTimeout);
+     
+    connect(mHide, SIGNAL(triggered()), this, SLOT(hideClicked()));
+    connect(mCancel, SIGNAL(triggered()), this, SLOT(cancelClicked()));
+    
+    return true;
+}
+
+void BTRecvPrgrsDialogWidget::hideClicked()
+{
+    QVariantMap data;
+    data.insert(QString("actionResult"), QVariant(true));
+    emit deviceDialogData(data);
+    emit deviceDialogClosed();
+}
+
+void BTRecvPrgrsDialogWidget::cancelClicked()
+{
+    QVariantMap data;
+    data.insert(QString("actionResult"), QVariant(false));
+    emit deviceDialogData(data);
+    emit deviceDialogClosed();
+}
+
--- a/bluetoothengine/btnotif/btdevicedialogplugin/src/btsenddialogwidget.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btnotif/btdevicedialogplugin/src/btsenddialogwidget.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -25,51 +25,46 @@
 #include "btsenddialogwidget.h"
 
 
+#define LOC_SENDING_FILES_TO_DEVICE hbTrId("txt_bt_title_sending_file_l1l2_to_3")
 
 const char* DOCML_BT_SEND_DIALOG = ":/docml/bt-send-dialog.docml";
 
 BTSendDialogWidget::BTSendDialogWidget(const QVariantMap &parameters)
-:HbDialog()
     {
- //   LOG(ELevel1,_L("BTSendDialogWidget::BTSendDialogWidget"));
+    mLoader = 0;
     constructDialog(parameters);
-    
     }
 
 BTSendDialogWidget::~BTSendDialogWidget()
     {
-    if(mLoader)
-        {
-        delete mLoader;
-        mLoader = NULL;
-        }
-    if(mContentItemModel)
+    delete mLoader;
+ /*   if(mContentItemModel)
         {
         delete mContentItemModel;
         mContentItemModel = NULL;
-        }
+        }*/
     }
 
 bool BTSendDialogWidget::setDeviceDialogParameters(const QVariantMap &parameters)
     {
- //   LOG(ELevel1,_L("BTSendDialogWidget::setDeviceDialogParameters "));
-    
     if(mFileIndex != parameters.value("currentFileIdx").toString().toInt() )
         {
-        mLabel->setTextWrapping(Hb::TextWordWrap);
-        mLabel->setAlignment(Qt::AlignHCenter);
+        mDialogHeading->setTextWrapping(Hb::TextWordWrap);
+        mDialogHeading->setAlignment(Qt::AlignHCenter);
         //Todo - replace this with the actual text from parameters
     
-        QString headLabel;
-        headLabel.append(QString("Sending file "));
+        QString headLabel = QString(LOC_SENDING_FILES_TO_DEVICE).arg(parameters.value("currentFileIdx").toInt())
+                                        .arg(parameters.value("totalFilesCnt").toInt())
+                                        .arg(parameters.value("destinationName").toString());
+      /*  headLabel.append(QString("Sending file "));
         headLabel.append(parameters.value("currentFileIdx").toString());
         headLabel.append('/');
         headLabel.append(parameters.value("totalFilesCnt").toString());
         headLabel.append(QString(" to "));
-        headLabel.append(parameters.value("destinationName").toString());
-        mLabel->setPlainText(headLabel);
+        headLabel.append(parameters.value("destinationName").toString());*/
+        mDialogHeading->setPlainText(headLabel);
         
-        QStringList info;
+ /*       QStringList info;
         info.append(parameters.value("fileName").toString());
         info.append(parameters.value("fileSzTxt").toString());
                     
@@ -77,7 +72,7 @@
         // parameters.
         listitem->setData(info, Qt::DisplayRole);
     
-        //Todo - Insert icons based on the device class        
+        //Todo - Insert file icons here thumbnail icon        
         QIcon icon(QString(":/icons/qtg_large_bluetooth.svg"));
         listitem->setIcon(icon);
     
@@ -85,8 +80,12 @@
         mContentItemModel = new QStandardItemModel(this);
         mListView->setModel(mContentItemModel);//, prototype);
     
-        mContentItemModel->appendRow(listitem);
-
+        mContentItemModel->appendRow(listitem);*/
+        //Todo - Insert file icons here thumbnail icon        
+        QIcon icon(QString(":/icons/qtg_large_bluetooth.svg"));        
+        mFileIconLabel->setIcon(icon);
+        mFileNameLabel->setPlainText(parameters.value("fileName").toString());
+        mFileSizeLabel->setPlainText(parameters.value("fileSzTxt").toString());
         mProgressBar->setMinimum(0);
         mProgressBar->setProgressValue(0);
         mProgressBar->setMaximum(parameters.value("fileSz").toInt());
@@ -96,7 +95,6 @@
         {
         mProgressBar->setProgressValue(parameters.value("progressValue").toInt());
         }
- //   LOG(ELevel1,_L("BTSendDialogWidget::setDeviceDialogParameters Completed"));
     return true;
     }
 
@@ -108,12 +106,14 @@
 void BTSendDialogWidget::closeDeviceDialog(bool byClient)
     {
     Q_UNUSED(byClient);
-    this->close();
+    mSendDialog->close();
+// below redundant call is required because of the api documentation. 
+    emit deviceDialogClosed();
     }
 
 HbPopup* BTSendDialogWidget::deviceDialogWidget() const
     {
-    return const_cast<BTSendDialogWidget*>(this);
+    return mSendDialog;
     }
 
 QObject *BTSendDialogWidget::signalSender() const
@@ -123,46 +123,54 @@
 
 bool BTSendDialogWidget::constructDialog(const QVariantMap&/*parameters*/)
     {
- //   LOG(ELevel1,_L("BTSendDialogWidget::constructDialog "));
     mLoader = new HbDocumentLoader();
     bool ok = false;
     
     mLoader->load(DOCML_BT_SEND_DIALOG, &ok);
     if(ok)
         {
-        mLabel = qobject_cast<HbLabel*>(mLoader->findWidget("heading"));
-        this->setHeadingWidget(mLabel);
-        mListView = qobject_cast<HbListView*>(mLoader->findWidget("listView"));
+        mSendDialog = qobject_cast<HbDialog*>(mLoader->findWidget("senddialog"));
+        mDialogHeading = qobject_cast<HbLabel*>(mLoader->findWidget("heading"));
+        mFileIconLabel = qobject_cast<HbLabel*>(mLoader->findWidget("fileiconlabel"));
+        mFileNameLabel = qobject_cast<HbLabel*>(mLoader->findWidget("filenamelabel"));
+        mFileSizeLabel = qobject_cast<HbLabel*>(mLoader->findWidget("filesizelabel"));
+ //       mSendDialog->setHeadingWidget(mLabel);
+   /*     mListView = qobject_cast<HbListView*>(mLoader->findWidget("listView"));
         if(mListView)
             {
-            //Todo - replace this with the actual text from parameters  
             mContentItemModel = new QStandardItemModel(this);
             mListView->setModel(mContentItemModel);//, prototype);
-            }
+            }*/
          
         mProgressBar = qobject_cast<HbProgressBar*>(mLoader->findWidget("horizontalProgressBar"));
                 
-        HbAction* hide = new HbAction("Hide");
-        HbAction* cancel = new HbAction("Cancel");
+   //     HbAction* hide = new HbAction("Hide");
+     //   HbAction* cancel = new HbAction("Cancel");
         
-        this->addAction(hide);
-        this->addAction(cancel);
+    //    this->addAction(hide);
+  //      this->addAction(cancel);
         
-        QGraphicsWidget *widget = mLoader->findWidget(QString("container"));
-        this->setContentWidget(widget);
+  //      QGraphicsWidget *widget = mLoader->findWidget(QString("container"));
+   //     this->setContentWidget(widget);
         }
 
-    this->setBackgroundFaded(false);
-    setDismissPolicy(HbPopup::NoDismiss);
-    setTimeout(HbPopup::NoTimeout);
-     
-    this->actions().first()->disconnect(this);
-    connect(this, SIGNAL(finished(HbAction*)), this, SLOT(inputClosed(HbAction*)));
+    mSendDialog->setBackgroundFaded(false);
+    mSendDialog->setDismissPolicy(HbPopup::NoDismiss);
+    mSendDialog->setTimeout(HbPopup::NoTimeout);
+    mSendDialog->setAttribute(Qt::WA_DeleteOnClose);
     
+    mHideAction = static_cast<HbAction*>( mLoader->findObject( "hideaction" ) );
+    mHideAction->disconnect(mSendDialog);
+    
+    mCancelAction = static_cast<HbAction*>( mLoader->findObject( "cancelaction" ) );
+    mCancelAction->disconnect(mSendDialog);
+    
+    connect(mCancelAction, SIGNAL(triggered()), this, SLOT(cancelClicked()));
+
     return true;
     }
 
-void BTSendDialogWidget::hideEvent(QHideEvent *event)
+/*void BTSendDialogWidget::hideEvent(QHideEvent *event)
     {
     HbDialog::hideEvent(event);
     emit deviceDialogClosed();
@@ -171,23 +179,22 @@
 void BTSendDialogWidget::showEvent(QShowEvent *event)
     {
     HbDialog::showEvent(event);
-    }
+    }*/
 
 /*void BTSendDialogWidget::hideClicked()
     {
     // TODO
     this->close();
     emit deviceDialogClosed();
-    }
+    }*/
 
 void BTSendDialogWidget::cancelClicked()
     {
-    // TODO
-    this->close();
+    mSendDialog->close();
     emit deviceDialogClosed();
-    }*/
+    }
 
-void BTSendDialogWidget::inputClosed(HbAction* action)
+/*void BTSendDialogWidget::inputClosed(HbAction* action)
     {
     QVariantMap data;
      
@@ -196,5 +203,5 @@
     } 
     else if(dlg->actions().at(1) == action) {
       }
-    }
+    }*/
 
--- a/bluetoothengine/btnotif/btnotifsrv/inc/btnotifbasepairinghandler.h	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btnotif/btnotifsrv/inc/btnotifbasepairinghandler.h	Mon Jul 12 18:51:05 2010 +0300
@@ -24,7 +24,7 @@
 #include <btengconstants.h>
 #include <btservices/btsimpleactive.h>
 
-class CBTNotifPairingManager;
+class CBTNotifSecurityManager;
 
 /**
  *  Class CBTNotifBasePairingHandler
@@ -94,6 +94,12 @@
      * @param the required minimum length of a pin code.
      */
     virtual void GetPinCode( TBTPinCode& aPin, const TBTDevAddr& aAddr, TInt aMinPinLength );
+ 
+    /**
+     * Show a dialog for pairing success or failure
+     * @param aResult The result of the pairing
+     */
+    void ShowPairingResultNoteL(TInt aResult);
     
 protected:
     
@@ -118,7 +124,7 @@
     /**
      * C++ default constructor
      */
-    CBTNotifBasePairingHandler(CBTNotifPairingManager& aParent, const TBTDevAddr& aAddr);
+    CBTNotifBasePairingHandler(CBTNotifSecurityManager& aParent, const TBTDevAddr& aAddr);
     
     /**
      * Symbian 2nd-phase constructor
@@ -161,7 +167,7 @@
     /**
      * Reference to the owner of this object.
      */
-    CBTNotifPairingManager& iParent;
+    CBTNotifSecurityManager& iParent;
     
     /**
      * Active object helper for asynchronous operations.
--- a/bluetoothengine/btnotif/btnotifsrv/inc/btnotifconnectiontracker.h	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btnotif/btnotifsrv/inc/btnotifconnectiontracker.h	Mon Jul 12 18:51:05 2010 +0300
@@ -26,7 +26,7 @@
 
 class CBTNotificationManager;
 class CbtnotifConnectionTrackerTest;
-class CBTNotifPairingManager;
+class CBTNotifSecurityManager;
 
 
 
@@ -91,14 +91,14 @@
         { return iSockServ; }
   
     /**
-     * Processes a message for notifiers related to pairings.
+     * Processes a message for notifiers related to remote devices.
      * ( These are usually issued by BT stack. However, any application
      * is not restricted to do so (e.g., for testing purpose).
      *
      * @since Symbian^4
      * @param aMessage The message containing the details of the client request.
      */
-    void HandlePairingNotifierRequestL( const RMessage2& aMessage );
+    void HandleNotifierRequestL( const RMessage2& aMessage );
     
     /**
      * Handle a request related to pairing.
@@ -167,7 +167,7 @@
      * Object for managing the application pairing.
      * Own.
      */
-    CBTNotifPairingManager* iPairingManager;
+    CBTNotifSecurityManager* iPairingManager;
 
     BTUNITTESTHOOK
 
--- a/bluetoothengine/btnotif/btnotifsrv/inc/btnotifincomingpairinghandler.h	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btnotif/btnotifsrv/inc/btnotifincomingpairinghandler.h	Mon Jul 12 18:51:05 2010 +0300
@@ -38,7 +38,7 @@
      * @param aParent the owner of this observer
      * @param aAddr the remote device this observer is targeted to
      */
-    static CBTNotifBasePairingHandler* NewL( CBTNotifPairingManager& aParent, 
+    static CBTNotifBasePairingHandler* NewL( CBTNotifSecurityManager& aParent, 
             const TBTDevAddr& aAddr);
 
     /**
@@ -120,7 +120,7 @@
     /**
      * C++ default constructor
      */
-    CBTNotifIncomingPairingHandler(CBTNotifPairingManager& aParent, const TBTDevAddr& aAddr);
+    CBTNotifIncomingPairingHandler(CBTNotifSecurityManager& aParent, const TBTDevAddr& aAddr);
     
     /**
      * 2nd phase constructor.
--- a/bluetoothengine/btnotif/btnotifsrv/inc/btnotifoutgoingpairinghandler.h	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btnotif/btnotifsrv/inc/btnotifoutgoingpairinghandler.h	Mon Jul 12 18:51:05 2010 +0300
@@ -63,7 +63,7 @@
      * @param aParent the owner of this object
      * @param aAddr the remote device this observer is targeted to
      */
-    static CBTNotifBasePairingHandler* NewL( CBTNotifPairingManager& aParent, 
+    static CBTNotifBasePairingHandler* NewL( CBTNotifSecurityManager& aParent, 
             const TBTDevAddr& aAddr );
 
     /**
@@ -157,7 +157,7 @@
     /**
      * C++ default constructor
      */
-    CBTNotifOutgoingPairingHandler( CBTNotifPairingManager& aParent, const TBTDevAddr& aAddr );
+    CBTNotifOutgoingPairingHandler( CBTNotifSecurityManager& aParent, const TBTDevAddr& aAddr );
 
     /**
      * Symbian 2nd-phase constructor
--- a/bluetoothengine/btnotif/btnotifsrv/inc/btnotifpairingmanager.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,400 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#ifndef BTNOTIFPAIRINGMANAGER_H
-#define BTNOTIFPAIRINGMANAGER_H
-
-#include <bttypes.h>
-#include <bt_sock.h>
-#include <bluetooth/pairing.h>
-#include <btservices/btsimpleactive.h>
-#include <btservices/btdevrepository.h>
-#include <btengconstants.h>
-
-class CBTNotifBasePairingHandler;
-class CBTNotifPairNotifier;
-class CBTNotifConnectionTracker;
-class CBtDevRepository;
-
-/**
- *  Class CBTNotifPairingManager
- *
- *  This class manages pairing with BT devices.
- *  The responsibility of handling incoming and outgoing pairings is
- *  delegated to CBTNotifIncomingPairingHandler and CBTNotifOutgoingPairingHandler 
- *  respectively.
- *
- *  @since Symbian^4
- */
-NONSHARABLE_CLASS( CBTNotifPairingManager ) : 
-    public CBase, 
-    public MBtSimpleActiveObserver,
-    public MBtDevRepositoryObserver
-    {
-public:
-
-    /**
-     * Two-phase constructor
-     */
-    static CBTNotifPairingManager* NewL( 
-            CBTNotifConnectionTracker& aParent, 
-            CBtDevRepository& aDevRepository );
-
-    /**
-     * Destructor
-     */
-    ~CBTNotifPairingManager();
-
-    /**
-     * Cancels an outstanding pairing request.
-     */
-    void CancelOutgoingPair();    
-    
-    /**
-     * Process commands relevant to pairing
-     */
-    void HandleBondingRequestL( const RMessage2& aMessage );
-
-    void HandlePairingNotifierRequestL( const RMessage2& aMessage );
-    
-    /**
-     * Gets the instance of pairing server.
-     * @return the server instance. NULL if dedicated bonding is unavailable.
-     */
-    RBluetoothPairingServer* PairingServer();
-    
-    /**
-     * gets the reference of socket server session
-     */
-    RSocketServ& SocketServ();
-    
-    /**
-     * gets the reference of devrepository.
-     */
-    CBtDevRepository& BTDevRepository();
-    
-    /**
-     * gets the reference of connection tracker.
-     */
-    CBTNotifConnectionTracker& ConnectionTracker();
-    
-    /**
-     *  Transfer responsiblity to the specified object.
-     *  @param aPairer the object whose the responsibility is transfered.
-     */
-    void RenewPairingHandler( CBTNotifBasePairingHandler* aPairingHandler );
-    
-    /**
-     * Be notified when handling of an outgoing pair has been completed.
-     * @param aErr the result of pairing
-     * 
-     */
-    void OutgoingPairCompleted( TInt aErr );
-    
-    /**
-     * Be informed that a session will be closed.
-     *
-     * @since Symbian^4
-     * @param aSession the session to be cloased.
-     */
-    void SessionClosed(CSession2* aSession );
-    
-    /**
-     * Unpair a device via registry
-     */
-    void UnpairDevice( const TBTDevAddr& aAddr );
-    
-    /**
-     * Add the bit indicating the device is user-aware Just worked paired to
-     * UI cookie.
-     */
-    TInt AddUiCookieJustWorksPaired( const TBTNamelessDevice& aDev );
-    
-    /**
-     * Update a nameless device in registry
-     */
-    TInt UpdateRegDevice( const TBTNamelessDevice& aDev );
-    
-    /**
-     * Gets the pin code to be used for pairing a device.
-     * @param aPin contains the pin code if it is not empty
-     * @param aAddr the device to which pairing is performed.
-     * @param the required minimum length of a pin code.
-     */
-    void GetPinCode( TBTPinCode& aPin, const TBTDevAddr& aAddr, TInt aMinPinLength );
-    
-    /**
-     * Returns the service (limited to services managed in bteng scope)
-     * level connection status of the specified device.
-     *
-     * @param aAddr the address of the device
-     * @return one of TBTEngConnectionStatus enums
-     */
-    TBTEngConnectionStatus ConnectStatus( const TBTDevAddr& aAddr );
-    
-private: 
-    
-    // from base class MBtSimpleActiveObserver
-
-    /**
-     * 
-     * Callback to notify that an outstanding request has completed.
-     *
-     * @since Symbian^4
-     * @param aActive Pointer to the active object that completed.
-     * @param aId The ID that identifies the outstanding request.
-     * @param aStatus The status of the completed request.
-     */
-    virtual void RequestCompletedL( CBtSimpleActive* aActive, TInt aStatus );
-
-    /**
-     * Callback from Docancel() for handling cancelation of an outstanding request.
-     *
-     * @since Symbian^4
-     * @param aId The ID that identifies the outstanding request.
-     */
-    virtual void CancelRequest( TInt aRequestId );
-    
-    /**
-     * Callback to notify that an error has occurred in RunL.
-     *
-     * @since Symbian^4
-     * @param aActive Pointer to the active object that completed.
-     * @param aId The ID that identifies the outstanding request.
-     * @param aStatus The status of the completed request.
-     */
-    virtual void HandleError( CBtSimpleActive* aActive, TInt aError );
-
-    // From base class MBtDevRepositoryObserver
-    
-    /**
-     * Callback to notify that the repository has finished initialization.
-     * Initialization completion means the repository has retieved all
-     * Bluetooth devices from BT registry, and it is subscribing to
-     * registry update events.
-     */
-    virtual void RepositoryInitialized();    
-    
-    /**
-     * Callback to notify that a device has been deleted from BT registry.
-     * 
-     *
-     * @param aAddr the bd_addr of the deleted device
-     */
-    virtual void DeletedFromRegistry( const TBTDevAddr& aAddr );
-    
-    /**
-     * Callback to notify that the device has been added to BT registry.
-     *
-     * @param aDevice the device that has been added to registry
-     */
-    virtual void AddedToRegistry( const CBtDevExtension& aDevice );
-    
-    /**
-     * Callback to notify that the property of a device in BT registry has been
-     * changed.
-     *
-     * @param aDevice the device that possesses the latest properties.
-     * @param aSimilarity the similarity of the properties comparing to the ones
-     *        prior to this change.
-     *        Refer CBTDevice::TBTDeviceNameSelector and 
-     *        TBTNamelessDevice::TBTDeviceSet for the meanings of the bits 
-     *        in this parameter.
-     */
-    virtual void ChangedInRegistry(
-            const CBtDevExtension& aDevice, TUint aSimilarity ); 
-    
-    /**
-     * Callback to notify that the status of service (limited to 
-     * services maintained in btengsrv scope) connections with 
-     * a device has changed.
-     *
-     * @param aDevice the device to which the status change refers
-     * @param aConnected ETrue if at least one service is currently connected.
-     *        EFalse if no service is currently connected.
-     */
-    virtual void ServiceConnectionChanged(
-            const CBtDevExtension& aDevice, TBool aConnected );
-
-    
-private:
-    
-    /**
-     * C++ default constructor
-     */
-    CBTNotifPairingManager(
-            CBTNotifConnectionTracker& aParent,
-            CBtDevRepository& aDevRepository );
-    
-    /**
-     * Symbian 2nd-phase constructor
-     */
-    void ConstructL();
-
-    /**
-     * Subscribe local device address for determining 
-     * Bluetooth HW power status
-     */
-    void SubscribeLocalAddress();
-
-    TBool IsLocalAddressAvailable();
-
-    /**
-     * Activate / deactivate a pair observer
-     */
-    TInt SetPairObserver(const TBTDevAddr& aAddr, TBool aActivate);
-    
-    /**
-     * Pair a BT device.
-     */
-    void PairDeviceL( const TBTDevAddr& aAddr, TUint32 aCod );
-    
-    /**
-     * Cancel all subscribes to pairng server
-     */
-    void CancelSubscribePairingAuthenticate();
-    
-    /**
-     * subscribe to receive SSP pairing result from pairing server
-     */
-    void SubscribeSspPairingResult();
-    
-    /**
-     * Subscribe to receive authentication result from pairing server
-     */
-    void SubscribeAuthenticateResult();
-
-    /**
-     * Handle a pairing result from the pairing server.
-     *
-     * @since Symbian^4
-     * @param aResult The status code of the authentication result.
-     */
-    void HandlePairingResultL( const TBTDevAddr& aAddr, TInt aResult );
-    
-    /**
-     * Copy the paired devices to internal array storage.
-     */
-    void UpdatePairedDeviceListL();
-    
-    /**
-     * Handles a new bonding event from Registry.
-     */
-    void HandleRegistryBondingL( const TBTNamelessDevice& aNameless );
-    
-   
-private:
-
-    /**
-     * Owner of this class.
-     * Not owned.
-     */
-    CBTNotifConnectionTracker& iParent;
-    
-    /**
-     * Reference to repository.
-     * Not owned.
-     */
-    CBtDevRepository& iDevRepository;
-    
-    /**
-     * The session with BT registry.
-     * own.
-     */
-    RBTRegistry iRegistry;
-    
-    /**
-     * contains the list of all paired devices.
-     */
-    RArray<TBTNamelessDevice> iPairedDevices;
-
-    /**
-     * Session with the pairing server.
-     * Allocate it in heap to ease the handling for 
-     * situation of unavailable dedicated pairing service.
-     * 
-     * own.
-     */
-    RBluetoothPairingServer* iPairingServ;
-
-    /**
-     * Subsession with the pairing server for 
-     * getting the simple pairing result.
-     * own
-     */
-    RBluetoothPairingResult iPairingResult;
-
-    /**
-     * Subsession with the pairing server for 
-     * getting the authentication result.
-     * own
-     */
-    RBluetoothAuthenticationResult iAuthenResult;
-
-    /**
-     * the address with which a simple pairing has been performed
-     */
-    TBTDevAddr iSimplePairingRemote;
-
-    /**
-     * the address with which an authentication has been performed
-     */
-    TBTDevAddr iAuthenticateRemote;
-    
-    /**
-     * Active object helper for receiving simple pairing results.
-     * Own.
-     */
-    CBtSimpleActive* iSSPResultActive;
-
-    /**
-     * Active object helper for receiving authentication results.
-     * Own.
-     */
-    CBtSimpleActive* iAuthenResultActive;
-
-    /**
-     * pairing hanlder at the time.
-     * Own.
-     */
-    CBTNotifBasePairingHandler* iPairingHandler;
-    
-    /**
-     * The handler for pairing notifiers 
-     */
-    CBTNotifPairNotifier* iPairNotifier;
-    
-    /**
-     * Client-server message for power change requests.
-     */
-    RMessage2 iMessage;
-
-    /**
-     * AO for local address updates.
-     */
-    CBtSimpleActive* iLocalAddrActive;
-
-    /**
-     * Provides access to the BT local device address.
-     */
-    RProperty iPropertyLocalAddr;
-    };
-
-#endif /*BTNOTIFPAIRINGMANAGER_H*/
-
-
-
--- a/bluetoothengine/btnotif/btnotifsrv/inc/btnotifpairnotifier.h	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btnotif/btnotifsrv/inc/btnotifpairnotifier.h	Mon Jul 12 18:51:05 2010 +0300
@@ -20,16 +20,17 @@
 
 #include <e32base.h>
 #include <btmanclient.h>
+#include <hb/hbcore/hbsymbianvariant.h>
 #include "bluetoothdevicedialogs.h"
 #include "btnotificationresult.h"
 #include "bluetoothtrace.h"
 
-class CBTNotifPairingManager;
+class CBTNotifSecurityManager;
 class CBTNotifConnectionTracker;
 class CBluetoothNotification;
 
 /**
- *  Helper class for performing user prompt for pairing and authorization.
+ *  Helper class for performing user prompt for pairing.
  *  
  *  The design of this class is focussed on structure and maintainability first.
  *  Duplicate (state) information is kept to a minimum. And memory usage comes
@@ -37,8 +38,6 @@
  *  only instantiated when there is pairing-related processing, so extreme
  *  focus on memory or processing efficiency would have relatively little effect.
  *  
- *  Auth represents Authenticate and Authorize
- *  
  *  @since Symbian^4
  */
 NONSHARABLE_CLASS( CBTNotifPairNotifier ) : public CBase,
@@ -53,7 +52,7 @@
      * @param aDevice Pointer to information of the remote device.
      * aParam The owner of this object
      */
-    static CBTNotifPairNotifier* NewL( CBTNotifPairingManager& aParent );
+    static CBTNotifPairNotifier* NewL( CBTNotifSecurityManager& aParent );
 
     /**
     * Destructor.
@@ -118,7 +117,7 @@
     /**
      * C++ default constructor.
      */
-    CBTNotifPairNotifier( CBTNotifPairingManager& aParent );
+    CBTNotifPairNotifier( CBTNotifSecurityManager& aParent );
 
     /**
      * Symbian 2nd-phase constructor.
@@ -154,7 +153,7 @@
      * @param aResult The user response; ETrue if the user accepted the query,
      *                otherwise EFalse.
      */
-    void CompleteAcceptPairingQueryL( TInt aError, TBool aResult );
+    void CompleteAcceptPairingQueryL( TInt aError);
     
     /**
      * Parse the parameters of a request for pairing.
@@ -231,13 +230,6 @@
      */
     void NotificationClosedL( TInt aError, const TDesC8& aData );
     
-    /**
-     * Ask the user if he/she wants to block future connection requests.
-     *
-     * @since Symbian^4
-     */    
-    void LaunchBlockingQueryL();
-
 private: // data
 
     enum TNotifierState
@@ -246,7 +238,7 @@
         EPairingInputConfirm,
         };
     
-    CBTNotifPairingManager& iParent;
+    CBTNotifSecurityManager& iParent;
     
     /**
      * The client request.
@@ -290,6 +282,11 @@
     
     TNotifierState iState;
     
+    // Defines if the check box in the dialog is checked or not.
+    TBool   iCheckBoxState;
+    
+    TBool   iAcceptPairingResult;
+    
     BTUNITTESTHOOK
 
     };
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/btnotif/btnotifsrv/inc/btnotifsecuritymanager.h	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,413 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef BTNOTIFSECURITYMANAGER_H
+#define BTNOTIFSECURITYMANAGER_H
+
+#include <bttypes.h>
+#include <bt_sock.h>
+#include <bluetooth/pairing.h>
+#include <btservices/btsimpleactive.h>
+#include <btservices/btdevrepository.h>
+#include <btengconstants.h>
+
+class CBTNotifBasePairingHandler;
+class CBTNotifPairNotifier;
+class CBTNotifConnectionTracker;
+class CBtDevRepository;
+class CBTNotifServiceAuthorizer;
+
+/**
+ *  Class CBTNotifSecurityManager
+ *
+ *  This class manages pairing with BT devices.
+ *  The responsibility of handling incoming and outgoing pairings is
+ *  delegated to CBTNotifIncomingPairingHandler and CBTNotifOutgoingPairingHandler 
+ *  respectively.
+ *
+ *  @since Symbian^4
+ */
+NONSHARABLE_CLASS( CBTNotifSecurityManager ) : 
+    public CBase, 
+    public MBtSimpleActiveObserver,
+    public MBtDevRepositoryObserver
+    {
+public:
+
+    /**
+     * Two-phase constructor
+     */
+    static CBTNotifSecurityManager* NewL( 
+            CBTNotifConnectionTracker& aParent, 
+            CBtDevRepository& aDevRepository );
+
+    /**
+     * Destructor
+     */
+    ~CBTNotifSecurityManager();
+
+    /**
+     * Cancels an outstanding pairing request.
+     */
+    void CancelOutgoingPair();    
+    
+    /**
+     * Process commands relevant to pairing
+     */
+    void HandleBondingRequestL( const RMessage2& aMessage );
+
+    void HandleNotifierRequestL( const RMessage2& aMessage );
+    
+    /**
+     * Gets the instance of pairing server.
+     * @return the server instance. NULL if dedicated bonding is unavailable.
+     */
+    RBluetoothPairingServer* PairingServer();
+    
+    /**
+     * gets the reference of socket server session
+     */
+    RSocketServ& SocketServ();
+    
+    /**
+     * gets the reference of devrepository.
+     */
+    CBtDevRepository& BTDevRepository();
+    
+    /**
+     * gets the reference of connection tracker.
+     */
+    CBTNotifConnectionTracker& ConnectionTracker();
+    
+    /**
+     *  Transfer responsiblity to the specified object.
+     *  @param aPairer the object whose the responsibility is transfered.
+     */
+    void RenewPairingHandler( CBTNotifBasePairingHandler* aPairingHandler );
+    
+    /**
+     * Be notified when handling of an outgoing pair has been completed.
+     * @param aErr the result of pairing
+     * 
+     */
+    void OutgoingPairCompleted( TInt aErr );
+    
+    /**
+     * Be informed that a session will be closed.
+     *
+     * @since Symbian^4
+     * @param aSession the session to be cloased.
+     */
+    void SessionClosed(CSession2* aSession );
+    
+    /**
+     * Unpair a device via registry
+     */
+    void UnpairDevice( const TBTDevAddr& aAddr );
+
+    /**
+     * Block a device via registry
+     */
+    void BlockDevice( const TBTDevAddr& aAddr , TBool aBanned);
+    
+    /**
+     * Add the bit indicating the device is user-aware Just worked paired to
+     * UI cookie.
+     */
+    TInt AddUiCookieJustWorksPaired( const TBTNamelessDevice& aDev );
+    
+    /**
+     * Update a nameless device in registry
+     */
+    TInt UpdateRegDevice( const TBTNamelessDevice& aDev );
+    
+    /**
+     * Gets the pin code to be used for pairing a device.
+     * @param aPin contains the pin code if it is not empty
+     * @param aAddr the device to which pairing is performed.
+     * @param the required minimum length of a pin code.
+     */
+    void GetPinCode( TBTPinCode& aPin, const TBTDevAddr& aAddr, TInt aMinPinLength );
+    
+    /**
+     * Returns the service (limited to services managed in bteng scope)
+     * level connection status of the specified device.
+     *
+     * @param aAddr the address of the device
+     * @return one of TBTEngConnectionStatus enums
+     */
+    TBTEngConnectionStatus ConnectStatus( const TBTDevAddr& aAddr );
+    
+    /**
+     * Activate / deactivate a pair observer
+     */
+    TInt SetPairObserver(const TBTDevAddr& aAddr, TBool aActivate);
+    
+    /**
+     * Trust a device via the registry
+     */
+    void TrustDevice( const TBTDevAddr& aAddr );
+    
+private: 
+    
+    // from base class MBtSimpleActiveObserver
+
+    /**
+     * 
+     * Callback to notify that an outstanding request has completed.
+     *
+     * @since Symbian^4
+     * @param aActive Pointer to the active object that completed.
+     * @param aId The ID that identifies the outstanding request.
+     * @param aStatus The status of the completed request.
+     */
+    virtual void RequestCompletedL( CBtSimpleActive* aActive, TInt aStatus );
+
+    /**
+     * Callback from Docancel() for handling cancelation of an outstanding request.
+     *
+     * @since Symbian^4
+     * @param aId The ID that identifies the outstanding request.
+     */
+    virtual void CancelRequest( TInt aRequestId );
+    
+    /**
+     * Callback to notify that an error has occurred in RunL.
+     *
+     * @since Symbian^4
+     * @param aActive Pointer to the active object that completed.
+     * @param aId The ID that identifies the outstanding request.
+     * @param aStatus The status of the completed request.
+     */
+    virtual void HandleError( CBtSimpleActive* aActive, TInt aError );
+
+    // From base class MBtDevRepositoryObserver
+    
+    /**
+     * Callback to notify that the repository has finished initialization.
+     * Initialization completion means the repository has retieved all
+     * Bluetooth devices from BT registry, and it is subscribing to
+     * registry update events.
+     */
+    virtual void RepositoryInitialized();    
+    
+    /**
+     * Callback to notify that a device has been deleted from BT registry.
+     * 
+     *
+     * @param aAddr the bd_addr of the deleted device
+     */
+    virtual void DeletedFromRegistry( const TBTDevAddr& aAddr );
+    
+    /**
+     * Callback to notify that the device has been added to BT registry.
+     *
+     * @param aDevice the device that has been added to registry
+     */
+    virtual void AddedToRegistry( const CBtDevExtension& aDevice );
+    
+    /**
+     * Callback to notify that the property of a device in BT registry has been
+     * changed.
+     *
+     * @param aDevice the device that possesses the latest properties.
+     * @param aSimilarity the similarity of the properties comparing to the ones
+     *        prior to this change.
+     *        Refer CBTDevice::TBTDeviceNameSelector and 
+     *        TBTNamelessDevice::TBTDeviceSet for the meanings of the bits 
+     *        in this parameter.
+     */
+    virtual void ChangedInRegistry(
+            const CBtDevExtension& aDevice, TUint aSimilarity ); 
+    
+    /**
+     * Callback to notify that the status of service (limited to 
+     * services maintained in btengsrv scope) connections with 
+     * a device has changed.
+     *
+     * @param aDevice the device to which the status change refers
+     * @param aConnected ETrue if at least one service is currently connected.
+     *        EFalse if no service is currently connected.
+     */
+    virtual void ServiceConnectionChanged(
+            const CBtDevExtension& aDevice, TBool aConnected );
+
+    
+private:
+    
+    /**
+     * C++ default constructor
+     */
+    CBTNotifSecurityManager(
+            CBTNotifConnectionTracker& aParent,
+            CBtDevRepository& aDevRepository );
+    
+    /**
+     * Symbian 2nd-phase constructor
+     */
+    void ConstructL();
+
+    /**
+     * Subscribe local device address for determining 
+     * Bluetooth HW power status
+     */
+    void SubscribeLocalAddress();
+
+    TBool IsLocalAddressAvailable();
+   
+    /**
+     * Pair a BT device.
+     */
+    void PairDeviceL( const TBTDevAddr& aAddr, TUint32 aCod );
+    
+    /**
+     * Cancel all subscribes to pairng server
+     */
+    void CancelSubscribePairingAuthenticate();
+    
+    /**
+     * subscribe to receive SSP pairing result from pairing server
+     */
+    void SubscribeSspPairingResult();
+    
+    /**
+     * Subscribe to receive authentication result from pairing server
+     */
+    void SubscribeAuthenticateResult();
+
+    /**
+     * Handle a pairing result from the pairing server.
+     *
+     * @since Symbian^4
+     * @param aResult The status code of the authentication result.
+     */
+    void HandlePairingResultL( const TBTDevAddr& aAddr, TInt aResult );
+    
+    /**
+     * Copy the paired devices to internal array storage.
+     */
+    void UpdatePairedDeviceListL();
+    
+    /**
+     * Handles a new bonding event from Registry.
+     */
+    void HandleRegistryBondingL( const TBTNamelessDevice& aNameless );
+    
+   
+private:
+
+    /**
+     * Owner of this class.
+     * Not owned.
+     */
+    CBTNotifConnectionTracker& iParent;
+    
+    /**
+     * Reference to repository.
+     * Not owned.
+     */
+    CBtDevRepository& iDevRepository;
+    
+    /**
+     * The session with BT registry.
+     * own.
+     */
+    RBTRegistry iRegistry;
+    
+    /**
+     * contains the list of all paired devices.
+     */
+    RArray<TBTNamelessDevice> iPairedDevices;
+
+    /**
+     * Session with the pairing server.
+     * Allocate it in heap to ease the handling for 
+     * situation of unavailable dedicated pairing service.
+     * 
+     * own.
+     */
+    RBluetoothPairingServer* iPairingServ;
+
+    /**
+     * Subsession with the pairing server for 
+     * getting the simple pairing result.
+     * own
+     */
+    RBluetoothPairingResult iPairingResult;
+
+    /**
+     * Subsession with the pairing server for 
+     * getting the authentication result.
+     * own
+     */
+    RBluetoothAuthenticationResult iAuthenResult;
+
+    /**
+     * the address with which a simple pairing has been performed
+     */
+    TBTDevAddr iSimplePairingRemote;
+
+    /**
+     * the address with which an authentication has been performed
+     */
+    TBTDevAddr iAuthenticateRemote;
+    
+    /**
+     * Active object helper for receiving simple pairing results.
+     * Own.
+     */
+    CBtSimpleActive* iSSPResultActive;
+
+    /**
+     * Active object helper for receiving authentication results.
+     * Own.
+     */
+    CBtSimpleActive* iAuthenResultActive;
+
+    /**
+     * pairing hanlder at the time.
+     * Own.
+     */
+    CBTNotifBasePairingHandler* iPairingHandler;
+    
+    /**
+     * The handler for pairing notifiers 
+     */
+    CBTNotifPairNotifier* iPairNotifier;
+    
+    /**
+     * Client-server message for power change requests.
+     */
+    RMessage2 iMessage;
+
+    /**
+     * AO for local address updates.
+     */
+    CBtSimpleActive* iLocalAddrActive;
+
+    /**
+     * Provides access to the BT local device address.
+     */
+    RProperty iPropertyLocalAddr;
+    
+    CBTNotifServiceAuthorizer* iServiceAuthorizer;
+    };
+
+#endif /*BTNOTIFSECURITYMANAGER_H*/
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/btnotif/btnotifsrv/inc/btnotifserviceauthorizer.h	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,91 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: class for prompting user to authorize a service
+*              connection request.
+*
+*/
+
+#ifndef BTNOTIFSERVICEAUTHORIZER_H
+#define BTNOTIFSERVICEAUTHORIZER_H
+
+#include <e32base.h>
+#include "btnotificationresult.h"
+#include "bluetoothdevicedialogs.h"
+
+class CBTNotifSecurityManager;
+class CBluetoothNotification;
+
+
+NONSHARABLE_CLASS(CBTNotifServiceAuthorizer) 
+    : public CBase, public MBTNotificationResult
+    {
+public:
+    static CBTNotifServiceAuthorizer* NewL(CBTNotifSecurityManager& aParent);
+    ~CBTNotifServiceAuthorizer();
+    
+private:
+    CBTNotifServiceAuthorizer(CBTNotifSecurityManager& aParent);
+    void ConstructL();
+    
+public:
+    void StartNotifierL(const RMessage2& aMessage);
+    
+private: // From MBTNotificationResult
+    void MBRDataReceived(CHbSymbianVariantMap& aData);
+    void MBRNotificationClosed(TInt aError, const TDesC8& aData);
+    
+private:
+    void PrepareNotificationL(TBool& aAutoAuthorize,
+            TBluetoothDialogParams::TBTDialogType aType,
+        TBTDialogResourceId aResourceId, TBool aPaired);
+    TBool IsExistingConnectionToAudioL(const TBTDevAddr& aDevAddr);
+    
+private:
+    CBTNotifSecurityManager& iParent;
+    
+    /**
+     * Buffer containing the parameters of the client message.
+     * Own.
+     */
+    RBuf8 iParams;
+    
+    /**
+     * Pointer to an outstanding user interaction.
+     * Not owned.
+     */
+    CBluetoothNotification* iNotification;
+    
+    // Contains the device name provided in params
+    TBTDeviceName iCurrentDeviceName;
+    
+     // The client request.
+    RMessage2 iNotifierMessage;
+    
+    // The bluetooth SDP Id of the connecting device.
+    TUint iServiceId;
+    
+    // Variable that defines if the connecting device is to be trusted or not.
+    TBool iSetTrusted;
+    
+    // Defines if the check box in the dialog is checked or not.
+    TBool   iCheckBoxState;
+    
+    // Defines if the connecting device is paired or not.
+    TBool   iPairedDevice;
+    
+    // Defines the class of the connecting device.
+    TInt iDeviceClass;
+    };
+
+#endif /* BTNOTIFSERVICEAUTHORIZER_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/btnotif/btnotifsrv/inc/btnotifutil.h	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,49 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef BTNOTIFUTIL_H
+#define BTNOTIFUTIL_H
+
+#include <e32base.h>
+#include <bttypes.h>
+
+class CBtDevExtension;
+
+/**
+ *  Utility class providing common functions required by various classes within
+ *  btnotifsrv.
+ *  
+ *  @since Symbian^4
+ */
+NONSHARABLE_CLASS( TBTNotifUtil )
+    {
+public:
+
+    /**
+     * Gets the name of a device for displaying in UI.
+     *  
+     * @param aNameBuf The buffer that will contain the name at return.
+     * @param aDevExt the DevExt instance representing the remote device.
+     * @param aNameInParam the given name from the parameter of a notifier request.
+     * @param aAddr the address of the device. Used only when aDevExt is null.
+     */
+    static void GetDeviceUiNameL( TDes& aNameBuf, 
+            const CBtDevExtension* aDevExt, 
+            const TDesC& aNameInParam, const TBTDevAddr& aAddr );
+    };
+
+#endif // BTNOTIFUTIL_H
--- a/bluetoothengine/btnotif/btnotifsrv/src/bluetoothnotification.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btnotif/btnotifsrv/src/bluetoothnotification.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -148,7 +148,7 @@
     BOstraceFunctionEntry1( DUMMY_DEVLIST, this );
     iDialog->Cancel();
     iManager->ReleaseNotification( this );
-	BOstraceFunctionExit1( DUMMY_DEVLIST, this );
+	BOstraceFunctionExit0( DUMMY_DEVLIST );
     return KErrNone;
     }
 
@@ -161,7 +161,6 @@
     {
     BOstraceFunctionEntryExt( DUMMY_DEVLIST, this, aType );
     TBuf16<6> key;
-    TInt err = 0;
     CHbSymbianVariant* value = NULL;
     switch( aType )
         {
@@ -191,12 +190,7 @@
                     TPtrC16 *ptr = (TPtrC16 *)value->Data();
                     BOstraceExt2( TRACE_DEBUG, DUMMY_DEVLIST, "SetData [%S] = [%S]", &p, ptr);
                     );
-            err = iNotificationData->Add( key, value );   // Takes ownership of value
-            if ( err )
-                {
-                // Note: need a proper exception handling. 
-                // NOTIF_NOTHANDLED( err )
-                }
+            User::LeaveIfError(iNotificationData->Add( key, value ));   // Takes ownership of value
             break;
         case TBluetoothDialogParams::EResource:
         case TBluetoothDeviceDialog::EDeviceClass:
@@ -220,7 +214,6 @@
     {
     BOstraceFunctionEntryExt( DUMMY_DEVLIST, this, aType );
     TBuf<6> key;
-    TInt err = 0;
     CHbSymbianVariant* value = NULL;
     switch( aType )
         {
@@ -251,13 +244,7 @@
                     TInt *intPtr = (TInt *)value->Data();
                     BOstraceExt2( TRACE_DEBUG, DUMMY_DEVLIST, "SetData [%S] = [%d]", &p, *intPtr);
                     );
-			err = iNotificationData->Add( key, value );   // Takes ownership of value
-	         if ( err )
-	             {
-                 // need a proper exception handling.
-                 //NOTIF_NOTHANDLED( !err )
-	             }
-            
+			User::LeaveIfError(iNotificationData->Add( key, value ));   // Takes ownership of value
             break;
         case TBluetoothDialogParams::EAddress:
         case TBluetoothDeviceDialog::EDeviceName:
@@ -297,7 +284,10 @@
                 }
             }
         }
-    iObserver->MBRDataReceived( aData );
+    if( iObserver )
+        {
+    	iObserver->MBRDataReceived( aData );
+        }
     BOstraceFunctionExit1( DUMMY_DEVLIST, this );
     }
 
@@ -400,6 +390,6 @@
     resultBuf.Close();
     iManager->ReleaseNotification( this );
     // Note that we might get deleted after releasing ourselves.
-    BOstraceFunctionExit1( DUMMY_DEVLIST, this );
+    BOstraceFunctionExit0( DUMMY_DEVLIST );
     }
 
--- a/bluetoothengine/btnotif/btnotifsrv/src/btnotifbasepairinghandler.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btnotif/btnotifsrv/src/btnotifbasepairinghandler.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -15,8 +15,12 @@
 *
 */
 
-#include "btnotifpairingmanager.h"
+#include "btnotifsecuritymanager.h"
 #include "btnotifbasepairinghandler.h"
+#include "btnotificationmanager.h"
+#include "bluetoothnotification.h"
+#include "btnotifconnectiontracker.h"
+#include "bluetoothtrace.h"
 
 // ======== MEMBER FUNCTIONS ========
 
@@ -24,7 +28,7 @@
 // C++ default constructor
 // ---------------------------------------------------------------------------
 //
-CBTNotifBasePairingHandler::CBTNotifBasePairingHandler( CBTNotifPairingManager& aParent, const TBTDevAddr& aAddr)
+CBTNotifBasePairingHandler::CBTNotifBasePairingHandler( CBTNotifSecurityManager& aParent, const TBTDevAddr& aAddr)
     : iAddr( aAddr ), iParent( aParent )
     {
     }
@@ -121,6 +125,38 @@
     return iPairResultSet;
     }
 
+// ---------------------------------------------------------------------------
+// Invalidate iPairResultSet
+// ---------------------------------------------------------------------------
+//
+void CBTNotifBasePairingHandler::ShowPairingResultNoteL(TInt aResult)
+    {
+    BOstraceFunctionEntry0( DUMMY_DEVLIST );
+    CBluetoothNotification* notification = 
+            iParent.ConnectionTracker().NotificationManager()->GetNotification();
+    User::LeaveIfNull( notification ); // For OOM exception, leaves with KErrNoMemory
+    TBTDialogResourceId resourceId = EPairingSuccess;
+    if(KErrNone != aResult)
+        {
+        resourceId = EPairingFailure;
+        }
+    notification->SetNotificationType( TBluetoothDialogParams::ENote, resourceId );
+    const CBtDevExtension* dev = iParent.BTDevRepository().Device(iAddr);
+    if(dev)
+        {
+        User::LeaveIfError(notification->SetData( TBluetoothDeviceDialog::EDeviceName, dev->Alias()));
+        User::LeaveIfError(notification->SetData( TBluetoothDeviceDialog::EDeviceClass, dev->Device().DeviceClass().DeviceClass()));
+        }
+    else
+        {
+        TBTDeviceName name;
+        iAddr.GetReadable(name);
+        User::LeaveIfError(notification->SetData( TBluetoothDialogParams::EAddress, name ));
+        User::LeaveIfError(notification->SetData( TBluetoothDeviceDialog::EDeviceClass, 0)); // No device class
+        }
+    iParent.ConnectionTracker().NotificationManager()->QueueNotificationL( notification);
+    BOstraceFunctionExit0( DUMMY_DEVLIST );
+    }
 
 
 
--- a/bluetoothengine/btnotif/btnotifsrv/src/btnotifconnectiontracker.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btnotif/btnotifsrv/src/btnotifconnectiontracker.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -27,7 +27,7 @@
 #include "btnotifsession.h"
 #include "btnotifclientserver.h"
 #include "bluetoothtrace.h"
-#include "btnotifpairingmanager.h"
+#include "btnotifsecuritymanager.h"
 
 /**  Time window for determining if there are too many requests. */
 #ifndef __WINS__
@@ -62,7 +62,7 @@
     User::LeaveIfError( iBTRegistrySession.Connect() );
     // Open a handle to the socket server
     User::LeaveIfError( iSockServ.Connect() );
-    iPairingManager = CBTNotifPairingManager::NewL(*this, iServer->DevRepository() );
+    iPairingManager = CBTNotifSecurityManager::NewL(*this, iServer->DevRepository() );
     BOstraceFunctionExit0( DUMMY_DEVLIST );
     }
 
@@ -99,10 +99,10 @@
 // Process notifier message related to pairing notifiers.
 // ---------------------------------------------------------------------------
 //
-void CBTNotifConnectionTracker::HandlePairingNotifierRequestL( const RMessage2& aMessage )
+void CBTNotifConnectionTracker::HandleNotifierRequestL( const RMessage2& aMessage )
     {
     BOstraceFunctionEntryExt ( DUMMY_LIST, this, aMessage.Function() );
-    iPairingManager->HandlePairingNotifierRequestL(aMessage);
+    iPairingManager->HandleNotifierRequestL(aMessage);
     BOstraceFunctionExit1( DUMMY_DEVLIST, this );
     }
 
--- a/bluetoothengine/btnotif/btnotifsrv/src/btnotifdeviceselector.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btnotif/btnotifsrv/src/btnotifdeviceselector.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -26,6 +26,8 @@
 #include "btnotifserver.h"
 #include "btnotificationmanager.h"
 #include "btnotifclientserver.h"
+// Key description length
+const TInt KMaxKeyDesCLength  = 20;
 
 // ======== MEMBER FUNCTIONS ========
 
@@ -187,8 +189,8 @@
                 devParams().SetDeviceClass(iDevices[val]->Device().DeviceClass());
                 devParams().SetDeviceName(iDevices[val]->Alias());
                 err = iMessage.Write( EBTNotifSrvReplySlot, devParams );
+                iNotification->RemoveObserver();
                 iNotification->Close(); // Also dequeues the notification from the queue.
-                iNotification->RemoveObserver();
                 iNotification = NULL;                
                 }
             iMessage.Complete( err );
@@ -208,8 +210,8 @@
         }
     else if(aData.Keys().MdcaPoint(0).Compare(_L("MoreDevices"))==KErrNone)
         {
+        iNotification->RemoveObserver();
         iNotification->Close(); // Also dequeues the notification from the queue.
-        iNotification->RemoveObserver();
         iNotification = NULL;
         iDevices.ResetAndDestroy();
         TRAP_IGNORE( {
@@ -243,8 +245,13 @@
     CBtDevExtension* devext = CBtDevExtension::NewLC( aAddr, aName );
     iDevices.AppendL( devext );
     CleanupStack::Pop( devext );
+    
+    if(iNotification)
+        {// conditional check required as CAdvanceDevDiscoverer sends discovered devices at times
+         // even after canceldiscovery is issued and notification is set to NULL
+         // this causes EExcDataAbort
     CHbSymbianVariantMap* map = iNotification->Data();
-    TBuf<8> keyStr;
+        TBuf<KMaxKeyDesCLength> keyStr;
     CHbSymbianVariant* devEntry;
 
     keyStr.Num( TBluetoothDialogParams::EDialogExt + iDevices.Count() - 1 );
@@ -252,6 +259,7 @@
             CHbSymbianVariant::EDes );
     map->Add( keyStr, devEntry );
     iNotification->Update();
+        }
     }
 
 // ---------------------------------------------------------------------------
@@ -262,10 +270,11 @@
     {
     (void) aErr;
     CHbSymbianVariantMap* map = iNotification->Data();
-    TBuf<25> keyStr;
+    TBuf<KMaxKeyDesCLength> keyStr;
     
 
     //TODO compile fail here we need to send the discovery completed text to the dialog 
+    //TODO change the hardcoded string
     keyStr.Copy(_L("Search Completed"));
     CHbSymbianVariant* devEntry( NULL );
     TRAP_IGNORE( devEntry = CHbSymbianVariant::NewL( (TAny*) &(keyStr), 
@@ -345,6 +354,11 @@
     TBTDialogResourceId aResourceId )
     {
     BOstraceFunctionEntry0( DUMMY_DEVLIST );
+    if(iNotification)
+        {
+        iNotification->RemoveObserver();
+        iNotification = NULL;
+        }
     iNotification = iServer.NotificationManager()->GetNotification();
     User::LeaveIfNull( iNotification ); // For OOM exception, leaves with KErrNoMemory
     iNotification->SetObserver( this );
@@ -367,7 +381,7 @@
             {
             iDevices.AppendL( devArray[i]->CopyL() );
             CHbSymbianVariantMap* map = iNotification->Data();
-            TBuf<8> keyStr;
+            TBuf<KMaxKeyDesCLength> keyStr;
             CHbSymbianVariant* devEntry;
 
             keyStr.Num( TBluetoothDialogParams::EDialogExt + iDevices.Count() - 1 );
--- a/bluetoothengine/btnotif/btnotifsrv/src/btnotificationmanager.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btnotif/btnotifsrv/src/btnotificationmanager.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -63,8 +63,10 @@
 //
 CBTNotificationManager::~CBTNotificationManager()
     {
+    BOstraceFunctionEntry0( DUMMY_DEVLIST );
     iNotificationQ.ResetAndDestroy();
     iNotificationQ.Close();
+    BOstraceFunctionExit0( DUMMY_DEVLIST );
     }
 
 
@@ -74,6 +76,7 @@
 //
 CBluetoothNotification* CBTNotificationManager::GetNotification()
     {
+    BOstraceFunctionEntry0( DUMMY_DEVLIST );
     CBluetoothNotification* notification = NULL;
     TRAP_IGNORE( notification = CBluetoothNotification::NewL( this ) );
     if( notification )
@@ -86,6 +89,7 @@
             notification = NULL;
             }
         }
+    BOstraceFunctionExit0( DUMMY_DEVLIST );
     return notification;
     }
 
@@ -96,17 +100,14 @@
 //
 void CBTNotificationManager::ReleaseNotification( CBluetoothNotification* aNotification )
     {
+    BOstraceFunctionEntry0( DUMMY_DEVLIST );
     __ASSERT_ALWAYS( aNotification, PanicServer( EBTNotifPanicBadArgument ) );
     TInt pos = iNotificationQ.Find( aNotification );
     __ASSERT_ALWAYS( pos > KErrNotFound, PanicServer( EBTNotifPanicMissing ) );
+    delete iNotificationQ[pos];
     iNotificationQ.Remove( pos );
-    // Just delete the notification.
-    delete aNotification;    
-    if(!iNotificationQ.Count() )
-        {
-        // the queue is empty, reset it.
-        iNotificationQ.Compress();
-        }
+    iNotificationQ.Compress();
+    BOstraceFunctionExit0( DUMMY_DEVLIST );
     }
 
 
@@ -118,10 +119,12 @@
         CBluetoothNotification* aNotification,
         TNotificationPriority aPriority )
     {
+    BOstraceFunctionEntry0( DUMMY_DEVLIST );
     (void) aPriority;
     TInt pos = iNotificationQ.Find( aNotification );
     __ASSERT_ALWAYS( pos > KErrNotFound, PanicServer( EBTNotifPanicMissing ) );
-    if( /*aPriority == EPriorityHigh &&*/ pos != 0 )
+    // Always move the newly added notification on top
+    if(pos != 0 )
         {
         CBluetoothNotification* notification = NULL;
         notification = iNotificationQ[pos];
@@ -129,6 +132,7 @@
         iNotificationQ.InsertL(notification,0);
         }
     ProcessNotificationQueueL();
+    BOstraceFunctionExit0( DUMMY_DEVLIST );
     }
 
 // ---------------------------------------------------------------------------
@@ -137,6 +141,7 @@
 //
 void CBTNotificationManager::ProcessNotificationQueueL()
     {
+    BOstraceFunctionEntry0( DUMMY_DEVLIST );
     if( iNotificationQ.Count() )
         {
         iNotificationQ[0]->ShowL();
@@ -146,5 +151,6 @@
         // No outstanding notifications
         iNotificationQ.Compress(); // the queue is empty, reset it.
         }
+    BOstraceFunctionExit0( DUMMY_DEVLIST );
     }
 
--- a/bluetoothengine/btnotif/btnotifsrv/src/btnotifincomingpairinghandler.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btnotif/btnotifsrv/src/btnotifincomingpairinghandler.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -16,9 +16,10 @@
 */
 
 #include "btnotifincomingpairinghandler.h"
-#include "btnotifpairingmanager.h"
+#include "btnotifsecuritymanager.h"
 #include "btnotifoutgoingpairinghandler.h"
 #include <btengconstants.h>
+#include "bluetoothtrace.h"
 
 const TInt KBTNotifWaitingForPairingOkDelay = 500000; // 0.5s
 
@@ -37,7 +38,7 @@
 // C++ default constructor
 // ---------------------------------------------------------------------------
 //
-CBTNotifIncomingPairingHandler::CBTNotifIncomingPairingHandler( CBTNotifPairingManager& aParent, 
+CBTNotifIncomingPairingHandler::CBTNotifIncomingPairingHandler( CBTNotifSecurityManager& aParent, 
     const TBTDevAddr& aAddr) : CBTNotifBasePairingHandler( aParent, aAddr )
     {
     }
@@ -48,22 +49,26 @@
 //
 void CBTNotifIncomingPairingHandler::ConstructL()
     {
+    BOstraceFunctionEntry0( DUMMY_DEVLIST );
     BaseConstructL();
     iActivePairingOk = CBtSimpleActive::NewL(*this, EWaitingForPairingOk );
     User::LeaveIfError( iPairingOkTimer.CreateLocal() );
+    BOstraceFunctionExit0( DUMMY_DEVLIST );
     }
 
 // ---------------------------------------------------------------------------
 // NewL
 // ---------------------------------------------------------------------------
 //
-CBTNotifBasePairingHandler* CBTNotifIncomingPairingHandler::NewL( CBTNotifPairingManager& aParent, 
+CBTNotifBasePairingHandler* CBTNotifIncomingPairingHandler::NewL( CBTNotifSecurityManager& aParent, 
     const TBTDevAddr& aAddr)
     {
+    BOstraceFunctionEntry0( DUMMY_DEVLIST );
     CBTNotifIncomingPairingHandler* self = new (ELeave) CBTNotifIncomingPairingHandler(aParent, aAddr);
     CleanupStack::PushL( self );
     self->ConstructL();
     CleanupStack::Pop( self );
+    BOstraceFunctionExit0( DUMMY_DEVLIST );
     return self;
     }
 
@@ -73,13 +78,13 @@
 //
 CBTNotifIncomingPairingHandler::~CBTNotifIncomingPairingHandler()
     {
-    // TRACE_FUNC_ENTRY
+    BOstraceFunctionEntry0( DUMMY_DEVLIST );
     // Cancel all outstanding requests
     CancelPlaNotification();
     iPla.Close();
     delete iActivePairingOk;
     iPairingOkTimer.Close();
-    // TRACE_FUNC_EXIT
+    BOstraceFunctionExit0( DUMMY_DEVLIST );
     }
 
 // ---------------------------------------------------------------------------
@@ -89,13 +94,15 @@
 //
 TInt CBTNotifIncomingPairingHandler::ObserveIncomingPair( const TBTDevAddr& aAddr )
     {
+    BOstraceFunctionEntry0( DUMMY_DEVLIST );
     TInt err( KErrServerBusy );
     if ( iAddr == aAddr )
         {
         err = KErrNone;
-        iUserAwarePairing = ETrue; // This function is called by a notifier, which means the UI has been involved
+        // This function is called by a notifier, which means the UI has been involved
         // Therefore we can display it in the paired devices list
-        if ( !iActive->IsActive() && !OpenPhysicalLinkAdaptor() )
+        iUserAwarePairing = ETrue; 
+         if ( !iActive->IsActive() && !OpenPhysicalLinkAdaptor() )
             {
             // If we are observing physical link, or showing user a note,
             // we won't interrupt it.
@@ -103,6 +110,7 @@
             MonitorPhysicalLink();
             }
         }
+    BOstraceFunctionExit0( DUMMY_DEVLIST );
     return err;
     }
 
@@ -112,12 +120,12 @@
 //
 void CBTNotifIncomingPairingHandler::HandleOutgoingPairL( const TBTDevAddr& aAddr, TUint aCod )
     {
-    // TRACE_FUNC_ENTRY
+    BOstraceFunctionEntry0( DUMMY_DEVLIST );
     // Outgoing pairing always takes highest priority:
     CBTNotifBasePairingHandler* pairinghandler = CBTNotifOutgoingPairingHandler::NewL( iParent, aAddr );
     pairinghandler->HandleOutgoingPairL( aAddr, aCod );
     iParent.RenewPairingHandler( pairinghandler );
-    // TRACE_FUNC_EXIT
+    BOstraceFunctionExit0( DUMMY_DEVLIST );
     }
 
 // ---------------------------------------------------------------------------
@@ -127,12 +135,12 @@
 //
 void CBTNotifIncomingPairingHandler::StopPairHandling( const TBTDevAddr& aAddr )
     {
+    BOstraceFunctionEntry0( DUMMY_DEVLIST );
     if ( aAddr == iAddr )
         {
-        // TRACE_FUNC_ENTRY
         iParent.RenewPairingHandler( NULL );
-        // TRACE_FUNC_EXIT
         }
+    BOstraceFunctionExit0( DUMMY_DEVLIST );
     }
 
 // ---------------------------------------------------------------------------
@@ -141,14 +149,15 @@
 //
 void CBTNotifIncomingPairingHandler::DoHandlePairServerResult( TInt aResult )
     {
+    BOstraceFunctionEntry0( DUMMY_DEVLIST );
     CancelPlaNotification();
     // For a successful pairing, we need wait for registry table change.
     if( aResult != KErrNone && aResult != KHCIErrorBase )
         {
         // Pair failure situation.
         SetPairResult( aResult );
-        // todo: show pairing failure note.
         }
+    BOstraceFunctionExit0( DUMMY_DEVLIST );
     }
 
 // ---------------------------------------------------------------------------
@@ -158,7 +167,7 @@
 //
 void CBTNotifIncomingPairingHandler::DoHandleRegistryNewPairedEvent( const TBTNamelessDevice& aDev )
     {
-    // TRACE_FUNC_ENTRY
+    BOstraceFunctionEntry0( DUMMY_DEVLIST );
     
     // First of all cancel the iPairingOkTimer timer, if active
     if (iActivePairingOk->IsActive())
@@ -176,7 +185,7 @@
 		// a service connection with phone. We won't take any action (e.g. remove 
 		// link key) in this case. As the result, this device can't be seen in our UI, 
 		// however other applications are still freely to use its services.
-		// TRACE_INFO(_L("[BTEng]: CBTEngIncPair: JW pairing with no IO device" ) )
+        BOstrace0(TRACE_DEBUG,DUMMY_DEVLIST,"[BTNotif]: JW pairing with no IO device");
 		TBTEngConnectionStatus status = iParent.ConnectStatus( aDev.Address() );
 		if ( status == EBTEngConnecting || status == EBTEngConnected )
 			{
@@ -184,14 +193,15 @@
 			// exception handling option:
 			(void) iParent.AddUiCookieJustWorksPaired( aDev );
 			}
+		TRAP_IGNORE(ShowPairingResultNoteL(KErrNone));
 		iParent.RenewPairingHandler( NULL );
 		}
     else if (aDev.LinkKeyType() == ELinkKeyUnauthenticatedUpgradable && !iUserAwarePairing)
 		{
 		// The linkkey has been created  by an incoming OBEX service request
 		// which resulted a pairing event received from pair server.
-		// TRACE_INFO(_L("[BTEng]: CBTEngIncPair: JW pairing with IO device" ) )
-		  iParent.RenewPairingHandler( NULL );
+        BOstrace0(TRACE_DEBUG,DUMMY_DEVLIST,"[BTNotif]: JW pairing with IO device");
+		iParent.RenewPairingHandler( NULL );
 		}
     else
 		{
@@ -200,13 +210,14 @@
 			// The user was involved in the pairing, so display in the paired devices list
 			(void) iParent.AddUiCookieJustWorksPaired(aDev);
 			}
-		// TRACE_INFO(_L("[BTEng]: CBTEngIncPair: Non-JW pairing"))
+		BOstrace0(TRACE_DEBUG,DUMMY_DEVLIST,"[BTNotif]: Non-JW pairing");
 		// Other pairing model than Just Works:
 		CancelPlaNotification();
 		SetPairResult( KErrNone );
+		TRAP_IGNORE(ShowPairingResultNoteL(KErrNone));
 		iParent.RenewPairingHandler( NULL );
 		}
-    // TRACE_FUNC_EXIT
+    BOstraceFunctionExit0( DUMMY_DEVLIST );
     }
 
 // ---------------------------------------------------------------------------
@@ -215,13 +226,13 @@
 //
 void CBTNotifIncomingPairingHandler::RequestCompletedL( CBtSimpleActive* aActive, TInt aStatus )
     {
-    // TRACE_FUNC_ARG( ( _L( "aId: %d, aStatus: %d"), aId, aStatus ) )
-        // Check which request completed.
+    BOstraceFunctionEntry0( DUMMY_DEVLIST );
+    // Check which request completed.
     switch( aActive->RequestId() )
         {
         case EPhysicalLinkNotify:
             {
-                // Check if the link has disconnected.
+            // Check if the link has disconnected.
             HandlePhysicalLinkResultL( aStatus );
             break;
             }
@@ -239,31 +250,35 @@
             break;
             } 
         default:
-                // Should not be possible, but no need for handling.
+            // Should not be possible, but no need for handling.
             break;
         }
-    // TRACE_FUNC_EXIT
+    BOstraceFunctionExit0( DUMMY_DEVLIST );
     }
 
 
 // ---------------------------------------------------------------------------
-// From class MBTEngActiveObserver.
+// From class MBTNotifPairingAOObserver.
 // cancels an outstanding request according to the given id.
 // ---------------------------------------------------------------------------
 //
 void CBTNotifIncomingPairingHandler::CancelRequest( TInt aRequestId )
     {
+    BOstraceFunctionEntry0( DUMMY_DEVLIST );
     switch ( aRequestId ) 
         {
         case EPhysicalLinkNotify:
             {
             iPla.CancelNextBasebandChangeEventNotifier();
+            break;
             }
         case EWaitingForPairingOk:
             {
             iPairingOkTimer.Cancel();
+            break;
             }
         }
+    BOstraceFunctionExit0( DUMMY_DEVLIST );
     }
 
 // ---------------------------------------------------------------------------
@@ -273,13 +288,14 @@
 //
 void CBTNotifIncomingPairingHandler::HandleError( CBtSimpleActive* aActive, TInt aError )
     {
-    // TRACE_FUNC_ARG( ( _L( "request id: %d, error: %d" ), aId, aError ) )
+    BOstraceFunctionEntry0( DUMMY_DEVLIST );
     (void) aActive;
     (void) aError;
-        // Our error handling is to just stop observing. 
-        // Nothing critical to be preserved here, the user 
-        // just won't get any notification of pairing result.
+    // Our error handling is to just stop observing. 
+    // Nothing critical to be preserved here, the user 
+    // just won't get any notification of pairing result.
     iParent.RenewPairingHandler( NULL );
+    BOstraceFunctionExit0( DUMMY_DEVLIST );
     }
 
 // ---------------------------------------------------------------------------
@@ -289,14 +305,14 @@
 //
 void CBTNotifIncomingPairingHandler::MonitorPhysicalLink()
     {
-    // TRACE_FUNC_ENTRY
+    BOstraceFunctionEntry0( DUMMY_DEVLIST );
     iActive->SetRequestId( EPhysicalLinkNotify );
-        // Subscribe to disconnect and error events.
+    // Subscribe to disconnect and error events.
     iPla.NotifyNextBasebandChangeEvent( iBbEvent, 
                             iActive->RequestStatus(), 
                             ENotifyPhysicalLinkDown | ENotifyPhysicalLinkError );
     iActive->GoActive();
-    // TRACE_FUNC_EXIT
+    BOstraceFunctionExit0( DUMMY_DEVLIST );
     }
 
 // ---------------------------------------------------------------------------
@@ -305,17 +321,18 @@
 //
 TInt CBTNotifIncomingPairingHandler::OpenPhysicalLinkAdaptor()
     {
-    // TRACE_FUNC_ENTRY
+    BOstraceFunctionEntry0( DUMMY_DEVLIST );
     TInt err ( KErrNone );
     if( !iPla.IsOpen() )
         {
-            // Try to open the adapter in case it failed earlier.
-            // This can happen for outgoing dedicated bonding with 
-            // non-SSP device, as the PIN dialog can be kept open even 
-            // though the link has dropped because of a time-out.
+        // Try to open the adapter in case it failed earlier.
+        // This can happen for outgoing dedicated bonding with 
+        // non-SSP device, as the PIN dialog can be kept open even 
+        // though the link has dropped because of a time-out.
         err = iPla.Open( iParent.SocketServ(), iAddr );
         }
-    // TRACE_INFO( (_L("[BTEng]: CBTEngIncPair::HasPhysicalLink ? %d"), iPla.IsOpen() ) )
+    BOstrace1(TRACE_DEBUG,DUMMY_DEVLIST,"[BTNotif]:HasPhysicalLink ? %d", iPla.IsOpen() );
+    BOstraceFunctionExit0( DUMMY_DEVLIST );
     return err;
     }
 
@@ -325,13 +342,13 @@
 //
 void CBTNotifIncomingPairingHandler::CancelPlaNotification()
     {
-    // TRACE_FUNC_ENTRY
+    BOstraceFunctionEntry0( DUMMY_DEVLIST );
     if( iActive && iActive->RequestId() == EPhysicalLinkNotify )
         {
         // cancel Baseband monitor
         iActive->Cancel();
         }
-    // TRACE_FUNC_EXIT
+    BOstraceFunctionExit0( DUMMY_DEVLIST );
     }
 
 // ---------------------------------------------------------------------------
@@ -340,9 +357,8 @@
 //
 void CBTNotifIncomingPairingHandler::HandlePhysicalLinkResultL( TInt aResult )
     {
-    // TRACE_FUNC_ARG( ( _L( " BBEvent 0x%08X, code %d"), 
-    //                        iBbEvent().EventType(), iBbEvent().SymbianErrorCode() ) )
-        // Check if the connection is still alive.
+    BOstraceFunctionEntry0( DUMMY_DEVLIST );
+    // Check if the connection is still alive.
     TBool physicalLinkDown = 
         ( iBbEvent().EventType() == ENotifyPhysicalLinkDown | ENotifyPhysicalLinkError );
 
@@ -361,7 +377,7 @@
         // Uninteresting event, re-subscribe.
         MonitorPhysicalLink();
         }
-    // TRACE_FUNC_EXIT
+    BOstraceFunctionExit0( DUMMY_DEVLIST );
     }
 
 
--- a/bluetoothengine/btnotif/btnotifsrv/src/btnotifoutgoingpairinghandler.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btnotif/btnotifsrv/src/btnotifoutgoingpairinghandler.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -18,7 +18,8 @@
 #include "btnotifoutgoingpairinghandler.h"
 #include <btengconstants.h>
 #include <btservices/btdevextension.h>
-#include "btnotifpairingmanager.h"
+#include "btnotifsecuritymanager.h"
+#include "bluetoothtrace.h"
 
 /**  Length of the default PIN. */
 const TInt KDefaultHeadsetPinLength = 4;
@@ -70,7 +71,7 @@
 // C++ default constructor
 // ---------------------------------------------------------------------------
 //
-CBTNotifOutgoingPairingHandler::CBTNotifOutgoingPairingHandler( CBTNotifPairingManager& aParent, const TBTDevAddr& aAddr)
+CBTNotifOutgoingPairingHandler::CBTNotifOutgoingPairingHandler( CBTNotifSecurityManager& aParent, const TBTDevAddr& aAddr)
     :  CBTNotifBasePairingHandler( aParent, aAddr )
     {
     }
@@ -89,7 +90,7 @@
 // NewL
 // ---------------------------------------------------------------------------
 //
-CBTNotifBasePairingHandler* CBTNotifOutgoingPairingHandler::NewL( CBTNotifPairingManager& aParent, 
+CBTNotifBasePairingHandler* CBTNotifOutgoingPairingHandler::NewL( CBTNotifSecurityManager& aParent, 
         const TBTDevAddr& aAddr )
     {
     CBTNotifOutgoingPairingHandler* self = new( ELeave ) CBTNotifOutgoingPairingHandler( aParent, aAddr );
@@ -129,7 +130,7 @@
 //
 void CBTNotifOutgoingPairingHandler::HandleOutgoingPairL( const TBTDevAddr& aAddr, TUint aCod )
     {
-    // TRACE_FUNC_ARG( ( _L(" cod 0x%08x"), aCod ) )
+    BOstrace1(TRACE_DEBUG,DUMMY_DEVLIST," cod 0x%08x", aCod );
     if ( iActive->IsActive() || aAddr != iAddr )
         {
         // we don't allow another pairing request.
@@ -149,7 +150,6 @@
         {
         iPairMode = EBTOutgoingNoneHeadsetPairing;
         }
-    // SetOutgoPairProperty( iOutgoProperty, iAddr, iPairMode );
     DoPairingL();
     }
 
@@ -159,6 +159,7 @@
 //
 void CBTNotifOutgoingPairingHandler::CancelOutgoingPair()
     {
+    BOstraceFunctionEntry0( DUMMY_DEVLIST );
     iParent.RenewPairingHandler( NULL );
     }
 
@@ -171,6 +172,7 @@
 void CBTNotifOutgoingPairingHandler::GetPinCode( 
         TBTPinCode& aPin, const TBTDevAddr& aAddr, TInt aMinPinLength )
     {
+    BOstraceFunctionEntry0( DUMMY_DEVLIST );
     aPin().iLength = 0;
     if ( aMinPinLength <= KDefaultHeadsetPinLength 
             && aAddr == iAddr
@@ -195,6 +197,7 @@
 //
 void CBTNotifOutgoingPairingHandler::StopPairHandling( const TBTDevAddr& aAddr )
     {
+    BOstraceFunctionEntry0( DUMMY_DEVLIST );
     if ( aAddr == iAddr )
         {
         iParent.OutgoingPairCompleted( KErrCancel );
@@ -208,6 +211,7 @@
 //
 void CBTNotifOutgoingPairingHandler::DoHandlePairServerResult( TInt aResult )
     {
+    BOstraceFunctionEntry0( DUMMY_DEVLIST );
 	if (aResult == (KHCIErrorBase-EPairingNotAllowed))
 		{
 		// if EPairingNotAllowed is recieved then any further pairing attempts will fail
@@ -223,6 +227,7 @@
 void CBTNotifOutgoingPairingHandler::DoHandleRegistryNewPairedEvent( 
         const TBTNamelessDevice& aDev )
     {
+    BOstraceFunctionEntry0( DUMMY_DEVLIST );
     TInt err( KErrNone );
     // If pairing was performed using Just Works mode, we set a 
     // UICookie to indicate that the device is successfully 
@@ -230,11 +235,14 @@
     // bluetooth application:
     if ( aDev.LinkKeyType() == ELinkKeyUnauthenticatedNonUpgradable )
         {
-        // TRACE_INFO( ( _L( "[BTENG] CBTEngOtgPair, Just Works pairing" ) ) );
+        BOstrace0(TRACE_DEBUG,DUMMY_DEVLIST,"[BTNOTIF] Outgoing Pairing, Just Works pairing");
         err = iParent.AddUiCookieJustWorksPaired( aDev );
         }
     iActive->Cancel();
     SetPairResult( err ? err : KErrNone );
+    if(err == KErrNone){
+    TRAP_IGNORE(ShowPairingResultNoteL(err));
+    }
     iParent.OutgoingPairCompleted( err );
     iParent.RenewPairingHandler( NULL );
     }
@@ -248,7 +256,8 @@
 void CBTNotifOutgoingPairingHandler::RequestCompletedL( 
         CBtSimpleActive* aActive, TInt aStatus )
     {
-    // TRACE_FUNC_ARG( ( _L( "reqid %d, status: %d, pair mode %d " ), aId, aStatus, iPairMode ) )
+    BOstraceFunctionEntry0( DUMMY_DEVLIST );
+    BOstraceExt3(TRACE_DEBUG,DUMMY_DEVLIST,"reqid %d, status: %d, pair mode %d ", aActive->RequestId(), aStatus, iPairMode);
     if( aActive->RequestId() == EDedicatedBonding && 
 				( aStatus == KErrRemoteDeviceIndicatedNoBonding || 
 					( aStatus && iPairMode != EBTOutgoingNoneHeadsetPairing && iPairMode != EBTOutgoingPairNone ) )   )
@@ -261,8 +270,7 @@
         {
         iPairMode = EBTOutgoingHeadsetManualPairing;
         // auto pairing with headset failed, try to pair again with manual pin:
-        // ( void ) SetOutgoPairProperty( iOutgoProperty, iAddr, iPairMode );
-        // TRACE_INFO( _L( " auto pairing failed, switch to manual pairing") );     
+        BOstrace0(TRACE_DEBUG,DUMMY_DEVLIST," auto pairing failed, switch to manual pairing");     
         DoPairingL();
         }
     else if ( aStatus && aActive->RequestId() == EGeneralBonding && 
@@ -288,7 +296,6 @@
             }
         if ( aStatus )
             {
-            // todo: show error note?
             iParent.OutgoingPairCompleted( aStatus );
             }
         }
@@ -301,21 +308,25 @@
 //
 void CBTNotifOutgoingPairingHandler::CancelRequest( TInt aRequestId )
     {
+    BOstraceFunctionEntry0( DUMMY_DEVLIST );
     switch ( aRequestId )
         {
         case EDedicatedBonding:
             {
             iBondingSession.Close();
+            break;
             }
         case EGeneralBonding:
         case EGeneralBondingRetry:
             {
             iSocket.CancelConnect();
             iSocket.Close();
+            break;
             }
         case EGeneralBondingRetryTimer:
             {
             iTimer.Cancel();
+            break;
             }     
         }
     }
@@ -328,7 +339,7 @@
 void CBTNotifOutgoingPairingHandler::HandleError( 
         CBtSimpleActive* aActive, TInt aError )
     {
-    // TRACE_FUNC_ARG( ( _L( "error: %d" ), aError ) )
+    BOstrace1(TRACE_DEBUG,DUMMY_DEVLIST,"error: %d", aError );
     // Our RunL can actually not leave, so we should never reach here.
     (void) aActive;
     iParent.OutgoingPairCompleted( aError );
@@ -341,7 +352,7 @@
 //
 void CBTNotifOutgoingPairingHandler::DoPairingL()
     {
-    // TRACE_FUNC_ENTRY
+    BOstraceFunctionEntry0( DUMMY_DEVLIST );
     TPairingStageId currentMode = ( TPairingStageId ) iActive->RequestId();
     ASSERT( !iActive->IsActive() );
     TPairingStageId nextMode( EGeneralBonding );
@@ -357,7 +368,7 @@
         nextMode = EGeneralBondingRetry;
         }
     
-    // TRACE_INFO( ( _L( "[BTENG] CBTEngOtgPair::DoPairingL: bonding mode: pre %d, next %d"), currentMode, nextMode ) );
+    BOstraceExt2(TRACE_DEBUG,DUMMY_DEVLIST,"[BTENG] CBTEngOtgPair::DoPairingL: bonding mode: pre %d, next %d", currentMode, nextMode);
     
     iActive->SetRequestId( nextMode );
     if ( nextMode == EDedicatedBonding )
@@ -376,6 +387,6 @@
         iSocket.Connect( iSockAddr, iActive->RequestStatus() );
         }
     iActive->GoActive();
-    // TRACE_FUNC_EXIT
+    BOstraceFunctionExit0( DUMMY_DEVLIST );
     }
 
--- a/bluetoothengine/btnotif/btnotifsrv/src/btnotifpairingmanager.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,809 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#include "btnotifpairingmanager.h"
-#include "btnotifoutgoingpairinghandler.h"
-#include "btnotifincomingpairinghandler.h"
-#include "btnotifpairnotifier.h"
-#include "btnotifclientserver.h"
-#include <e32property.h>
-#include "btnotifconnectiontracker.h"
-
-/**  Identification for active object */
-enum TPairManActiveRequestId
-    {
-    ESimplePairingResult,
-    EAuthenticationResult,
-    ERegistryGetLocalAddress,
-    };
-
-// ---------------------------------------------------------------------------
-// Tells if two TBTNamelessDevice instances are for the same remote device
-// ---------------------------------------------------------------------------
-//
-TBool CompareDeviceByAddress( const TBTNamelessDevice& aDevA, const TBTNamelessDevice& aDevB )
-    {
-    return aDevA.Address() == aDevB.Address();
-    }
-
-// ---------------------------------------------------------------------------
-// Tells if these two instances are for the same remote device
-// ---------------------------------------------------------------------------
-//
-TBool MatchDeviceAddress(const TBTDevAddr* aAddr, const TBTNamelessDevice& aDev)
-    {
-    return *aAddr == aDev.Address();
-    }
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// C++ default constructor
-// ---------------------------------------------------------------------------
-//
-CBTNotifPairingManager::CBTNotifPairingManager(
-        CBTNotifConnectionTracker& aParent,
-        CBtDevRepository& aDevRepository)
-    : iParent( aParent ), iDevRepository( aDevRepository )
-    {
-    }
-
-// ---------------------------------------------------------------------------
-// Symbian 2nd-phase constructor
-// ---------------------------------------------------------------------------
-//
-void CBTNotifPairingManager::ConstructL()
-    {
-    // Connect to pairing server for authentication & simple pairing 
-    // results directly from the BT stack.
-    // Pairing server doesn't exist if we run BT 2.0 stack:
-    iPairingServ = new (ELeave) RBluetoothPairingServer;
-    TInt err = iPairingServ->Connect();
-    if ( err)
-        {
-        delete iPairingServ;
-        iPairingServ = NULL;
-        }
-    else
-        {
-        User::LeaveIfError( iPairingResult.Open( *iPairingServ ) );
-        User::LeaveIfError( iAuthenResult.Open( *iPairingServ ) );
-        iSSPResultActive = CBtSimpleActive::NewL( *this, ESimplePairingResult );
-        iAuthenResultActive = CBtSimpleActive::NewL( *this, EAuthenticationResult );
-        SubscribeSspPairingResult();
-        SubscribeAuthenticateResult();
-        }
-    User::LeaveIfError( iRegistry.Open( iParent.RegistryServerSession() ) );
-    // RProperty for accessing the local device address
-    User::LeaveIfError( iPropertyLocalAddr.Attach(
-            KPropertyUidBluetoothCategory, KPropertyKeyBluetoothGetLocalDeviceAddress) );
-    // Initialise paired devices list
-    iLocalAddrActive = CBtSimpleActive::NewL( *this, ERegistryGetLocalAddress );
-    SubscribeLocalAddress();
-    iPairNotifier = CBTNotifPairNotifier::NewL( *this );
-    iDevRepository.AddObserverL( this );
-    }
-
-// ---------------------------------------------------------------------------
-// NewL
-// ---------------------------------------------------------------------------
-//
-CBTNotifPairingManager* CBTNotifPairingManager::NewL(
-        CBTNotifConnectionTracker& aParent,
-        CBtDevRepository& aDevRepository )
-    {
-    CBTNotifPairingManager* self = NULL;
-    self = new  CBTNotifPairingManager( aParent, aDevRepository );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-// Destructor
-// ---------------------------------------------------------------------------
-//
-CBTNotifPairingManager::~CBTNotifPairingManager()
-    {
-    delete iSSPResultActive;
-    delete iAuthenResultActive;
-    delete iPairNotifier;
-    delete iPairingHandler;
-    iPairedDevices.Close();
-    iPairingResult.Close();
-    iAuthenResult.Close();
-    if ( iPairingServ )
-        {
-        iPairingServ->Close();
-        delete iPairingServ;
-        }
-    iRegistry.Close();
-    delete iLocalAddrActive;
-    iPropertyLocalAddr.Close();
-    if ( !iMessage.IsNull() )
-        {
-        iMessage.Complete( KErrCancel );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Initialises the paired devices list.
-// If the local address is not available from the P&S key 
-// KPropertyKeyBluetoothGetLocalDeviceAddress, then the list may need to be 
-// updated once the H/W is switched on. This is so that any registry update 
-// from a restore operation can be included in the list, without mistaking the 
-// new devices for new pairings.
-// ---------------------------------------------------------------------------
-//
-void CBTNotifPairingManager::SubscribeLocalAddress()
-    {
-    // Check that we have the Bluetooth local address. If we don't then initialise anyway, but subscribe for an update.
-    // This allows us to refresh our paired devices list to include updates made to the remote devices table of the 
-    // Bluetooth registry from a restore operation. We need to include these devices without mistaking them for new 
-    // pairings. We look solely at the P&S key for the address to avoid the condition whereby the address has been
-    // entered into the reigstry but the Bluetooth Manager server has not begun the restore process yet. The signalling
-    // of the P&S key will cause Bluetooth Manager to update the registry with any restored devices before fulfilling
-    // any further requests.
-
-    // Subscribe to local address property in case we need an update.
-    iPropertyLocalAddr.Subscribe( iLocalAddrActive->iStatus );
-    iLocalAddrActive->SetRequestId( ERegistryGetLocalAddress );
-    iLocalAddrActive->GoActive();
-    }
-
-// ---------------------------------------------------------------------------
-// Tells whether the local address is available from the P&S key 
-// KPropertyKeyBluetoothGetLocalDeviceAddress.
-// ---------------------------------------------------------------------------
-//
-TBool CBTNotifPairingManager::IsLocalAddressAvailable()
-    {
-    // Attempt to read address from P&S key.
-    TBuf8<KBTDevAddrSize> btAddrDes;
-    TInt err = iPropertyLocalAddr.Get( btAddrDes );
-
-    // Is the P&S key defined yet? (if not, stack not up yet)
-    if ( err == KErrNone )
-        {
-        // P&S key defined, is local address set? (if not, H/W not initialised yet)
-        if ( btAddrDes.Length() == KBTDevAddrSize )
-            {
-            TBTDevAddr btAddr = btAddrDes;
-            if ( btAddr != TBTDevAddr() )
-                {
-                return ETrue;
-                }
-            }
-        }
-    return EFalse;
-    }
-
-// ---------------------------------------------------------------------------
-// Handles pairing related requests from BTNotif clients.
-// ---------------------------------------------------------------------------
-//
-void CBTNotifPairingManager::HandleBondingRequestL( const RMessage2& aMessage )
-    {
-    TInt opcode = aMessage.Function();
-    TBTDevAddrPckgBuf addrPkg;
-    switch( opcode )
-        {
-        case EBTNotifPairDevice:
-            {
-            if ( !iMessage.IsNull() )
-                {
-                User::Leave( KErrServerBusy );
-                }
-            TBTDevAddrPckgBuf addrPkg;
-            aMessage.ReadL( EBTNotifSrvParamSlot, addrPkg );
-            UnpairDevice( addrPkg() );
-            PairDeviceL( addrPkg(), aMessage.Int2() );
-            iMessage = RMessage2( aMessage );
-            break;
-            }
-        case EBTNotifCancelPairDevice:
-            {
-            // Only the client who requested pairing can cancel it:
-            if ( !iMessage.IsNull() && aMessage.Session() == iMessage.Session() )
-                {
-                iPairingHandler->CancelOutgoingPair();
-                iMessage.Complete( KErrCancel );
-                }
-            aMessage.Complete( KErrNone );
-            break;
-            }
-        default:
-            {
-            User::Leave( KErrArgument );
-            }
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Process a client message related to notifiers.
-// ---------------------------------------------------------------------------
-//
-void CBTNotifPairingManager::HandlePairingNotifierRequestL( const RMessage2& aMessage )
-    {
-    iPairNotifier->StartPairingNotifierL( aMessage );
-    BOstraceFunctionExit1( DUMMY_DEVLIST, this );
-    }
-
-// ---------------------------------------------------------------------------
-// Returns the RBluetoothPairingServer instance.
-// ---------------------------------------------------------------------------
-//
-RBluetoothPairingServer* CBTNotifPairingManager::PairingServer()
-    {
-    return iPairingServ;
-    }
-
-// ---------------------------------------------------------------------------
-// Access the reference of RSockServ
-// ---------------------------------------------------------------------------
-//
-RSocketServ& CBTNotifPairingManager::SocketServ()
-    {
-    return iParent.SocketServerSession();
-    }
-
-// ---------------------------------------------------------------------------
-// Access the reference of RBTRegSrv
-// ---------------------------------------------------------------------------
-//
-CBtDevRepository& CBTNotifPairingManager::BTDevRepository()
-    {
-    return iDevRepository;
-    }
-
-// ---------------------------------------------------------------------------
-// Access the reference of CBTNotifConnectionTracker
-// ---------------------------------------------------------------------------
-//
-CBTNotifConnectionTracker& CBTNotifPairingManager::ConnectionTracker()
-    {
-    return iParent;
-    }
-
-// ---------------------------------------------------------------------------
-// Deletes the current pairing handler and transfer the responsibility
-// to the specified.
-// ---------------------------------------------------------------------------
-//
-void CBTNotifPairingManager::RenewPairingHandler( 
-        CBTNotifBasePairingHandler* aPairingHandler )
-    {
-    delete iPairingHandler;
-    iPairingHandler = aPairingHandler;
-    }
-
-// ---------------------------------------------------------------------------
-// Find the session who requested this and completes its request.
-// ---------------------------------------------------------------------------
-//
-void CBTNotifPairingManager::OutgoingPairCompleted( TInt aErr )
-    {
-    // the meaning of KHCIErrorBase equals KErrNone. Hide this specific BT stack
-	// detail from clients:
-    if ( !iMessage.IsNull()  )
-        {
-        iMessage.Complete( (aErr == KHCIErrorBase) ? KErrNone : aErr );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// A session will be ended, completes the pending request for this session.
-// ---------------------------------------------------------------------------
-//
-void CBTNotifPairingManager::SessionClosed( CSession2* aSession )
-    {
-    // TRACE_FUNC_ARG( ( _L( " session %x"), aSession ) )
-    if ( !iMessage.IsNull() && iMessage.Session() == aSession )
-        {
-        iMessage.Complete( KErrCancel );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Unpair the device from registry
-// ---------------------------------------------------------------------------
-//
-void CBTNotifPairingManager::UnpairDevice( const TBTDevAddr& aAddr )
-    {
-    TIdentityRelation<TBTNamelessDevice> addrComp( CompareDeviceByAddress );
-    TBTNamelessDevice dev;
-    dev.SetAddress( aAddr );
-    // only do unpairing if the we have a link key with it.
-    TInt index = iPairedDevices.Find( dev, addrComp );
-    if ( index > KErrNotFound )
-        {
-        dev = iPairedDevices[index];
-        TRequestStatus status( KRequestPending );
-        // Unpair the device in registry (synchronously)
-        iRegistry.UnpairDevice( dev.Address(), status );
-        User::WaitForRequest( status );
-        // TRACE_INFO( ( _L( "Delete link key, res %d"), status.Int() ) )
-        if ( status == KErrNone )
-            {
-            TBTDeviceSecurity security = dev.GlobalSecurity();
-            // Clear trust setting so that correct icon will be shown in ui applications.
-            security.SetNoAuthenticate(EFalse );
-            security.SetNoAuthorise(EFalse );
-            dev.SetGlobalSecurity(security);
-            dev.DeleteLinkKey();
-            if ( dev.IsValidUiCookie() && 
-                 ( dev.UiCookie() & EBTUiCookieJustWorksPaired ) )
-                {
-                // Remove the UI cookie bit for Just Works pairing.
-                TInt32 cookie = dev.UiCookie() & ~EBTUiCookieJustWorksPaired;
-                dev.SetUiCookie( cookie );
-                // TRACE_INFO( ( _L( "UI cookie %x cleared"), EBTUiCookieJustWorksPaired ) );
-                }
-            // modify the device in registry synchronously
-            // status.Int() could be -1 if the device is not in registry 
-            // which is totally fine for us.
-            (void) UpdateRegDevice( dev );
-            }
-        }
-    }
-
-TInt CBTNotifPairingManager::AddUiCookieJustWorksPaired( const TBTNamelessDevice& aDev )
-    {
-    TInt err( KErrNone );
-    // There might be UI cookies used by other applications,
-    // we should not overwrite them. 
-    TInt32 cookie = aDev.IsValidUiCookie() ? aDev.UiCookie() : EBTUiCookieUndefined;
-    if ( !( cookie & EBTUiCookieJustWorksPaired ) )
-        {
-        // Only update the cookie if the wanted one is not in registry yet
-        // to keep minimal operations with registry.
-        TBTNamelessDevice dev = aDev;		
-        cookie |= EBTUiCookieJustWorksPaired;
-        dev.SetUiCookie( cookie );
-        err = UpdateRegDevice( dev );
-        // TRACE_INFO( ( _L( "[BTENG] CBTEngOtgPair write Ui cookie ret %d"), err ) );
-        }
-    return err;
-    }
-
-// ---------------------------------------------------------------------------
-// update a nameless device in registry
-// ---------------------------------------------------------------------------
-//
-TInt CBTNotifPairingManager::UpdateRegDevice( const TBTNamelessDevice& aDev )
-    {
-    TRequestStatus status( KRequestPending );
-    // update the device in registry synchronously
-    iRegistry.ModifyDevice( aDev, status );
-    User::WaitForRequest( status );
-    // TRACE_INFO( ( _L( "UpdateRegDevice, ret %d"), status.Int() ) )
-    return status.Int();
-    }
-
-// ---------------------------------------------------------------------------
-// 0000 for outgoing pairing with a headset.
-// The placeholder for future extension (pin code passed in for pairing)
-// ---------------------------------------------------------------------------
-//
-void CBTNotifPairingManager::GetPinCode(
-        TBTPinCode& aPin, const TBTDevAddr& aAddr, TInt aMinPinLength )
-    {
-    if ( iPairingHandler )
-        {
-        iPairingHandler->GetPinCode( aPin, aAddr, aMinPinLength );
-        }
-    else
-        {
-        // make sure not to leave any text as PIN.
-        aPin.Zero();
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Ask server class the connection status of the specified device
-// ---------------------------------------------------------------------------
-//
-TBTEngConnectionStatus CBTNotifPairingManager::ConnectStatus( const TBTDevAddr& aAddr )
-    {
-    const CBtDevExtension* devExt = iDevRepository.Device(aAddr);
-    TBTEngConnectionStatus status = EBTEngNotConnected;
-    if ( devExt ) 
-        {
-        status = devExt->ServiceConnectionStatus();
-        }
-    return status;
-    }
-
-// ---------------------------------------------------------------------------
-// From class MBTNotifPairingAOObserver.
-// Checks if there is an authentication result.
-// ---------------------------------------------------------------------------
-//
-void CBTNotifPairingManager::RequestCompletedL( CBtSimpleActive* aActive, TInt aStatus )
-    {
-    // TRACE_FUNC_ARG( ( _L( "aId: %d, aStatus: %d"), aId, aStatus ) )
-    // Check which request is completed.
-    switch( aActive->RequestId() )
-        {
-        case ESimplePairingResult:
-            {
-            TBTDevAddr tmpAddr = iSimplePairingRemote;
-            if (aStatus != KErrServerTerminated)
-                {
-                SubscribeSspPairingResult();
-                }
-            HandlePairingResultL( tmpAddr, aStatus );
-            break;
-            }
-        case EAuthenticationResult:
-            {
-            TBTDevAddr tmpAddr = iAuthenticateRemote;
-            if (aStatus != KErrServerTerminated)
-                {
-                SubscribeAuthenticateResult();
-                }
-            HandlePairingResultL( tmpAddr, aStatus );
-            break;
-            }
-        case ERegistryGetLocalAddress:
-            {
-            TBool value = IsLocalAddressAvailable();
-            SubscribeLocalAddress();
-            if ( value ) 
-                {
-                // Refresh paired devices list to include any restored devices.
-                iDevRepository.ReInitialize();
-                }
-            break;
-            }
-        default:
-            // Should not be possible, but no need for handling.
-            break;
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// From class MBTEngActiveObserver.
-// cancels an outstanding request according to the given id.
-// ---------------------------------------------------------------------------
-//
-void CBTNotifPairingManager::CancelRequest( TInt aRequestId )
-    {
-    switch ( aRequestId )
-        {
-        case ESimplePairingResult:
-            {
-            // Cancel listening Simple pairing result
-            iPairingResult.CancelSimplePairingResult();
-            break;
-            }
-        case EAuthenticationResult:
-            {
-            // Cancel listening authentication result
-            iAuthenResult.CancelAuthenticationResult();
-            break;
-            }
-        case ERegistryGetLocalAddress:
-            {
-            // cancel listening local address status change
-            iPropertyLocalAddr.Cancel();
-            break;
-            }
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// From class MBtSimpleActiveObserver.
-// ---------------------------------------------------------------------------
-//
-void CBTNotifPairingManager::HandleError( CBtSimpleActive* aActive, TInt aError )
-    {
-    // TRACE_FUNC_ARG( ( _L( "request id: %d, error: %d" ), aId, aError ) )
-    (void) aActive;
-    (void) aError;
-    }
-
-// ---------------------------------------------------------------------------
-// From class MBtDevRepositoryObserver.
-// ---------------------------------------------------------------------------
-//
-void CBTNotifPairingManager::RepositoryInitialized()
-    {
-    TRAPD(err, UpdatePairedDeviceListL() );
-    if ( !err && iPairingHandler )
-        {
-        // non-null pairing handler means we are involved in a
-        // pairing operation already.
-        // todo: is some handling for above case needed?
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// From class MBtDevRepositoryObserver.
-// ---------------------------------------------------------------------------
-//
-void CBTNotifPairingManager::DeletedFromRegistry( const TBTDevAddr& aAddr )
-    {
-    // We are only interested in the removal of a paired device.
-    // thus check whether it is in our local paired list:
-    TInt i = iPairedDevices.Find( aAddr, MatchDeviceAddress);
-    if ( i > KErrNotFound )
-        {
-        iPairedDevices.Remove( i );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// From class MBtDevRepositoryObserver.
-// ---------------------------------------------------------------------------
-//
-void CBTNotifPairingManager::AddedToRegistry( const CBtDevExtension& aDevice )
-    {
-    // We are only interested in paired device.
-    if ( CBtDevExtension::IsBonded( aDevice.Device().AsNamelessDevice() ) )
-        {
-        TRAP_IGNORE( 
-                HandleRegistryBondingL( aDevice.Device().AsNamelessDevice() ) );
-        }
-    }
-
-
-// ---------------------------------------------------------------------------
-// From class MBtDevRepositoryObserver.
-// ---------------------------------------------------------------------------
-//
-void CBTNotifPairingManager::ChangedInRegistry(
-        const CBtDevExtension& aDevice, TUint aSimilarity )
-    {
-    // We are only interested in paired device.
-    // thus check whether it is in our local paired list:
-    TInt i = iPairedDevices.Find( aDevice.Addr(), MatchDeviceAddress);
-    TBool bonded = CBtDevExtension::IsBonded( aDevice.Device().AsNamelessDevice() );
-    if ( i == KErrNotFound )
-        {
-        if ( bonded ) 
-            {
-            TRAP_IGNORE(
-                    HandleRegistryBondingL( 
-                            aDevice.Device().AsNamelessDevice() ) );                
-            }
-        return;
-        }
-    // Device was inregistry before, but we need to evaluate its bonding
-    // status.
-    // The given similarity will tell if the linkkey and paired is changed
-    // or not.
-    TInt pairingProperty = TBTNamelessDevice::EIsPaired 
-            | TBTNamelessDevice::ELinkKey;
-    if ( ( pairingProperty & aSimilarity) == pairingProperty )
-        {
-        // no pairing or linkkey change. Nothing to do for pairing handling.
-        // but we'd better update local copy just in case other data
-        // of this device is needed by someone:
-        iPairedDevices[i] = aDevice.Device().AsNamelessDevice();
-        return;
-        }
-    if ( !CBtDevExtension::IsBonded( aDevice.Device().AsNamelessDevice() ) )
-        {
-        // device is not user-bonded.
-        iPairedDevices.Remove( i );
-        return;
-        }
-    // it is a new paired device if its link-key has been upgraded
-    if ( aDevice.Device().LinkKeyType() != ELinkKeyUnauthenticatedUpgradable )
-        {
-        iPairedDevices.Remove( i );
-        TRAP_IGNORE(
-                HandleRegistryBondingL( 
-                        aDevice.Device().AsNamelessDevice() ) );                
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// From class MBtDevRepositoryObserver.
-// This class is not interested in such events.
-// ---------------------------------------------------------------------------
-//
-void CBTNotifPairingManager::ServiceConnectionChanged(
-        const CBtDevExtension& aDevice, TBool aConnected )
-    {
-    (void) aDevice;
-    (void) aConnected;
-    }
-
-// ---------------------------------------------------------------------------
-// Activate or deactivate a pairing handler
-// ---------------------------------------------------------------------------
-//
-TInt CBTNotifPairingManager::SetPairObserver(const TBTDevAddr& aAddr, TBool aActivate)
-    {
-    // TRACE_FUNC_ARG( ( _L( "%d" ), aActivate ) )
-    // TRACE_BDADDR( aAddr )
-    TInt err( KErrNone );
-    if ( !aActivate )
-        {
-        if ( iPairingHandler )
-            {
-            iPairingHandler->StopPairHandling( aAddr );
-            }
-        return err;
-        }
-    
-    if ( !iPairingHandler)
-        {
-        // This is an incoming pair, unpair it from registry and 
-        // create the handler:
-        UnpairDevice( aAddr );
-        TRAP( err, iPairingHandler = CBTNotifIncomingPairingHandler::NewL( *this, aAddr ));     
-        }
-    if ( iPairingHandler)
-        {
-        // let the handler decide what to do:
-        err = iPairingHandler->ObserveIncomingPair( aAddr );
-        }
-    return err;
-    }
-
-// ---------------------------------------------------------------------------
-// Delegates the request to current pair handler
-// ---------------------------------------------------------------------------
-//
-void CBTNotifPairingManager::PairDeviceL( const TBTDevAddr& aAddr, TUint32 aCod )
-    {
-    if ( !iPairingHandler)
-        {
-        // no existing pair handling, create one:
-        iPairingHandler = CBTNotifOutgoingPairingHandler::NewL( *this, aAddr );
-        }
-    // let pair handler decide what to do:
-    iPairingHandler->HandleOutgoingPairL( aAddr, aCod );
-    }
-
-// ---------------------------------------------------------------------------
-// cancel Subscribings to simple pairing result and authentication result from
-// Pairing Server
-// ---------------------------------------------------------------------------
-//
-void CBTNotifPairingManager::CancelSubscribePairingAuthenticate()
-    {
-    if( iSSPResultActive )
-        {
-        // Cancel listening Simple pairing result
-        iSSPResultActive->Cancel();
-        }
-    if( iAuthenResultActive )
-        {
-        iAuthenResultActive->Cancel();
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Subscribes to simple pairing result from Pairing Server (if not already 
-// subscribed).
-// ---------------------------------------------------------------------------
-//
-void CBTNotifPairingManager::SubscribeSspPairingResult()
-    {
-    if ( !iSSPResultActive->IsActive() )
-        {
-        iPairingResult.SimplePairingResult( iSimplePairingRemote, iSSPResultActive->RequestStatus() );
-        iSSPResultActive->GoActive();
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Subscribes to authentication result from Pairing Server (if not already
-// subscribed).
-// ---------------------------------------------------------------------------
-//
-void CBTNotifPairingManager::SubscribeAuthenticateResult()
-    {
-    if ( !iAuthenResultActive->IsActive() )
-        {
-        // Subscribe authentication result (which requires pairing for unpaired devices)
-        iAuthenResult.AuthenticationResult( iAuthenticateRemote, iAuthenResultActive->RequestStatus() );
-        iAuthenResultActive->GoActive();
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Handle a pairing result from the pairing server.
-// ---------------------------------------------------------------------------
-//
-void CBTNotifPairingManager::HandlePairingResultL( const TBTDevAddr& aAddr, TInt aResult )
-    {
-    // TRACE_FUNC_ARG( (_L("result %d"), aResult ) )
-    // TRACE_BDADDR( aAddr );
-    if ( !iPairingHandler && ( aResult == KErrNone || aResult == KHCIErrorBase ) )
-        {
-        // we only create new handler if incoming pairing succeeds.
-        // Pairing failure could be caused by user local cancellation, as the  
-        // result, the handler was destroyed by notifier. We shall not
-        // instantiate the handler again.
-        // If a pairing failed due to other reasons than user local cancelling,
-        // it will be catched by the already started handler 
-        // (except Just Works pairing - no handler for it at all until we receive
-        // registry change event. Thus if incoming JWs pairing failed, no user
-        // notification will be shown.)
-        iPairedDevices.Find( aAddr, MatchDeviceAddress);
-        TInt index = iPairedDevices.Find( aAddr, MatchDeviceAddress);
-        // If the device is not found in the old paired device list, it is a new
-        // paired device:
-        if ( index == KErrNotFound)
-            {
-            // No handler yet, create incoming pairing handler:
-            iPairingHandler = CBTNotifIncomingPairingHandler::NewL( *this, aAddr );
-            }
-        }
-    if ( iPairingHandler )
-        {
-        iPairingHandler->HandlePairServerResult( aAddr, aResult );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// copy the nameless devices to local array
-// ---------------------------------------------------------------------------
-//
-void CBTNotifPairingManager::UpdatePairedDeviceListL()
-    {
-    iPairedDevices.Reset();
-    const RDevExtensionArray& alldevs = iDevRepository.AllDevices();
-    for ( TInt i = 0; i < alldevs.Count(); i++ )
-        {
-        // TRACE_BDADDR( iPairedDevicesResp->Results()[i]->BDAddr() );
-        // TRACE_INFO((_L("[BTENG]\t linkkeytype %d"), 
-        //        iPairedDevicesResp->Results()[i]->LinkKeyType()))
-        if ( CBtDevExtension::IsBonded( alldevs[i]->Device().AsNamelessDevice() ) )
-            {
-            iPairedDevices.AppendL( alldevs[i]->Device().AsNamelessDevice() );
-            }
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Create incoming pairing handler if no one exists yet.
-// ---------------------------------------------------------------------------
-//
-void CBTNotifPairingManager::HandleRegistryBondingL(
-        const TBTNamelessDevice& aNameless)
-    {
-    TInt err = iPairedDevices.Append( aNameless );
-    if ( !err && !iPairingHandler)
-        {
-        // New paired device, but no pairing handler yet.
-        // this means an incoming pairing has occured:
-        TRAP( err, iPairingHandler = 
-                CBTNotifIncomingPairingHandler::NewL( *this, aNameless.Address() ) );
-        }
-    if ( !err )
-        {
-        // We have a pairing handler now.
-        // Ask pair handler to decide what to do:
-        iPairingHandler->HandleRegistryNewPairedEvent( 
-                aNameless );
-        }
-    else if ( iPairingHandler )
-        {
-        // error could occur due to no memory, 
-        // let us try aborting pairing handling
-        iPairingHandler->StopPairHandling( aNameless.Address() );
-        }
-    }
-
-
--- a/bluetoothengine/btnotif/btnotifsrv/src/btnotifpairnotifier.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btnotif/btnotifsrv/src/btnotifpairnotifier.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -22,7 +22,7 @@
 #include <btextnotifierspartner.h>
 #endif
 #include "btnotifconnectiontracker.h"
-#include "btnotifpairingmanager.h"
+#include "btnotifsecuritymanager.h"
 #include "btnotificationmanager.h"
 #include "bluetoothnotification.h"
 #include "btnotifserver.h"
@@ -42,7 +42,7 @@
 // ---------------------------------------------------------------------------
 //
 CBTNotifPairNotifier::CBTNotifPairNotifier(
-        CBTNotifPairingManager& aParent )
+        CBTNotifSecurityManager& aParent )
 :   iParent( aParent )
     {
     }
@@ -60,7 +60,7 @@
 // ---------------------------------------------------------------------------
 //
 CBTNotifPairNotifier* CBTNotifPairNotifier::NewL(
-        CBTNotifPairingManager& aParent )
+        CBTNotifSecurityManager& aParent )
     {
     BOstraceFunctionEntry0( DUMMY_DEVLIST );
     CBTNotifPairNotifier* self = new( ELeave ) CBTNotifPairNotifier( aParent );
@@ -102,23 +102,23 @@
     {
     BOstraceFunctionEntry0( DUMMY_DEVLIST );
     
-    // todo: move Authorize notifier to a separate class
     TInt uid = aMessage.Int0();
-    if ( KBTManAuthNotifierUid.iUid == uid )
+    TInt opCode = aMessage.Function();
+    BOstrace1(TRACE_DEBUG,DUMMY_DEVLIST,"[BTNotif]:Opcode: %d",opCode);
+    
+    if ( (!iNotifierMessage.IsNull()) && 
+         (opCode != EBTNotifCancelNotifier )&&(opCode != EBTNotifUpdateNotifier))
         {
-        TPckgBuf<TBool> answer;
-        answer() = ETrue;
-        TInt err = aMessage.Write( EBTNotifSrvReplySlot, answer);
-        aMessage.Complete( KErrNone );
-        return;
+        // todo: do we allow concurrent pairing?
+        BOstrace0(TRACE_DEBUG,DUMMY_DEVLIST,"[BTNotif]:We are busy");
+        User::Leave(KErrServerBusy );
         }
     
-    //BOstraceFunctionEntryExt( DUMMY_DEVLIST, this, aUid );
-    if ( !iNotifierMessage.IsNull() )
-        {
-        // todo: do we allow concurrent pairing?
-        User::Leave(KErrServerBusy );
-        }
+    if(opCode == EBTNotifCancelNotifier){
+        CancelPairingNotifierL(uid);
+        aMessage.Complete(KErrNone);
+        return;
+    }
     
     // Store the parameters locally, we need them later again.
     iParams.CreateL( aMessage.GetDesLengthL( EBTNotifSrvParamSlot ) );
@@ -127,6 +127,12 @@
     
     // Read the notifier parameters
     ParseNotifierReqParamsL();
+
+    if(opCode ==EBTNotifUpdateNotifier ){
+        UpdatePairingNotifierL(uid,iParams);
+        aMessage.Complete(KErrNone);
+        return;
+    }
     
     const CBtDevExtension* dev = iParent.BTDevRepository().Device(iRemote);
     if(dev)
@@ -134,13 +140,16 @@
         if (!iLocallyInitiated && dev->Device().GlobalSecurity().Banned() )
             {
             // If the device is banned and pairing is not locally initiated
-            // then we ignore.
-            aMessage.Complete( KErrNone );
+            // then we reject.
+            BOstrace0(TRACE_DEBUG,DUMMY_DEVLIST,"[BTNotif]:Device is banned");
+            iNotifierMessage.Complete( KErrCancel );
+            return;
             }
         if (iLocallyInitiated && dev->Device().GlobalSecurity().Banned())
             {
             // Remove the banned device from the blocking history
             iParent.ConnectionTracker().UpdateBlockingHistoryL(&dev->Device(),ETrue);
+            iParent.BlockDevice(dev->Addr(),EFalse);
             }
         if(0 != dev->Device().FriendlyName().Length()&& dev->Device().IsValidFriendlyName())
             {
@@ -168,6 +177,7 @@
     // If this is an incoming pairing, we first ask the user to accept it.
     if( !iLocallyInitiated  )
         {
+        User::LeaveIfError(iParent.SetPairObserver(iRemote,ETrue));
         StartAcceptPairingQueryL();
         }
     else
@@ -304,8 +314,22 @@
 void CBTNotifPairNotifier::MBRDataReceived( CHbSymbianVariantMap& aData )
     {
     BOstraceFunctionEntry0( DUMMY_DEVLIST );
-    (void) aData;
-    NOTIF_NOTIMPL
+    if(aData.Keys().MdcaPoint(0).Compare(_L("actionResult")) == 0)
+        {
+        TInt val = *(static_cast<TInt*>(aData.Get(_L("actionResult"))->Data()));
+        if(val)
+            {
+                iAcceptPairingResult = ETrue;
+            }
+        else
+            {
+                iAcceptPairingResult = EFalse;
+            }
+        }
+    else if(aData.Keys().MdcaPoint(0).Compare(_L("checkBoxState")) == 0)
+        {
+        iCheckBoxState = *(static_cast<TInt*>(aData.Get(_L("checkBoxState"))->Data()));
+        }
     BOstraceFunctionExit0( DUMMY_DEVLIST );
     }
 
@@ -318,10 +342,9 @@
     {
     BOstraceFunctionEntryExt( DUMMY_DEVLIST, this, aError );
     // First unregister from the notification, so we can already get the next one.
-    //iNotification->RemoveObserver();
-    //iNotification = NULL;
+    iNotification->RemoveObserver();
+    iNotification = NULL;
     TRAP_IGNORE( NotificationClosedL( aError, aData ) );
-    iNotification = NULL;
     BOstraceFunctionExit1( DUMMY_DEVLIST, this );
     }
 
@@ -354,13 +377,17 @@
     TPtrC8 resultData(KNullDesC8);
     TBTPinCode pinCode;
     TPckgBuf<TBool> userAcceptance;
+    TInt uid = iNotifierMessage.Int0();
+ 
     if( !err )
         {
-        TInt uid = iNotifierMessage.Int0();
         // The returned data is the entered passkey.
-        // const CBtDevExtension* dev = iParent.BTDevRepository().Device(iRemote);
-        // TBool proceed = iParent.ConnectionTracker().UpdateBlockingHistoryL(&dev->Device(),aResult);
-        if( uid == KBTNumericComparisonNotifierUid.iUid )
+        const CBtDevExtension* dev = iParent.BTDevRepository().Device(iRemote);
+        if(dev)
+            {
+            iParent.ConnectionTracker().UpdateBlockingHistoryL(&dev->Device(),aResult);
+            }
+         if( uid == KBTNumericComparisonNotifierUid.iUid )
             {
             // Numeric comparison needs the boolean result passed back.
             userAcceptance() = aResult;
@@ -374,12 +401,18 @@
                 // Check the passkey entered by the user.
                 // The length of the returned data equals the number of characters
                 // entered by the user.
-                pinCode().iLength = aData.Length();
+                // Check that the passkey length do not exceed the maximum allowed size
+                TInt pinCodeLength = aData.Length();
+                if(pinCodeLength > KHCIPINCodeSize)
+                    {
+                        pinCodeLength = KHCIPINCodeSize;
+                    }
+                pinCode().iLength = pinCodeLength;
                 // Check that the length of the passkey meets the minimum 
                 // required pin code length
-                if( aData.Length() >= iMinPinLength )
+                if( pinCodeLength >= iMinPinLength )
                     {
-                    for( TInt i = 0; i < aData.Length(); i++ )
+                    for( TInt i = 0; i < pinCodeLength; i++ )
                         {
                         pinCode().iPIN[i] = aData[i];
                         }
@@ -387,7 +420,7 @@
                     }
                 else
                     {
-                    // todo: PIN wasn't long enough. This should be handled by the dialog though.
+                    // shouldn't happen since the length is checked in the dialog
                     err = KErrCompletion;
                     }
                 }
@@ -395,21 +428,6 @@
         else
             {
             err = KErrCancel;
-            if( iLocallyInitiated )
-                {
-                // The user denied the connection, ask to block the device.
-                // This is only for pairing (and not bonding) initiated by us,
-                // as the user already gets the opportunity to block when
-                // rejecting an incoming pairing request.
-                // This case may be for someone requesting to access a service
-                // which requires authentication by us, but not by the remote device.
-                // if(proceed)
-                //    {
-                //    LaunchBlockingQueryL();
-                //    }
-                // For incoming pairing, blocking is asked after rejecting the 
-                // pairing request. This is done in CompleteAcceptPairingQueryL
-                }
             }
         }
     // Complete the message with the result, and result data if any.
@@ -417,6 +435,14 @@
         {
         err = iNotifierMessage.Write( EBTNotifSrvReplySlot, resultData );
         }
+    if(err && (uid == KBTNumericComparisonNotifierUid.iUid))
+        {
+        // We need to reject the numeric comparaison otherwise
+        // the link will remain active
+        userAcceptance() = aResult;
+        resultData.Set( userAcceptance );
+        err = iNotifierMessage.Write( EBTNotifSrvReplySlot, resultData );
+        }
     iNotifierMessage.Complete( err );
     BOstraceFunctionExit1( DUMMY_DEVLIST, this );
     }
@@ -428,7 +454,7 @@
 void CBTNotifPairNotifier::StartAcceptPairingQueryL()
     {
     BOstraceFunctionEntry0( DUMMY_DEVLIST );
-    PrepareNotificationL( TBluetoothDialogParams::EQuery, EIncomingPairing );
+    PrepareNotificationL( TBluetoothDialogParams::EUserAuthorization, EAuthorization );
     iState = EIncomingPairingAcceptconfirm;
     // if rejected, the client message is completed in CompleteAcceptPairingQueryL
     BOstraceFunctionExit0( DUMMY_DEVLIST );
@@ -438,32 +464,37 @@
 // The user was asked to accept an incoming pairing. Process and proceed. 
 // ---------------------------------------------------------------------------
 //
-void CBTNotifPairNotifier::CompleteAcceptPairingQueryL( TInt aError, TBool aResult )
+void CBTNotifPairNotifier::CompleteAcceptPairingQueryL( TInt aError)
     {
     BOstraceFunctionEntry0( DUMMY_DEVLIST );
     TInt err = aError;
+    TBool proceed = EFalse;
+    
     if( !err )
         {
-        // const CBtDevExtension* dev = iParent.BTDevRepository().Device(iRemote);
-        // TBool proceed = iParent.ConnectionTracker().UpdateBlockingHistoryL(&dev->Device(),aResult);
-        if( aResult )
+        const CBtDevExtension* dev = iParent.BTDevRepository().Device(iRemote);
+        if(dev)
+            {
+            proceed = iParent.ConnectionTracker().UpdateBlockingHistoryL(&dev->Device(),iAcceptPairingResult);
+            }
+        if( iAcceptPairingResult )
             {
             // User accepted, continue to show pairing query.
+            // Trust the device
+            if(iCheckBoxState){
+            iParent.TrustDevice(iRemote);
+            }
             StartPairingUserInputL();
-            if( iDialogNumeric.Length() )
-                {
-                err = iNotification->SetData( 
-                TBluetoothDeviceDialog::EAdditionalDesc, iDialogNumeric );
-                }            
-             }
+            }
         else
             {
-            err = KErrCancel;
-            // if( proceed )
-            //    {
-            //    //ask to block the device.
-            //    LaunchBlockingQueryL();
-            //    }
+            if( proceed && iCheckBoxState )
+                {
+                //ask to block the device.
+                iParent.BlockDevice(iRemote,proceed);
+                }
+            err = iParent.SetPairObserver(iRemote,EFalse);
+            err = KErrCancel; // We need to complete the pairing request here
             }
         }
     if( err )
@@ -571,6 +602,7 @@
     TBTNumericComparisonParams::TComparisonScenario scenario =
                 paramsPckg().ComparisonScenario();
     aNumVal.Format( KNumCompFormat, paramsPckg().NumericalValue() );
+    aNumVal.Insert(3,_L(" "));
     aAddr = paramsPckg().DeviceAddress();
     iCurrentDeviceName = paramsPckg().DeviceName();
     BOstraceFunctionExit0( DUMMY_DEVLIST );
@@ -624,6 +656,14 @@
         }
     err = iNotification->SetData( (TInt) TBluetoothDeviceDialog::EDeviceClass, 
                 classofdevice );
+    if( iDialogNumeric.Length() )
+        {
+        err = iNotification->SetData( 
+        TBluetoothDeviceDialog::EAdditionalDesc, iDialogNumeric );
+        }
+    err = iNotification->SetData( TBluetoothDialogParams::EDialogTitle, TBluetoothDialogParams::EPairingRequest);
+    iCheckBoxState = ETrue;
+    iAcceptPairingResult = EFalse;
     iParent.ConnectionTracker().NotificationManager()->QueueNotificationL( iNotification);
     NOTIF_NOTHANDLED( !err )
     BOstraceFunctionExit0( DUMMY_DEVLIST );
@@ -641,9 +681,10 @@
     result.Set( aData.Ptr(), result.Length() ); // Read the part containing the result
     // Set a pointer descriptor to capture the remaining data, if any.
     TPtrC8 dataPtr( aData.Mid( result.Length() ) );
+
     if ( iState == EIncomingPairingAcceptconfirm )
         {
-        CompleteAcceptPairingQueryL(aError, result());
+        CompleteAcceptPairingQueryL(aError);
         }
     else
         {
@@ -652,25 +693,6 @@
     BOstraceFunctionExit1( DUMMY_DEVLIST, this );
     }
 
-// ---------------------------------------------------------------------------
-// Ask the user if he/she wants to block future connection requests. 
-// ---------------------------------------------------------------------------
-//
-void CBTNotifPairNotifier::LaunchBlockingQueryL()
-    {
-    BOstraceFunctionEntry0( DUMMY_DEVLIST );
-    TBTDialogResourceId resourceId = EBlockUnpairedDevice;
-    const CBtDevExtension* dev = iParent.BTDevRepository().Device(iRemote);
-    if(dev->Device().IsValidPaired() && dev->Device().IsPaired() &&
-            dev->Device().LinkKeyType() != ELinkKeyUnauthenticatedUpgradable )
-        {
-        resourceId = EBlockPairedDevice;
-        }
-    PrepareNotificationL( TBluetoothDialogParams::EQuery, resourceId );
-    BOstraceFunctionExit0( DUMMY_DEVLIST );
-    }
 
 
 
-
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/btnotif/btnotifsrv/src/btnotifsecuritymanager.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,859 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include "btnotifsecuritymanager.h"
+#include "btnotifoutgoingpairinghandler.h"
+#include "btnotifincomingpairinghandler.h"
+#include "btnotifpairnotifier.h"
+#include "btnotifclientserver.h"
+#include <e32property.h>
+#include "btnotifconnectiontracker.h"
+#include "btnotifserviceauthorizer.h"
+
+/**  Identification for active object */
+enum TPairManActiveRequestId
+    {
+    ESimplePairingResult,
+    EAuthenticationResult,
+    ERegistryGetLocalAddress,
+    };
+
+// ---------------------------------------------------------------------------
+// Tells if two TBTNamelessDevice instances are for the same remote device
+// ---------------------------------------------------------------------------
+//
+TBool CompareDeviceByAddress( const TBTNamelessDevice& aDevA, const TBTNamelessDevice& aDevB )
+    {
+    return aDevA.Address() == aDevB.Address();
+    }
+
+// ---------------------------------------------------------------------------
+// Tells if these two instances are for the same remote device
+// ---------------------------------------------------------------------------
+//
+TBool MatchDeviceAddress(const TBTDevAddr* aAddr, const TBTNamelessDevice& aDev)
+    {
+    return *aAddr == aDev.Address();
+    }
+
+// ======== MEMBER FUNCTIONS ========
+
+// ---------------------------------------------------------------------------
+// C++ default constructor
+// ---------------------------------------------------------------------------
+//
+CBTNotifSecurityManager::CBTNotifSecurityManager(
+        CBTNotifConnectionTracker& aParent,
+        CBtDevRepository& aDevRepository)
+    : iParent( aParent ), iDevRepository( aDevRepository )
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// Symbian 2nd-phase constructor
+// ---------------------------------------------------------------------------
+//
+void CBTNotifSecurityManager::ConstructL()
+    {
+    // Connect to pairing server for authentication & simple pairing 
+    // results directly from the BT stack.
+    // Pairing server doesn't exist if we run BT 2.0 stack:
+    iPairingServ = new (ELeave) RBluetoothPairingServer;
+    TInt err = iPairingServ->Connect();
+    if ( err)
+        {
+        delete iPairingServ;
+        iPairingServ = NULL;
+        }
+    else
+        {
+        User::LeaveIfError( iPairingResult.Open( *iPairingServ ) );
+        User::LeaveIfError( iAuthenResult.Open( *iPairingServ ) );
+        iSSPResultActive = CBtSimpleActive::NewL( *this, ESimplePairingResult );
+        iAuthenResultActive = CBtSimpleActive::NewL( *this, EAuthenticationResult );
+        SubscribeSspPairingResult();
+        SubscribeAuthenticateResult();
+        }
+    User::LeaveIfError( iRegistry.Open( iParent.RegistryServerSession() ) );
+    // RProperty for accessing the local device address
+    User::LeaveIfError( iPropertyLocalAddr.Attach(
+            KPropertyUidBluetoothCategory, KPropertyKeyBluetoothGetLocalDeviceAddress) );
+    // Initialise paired devices list
+    iLocalAddrActive = CBtSimpleActive::NewL( *this, ERegistryGetLocalAddress );
+    SubscribeLocalAddress();
+    iPairNotifier = CBTNotifPairNotifier::NewL( *this );
+    iDevRepository.AddObserverL( this );
+    iServiceAuthorizer = CBTNotifServiceAuthorizer::NewL(*this);
+    }
+
+// ---------------------------------------------------------------------------
+// NewL
+// ---------------------------------------------------------------------------
+//
+CBTNotifSecurityManager* CBTNotifSecurityManager::NewL(
+        CBTNotifConnectionTracker& aParent,
+        CBtDevRepository& aDevRepository )
+    {
+    CBTNotifSecurityManager* self = NULL;
+    self = new  CBTNotifSecurityManager( aParent, aDevRepository );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// Destructor
+// ---------------------------------------------------------------------------
+//
+CBTNotifSecurityManager::~CBTNotifSecurityManager()
+    {
+    delete iSSPResultActive;
+    delete iAuthenResultActive;
+    delete iPairNotifier;
+    delete iPairingHandler;
+    iPairedDevices.Close();
+    iPairingResult.Close();
+    iAuthenResult.Close();
+    if ( iPairingServ )
+        {
+        iPairingServ->Close();
+        delete iPairingServ;
+        }
+    iRegistry.Close();
+    delete iLocalAddrActive;
+    iPropertyLocalAddr.Close();
+    if ( !iMessage.IsNull() )
+        {
+        iMessage.Complete( KErrCancel );
+        }
+    delete iServiceAuthorizer;
+    }
+
+// ---------------------------------------------------------------------------
+// Initialises the paired devices list.
+// If the local address is not available from the P&S key 
+// KPropertyKeyBluetoothGetLocalDeviceAddress, then the list may need to be 
+// updated once the H/W is switched on. This is so that any registry update 
+// from a restore operation can be included in the list, without mistaking the 
+// new devices for new pairings.
+// ---------------------------------------------------------------------------
+//
+void CBTNotifSecurityManager::SubscribeLocalAddress()
+    {
+    // Check that we have the Bluetooth local address. If we don't then initialise anyway, but subscribe for an update.
+    // This allows us to refresh our paired devices list to include updates made to the remote devices table of the 
+    // Bluetooth registry from a restore operation. We need to include these devices without mistaking them for new 
+    // pairings. We look solely at the P&S key for the address to avoid the condition whereby the address has been
+    // entered into the reigstry but the Bluetooth Manager server has not begun the restore process yet. The signalling
+    // of the P&S key will cause Bluetooth Manager to update the registry with any restored devices before fulfilling
+    // any further requests.
+
+    // Subscribe to local address property in case we need an update.
+    iPropertyLocalAddr.Subscribe( iLocalAddrActive->iStatus );
+    iLocalAddrActive->SetRequestId( ERegistryGetLocalAddress );
+    iLocalAddrActive->GoActive();
+    }
+
+// ---------------------------------------------------------------------------
+// Tells whether the local address is available from the P&S key 
+// KPropertyKeyBluetoothGetLocalDeviceAddress.
+// ---------------------------------------------------------------------------
+//
+TBool CBTNotifSecurityManager::IsLocalAddressAvailable()
+    {
+    // Attempt to read address from P&S key.
+    TBuf8<KBTDevAddrSize> btAddrDes;
+    TInt err = iPropertyLocalAddr.Get( btAddrDes );
+
+    // Is the P&S key defined yet? (if not, stack not up yet)
+    if ( err == KErrNone )
+        {
+        // P&S key defined, is local address set? (if not, H/W not initialised yet)
+        if ( btAddrDes.Length() == KBTDevAddrSize )
+            {
+            TBTDevAddr btAddr = btAddrDes;
+            if ( btAddr != TBTDevAddr() )
+                {
+                return ETrue;
+                }
+            }
+        }
+    return EFalse;
+    }
+
+// ---------------------------------------------------------------------------
+// Handles pairing related requests from BTNotif clients.
+// ---------------------------------------------------------------------------
+//
+void CBTNotifSecurityManager::HandleBondingRequestL( const RMessage2& aMessage )
+    {
+    TInt opcode = aMessage.Function();
+    TBTDevAddrPckgBuf addrPkg;
+    switch( opcode )
+        {
+        case EBTNotifPairDevice:
+            {
+            if ( !iMessage.IsNull() )
+                {
+                User::Leave( KErrServerBusy );
+                }
+            TBTDevAddrPckgBuf addrPkg;
+            aMessage.ReadL( EBTNotifSrvParamSlot, addrPkg );
+            BlockDevice(addrPkg(),EFalse);
+            UnpairDevice( addrPkg() );
+            PairDeviceL( addrPkg(), aMessage.Int2() );
+            iMessage = RMessage2( aMessage );
+            break;
+            }
+        case EBTNotifCancelPairDevice:
+            {
+            // Only the client who requested pairing can cancel it:
+            if ( !iMessage.IsNull() && aMessage.Session() == iMessage.Session() )
+                {
+                iPairingHandler->CancelOutgoingPair();
+                iMessage.Complete( KErrCancel );
+                }
+            aMessage.Complete( KErrNone );
+            break;
+            }
+        default:
+            {
+            User::Leave( KErrArgument );
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// Process a client message related to notifiers.
+// ---------------------------------------------------------------------------
+//
+void CBTNotifSecurityManager::HandleNotifierRequestL( const RMessage2& aMessage )
+    {
+    if(aMessage.Int0() == KBTManAuthNotifierUid.iUid)
+        {
+        iServiceAuthorizer->StartNotifierL( aMessage );
+        }
+    else
+        {
+        iPairNotifier->StartPairingNotifierL( aMessage );
+        }
+    
+    BOstraceFunctionExit0( DUMMY_DEVLIST);
+    }
+
+// ---------------------------------------------------------------------------
+// Returns the RBluetoothPairingServer instance.
+// ---------------------------------------------------------------------------
+//
+RBluetoothPairingServer* CBTNotifSecurityManager::PairingServer()
+    {
+    return iPairingServ;
+    }
+
+// ---------------------------------------------------------------------------
+// Access the reference of RSockServ
+// ---------------------------------------------------------------------------
+//
+RSocketServ& CBTNotifSecurityManager::SocketServ()
+    {
+    return iParent.SocketServerSession();
+    }
+
+// ---------------------------------------------------------------------------
+// Access the reference of RBTRegSrv
+// ---------------------------------------------------------------------------
+//
+CBtDevRepository& CBTNotifSecurityManager::BTDevRepository()
+    {
+    return iDevRepository;
+    }
+
+// ---------------------------------------------------------------------------
+// Access the reference of CBTNotifConnectionTracker
+// ---------------------------------------------------------------------------
+//
+CBTNotifConnectionTracker& CBTNotifSecurityManager::ConnectionTracker()
+    {
+    return iParent;
+    }
+
+// ---------------------------------------------------------------------------
+// Deletes the current pairing handler and transfer the responsibility
+// to the specified.
+// ---------------------------------------------------------------------------
+//
+void CBTNotifSecurityManager::RenewPairingHandler( 
+        CBTNotifBasePairingHandler* aPairingHandler )
+    {
+    delete iPairingHandler;
+    iPairingHandler = aPairingHandler;
+    }
+
+// ---------------------------------------------------------------------------
+// Find the session who requested this and completes its request.
+// ---------------------------------------------------------------------------
+//
+void CBTNotifSecurityManager::OutgoingPairCompleted( TInt aErr )
+    {
+    // the meaning of KHCIErrorBase equals KErrNone. Hide this specific BT stack
+	// detail from clients:
+    if ( !iMessage.IsNull()  )
+        {
+        iMessage.Complete( (aErr == KHCIErrorBase) ? KErrNone : aErr );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// A session will be ended, completes the pending request for this session.
+// ---------------------------------------------------------------------------
+//
+void CBTNotifSecurityManager::SessionClosed( CSession2* aSession )
+    {
+    BOstrace1(TRACE_DEBUG,DUMMY_DEVLIST," session %x", aSession);
+    if ( !iMessage.IsNull() && iMessage.Session() == aSession )
+        {
+        iMessage.Complete( KErrCancel );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// Unpair the device from registry
+// ---------------------------------------------------------------------------
+//
+void CBTNotifSecurityManager::UnpairDevice( const TBTDevAddr& aAddr )
+    {
+    TIdentityRelation<TBTNamelessDevice> addrComp( CompareDeviceByAddress );
+    TBTNamelessDevice dev;
+    dev.SetAddress( aAddr );
+    // only do unpairing if the we have a link key with it.
+    TInt index = iPairedDevices.Find( dev, addrComp );
+    if ( index > KErrNotFound )
+        {
+        dev = iPairedDevices[index];
+        TRequestStatus status( KRequestPending );
+        // Unpair the device in registry (synchronously)
+        iRegistry.UnpairDevice( dev.Address(), status );
+        User::WaitForRequest( status );
+        BOstrace1(TRACE_DEBUG,DUMMY_DEVLIST,"Delete link key, res %d", status.Int());
+        if ( status == KErrNone )
+            {
+            TBTDeviceSecurity security = dev.GlobalSecurity();
+            // Clear trust setting so that correct icon will be shown in ui applications.
+            security.SetNoAuthenticate(EFalse );
+            security.SetNoAuthorise(EFalse );
+            dev.SetGlobalSecurity(security);
+            dev.DeleteLinkKey();
+            if ( dev.IsValidUiCookie() && 
+                 ( dev.UiCookie() & EBTUiCookieJustWorksPaired ) )
+                {
+                // Remove the UI cookie bit for Just Works pairing.
+                TInt32 cookie = dev.UiCookie() & ~EBTUiCookieJustWorksPaired;
+                dev.SetUiCookie( cookie );
+                BOstrace1(TRACE_DEBUG,DUMMY_DEVLIST,"UI cookie %x cleared", EBTUiCookieJustWorksPaired );
+                }
+            // modify the device in registry synchronously
+            // status.Int() could be -1 if the device is not in registry 
+            // which is totally fine for us.
+            (void) UpdateRegDevice( dev );
+            }
+        }
+    }
+
+void CBTNotifSecurityManager::BlockDevice( const TBTDevAddr& aAddr , TBool aBanned)
+    {
+    TIdentityRelation<TBTNamelessDevice> addrComp( CompareDeviceByAddress );
+    TBTNamelessDevice dev;
+    dev.SetAddress( aAddr );
+    TRequestStatus status( KRequestPending );
+    // Unpair the device in registry (synchronously)
+    iRegistry.GetDevice(dev,status);
+    User::WaitForRequest( status ); 
+    if(status == KErrNone)
+        {
+        TBTDeviceSecurity security = dev.GlobalSecurity();
+        security.SetBanned(aBanned);
+        if ( aBanned )
+            {
+            security.SetNoAuthorise(EFalse);
+            }
+        dev.SetGlobalSecurity(security);
+        (void)UpdateRegDevice(dev);
+        }
+    }
+
+TInt CBTNotifSecurityManager::AddUiCookieJustWorksPaired( const TBTNamelessDevice& aDev )
+    {
+    TInt err( KErrNone );
+    // There might be UI cookies used by other applications,
+    // we should not overwrite them. 
+    TInt32 cookie = aDev.IsValidUiCookie() ? aDev.UiCookie() : EBTUiCookieUndefined;
+    if ( !( cookie & EBTUiCookieJustWorksPaired ) )
+        {
+        // Only update the cookie if the wanted one is not in registry yet
+        // to keep minimal operations with registry.
+        TBTNamelessDevice dev = aDev;		
+        cookie |= EBTUiCookieJustWorksPaired;
+        dev.SetUiCookie( cookie );
+        err = UpdateRegDevice( dev );
+        BOstrace1(TRACE_DEBUG,DUMMY_DEVLIST,"Outgoing Pairing write Ui cookie ret %d", err );
+        }
+    return err;
+    }
+
+// ---------------------------------------------------------------------------
+// update a nameless device in registry
+// ---------------------------------------------------------------------------
+//
+TInt CBTNotifSecurityManager::UpdateRegDevice( const TBTNamelessDevice& aDev )
+    {
+    TRequestStatus status( KRequestPending );
+    // update the device in registry synchronously
+    iRegistry.ModifyDevice( aDev, status );
+    User::WaitForRequest( status );
+    BOstrace1(TRACE_DEBUG,DUMMY_DEVLIST,"UpdateRegDevice, ret %d", status.Int());
+    return status.Int();
+    }
+
+// ---------------------------------------------------------------------------
+// 0000 for outgoing pairing with a headset.
+// The placeholder for future extension (pin code passed in for pairing)
+// ---------------------------------------------------------------------------
+//
+void CBTNotifSecurityManager::GetPinCode(
+        TBTPinCode& aPin, const TBTDevAddr& aAddr, TInt aMinPinLength )
+    {
+    if ( iPairingHandler )
+        {
+        iPairingHandler->GetPinCode( aPin, aAddr, aMinPinLength );
+        }
+    else
+        {
+        // make sure not to leave any text as PIN.
+        aPin.Zero();
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// Ask server class the connection status of the specified device
+// ---------------------------------------------------------------------------
+//
+TBTEngConnectionStatus CBTNotifSecurityManager::ConnectStatus( const TBTDevAddr& aAddr )
+    {
+    const CBtDevExtension* devExt = iDevRepository.Device(aAddr);
+    TBTEngConnectionStatus status = EBTEngNotConnected;
+    if ( devExt ) 
+        {
+        status = devExt->ServiceConnectionStatus();
+        }
+    return status;
+    }
+
+// ---------------------------------------------------------------------------
+// From class MBTNotifPairingAOObserver.
+// Checks if there is an authentication result.
+// ---------------------------------------------------------------------------
+//
+void CBTNotifSecurityManager::RequestCompletedL( CBtSimpleActive* aActive, TInt aStatus )
+    {
+    BOstraceExt2(TRACE_DEBUG,DUMMY_DEVLIST,"aId: %d, aStatus: %d", aActive->RequestId(), aStatus);
+    // Check which request is completed.
+    switch( aActive->RequestId() )
+        {
+        case ESimplePairingResult:
+            {
+            TBTDevAddr tmpAddr = iSimplePairingRemote;
+            if (aStatus != KErrServerTerminated)
+                {
+                SubscribeSspPairingResult();
+                }
+            HandlePairingResultL( tmpAddr, aStatus );
+            break;
+            }
+        case EAuthenticationResult:
+            {
+            TBTDevAddr tmpAddr = iAuthenticateRemote;
+            if (aStatus != KErrServerTerminated)
+                {
+                SubscribeAuthenticateResult();
+                }
+            HandlePairingResultL( tmpAddr, aStatus );
+            break;
+            }
+        case ERegistryGetLocalAddress:
+            {
+            TBool value = IsLocalAddressAvailable();
+            SubscribeLocalAddress();
+            if ( value ) 
+                {
+                // Refresh paired devices list to include any restored devices.
+                iDevRepository.ReInitialize();
+                }
+            break;
+            }
+        default:
+            // Should not be possible, but no need for handling.
+            break;
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// From class MBTEngActiveObserver.
+// cancels an outstanding request according to the given id.
+// ---------------------------------------------------------------------------
+//
+void CBTNotifSecurityManager::CancelRequest( TInt aRequestId )
+    {
+    switch ( aRequestId )
+        {
+        case ESimplePairingResult:
+            {
+            // Cancel listening Simple pairing result
+            iPairingResult.CancelSimplePairingResult();
+            break;
+            }
+        case EAuthenticationResult:
+            {
+            // Cancel listening authentication result
+            iAuthenResult.CancelAuthenticationResult();
+            break;
+            }
+        case ERegistryGetLocalAddress:
+            {
+            // cancel listening local address status change
+            iPropertyLocalAddr.Cancel();
+            break;
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// From class MBtSimpleActiveObserver.
+// ---------------------------------------------------------------------------
+//
+void CBTNotifSecurityManager::HandleError( CBtSimpleActive* aActive, TInt aError )
+    {
+    BOstraceExt2(TRACE_DEBUG,DUMMY_DEVLIST,"request id: %d, error: %d", aActive->RequestId(), aError);
+    (void) aActive;
+    (void) aError;
+    }
+
+// ---------------------------------------------------------------------------
+// From class MBtDevRepositoryObserver.
+// ---------------------------------------------------------------------------
+//
+void CBTNotifSecurityManager::RepositoryInitialized()
+    {
+    TRAPD(err, UpdatePairedDeviceListL() );
+    if ( !err && iPairingHandler )
+        {
+        // non-null pairing handler means we are involved in a
+        // pairing operation already.
+        // todo: is some handling for above case needed?
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// From class MBtDevRepositoryObserver.
+// ---------------------------------------------------------------------------
+//
+void CBTNotifSecurityManager::DeletedFromRegistry( const TBTDevAddr& aAddr )
+    {
+    // We are only interested in the removal of a paired device.
+    // thus check whether it is in our local paired list:
+    TInt i = iPairedDevices.Find( aAddr, MatchDeviceAddress);
+    if ( i > KErrNotFound )
+        {
+        iPairedDevices.Remove( i );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// From class MBtDevRepositoryObserver.
+// ---------------------------------------------------------------------------
+//
+void CBTNotifSecurityManager::AddedToRegistry( const CBtDevExtension& aDevice )
+    {
+    // We are only interested in paired device.
+    if ( CBtDevExtension::IsBonded( aDevice.Device().AsNamelessDevice() ) )
+        {
+        TRAP_IGNORE( 
+                HandleRegistryBondingL( aDevice.Device().AsNamelessDevice() ) );
+        }
+    }
+
+
+// ---------------------------------------------------------------------------
+// From class MBtDevRepositoryObserver.
+// ---------------------------------------------------------------------------
+//
+void CBTNotifSecurityManager::ChangedInRegistry(
+        const CBtDevExtension& aDevice, TUint aSimilarity )
+    {
+    // We are only interested in paired device.
+    // thus check whether it is in our local paired list:
+    TInt i = iPairedDevices.Find( aDevice.Addr(), MatchDeviceAddress);
+    TBool bonded = CBtDevExtension::IsBonded( aDevice.Device().AsNamelessDevice() );
+    if ( i == KErrNotFound )
+        {
+        if ( bonded ) 
+            {
+            TRAP_IGNORE(
+                    HandleRegistryBondingL( 
+                            aDevice.Device().AsNamelessDevice() ) );                
+            }
+        return;
+        }
+    // Device was inregistry before, but we need to evaluate its bonding
+    // status.
+    // The given similarity will tell if the linkkey and paired is changed
+    // or not.
+    TInt pairingProperty = TBTNamelessDevice::EIsPaired 
+            | TBTNamelessDevice::ELinkKey;
+    if ( ( pairingProperty & aSimilarity) == pairingProperty )
+        {
+        // no pairing or linkkey change. Nothing to do for pairing handling.
+        // but we'd better update local copy just in case other data
+        // of this device is needed by someone:
+        iPairedDevices[i] = aDevice.Device().AsNamelessDevice();
+        return;
+        }
+    if ( !CBtDevExtension::IsBonded( aDevice.Device().AsNamelessDevice() ) )
+        {
+        // device is not user-bonded.
+        iPairedDevices.Remove( i );
+        return;
+        }
+    // it is a new paired device if its link-key has been upgraded
+    if ( aDevice.Device().LinkKeyType() != ELinkKeyUnauthenticatedUpgradable )
+        {
+        iPairedDevices.Remove( i );
+        TRAP_IGNORE(
+                HandleRegistryBondingL( 
+                        aDevice.Device().AsNamelessDevice() ) );                
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// From class MBtDevRepositoryObserver.
+// This class is not interested in such events.
+// ---------------------------------------------------------------------------
+//
+void CBTNotifSecurityManager::ServiceConnectionChanged(
+        const CBtDevExtension& aDevice, TBool aConnected )
+    {
+    (void) aDevice;
+    (void) aConnected;
+    }
+
+// ---------------------------------------------------------------------------
+// Activate or deactivate a pairing handler
+// ---------------------------------------------------------------------------
+//
+TInt CBTNotifSecurityManager::SetPairObserver(const TBTDevAddr& aAddr, TBool aActivate)
+    {
+    BOstrace1(TRACE_DEBUG,DUMMY_DEVLIST,"%d", aActivate);
+    BtTraceBtAddr0(TRACE_DEBUG,DUMMY_DEVLIST, aAddr );
+    TInt err( KErrNone );
+    if ( !aActivate )
+        {
+        if ( iPairingHandler )
+            {
+            iPairingHandler->StopPairHandling( aAddr );
+            }
+        return err;
+        }
+    
+    if ( !iPairingHandler)
+        {
+        // This is an incoming pair, unpair it from registry and 
+        // create the handler:
+        UnpairDevice( aAddr );
+        TRAP( err, iPairingHandler = CBTNotifIncomingPairingHandler::NewL( *this, aAddr ));     
+        }
+    if ( iPairingHandler)
+        {
+        // let the handler decide what to do:
+        err = iPairingHandler->ObserveIncomingPair( aAddr );
+        }
+    return err;
+    }
+
+// ---------------------------------------------------------------------------
+// Delegates the request to current pair handler
+// ---------------------------------------------------------------------------
+//
+void CBTNotifSecurityManager::PairDeviceL( const TBTDevAddr& aAddr, TUint32 aCod )
+    {
+    if ( !iPairingHandler)
+        {
+        // no existing pair handling, create one:
+        iPairingHandler = CBTNotifOutgoingPairingHandler::NewL( *this, aAddr );
+        }
+    // let pair handler decide what to do:
+    iPairingHandler->HandleOutgoingPairL( aAddr, aCod );
+    }
+
+// ---------------------------------------------------------------------------
+// cancel Subscribings to simple pairing result and authentication result from
+// Pairing Server
+// ---------------------------------------------------------------------------
+//
+void CBTNotifSecurityManager::CancelSubscribePairingAuthenticate()
+    {
+    if( iSSPResultActive )
+        {
+        // Cancel listening Simple pairing result
+        iSSPResultActive->Cancel();
+        }
+    if( iAuthenResultActive )
+        {
+        iAuthenResultActive->Cancel();
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// Subscribes to simple pairing result from Pairing Server (if not already 
+// subscribed).
+// ---------------------------------------------------------------------------
+//
+void CBTNotifSecurityManager::SubscribeSspPairingResult()
+    {
+    if ( !iSSPResultActive->IsActive() )
+        {
+        iPairingResult.SimplePairingResult( iSimplePairingRemote, iSSPResultActive->RequestStatus() );
+        iSSPResultActive->GoActive();
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// Subscribes to authentication result from Pairing Server (if not already
+// subscribed).
+// ---------------------------------------------------------------------------
+//
+void CBTNotifSecurityManager::SubscribeAuthenticateResult()
+    {
+    if ( !iAuthenResultActive->IsActive() )
+        {
+        // Subscribe authentication result (which requires pairing for unpaired devices)
+        iAuthenResult.AuthenticationResult( iAuthenticateRemote, iAuthenResultActive->RequestStatus() );
+        iAuthenResultActive->GoActive();
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// Handle a pairing result from the pairing server.
+// ---------------------------------------------------------------------------
+//
+void CBTNotifSecurityManager::HandlePairingResultL( const TBTDevAddr& aAddr, TInt aResult )
+    {
+    BOstrace1(TRACE_DEBUG,DUMMY_DEVLIST,"result %d", aResult);
+    BtTraceBtAddr0(TRACE_DEBUG,DUMMY_DEVLIST, aAddr );
+ 
+    if ( !iPairingHandler && ( aResult == KErrNone || aResult == KHCIErrorBase ) )
+        {
+        // we only create new handler if incoming pairing succeeds.
+        // Pairing failure could be caused by user local cancellation, as the  
+        // result, the handler was destroyed by notifier. We shall not
+        // instantiate the handler again.
+        // If a pairing failed due to other reasons than user local cancelling,
+        // it will be catched by the already started handler 
+        // (except Just Works pairing - no handler for it at all until we receive
+        // registry change event. Thus if incoming JWs pairing failed, no user
+        // notification will be shown.)
+        iPairedDevices.Find( aAddr, MatchDeviceAddress);
+        TInt index = iPairedDevices.Find( aAddr, MatchDeviceAddress);
+        // If the device is not found in the old paired device list, it is a new
+        // paired device:
+        if ( index == KErrNotFound)
+            {
+            // No handler yet, create incoming pairing handler:
+            iPairingHandler = CBTNotifIncomingPairingHandler::NewL( *this, aAddr );
+            }
+        }
+    if ( iPairingHandler )
+        {
+        iPairingHandler->HandlePairServerResult( aAddr, aResult );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// copy the nameless devices to local array
+// ---------------------------------------------------------------------------
+//
+void CBTNotifSecurityManager::UpdatePairedDeviceListL()
+    {
+    iPairedDevices.Reset();
+    const RDevExtensionArray& alldevs = iDevRepository.AllDevices();
+    for ( TInt i = 0; i < alldevs.Count(); i++ )
+        {
+        if ( CBtDevExtension::IsBonded( alldevs[i]->Device().AsNamelessDevice() ) )
+            {
+            iPairedDevices.AppendL( alldevs[i]->Device().AsNamelessDevice() );
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// Create incoming pairing handler if no one exists yet.
+// ---------------------------------------------------------------------------
+//
+void CBTNotifSecurityManager::HandleRegistryBondingL(
+        const TBTNamelessDevice& aNameless)
+    {
+    TInt err = iPairedDevices.Append( aNameless );
+    if ( !err && !iPairingHandler)
+        {
+        // New paired device, but no pairing handler yet.
+        // this means an incoming pairing has occured:
+        TRAP( err, iPairingHandler = 
+                CBTNotifIncomingPairingHandler::NewL( *this, aNameless.Address() ) );
+        }
+    if ( !err )
+        {
+        // We have a pairing handler now.
+        // Ask pair handler to decide what to do:
+        iPairingHandler->HandleRegistryNewPairedEvent( 
+                aNameless );
+        }
+    else if ( iPairingHandler )
+        {
+        // error could occur due to no memory, 
+        // let us try aborting pairing handling
+        iPairingHandler->StopPairHandling( aNameless.Address() );
+        }
+    }
+
+void CBTNotifSecurityManager::TrustDevice( const TBTDevAddr& aAddr )
+    {
+    TIdentityRelation<TBTNamelessDevice> addrComp( CompareDeviceByAddress );
+    TBTNamelessDevice dev;
+    dev.SetAddress( aAddr );
+    TRequestStatus status( KRequestPending );
+    
+    iRegistry.GetDevice(dev,status);
+    User::WaitForRequest( status ); 
+    if(status == KErrNone)
+        {
+        TBTDeviceSecurity security = dev.GlobalSecurity();
+        security.SetNoAuthorise(ETrue);
+        security.SetBanned(EFalse);
+        dev.SetGlobalSecurity(security);
+        (void)UpdateRegDevice(dev);
+        }
+    }
+
--- a/bluetoothengine/btnotif/btnotifsrv/src/btnotifserver.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btnotif/btnotifsrv/src/btnotifserver.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -272,7 +272,8 @@
 //
 GLDEF_C TInt E32Main()
     {
-    __UHEAP_MARK;
+    // Disabled until memory leak in QT/Open C are fixed
+    // __UHEAP_MARK;
     CTrapCleanup* cleanup = CTrapCleanup::New();
     TInt err = KErrNoMemory;
     if ( cleanup )
@@ -280,7 +281,8 @@
         TRAP( err, RunServerL() );
         delete cleanup;
         }
-    __UHEAP_MARKEND;
+    // Disabled until memory leak in QT/Open C are fixed
+    // __UHEAP_MARKEND;
     return err;
     }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/btnotif/btnotifsrv/src/btnotifserviceauthorizer.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,302 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: class for prompting user to authorize a service
+*              connection request.
+*
+*/
+
+#include <hb/hbcore/hbsymbianvariant.h>
+#include <btengconnman.h>
+#include "btnotifserviceauthorizer.h"
+#include "btnotifsecuritymanager.h"
+#include "bluetoothtrace.h"
+#include "btnotifclientserver.h"
+#include "bluetoothnotification.h"
+#include "btnotifconnectiontracker.h"
+#include "btnotificationmanager.h"
+#include "bluetoothnotification.h"
+#include "btnotifserver.h"
+#include "btnotifutil.h"
+
+//
+// SDP UUID Constants - Short form
+// Taken from Bluetooth Profile specification v1.1
+// These are used when registering the service to
+// local SDP database and when searching the service
+// information from remote device.
+const TUint KBTSdpDun                   = 0x1103;
+const TUint KBTSdpGenericTelephony      = 0x1204;
+const TUint KBTSdpFax                   = 0x1111;
+const TUint KBTSdpObjectPush            = 0x1105;
+const TUint KBTSdpFileTransfer          = 0x1106;
+const TUint KBTSdpHeadSet               = 0x1108;
+const TUint KBTSdpGenericNetworking     = 0x1201;
+const TUint KBTSdpBasicImaging          = 0x111b;
+
+
+CBTNotifServiceAuthorizer* CBTNotifServiceAuthorizer::NewL(
+                                        CBTNotifSecurityManager& aParent)
+    {
+    CBTNotifServiceAuthorizer* me = new (ELeave) CBTNotifServiceAuthorizer(aParent);
+    CleanupStack::PushL(me);
+    me->ConstructL();
+    CleanupStack::Pop(me);
+    return me;
+    }
+
+CBTNotifServiceAuthorizer::~CBTNotifServiceAuthorizer()
+    {
+    iParams.Close();
+    if( iNotification )
+        {
+        // Clear the notification callback, we cannot receive them anymore.
+        iNotification->RemoveObserver();
+        iNotification->Close(); // Also dequeues the notification from the queue.
+        iNotification = NULL;
+        }
+    if ( !iNotifierMessage.IsNull() )
+        {
+        iNotifierMessage.Complete( KErrServerTerminated );
+        }
+    }
+
+CBTNotifServiceAuthorizer::CBTNotifServiceAuthorizer(
+                                        CBTNotifSecurityManager& aParent)
+:iParent(aParent)
+    {
+    }
+
+void CBTNotifServiceAuthorizer::ConstructL()
+    {
+    }
+
+void CBTNotifServiceAuthorizer::StartNotifierL(const RMessage2& aMessage)
+    {
+    if (!iNotifierMessage.IsNull())
+        {
+        if(aMessage.Function() == EBTNotifCancelNotifier)
+            {
+            TInt err = iNotification->Close();
+            iNotifierMessage.Complete(KErrCancel);
+            aMessage.Complete(err);
+            return;
+            }
+        BOstrace0(TRACE_DEBUG,DUMMY_DEVLIST,"[BTNotif]:We are busy");
+        User::Leave(KErrServerBusy );
+        }
+
+    iParams.ReAllocL( aMessage.GetDesLengthL( EBTNotifSrvParamSlot ) );
+    aMessage.ReadL( EBTNotifSrvParamSlot, iParams );
+    
+    TBTAuthorisationParams params;
+    TPckgC<TBTAuthorisationParams> paramsPckg( params );
+    paramsPckg.Set( iParams );
+    
+    iServiceId = paramsPckg().iUid.iUid;
+    
+    const CBtDevExtension* dev = NULL;
+    dev = iParent.BTDevRepository().Device(paramsPckg().iBDAddr);
+
+    if(dev && dev->Device().GlobalSecurity().Banned() )
+        {
+        // If the device is banned, service connection from
+        // this device is not allowed:
+        BOstrace0(TRACE_DEBUG,DUMMY_DEVLIST,"[BTNotif]:Device is banned");
+        aMessage.Complete( KErrCancel);
+        return;    
+        }
+
+    if(dev && dev->Device().GlobalSecurity().NoAuthorise())
+        {
+        // If the device is a trusted one, no need to pop up query messages.
+        TPckgBuf<TBool> answer;
+        answer() = ETrue;
+        aMessage.Write(EBTNotifSrvReplySlot, answer);
+        aMessage.Complete(KErrNone);
+        return;
+        }
+    
+    // User must namually authorize this request. 
+    // Get needed info for the dialog:
+    iPairedDevice = (dev == NULL ) ? EFalse : dev->IsUserAwareBonded();
+    iDeviceClass = (dev == NULL ) ? 0 : dev->Device().DeviceClass().DeviceClass();
+    TBTNotifUtil::GetDeviceUiNameL(iCurrentDeviceName, 
+            dev, paramsPckg().iName, paramsPckg().iBDAddr );
+
+    TBool autoAuthorize;
+    PrepareNotificationL(autoAuthorize,
+            TBluetoothDialogParams::EUserAuthorization, 
+            EAuthorization, iPairedDevice);
+    if ( autoAuthorize ) 
+        {
+        TPckgBuf<TBool> answer; 
+        answer() = ETrue;
+        aMessage.Write(EBTNotifSrvReplySlot, answer);
+        aMessage.Complete(KErrNone);
+        }
+    else 
+        {
+        iNotification->ShowL();
+        // we do not save the message until all leavable functions have executed successfully.
+        // This makes sure the iNotifierMessage has a valid handle.
+        iNotifierMessage = aMessage;
+        }
+    }
+
+void CBTNotifServiceAuthorizer::MBRDataReceived( CHbSymbianVariantMap& aData )
+    {
+    // "actionResult" will be true if the user clicks 'Yes' on the dialog and false, if he/she clicks 'No'
+    // "iCheckBoxState" will be set to true of the checkbox is checked, else false.
+    if(aData.Keys().MdcaPoint(0).Compare(_L("actionResult")) == 0)
+        {
+        TBTAuthorisationParams params;
+        TPckgC<TBTAuthorisationParams> paramsPckg(params);
+        paramsPckg.Set(iParams);
+
+        TPckgBuf<TBool> answer;
+        TInt val = *(static_cast<TInt*>(aData.Get(_L("actionResult"))->Data()));
+        if(val)
+            {
+            answer() = ETrue;
+            if(iCheckBoxState)
+                {
+                // Set the device "Trusted" property
+                iParent.TrustDevice(paramsPckg().iBDAddr);
+                }
+             }
+        else
+            {
+            answer() = EFalse;
+            if(iCheckBoxState)
+                {
+                // If the device is paried, unpair it as well.
+                if(iPairedDevice)
+                    {
+                    iParent.UnpairDevice(paramsPckg().iBDAddr);
+                    }
+                
+                //Set the device "Blocked" property
+                iParent.BlockDevice(paramsPckg().iBDAddr,ETrue);
+                }
+            }
+        if ( !iNotifierMessage.IsNull() )
+            {
+            iNotifierMessage.Write(EBTNotifSrvReplySlot, answer);
+            iNotifierMessage.Complete(KErrNone);
+            }
+        }
+    else if(aData.Keys().MdcaPoint(0).Compare(_L("checkBoxState")) == 0)
+        {
+        iCheckBoxState = *(static_cast<TInt*>(aData.Get(_L("checkBoxState"))->Data()));
+        }
+    }
+
+void CBTNotifServiceAuthorizer::MBRNotificationClosed( TInt aError, const TDesC8& aData )
+    {
+    (void) aError;
+    (void) aData;
+    iNotification->RemoveObserver();
+    iNotification = NULL;
+    }
+
+void CBTNotifServiceAuthorizer::PrepareNotificationL(TBool& aAutoAuthorize,
+        TBluetoothDialogParams::TBTDialogType aType,
+    TBTDialogResourceId aResourceId, TBool aPaired)
+    {
+    iNotification = iParent.ConnectionTracker().NotificationManager()->GetNotification();
+    User::LeaveIfNull( iNotification ); // For OOM exception, leaves with KErrNoMemory
+    iNotification->SetObserver( this );
+    iNotification->SetNotificationType( aType, aResourceId );
+    TInt err = KErrNone;
+    aAutoAuthorize = EFalse;
+    
+    //Set the dialog title based on the service IDs
+    switch(iServiceId)
+        {
+        case KBTSdpObjectPush:
+        case KBTSdpBasicImaging:
+            {
+            if(aPaired)
+                {
+                err = iNotification->SetData( TBluetoothDialogParams::EDialogTitle, TBluetoothDialogParams::EReceiveFromPairedDevice);
+                // In case of receiving a msg from a paired deivce, the checkbox is checked by default.
+                iCheckBoxState = ETrue;
+                User::LeaveIfError(err);
+                }
+            else
+                {
+                err = iNotification->SetData( TBluetoothDialogParams::EDialogTitle, TBluetoothDialogParams::EReceive);
+                iCheckBoxState = EFalse;
+                User::LeaveIfError(err);
+                }
+            }
+            break;
+            
+        case KBTSdpFax:
+        case KBTSdpDun:
+        case KBTSdpFileTransfer:
+        case KBTSdpHeadSet:
+        case KBTSdpGenericTelephony:
+        case KBTSdpGenericNetworking:
+            {
+            err = iNotification->SetData( TBluetoothDialogParams::EDialogTitle, TBluetoothDialogParams::EConnect);
+            // In case of an incoming connection, the checkbox is checked by default.
+            iCheckBoxState = ETrue;
+            User::LeaveIfError(err);
+            }
+            break;
+            
+        default:
+            {
+            TBTAuthorisationParams params;
+            TPckgC<TBTAuthorisationParams> paramsPckg(params);
+            paramsPckg.Set(iParams);
+            
+            // In this case, if there already exists a connection to an audio device, then we simply accept
+            // the incoming connection without querying the user.
+            // If there is no existing connection, then we pop up a query message.
+            if(IsExistingConnectionToAudioL(paramsPckg().iBDAddr))
+                {
+                aAutoAuthorize = ETrue;
+                return;
+                }
+            else
+                {
+                err = iNotification->SetData( TBluetoothDialogParams::EDialogTitle, TBluetoothDialogParams::EConnect);
+                // In case of an incoming connection, the checkbox is checked by default.
+                iCheckBoxState = ETrue;
+                User::LeaveIfError(err);
+                }
+            }
+            break;
+        }
+    
+    //Add the device name 
+    err = iNotification->SetData( TBluetoothDeviceDialog::EDeviceName, iCurrentDeviceName );
+    User::LeaveIfError(err);
+    //Add the device class
+    err = iNotification->SetData( TBluetoothDeviceDialog::EDeviceClass, iDeviceClass );
+    User::LeaveIfError(err);
+    
+    }
+
+TBool CBTNotifServiceAuthorizer::IsExistingConnectionToAudioL(const TBTDevAddr& aDevAddr)
+    {
+    CBTEngConnMan* connMan = CBTEngConnMan::NewL();
+    TBTEngConnectionStatus conntatus(EBTEngNotConnected);
+    (void) connMan->IsConnected(aDevAddr,conntatus);      
+    delete connMan;
+    return (conntatus==EBTEngConnected || conntatus==EBTEngConnecting);
+    }
+
--- a/bluetoothengine/btnotif/btnotifsrv/src/btnotifsession.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btnotif/btnotifsrv/src/btnotifsession.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -128,7 +128,7 @@
                         {
                          // Pass it to the connection tracker.
                          TRAP( err, 
-                                 connTracker->HandlePairingNotifierRequestL( aMessage ) );
+                                 connTracker->HandleNotifierRequestL( aMessage ) );
                         }
                     if ( err )
                         {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/btnotif/btnotifsrv/src/btnotifutil.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,68 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+#include "btnotifutil.h"
+#include <btservices/btdevrepository.h>
+#include <btmanclient.h>
+#include "bluetoothtrace.h"
+
+// ---------------------------------------------------------------------------
+// If aDevExt contains a valid friendly name, the friendly name will be displayed;
+// Otherwise, if the given name from the parameter of a notifier request is valid,
+// the given name will be displayed;
+// Otherwise, If aDevExt contains a valid device name, the name will be displayed;
+// Otherwise, the a name will be created by this function.
+// ---------------------------------------------------------------------------
+//
+void TBTNotifUtil::GetDeviceUiNameL( TDes& aNameBuf, 
+            const CBtDevExtension* aDevExt, 
+            const TDesC& aNameInParam,
+            const TBTDevAddr& aAddr)
+    {
+    CBtDevExtension* tempDev( NULL );
+    TPtrC namePtr;
+    if ( aDevExt && 
+         aDevExt->Device().IsValidFriendlyName() && 
+         aDevExt->Device().FriendlyName().Length() != 0 )
+        {
+        // We always use the friendly name regardless of 
+        // the device-name of the device is available or not.
+        namePtr.Set( aDevExt->Device().FriendlyName() );
+        }
+    else 
+        {
+        // this will take care of name formating. Either the
+        // name from iNameInParam or the address will be
+        // the alias:
+        tempDev = CBtDevExtension::NewLC( aAddr, aNameInParam );      
+        namePtr.Set( tempDev->Alias() );
+        }
+    // Make sure no overflow:
+    if ( aNameBuf.MaxLength() < namePtr.Length() )
+        {
+        aNameBuf.Copy( namePtr.Left( aNameBuf.MaxLength() ) );
+        }
+    else
+        {
+        aNameBuf.Copy( namePtr );
+        }
+    if ( tempDev )
+        {
+        CleanupStack::PopAndDestroy( tempDev );
+        }
+    }
+
+
--- a/bluetoothengine/btnotif/bwins/Btnotifu.def	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
-	?NotifierArray@@YAPAV?$CArrayPtr@VMEikSrvNotifierBase2@@@@XZ @ 1 NONAME ; class CArrayPtr<class MEikSrvNotifierBase2> * __cdecl NotifierArray(void)
-
--- a/bluetoothengine/btnotif/data/BTNotif.rss	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,754 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This file contains all the resources for the module BTNotif.
-*
-*/
-
-
-NAME BNOT
-
-#include <eikon.rsg>
-
-#include <eikon.rh>
-
-#include <avkon.rsg>
-#include <avkon.rh>
-#include <avkon.mbg>
-#include <avkon.loc>
-#include <btnotif.loc>
-#include "btnotif.hrh"
-
-RESOURCE RSS_SIGNATURE { }
-
-RESOURCE TBUF { buf=""; }
-
-// === ICONS =================================================================
-
-//----------------------------------------------------
-// Icon array for BTNOTIF
-//----------------------------------------------------
-//
-RESOURCE AKN_ICON_ARRAY r_btnotif_icons
-    {
-    //This resource is removed because of skinable icon change. The title is still staying here
-	//to prevent intruducing BC break.
-    }
-
-// === TITLES AND PROMPTS ====================================================
-
-//----------------------------------------------------
-// Titles for popup windows
-//----------------------------------------------------
-//
-RESOURCE TBUF r_bt_search_devs_popup_title { buf = qtn_bt_searching_found; }
-
-RESOURCE TBUF r_bt_found_devs_popup_title { buf = qtn_bt_devices_found; }
-
-RESOURCE TBUF r_bt_last_seen_devs_popup_title { buf = qtn_bt_last_seen_devices; }
-
-RESOURCE TBUF r_bt_last_used_devs_popup_title { buf = qtn_bt_last_used_devices; }
-
-//----------------------------------------------------
-// Fixed list items
-//----------------------------------------------------
-//
-RESOURCE TBUF r_bt_more_devices_item { buf = qtn_bt_more_devices; }
-
-//----------------------------------------------------
-// Prompts for queries
-//----------------------------------------------------
-//
-RESOURCE TBUF r_bt_passkey_prompt { buf = qtn_bt_enter_pk_for_conn; }
-
-RESOURCE TBUF r_bt_dialog_def_name { buf = qtn_bt_dialog_def_name; }
-
-RESOURCE TBUF r_bt_authorisation_name { buf = qtn_bt_accept_conn_request; }
-
-RESOURCE TBUF r_bt_receive_message { buf = qtn_bt_receive_message; }
-
-RESOURCE TBUF r_bt_receive_message_paired { buf = qtn_bt_receive_message_paired; }
-
-RESOURCE TBUF r_bt_no_devices_found { buf =qtn_bt_no_devices_found; }
-//same text than in r_bt_try_again_query	
-
-RESOURCE TBUF r_bt_power_is_off { buf = qtn_bt_is_off; }
-//same text than in R_BT_POWER_IS_OFF_QUERY
-
-RESOURCE TBUF r_bt_activate_in_offline { buf= qtn_bt_activate_in_offline; }
-//same text than in R_BT_ACTIVATE_IN_OFFLINE_QUERY
-
-RESOURCE TBUF r_bt_is_hidden_java 		{ buf=qtn_bt_is_hidden_java; }
-
-RESOURCE TBUF r_bt_is_off_java 			{ buf=qtn_bt_is_off_java; }
-
-RESOURCE TBUF r_bt_is_hidden_java_appname 		{ buf=qtn_bt_is_hidden_java_appname; }
-
-RESOURCE TBUF r_bt_is_off_java_appname 			{ buf=qtn_bt_is_off_java_appname; }
-
-RESOURCE TBUF r_bt_turn_bt_off                         { buf = qtn_bt_dos_query; }
-
-RESOURCE TBUF r_bt_switch_off_anyway { buf= qtn_bt_switch_off_anyway; }
-
-//----------------------------------------------------
-// Headers of the r_bt_is_hidden_java and r_bt_is_off_java queries
-//----------------------------------------------------
-RESOURCE TBUF r_bt_is_off_java_header 	{ buf=qtn_bt_is_off_java_header ; }
-
-RESOURCE TBUF r_bt_is_hidden_java_header 	{ buf=qtn_bt_is_hidden_java_header ; }
-
-//----------------------------------------------------
-// Prompts for global notes
-//----------------------------------------------------
-//
-RESOURCE TBUF r_bt_audio_accessory_prompt { buf = qtn_bt_audio_accessory; }
-
-RESOURCE TBUF r_bt_audio_handset_prompt { buf = qtn_bt_audio_handset; }
-
-RESOURCE TBUF r_bt_conf_connected_prompt { buf = qtn_bt_conf_connected; }
-
-RESOURCE TBUF r_bt_conf_disconnected_prompt { buf = qtn_bt_conf_disconnected; }
-
-RESOURCE TBUF r_bt_conn_closed_prompt { buf = qtn_bt_conn_closed; }
-
-RESOURCE TBUF r_bt_device_not_avail { buf = qtn_bt_device_not_avail; }
-
-RESOURCE TBUF r_bt_offline_disabled { buf = qtn_bt_offline_disabled; }
-//text of R_BT_BUSY
-RESOURCE TBUF r_bt_busy_text {	buf =qtn_bt_busy;	}
-
-RESOURCE TBUF r_ir_not_supported {	buf =qtn_ir_not_supported;	}
-
-
-//----------------------------------------------------
-// Default name array for BTNotif
-// These names are used if no name is received in inquiry.
-// Note! The order must match enum TBTDefaultDevNameArrayIndexes
-// defined in BTNInqUi.cpp.
-//----------------------------------------------------
-//
-RESOURCE ARRAY r_bt_default_device_names
-    {
-    items = {
-        LBUF { txt=qtn_bt_computer; },
-        LBUF { txt=qtn_bt_phone; },
-        LBUF { txt=qtn_bt_audio; },
-        LBUF { txt=qtn_bt_keyboard; },
-        LBUF { txt=qtn_bt_mouse; },
-        LBUF { txt=qtn_bt_printer; },
-        LBUF { txt=qtn_bt_carkit; },
-        LBUF { txt=qtn_bt_dialog_def_name; }
-        };
-    }
-
-
-// === SOFTKEYS ==============================================================
-
-//----------------------------------------------------
-// Softkeys for "Searching devices" wait note
-//----------------------------------------------------
-//
-RESOURCE CBA r_bt_softkeys_empty_cancel
-    {
-    buttons =
-        {
-        CBA_BUTTON {txt="";},
-        CBA_BUTTON {id=EAknSoftkeyCancel; txt = text_softkey_cancel; }
-        };
-    }
-
-
-//----------------------------------------------------
-// Softkeys for found devices popup list
-//----------------------------------------------------
-//
-RESOURCE CBA r_bt_softkeys_select_stop
-    {
-    buttons =
-        {
-        CBA_BUTTON {id=EAknSoftkeySelect; txt = text_softkey_select;},
-        CBA_BUTTON {id=EAknSoftkeyCancel; txt = qtn_bt_softkey_stop; },
-        CBA_BUTTON {id=EAknSoftkeySelect; txt = text_softkey_select;}       
-        };
-    }
-
-// === QUERIES ===============================================================
-
-//----------------------------------------------------
-// PIN request query
-//----------------------------------------------------
-//
-RESOURCE DIALOG r_bt_enter_passkey_query
-    {
-    flags   = EGeneralQueryFlags | EEikDialogFlagVirtualInput ;
-    buttons = R_AVKON_SOFTKEYS_OK_CANCEL__OK;
-    items   =
-        {        
-        DLG_LINE
-            {
-            type    = EAknCtQuery;
-            id      = EGeneralQuery;
-            control = AVKON_DATA_QUERY
-                {
-                layout  = EDataLayout;
-                control = EDWIN
-                    {
-                    maxlength = KBTPassKeyMaxLength;
-                    default_input_mode = EAknEditorNumericInputMode;
-                    flags     = EEikEdwinNoHorizScrolling | EEikEdwinResizable;
-                    avkon_flags = EAknEditorFlagLatinInputModesOnly;
-                    };
-                };
-            }
-        }; 
-    }
-
-//----------------------------------------------------
-// OBEX PIN request query
-//----------------------------------------------------
-//
-RESOURCE DIALOG r_bt_obex_passkey_query
-    {
-    flags   = EGeneralQueryFlags;
-    buttons = R_AVKON_SOFTKEYS_OK_CANCEL__OK;
-    items   =
-        {
-        DLG_LINE
-            {
-            type    = EAknCtQuery;
-            id      = EGeneralQuery;
-            control = AVKON_DATA_QUERY
-                {
-                layout  = EDataLayout;
-                label   = qtn_bt_enter_obex_pcode;
-                control = EDWIN
-                    {
-                    maxlength = KBTPassKeyMaxLength;
-                    default_input_mode = EAknEditorNumericInputMode;
-                    flags     = EEikEdwinNoHorizScrolling | EEikEdwinResizable;
-                    };
-                };
-            }
-        };
-    }
-
-//----------------------------------------------------
-// Query for accepting incoming connections
-//----------------------------------------------------
-//
-RESOURCE DIALOG r_bt_authorisation_query
-    {
-    flags   = EGeneralQueryFlags;
-    buttons = R_AVKON_SOFTKEYS_YES_NO__YES;
-    items   =
-        {
-        DLG_LINE
-            {
-            type    = EAknCtQuery;
-            id      = EGeneralQuery;
-            control = AVKON_CONFIRMATION_QUERY
-                {
-                layout    = EConfirmationQueryLayout;
-                animation = R_QGN_NOTE_QUERY_ANIM;
-                };
-            }
-        };
-    }
-
-//----------------------------------------------------
-// If device search has been unsuccessful, the new
-// search is asked with this query from user.
-//----------------------------------------------------
-//
-RESOURCE DIALOG r_bt_try_again_query
-    {
-    flags   = EGeneralQueryFlags;
-    buttons = R_AVKON_SOFTKEYS_YES_NO__YES;
-    items   =
-        {
-        DLG_LINE
-            {
-            type    = EAknCtQuery;
-            id      = EGeneralQuery;
-            control = AVKON_CONFIRMATION_QUERY
-                {
-                layout    = EConfirmationQueryLayout;
-                label     = qtn_bt_no_devices_found;
-                animation = R_QGN_NOTE_QUERY_ANIM;
-                };
-            }
-        };
-    }
-
-//----------------------------------------------------
-// Ask BT power mode setting from user
-//----------------------------------------------------
-//
-RESOURCE DIALOG r_bt_power_is_off_query
-    {
-    flags   = EGeneralQueryFlags;
-    buttons = R_AVKON_SOFTKEYS_YES_NO__YES;
-    items   =
-        {
-        DLG_LINE
-            {
-            type    = EAknCtQuery;
-            id      = EGeneralQuery;
-            control = AVKON_CONFIRMATION_QUERY
-                {
-                layout    = EConfirmationQueryLayout;
-                label     = qtn_bt_is_off;
-                animation = R_QGN_NOTE_QUERY_ANIM;
-                };
-            }
-        };
-    }
-
-//----------------------------------------------------
-// Ask BT power mode setting from user in offline mode
-//----------------------------------------------------
-//
-RESOURCE DIALOG r_bt_activate_in_offline_query
-    {
-    flags   = EGeneralQueryFlags;
-    buttons = R_AVKON_SOFTKEYS_YES_NO__YES;
-    items   =
-        {
-        DLG_LINE
-            {
-            type    = EAknCtQuery;
-            id      = EGeneralQuery;
-            control = AVKON_CONFIRMATION_QUERY
-                {
-                layout    = EConfirmationQueryLayout;
-                label     = qtn_bt_activate_in_offline;
-                animation = R_QGN_NOTE_QUERY_ANIM;
-                };
-            }
-        };
-    }
-
-//----------------------------------------------------
-// Inform user that data receiving failed because of low memory.
-//----------------------------------------------------
-//
-RESOURCE DIALOG r_memlo_memory_low_data_query
-    {
-    flags   = EGeneralQueryFlags;
-    buttons = R_AVKON_SOFTKEYS_OK_EMPTY__OK;
-    items   =
-        {
-        DLG_LINE
-            {
-            type    = EAknCtQuery;
-            id      = EGeneralQuery;
-            control = AVKON_CONFIRMATION_QUERY
-                {
-                layout    = EConfirmationQueryLayout;
-                label     = qtn_memlo_memory_low_data;
-                animation = R_QGN_NOTE_ERROR_ANIM;
-                };
-            }
-        };
-    }
-
-//----------------------------------------------------
-// Inform user that data receiving to MMC failed because of low memory.
-//----------------------------------------------------
-//
-RESOURCE DIALOG r_memlo_mmc_memory_low_data_query
-    {
-    flags   = EGeneralQueryFlags;
-    buttons = R_AVKON_SOFTKEYS_OK_EMPTY__OK;
-    items   =
-        {
-        DLG_LINE
-            {
-            type    = EAknCtQuery;
-            id      = EGeneralQuery;
-            control = AVKON_CONFIRMATION_QUERY
-                {
-                layout    = EConfirmationQueryLayout;
-                label     = qtn_memlo_mmc_memory_low_data;
-                animation = R_QGN_NOTE_ERROR_ANIM;
-                };
-            }
-        };
-    }
-
-RESOURCE DIALOG r_bt_passkey_query
-    {
-    flags   = EGeneralQueryFlags;
-    buttons = R_AVKON_SOFTKEYS_CANCEL;
-    items   =
-        {
-        DLG_LINE
-            {
-            type    = EAknCtQuery;
-            id      = EGeneralQuery;
-            control = AVKON_CONFIRMATION_QUERY
-                {
-                layout    = EConfirmationQueryLayout;
-                animation = R_QGN_NOTE_QUERY_ANIM;
-                };
-            }
-        };
-    }
-
-// === NOTES =================================================================
-
-//----------------------------------------------------
-// Wait note right after bluetooth device search
-// has been launched.
-//----------------------------------------------------
-//
-RESOURCE DIALOG r_bt_searching_devices_note
-    {
-    flags   = EAknWaitNoteFlags | EEikDialogFlagWait;
-    buttons = r_bt_softkeys_empty_cancel;
-    items   =
-        {
-        DLG_LINE
-            {
-            type    = EAknCtNote;
-            id      = EBTNotifSearchingDevicesNote;
-            control = AVKON_NOTE
-                {
-                layout          = EWaitLayout;
-                singular_label  = qtn_bt_searching;
-                animation       = R_QGN_GRAF_WAIT_BAR_ANIM;
-                };
-            }
-        };
-    }
-
-//----------------------------------------------------
-// Information note when maximum number of connections
-// is reached and new one could not be created.
-//----------------------------------------------------
-//
-RESOURCE DIALOG r_bt_busy_note
-    {
-    flags   = EAknInformationNoteFlags;
-    buttons = R_AVKON_SOFTKEYS_EMPTY;
-    items   =
-        {
-        DLG_LINE
-            {
-            type    = EAknCtNote;
-            id      = EBTNotifBtBusyNote;
-            control = AVKON_NOTE
-                {
-                layout          = EGeneralLayout;
-                singular_label  = qtn_bt_busy;
-                animation       = R_QGN_NOTE_INFO_ANIM;
-                };
-            }
-        };
-    }
-
-
-// === ANIMATIONS ============================================================
-
-//----------------------------------------------------
-// Animation for r_bt_searching_devices_popuplist
-//----------------------------------------------------
-//
-RESOURCE BMPANIM_DATA r_bt_animation_for_popuplist
-    {
-    frameinterval   = 200;
-    playmode        = EAknBitmapAnimationPlayModeCycle;
-    bmpfile         = btnotif_bitmap_file_data_caging;
-    frames          = r_bt_animation_for_popuplist_images;
-    }
-
-//----------------------------------------------------
-// Image frames for r_bt_animation_for_popuplist_images
-//----------------------------------------------------
-//
-RESOURCE ARRAY r_bt_animation_for_popuplist_images
-    {
-    items=
-        {
-        BMPANIM_FRAME {bmpid=EMbmBtnotifQgn_note_bt_popup_2;  maskid=EMbmBtnotifQgn_note_bt_popup_2_mask; },
-        BMPANIM_FRAME {bmpid=EMbmBtnotifQgn_note_bt_popup;    maskid=EMbmBtnotifQgn_note_bt_popup_mask;   },
-        BMPANIM_FRAME {bmpid=EMbmBtnotifQgn_note_bt_popup_3;  maskid=EMbmBtnotifQgn_note_bt_popup_3_mask; },
-        BMPANIM_FRAME {bmpid=EMbmBtnotifQgn_note_bt_popup;    maskid=EMbmBtnotifQgn_note_bt_popup_mask;   }
-        };
-    }
-
-//---------------------------------------------------------------
-// Prompts for Remote SIM Access Profile notes
-//----------------------------------------------------------------
-RESOURCE TBUF r_bt_enter_sap_note   	    	{ buf = qtn_bt_wait_sap_entering; }
-
-RESOURCE TBUF r_bt_enter_sap_succeed_note 		{ buf = qtn_bt_sap_entering_succeeded; }
-
-RESOURCE TBUF r_bt_enter_sap_failed_note 		{ buf = qtn_bt_sap_entering_failed; }
-
-RESOURCE TBUF r_bt_min_passkey_prompt 			{ buf = qtn_bt_enter_pk_sap; }
-
-//----------------------------------------------------
-// Data query "Enter Bluetooth name for your phone"
-//----------------------------------------------------
-//
-RESOURCE DIALOG r_bt_enter_local_name_query
-    {
-    flags   = EGeneralQueryFlags;
-    buttons = R_AVKON_SOFTKEYS_OK_EMPTY__OK;
-    items   =
-        {
-        DLG_LINE
-            {
-            type    = EAknCtQuery;
-            id      = EGeneralQuery;
-            control = AVKON_DATA_QUERY
-                {
-                layout  = EDataLayout;
-                label   = qtn_enter_bt_name;
-                control = EDWIN
-                    {
-                    flags     = EEikEdwinNoHorizScrolling | EEikEdwinResizable;
-                    maxlength = KBTUIMaxNameLength;
-                    };
-                };
-            }
-        };
-    }
-// ---------------------------------------------------
-//
-// r_bt_generic_message_query 
-//
-// This is the query blanket used by Generic Message queries.
-// They are java power and java visibility at the time
-// of this writing, but probably in the future there will be
-// others.
-// ---------------------------------------------------
-//
-RESOURCE DIALOG r_bt_generic_message_query 
-    {
-    flags = EGeneralQueryFlags | EEikDialogFlagNoBorder | EEikDialogFlagNoShadow;
-    buttons = R_AVKON_SOFTKEYS_YES_NO__YES;
-    items=
-        {
-		DLG_LINE 
-	        {
-            type = EAknCtPopupHeadingPane;
-            id = EAknMessageQueryHeaderId;
-            control = AVKON_HEADING
-                {
-                };
-            },
-        DLG_LINE
-            {
-            type = EAknCtMessageQuery;
-            id = EAknMessageQueryContentId;
-            control = AVKON_MESSAGE_QUERY
-                {
-                };
-            }
-        };
-    }
-
-//----------------------------------------------------
-// r_bt_generic_query
-//
-// This is the blanket for all the generic yes/no queries, which
-// do NOT use message query. This is not only used by CBTNGenericQueryNotifier
-// but other notifiers such as PinNotifier use also this.
-//
-// NOTE: There is no blanket for empty genric message.
-// It is just based on empty CAknInformationNote.
-//----------------------------------------------------
-//
-RESOURCE DIALOG r_bt_generic_query
-    {
-    flags   = EGeneralQueryFlags;
-    buttons = R_AVKON_SOFTKEYS_YES_NO__YES;
-    items   =
-        {
-        DLG_LINE
-            {
-            type    = EAknCtQuery;
-            id      = EGeneralQuery;
-            control = AVKON_CONFIRMATION_QUERY
-                {
-                layout    = EConfirmationQueryLayout;
-                animation = R_QGN_NOTE_QUERY_ANIM;
-                };
-            }
-        };
-    }    
-       
-//----------------------------------------------------
-// Information note that will be shown when temp 
-// visibility expire.
-//----------------------------------------------------
-//
-RESOURCE TBUF r_bt_hidden_from_others_note			
-	{ 
-		buf = qtn_bt_hidden_from_others; 
-	}
-//----------------------------------------------------
-// Block devices related items
-//----------------------------------------------------
-//
-RESOURCE TBUF r_bt_block_device_header	
-	{
-		buf = qtn_bt_block_device_header;
-	}
-	
-//----------------------------------------------------	
-// Blocking question asked, when the
-// user is asked about blocking a non-paired device.
-//----------------------------------------------------	
-//
-RESOURCE TBUF r_bt_block_device_nohelp
-	{
-		buf= qtn_bt_block_all_conn_attempts;
-	}
-
-//----------------------------------------------------	
-// Blocking question asked, when the
-// user is asked about blocking a paired device.
-//----------------------------------------------------	
-//
-RESOURCE TBUF r_bt_block_paired_device_nohelp
-	{
-		buf= qtn_bt_block_paired_device;
-	}
-	
-//----------------------------------------------------
-// Query for incoming pairing request
-//----------------------------------------------------
-RESOURCE TBUF r_bt_accept_pairing_request
-	{
-		buf=qtn_bt_accept_pairing_request;
-	}
-
-//----------------------------------------------------
-// Information note that will be shown when temp 
-// visibility expire.
-//----------------------------------------------------
-//
-RESOURCE TBUF r_bt_no_device_discovery_voip			{ buf = qtn_bt_no_device_discovery_voip; }
-
-//----------------------------------------------------
-// Information note that will be shown if SIM card
-// is not available while trying SAP connection.
-//----------------------------------------------------
-//
-
-RESOURCE TBUF r_bt_sap_no_sim_note                       { buf = qtn_bt_sap_no_sim; }
-                                                               
-//----------------------------------------------------
-// Information note when maximum number of connections
-// is reached and new one could not be created.
-//----------------------------------------------------
-//
-RESOURCE DIALOG r_bt_turn_bt_off_note
-    {
-    flags   = EGeneralQueryFlags;
-    buttons = R_AVKON_SOFTKEYS_YES_NO__YES;
-    items   =
-        {
-        DLG_LINE
-            {
-            type    = EAknCtQuery;
-            id      = EGeneralQuery;
-            control = AVKON_CONFIRMATION_QUERY
-                {
-                layout    = EConfirmationQueryLayout;
-                animation = R_QGN_NOTE_QUERY_ANIM;
-                label     = qtn_bt_dos_query;
-                };
-            }
-        };
-    }
-  
-   
-//---------------------------------------------------
-// Title for search filter        
-//---------------------------------------------------
-RESOURCE TBUF r_bt_search_filter_popup_title { buf = qtn_bt_search_for; }    
-
-//----------------------------------------------------
-//List item text in search filter
-//----------------------------------------------------
-RESOURCE TBUF r_bt_search_for_all { buf = qtn_bt_search_for_all; }
-RESOURCE TBUF r_bt_search_for_phone { buf = qtn_bt_search_for_phone; }
-RESOURCE TBUF r_bt_search_for_computer { buf = qtn_bt_search_for_computer; }
-RESOURCE TBUF r_bt_search_for_audio { buf = qtn_bt_search_for_audio; }
-RESOURCE TBUF r_bt_search_for_input { buf = qtn_bt_search_for_input; }    
-
-//------------------------------------------------------------
-// query for unblocking selected blocked device
-//------------------------------------------------------------
-RESOURCE DIALOG r_bt_unblock_query
-    {
-    flags   = EGeneralQueryFlags;
-    buttons = R_AVKON_SOFTKEYS_YES_NO__YES;
-    items   =
-        {
-        DLG_LINE
-            {
-            type    = EAknCtQuery;
-            id      = EGeneralQuery;
-            control = AVKON_CONFIRMATION_QUERY
-                {
-                layout    = EConfirmationLayout;
-                animation = R_QGN_NOTE_QUERY_ANIM;
-                };
-            }
-        };
-    }
-
-RESOURCE TBUF r_bt_unblock_device 		{ buf = qtn_bt_unblock_device; }
-
-//----------------------------------------------------
-// Information note for AVRCP 1.3 Battery low info
-//----------------------------------------------------
-//
-RESOURCE TBUF r_bt_accessory_low 		{ buf = qtn_bt_accessory_low; }
-RESOURCE TBUF r_bt_accessory_critical 	{ buf = qtn_bt_accessory_critical; }
-RESOURCE TBUF r_bt_permanently_on        { buf = qtn_bt_permanently_on; }
-RESOURCE TBUF r_bt_switched_on        { buf = qtn_bt_switched_on; }
-RESOURCE TBUF r_bt_switched_off        { buf = qtn_bt_switched_off; }
-
-//----------------------------------------------------
-// SSP NumericComparison and PasskeyEntry
-//----------------------------------------------------
-//
-RESOURCE TBUF r_bt_ssp_passkey_comparison_prompt    { buf = qtn_bt_simple_passkey_comparison; }
-RESOURCE TBUF r_bt_ssp_passkey_entry    { buf = qtn_bt_simple_passkey_entry; }
-
-//----------------------------------------------------
-// Confirmation note "Pairing successfully done with %U"
-//----------------------------------------------------
-//
-RESOURCE TBUF r_bt_succesfully_paired_prompt { buf = qtn_bt_succesfully_paired; }
-
-//----------------------------------------------------
-// Error notes of SSP 
-//----------------------------------------------------
-//
-RESOURCE TBUF r_bt_pairing_failed_prompt { buf = qtn_bt_pairing_failed; }
-RESOURCE TBUF r_bt_ssp_busy { buf = qtn_bt_simple_busy; }
-
-//-----------------------------------------------------------------------------
-// Confirmation note "Authorise this device to make connections automatically?"
-//-----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_bt_authorization_prompt { buf = qtn_bt_authorisation_query; }
-
-// End of File
--- a/bluetoothengine/btnotif/eabi/BTNotifu.DEF	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
-	_Z13NotifierArrayv @ 1 NONAME
-	
--- a/bluetoothengine/btnotif/ecom/101FD68F.rss	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This file specifies the interface and implementation information
-*                 for BTnotif Ecom Plugins.
-*
-*/
-
-
-#include <ecom/registryinfo.rh>
-#include <uikon.hrh>
-
-#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
-#include <uiklaf/private/pluginuid.hrh>
-#endif
-
-RESOURCE REGISTRY_INFO theInfo
-{
-	dll_uid = 0x101FD68F;
-	interfaces =
-	{
-	INTERFACE_INFO
-		{
-		interface_uid = KUikonUidPluginInterfaceNotifiers;
-		implementations =
-				{
-				IMPLEMENTATION_INFO
-					{
-					implementation_uid = 0x101FD690;
-					version_no = 1;
-					display_name = "TTNOTIFY2V2 Plugin 1";
-					default_data = "TTNOTIFY2V2";
-					opaque_data	 = "0";
-					}
-				};
-		}
-	};
-}
--- a/bluetoothengine/btnotif/ecom/BtnotifWrapper.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,223 +0,0 @@
-/*
-* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Methods for BT notifier Ecom Plugins entry point
-*
-*/
-
-
-#include <implementationproxy.h>
-#include <AknNotifierWrapper.h> // link against aknnotifierwrapper.lib
-#include <btmanclient.h>
-#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
-#include <btextnotifiers.h>  	// define btninqnotifer uid
-#else
-#include <btextnotifiers.h>  	// define btninqnotifer uid
-#include <btextnotifierspartner.h>  	// define btninqnotifer uid
-#endif
-#include <btnotif.h>			// notifier id for power mode setting 
-
-// @todo remove this declaration once both stack and UI layers are in codeline
-const TUid KBTUserConfirmationNotifierUidCopyForWrapper={0x2002E224};
-
-
-const TInt KMaxSynchReplyBufLength = 256;  //what should be?
-
-const TUid KBTInquiryChannel            = {0x00000601}; // Channel for inquiry notifier
-const TUid KBTAuthorisationChannel      = {0x00000602}; // Channel for authorisation notifier
-const TUid KBTAuthenticationChannel     = {0x00000603}; // Channel for PIN query notifier
-const TUid KBTObexPINChannel            = {0x00000605}; // Channel for OBEX PIN notifier
-const TUid KBTPowerModeChannel          = {0x00000606}; // Channel for power mode notifier
-const TUid KBTPairedDeviceSettingChannel  = {0x00000610}; // Channel for Visibility timeout notifier
-
-const TInt KBTInquiryPriority 			= MEikSrvNotifierBase2::ENotifierPriorityVHigh;
-const TInt KBTAuthorisationPriority 	= MEikSrvNotifierBase2::ENotifierPriorityVHigh;
-const TInt KBTAuthenticationPriority 	= MEikSrvNotifierBase2::ENotifierPriorityVHigh;
-const TInt KBTObexPinPriority 			= MEikSrvNotifierBase2::ENotifierPriorityVHigh;
-const TInt KBTPowerModePriority 		= MEikSrvNotifierBase2::ENotifierPriorityVHigh;
-const TInt KBTGenericInfoNotifierPriority = MEikSrvNotifierBase2::ENotifierPriorityHigh;
-const TInt KBTGenericQueryNotifierPriority = MEikSrvNotifierBase2::ENotifierPriorityHigh;
-const TInt KBTNumericComparisonPriority     = MEikSrvNotifierBase2::ENotifierPriorityVHigh;  // for SSP
-const TInt KBTPasskeyEntryNotifierPriority = MEikSrvNotifierBase2::ENotifierPriorityVHigh;   // for SSP
-const TInt KBTUserConfirmationNotifierPriority = MEikSrvNotifierBase2::ENotifierPriorityVHigh;   // for SSP
-const TInt KBTPairedDeviceSettingPriority = MEikSrvNotifierBase2::ENotifierPriorityVHigh;   
-const TInt KBTEnterpriseItSecurityInfoNotifierPriority = MEikSrvNotifierBase2::ENotifierPriorityHigh;
-
-const TInt KBTNotifierArrayIncrement = 8;
-
-void CleanupArray(TAny* aArray)
-    {
-    CArrayPtrFlat<MEikSrvNotifierBase2>*     
-        subjects=static_cast<CArrayPtrFlat<MEikSrvNotifierBase2>*>(aArray);
-    TInt lastInd = subjects->Count()-1;
-    for (TInt i=lastInd; i >= 0; i--)
-        subjects->At(i)->Release();	    	    
-    delete subjects;
-    }
-
-CArrayPtr<MEikSrvNotifierBase2>* DoCreateNotifierArrayL()
-    {   	
-
-    CArrayPtrFlat<MEikSrvNotifierBase2>* subjects=
-        new (ELeave)CArrayPtrFlat<MEikSrvNotifierBase2>(KBTNotifierArrayIncrement);
-    
-    CleanupStack::PushL(TCleanupItem(CleanupArray, subjects));
-
-    // Create Wrappers
-
-    // Session owning notifier(if default implementation is enough)
-                                   
-    CAknCommonNotifierWrapper* master = 
-        CAknCommonNotifierWrapper::NewL( KDeviceSelectionNotifierUid,
-                                   KBTInquiryChannel,
-                                   KBTInquiryPriority,
-                                   _L("BTNotif.dll"),
-                                   KMaxSynchReplyBufLength);
-
-    CleanupStack::PushL( master );
-    subjects->AppendL( master );
-    CleanupStack::Pop( master );
-
-    // Notifiers using masters session
-    CAknNotifierWrapperLight* notif = NULL;
-    notif = new (ELeave) CAknNotifierWrapperLight(*master,
-                                                  KBTManAuthNotifierUid,
-                                                  KBTAuthorisationChannel,
-                                                  KBTAuthorisationPriority);
-    CleanupStack::PushL( notif );
-    subjects->AppendL( notif );
-    CleanupStack::Pop( notif );
-
-    notif = new (ELeave) CAknNotifierWrapperLight(*master,
-                                                  KBTPinCodeEntryNotifierUid,
-                                                  KBTAuthenticationChannel,
-                                                  KBTAuthenticationPriority);
-    CleanupStack::PushL( notif );
-    subjects->AppendL( notif );
-    CleanupStack::Pop( notif );
-
-    notif = new (ELeave) CAknNotifierWrapperLight(*master,
-                                                  KBTObexPasskeyQueryNotifierUid,
-                                                  KBTObexPINChannel,
-                                                  KBTObexPinPriority);
-    CleanupStack::PushL( notif );
-    subjects->AppendL( notif );
-    CleanupStack::Pop( notif );
-
-    notif = new (ELeave) CAknNotifierWrapperLight(*master,
-                                                  KPowerModeSettingNotifierUid,
-                                                  KBTPowerModeChannel,
-                                                  KBTPowerModePriority);
-    CleanupStack::PushL( notif );
-    subjects->AppendL( notif );
-    CleanupStack::Pop( notif );
-
-    notif = new (ELeave) CAknNotifierWrapperLight(*master,
-                                                  KBTGenericInfoNotifierUid,
-                                                  KBTGenericInfoNotifierUid,
-                                                  KBTGenericInfoNotifierPriority);
-    CleanupStack::PushL( notif );
-    subjects->AppendL( notif );
-    CleanupStack::Pop( notif );
-
-    notif = new (ELeave) CAknNotifierWrapperLight(*master,
-                                                  KBTGenericQueryNotifierUid,
-                                                  KBTGenericQueryNotifierUid,
-                                                  KBTGenericQueryNotifierPriority);
-    CleanupStack::PushL( notif );
-    subjects->AppendL( notif );
-    CleanupStack::Pop( notif );
-
-    notif = new (ELeave) CAknNotifierWrapperLight(*master,
-                                                  KPbapAuthNotifierUid,
-                                                  KBTObexPINChannel,
-                                                  KBTObexPinPriority);
-    CleanupStack::PushL( notif );
-    subjects->AppendL( notif );
-    CleanupStack::Pop( notif );
-
-    notif = new (ELeave) CAknNotifierWrapperLight(*master,
-                                                  KBTPairedDeviceSettingNotifierUid,
-                                                  KBTPairedDeviceSettingChannel,
-                                                  KBTPairedDeviceSettingPriority);
-    CleanupStack::PushL( notif );
-    subjects->AppendL( notif );
-    CleanupStack::Pop( notif );
-
-    notif = new (ELeave) CAknNotifierWrapperLight(*master,
-                                                  KBTNumericComparisonNotifierUid,
-                                                  KBTNumericComparisonNotifierUid,
-                                                  KBTNumericComparisonPriority);
-    CleanupStack::PushL( notif );
-    subjects->AppendL( notif );
-    CleanupStack::Pop( notif );
-
-    notif = new (ELeave) CAknNotifierWrapperLight(*master,
-                                                  KBTPasskeyDisplayNotifierUid,
-                                                  KBTPasskeyDisplayNotifierUid,
-                                                  KBTPasskeyEntryNotifierPriority);
-    CleanupStack::PushL( notif );
-    subjects->AppendL( notif );
-    CleanupStack::Pop( notif );
-
-    notif = new (ELeave) CAknNotifierWrapperLight(*master,
-                                                  KBTUserConfirmationNotifierUidCopyForWrapper,
-                                                  KBTUserConfirmationNotifierUidCopyForWrapper,
-                                                  KBTUserConfirmationNotifierPriority);
-    CleanupStack::PushL( notif );
-    subjects->AppendL( notif );
-    CleanupStack::Pop( notif );    
-    
-    notif = new (ELeave) CAknNotifierWrapperLight(*master,
-                                                  KBTEnterpriseItSecurityInfoNotifierUid,
-                                                  KBTEnterpriseItSecurityInfoNotifierUid,
-                                                  KBTEnterpriseItSecurityInfoNotifierPriority);
-
-    CleanupStack::PushL( notif );
-    subjects->AppendL( notif );
-    CleanupStack::Pop( notif );
-
-    CleanupStack::Pop();	// array cleanup
-    return(subjects);
-    }
-
-
-CArrayPtr<MEikSrvNotifierBase2>* NotifierArray()
-    // old Lib main entry point
-    {   	   	
-    
-    CArrayPtr<MEikSrvNotifierBase2>* array = 0;
-    TRAPD(ignore, array = DoCreateNotifierArrayL());
-    if (ignore != KErrNone) 
-    	{
-    	ignore = KErrNone;
-    	}
-    return array;
-    }
-
-const TImplementationProxy ImplementationTable[] =
-	{
-#ifdef __EABI__
-	{{0x101FD690},(TFuncPtr)NotifierArray}
-#else
-	{{0x101FD690},NotifierArray}
-#endif
-	};
-
-EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
-	{   	
-	
-	aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy) ;
-	return ImplementationTable;
-	}
-
--- a/bluetoothengine/btnotif/ecom/BtnotifWrapper.mmp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/*
-* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This is project specification file for the BTNotif Ecom Plugins.
-*
-*/
-
-
-#include <platform_paths.hrh>
-
-TARGET         	btnotifwrapper.DLL
-CAPABILITY 		CAP_ECOM_PLUGIN
-TARGETTYPE 		PLUGIN 
-
-VENDORID		VID_DEFAULT
-
-UID				0x10009D8D 0x101FD68F
-
-SOURCEPATH	    .
-USERINCLUDE		../inc
-
-
-SYSTEMINCLUDE   /epoc32/include/ecom
-MW_LAYER_SYSTEMINCLUDE
-
-
-
-LANG         	SC
-SOURCE  		BtnotifWrapper.cpp 
-START RESOURCE 101FD68F.rss 
-TARGET btnotifwrapper.rsc
-END
-
-LIBRARY 		ECOM.LIB
-LIBRARY			AKNNOTIFIERWRAPPER.LIB
-LIBRARY 		EUSER.LIB
--- a/bluetoothengine/btnotif/group/BTNotif.mmp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This is project specification file for the BTNotif.
-*
-*/
-
-#include <platform_paths.hrh>
-#include <data_caging_paths.hrh>
-
-TARGET          BTNotif.dll
-TARGETTYPE      DLL
-UID             0x101fdfae 0x10005953 
-TARGETPATH      SHARED_LIB_DIR
-
-VENDORID         VID_DEFAULT
-SOURCEPATH      ../src
-SOURCE          BTNMain.cpp
-SOURCE          BTNotifier.cpp
-SOURCE          BTNAuthNotifier.cpp
-SOURCE          BTNPinNotifier.cpp
-SOURCE          BTNInqNotifier.cpp
-SOURCE          BTNInqUI.cpp
-SOURCE          BTNInquiAO.cpp
-SOURCE          BTNObexPinNotifier.cpp
-SOURCE          BTNPwrNotifier.cpp
-SOURCE          BTNGenericInfoNotifier.cpp
-SOURCE          BTNGenericQueryNotifier.cpp
-SOURCE          BTNPBAPPinNotifier.cpp
-SOURCE          btnpaireddevsettnotifier.cpp
-SOURCE          btnssppasskeyentrynotifier.cpp
-SOURCE          btnumcmpnotifier.cpp
-SOURCE          btuserconfnotifier.cpp
-SOURCE          btnotifuiutil.cpp
-SOURCE          btnotifactive.cpp
-SOURCE          btnpairnotifier.cpp
-SOURCE          btnotifnameutils.cpp
-SOURCE          btnenterpriseitsecurityinfonotifier.cpp
-
-START RESOURCE        ../data/BTNotif.rss
-HEADER
-TARGETPATH      RESOURCE_FILES_DIR
-LANGUAGE_IDS
-END
-
-USERINCLUDE       ../inc
-SYSTEMINCLUDE     ../../inc     //for private API headers (BluetoothEngine subsystem)
-SYSTEMINCLUDE     ../../../inc  //for internal API headers (localconnectivity)
-APP_LAYER_SYSTEMINCLUDE         // Standard system include paths
-
-LIBRARY euser.lib cone.lib                  // Symbian OS framework libraries
-LIBRARY avkon.lib                           // UI library
-LIBRARY bafl.lib                            // Basic Application Framework Library
-LIBRARY bluetooth.lib                       // Bluetooth libraries
-LIBRARY btdevice.lib                        // Bluetooth library
-LIBRARY btextnotifiers.lib                  // Bluetooth library
-
-//Bteng New APIs
-LIBRARY btengdevman.lib                     //btengdevman.dll
-LIBRARY btengsettings.lib                   //btengsettings.dll
-LIBRARY btengconnman.lib                    //btengconnman.dll
-
-LIBRARY commonengine.lib                    // Series 60 common components library
-LIBRARY charconv.lib                        // Character conversion library
-LIBRARY eikcoctl.lib eiksrv.lib             // Eikon libraries
-LIBRARY eikcore.lib                         // Library for eikonEnv static functions (BringForwards)
-LIBRARY eiksrvui.lib                        // Eikon server ui (for suppressing app -key)
-LIBRARY esock.lib                           // Sockects library for host resolver
-LIBRARY AknSkins.lib                        // Skinned icons
-LIBRARY aknicon.lib
-LIBRARY aknNotifierWrapper.lib
-LIBRARY centralrepository.lib               // Central Repository
-LIBRARY	egul.lib 
-LIBRARY CdlEngine.lib AknLayout2.lib
-LIBRARY btmanclient.lib                     // reguired by TBTRegistrySearch 
-LIBRARY hlplch.lib                          // required by help callback
-
-// For cover display support:
-LIBRARY eikdlg.lib
-LIBRARY estor.lib
-LIBRARY FeatMgr.lib
-LIBRARY	efsrv.lib
-LIBRARY etul.lib
-
-DEBUGLIBRARY flogger.lib                    // File logging services
-
-//Optional for codewarrior ide
-//DOCUMENT data/BTNotif.rss
-//DOCUMENT BTNotif.loc
-
-CAPABILITY      CAP_GENERAL_DLL
-// End of File
--- a/bluetoothengine/btnotif/group/btnotif_icons_dc.mk	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-#
-# Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-#
-
-ifeq (WINS,$(findstring WINS, $(PLATFORM)))
-ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\z
-else
-ZDIR=\epoc32\data\z
-endif
-
-# ----------------------------------------------------------------------------
-# TODO: Configure these
-# ----------------------------------------------------------------------------
-
-TARGETDIR=$(ZDIR)\resource\apps
-ICONTARGETFILENAME=$(TARGETDIR)\btnotif.mif
-
-HEADERDIR=\epoc32\include
-HEADERFILENAME=$(HEADERDIR)\btnotif.mbg
-
-do_nothing :
-	@rem do_nothing
-
-MAKMAKE : do_nothing
-
-BLD : do_nothing
-
-CLEAN : do_nothing
-
-LIB : do_nothing
-
-CLEANLIB : do_nothing
-
-# ----------------------------------------------------------------------------
-# TODO: Configure these.
-#
-# NOTE 1: DO NOT DEFINE MASK FILE NAMES! They are included automatically by
-# MifConv if the mask detph is defined.
-#
-# NOTE 2: Usually, source paths should not be included in the bitmap
-# definitions. MifConv searches for the icons in all icon directories in a
-# predefined order, which is currently \s60\icons, \s60\bitmaps2, \s60\bitmaps.
-# The directory \s60\icons is included in the search only if the feature flag
-# __SCALABLE_ICONS is defined.
-# ----------------------------------------------------------------------------
-
-RESOURCE :
-	mifconv $(ICONTARGETFILENAME) /h$(HEADERFILENAME) \
-		/c8,8 qgn_note_bt_popup.bmp \
-		/c8,8 qgn_note_bt_popup_2.bmp \
-		/c8,8 qgn_note_bt_popup_3.bmp \
-		/c8,8 qgn_indi_bt_blocked.svg
-
-FREEZE : do_nothing
-
-SAVESPACE : do_nothing
-
-RELEASABLES :
-	@echo $(HEADERFILENAME)&& \
-	@echo $(ICONTARGETFILENAME)
-
-FINAL : do_nothing
-  
\ No newline at end of file
--- a/bluetoothengine/btnotif/group/btnotifsrv.mmp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btnotif/group/btnotifsrv.mmp	Mon Jul 12 18:51:05 2010 +0300
@@ -42,7 +42,9 @@
 SOURCE                  btnotifbasepairinghandler.cpp 
 SOURCE                  btnotifincomingpairinghandler.cpp 
 SOURCE                  btnotifoutgoingpairinghandler.cpp 
-SOURCE                  btnotifpairingmanager.cpp
+SOURCE                  btnotifsecuritymanager.cpp
+SOURCE                  btnotifserviceauthorizer.cpp
+SOURCE                  btnotifutil.cpp
 
 USERINCLUDE             ../btnotifsrv/inc ../inc
 
@@ -65,3 +67,4 @@
 LIBRARY                 commonengine.lib
 LIBRARY					flogger.lib
 LIBRARY					charconv.lib
+
--- a/bluetoothengine/btnotif/inc/BTNGenericInfoNotifier.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,103 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declares generic information notifier class.
-*
-*/
-
-
-#ifndef BTNGENERICINFONNOTIFIER_H
-#define BTNGENERICINFONNOTIFIER_H
-
-// INCLUDES
-
-#include "btnotifier.h" // Base class
-
-// FORWARD DECLARATIONS
-class CAknInformationNote;
-
-// CLASS DECLARATION
-NONSHARABLE_CLASS(CBTGenericInfoNotifier) : public CBTNotifierBase
-    {
-    public: // Constructors and destructor
-
-        /**
-        * Two-phased constructor.
-        */
-        static CBTGenericInfoNotifier* NewL();
-
-        /**
-        * Destructor.
-        */
-        virtual ~CBTGenericInfoNotifier();
-
-    private: // Functions from base classes
-
-        /**
-        * From CBTNotifierBase Called when a notifier is first loaded 
-        * to allow any initial construction that is required.
-        * @param None.
-        * @return A structure containing priority and channel info.
-        */
-        TNotifierInfo RegisterL();
-        
-        /** From CBTNotifierBase Synchronic notifier launch.        
-        * @param aBuffer Received parameter data.
-        * @return A pointer to return value.
-        */
-        TPtrC8 StartL(const TDesC8& aBuffer );
-
-        /**
-        * From CBTNotifierBase Used in asynchronous notifier launch to 
-        * store received parameters into members variables and 
-        * make needed initializations.
-        * @param aBuffer A buffer containing received parameters
-        * @param aReturnVal The return value to be passed back.
-        * @param aMessage Should be completed when the notifier is deactivated.
-        * @return None.
-        */
-        void GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage);
- 
-        /**
-        * From CBTNotifierBase
-        */      
-        void HandleGetDeviceCompletedL(const CBTDevice* aDev);        
-
-    private:
-    
-		/**
-        * Parse the data out of the message that is sent by the client of the notifier. 
-		* @param aBuffer A package buffer containing received parameters.
-        * @return None.
-        */
-		void ProcessParamBufferL(const TDesC8& aBuffer, TBool aSyncCall);
-		
-        /**
-        * C++ default constructor.
-        */
-        CBTGenericInfoNotifier();
-
-        /**
-         * Show Information note and complete message. 
-         */
-        void ShowNoteAndCompleteL(TBool aSyncCall);
-        
-    private:
-        RBuf	iQueryMessage;
-	    TInt 	iMessageResourceId;
-	    TSecondaryDisplayBTnotifDialogs iSecondaryDisplayCommand;
-    };
-
-#endif
-
-// End of File
--- a/bluetoothengine/btnotif/inc/BTNGenericQueryNotifier.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declares Generic Query Notifier Class.
-*
-*/
-
-
-#ifndef BTNGENERICQUERYNOTIFIER_H
-#define BTNGENERICQUERYNOTIFIER_H
-
-// INCLUDES
-
-#include "btnotifier.h" // Base class
-
-// FORWARD DECLARATIONS
-
-// CLASS DECLARATION
-NONSHARABLE_CLASS(CBTGenericQueryNotifier) : public CBTNotifierBase
-    {
-    public: // Constructors and destructor
-
-        /**
-        * Two-phased constructor.
-        */
-        static CBTGenericQueryNotifier* NewL();
-
-        /**
-        * Destructor.
-        */
-        virtual ~CBTGenericQueryNotifier();
-
-    private: // Functions from base classes
-
-        /**
-        * From CBTNotifierBase Called when a notifier is first loaded 
-        * to allow any initial construction that is required.
-        * @param None.
-        * @return A structure containing priority and channel info.
-        */
-        TNotifierInfo RegisterL();
-       
-        /** From CBTNotifierBase Synchronic notifier launch.        
-        * @param aBuffer Received parameter data.
-        * @return A pointer to return value.
-        */
-        TPtrC8 StartL(const TDesC8& aBuffer );
-                
-        /**
-        * From CBTNotifierBase Used in asynchronous notifier launch to 
-        * store received parameters into members variables and 
-        * make needed initializations.
-        * @param aBuffer A buffer containing received parameters
-        * @param aReturnVal The return value to be passed back.
-        * @param aMessage Should be completed when the notifier is deactivated.
-        * @return None.
-        */
-        void GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage);
-
-		/**
-        * From CBTNotifierBase Updates a currently active notifier.
-        * @param aBuffer The updated data.
-        * @return A pointer to return value.
-        */
-        TPtrC8 UpdateL(const TDesC8& aBuffer);
-        
-    private:
-
-		/**
-        * Parse the data out of the message that is sent by the client of the notifier. 
-		* @param aBuffer A package buffer containing received parameters.
-        * @return None.
-        */
-		void ProcessParamBufferL(const TDesC8& aBuffer);
-		
-        /**
-        * C++ default constructor.
-        */
-        CBTGenericQueryNotifier();   
-        
-        /**
-         * Show query and complete message.
-         */
-        void ShowQueryAndCompleteL();
-                
-    private:
-    	
-        RBuf				iQueryMessage;
-		HBufC*				iQueryHeader;
-        HBufC*				iName;
-
-	    TInt 		iMessageResourceId;
-	    TSecondaryDisplayBTnotifDialogs	iSecondaryDisplayCommand;
-		TBool 		iIsMessageQuery;
-		TBool 		iIsNameQuery;
-    };
-
-#endif
-
-// End of File
--- a/bluetoothengine/btnotif/inc/bluetoothdevicedialogs.h	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btnotif/inc/bluetoothdevicedialogs.h	Mon Jul 12 18:51:05 2010 +0300
@@ -41,6 +41,7 @@
     EPairingSuccess,
     EPairingFailure,
     EVisibilityTimeout,
+    EUnpairedDevice,
     EUnusedResource	// The last ID
     };
 
@@ -65,7 +66,9 @@
         EMoreDevice,
         EDeviceSearch,
         ESend,
-        EGlobalNotif
+        EGlobalNotif,
+        EUserAuthorization,
+        EReceiveProgress
         };
 
     /**  Enumeration for the notification parameters data type to be configured. */
@@ -78,6 +81,15 @@
         EDialogTitle,
         EDialogExt  // Id for first data type of derived class.
         };
+    
+    /** Enumeration for the notification dialog heading type. */
+    enum TDialogTitleDataType
+        {
+        EReceive,
+        EReceiveFromPairedDevice,
+        EConnect,
+        EPairingRequest
+        };
 
     inline TBluetoothDialogParams();
 
@@ -123,7 +135,10 @@
         EDeviceName,
         EDeviceClass,
         EAdditionalInt,
-        EAdditionalDesc
+        EAdditionalDesc,
+        EReceivingFileName,
+        EReceivingFileSize,
+        EReceivedFileCount
         };
 
     inline TBluetoothDeviceDialog();
--- a/bluetoothengine/btnotif/inc/btNotifDebug.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,107 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This file defines logging macros for BT Notifiers
-*
-*/
-
-
-#ifndef BTNOTIF_DEBUG_H
-#define BTNOTIF_DEBUG_H
-
-
-#ifdef _DEBUG
-
-#include <e32svr.h>
-#include <e32std.h>
-
-// ===========================================================================
-#ifdef __WINS__     // File logging for WINS
-// ===========================================================================
-#define FLOG(a)   { FPrint(a); }
-#define FTRACE(a) { a; }
-
-#include <f32file.h>
-#include <flogger.h>
-
-_LIT(KLogFile,"btnotiflog.txt");
-_LIT(KLogDirFullName,"c:\\logs\\bt\\");
-_LIT(KLogDir,"BT");
-
-// Declare the FPrint function
-inline void FPrint(const TRefByValue<const TDesC> aFmt, ...)
-    {
-    VA_LIST list;
-    VA_START(list,aFmt);
-    RFileLogger::WriteFormat(KLogDir, KLogFile, EFileLoggingModeAppend, aFmt, list);
-    }
-
-inline void FPrint(TRefByValue<const TDesC8> aFmt, ...)
-    {
-
-    VA_LIST list;
-    VA_START(list, aFmt);
-    TBuf8<256> buf8;
-    buf8.AppendFormatList(aFmt, list);
-
-    TBuf16<256> buf16(buf8.Length());
-    buf16.Copy(buf8);
-    RFileLogger::WriteFormat(KLogDir, KLogFile, EFileLoggingModeAppend, buf16);
-    }
-
-// ===========================================================================
-#else               // RDebug logging for target HW
-// ===========================================================================
-#define FLOG(a) { RDebug::Print(a);  }
-#define FTRACE(a) { a; }
-
-inline void FPrint(const TRefByValue<const TDesC16> aFmt, ...)
-    {
-    VA_LIST list;
-    VA_START(list,aFmt);
-    TInt tmpInt = VA_ARG(list, TInt);
-    TInt tmpInt2 = VA_ARG(list, TInt);
-    TInt tmpInt3 = VA_ARG(list, TInt);
-    VA_END(list);
-    RDebug::Print(aFmt, tmpInt, tmpInt2, tmpInt3);
-    }
-
-inline void FPrint(TRefByValue<const TDesC8> aFmt, ...)
-    {
-
-	VA_LIST list;
-	VA_START(list, aFmt);
-    TBuf8<256> buf8;
-	buf8.AppendFormatList(aFmt, list);
-
-    TBuf16<256> buf16(buf8.Length());
-    buf16.Copy(buf8);
-
-    TRefByValue<const TDesC> tmpFmt(_L("%S"));
-    RDebug::Print(tmpFmt, &buf16);
-    }
-
-#endif //__WINS__
-
-// ===========================================================================
-#else // // No loggings --> Reduced binary size
-// ===========================================================================
-#define FLOG(a)
-#define FTRACE(a)
-
-#endif // _DEBUG
-
-
-#endif // BTNOTIF_DEBUG_H
-
-// End of File
--- a/bluetoothengine/btnotif/inc/btnauthnotifier.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,166 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declares authorisation notifier class.
-*
-*/
-
-
-#ifndef BTNAUTHNOTIFIER_H
-#define BTNAUTHNOTIFIER_H
-
-// INCLUDES
-
-#include "btnotifier.h" // Base class
-#include "btnotiflock.h"
-#include "btnotifactive.h"
-#include <btdevice.h>
-#include <e32property.h>
-
-// FORWARD DECLARATIONS
-
-// CLASS DECLARATION
-NONSHARABLE_CLASS(CBTAuthNotifier): public CBTNotifierBase, public MBTNotifActiveObserver
-    {
-    public: // Constructors and destructor
-
-        /**
-        * Two-phased constructor.
-        */
-        static CBTAuthNotifier* NewL();
-
-        /**
-        * Destructor.
-        */
-        virtual ~CBTAuthNotifier();
-
-    private: // Functions from base classes
-
-        /**
-        * From CBTNotifierBase Called when a notifier is first loaded.        
-        * @param None.
-        * @return A structure containing priority and channel info.
-        */
-        TNotifierInfo   RegisterL();
-
-        /**
-        * From CBTNotifierBase Updates a currently active notifier.
-        * @param aBuffer The updated data.
-        * @return A pointer to return value.
-        */
-        TPtrC8 UpdateL(const TDesC8& aBuffer);
-
-        /**
-        * From CBTNotifierBase The notifier has been deactivated 
-        * so resources can be freed and outstanding messages completed.
-        * @param None.
-        * @return None.
-        */
-        void Cancel();
-
-        
-        /**
-        * From CBTNotifierBase Used in asynchronous notifier launch to 
-        * store received parameters into members variables and 
-        * make needed initializations.
-        * @param aBuffer A buffer containing received parameters
-        * @param aReturnVal The return value to be passed back.
-        * @param aMessage Should be completed when the notifier is deactivated.
-        * @return None.
-        */
-        void GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage);
-
-        /**
-        * From CBTNotifierBase
-        */      
-        void HandleGetDeviceCompletedL(const CBTDevice* aDev);        
-        
-        /**
-         * From MBTNotifActiveObserver
-         * Gets called when P&S key notifies change.
-         */
-        void RequestCompletedL( CBTNotifActive* aActive, TInt aId, TInt aStatus );
-        
-        /**
-         * From MBTNotifActiveObserver
-         */
-        void HandleError( CBTNotifActive* aActive, TInt aId, TInt aError );
-        
-        /**
-         * From MBTNotifActiveObserver
-         */
-        void DoCancelRequest( CBTNotifActive* aActive, TInt aId );
-
-    private:
-
-        /** Checks if the notifier should be replied automatically and not shown to user.
-		 *
-		 *@the device
-		 *@ return TRUE if the notifier should be replied immediately yes or no, without showing query.
-		 */
-		TBool GetByPassAudioNotifier(const TBTDevAddr& aDevice,TBool& aAccept);
-		
-		/**
-		 *@param aAccepted. ETrue if user accepted the incoming audio connection. EFalse if not.
-		 *@param aDeviceAddress. The address of the device that attempted audio connection. 
-		 */
-		void MemorizeCurrentAudioAttempt(const TBool aAccept,const TBTDevAddr& aDeviceAddress);
-		
-        /**
-        * C++ default constructor.
-        */
-        CBTAuthNotifier();
-
-        /**
-         * Ask user's response for authorization query
-         */
-        void ShowAuthoQueryL();
-        
-        /**
-         * After user rejects authorization, provide user the chance to turn BT off
-         * if it is a within a threshold. Query block the device according to logic of 
-         * "second time for the same paired device". 
-         */
-        void DoRejectAuthorizationL();
-        
-        /**
-         * Subscribe to P&S Key and check its value
-         */
-        void CheckAndSubscribeNotifLocks();
-        
-    private: // Data definitions
-
-        enum TBTAuthState
-            {
-            EBTNormalAuthorisation,                     // Normal authorisation
-            EBTAutoAuthorisation,                       // Automated Authorisation
-            EBTAutoAuthorisationNotAuthorisedOnPhone,   
-            EBTObexAuthorisation,                   // Obex authorisation for non paired devices
-            EBTObexAuthForPairedDevice             // Obex authorisation for paired devices
-           
-            };
-
-    private: // Data
-
-        TBTAuthState    iAuthState;             // Authorisation state
-        TInt            iStrResourceId;
-        TSecondaryDisplayBTnotifDialogs iCoverUiDlgId;
-		TUint			iServiceUid;
-		TBool           iSuspended;
-		RProperty       iNotifLockProp;
-		CBTNotifActive* iLockActive;    
-    };
-
-#endif
-
-// End of File
--- a/bluetoothengine/btnotif/inc/btnenterpriseitsecurityinfonotifier.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declares generic information notifier class.
-*
-*/
-
-#ifndef BTNENTERPRISEITSECURITYINFONNOTIFIER_H
-#define BTNENTERPRISEITSECURITYINFONNOTIFIER_H
-
-// INCLUDES
-#include "btnotifier.h" // Base class
-
-// CLASS DECLARATION
-NONSHARABLE_CLASS(CBTEnterpriseItSecurityInfoNotifier) : public CBTNotifierBase
-    {
-public:		// Constructors and destructor
-	/**
-	* Two-phased constructor.
-	*/
-	static CBTEnterpriseItSecurityInfoNotifier* NewL();
-
-	/**
-	* Destructor.
-	*/
-	virtual ~CBTEnterpriseItSecurityInfoNotifier();
-
-private:	// Functions from base classes
-	/**
-	* From CBTNotifierBase Called when a notifier is first loaded 
-	* to allow any initial construction that is required.
-	* @param None.
-	* @return A structure containing priority and channel info.
-	*/
-	TNotifierInfo RegisterL();
-	
-	/** From CBTNotifierBase Synchronic notifier launch.        
-	* @param aBuffer Received parameter data.
-	* @return A pointer to return value.
-	*/
-	TPtrC8 StartL(const TDesC8& aBuffer);
-
-	/**
-	* From CBTNotifierBase Used in asynchronous notifier launch to 
-	* store received parameters into members variables and 
-	* make needed initializations.
-	* @param aBuffer A buffer containing received parameters
-	* @param aReturnVal The return value to be passed back.
-	* @param aMessage Should be completed when the notifier is deactivated.
-	* @return None.
-	*/
-	void GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage);
-
-	/**
-	* From CBTNotifierBase
-	*/      
-	void HandleGetDeviceCompletedL(const CBTDevice* aDev);        
-
-private:
-	/**
-	* C++ default constructor.
-	*/
-	CBTEnterpriseItSecurityInfoNotifier();
-
-	/**
-	 * Show Information note and complete message. 
-	 */
-	void ShowNoteAndCompleteL();
-    };
-
-#endif	//BTNENTERPRISEITSECURITYINFONNOTIFIER_H
-
-// End of File
--- a/bluetoothengine/btnotif/inc/btninqnotifier.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,100 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declares Bluetooth device inquiry notifier class.
-*
-*/
-
-
-#ifndef BTNINQNOTIFIER_H
-#define BTNINQNOTIFIER_H
-
-// INCLUDES
-
-#include "btnotifier.h" // Base class
-#include "btninqui.h"
-#include <btextnotifiers.h> // Bluetooth notifiers API
-
-// FORWARD DECLARATIONS
-  
-// CLASS DECLARATION
-/**
-* This class is used in Bluetooth device search.
-*/
-NONSHARABLE_CLASS(CBTInqNotifier): public CBTNotifierBase, public MBTNDeviceSearchObserver
-    {
-    public: // Constructors and destructor
-
-        /**
-        * Two-phased constructor.
-        */
-        static CBTInqNotifier* NewL();
-
-        /**
-        * Destructor.
-        */
-        virtual ~CBTInqNotifier();
-               
-        
-    private: // Functions from base classes
-        /**
-        * From CBTNotifierBase Called when a notifier is first loaded.        
-        * @param None.
-        * @return A structure containing priority and channel info.
-        */
-        TNotifierInfo RegisterL();
-
-        /**
-        * From CBTNotifierBase The notifier has been deactivated 
-        * so resources can be freed and outstanding messages completed.
-        * @param None.
-        * @return None.
-        */
-        void Cancel();
-
-        /**
-        * From CBTNotifierBase Used in asynchronous notifier launch to 
-        * store received parameters into members variables and 
-        * make needed initializations.
-        * @param aBuffer A buffer containing received parameters
-        * @param aReturnVal The return value to be passed back.
-        * @param aMessage Should be completed when the notifier is deactivated.
-        * @return None.
-        */
-        void GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage);
-		
-        /**
-         * From MBTNDeviceSearchObserver Called when device search and selection completes.
-         * @param aErr Error code
-         * @param aDevice Response parameters to caller
-         *                  defined in epoc32\include\btextnotifiers.h
-         */
-        void NotifyDeviceSearchCompleted(TInt aErr, const TBTDeviceResponseParams& aDevice = TBTDeviceResponseParams());
-        
-    private:
-
-        /**
-        * C++ default constructor.
-        */
-        CBTInqNotifier();
-
-        void LaunchInquiryL(const TBTDeviceClass& aDesiredDevice);
-        
-    private: // Data
-
-        CBTInqUI*       iUi;                    // User interface module
-    };
-
-#endif
-
-// End of File
--- a/bluetoothengine/btnotif/inc/btninqui.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,355 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declares Bluetooth device inquiry user interface class.
-*
-*/
-
-
-#ifndef BTNINQUI_H
-#define BTNINQUI_H
-
-// INCLUDES
-
-#include <btextnotifiers.h> // Bluetooth notifiers API
-#include <badesca.h>        // For array handling
-#include <AknIconArray.h>
-#include "btnotifactive.h"      // Active Object Helper class for inquiry
-#include <bt_sock.h>
-#include <btengdevman.h>
-#include "btnotifier.h"
-
-const TInt KPeriodicTimerInterval4Sec(4000000);
-
-
-// FORWARD DECLARATIONS
-
-class CAknStaticNoteDialog;
-class CAknSingleGraphicPopupMenuStyleListBox;
-class CAknPopupList;
-class CAknQueryDialog;
-class CBTInqNotifier;
-
-// CONSTANTS
-enum TSearchFlowState
-    {
-    ESearchCompleted,  // search completed for any reason, end of UI flow.
-    ESearchAgain,      // no device found, user wants to search again.
-    ESearchFirstDeviceFound, // the first device is found, show found device list.
-    };   
-
-// CLASS DECLARATION
-/**
- *  Class MBTNDeviceSearchObserver
- *
- *  Callback class to notify device searching completed. 
- */
-class MBTNDeviceSearchObserver
-    {
-public:
-
-    /**
-     * Callback to notify that the device search request has completed.
-     *
-     * @since S60 5.1
-     * @param aErr Error code
-     * @param aDevice Pckgbuf to retrieve the response from the device selection.
-     */
-    virtual void NotifyDeviceSearchCompleted(TInt aErr, 
-            const TBTDeviceResponseParams& aDevice = TBTDeviceResponseParams()) = 0;
-    };
-
-/**
-* A helper class used in Bluetooth device search.
-* This class is responsible of the UI activity.
-*/
-NONSHARABLE_CLASS(CBTInqUI) : public CBase, public MBTEngDevManObserver, public MBTNotifActiveObserver
-    {
-    public: // Constructor and destructor
-        /**
-        * C++ default constructor.
-        */
-        CBTInqUI( MBTNDeviceSearchObserver* aObserver,
-                CBTNotifUIUtil* aUtil, const TBTDeviceClass& aDesiredDevClass);
-
-        /**
-        * The 2nd phase constructor is required to do Asyncronous operations,
-        * So the readiness of the CBTInqUI is notified Asynchronously to the caller
-        */
-        void ConstructL();     
-        
-        /**
-        * Destructor.
-        */
-        virtual ~CBTInqUI();
-
-    public: // New functions
-
-        /**
-        * Cancels all inquiry activity.
-        */
-        void Cancel();
-        
-        /**
-        * Issues a device inquiry request.
-        * @param None.
-        * @return None.
-        */
-        void IssueRequestL();
-
-        /**
-         * Check if Eir device name available.
-         * @param TNameEntry    Decode it to get device name
-         * @param TBTDeviceName Device name returned
-         * @return ETrue if Eir data contains name.
-         */
-        static TBool CheckEirDeviceName( TNameEntry& aEntry, TBTDeviceName& aName );
-
-    private: // Functions from base classes
-        
-        /**
-         * From MBTNotifActiveObserver
-         */
-        void RequestCompletedL( CBTNotifActive* aActive, TInt aId, TInt aStatus );
-        
-        /**
-         * From MBTNotifActiveObserver
-         */
-        void HandleError( CBTNotifActive* aActive, TInt aId, TInt aError );
-        
-        /**
-         * From MBTNotifActiveObserver
-         */
-        void DoCancelRequest( CBTNotifActive* aActive, TInt aId );
-        
-        /**
-         * From MBTEngDevManObserver
-         */
-        void HandleGetDevicesComplete(TInt aErr,  CBTDeviceArray* aDeviceArray);
-        
-        /**
-         * From MBTEngDevManObserver
-         */
-        void HandleDevManComplete(TInt aErr);        
-
-   
-    private:
-        
-        /**
-         * Create the device search active object and prepare for search.
-         */
-        void CreateScannerL();
-        
-        /**
-        * Removes the device search active object if it still exists.
-        * @param None.
-        * @return None.
-        */
-        void RemoveScanner();
-
-        /**
-        * Retrieves paired devices from BT Registry
-        * Calls HandleGetDevicesComplete, when done
-        */
-        void RetrievePairedDevices();
-
-        /**
-        * Retrieves used devices from BT Registry
-        * Calls HandleGetDevicesComplete, when done
-        * @return None.        
-        */
-        void RetrieveUsedDevices();
-
-        /**
-        * Searches given BT Device from device array.
-        * @param aDeviceArray The device array to search in 
-        * @param aDevice The device to be searched.
-        * @return Index of the device if found.
-        */
-        TInt LookupFromDevicesArray( const CBTDeviceArray* aDeviceArray, const CBTDevice* aDevice ) const;
-        
-        /**
-        * Constructs a device popup list from resources.
-        * @param aSoftkeysResourceId Resource id for softkeys of the list.
-        * @param aTitleResourceId Resource id for the title of the list.
-        * @return None.
-        */
-        void CreatePopupListL(TInt aSoftkeysResourceId, TInt aTitleResourceId );
-
-        /**
-        * Generates a format string and adds it to iDeviceItems array.
-        * Updates friendly name of given device if one is found from registry.
-        * @param aDevice The device to be added to list.
-        * @param aSignalStrength The signal bar for RSSI
-        * @return None.
-        */
-        void UpdateDeviceListL(CBTDevice* aDevice, const TInt aSignalStrength = 0 );             
-		
-		/**
-        * Creates and adds local bitmap to icon array.
-        * @param aID Item ID of the masked bitmap to be created.
-        * @param aFilename Filename to be used to construct the item.
-        * @param aBitmapId The ID if bitmap 
-        * @param aMaskId The ID of bitmap's mask
-		* @param aIconList The icon list for BT devices listbox.
-        */
-        void CreateAndAppendIconL( const TAknsItemID& aID,
-			     				   const TDesC& aFileName,
-								   const TInt aBitmapId,
-								   const TInt aMaskId,
-								   CAknIconArray* aIconList);
-								  
-        /**
-        * Adjust array, leave 5 lastet used devices in the array and remove the rest,
-        * and then insert the paired device array to this array by used time order.
-        * In the adjusted array, the first item will be the most lately used device.
-        * @param aDevArray The bluetooth device arrary to be adjusted.
-        * @return None.
-        */
-		void AdjustDeviceArrayL( CBTDeviceArray* aDevArray);
-		
-		/**
-		* Filter for searching device
-		* @param The desired device class user selects from the filter
-		* @return User's input select/cancel
-		*/
-		void SelectSearchCategoryL();
-		
-		/**
-		* Add filtering items to search device filter
-		* @param aResourceId
-		* @return None
-		*/
-		void AddItemToSearchFilterL ( TInt aResourceId );
-
-		/**
-		* Show query to ask if unblock device
-		* @param aDevice Selected device
-		* @return Keypress value
-		*/
-		TInt QueryUnblockDeviceL(CBTDevice* aDevice);
-		
-		 /**
-         * The callback function for CPeriodic 
-         * to reset the inactivity time
-         */
-		 static TInt PeriodicTimerCallBack(TAny* /*aAny*/);
-		 
-	     void GetColorIconL( TFileName& aFilename, TAknsItemID aItemID, TInt aPic, TInt aPicmask, CAknIconArray* aIconList );
-     
-        /**
-        * Check if VoIP call is ongoing via WLAN connection.
-        * @return true if it is; false otherwise.
-        */
-        TBool IsActiveVoIPOverWLAN();
-         
-        void DoDeviceFrontListSelection();
-    
-        /**
-        * Displays previous inquiry results.
-        */
-        void DisplayDevicesFrontListL();
-        
-        /**
-         * Unblock device after unblock query.
-         * @param aIndex Parameter containing information about selected device.
-         * @return Symbian OS error code.
-         */
-        TInt UnblockDevice(TInt aIndex);
-
-        void DeviceSearchUiL();
-        
-        /**
-         * the initiator of inquiry until the first device found, or no device found, or
-         * other reasons causing inquiry stopped.
-         * @param aReason the reason of the search completion
-         */
-        TSearchFlowState InitInquiryL(TInt& aReason);
-        
-        void HandleDeviceSelectionL(CBTDevice* aDev);
-        
-        /**
-         * Adds found Bluetooth device into popup list.
-         * @param aInquiryResultRecord TNameEntry and flag, which indicates if Eir device.
-         */
-        void DeviceAvailableL( const TNameRecord& aNameRecord, const TDesC& aDevName);
-        
-        /**
-        * The inquiry has been completed.
-        * @param aError Status code of the operation.
-        * @return None.
-        */
-        void InquiryComplete( TInt aError );
-        
-        /**
-         * Inform the caller of the properties of found BTdevice, 
-         * which passes the search filter. Its name will be retrived later
-         */
-        void HandleInquiryDeviceL();
-        
-        void HandleFoundNameL();   
-        
-        /**
-         * Allow/Disallow dialer and app key presses.
-         * @param aAllow ETrue to allow  key press; EFalse to disallow.
-         */
-        void AllowDialerAndAppKeyPress( TBool aAllow );
-
-    private:  // Data
-        CBTNotifUIUtil*         iUiUtil;
-        CBTDeviceArray*         iLastSeenDevicesArray;            // Last seen devices array from BTInqNotifier
-        CBTDeviceArray*         iLastUsedDevicesArray;           // Used devices from BT registry
-        CBTDeviceArray*         iPairedDevicesArray;             // Paired devices from Bluetooth registry
-        CBTDeviceArray*         iAdjustedUsedDeviceArray;         // 5 Lately used devices + All the Paired devices 
-        CBTEngDevMan*           iDevMan;                        //Async deviceHandler
-         
-        CDesCArray*             iDefaultDeviceNamesArray;        // Default device names array
-        CEikonEnv&              iEikonEnvRef;                    // Reference to eikonenv        
-        
-        CAknPopupList*          iDevicePopupList;                // Popup list for devices        
-        CDesCArrayFlat*         iDeviceListRows;                 // Array for device list format string rows
-        CAknSingleGraphicPopupMenuStyleListBox* iDeviceListBox; // ListBox for bluetooth devices
-        CAknPopupList*          iSearchFilterPopupList;
-        
-        CBTNotifActive*         iScanner;
-		
-        TBool                   iDevicesFound;                   // Flag if any devices has been found
-        TBool                   iInquiryComplete;
-        TBool                   iBroughtForwards;                // Flag for BringForwards
-        TInt                    iInquiryStatus;                  // Error code from inquiry result
-
-        TBTRegistryQueryState     iBTRegistryQueryState;            // which registry query (if any) is in progress.
-        TBTDeviceClass            iDesiredDeviceClass;         // Device Class user selects from search filter 
-        CPeriodic* iPeriodicTimer; // the timer for reseting the user inactivity time
-        TBool                   iSystemCancel;               // Used for a trick to avoid final device list is still on show 
-                                                                // while taking out mmc during BT device discovery 
-        TBTDeviceResponseParams iDevParams;
-        TInt iHighLightedItemIndex;
-        
-        RSocketServ         iSocketServer;      // Socket server object
-        RHostResolver       iHostResolver;      // Host resolver object
-        TInquirySockAddr    iInquirySockAddr;   // Socket address record
-        TNameEntry          iEntry;             // Inquiry results record
-        TBool               iPageForName;    // Flag for inquiry name
-        RArray<TNameRecord> iDevsWithoutName;    // Devices without dev name 
-        TInt                iIndex;             // Current btdevice to inquiry its name 
-        MBTNDeviceSearchObserver* iDevSearchObserver;
-
-		TBool               iExcludePairedDevices;
-		
-
-    };
-
-#endif
-
-// End of File
--- a/bluetoothengine/btnotif/inc/btnobexpinnotifier.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declares OBEX PIN query notifier class.
-*
-*/
-
-
-#ifndef BTNOBEXPINNOTIFIER_H
-#define BTNOBEXPINNOTIFIER_H
-
-// INCLUDES
-
-#include "btnotifier.h" // Base class
-
-// CLASS DECLARATION
-
-/**
-* This class is used to ask OBEX passkey from user.
-*/
-NONSHARABLE_CLASS(CBTObexPinNotifier): public CBTNotifierBase
-    {
-    public: // Constructors and destructor
-
-        /**
-        * Two-phased constructor.
-        */
-        static CBTObexPinNotifier* NewL();
-
-        /**
-        * Destructor.
-        */
-        virtual ~CBTObexPinNotifier();
-
-    private: // Functions from base classes
-        /**
-        * From CBTNotifierBase Called when a notifier is first loaded.        
-        * @param None.
-        * @return A structure containing priority and channel info.
-        */
-        TNotifierInfo RegisterL();
-
-        /**
-        * From CBTNotifierBase Used in asynchronous notifier launch to 
-        * store received parameters into members variables and 
-        * make needed initializations.
-        * @param aBuffer A buffer containing received parameters
-        * @param aReturnVal The return value to be passed back.
-        * @param aMessage Should be completed when the notifier is deactivated.
-        * @return None.
-        */
-        void GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage);
-               
-    private:
-
-        /**
-        * C++ default constructor.
-        */
-        CBTObexPinNotifier();      
-
-        /**
-        * Show notes to ask user's response and return to caller.
-        * @param None.
-        * @return None.
-        */
-        void ShowNoteCompleteMessageL();
-
-    private: // Data
-
-    };
-
-#endif
-
-// End of File
--- a/bluetoothengine/btnotif/inc/btnotif.hrh	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This file contains declarations for resources of btnotif.
-*
-*/
-
-
-#ifndef BTNOTIF_HRH
-#define BTNOTIF_HRH
-
-#include <btnotif.mbg>
-
-#define KBTPassKeyMaxLength 16 // Same as KHCIPINCodeSize. Not available here direct from BT
-#define KBTUIMaxNameLength   30      // Series 60 local BT name
-
-#define btnotif_bitmap_file "Z:\\system\\data\\BTNotif.mbm"
-#define btnotif_bitmap_file_data_caging "Z:\\resource\\apps\\BTNotif.mbm"
-
-
-enum BTNotifNotes
-    {
-    EBTNotifSearchingDevicesNote = 1,
-    EBTNotifBtBusyNote,
-	EBTNotifEnterSapNote,
-	EBTNotifEnterSapSucceedNote,
-	EBTNotifEnterSapFailNote
-    };
-
-#endif
-// End of File
--- a/bluetoothengine/btnotif/inc/btnotifactive.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,191 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declares active object helper class.
-*
-*/
-
-#ifndef BTNOTIFACTIVE_H
-#define BTNOTIFACTIVE_H
-
-
-#include <e32base.h>
-
-class CBTNotifActive;
-
-/**
- *  Class MBTNotifActiveObserver
- *
- *  Callback class for receiving a completed active object event.
- *  Users of CBTEngActive need to derive from this class. 
- */
-class MBTNotifActiveObserver
-    {
-
-public:
-
-    /**
-     * Callback to notify that an outstanding request has completed.
-     *
-     * @since S60 5.1
-     * @param aActive Pointer to the active object that completed.
-     * @param aId The ID that identifies the outstanding request.
-     * @param aStatus The status of the completed request.
-     */
-    virtual void RequestCompletedL( CBTNotifActive* aActive, TInt aId, 
-                                    TInt aStatus ) = 0;
-
-    /**
-     * Callback to notify that an error has occurred in RunL.
-     *
-     * @param aActive Pointer to the active object that had error.
-     * @param aId The ID that identifies the outstanding request.
-     * @param aStatus The status of the completed request.
-     */
-    virtual void HandleError( CBTNotifActive* aActive, TInt aId, 
-                                    TInt aError ) = 0;
-
-    /**
-     * Callback to notify that request is canceled.
-     * Active object may add specified steps here. 
-     *
-     * @param aActive Pointer to the active object that is canceled.
-     * @param aId The ID that identifies the outstanding request.
-     */
-    virtual void DoCancelRequest( CBTNotifActive* aActive, TInt aId ) = 0;
-    };
-/**
- *  Class CBTNotifActive
- */
-NONSHARABLE_CLASS( CBTNotifActive ) : public CActive
-    {
-
-public:
-    /**
-     * Two-phased constructor.
-     * @param aObserver Pointer to callback interface that receives notification
-     *                  that the request has been completed.
-     * @param aId       Request ID to identify which request is completed.
-     * @return          Pointer to the constructed CBTNotifActive object.
-     */ 
-    static CBTNotifActive* NewL( MBTNotifActiveObserver* aObserver, TInt aId, TInt aPriority );
-
-   /**
-    * Destructor.
-    */
-    virtual ~CBTNotifActive();
-
-    /**
-     * Get the request ID of this active object.
-     *
-     * @since S60 v5.1
-     * @return The request ID of this active object.
-     */
-    inline TInt RequestId();
-
-    /**
-     * Set a new request ID for this active object.
-     *
-     * @since S60 v5.1
-     * @param The new request ID of this active object.
-     */
-    inline void SetRequestId( TInt aId );
-
-    /**
-     * Activate the active object.
-     *
-     * @since S60 v5.1
-     */
-    inline void GoActive();
-
-    /**
-     * Cancel an outstanding request.
-     *
-     * @since S60 v5.1
-     */
-    inline void CancelRequest();
-
-    /**
-     * Get a reference to the active object request status.
-     *
-     * @since S60 v5.1
-     * @return Reference to the active object request status.
-     */
-    TRequestStatus& RequestStatus();
-
-// from base class CActive
-
-    /**
-     * From CActive.
-     * Called by the active scheduler when the request has been cancelled.
-     *
-     * @since S60 v5.1
-     */
-    void DoCancel();
-
-    /**
-     * From CActive.
-     * Called by the active scheduler when the request has been completed.
-     *
-     * @since S60 v5.1
-     */
-    void RunL();
-
-    /**
-     * From CActive.
-     * Called by the active scheduler when an error in RunL has occurred.
-     *
-     * @since S60 v5.1
-     */
-    TInt RunError( TInt aError );
-
-private:
-
-    /**
-     * C++ default constructor
-     *
-     * @since S60 v5.1
-     * @param aObserver Pointer to callback interface that receives notification
-     *                  that the request has been completed.
-     * @param aId ID of the request (for the client to keep track of multiple 
-     *            active objects).
-     * @param aPriority Priority of 
-     */
-    CBTNotifActive( MBTNotifActiveObserver* aObserver, TInt aId, TInt aPriority );
-
-    /**
-     * Symbian 2nd-phase constructor
-     *
-     * @since S60 v5.1
-     */
-    void ConstructL();
-
-private: // data
-
-    /**
-     * ID of the request (used only by our client).
-     */
-    TInt iRequestId;
-
-    /**
-     * Our observer.
-     * Not own.
-     */
-    MBTNotifActiveObserver* iObserver;
-
-    };
-
-#include "btnotifactive.inl"
-
-
-#endif // BTNOTIFACTIVE_H
--- a/bluetoothengine/btnotif/inc/btnotifactive.inl	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Active object helper class inline function definitions.
-*
-*/
-
-// -----------------------------------------------------------------------------
-// Get the identifier of this instance.
-// -----------------------------------------------------------------------------
-//
-inline TInt CBTNotifActive::RequestId()
-    {
-    return iRequestId;
-    }
-
-
-// -----------------------------------------------------------------------------
-// Set the identifier of this instance.
-// -----------------------------------------------------------------------------
-//
-inline void CBTNotifActive::SetRequestId( TInt aId )
-    {
-    iRequestId = aId;
-    }
-
-
-// -----------------------------------------------------------------------------
-// Activate the active object.
-// -----------------------------------------------------------------------------
-//
-inline void CBTNotifActive::GoActive()
-    {
-    SetActive();
-    }
-
-
-// -----------------------------------------------------------------------------
-// Cancel an outstanding request.
-// -----------------------------------------------------------------------------
-//
-inline void CBTNotifActive::CancelRequest()
-    {
-    Cancel();
-    }
-
-
-// -----------------------------------------------------------------------------
-// Get a reference to the active object request status.
-// -----------------------------------------------------------------------------
-//
-inline TRequestStatus& CBTNotifActive::RequestStatus()
-    {
-    return iStatus;
-    }
--- a/bluetoothengine/btnotif/inc/btnotifier.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,307 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declares Bluetooth notifiers base class.
-*
-*/
-
-
-#ifndef BTNOTIFIERBASE_H
-#define BTNOTIFIERBASE_H
-
-// INCLUDES
-
-#include "btnotif.h"
-#include "btnotifuiutil.h"
-#include <eikenv.h>
-#include <btdevice.h>
-#include <btengdevman.h>
-
-// CONSTANTS
-
-// Literals for resource and bitmap files ( drive, directory, filename(s) )
-
-const TUid KBTInquiryChannel            = {0x00000601}; // Channel for inquiry notifier
-const TUid KBTAuthorisationChannel      = {0x00000602}; // Channel for PIN query notifier
-const TUid KBTAuthenticationChannel     = {0x00000603}; // Channel for authorisation notifier
-const TUid KBTBBEventChannel            = {0x00000604}; // Channel for baseband event notifier
-const TUid KBTObexPINChannel            = {0x00000605}; // Channel for OBEX PIN notifier
-const TUid KBTPowerModeChannel          = {0x00000606}; // Channel for power mode notifier
-const TUid KBTAudioAccessoryChannel     = {0x00000607}; // Channel for audio accessory notifier
-const TUid KBTLowMemoryChannel          = {0x00000608}; // Channel for low memory notifier
-const TUid KBTPairedDeviceSettingChannel  = {0x00000610}; 
-
-// FORWARD DECLARATIONS
-class CBTEngSettings;
-
-enum TBTRegistryQueryState
-{
-	ENoQuery=0,
-	EQueryPaired=1,
-	EQueryUsed=2,
-	ESetDeviceAuthorizeState,
-	ESetDeviceBlocked,
-	ESetDeviceUnblocked,
-};
-
-// CLASS DECLARATION
-/**
-* This class is the base class for all notifiers.
-*/
-NONSHARABLE_CLASS(CBTNotifierBase): public CBase, public MEikSrvNotifierBase2, MBTEngDevManObserver
-    {
-    public: // Constructors and destructor
-
-        /**
-        * Destructor.
-        */
-        virtual ~CBTNotifierBase();
-
-    protected: // Constructors and destructor
-
-        /**
-        * C++ default constructor.
-        */
-        CBTNotifierBase();
-
-        /**
-        * Symbian 2nd phase constructor.
-        */
-        virtual void ConstructL();
-
-    protected: // New functions
-
-        /**
-        * Used in asynchronous notifier launch to store received parameters 
-        * into members variables and make needed initializations.        
-        * @param aBuffer A buffer containing received parameters
-        * @param aReturnVal The return value to be passed back.
-        * @param aMessage Should be completed when the notifier is deactivated.
-        * @return None.
-        */
-        virtual void GetParamsL(const TDesC8& aBuffer, 
-                                TInt aReplySlot, 
-                                const RMessagePtr2& aMessage)=0;
-
-        /**
-        * A utility function for checking whether autolock is on.
-        * @param None.
-        * @return A boolean according to autolock state.
-        */
-        TBool AutoLockOnL();
-
-        /**
-        * A utility function for setting the power status of Bluetooth.
-        * If the power is not on the user will be presented a query.
-        * @return ETrue if BT is turned on successfully; EFalse otherwise
-        */
-        TBool CheckAndSetPowerOnL();
-		
-		/**
-		* A function for setting BT name 
-		* @return ETrue if BT name is set successfully; EFalse otherwise
-		*/
-		TBool AskLocalBTNameQueryL();
-
-        /**
-		* Check if there is any existing connection to audio profiles from 
-		* the same device
-		* @return ETrue if the device is connected.
-		*/
-		TBool IsExistingConnectionToAudioL(const TBTDevAddr& aDevAddr);
-
-		/**
-		* Complete Client/Server message and Nulled the reply slot.
-		* @param aErr  Error code for client notification.
-		* @return None
-		*/
-		void CompleteMessage(TInt aErr);
-
-       /**
-        * Complete Client/Server message and Nulled the reply slot.
-        * @param aErr  Error code for client notification.
-        * @return None
-        */
-        void CompleteMessage(TInt aValueToReplySlot, TInt aErr);
-        
-       /**
-        * Complete Client/Server message and Nulled the reply slot.
-        * @param aErr  Error code for client notification.
-        * @return None
-        */
-        void CompleteMessage(const TDesC8& aDesToReplySlot, TInt aErr);
-        
-		/**
-		* Checks from central repository whether the Bluetooth friendly name 
-        * has been modified .
-		* @return ETure if the name has been modified.
-		*/
-		TBool IsLocalNameModifiedL();
-
-		/**
-		 * Get the device information from BT Registry by the given address.
-		 */
-		void GetDeviceFromRegL(const TBTDevAddr& aAddr);
-		
-		/**
-		 * virtual function to be ovewritten by sub-classes.
-		 * Will be called when Getting Device by BTEng DevMan is completed.
-		 * @param aDev the device from registry if it is not null. indicates either a failure
-		 *             or the device is not available in registry. 
-		 */
-		virtual void HandleGetDeviceCompletedL(const CBTDevice* aDev);
-
-        /**
-         * Asks the user if s/he want's to block the device in question
-         * Does not block the device. That is left to the caller.
-         * NOTE: Cannot be called while iAuthQueryDlg is active.
-         */
-        void QueryBlockDeviceL();
-
-        /**
-         * Set BTDevice's security setting to blocked and modify device
-         * @param None
-         * @return None
-         */
-        void DoBlockDevice();
-
-        /**
-         * Set BTDevice's security setting to un/authorized and modify device
-         * @param aTrust Set authorized if ETrue; otherwise, unauthorized.
-         * @return None
-         */
-        void ChangeAuthorizeState( TBool aTrust);
-
-        /**
-         * Checks if the user is queried too often, and handle the result.
-         * @return None
-         */
-        void CheckAndHandleQueryIntervalL();
-
-    private:
-        
-        void DoHandleGetDevicesCompleteL(TInt aErr, CBTDeviceArray* aDeviceArray );
-		
-    protected: // Functions from base classes
-
-        /**
-        * From MEikSrvNotifierBase2 Called when a notifier is first loaded 
-        * to allow any initial construction that is required.
-        * @param None.
-        * @return A structure containing priority and channel info.
-        */
-        virtual TNotifierInfo RegisterL()=0;
-        
-        /**
-        * From MEikSrvNotifierBase2 The notifier has been deactivated 
-        * so resources can be freed and outstanding messages completed.
-        * @param None.
-        * @return None.
-        */
-        virtual void Cancel();
-
-#ifdef __SERIES60_HELP
-		/** This is used to create TCallBack to help.
-		 * @param TCoeHelpContext. Must be instance TCoeHelpContext, or NULL.
-		 * If null this will open help about blocked devices.,
-		 * @return KErrNone
-		 */
-		static TInt LaunchHelp(TAny *TCoeHelpContext=NULL);
-#endif        
-
-    private: // Functions from base classes        
-        
-        /**
-        * From MEikSrvNotifierBase2 Called when all resources allocated 
-        * by notifiers should be freed.
-        * @param None.
-        * @return None.
-        */
-        virtual void Release();
-
-        /**
-        * From MEikSrvNotifierBase2 Return the priority a notifier takes 
-        * and the channels it acts on.
-        * @param None.
-        * @return A structure containing priority and channel info.
-        */
-        virtual TNotifierInfo Info() const;
-
-        /**
-        * From MEikSrvNotifierBase2 Synchronic notifier launch.        
-        * @param aBuffer Received parameter data.
-        * @return A pointer to return value.
-        */
-        virtual TPtrC8 StartL(const TDesC8& aBuffer);
-        
-        /**
-        * From MEikSrvNotifierBase2 Asynchronic notifier launch.
-        * @param aBuffer A buffer containing received parameters
-        * @param aReturnVal The return value to be passed back.
-        * @param aMessage Should be completed when the notifier is deactivated.
-        * @return A pointer to return value.
-        */
-        virtual void StartL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage);
-        
-        /**
-        * From MEikSrvNotifierBase2 Updates a currently active notifier.
-        * @param aBuffer The updated data.
-        * @return A pointer to return value.
-        */
-        virtual TPtrC8 UpdateL(const TDesC8& aBuffer);        
-		
-        /**
-         * From MBTEngDevManObserver
-         * Indicates to the caller that adding, deleting or modifying a device 
-         * has completed.
-         */
-        virtual void HandleDevManComplete(TInt aErr);
-        
-        /**
-         * From MBTEngDevManObserver
-         * Call back function when GetDevices() request is completed.
-         * @param aErr Status information, if there is an error.
-         * @param aDeviceArray Array of devices that match the given criteria 
-         *                     (the array provided by the calller).
-         */
-        void HandleGetDevicesComplete( TInt aErr, CBTDeviceArray* aDeviceArray );
-
-        /**
-         * Checks the timestamp since last query.
-         * @return true if too often
-         */
-        TBool CheckQueryInterval();
-
-    protected: // Data
-
-        RMessagePtr2                iMessage;               // Received message
-        TInt                        iReplySlot;             // Reply slot
-        TNotifierInfo               iInfo;                  // Notifier parameters structure
-        TBTRegistryQueryState       iBTRegistryQueryState;
-        CBTDeviceArray*             iDeviceArray;  // for getting device from registry
-        CBTDevice*                  iDevice;                // Current Bluetooth device
-        TBTDevAddr                  iBTAddr; // Gotten from PckBuffer, constant no matter how iDevice changes.
-        CBTNotifUIUtil*             iNotifUiUtil;           // Utility to show UI notes & queries
-        CBTEngSettings*             iBTEngSettings;
-        TBool                       iIsCoverUI;
-
-    private:
-        CBTEngDevMan*               iDevMan;  // for BT registry manipulation
-
-
-        
-    };
-
-#endif
-
-// End of File
--- a/bluetoothengine/btnotif/inc/btnotiflock.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,158 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Implements getting/setting notifier locks on BT devices
-*               from/to P&S KBTNotifierLocks from btengprivatepskeys.h.
-*
-*/
-
-#ifndef BTNOTIFIERLOCK_H
-#define BTNOTIFIERLOCK_H
-
-#include <bttypes.h>
-#include <btengprivatepskeys.h>
-
-/**
- *  BT Notifier lock identifiers 
- *  @since S60 v5.1
- */
-
-enum TBTNotifLockId
-    {
-    /**
-     * None
-     */
-    EBTNotifierLockNone = 0x00,
-    
-    /**
-     * notifier is asking or going to ask if user wants to set device trusted.
-     */
-    EBTNotiferLockPairedDeviceSetting = 0x01,
-    
-    /**
-     * notifer is asking or going to ask user if he wants to accept connection request
-     * from the device.
-     */
-    EBTNotifierLockAuthorizeConnectRequest = 0x02,
-    };
-
-/**
- * the notifier lock status on a BT device.
- * This lock mechanism uses by btui, bteng and btnotif to ensure the order of 
- * user interaction when a device is been paired.
- */
-NONSHARABLE_CLASS( TBTNotifLock)
-    {
-public:
-    
-    /**
-     * default constructor.  iAddr is initialized to zero BT address and iLocks is set to 0  
-     */
-    inline TBTNotifLock();
-    
-    /**
-     * constructor to the specified value.
-     * @param aAddr the address of the BT device this object is for.
-     * @param aLocks one or more lock identifiers
-     */
-    inline TBTNotifLock(const TBTDevAddr& aAddr, TInt aLocks);
-    
-    /**
-     * gets the target device address.
-     * @return the target device address
-     */
-    inline const TBTDevAddr& Addr() const;
-    
-    /**
-     * Gets the locks on the device.
-     */
-    inline TInt Locks() const;
-    
-    /**
-     * Gets the modifiable locks on the device
-     */
-    inline TInt& Locks();
-
-private:
-    
-    /**
-     * the BT device this object is for
-     */
-    TBTDevAddr iAddr;
-    
-    /**
-     * the lock status, logical OR of one or more TBTNotifLockId values
-     */
-    TInt iLocks;
-    };
-
-NONSHARABLE_CLASS( TBTNotifLockPublish )
-    {
-public:
-
-    /**
-     * gets from P&S KBTNotifierLocks the locks for a device.
-     * 
-     * @param aLocks contains the locks for the device at return
-     * @param aAddr the address of the device which the locks are for
-     */
-    inline static void GetNotifLocks( TInt& aLocks, const TBTDevAddr& aAddr );
-
-    /**
-     * gets from P&S KBTNotifierLocks the locks for a device.
-     * 
-     * @aProperty the property instance which has been attached to key KBTNotifierLocks. 
-     * @param aLocks contains the locks for the device at return
-     * @param aAddr the address of the device which the locks are for
-     */
-    inline static void GetNotifLocks(RProperty& aProperty, TInt& aLocks, 
-            const TBTDevAddr& aAddr );
-    
-    /**
-     * Publishes locks to P&S KBTNotifierLocks.
-     * 
-     * @param aLocks the locks to be published
-     * @param aAddr the address of the device which the locks are for
-     */
-    inline static void AddNotifLocks( TInt aLocks, const TBTDevAddr& aAddr );    
-    
-    /**
-     * Publishes locks to P&S KBTNotifierLocks.
-     * @aProperty the property instance which has been attached to key KBTNotifierLocks. 
-     * @param aLocks the locks to be published
-     * @param aAddr the address of the device which the locks are for
-     */
-    inline static void AddNotifLocks(RProperty& aProperty, TInt aLocks, 
-            const TBTDevAddr& aAddr );    
-    
-    /**
-     * Deletes locks from P&S KBTNotifierLocks.
-     * @param aLocks the locks to be deleted
-     * @param aAddr the address of the device which the locks are for     
-     */
-    inline static void DeleteNotifLocks( TInt aLocks, 
-            const TBTDevAddr& aAddr );    
-    
-    /**
-     * Deletes locks from P&S KBTNotifierLocks.
-     * @aProperty the property instance which has been attached to key KBTNotifierLocks.  
-     * @param aLocks the locks to be deleted
-     * @param aAddr the address of the device which the locks are for     
-     */
-    inline static void DeleteNotifLocks(RProperty& aProperty, TInt aLocks, 
-            const TBTDevAddr& aAddr );    
-    };
-
-#include "btnotiflock.inl"
-
-#endif // BTNOTIFIERLOCK_H
--- a/bluetoothengine/btnotif/inc/btnotiflock.inl	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,234 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Implements getting/setting notifier locks on BT devices
-*               from/to P&S KBTNotifierLocks from btengprivatepskeys.h.
-*
-*/
-
-#include "btengprivatepskeys.h"
-#include <e32property.h>
-
-// ----------------------------------------------------------
-// Initialize members to zero
-// ----------------------------------------------------------
-//
-inline TBTNotifLock::TBTNotifLock()
-    : iAddr(TBTDevAddr()), iLocks(EBTNotifierLockNone)
-    {
-    }
-
-// ----------------------------------------------------------
-// initialize members to the specified values
-// ----------------------------------------------------------
-//
-inline TBTNotifLock::TBTNotifLock(const TBTDevAddr& aAddr, TInt aLocks)
-    : iAddr( aAddr ), iLocks( aLocks )
-    {
-    }
-
-// ----------------------------------------------------------
-// returns the address
-// ----------------------------------------------------------
-//
-inline const TBTDevAddr& TBTNotifLock::Addr() const
-    {
-    return iAddr;
-    }
-
-// ----------------------------------------------------------
-// returns the lock as value
-// ----------------------------------------------------------
-//
-inline TInt TBTNotifLock::Locks() const
-    {
-    return iLocks;
-    }
-
-// ----------------------------------------------------------
-// returns the lock as modifiable reference
-// ----------------------------------------------------------
-//
-inline TInt& TBTNotifLock::Locks()
-    {
-    return iLocks;
-    }
-
-// ----------------------------------------------------------
-// Locally instantiate a RProperty and invoke GetNotifLocks
-// ----------------------------------------------------------
-//
-inline void TBTNotifLockPublish::GetNotifLocks( TInt& aLocks, const TBTDevAddr& aAddr )
-    {
-    RProperty property;
-    TInt err = property.Attach( 
-                KPSUidBluetoothEnginePrivateCategory, KBTNotifierLocks );
-    if ( !err )
-        {
-        GetNotifLocks( property, aLocks, aAddr );
-        }
-    property.Close();
-    }
-
-// ----------------------------------------------------------
-// Extracts from PS key and returns the lock value for
-// the specified device
-// ----------------------------------------------------------
-//
-inline void TBTNotifLockPublish::GetNotifLocks(RProperty& aProperty,
-        TInt& aLocks, const TBTDevAddr& aAddr )
-    {
-    aLocks = EBTNotifierLockNone;
-    TInt infoSize( sizeof( TBTNotifLock ) );
-    TBuf8<sizeof( TBTNotifLock ) * 8> infoDes;
-    TInt err = aProperty.Get( infoDes );
-    if ( err || infoDes.Length() < infoSize )
-        {
-        // zero length of the PS content indicates no lock set at all. 
-        return;
-        }
-    TInt infoCount = infoDes.Length() / infoSize;
-    
-    TPckgBuf<TBTNotifLock> tmpPckg;
-    for ( TInt i = 0; i < infoCount; i++ )
-        {
-        tmpPckg.Copy(infoDes.Mid( i * infoSize, infoSize ));
-        if ( tmpPckg().Addr() == aAddr )
-            {
-            // found the locks for the device, writes to client.
-            aLocks = tmpPckg().Locks();
-            return;
-            }
-        }
-    }
-
-// ----------------------------------------------------------
-// Locally instantiate a RProperty and invoke AddNotifLocks
-// ----------------------------------------------------------
-//
-inline void TBTNotifLockPublish::AddNotifLocks( TInt aLocks, const TBTDevAddr& aAddr )
-    {
-    RProperty property;
-    TInt err = property.Attach( 
-                KPSUidBluetoothEnginePrivateCategory, KBTNotifierLocks );
-    if ( !err )
-        {
-        AddNotifLocks( property, aLocks, aAddr );
-        }
-    property.Close();
-    }
-
-// ----------------------------------------------------------
-// Find the lock for the device from PS key and updates its value if
-// needed.
-// ----------------------------------------------------------
-//
-inline void TBTNotifLockPublish::AddNotifLocks( RProperty& aProperty,
-        TInt aLocks, const TBTDevAddr& aAddr )
-    {
-    TBuf8<sizeof( TBTNotifLock ) * 8> infoDes;
-    TInt infoSize( sizeof( TBTNotifLock ) );
-    TInt err = aProperty.Get( infoDes );   
-    if ( err )
-        {
-        return;
-        }
-    TInt infoCount = infoDes.Length() / infoSize;
-    TPckgBuf<TBTNotifLock> tmpPckg;
-
-    for ( TInt i = 0; i < infoCount; i++ )
-        {
-        tmpPckg.Copy(infoDes.Mid( i * infoSize, infoSize ));
-        if ( tmpPckg().Addr() == aAddr )
-            {
-            TInt newOps = tmpPckg().Locks() | aLocks;
-            // update the value only if it is really changed:
-            if ( tmpPckg().Locks() != newOps )
-                {
-                tmpPckg().Locks() = newOps;
-                infoDes.Replace( i * infoSize, infoSize, tmpPckg );
-                (void) aProperty.Set( infoDes );
-                }
-            return;
-            }
-        }
-    // no lock for the device so far, append it to the end:
-    tmpPckg() = TBTNotifLock( aAddr, aLocks );
-    if ( infoCount )
-        {
-        infoDes.Append( tmpPckg );
-        (void) aProperty.Set( infoDes );        
-        }
-    (void) aProperty.Set( tmpPckg ); 
-    }
-
-// ----------------------------------------------------------
-// Locally instantiate a RProperty and invoke DeleteNotifLocks
-// ----------------------------------------------------------
-//
-inline void TBTNotifLockPublish::DeleteNotifLocks( TInt aLocks, const TBTDevAddr& aAddr )
-    {
-    RProperty property;
-    TInt err = property.Attach( 
-                KPSUidBluetoothEnginePrivateCategory, KBTNotifierLocks );
-    if ( !err )
-        {
-        DeleteNotifLocks( property, aLocks, aAddr );
-        }
-    property.Close();
-    }
-
-// ----------------------------------------------------------
-// Find the lock for the device from PS key and updates its value if
-// needed.
-// ----------------------------------------------------------
-//
-inline void TBTNotifLockPublish::DeleteNotifLocks( RProperty& aProperty,
-        TInt aLocks, const TBTDevAddr& aAddr )
-    {
-    TBuf8<sizeof( TBTNotifLock ) * 8> infoDes;
-    TInt infoSize( sizeof( TBTNotifLock ) );
-    TInt err = aProperty.Get( infoDes );
-    if ( err || infoDes.Length() < infoSize )
-        {
-        return;
-        }
-    TInt infoCount = infoDes.Length() / infoSize;
-    TPckgBuf<TBTNotifLock> tmpPckg;
-    for ( TInt i = 0; i < infoCount; i++ )
-        {
-        tmpPckg.Copy( infoDes.Mid( i * infoSize, infoSize ) );
-        if ( tmpPckg().Addr() == aAddr )
-            {
-            TInt newOps = tmpPckg().Locks() & ~aLocks;
-            // update PS only if the value is changed:
-            if ( tmpPckg().Locks() != newOps )
-                {
-                tmpPckg().Locks() = newOps;
-                if ( tmpPckg().Locks() == 0)
-                    {
-                    // no lock for this device anymore, remove from PS:
-                    infoDes.Delete( i * infoSize, infoSize );
-                    }
-                else
-                    {
-                    // Update the lock value:
-                    infoDes.Replace( i * infoSize, infoSize, tmpPckg );
-                    }
-                (void) aProperty.Set( infoDes );
-                }
-            return;
-            }
-        }
-    }
-
--- a/bluetoothengine/btnotif/inc/btnotifnameutils.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description:  Declares Bluetooth notifiers base class.
- *
- */
-
-#ifndef BTNOTIFNAMEUTILS_H
-#define BTNOTIFNAMEUTILS_H
-
-#include <btdevice.h>
-
-class BtNotifNameUtils
-    {
-public:
-    static void StripDeviceName(TBTDeviceName& aDeviceName);
-    static void GetDeviceDisplayName(TBTDeviceName& aName, const CBTDevice* aDev);
-    static void GetDeviceName(TBTDeviceName& aName, const CBTDevice* aDev);
-    static void SetDeviceNameL(const TBTDeviceName& aName, CBTDevice& aDev);
-    };
-
-#endif // BTNOTIFNAMEUTILS_H
-
-
--- a/bluetoothengine/btnotif/inc/btnotifpanic.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declares authorisation notifier class.
-*
-*/
-
-#ifndef BTNOTIFPANIC_H
-#define BTNOTIFPANIC_H
-
-_LIT(KBtNotifPanicName, "BtNotif Panic");
-
-enum TBtNotifPanic
-    {
-    EiDeviceNullWhenCallingGetDeviceFromRegL = 0,
-    };
-
-template <typename XAny>
-struct TBtNotifPanicCodeTypeChecker
-    {
-    inline static void Check(XAny) { }
-    };
-
-#define BTNOTIF_PANIC(CODE) \
-    TBtNotifPanicCodeTypeChecker<TBtNotifPanic>::Check(CODE), \
-    User::Panic(KBtNotifPanicName, CODE)
-
-
-#endif // BTNOTIFPANIC_H
-
--- a/bluetoothengine/btnotif/inc/btnotifuiutil.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,177 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declares Bluetooth notifiers UI utility class.
-*
-*/
-
-#ifndef BTNOTIFUIUTIL_H
-#define BTNOTIFUIUTIL_H
-#include <eikenv.h>          // Eikon environment
-#include <data_caging_path_literals.hrh> 
-#include <AknQueryDialog.h>
-#include <AknWaitDialog.h>
-#include <secondarydisplay/BTnotifSecondaryDisplayAPI.h>
-
-// CONSTANTS
-// Literals for resource and bitmap files ( drive, directory, filename(s) )
-_LIT(KFileDrive,"z:");
-_LIT(KResourceFileName, "btnotif.rsc");
-
-// FORWARD DECLARATIONS
-class CEikonEnv;
-
-NONSHARABLE_CLASS( CBTNotifUIUtil ) : public CBase
-    {
-    public: // Constructors and destructor
-
-        static CBTNotifUIUtil* NewL( TBool aCoverDisplayEnabled );
-        
-        /**
-        * Destructor.
-        */
-        virtual ~CBTNotifUIUtil();
-
-    private: // Constructors and destructor
-
-        /**
-        * C++ default constructor.
-        */
-        CBTNotifUIUtil( TBool aCoverDisplayEnabled );
-
-        /**
-        * Symbian 2nd phase constructor.
-        */
-        void ConstructL();
-        
-    public:
-        /**
-        * A utility function for requesting the activation of lights.
-        * @param None.
-        * @return None.
-        */
-        void TurnLightsOn();
-        
-        /**
-         * Get the local eikon environment.
-         * @return the reference of the local Eikon Environment
-         */
-        CEikonEnv& LocalEikonEnv();
-        
-        /**
-         * Common utility for user confirmation dialog.
-         * @return the keypress value
-         */
-        TInt ShowQueryL(TInt aPromptResource, TInt aExecuteResource, 
-                TSecondaryDisplayBTnotifDialogs aDialogId, 
-                CAknQueryDialog::TTone aTone = CAknQueryDialog::ENoTone );
-        
-        /**
-         * Common utility for user confirmation dialog.
-         * @return the keypress value
-         */
-        TInt ShowQueryL(const TDesC& aPrompt, TInt aExecuteResource, 
-                TSecondaryDisplayBTnotifDialogs aDialogId, 
-                const TBTDeviceName& aDevNameInCoverUI,
-                CAknQueryDialog::TTone aTone = CAknQueryDialog::ENoTone );
-        
-        /**
-         * Common utility for user confirmation dialog.
-         * @return the keypress value
-         */
-        TInt ShowMessageQueryL(TDesC& aMessage, const TDesC& aHeader,
-                TInt aResourceId, 
-                CAknQueryDialog::TTone aTone = CAknQueryDialog::ENoTone );        
-        /**
-         * Common utility for user confirmation dialog.
-         * @return the keypress value
-         */
-        TInt ShowTextInputQueryL(TDes& aText, TInt aExecuteResource, 
-                TSecondaryDisplayBTnotifDialogs aDialogId, 
-                CAknQueryDialog::TTone aTone = CAknQueryDialog::ENoTone );        
-        
-        /**
-         * Common utility for user confirmation dialog.
-         * @return the keypress value
-         */
-        TInt ShowTextInputQueryL(TDes& aText, const TDesC& aPrompt, TInt aExecuteResource, 
-                TSecondaryDisplayBTnotifDialogs aDialogId, 
-                CAknQueryDialog::TTone aTone = CAknQueryDialog::ENoTone );        
-
-        /**
-         * Common utility for UI inforamtion note.
-         */
-        void ShowInfoNoteL( TInt aResourceId, TSecondaryDisplayBTnotifDialogs aDialogId  ); 
-        
-        /**
-         * Common utility for UI inforamtion note.
-         */
-        void ShowInfoNoteL( const TDesC& aResource, TSecondaryDisplayBTnotifDialogs aDialogId  );
-        
-        /**
-         * Common utility for Confirmation note.
-         */
-        void ShowConfirmationNoteL( TBool aWaitingDlg, const TDesC& aResource, 
-                TSecondaryDisplayBTnotifDialogs aDialogId, const TBTDeviceName& aDevNameInCoverUi );
-        
-        /**
-         * Common utility for Error note.
-         */
-        void ShowErrorNoteL( TBool aWaitingDlg, const TDesC& aResource, 
-                TSecondaryDisplayBTnotifDialogs aDialogId, TBTDeviceName aDevNameInCoverUi );
-                
-        /**
-         * Check if iYesNoDlg is NULL
-         */
-        TBool IsQueryReleased();
-
-        /**
-         * Update the dialog when UpdateL() is called by client.
-         */
-        void UpdateQueryDlgL( TDesC& aMessage );
-        
-        /**
-         * Update the message dialog when UpdateL() is called by client.
-         */
-        void UpdateMessageQueryDlgL( TDesC& aMessage );
-        
-        /**
-         * It is used for Secondary display to update. 
-         */
-        void UpdateCoverUiL( const TDesC8& aMessage );
-        
-        /**
-         * Delete the dialog, mostly used by UpdateL()
-         */
-        void DismissDialog();
-        
-        TInt ShowWaitDlgL( TInt aResourceId );
-        
-        void CompleteWaitDlgL();
-        
-    private:
-    
-        void CoverUIDisplayL( const MObjectProvider* aMop, const TBTDeviceName& aDevNameInCoverUi );    
-    
-    private: //DATA
-        CEikonEnv*          iEikEnv;    // Local eikonenv
-        TInt                iResourceFileFlag;      // Flag for eikon env.
-        CAknQueryDialog*    iQueryDlg;  // All kinds of query dialog 
-        CAknWaitDialog*     iWaitDlg;   // WaitDialog
-        TBool iCoverDisplayEnabled; // Flag that indicate cover UI featur
-        TBool               iSystemCancel; // Used to check if iEikEnv is valid. 
-        TBool               iAppKeyBlocked; // Apps key is deactivated.
-    };
-#endif //BTNOTIFUIUTIL_H
-
-
--- a/bluetoothengine/btnotif/inc/btnpaireddevsettnotifier.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,125 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declares power mode setting notifier class.
-*
-*/
-
-
-#ifndef BTNPAIREDDEVSETTNOTIFIER_H
-#define BTNPAIREDDEVSETTNOTIFIER_H
-
-// INCLUDES
-#include "btnotifier.h" // Base class
-
-// FORWARD DECLARATIONS
-
-// CLASS DECLARATION
-NONSHARABLE_CLASS(CBTPairedDevSettNotifier) : public CBTNotifierBase
-    {
-    public: // Constructors and destructor
-
-        /**
-        * Two-phased constructor.
-        */
-        static CBTPairedDevSettNotifier* NewL();
-
-        /**
-        * Destructor.
-        */
-        virtual ~CBTPairedDevSettNotifier();
-
-    private: // Functions from base classes
-
-        /**
-        * From CBTNotifierBase Called when a notifier is first loaded 
-        * to allow any initial construction that is required.
-        * @param None.
-        * @return A structure containing priority and channel info.
-        */
-        TNotifierInfo RegisterL();
-
-         /**
-        * From CBTNotifierBase The notifier has been deactivated 
-        * so resources can be freed and outstanding messages completed.
-        * @param None.
-        * @return None.
-        */
-        void Cancel();        
-
-        /**
-        * From CBTNotifierBase Used in asynchronous notifier launch to 
-        * store received parameters into members variables and 
-        * make needed initializations.
-        * @param aBuffer A buffer containing received parameters
-        * @param aReturnVal The return value to be passed back.
-        * @param aMessage Should be completed when the notifier is deactivated.
-        * @return None.
-        */
-        void GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage);
-
-		/**
-        * From CBTNotifierBase Updates a currently active notifier.
-        * @param aBuffer The updated data.
-        * @return A pointer to return value.
-        */
-        TPtrC8 UpdateL(const TDesC8& aBuffer);
-        
- 		/**
-        * From CBTNotifierBase
-        */      
-        void HandleGetDeviceCompletedL(const CBTDevice* aDev);
-        
-    private:
-
-		/**
-		 * Leave function called by non-leave btengdevman callback function HandleGetDevicesComplete().
-		 *@param aErr. Passed by caller.
-		 */
-
-		/**
-        * Parse the data out of the message that is sent by the client of the notifier. 
-		* @param aBuffer A package buffer containing received parameters.
-        * @return None.
-        */
-		void ProcessParamBufferL(const TDesC8& aBuffer);
-	
-    	/**
-    	 * Query to assign the friendly name when adding it into paired device list
-    	 * if the current device name is not unique in the paired devices view.
-    	 */
-		void QueryRenameDeviceL(const CBTDevice& aDevice);
-    	
-        /**
-        * C++ default constructor.
-        */
-        CBTPairedDevSettNotifier();        
-        
-        /**
-         * Process pairing error code to show corresponding notes.
-         * @param aErr The pairing error code from HCI error.
-         * @return The resouce ID of notes
-         */
-        TInt ProcessPairingErrorCode( const TInt aErr );
-                
-    private:
-	
-        TSecondaryDisplayBTnotifDialogs	iSecondaryDisplayCommand;
-		TBool 	iIsMessageQuery;
-		TInt 	iPairingStatus; 
-		
-    };
-
-#endif //BTNPAIREDDEVSETTNOTIFIER_H
-
-// End of File
--- a/bluetoothengine/btnotif/inc/btnpairnotifier.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,111 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declares pair base notifier.
-*
-*/
-
-#ifndef BTNPAIRNOTIFIER_H_
-#define BTNPAIRNOTIFIER_H_
-
-#include "btnotifier.h" // base class
-
-// CLASS DECLARATION
-/**
-* This class is used as base class for all pairing purpose notifiers
-*/
-NONSHARABLE_CLASS(CBTNPairNotifierBase) : public CBTNotifierBase
-    {
-    public: // Constructors and destructor
-
-        /**
-        * Two-phased constructor.
-        */
-        static CBTNPairNotifierBase* NewL();  // Constructor (public)
-
-        /**
-        * Destructor.
-        */
-        virtual ~CBTNPairNotifierBase();      // Destructor
-    
-    protected: // From base class
-    
-        /**
-        * From CBTNotifierBase
-        */
-        virtual TNotifierInfo RegisterL();
-        
-        /**
-        * From CBTNotifierBase Used in asynchronous notifier launch to 
-        * store received parameters into members variables and 
-        * make needed initializations.
-        * @param aBuffer A buffer containing received parameters
-        * @param aReturnVal The return value to be passed back.
-        * @param aMessage Should be completed when the notifier is deactivated.
-        * @return None.
-        */
-        virtual void GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage);
-        
-        virtual void UpdateL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage);
-        
-        /**
-        * From CBTNotifierBase Updates a currently active notifier.
-        * @param aBuffer The updated data.
-        * @return A pointer to return value.
-        */
-        virtual TPtrC8 UpdateL(const TDesC8& aBuffer);
-        
-    protected: // New functions
-
-        void ProcessParamsGetDeviceL( const TBTDevAddr& aAddr, const TBTDeviceName& aName );
-        
-        /**
-         * Check not to allow pairing attempt from banned devices,
-         */
-        TBool CheckBlockedDeviceL();
-        
-        /**
-        * Query user to accept/reject when the pairing request is initiated 
-        * from remote device.   
-        * @param None.
-        * @return ETrue if User accepted.
-        */
-        TBool AuthoriseIncomingPairingL();
-        
-        /**
-         * Generate prompt based on subclass's own needs.
-         * @param aRBuf the descriptor to which the prompt will be loaded.
-         */
-        virtual void GenerateQueryPromptL( RBuf& aRBuf );
-        
-    private:
-        /**
-        * From CBTNotifierBase Called when a notifier is first loaded 
-        * to allow any initial construction that is required.
-        * @param None.
-        * @return A structure containing priority and channel info.
-        */
-        //TNotifierInfo RegisterL();
-        
-    protected:
-        /**
-        * C++ default constructor.
-        */    
-        CBTNPairNotifierBase();
-        
-    protected: // Data
-        TBool                   iLocallyInitiated;    
-    };
-
-#endif /* BTNPAIRNOTIFIER_H */
-
--- a/bluetoothengine/btnotif/inc/btnpbappinnotifier.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,85 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declares PBAP PIN query notifier class.
-*
-*/
-
-
-#ifndef BTNPBAPNOTIFIER_H
-#define BTNPBAPNOTIFIER_H
-
-// INCLUDES
-
-#include "btnotifier.h" // Base class
-
-// CLASS DECLARATION
-
-/**
-* This class is used to ask PBAP passkey from user.
-*/
-NONSHARABLE_CLASS(CBTPBAPPinNotifier): public CBTNotifierBase
-    {
-    public: // Constructors and destructor
-
-        /**
-        * Two-phased constructor.
-        */
-        static CBTPBAPPinNotifier* NewL();
-
-        /**
-        * Destructor.
-        */
-        virtual ~CBTPBAPPinNotifier();
-
-    private: // Functions from base classes
-        /**
-        * From CBTNotifierBase Called when a notifier is first loaded.        
-        * @param None.
-        * @return A structure containing priority and channel info.
-        */
-        TNotifierInfo RegisterL();
-
-        /**
-        * From CBTNotifierBase Used in asynchronous notifier launch to 
-        * store received parameters into members variables and 
-        * make needed initializations.
-        * @param aBuffer A buffer containing received parameters
-        * @param aReturnVal The return value to be passed back.
-        * @param aMessage Should be completed when the notifier is deactivated.
-        * @return None.
-        */
-        void GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage);
-        
-    private:
-
-        /**
-        * C++ default constructor.
-        */
-        CBTPBAPPinNotifier();        
-        
-        /**
-        * Show UI note and complete message.
-        * Ask user response and return it to caller.
-        * @param None.
-        * @return None.
-        */
-        void ShowNoteCompleteMessageL();
-        
-    private: // Data
-
-    };
-
-#endif
-
-// End of File
--- a/bluetoothengine/btnotif/inc/btnpinnotifier.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declares authentication (PIN query) notifier class.
-*
-*/
-
-
-#ifndef BTNPINNOTIFIER_H
-#define BTNPINNOTIFIER_H
-
-// INCLUDES
-
-#include "btnpairnotifier.h" // Base class 
-
-class MBTEngDevManObserver;
-
-// CLASS DECLARATION
-/**
-* This class is used to ask PIN code from user.
-*/
-NONSHARABLE_CLASS(CBTPinNotifier): public CBTNPairNotifierBase
-    {
-    public: // Constructors and destructor
-
-        /**
-        * Two-phased constructor.
-        */
-        static CBTPinNotifier* NewL();  // Constructor (public)
-
-        /**
-        * Destructor.
-        */
-        virtual ~CBTPinNotifier();      // Destructor
-
-    private:
-        /**
-        * From CBTNotifierBase Called when a notifier is first loaded 
-        * to allow any initial construction that is required.
-        * @param None.
-        * @return A structure containing priority and channel info.
-        */
-        TNotifierInfo RegisterL();
-        
-        /**
-        * From CBTNotifierBase Used in asynchronous notifier launch to 
-        * store received parameters into members variables and 
-        * make needed initializations.
-        * @param aBuffer A buffer containing received parameters
-        * @param aReturnVal The return value to be passed back.
-        * @param aMessage Should be completed when the notifier is deactivated.
-        * @return None.
-        */
-        void GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage); // Get input parameters
-
-        /**
-        * From CBTNotifierBase
-        * Show queries to ask user response and return it to caller by completing message.
-        */      
-        void HandleGetDeviceCompletedL(const CBTDevice* aDev);
-        
-        /**
-        * From CBTNPairNotifierBase
-        * Generate prompt in Pin query dialog.
-        * @param aRBuf the descriptor to which the prompt will be loaded.
-        */      
-        void GenerateQueryPromptL(RBuf& aRBuf); 
-
-    private:
-
-        /**
-        * C++ default constructor.
-        */
-        CBTPinNotifier();               // Default constructor
-        
-        /**
-        * Checks and sets iPinCode to '0000', used with automated pairing for headsets.
-        */		        
-        TBool CheckAndSetAutomatedPairing();        	
-
-    private: // Data
-        TUint                   iPasskeyLength;
-    	TBTPinCode              iPinCode;
-		TBTRegistryQueryState   iBTRegistryQueryState;
-        TBool                   iLocallyInitiated;
-        TBool                   iStrongPinRequired;
-		        
-    };
-
-#endif
-
-// End of File
--- a/bluetoothengine/btnotif/inc/btnpwrnotifier.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declares power mode setting notifier class.
-*
-*/
-
-
-#ifndef BTNPWRNOTIFIER_H
-#define BTNPWRNOTIFIER_H
-
-// INCLUDES
-
-#include "btnotifier.h" // Base class
-
-// FORWARD DECLARATIONS
-
-// CLASS DECLARATION
-
-/**
-* This class is used to confirm Bluetooth power status change from user.
-*/
-NONSHARABLE_CLASS(CBTPwrNotifier): public CBTNotifierBase
-    {
-    public: // Constructors and destructor
-
-        /**
-        * Two-phased constructor.
-        */
-        static CBTPwrNotifier* NewL();
-
-        /**
-        * Destructor.
-        */
-        virtual ~CBTPwrNotifier();
-
-    private: // Functions from base classes
-
-        /**
-        * From CBTNotifierBase Called when a notifier is first loaded 
-        * to allow any initial construction that is required.
-        * @param None.
-        * @return A structure containing priority and channel info.
-        */
-        TNotifierInfo RegisterL();
-
-        /**
-        * From CBTNotifierBase Used in asynchronous notifier launch to 
-        * store received parameters into members variables and 
-        * make needed initializations.
-        * @param aBuffer A buffer containing received parameters
-        * @param aReturnVal The return value to be passed back.
-        * @param aMessage Should be completed when the notifier is deactivated.
-        * @return None.
-        */
-        void GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage);
-
-    private:
-
-        /**
-        * C++ default constructor.
-        */
-        CBTPwrNotifier();
-        
-        /**
-        * Show Information Note and complete message.
-        * @param None.
-        * @return None.
-        */
-        void ShowNoteAndCompleteMessageL(); 
-
-    };
-
-#endif
-
-// End of File
--- a/bluetoothengine/btnotif/inc/btnssppasskeyentrynotifier.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declares authentication (PIN query) notifier class.
-*
-*/
-
-
-#ifndef BTNSSPPASSKEYENTRYNOTIFIER_H_
-#define BTNSSPPASSKEYENTRYNOTIFIER_H_
-
-
-// INCLUDES
-
-#include "btnpairnotifier.h" // Base class
-
-const TInt KPassKeylength = 6; 
-// CLASS DECLARATION
-/**
-* This class is used to confirm PIN code from remote input devices. such as bluetooth keyboard.
-*/
-NONSHARABLE_CLASS(CBTSSPPasskeyEntryNotifier): public CBTNPairNotifierBase
-    {
-    public: // Constructors and destructor
-
-        /**
-        * Two-phased constructor.
-        */
-        static CBTSSPPasskeyEntryNotifier* NewL();  // Constructor (public)
-
-        /**
-        * Destructor.
-        */
-        virtual ~CBTSSPPasskeyEntryNotifier();      // Destructor
-
-    private:
-       /**
-        * From CBTNotifierBase Called when a notifier is first loaded 
-        * to allow any initial construction that is required.
-        * @param None.
-        * @return A structure containing priority and channel info.
-        */
-        TNotifierInfo RegisterL();
-
-        /**
-        * From CBTNotifierBase Updates a currently active notifier.
-        * @param aBuffer The updated data.
-        * @return A pointer to return value.
-        */
-        TPtrC8 UpdateL(const TDesC8& aBuffer);                         
-               
-        /**
-         * From CBTNotifierBase Used in asynchronous notifier launch to 
-         * store received parameters into members variables and 
-         * make needed initializations.
-         * @param aBuffer A buffer containing received parameters
-         * @param aReturnVal The return value to be passed back.
-         * @param aMessage Should be completed when the notifier is deactivated.
-         * @return None.
-         */
-        void GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage); // Get input parameters
-
-        /**
-        * From CBTNotifierBase
-        */      
-        void HandleGetDeviceCompletedL(const CBTDevice* aDev);        
-    
-        /**
-        * Generate prompt for passkey entry query.
-        * @param aRBuf the descriptor to which the prompt will be loaded.
-        */
-        void GenerateQueryPromptL( RBuf& aRBuf );
-        
-    private:
-
-        /**
-        * C++ default constructor.
-        */
-        CBTSSPPasskeyEntryNotifier();               // Default constructor
-        
-    private: // Data
-        TInt                    iAnswer;
-        TBuf<100>               iBuf;
-        TBuf<10>                iPasskey;
-    };
-#endif
-// End of File
--- a/bluetoothengine/btnotif/inc/btnumcmpnotifier.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,96 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declares Numeric Comparison notifier for Secure Simle Pairing 
-*
-*/
-
-
-#ifndef BTNUMCMPNOTIFIER_H
-#define BTNUMCMPNOTIFIER_H
-
-// INCLUDES
-
-#include "btnpairnotifier.h" // Base class
-
-// CLASS DECLARATION
-/**
-* This class is used to ask user to compare passcode in two devices.
-*/
-const TInt Klength = 6; 
-const TInt KMaxPassKeyLength = 20;
-const TInt KBTDeviceShortNameLength = 7;
-
-
-NONSHARABLE_CLASS(CBTNumCmpNotifier): public CBTNPairNotifierBase
-    {
-    public: // Constructors and destructor
-
-        /**
-        * Two-phased constructor.
-        */
-        static CBTNumCmpNotifier* NewL();  // Constructor (public)
-
-        /**
-        * Destructor.
-        */
-        virtual ~CBTNumCmpNotifier();      // Destructor
-
-    private:
-        /**
-        * From CBTNotifierBase Called when a notifier is first loaded 
-        * to allow any initial construction that is required.
-        * @param None.
-        * @return A structure containing priority and channel info.
-        */
-        TNotifierInfo RegisterL();
-
-        
-        /**
-        * From CBTNotifierBase Used in asynchronous notifier launch to 
-        * store received parameters into members variables and 
-        * make needed initializations.
-        * @param aBuffer A buffer containing received parameters
-        * @param aReturnVal The return value to be passed back.
-        * @param aMessage Should be completed when the notifier is deactivated.
-        * @return None.
-        */
-        void GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage); // Get input parameters
-                                         
-        /**
-        * From CBTNotifierBase
-        * Show notes to ask user response and return to Notifier caller by completing message.
-        */      
-        void HandleGetDeviceCompletedL(const CBTDevice* aDev);        
-        
-        /**
-        * From CBTNPairNotifierBase
-        * @param aRBuf the descriptor to which the prompt will be loaded.
-        */
-        void GenerateQueryPromptL( RBuf& aRBuf );
-
-    private:
-
-        /**
-        * C++ default constructor.
-        */
-        CBTNumCmpNotifier();               // Default constructor
-		
-    private: // Data
-		TBuf<20> iPasskeyToShow;
-        
-    };
-
-#endif
-
-// End of File
--- a/bluetoothengine/btnotif/inc/btuserconfnotifier.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,119 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declares User confirmation notifier for Secure Simle Pairing 
-*
-*/
-
-
-#ifndef BTUSERCONFNOTIFIER_H
-#define BTUSERCONFNOTIFIER_H
-
-// INCLUDES
-
-#include "btnpairnotifier.h" // Base class
-
-// These declarations are here temporarily so the submission of the notifiers and the stack do not have to be synchronised.
-// Should be removed once all submissions are in.
-
-const TUid KBTUserConfirmationNotifierUidCopy={0x2002E224};
-
-NONSHARABLE_CLASS(TBTNotifierParams2Copy)	
-	{
-public:
-	inline TBTDevAddr DeviceAddress() const { return iBDAddr; };
-	inline TPtrC DeviceName() const { return iName; };
-private:
-	TBTDevAddr		iBDAddr;
-	TBTDeviceName	iName;	
-	
-	// This data padding has been added to help prevent future binary compatibility breaks	
-	// Neither iPadding1 nor iPadding2 have been zero'd because they are currently not used
-	TUint32	iPadding1; 
-	TUint32	iPadding2; 
-	};
-
-NONSHARABLE_CLASS(TBTUserConfirmationParamsCopy)
-	: public TBTNotifierParams2Copy
-	{	
-public:
-	inline TBool LocallyInitiated() const { return iLocallyInitiated; };
-private:
-	TBool				iLocallyInitiated;
-	
-	// This data padding has been added to help prevent future binary compatibility breaks	
-	// Neither iPadding1 nor iPadding2 have been zero'd because they are currently not used
-	TUint32	iPadding1;
-	TUint32 iPadding2;
-	};
-
-typedef TPckgBuf<TBTUserConfirmationParamsCopy> TBTUserConfirmationParamsPckgCopy;
-
-// CLASS DECLARATION
-/**
-* This class is used to ask user to compare passcode in two devices.
-*/
-
-
-NONSHARABLE_CLASS(CBTUserConfNotifier): public CBTNPairNotifierBase
-    {
-    public: // Constructors and destructor
-
-        /**
-        * Two-phased constructor.
-        */
-        static CBTUserConfNotifier* NewL();  // Constructor (public)
-
-        /**
-        * Destructor.
-        */
-        virtual ~CBTUserConfNotifier();      // Destructor
-
-    private:
-        /**
-        * From CBTNotifierBase Called when a notifier is first loaded 
-        * to allow any initial construction that is required.
-        * @param None.
-        * @return A structure containing priority and channel info.
-        */
-        TNotifierInfo RegisterL();
-
-        
-        /**
-        * From CBTNotifierBase Used in asynchronous notifier launch to 
-        * store received parameters into members variables and 
-        * make needed initializations.
-        * @param aBuffer A buffer containing received parameters
-        * @param aReturnVal The return value to be passed back.
-        * @param aMessage Should be completed when the notifier is deactivated.
-        * @return None.
-        */
-        void GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage); // Get input parameters
-                                         
-        /**
-        * From CBTNotifierBase
-        * Show notes to ask user response and return to Notifier caller by completing message.
-        */      
-        void HandleGetDeviceCompletedL(const CBTDevice* aDev);        
-        
-    private:
-
-        /**
-        * C++ default constructor.
-        */
-        CBTUserConfNotifier();               // Default constructor
-    };
-
-#endif
-
-// End of File
--- a/bluetoothengine/btnotif/inc/devui_const.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,132 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef DEVUI_CONST_H_
-#define DEVUI_CONST_H_
-
-#include <btdevice.h>
-// Order must match the one in resources (R_BT_DEFAULT_DEVICE_NAMES)
-//
-enum TBTDefaultDevNameIndex
-    {
-    EBTDeviceNameIndexComputer = 0,
-    EBTDeviceNameIndexPhone,
-    EBTDeviceNameIndexAudio,
-    EBTDeviceNameIndexKeyboard,
-    EBTDeviceNameIndexMouse,
-    EBTDeviceNameIndexPrinter,
-    EBTDeviceNameIndexCarKit,
-    EBTDeviceNameIndexDefault
-    };
-
-// Enum for items in search filter
-enum TBTSearchFilterItem
-    {
-    EBTSearchForAll = 0,
-    EBTSearchForAudio,
-    EBTSearchForPhone,
-    EBTSearchForComputer,
-    EBTSearchForInput
-    };
-
-// Order must match the one in resources (R_BTNOTIF_ICONS)
-//
-enum TDeviceIconIndex
-    {
-    EDeviceIconComputer = 0,
-    EDeviceIconPhone,
-    EDeviceIconAudio,
-    EDeviceIconDefault,
-    EDeviceIconBlank,
-    EDeviceIconKeyboard,
-    EDeviceIconMouse,
-    EDeviceIconPrinter,
-    EDeviceIconCarkit,
-    EDeviceIconPaired, 
-    EDeviceIconBlocked,
-    EDeviceIconRssiLow, 
-    EDeviceIconRssiMed,
-    EDeviceIconRssiGood,
-    };
-
-struct TDeviceIconFormat
-    {
-    TDeviceIconIndex iIdx;
-    const TText* iFormat;
-    };
-
-// Order must match the one in TDeviceIconIndex
-//
-const TDeviceIconFormat KDeviceIconFormatTable[] =
-    {
-    {EDeviceIconComputer, _S("0\t")},  //computer
-    {EDeviceIconPhone,    _S("1\t")},  // phone
-    {EDeviceIconAudio,    _S("2\t")},  // audio
-    {EDeviceIconDefault,  _S("3\t")},  // default
-    {EDeviceIconBlank,    _S("4\t")},  // blank
-    {EDeviceIconKeyboard, _S("5\t")},  // keyboard
-    {EDeviceIconMouse,    _S("6\t")},  // mouse
-    {EDeviceIconPrinter,  _S("7\t")},  // printer
-    {EDeviceIconCarkit,   _S("8\t")},  // carkit
-    {EDeviceIconPaired,   _S("\t9")},  // paired
-    {EDeviceIconBlocked,  _S("\t10")}, // blocked
-    {EDeviceIconRssiLow,  _S("\t11")}, // RssiLow
-    {EDeviceIconRssiMed,  _S("\t12")}, // RssiMed
-    {EDeviceIconRssiGood, _S("\t13")}  // RssiGood
-    };
-
-// Total number of different device icons
-const TInt KDeviceIconCount = 
-    sizeof(KDeviceIconFormatTable) / sizeof(TDeviceIconFormat);
-
-/*
- * The classification of a device's icon and default name
- * corresponding to its major and minor device classes.
- */
-struct TDeviceRowLayout
-    {
-    TInt iMajorDevClass;
-    TInt iMinorDevClass;
-    TDeviceIconIndex iIconIndex;
-    TBTDefaultDevNameIndex iDefaultNameIndex;
-    };
-
-/*
- * Device classification mapping table.
- * 
- * Notice 1: Considering runtime searching efficiency, if certain major or minor 
- * device classes shall use the default icon and name, it is not recommended 
- * to present in this table. 
- * 
- * Notice 2: Regulated by searching algorithm, when devices carrying the same 
- * major device class may have different icons and names for different minor 
- * device classes, the unclassified minor device class must present at last 
- * among these belonging to the same major device class.
- */
-const TDeviceRowLayout KDeviceRowLayoutTable[] = 
-    {
-    {EMajorDeviceComputer,    0,                              EDeviceIconComputer, EBTDeviceNameIndexComputer },
-    {EMajorDevicePhone,       0,                              EDeviceIconPhone,    EBTDeviceNameIndexPhone }, 
-    {EMajorDeviceAudioDevice, EMinorDeviceAVCarAudio,         EDeviceIconCarkit,   EBTDeviceNameIndexCarKit }, 
-    {EMajorDeviceAudioDevice, 0,                              EDeviceIconAudio,    EBTDeviceNameIndexAudio }, 
-    {EMajorDeviceImaging,     EMinorDeviceImagingPrinter,     EDeviceIconPrinter,  EBTDeviceNameIndexPrinter }, 
-    {EMajorDevicePeripheral,  EMinorDevicePeripheralKeyboard, EDeviceIconKeyboard, EBTDeviceNameIndexKeyboard }, 
-    {EMajorDevicePeripheral,  EMinorDevicePeripheralPointer,  EDeviceIconMouse,    EBTDeviceNameIndexMouse  }, 
-    };
-
-const TInt KDeviceRowLayoutTableSize = (sizeof(KDeviceRowLayoutTable) / sizeof(TDeviceRowLayout));
-
-#endif /*DEVUI_CONST_H_*/
--- a/bluetoothengine/btnotif/loc/btnotif.loc	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,432 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This is a localisation file for btnotif. 
-*
-*/
-
-
-// LOCALISATION STRINGS
-
-// *** TITLES (FOR POPUP WINDOWS) ***
-
-// d: Header text of the popup window for already found Bluetooth devices
-// d: while searching is still in progress. (List query)
-// d: Note! There is also an icon at right edge of the title.
-// l: heading_pane_t1/opt2
-//
-#define qtn_bt_searching_found "Searching"
-
-// d: Header text of the popup window for already found Bluetooth devices.
-// d: while searching has been completed. (List query)
-// l: heading_pane_t1
-//
-#define qtn_bt_devices_found "Devices found:"
-
-// d: Header text of the popup window for "last seen bluetooth devices". (List query)
-// l: heading_pane_t1
-//
-#define qtn_bt_last_seen_devices "Last seen devices"
-
-// d: Header text of the popup window for last used bluetooth devices. (List query)
-// l: heading_pane_t1
-//
-#define qtn_bt_last_used_devices "Bluetooth devices:"
-
-// d: List item text (with icon at left) of the popup window
-// d: for "last seen bluetooth devices". (List query)
-// l: list_single_graphic_pane_t1_cp2
-//
-#define qtn_bt_more_devices "More devices"
-
-// Generic_BTUI
-// d: Header text of the search device filer
-// l: heading_pane_t1
-// r: 5.1
-#define qtn_bt_search_for "Search for:"
-
-// d: list item text for different class of devices in search filter
-// l: list_single_graphic_pane_t1_cp2
-// r: 5.1
-#define qtn_bt_search_for_all "All devices"
-
-// d: list item text for different class of devices in search filter
-// l: list_single_graphic_pane_t1_cp2
-// r: 5.1
-#define qtn_bt_search_for_audio "Audio devices"
-
-// d: list item text for different class of devices in search filter
-// l: list_single_graphic_pane_t1_cp2
-// r: 5.1
-#define qtn_bt_search_for_phone "Phones"
-
-// d: list item text for different class of devices in search filter
-// l: list_single_graphic_pane_t1_cp2
-// r: 5.1
-#define qtn_bt_search_for_computer "Computers"
-
-// d: list item text for different class of devices in search filter
-// l: list_single_graphic_pane_t1_cp2
-// r: 5.1
-#define qtn_bt_search_for_input "Input devices"
-//End Generic_BTUI
-
-// *** SOFTKEYS ***
-
-// d: Right softkey for device search popup menu list while searching is still in progress.
-// l: control_pane_t1/opt7
-//
-#define qtn_bt_softkey_stop "Stop"
-
-
-// *** QUERIES ***
-
-// d: Confirmation query when Bluetooth needs to be activated.
-// l: popup_note_window
-//
-#define qtn_bt_is_off "Bluetooth is currently switched off. Switch on?"
-
-// d: Confirmation query when Bluetooth needs to be activated in off-line mode.
-// l: popup_note_window
-//
-#define qtn_bt_activate_in_offline "Do you want to activate bluetooth in off-line mode?"
-
-// d: Confirmation query when Bluetooth device search has met timeout and no devices has been found.
-// l: popup_note_window
-//
-#define qtn_bt_no_devices_found "No Bluetooth devices found. Try again?" 
-
-// d: Data query when pairing procedure is needed. Bluetooth passkey is entered.
-// l: popup_query_data_window
-//
-#define qtn_bt_enter_pk_for_conn "Enter passkey for: %U"
-
-// d: Heading text for qtn_bt_enter_pk_for_conn -query
-// l: popup_info_list_pane_t2/opt1
-//
-#define qtn_bt_passkey_heading "Bluetooth"
-
-// d: Confirmation query when remote Bluetooth device want's connect to us.
-// l: popup_note_window
-//
-#define qtn_bt_accept_conn_request "Accept connection request from:\n%U"
-
-// d: Confirmation query when remote Bluetooth (unpaired) device want's to send obex message to us.
-// l: popup_note_window
-//
-#define qtn_bt_receive_message "Receive Bluetooth message from: %U"
-
-// d: Confirmation query when remote Bluetooth (paired) device want's to send obex message to us.
-// l: popup_note_window
-//
-#define qtn_bt_receive_message_paired "Receive message via Bluetooth from paired device %U?"
-
-// d: Data query when obex file transfer needs it. OBEX passkey is entered.
-// l: popup_query_data_window
-//
-#define qtn_bt_enter_obex_pcode "Passcode for data transfer:"
-
-// d: This is default prompt extension for queries, notes and lists that contain Bluetooth device name.
-// d: The %U in queries are replaced with this text if no other Bluetooth device name is available.
-// l: list_single_graphic_pane_t1_cp2
-//
-#define qtn_bt_dialog_def_name "Bluetooth Device"
-
-// *** NOTES ***
-
-// d: Wait note while phone is performing Bluetooth device search/inquiry.
-// l: popup_note_wait_window
-//
-#define qtn_bt_searching "Searching for devices"
-
-// d: Information note if there is maximum number of connections and new one could not be created.
-// l: popup_note_window
-//
-#define qtn_bt_busy "Maximum amount of Bluetooth connections in use. Can't establish a new one."
-
-// d: Confirmation query when Bluetooth needs to be turned off when there os active BT connection.
-// l: popup_note_window
-//
-#define qtn_bt_switch_off_anyway "Active Bluetooth connection.\nSwitch off anyway?"
-
-
-// *** GLOBAL NOTES ***
-
-// d: Global Information note telling audio is routed to BT handsfree.
-// l: popup_note_window
-//
-#define qtn_bt_audio_accessory "Audio routed to BT handsfree"
-
-// d: Global Information note telling audio is routed to handset.
-// l: popup_note_window
-//
-#define qtn_bt_audio_handset "Audio routed to handset"
-
-// d: Global Information note for successful connection establishment.
-// l: popup_note_window
-//
-#define qtn_bt_conf_connected "Connected to %U"
-
-// d: Global Information note for successful connection close.
-// l: popup_note_window
-//
-#define qtn_bt_conf_disconnected "Disconnected from %U"
-
-// d: Global Information note telling BT connection was closed outside the phones menu.
-// l: popup_note_window
-//
-#define qtn_bt_conn_closed "Bluetooth connection to %U closed"
-
-// d: An information note when Bluetooth needs to be activated and it's disallowed in off-line mode.
-// l: popup_note_window
-//
-#define qtn_bt_offline_disabled "Bluetooth can't activated in off-line mode"
-
-// d: Global information note telling phone is entering SIM access profile mode
-// l: popup_note_window
-//
-#define qtn_bt_wait_sap_entering "Phone entering SIM access profile mode"
-
-// d: Global information note telling phone entering SIM access profile mode is succeeded
-// l: popup_note_window
-//
-#define qtn_bt_sap_entering_succeeded "Phone in SIM access profile mode"
-
-// d: Global information note telling phone entering SIM access profile mode is failed
-// l: popup_note_window
-//
-#define qtn_bt_sap_entering_failed "Unable to enter SIM access profile mode"
-
-// d: Global information note telling phone has no sim card
-// l: popup_note_window
-//
-#define qtn_bt_sap_no_sim "No SIM card in phone" 
-
-// d: Global information note telling phone bt stays switched on
-// l: popup_note_window
-//
-#define qtn_bt_permanently_on "Bluetooth switched permanently on"
-// d: Global information note telling phone bt is switched on
-// l: popup_note_window
-//
-#define qtn_bt_switched_on "Bluetooth switched on"
-
-// d: Global information note telling phone bt is switched off
-// l: popup_note_window
-//
-#define qtn_bt_switched_off "Bluetooth switched off"
-
-// *** DEFAULT BLUETOOTH DEVICE CLASS NAMES ***
-
-// The icon of each Bluetooth device shown in the UI is based on
-// Class of Device (CoD). These are defined in the "Bluetooth" UI specification.
-// Device classes and their default names are:
-
-// d: Class of Device = Computer
-// l: list_single_graphic_pane_t1_cp2
-//
-#define qtn_bt_computer "Computer"
-
-// d: Class of Device = Phone
-// l: list_single_graphic_pane_t1_cp2
-//
-#define qtn_bt_phone "Phone"
-
-// d: Class of Device = Audio/Video
-// l: list_single_graphic_pane_t1_cp2
-//
-#define qtn_bt_audio "Audio/Video"
-
-// d: Class of Device = Audio
-// l: list_single_graphic_pane_t1_cp2
-// r: 5.1
-#define qtn_bt_gen_audio "Audio"
-
-// d: Class of Device = Keyboard
-// l: list_single_graphic_pane_t1_cp2
-// r: 5.1
-#define qtn_bt_keyboard "Keyboard"
-
-// d: Class of Device = Mouse
-// l: list_single_graphic_pane_t1_cp2
-// r: 5.1
-#define qtn_bt_mouse "Mouse"
-
-// d: Class of Device = Printer
-// l: list_single_graphic_pane_t1_cp2
-// r: 5.1
-#define qtn_bt_printer "Printer"
-
-// d: Class of Device = Car kit
-// l: list_single_graphic_pane_t1_cp2
-// r: 5.1
-#define qtn_bt_carkit "Car kit"
-// d: Data query when pairing procedure is needed. Bluetooth passkey is entered.
-// l: popup_query_data_window
-// w:
-// r: 3.0
-#define qtn_bt_enter_pk_sap "Enter %0N digit passkey for %1U"
-
-// d: Data query when user has try to turn BT on  for the first time and
-// d: there is no local Bluetooth name defined yet (empty name).
-// l: popup_query_data_window
-//
-#define qtn_enter_bt_name "My Bluetooth name:"
-
-// d: Information note shows the phone's visibility has changed to hidden.
-// l: popup_note_window
-// w:
-// r: 3.1
-//
-#define qtn_bt_hidden_from_others "Phone is not detectable in searches made by other devices" 
-
-// d: Confirmation query when use refuse the incoming connection request and want to block connection
-// l: popup_note_window
-// w: 
-// r: 3.1
-#define qtn_bt_block_conn_request "Block connection request from %U?"
-
-// d: query if the bluetooth is off, when java needs it.
-// l: popup_info_list_pane_t1
-// w:
-// r: 3.2
-#define qtn_bt_is_off_java "The application you are using will not be fully functional while Bluetooth is off. \n\nDo you want to turn Bluetooth on?"
-
-// d: query if the bluetooth is off, when java needs it.
-// l: heading_pane_t1
-// w:
-// r: 3.2
-#define qtn_bt_is_off_java_header "Turn Bluetooth on?"
-
-// d: query if the bluetooth is hidden, when discoverabiliti is needed.
-// l: popup_info_list_pane_t1
-// w:
-// r: 3.2
-#define qtn_bt_is_hidden_java "Do you want to change your Bluetooth visibility setting value to 'Shown to all'? \n\nThe application you are using will not be fully functional while your Bluetooth visibility is set as 'Hidden'."
-
-// d: query header if the bluetooth is hidden, when discoverabiliti is needed.
-// l: heading_pane_t1
-// w:
-// r: 3.2
-#define qtn_bt_is_hidden_java_header "Change discoverability?"
-
-// d: When the Infrared feature is disabled in runtime, a global information note is shown to the user when Infrared reception is tried to be activated..
-// l: popup_note_window
-// w:
-// r: 3.2
-#define qtn_ir_not_supported  "Infrared not supported"
-
-// d: Confirmation query when use refuse the incoming connection request and want to block connection  >>> Isn't this a heading?
-// l: heading_pane_t1
-// w: 
-// r: 3.2
-#define qtn_bt_block_device_header "Block device?"
-
-// d: Confirmation query when use refuse the incoming connection request and want to block connection
-// l: popup_info_list_pane_t1
-// w: 
-// r: 3.2
-#define qtn_bt_block_all_conn_attempts "Do you want to block all future connection attempts from device %U?"
-
-// d: the link key to help in confirmation query when use refuse the incoming connection request and want to block connection from paired device
-// l: popup_info_list_pane_t1
-// w: 
-// r: 3.2
-#define qtn_bt_block_paired_device "Do you want to block all future connection attempts from paired device %U? \nThis will delete your pairing with the device."
-
-// d: Confirmation query when pairing is requested by the remote device
-// l: popup_note_window
-// w:
-// r: 3.2
-#define qtn_bt_accept_pairing_request "Device '%U' is trying to pair with you. Allow pairing?"
-
-// d: When VoIP call is on going over WLAN, BT device search is not allowed, a global information note is shown to the user.
-// l: popup_note_window
-// w:
-// r: 3.1
-#define qtn_bt_no_device_discovery_voip "While a VOIP call over WLAN is on-going, Bluetooth device discovery is not possible."
-
-// d: Query if the bluetooth is off, when java needs it. In this query %U will be substituted with requiring Java application's name.
-// l: popup_info_list_pane_t1
-// w:
-// r: 5.0
-#define qtn_bt_is_off_java_appname "The %U application you are using will not be fully functional while Bluetooth is off.\n\nDo you want to turn Bluetooth on?"
-
-// d: Query if the bluetooth is hidden, when discoverabiliti is needed. In this query %U will be substituted with requiring Java application's name.
-// l: popup_info_list_pane_t1
-// w:
-// r: 5.0
-#define qtn_bt_is_hidden_java_appname "The %U application you are using will not be fully functional when your visibility is set as ’Hidden? Do you want to change your Bluetooth visibility to ’Shown to all?"
-
-// d: If DOS attacked is detected, user is asked if bluetooth should be swtiched off.
-// l: popup_note_window
-// r: 5.0
-#define qtn_bt_dos_query "Switch Bluetooth off?"
-
-// d: If a blocked device is selected after searching devices starts, user is asked whether to unblock it.
-// l: popup_note_window
-// r: 5.0
-#define qtn_bt_unblock_device "%U is blocked. Do you want to unblock it?"
-
-// *** Information Notes for AVRCP1.3 *** 
-
-// d: the battery level of AVRCP1.3-supported accessory drops below "low" treshold
-// l: popup_note_window
-// r: 5.1
-#define qtn_bt_accessory_low "%U battery level low"
-
-// d: the battery level of AVRCP1.3-supported accessory drops below "critical" treshold
-// l: popup_note_window
-// r: 5.1
-#define qtn_bt_accessory_critical "%U battery level critical"
-
-// *** Query for Simple Pairing ***
-
-// d: Confirmation query when simple pairing procedure is needed. Check if Bluetooth passkeys shown in two devices match.
-// l: popup_note_window
-// d: %U contains device name, %U1 contains passkey.
-// r: 5.1
-#define qtn_bt_simple_passkey_comparison "Does this code match the one on %0U?\n\n%1U"
-
-// d: Query askes user to type the passkey code from remote input device.
-// d: %U contains device name %U1 contains passkey.
-// l: popup_note_window
-// r: 5.1
-#define qtn_bt_simple_passkey_entry "Enter on %0U:\n\n%1U"
-
-// *** Error notes for SSP ***
-
-// d: Error note if a timeout is exceeded before the user accepts or denies the query.
-// d: %U contains device name.
-// l: popup_note_window
-// r: 5.1
-#define qtn_bt_pairing_failed "Unable to pair with %U"
-
-// d: Warning note If the remote device is already in the process of pairing with another device.
-// l: popup_note_window
-// r: 5.1
-#define qtn_bt_simple_busy "Pairing failed. Remote device is pairing with another device." 
-
-// *** Notes and query for incoming authorization ***
-// d: Confirmation note shows pairing succeeded.
-// d: %U contains device name.
-// l: popup_note_window
-// r: 5.1
-#define qtn_bt_succesfully_paired "Pairing with %U complete" 
-
-// d: Confirmation query to set a Bluetooth device authorised after user has succesfully paired with the device.
-// l: popup_note_window
-//
-#define qtn_bt_authorisation_query "Authorise this device to make connections automatically?"
-
-//End
--- a/bluetoothengine/btnotif/rom/BtnotifResources.iby	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#ifndef __BTNOTIFRESOURCES_IBY__
-#define __BTNOTIFRESOURCES_IBY__
-
-data=DATAZ_\RESOURCE_FILES_DIR\btnotif.rsc			RESOURCE_FILES_DIR\btnotif.rsc
-
-#endif
--- a/bluetoothengine/btnotif/src/BTNAuthNotifier.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,634 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Implements authorisation notifier class.
-*
-*/
-
-
-// INCLUDE FILES
-#include <BTNotif.rsg>       // Own resources
-#include "btnauthnotifier.h" // Own class definition
-#include "btNotifDebug.h"    // Debugging macros
-#include <btextnotifiers.h>
-#include <AknMediatorFacade.h> // Cover UI
-#include <secondarydisplay/BTnotifSecondaryDisplayAPI.h>
-#include <btengconstants.h>
-#include <btengsettings.h>
-#include <e32cmn.h>
-#include <btotgpairpub.inl>
-#include <btengprivatecrkeys.h>
-#include <e32property.h>
-#include <e32const.h>
-#include <e32des8.h>
-#include <e32cmn.h>
-#include <utf.h> // Unicode character conversion utilities
-#include <btengutil.h>
-#ifdef __SERIES60_HELP
-#include <hlplch.h>
-#include <csxhelp/bt.hlp.hrh> // The bt hrh info is needed, for help launching
-#endif
-#include <bluetoothuiutil.h>
-#include "btnotifnameutils.h"
-
-
-//
-// SDP UUID Constants - Short form
-// Taken from Bluetooth Profile specification v1.1
-// These are used when registering the service to
-// local SDP database and when searching the service
-// information from remote device.
-const TUint KBTSdpDun                   = 0x1103;
-const TUint KBTSdpGenericTelephony      = 0x1204;
-const TUint KBTSdpFax                   = 0x1111;
-const TUint KBTSdpObjectPush            = 0x1105;
-const TUint KBTSdpFileTransfer          = 0x1106;
-const TUint KBTSdpHeadSet               = 0x1108;
-const TUint KBTSdpGenericNetworking     = 0x1201;
-const TUint KBTSdpBasicImaging          = 0x111b;
-
-/**  Identification for active object */
-const TInt KBTNotifAuthNotifierLockReq = 10;
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ----------------------------------------------------------
-// CBTAuthNotifier::NewL
-// Two-phased constructor.
-// ----------------------------------------------------------
-//
-CBTAuthNotifier* CBTAuthNotifier::NewL()
-    {
-    CBTAuthNotifier* self = new (ELeave) CBTAuthNotifier();
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop();
-    return self;
-    }
-
-// ----------------------------------------------------------
-// CBTAuthNotifier::CBTAuthNotifier
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// ----------------------------------------------------------
-//
-CBTAuthNotifier::CBTAuthNotifier()
-    {
-    }
-
-// ----------------------------------------------------------
-// Destructor
-// ----------------------------------------------------------
-//
-CBTAuthNotifier::~CBTAuthNotifier()
-    {
-    }
-
-// ----------------------------------------------------------
-// CBTAuthNotifier::RegisterL
-// ----------------------------------------------------------
-//
-CBTAuthNotifier::TNotifierInfo CBTAuthNotifier::RegisterL()
-    {
-    iInfo.iUid=KBTManAuthNotifierUid;
-    iInfo.iChannel=KBTAuthorisationChannel;
-    iInfo.iPriority=ENotifierPriorityVHigh;
-    return iInfo;
-    }
-
-// ----------------------------------------------------------
-// CBTAuthNotifier::GetParamsL
-// Initialize parameters and check if device is already
-// in registry. Jump to RunL as soon as possible.
-// ----------------------------------------------------------
-//
-void CBTAuthNotifier::GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage)
-    {
-    FLOG(_L("[BTNOTIF]\t CBTAuthNotifier::GetParamsL()"));
-
-    if( !iMessage.IsNull())
-        {
-        User::Leave(KErrInUse);
-        }
-
-    iMessage = aMessage;
-    iReplySlot = aReplySlot;
-
-    if ( AutoLockOnL() )
-        {
-        // The phone is locked, access denied.
-        // Write results back to caller and complete message.	
-	CompleteMessage(EFalse, KErrNone);	
-        return;
-        }
-    
-    TBTAuthorisationParams param;
-    TPckgC<TBTAuthorisationParams> pckg(param);
-    pckg.Set(aBuffer);
-
-    iServiceUid = pckg().iUid.iUid;  // Pick up service uid from message
-    iBTAddr = pckg().iBDAddr;
-    if ( OtherOutgoPairing( iBTAddr ) )
-        {
-        // We won't allow connection request from another device during outgoing pairing:
-        FLOG(_L("[BTNOTIF]\t CBTAuthNotifier: outgoing pair in progress, reject request from other device"));
-        CompleteMessage(KErrCancel);
-        return;
-        }	
- 	
-    // create iDevice so that the name won't be lost if the device does
-    // not exist in registry.
-    iDevice = CBTDevice::NewL( iBTAddr );
-    BtNotifNameUtils::SetDeviceNameL(pckg().iName, *iDevice);
-
-    if ( !iNotifLockProp.Handle() )
-        {
-        User::LeaveIfError( iNotifLockProp.Attach( 
-                KPSUidBluetoothEnginePrivateCategory, KBTNotifierLocks ) );
-        }
-    
-    if(!iLockActive)
-        {
-        iLockActive = CBTNotifActive::NewL( this, KBTNotifAuthNotifierLockReq, CActive::EPriorityStandard );
-        }
-
-    CheckAndSubscribeNotifLocks();
-    
-    if ( !iSuspended )
-        {
-        // Check if device is in the registry, function of notifier base  
-        GetDeviceFromRegL( iBTAddr );
-        }
-
-#ifdef _DEBUG
-    FLOG(_L("[BTNOTIF]\t CBTAuthNotifier::GetParamsL() Executing authorisation..."));
-    TBuf<12> deviceAddressString;
-    pckg().iBDAddr.GetReadable(deviceAddressString);
-    FTRACE(FPrint(_L("[BTNOTIF]\t  BT Address: %S"), &deviceAddressString));
-    FTRACE(FPrint(_L("[BTNOTIF]\t CBTAuthNotifier::GetParamsL Service Uid: %d = 0x%X"), iServiceUid, iServiceUid ));
-#endif
-    FLOG(_L("[BTNOTIF]\t CBTAuthNotifier::GetParamsL() completed"));
-    }
-
-// ----------------------------------------------------------
-// CBTAuthNotifier::UpdateL
-// Notifier update. Stores the received bluetooth
-// device name into registry and show it on screen.
-// ----------------------------------------------------------
-//
-TPtrC8 CBTAuthNotifier::UpdateL(const TDesC8& aBuffer)
-    {
-    FLOG(_L("[BTNOTIF]\t CBTAuthNotifier::UpdateL()"));
-
-    TBTNotifierUpdateParams params; // Contains iName and iResult (name request)
-    TPckgC<TBTNotifierUpdateParams> pckg(params);
-    pckg.Set(aBuffer);
-
-    FTRACE(FPrint(_L("[BTNOTIF]\t CBTAuthNotifier::UpdateL - Name: '%S' length: %d"), &pckg().iName, pckg().iName.Length() ));
-
-
-    // If the device name request was successful and if new name is valid, show the new name.
-    if (pckg().iResult == KErrNone)
-        {
-        BtNotifNameUtils::SetDeviceNameL(pckg().iName, *iDevice); // Override possible previous device name
-
-        // Show new prompt for dialog if it is still on the screen
-        if ( !iDevice->IsValidFriendlyName() && iDevice->IsValidDeviceName())
-            {
-            // Create new prompt string with new device name
-            RBuf stringholder;
-            CleanupClosePushL( stringholder );
-            BluetoothUiUtil::LoadResourceAndSubstringL( 
-                    stringholder, iStrResourceId, 
-                    BTDeviceNameConverter::ToUnicodeL(iDevice->DeviceName()), 0 );
-            iNotifUiUtil->UpdateQueryDlgL( stringholder );
-            iNotifUiUtil->UpdateCoverUiL( iDevice->DeviceName() );
-            CleanupStack::PopAndDestroy();  // stringholder
-            }
-        }
-    FLOG(_L("[BTNOTIF]\t CBTAuthNotifier::UpdateL() completed"));
-    TPtrC8 ret(KNullDesC8);
-    return (ret);
-    }
-
-// ----------------------------------------------------------
-// CBTAuthNotifier::RequestCompletedL
-// Gets called when P&S key notifies change
-// ----------------------------------------------------------
-void CBTAuthNotifier::RequestCompletedL( CBTNotifActive* aActive, TInt aId, TInt aStatus )
-    {
-    FLOG(_L("[BTNOTIF]\t CBTAuthNotifier::RequestCompletedL()"));
-    ASSERT( aId == KBTNotifAuthNotifierLockReq );
-    (void) aActive;
-    (void) aId;
-    
-    if ( aStatus == KErrNone )
-        {
-        TBool prevSuspend = iSuspended;
-        // check the latest lock status and subscribe to further lock event:
-        CheckAndSubscribeNotifLocks();
-        if ( prevSuspend && !iSuspended )
-            {
-            // Check if device is in the registry, function of notifier base  
-            GetDeviceFromRegL( iBTAddr ); 
-            }
-        else if ( iSuspended && !(iNotifUiUtil->IsQueryReleased()) )
-            {
-            iNotifUiUtil->DismissDialog();
-            }
-        }
-    else
-        {
-        HandleError( aActive, KBTNotifAuthNotifierLockReq, iLockActive->RequestStatus().Int() );
-        }
-        
-    FLOG(_L("[BTNOTIF]\t CBTAuthNotifier::RequestCompletedL() completed"));
-    
-    }
-
-// ----------------------------------------------------------
-// CBTAuthNotifier::HandleError
-// ----------------------------------------------------------
-void CBTAuthNotifier::HandleError( CBTNotifActive* aActive, TInt aId, TInt aError )
-    {
-    FTRACE(FPrint(_L("[BTNOTIF]\t CBTAuthNotifier::HandleError() error = %d"), aError ));
-    (void) aActive;
-    (void) aId;
-    (void) aError;
-    }
-
-// ----------------------------------------------------------
-// CBTAuthNotifier::DoCancelRequest
-// Root caller is CBTNotifActive::CancelRequest(), which calls 
-// CActive::Cancel that calls DoCancel() if request is active.
-// ----------------------------------------------------------
-void CBTAuthNotifier::DoCancelRequest( CBTNotifActive* aActive, TInt aId )
-    {
-    FLOG(_L("[BTNOTIF]\t CBTAuthNotifier::DoCancel() >>"));
-    ASSERT( aId == KBTNotifAuthNotifierLockReq );
-    (void) aActive;
-    (void) aId;
-    
-    iNotifLockProp.Cancel();
-    FLOG(_L("[BTNOTIF]\t CBTAuthNotifier::DoCancel() <<"));
-    }
-	
-// ----------------------------------------------------------
-// CBTAuthNotifier::Cancel
-// Not Active Object's cancel, but notifier deactivation
-// Release all own resources (member variables)
-// ----------------------------------------------------------
-//
-void CBTAuthNotifier::Cancel()
-    {
-    FLOG(_L("[BTNOTIF]\t CBTAuthNotifier::Cancel()"));
-    
-    if (iLockActive)
-        {
-        iLockActive->CancelRequest();
-        delete iLockActive;
-        iLockActive = NULL;
-        }
-    
-    iNotifLockProp.Close();
-    
-	CBTNotifierBase::Cancel(); 
-    
-    FLOG(_L("[BTNOTIF]\t CBTAuthNotifier::Cancel() completed"));
-    }
-   
-void CBTAuthNotifier::HandleGetDeviceCompletedL(const CBTDevice* aDev)
-	{
-	FLOG(_L("[BTNOTIF]\t CBTAuthNotifier::HandleGetDeviceCompleted()"));	
-    (void) aDev;
-    if ( iSuspended)
-        {
-        FLOG(_L("[BTNOTIF]\t CBTAuthNotifier::HandleGetDeviceCompleted, still suspended, wait"));
-        return;
-        }
-        
-    TBool reqAllowed = IsJustWorksPaired( iDevice->AsNamelessDevice() ) ? 
-        IsUserAwarePaired( iDevice->AsNamelessDevice() ) : ETrue ;
-    FTRACE(FPrint(_L("[BTNOTIF]\t CBTAuthNotifier, reqAllowed %d" ), reqAllowed ) );
-    if ( !reqAllowed )
-        {
-        // Do not grant access to device that is not paired in Just Works mode without
-        // user awareness, e.g. pairing due to an incoming connection request from a 
-        // headset.
-        CompleteMessage(KErrAccessDenied);
-        return;
-        }
-    
-    iStrResourceId = R_BT_AUTHORISATION_NAME;
-
-    // Select authorisation state for further use (dialogue selection)
-    switch( iServiceUid )
-        {
-        case KBTSdpObjectPush:
-        case KBTSdpBasicImaging: 
-            iAuthState = EBTObexAuthorisation;
-            iStrResourceId = R_BT_RECEIVE_MESSAGE;
-            iCoverUiDlgId = ECmdShowReceiveMessageFromDeviceDlg;
-            
-            if( IsUserAwarePaired( iDevice->AsNamelessDevice() ) )
-                {
-                iAuthState = EBTObexAuthForPairedDevice;
-                iStrResourceId = R_BT_RECEIVE_MESSAGE_PAIRED;
-                iCoverUiDlgId = ECmdShowReceiveMessageFromPairedDeviceDlg; 
-                }
-            break;
-        case KBTSdpFax:
-        case KBTSdpDun:
-        case KBTSdpFileTransfer:
-        case KBTSdpHeadSet:
-        case KBTSdpGenericTelephony:
-        case KBTSdpGenericNetworking:
-            if ( iDevice->GlobalSecurity().NoAuthorise() )
-                {
-                iAuthState = EBTAutoAuthorisation;
-                }
-            else
-                {
-                iAuthState = EBTNormalAuthorisation;
-                }
-            iCoverUiDlgId = ECmdShowAcceptConnRequestDlg;
-            break;
-        default:
-            { // check if device is authorized
-            if ( iDevice->GlobalSecurity().NoAuthorise() )
-                {
-                iAuthState = EBTAutoAuthorisation;
-                }
-            else
-                {
-                iAuthState = EBTAutoAuthorisationNotAuthorisedOnPhone;                        
-                }
-            break;
-            }
-        }
-    FTRACE(FPrint(_L("[BTNOTIF]\t CBTAuthNotifier::HandleGetDeviceComplete() Complete. iAuthState = %d"), iAuthState ));    
-    ShowAuthoQueryL();
-	}
-
-// ----------------------------------------------------------
-// CBTAuthNotifier::GetByPassAudioNotifier
-// is bypassing this audio connection query needed and if it is, will the
-// query be automatically accepted or rejected.
-//
-// This is used for bypassing the notifiers of the 2nd audio connection, so
-// the the user needs to reply to the incoming audio link only once.
-// ----------------------------------------------------------
-//    
-TBool CBTAuthNotifier::GetByPassAudioNotifier(const TBTDevAddr& aDeviceAddress,TBool& aAccept)
-	{
-	FLOG(_L("[BTNOTIF]\t CBTAuthNotifier::GetByPassAudioNotifier()"));	
-		TBuf8<48> buf;
-		
-		RProperty::Define(KPSUidBluetoothEnginePrivateCategory,KBTAuthorInfoPerDevice, RProperty::EByteArray );
-		RProperty::Get(KPSUidBluetoothEnginePrivateCategory,KBTAuthorInfoPerDevice,buf);
-
-		if(buf.Length()>2)
-			{
-			// accept status of last attempt			
-			aAccept= (buf[0]=='1');
-
-			// last address						
-			TBuf<12> oldAddrString;
-			oldAddrString.Copy(buf.Mid(2,12));
-			TBTDevAddr lastAddress;
-			lastAddress.SetReadable(oldAddrString);
-			
-			// last time
-			TInt64 num(0);
-			TLex8 lex;			
-			lex=buf.Mid(15);	
-			TBuf<32> tmp_debug;
-			tmp_debug.Copy(buf.Mid(15));
-				
-			lex.Val( num );
-			TTime lastConnectionTime( num );
-			TTime now;			
-			now.UniversalTime();			
-
-			TBuf16<48> buf2;
-			buf2.Copy(buf);
-			
-			FTRACE(FPrint(_L("[BTNOTIF]\t CBTAuthNotifier::GetByPassAudioNotifier() Complete same_address=%d Time_ok=%d last_reply=%d"),lastAddress==aDeviceAddress,now>=lastConnectionTime && now <lastConnectionTime+ TTimeIntervalSeconds(5),aAccept));	
-			return lastAddress==aDeviceAddress && (now>=lastConnectionTime && now <lastConnectionTime+ TTimeIntervalSeconds(5) );		
-			}
-		FLOG(_L("[BTNOTIF]\t CBTAuthNotifier::GetByPassAudioNotifier() Complete - empty key"));				
-		return EFalse;
-	}
-// ----------------------------------------------------------
-// CBTAuthNotifier::MemorizeCurrentAudioAttempt
-// Store the information about this audio connection attempt 
-// and what user replied to that. This is used by
-// GetBypassAudio Notifier.
-// ----------------------------------------------------------
-//    
-    			
-void CBTAuthNotifier::MemorizeCurrentAudioAttempt(const TBool aAccept,const TBTDevAddr& aDeviceAddress)    			
-	{
-	FLOG(_L("[BTNOTIF]\t CBTAuthNotifier::MemorizeCurrentAudioAttempt()"));	
-	TBuf8<48> buf;
-	buf.Zero();
-	buf.AppendNum(aAccept!=EFalse);//now 0/1 only.
-	buf.Append(';');
-	
-	TBuf<12> a;
-	aDeviceAddress.GetReadable(a);
-	for(TInt t=0;t<12;t++)
-		buf.Append(a[t]);
-	buf.Append(';');		
-
-	TTime writeTime;
-	writeTime.UniversalTime();		
-	buf.AppendNum(  writeTime.Int64()  );
-	
-	RProperty::Set(KPSUidBluetoothEnginePrivateCategory,KBTAuthorInfoPerDevice,buf);
-	FLOG(_L("[BTNOTIF]\t CBTAuthNotifier::MemorizeCurrentAudioAttempt() complete"));	
-	}
-
-
-// ----------------------------------------------------------
-// CBTAuthNotifier::ShowAuthoQueryL
-// Ask user's response on authorization query
-// ----------------------------------------------------------
-// 
-void CBTAuthNotifier::ShowAuthoQueryL()
-    {
-    FLOG(_L("[BTNOTIF]\t CBTAuthNotifier::ShowAuthoQueryL"));
-    
-    if ( iAuthState == EBTAutoAuthorisation )
-        {
-        // device alreay set trusted now. allow connection automatically       
-        CompleteMessage(ETrue, KErrNone);        
-        FLOG(_L("[BTNOTIF]\t CBTAuthNotifier, device authorized already, allow connection automatically" ));
-        return;
-        }
-
-    TBool reply;
-    if ( GetByPassAudioNotifier(iDevice->BDAddr(),reply) )
-        {
-        FTRACE(FPrint(_L("[BTNOTIF]\t CBTAuthNotifier::ShowAuthoQueryL bypassing notifier with reply: %d"),reply));          
-        CompleteMessage(reply, KErrNone);
-        return;
-        }
-
-    // Not asking user's response if auth request is for: profile HFP/HSP/A2DP/AVRCP, and
-    // there is already existing connection to one of those profiles from the same device.
-    // 
-    TBool connectStatus = IsExistingConnectionToAudioL( iDevice->BDAddr() );  
-    // if iAuthState==EBTAutoAuthorisationNotAuthorised and device is connected it means it tries several connections
-    // so we just approve this. Also if connected & EBTAutoAuthorisation.
-    //                              
-    if(connectStatus && ( iAuthState==EBTAutoAuthorisationNotAuthorisedOnPhone))                                         
-        {
-        FLOG(_L("[BTNOTIF]\t CBTAuthNotifier::Automatic authorisation ()"));
-        //Antomatic authorisation without asking user           
-        CompleteMessage(ETrue, KErrNone);   
-        FLOG(_L("[BTNOTIF]\t CBTAuthNotifier::ShowAuthoQueryL() completed-"    ));     
-        return;                 
-        }
-
-    // check if we're showing bt off query
-    TInt queryValue=EBTQueryOff;
-    RProperty::Get(KPSUidBluetoothEnginePrivateCategory,KBTTurnBTOffQueryOn,queryValue);                
-    if( queryValue == EBTQueryOn )
-        {
-        CompleteMessage(KErrCancel);
-        return;
-        }
-
-    TBTDeviceName tempDeviceName; 
-    BtNotifNameUtils::GetDeviceDisplayName(tempDeviceName, iDevice);
-    RBuf stringholder;
-    CleanupClosePushL( stringholder );
-    BluetoothUiUtil::LoadResourceAndSubstringL( 
-            stringholder, iStrResourceId, tempDeviceName, 0);
-    TInt keypress = iNotifUiUtil->ShowQueryL( stringholder, R_BT_AUTHORISATION_QUERY, 
-            iCoverUiDlgId, tempDeviceName, CAknQueryDialog::EConfirmationTone );
-    CleanupStack::PopAndDestroy();  // stringholder
-    // If this notifier is cancelled by the caller, no need to perform the rest operation:
-    if ( iSuspended || iMessage.IsNull() )
-        {
-        return;
-        }
-    
-    if( keypress )  // User has accepted the dialog
-        {
-        if( iDevice && !iDevice->IsValidLinkKey() )
-            {               
-            TTime now;
-            now.UniversalTime();
-            TBuf8<32> buf;
-            buf.AppendNum(  now.Int64()  );             
-            RProperty::Set(KPSUidBluetoothEnginePrivateCategory,KBTConnectionTimeStamp,buf);                
-            }
-        
-        MemorizeCurrentAudioAttempt(ETrue,iDevice->BDAddr() );
-        CompleteMessage( ETrue, KErrNone );
-        }
-    else // User has rejected the dialog.
-        {
-        iLockActive->CancelRequest();
-        DoRejectAuthorizationL();
-        }
-    }
-
-
-// ----------------------------------------------------------
-// CBTAuthNotifier::DoRejectAuthorizationL
-// Handle query threshold and block after user rejects authorization
-// ----------------------------------------------------------
-//
-void CBTAuthNotifier::DoRejectAuthorizationL()
-    {
-    FLOG(_L("[BTNOTIF]\t CBTAuthNotifier::DoRejectAuthorizationL()"));
-    
-    CheckAndHandleQueryIntervalL();
-    if( iMessage.IsNull() )
-        {
-        return; // No need to continue.
-        }
-
-    MemorizeCurrentAudioAttempt(EFalse,iDevice->BDAddr());
-    
-    //Logic: query block only at the second time for the same paired device
-    //       query block everytime after rejection for non-paired device.
-    if( IsPaired( iDevice->AsNamelessDevice() ) )
-        {
-        FLOG(_L("[BTNOTIF]\t CBTAuthNotifier::DoRejectAuthorizationL() rejected a paired device."));            
-        
-        TBuf<2*KBTDevAddrSize> tmp; //2 hex digits per byte
-        RProperty::Get(KPSUidBluetoothEnginePrivateCategory, KBTBlockDevAddr, tmp);
-        TBTDevAddr priorDeviceaddress;
-        priorDeviceaddress.Reset();
-        priorDeviceaddress.SetReadable(tmp);
-        
-        if(priorDeviceaddress != iDevice->BDAddr() )                            
-            {
-            FLOG(_L("[BTNOTIF]\t CBTAuthNotifier::DoRejectAuthorizationL() NOT the prior rejected device, no block query."));           
-            
-            // The last device was not current device,
-            // so the last device is updated to be current device.                  
-            iDevice->BDAddr().GetReadable(tmp);
-            RProperty::Set(KPSUidBluetoothEnginePrivateCategory, KBTBlockDevAddr, tmp );
-
-            // Complete message and free resources
-            CompleteMessage(EFalse, KErrNone);
-            FLOG(_L("[BTNOTIF]\t CBTAuthNotifier::DoRejectAuthorizationL() completed"));
-            return;
-            }
-        else 
-            {
-            FLOG(_L("[BTNOTIF]\t CBTAuthNotifier::DoRejectAuthorizationL() IS SAME as the prior rejected device."));           
-            
-            // this was 2nd time in row. Clear the key, so the question will not be made next time.
-            TBuf<2*KBTDevAddrSize> tmp;                 
-            TBTDevAddr emptyAddr;
-            emptyAddr.Reset();
-            emptyAddr.GetReadable(tmp);                 
-            RProperty::Set(KPSUidBluetoothEnginePrivateCategory, KBTBlockDevAddr, tmp );
-            }
-        }
-        
-    // Ask user to Block this device or not.
-    if( !iMessage.IsNull() )
-        {
-        QueryBlockDeviceL();
-        }
-    }
-
-// ----------------------------------------------------------
-// CBTAuthNotifier::CheckAndSubscribeNotifLocks
-// Subscribe to PS key and check key value.
-// ----------------------------------------------------------
-//
-void CBTAuthNotifier::CheckAndSubscribeNotifLocks()
-    {
-    if ( !iLockActive->IsActive() )
-        {
-        FLOG(_L("[BTNOTIF]\t CBTAuthNotifier, Subscribe Device Operation Info"));
-        iNotifLockProp.Subscribe( iLockActive->RequestStatus() );
-        iLockActive->GoActive();
-        }
-    TInt ops;
-    TBTNotifLockPublish::GetNotifLocks( iNotifLockProp, 
-            ops, iBTAddr );
-    iSuspended = ops & EBTNotiferLockPairedDeviceSetting;
-    FTRACE(FPrint(_L("[BTNOTIF]\t CBTAuthNotifier suspended ? %d"), iSuspended ));    
-    }
-
-
-// End of File
--- a/bluetoothengine/btnotif/src/BTNGenericInfoNotifier.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,262 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Bluetooth visibility timeout notifier class.
-*
-*/
-
-
-// INCLUDE FILES
-
-#include <StringLoader.h>       // Localisation stringloader
-#include <BTNotif.rsg>          // Own resources
-#include "BTNGenericInfoNotifier.h"      // Own class definition
-#include "btNotifDebug.h"       // Debugging macros
-#include <secondarydisplay/BTnotifSecondaryDisplayAPI.h>
-#include <e32cmn.h>
-#include <bluetoothuiutil.h>
-#include "btnotifnameutils.h"
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ----------------------------------------------------------
-// CBTGenericInfoNotifier::NewL
-// Two-phased constructor.
-// ----------------------------------------------------------
-//
-CBTGenericInfoNotifier* CBTGenericInfoNotifier::NewL()
-    {
-    CBTGenericInfoNotifier* self=new (ELeave) CBTGenericInfoNotifier();
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop();
-    return self;
-    }
-
-// ----------------------------------------------------------
-// CBTGenericInfoNotifier::CBTGenericInfoNotifier
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// ----------------------------------------------------------
-//
-CBTGenericInfoNotifier::CBTGenericInfoNotifier() 
-    {
-    }
-
-// ----------------------------------------------------------
-// Destructor
-// ----------------------------------------------------------
-//
-CBTGenericInfoNotifier::~CBTGenericInfoNotifier()
-    {
-    Cancel();   // Free own resources
-    iQueryMessage.Close(); 
-    }
-
-// ----------------------------------------------------------
-// CBTGenericInfoNotifier::RegisterL
-// Register notifier.
-// ----------------------------------------------------------
-//
-CBTGenericInfoNotifier::TNotifierInfo CBTGenericInfoNotifier::RegisterL()
-    {
-    iInfo.iUid=KBTGenericInfoNotifierUid;
-    iInfo.iChannel=KBTGenericInfoNotifierUid;
-    iInfo.iPriority=ENotifierPriorityHigh;
-    return iInfo;
-    }
-
-// ----------------------------------------------------------
-// CBTGenericInfoNotifier::StartL
-// Synchronic notifier launch. Contructs and shows a global
-// note when temp visibility expire, no parameters need here.
-// ----------------------------------------------------------
-//
-TPtrC8 CBTGenericInfoNotifier::StartL( const TDesC8& aBuffer )
-    {
-    FLOG(_L("[BTNOTIF]\t CBTGenericInfoNotifier::StartL()"));
-    if( !iNotifUiUtil )
-        {
-        iNotifUiUtil = CBTNotifUIUtil::NewL( iIsCoverUI );
-        }
-    ProcessParamBufferL(aBuffer, ETrue);
-    FLOG(_L("[BTNOTIF]\t CBTGenericInfoNotifier::StartL() completed"));
-
-    TPtrC8 ret(KNullDesC8);
-    return (ret);
-    }
-
-// ----------------------------------------------------------
-// CBTGenericInfoNotifier::GetParamsL
-// Mandatory for BT Notifiers when using asynchronous launch. 
-// ----------------------------------------------------------
-//
-void CBTGenericInfoNotifier::GetParamsL(const TDesC8& aBuffer, 
-                                     TInt /*aReplySlot*/, 
-                                     const RMessagePtr2& aMessage )
-    {
-	FLOG(_L("[BTNOTIF]\t CBTGenericInfoNotifier::GetParamsL"));  
-	if (!iMessage.IsNull())
-	    {
-	    aMessage.Complete(KErrInUse);
-	    return;
-	    }
-    iMessage = aMessage;
- 	ProcessParamBufferL(aBuffer, EFalse);
-    }
-
-// ----------------------------------------------------------
-// CBTGenericInfoNotifier::ProcessParamBufferL
-// Parse the data out of the message that is sent by the
-// client of the notifier.
-// ----------------------------------------------------------
-void CBTGenericInfoNotifier::ProcessParamBufferL(const TDesC8& aBuffer, TBool aSyncCall)
-	{
-	TBTGenericInfoNotifierParams bParams;
-	TPckgC<TBTGenericInfoNotifierParams> bPckg(bParams);
-		
-	bPckg.Set( aBuffer );
-	iSecondaryDisplayCommand = ECmdBTnotifUnavailable;
-	switch (bPckg().iMessageType)
-		{
-		case EBTConnected: 			
-			iMessageResourceId= R_BT_CONF_CONNECTED_PROMPT; 
-			iSecondaryDisplayCommand=ECmdShowBtConnectedNote;
-			break;
-		case EBTDisconnected: 		
-			iMessageResourceId= R_BT_CONF_DISCONNECTED_PROMPT; 
-			iSecondaryDisplayCommand=ECmdShowBtDisconnectedNote;
-			break;
-		case EBTAudioAccessory: 	
-			iMessageResourceId= R_BT_AUDIO_ACCESSORY_PROMPT; 
-			iSecondaryDisplayCommand=ECmdShowBtAudioAccessoryNote;
-			break;
-		case EBTAudioHandset: 		
-			iMessageResourceId= R_BT_AUDIO_HANDSET_PROMPT; 
-			iSecondaryDisplayCommand=ECmdShowBtAudioHandsetNote;
-			break;
-		case EBTClosed: 			
-			iMessageResourceId= R_BT_CONN_CLOSED_PROMPT; 
-			iSecondaryDisplayCommand=ECmdShowBtDisconnectedNote;
-			break;
-		case EBTDeviceNotAvailable: 
-			iMessageResourceId= R_BT_DEVICE_NOT_AVAIL; 
-			iSecondaryDisplayCommand=ECmdShowBtDeviceNotAvailableNote;
-			break;
-		case EBTOfflineDisabled: 	
-			iMessageResourceId= R_BT_OFFLINE_DISABLED; 
-			iSecondaryDisplayCommand=ECmdShowBtOfflineDisableNote;
-			break;	
-		case EBTVisibilityTimeout: 	
-			iMessageResourceId= R_BT_HIDDEN_FROM_OTHERS_NOTE; 
-			iSecondaryDisplayCommand=ECmdShowBtHiddenFromOthersNote;
-			break;	
-		case EBTEnterSap: 			
-			iMessageResourceId= R_BT_ENTER_SAP_NOTE; 
-			iSecondaryDisplayCommand=ECmdShowBtSapEnteringNote;
-			break;
-		case EBTSapOk: 				
-			iMessageResourceId= R_BT_ENTER_SAP_SUCCEED_NOTE; 
-			iSecondaryDisplayCommand=ECmdShowBtSapEnteringSucceededNote;
-			break;
-		case EBTSapFailed: 			
-			iMessageResourceId= R_BT_ENTER_SAP_FAILED_NOTE; 
-			iSecondaryDisplayCommand=ECmdShowBtSapEnteringFailedNote;
-			break;
-		case EBTSapNoSim: 			
-			iMessageResourceId= R_BT_SAP_NO_SIM_NOTE; 
-			iSecondaryDisplayCommand=ECmdShowBtSapNoSimNote;
-			break;			
-		case EBTDeviceBusy: 
-			iMessageResourceId=R_BT_BUSY_TEXT;
-			iSecondaryDisplayCommand=ECmdShowBtBusyNote;
-			break;
-		case EIRNotSupported: 
-			iMessageResourceId=R_IR_NOT_SUPPORTED;
-			iSecondaryDisplayCommand=ECmdShowIrNotSupportedNote;
-			break;
-		case ECmdShowBtBatteryLow:
-			iMessageResourceId= R_BT_ACCESSORY_LOW;
-			iSecondaryDisplayCommand= ECmdShowBtBatteryLowNote;
-			break;
-		case ECmdShowBtBatteryCritical:
-			iMessageResourceId= R_BT_ACCESSORY_CRITICAL; 
-			iSecondaryDisplayCommand= ECmdShowBtBatteryCriticalNote;
-			break;
-        case EBTStayPowerOn:
-            iMessageResourceId= R_BT_PERMANENTLY_ON; 
-            break;
-    	case EBTSwitchedOn:
-    		iMessageResourceId= R_BT_SWITCHED_ON; 
-    		break;
-    	case EBTSwitchedOff:
-    		iMessageResourceId= R_BT_SWITCHED_OFF;
-    		break;
-		default:
-			FLOG(_L("[BTNOTIF]\t CBTGenericInfoNotifier:: Unkown messageType! ")); 
-			User::Leave(KErrNotFound);		
-		}
-    
-	// if the logic string contains substitute indicator "%U", replace it with device name:
-	HBufC* buf = StringLoader::LoadL( iMessageResourceId);
-	iQueryMessage.Assign( buf );
-	
-    TInt keyLen;
-    TInt pos = BluetoothUiUtil::GetStringSubstringKeyPos( 
-            iQueryMessage, 0, keyLen );
-    if( pos > KErrNotFound)
-		{
-		iBTAddr = TBTDevAddr( bPckg().iRemoteAddr );
-		if( !iDevice )
-		    {
-            iDevice = CBTDevice::NewL(iBTAddr);
-		    }
-	    GetDeviceFromRegL( iBTAddr );
-		}
-	else
-	    {
-	    ShowNoteAndCompleteL(aSyncCall);
-	    }
-	}
-	
-// ----------------------------------------------------------
-// CBTGenericInfoNotifier::ShowNoteAndCompleteL
-// Shows the notifier in backround 
-// ----------------------------------------------------------
-//
-void CBTGenericInfoNotifier::ShowNoteAndCompleteL(TBool aSyncCall)
-	{
-	iNotifUiUtil->ShowInfoNoteL( iQueryMessage, iSecondaryDisplayCommand );
-	if (!aSyncCall)
-		{
-        CompleteMessage(KErrNone);
-        }
-    FLOG(_L("[BTNOTIF]\t CBTGenericInfoNotifier::ShowNoteAndComplete() complete"));
-	}
-
-void CBTGenericInfoNotifier::HandleGetDeviceCompletedL(const CBTDevice* /*aDev*/)
-    {
-    FLOG(_L("[BTNOTIF]\t CBTGenericInfoNotifier::HandleGetDeviceCompleted()"));
-    
-    TBTDeviceName name;
-    BtNotifNameUtils::GetDeviceDisplayName(name, iDevice);
-    iQueryMessage.Zero();
-    BluetoothUiUtil::LoadResourceAndSubstringL( 
-            iQueryMessage, iMessageResourceId, name, 0);      
-    
-    ShowNoteAndCompleteL(EFalse);
-
-    FLOG(_L("[BTNOTIF]\t CBTGenericInfoNotifier::HandleGetDeviceComplete() Complete"));        
-    }
-
-// End of File
--- a/bluetoothengine/btnotif/src/BTNGenericQueryNotifier.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,343 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Bluetooth visibility timeout notifier class.
-*
-*/
-
-
-// INCLUDE FILES
-
-#include <StringLoader.h>       // Localisation stringloader
-#include <secondarydisplay/BTnotifSecondaryDisplayAPI.h>
-#include <e32cmn.h>
-#include <BTNotif.rsg>          // Own resources
-#include <btengsettings.h>
-#include <bluetoothuiutil.h>
-#include "BTNGenericQueryNotifier.h"      // Own class definition
-#include "btNotifDebug.h"       // Debugging macros
-
-#ifdef __SERIES60_HELP
-#include <hlplch.h>
-#include <csxhelp/bt.hlp.hrh> // The bt hrh info is needed, for help launching
-#endif
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ----------------------------------------------------------
-// CBTGenericQueryNotifier::NewL
-// Two-phased constructor.
-// ----------------------------------------------------------
-//
-CBTGenericQueryNotifier* CBTGenericQueryNotifier::NewL()
-    {
-    CBTGenericQueryNotifier* self=new (ELeave) CBTGenericQueryNotifier();
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop();
-    return self;
-    }
-
-// ----------------------------------------------------------
-// CBTGenericQueryNotifier::CBTGenericQueryNotifier
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// ----------------------------------------------------------
-//
-CBTGenericQueryNotifier::CBTGenericQueryNotifier()
-    {	
-    }
-
-// ----------------------------------------------------------
-// Destructor
-// ----------------------------------------------------------
-//
-CBTGenericQueryNotifier::~CBTGenericQueryNotifier()
-    {
-    Cancel();   // Free own resources
-    delete iName; 
-    iQueryMessage.Close(); 
-	delete iQueryHeader;
-    }
-
-// ----------------------------------------------------------
-// CBTGenericQueryNotifier::RegisterL
-// Register notifier.
-// ----------------------------------------------------------
-//
-CBTGenericQueryNotifier::TNotifierInfo CBTGenericQueryNotifier::RegisterL()
-    {
-    iInfo.iUid=KBTGenericQueryNotifierUid;
-    iInfo.iChannel=KBTGenericQueryNotifierUid;
-    iInfo.iPriority=ENotifierPriorityHigh;
-    return iInfo;
-    }
-
-
-// ----------------------------------------------------------
-// CBTGenericQueryNotifier::StartL
-// Synchronic notifier launch. Contructs and shows a global
-// note, no parameters need here.
-// ----------------------------------------------------------
-//
-TPtrC8 CBTGenericQueryNotifier::StartL( const TDesC8& /*aBuffer*/ )
-    {
-    FLOG(_L("[BTNOTIF]\t CBTGenericQueryNotifier::StartL()"));
-
-    TPtrC8 ret(KNullDesC8);
-    return (ret);    
-    
-    }
-
-// ----------------------------------------------------------
-// CBTGenericQueryNotifier::GetParamsL
-// Mandatory for BT Notifiers when using asynchronous launch. 
-// This notifier is synchronous so no implementation is needed.
-// ----------------------------------------------------------
-//
-void CBTGenericQueryNotifier::GetParamsL(const TDesC8& aBuffer, 
-                                     TInt aReplySlot, 
-                                     const RMessagePtr2& aMessage)
-    {
-   	FLOG(_L("[BTNOTIF]\t CBTGenericQueryNotifier::GetParamsL"));    
-
-   	if (iMessage.Handle())
-   	    {
-   	    aMessage.Complete(KErrInUse);
-   	    return;
-   	    }
-   	
-	ProcessParamBufferL(aBuffer);
-	
-    iMessage = aMessage;
-    iReplySlot = aReplySlot;
-    
-    ShowQueryAndCompleteL();
-    
-   	FLOG(_L("[BTNOTIF]\t CBTGenericQueryNotifier::GetParamsL Complete"));    
-    }
-
-// ----------------------------------------------------------
-// CBTGenericQueryNotifier::ProcessParamBufferL
-// Parse the data out of the message that is sent by the
-// client of the notifier.
-// ----------------------------------------------------------
-void CBTGenericQueryNotifier::ProcessParamBufferL(const TDesC8& aBuffer)
-	{
-	
-	TBTGenericQueryNotifierParams bParams;
-	TPckgC<TBTGenericQueryNotifierParams> bPckg(bParams);
-	bPckg.Set( aBuffer );
-
-	if( bPckg().iMessageType == EBTNameQuery )
-	    {
-	    iIsNameQuery = ETrue;
-	    return;
-	    }
-	iSecondaryDisplayCommand = ECmdBTnotifUnavailable;
-	switch (bPckg().iMessageType)
-		{
-		case EBTReceiveMessageQuery:
-			iIsMessageQuery=EFalse;
-			iMessageResourceId=R_BT_RECEIVE_MESSAGE	;	
-			iSecondaryDisplayCommand=ECmdShowReceiveMessageFromDeviceDlg; 
-			break;
-		case EBTReceiveMessagePairedQuery:
-			iIsMessageQuery=EFalse;		
-			iMessageResourceId=R_BT_RECEIVE_MESSAGE_PAIRED;
-			iSecondaryDisplayCommand= ECmdShowReceiveMessageFromPairedDeviceDlg; 
-			break;			
-		case EBTIsOffQuery:
-			iIsMessageQuery=EFalse;		
-    		iMessageResourceId=R_BT_POWER_IS_OFF ;
-			iSecondaryDisplayCommand=ECmdShowBtIsOffDlg;		
-			break;			
-		case EBTActivateOffLineQuery:
-			iIsMessageQuery=EFalse;		
-    		iMessageResourceId=R_BT_ACTIVATE_IN_OFFLINE;
-			iSecondaryDisplayCommand=ECmdShowBtActivateInOfflineDlg;		
-			break;			
-		case EBTNoDevicesFoundQuery:
-			iIsMessageQuery=EFalse;		
-			iMessageResourceId=R_BT_NO_DEVICES_FOUND;
-			break;	
-		case EBTAcceptRequestQuery:
-			iIsMessageQuery=EFalse;		
-			iMessageResourceId=R_BT_AUTHORISATION_NAME ;
-			iSecondaryDisplayCommand=ECmdShowAcceptConnRequestDlg;
-			break;		
-			
-		case EBTIsOffJavaQuery:	
-			iIsMessageQuery=ETrue; 	
-			if( bPckg().iNameExists )			
-				{
-				iMessageResourceId=R_BT_IS_OFF_JAVA_APPNAME; // when caller provide Java application name.	
-				}
-			else
-				{
-				iMessageResourceId=R_BT_IS_OFF_JAVA; //r_bt_is_hidden_java	
-				}		
-			iSecondaryDisplayCommand=ECmdShowBtBtIsOffJavaDlg;
-			iQueryHeader=StringLoader::LoadL( R_BT_IS_OFF_JAVA_HEADER);		
-			break;
-
-		case EBTIsNotShownQuery:
-			iIsMessageQuery=ETrue;			
-			if( bPckg().iNameExists )
-				{
-				iMessageResourceId=R_BT_IS_HIDDEN_JAVA_APPNAME; // when caller provide Java application name.	
-				}
-			else
-				{
-				iMessageResourceId=R_BT_IS_HIDDEN_JAVA; //r_bt_is_hidden_java	
-				}									
-			iSecondaryDisplayCommand=ECmdShowBtIsNotVisibleDlg;
-			iQueryHeader=StringLoader::LoadL( R_BT_IS_HIDDEN_JAVA_HEADER);
-			break;
-			
-		case EBTBlockConnectionQuery:
-		case EBTBlockPairedConnectionQuery:		
-			iIsMessageQuery=ETrue;		
-			if( bPckg().iMessageType == EBTBlockConnectionQuery )
-				iMessageResourceId = R_BT_BLOCK_DEVICE_NOHELP; 
-			else
-				iMessageResourceId = R_BT_BLOCK_PAIRED_DEVICE_NOHELP ; 
-				
-			iQueryHeader= StringLoader::LoadL( R_BT_BLOCK_DEVICE_HEADER );
-			break;
-			
-		case EBTSwitchOffAnyway:
-			iIsMessageQuery=EFalse;		
-			iMessageResourceId=R_BT_SWITCH_OFF_ANYWAY;
-			break;		
-					
-		default:
-			FLOG(_L("[BTNOTIF]\t CBTGenericQueryNotifier:: Unkown messageType! ")); 
- 			User::Leave(KErrNotFound);		
-		}
-	
-	// if the logic string contains substitute indicator "%U", replace it with device name:
-	//
-	HBufC* buf = StringLoader::LoadL( iMessageResourceId);
-	iQueryMessage.Assign( buf );
-
-	TInt keyLen;
-	TInt pos = BluetoothUiUtil::GetStringSubstringKeyPos( 
-	        iQueryMessage, 0, keyLen );
-	if( pos > KErrNotFound)
-		{		
-		//if no device name provided, default name will be used:
-		if( !bPckg().iNameExists )			
-			iName=StringLoader::LoadL(R_BT_DIALOG_DEF_NAME);
-		else
-			{
-			iName=HBufC::NewL(bPckg().iName.Length() );
-			iName->Des().Copy(bPckg().iName);
-			}
-		BluetoothUiUtil::LoadResourceAndSubstringL( 
-		        iQueryMessage, iMessageResourceId, *iName, 0);
-		}
-	else
-		{
-		iName=NULL;		
-		}		
-	}
-
-// ----------------------------------------------------------
-// CBTGenericQueryNotifier::UpdateL
-// Update notifier according to new data
-// ----------------------------------------------------------
-//	
-TPtrC8 CBTGenericQueryNotifier::UpdateL(const TDesC8& aBuffer)
-	{
-   	FLOG(_L("[BTNOTIF]\t CBTGenericQueryNotifier::UpdateL")); 
-	ProcessParamBufferL(aBuffer);
-	if( !iNotifUiUtil->IsQueryReleased() )
-		{
-		if(iIsMessageQuery )
-		    {
-		    iNotifUiUtil->UpdateMessageQueryDlgL(iQueryMessage);
-		    }
-		else
-		    {
-		    iNotifUiUtil->UpdateQueryDlgL(iQueryMessage);
-		    }
-		}
-   	FLOG(_L("[BTNOTIF]\t CBTGenericQueryNotifier::UpdateL complete")); 	
-
-    TPtrC8 ret(KNullDesC8);
-    return (ret);   	
-	}
-
-// ----------------------------------------------------------
-// CBTGenericQueryNotifier::ShowQueryAndCompleteL
-// Shows the notifier in backround and complete message
-// ----------------------------------------------------------
-//
-void CBTGenericQueryNotifier::ShowQueryAndCompleteL()
-	{ 
-   	FLOG(_L("[BTNOTIF]\t CBTGenericQueryNotifier::ShowQueryAndCompleteL")); 	
-	
-	// Turn lights on and deactivate apps -key
-	//
-   	iNotifUiUtil->TurnLightsOn();  	
-	if( iIsNameQuery )
-	    {
-	    TBool nameStatus = IsLocalNameModifiedL();
-	    if( !nameStatus )
-	        {
-	        (void) AskLocalBTNameQueryL();
-	        }
-        // Check if Local name is set again before turn BT on. 
-        // Turn BT on only when there is local name, since user still has chance
-        // to ignore the asking name query - like pressing End-key     
-        //             
-        TBTDeviceName localName;           
-        localName.Zero();
-        TInt err = iBTEngSettings->GetLocalName(localName);
-              
-        if (localName.Length() <= 0)
-            {   
-            err = KErrCancel;
-            }
-	    	    
-	    CompleteMessage( (!err) ? ETrue : EFalse, KErrNone );
-
-	    FLOG(_L("[BTNOTIF]\t CBTGenericQueryNotifier::ShowQueryAndCompleteL iIsNameQuery complete")); 
-	    return;
-	    }
-	
-	TInt keypress;
-    TBTDeviceName name(KNullDesC);
-    if( iName )
-	    {
-	    name.Copy( *iName );
-	    }
-    if( iIsMessageQuery	)
-		{
-		
-        keypress = iNotifUiUtil->ShowMessageQueryL(iQueryMessage, *iQueryHeader, 
-                        R_BT_GENERIC_MESSAGE_QUERY, CAknQueryDialog::EConfirmationTone );        
-		}
-	else
-    	{
-    	keypress = iNotifUiUtil->ShowQueryL( iQueryMessage, R_BT_GENERIC_QUERY, 
-    	        iSecondaryDisplayCommand, name, CAknQueryDialog::EConfirmationTone );
-    	}
-	
-   	CompleteMessage( (keypress) ? ETrue: EFalse, KErrNone );
-
-   	FLOG(_L("[BTNOTIF]\t CBTGenericQueryNotifier::ShowQueryAndCompleteL complete")); 			
-	}
-
-// End of File
--- a/bluetoothengine/btnotif/src/BTNInqNotifier.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,166 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declares Bluetooth device inquiry notifier class.
-*
-*/
-
-
-// INCLUDE FILES
-#include <eikenv.h>          // Eikon environment
-
-#include "btninqnotifier.h"  // Own class definition
-#include "btNotifDebug.h"    // Debugging macros
-#include <StringLoader.h>    // Localisation stringloader
-#include <BTNotif.rsg>          // Own resources
-    
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ----------------------------------------------------------
-// CBTInqNotifier::NewL
-// Two-phased constructor.
-// ----------------------------------------------------------
-//
-CBTInqNotifier* CBTInqNotifier::NewL()
-    {
-    CBTInqNotifier* self=new (ELeave) CBTInqNotifier();
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop();
-    return self;
-    }
-
-// ----------------------------------------------------------
-// CBTInqNotifier::CBTInqNotifier
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// ----------------------------------------------------------
-//
-CBTInqNotifier::CBTInqNotifier()
-    {
-    }
-
-// ----------------------------------------------------------
-// Destructor
-// ----------------------------------------------------------
-//
-CBTInqNotifier::~CBTInqNotifier()
-    {
-    FLOG(_L("[BTNOTIF]\t CBTInqNotifier::~CBTInqNotifier()"));
-    delete iUi;
-    iUi = NULL;
-    FLOG(_L("[BTNOTIF]\t CBTInqNotifier::~CBTInqNotifier() completed"));
-    }
-
-// ----------------------------------------------------------
-// CBTInqNotifier::RegisterL
-// ----------------------------------------------------------
-//
-CBTInqNotifier::TNotifierInfo CBTInqNotifier::RegisterL()
-    {
-    
-    iInfo.iUid=KDeviceSelectionNotifierUid;
-    iInfo.iChannel=KBTInquiryChannel;
-    iInfo.iPriority=ENotifierPriorityVHigh; // User input level
-    return iInfo;
-    }
-
-// ----------------------------------------------------------
-// CBTInqNotifier::GetParamsL
-// Initialize parameters and launch device search.
-// ----------------------------------------------------------
-//
-void CBTInqNotifier::GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage)
-    {
-    FLOG(_L("[BTNOTIF]\t CBTInqNotifier::GetParamsL()"));
-
-    if( !iMessage.IsNull() )
-        {
-        aMessage.Complete(KErrInUse);
-        return;
-        }
-
-    iMessage = aMessage;
-    iReplySlot = aReplySlot;
-    
-    TBTDeviceClass cod;
-    TBTDeviceSelectionParamsPckg pckg;
-    pckg.Copy(aBuffer); 
-
-    LaunchInquiryL(pckg().DeviceClass());
-    
-    FLOG(_L("[BTNOTIF]\t CBTInqNotifier::GetParamsL() completed "));
-    }
-
-// ----------------------------------------------------------
-// CBTInqNotifier::NotifyDeviceSearchCompleted
-// Notified by InquiryUI, return to caller by completing message
-// ----------------------------------------------------------
-//
-void CBTInqNotifier::NotifyDeviceSearchCompleted(TInt aErr, const TBTDeviceResponseParams& aDevice)
-    {
-    FTRACE(FPrint( _L("[BTNOTIF]\t CBTInqNotifier::NotifyDeviceSearchCompleted aErr %d"), aErr ));
-    CompleteMessage(TBTDeviceResponseParamsPckg( aDevice ), aErr);
-    }
-
-// ----------------------------------------------------------
-// CBTInqNotifier::Cancel
-// Release all own resources (member variables)
-// ----------------------------------------------------------
-//
-void CBTInqNotifier::Cancel()
-    {
-    FLOG(_L("[BTNOTIF]\t CBTInqNotifier::Cancel()"));
-    if( iUi )
-        {
-        iUi->Cancel();
-        delete iUi;
-        iUi = NULL;
-        }
-    CBTNotifierBase::Cancel();
-    FLOG(_L("[BTNOTIF]\t CBTInqNotifier::Cancel() completed"));
-    }
-
-// ----------------------------------------------------------
-// Ensure BT is ON; there are not too many connections; InqUi 
-// is launched successfully.
-// ----------------------------------------------------------
-//
-void CBTInqNotifier::LaunchInquiryL(const TBTDeviceClass& aDesiredDevice)
-    {
-    // Turn BT on if it is not yet.
-    if ( !CheckAndSetPowerOnL() )
-        {
-        CompleteMessage(KErrGeneral);
-        return;
-        }
-
-    TInt linkCount;
-    User::LeaveIfError(RProperty::Get(KPropertyUidBluetoothCategory, 
-            KPropertyKeyBluetoothGetPHYCount, linkCount));
-    if ( linkCount > 6 )   //support only piconet
-        {
-        iNotifUiUtil->ShowInfoNoteL( R_BT_BUSY_NOTE, ECmdBTnotifUnavailable );
-        User::Leave(KErrInUse);
-        }
-    
-    // launch Inquiry UI
-  
-    iUi = new (ELeave) CBTInqUI( this, iNotifUiUtil, aDesiredDevice);
-   
-
-    iUi->ConstructL();
-    }
-
-// End of File
--- a/bluetoothengine/btnotif/src/BTNInqUI.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1334 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declares Bluetooth device inquiry user interface class.
-*
-*/
-
-
-// INCLUDE FILES
-#include <avkon.hrh>            // AVKON components
-#include <AknIconArray.h>
-#include <aknlists.h>
-#include <aknPopup.h>
-#include <avkon.mbg>
-#include <wlaninternalpskeys.h> // For WLAN state checking
-#include <ctsydomainpskeys.h>
-#include <AknNotiferAppServerApplication.h> 
-#include <barsread.h>           // Resource reader
-#include <BTNotif.rsg>          // Own resources
-#include <bt_subscribe.h>
-#include <btnotif.mbg>
-#include <devui_const.h>
-#include <btengutil.h>
-#include <bluetoothuiutil.h>
-#include "btninqui.h"           // Own class definition
-#include "btNotifDebug.h"       // Debugging macros
-#include "btnotifnameutils.h"
-
-
-const TInt KBTAllPurposeBufferLength = 266;
-const TInt KBTNotifNonPairedUsedDevicesMaxNumber= 5;
-// RSSI value range: -127dB ~ +20dB
-const TInt KRssiRangeOffset = 127 + 1;  // Offset for getting a non-zero positive value
-const TInt KMediumStrength = 53;
-const TInt KHighStrength = 82;
-const TUint32 ExcludePairedDeviceMask = 0x800000;
-const TUint32 ResetExcludePairedDeviceMask = 0xFF7FFFFF;
-_LIT(KBtnotifBmpFileName,"btnotif.mif"); //mif is target file under resource folder
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ----------------------------------------------------------
-// CBTInqUI::CBTInqUI
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// ----------------------------------------------------------
-//
-CBTInqUI::CBTInqUI( MBTNDeviceSearchObserver* aObserver, 
-        CBTNotifUIUtil* aUtil, 
-        const TBTDeviceClass& aDesiredDevClass): 
-        iUiUtil (aUtil),
-        iEikonEnvRef( iUiUtil->LocalEikonEnv() ),
-        iDevicesFound (EFalse),
-        iBroughtForwards (EFalse),
-        iDesiredDeviceClass (aDesiredDevClass),
-        iSystemCancel (EFalse), 
-        iPageForName ( EFalse ),
-        iIndex (0),
-        iDevSearchObserver (aObserver)
-    {
-	iBTRegistryQueryState=ENoQuery;
-	}
-
-// ----------------------------------------------------------
-// CBTInqUI::ConstructL
-// Symbian 2nd phase constructor can leave.
-// Creates first device list (not shown yet) and initializes 
-// couple of member variables with default values.
-// ----------------------------------------------------------
-//
-void CBTInqUI::ConstructL()
-    {
-    FLOG(_L("[BTNOTIF]\t CBTInqUI::ConstructL()"));
-    
-    // Read default device names to an array
-    iDefaultDeviceNamesArray = iEikonEnvRef.ReadDesCArrayResourceL( R_BT_DEFAULT_DEVICE_NAMES );
-
-    // create the timer
-    iPeriodicTimer = CPeriodic::NewL(CActive::EPriorityIdle);
-    
-    // Create device array
-    //
-    iDeviceListRows = new(ELeave) CDesCArrayFlat(1);
-    
-    iPairedDevicesArray = new (ELeave) CBTDeviceArray(1);
-    iLastUsedDevicesArray = new(ELeave) CBTDeviceArray(1);
-    iLastSeenDevicesArray = new(ELeave) CBTDeviceArray(1);
-	iAdjustedUsedDeviceArray = new(ELeave) CBTDeviceArray(1);	
-	
-	iDevMan=CBTEngDevMan::NewL(this);
-	
-	iExcludePairedDevices = iDesiredDeviceClass.DeviceClass() & ExcludePairedDeviceMask ? 
-                            ETrue : EFalse;	
-    if ( iExcludePairedDevices )
-        {         
-        FLOG (_L("[BTNOTIF]\t CBTInqUI::ConstrucL Excluding paired devices"));
-        iDesiredDeviceClass = iDesiredDeviceClass.DeviceClass() & ResetExcludePairedDeviceMask;
-        }
-    // Retrieve paired devices to a local array
-    RetrievePairedDevices();
-
-    FLOG(_L("[BTNOTIF]\t CBTInqUI::ConstructL() completed"));
-    }
-
-// ----------------------------------------------------------
-// CBTInqUI::RetrieveUsedDevices- Substitute
-// ----------------------------------------------------------
-//
-void CBTInqUI::RetrieveUsedDevices()
-	{
-	FLOG(_L("[BTNOTIF]\t CBTInqUI::RetrieveUsedDevicesL()"));	
-
-	TBTRegistrySearch searchPattern;
-	searchPattern.FindAll();
-	
-    //Ignore this error. Continue device search.
-	TInt err=iDevMan->GetDevices( searchPattern, iLastUsedDevicesArray );	
-	if(err)
-	    {
-	    TRAP_IGNORE(AdjustDeviceArrayL(iAdjustedUsedDeviceArray));
-	    DoDeviceFrontListSelection();
-	    FTRACE(FPrint(_L("[BTNOTIF]\t CBTInqUI: get useddevice err %d"), err));  
-	    }
-	else
-	    {
-	    iBTRegistryQueryState=EQueryUsed;
-	    }
-	FLOG(_L("[BTNOTIF]\t CBTInqUI::RetrieveUsedDevicesL() returned"));
-	}
-	
-//---------------------------------------------------------------
-// CBTInqUI::RetrievePairedDevices
-//---------------------------------------------------------------
-void CBTInqUI::RetrievePairedDevices()
-    {
-	FLOG(_L("[BTNOTIF]\t CBTInqUI::RetrievePairedDevicesL()"));
-
-	TBTRegistrySearch searchPattern;
-    searchPattern.FindBonded();
-
-	TInt err= iDevMan->GetDevices( searchPattern, iPairedDevicesArray );	
-	FTRACE(FPrint(_L("[BTNOTIF]\t CBTInqUI: get paireddevice err %d"), err));  
-	if(err)
-	    {
-        //Next: try to get used devices
-	    RetrieveUsedDevices();
-	    }
-	else
-	    {
-	    iBTRegistryQueryState=EQueryPaired;	
-	    }
-	FLOG(_L("[BTNOTIF]\t CBTInqUI::RetrievePairedDevicesL() returned"));
-    }
-    
-// ----------------------------------------------------------
-// CBTInqUI::HandleGetDevicesComplete
-// ----------------------------------------------------------
-//
-void CBTInqUI::HandleGetDevicesComplete(TInt aErr, CBTDeviceArray* /*aDeviceArray*/)
-	{
-	FTRACE(FPrint(_L("[BTNOTIF]\t CBTInqUI::HandleGetDevicesComplete() err: %d"), aErr));	
-	(void) aErr;
-	switch(iBTRegistryQueryState)
-		{
-		case EQueryPaired:
-		    // If a device is paired in Just Works model but without user awareness,
-		    // This device won't be shown in UI paired view, so we have to 
-		    // remove it from this array so that it will be shown to user
-		    // in the last used device list.
-		    for (int i = iPairedDevicesArray->Count() - 1; i >= 0; --i )
-		        {
-		        if ( !IsUserAwarePaired( iPairedDevicesArray->At( i )->AsNamelessDevice() ) )
-		            {
-		            delete iPairedDevicesArray->At( i );
-		            iPairedDevicesArray->Delete( i );
-		            }
-		        }
-			RetrieveUsedDevices();
-			break;
-		case EQueryUsed:
-			// fill in the list of last seen devices, so it can be shown
-			TRAP_IGNORE(AdjustDeviceArrayL(iAdjustedUsedDeviceArray));
-			DoDeviceFrontListSelection();
-			break;
-		default:
-			break;
-		}
-	
-	FLOG(_L("[BTNOTIF]\t CBTInqUI::HandleGetDevicesComplete() Complete"));		
-	}
-
-// ----------------------------------------------------------
-// Destructor
-// ----------------------------------------------------------
-//
-CBTInqUI::~CBTInqUI()
-    {
-    FLOG(_L("[BTNOTIF]\t CBTInqUI::~CBTInqUI()"));
-
-    if( iBroughtForwards )
-        {
-        iEikonEnvRef.BringForwards(EFalse);
-        iBroughtForwards = EFalse;
-        }
-
-    if( iPairedDevicesArray ) 
-        {
-        iPairedDevicesArray->ResetAndDestroy();	            
-        delete iPairedDevicesArray; 
-        }
-    if( iLastUsedDevicesArray ) 
-        {  
-        iLastUsedDevicesArray->ResetAndDestroy();	    
-        delete iLastUsedDevicesArray; 
-        }       
-    if( iLastSeenDevicesArray ) 
-        {  
-        iLastSeenDevicesArray->ResetAndDestroy();
-        delete iLastSeenDevicesArray; 
-        }
-    if( iAdjustedUsedDeviceArray )
-        {  
-        iAdjustedUsedDeviceArray->ResetAndDestroy();
-        delete iAdjustedUsedDeviceArray; 
-        }
-    if( iDefaultDeviceNamesArray )
-        {
-        iDefaultDeviceNamesArray->Reset();
-        delete iDefaultDeviceNamesArray;
-        }
-    
-	delete iDevMan;    
-    delete iDeviceListBox;
-    delete iDeviceListRows;
-	delete iPeriodicTimer;	
-	    
-    FLOG(_L("[BTNOTIF]\t CBTInqUI::~CBTInqUI() completed"));
-    }
-
-// ----------------------------------------------------------
-// CBTInqUI::Cancel
-// ----------------------------------------------------------
-//
-void CBTInqUI::Cancel()
-    {
-    FLOG(_L("[BTNOTIF]\t CBTInqUI::Cancel()"));  
-    
-    iSystemCancel = ETrue;
-    if(iDevMan)
- 	   {
- 	   iDevMan->Cancel();  	
-  	   }
-
-    if( iSearchFilterPopupList )
-        {
-        iSearchFilterPopupList->CancelPopup();
-        }
-
-    if(iPeriodicTimer)
-        {
-        iPeriodicTimer->Cancel();
-        }
-    
-    RemoveScanner();
-    InquiryComplete(KErrCancel);
-
-    FLOG(_L("[BTNOTIF]\t CBTInqUI::Cancel() completed"));
-    }
-
-// ----------------------------------------------------------
-// CBTInqUI::DisplayDevicesFrontListL
-// Display last seen devices popuplist
-// ----------------------------------------------------------
-//
-void CBTInqUI::DisplayDevicesFrontListL()
-    {
-    FLOG(_L("[BTNOTIF]\t CBTInqUI::DisplayDevicesFrontListL()"));
-
-    
-    if ( iAdjustedUsedDeviceArray->Count() <= 0 )
-        {
-        SelectSearchCategoryL();
-        return;
-        }
-    
-    if( !iBroughtForwards )
-        {
-        iEikonEnvRef.BringForwards(ETrue); // Destructor will release this later on
-        iBroughtForwards = ETrue;
-        }
-
-    // Create the devices popuplist
-    CreatePopupListL( R_AVKON_SOFTKEYS_SELECT_CANCEL__SELECT , R_BT_LAST_USED_DEVS_POPUP_TITLE );
-
-    // Add devices into device list.
-    for( TInt index = 0; index < iAdjustedUsedDeviceArray->Count(); index++ )
-    	{        
-   	    UpdateDeviceListL ( iAdjustedUsedDeviceArray->At(index) );  
-        }  
-
-    // Add "more devices" command as first item of list
-    HBufC* formatString = HBufC::NewLC( KBTAllPurposeBufferLength );
-    formatString->Des().Copy( TPtrC(KDeviceIconFormatTable[EDeviceIconBlank].iFormat ) );
-    HBufC* moreDevicesString = iEikonEnvRef.AllocReadResourceLC( R_BT_MORE_DEVICES_ITEM );
-    formatString->Des().Append( *moreDevicesString );
-    CleanupStack::PopAndDestroy(); // moreDevicesString
-    iDeviceListRows->InsertL( 0, *formatString );
-    CleanupStack::Pop(); // formatString
-
-    // Launch popup list and wait for user input 
-    AllowDialerAndAppKeyPress( EFalse );
-    TInt popupRetVal = iDevicePopupList->ExecuteLD();    
-    iDevicePopupList = NULL;   
-    AllowDialerAndAppKeyPress( ETrue );
-    
-    if( !popupRetVal )
-        { 
-        // query cancelled by user or system, complete device search:
-        iDevSearchObserver->NotifyDeviceSearchCompleted(KErrCancel);
-        return;
-        }
-    TInt currentDeviceIndex = iDeviceListBox->CurrentItemIndex();
-    
-    // Delete device list box and reset device items array
-    delete iDeviceListBox;
-    iDeviceListBox = NULL;
-    iDeviceListRows->Reset();
-
-    if( currentDeviceIndex > 0 ) // User selected "a used device"
-        {
-        HandleDeviceSelectionL( iAdjustedUsedDeviceArray->At( currentDeviceIndex - 1 ) );   
-        return;
-        }
-    
-    // user selected more devices.
-    SelectSearchCategoryL();
-    FLOG(_L("[BTNOTIF]\t CBTInqUI::DisplayDevicesFrontListL() completed"));
-    }
-
-// ----------------------------------------------------------
-// CBTInqUI::DeviceSearchUiL
-// Execute bluetooth device search/inquiry.
-// Parameters:
-//  OUT: aDevice     - selected device after inquiry
-//  IN:  aObexOnly   - flag if OBEX capable devices is requested
-// ----------------------------------------------------------
-//
-void CBTInqUI::DeviceSearchUiL()
-    {
-    FLOG(_L("[BTNOTIF]\t CBTInqUI::DeviceSearchUiL()"));
-    
-    TSearchFlowState searchFlow;
-    TInt err;
-    AllowDialerAndAppKeyPress( EFalse );
-    do
-        {
-        searchFlow = InitInquiryL(err);
-        } while (searchFlow == ESearchAgain);
-    
-    if (searchFlow == ESearchCompleted)
-        {
-        // search completed caused by either user cancel or failure
-        iDevSearchObserver->NotifyDeviceSearchCompleted(err);
-        AllowDialerAndAppKeyPress( ETrue );
-        return;
-        }
- 
-    FLOG(_L("[BTNOTIF]\t CBTInqUI, Displaying devices already found"));
-
-    TInt keypress(0);
-    // Show devices popup list for received devices while
-    // inquiry is still active and list may be updated.
-    if( !iInquiryComplete )
-        {
-        CreatePopupListL( R_BT_SOFTKEYS_SELECT_STOP, R_BT_SEARCH_DEVS_POPUP_TITLE );
-
-        // Set animation
-        iDevicePopupList->Heading()->SetHeaderAnimationL( R_BT_ANIMATION_FOR_POPUPLIST );
-
-        // Launch popup list and wait for user input
-        keypress = iDevicePopupList->ExecuteLD();    
-        iDevicePopupList = NULL;
-        }
-
-    // If Cancel() is called while DoInquery() is still running,
-    // such as taking out MMC while bt devices discovery or user pressed redkey.                 
-    // In such cases, We need to dismiss anything and function returns immediately.
-    //
-    if (iSystemCancel )
-        {
-        FLOG(_L("[BTNOTIF]\t inquiry was canncelled by the system!"));
-        iSystemCancel = EFalse;
-        AllowDialerAndAppKeyPress( ETrue );
-        iDevSearchObserver->NotifyDeviceSearchCompleted(KErrCancel);
-        return;
-        }
-
-    // Cancel inquiry
-    RemoveScanner();
-    
-    // Store the highlighted device index and destroy list box
-    iHighLightedItemIndex = 0;
-    if( iDeviceListBox )
-        {
-        iHighLightedItemIndex = iDeviceListBox->CurrentItemIndex();
-        delete iDeviceListBox;
-        iDeviceListBox = NULL;
-        }
-    
-    // user selected a device during active inquiry
-    if (keypress)
-        {
-        AllowDialerAndAppKeyPress( ETrue );
-        HandleDeviceSelectionL( iLastSeenDevicesArray->At( iHighLightedItemIndex ) );
-        return;
-        }
-
-    // Error encountered in inquiry
-    if (iInquiryStatus)
-        {
-        AllowDialerAndAppKeyPress( ETrue );
-        iDevSearchObserver->NotifyDeviceSearchCompleted(iInquiryStatus);
-        return;
-        }
-    
-    // Inquiry completed, show final device list 
-    FLOG(_L("[BTNOTIF]\t CBTInqUI::DeviceSearchUiL Displaying final devicelist"));          
-    CreatePopupListL( R_AVKON_SOFTKEYS_SELECT_CANCEL__SELECT, R_BT_FOUND_DEVS_POPUP_TITLE );
-   
-    //cancel iPeriodicTimer after the final list is shown
-    iPeriodicTimer->Cancel();
-    User::ResetInactivityTime();
-    // Set highlight on top of same device as it was in previous popuplist
-    if( iHighLightedItemIndex >= 0 )
-        {
-        iDeviceListBox->HandleItemAdditionL();
-        iDeviceListBox->SetCurrentItemIndex(iHighLightedItemIndex);
-        }
-
-    // Launch popup list and wait for user input
-    keypress = iDevicePopupList->ExecuteLD();
-    iDevicePopupList = NULL;
-    AllowDialerAndAppKeyPress( ETrue );
-    // If dialog is cancelled by system:
-    if( !keypress)
-        {
-        iDevSearchObserver->NotifyDeviceSearchCompleted(KErrCancel);
-        return;
-        }
-
-    // Get user selection
-    TInt index = iDeviceListBox->CurrentItemIndex();
-    delete iDeviceListBox;
-    iDeviceListBox = NULL;
-
-    HandleDeviceSelectionL( iLastSeenDevicesArray->At( index ) );
-
-    FLOG(_L("[BTNOTIF]\t CBTInqUI::DeviceSearchUiL() complete"));    
-    }
-
-TSearchFlowState CBTInqUI::InitInquiryL(TInt& aReason)
-    {
-    FLOG(_L("[BTNOTIF]\t CBTInqUI::InitInquiryL"));
-    if (IsActiveVoIPOverWLAN())
-        {
-        iUiUtil->ShowInfoNoteL( R_BT_NO_DEVICE_DISCOVERY_VOIP, ECmdBTnotifUnavailable );
-        aReason = KErrInUse;
-        return ESearchCompleted;
-        }
-
-    // starting  the timer
-    iPeriodicTimer->Cancel();
-    iPeriodicTimer->Start(KPeriodicTimerInterval4Sec, KPeriodicTimerInterval4Sec, 
-                        TCallBack(PeriodicTimerCallBack, this));
-    
-    // Prepare for using hostresolver to search devices 
-    CreateScannerL();
-    
-    iInquiryStatus = KErrCancel; // Give a initial value (for end key handling)
-    iDevicesFound = EFalse;
-    iInquiryComplete = EFalse;
-    iSystemCancel = EFalse;   
-    
-    // Show wait note until dialog is dismissed by inquirey result callbacks or user cancel
-    TInt ret = iUiUtil->ShowWaitDlgL( R_BT_SEARCHING_DEVICES_NOTE );
-    
-    // If user cancels searching, ret will be KerrNone.  
-    // According to Description of Eikdialog, ShowWaitDlgL() returns zero 
-    // if it was the cancel button (@c EEikBidCancel). 
-    if( ret == KErrNone || iSystemCancel )
-        {
-        FLOG(_L("[BTNOTIF]\t CBTInqUI, User cancelled waiting note"));
-        RemoveScanner();
-        aReason = KErrCancel;
-        return ESearchCompleted;
-        }
-
-     if( !iDevicesFound ) // No devices found at all
-         {
-         FLOG(_L("[BTNOTIF]\t CBTInqUI no devices found at all"));
-         RemoveScanner(); // Cancel inquiry
-
-         if( iInquiryStatus != KErrNone )
-             {
-             aReason = iInquiryStatus;
-             return ESearchCompleted;
-             }
-         
-         // Show try again query
-         TBool keypress(0);
-         keypress = iUiUtil->ShowQueryL( KErrNone, R_BT_TRY_AGAIN_QUERY, ECmdBTnotifUnavailable );
-         if( !keypress ) // User has not requested new inquiry
-             {
-             aReason = KErrCancel;
-             return ESearchCompleted;
-             }
-         else
-             {
-             FLOG(_L("[BTNOTIF]\t CBTInqUI user wanted to try again"));
-             return ESearchAgain;
-             }
-         }
-     return ESearchFirstDeviceFound;
-    }
-
-// ----------------------------------------------------------
-// CBTInqUI::DeviceAvailableL
-// Bluetooth device has been received.
-// ----------------------------------------------------------
-//
-void CBTInqUI::DeviceAvailableL( const TNameRecord& aNameRecord, const TDesC& aDevName )
-    {
-    FLOG(_L("[BTNOTIF]\t CBTInqUI::DeviceAvailableL()"));
-
-    if( !iDevicesFound )
-        {
-        FLOG(_L("[BTNOTIF]\t CBTInqUI::DeviceAvailableL() first found, clear last seen devices array"));
-        iLastSeenDevicesArray->ResetAndDestroy(); // Remove previous inquiry results
-        iDevicesFound = ETrue; 
-        iInquiryStatus = KErrNone;
-        }
-    
-    iUiUtil->CompleteWaitDlgL();
-
-    TInquirySockAddr& sa = TInquirySockAddr::Cast( aNameRecord.iAddr );
-    
-    // Create device object with received CoD information
-    CBTDevice* newDevice = CBTDevice::NewLC( sa.BTAddr() );      
-    TBTDeviceClass cod( sa.MajorServiceClass(), sa.MajorClassOfDevice(), sa.MinorClassOfDevice() );
-    newDevice->SetDeviceClass( cod );
-    FTRACE(FPrint(_L("[BTNOTIF]\t CoD %b"), cod.DeviceClass() ));
-    TInt rssi = 0;
-    if( sa.ResultFlags() & TInquirySockAddr::ERssiValid )
-        {
-        rssi = sa.Rssi() + KRssiRangeOffset;
-        }
-
-    BtNotifNameUtils::SetDeviceNameL(aDevName, *newDevice);
-
-    // Update device popup list with newDevice
-    UpdateDeviceListL( newDevice, rssi );
-
-    // Append newDevice in the bottom of the "last seen" device array.
-    iLastSeenDevicesArray->AppendL(newDevice);
-    CleanupStack::Pop(); // new device is under iLastSeenDevicesArray control now
-
-    FLOG(_L("[BTNOTIF]\t CBTInqUI::DeviceAvailableL() completed"));
-    }
-
-// ----------------------------------------------------------
-// CBTInqUI::InquiryComplete
-// Inquiry has been completed.
-// ----------------------------------------------------------
-//
-void CBTInqUI::InquiryComplete( TInt aError )
-    {
-    FTRACE(FPrint(_L("[BTNOTIF]\t CBTInqUI::InquiryComplete() status = %d: %d devices found"), aError, iLastSeenDevicesArray->Count() ));
-    iInquiryComplete = ETrue;
-    // Remove popup list if any devices exists
-    if( iDevicePopupList )
-        {
-        iDevicePopupList->CancelPopup();
-        iDevicePopupList = NULL;
-        }
-    
-    TRAP_IGNORE( iUiUtil->CompleteWaitDlgL() );
-    
-    if ( aError == KErrNone || aError == KErrCancel || aError == KErrEof )
-        {
-        iInquiryStatus = (aError == KErrEof ) ? KErrNone : aError;
-        }
-    else
-        {
-        iLastSeenDevicesArray->ResetAndDestroy(); // Remove previous inquiry results
-        }
-
-    FLOG(_L("[BTNOTIF]\t CBTInqUI::InquiryComplete() completed"));
-    }
-
-// ----------------------------------------------------------
-// CBTInqUI::PeriodicTimerCallBack(TAny* aAny)
-// The call back function
-// ----------------------------------------------------------
-//
-TInt CBTInqUI::PeriodicTimerCallBack(TAny* /*aAny*/)
-    {
-    User::ResetInactivityTime();
-    return KErrNone; // Return value ignored by CPeriodic
-    }
-
-// ----------------------------------------------------------
-// CBTInqUI::RemoveScanner
-// Remove scanner active object if still exists.
-// ----------------------------------------------------------
-//
-void CBTInqUI::RemoveScanner()
-    {
-    FLOG(_L("[BTNOTIF]\t CBTInqUI::RemoveScanner()"));
-    if( iScanner )
-        {
-        iScanner->CancelRequest();
-        iHostResolver.Close();
-        iSocketServer.Close(); 
-        delete iScanner; 
-        iScanner = NULL;
-        }
-    iDevsWithoutName.Close();
-    FLOG(_L("[BTNOTIF]\t CBTInqUI::RemoveScanner() completed"));
-    }
-
-// ----------------------------------------------------------
-// CBTInqUI::CreatePopupListL
-// ----------------------------------------------------------
-//
-void CBTInqUI::CreatePopupListL(TInt aSoftkeysResourceId, TInt aTitleResourceId )
-    {
-    FLOG(_L("[BTNOTIF]\t CBTInqUI::CreatePopupListL()"));
-
-    __ASSERT_DEBUG( !iDeviceListBox,   User::Panic(_L("BTNotifInqUI - iDeviceListBox not released!"  ), KErrAlreadyExists));
-    __ASSERT_DEBUG( !iDevicePopupList, User::Panic(_L("BTNotifInqUI - iDevicePopupList not released!"),KErrAlreadyExists));
-
-    // Create listbox for devices
-    iDeviceListBox = new(ELeave) CAknSingleGraphicPopupMenuStyleListBox;
-
-    // Create popup list
-    iDevicePopupList = CAknPopupList::NewL( iDeviceListBox, aSoftkeysResourceId, AknPopupLayouts::EDynMenuWindow );
-
-    iDeviceListBox->ConstructL(iDevicePopupList, EAknListBoxMenuList );
-    iDeviceListBox->CreateScrollBarFrameL(ETrue);
-    iDeviceListBox->ScrollBarFrame()->SetScrollBarVisibilityL( CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto);
-
-    // Read title from resources
-    HBufC* popupListTitle = iEikonEnvRef.AllocReadResourceLC( aTitleResourceId );
-    iDevicePopupList->SetTitleL(*popupListTitle);
-    CleanupStack::PopAndDestroy(); // popupListTitle
-
-    // Create list box model for devices
-    CTextListBoxModel* model = iDeviceListBox->Model();
-    model->SetItemTextArray(iDeviceListRows);
-    model->SetOwnershipType(ELbmDoesNotOwnItemArray);  // Do not destroy items
-
-    // Set up filename for Avkon bitmap
-    TFileName avkonbmpFilename = AknIconUtils::AvkonIconFileName();
-
-    // Setup graphic items list for BT devices listbox
-    CAknIconArray* iconList = new(ELeave) CAknIconArray(KDeviceIconCount);
-    CleanupStack::PushL( iconList );
-	
-	CreateAndAppendIconL( KAknsIIDQgnPropBtComputer, avkonbmpFilename, 
-						  EMbmAvkonQgn_prop_bt_computer,
-						  EMbmAvkonQgn_prop_bt_computer_mask, iconList);
-
-	CreateAndAppendIconL( KAknsIIDQgnPropBtPhone, avkonbmpFilename, 
-						  EMbmAvkonQgn_prop_bt_phone,
-						  EMbmAvkonQgn_prop_bt_phone_mask, iconList);
-
-	CreateAndAppendIconL( KAknsIIDQgnPropBtAudio, avkonbmpFilename, 
-						  EMbmAvkonQgn_prop_bt_audio,
-						  EMbmAvkonQgn_prop_bt_audio_mask, iconList);
-
-	CreateAndAppendIconL( KAknsIIDQgnPropBtMisc, avkonbmpFilename, 
-						  EMbmAvkonQgn_prop_bt_misc,
-						  EMbmAvkonQgn_prop_bt_misc_mask, iconList);
-
-	CreateAndAppendIconL( KAknsIIDQgnStatBtBlank, avkonbmpFilename, 
-						  EMbmAvkonQgn_stat_bt_blank,
-						  EMbmAvkonQgn_stat_bt_blank, iconList);
-	
-	CreateAndAppendIconL( KAknsIIDQgnPropBtKeyboard, avkonbmpFilename, 
-						  EMbmAvkonQgn_prop_bt_keyboard,
-						  EMbmAvkonQgn_prop_bt_keyboard_mask, iconList);					  
-
-	CreateAndAppendIconL( KAknsIIDQgnPropBtMouse, avkonbmpFilename, 
-						  EMbmAvkonQgn_prop_bt_mouse,
-						  EMbmAvkonQgn_prop_bt_mouse_mask, iconList);
-						  
-	CreateAndAppendIconL( KAknsIIDQgnPropBtPrinter, avkonbmpFilename, 
-						  EMbmAvkonQgn_prop_bt_printer,
-						  EMbmAvkonQgn_prop_bt_printer_mask, iconList);					  					  
-	
-	CreateAndAppendIconL( KAknsIIDQgnPropBtCarKit, avkonbmpFilename, 
-						  EMbmAvkonQgn_prop_bt_carkit,
-						  EMbmAvkonQgn_prop_bt_carkit_mask, iconList);
-	
-	GetColorIconL( avkonbmpFilename, KAknsIIDQgnIndiBtPairedAdd, 
-	                EMbmAvkonQgn_indi_bt_paired_add, 
-	                EMbmAvkonQgn_indi_bt_paired_add_mask, iconList );
-	
-    
-    TFileName bmpFilename;
-    bmpFilename += KFileDrive;
-    bmpFilename += KDC_BITMAP_DIR;
-    bmpFilename += KBtnotifBmpFileName;	
-	
-	GetColorIconL( bmpFilename, KAknsIIDQgnIndiBtBlocked, 
-	                EMbmBtnotifQgn_indi_bt_blocked, 
-	                EMbmBtnotifQgn_indi_bt_blocked_mask, iconList );
-
-    GetColorIconL( bmpFilename, KAknsIIDQgnIndiBtSignalLowAdd, 
-                    EMbmBtnotifQgn_indi_bt_signal_low_add, 
-                    EMbmBtnotifQgn_indi_bt_signal_low_add_mask, iconList);
-	
-    GetColorIconL( bmpFilename, KAknsIIDQgnIndiBtSignalMedAdd, 
-                    EMbmBtnotifQgn_indi_bt_signal_med_add, 
-                    EMbmBtnotifQgn_indi_bt_signal_med_add_mask, iconList );
-
-    GetColorIconL( bmpFilename, KAknsIIDQgnIndiBtSignalGoodAdd, 
-                    EMbmBtnotifQgn_indi_bt_signal_good_add, 
-                    EMbmBtnotifQgn_indi_bt_signal_good_add_mask, iconList );
-	
-	// Transfer iconlist ownership to the listbox
-	//
-	iDeviceListBox->ItemDrawer()->ColumnData()->SetIconArray(iconList);
-	CleanupStack::Pop(); // iconList
-	
-    FLOG(_L("[BTNOTIF]\t CBTInqUI::CreatePopupListL() completed"));
-    }
-
-// ----------------------------------------------------------
-// CBTInqUI::UpdateDeviceListL
-// ----------------------------------------------------------
-//
-void CBTInqUI::UpdateDeviceListL( CBTDevice* aDevice, const TInt aSignalStrength )
-    {
-    FLOG(_L("[BTNOTIF]\t CBTInqUI::UpdateDeviceListL()")); 
-    
-    TInt iconIndex (EDeviceIconDefault);
-    TInt defNameIndex (EBTDeviceNameIndexDefault);
-    
-    HBufC* formatString = HBufC::NewLC( KBTAllPurposeBufferLength );
-
-    // Check whether the device is already in registry.
-    TInt index = LookupFromDevicesArray(iPairedDevicesArray, aDevice );
-
-    if( index >= 0 )
-        {
-        // Update device's link key and friendly name 
-        // with those found from registry.
-        aDevice->UpdateL( *( iPairedDevicesArray->At( index ) ) );
-        }
-
-	for (TInt i = 0; i < KDeviceRowLayoutTableSize; i++)
-	    {
-	    if ( ( aDevice->DeviceClass().MajorDeviceClass() == KDeviceRowLayoutTable[i].iMajorDevClass ) &&
-	        ( (aDevice->DeviceClass().MinorDeviceClass() == KDeviceRowLayoutTable[i].iMinorDevClass ) ||
-	                KDeviceRowLayoutTable[i].iMinorDevClass == 0 ) )
-            {
-            iconIndex = KDeviceRowLayoutTable[i].iIconIndex;
-            defNameIndex = KDeviceRowLayoutTable[i].iDefaultNameIndex;
-            break;
-            }
-	    }
-    
-	if ( !aDevice->IsValidFriendlyName() && !aDevice->IsValidDeviceName() )
-		{
-        BtNotifNameUtils::SetDeviceNameL(iDefaultDeviceNamesArray->MdcaPoint(defNameIndex), *aDevice);
-		}
-
-	//Convert device name to Unocode for display
-	if ( aDevice->IsValidFriendlyName() )
-		{
-        formatString->Des().Copy( aDevice->FriendlyName() );
-		}
-	else 
-		{
-		formatString->Des().Copy( BTDeviceNameConverter::ToUnicodeL(aDevice->DeviceName()));
-		}
-
-	TPtrC iconFormat (KDeviceIconFormatTable[iconIndex].iFormat);
-	
-    formatString->Des().Insert( 0, iconFormat );
-
-    if( aSignalStrength > 0)
-        {
-        if( aSignalStrength <= KMediumStrength )
-            {
-            formatString->Des().Append( TPtrC(KDeviceIconFormatTable[EDeviceIconRssiLow].iFormat ) );
-            }
-        else if( aSignalStrength <= KHighStrength )
-            {
-            formatString->Des().Append( TPtrC(KDeviceIconFormatTable[EDeviceIconRssiMed].iFormat ) );
-            }
-        else
-            {
-            formatString->Des().Append( TPtrC(KDeviceIconFormatTable[EDeviceIconRssiGood].iFormat ) );
-            }
-        }
-    
-    // If the device is paired, add paired icon to format list
-    // Paired device using JustWork file transfering mode is not shown as paired here. 
-    if( index >= 0 && IsUserAwarePaired ( aDevice->AsNamelessDevice() ) )
-        {
-        formatString->Des().Append( TPtrC(KDeviceIconFormatTable[EDeviceIconPaired].iFormat ) );
-        }
-    else
-    	{
-    	// if device is blocked, add blocked icon to format list
-    	
-    	TInt indexB = LookupFromDevicesArray(iLastUsedDevicesArray, aDevice );
-    	
-    	if ( indexB>=0 && iLastUsedDevicesArray->At( indexB )->GlobalSecurity().Banned())
-    		{
-        	formatString->Des().Append( TPtrC(KDeviceIconFormatTable[EDeviceIconBlocked].iFormat ) );
-    		}
-    	}
-
-    // Add device format string into device items
-    //
-    TInt deviceCount = iDeviceListRows->Count();
-	iDeviceListRows->InsertL( deviceCount, *formatString );      
-    CleanupStack::PopAndDestroy();  // formatString
-	
-    TInt currentItemIndex = 0;
-	if(deviceCount != 0 && iDeviceListBox)
-		{
-	 	// Store temporarily the highlighted device and destroy list box
-	    //
-	    currentItemIndex = iDeviceListBox->CurrentItemIndex();		
-		}
-
-    if( iDeviceListBox )
-        {
-        iDeviceListBox->HandleItemAdditionL();
-        
-		if(deviceCount != 0 )	
-			{        
-			//set highligh back to user selected one.       
-			iDeviceListBox->SetCurrentItemIndex(currentItemIndex); 
-			}
-
-		// Adjust top item index in order to "scroll up" the list. 
-		// If current highlight device is not the top one and the listbox's visible slots are full(at least 5 devices are listed), 
-		// to make the newly discovered device visible, the list needs to be scrolled up. 
-		//
-		TInt topIndex = iDeviceListBox->TopItemIndex();
-		deviceCount = iDeviceListRows->Count();
-		
-		if( (currentItemIndex != topIndex  && deviceCount > 5 ) && (currentItemIndex+1 < deviceCount ) )
-			{
-			iDeviceListBox->SetTopItemIndex( topIndex+1 ); //scroll up
-			}	     
-        }
-		
-    FLOG(_L("[BTNOTIF]\t CBTInqUI::UpdateDeviceListL() completed"));
-    }
-
-// ----------------------------------------------------------
-// CBTInqUI::LookupFromDevicesArrayL
-// Check if the BT device is paired devices array
-// ----------------------------------------------------------
-//
-TInt CBTInqUI::LookupFromDevicesArray(const CBTDeviceArray* aDeviceArray, const CBTDevice* aDevice ) const
-    {
-    FLOG(_L("[BTNOTIF]\t CBTInqUI::LookupFromDevicesArray()"));
-
-    __ASSERT_DEBUG( aDeviceArray, User::Panic(_L("BTNotifInqUI - aDeviceArray not created"), KErrNotFound ));
-
-    for( TInt index = 0; index < aDeviceArray->Count(); index++ )
-        {
-        // Try to find device by its address.
-        if ( aDeviceArray->At( index )->BDAddr() == aDevice->BDAddr() )
-            {
-            FTRACE(FPrint(_L("[BTNOTIF]\t CBTInqUI::LookupFromDevicesArrayL()idx %d"), index));
-            return index; // Return index to the device at array
-            }
-        }
-    return KErrNotFound;
-    }
-    
-// ----------------------------------------------------
-// CBTInqUI::CreateAndAppendIconL
-// ----------------------------------------------------
-void CBTInqUI::CreateAndAppendIconL( const TAknsItemID& aID,
-									 const TDesC& aFileName,
-									 const TInt aBitmapId,
-									 const TInt aMaskId,
-									 CAknIconArray* aIconList)
-    {
-	CGulIcon* icon = AknsUtils::CreateGulIconL(AknsUtils::SkinInstance(), aID, aFileName, aBitmapId, aMaskId);
-    
-    CleanupStack::PushL(icon);    
-	aIconList->AppendL( icon );
-    CleanupStack::Pop(); // icon
-	}
-
-// ---------------------------------------------------------
-// CBTInqUI::AdjustDeviceArrayL
-// Applend max 5 lately used non-paird devices plus all the 
-// paired devices to the input parameter by the order of 
-// the last used time stamp.
-// ---------------------------------------------------------
-//
-void CBTInqUI::AdjustDeviceArrayL(CBTDeviceArray* aDeviceArray)
-    {
-    FLOG(_L("[BTNOTIF]\t CBTInqUI::AdjustDeviceArrayL()"));
-
-    TInt lSize = iLastUsedDevicesArray->Count(); 
-    
-    if (lSize <= 0)
-        {
-        return;
-        }
-    
-    TInt pSize = iPairedDevicesArray->Count();   
-	TInt nonPairedUsedDevicesNumber = lSize - pSize;	
-    	
-    // Pickup 5 latest used devices (paired devices are excluded)
-    //   		    
-    TInt count(0);
- 
-    if (nonPairedUsedDevicesNumber <= KBTNotifNonPairedUsedDevicesMaxNumber)
-    	count = nonPairedUsedDevicesNumber;
-    else 
-    	count = KBTNotifNonPairedUsedDevicesMaxNumber;
-    
-	for(TInt i=0; i < count; i++ )
-		{
-	    TInt targetDeviceIndex = 0;
-	    	   	    
-	    //go through iLastUsedDevicesArray, compare each device's time stamp and, find the latest used one.
-	    for(TInt k=0; k < lSize; k++)
-	    	{
-		    if(iLastUsedDevicesArray->At(targetDeviceIndex)->Used() < iLastUsedDevicesArray->At(k)->Used())
-		    	{
-		    	targetDeviceIndex = k;
-		    	}
-	    	}
-	    	
-		//if result is not a paired device, add it to the adjuested device array.	    	
-	   	if( LookupFromDevicesArray(iPairedDevicesArray, iLastUsedDevicesArray->At(targetDeviceIndex)) == KErrNotFound )
-	   		{
-		    aDeviceArray->AppendL(iLastUsedDevicesArray->At(targetDeviceIndex)->CopyL()); 	  	   			   		
-	   		}
-	    //if result is a paired device, ignore this search round and step-back counter i to make sure this 
-	    //search round won't be count.
-		else
-	   		{
-	   		i--; 
-	   		}
-   		    
-	    //set the time stamp to -1, in order to ignore this device during next search round.
-	    iLastUsedDevicesArray->At(targetDeviceIndex)->SetUsed(-1);	    
-		}
-
-	// Add paired devices to the adjusted list(if paired device exist),
-	// by the order of last used time.
-	//
-    if(pSize > 0)
-    	{
-	    for( TInt i = 0; i < pSize; i++ )
-	        {
-	    	//count size in the beginning of each loop, since the size could grow,
-	    	//if new item has been appended in last loop round. 
-			TInt sSize = aDeviceArray->Count();
-	        
-	        TInt j = 0;
-	        for (; j < sSize ; j++)
-	            {
-	            //check if this paired device alreay on the list jump out this loop
-	            if (iPairedDevicesArray->At(i)->BDAddr() == aDeviceArray->At(j)->BDAddr())
-	            	{
-	                break;
-	                }
-	            
-	            // We do not add device still valid paired into list if iExcludePairedDevices is set.  
-	            if ( IsUserAwarePaired( iPairedDevicesArray->At(i)->AsNamelessDevice() ) &&
-	                    iExcludePairedDevices )
-	                {
-	                break;
-	                }
-	                
-	            //if this device is not on the list and it is used later then current comparing
-	            //device, insert the paired device to aDeviceArray at suitable position.
-				TTime pTime = iPairedDevicesArray->At(i)->Used();
-				TTime sTime = aDeviceArray->At(j)->Used();
-				
-	            if ( pTime > sTime)
-	            	{
-	                aDeviceArray->InsertL(j, iPairedDevicesArray->At(i)->CopyL());
-	                break;
-	                }
-	            }	            
-	            
-			//if this paired device is not on the sorted list(it is older then all the devices on the list),
-			//append it to the end of the list.
-	        if (j == sSize) 
-	            {
-							if ( iExcludePairedDevices )
-								 {                
-			            // Add device to list if device is not paired and iExcludePairedDevices is not set. 
-			            if ( !IsUserAwarePaired( iPairedDevicesArray->At(i)->AsNamelessDevice() ) )
-			                {                                      
-			                aDeviceArray->AppendL(iPairedDevicesArray->At(i)->CopyL());
-			                }			           
-	               }
-	            else
-	            	{
-	            	aDeviceArray->AppendL(iPairedDevicesArray->At(i)->CopyL());
-	            	}
-	            }	            
-	        }    	
-    	}
- 
-    FLOG(_L("[BTNOTIF]\t CBTInqUI::AdjustDeviceArrayL()  Complete."));
-    }
-
-//----------------------------------------------------------
-// CBTInqUI::QueryUnblockDeviceL
-//----------------------------------------------------------
-TInt CBTInqUI::QueryUnblockDeviceL(CBTDevice* aDevice)
-	{
-	FLOG(_L("[BTNOTIF]\t CBTInqUI::QueryUnblockDeviceL()"));
-	RBuf stringholder;
-	stringholder.CleanupClosePushL();
-    TBTDeviceName name;
-    BtNotifNameUtils::GetDeviceDisplayName( name, aDevice );
-    BluetoothUiUtil::LoadResourceAndSubstringL( 
-            stringholder, R_BT_UNBLOCK_DEVICE, name, 0 );
-    TInt keypress(0);
-    keypress = iUiUtil->ShowQueryL( stringholder, R_BT_UNBLOCK_QUERY, 
-            ECmdBTnotifUnavailable, name, CAknQueryDialog::EConfirmationTone );
-    CleanupStack::PopAndDestroy();  // stringholder
-    FTRACE(FPrint(_L("[BTNOTIF]\t CBTInqUI::QueryUnblockDeviceL()  keypress= %d"),keypress));    
-
-	return keypress;
-	}
-
-// ----------------------------------------------------------
-// CBTInqUI::UnblockDevice
-// Unblock device by modifying registry
-//-----------------------------------------------------------
-//
-TInt CBTInqUI::UnblockDevice(TInt aIndex)
-    {
-    TInt returnValue = KErrNone;
-    TBTDeviceSecurity deviceSecuritySettings = iLastUsedDevicesArray->At(aIndex)->GlobalSecurity();
-    deviceSecuritySettings.SetBanned(EFalse);
-    iLastUsedDevicesArray->At(aIndex)->DeleteLinkKey();
-    //DeleteLinkKey() invalidates the LinkKey and IsPaired entries in Lisbon, so...       
-    iLastUsedDevicesArray->At(aIndex)->SetGlobalSecurity(deviceSecuritySettings);
-    returnValue = iDevMan->ModifyDevice(*iLastUsedDevicesArray->At(aIndex));
-    if (!returnValue)
-        {
-        iBTRegistryQueryState = ESetDeviceUnblocked;
-        }
-    return returnValue;
-    }
-
-// ---------------------------------------------------------
-// CBTInqUI::HandleDevManComplete
-// CBTEngDevMan callback
-// ---------------------------------------------------------
-//
-void CBTInqUI::HandleDevManComplete(TInt aErr)
-	{
-	FTRACE(FPrint(_L("[BTNOTIF]\t CBTInqUI::HandleDevManComplete()  aErr= %d"),aErr));
-	
-	switch(iBTRegistryQueryState)
-		{	
-		case ESetDeviceUnblocked:
-		    FTRACE(FPrint(_L("[BTNOTIF]\t CBTInqUI::HandleDevManComplete() EModifyDevice")));  
-		    iDevSearchObserver->NotifyDeviceSearchCompleted(aErr, iDevParams);
-		    break;
-		}
-
-	FTRACE(FPrint(_L("[BTNOTIF]\t CBTInqUI::HandleDevManComplete()  complete")));
-	}
-		
-//----------------------------------------------------------------
-// CBTInqUI: DeviceSearchFilter
-//----------------------------------------------------------------
-void CBTInqUI::SelectSearchCategoryL()
-	{
-	FLOG(_L("[BTNOTIF]\t CBTInqUI::SelectSearchCategoryL()"));
-	
-	if( !(iDesiredDeviceClass == TBTDeviceClass(0)) )
-	    {
-	    // Notifier caller passed specified COD to search device, not need to show filter query.
-        DeviceSearchUiL();
-        FLOG(_L("[BTNOTIF]\t CBTInqUI::SelectSearchCategoryL() complete: not show filter query"));
-        return;
-	    }
-	// Create listbox for devices
-    //
-    CEikTextListBox* searchFilterListBox = new(ELeave) CAknSinglePopupMenuStyleListBox;
-	CleanupStack::PushL(searchFilterListBox);
-
-    // Create popup list    
-    //
-	iSearchFilterPopupList = CAknPopupList::NewL(
-        searchFilterListBox,
-        R_AVKON_SOFTKEYS_SELECT_CANCEL__SELECT,
-        AknPopupLayouts::EDynMenuWindow );
-
-    searchFilterListBox->ConstructL(iSearchFilterPopupList, EAknListBoxMenuList );
-    searchFilterListBox->CreateScrollBarFrameL(ETrue);
-    searchFilterListBox->ScrollBarFrame()->SetScrollBarVisibilityL(
-        CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto);
-
-    // Read title from resources
-    //
-    HBufC* popupListTitle = iEikonEnvRef.AllocReadResourceLC( R_BT_SEARCH_FILTER_POPUP_TITLE );
-    iSearchFilterPopupList->SetTitleL(*popupListTitle);
-    CleanupStack::PopAndDestroy(); // popupListTitle
-
-	// reuse iDeviceListRows for serch filter items
-	iDeviceListRows->Reset();
-
-    // Create list box model for devices
-    //
-    
-    CTextListBoxModel* model = searchFilterListBox->Model();
-    model->SetItemTextArray(iDeviceListRows);
-    model->SetOwnershipType(ELbmDoesNotOwnItemArray);  // Do not destroy items
-    
-    
-	// Add itms of filter to popuplist
-    // Order must be same as in enum EBTSerchFilterItem
-    //
-    
-    AddItemToSearchFilterL(R_BT_SEARCH_FOR_ALL); 
-    AddItemToSearchFilterL(R_BT_SEARCH_FOR_AUDIO);
-    AddItemToSearchFilterL(R_BT_SEARCH_FOR_PHONE);
-    AddItemToSearchFilterL(R_BT_SEARCH_FOR_COMPUTER);
-    AddItemToSearchFilterL(R_BT_SEARCH_FOR_INPUT);
-
-    // Launch popup list and wait for user input, disable other Ui key presses first:
-    AllowDialerAndAppKeyPress( EFalse );
-    // After input, destroy popup list
-    //
-    TInt popupRetVal = iSearchFilterPopupList->ExecuteLD(); 
-    iSearchFilterPopupList = NULL;
-    AllowDialerAndAppKeyPress( ETrue );
-
-    if( popupRetVal )
-        {
-        TInt currentDeviceIndex = searchFilterListBox->CurrentItemIndex();
-		switch(currentDeviceIndex)
-			{
-			case EBTSearchForAll:				
-				iDesiredDeviceClass = TBTDeviceClass(0,0,0);  				
-				break;
-			case EBTSearchForAudio:
-				iDesiredDeviceClass = TBTDeviceClass(0,EMajorDeviceAV,0);					
-				break;
-				 
-			case EBTSearchForPhone:	
-				iDesiredDeviceClass = TBTDeviceClass(0,EMajorDevicePhone,0);					
-				break;	 
-				
-			case EBTSearchForComputer:					
-				iDesiredDeviceClass = TBTDeviceClass(0,EMajorDeviceComputer,0);
-				break;
-				 	 
-			case EBTSearchForInput:
-				iDesiredDeviceClass = TBTDeviceClass(0,EMajorDevicePeripheral,0);
-				break;	 
-				 			
-			default:                    
-				break;
-			}
-        } 
-
-	CleanupStack::PopAndDestroy(); //searchFilterListBox 
-	iDeviceListRows->Reset();
-
-    if( !popupRetVal )
-        {
-        iDevSearchObserver->NotifyDeviceSearchCompleted(KErrCancel);
-        }
-    else
-        {
-        DeviceSearchUiL();
-        }
-    
-	FLOG(_L("[BTNOTIF]\t CBTInqUI::SelectSearchCategoryL() complete"));
-	}
-   
-//------------------------------------------------------------------------------
-// CBTInqUI: AddItemToSearchFilterL
-//------------------------------------------------------------------------------
-void CBTInqUI::AddItemToSearchFilterL ( TInt aResourceId )
-	{
-	HBufC* formatString = HBufC::NewLC( KBTAllPurposeBufferLength );
-    HBufC* string = iEikonEnvRef.AllocReadResourceLC( aResourceId );
-    formatString->Des().Append( *string );
-    CleanupStack::PopAndDestroy(); // string
-    iDeviceListRows->AppendL( *formatString );
-    CleanupStack::Pop(); // formatString
-	}
-
-void CBTInqUI::GetColorIconL( TFileName& aFilename, TAknsItemID aItemID, 
-                        TInt aPic, TInt aPicmask, CAknIconArray* aIconList )
-    {
-    CFbsBitmap* bitmap = NULL;
-    CFbsBitmap* mask = NULL;
-    
-    AknsUtils::CreateColorIconLC(AknsUtils::SkinInstance(), aItemID,
-                                KAknsIIDQsnIconColors,
-                                EAknsCIQsnIconColorsCG13,
-                                bitmap, mask, aFilename, aPic, aPicmask, KRgbBlack);
-    
-    CGulIcon* icon = CGulIcon::NewL(bitmap, mask);
-    CleanupStack::Pop(2); // bitmap, mask;
-    CleanupStack::PushL(icon);    
-    aIconList->AppendL( icon );
-    CleanupStack::Pop(); // icon
-    }
-
-TBool CBTInqUI::IsActiveVoIPOverWLAN()
-    {
-    TInt error = KErrNone;
-    
-    // check VoIP over WLAN is on going or not:
-    //
-    TInt wlanStatus = 0;
-    error = RProperty::Get(KPSUidWlan, KPSWlanIndicator, wlanStatus);                       
-    FTRACE( FPrint( _L( "CBTInqNotifier::CheckActivationOfVoIPOverWLAN() WLAN state: %d (error %d)" ), wlanStatus, error ) );
-    if (error)
-        {
-        return EFalse;
-        }
-
-    TInt callState = 0;
-    error = RProperty::Get( KPSUidCtsyCallInformation, KCTsyCallType, callState ); 
-    FTRACE( FPrint( _L( "CBTInqNotifier::CheckActivationOfVoIPOverWLAN() call state: %d (error %d)" ), callState, error ) );
-    if( error == KErrNone &&
-      (wlanStatus == EPSWlanIndicatorActive || wlanStatus == EPSWlanIndicatorActiveSecure)&&
-      callState == EPSCTsyCallTypeVoIP )
-        {
-        FTRACE( FPrint( _L( " VoIP call ongoing, do not allow inquiry!" ) ) );
-        return ETrue;
-        }
-    return EFalse;
-    }
-
-void CBTInqUI::DoDeviceFrontListSelection()
-    {
-    TRAPD(err, DisplayDevicesFrontListL());
-    if (err)
-        {
-        iDevSearchObserver->NotifyDeviceSearchCompleted(err);
-        }
-    }
-
-void CBTInqUI::HandleDeviceSelectionL(CBTDevice* aDev)
-    {
-    iDevParams = TBTDeviceResponseParams();
-    iDevParams.SetDeviceAddress( aDev->BDAddr());
-    iDevParams.SetDeviceClass( aDev->DeviceClass());
-    if( aDev->IsValidFriendlyName())
-        {
-        iDevParams.SetDeviceName( aDev->FriendlyName());
-        }
-    else if( aDev->IsValidDeviceName())
-        {
-        iDevParams.SetDeviceName( BTDeviceNameConverter::ToUnicodeL( aDev->DeviceName() ) );
-        }
-    //check if this device is blocked
-    TInt index = LookupFromDevicesArray(iLastUsedDevicesArray, aDev);
-    TBool blocked = ( index >= 0 && iLastUsedDevicesArray->At( index )->GlobalSecurity().Banned() );
-    if (!blocked)
-        {
-        iDevSearchObserver->NotifyDeviceSearchCompleted(KErrNone, iDevParams);
-        return;
-        }
-
-    TInt toUnblk = QueryUnblockDeviceL(aDev);
-    if (!toUnblk)
-        {
-        iDevSearchObserver->NotifyDeviceSearchCompleted(KErrCancel);
-        return;
-        }
-    TInt err = UnblockDevice( index );
-    if (err)
-        {
-        iDevSearchObserver->NotifyDeviceSearchCompleted(err);
-        }  
-    // otherwise NotifyDeviceSearchCompleted will be called after unblock is really done.
-    }
-
-void CBTInqUI::AllowDialerAndAppKeyPress( TBool aAllow )
-    {
-    CEikAppUi* const eikAppUi = CEikonEnv::Static()->EikAppUi();
-    if ( aAllow)
-        {
-        // Enable dialer
-        static_cast<CAknAppUi*>( eikAppUi )->SetKeyEventFlags( 0x00 );     
-        // Activate apps key.
-        // Ignore the return error code as we can do nothing if this operation fails
-        (void) static_cast<CAknNotifierAppServerAppUi*>(eikAppUi)->SuppressAppSwitching(EFalse);         
-        }
-    else
-        {
-        // Disable dialer
-        static_cast<CAknAppUi*>( eikAppUi )->SetKeyEventFlags( CAknAppUiBase::EDisableSendKeyShort | 
-                CAknAppUiBase::EDisableSendKeyLong);
-        // Deactivate apps key
-        (void) static_cast<CAknNotifierAppServerAppUi*>(eikAppUi)->SuppressAppSwitching(ETrue); 
-        }
-    FTRACE( FPrint( _L( "CBTInqUI::AllowDialerAndAppKeyPress : %d" ), aAllow ) );
-    }
-
-// End of File
--- a/bluetoothengine/btnotif/src/BTNInquiAO.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,239 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Part of CBTInqUI class: use Active object to search BT devices.
-*
-*/
-#include "btninqui.h"
-#include "btNotifDebug.h"
-
-/**  Identification for active object request */
-const TInt KBTNotifInquiryNotifierReq = 20;
-
-// ----------------------------------------------------------
-// CBTInqUI::PrepareScannerL
-// ----------------------------------------------------------
-//
-void CBTInqUI::CreateScannerL()
-    {
-    FLOG(_L("[BTNOTIF]\t CBTInqUI::CreateScannerL()"));
-    
-    __ASSERT_DEBUG( iScanner == NULL, User::Panic(_L("BTNotifInqUI - iScanner not released!"),KErrAlreadyExists));
-        
-    // Create scanner object which will do the actual search
-    iScanner = CBTNotifActive::NewL( this, KBTNotifInquiryNotifierReq, CActive::EPriorityStandard );
-    User::LeaveIfError( iSocketServer.Connect() );
-    TProtocolDesc pInfo;
-    User::LeaveIfError( iSocketServer.FindProtocol( _L("BTLinkManager"), pInfo));
-    User::LeaveIfError( iHostResolver.Open(iSocketServer, pInfo.iAddrFamily, pInfo.iProtocol));
-    IssueRequestL();
-
-    FLOG(_L("[BTNOTIF]\t CBTInqUI::CreateScannerL() completed"));
-    }
-
-// ----------------------------------------------------------
-// CBTInqUI::IssueRequestL
-// Issue Bluetooth device inquiry/search itself.
-// Reads also inquiry mode from shared data.
-// ----------------------------------------------------------
-//
-void CBTInqUI::IssueRequestL()
-    {
-    FLOG(_L("[BTNOTIF]\t CBTInqUI::IssueRequestL()"));
-    
-    TUint action = 0; 
-    if( !iPageForName )
-        {
-        action = KHostResInquiry + KHostResEir + KHostResIgnoreCache;
-        }
-    else
-        {
-        if( iIndex < iDevsWithoutName.Count() )
-            {
-            action = KHostResName + KHostResIgnoreCache;
-            TInquirySockAddr& sa = TInquirySockAddr::Cast( iDevsWithoutName[iIndex].iAddr );
-            iInquirySockAddr.SetBTAddr( sa.BTAddr() );            
-            }
-        }
-    if (action)
-        {
-        iInquirySockAddr.SetAction( action ); 
-        iInquirySockAddr.SetIAC(KGIAC);
-        iHostResolver.GetByAddress( iInquirySockAddr, iEntry, iScanner->RequestStatus() );
-        iScanner->GoActive();
-        }
-    else
-        {
-        FLOG(_L("[BTNOTIF]\t CBTInqUI::RunL() All name inquiries complete ."));
-        iPageForName = EFalse;
-        iIndex = 0;
-        InquiryComplete( KErrNone );
-        }
-    FLOG(_L("[BTNOTIF]\t CBTInqUI::IssueRequestL() completed"));
-    }
-
-// ----------------------------------------------------------
-// CBTInqUI::RequestCompletedL
-// BT-device or timeout has been received. Inform caller for
-// received device and issue next EIR/Name request.
-// ----------------------------------------------------------
-//
-void CBTInqUI::RequestCompletedL( CBTNotifActive* aActive, TInt aId, TInt aStatus )
-    {
-    FTRACE(FPrint(_L("[BTNOTIF]\t CBTInqUI::RequestCompletedL() status: %d >>"), aStatus ));
-    ASSERT( aId == KBTNotifInquiryNotifierReq);
-    (void) aActive;
-    
-    if( aStatus == KErrNone )
-        {
-        if( iPageForName )
-            {
-            HandleFoundNameL();
-            iIndex++;
-            IssueRequestL();
-            }
-        else
-            {
-            HandleInquiryDeviceL();
-            iHostResolver.Next( iEntry, iScanner->RequestStatus() );
-            iScanner->GoActive();
-            }
-        }
-    else if( aStatus == (KHCIErrorBase - EPageTimedOut) && iPageForName )
-        {
-        FLOG(_L("[BTNOTIF]\t CBTInqUI::RequestCompletedL() HCI:EPageTimeOut, page next one."));
-        iIndex++;
-        IssueRequestL();
-        }
-    else
-        {
-        if( !iPageForName && iDevsWithoutName.Count()>0 )
-            {
-            FTRACE(FPrint(_L("[BTNOTIF]\t CBTInqUI::RequestCompletedL() nameless devices %d, paging for name."), 
-                    iDevsWithoutName.Count() ));
-            iIndex = 0;
-            iPageForName = ETrue;
-            IssueRequestL();
-            }
-        else
-            {
-            FLOG(_L("[BTNOTIF]\t CBTInqUI::RequestCompletedL() NameInquiryComplete with error or no device found."));
-            HandleError( aActive, aId, aStatus );
-            }
-        }
-    FLOG(_L("[BTNOTIF]\t CBTInqUI::RequestCompletedL() <<"));
-    }
-
-// ----------------------------------------------------------
-// CBTInqUI::HandleError
-// Inform UI from error occured.
-// ----------------------------------------------------------
-//
-void CBTInqUI::HandleError( CBTNotifActive* aActive, TInt aId, TInt aError )
-    {
-    FLOG(_L("[BTNOTIF]\t CBTInqUI::HandleError()"));
-    (void) aActive;
-    (void) aId;
-    iPageForName = EFalse;
-    InquiryComplete( aError );
-    FLOG(_L("[BTNOTIF]\t CBTInqUI::HandleError() completed"));
-    }
-
-// ----------------------------------------------------------
-// CBTInqUI::DoCancelRequest
-// ----------------------------------------------------------
-//
-void CBTInqUI::DoCancelRequest( CBTNotifActive* aActive, TInt aId )
-    {
-    (void) aActive;
-    (void) aId;
-    iHostResolver.Cancel();
-    }
-	
-// ----------------------------------------------------------
-// CBTInqUI::HandleInquiryDeviceL
-// Inform of properties of the found BTdevice,   
-// which passes the search filter. Its name would be retrived 
-// later if not contained by the first round of inquiry.   
-// ----------------------------------------------------------
-//
-void CBTInqUI::HandleInquiryDeviceL()
-    {
-    TInquirySockAddr& sa = TInquirySockAddr::Cast( iEntry().iAddr );
-    
-    if ( iDesiredDeviceClass.DeviceClass() == 0 || sa.MajorClassOfDevice() == iDesiredDeviceClass.MajorDeviceClass() )
-        {
-        FLOG(_L("[BTNOTIF]\t CBTInqUI::HandleInquiryDeviceL() The found device passes the search filter."));
-#ifdef _DEBUG
-    TBuf<12> devAddrString;
-    sa.BTAddr().GetReadable(devAddrString);
-    FTRACE(FPrint(_L("[BTNOTIF]\t BT Address: %S"), &devAddrString));
-#endif
-        TBTDeviceName devName;
-        TBool nameGotten = CheckEirDeviceName( iEntry, devName );
-        FTRACE(FPrint(_L("[BTNOTIF]\t CBTInqUI::HandleInquiryDeviceL() EIR device name? %d, %S"), nameGotten, &devName ));
-        if( nameGotten )
-            {
-            DeviceAvailableL( iEntry(), devName );
-            }
-        else
-            {
-            iDevsWithoutName.Append( iEntry() );
-            }
-        }
-    }
-
-// ----------------------------------------------------------
-// CBTInqUI::HandleFoundNameL
-// Inform of retrieved device name after 2nd inquiry.  
-// ----------------------------------------------------------
-//
-void CBTInqUI::HandleFoundNameL()
-    {
-#ifdef _DEBUG
-    TBuf<12> devAddrString;
-    TInquirySockAddr& sa = TInquirySockAddr::Cast( iEntry().iAddr );
-    sa.BTAddr().GetReadable(devAddrString);
-    FTRACE(FPrint(_L("[BTNOTIF]\t CBTInqUI::HandleFoundNameL() BT Address: %S"), &devAddrString));
-#endif
-    if( iEntry().iName != KNullDesC )
-        {
-        FTRACE(FPrint(_L("[BTNOTIF]\t CBTInqUI::HandleFoundNameL() Name found: %S"), &(iEntry().iName) ));
-
-        DeviceAvailableL( iDevsWithoutName[iIndex], iEntry().iName );
-        }
-    
-    FLOG(_L("[BTNOTIF]\t CBTInqUI::HandleFoundNameL() Complete"));
-    }
-
-// ----------------------------------------------------------
-// CBTInqUI::CheckEirDeviceName
-// Check if the retrieved the device info contains device name.  
-// ----------------------------------------------------------
-//
-TBool CBTInqUI::CheckEirDeviceName( TNameEntry& aEntry, TBTDeviceName& aName )
-    {
-    TBluetoothNameRecordWrapper eir( aEntry() );
-    TInt length = eir.GetDeviceNameLength();
-    
-    TBool isComplete( EFalse );
-    TInt err( KErrNone );
-        
-    if( length > 0 )
-        {            
-        err = eir.GetDeviceName( aName, isComplete);
-        return (!err);
-        }
-    return EFalse;
-    }
-// End of File
--- a/bluetoothengine/btnotif/src/BTNMain.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,159 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Methods for BT notifier
-*
-*/
-
-
-// INCLUDE FILES
-
-#include <eikenv.h>
-
-#include "btnauthnotifier.h"            // All notifiers
-#include "btnpinnotifier.h"
-#include "btninqnotifier.h"
-#include "btnobexpinnotifier.h"
-#include "btnpwrnotifier.h"
-#include "btNotifDebug.h"
-#include "BTNGenericInfoNotifier.h"   
-#include "BTNGenericQueryNotifier.h"   
-#include "btnpbappinnotifier.h"
-#include "btnpaireddevsettnotifier.h"
-#include "btnssppasskeyentrynotifier.h"
-#include "btnumcmpnotifier.h"
-#include "btuserconfnotifier.h"
-#include "btnenterpriseitsecurityinfonotifier.h"
-
-// CONSTANTS
-const TInt KBTNotifierArrayIncrement = 8;
-
-
-// ================= EXPORTED FUNCTIONS ====================
-
-// ---------------------------------------------------------
-//
-// Instantiate notifiers
-//
-// ---------------------------------------------------------
-
-LOCAL_C void CreateBTNotifiersL( CArrayPtrFlat<MEikSrvNotifierBase2>* aNotifiers )
-    {
-    FLOG(_L("[BTNOTIF]\t CreateBTNotifiersL"));
-
-    CBTInqNotifier* inquiryNotifier = CBTInqNotifier::NewL();
-    CleanupStack::PushL( inquiryNotifier );
-    aNotifiers->AppendL( inquiryNotifier );
-    CleanupStack::Pop( inquiryNotifier );
-
-    CBTPinNotifier* pinNotifier = CBTPinNotifier::NewL();
-    CleanupStack::PushL( pinNotifier );
-    aNotifiers->AppendL( pinNotifier );
-    CleanupStack::Pop( pinNotifier );
-
-    CBTAuthNotifier* authNotifier = CBTAuthNotifier::NewL();
-    CleanupStack::PushL( authNotifier );
-    aNotifiers->AppendL( authNotifier );
-    CleanupStack::Pop( authNotifier );
-
-    CBTObexPinNotifier* obexNotifier = CBTObexPinNotifier::NewL();
-    CleanupStack::PushL( obexNotifier );
-    aNotifiers->AppendL( obexNotifier );
-    CleanupStack::Pop( obexNotifier );
-
-    CBTPwrNotifier* pwrNotifier = CBTPwrNotifier::NewL();
-    CleanupStack::PushL( pwrNotifier );
-    aNotifiers->AppendL( pwrNotifier );
-    CleanupStack::Pop( pwrNotifier );
-	
-	CBTGenericInfoNotifier* infoNotifier = CBTGenericInfoNotifier::NewL();
-	CleanupStack::PushL( infoNotifier );
-	aNotifiers->AppendL( infoNotifier );
-	CleanupStack::Pop( infoNotifier );
-
-	CBTGenericQueryNotifier* queryNotifier = CBTGenericQueryNotifier::NewL();
-	CleanupStack::PushL( queryNotifier );
-	aNotifiers->AppendL( queryNotifier );
-	CleanupStack::Pop( queryNotifier );
-	
-    CBTPBAPPinNotifier* pbapNotifier = CBTPBAPPinNotifier::NewL();
-    CleanupStack::PushL( pbapNotifier );
-    aNotifiers->AppendL( pbapNotifier );
-    CleanupStack::Pop( pbapNotifier );
-
-    CBTPairedDevSettNotifier* pdsNotifier = CBTPairedDevSettNotifier::NewL();
-    CleanupStack::PushL( pdsNotifier );
-    aNotifiers->AppendL( pdsNotifier );
-    CleanupStack::Pop( pdsNotifier );
-
-    CBTSSPPasskeyEntryNotifier* sspPinNotifier = CBTSSPPasskeyEntryNotifier::NewL();
-    CleanupStack::PushL( sspPinNotifier );
-    aNotifiers->AppendL( sspPinNotifier );
-    CleanupStack::Pop( sspPinNotifier );
-
-    CBTNumCmpNotifier* numCmpNotifier = CBTNumCmpNotifier::NewL();
-    CleanupStack::PushL(numCmpNotifier);
-    aNotifiers->AppendL( numCmpNotifier );
-    CleanupStack::Pop( numCmpNotifier );
-
-    CBTUserConfNotifier* userConfNotifier = CBTUserConfNotifier::NewL();
-    CleanupStack::PushL(userConfNotifier);
-    aNotifiers->AppendL( userConfNotifier );
-    CleanupStack::Pop( userConfNotifier );
-
-    
-    CBTEnterpriseItSecurityInfoNotifier* enterpriseItSecurityNotifier = CBTEnterpriseItSecurityInfoNotifier::NewL();
-    CleanupStack::PushL(enterpriseItSecurityNotifier);
-    aNotifiers->AppendL(enterpriseItSecurityNotifier);
-    CleanupStack::Pop(enterpriseItSecurityNotifier);
-    
-    FLOG(_L("[BTNOTIF]\t CreateBTNotifiersL completed"));
-    }
-
-// ---------------------------------------------------------
-//
-// Lib main entry point: Creates a notifiers array.
-//
-// ---------------------------------------------------------
-
-EXPORT_C CArrayPtr<MEikSrvNotifierBase2>* NotifierArray()
-    {
-    FLOG(_L("[BTNOTIF]\t NotifierArray"));
-    
-    CArrayPtrFlat<MEikSrvNotifierBase2>* notifiers = NULL;
-
-	notifiers = 
-	           new CArrayPtrFlat<MEikSrvNotifierBase2>( KBTNotifierArrayIncrement );
-    if( notifiers )
-        {
-        TRAPD( err, CreateBTNotifiersL( notifiers ));
-        if( err )
-            {
-            FTRACE(FPrint(_L("[BTNOTIF]\t Notifier creation failure! Error code: %d"), err));
-            TInt count = notifiers->Count();
-            while(count--)
-                (*notifiers)[count]->Release();
-            delete notifiers;
-            notifiers = NULL;
-            }
-            
-        FLOG(_L("[BTNOTIF]\t NotifierArray completed"));
-        }
-    return notifiers;
-    }
-
-
-//  End of File
-
-
-
--- a/bluetoothengine/btnotif/src/BTNObexPinNotifier.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,136 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declares OBEX PIN query notifier class.
-*
-*/
-
-
-// INCLUDE FILES
-#include <utf.h>                // Unicode character conversion utilities
-
-#include <BTNotif.rsg>          // Own resources
-#include "btnobexpinnotifier.h" // Own class definition
-#include "btNotifDebug.h"       // Debugging macros
-
-#include <secondarydisplay/BTnotifSecondaryDisplayAPI.h>
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ----------------------------------------------------------
-// CBTObexPinNotifier::NewL
-// Two-phased constructor.
-// ----------------------------------------------------------
-//
-CBTObexPinNotifier* CBTObexPinNotifier::NewL()
-    {
-    CBTObexPinNotifier* self=new (ELeave) CBTObexPinNotifier();
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop();
-    return self;
-    }
-
-// ----------------------------------------------------------
-// CBTObexPinNotifier::CBTObexPinNotifier
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// ----------------------------------------------------------
-//
-CBTObexPinNotifier::CBTObexPinNotifier()
-    {
-    }
-
-// ----------------------------------------------------------
-// Destructor
-// ----------------------------------------------------------
-//
-CBTObexPinNotifier::~CBTObexPinNotifier()
-    {
-    }
-
-// ----------------------------------------------------------
-// CBTObexPinNotifier::RegisterL
-// ----------------------------------------------------------
-//
-CBTObexPinNotifier::TNotifierInfo CBTObexPinNotifier::RegisterL()
-    {
-    iInfo.iUid=KBTObexPasskeyQueryNotifierUid;
-    iInfo.iChannel=KBTObexPINChannel;
-    iInfo.iPriority=ENotifierPriorityVHigh;
-    return iInfo;
-    }
-
-// ----------------------------------------------------------
-// CBTObexPinNotifier::GetParamsL
-// Initialize parameters. Jump to RunL as soon as possible.
-// ----------------------------------------------------------
-//
-void CBTObexPinNotifier::GetParamsL(const TDesC8& /* aBuffer */, TInt aReplySlot, const RMessagePtr2& aMessage)
-    {
-    FLOG(_L("[BTNOTIF]\t CBTObexPinNotifier::GetParamsL()"));
-
-    if( !iMessage.IsNull())
-        {
-        User::Leave(KErrInUse);
-        }
-
-    iMessage = aMessage;
-    iReplySlot = aReplySlot;
-
-    if ( AutoLockOnL() )
-        {
-        // The phone is locked, access denied.
-        //
-        CompleteMessage(KErrCancel);
-        return;
-        }
- 
-    ShowNoteCompleteMessageL();
-
-    FLOG(_L("[BTNOTIF]\t CBTObexPinNotifier::GetParamsL() completed"));
-    }
-
-// ----------------------------------------------------------
-// CBTObexPinNotifier::ShowNoteCompleteMessageL
-// Ask user response and return it to caller.
-// ----------------------------------------------------------
-//
-void CBTObexPinNotifier::ShowNoteCompleteMessageL()
-    {
-    FLOG(_L("[BTNOTIF]\t CBTObexPinNotifier::ShowNoteCompleteMessageL()"));
-
-    TBuf<KBTObexPasskeyMaxLength> tempPasskeyBuffer;    // Unicode buffer
-
-    TInt keypress = iNotifUiUtil->ShowTextInputQueryL( tempPasskeyBuffer, 
-            R_BT_OBEX_PASSKEY_QUERY, ECmdShowBtOpenCoverNote );
-		
-    if( keypress ) // OK pressed
-        {
-        // Convert data from unicode to 8 bit and write it back to caller
-        //
-        TBTObexPasskey obexPasskey;
-        obexPasskey.Zero();
-        CnvUtfConverter::ConvertFromUnicodeToUtf8(obexPasskey, tempPasskeyBuffer);
-        CompleteMessage(TPckgBuf<TBTObexPasskey>(obexPasskey), KErrNone);
-        }
-    else  // Cancel pressed
-        {
-        CompleteMessage(KErrCancel);
-        }	
-
-    FLOG(_L("[BTNOTIF]\t CBTObexPinNotifier::ShowNoteCompleteMessageL() completed"));
-    }
-
-
-// End of File
--- a/bluetoothengine/btnotif/src/BTNPBAPPinNotifier.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,140 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declares PBAP PIN query notifier class.
-*
-*/
-
-
-// INCLUDE FILES
-#include <StringLoader.h>       // Localisation stringloader
-#include <utf.h>                // Unicode character conversion utilities
-
-#include <BTNotif.rsg>          // own resources
-#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
-#include <btextnotifiers.h>
-#else
-#include <btextnotifiers.h>
-#include <btextnotifierspartner.h>
-#endif
-
-#include "btnpbappinnotifier.h" // own class definition
-#include "btNotifDebug.h"       // debugging macros
-
-#include <secondarydisplay/BTnotifSecondaryDisplayAPI.h>
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ----------------------------------------------------------
-// CBTObexPinNotifier::NewL
-// Two-phased constructor.
-// ----------------------------------------------------------
-//
-CBTPBAPPinNotifier* CBTPBAPPinNotifier::NewL()
-    {
-    CBTPBAPPinNotifier* self=new (ELeave) CBTPBAPPinNotifier();
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop();
-    return self;
-    }
-
-// ----------------------------------------------------------
-// CBTObexPinNotifier::CBTObexPinNotifier
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// ----------------------------------------------------------
-//
-CBTPBAPPinNotifier::CBTPBAPPinNotifier()
-    {
-    }
-
-// ----------------------------------------------------------
-// Destructor
-// ----------------------------------------------------------
-//
-CBTPBAPPinNotifier::~CBTPBAPPinNotifier()
-    {
-    }
-
-// ----------------------------------------------------------
-// CBTPBAPPinNotifier::RegisterL
-// ----------------------------------------------------------
-//
-CBTPBAPPinNotifier::TNotifierInfo CBTPBAPPinNotifier::RegisterL()
-    {
-    iInfo.iUid=KPbapAuthNotifierUid;
-    iInfo.iChannel=KBTObexPINChannel;
-    iInfo.iPriority=ENotifierPriorityVHigh;
-    return iInfo;
-    }
-
-// ----------------------------------------------------------
-// CBTPBAPPinNotifier::GetParamsL
-// Initialize parameters. Jump to RunL as soon as possible.
-// ----------------------------------------------------------
-//
-void CBTPBAPPinNotifier::GetParamsL(const TDesC8& /* aBuffer */, TInt aReplySlot, const RMessagePtr2& aMessage)
-    {
-    FLOG(_L("[BTNOTIF]\t CBTPBAPPinNotifier::GetParamsL()"));
-
-    if( !iMessage.IsNull())
-        {
-        User::Leave(KErrInUse);
-        }
-    
-    iMessage = aMessage;
-    iReplySlot = aReplySlot;
-    
-    if ( AutoLockOnL() )
-        {
-        // The phone is locked, access denied.
-        //
-        CompleteMessage(KErrCancel);
-        return;
-        }
-
-    ShowNoteCompleteMessageL();
-
-    FLOG(_L("[BTNOTIF]\t CBTPBAPPinNotifier::GetParamsL() completed"));
-    }
-
-// ----------------------------------------------------------
-// CBTPBAPPinNotifier::ShowNoteCompleteMessageL
-// Ask user response and return it to caller.
-// ----------------------------------------------------------
-//
-void CBTPBAPPinNotifier::ShowNoteCompleteMessageL()
-    {
-    FLOG(_L("[BTNOTIF]\t CBTPBAPPinNotifier::ShowNoteCompleteMessageL()"));
-
-    TBuf<KBTObexPasskeyMaxLength> pbapPasskey;    // Unicode buffer
-		
-    TInt keypress = iNotifUiUtil->ShowTextInputQueryL( pbapPasskey, 
-            R_BT_OBEX_PASSKEY_QUERY, ECmdShowBtOpenCoverNote );
-	
-    if( keypress ) // OK pressed
-        {        
-        TPbapAuthNotifierResponsePckg  pbapPasskeyResponse;
-        pbapPasskeyResponse().SetPassword(pbapPasskey);        
-        CompleteMessage(pbapPasskeyResponse, KErrNone);
-        }
-    else  // Cancel pressed
-        {
-        CompleteMessage(KErrCancel);
-        }
-
-    FLOG(_L("[BTNOTIF]\t CBTPBAPPinNotifier::ShowNoteCompleteMessageL() completed"));
-    }
-
-// End of File
--- a/bluetoothengine/btnotif/src/BTNPinNotifier.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,281 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declares authentication (PIN query) notifier class.
-*
-*/
-
-
-// INCLUDE FILES
-#include <StringLoader.h>    // Localisation stringloader
-#include <utf.h>             // Unicode character conversion utilities
-#include <avkon.mbg>
-#include <btengconnman.h>
-#include <btotgpairpub.inl>
-#include <btextnotifiers.h>
-#include <BTNotif.rsg>       // Own resources
-#include <bluetoothuiutil.h>
-#include "btnotif.hrh"       // Own resource header
-#include "btnpinnotifier.h"  // Own class definition
-#include "btNotifDebug.h"    // Debugging macros
-#include "btnotifnameutils.h"
-
-#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
-#include <btextnotifiers.h>
-#else
-#include <btextnotifiers.h>
-#include <btextnotifierspartner.h>
-#endif
-
-#include <secondarydisplay/BTnotifSecondaryDisplayAPI.h>
-
-#ifdef __SERIES60_HELP
-#include <hlplch.h>
-#include <csxhelp/bt.hlp.hrh> // The bt hrh info is needed, for help launching
-#endif
-const TInt KDefaultPinCodeLength=4;
-const TUint8 KZeroPinValue = '0';
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ----------------------------------------------------------
-// CBTPinNotifier::NewL
-// Two-phased constructor.
-// ----------------------------------------------------------
-//
-CBTPinNotifier* CBTPinNotifier::NewL()
-    {
-    CBTPinNotifier* self=new (ELeave) CBTPinNotifier();
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-// ----------------------------------------------------------
-// CBTPinNotifier::CBTPinNotifier
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// ----------------------------------------------------------
-//
-CBTPinNotifier::CBTPinNotifier()
-    {    
-    }
-
-// ----------------------------------------------------------
-// Destructor
-// ----------------------------------------------------------
-//
-CBTPinNotifier::~CBTPinNotifier()
-    {
-    }
-
-// ----------------------------------------------------------
-// CBTPinNotifier::RegisterL
-// Register notifier.
-// ----------------------------------------------------------
-//
-CBTPinNotifier::TNotifierInfo CBTPinNotifier::RegisterL()
-    {
-    iInfo.iUid=KBTPinCodeEntryNotifierUid;
-    iInfo.iChannel=KBTAuthenticationChannel;
-    iInfo.iPriority=ENotifierPriorityVHigh;
-    return iInfo;
-    }
-
-// ----------------------------------------------------------
-// CBTPinNotifier::GetParamsL
-// Initialize parameters and check if device is already
-// in registry. Jump to RunL as soon as possible.
-// ----------------------------------------------------------
-//
-void CBTPinNotifier::GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage)
-    {
-    FLOG(_L("[BTNOTIF]\t CBTPinNotifier::GetParamsL() >>"));
-
-    CBTNPairNotifierBase::GetParamsL( aBuffer, aReplySlot, aMessage );
-
-    TBTPinCodeEntryNotifierParams param;
- 	TPckgC<TBTPinCodeEntryNotifierParams> pckg(param);
- 	pckg.Set(aBuffer);
-
-    iBTAddr = pckg().DeviceAddress();
-    if ( OtherOutgoPairing(iBTAddr) )
-        {
-        // We won't allow incoming pairing during outgoing pairing:
-        FLOG(_L("[BTNOTIF]\t CBTPinNotifier: outgoing pair in progress, reject incoming pair"));
-        CompleteMessage(KErrCancel);
-        return;
-        }
-
- 	iLocallyInitiated = pckg().LocallyInitiated();
-    iPasskeyLength = pckg().PinCodeMinLength();
-    iStrongPinRequired = pckg().StrongPinCodeRequired();
-    ProcessParamsGetDeviceL( iBTAddr, pckg().DeviceName() );
-    
-    FLOG(_L("[BTNOTIF]\t CBTPinNotifier::GetParamsL() <<"));
-    }
-
-// ----------------------------------------------------------
-// CBTPinNotifier::HandleGetDeviceCompletedL
-// Ask user response and return it to caller.
-// Store device into registry if user has accepted pairing.
-// ----------------------------------------------------------
-//
-void CBTPinNotifier::HandleGetDeviceCompletedL(const CBTDevice* aDev)
-    {
-    FLOG(_L("[BTNOTIF]\t CBTPinNotifier::HandleGetDeviceCompletedL() >>"));
-    (void) aDev;
-
-    // Check if blocked device  
-    if( CheckBlockedDeviceL() )
-        return;
-
-    // Turn lights on and deactivate apps -key
-    iNotifUiUtil->TurnLightsOn();
-    
-    if( CheckAndSetAutomatedPairing() )
-        {
-        CompleteMessage(iPinCode, KErrNone);
-        return;
-        }
-
-    // For incoming pairing request
-    if(!iLocallyInitiated)
-    	{
-    	TBool userAnswer = AuthoriseIncomingPairingL();
-        if( !userAnswer )
-            {
-            //User rejects the incoming pairing, complete message in QueryBlockDevice.
-            FLOG(_L("[BTNOTIF]\t CBTPinNotifier::HandleGetDeviceCompletedL() <<"));
-            return;
-            }
-    	}
-
-	// Use a forever loop here to show query dialog again of ínput pin code does't fulfill the
-	// minimum length requirement 
-	//      
- 	FOREVER
-	 	{
-	    TBuf<KBTPassKeyMaxLength> tempResultBuffer;
-	    RBuf prompt;
-	    prompt.CleanupClosePushL();
-	    GenerateQueryPromptL( prompt );
-        TInt keypress = iNotifUiUtil->ShowTextInputQueryL(tempResultBuffer, prompt, R_BT_ENTER_PASSKEY_QUERY, 
-                ECmdShowBtOpenCoverNote, CAknQueryDialog::EConfirmationTone );
-        CleanupStack::PopAndDestroy( &prompt );
-
-        if( keypress ) // OK pressed
-        	{
-       		// Convert data from buf to pin
-        	TBuf8<KBTPassKeyMaxLength> buf8;
-        	buf8.Zero();
-        	CnvUtfConverter::ConvertFromUnicodeToUtf8(buf8, tempResultBuffer);
-        	
-        	    //check if the length of pin less that minimum required pin code length
-        	if ((iPasskeyLength == 0) || ( buf8.Length() >= iPasskeyLength))
-        		{
-			    iPinCode().iLength = STATIC_CAST(TUint8, buf8.Length());
-			    for (TInt index=0; index<buf8.Length(); index++)
-			        {
-			        iPinCode().iPIN[index] = buf8[index];
-			        }
-			   	CompleteMessage(iPinCode, KErrNone);
-        		break;
-        		}
-        	else 
-        		{
-        		//keep FOREVER loop runing, till the user input pin meet the requirement.
-        		tempResultBuffer.Zero();
-        		}
-        	}
-	    else    // Cancel pressed
-	        {
-            // If the outgoing pairing mode is set, then this is bonding initiated by the user.
-            TBool incomingConn = ( OutgoPairingMode( iBTAddr ) == EBTOutgoingPairNone );
-            if( !iMessage.IsNull() )
-                {
-                // No need to inform the user of the pairing result if the user cancelled it.
-                // If user doesn't answer anything but stack cancels, pairing result is needed 
-                // to show for outgoing pairing. In this case, don't stop pairng observer.
-                CBTEngConnMan::StopPairingObserver( iBTAddr );    
-                }
-
-            // We may be asking for pairing (locally initiated), because a remote device is requesting
-            // accesss to a service for which we require authentication.
-            if( iLocallyInitiated && incomingConn )
-                {
-                CheckAndHandleQueryIntervalL();
-                }
-            CompleteMessage(KErrCancel);
-	        return;
-	        }
-	 	}//END of FOREVER loop
-
-    FLOG(_L("[BTNOTIF]\t CBTPinNotifier::HandleGetDeviceCompletedL() completed"));
-    }
-
-// ----------------------------------------------------------
-// CBTPinNotifier::CheckAndSetAutomatedPairing
-// ---------------------------------------------------------- 
-TBool CBTPinNotifier::CheckAndSetAutomatedPairing()
-    {
-    FLOG(_L("[BTNOTIF]\t CBTPinNotifier::CheckAndSetAutomatedPairing()"));    
-    TBool ret( EFalse );
-    // check if device is headset and passkey is empty -> do automated pairing with 0000.
-	if ( iDevice && 
-	     OutgoPairingMode( iBTAddr ) == EBTOutgoingHeadsetAutoPairing && 
-	     iPasskeyLength <= KDefaultPinCodeLength )
-	    {
-	    FLOG( _L( "[BTNOTIF]\t CBTPinNotifier::CheckAndSetAutomatedPairing - automated pairing on" ) );
-	    FLOG(_L("[BTNOTIF]\t Setting default PIN code"));
-	    iPinCode().iLength = KDefaultPinCodeLength;
-	    for( TInt i=0; i < KDefaultPinCodeLength; ++i)
-	        {
-	        iPinCode().iPIN[i] = KZeroPinValue;
-	        }
-	    ret = ETrue;
-	    }
-	return ret;
-    }
-
-// ----------------------------------------------------------
-// CBTPinNotifier::GenerateQueryPromptL
-// ---------------------------------------------------------- 
-void CBTPinNotifier::GenerateQueryPromptL( RBuf& aRBuf )
-    {
-    FLOG(_L("[BTNOTIF]\t CBTPinNotifier::GenerateQueryPromptLC() >>"));
-    TBTDeviceName devName;
-    BtNotifNameUtils::GetDeviceDisplayName( devName, iDevice ); 
-    if (iPasskeyLength > 0)  //Minimum length passkey is defined
-        {
-        BluetoothUiUtil::LoadResourceAndSubstringL( 
-                aRBuf, R_BT_MIN_PASSKEY_PROMPT, devName, 1 );
-
-        RBuf tmpBuf;
-        tmpBuf.CleanupClosePushL();
-        tmpBuf.Swap( aRBuf );
-        aRBuf.ReAllocL( aRBuf.MaxLength() + sizeof(TUint));
-        aRBuf.Zero();
-        // Passkey length should be localized, hope StringLoader can make it:
-        StringLoader::Format( aRBuf, tmpBuf, 0, iPasskeyLength );
-        CleanupStack::PopAndDestroy( &tmpBuf );
-        }
-    else
-        {
-        BluetoothUiUtil::LoadResourceAndSubstringL( 
-                aRBuf, R_BT_PASSKEY_PROMPT, devName, 0 );
-        }
-    FLOG(_L("[BTNOTIF]\t CBTPinNotifier::GenerateQueryPromptLC() <<"));
-    }
-// End of File
--- a/bluetoothengine/btnotif/src/BTNPwrNotifier.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,120 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declares power mode setting notifier class.
-*
-*/
-
-
-// INCLUDE FILES
-#include <BTNotif.rsg>       // Own resources
-#include "btnpwrnotifier.h"  // Own class definition
-#include "btNotifDebug.h"    // Debugging macros
-#include <bt_subscribe.h>
-#include <secondarydisplay/BTnotifSecondaryDisplayAPI.h>
-
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ----------------------------------------------------------
-// CBTPwrNotifier::NewL
-// Two-phased constructor.
-// ----------------------------------------------------------
-//
-CBTPwrNotifier* CBTPwrNotifier::NewL()
-    {
-    CBTPwrNotifier* self=new (ELeave) CBTPwrNotifier();
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop();
-    return self;
-    }
-
-// ----------------------------------------------------------
-// CBTPwrNotifier::CBTPwrNotifier
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// ----------------------------------------------------------
-//
-CBTPwrNotifier::CBTPwrNotifier()
-    {
-    }
-
-// ----------------------------------------------------------
-// Destructor
-// ----------------------------------------------------------
-//
-CBTPwrNotifier::~CBTPwrNotifier()
-    {
-    }
-
-// ----------------------------------------------------------
-// CBTPwrNotifier::RegisterL
-// Register notifier.
-// ----------------------------------------------------------
-//
-CBTPwrNotifier::TNotifierInfo CBTPwrNotifier::RegisterL()
-    {
-    iInfo.iUid=KPowerModeSettingNotifierUid;
-    iInfo.iChannel=KBTPowerModeChannel;
-    iInfo.iPriority=ENotifierPriorityVHigh;
-    return iInfo;
-    }
-
-// ----------------------------------------------------------
-// CBTPwrNotifier::GetParamsL
-// Initialize parameters. Jump to RunL as soon as possible.
-// ----------------------------------------------------------
-//
-void CBTPwrNotifier::GetParamsL(const TDesC8& /*aBuffer*/, TInt aReplySlot, const RMessagePtr2& aMessage)
-    {
-    FLOG(_L("[BTNOTIF]\t CBTPwrNotifier::GetParamsL()"));
-
-    if( iReplySlot!=NULL || !iMessage.IsNull() )
-        User::Leave(KErrInUse);
-
-    iMessage = aMessage;
-    iReplySlot = aReplySlot;
-
-    ShowNoteAndCompleteMessageL();
-    FLOG(_L("[BTNOTIF]\t CBTPwrNotifier::GetParamsL() completed"));
-    }
-
-// ----------------------------------------------------------
-// CBTPwrNotifier::RunL
-// Ask user response and return it to caller.
-// ----------------------------------------------------------
-//
-void CBTPwrNotifier::ShowNoteAndCompleteMessageL()
-    {
-    FLOG(_L("[BTNOTIF]\t CBTPwrNotifier::ShowNoteAndCompleteMessageL()"));
-
-    if ( !CheckAndSetPowerOnL() )
-        {
-        CompleteMessage(KErrGeneral);
-        return;
-        }
-    // TODO: Why do we show BT BUSY note from BT power notifier?
-    //get connection amount
-    TInt linkCount = 0;
-    RProperty::Get(KPropertyUidBluetoothCategory, KPropertyKeyBluetoothGetPHYCount, linkCount);	
-        
-    if (linkCount > 6)   //support only piconet
-        {
-        iNotifUiUtil->ShowInfoNoteL( R_BT_BUSY_NOTE, ECmdShowBtBusyNote );
-        }
-	CompleteMessage(ETrue, KErrNone );
-    FLOG(_L("[BTNOTIF]\t CBTPwrNotifier::ShowNoteAndCompleteMessageL() completed"));
-    }
-
-// End of File
--- a/bluetoothengine/btnotif/src/BTNotifier.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,772 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declares Bluetooth notifiers base class.
-*
-*/
-
-
-// INCLUDE FILES
-#include <centralrepository.h> 
-#include <CoreApplicationUIsSDKCRKeys.h>
-
-#include <settingsinternalcrkeys.h>
-#include <e32property.h>
-
-#include <btengsettings.h>
-#include <btengprivatecrkeys.h>
-#include <btengconnman.h>
-#include <btengutil.h>
-#include <StringLoader.h>    // Localisation stringloader
-#include <BTNotif.rsg>       // Own resources
-#include <featmgr.h>            // Feature Manager API
-#include <utf.h>             // CnvUtfConverter
-#include <bluetoothuiutil.h>
-#include "btnotifier.h"      // Own class definition
-#include "btNotifDebug.h"    // Debugging macros
-#include "btnotiflock.h"
-#include "btnotif.hrh"       // define MaxNameLength
-#include "btnotifpanic.h"
-#include "btnotifnameutils.h"
-
-#ifdef __SERIES60_HELP
-#include <hlplch.h>
-#include <csxhelp/bt.hlp.hrh> // The bt hrh info is needed, for help launching
-#endif
-
-// CONSTANTS
-const TInt KBTNAutolockEnabled = 1;
-
-// The following definitions are used to implement checking of connection/pairing
-// request frequency
-
-// if a new connection is made quicker than CONNECT_ADD_TIME after the old one, 
-// then the saved time is added with CONNECT_ADD_TIME.
-#define CONNECT_ADD_TIME TTimeIntervalSeconds(10)
-
-// if the saved time is later than now+DENY_THRESHOLD, start rejecting incoming connections
-// from unpaired devices.
-#define DENY_THRESHOLD	 TTimeIntervalSeconds(30)
-
-// if the user denies incoming connection the saved time goes this much in the future.
-#define REJECT_ADD_TIME TTimeIntervalSeconds(31)
-
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ----------------------------------------------------------
-// CBTNotifierBase::CBTNotifierBase
-// C++ default constructor can NOT contain any code, that
-// might leave. Sets the AOs priority and puts
-// itself to the active scheduler stack.
-// ----------------------------------------------------------
-//
-CBTNotifierBase::CBTNotifierBase() 
-    {
-    }
-
-// ----------------------------------------------------------
-// CBTNotifierBase::ConstructL
-// Symbian 2nd phase constructor can leave.
-// Create registry object and open resource file.
-// ----------------------------------------------------------
-//
-void CBTNotifierBase::ConstructL()
-    {
-	// Sets up TLS, must be done before FeatureManager is used.
-	FeatureManager::InitializeLibL();
-	iIsCoverUI = ( FeatureManager::FeatureSupported( KFeatureIdCoverDisplay ) ) 
-                    ? ETrue : EFalse; 	
-	// Frees the TLS. Must be done after FeatureManager is used.
-    FeatureManager::UnInitializeLib(); 
-
-    iBTEngSettings = CBTEngSettings::NewL();
-    iDevMan = CBTEngDevMan::NewL( this );
-    iNotifUiUtil = CBTNotifUIUtil::NewL( iIsCoverUI );
-    }
-
-// ----------------------------------------------------------
-// Destructor.
-// ----------------------------------------------------------
-//
-CBTNotifierBase::~CBTNotifierBase()
-    {
-    FLOG(_L("[BTNOTIF]\t CBTNotifierBase::~CBTNotifierBase()"));    
-    Cancel();
-    FLOG(_L("[BTNOTIF]\t CBTNotifierBase::~CBTNotifierBase() -- Done"));    
-    }
-
-// ----------------------------------------------------------
-// CBTNotifierBase::Release
-// Release itself. Call to destructor.
-// ----------------------------------------------------------
-//
-void CBTNotifierBase::Release()
-    {
-    delete this;
-    }
-
-
-// ----------------------------------------------------------
-// CBTNotifierBase::Info
-// Return registered information.
-// ----------------------------------------------------------
-//
-CBTNotifierBase::TNotifierInfo CBTNotifierBase::Info() const
-    {
-    return iInfo;
-    }
-
-// ----------------------------------------------------------
-// CBTNotifierBase::StartL
-// Synchronic notifier launch. Does nothing here.
-// ----------------------------------------------------------
-//
-TPtrC8 CBTNotifierBase::StartL(const TDesC8& /*aBuffer*/)
-    {
-    TPtrC8 ret(KNullDesC8);
-    return (ret);
-    }
-
-// ----------------------------------------------------------
-// CBTNotifierBase::StartL
-// Asynchronic notifier launch.
-// ----------------------------------------------------------
-//
-void CBTNotifierBase::StartL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage)
-    {
-    if( !iNotifUiUtil )
-        {
-        iNotifUiUtil = CBTNotifUIUtil::NewL( iIsCoverUI );    
-        }
-    
-    TRAPD(err, GetParamsL(aBuffer, aReplySlot, aMessage));
-    if (err)
-        {
-        CompleteMessage(err);
-        }
-    }
-
-// ----------------------------------------------------------
-// CBTNotifierBase::Cancel
-// Cancelling method.
-// ----------------------------------------------------------
-//
-void CBTNotifierBase::Cancel()
-    {
-    FLOG(_L("[BTNOTIF]\t CBTNotifierBase::Cancel()"));    
-
-    delete iNotifUiUtil;
-    iNotifUiUtil = NULL;
-    
-	delete iBTEngSettings;
-    iBTEngSettings = NULL;
-
-    delete iDevMan;
-    iDevMan = NULL;
-    
-    delete iDevice;
-    iDevice = NULL;
-    
-    if (iDeviceArray)
-        {
-        iDeviceArray->ResetAndDestroy();
-        delete iDeviceArray;
-        iDeviceArray = NULL;
-        }
-        
-	CompleteMessage(KErrCancel);        
-    }
-
-// ----------------------------------------------------------
-// CBTNotifierBase::UpdateL
-// Notifier update. Not supported.
-// ----------------------------------------------------------
-//
-TPtrC8 CBTNotifierBase::UpdateL(const TDesC8& /*aBuffer*/)
-    {
-    TPtrC8 ret(KNullDesC8);
-    return (ret);
-    }
-
-
-// ----------------------------------------------------------
-// CBTNotifierBase::AutoLockOnL
-// ----------------------------------------------------------
-//
-TBool CBTNotifierBase::AutoLockOnL()
-    {
-    FLOG(_L("[BTNOTIF]\t CBTNotifierBase::AutoLockOnL()"));
-
-    TBool result = EFalse;
-    TInt status = KBTNAutolockEnabled;
-    
-    // Connecting and initialization:
-	CRepository* repository = CRepository::NewL(KCRUidSecuritySettings);
-		
-	repository->Get(KSettingsAutolockStatus, status);
-		
-	// Closing connection:
-	delete repository;
-		
-    if ( status == KBTNAutolockEnabled )
-        {
-        result = ETrue;
-        }
-
-    FTRACE(FPrint(_L("[BTNOTIF]\t CBTNotifierBase::AutoLockOnL() completed with %d"), result ));
-
-    return result;
-    }
-
-// ----------------------------------------------------------
-// CBTNotifierBase::CheckAndSetPowerOnL
-// The note or query to be shown depends on two SharedData flags
-// ----------------------------------------------------------
-//
-TBool CBTNotifierBase::CheckAndSetPowerOnL()
-    {
-    FLOG(_L("[BTNOTIF]\t CBTNotifierBase::CheckAndSetPowerOnL()"));
-
-	TBTPowerStateValue powerState( EBTPowerOff );
-    // Get current power status
-    //
-    User::LeaveIfError( iBTEngSettings->GetPowerState( powerState ) );
-
-    // If power is off, turn it on
-    //
-    if ( powerState == EBTPowerOff )
-        {
-        TInt offlineModeOff( 1 );    // possible values are 0 and 1
-        TInt activationEnabled( 0 ); // possible values are 0 and 1
-        
-        // Offline mode on?
-        CRepository* repository = CRepository::NewL(KCRUidCoreApplicationUIs);
-        repository->Get(KCoreAppUIsNetworkConnectionAllowed, offlineModeOff);
-        delete repository;
-        
-        // BT Activation enabled?
-        repository = CRepository::NewL(KCRUidBluetoothEngine);
-        repository->Get(KBTEnabledInOffline, activationEnabled);
-        delete repository;
-        
-        // Choose user interaction
-        //
-        if ( !offlineModeOff && !activationEnabled )
-            {
-            // Show user that feature is disabled:
-            iNotifUiUtil->ShowInfoNoteL( R_BT_OFFLINE_DISABLED, ECmdShowBtOfflineDisableNote );
-            return EFalse; // Bluetooth can't be set on.
-            }
-        else
-            {
-            // Choose query
-            //
-            TInt keypress( 0 );	
-            if ( offlineModeOff )
-                {
-                keypress = iNotifUiUtil->ShowQueryL( KErrNone, R_BT_POWER_IS_OFF_QUERY, ECmdShowBtIsOffDlg );
-                }
-            else
-                {
-                keypress = iNotifUiUtil->ShowQueryL( KErrNone, R_BT_ACTIVATE_IN_OFFLINE_QUERY, 
-                        ECmdShowBtActivateInOfflineDlg );
-				}
-
-            if( keypress )  // User answered YES
-                { 
-                //Check if the local name has been set. If not ask user to set name
-                
-				TBool ok = IsLocalNameModifiedL();
-    			if( !ok )
-    				{
-      				ok = AskLocalBTNameQueryL();
-    				}
-               if ( ok )
-			       {  
-                	ok = ( iBTEngSettings->SetPowerState( EBTPowerOn ) ) ? EFalse : ETrue;
-                	}
-                return ok;
-                }
-            else // User has cancelled the dialog
-                {
-                FLOG(_L("[BTNOTIF]\t CBTNotifierBase::CheckAndSetPowerOnL(), dialog canceled"));
-                return EFalse;
-                }                    
-            }
-        }
-    return ETrue;
-    }
-    
-// ----------------------------------------------------------
-// CBTNotifierBase::AskLocalBTNameQueryL()
-// ----------------------------------------------------------
-//
-TBool CBTNotifierBase::AskLocalBTNameQueryL()
-    {
-	FLOG(_L("[BTNOTIF]\t CBTNotifierBase::AskLocalBTNameQueryL() >>"));
-	
-	TBTDeviceName tempNameBuffer;
-    // Cut the excess part of the name away. The query can handle only 
-    // KBTUIMaxNameLength characters.
-    //
-    if( tempNameBuffer.Length() > KBTUIMaxNameLength )
-     {
-     tempNameBuffer.SetLength( KBTUIMaxNameLength );
-     }
-
-    //Get default name if given by e.g. phone product
-    (void) RProperty::Get( KPropertyUidBluetoothCategory, 
-                           KPropertyKeyBluetoothGetDeviceName, tempNameBuffer );
-    
-    if( !tempNameBuffer.Length() )
-        {
-        (void) RProperty::Get( KPropertyUidBluetoothCategory, 
-                KPropertyKeyBluetoothGetDeviceName, tempNameBuffer );
-        }
-    
-    if( !tempNameBuffer.Length() )
-        {
-        RBTRegServ btRegServ;
-        RBTLocalDevice btReg;
-        TBTLocalDevice localDev;
-
-        TInt err = btRegServ.Connect();
-        if( !err )
-            {
-            err = btReg.Open( btRegServ );
-            } 
-        if( !err )
-            {
-            // Read the BT local name from BT Registry.
-            err = btReg.Get( localDev );
-            }
-        if( !err )
-            {
-            // The error can be > 0 if there are unconverted characters.
-            err = CnvUtfConverter::ConvertToUnicodeFromUtf8( tempNameBuffer, localDev.DeviceName() );
-            }
-        btReg.Close();
-        btRegServ.Close();
-        }
-
-    TInt keypress = iNotifUiUtil->ShowTextInputQueryL( tempNameBuffer, 
-            R_BT_ENTER_LOCAL_NAME_QUERY, ECmdBTnotifUnavailable );
-    
-    if( keypress )  // User has accepted the dialog
-        {
-        AknTextUtils::StripCharacters(tempNameBuffer,  KAknStripListControlChars);
-        tempNameBuffer.TrimAll();   // Remove extra spaces
-        // If name was full of invalid chars, it becomes empty after above cleanup. 
-        if( tempNameBuffer.Length() ) 
-            {
-            TInt err = iBTEngSettings->SetLocalName( tempNameBuffer );
-            FLOG(_L("[BTNOTIF]\t CBTNotifierBase::AskLocalBTNameQueryL() <<"));
-            return (err) ? EFalse : ETrue;    
-            }
-        else
-            {
-            FLOG(_L("[BTNOTIF]\t CBTNotifierBase::AskLocalBTNameQueryL() << failed"));
-            return EFalse;
-            }
-        }
-    else
-        {
-        FLOG(_L("[BTNOTIF]\t CBTNotifierBase::AskLocalBTNameQueryL() << cancelled"));
-        return EFalse;
-        }
-    }
-
-// ---------------------------------------------------------------------------------
-// CBTNotifierBase::IsExistingConnectionToAudioL
-// Check if there is any existing connection to audio profiles from the same device
-// ---------------------------------------------------------------------------------
-TBool CBTNotifierBase::IsExistingConnectionToAudioL( const TBTDevAddr& aDevAddr )
-    {
-    FLOG(_L("[BTNOTIF]\t CBTNotifierBase::IsExistingConnectionToAudioL()"));
-    CBTEngConnMan* connMan = CBTEngConnMan::NewL();
-    TBTEngConnectionStatus conntatus( EBTEngNotConnected );
-    (void) connMan->IsConnected(aDevAddr,conntatus);      
-    delete connMan;
-    FLOG(_L("[BTNOTIF]\t CBTNotifierBase::IsExistingConnectionToAudioL() complete"));
-    return ( conntatus==EBTEngConnected || conntatus==EBTEngConnecting );
-    }
-
-// ---------------------------------------------------------------------------
-// CBTNotifierBase::IsLocalNameModified
-// Checks from central repository whether the Bluetooth friendly name 
-// has been modified .
-// ---------------------------------------------------------------------------
-//
-TBool CBTNotifierBase::IsLocalNameModifiedL()
-	{
-	FLOG(_L("[BTNOTIF]\t CBTNotifierBase::IsLocalNameModified()"));   
-    CRepository* cenRep = CRepository::NewL( KCRUidBTEngPrivateSettings );
-    TInt val( EBTLocalNameDefault );
-    (void) cenRep->Get( KBTLocalNameChanged, val );
-    delete cenRep;
-    FLOG(_L("[BTNOTIF]\t CBTNotifierBase::IsLocalNameModified() complete"));
-    return val == EBTLocalNameSet;
-    }
-
-
-void CBTNotifierBase::GetDeviceFromRegL(const TBTDevAddr& aAddr)
-    {
-    FLOG(_L("[BTNOTIF]\t CBTNotifierBase::GetDeviceFromRegL"));
-    __ASSERT_DEBUG(iDevice, BTNOTIF_PANIC(EiDeviceNullWhenCallingGetDeviceFromRegL));
-
-    TBTRegistrySearch mySearch;
-    mySearch.FindAddress( aAddr );
-    iDeviceArray = new (ELeave) CBTDeviceArray(1);
-    if( !iDevMan )
-        {
-        iDevMan = CBTEngDevMan::NewL( this );    
-        }
-    TInt err = iDevMan->GetDevices( mySearch, iDeviceArray );
-    if(err)
-        {
-        FTRACE(FPrint(_L("[BTNOTIF]\t CBTNotifierBase::GetDeviceFromRegL iDevMan->GetDevices error = %d"), err));
-        DoHandleGetDevicesCompleteL(err, NULL);
-        }
-    FLOG(_L("[BTNOTIF]\t CBTNotifierBase::GetDeviceFromRegL done"));
-    }
-
-// ----------------------------------------------------------
-// CBTNotifierBase::QueryBlockDeviceL
-// Opens a query that returns wether or not user wants the device blocked
-// ----------------------------------------------------------
-void CBTNotifierBase::QueryBlockDeviceL()
-    {
-    FLOG(_L("[BTNOTIF]\t CBTNotifierBase::QueryBlockDeviceL()"));
-    __ASSERT_DEBUG( iNotifUiUtil->IsQueryReleased(), User::Panic( _L("CBTNotifierBase - iYesNoDlg not released!"), KErrAlreadyExists ) );
-    
-    TBTDeviceName bName;
-    BtNotifNameUtils::GetDeviceDisplayName(bName, iDevice);
-
-    HBufC* header= StringLoader::LoadLC( R_BT_BLOCK_DEVICE_HEADER );
-
-    TInt resId = IsUserAwarePaired( iDevice->AsNamelessDevice() ) ? 
-        R_BT_BLOCK_PAIRED_DEVICE_NOHELP : R_BT_BLOCK_DEVICE_NOHELP;
-	
-    RBuf stringholder;
-    stringholder.CleanupClosePushL();
-    BluetoothUiUtil::LoadResourceAndSubstringL( stringholder, resId, bName, 0 );
-
-	TInt keypress = iNotifUiUtil->ShowMessageQueryL( stringholder, *header, 
-	        R_BT_GENERIC_MESSAGE_QUERY, CAknQueryDialog::EConfirmationTone );
-    
-    CleanupStack::PopAndDestroy(&stringholder);                   
-    CleanupStack::PopAndDestroy(header);  
-
-    if( keypress )// user replied "Yes"
-        {
-        DoBlockDevice();
-        }
-    else  // user replied "No" 
-        {
-        CompleteMessage(KErrCancel);        
-        } 
-    FLOG(_L("[BTNOTIF]\t CBTNotifierBase::QueryBlockDeviceL() complete"));   
-    }
-
-void CBTNotifierBase::DoBlockDevice()
-    {
-    FLOG(_L("[BTNOTIF]\t CBTNotifierBase::DoBlockDevice()"));
-    TBTDeviceSecurity deviceSecurity = iDevice->GlobalSecurity();
-    deviceSecurity.SetBanned(ETrue);
-    deviceSecurity.SetNoAuthenticate(EFalse);
-    deviceSecurity.SetNoAuthorise(EFalse);
-    iDevice->SetGlobalSecurity(deviceSecurity);
-    iDevice->DeleteLinkKey();
- 
-    iBTRegistryQueryState = ESetDeviceBlocked;
-    TInt err = KErrNone;
-    if( !iDevMan )
-        {
-        TRAP(err, iDevMan = CBTEngDevMan::NewL( this ));    
-        }
-    if( !err )
-        {
-        err = iDevMan->ModifyDevice( *iDevice );
-        }
-    if( err )
-        {
-        // if error, complete message, otherwise waiting for devman callback
-        CompleteMessage(err); 
-        }
-    }
-
-void CBTNotifierBase::ChangeAuthorizeState( TBool aTrust )
-    {
-    FLOG(_L("[BTNOTIF]\t CBTNotifierBase::ChangeAuthorizeState()"));   
-    TBTDeviceSecurity sec = iDevice->GlobalSecurity();
-    sec.SetBanned(EFalse);
-    sec.SetNoAuthorise( ( aTrust ) ? ETrue : EFalse ) ;
-    iDevice->SetGlobalSecurity(sec);
- 
-    iBTRegistryQueryState = ESetDeviceAuthorizeState;
-    TInt err = KErrNone;
-    if( !iDevMan )
-        {    
-        TRAP(err, iDevMan = CBTEngDevMan::NewL( this ));
-        }
-    if( !err )
-        {
-        err = iDevMan->ModifyDevice( *iDevice );
-        }
-    if( err )
-        {
-        // if error, complete message, otherwise waiting for devman callback        
-        CompleteMessage(err); 
-        TBTNotifLockPublish::DeleteNotifLocks( 
-                EBTNotiferLockPairedDeviceSetting, iDevice->BDAddr() );
-        }
-    }
-
-// ----------------------------------------------------------
-// CBTNotifierBase::CheckAndHandleQueryIntervalL
-// ----------------------------------------------------------
-//
-void CBTNotifierBase::CheckAndHandleQueryIntervalL()
-    {
-    FLOG( _L( "[BTNOTIF]\t CBTNotifierBase::CheckQueryInterval start." ) );
-    TBool res = CheckQueryInterval();
-    if( res )
-        {
-        FLOG( _L( "[BTNOTIF]\t CBTNotifierBase::CheckQueryInterval check on/off query status." ) );
-        // Check if we're already showing Turn BT off query
-        TInt queryValue=EBTQueryOff;
-        RProperty::Get( KPSUidBluetoothEnginePrivateCategory, KBTTurnBTOffQueryOn, queryValue );
-        if( queryValue==EBTQueryOff )
-            {
-            FLOG( _L( "[BTNOTIF]\t CBTNotifierBase::CheckQueryInterval asking to turn BT off." ) );
-            RProperty::Set( KPSUidBluetoothEnginePrivateCategory, KBTTurnBTOffQueryOn, EBTQueryOn );
-            TInt keypress = iNotifUiUtil->ShowQueryL( KErrNone, R_BT_TURN_BT_OFF_NOTE, ECmdBTnotifUnavailable );
-            RProperty::Set( KPSUidBluetoothEnginePrivateCategory, KBTTurnBTOffQueryOn, EBTQueryOff );
-            if( keypress )  // User has accepted the dialog
-                {
-                FLOG( _L( "[BTNOTIF]\t CBTNotifierBase::CheckQueryInterval turning BT off." ) );
-                (void) iBTEngSettings->SetPowerState( EBTPowerOff );
-                CompleteMessage( KErrAccessDenied );
-                }
-            }
-        }
-    FLOG( _L( "[BTNOTIF]\t CBTNotifierBase::CheckAndHandleQueryIntervalL done." ) );
-    }
-
-void CBTNotifierBase::DoHandleGetDevicesCompleteL( TInt aErr, CBTDeviceArray* aDeviceArray)
-    {
-    FTRACE(FPrint(_L("[BTNOTIF]\t CBTNotifierBase::DoHandleGetDevicesCompleteL(%d)"), aErr ));
-    TBTDeviceName devName;
-    if (!aErr && aDeviceArray && aDeviceArray->Count())
-        {
-        // Reassign so that we won't lose the device name as it is
-        // needed if registry doesn't have the name for this device yet:
-        CBTDevice* temp = iDevice;
-        CleanupStack::PushL(temp);
-        // Taking the object returned by registry so that iDevice have
-        // all the up-to-date information except device name.
-        iDevice = aDeviceArray->At(0);
-        aDeviceArray->Delete( 0 );
-        // we show user the device name from registry if it is available;
-        // Otherwise, the name passed in by the notifier request shall be 
-        // used.
-        if( ( !iDevice->IsValidDeviceName() || 
-              !iDevice->DeviceName().Length() ) && 
-            temp->IsValidDeviceName() )
-            {
-            // We are using a stored device name, which will
-            // already have been processed
-            iDevice->SetDeviceNameL( temp->DeviceName() );
-            }
-        CleanupStack::PopAndDestroy(temp);
-        }
-    BtNotifNameUtils::GetDeviceName(devName, iDevice);   
-    
-    // It is possible that iDevice hasn't got a name so far. Use the default BT name
-    // got from GetDeviceName().
-    if ( !iDevice->IsValidDeviceName() || !iDevice->DeviceName().Length() )
-        {
-        BtNotifNameUtils::SetDeviceNameL(devName, *iDevice);
-        }
-    HandleGetDeviceCompletedL( iDevice ); 
-    }
-
-// ----------------------------------------------------------
-// CBTNotifierBase::CompleteMessage
-// ----------------------------------------------------------
-//	
-void CBTNotifierBase::CompleteMessage(TInt aErr)
-    {	   
-	if( !iMessage.IsNull() )
-	    {
-	    FTRACE(FPrint(_L("[BTNOTIF]\t CBTNotifierBase::CompleteMessage(%d)"), aErr ));
-	    iMessage.Complete( aErr );
-	    }
-	}
-
-// ----------------------------------------------------------
-// CBTNotifierBase::CompleteMessage
-// ----------------------------------------------------------
-//	
-void CBTNotifierBase::CompleteMessage(TInt aValueToReplySlot, TInt aErr)
-    {
-    FTRACE(FPrint(_L("[BTNOTIF]\t CBTNotifierBase::CompleteMessage(%d, %d)"), 
-            aValueToReplySlot, aErr ) );
-    CompleteMessage(TPckgBuf<TInt>( aValueToReplySlot ), aErr);
-	}
-
-// ----------------------------------------------------------
-// CBTNotifierBase::CompleteMessage
-// ----------------------------------------------------------
-//	
-void CBTNotifierBase::CompleteMessage(const TDesC8& aDesToReplySlot, TInt aErr)
-    {	   
-	if( !iMessage.IsNull() )
-	    {
-	    FTRACE(FPrint(_L("[BTNOTIF]\t CBTNotifierBase::CompleteMessage(TDesC8&, %d)"), aErr ) );
-	    if ( !aErr )
-	        {
-	        aErr = iMessage.Write( iReplySlot, aDesToReplySlot );
-	        }
-	    iMessage.Complete( aErr );
-	    }
-	}
-
-#ifdef __SERIES60_HELP    
-//-------------------------------------------------------------
-// CBTNotifierBase::LaunchHelp
-//--------------------------------------------------------------
-TInt CBTNotifierBase::LaunchHelp(TAny * tCoeHelpContext )
-	{	
-	TCoeHelpContext hc;
-	
-	if( tCoeHelpContext==NULL)
-		hc = TCoeHelpContext(KUidBTUI,KBT_HLP_BLOCKED);
-	else
-		hc = *static_cast<TCoeHelpContext*>(tCoeHelpContext);
-		 
-		CArrayFix< TCoeHelpContext >* array = new CArrayFixFlat< TCoeHelpContext >(1);
-	TRAPD(err,
-		{
-		CleanupStack::PushL(array);
-		array->AppendL(hc);		
-		HlpLauncher::LaunchHelpApplicationL( CCoeEnv::Static()->WsSession() , array );
-    	CleanupStack::Pop(array);
-		});
-
-    // the array is not deleted, since deleting it will result
-    // to E32User-CBase 3. It is assumed that HlpLancher is taking care of it.
-    // however this has not been documented.
-    return err;
-	}
-#endif
-
-void CBTNotifierBase::HandleGetDevicesComplete( TInt aErr, CBTDeviceArray* aDeviceArray)
-    {
-    TRAP_IGNORE(DoHandleGetDevicesCompleteL(aErr, aDeviceArray));
-    }
-
-void CBTNotifierBase::HandleDevManComplete(TInt aErr)
-    {
-    FTRACE(FPrint(_L("[BTNOTIF]\t CBTNotifierBase::HandleDevManComplete()  aErr = %d"), aErr ));
-    
-    switch (iBTRegistryQueryState)
-        {
-        case ESetDeviceBlocked:
-            {
-            // Blocking device was demanded by user after the user
-            // rejected incoming pairing or connect request. The message
-            // to be completed here is the original pair or authorization request
-            // which has been rejected by the user.
-            CompleteMessage(KErrCancel);
-            }
-        case ESetDeviceAuthorizeState:
-            {
-            TBTNotifLockPublish::DeleteNotifLocks( 
-                    EBTNotiferLockPairedDeviceSetting, iDevice->BDAddr() );
-            CompleteMessage(aErr);
-            break;
-            }
-        }
-    FLOG(_L("[BTNOTIF]\t CBTNotifierBase::HandleDevManComplete() Complete"));           
-    }
-
-void CBTNotifierBase::HandleGetDeviceCompletedL(const CBTDevice* /*aDev*/)
-    {    
-    }
-
-// ----------------------------------------------------------
-// CBTNotifierBase::CheckQueryInterval
-// ----------------------------------------------------------
-//
-TBool CBTNotifierBase::CheckQueryInterval()
-    {
-    FLOG( _L( "[BTNOTIF]\t CBTNotifierBase::CheckQueryInterval()" ) );
-    TBool result = EFalse;
-    // Check if the user gets too many queries within a certain time interval from unpaired devices
-    if( iDevice && !iDevice->IsValidLinkKey() )
-        {
-        TBuf8<32> buf;
-        TTime now;
-        now.UniversalTime();    // Get current time
-        TInt64 writeTime = ( now + REJECT_ADD_TIME ).Int64();
-
-        // get last connection time
-        TInt err = RProperty::Get( KPSUidBluetoothEnginePrivateCategory, KBTConnectionTimeStamp, buf );
-        if( !err )
-            {
-            FLOG( _L( "[BTNOTIF]\t CBTNotifierBase::CheckQueryInterval Checking query interval." ) );
-            // Parse recorded time stamp
-            TInt64 num(0);
-            TLex8 lex;
-            lex = buf;
-            lex.Val( num );
-            TTime lastTime( num );
-
-            // detection of clock adjusment
-            TInt timetravel = 2 * REJECT_ADD_TIME.Int();
-            if( lastTime > now + TTimeIntervalSeconds(timetravel) )
-                {
-                FLOG( _L( "[BTNOTIF]\t CBTNotifierBase::CheckQueryInterval  time travel detection." ) );
-                lastTime = now;
-                }
-            // new request too quickly, move booked time
-            if( lastTime + CONNECT_ADD_TIME > now )
-                {
-                FLOG( _L( "[BTNOTIF]\t CBTAuthNotifier::IsDosAttack  CONNECT_ADD_TIME added." ) );
-                writeTime = ( lastTime + CONNECT_ADD_TIME ).Int64();
-                }
-
-            FTRACE( FPrint( _L( "[BTNOTIF]\t CBTNotifierBase::CheckQueryInterval() lastTime = %d" ), lastTime.Int64() ) );
-            FTRACE( FPrint( _L( "[BTNOTIF]\t CBTNotifierBase::CheckQueryInterval now + treshold: %d" ), (now + DENY_THRESHOLD).Int64() ) );
-            // If threshold is exceeded, ask user to turn Bluetooth OFF
-            if( lastTime > now + DENY_THRESHOLD )
-                {
-                FLOG( _L( "[BTNOTIF]\t CBTNotifierBase::CheckQueryInterval threshold exceeded!." ) );
-                result = ETrue;
-                }
-            }
-        else
-            {
-            FLOG( _L( "[BTNOTIF]\t CBTNotifierBase::CheckQueryInterval setting connection timestamp first time." ) );
-            }
-        // Write back the timestamp
-        buf.Num( writeTime );
-        FTRACE( FPrint( _L( "[BTNOTIF]\t CBTNotifierBase::CheckQueryInterval updating timestamp: %d." ), writeTime ) );
-        RProperty::Set( KPSUidBluetoothEnginePrivateCategory,KBTConnectionTimeStamp, buf );
-        } // end of query interval check
-    FLOG( _L( "[BTNOTIF]\t CBTNotifierBase::CheckQueryInterval() complete" ) );
-    return result;
-    }
-// End of File
--- a/bluetoothengine/btnotif/src/btnenterpriseitsecurityinfonotifier.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,172 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Bluetooth visibility timeout notifier class.
-*
-*/
-
-// INCLUDE FILES
-#include <BTNotif.rsg>								// Own resources
-#include "btnenterpriseitsecurityinfonotifier.h"	// Own class definition
-#include "btNotifDebug.h"							// Debugging macros
-#include <tulstringresourcereader.h>
-#include <e32cmn.h>
-#include <dcmo.rsg>
-
-_LIT(KDcmoResourceFileName, "z:dcmo.rsc");
-_LIT(KNewLine, "\n");
-
-//"Bluetooth" is 9 characters long
-const TInt KDefaultBluetoothStringLength = 9;
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ----------------------------------------------------------
-// CBTEnterpriseItSecurityInfoNotifier::NewL
-// Two-phased constructor.
-// ----------------------------------------------------------
-//
-CBTEnterpriseItSecurityInfoNotifier* CBTEnterpriseItSecurityInfoNotifier::NewL()
-    {
-    CBTEnterpriseItSecurityInfoNotifier* self=new (ELeave) CBTEnterpriseItSecurityInfoNotifier();
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-// ----------------------------------------------------------
-// CBTEnterpriseItSecurityInfoNotifier::CBTEnterpriseItSecurityInfoNotifier
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// ----------------------------------------------------------
-//
-CBTEnterpriseItSecurityInfoNotifier::CBTEnterpriseItSecurityInfoNotifier() 
-    {
-    }
-
-// ----------------------------------------------------------
-// Destructor
-// ----------------------------------------------------------
-//
-CBTEnterpriseItSecurityInfoNotifier::~CBTEnterpriseItSecurityInfoNotifier()
-    {
-    Cancel();
-    }
-
-// ----------------------------------------------------------
-// CBTEnterpriseItSecurityInfoNotifier::RegisterL
-// Register notifier.
-// ----------------------------------------------------------
-//
-CBTEnterpriseItSecurityInfoNotifier::TNotifierInfo CBTEnterpriseItSecurityInfoNotifier::RegisterL()
-    {
-    iInfo.iUid = KBTEnterpriseItSecurityInfoNotifierUid;
-    iInfo.iChannel = KBTEnterpriseItSecurityInfoNotifierUid;
-    iInfo.iPriority = ENotifierPriorityHigh;
-    return iInfo;
-    }
-
-// ----------------------------------------------------------
-// CBTEnterpriseItSecurityInfoNotifier::StartL
-// Synchronic notifier launch. Contructs and shows a global
-// note when temp visibility expire, no parameters need here.
-// ----------------------------------------------------------
-//
-TPtrC8 CBTEnterpriseItSecurityInfoNotifier::StartL(const TDesC8& /*aBuffer*/)
-    {
-    FLOG(_L("[BTNOTIF]\t CBTEnterpriseItSecurityInfoNotifier::StartL()"));
-    
-    ShowNoteAndCompleteL();
-
-	FLOG(_L("[BTNOTIF]\t CBTEnterpriseItSecurityInfoNotifier::StartL() completed"));
-    return TPtrC8(KNullDesC8);
-    }
-
-// ----------------------------------------------------------
-// CBTEnterpriseItSecurityInfoNotifier::GetParamsL
-// Mandatory for BT Notifiers when using asynchronous launch. 
-// ----------------------------------------------------------
-//
-void CBTEnterpriseItSecurityInfoNotifier::GetParamsL(const TDesC8& /*aBuffer*/,
-										 TInt /*aReplySlot*/,
-										 const RMessagePtr2& /*aMessage*/)
-    {
-    //nothing to do here
-    }
-
-// ----------------------------------------------------------
-// CBTEnterpriseItSecurityInfoNotifier::ShowNoteAndCompleteL
-// Shows the notifier in backround 
-// ----------------------------------------------------------
-//
-void CBTEnterpriseItSecurityInfoNotifier::ShowNoteAndCompleteL()
-	{
-	FLOG(_L("[BTNOTIF]\t CBTEnterpriseItSecurityInfoNotifier::ShowNoteAndComplete()"));
-	
-	//get full path to the DCMO resource file
-	TParse* parser = new (ELeave) TParse;
-	parser->Set(KDcmoResourceFileName(), &KDC_RESOURCE_FILES_DIR, NULL);
-	CleanupStack::PushL(parser);
-	TFileName* fileName = new (ELeave) TFileName;
-	*fileName = parser->FullName();
-	CleanupStack::PopAndDestroy(parser);
-	CleanupStack::PushL(fileName);
-	
-	//create the resource reader object that we need to use several times
-	CTulStringResourceReader* reader = CTulStringResourceReader::NewL(*fileName);
-	CleanupStack::PushL(reader);
-	
-	//get pointer to the message part of the notifier
-	TPtrC resourceString;
-	resourceString.Set(reader->ReadResourceString(R_DM_RUN_TIME_VAR_DISABLE));
-
-	//create descriptor with a max length to fit the localised "disabled" text + new line + "Bluetooth"
-	RBuf content;
-	content.CreateL(resourceString.Length() + KNewLine().Length() + KDefaultBluetoothStringLength);
-	CleanupClosePushL(content);
-	
-	//add resource string and new line character to the content descriptor
-	content.Append(resourceString);	
-	content.Append(KNewLine());
-	
-	//get pointer to the Bluetooth name part of the notifier (can't assume this is actually "Bluetooth" in all languages)
-	resourceString.Set(reader->ReadResourceString(R_DM_RUN_TIME_VAR_BLUETOOTH));
-	
-	//check that the resource string will fit into the content descriptor
-	TInt requiredLength = content.Length() + resourceString.Length();
-	if (requiredLength > content.MaxLength())
-		{
-		//allocate more space in the content descriptor
-		content.ReAllocL(requiredLength);
-		}
-	
-	//add resource string to the content descriptor
-	content.Append(resourceString);	
-	
-	//display the notifier and complete
-	iNotifUiUtil->ShowInfoNoteL(content, ECmdBTnotifUnavailable);
-	CompleteMessage(KErrNone);
-	
-	//pop and destroy the content descriptor, resource reader and file name
-	CleanupStack::PopAndDestroy(3, fileName);
-	
-	FLOG(_L("[BTNOTIF]\t CBTEnterpriseItSecurityInfoNotifier::ShowNoteAndComplete() complete"));
-	}
-
-void CBTEnterpriseItSecurityInfoNotifier::HandleGetDeviceCompletedL(const CBTDevice* /*aDev*/)
-    {
-    //nothing to do here
-    }
-
-// End of File
--- a/bluetoothengine/btnotif/src/btnotifactive.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Active object helper class.
-*
-*/
-
-#include "btnotifactive.h"
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// C++ default constructor
-// ---------------------------------------------------------------------------
-//
-CBTNotifActive::CBTNotifActive( MBTNotifActiveObserver* aObserver, 
-        TInt aId, TInt aPriority )
-: CActive( aPriority ), iRequestId( aId ), iObserver( aObserver )
-    {
-    CActiveScheduler::Add( this );
-    }
-
-// ---------------------------------------------------------------------------
-// Symbian 2nd-phase constructor
-// ---------------------------------------------------------------------------
-//
-void CBTNotifActive::ConstructL()
-    {
-    }
-
-// ---------------------------------------------------------------------------
-// NewL
-// ---------------------------------------------------------------------------
-//
-CBTNotifActive* CBTNotifActive::NewL( MBTNotifActiveObserver* aObserver, 
-        TInt aId, TInt aPriority )
-    {
-    CBTNotifActive* self = new (ELeave) CBTNotifActive( aObserver, aId, aPriority );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-// Destructor
-// ---------------------------------------------------------------------------
-//
-CBTNotifActive::~CBTNotifActive()
-    {
-    Cancel();
-    }
-
-// ---------------------------------------------------------------------------
-// From class CActive.
-// Called by the active scheduler when the request has been cancelled.
-// ---------------------------------------------------------------------------
-//
-void CBTNotifActive::DoCancel()
-    {
-    iObserver->DoCancelRequest( this, iRequestId );
-    }
-
-// ---------------------------------------------------------------------------
-// From class CActive.
-// Called by the active scheduler when the request has been completed.
-// ---------------------------------------------------------------------------
-//
-void CBTNotifActive::RunL()
-    {
-    iObserver->RequestCompletedL( this, iRequestId, iStatus.Int() );
-    }
-
-
-// ---------------------------------------------------------------------------
-// From class CActive.
-// Called by the active scheduler when an error in RunL has occurred.
-// ---------------------------------------------------------------------------
-//
-TInt CBTNotifActive::RunError( TInt aError )
-    {
-    iObserver->HandleError( this, iRequestId, aError );
-    return KErrNone;
-    }
--- a/bluetoothengine/btnotif/src/btnotifnameutils.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,106 +0,0 @@
-/*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description:  Declares Bluetooth notifiers base class.
- *
- */
-
-#include <AknUtils.h>
-#include <StringLoader.h>
-#include <utf.h>
-
-#include <BTNotif.rsg>
-
-#include "btNotifDebug.h"
-#include "btnotifnameutils.h"
-
-/**
- * A function for strip dangerous chars out of BT name 
- * @param  a device name. After return, it contains the stripped name.
- * @return void
- */
-void BtNotifNameUtils::StripDeviceName(TBTDeviceName& aDeviceNameForStrip)
-    {	   
-    aDeviceNameForStrip.Trim();
-    // Filter out listbox non-friendly control chars.
-    //
-    AknTextUtils::StripCharacters(aDeviceNameForStrip, KAknStripListControlChars);  	             
-
-    // Filter out sub-string-separator to pretend unexpected text layout.
-    //
-    TChar subStringSeparator = TChar(0x0001);
-    TBuf<1> tempCharBuf;
-    tempCharBuf.Append(subStringSeparator);
-    AknTextUtils::StripCharacters(aDeviceNameForStrip, tempCharBuf); 
-    }
-
-/**
- * Gets the device name to be displayed in note or dialog.
- * @param aName contains the name to be displayed
- * @param aDev the device that may have a friendly or device name, or no name at all.
- */
-void BtNotifNameUtils::GetDeviceDisplayName(TBTDeviceName& aName, const CBTDevice* aDev)
-    {
-    if(aDev && aDev->IsValidFriendlyName() )
-        {
-        aName.Copy( aDev->FriendlyName() );
-        }
-    else
-        {
-        GetDeviceName(aName, aDev);
-        }
-    }
-
-/**
- * Gets the device name from aDev if its friendly name or device name is valid; otherwise 
- * the predefined default BT name.
- * @param aName contains the device name as the result 
- * @param aDev the device that may have a device name, or no name at all.
- */
-void BtNotifNameUtils::GetDeviceName(TBTDeviceName& aName, const CBTDevice* aDev)
-    {
-    aName.Zero();
-    TInt err (CnvUtfConverter::EErrorIllFormedInput);
-    if(aDev && aDev->IsValidDeviceName())
-        {
-        err = CnvUtfConverter::ConvertToUnicodeFromUtf8(aName, aDev->DeviceName());
-        }
-    // if there are illformated chars in the device name, default name should be used for display.
-    if (err == CnvUtfConverter::EErrorIllFormedInput || aName.Length() == 0)
-        {
-        StringLoader::Load(aName, R_BT_DIALOG_DEF_NAME);
-        }
-    StripDeviceName(aName);
-    }
-
-/**
- * Sets the device name.  This handles the conversion from unicode
- * to UTF8.
- * @param aDev the device that the name should be set for
- * @param aName the name to set
- */
-void BtNotifNameUtils::SetDeviceNameL(const TBTDeviceName& aName, CBTDevice& aDev)
-    {
-    FTRACE(FPrint(_L("[BTNOTIF]\t CBTNotifierBase::SetDeviceNameL - Name: '%S' length: %d"), &aName, aName.Length() ));
-
-    // Rationalise the name to remove whitespace and control characters
-    // then set the name if there's anything left
-    TBTDeviceName devName(aName);
-    StripDeviceName(devName);
-    if (aName.Length())
-        {
-        aDev.SetDeviceNameL(BTDeviceNameConverter::ToUTF8L(devName)); 
-        }	
-    }
-
-
--- a/bluetoothengine/btnotif/src/btnotifuiutil.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,412 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declares Utility to show UI notes and queries. 
-*
-*/
-
-#include <bautils.h>         // BAFL utils (for language file)
-#include "btnotifuiutil.h"
-#include "btNotifDebug.h"    // Debugging macros
-#include <StringLoader.h>    // Localisation stringloader
-#include <aknnotewrappers.h> // Information note
-#include <aknmessagequerydialog.h> // for the blocking query
-#include <AknMediatorFacade.h>  // CoverUI 
-#include <coreapplicationuisdomainpskeys.h>  // Backlight control
-#include <AknNotiferAppServerApplication.h>  // Application Key enable/disable
-
-CBTNotifUIUtil* CBTNotifUIUtil::NewL( TBool aCoverDisplayEnabled )
-    {
-    CBTNotifUIUtil* self = new (ELeave) CBTNotifUIUtil( aCoverDisplayEnabled );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-CBTNotifUIUtil::CBTNotifUIUtil( TBool aCoverDisplayEnabled ) :
-    iCoverDisplayEnabled( aCoverDisplayEnabled ), 
-    iSystemCancel( EFalse ), 
-    iAppKeyBlocked( EFalse )
-    {
-    }
-
-void CBTNotifUIUtil::ConstructL()
-    {
-    iEikEnv = CEikonEnv::Static();
-
-    TFileName filename;
-    filename += KFileDrive;
-    filename += KDC_RESOURCE_FILES_DIR; 
-    filename += KResourceFileName;
-    BaflUtils::NearestLanguageFile(iEikEnv->FsSession(),filename);
-    iResourceFileFlag=iEikEnv->AddResourceFileL(filename);
-    }
-
-CBTNotifUIUtil::~CBTNotifUIUtil()
-    {
-    iSystemCancel = ETrue;
-    delete iQueryDlg;
-    delete iWaitDlg;
-    // Activate apps key again before exit, in case any interruption happens before activation   
-    if( iAppKeyBlocked )
-        {
-        FLOG(_L("[BTNOTIF]\t CBTNotifUIUtil destructor Activate apps key before exiting. "));
-        (void) ((CAknNotifierAppServerAppUi*)iEikEnv->EikAppUi())->SuppressAppSwitching(EFalse);    
-        }
-    iEikEnv->DeleteResourceFile(iResourceFileFlag);
-    }
-// ----------------------------------------------------------
-// CBTNotifierBase::TurnLightsOn
-// ----------------------------------------------------------
-//
-void CBTNotifUIUtil::TurnLightsOn()
-    { 
-    // Change the bit on and off. SysAp will detect that
-    // the lights should be switched on for the specified time.
-    //
-    TInt err = KErrNone;
-    
-    err = RProperty::Set(KPSUidCoreApplicationUIs, KLightsControl, ELightsOn);
-    err = RProperty::Set(KPSUidCoreApplicationUIs, KLightsControl, ELightsOff);
-       
-    if ( err != KErrNone )
-        {
-        FTRACE(FPrint(_L("[BTNOTIF]\t CBTNotifUIUtil::TurnLightsOn() RProperty::Set return error %d"), err ));
-        }
-           
-    FLOG(_L("[BTNOTIF]\t CBTNotifUIUtil::TurnLightsOn() <<"));
-    }
-
-// ----------------------------------------------------------
-// CBTNotifierBase::LocalEikonEnv
-// ----------------------------------------------------------
-//
-CEikonEnv& CBTNotifUIUtil::LocalEikonEnv()
-    {
-    return *iEikEnv;
-    }
-
-// ----------------------------------------------------------
-// CBTNotifierBase::ShowQueryL
-// ----------------------------------------------------------
-//
-TInt CBTNotifUIUtil::ShowQueryL(TInt aPromptResource, TInt aExecuteResource, 
-        TSecondaryDisplayBTnotifDialogs aDialogId, CAknQueryDialog::TTone aTone )
-    {
-    TInt ret;
-    TBTDeviceName name( KNullDesC );
-    if ( aPromptResource )
-        {
-        HBufC* prompt = StringLoader::LoadLC( aPromptResource );
-        ret = ShowQueryL(*prompt, aExecuteResource, aDialogId, name, aTone );
-        CleanupStack::PopAndDestroy( prompt );
-        }
-    else
-        {
-        ret = ShowQueryL(KNullDesC, aExecuteResource, aDialogId, name, aTone );
-        }
-    return ret;
-    }
-
-TInt CBTNotifUIUtil::ShowQueryL(const TDesC& aPrompt, TInt aExecuteResource, 
-        TSecondaryDisplayBTnotifDialogs aDialogId, const TBTDeviceName& aDevNameInCoverUi, CAknQueryDialog::TTone aTone )
-    {
-    FLOG(_L("[BTNOTIF]\t CBTNotifUIUtil::ShowQueryL >>"));
-    __ASSERT_DEBUG( iQueryDlg == NULL, 
-            User::Panic(_L("CBTNotifier iQueryDlg not released!"),KErrAlreadyExists));
-
-    iQueryDlg = CAknQueryDialog::NewL(aTone);
-    if( iCoverDisplayEnabled && aDialogId != ECmdBTnotifUnavailable)
-        {
-        // initializes cover support
-        iQueryDlg->PublishDialogL(aDialogId, KUidCoverUiCategoryBTnotif );
-        CoverUIDisplayL( iQueryDlg, aDevNameInCoverUi );
-        }
- 
-    // Deactivate apps key
-    // we can do nothing if this operation fails
-    (void) ((CAknNotifierAppServerAppUi*)iEikEnv->EikAppUi())->SuppressAppSwitching(ETrue);     
-    iAppKeyBlocked = ETrue;
-    TurnLightsOn();
-    iQueryDlg->SetFocus( ETrue );
-
-    TInt keypress;
-    if ( aPrompt.Length() )
-        {
-        keypress = iQueryDlg->ExecuteLD(aExecuteResource, aPrompt );
-        }
-    else
-        {
-        keypress = iQueryDlg->ExecuteLD( aExecuteResource );
-        }
-    
-    iQueryDlg = NULL;
-    if( !iSystemCancel )
-        {    // Activate apps key when no external cancellation happens
-        (void) ((CAknNotifierAppServerAppUi*)iEikEnv->EikAppUi())->SuppressAppSwitching(EFalse);
-        iAppKeyBlocked = EFalse;
-        }
-    
-    FTRACE(FPrint(_L("[BTNOTIF]\t CBTNotifUIUtil::ShowQueryL keypress %d <<"), keypress ) );
-    return keypress;
-    }
-
-TInt CBTNotifUIUtil::ShowMessageQueryL(TDesC& aMessage, const TDesC& aHeader,
-        TInt aResourceId, CAknQueryDialog::TTone aTone )
-    {
-    FLOG(_L("[BTNOTIF]\t CBTNotifUIUtil::ShowMessageQueryL >>"));
-    __ASSERT_DEBUG( iQueryDlg == NULL, 
-            User::Panic(_L("CBTNotifier iQueryDlg not released!"),KErrAlreadyExists));
-
-    iQueryDlg = CAknMessageQueryDialog::NewL( aMessage, aTone );
-    iQueryDlg->PrepareLC( aResourceId );
-     if( aHeader.Length() )
-         {
-         static_cast<CAknMessageQueryDialog*>(iQueryDlg)->Heading()->SetTextL( aHeader );
-         }
-    
-    // Deactivate apps key
-    // we can do nothing if this operation fails
-    (void) ((CAknNotifierAppServerAppUi*)iEikEnv->EikAppUi())->SuppressAppSwitching(ETrue); 
-    iAppKeyBlocked = ETrue;
-    TurnLightsOn();
-    iQueryDlg->SetFocus( ETrue );
-    TInt keypress = iQueryDlg->RunLD();  
-    iQueryDlg = NULL;
-    
-    if( !iSystemCancel )
-        { // Activate apps key when no external cancellation happens
-        (void) ((CAknNotifierAppServerAppUi*)iEikEnv->EikAppUi())->SuppressAppSwitching(EFalse);
-        iAppKeyBlocked = EFalse;
-        }
-    
-    FTRACE(FPrint(_L("[BTNOTIF]\t CBTNotifUIUtil::ShowMessageQueryL keypress %d <<"), keypress ) );
-    return keypress;
-    }
-
-
-TInt CBTNotifUIUtil::ShowTextInputQueryL(TDes& aText, TInt aExecuteResource, 
-        TSecondaryDisplayBTnotifDialogs aDialogId, 
-        CAknQueryDialog::TTone aTone )
-    {
-    return ShowTextInputQueryL(aText, KNullDesC, aExecuteResource, aDialogId, aTone);
-    }
-
-TInt CBTNotifUIUtil::ShowTextInputQueryL(TDes& aText, const TDesC& aPrompt, TInt aExecuteResource, 
-        TSecondaryDisplayBTnotifDialogs aDialogId, 
-        CAknQueryDialog::TTone aTone )
-    {
-    FLOG(_L("[BTNOTIF]\t CBTNotifUIUtil::ShowTextInputQueryL >>"));
-    
-    __ASSERT_DEBUG( iQueryDlg == NULL, 
-            User::Panic(_L("CBTNotifier iQueryDlg not released!"),KErrAlreadyExists));
-
-    iQueryDlg = CAknTextQueryDialog::NewL( aText, aTone );
-    if( iCoverDisplayEnabled && aDialogId != ECmdBTnotifUnavailable)
-        {
-        // initializes cover support
-        iQueryDlg->PublishDialogL(aDialogId, KUidCoverUiCategoryBTnotif );
-        }
-    if ( aPrompt.Length() )
-        {
-        iQueryDlg->SetPromptL( aPrompt );
-        }
-    
-    // Deactivate apps key
-    // we can do nothing if this operation fails
-    (void) ((CAknNotifierAppServerAppUi*)iEikEnv->EikAppUi())->SuppressAppSwitching(ETrue);   
-    iAppKeyBlocked = ETrue;
-    TurnLightsOn();
-    iQueryDlg->SetFocus( ETrue );
-    TInt keypress = iQueryDlg->ExecuteLD( aExecuteResource );
-    iQueryDlg = NULL;
-    
-    if( !iSystemCancel )
-        { // Activate apps key when no external cancellation happens
-        (void) ((CAknNotifierAppServerAppUi*)iEikEnv->EikAppUi())->SuppressAppSwitching(EFalse);
-        iAppKeyBlocked = EFalse;
-        }
-    
-    FTRACE(FPrint(_L("[BTNOTIF]\t CBTNotifUIUtil::ShowTextInputQueryL txt '%S' keypress %d <<"), 
-            &aText, keypress ) );
-    return keypress;    
-    }
-
-void CBTNotifUIUtil::ShowInfoNoteL(
-        TInt aResourceId, TSecondaryDisplayBTnotifDialogs aDialogId )
-    {
-    // Load a string, create and show a note
-    HBufC* stringHolder = StringLoader::LoadLC( aResourceId );
-    ShowInfoNoteL( *stringHolder, aDialogId );
-    CleanupStack::PopAndDestroy(); //stringHolder    
-    }
-
-
-void CBTNotifUIUtil::ShowInfoNoteL(
-        const TDesC& aResource, TSecondaryDisplayBTnotifDialogs aDialogId )
-    {
-    FTRACE(FPrint(_L("[BTNOTIF]\t CBTNotifUIUtil::ShowInfoNoteL  '%S' >> "), 
-            &aResource ) ); 
-    CAknInformationNote* note = new (ELeave) CAknInformationNote(); 
-    if(iCoverDisplayEnabled && aDialogId != ECmdBTnotifUnavailable)
-        {
-        CleanupStack::PushL( note );
-        // initializes cover support
-        note->PublishDialogL(aDialogId, KUidCoverUiCategoryBTnotif ); 
-        CleanupStack::Pop(note);
-        }
-    note->ExecuteLD( aResource );
-    FLOG(_L("[BTNOTIF]\t CBTNotifUIUtil::ShowInfoNoteL done <<"));
-    }
-
-void CBTNotifUIUtil::ShowConfirmationNoteL( TBool aWaitingDlg, const TDesC& aResource, 
-        TSecondaryDisplayBTnotifDialogs aDialogId, const TBTDeviceName& aDevNameInCoverUi )
-    {
-    FLOG(_L("[BTNOTIF]\t CBTNotifUIUtil::ShowConfirmationNoteL >>"));
-    CAknConfirmationNote* note = new (ELeave) CAknConfirmationNote( aWaitingDlg );
-
-    if(iCoverDisplayEnabled && aDialogId != ECmdBTnotifUnavailable)
-        {
-        CleanupStack::PushL( note );
-        // initializes cover support
-        note->PublishDialogL(aDialogId, KUidCoverUiCategoryBTnotif ); 
-        CoverUIDisplayL( note, aDevNameInCoverUi );
-        CleanupStack::Pop(note);
-        }
-    TurnLightsOn();
-    note->ExecuteLD( aResource );
-    FLOG(_L("[BTNOTIF]\t CBTNotifUIUtil::ShowConfirmationNoteL done <<"));
-    }
-
-void CBTNotifUIUtil::ShowErrorNoteL( TBool aWaitingDlg, const TDesC& aResource, 
-        TSecondaryDisplayBTnotifDialogs aDialogId, TBTDeviceName aDevNameInCoverUi )
-    {
-    FLOG(_L("[BTNOTIF]\t CBTNotifUIUtil::ShowErrorNoteL >>"));
-    CAknErrorNote* note = new (ELeave) CAknErrorNote( aWaitingDlg );
-    if(iCoverDisplayEnabled && aDialogId != ECmdBTnotifUnavailable)
-        {
-        CleanupStack::PushL( note );
-        // initializes cover support
-        note->PublishDialogL(aDialogId, KUidCoverUiCategoryBTnotif ); 
-        CoverUIDisplayL( note, aDevNameInCoverUi );
-        CleanupStack::Pop(note);
-        }
-    TurnLightsOn();
-    note->ExecuteLD( aResource );
-    FLOG(_L("[BTNOTIF]\t CBTNotifUIUtil::ShowErrorNoteL done <<"));
-    }
-
-// ----------------------------------------------------------
-// CBTNotifUIUtil::IsQueryReleased
-// Check if iQueryDlg is NULL
-// ----------------------------------------------------------
-// 
-TBool CBTNotifUIUtil::IsQueryReleased()
-    {
-    return ( iQueryDlg ) ? EFalse : ETrue;   
-    }
-
-// ----------------------------------------------------------
-// CBTNotifUIUtil::UpdateQueryDlgL
-// Update Query with specified info, called by UpdateL()
-// ----------------------------------------------------------
-// 
-void CBTNotifUIUtil::UpdateQueryDlgL( TDesC& aMessage )
-    {
-    __ASSERT_DEBUG( iQueryDlg != NULL, 
-                User::Panic(_L("CBTNotifier iQueryDlg not exist to update!"),KErrNotFound));
-    iQueryDlg->SetPromptL( aMessage );
-    iQueryDlg->DrawDeferred();
-    }
-
-// ----------------------------------------------------------
-// CBTNotifUIUtil::UpdateMessageQueryDlgL
-// Update message query when RNotifier::UpdateL() is called
-// ----------------------------------------------------------
-// 
-void CBTNotifUIUtil::UpdateMessageQueryDlgL( TDesC& aMessage )
-    {
-    __ASSERT_DEBUG( iQueryDlg != NULL, 
-                User::Panic(_L("CBTNotifier CAknTextQueryDialog iQueryDlg not exist to update!"),KErrNotFound));
-    static_cast<CAknMessageQueryDialog*>(iQueryDlg)->SetMessageTextL( aMessage );
-    iQueryDlg->DrawDeferred();
-    FLOG(_L("[BTNOTIF]\t CBTNotifUIUtil::UpdateMessageQueryDlg "));
-    }
-
-// ----------------------------------------------------------
-// CBTNotifUIUtil::UpdateCoverUiL
-// Update secondary display 
-// ----------------------------------------------------------
-// 
-void CBTNotifUIUtil::UpdateCoverUiL( const TDesC8& aMessage )
-    {
-    FLOG(_L("[BTNOTIF]\t CBTNotifUIUtil::UpdateCoverUiL >>"));
-    __ASSERT_DEBUG( iQueryDlg != NULL, 
-                    User::Panic(_L("CBTNotifier iQueryDlg not exist to update!"),KErrNotFound));
-    if(iCoverDisplayEnabled )
-        {                                        
-        CAknMediatorFacade* coverData = AknMediatorFacade(iQueryDlg);
-        if(coverData)
-            { 
-            coverData->ResetBuffer();
-            coverData->BufStream() << aMessage; // insert your buffer here
-            coverData->BufStream().CommitL();
-            coverData->PostUpdatedDataL();
-            }
-        }
-    FLOG(_L("[BTNOTIF]\t CBTNotifUIUtil::UpdateCoverUiL done <<"));
-    }
-
-void CBTNotifUIUtil::DismissDialog()
-    {
-    if( !IsQueryReleased() )
-        {
-        delete iQueryDlg;
-        iQueryDlg = NULL;
-        }
-    }
-
-void CBTNotifUIUtil::CoverUIDisplayL( const MObjectProvider* aMop, 
-        const TBTDeviceName& aDevNameInCoverUi )
-    {
-    FLOG(_L("[BTNOTIF]\t CBTNotifUIUtil::CoverUIDisplayL() >>"));
-    
-    CAknMediatorFacade* covercl = AknMediatorFacade( aMop ); 
-    if( covercl && aDevNameInCoverUi.Length() )
-        {
-        covercl->BufStream() << aDevNameInCoverUi;
-        covercl->BufStream().CommitL(); // no more data to send so commit buf
-        }
-    
-    FLOG(_L("[BTNOTIF]\t CBTNotifUIUtil::CoverUIDisplayL() <<"));
-    }
-
-TInt CBTNotifUIUtil::ShowWaitDlgL( TInt aResourceId )
-    {
-    FLOG(_L("[BTNOTIF]\t CBTNotifUIUtil::ShowWaitDlgL() >>"));
-    iWaitDlg = new(ELeave) CAknWaitDialog((REINTERPRET_CAST(CEikDialog**,&iWaitDlg)), ETrue );
-    TInt ret = iWaitDlg->ExecuteLD(aResourceId);
-    FLOG(_L("[BTNOTIF]\t CBTNotifUIUtil::ShowWaitDlgL() <<"));
-    return ret;
-    }
-
-void CBTNotifUIUtil::CompleteWaitDlgL()
-    {
-    FLOG(_L("[BTNOTIF]\t CBTNotifUIUtil::CompleteWaitDlgL() >>"));
-    if(iWaitDlg)
-        {
-        iWaitDlg->ProcessFinishedL();
-        }
-    FLOG(_L("[BTNOTIF]\t CBTNotifUIUtil::CompleteWaitDlgL() <<"));
-    }
--- a/bluetoothengine/btnotif/src/btnpaireddevsettnotifier.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,241 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Show pairing status and set authorized, unique devicename of paired device.
-*
-*/
-
-
-// INCLUDE FILES
-
-#include <BTNotif.rsg>          // Own resources
-#include <btnotif.h>
-#include <bluetoothuiutil.h>
-#include "btnotiflock.h"
-#include "btnpaireddevsettnotifier.h"      // Own class definition
-#include "btNotifDebug.h"       // Debugging macros
-#include <bluetooth/hci/hcierrors.h>
-#include "btnotifnameutils.h"
-
-#include <secondarydisplay/BTnotifSecondaryDisplayAPI.h>
-
-#include <e32cmn.h>
-#include <AknMediatorFacade.h>  // CoverUI 
-
-#ifdef __SERIES60_HELP
-#include <hlplch.h>
-#include <csxhelp/bt.hlp.hrh> // The bt hrh info is needed, for help launching
-#endif
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ----------------------------------------------------------
-// CBTPairedDevSettNotifier::NewL
-// Two-phased constructor.
-// ----------------------------------------------------------
-//
-CBTPairedDevSettNotifier* CBTPairedDevSettNotifier::NewL()
-    {
-    CBTPairedDevSettNotifier* self=new (ELeave) CBTPairedDevSettNotifier();
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop();
-    return self;
-    }
-
-// ----------------------------------------------------------
-// CBTPairedDevSettNotifier::CBTPairedDevSettNotifier
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// ----------------------------------------------------------
-//
-CBTPairedDevSettNotifier::CBTPairedDevSettNotifier()
-    {	
-    }
-
-// ----------------------------------------------------------
-// Destructor
-// ----------------------------------------------------------
-//
-CBTPairedDevSettNotifier::~CBTPairedDevSettNotifier()
-    {
-    }
-
-// ----------------------------------------------------------
-// CBTPairedDevSettNotifier::RegisterL
-// Register notifier.
-// ----------------------------------------------------------
-//
-CBTPairedDevSettNotifier::TNotifierInfo CBTPairedDevSettNotifier::RegisterL()
-    {
-	iInfo.iUid = KBTPairedDeviceSettingNotifierUid;
-    iInfo.iChannel = KBTPairedDeviceSettingChannel;
-    iInfo.iPriority = ENotifierPriorityVHigh;
-    return iInfo;
-    }
-
-
-// ----------------------------------------------------------
-// CBTPairedDevSettNotifier::GetParamsL
-// Mandatory for BT Notifiers when using asynchronous launch. 
-// This notifier is synchronous so no implementation is needed.
-// ----------------------------------------------------------
-//
-void CBTPairedDevSettNotifier::GetParamsL(const TDesC8& aBuffer, 
-                                     TInt aReplySlot, 
-                                     const RMessagePtr2& aMessage)
-    {
-   	FLOG(_L("[BTNOTIF]\t CBTPairedDevSettNotifier::GetParamsL"));    
-
-    if( iReplySlot != NULL || !iMessage.IsNull())
-        {
-        User::Leave(KErrInUse);
-        }
-
-    iMessage = aMessage;
-    iReplySlot = aReplySlot;
-	ProcessParamBufferL(aBuffer); 
-
-	FLOG(_L("[BTNOTIF]\t CBTPairedDevSettNotifier::GetParamsL Complete"));    
-  	}
-
-// ----------------------------------------------------------
-// CBTPairedDevSettNotifier::UpdateL
-// Update notifier according to new data
-// ----------------------------------------------------------
-//	
-TPtrC8 CBTPairedDevSettNotifier::UpdateL(const TDesC8& /*aBuffer*/)
-	{
- 	FLOG(_L("[BTNOTIF]\t CBTPairedDevSettNotifier::UpdateL"));
-    TPtrC8 ret(KNullDesC8);
-    return (ret);
-	}
-
-void CBTPairedDevSettNotifier::HandleGetDeviceCompletedL(const CBTDevice* /*aDev*/)
-    {
-    FLOG(_L("[BTNOTIF]\t CBTPairedDevSettNotifier::HandleGetDeviceCompletedL >>"));    
-    TBTDeviceName name;
-    BtNotifNameUtils::GetDeviceDisplayName(name, iDevice);
-    
-    RBuf stringholder;
-    stringholder.CleanupClosePushL();
-    
-    // 1. Show pairing status note
-    FTRACE(FPrint(_L("[BTNOTIF]\t CBTPairedDevSettNotifier iPairingStatus: %d"), iPairingStatus));
-    TInt resourceId = ProcessPairingErrorCode( iPairingStatus );    
-    BluetoothUiUtil::LoadResourceAndSubstringL( stringholder, resourceId, name, 0 );
-
-    if (!iPairingStatus)
-        {
-        iNotifUiUtil->ShowConfirmationNoteL( ETrue, stringholder, iSecondaryDisplayCommand, name );
-        }
-    else
-        {
-        iNotifUiUtil->ShowErrorNoteL( EFalse, stringholder, iSecondaryDisplayCommand, name );
-        }
-    CleanupStack::PopAndDestroy( &stringholder );
-      
-    if( iPairingStatus || (iDevice && iDevice->GlobalSecurity().Banned() ) )
-        {
-        TBTNotifLockPublish::DeleteNotifLocks( 
-                EBTNotiferLockPairedDeviceSetting, iDevice->BDAddr() );
-        CompleteMessage(KErrNone);
-        return;
-        }
-    
-    // 2. Show Authorization query
-    //
-    TInt keypress = iNotifUiUtil->ShowQueryL( R_BT_AUTHORIZATION_PROMPT, R_BT_AUTHORISATION_QUERY, 
-            iSecondaryDisplayCommand, CAknQueryDialog::EConfirmationTone);
-
-    if (!iMessage.IsNull())
-        {
-        // this notifier is not cancelled, continue the task:
-        ChangeAuthorizeState(keypress);
-        }
-    }
-
-// ----------------------------------------------------------
-// CBTGenericQueryNotifier::ProcessParamBufferL
-// Parse the data out of the message that is sent by the
-// client of the notifier.
-// ----------------------------------------------------------
-void CBTPairedDevSettNotifier::ProcessParamBufferL(const TDesC8& aBuffer)
-	{
-    FLOG(_L("[BTNOTIF]\t CBTPairedDevSettNotifier::ProcessParamBufferL()"));
-    
-    TBTPairedDeviceSettingParamsPckg pckg; 
-    pckg.Copy( aBuffer );
-
-    iPairingStatus = pckg().iPairingStatus;
-    if( iPairingStatus <= KHCIErrorBase )
-        {
-        // Pairing status could be KErrNone, or the Symbian error code
-        // used for indicating HCI error codes.
-        iPairingStatus -= KHCIErrorBase;
-        }
-    if ( !iPairingStatus )
-        {
-        TBTNotifLockPublish::AddNotifLocks( 
-                EBTNotiferLockPairedDeviceSetting, pckg().iRemoteAddr );
-        }
-
-    iDevice = CBTDevice::NewL(pckg().iRemoteAddr);
-    GetDeviceFromRegL( pckg().iRemoteAddr );
-
-    FLOG(_L("[BTNOTIF]\t CBTPairedDevSettNotifier::ProcessParamBufferL() end"));
-	}
-
-// ----------------------------------------------------------
-// CBTPairedDevSettNotifier::Cancel
-// Release all own resources (member variables)
-// ----------------------------------------------------------
-//
-void CBTPairedDevSettNotifier::Cancel()
-    {
-    FLOG(_L("[BTNOTIF]\t CBTPairedDevSettNotifier::Cancel()"));
-
-    TBTNotifLockPublish::DeleteNotifLocks( 
-            EBTNotiferLockPairedDeviceSetting, iDevice->BDAddr() );    	
-    CBTNotifierBase::Cancel();
-
-    FLOG(_L("[BTNOTIF]\t CBTPairedDevSettNotifier::Cancel() completed"));
-    }
-	
-// ----------------------------------------------------------
-// CBTPairedDevSettNotifier::ProcessPairingErrorCode
-// ----------------------------------------------------------
-//
-TInt CBTPairedDevSettNotifier::ProcessPairingErrorCode( const TInt aErr )
-    {
-    if( !aErr )
-        {
-        return R_BT_SUCCESFULLY_PAIRED_PROMPT;
-        }
-    else if( aErr == -EHostBusyPairing )
-        {
-        return R_BT_SSP_BUSY;
-        }
-    else
-        {
-        return R_BT_PAIRING_FAILED_PROMPT;
-        }
-    }
-
-
-void CBTPairedDevSettNotifier::QueryRenameDeviceL(const CBTDevice& /*aDevice*/) 
-    {
-    // No implementation for now.   
-    }
-
-// End of File
--- a/bluetoothengine/btnotif/src/btnpairnotifier.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,253 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Base class for all notifiers for pairing purpose.
-*
-*/
-
-#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
-#include <btextnotifiers.h>
-#else
-#include <btextnotifiers.h>
-#include <btextnotifierspartner.h> // new file introduced by xSymbian
-#endif
-
-#include <utf.h>             // Unicode character conversion utilities
-#include <btengconnman.h>
-#include <BTNotif.rsg>       // Own resources
-#include <bluetoothuiutil.h>
-#include "btnpairnotifier.h"
-#include "btNotifDebug.h"
-#include "btnotifnameutils.h"
-
-// ----------------------------------------------------------
-// CBTNPairNotifierBase::NewL
-// ----------------------------------------------------------
-//
-CBTNPairNotifierBase* CBTNPairNotifierBase::NewL()
-    {
-    CBTNPairNotifierBase* self = new (ELeave) CBTNPairNotifierBase();
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// ----------------------------------------------------------
-// CBTNPairNotifierBase Destructor
-// ----------------------------------------------------------
-//
-CBTNPairNotifierBase::~CBTNPairNotifierBase()
-    {
-    }
-
-// ----------------------------------------------------------
-// CBTNPairNotifierBase default construct
-// ----------------------------------------------------------
-//
-CBTNPairNotifierBase::CBTNPairNotifierBase()
-    :iLocallyInitiated(EFalse)
-    {
-    }
-
-// ----------------------------------------------------------
-// CBTNPairNotifierBase::RegisterL
-// ----------------------------------------------------------
-//
-CBTNPairNotifierBase::TNotifierInfo CBTNPairNotifierBase::RegisterL()
-    {
-    return iInfo;
-    }
-
-// ----------------------------------------------------------
-// CBTNPairNotifierBase::GetParamsL
-// ----------------------------------------------------------
-//
-void CBTNPairNotifierBase::GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage)
-    {
-    (void)aBuffer;
-    if( !iMessage.IsNull() )
-        {
-        User::Leave(KErrInUse);
-        }
-
-    iMessage = (RMessage2)aMessage;
-    iReplySlot = aReplySlot;
-
-    if ( AutoLockOnL() )
-        {
-        // The phone is locked, access denied.
-        //
-        CompleteMessage(KErrCancel);
-        }
-
-    }
-
-// ----------------------------------------------------------
-// CBTNPairNotifierBase::UpdateL
-// ----------------------------------------------------------
-//
-void CBTNPairNotifierBase::UpdateL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage)
-    {
-    (void) aReplySlot;
-    UpdateL(aBuffer);
-    aMessage.Complete(KErrNone);
-    }
-
-// ----------------------------------------------------------
-// CBTNPairNotifierBase::UpdateL
-// ----------------------------------------------------------
-//
-TPtrC8 CBTNPairNotifierBase::UpdateL( const TDesC8& aBuffer )
-    {
-    FLOG(_L("[BTNOTIF]\t CBTNPairNotifierBase::UpdateL()"));
-
-    TBTDeviceNameUpdateParamsPckg pckg;
-    pckg.Copy( aBuffer );
-    if (pckg().Type() != TBTNotifierUpdateParams2::EDeviceName)
-        {
-        TPtrC8 ret(KNullDesC8);
-        return (ret);
-        }
-
-    if (pckg().Result() == KErrNone)
-        {
-        BtNotifNameUtils::SetDeviceNameL(pckg().DeviceName(), *iDevice);
-
-    // Finally show new prompt for dialog if it is still on the screen
-    // and user has not given a alias for device.   
-        if( !iNotifUiUtil->IsQueryReleased() && !iDevice->IsValidFriendlyName() )
-            {
-            RBuf prompt;
-            prompt.CleanupClosePushL();
-            GenerateQueryPromptL( prompt );
-            iNotifUiUtil->UpdateQueryDlgL( prompt );
-            CleanupStack::PopAndDestroy( &prompt );
-            }
-        }
-
-    FLOG(_L("[BTNOTIF]\t CBTNPairNotifierBase::UpdateL() completed"));
-    TPtrC8 ret(KNullDesC8);
-    return (ret);
-    }
-
-// ----------------------------------------------------------
-// CBTNPairNotifierBase::ProcessParamsGetDeviceL
-// Get device from registry based on notifier's param
-// ----------------------------------------------------------
-//
-void CBTNPairNotifierBase::ProcessParamsGetDeviceL( const TBTDevAddr& aAddr, const TBTDeviceName& aName )
-    {
-    iDevice = CBTDevice::NewL(aAddr);
-    BtNotifNameUtils::SetDeviceNameL(aName, *iDevice);
-
-    // Get all properties of device from registry. 
-    GetDeviceFromRegL( aAddr ); 
-    
-#ifdef _DEBUG
-    FTRACE(FPrint(_L("[BTNOTIF]\t Executing authentication... Parameters:")));
-    TBuf<12> deviceAddressString;
-    aAddr.GetReadable(deviceAddressString);
-    FTRACE(FPrint(_L("[BTNOTIF]\t BT Address: %S"), &deviceAddressString));
-#endif
-    }
-
-// ----------------------------------------------------------
-// CBTNPairNotifierBase::CheckBlockedDeviceL
-// Forbid pairing from remote banned devices
-// ----------------------------------------------------------
-//
-TBool CBTNPairNotifierBase::CheckBlockedDeviceL()
-    {
-    if ( !iDevice )
-        {
-        User::Leave( KErrGeneral );
-        }
-
-    // Do not allow pairing attempt from banned devices
-    if( iDevice->GlobalSecurity().Banned() && !iLocallyInitiated )
-       {
-       FLOG(_L("[BTNOTIF]\t CBTNPairNotifierBase::CheckBlockedDeviceL() Pairing attempt from banned device is denied.")); 
-       CompleteMessage(KErrCancel);       
-       return ETrue;
-       }
-    return EFalse;
-    }
-
-// ----------------------------------------------------------
-// CBTNPairNotifierBase::AuthoriseIncomingPairingL
-// Query user to authorise imcoming pair request or not.
-// If reject, query whether to block the remot device. 
-// ----------------------------------------------------------
-//
-TBool CBTNPairNotifierBase::AuthoriseIncomingPairingL()
-    {
-    FLOG(_L("[BTNOTIF]\t CBTNPairNotifierBase::AuthoriseIncomingPairingL() >>"));
-    
-    // Start pairing observer so that user will be informed about the result:
-    TInt err = CBTEngConnMan::StartPairingObserver( iBTAddr );
-    if ( err )
-        {
-        // Failed to start observer because of other ongoing pairing,
-        // reject this request:
-        CompleteMessage( err );
-        return EFalse;            
-        }
-    
-    TBTDeviceName devName;
-    BtNotifNameUtils::GetDeviceDisplayName( devName, iDevice );
-    RBuf prompt;
-    prompt.CleanupClosePushL();
-    BluetoothUiUtil::LoadResourceAndSubstringL( 
-            prompt, R_BT_ACCEPT_PAIRING_REQUEST, devName, 0 );
-
-    devName.Zero();
-    // Show query for use to accept/reject incoming pairing request
-    TInt keypress = iNotifUiUtil->ShowQueryL( prompt, R_BT_GENERIC_QUERY, 
-             ECmdBTnotifUnavailable, devName, CAknQueryDialog::EConfirmationTone );
-    CleanupStack::PopAndDestroy( &prompt );
-
-    if( iMessage.IsNull() ) // cancelled by the stack
-        {
-        return EFalse;
-        }
-    else if( !keypress ) // User rejected pairing
-        {
-        FLOG(_L("[BTNOTIF]\t CBTNPairNotifierBase: user rejected incoming pairing"));
-        // stop observer to omit pairing failure note.
-        CBTEngConnMan::StopPairingObserver( iDevice->BDAddr() );
-        iDevice->SetPaired(EFalse);
-        CheckAndHandleQueryIntervalL();
-        if( !iMessage.IsNull() )
-            {
-            // Ask user does he/she wishes to block this device (if not canceled because the 
-            // frequency is too high).
-            QueryBlockDeviceL();
-            }
-        return EFalse;
-        }
-
-    FLOG(_L("[BTNOTIF]\t CBTNPairNotifierBase::AuthoriseIncomingPairingL() << "));
-    return ETrue;
-    }
-
-// ----------------------------------------------------------
-// CBTNPairNotifierBase::GenerateQueryPromptL
-// To be implemented in derived classes.
-// ----------------------------------------------------------
-//
-void CBTNPairNotifierBase::GenerateQueryPromptL(  RBuf& aRBuf )
-    {
-    FLOG(_L("[BTNOTIF]\t CBTNPairNotifierBase::GenerateQueryPromptL WARNING "));
-    (void) aRBuf;
-    }
--- a/bluetoothengine/btnotif/src/btnssppasskeyentrynotifier.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,282 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declares authentication (PIN query) notifier class.
-*
-*/
-
-
-// INCLUDE FILES
-#include <StringLoader.h>    // Localisation stringloader
-#include <utf.h>             // Unicode character conversion utilities
-#include <avkon.mbg>
-#include <btengdevman.h>
-#include <btengconnman.h>
-#include <btotgpairpub.inl>
-#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
-#include <btextnotifiers.h>
-#else
-#include <btextnotifiers.h>
-#include <btextnotifierspartner.h>
-#endif
-#include <BTNotif.rsg>       // Own resources
-#include <secondarydisplay/BTnotifSecondaryDisplayAPI.h>
-#include <bluetoothuiutil.h>
-#include "btnotif.hrh"       // Own resource header
-#include "btnssppasskeyentrynotifier.h"  // Own class definition
-#include "btNotifDebug.h"    // Debugging macros
-#include "btnotifnameutils.h"
-
-#ifdef __SERIES60_HELP
-#include <hlplch.h>
-#include <csxhelp/bt.hlp.hrh> // The bt hrh info is needed, for help launching
-#endif
-
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ----------------------------------------------------------
-// CBTSSPPasskeyEntryNotifier::NewL
-// Two-phased constructor.
-// ----------------------------------------------------------
-//
-CBTSSPPasskeyEntryNotifier* CBTSSPPasskeyEntryNotifier::NewL()
-    {
-    CBTSSPPasskeyEntryNotifier* self=new (ELeave) CBTSSPPasskeyEntryNotifier();
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-// ----------------------------------------------------------
-// CBTSSPPasskeyEntryNotifier::CBTSSPPasskeyEntryNotifier
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// ----------------------------------------------------------
-//
-CBTSSPPasskeyEntryNotifier::CBTSSPPasskeyEntryNotifier()
-    {
-    iPasskey.Zero();
-    }
-
-// ----------------------------------------------------------
-// Destructor
-// ----------------------------------------------------------
-//
-CBTSSPPasskeyEntryNotifier::~CBTSSPPasskeyEntryNotifier()
-    {
-    }
-
-// ----------------------------------------------------------
-// CBTSSPPasskeyEntryNotifier::RegisterL
-// Register notifier.
-// ----------------------------------------------------------
-//
-CBTSSPPasskeyEntryNotifier::TNotifierInfo CBTSSPPasskeyEntryNotifier::RegisterL()
-    {
-    iInfo.iUid = KBTPasskeyDisplayNotifierUid;
-    iInfo.iChannel = KBTPasskeyDisplayNotifierUid;
-    iInfo.iPriority = ENotifierPriorityVHigh;
-    return iInfo;
-    }
-
-// ----------------------------------------------------------
-// CBTSSPPasskeyEntryNotifier::GetParamsL
-// Initialize parameters and check if device is already
-// in registry. Jump to RunL as soon as possible.
-// ----------------------------------------------------------
-//
-void CBTSSPPasskeyEntryNotifier::GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage)
-    {
-    FLOG(_L("[BTNOTIF]\t CBTSSPPasskeyEntryNotifier::GetParamsL()"));
-
-    CBTNPairNotifierBase::GetParamsL( aBuffer, aReplySlot, aMessage );
-    
-    TBTPasskeyDisplayParamsPckg pckg;
-    pckg.Copy(aBuffer);
-    iBTAddr = pckg().DeviceAddress();
-    if ( OtherOutgoPairing(iBTAddr) )
-        {
-        // We won't allow incoming pairing during outgoing pairing:
-        FLOG(_L("[BTNOTIF]\t CBTSSPPasskeyEntryNotifier: outgoing pair in progress, reject incoming pair"));
-        CompleteMessage(KErrCancel);
-        return;
-        }
-
-    iLocallyInitiated = pckg().LocallyInitiated();
-    iPasskey.AppendNumFixedWidth(pckg().NumericalValue(), EDecimal, KPassKeylength);
-    iPasskey.Insert(3,_L(" "));
-
-    ProcessParamsGetDeviceL( iBTAddr, pckg().DeviceName() );
-    
-    FLOG(_L("[BTNOTIF]\t CBTSSPPasskeyEntryNotifier::GetParamsL() completed"));
-    }
-
-// ----------------------------------------------------------
-// CBTSSPPasskeyEntryNotifier::UpdateL
-// Notifier update. Stores the received bluetooth
-// device name into registry and show it on screen.
-// ----------------------------------------------------------
-//
-TPtrC8 CBTSSPPasskeyEntryNotifier::UpdateL(const TDesC8& aBuffer)
-    {
-    FLOG(_L("[BTNOTIF]\t CBTSSPPasskeyEntryNotifier::UpdateL()"));
-    
-    TBTPasskeyDisplayUpdateParamsPckg pckg;
-    pckg.Copy(aBuffer);
-  
-    if(pckg().Type() != TBTNotifierUpdateParams2::EPasskeyDisplay)
-        {
-        TPtrC8 ret(KNullDesC8);
-        return (ret);
-        }
-    
-    switch (pckg().KeypressNotification())
-        {
-        case EPasskeyEntryStarted:
-            {
-            iBuf.Zero();
-            iBuf.Append(iPasskey);
-            iBuf.Append(_L("    "));
-            break;
-            }
-        case EPasskeyDigitEntered:
-            {
-            // show an '*'
-            iBuf.Append(_L("*"));
-            break;
-            }
-        case EPasskeyDigitDeleted:
-            {
-            // remove an '*' from the tail of iBuf
-            iBuf.Delete(iBuf.Length()-1, 1);  
-            break;
-            }
-        case EPasskeyCleared:
-            {
-            // remove all '*'
-            iBuf.Zero();
-            iBuf.Append(iPasskey);
-            iBuf.Append(_L("    "));
-            break;
-            }
-        case EPasskeyEntryCompleted:
-            {                                  
-            // complete passkey entry
-            // Set iAnswer to 1 ,
-            // Continue pairing in Run()
-            iAnswer = 1;
-            //iPasskeyDlg->DismissQueryL();
-            iNotifUiUtil->DismissDialog();
-            break;
-            }
-        }
-    if ( !iNotifUiUtil->IsQueryReleased() )
-        {
-        RBuf prompt;
-        prompt.CleanupClosePushL();
-        GenerateQueryPromptL( prompt );
-        iNotifUiUtil->UpdateQueryDlgL( prompt );
-        CleanupStack::PopAndDestroy( &prompt ); 
-        }        
-    
-    FLOG(_L("[BTNOTIF]\t CBTSSPPasskeyEntryNotifier::UpdateL() completed"));
-    TPtrC8 ret(KNullDesC8);
-    return (ret);
-    }
-
-// ----------------------------------------------------------
-// CBTSSPPasskeyEntryNotifier::HandleGetDeviceCompletedL
-// Ask user response and return it to caller.
-// Store device into registry if user rejects the incoming pairing.
-// ----------------------------------------------------------
-//
-void CBTSSPPasskeyEntryNotifier::HandleGetDeviceCompletedL(const CBTDevice* /*aDev*/)
-    {
-    FLOG(_L("[BTNOTIF]\t CBTSSPPasskeyEntryNotifier::HandleGetDeviceCompletedL()"));
-    iAnswer = 0;
-    
-    // Check if blocked device. 
-    if( CheckBlockedDeviceL() )
-        return;
-
-    // For pairing request from remote device
-    if ( !iLocallyInitiated )
-        {
-        TBool keypress = AuthoriseIncomingPairingL();
-        if( !keypress )
-            {
-            //User rejects the incoming pairing, complete message in QueryBlockDevice.
-            FLOG(_L("[BTNOTIF]\t CBTSSPPasskeyEntryNotifier::HandleGetDeviceCompletedL() <<"));
-            return;
-            }
-        }
-   
-    TBTDeviceName nameCoverUi( KNullDesC );
-    
-    iBuf.Zero();
-    iBuf.Append(iPasskey);
-    iBuf.Append(_L("    "));
-    
-    RBuf prompt;
-    prompt.CleanupClosePushL();
-    GenerateQueryPromptL( prompt );
-    
-    TInt answer = iNotifUiUtil->ShowQueryL( prompt, R_BT_PASSKEY_QUERY, 
-            ECmdBTnotifUnavailable, nameCoverUi );    
-    CleanupStack::PopAndDestroy( &prompt );  
-
-    if( iAnswer ) // user pressed entry key from remote keyboard.
-        {
-        CompleteMessage(KErrNone);
-        }
-    else 
-        {
-        // If the outgoing pairing mode is set, then this is bonding initiated by the user.
-        TBool incomingConn = ( OutgoPairingMode( iBTAddr ) == EBTOutgoingPairNone );
-        if( !iMessage.IsNull() )
-            {
-            // No need to inform the user of the pairing result if the user cancelled it.
-            // If user doesn't answer anything but stack cancels, pairing result is needed 
-            // to show for outgoing pairing. In this case, don't stop pairng observer.
-            (void) CBTEngConnMan::StopPairingObserver( iBTAddr );
-            }
-        // We may be asking for pairing (locally initiated), because a remote device is requesting
-        // accesss to a service for which we require authentication.
-        if( iLocallyInitiated && incomingConn )
-            {
-            CheckAndHandleQueryIntervalL();
-            }
-        CompleteMessage(KErrCancel);
-        }
-    
-     FLOG(_L("[BTNOTIF]\t CBTSSPPasskeyEntryNotifier::HandleGetDeviceCompletedL() completed"));
-    }
-
-// ----------------------------------------------------------
-// CBTSSPPasskeyEntryNotifier::GenerateQueryPromptL
-// ----------------------------------------------------------
-//
-void CBTSSPPasskeyEntryNotifier::GenerateQueryPromptL(  RBuf& aRBuf )
-    {
-    FLOG(_L("[BTNOTIF]\t CBTSSPPasskeyEntryNotifier::GenerateQueryPromptL()"));
-    TBTDeviceName devName; 
-    BtNotifNameUtils::GetDeviceDisplayName(devName, iDevice);   
-    BluetoothUiUtil::LoadResourceAndSubstringL( 
-            aRBuf, R_BT_SSP_PASSKEY_ENTRY, devName, 0 );
-    BluetoothUiUtil::AddSubstringL( aRBuf, iBuf, 1 );
-    FLOG(_L("[BTNOTIF]\t CBTSSPPasskeyEntryNotifier::GenerateQueryPromptL() << "));
-
-    }
-// End of File
--- a/bluetoothengine/btnotif/src/btnumcmpnotifier.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,235 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declares Numeric Comparison notifier for Secure Simle Pairing 
-*
-*/
-
-
-// INCLUDE FILES
-#include <StringLoader.h>    // Localisation stringloader
-#include <utf.h>             // Unicode character conversion utilities
-#include <avkon.mbg>
-#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
-#include <btextnotifiers.h>
-#else
-#include <btextnotifiers.h>
-#include <btextnotifierspartner.h>
-#endif
-#include <BTNotif.rsg>       // Own resources
-#include "btnotif.hrh"       // Own resource header
-#include "btnumcmpnotifier.h"  // Own class definition
-#include "btNotifDebug.h"    // Debugging macros
-#include <btotgpairpub.inl>
-#include <btengconnman.h>
-#include <secondarydisplay/BTnotifSecondaryDisplayAPI.h>
-#include <bluetoothuiutil.h>
-#include "btnotifnameutils.h"
-
-#ifdef __SERIES60_HELP
-#include <hlplch.h>
-#include <csxhelp/bt.hlp.hrh> // The bt hrh info is needed, for help launching
-#endif
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ----------------------------------------------------------
-// CBTNumCmpNotifier::NewL
-// Two-phased constructor.
-// ----------------------------------------------------------
-//
-CBTNumCmpNotifier* CBTNumCmpNotifier::NewL()
-    {
-    CBTNumCmpNotifier* self=new (ELeave) CBTNumCmpNotifier();
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-// ----------------------------------------------------------
-// CBTNumCmpNotifier::CBTNumCmpNotifier
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// ----------------------------------------------------------
-//
-CBTNumCmpNotifier::CBTNumCmpNotifier()
-    {
-    iPasskeyToShow.Zero();
-    }
-
-// ----------------------------------------------------------
-// Destructor
-// ----------------------------------------------------------
-//
-CBTNumCmpNotifier::~CBTNumCmpNotifier()
-    {
-    }
-
-// ----------------------------------------------------------
-// CBTNumCmpNotifier::RegisterL
-// Register notifier.
-// ----------------------------------------------------------
-//
-CBTNumCmpNotifier::TNotifierInfo CBTNumCmpNotifier::RegisterL()
-    {
-    iInfo.iUid = KBTNumericComparisonNotifierUid;
-    iInfo.iChannel = KBTNumericComparisonNotifierUid;
-    iInfo.iPriority=ENotifierPriorityVHigh;
-    return iInfo;
-    }
-
-// ----------------------------------------------------------
-// CBTNumCmpNotifier::GetParamsL
-// Initialize parameters and check if device is already
-// in registry. Jump to RunL as soon as possible.
-// ----------------------------------------------------------
-//
-void CBTNumCmpNotifier::GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage)
-    {
-    FLOG(_L("[BTNOTIF]\t CBTNumCmpNotifier::GetParamsL()"));
-
-    CBTNPairNotifierBase::GetParamsL( aBuffer, aReplySlot, aMessage );
-    
-    TBTNumericComparisonParamsPckg pckg;
- 	pckg.Copy(aBuffer);
- 	iBTAddr = pckg().DeviceAddress();
-    if ( OtherOutgoPairing( iBTAddr) )
-        {
-        // We won't allow incoming pairing during outgoing pairing:
-        FLOG(_L("[BTNOTIF]\t CBTNumCmpNotifier: outgoing pair in progress, reject incoming pair"));
-        CompleteMessage(KErrCancel);
-        return;
-        }
-    
-	TUint32 passkey = pckg().NumericalValue(); 
-	iLocallyInitiated = pckg().LocallyInitiated(); 
-	iPasskeyToShow.AppendNumFixedWidth(passkey, EDecimal, Klength);
-	iPasskeyToShow.Insert(3,_L(" "));
-
-	// base class
-	ProcessParamsGetDeviceL( iBTAddr, pckg().DeviceName() );
-	
-	FLOG(_L("[BTNOTIF]\t CBTNumCmpNotifier::GetParamsL() completed"));
-    }
-
-// ----------------------------------------------------------
-// CBTNumCmpNotifier::HandleGetDeviceCompletedL
-// Ask user response and return it to caller.
-// Store device into registry if user has accepted pairing.
-// ----------------------------------------------------------
-//
-void CBTNumCmpNotifier::HandleGetDeviceCompletedL(const CBTDevice* /*aDev*/)
-    {
-    FLOG(_L("[BTNOTIF]\t CBTNumCmpNotifier::HandleGetDeviceCompletedL()"));
-    
-    // Check if blocked device. 
-    if( CheckBlockedDeviceL() )
-        return;
-    
-    // Turn lights on and deactivate apps -key
-    iNotifUiUtil->TurnLightsOn();
-
-   	// For incoming pairing request
-	if(!iLocallyInitiated)
-	    {
-	    TBool keypress = AuthoriseIncomingPairingL();
-	    if( !keypress ) 
-	        {
-	        //User rejects the incoming pairing, complete message in QueryBlockDevice.
-	        FLOG(_L("[BTNOTIF]\t CBTNumCmpNotifier::HandleGetDeviceCompletedL() <<"));
-	        return;
-	        }
-	    }
-	
-	// For outgoing pairing request or accepted incoming pairing request,
-	// ask user to compare the pincodes in two devices.
-	TBTDeviceName nameCoverUi( KNullDesC );
-    RBuf prompt;
-    prompt.CleanupClosePushL();
-    GenerateQueryPromptL( prompt );
-    TInt answer = iNotifUiUtil->ShowQueryL( prompt, R_BT_GENERIC_QUERY, ECmdShowBtOpenCoverNote, nameCoverUi );   
-	CleanupStack::PopAndDestroy( &prompt ); 
-	
-    if( answer )
-        {
-        CompleteMessage(answer, KErrNone);
-        }
-    else
-        {
-        // If the outgoing pairing mode is set, then this is bonding initiated by the user.
-        TBool incomingConn = ( OutgoPairingMode( iBTAddr ) == EBTOutgoingPairNone );
-
-        if( !iMessage.IsNull() )
-            {
-            // No need to inform the user of the pairing result if the user cancelled it.
-            // If user doesn't answer anything but stack cancels, pairing result is needed 
-            // to show for outgoing pairing. In this case, don't stop pairng observer.
-            CBTEngConnMan::StopPairingObserver( iBTAddr );
-            }
-        // We may be asking for pairing (locally initiated), because a remote device is requesting
-        // accesss to a service for which we require authentication.
-        if( iLocallyInitiated && incomingConn )
-            {
-            CheckAndHandleQueryIntervalL();
-            }
-        CompleteMessage(KErrCancel);
-        }
-
-    FLOG(_L("[BTNOTIF]\t CBTNumCmpNotifier::HandleGetDeviceCompletedL() completed"));
-    }
-
-// ----------------------------------------------------------
-// CBTNumCmpNotifier::GenerateQueryPromptL
-// Generate prompt for Numeric Comparison query and return.
-// ----------------------------------------------------------
-//
-void CBTNumCmpNotifier::GenerateQueryPromptL( RBuf& aRBuf )
-    {
-    FLOG(_L("[BTNOTIF]\t CBTNumCmpNotifier::GenerateQueryPromptL()"));
-    TBTDeviceName devName;
-    BtNotifNameUtils::GetDeviceDisplayName( devName, iDevice );
-    TBuf<KBTDeviceShortNameLength> shortName;
-    
-    TPtrC namePtr;
-    // Cut the name and put ellipsis in the middle if necessary
-    // By example "SampleSymbianDevice" after this operation will be shown in
-    // the dialog as "Sam...ice"(for 7 chars device name limit)
-    // This need to be done, because if name of the device is too long, the PIN
-    // codes aren't visible and user can't compare it with PIN code taken from
-    // other phone
-    if ( devName.Length() > KBTDeviceShortNameLength ) 
-        {
-        shortName.Copy( devName.Left( KBTDeviceShortNameLength/2 ) );
-        //adding ellipsis ("...") char in the middle of the string
-        shortName.Append( TChar( KEllipsis) );
-        //adding only end of the name to the final string
-        shortName.Append( devName.Right( shortName.MaxLength() - 
-                          shortName.Length() ) );
-        namePtr.Set( shortName );
-        }
-    else
-        {
-        namePtr.Set( devName );
-        }
-
-    BluetoothUiUtil::LoadResourceAndSubstringL( 
-            aRBuf, R_BT_SSP_PASSKEY_COMPARISON_PROMPT, namePtr, 0 );
-    // Numeric comparison key shall not be localized either, use our own
-    // string loading:
-    BluetoothUiUtil::AddSubstringL( aRBuf, iPasskeyToShow, 1);
-    FLOG(_L("[BTNOTIF]\t CBTNumCmpNotifier::GenerateQueryPromptL() <<"));
-
-    }
-
-// End of File
--- a/bluetoothengine/btnotif/src/btuserconfnotifier.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,153 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declares User confirmation notifier for Secure Simle Pairing 
-*
-*/
-
-
-// INCLUDE FILES
-#include <StringLoader.h>    // Localisation stringloader
-#include <utf.h>             // Unicode character conversion utilities
-#include <avkon.mbg>
-#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
-#include <btextnotifiers.h>
-#else
-#include <btextnotifiers.h>
-#include <btextnotifierspartner.h>
-#endif
-#include <BTNotif.rsg>       // Own resources
-#include "btnotif.hrh"       // Own resource header
-#include "btuserconfnotifier.h"  // Own class definition
-#include "btNotifDebug.h"    // Debugging macros
-#include <btotgpairpub.inl>
-#include <btengconnman.h>
-#include <secondarydisplay/BTnotifSecondaryDisplayAPI.h>
-#include <bluetoothuiutil.h>
-#include "btnotifnameutils.h"
-
-#ifdef __SERIES60_HELP
-#include <hlplch.h>
-#include <csxhelp/bt.hlp.hrh> // The bt hrh info is needed, for help launching
-#endif
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ----------------------------------------------------------
-// CBTUserConfNotifier::NewL
-// Two-phased constructor.
-// ----------------------------------------------------------
-//
-CBTUserConfNotifier* CBTUserConfNotifier::NewL()
-    {
-    CBTUserConfNotifier* self=new (ELeave) CBTUserConfNotifier();
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-// ----------------------------------------------------------
-// CBTUserConfNotifier::CBTUserConfNotifier
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// ----------------------------------------------------------
-//
-CBTUserConfNotifier::CBTUserConfNotifier()
-    {
-    
-    }
-
-// ----------------------------------------------------------
-// Destructor
-// ----------------------------------------------------------
-//
-CBTUserConfNotifier::~CBTUserConfNotifier()
-    {
-    }
-
-// ----------------------------------------------------------
-// CBTUserConfNotifier::RegisterL
-// Register notifier.
-// ----------------------------------------------------------
-//
-CBTUserConfNotifier::TNotifierInfo CBTUserConfNotifier::RegisterL()
-    {
-    iInfo.iUid = KBTUserConfirmationNotifierUidCopy;
-    iInfo.iChannel = KBTUserConfirmationNotifierUidCopy;
-    iInfo.iPriority=ENotifierPriorityVHigh;
-    return iInfo;
-    }
-
-// ----------------------------------------------------------
-// CBTUserConfNotifier::GetParamsL
-// Initialize parameters and check if device is already
-// in registry. Jump to RunL as soon as possible.
-// ----------------------------------------------------------
-//
-void CBTUserConfNotifier::GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage)
-    {
-    FLOG(_L("[BTNOTIF]\t CBTUserConfNotifier::GetParamsL()"));
-
-    CBTNPairNotifierBase::GetParamsL( aBuffer, aReplySlot, aMessage );
-    
-    TBTUserConfirmationParamsPckgCopy pckg;
- 	pckg.Copy(aBuffer);
- 	iBTAddr = pckg().DeviceAddress();
-    if ( OtherOutgoPairing( iBTAddr) )
-        {
-        // We won't allow incoming pairing during outgoing pairing:
-        FLOG(_L("[BTNOTIF]\t CBTUserConfNotifier: outgoing pair in progress, reject incoming pair"));
-        CompleteMessage(KErrCancel);
-        return;
-        }
-    
-	iLocallyInitiated = pckg().LocallyInitiated(); 
-
-	// base class
-	ProcessParamsGetDeviceL( iBTAddr, pckg().DeviceName() );
-	
-	FLOG(_L("[BTNOTIF]\t CBTUserConfNotifier::GetParamsL() completed"));
-    }
-
-// ----------------------------------------------------------
-// CBTUserConfNotifier::HandleGetDeviceCompletedL
-// Ask user response and return it to caller.
-// Store device into registry if user has accepted pairing.
-// ----------------------------------------------------------
-//
-void CBTUserConfNotifier::HandleGetDeviceCompletedL(const CBTDevice* /*aDev*/)
-    {
-    FLOG(_L("[BTNOTIF]\t CBTUserConfNotifier::HandleGetDeviceCompletedL()"));
-    
-    // Check if blocked device. 
-    if( CheckBlockedDeviceL() )
-        return;
-    
-    // Turn lights on and deactivate apps -key
-    iNotifUiUtil->TurnLightsOn();
-
-   	// For incoming pairing request
-    TBool answer = AuthoriseIncomingPairingL();
-    if( !answer ) 
-        {
-        //User rejects the incoming pairing, complete message in QueryBlockDevice.
-        FLOG(_L("[BTNOTIF]\t CBTUserConfNotifier::HandleGetDeviceCompletedL() <<"));
-        return;
-        }
-    CompleteMessage(answer, KErrNone);
-
-    FLOG(_L("[BTNOTIF]\t CBTUserConfNotifier::HandleGetDeviceCompletedL() completed"));
-    }
-
-// End of File
--- a/bluetoothengine/btnotif/tsrc/BtNotifApiTest/Bmarm/BtNotifApiTestU.DEF	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
-	LibEntryL__FR13CTestModuleIf @ 1 NONAME R3UNUSED ; LibEntryL(CTestModuleIf &)
-
--- a/bluetoothengine/btnotif/tsrc/BtNotifApiTest/Bwins/BtNotifApiTestU.DEF	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
-	?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * __cdecl LibEntryL(class CTestModuleIf &)
-
--- a/bluetoothengine/btnotif/tsrc/BtNotifApiTest/EABI/BtNotifApiTestU.def	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
-	_Z9LibEntryLR13CTestModuleIf @ 1 NONAME
-
--- a/bluetoothengine/btnotif/tsrc/BtNotifApiTest/conf/ui_BtNotifApiTest.cfg	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,834 +0,0 @@
-// BT notif tests - 74 tc 
-
-
-// Paired device setting notifier tests
-
-
-
-// PBAP authorization query notifier tests (2)
-
-[Test]
-title BT Correct Passkey Entered (PBAP Auth Query Notifier Test)
-create BtNotifApiTest tester
-tester PbapAuthNotifierTest
-pause 1000
-presskey global 0
-presskey global 0
-presskey global 0
-presskey global 0
-presskey global EKeyDevice0
-tester FinishPbapAuthQuery PASSKEY
-delete tester
-[Endtest]
-
-[Test]
-title BT PBAP Auth Query Cancelled (PBAP Auth Query Notifier Test)
-create BtNotifApiTest tester
-tester PbapAuthNotifierTest
-pause 1000
-presskey global EKeyDevice1
-tester FinishPbapAuthQuery CANCEL
-delete tester
-[Endtest]
-
-// Passkey display notifier tests (4)
-
-[Test]
-title BT Remote Connection/Pairing Discarded/Device Blocked (Passkey Display Notifier Test)
-create BtNotifApiTest tester
-tester PasskeyDisplayNotifierTest REMOTE
-pause 1000
-presskey global EKeyDevice1
-pause 1000
-presskey global EKeyDevice0
-tester FinishPasskeyDisplayQuery BLOCK
-delete tester
-[Endtest]
-
-[Test]
-title BT Remote Connection/Pairing Discarded/Device Not Blocked (Passkey Display Notifier Test)
-create BtNotifApiTest tester
-tester PasskeyDisplayNotifierTest REMOTE
-pause 1000
-presskey global EKeyDevice1
-pause 1000
-presskey global EKeyDevice1
-tester FinishPasskeyDisplayQuery NONBLOCK
-delete tester
-[Endtest]
-
-[Test]
-title BT Remote Connection/Pairing Allowed (Passkey Display Notifier Test)
-create BtNotifApiTest tester
-tester PasskeyDisplayNotifierTest REMOTE
-pause 1000
-presskey global EKeyDevice0
-pause 1000
-presskey global EKeyDevice1
-tester FinishPasskeyDisplayQuery
-delete tester
-[Endtest]
-
-[Test]
-title BT Local Connection/Pairing Allowed (Passkey Display Notifier Test)
-create BtNotifApiTest tester
-tester PasskeyDisplayNotifierTest LOCAL
-pause 1000
-presskey global EKeyDevice1
-tester FinishPasskeyDisplayQuery
-delete tester
-[Endtest]
-
-// Numeric comparison query notifier tests (6)
-
-[Test]
-title BT Remote Connection/Pairing Discarded/Device Blocked (Numeric Comparison Query Notifier Test)
-create BtNotifApiTest tester
-tester NumericComparisonQueryNotifierTest REMOTE
-pause 1000
-presskey global EKeyDevice1
-pause 1000
-presskey global EKeyDevice0
-tester FinishNumericComparisonQuery CANCEL BLOCK
-delete tester
-[Endtest]
-
-[Test]
-title BT Remote Connection/Pairing Discarded/Device Not Blocked (Numeric Comparison Query Notifier Test)
-create BtNotifApiTest tester
-tester NumericComparisonQueryNotifierTest REMOTE
-pause 1000
-presskey global EKeyDevice1
-pause 1000
-presskey global EKeyDevice1
-tester FinishNumericComparisonQuery CANCEL NONBLOCK
-delete tester
-[Endtest]
-
-[Test]
-title BT Remote Connection/Pairing Allowed/Code Mismatch (Numeric Comparison Query Notifier Test)
-create BtNotifApiTest tester
-tester NumericComparisonQueryNotifierTest REMOTE
-pause 1000
-presskey global EKeyDevice0
-pause 1000
-presskey global EKeyDevice1
-tester FinishNumericComparisonQuery DISCARD
-delete tester
-[Endtest]
-
-[Test]
-title BT Remote Connection/Pairing Allowed/Code Match (Numeric Comparison Query Notifier Test)
-create BtNotifApiTest tester
-tester NumericComparisonQueryNotifierTest REMOTE
-pause 1000
-presskey global EKeyDevice0
-pause 1000
-presskey global EKeyDevice0
-tester FinishNumericComparisonQuery ACCEPT
-delete tester
-[Endtest]
-
-[Test]
-title BT Local Connection/Code Mismatch (Numeric Comparison Query Notifier Test)
-create BtNotifApiTest tester
-tester NumericComparisonQueryNotifierTest LOCAL
-pause 1000
-presskey global EKeyDevice1
-tester FinishNumericComparisonQuery DISCARD
-delete tester
-[Endtest]
-
-[Test]
-title BT Local Connection/Code Match (Numeric Comparison Query Notifier Test)
-create BtNotifApiTest tester
-tester NumericComparisonQueryNotifierTest LOCAL
-pause 1000
-presskey global EKeyDevice0
-tester FinishNumericComparisonQuery ACCEPT
-delete tester
-[Endtest]
-
-// Authorization query notifier tests (3)
-
-[Test]
-title BT Authorization Query Discarded - Accept Blocking (Authorization Query Notifier Test)
-create BtNotifApiTest tester
-tester AuthQueryNotifierTest
-pause 1000
-presskey global EKeyDevice1
-pause 1000
-presskey global EKeyDevice0
-tester FinishAuthQuery DISCARD BLOCK
-delete tester
-[Endtest]
-
-[Test]
-title BT Authorization Query Discarded - Discard Blocking (Authorization Query Notifier Test)
-create BtNotifApiTest tester
-tester AuthQueryNotifierTest
-pause 1000
-presskey global EKeyDevice1
-pause 1000
-presskey global EKeyDevice1
-tester FinishAuthQuery DISCARD NONBLOCK
-delete tester
-[Endtest]
-
-[Test]
-title BT Authorization Query Accepted (Authorization Query Notifier Test)
-create BtNotifApiTest tester
-tester AuthQueryNotifierTest
-pause 1000
-presskey global EKeyDevice0
-tester FinishAuthQuery ACCEPT
-delete tester
-[Endtest]
-
-// PIN query notifier tests (10)
-
-[Test]
-title BT Remote Connection/Pairing Discarded/Device Blocked (Pin Query Notifier Test)
-create BtNotifApiTest tester
-tester PinPasskeyQueryNotifierTest REMOTE
-pause 1000
-presskey global EKeyDevice1
-pause 1000
-presskey global EKeyDevice0
-tester FinishPinPasskeyQuery CANCEL DISCARDCONN BLOCK
-delete tester
-[Endtest]
-
-[Test]
-title BT Remote Connection/Pairing Discarded/Device Not Blocked (Pin Query Notifier Test)
-create BtNotifApiTest tester
-tester PinPasskeyQueryNotifierTest REMOTE
-pause 1000
-presskey global EKeyDevice1
-pause 1000
-presskey global EKeyDevice1
-tester FinishPinPasskeyQuery CANCEL DISCARDCONN NONBLOCK
-delete tester
-[Endtest]
-
-[Test]
-title BT Remote Connection/Pairing Allowed/Correct Pin Entered (Pin Query Notifier Test)
-create BtNotifApiTest tester
-tester PinPasskeyQueryNotifierTest REMOTE
-pause 1000
-presskey global EKeyDevice0
-pause 1000
-presskey global 0
-presskey global 0
-presskey global 0
-presskey global 0
-presskey global EKeyDevice0
-tester FinishPinPasskeyQuery PASSKEY
-delete tester
-[Endtest]
-
-[Test]
-title BT Remote Connection/Pairing Allowed/Too Short Pin Entered (Pin Query Notifier Test)
-create BtNotifApiTest tester
-tester PinPasskeyQueryNotifierTest REMOTE
-pause 1000
-presskey global EKeyDevice0
-pause 1000
-presskey global 0
-presskey global 0
-presskey global 0
-presskey global EKeyDevice0
-pause 1000
-presskey global 0
-presskey global 0
-presskey global 0
-presskey global 0
-presskey global EKeyDevice0
-tester FinishPinPasskeyQuery PASSKEY
-delete tester
-[Endtest]
-
-[Test]
-title BT Remote Connection/Pairing Allowed/Pin Query Cancelled (Pin Query Notifier Test)
-create BtNotifApiTest tester
-tester PinPasskeyQueryNotifierTest REMOTE
-pause 1000
-presskey global EKeyDevice0
-pause 1000
-presskey global EKeyDevice1
-tester FinishPinPasskeyQuery CANCEL ACCEPTCONN
-delete tester
-[Endtest]
-
-[Test]
-title BT Remote Connection/Pairing Allowed/Too Short Pin Entered/Pin Query Cancelled (Pin Query Notifier Test)
-create BtNotifApiTest tester
-tester PinPasskeyQueryNotifierTest REMOTE
-pause 1000
-presskey global EKeyDevice0
-pause 1000
-presskey global 0
-presskey global 0
-presskey global 0
-presskey global EKeyDevice0
-pause 1000
-presskey global EKeyDevice1
-tester FinishPinPasskeyQuery CANCEL ACCEPTCONN
-delete tester
-[Endtest]
-
-[Test]
-title BT Local Connection/Correct Pin Entered (Pin Query Notifier Test)
-create BtNotifApiTest tester
-tester PinPasskeyQueryNotifierTest LOCAL
-pause 1000
-presskey global EKeyDevice0
-pause 1000
-presskey global 0
-presskey global 0
-presskey global 0
-presskey global 0
-presskey global EKeyDevice0
-tester FinishPinPasskeyQuery PASSKEY
-delete tester
-[Endtest]
-
-[Test]
-title BT Local Connection/Too Short Pin Entered (Pin Query Notifier Test)
-create BtNotifApiTest tester
-tester PinPasskeyQueryNotifierTest LOCAL
-pause 1000
-presskey global EKeyDevice0
-pause 1000
-presskey global 0
-presskey global 0
-presskey global 0
-presskey global EKeyDevice0
-pause 1000
-presskey global 0
-presskey global 0
-presskey global 0
-presskey global 0
-presskey global EKeyDevice0
-tester FinishPinPasskeyQuery PASSKEY
-delete tester
-[Endtest]
-
-[Test]
-title BT Local Connection/Pin Query Cancelled (Pin Query Notifier Test)
-create BtNotifApiTest tester
-tester PinPasskeyQueryNotifierTest LOCAL
-pause 1000
-presskey global EKeyDevice0
-pause 1000
-presskey global EKeyDevice1
-tester FinishPinPasskeyQuery CANCEL
-delete tester
-[Endtest]
-
-[Test]
-title BT Local Connection/Too Short Pin Entered/Pin Query Cancelled (Pin Query Notifier Test)
-create BtNotifApiTest tester
-tester PinPasskeyQueryNotifierTest LOCAL
-pause 1000
-presskey global EKeyDevice0
-pause 1000
-presskey global 0
-presskey global 0
-presskey global 0
-presskey global EKeyDevice0
-pause 1000
-presskey global EKeyDevice1
-tester FinishPinPasskeyQuery CANCEL
-delete tester
-[Endtest]
-
-// Inquiry notifier tests (8)
-
-[Test]
-title BT Not Switched On (Inquiry Notifier Test)
-create BtNotifApiTest tester
-tester InquiryNotifierTest BTOFF
-presskey global EKeyDevice1
-tester FinishInquiry CANCEL
-delete tester
-[Endtest]
-
-[Test]
-title BT Launch Inquiry/Test Device Paired/Cancel Search (Inquiry Notifier Test)
-create BtNotifApiTest tester
-tester InquiryNotifierTest PAIRED
-presskey global EKeyEnter
-pause 1000
-presskey global EKeyUpArrow
-pause 1000
-presskey global EKeyEnter
-presskey global EKeyDevice1
-tester FinishInquiry CANCEL
-delete tester
-[Endtest]
-
-[Test]
-title BT Launch Inquiry/Test Device Paired/Switch BT Off (Inquiry Notifier Test)
-create BtNotifApiTest tester
-tester InquiryNotifierTest PAIRED
-presskey global EKeyEnter
-pause 1000
-presskey global EKeyUpArrow
-pause 1000
-presskey global EKeyEnter
-tester FinishInquiry CANCEL BTOFF
-delete tester
-[Endtest]
-
-[Test]
-title BT Select Paired Test Device (Inquiry Notifier Test)
-create BtNotifApiTest tester
-tester InquiryNotifierTest PAIRED
-presskey global EKeyDownArrow
-pause 1000
-presskey global EKeyEnter
-tester FinishInquiry ACCEPT
-delete tester
-[Endtest]
-
-[Test]
-title BT Launch Inquiry/Test Device Paired/Inquiry Timeout (Inquiry Notifier Test)
-create BtNotifApiTest tester
-tester InquiryNotifierTest PAIRED
-presskey global EKeyEnter
-pause 1000
-presskey global EKeyEnter
-pause 60000
-tester TurnLightsOn
-pause 10000
-presskey global EKeyDevice1
-tester FinishInquiry CANCEL
-tester TurnLightsOn
-delete tester
-[Endtest]
-
-[Test]
-title BT Launch Inquiry/Cancel Search (Inquiry Notifier Test)
-create BtNotifApiTest tester
-tester InquiryNotifierTest NONPAIRED
-presskey global EKeyUpArrow
-pause 1000
-presskey global EKeyEnter
-presskey global EKeyDevice1
-tester FinishInquiry CANCEL
-delete tester
-[Endtest]
-
-[Test]
-title BT Launch Inquiry/Switch BT Off (Inquiry Notifier Test)
-create BtNotifApiTest tester
-tester InquiryNotifierTest NONPAIRED
-presskey global EKeyUpArrow
-pause 1000
-presskey global EKeyEnter
-tester FinishInquiry CANCEL BTOFF
-delete tester
-[Endtest]
-
-[Test]
-title BT Launch Inquiry/Inquiry Timeout (Inquiry Notifier Test)
-create BtNotifApiTest tester
-tester InquiryNotifierTest NONPAIRED
-presskey global EKeyEnter
-pause 60000
-tester TurnLightsOn
-pause 10000
-presskey global EKeyDevice1
-tester FinishInquiry CANCEL
-tester TurnLightsOn
-delete tester
-[Endtest]
-
-// OBEX PIN query notifier tests (2)
-
-[Test]
-title BT Correct Passkey (OBEX PIN Query Notifier Test)
-create BtNotifApiTest tester
-tester ObexPasskeyQueryNotifierTest
-pause 1000
-presskey global 0
-presskey global 0
-presskey global 0
-presskey global 0
-presskey global EKeyDevice0 
-tester FinishObexPasskeyQuery PASSKEY
-delete tester
-[Endtest]
-
-[Test]
-title BT Query Canceled (OBEX PIN Query Notifier Test)
-create BtNotifApiTest tester
-tester ObexPasskeyQueryNotifierTest
-pause 1000
-presskey global EKeyDevice1
-tester FinishObexPasskeyQuery CANCEL
-delete tester
-[Endtest]
-
-// Power mode notifier tests (2)
-
-[Test]
-title BT Power Mode Query Discarded (Power Mode Notifier Test)
-create BtNotifApiTest tester
-tester PowerModeQueryNotifierTest
-pause 1000
-presskey global EKeyDevice1
-tester FinishPowerModeQuery DISCARD
-delete tester
-[Endtest]
-
-[Test]
-title BT Power Mode Query Accepted (Power Mode Notifier Test)
-create BtNotifApiTest tester
-tester PowerModeQueryNotifierTest
-pause 1000
-presskey global EKeyDevice0
-tester FinishPowerModeQuery ACCEPT
-delete tester
-[Endtest]
-
-// Generic info notifier tests (17)
-
-[Test]
-title BT Connected (Generic Info Notifier Test)
-create BtNotifApiTest tester
-tester GenericInfoNotifierTest EBTConnected
-delete tester
-pause 6000
-[Endtest]
-
-[Test]
-title BT Disconnected (Generic Info Notifier Test)
-create BtNotifApiTest tester
-tester GenericInfoNotifierTest EBTDisconnected
-delete tester
-pause 6000
-[Endtest]
-
-[Test]
-title BT Audio Accessory (Generic Info Notifier Test)
-create BtNotifApiTest tester
-tester GenericInfoNotifierTest EBTAudioAccessory
-delete tester
-pause 6000
-[Endtest]
-
-[Test]
-title BT Audio Handset (Generic Info Notifier Test)
-create BtNotifApiTest tester
-tester GenericInfoNotifierTest EBTAudioHandset
-delete tester
-pause 6000
-[Endtest]
-
-[Test]
-title BT Closed (Generic Info Notifier Test)
-create BtNotifApiTest tester
-tester GenericInfoNotifierTest EBTClosed
-delete tester
-pause 6000
-[Endtest]
-
-[Test]
-title BT Device Not Available (Generic Info Notifier Test)
-create BtNotifApiTest tester
-tester GenericInfoNotifierTest EBTDeviceNotAvailable
-delete tester
-pause 6000
-[Endtest]
-
-[Test]
-title BT Offline Disabled (Generic Info Notifier Test)
-create BtNotifApiTest tester
-tester GenericInfoNotifierTest EBTOfflineDisabled
-delete tester
-pause 6000
-[Endtest]
-
-[Test]
-title BT Visibility Timeout (Generic Info Notifier Test)
-create BtNotifApiTest tester
-tester GenericInfoNotifierTest EBTVisibilityTimeout
-delete tester
-pause 6000
-[Endtest]
-
-[Test]
-title BT Enter SAP (Generic Info Notifier Test)
-create BtNotifApiTest tester
-tester GenericInfoNotifierTest EBTEnterSap
-delete tester
-pause 6000
-[Endtest]
-
-[Test]
-title BT SAP Ok (Generic Info Notifier Test)
-create BtNotifApiTest tester
-tester GenericInfoNotifierTest EBTSapOk
-delete tester
-pause 6000
-[Endtest]
-
-[Test]
-title BT SAP Failed (Generic Info Notifier Test)
-create BtNotifApiTest tester
-tester GenericInfoNotifierTest EBTSapFailed
-delete tester
-pause 6000
-[Endtest]
-
-[Test]
-title BT SAP No SIM (Generic Info Notifier Test)
-create BtNotifApiTest tester
-tester GenericInfoNotifierTest EBTSapNoSim
-delete tester
-pause 6000
-[Endtest]
-
-[Test]
-title BT Device Busy (Generic Info Notifier Test)
-create BtNotifApiTest tester
-tester GenericInfoNotifierTest EBTDeviceBusy
-delete tester
-pause 6000
-[Endtest]
-
-[Test]
-title IR Not Supported (Generic Info Notifier Test)
-create BtNotifApiTest tester
-tester GenericInfoNotifierTest EIRNotSupported
-delete tester
-pause 6000
-[Endtest]
-
-[Test]
-title BT Cmd Show BT Battery Low (Generic Info Notifier Test)
-create BtNotifApiTest tester
-tester GenericInfoNotifierTest ECmdShowBtBatteryLow
-delete tester
-pause 6000
-[Endtest]
-
-[Test]
-title BT Cmd Show BT Battery Critical (Generic Info Notifier Test)
-create BtNotifApiTest tester
-tester GenericInfoNotifierTest ECmdShowBtBatteryCritical
-delete tester
-pause 6000
-[Endtest]
-
-[Test]
-title BT Stay Power On (Generic Info Notifier Test)
-create BtNotifApiTest tester
-tester GenericInfoNotifierTest EBTStayPowerOn
-delete tester
-pause 6000
-[Endtest]
-
-// Generic query notifier tests (20)
-
-[Test]
-title BT Receive Message Discarded (Generic Query Notifier Test)
-create BtNotifApiTest tester
-tester GenericQueryNotifierTest EBTReceiveMessageQuery
-pause 1000
-presskey global EKeyDevice1
-tester FinishGenericQuery DISCARD
-delete tester
-[Endtest] 
-
-[Test]
-title BT Receive Message Accepted (Generic Query Notifier Test)
-create BtNotifApiTest tester
-tester GenericQueryNotifierTest EBTReceiveMessageQuery
-pause 1000
-presskey global EKeyDevice0
-tester FinishGenericQuery ACCEPT
-delete tester
-[Endtest] 
-
-[Test]
-title BT Receive Message Paired Discarded (Generic Query Notifier Test)
-create BtNotifApiTest tester
-tester GenericQueryNotifierTest EBTReceiveMessagePairedQuery
-pause 1000
-presskey global EKeyDevice1
-tester FinishGenericQuery DISCARD
-delete tester
-[Endtest] 
-
-[Test]
-title BT Receive Message Paired Accepted (Generic Query Notifier Test)
-create BtNotifApiTest tester
-tester GenericQueryNotifierTest EBTReceiveMessagePairedQuery
-pause 1000
-presskey global EKeyDevice0
-tester FinishGenericQuery ACCEPT
-delete tester
-[Endtest] 
-
-[Test]
-title BT Is Off Discarded (Generic Query Notifier Test)
-create BtNotifApiTest tester
-tester GenericQueryNotifierTest EBTIsOffQuery
-pause 1000
-presskey global EKeyDevice1
-tester FinishGenericQuery DISCARD
-delete tester
-[Endtest] 
-
-[Test]
-title BT Is Off Accepted (Generic Query Notifier Test)
-create BtNotifApiTest tester
-tester GenericQueryNotifierTest EBTIsOffQuery
-pause 1000
-presskey global EKeyDevice0
-tester FinishGenericQuery ACCEPT
-delete tester
-[Endtest] 
-
-[Test]
-title BT Activate Offline Discarded (Generic Query Notifier Test)
-create BtNotifApiTest tester
-tester GenericQueryNotifierTest EBTActivateOffLineQuery
-pause 1000
-presskey global EKeyDevice1
-tester FinishGenericQuery DISCARD
-delete tester
-[Endtest] 
-
-[Test]
-title BT Activate Offline Accepted (Generic Query Notifier Test)
-create BtNotifApiTest tester
-tester GenericQueryNotifierTest EBTActivateOffLineQuery
-pause 1000
-presskey global EKeyDevice0
-tester FinishGenericQuery ACCEPT
-delete tester
-[Endtest] 
-
-[Test]
-title BT No Devices Found Discarded (Generic Query Notifier Test)
-create BtNotifApiTest tester
-tester GenericQueryNotifierTest EBTNoDevicesFoundQuery
-pause 1000
-presskey global EKeyDevice1
-tester FinishGenericQuery DISCARD
-delete tester
-[Endtest] 
-
-[Test]
-title BT No Devices Found Accepted (Generic Query Notifier Test)
-create BtNotifApiTest tester
-tester GenericQueryNotifierTest EBTNoDevicesFoundQuery
-pause 1000
-presskey global EKeyDevice0
-tester FinishGenericQuery ACCEPT
-delete tester
-[Endtest] 
-
-[Test]
-title BT Accept Request Discarded (Generic Query Notifier Test)
-create BtNotifApiTest tester
-tester GenericQueryNotifierTest EBTAcceptRequestQuery
-pause 1000
-presskey global EKeyDevice1
-tester FinishGenericQuery DISCARD
-delete tester
-[Endtest] 
-
-[Test]
-title BT Accept Request Accepted (Generic Query Notifier Test)
-create BtNotifApiTest tester
-tester GenericQueryNotifierTest EBTAcceptRequestQuery
-pause 1000
-presskey global EKeyDevice0
-tester FinishGenericQuery ACCEPT
-delete tester
-[Endtest] 
-
-[Test]
-title BT Block Connection Discarded (Generic Query Notifier Test)
-create BtNotifApiTest tester
-tester GenericQueryNotifierTest EBTBlockConnectionQuery
-pause 1000
-presskey global EKeyDevice1
-tester FinishGenericQuery DISCARD
-delete tester
-[Endtest] 
-
-[Test]
-title BT Block Connection Accepted (Generic Query Notifier Test)
-create BtNotifApiTest tester
-tester GenericQueryNotifierTest EBTBlockConnectionQuery
-pause 1000
-presskey global EKeyDevice0
-tester FinishGenericQuery ACCEPT
-delete tester
-[Endtest] 
-
-[Test]
-title BT Block Paired Connection Discarded (Generic Query Notifier Test)
-create BtNotifApiTest tester
-tester GenericQueryNotifierTest EBTBlockPairedConnectionQuery
-pause 1000
-presskey global EKeyDevice1
-tester FinishGenericQuery DISCARD
-delete tester
-[Endtest] 
-
-[Test]
-title BT Block Paired Connection Accepted (Generic Query Notifier Test)
-create BtNotifApiTest tester
-tester GenericQueryNotifierTest EBTBlockPairedConnectionQuery
-pause 1000
-presskey global EKeyDevice0
-tester FinishGenericQuery ACCEPT
-delete tester
-[Endtest] 
-
-[Test]
-title BT Is Not Shown Discarded (Generic Query Notifier Test)
-create BtNotifApiTest tester
-tester GenericQueryNotifierTest EBTIsNotShownQuery
-pause 1000
-presskey global EKeyDevice1
-tester FinishGenericQuery DISCARD
-delete tester
-[Endtest] 
-
-[Test]
-title BT Is Not Shown Accepted (Generic Query Notifier Test)
-create BtNotifApiTest tester
-tester GenericQueryNotifierTest EBTIsNotShownQuery
-pause 1000
-presskey global EKeyDevice0
-tester FinishGenericQuery ACCEPT
-delete tester
-[Endtest] 
-
-[Test]
-title BT Is Off Java Discarded (Generic Query Notifier Test)
-create BtNotifApiTest tester
-tester GenericQueryNotifierTest EBTIsOffJavaQuery
-pause 1000
-presskey global EKeyDevice1
-tester FinishGenericQuery DISCARD
-delete tester
-[Endtest] 
-
-[Test]
-title BT Is Off Java Accepted (Generic Query Notifier Test)
-create BtNotifApiTest tester
-tester GenericQueryNotifierTest EBTIsOffJavaQuery
-pause 1000
-presskey global EKeyDevice0
-tester FinishGenericQuery ACCEPT
-delete tester
-[Endtest]
\ No newline at end of file
--- a/bluetoothengine/btnotif/tsrc/BtNotifApiTest/group/BtNotifApiTest.mmp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-#if defined(__S60_)
-        // To get the OSEXT_LAYER_SYSTEMINCLUDE-definition
-        #include <platform_paths.hrh>
-#endif
-
-TARGET          BtNotifApiTest.dll
-TARGETTYPE      dll
-UID             0x1000008D 0x101FB3E3
-
-CAPABILITY      ALL -TCB
-
-DEFFILE         BtNotifApiTest.def
-
-MW_LAYER_SYSTEMINCLUDE
-
-USERINCLUDE	../inc 
-USERINCLUDE	../../../inc
-
-SOURCEPATH      ../src
-SOURCE          BtNotifApiTest.cpp
-SOURCE          BtNotifApiTestBlocks.cpp BtSettingsObserver.cpp BtEngDevManObserver.cpp
-
-LIBRARY         euser.lib
-LIBRARY         stiftestinterface.lib
-LIBRARY         stiftestengine.lib
-LIBRARY         btengsettings.lib
-LIBRARY		bluetooth.lib
-LIBRARY		btextnotifiers.lib
-LIBRARY		btmanclient.lib
-LIBRARY		btdevice.lib
-LIBRARY 	BTEngDevMan.lib
-
-
-LANG            SC
-
-// End of File
--- a/bluetoothengine/btnotif/tsrc/BtNotifApiTest/group/BtNotifApiTest.pkg	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-;
-; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "Eclipse Public License v1.0"
-; which accompanies this distribution, and is available
-; at the URL "http://www.eclipse.org/legal/epl-v10.html".
-;
-; Initial Contributors:
-; Nokia Corporation - initial contribution.
-;
-; Contributors:
-;
-; Description: 
-;
-
-; Languages
-&EN
-
-; Provide value for uid
-#{"STIF"},(0x00000000),1,1,0,TYPE=SA
-
-; Series60 product id for S60 3.0
-[0x1028315F], 0, 0, 0, {"Series60ProductID"}
-
-; Localised Vendor name
-%{"Nokia"}
-
-; Unique Vendor name
-:"Nokia"
-
-; Logo
-; None
-
-; Package signature - Optional
-; None
-
-; Start of Package body
-
-; Condition blocks
-; None
-
-; Options list
-; None
-
-; Install files
-"\epoc32\release\armv5\udeb\BtNotifApiTest.dll"-"c:\Sys\Bin\BtNotifApiTest.dll"
-"..\init\BtNotifApiTest.ini"-"e:\testing\init\BtNotifApiTest.ini"
-"..\conf\ui_BtNotifApiTest.cfg"-"e:\testing\conf\ui_BtNotifApiTest.cfg"
-  
-; Embedded SIS 
-; None
-
-; End of Package body
-
-; PKG dependencies
-; None
-
-; PKG capabilities
-; None
--- a/bluetoothengine/btnotif/tsrc/BtNotifApiTest/group/BtNotifApiTest_phone.pkg	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-;
-; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "Eclipse Public License v1.0"
-; which accompanies this distribution, and is available
-; at the URL "http://www.eclipse.org/legal/epl-v10.html".
-;
-; Initial Contributors:
-; Nokia Corporation - initial contribution.
-;
-; Contributors:
-;
-; Description: 
-;
-
-; Languages
-&EN
-
-; Provide value for uid
-#{"STIF"},(0x00000000),1,1,0,TYPE=SA
-
-; Series60 product id for S60 3.0
-[0x1028315F], 0, 0, 0, {"Series60ProductID"}
-
-; Localised Vendor name
-%{"Nokia"}
-
-; Unique Vendor name
-:"Nokia"
-
-; Logo
-; None
-
-; Package signature - Optional
-; None
-
-; Start of Package body
-
-; Condition blocks
-; None
-
-; Options list
-; None
-
-; Install files
-"\epoc32\release\armv5\urel\BtNotifApiTest.dll"-"c:\Sys\Bin\BtNotifApiTest.dll"
-"..\init\BtNotifApiTest_phone.ini"-"c:\testframework\testframework.ini"
-"..\conf\ui_BtNotifApiTest.cfg"-"c:\testframework\ui_BtNotifApiTest.cfg"
-  
-; Embedded SIS 
-; None
-
-; End of Package body
-
-; PKG dependencies
-; None
-
-; PKG capabilities
-; None
--- a/bluetoothengine/btnotif/tsrc/BtNotifApiTest/group/bld.inf	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-/*
-* Copyright (c) 2002 - 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:   ?Description
-*
-*/
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_TESTEXPORTS
-
-PRJ_EXPORTS
-
-PRJ_TESTMMPFILES
-BtNotifApiTest.mmp
-
-PRJ_MMPFILES
-
-//  End of File
--- a/bluetoothengine/btnotif/tsrc/BtNotifApiTest/group/build_sis.bat	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-rem
-rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-rem All rights reserved.
-rem This component and the accompanying materials are made available
-rem under the terms of "Eclipse Public License v1.0"
-rem which accompanies this distribution, and is available
-rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
-rem
-rem Initial Contributors:
-rem Nokia Corporation - initial contribution.
-rem
-rem Contributors:
-rem
-rem Description: 
-rem
-
-call abld test build armv5
-call makesis BtNotifApiTest.pkg
-call signsis BtNotifApiTest.sis BtNotifApiTest.sisx rd.cer rd-key.pem
--- a/bluetoothengine/btnotif/tsrc/BtNotifApiTest/group/build_sis_phone.bat	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-rem
-rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-rem All rights reserved.
-rem This component and the accompanying materials are made available
-rem under the terms of "Eclipse Public License v1.0"
-rem which accompanies this distribution, and is available
-rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
-rem
-rem Initial Contributors:
-rem Nokia Corporation - initial contribution.
-rem
-rem Contributors:
-rem
-rem Description: 
-rem
-
-call abld test build armv5
-call makesis BtNotifApiTest_phone.pkg
-call signsis BtNotifApiTest_phone.sis BtNotifApiTest_phone.sisx rd.cer rd-key.pem
--- a/bluetoothengine/btnotif/tsrc/BtNotifApiTest/inc/BtEngDevManObserver.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#ifndef BTENGDEVMANOBSERVER_H_
-#define BTENGDEVMANOBSERVER_H_
-
-#include "BTEngDevMan.h"
-
-NONSHARABLE_CLASS( CBtEngDevManObserver ) : public MBTEngDevManObserver
-{
-public:
-	static CBtEngDevManObserver* NewL();
-	static CBtEngDevManObserver* NewLC();
-	
-	TInt GetDevices( const TBTRegistrySearch& aCriteria, 
-                               CBTDeviceArray* aResultArray );
-	TInt AddDevice( const CBTDevice& aDevice );
-	TInt DeleteDevices( const TBTRegistrySearch& aCriteria );
-    
-	virtual ~CBtEngDevManObserver();
-    void HandleDevManComplete( TInt aErr );
-    void HandleGetDevicesComplete( TInt aErr, CBTDeviceArray* aDeviceArray );
-	
-private:
-    CBtEngDevManObserver();
-    void ConstructL();
-    
-private:
-    CActiveSchedulerWait* iWait;
-    CBTEngDevMan* iDevMan;
-
-};
-
-#endif /*BTENGDEVMANOBSERVER_H_*/
--- a/bluetoothengine/btnotif/tsrc/BtNotifApiTest/inc/BtNotifApiTest.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,260 +0,0 @@
-/*
-* Copyright (c) 2002 - 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:   ?Description
-*
-*/
-
-
-
-
-#ifndef BTNOTIFAPITEST_H
-#define BTNOTIFAPITEST_H
-
-//  INCLUDES
-#include <StifLogger.h>
-#include <TestScripterInternal.h>
-#include <StifTestModule.h>
-#include <TestclassAssert.h>
-#include <btextnotifierspartner.h>
-
-#include "btnotif.h"
-#include "btmanclient.h"
-#include "btnotifierapi.h"
-#include "btextnotifiers.h"
-#include "coreapplicationuisdomainpskeys.h"
-
-#include "BtEngDevManObserver.h"
-#include "BtSettingsObserver.h"
-
-
-// CONSTANTS
-//const ?type ?constant_var = ?constant;
-
-// MACROS
-//#define ?macro ?macro_def
-#define TEST_CLASS_VERSION_MAJOR 0
-#define TEST_CLASS_VERSION_MINOR 0
-#define TEST_CLASS_VERSION_BUILD 0
-
-// Logging path
-//_LIT( KBtNotifApiTestLogPath, "\\logs\\testframework\\bt\\" );
-_LIT( KBtNotifApiTestLogPath, "e:\\testing\\stiflogs\\" );
-// Log file
-_LIT( KBtNotifApiTestLogFile, "BtNotifApiTest.txt" ); 
-_LIT( KBtNotifApiTestLogFileWithTitle, "BtNotifApiTest_[%S].txt" );
-
-// FUNCTION PROTOTYPES
-//?type ?function_name(?arg_list);
-
-// FORWARD DECLARATIONS
-//class ?FORWARD_CLASSNAME;
-class CBtNotifApiTest;
-
-// DATA TYPES
-//enum ?declaration
-//typedef ?declaration
-//extern ?data_type;
-
-enum TTestOption
-    {
-    EQueryDiscarded = 0,
-    EQueryAccepted,
-    ECheckPasskey,
-    EQueryCanceled
-    };
-
-// CLASS DECLARATION
-
-/**
-*  CBtNotifApiTest test class for STIF Test Framework TestScripter.
-*  ?other_description_lines
-*
-*  @lib ?library
-*  @since ?Series60_version
-*/
-NONSHARABLE_CLASS(CBtNotifApiTest) : public CScriptBase
-    {
-    public:  // Constructors and destructor
-
-        /**
-        * Two-phased constructor.
-        */
-        static CBtNotifApiTest* NewL( CTestModuleIf& aTestModuleIf );
-
-        /**
-        * Destructor.
-        */
-        virtual ~CBtNotifApiTest();
-
-    public: // New functions
-
-        /**
-        * ?member_description.
-        * @since ?Series60_version
-        * @param ?arg1 ?description
-        * @return ?description
-        */
-        //?type ?member_function( ?type ?arg1 );
-
-    public: // Functions from base classes
-
-        /**
-        * From CScriptBase Runs a script line.
-        * @since ?Series60_version
-        * @param aItem Script line containing method name and parameters
-        * @return Symbian OS error code
-        */
-        virtual TInt RunMethodL( CStifItemParser& aItem );
-
-    protected:  // New functions
-
-        /**
-        * ?member_description.
-        * @since ?Series60_version
-        * @param ?arg1 ?description
-        * @return ?description
-        */
-        //?type ?member_function( ?type ?arg1 );
-
-    protected:  // Functions from base classes
-
-        /**
-        * From ?base_class ?member_description
-        */
-        //?type ?member_function();
-
-    private:
-
-        /**
-        * C++ default constructor.
-        */
-        CBtNotifApiTest( CTestModuleIf& aTestModuleIf );
-
-        /**
-        * By default Symbian 2nd phase constructor is private.
-        */
-        void ConstructL();
-
-        // Prohibit copy constructor if not deriving from CBase.
-        // ?classname( const ?classname& );
-        // Prohibit assigment operator if not deriving from CBase.
-        // ?classname& operator=( const ?classname& );
-
-        /**
-        * Frees all resources allocated from test methods.
-        * @since ?Series60_version
-        */
-        void Delete();
-
-        /**
-        * Test methods are listed below. 
-        */
-
-        /**
-        * Example test method.
-        * @since ?Series60_version
-        * @param aItem Script line containing parameters.
-        * @return Symbian OS error code.
-        */
-        virtual TInt PairedDeviceSettingNotifierTest( CStifItemParser& aItem );
-        virtual TInt FinishPairedDeviceSettingQuery( CStifItemParser& aItem );
-        
-        virtual TInt PbapAuthNotifierTest( CStifItemParser& aItem );
-        virtual TInt FinishPbapAuthQuery( CStifItemParser& aItem );
-        
-        virtual TInt PasskeyDisplayNotifierTest( CStifItemParser& aItem );
-        virtual TInt FinishPasskeyDisplayQuery( CStifItemParser& aItem );
-        
-        virtual TInt NumericComparisonQueryNotifierTest( CStifItemParser& aItem );
-        virtual TInt FinishNumericComparisonQuery( CStifItemParser& aItem );
-        
-        virtual TInt AuthQueryNotifierTest( CStifItemParser& aItem );
-        virtual TInt FinishAuthQuery( CStifItemParser& aItem );
-        
-        virtual TInt PinPasskeyQueryNotifierTest( CStifItemParser& aItem );
-        virtual TInt FinishPinPasskeyQuery( CStifItemParser& aItem );
-        
-        virtual TInt InquiryNotifierTest( CStifItemParser& aItem );
-        virtual TInt FinishInquiry( CStifItemParser& aItem );
-        
-        virtual TInt ObexPasskeyQueryNotifierTest( CStifItemParser& aItem );
-        virtual TInt FinishObexPasskeyQuery( CStifItemParser& aItem );
-        
-        virtual TInt PowerModeQueryNotifierTest( CStifItemParser& aItem );
-        virtual TInt FinishPowerModeQuery( CStifItemParser& aItem );
-        
-        virtual TInt GenericInfoNotifierTest( CStifItemParser& aItem );
-        
-        virtual TInt GenericQueryNotifierTest( CStifItemParser& aItem );
-        virtual TInt FinishGenericQuery( CStifItemParser& aItem );
-        
-        /**
-         * Method used to log version of test class
-         */
-        void SendTestClassVersion();
-        
-        TInt GetGenericInfoNoteType( TPtrC aTypeString, TBTGenericInfoNoteType& aGenericInfoNoteType );        
-        TInt GetGenericQueryNoteType( TPtrC aTypeString, TBTGenericQueryNoteType& aGenericQueryNoteType );
-        
-        TInt GetTestOption( TPtrC optionString, TTestOption& aOption );
-        TInt TurnLightsOn( CStifItemParser& aItem );
-
-        //ADD NEW METHOD DEC HERE
-        //[TestMethods] - Do not remove
-
-    public:     // Data
-        // ?one_line_short_description_of_data
-        //?data_declaration;
-
-    protected:  // Data
-        // ?one_line_short_description_of_data
-        //?data_declaration;
-
-    private:    // Data
-        
-        RNotifier* iNotifier;
-              
-        TPbapAuthNotifierResponsePckg iPbapAuthNotifierResponsePckg;
-        TBTDeviceResponseParamsPckg iBtDeviceResponseParamsPckg;
-        TPckgBuf<TInt> iNumericComparisonQueryReply;
-        TBTPinCode iEnteredPinPasskey;
-        TBTPinCode iPinPasskey;
-        TObexPasskeyBuf iObexPasskeyBuf;
-        TObexPasskeyBuf iEnteredPasskeyBuf;
-        TPckgBuf<TBool> iAuthQueryReply;
-        TPckgBuf<TBool> iPowerModeQueryReply;
-        TPckgBuf<TBool> iGenericQueryReply;
-        
-        
-        TRequestStatus iReqStatus;
-        TBuf<KMaxBCBluetoothNameLen> iLocalDeviceName;
-        
-        CBtSettingsObserver* iBtSettings;
-        CBtEngDevManObserver* iBtEngDevManObserver;
-        CBTDeviceArray* iBtDeviceArray;
-        CBTDevice* iTestDevice;
-        
-
-    public:     // Friend classes
-        //?friend_class_declaration;
-    protected:  // Friend classes
-        //?friend_class_declaration;
-    private:    // Friend classes
-        //?friend_class_declaration;
-
-    };
-
-#endif      // BTNOTIFAPITEST_H
-
-// End of File
--- a/bluetoothengine/btnotif/tsrc/BtNotifApiTest/inc/BtSettingsObserver.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#ifndef BTSETTINGSOBSERVER_H_
-#define BTSETTINGSOBSERVER_H_
-
-#include <e32std.h>
-#include <e32base.h>
-#include <btengsettings.h>
-
-NONSHARABLE_CLASS( CBtSettingsObserver ) : public CBase,
-                                   public MBTEngSettingsObserver
-    {
-public:
-    /**
-     * Destructor.
-     */
-    ~CBtSettingsObserver();
-
-    /**
-     * Two-phased constructor.
-     */
-    static CBtSettingsObserver* NewL();
-
-    /**
-     * Two-phased constructor.
-     */
-    static CBtSettingsObserver* NewLC();
-    
-    TInt GetPowerState( TBTPowerStateValue& aState );
-    TInt SetPowerState( TBTPowerStateValue aState );
-    TInt GetVisibilityMode( TBTVisibilityMode& aMode );
-    TInt SetVisibilityMode( TBTVisibilityMode aMode, TInt aTime = 0 );
-    TInt GetLocalName( TDes& aName );
-    TInt SetLocalName( const TDes& aName );
-
-private:
-
-    // From MBTEngSettingsObserver
-    void PowerStateChanged( TBTPowerStateValue aState );
-    void VisibilityModeChanged( TBTVisibilityMode aState );
-    
-
-    CBtSettingsObserver();
-    void ConstructL();
-
-    
-private: //Data
-    
-    CBTEngSettings* iSettings; // Own.
-    CActiveSchedulerWait* iWaiter; //Own.
-    TInt iError;    
-    };
-
-#endif /*BTSETTINGSOBSERVER_H_*/
--- a/bluetoothengine/btnotif/tsrc/BtNotifApiTest/init/BtNotifApiTest.ini	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,218 +0,0 @@
-#
-# This is STIF initialization file
-# Comment lines start with '#'-character.
-# See STIF TestFramework users guide.doc for instructions
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-# Set following test engine settings:
-#	- Set Test Reporting mode. TestReportMode's possible values are:
-#		+ 'Summary': Summary of the tested test cases.
-#		+ 'Environment': Hardware and software info.
-#		+ 'TestCases': Test case report.
-#		+ 'FullReport': Set of all above ones.
-#		+ Example 'TestReportMode= Summary TestCases'
-#
-# 	- CreateTestReport setting controls report creation mode
-#		+ YES, Test report will created.
-#		+ NO, No Test report.
-#
-# 	- File path indicates the base path of the test report.
-# 	- File name indicates the name of the test report.
-#
-# 	- File format indicates the type of the test report.
-#		+ TXT, Test report file will be txt type, for example 'TestReport.txt'.
-#		+ HTML, Test report will be html type, for example 'TestReport.html'.
-#   + XML, Test report will be xml type, for example 'TestReport.xml'.
-#          Note, that xml format is available only when output is set to FILE.
-#
-# 	- File output indicates output source of the test report.
-#		+ FILE, Test report logging to file.
-#		+ RDEBUG, Test report logging to using rdebug.
-#
-# 	- File Creation Mode indicates test report overwriting if file exist.
-#		+ OVERWRITE, Overwrites if the Test report file exist.
-#		+ APPEND, Continue logging after the old Test report information if
-#                 report exist.
-# 	- Sets a device reset module's dll name(Reboot).
-#		+ If Nokia specific reset module is not available or it is not correct one
-#		  StifHWResetStub module may use as a template for user specific reset
-#		  module.
-# 	- Sets STIF test measurement disable options. e.g. pluging1 and pluging2 disablation
-#		DisableMeasurement= stifmeasurementplugin01 stifmeasurementplugin02
-#
-
-[Engine_Defaults]
-
-TestReportMode= FullReport    # Possible values are: 'Empty', 'Summary', 'Environment',
-                                                     'TestCases' or 'FullReport'
-
-CreateTestReport= YES         # Possible values: YES or NO
-
-TestReportFilePath= e:\testing\logs\
-TestReportFileName= BtNotifApiTest
-
-TestReportFormat= TXT         # Possible values: TXT, HTML or XML
-TestReportOutput= FILE        # Possible values: FILE or RDEBUG
-TestReportFileCreationMode= OVERWRITE # Possible values: OVERWRITE or APPEND
-
-DeviceResetDllName= StifResetForNokia.dll # e.g. 'StifHWResetStub.dll' for user specific reseting
-
-DisableMeasurement= stifmeasurementdisablenone  # Possible values are:
-              # 'stifmeasurementdisablenone', 'stifmeasurementdisableall'
-              # 'stifmeasurementplugin01', 'stifmeasurementplugin02',
-              # 'stifmeasurementplugin03', 'stifmeasurementplugin04',
-              # 'stifmeasurementplugin05' or 'stifbappeaprofiler'
-
-Timeout= 0                    # Default timeout value for each test case. In milliseconds
-UITestingSupport= YES        # Possible values: YES or NO
-#SeparateProcesses= YES       # Possible values: YES or NO (default: NO)
-[End_Defaults]
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-# Module configurations start
-# Modules are added between module tags
-# tags. Module name is specified after ModuleName= tag, like
-# ModuleName= XXXXXXXXX
-# Modules might have initialisation file, specified as
-# IniFile= c:\testframework\YYYYYY
-# Modules might have several configuration files, like
-# TestCaseFile= c:\testframework\NormalCases.txt
-# TestCaseFile= c:\testframework\SmokeCases.txt
-# TestCaseFile= c:\testframework\ManualCases.txt
-
-# (TestCaseFile is synonym for old term ConfigFile)
-
-# Following case specifies demo module settings. Demo module
-# does not read any settings from file, so tags 
-# IniFile and TestCaseFile are not used.
-# In the simplest case it is enough to specify only the
-# name of the test module when adding new test module
-
-[New_Module]
-ModuleName= testscripter
-TestCaseFile= e:\testing\conf\ui_BtNotifApiTest.cfg
-[End_Module]
-
-
-# Load testmoduleXXX, optionally with initialization file and/or test case files
-#[New_Module]
-#ModuleName= testmodulexxx
-
-#TestModuleXXX used initialization file
-#IniFile= c:\testframework\init.txt
-
-#TestModuleXXX used configuration file(s)
-#TestCaseFile= c:\testframework\testcases1.cfg
-#TestCaseFile= c:\testframework\testcases2.cfg
-#TestCaseFile= c:\testframework\manualtestcases.cfg
-
-#[End_Module]
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-# Set STIF logging overwrite parameters for Logger.
-# 	Hardware and emulator environment logging path and styles can
-# 	be configured from here to overwrite the Logger's implemented values.
-#	
-#	Settings description:
-#	- Indicates option for creation log directory/directories. If log directory/directories
-#         is/are not created by user they will make by software.
-#		+ YES, Create log directory/directories if not allready exist.
-#		+ NO, Log directory/directories not created. Only created one is used.
-#
-#	- Overwrite emulator path setting.
-#		+ Example: If 'EmulatorBasePath= C:\LOGS\TestFramework\' and in code is defined 
-#		           Logger's path 'D:\\LOGS\\Module\\' with those definition the path
-#		           will be 'C:\LOGS\TestFramework\LOGS\Module\'
-#
-#	- Overwrite emulator's logging format.
-#		+ TXT, Log file(s) will be txt type(s), for example 'Module.txt'.
-#		+ HTML, Log file(s) will be html type(s), for example 'Module.html'.
-#
-#	- Overwrited emulator logging output source.
-#		+ FILE, Logging to file(s).
-#		+ RDEBUG, Logging to using rdebug(s).
-#
-#	- Overwrite hardware path setting (Same description as above in emulator path).
-#	- Overwrite hardware's logging format(Same description as above in emulator format).
-#	- Overwrite hardware's logging output source(Same description as above in emulator output).
-#
-#	- File Creation Mode indicates file overwriting if file exist.
-#		+ OVERWRITE, Overwrites if file(s) exist.
-#		+ APPEND, Continue logging after the old logging information if file(s) exist.
-#
-#	- Will thread id include to the log filename.
-#		+ YES, Thread id to log file(s) name, Example filename 'Module_b9.txt'.
-#		+ NO, No thread id to log file(s), Example filename 'Module.txt'.
-#
-#	- Will time stamps include the to log file.
-#		+ YES, Time stamp added to each line in log file(s). Time stamp is 
-#                 for example'12.Nov.2003 115958    LOGGING INFO'
-#		+ NO, No time stamp(s).
-#
-#	- Will line breaks include to the log file.
-#		+ YES, Each logging event includes line break and next log event is in own line.
-#		+ NO, No line break(s).
-#
-#	- Will event ranking include to the log file.
-#		+ YES, Event ranking number added to each line in log file(s). Ranking number
-#                 depends on environment's tics, for example(includes time stamp also)
-#                 '012   12.Nov.2003 115958    LOGGING INFO'
-#		+ NO, No event ranking.
-#
-#	- Will write log file in unicode format.
-#		+ YES, Log file will be written in unicode format
-#		+ NO, Log will be written as normal, not unicode, file.
-#
-
-[Logger_Defaults]
-
-#NOTE: If you want to set Logger using next setting(s) remove comment(s)'#'
-#NOTE: TestEngine and TestServer logging settings cannot change here
-
-#CreateLogDirectories= YES    # Possible values: YES or NO
-
-#EmulatorBasePath= C:\LOGS\TestFramework\
-#EmulatorFormat= HTML         # Possible values: TXT or HTML
-#EmulatorOutput= FILE         # Possible values: FILE or RDEBUG
-
-#HardwareBasePath= D:\LOGS\TestFramework\
-#HardwareFormat= HTML         # Possible values: TXT or HTML
-#HardwareOutput= FILE         # Possible values: FILE or RDEBUG
-
-#FileCreationMode= OVERWRITE  # Possible values: OVERWRITE or APPEND
-
-#ThreadIdToLogFile= YES       # Possible values: YES or NO
-#WithTimeStamp= YES           # Possible values: YES or NO
-#WithLineBreak= YES           # Possible values: YES or NO
-#WithEventRanking= YES        # Possible values: YES or NO
-
-#FileUnicode= YES             # Possible values: YES or NO
-#AddTestCaseTitle= YES        # Possible values: YES or NO
-[End_Logger_Defaults]
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-# Set filters to be used by ConsoleUI.
-# 	If you want to use filter with ConsoleUI, simply remove comments
-# 	from section below and provide valid filter entries.
-#   Each filter line has to start with "filter= " keyword.
-#   Filter can contain special wildcard characters:
-#     *  which stands for none or any literal;
-#     ?  which stands for single character.
-#   Filters are not case-sensitive.
-
-#[Filters]
-#filter= *math*
-#filter= *radio*
-#[End_Filters]
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-# End of file
--- a/bluetoothengine/btnotif/tsrc/BtNotifApiTest/init/BtNotifApiTest_phone.ini	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,218 +0,0 @@
-#
-# This is STIF initialization file
-# Comment lines start with '#'-character.
-# See STIF TestFramework users guide.doc for instructions
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-# Set following test engine settings:
-#	- Set Test Reporting mode. TestReportMode's possible values are:
-#		+ 'Summary': Summary of the tested test cases.
-#		+ 'Environment': Hardware and software info.
-#		+ 'TestCases': Test case report.
-#		+ 'FullReport': Set of all above ones.
-#		+ Example 'TestReportMode= Summary TestCases'
-#
-# 	- CreateTestReport setting controls report creation mode
-#		+ YES, Test report will created.
-#		+ NO, No Test report.
-#
-# 	- File path indicates the base path of the test report.
-# 	- File name indicates the name of the test report.
-#
-# 	- File format indicates the type of the test report.
-#		+ TXT, Test report file will be txt type, for example 'TestReport.txt'.
-#		+ HTML, Test report will be html type, for example 'TestReport.html'.
-#   + XML, Test report will be xml type, for example 'TestReport.xml'.
-#          Note, that xml format is available only when output is set to FILE.
-#
-# 	- File output indicates output source of the test report.
-#		+ FILE, Test report logging to file.
-#		+ RDEBUG, Test report logging to using rdebug.
-#
-# 	- File Creation Mode indicates test report overwriting if file exist.
-#		+ OVERWRITE, Overwrites if the Test report file exist.
-#		+ APPEND, Continue logging after the old Test report information if
-#                 report exist.
-# 	- Sets a device reset module's dll name(Reboot).
-#		+ If Nokia specific reset module is not available or it is not correct one
-#		  StifHWResetStub module may use as a template for user specific reset
-#		  module.
-# 	- Sets STIF test measurement disable options. e.g. pluging1 and pluging2 disablation
-#		DisableMeasurement= stifmeasurementplugin01 stifmeasurementplugin02
-#
-
-[Engine_Defaults]
-
-TestReportMode= FullReport    # Possible values are: 'Empty', 'Summary', 'Environment',
-                                                     'TestCases' or 'FullReport'
-
-CreateTestReport= YES         # Possible values: YES or NO
-
-TestReportFilePath= c:\logs\testframework\
-TestReportFileName= BtNotifApiTest
-
-TestReportFormat= TXT         # Possible values: TXT, HTML or XML
-TestReportOutput= FILE        # Possible values: FILE or RDEBUG
-TestReportFileCreationMode= OVERWRITE # Possible values: OVERWRITE or APPEND
-
-DeviceResetDllName= StifResetForNokia.dll # e.g. 'StifHWResetStub.dll' for user specific reseting
-
-DisableMeasurement= stifmeasurementdisablenone  # Possible values are:
-              # 'stifmeasurementdisablenone', 'stifmeasurementdisableall'
-              # 'stifmeasurementplugin01', 'stifmeasurementplugin02',
-              # 'stifmeasurementplugin03', 'stifmeasurementplugin04',
-              # 'stifmeasurementplugin05' or 'stifbappeaprofiler'
-
-Timeout= 0                    # Default timeout value for each test case. In milliseconds
-UITestingSupport= YES        # Possible values: YES or NO
-#SeparateProcesses= YES       # Possible values: YES or NO (default: NO)
-[End_Defaults]
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-# Module configurations start
-# Modules are added between module tags
-# tags. Module name is specified after ModuleName= tag, like
-# ModuleName= XXXXXXXXX
-# Modules might have initialisation file, specified as
-# IniFile= c:\testframework\YYYYYY
-# Modules might have several configuration files, like
-# TestCaseFile= c:\testframework\NormalCases.txt
-# TestCaseFile= c:\testframework\SmokeCases.txt
-# TestCaseFile= c:\testframework\ManualCases.txt
-
-# (TestCaseFile is synonym for old term ConfigFile)
-
-# Following case specifies demo module settings. Demo module
-# does not read any settings from file, so tags 
-# IniFile and TestCaseFile are not used.
-# In the simplest case it is enough to specify only the
-# name of the test module when adding new test module
-
-[New_Module]
-ModuleName= testscripter
-TestCaseFile= c:\testframework\ui_BtNotifApiTest.cfg
-[End_Module]
-
-
-# Load testmoduleXXX, optionally with initialization file and/or test case files
-#[New_Module]
-#ModuleName= testmodulexxx
-
-#TestModuleXXX used initialization file
-#IniFile= c:\testframework\init.txt
-
-#TestModuleXXX used configuration file(s)
-#TestCaseFile= c:\testframework\testcases1.cfg
-#TestCaseFile= c:\testframework\testcases2.cfg
-#TestCaseFile= c:\testframework\manualtestcases.cfg
-
-#[End_Module]
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-# Set STIF logging overwrite parameters for Logger.
-# 	Hardware and emulator environment logging path and styles can
-# 	be configured from here to overwrite the Logger's implemented values.
-#	
-#	Settings description:
-#	- Indicates option for creation log directory/directories. If log directory/directories
-#         is/are not created by user they will make by software.
-#		+ YES, Create log directory/directories if not allready exist.
-#		+ NO, Log directory/directories not created. Only created one is used.
-#
-#	- Overwrite emulator path setting.
-#		+ Example: If 'EmulatorBasePath= C:\LOGS\TestFramework\' and in code is defined 
-#		           Logger's path 'D:\\LOGS\\Module\\' with those definition the path
-#		           will be 'C:\LOGS\TestFramework\LOGS\Module\'
-#
-#	- Overwrite emulator's logging format.
-#		+ TXT, Log file(s) will be txt type(s), for example 'Module.txt'.
-#		+ HTML, Log file(s) will be html type(s), for example 'Module.html'.
-#
-#	- Overwrited emulator logging output source.
-#		+ FILE, Logging to file(s).
-#		+ RDEBUG, Logging to using rdebug(s).
-#
-#	- Overwrite hardware path setting (Same description as above in emulator path).
-#	- Overwrite hardware's logging format(Same description as above in emulator format).
-#	- Overwrite hardware's logging output source(Same description as above in emulator output).
-#
-#	- File Creation Mode indicates file overwriting if file exist.
-#		+ OVERWRITE, Overwrites if file(s) exist.
-#		+ APPEND, Continue logging after the old logging information if file(s) exist.
-#
-#	- Will thread id include to the log filename.
-#		+ YES, Thread id to log file(s) name, Example filename 'Module_b9.txt'.
-#		+ NO, No thread id to log file(s), Example filename 'Module.txt'.
-#
-#	- Will time stamps include the to log file.
-#		+ YES, Time stamp added to each line in log file(s). Time stamp is 
-#                 for example'12.Nov.2003 115958    LOGGING INFO'
-#		+ NO, No time stamp(s).
-#
-#	- Will line breaks include to the log file.
-#		+ YES, Each logging event includes line break and next log event is in own line.
-#		+ NO, No line break(s).
-#
-#	- Will event ranking include to the log file.
-#		+ YES, Event ranking number added to each line in log file(s). Ranking number
-#                 depends on environment's tics, for example(includes time stamp also)
-#                 '012   12.Nov.2003 115958    LOGGING INFO'
-#		+ NO, No event ranking.
-#
-#	- Will write log file in unicode format.
-#		+ YES, Log file will be written in unicode format
-#		+ NO, Log will be written as normal, not unicode, file.
-#
-
-[Logger_Defaults]
-
-#NOTE: If you want to set Logger using next setting(s) remove comment(s)'#'
-#NOTE: TestEngine and TestServer logging settings cannot change here
-
-#CreateLogDirectories= YES    # Possible values: YES or NO
-
-#EmulatorBasePath= C:\LOGS\TestFramework\
-#EmulatorFormat= HTML         # Possible values: TXT or HTML
-#EmulatorOutput= FILE         # Possible values: FILE or RDEBUG
-
-#HardwareBasePath= D:\LOGS\TestFramework\
-#HardwareFormat= HTML         # Possible values: TXT or HTML
-#HardwareOutput= FILE         # Possible values: FILE or RDEBUG
-
-#FileCreationMode= OVERWRITE  # Possible values: OVERWRITE or APPEND
-
-#ThreadIdToLogFile= YES       # Possible values: YES or NO
-#WithTimeStamp= YES           # Possible values: YES or NO
-#WithLineBreak= YES           # Possible values: YES or NO
-#WithEventRanking= YES        # Possible values: YES or NO
-
-#FileUnicode= YES             # Possible values: YES or NO
-#AddTestCaseTitle= YES        # Possible values: YES or NO
-[End_Logger_Defaults]
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-# Set filters to be used by ConsoleUI.
-# 	If you want to use filter with ConsoleUI, simply remove comments
-# 	from section below and provide valid filter entries.
-#   Each filter line has to start with "filter= " keyword.
-#   Filter can contain special wildcard characters:
-#     *  which stands for none or any literal;
-#     ?  which stands for single character.
-#   Filters are not case-sensitive.
-
-#[Filters]
-#filter= *math*
-#filter= *radio*
-#[End_Filters]
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-# End of file
--- a/bluetoothengine/btnotif/tsrc/BtNotifApiTest/src/BtEngDevManObserver.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,109 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#include "BtEngDevManObserver.h"
-
-CBtEngDevManObserver::CBtEngDevManObserver()
-    {
-    
-    }
-
-CBtEngDevManObserver::~CBtEngDevManObserver()
-    {
-    if( iWait->IsStarted() )
-        {
-        iWait->AsyncStop();
-        }
-    delete iWait;
-    iWait = NULL;
-    delete iDevMan;
-    iDevMan = NULL;
-    }
-
-CBtEngDevManObserver* CBtEngDevManObserver::NewLC()
-    {
-    CBtEngDevManObserver* self = new ( ELeave ) CBtEngDevManObserver();
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    return self;
-    }
-
-CBtEngDevManObserver* CBtEngDevManObserver::NewL()
-    {
-    CBtEngDevManObserver* self = CBtEngDevManObserver::NewLC();
-    CleanupStack::Pop(); // self;
-    return self;
-    }
-
-void CBtEngDevManObserver::ConstructL()
-    {
-    iWait = new ( ELeave ) CActiveSchedulerWait();
-    iDevMan = CBTEngDevMan::NewL( this );
-    }
-
-TInt CBtEngDevManObserver::GetDevices( const TBTRegistrySearch& aCriteria, 
-                               CBTDeviceArray* aResultArray )
-    {
-    TInt res;
-    res = iDevMan -> GetDevices( aCriteria, aResultArray );
-    if ( res != KErrNone )
-        {
-        return res;
-        }
-        
-    iWait -> Start();
-    
-    return KErrNone;
-    }
-
-TInt CBtEngDevManObserver::AddDevice( const CBTDevice& aDevice )
-    {
-    TInt res;
-    res = iDevMan -> AddDevice( aDevice );
-    if ( res != KErrNone )
-        {
-        return res;
-        }
-        
-    iWait -> Start();
-    
-    return KErrNone;
-    }
-
-TInt CBtEngDevManObserver::DeleteDevices( const TBTRegistrySearch& aCriteria )
-    {
-    TInt res;
-    res = iDevMan -> DeleteDevices( aCriteria );
-    if ( res != KErrNone )
-        {
-        return res;
-        }
-        
-    iWait -> Start();
-    
-    return KErrNone;
-    }
-
-void CBtEngDevManObserver::HandleGetDevicesComplete( TInt aErr, CBTDeviceArray* aDeviceArray )
-    {
-    iWait -> AsyncStop();
-    }
-
-void CBtEngDevManObserver::HandleDevManComplete( TInt aErr )
-    {
-    iWait -> AsyncStop();
-    }
--- a/bluetoothengine/btnotif/tsrc/BtNotifApiTest/src/BtNotifApiTest.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,209 +0,0 @@
-/*
-* Copyright (c) 2002 - 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:   ?Description
-*
-*/
-
-
-
-
-// INCLUDE FILES
-#include <Stiftestinterface.h>
-#include "BtNotifApiTest.h"
-#include <SettingServerClient.h>
-
-// EXTERNAL DATA STRUCTURES
-//extern  ?external_data;
-
-// EXTERNAL FUNCTION PROTOTYPES  
-//extern ?external_function( ?arg_type,?arg_type );
-
-// CONSTANTS
-//const ?type ?constant_var = ?constant;
-
-// MACROS
-//#define ?macro ?macro_def
-
-// LOCAL CONSTANTS AND MACROS
-//const ?type ?constant_var = ?constant;
-//#define ?macro_name ?macro_def
-
-// MODULE DATA STRUCTURES
-//enum ?declaration
-//typedef ?declaration
-
-// LOCAL FUNCTION PROTOTYPES
-//?type ?function_name( ?arg_type, ?arg_type );
-
-// FORWARD DECLARATIONS
-//class ?FORWARD_CLASSNAME;
-
-// ============================= LOCAL FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// ?function_name ?description.
-// ?description
-// Returns: ?value_1: ?description
-//          ?value_n: ?description_line1
-//                    ?description_line2
-// -----------------------------------------------------------------------------
-//
-/*
-?type ?function_name(
-    ?arg_type arg,  // ?description
-    ?arg_type arg)  // ?description
-    {
-
-    ?code  // ?comment
-
-    // ?comment
-    ?code
-    }
-*/
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CBtNotifApiTest::CBtNotifApiTest
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-CBtNotifApiTest::CBtNotifApiTest( 
-    CTestModuleIf& aTestModuleIf ):
-        CScriptBase( aTestModuleIf )
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// CBtNotifApiTest::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CBtNotifApiTest::ConstructL()
-    {
-    //Read logger settings to check whether test case name is to be
-    //appended to log file name.
-    RSettingServer settingServer;
-    TInt ret = settingServer.Connect();
-    if(ret != KErrNone)
-        {
-        User::Leave(ret);
-        }
-    // Struct to StifLogger settigs.
-    TLoggerSettings loggerSettings; 
-    // Parse StifLogger defaults from STIF initialization file.
-    ret = settingServer.GetLoggerSettings(loggerSettings);
-    if(ret != KErrNone)
-        {
-        User::Leave(ret);
-        } 
-    // Close Setting server session
-    settingServer.Close();
-
-    TFileName logFileName;
-    
-    if(loggerSettings.iAddTestCaseTitle)
-        {
-        TName title;
-        TestModuleIf().GetTestCaseTitleL(title);
-        logFileName.Format(KBtNotifApiTestLogFileWithTitle, &title);
-        }
-    else
-        {
-        logFileName.Copy(KBtNotifApiTestLogFile);
-        }
-
-    iLog = CStifLogger::NewL( KBtNotifApiTestLogPath, 
-                          logFileName,
-                          CStifLogger::ETxt,
-                          CStifLogger::EFile,
-                          EFalse );
-    
-    SendTestClassVersion();
-    
-    iNotifier = new ( ELeave ) RNotifier();
-    iBtSettings = CBtSettingsObserver::NewL();
-    iBtEngDevManObserver = CBtEngDevManObserver::NewL();
-    iBtDeviceArray = new ( ELeave ) CBTDeviceArray( 1 );
-    
-    iTestDevice = CBTDevice::NewL();    
-    }
-
-// -----------------------------------------------------------------------------
-// CBtNotifApiTest::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CBtNotifApiTest* CBtNotifApiTest::NewL( 
-    CTestModuleIf& aTestModuleIf )
-    {
-    CBtNotifApiTest* self = new (ELeave) CBtNotifApiTest( aTestModuleIf );
-
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop();
-
-    return self;
-
-    }
-
-// Destructor
-CBtNotifApiTest::~CBtNotifApiTest()
-    { 
-
-    // Delete resources allocated from test methods
-    Delete();
-
-    // Delete logger
-    delete iLog; 
-
-    }
-
-//-----------------------------------------------------------------------------
-// CBtNotifApiTest::SendTestClassVersion
-// Method used to send version of test class
-//-----------------------------------------------------------------------------
-//
-void CBtNotifApiTest::SendTestClassVersion()
-	{
-	TVersion moduleVersion;
-	moduleVersion.iMajor = TEST_CLASS_VERSION_MAJOR;
-	moduleVersion.iMinor = TEST_CLASS_VERSION_MINOR;
-	moduleVersion.iBuild = TEST_CLASS_VERSION_BUILD;
-	
-	TFileName moduleName;
-	moduleName = _L("BtNotifApiTest.dll");
-
-	TBool newVersionOfMethod = ETrue;
-	TestModuleIf().SendTestModuleVersion(moduleVersion, moduleName, newVersionOfMethod);
-	}
-
-// ========================== OTHER EXPORTED FUNCTIONS =========================
-
-// -----------------------------------------------------------------------------
-// LibEntryL is a polymorphic Dll entry point.
-// Returns: CScriptBase: New CScriptBase derived object
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CScriptBase* LibEntryL( 
-    CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework
-    {
-
-    return ( CScriptBase* ) CBtNotifApiTest::NewL( aTestModuleIf );
-
-    }
-
-
-//  End of File
--- a/bluetoothengine/btnotif/tsrc/BtNotifApiTest/src/BtNotifApiTestBlocks.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1632 +0,0 @@
-/*
-* Copyright (c) 2002 - 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:   ?Description
-*
-*/
-
-
-
-// [INCLUDE FILES] - do not remove
-#include <e32svr.h>
-#include <StifParser.h>
-#include <Stiftestinterface.h>
-#include "BtNotifApiTest.h"
-
-// EXTERNAL DATA STRUCTURES
-//extern  ?external_data;
-
-// EXTERNAL FUNCTION PROTOTYPES  
-//extern ?external_function( ?arg_type,?arg_type );
-
-// CONSTANTS
-//const ?type ?constant_var = ?constant;
-
-// MACROS
-//#define ?macro ?macro_def
-
-// LOCAL CONSTANTS AND MACROS
-//const ?type ?constant_var = ?constant;
-//#define ?macro_name ?macro_def
-
-// MODULE DATA STRUCTURES
-//enum ?declaration
-//typedef ?declaration
-
-// LOCAL FUNCTION PROTOTYPES
-//?type ?function_name( ?arg_type, ?arg_type );
-
-// FORWARD DECLARATIONS
-//class ?FORWARD_CLASSNAME;
-
-// ============================= LOCAL FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// ?function_name ?description.
-// ?description
-// Returns: ?value_1: ?description
-//          ?value_n: ?description_line1
-//                    ?description_line2
-// -----------------------------------------------------------------------------
-//
-/*
-?type ?function_name(
-    ?arg_type arg,  // ?description
-    ?arg_type arg)  // ?description
-    {
-
-    ?code  // ?comment
-
-    // ?comment
-    ?code
-    }
-*/
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CBtNotifApiTest::Delete
-// Delete here all resources allocated and opened from test methods. 
-// Called from destructor. 
-// -----------------------------------------------------------------------------
-//
-void CBtNotifApiTest::Delete() 
-    {
-        delete iNotifier;
-        iNotifier = NULL;
-        delete iBtSettings;
-        iBtSettings = NULL;
-        delete iBtEngDevManObserver;
-        iBtEngDevManObserver = NULL;
-        delete iBtDeviceArray;
-        iBtDeviceArray = NULL;
-        delete iTestDevice;
-        iTestDevice = NULL;
-    }
-
-// -----------------------------------------------------------------------------
-// CBtNotifApiTest::RunMethodL
-// Run specified method. Contains also table of test mothods and their names.
-// -----------------------------------------------------------------------------
-//
-TInt CBtNotifApiTest::RunMethodL( 
-    CStifItemParser& aItem ) 
-    {
-
-    static TStifFunctionInfo const KFunctions[] =
-        {  
-        // Copy this line for every implemented function.
-        // First string is the function name used in TestScripter script file.
-        // Second is the actual implementation member function. 
-                
-        ENTRY( "PairedDeviceSettingNotifierTest", CBtNotifApiTest::PairedDeviceSettingNotifierTest ),
-        ENTRY( "FinishPairedDeviceSettingQuery", CBtNotifApiTest::FinishPairedDeviceSettingQuery ),
-                
-        ENTRY( "PbapAuthNotifierTest", CBtNotifApiTest::PbapAuthNotifierTest ),
-        ENTRY( "FinishPbapAuthQuery", CBtNotifApiTest::FinishPbapAuthQuery ),
-                
-        ENTRY( "PasskeyDisplayNotifierTest", CBtNotifApiTest::PasskeyDisplayNotifierTest ),
-        ENTRY( "FinishPasskeyDisplayQuery", CBtNotifApiTest::FinishPasskeyDisplayQuery ),
-
-        ENTRY( "NumericComparisonQueryNotifierTest", CBtNotifApiTest::NumericComparisonQueryNotifierTest ),
-        ENTRY( "FinishNumericComparisonQuery", CBtNotifApiTest::FinishNumericComparisonQuery ),
-        
-        ENTRY( "AuthQueryNotifierTest", CBtNotifApiTest::AuthQueryNotifierTest ),
-        ENTRY( "FinishAuthQuery", CBtNotifApiTest::FinishAuthQuery ),
-        
-        ENTRY( "PinPasskeyQueryNotifierTest", CBtNotifApiTest::PinPasskeyQueryNotifierTest ),
-        ENTRY( "FinishPinPasskeyQuery", CBtNotifApiTest::FinishPinPasskeyQuery ),
-        
-        ENTRY( "InquiryNotifierTest", CBtNotifApiTest::InquiryNotifierTest ),
-        ENTRY( "FinishInquiry", CBtNotifApiTest::FinishInquiry ),
-        
-        ENTRY( "ObexPasskeyQueryNotifierTest", CBtNotifApiTest::ObexPasskeyQueryNotifierTest ),
-        ENTRY( "FinishObexPasskeyQuery", CBtNotifApiTest::FinishObexPasskeyQuery ),
-        
-        ENTRY( "PowerModeQueryNotifierTest", CBtNotifApiTest::PowerModeQueryNotifierTest ),
-        ENTRY( "FinishPowerModeQuery", CBtNotifApiTest::FinishPowerModeQuery ),
-        
-        ENTRY( "GenericInfoNotifierTest", CBtNotifApiTest::GenericInfoNotifierTest ),
-        
-        ENTRY( "GenericQueryNotifierTest", CBtNotifApiTest::GenericQueryNotifierTest ),
-        ENTRY( "FinishGenericQuery", CBtNotifApiTest::FinishGenericQuery ),
-        
-        ENTRY( "TurnLightsOn", CBtNotifApiTest::TurnLightsOn ),
-                
-        //ADD NEW ENTRY HERE
-        // [test cases entries] - Do not remove
-
-        };
-
-    const TInt count = sizeof( KFunctions ) / 
-                        sizeof( TStifFunctionInfo );
-
-    return RunInternalL( KFunctions, count, aItem );
-
-    }
-
-// -----------------------------------------------------------------------------
-// CBtNotifApiTest::PairedDeviceSettingNotifierTests
-// -----------------------------------------------------------------------------
-//
-
-TInt CBtNotifApiTest::PairedDeviceSettingNotifierTest( CStifItemParser& aItem )
-    {
-    TInt res;
-    TBTRegistrySearch regSearch;
-    
-    res = iNotifier -> Connect();
-    if ( res != KErrNone )
-        {
-        iLog -> Log( _L("Failed to connect RNotifier with value: %d"), res );
-        return res;
-        }   
-    iLog -> Log( _L("RNotifier connected") );
-    
-    regSearch.FindAll();    
-    res = iBtEngDevManObserver -> GetDevices( regSearch, iBtDeviceArray );
-    if ( res != KErrNone )
-        {
-        iLog -> Log( _L("Getting devices from register failed with value: %d"), res );
-        return res;
-        }
-
-    if ( iBtDeviceArray -> Count() > 0 )
-        {
-        iBtDeviceArray -> Reset();
-        res = iBtEngDevManObserver -> DeleteDevices( regSearch );
-        if ( res != KErrNone )
-            {
-            iLog -> Log( _L("Deleting devices from register failed with value: %d"), res );
-            return res;
-            }
-        }
-
-    TBTDevAddr addr( 0x12345678 );
-    CBTDevice *testDevice = CBTDevice::NewL( addr );
-    CleanupStack::PushL( testDevice );
-    testDevice -> SetPaired( ELinkKeyAuthenticated );
-    TTime time;
-    time.UniversalTime();
-    testDevice -> SetUsed( time );
-    testDevice -> SetDeviceNameL( _L8( "TestedDevice" ) );
-    CleanupStack::Pop( testDevice );
-    
-    res = iBtEngDevManObserver -> AddDevice( *testDevice );
-    if ( res != KErrNone )
-        {
-        iLog -> Log( _L("Adding device to register failed with value: %d"), res );
-        delete testDevice;
-        return res;
-        }
-
-    TInt paramStatus = KErrNone;  
-    TBTPairedDeviceSettingParams notifierParams;    
-    notifierParams.iPairingStatus = paramStatus;
-    notifierParams.iRemoteAddr = testDevice -> BDAddr();
-    TBTPairedDeviceSettingParamsPckg notifierParamsPckg( notifierParams );
-       
-    TPckgBuf<TBool> notifierResponsePckg;
-    
-    iNotifier -> StartNotifierAndGetResponse( iReqStatus, KBTPairedDeviceSettingNotifierUid, notifierParamsPckg, notifierResponsePckg );
-    iLog -> Log( _L("Notifier started") );    
-    
-    User::WaitForRequest( iReqStatus );
-  
-    iLog -> Log( _L("Request status value: %d"), iReqStatus.Int() );
-    iLog -> Log( _L("Input status value: %d"), notifierParams.iPairingStatus );
-    iLog -> Log( _L("Pairing status value: %d"), notifierResponsePckg() );
-    
-    delete testDevice;
-    iNotifier -> Close();  
-    return KErrNone;
-    }
-
-
-TInt CBtNotifApiTest::FinishPairedDeviceSettingQuery( CStifItemParser& aItem )
-    {
-    iLog -> Log( _L("Test case passed") );
-    return KErrNone;
-    }
-
-// -----------------------------------------------------------------------------
-// CBtNotifApiTest::PbapAuthNotifierTests
-// -----------------------------------------------------------------------------
-//
-
-TInt CBtNotifApiTest::PbapAuthNotifierTest( CStifItemParser& aItem )
-    {
-    TInt res;
-
-    res = iNotifier -> Connect();
-    if ( res != KErrNone )
-        {
-        iLog -> Log( _L("Failed to connect RNotifier with value: %d"), res );
-        return res;
-        }   
-    iLog -> Log( _L("RNotifier connected") );
-    
-    TPbapAuthNotifierParams notifierParams = TPbapAuthNotifierParams();
-    TPbapAuthNotifierParamsPckg notifierParamsPckg( notifierParams );
-    iNotifier -> StartNotifierAndGetResponse( iReqStatus, KPbapAuthNotifierUid, notifierParamsPckg, iPbapAuthNotifierResponsePckg );
-    iLog -> Log( _L("Notifier started") );
-
-    return KErrNone;
-    }
-
-
-TInt CBtNotifApiTest::FinishPbapAuthQuery( CStifItemParser& aItem )
-    {
-    TInt res;
-    TPtrC optionName( KNullDesC );
-    TTestOption option;
-    TPbapAuthNotifierResponse expectedData;
-    
-    if ( !expectedData.SetPassword( _L( "0000" ) ) )
-        {
-        iLog -> Log( _L("SetPassword failed") );
-        iNotifier -> Close();
-        return KErrGeneral;
-        }       
-    
-    res = aItem.GetString( _L( "FinishPbapAuthQuery" ), optionName );   
-    if ( res != KErrNone )
-        {
-        iLog -> Log( _L("GetString failed with value: %d"), res );
-        iNotifier -> Close();
-        return res;
-        }
-    
-    res = GetTestOption( optionName, option );
-    if ( res != KErrNone )
-        {
-        iLog -> Log( _L("GetTestOption failed with value: %d"), res );
-        iNotifier -> Close();
-        return res;
-        }  
-    
-    User::WaitForRequest( iReqStatus );    
-    if ( iReqStatus.Int()!= KErrNone && iReqStatus.Int()!= KErrCancel )
-        {
-        iLog -> Log( _L("Failed to get notifier's response: %d"), iReqStatus.Int() );
-        iNotifier -> Close();
-        return iReqStatus.Int();
-        }
-    iLog -> Log( _L("Notifier responded") );
-    
-    switch ( option )
-        {
-        case ECheckPasskey:
-            iLog -> Log( _L("Request status value: %d, expected: %d"), iReqStatus.Int(), KErrNone );
-            STIF_ASSERT_EQUALS( KErrNone, iReqStatus.Int() );
-            iLog -> Log( _L("Equal passkeys expected") );
-            STIF_ASSERT_EQUALS( expectedData.Password(), iPbapAuthNotifierResponsePckg().Password() );                       
-            break;
-        case EQueryCanceled:
-            iLog -> Log( _L("Request status value: %d, expected: %d"), iReqStatus.Int(), KErrCancel );
-            STIF_ASSERT_EQUALS( KErrCancel, iReqStatus.Int() );
-            break;    
-        default:
-            iLog -> Log( _L("Option unavailable") );
-            return KErrNotFound;
-            
-        }
-    
-    iNotifier -> Close();
-    iLog -> Log( _L("Test case passed") );
-    return KErrNone;
-    }
-
-// -----------------------------------------------------------------------------
-// CBtNotifApiTest::PasskeyDisplayNotifierTests
-// -----------------------------------------------------------------------------
-//
-
-TInt CBtNotifApiTest::PasskeyDisplayNotifierTest( CStifItemParser& aItem )
-    {
-    TInt res;
-    TBTRegistrySearch regSearch;
-    TPtrC initOptionName( KNullDesC );
-    TUint32 numericalValue = 999;
-    TBTPasskeyDisplayParams notifierParams;
-    TBTPasskeyDisplayParamsPckg emptyReplyPckg;
-    
-    res = iNotifier -> Connect();
-    if ( res != KErrNone )
-        {
-        iLog -> Log( _L("Failed to connect RNotifier with value: %d"), res );
-        return res;
-        }   
-    iLog -> Log( _L("RNotifier connected") );
-    
-    regSearch.FindAll();    
-    res = iBtEngDevManObserver -> GetDevices( regSearch, iBtDeviceArray );
-    if ( res != KErrNone )
-        {
-        iLog -> Log( _L("Getting devices from register failed with value: %d"), res );
-        iNotifier -> Close();
-        return res;
-        }
-
-    if ( iBtDeviceArray -> Count() > 0 )
-        {
-        iBtDeviceArray -> Reset();
-        res = iBtEngDevManObserver -> DeleteDevices( regSearch );
-        if ( res != KErrNone )
-            {
-            iLog -> Log( _L("Deleting devices from register failed with value: %d"), res );
-            iNotifier -> Close();
-            return res;
-            }
-        }
-    
-    iTestDevice -> SetDeviceAddress( 0x12345678 );
-    iTestDevice -> SetDeviceNameL( _L8( "Tested_Device" ) );
-    iTestDevice -> SetFriendlyNameL( _L( "TestedDevice" ) );
-    
-    res = iBtEngDevManObserver -> AddDevice( *iTestDevice );
-    if ( res != KErrNone )
-        {
-        iLog -> Log( _L("Adding device to register failed with value: %d"), res );
-        iNotifier -> Close();
-        return res;
-        }
-    
-    res = aItem.GetString( _L( "PasskeyDisplayNotifierTest" ), initOptionName );   
-    if ( res != KErrNone )
-        {
-        iLog -> Log( _L("GetString failed with value: %d"), res );
-        iNotifier -> Close();
-        return res;
-        } 
-    
-    if ( !initOptionName.Compare( _L( "LOCAL" ) ) )
-        {
-        iLog -> Log( _L("Locally initiated connection") );
-        notifierParams = TBTPasskeyDisplayParams( iTestDevice -> BDAddr(), iTestDevice -> FriendlyName(), numericalValue, ETrue );
-        }
-    else if ( !initOptionName.Compare( _L( "REMOTE" ) ) )
-        {
-        iLog -> Log( _L("Remote side initiated connection") );
-        notifierParams = TBTPasskeyDisplayParams( iTestDevice -> BDAddr(), iTestDevice -> FriendlyName(), numericalValue, EFalse );
-        }
-    else
-        {
-        iLog -> Log( _L("Option unavailable") );
-        return KErrNotFound;
-        }
-       
-    TBTPasskeyDisplayParamsPckg notifierParamsPckg( notifierParams );
-    
-    iNotifier -> StartNotifierAndGetResponse( iReqStatus, KBTPasskeyDisplayNotifierUid, notifierParamsPckg, emptyReplyPckg );
-    iLog -> Log( _L("Notifier started") );
-
-    return KErrNone;
-    }
-
-TInt CBtNotifApiTest::FinishPasskeyDisplayQuery( CStifItemParser& aItem )
-    {
-    TInt res;
-    TBTRegistrySearch regSearch;
-    TPtrC deviceBlockOptionName( KNullDesC );
-    
-    res = aItem.GetString( _L( "FinishPasskeyDisplayQuery" ), deviceBlockOptionName );   
-    
-    User::WaitForRequest( iReqStatus );   
-    
-    if ( !deviceBlockOptionName.Compare( _L( "BLOCK" ) ) )
-        {
-        iLog -> Log( _L("Block test device") );
-        iLog -> Log( _L("Request status value: %d, expected: %d"), iReqStatus.Int(), KErrAccessDenied );
-        STIF_ASSERT_EQUALS( KErrAccessDenied, iReqStatus.Int() );
-        }
-    else if ( !deviceBlockOptionName.Compare( _L( "NONBLOCK" ) ) )
-        {
-        iLog -> Log( _L("Don't block test device") );
-        iLog -> Log( _L("Request status value: %d, expected: %d"), iReqStatus.Int(), KErrCancel );
-        STIF_ASSERT_EQUALS( KErrCancel, iReqStatus.Int() );
-        }
-    else
-        {
-        iLog -> Log( _L("Request status value: %d, expected: %d"), iReqStatus.Int(), KErrCancel );
-        STIF_ASSERT_EQUALS( KErrCancel, iReqStatus.Int() );
-        }
-    
-    iBtDeviceArray -> Reset();
-    res = iBtEngDevManObserver -> DeleteDevices( regSearch );
-    if ( res != KErrNone )
-        {
-        iLog -> Log( _L("Deleting devices from register failed with value: %d"), res );
-        iNotifier -> Close();
-        return res;
-        }
-    
-    iNotifier -> Close();
-    iLog -> Log( _L("Test case passed") );
-    return KErrNone;
-    }
-
-// -----------------------------------------------------------------------------
-// CBtNotifApiTest::NumericComparisonQueryNotifierTests
-// -----------------------------------------------------------------------------
-//
-
-TInt CBtNotifApiTest::NumericComparisonQueryNotifierTest( CStifItemParser& aItem )
-    {
-    TInt res;
-    TPtrC initOptionName( KNullDesC );
-    TUint32 numericalValue = 999999;
-    TBTNumericComparisonParams notifierParams;
-    
-    
-    res = iNotifier -> Connect();
-    if ( res != KErrNone )
-        {
-        iLog -> Log( _L("Failed to connect RNotifier with value: %d"), res );
-        return res;
-        }   
-    iLog -> Log( _L("RNotifier connected") );
-    
-    res = aItem.GetString( _L( "NumericComparisonQueryNotifierTest" ), initOptionName );   
-    if ( res != KErrNone )
-        {
-        iLog -> Log( _L("GetString failed with value: %d"), res );
-        iNotifier -> Close();
-        return res;
-        } 
-    
-    if ( !initOptionName.Compare( _L( "LOCAL" ) ) )
-        {
-        iLog -> Log( _L("Locally initiated connection") );
-        notifierParams = TBTNumericComparisonParams( TBTDevAddr(), _L( "Test Device" ), numericalValue, TBTNumericComparisonParams::ERemoteCannotConfirm, ETrue );
-        }
-    else if ( !initOptionName.Compare( _L( "REMOTE" ) ) )
-        {
-        iLog -> Log( _L("Remote side initiated connection") );
-        notifierParams = TBTNumericComparisonParams( TBTDevAddr(), _L( "Test Device" ), numericalValue, TBTNumericComparisonParams::ERemoteCannotConfirm, EFalse );
-        }
-    else
-        {
-        iLog -> Log( _L("Option unavailable") );
-        return KErrNotFound;
-        }
-    
-    TBTNumericComparisonParamsPckg notifierParamsPckg( notifierParams );
-    iNotifier -> StartNotifierAndGetResponse( iReqStatus, KBTNumericComparisonNotifierUid, notifierParamsPckg, iNumericComparisonQueryReply );
-    iLog -> Log( _L("Notifier started") );
-    
-    return KErrNone;
-    }
-
-
-TInt CBtNotifApiTest::FinishNumericComparisonQuery( CStifItemParser& aItem )
-    {
-    TInt res;
-    TPtrC optionName( KNullDesC );
-    TPtrC deviceBlockOptionName( KNullDesC );
-    TTestOption option;
-    
-    res = aItem.GetString( _L( "FinishNumericComparisonQuery" ), optionName );   
-    if ( res != KErrNone )
-        {
-        iLog -> Log( _L("GetString failed with value: %d"), res );
-        iNotifier -> Close();
-        return res;
-        }
-    
-    res = GetTestOption( optionName, option );
-    if ( res != KErrNone )
-        {
-        iLog -> Log( _L("GetTestOption failed with value: %d"), res );
-        iNotifier -> Close();
-        return res;
-        }  
-    
-    User::WaitForRequest( iReqStatus );    
-    if ( iReqStatus.Int()!= KErrNone && iReqStatus.Int()!= KErrCancel && iReqStatus.Int()!= KErrAccessDenied )
-        {
-        iLog -> Log( _L("Failed to get notifier's response: %d"), iReqStatus.Int() );
-        iNotifier -> Close();
-        return iReqStatus.Int();
-        }
-    iLog -> Log( _L("Notifier responded") );
-    
-    switch ( option )
-        {
-        case EQueryDiscarded:
-            iLog -> Log( _L("Request status value: %d, expected: %d"), iReqStatus.Int(), KErrNone );
-            STIF_ASSERT_EQUALS( KErrNone, iReqStatus.Int() );
-            iLog -> Log( _L("Notifier's response value: %d, expected: %b"), iNumericComparisonQueryReply(), EFalse );  
-            STIF_ASSERT_FALSE( iNumericComparisonQueryReply() );
-            break;
-        case EQueryAccepted:
-            iLog -> Log( _L("Request status value: %d, expected: %d"), iReqStatus.Int(), KErrNone );
-            STIF_ASSERT_EQUALS( KErrNone, iReqStatus.Int() );
-            iLog -> Log( _L("Notifier's response value: %d, expected: %b"), iNumericComparisonQueryReply(), ETrue );  
-            STIF_ASSERT_TRUE( iNumericComparisonQueryReply() );
-            break;
-        case EQueryCanceled:
-            res = aItem.GetNextString( deviceBlockOptionName );   
-            if ( res != KErrNone )
-                {
-                iLog -> Log( _L("GetNextString failed with value: %d"), res );
-                iNotifier -> Close();
-                return res;
-                }
-            
-            if ( !deviceBlockOptionName.Compare( _L( "BLOCK" ) ) )
-                {
-                iLog -> Log( _L("Block test device") );
-                iLog -> Log( _L("Request status value: %d, expected: %d"), iReqStatus.Int(), KErrAccessDenied );
-                STIF_ASSERT_EQUALS( KErrAccessDenied, iReqStatus.Int() );
-                }
-            else if ( !deviceBlockOptionName.Compare( _L( "NONBLOCK" ) ) )
-                {
-                iLog -> Log( _L("Don't block test device") );
-                iLog -> Log( _L("Request status value: %d, expected: %d"), iReqStatus.Int(), KErrCancel );
-                STIF_ASSERT_EQUALS( KErrCancel, iReqStatus.Int() );
-                }
-            else
-                {
-                iLog -> Log( _L("Option unavailable") );
-                return KErrNotFound;
-                }
-            break;
-        default:
-            iLog -> Log( _L("Option unavailable") );
-            return KErrNotFound;
-        }
-
-    iNotifier -> Close();
-    iLog -> Log( _L("Test case passed") );
-    return KErrNone;
-    }
-
-// -----------------------------------------------------------------------------
-// CBtNotifApiTest::AuthQueryNotifierTests
-// -----------------------------------------------------------------------------
-//
-
-TInt CBtNotifApiTest::AuthQueryNotifierTest( CStifItemParser& aItem )
-    {
-    TInt res;
-    
-    res = iNotifier -> Connect();
-    if ( res != KErrNone )
-        {
-        iLog -> Log( _L("Failed to connect RNotifier with value: %d"), res );
-        return res;
-        }   
-    iLog -> Log( _L("RNotifier connected") );
-    
-    TBTAuthorisationParams notifierParams;
-    notifierParams.iName = _L( "Test Device" );
-    TBTAuthorisationParamsPckg notifierParamsPckg( notifierParams );
-    iNotifier -> StartNotifierAndGetResponse( iReqStatus, KBTManAuthNotifierUid, notifierParamsPckg, iAuthQueryReply );
-    iLog -> Log( _L("Notifier started") );
-    
-    return KErrNone;
-    }
-
-
-TInt CBtNotifApiTest::FinishAuthQuery( CStifItemParser& aItem )
-    {
-    TInt res;
-    TPtrC optionName( KNullDesC );
-    TPtrC deviceBlockOptionName( KNullDesC );
-    TTestOption option;
-    
-    res = aItem.GetString( _L("FinishAuthQuery"), optionName );   
-    if ( res != KErrNone )
-        {
-        iLog -> Log( _L("GetString failed with value: %d"), res );
-        iNotifier -> Close();
-        return res;
-        }
-    
-    res = aItem.GetNextString( deviceBlockOptionName );
-    
-    res = GetTestOption( optionName, option );
-    if ( res != KErrNone )
-        {
-        iLog -> Log( _L("GetTestOption failed with value: %d"), res );
-        iNotifier -> Close();
-        return res;
-        }  
-    
-    User::WaitForRequest( iReqStatus );
-    if ( iReqStatus.Int()!= KErrNone && iReqStatus.Int()!= KErrCancel && iReqStatus.Int()!= KErrAccessDenied )
-        {
-        iLog -> Log( _L("Failed to get notifier's response: %d"), iReqStatus.Int() );
-        iNotifier -> Close();
-        return iReqStatus.Int();
-        }
-    iLog -> Log( _L("Notifier responded") );
-    
-    switch ( option )
-        {
-        case EQueryDiscarded:
-            if ( !deviceBlockOptionName.Compare( _L( "BLOCK" ) ) )
-                {
-                iLog -> Log( _L("Block test device") );
-                iLog -> Log( _L("Request status value: %d, expected: %d"), iReqStatus.Int(), KErrAccessDenied );
-                STIF_ASSERT_EQUALS( KErrAccessDenied, iReqStatus.Int() );
-                iLog -> Log( _L("Notifier's response value: %b, expected: %b"), iAuthQueryReply(), EFalse );  
-                STIF_ASSERT_FALSE( iAuthQueryReply() );
-                }
-            else if ( !deviceBlockOptionName.Compare( _L( "NONBLOCK" ) ) )
-                {
-                iLog -> Log( _L("Don't block test device") );
-                iLog -> Log( _L("Request status value: %d, expected: %d"), iReqStatus.Int(), KErrCancel );
-                STIF_ASSERT_EQUALS( KErrCancel, iReqStatus.Int() );
-                iLog -> Log( _L("Notifier's response value: %b, expected: %b"), iAuthQueryReply(), EFalse );  
-                STIF_ASSERT_FALSE( iAuthQueryReply() );
-                }
-            else
-                {
-                iLog -> Log( _L("Option unavailable") );
-                return KErrNotFound;
-                }
-            break;
-        case EQueryAccepted:
-            iLog -> Log( _L("Request status value: %d, expected: %d"), iReqStatus.Int(), KErrNone );
-            STIF_ASSERT_EQUALS( KErrNone, iReqStatus.Int() );
-            iLog -> Log( _L("Notifier's response value: %b, expected: %b"), iAuthQueryReply(), ETrue );
-            STIF_ASSERT_TRUE( iAuthQueryReply() );
-            break;
-        default:
-            iLog -> Log( _L("Option unavailable") );
-            return KErrNotFound;
-        }
-    
-    iNotifier -> Close();
-    iLog -> Log( _L("Test case passed") );
-    return KErrNone;
-    }
-
-// -----------------------------------------------------------------------------
-// CBtNotifApiTest::PinPasskeyQueryNotifierTests
-// -----------------------------------------------------------------------------
-//
-
-TInt CBtNotifApiTest::PinPasskeyQueryNotifierTest( CStifItemParser& aItem )
-    {
-    TInt res;
-    TPtrC initOptionName( KNullDesC );
-    TUint pinCodeMinLength = 4;
-    
-    res = iNotifier -> Connect();
-    if ( res != KErrNone )
-        {
-        iLog -> Log( _L("Failed to connect RNotifier with value: %d"), res );
-        return res;
-        }   
-    iLog -> Log( _L("RNotifier connected") );
-    
-    res = aItem.GetString( _L( "PinPasskeyQueryNotifierTest" ), initOptionName );   
-    if ( res != KErrNone )
-        {
-        iLog -> Log( _L("GetString failed with value: %d"), res );
-        iNotifier -> Close();
-        return res;
-        }
-    
-    TBTPinCodeEntryNotifierParams notifierParams;
-    
-    if ( !initOptionName.Compare( _L( "LOCAL" ) ) )
-        {
-        iLog -> Log( _L("Locally initiated connection") );
-        notifierParams = TBTPinCodeEntryNotifierParams( TBTDevAddr(), _L( "Test Device" ), pinCodeMinLength, ETrue, EFalse, pinCodeMinLength );
-        }
-    else if ( !initOptionName.Compare( _L( "REMOTE" ) ) )
-        {
-        iLog -> Log( _L("Remote side initiated connection") );
-        notifierParams = TBTPinCodeEntryNotifierParams( TBTDevAddr(), _L( "Test Device" ), pinCodeMinLength, EFalse, EFalse, pinCodeMinLength );
-        }
-    else
-        {
-        iLog -> Log( _L("Option unavailable") );
-        return KErrNotFound;
-        }
-          
-    TBTPinCodeEntryNotifierParamsPckg notifierParamsPckg( notifierParams );
-       
-    iNotifier -> StartNotifierAndGetResponse( iReqStatus, KBTPinCodeEntryNotifierUid, notifierParamsPckg, iEnteredPinPasskey );
-    iLog -> Log( _L("Notifier started") );
-    
-    return KErrNone;
-    }
-
-
-TInt CBtNotifApiTest::FinishPinPasskeyQuery( CStifItemParser& aItem )
-    {
-    TInt res;
-    TPtrC optionName( KNullDesC );
-    TPtrC connectionOptionName( KNullDesC );
-    TPtrC deviceBlockOptionName( KNullDesC );
-    TTestOption option;    
-    TPINCodeV10 pinKey;
-    
-    pinKey.iLength = 4;
-    pinKey.iPIN[0] = '0';
-    pinKey.iPIN[1] = '0';
-    pinKey.iPIN[2] = '0';
-    pinKey.iPIN[3] = '0';
-    
-    for ( int i = pinKey.iLength; i< KHCIPINCodeSize; i++ )
-        {
-        pinKey.iPIN[i] = NULL;
-        } 
-    iPinPasskey = pinKey;   
-    
-    res = aItem.GetString( _L( "FinishPinPasskeyQuery" ), optionName );   
-    if ( res != KErrNone )
-        {
-        iLog -> Log( _L("GetString failed with value: %d"), res );
-        iNotifier -> Close();
-        return res;
-        }
-    
-    res = GetTestOption( optionName, option );
-    if ( res != KErrNone )
-        {
-        iLog -> Log( _L("GetTestOption failed with value: %d"), res );
-        iNotifier -> Close();
-        return res;
-        }
-    
-    User::WaitForRequest( iReqStatus );
-    
-    switch( option )
-        {
-        case ECheckPasskey:
-            iLog -> Log( _L("Request status value: %d, expected: %d"), iReqStatus.Int(), KErrNone );
-            STIF_ASSERT_EQUALS( KErrNone, iReqStatus.Int() );
-            iLog -> Log( _L("Equal passkeys expected") );
-            STIF_ASSERT_EQUALS( iPinPasskey, iEnteredPinPasskey );                       
-            break;
-        case EQueryCanceled:
-            res = aItem.GetNextString( connectionOptionName );   
-            if ( res == KErrNone )
-                {
-                if ( !connectionOptionName.Compare( _L( "DISCARDCONN" ) ) )
-                    {
-                    res = aItem.GetNextString( deviceBlockOptionName );
-                    if ( res != KErrNone )
-                        {
-                        iLog -> Log( _L("GetNextString failed with value: %d"), res );
-                        iNotifier -> Close();
-                        return res;
-                        }
-                    
-                    if ( !deviceBlockOptionName.Compare( _L( "BLOCK" ) ) )
-                        {
-                        iLog -> Log( _L("Block test device") );
-                        iLog -> Log( _L("Request status value: %d, expected: %d"), iReqStatus.Int(), KErrAccessDenied );
-                        STIF_ASSERT_EQUALS( KErrAccessDenied, iReqStatus.Int() );
-                        }
-                    else if ( !deviceBlockOptionName.Compare( _L( "NONBLOCK" ) ) )
-                        {
-                        iLog -> Log( _L("Don't block test device") );
-                        iLog -> Log( _L("Request status value: %d, expected: %d"), iReqStatus.Int(), KErrCancel );
-                        STIF_ASSERT_EQUALS( KErrCancel, iReqStatus.Int() );
-                        }
-                    else
-                        {
-                        iLog -> Log( _L("Block connection option unavailable") );
-                        return KErrNotFound;
-                        }                    
-                    }
-                else if ( !connectionOptionName.Compare( _L( "ACCEPTCONN" ) ) )
-                    {
-                    iLog -> Log( _L("Request status value: %d, expected: %d"), iReqStatus.Int(), KErrCancel );
-                    STIF_ASSERT_EQUALS( KErrCancel, iReqStatus.Int() );
-                    }      
-                else 
-                    {
-                    iLog -> Log( _L("Connection option unavailable") );
-                    return KErrNotFound;
-                    }
-                }
-            else if ( res == KErrNotFound )
-                {
-                iLog -> Log( _L("Request status value: %d, expected: %d"), iReqStatus.Int(), KErrCancel );
-                STIF_ASSERT_EQUALS( KErrCancel, iReqStatus.Int() );
-                }
-            else 
-                return res;
-            break;
-        default:
-            iLog -> Log( _L("Option unavailable") );
-            return KErrNotFound;
-        }
-    
-    iNotifier -> Close();
-    iLog -> Log( _L("Test case passed") );
-    
-    return KErrNone;
-    }
-
-// -----------------------------------------------------------------------------
-// CBtNotifApiTest::InquiryNotifierTests
-// -----------------------------------------------------------------------------
-//
-
-TInt CBtNotifApiTest::InquiryNotifierTest( CStifItemParser& aItem )
-    {
-    TInt res;
-    TPtrC initOptionName( KNullDesC );
-    TBTRegistrySearch regSearch;
-    TBTPowerStateValue btPowerState;
-    TBTDeviceSelectionParamsPckg emptyNotifierParamsPckg;
-        
-    res = iNotifier -> Connect();
-    if ( res != KErrNone )
-        {
-        iLog -> Log( _L("Failed to connect RNotifier with value: %d"), res );
-        return res;
-        }   
-    iLog -> Log( _L("RNotifier connected") );
-    
-    res = iBtSettings -> GetPowerState( btPowerState );
-    if ( res != KErrNone )
-        {
-        iLog -> Log( _L("Failed to get BT power state with value: %d"), res );
-        iNotifier -> Close();
-        return res;
-        }
-    
-    if ( btPowerState == EBTPowerOn )
-        {
-        res = iBtSettings -> SetPowerState( EBTPowerOff );
-        if ( res != KErrNone )
-            {
-            iLog -> Log( _L("Failed to set BT off with value: %d"), res );
-            iNotifier -> Close();
-            return res;
-            } 
-        }
-    
-    regSearch.FindAll();    
-    res = iBtEngDevManObserver -> GetDevices( regSearch, iBtDeviceArray );
-    if ( res != KErrNone )
-        {
-        iLog -> Log( _L("Getting devices from register failed with value: %d"), res );
-        iNotifier -> Close();
-        return res;
-        }
-
-    if ( iBtDeviceArray -> Count() > 0 )
-        {
-        iBtDeviceArray -> Reset();
-        res = iBtEngDevManObserver -> DeleteDevices( regSearch );
-        if ( res != KErrNone )
-            {
-            iLog -> Log( _L("Deleting devices from register failed with value: %d"), res );
-            iNotifier -> Close();
-            return res;
-            }
-        }
-    
-    res = aItem.GetString( _L( "InquiryNotifierTest" ), initOptionName );   
-    if ( res != KErrNone )
-        {
-        iLog -> Log( _L("GetString failed with value: %d"), res );
-        iNotifier -> Close();
-        return res;
-        }
-    
-    if ( !initOptionName.Compare( _L( "BTOFF" ) ) )
-        {    
-        iLog -> Log( _L("Init test option: bt off") );
-        }
-    else if ( !initOptionName.Compare( _L( "PAIRED" ) ) )
-        {
-        iLog -> Log( _L("Init test option: paired test device") );
-        iTestDevice -> SetDeviceAddress( 0x12345678 );
-        iTestDevice -> SetPaired( ELinkKeyAuthenticated );
-        TBTDeviceClass testDeviceClass( EMajorServiceLimitedDiscoverableMode, EMajorDeviceComputer, EMinorDeviceComputerUnclassified );
-        iTestDevice -> SetDeviceClass( testDeviceClass );
-        iTestDevice -> SetDeviceNameL( _L8( "TestedDevice" ) );
-        
-        res = iBtEngDevManObserver -> AddDevice( *iTestDevice );
-        if ( res != KErrNone )
-            {
-            iLog -> Log( _L("Adding device to register failed with value: %d"), res );
-            iNotifier -> Close();
-            return res;
-            }
-        }
-    else if ( !initOptionName.Compare( _L( "NONPAIRED" ) ) )
-        {
-        iLog -> Log( _L("Init test option: test device not paired") );
-        }
-    else
-        {
-        iLog -> Log( _L("Option unavailable") );
-        iNotifier -> Close();
-        return KErrNotFound;
-        }
-    
-    if ( initOptionName.Compare( _L( "BTOFF" ) ) )
-        {
-        res = iBtSettings -> SetPowerState( EBTPowerOn );
-        if ( res != KErrNone )
-            {
-            iLog -> Log( _L("Failed to set BT on with value: %d"), res );
-            iNotifier -> Close();
-            return res;
-            } 
-        }
-
-    iNotifier -> StartNotifierAndGetResponse( iReqStatus, KDeviceSelectionNotifierUid, emptyNotifierParamsPckg, iBtDeviceResponseParamsPckg );
-    iLog -> Log( _L("Notifier started") );
-    
-    User::After( 5000000 );
-
-    return KErrNone;
-    }
-
-
-TInt CBtNotifApiTest::FinishInquiry( CStifItemParser& aItem )
-    {
-    TInt res;
-    TPtrC optionName( KNullDesC );
-    TPtrC subOptionName( KNullDesC );
-    TBTPowerStateValue btPowerState;
-    TTestOption option;
-    
-    res = aItem.GetString( _L( "FinishInquiry" ), optionName );   
-    if ( res != KErrNone )
-        {
-        iLog -> Log( _L("GetString failed with value: %d"), res );
-        iNotifier -> Close();
-        return res;
-        }
-    
-    res = aItem.GetNextString( subOptionName );   
-    iLog -> Log( _L("GetString  value: %d"), res );
-    
-    if ( !subOptionName.Compare( _L( "BTOFF" ) ) )
-        {
-        iLog -> Log( _L("Test suboption: set bt off") );
-        iBtSettings -> SetPowerState( EBTPowerOff );
-        if ( res != KErrNone )
-            {
-            iLog -> Log( _L("Failed to set BT off with value: %d"), res );
-            iNotifier -> Close();
-            return res;
-            } 
-        }
-   
-    res = GetTestOption( optionName, option );
-    if ( res != KErrNone )
-        {
-        iLog -> Log( _L("GetTestOption failed with value: %d"), res );
-        iNotifier -> Close();
-        return res;
-        }
-    
-    User::WaitForRequest( iReqStatus );
-    
-    switch( option )
-        {
-        case EQueryAccepted:
-            {
-            iLog -> Log( _L("Request status value: %d, expected: %d"), iReqStatus.Int(), KErrNone );
-            STIF_ASSERT_EQUALS( KErrNone, iReqStatus.Int() );
-            
-            HBufC16* inputDeviceNameBuf = HBufC16::New( iTestDevice -> DeviceName().Length() );
-            TPtr16 inputDeviceName = inputDeviceNameBuf -> Des();
-            inputDeviceName.Copy( iTestDevice -> DeviceName() );
-            
-            HBufC16* outputDeviceNameBuf = HBufC16::New( iBtDeviceResponseParamsPckg().DeviceName().Length() );
-            TPtr16 outputDeviceName = outputDeviceNameBuf -> Des();
-            outputDeviceName.Copy( iBtDeviceResponseParamsPckg().DeviceName() );
-              
-            iLog -> Log( _L( "Equal device addresses expected" ) );
-            STIF_ASSERT_EQUALS( iTestDevice -> BDAddr(), iBtDeviceResponseParamsPckg().BDAddr() );
-            iLog -> Log( _L( "Equal device names expected" ) );
-            STIF_ASSERT_EQUALS( inputDeviceName, outputDeviceName );
-            iLog -> Log( _L( "Equal device classes expected" ) );
-            STIF_ASSERT_EQUALS( iTestDevice -> DeviceClass(), iBtDeviceResponseParamsPckg().DeviceClass() );
-            
-            delete inputDeviceNameBuf;
-            delete outputDeviceNameBuf;
-            }
-            break;
-        case EQueryCanceled:
-            iLog -> Log( _L("Request status value: %d, expected: %d"), iReqStatus.Int(), KErrCancel );
-            STIF_ASSERT_EQUALS( KErrCancel, iReqStatus.Int() );
-            break;
-        default:
-            iLog -> Log( _L("Option unavailable") );
-            return KErrNotFound;
-        }
-    
-    res = iBtSettings -> GetPowerState( btPowerState );
-    if ( res != KErrNone )
-        {
-        iLog -> Log( _L("Failed to get BT power state with value: %d"), res );
-        iNotifier -> Close();
-        return res;
-        }
-    
-    if ( btPowerState == EBTPowerOn )
-        {
-        res = iBtSettings -> SetPowerState( EBTPowerOff );
-        if ( res != KErrNone )
-            {
-            iLog -> Log( _L("Failed to set BT off with value: %d"), res );
-            iNotifier -> Close();
-            return res;
-            } 
-        }
-    
-    iNotifier -> Close();
-    iLog -> Log( _L("Test case passed") );
-    return KErrNone;
-    }
-
-// -----------------------------------------------------------------------------
-// CBtNotifApiTest::ObexPasskeyQueryNotifierTests
-// -----------------------------------------------------------------------------
-//
-
-TInt CBtNotifApiTest::ObexPasskeyQueryNotifierTest( CStifItemParser& aItem )
-    {
-    TInt res;
-    TUint8 passCode[] = { "0000" };
-    TBTObexPasskey passKey = passCode;
-    
-    res = iNotifier -> Connect();
-    if ( res != KErrNone )
-        {
-        iLog -> Log( _L("Failed to connect RNotifier with value: %d"), res );
-        return res;
-        }   
-    iLog -> Log( _L("RNotifier connected") );
-    
-    iObexPasskeyBuf = passKey;  
-    iNotifier -> StartNotifierAndGetResponse( iReqStatus, KBTObexPasskeyQueryNotifierUid, iObexPasskeyBuf, iEnteredPasskeyBuf );
-    iLog -> Log( _L("Notifier started") );
-    
-    return KErrNone;
-    }
-
-
-TInt CBtNotifApiTest::FinishObexPasskeyQuery( CStifItemParser& aItem )
-    {
-    TInt res;
-    TPtrC optionName( KNullDesC );
-    TTestOption option;
-    
-    res = aItem.GetNextString( optionName );   
-    if ( res != KErrNone )
-        {
-        iLog -> Log( _L("GetNextString failed with value: %d"), res );
-        iNotifier -> Close();
-        return res;
-        }  
-    
-    res = GetTestOption( optionName, option );
-    if ( res != KErrNone )
-        {
-        iLog -> Log( _L("GetTestOption failed with value: %d"), res );
-        iNotifier -> Close();
-        return res;
-        }  
-    
-    User::WaitForRequest( iReqStatus );    
-    switch( option )
-        {
-        case ECheckPasskey:
-            iLog -> Log( _L("Request status value: %d, expected: %d"), iReqStatus.Int(), KErrNone );
-            STIF_ASSERT_EQUALS( KErrNone, iReqStatus.Int() );
-            iLog -> Log( _L("Equal passkeys expected") );
-            STIF_ASSERT_EQUALS( iObexPasskeyBuf(), iEnteredPasskeyBuf() );
-            break;
-        case EQueryCanceled:
-            iLog -> Log( _L("Request status value: %d, expected: %d"), iReqStatus.Int(), KErrCancel );
-            STIF_ASSERT_EQUALS( KErrCancel, iReqStatus.Int() );
-            break;
-        default:
-            iLog -> Log( _L("Option unavailable") );
-            return KErrNotFound;
-        }
-    
-    iNotifier -> Close();
-    iLog -> Log( _L("Test case passed") );
-
-    return KErrNone;
-    }
-
-// -----------------------------------------------------------------------------
-// CBtNotifApiTest::PowerModeQueryNotifierTests
-// -----------------------------------------------------------------------------
-//
-
-TInt CBtNotifApiTest::PowerModeQueryNotifierTest( CStifItemParser& aItem )
-    {
-    TInt res;
-    TBTPowerStateValue state;
-    TBuf<KMaxBCBluetoothNameLen> testDeviceName = _L( "Device Test Name" );
-    
-    res = iNotifier -> Connect();
-    if ( res != KErrNone )
-        {
-        iLog -> Log( _L("Failed to connect RNotifier with value: %d"), res );
-        return res;
-        }   
-    iLog -> Log( _L("RNotifier connected") );
-    
-    
-    res = iBtSettings -> GetPowerState( state );
-    if ( res != KErrNone )
-        {
-        iLog -> Log( _L("Failed to get bt power state with value: %d"), res );
-        return res;
-        }
-    
-    if ( state != EBTPowerOff )
-        {
-        res = iBtSettings -> SetPowerState( EBTPowerOff );
-        if ( res != KErrNone )
-            {
-            iLog -> Log( _L("Failed to set bt power state with value: %d"), res );
-            return res;
-            }
-        }
-    
-    res = iBtSettings -> GetLocalName( iLocalDeviceName );
-    if ( res != KErrNone )
-        {
-        iLog -> Log( _L("Failed backup device name: %d"), res );
-        return res;
-        }
-    
-    res = iBtSettings -> SetLocalName( testDeviceName );
-    if ( res != KErrNone )
-        {
-        iLog -> Log( _L("Failed set device name: %d"), res );
-        return res;
-        }
-    
-    TPckgBuf<TBool> emptyInput;   
-    iNotifier -> StartNotifierAndGetResponse( iReqStatus, KPowerModeSettingNotifierUid, emptyInput, iPowerModeQueryReply );
-    iLog -> Log( _L("Notifier started") );
-    
-    return KErrNone;
-    }
-
-
-TInt CBtNotifApiTest::FinishPowerModeQuery( CStifItemParser& aItem )
-    {
-    TInt res;
-    TPtrC optionName( KNullDesC );
-    TTestOption option;    
-    
-    res = aItem.GetNextString( optionName );   
-    if ( res != KErrNone )
-        {
-        iLog -> Log( _L("GetNextString failed with value: %d"), res );
-        iNotifier -> Close();
-        return res;
-        }  
-    
-    res = GetTestOption( optionName, option );
-    if ( res != KErrNone )
-        {
-        iLog -> Log( _L("GetTestOption failed with value: %d"), res );
-        iNotifier -> Close();
-        return res;
-        }    
-    
-    User::WaitForRequest( iReqStatus );
-    
-    if ( iReqStatus.Int()!= KErrNone && iReqStatus.Int()!= KErrCancel )
-        {
-        iLog -> Log( _L("Failed to get notifier's response: %d"), iReqStatus.Int() );
-        iNotifier -> Close();
-        return iReqStatus.Int();
-        }
-    iLog -> Log( _L("Notifier responded") );
-    
-    iBtSettings -> SetLocalName( iLocalDeviceName );
-    
-    switch ( option )
-        {
-        case EQueryDiscarded:
-            iLog -> Log( _L("Returned request status: %d, expected: %d"), iReqStatus.Int(), KErrCancel );
-            STIF_ASSERT_EQUALS( KErrCancel, iReqStatus.Int() );
-            iLog -> Log( _L("Notifier's response value: %b, expected: %b"), iPowerModeQueryReply(), EFalse );  
-            STIF_ASSERT_FALSE( iPowerModeQueryReply() );
-            break;
-        case EQueryAccepted:
-            res = iBtSettings -> SetPowerState( EBTPowerOff );
-            if ( res != KErrNone )
-                {
-                iLog -> Log( _L("Failed to set bt power state off with value: %d"), res );
-                return res;
-                }
-            iLog -> Log( _L("Returned request status: %d, expected: %d"), iReqStatus.Int(), KErrNone );
-            STIF_ASSERT_EQUALS( KErrNone, iReqStatus.Int() );
-            iLog -> Log( _L("Notifier's response value: %b, expected: %b"), iPowerModeQueryReply(), ETrue );
-            STIF_ASSERT_TRUE( iPowerModeQueryReply() );
-            break;
-        default:
-            iLog -> Log( _L("Option unavailable") );
-            return KErrNotFound;
-        }
-  
-    iNotifier -> Close();
-    iLog -> Log( _L("Test case passed") );
-    
-    return KErrNone;
-    }
-
-// -----------------------------------------------------------------------------
-// CBtNotifApiTest::GenericInfoNotifierTests
-// -----------------------------------------------------------------------------
-//
-
-TInt CBtNotifApiTest::GenericInfoNotifierTest( CStifItemParser& aItem )
-    {
-    TInt res;
-    TBTGenericInfoNotifierParams notifierParams;
-    TBTGenericInfoNoteType genericInfoNoteType;
-    TPtrC genericInfoNoteTypeString( KNullDesC );
-    
-    res = iNotifier -> Connect();
-    if ( res != KErrNone )
-        {
-        iLog -> Log( _L("Failed to connect RNotifier with value: %d"), res );
-        return res;
-        }   
-    iLog -> Log( _L("RNotifier connected") );
-    
-    res = aItem.GetNextString( genericInfoNoteTypeString );
-    if ( res != KErrNone )
-        {
-        iLog -> Log( _L("GetNextString failed with value: %d"), res );
-        iNotifier -> Close();
-        return res;
-        }  
-    
-    res = GetGenericInfoNoteType( genericInfoNoteTypeString, genericInfoNoteType );
-    if ( res != KErrNone )
-        {
-        iLog -> Log( _L("Generic info note type not found") );
-        iNotifier -> Close();
-        return res;
-        }
-    
-    notifierParams.iMessageType = genericInfoNoteType;
-    notifierParams.iRemoteAddr = _L8( "012345" );
-    TBTGenericInfoNotiferParamsPckg messageInfo( notifierParams );
-    TPckgBuf<TBool> emptyReply;
-    
-    iNotifier -> StartNotifierAndGetResponse( iReqStatus, KBTGenericInfoNotifierUid, messageInfo, emptyReply );
-    iLog -> Log( _L("Notifier started") );
-    User::WaitForRequest( iReqStatus );
-    iLog -> Log( _L("Returned request status: %d, expected: %d"), iReqStatus.Int(), KErrNone );
-    STIF_ASSERT_EQUALS( KErrNone, iReqStatus.Int() );
-    
-    iNotifier -> Close();
-    iLog -> Log( _L("Test case passed") );
-    
-    return KErrNone;
-    }
-
-TInt CBtNotifApiTest::GetGenericInfoNoteType( TPtrC aTypeString, TBTGenericInfoNoteType& aGenericInfoNoteType )
-    {
-    if ( !aTypeString.Compare( _L( "EBTConnected" ) ) )
-        {
-        aGenericInfoNoteType = EBTConnected;
-        iLog -> Log( _L("Generic info message type: EBTConnected") );
-        }
-    else if ( !aTypeString.Compare( _L( "EBTDisconnected" ) ) )
-        {
-        aGenericInfoNoteType = EBTDisconnected;
-        iLog -> Log( _L("Generic info message type: EBTDisconnected") );
-        }
-    else if ( !aTypeString.Compare( _L( "EBTAudioAccessory" ) ) )
-        {
-        aGenericInfoNoteType = EBTAudioAccessory;
-        iLog -> Log( _L("Generic info message type: EBTAudioAccessory") );
-        }
-    else if ( !aTypeString.Compare( _L( "EBTAudioHandset" ) ) )
-        {
-        aGenericInfoNoteType = EBTAudioHandset;
-        iLog -> Log( _L("Generic info message type: EBTAudioHandset") );
-        }
-    else if ( !aTypeString.Compare( _L( "EBTClosed" ) ) )
-        {
-        aGenericInfoNoteType = EBTClosed;
-        iLog -> Log( _L("Generic info message type: EBTClosed") );
-        }
-    else if ( !aTypeString.Compare( _L( "EBTDeviceNotAvailable" ) ) )
-        {
-        aGenericInfoNoteType = EBTDeviceNotAvailable;
-        iLog -> Log( _L("Generic info message type: EBTDeviceNotAvailable") );
-        }
-    else if ( !aTypeString.Compare( _L( "EBTOfflineDisabled" ) ) )
-        {
-        aGenericInfoNoteType = EBTOfflineDisabled;
-        iLog -> Log( _L("Generic info message type: EBTOfflineDisabled") );
-        }
-    else if ( !aTypeString.Compare( _L( "EBTVisibilityTimeout" ) ) )
-        {
-        aGenericInfoNoteType = EBTVisibilityTimeout;
-        iLog -> Log( _L("Generic info message type: EBTVisibilityTimeout") );
-        }
-    else if ( !aTypeString.Compare( _L( "EBTEnterSap" ) ) )
-        {
-        aGenericInfoNoteType = EBTEnterSap;
-        iLog -> Log( _L("Generic info message type: EBTEnterSap") );
-        }
-    else if ( !aTypeString.Compare( _L( "EBTSapOk" ) ) )
-        {
-        aGenericInfoNoteType = EBTSapOk;
-        iLog -> Log( _L("Generic info message type: EBTSapOk") );
-        }
-    else if ( !aTypeString.Compare( _L( "EBTSapFailed" ) ) )
-        {
-        aGenericInfoNoteType = EBTSapFailed;
-        iLog -> Log( _L("Generic info message type: EBTSapFailed") );
-        }
-    else if ( !aTypeString.Compare( _L( "EBTSapNoSim" ) ) )
-        {
-        aGenericInfoNoteType = EBTSapNoSim;
-        iLog -> Log( _L("Generic info message type: EBTSapNoSim") );
-        }
-    else if ( !aTypeString.Compare( _L( "EBTDeviceBusy" ) ) )
-        {
-        aGenericInfoNoteType = EBTDeviceBusy;
-        iLog -> Log( _L("Generic info message type: EBTDeviceBusy") );
-        }
-    else if ( !aTypeString.Compare( _L( "EIRNotSupported" ) ) )
-        {
-        aGenericInfoNoteType = EIRNotSupported;
-        iLog -> Log( _L("Generic info message type: EIRNotSupported") );
-        }
-    else if ( !aTypeString.Compare( _L( "ECmdShowBtBatteryLow" ) ) )
-        {
-        aGenericInfoNoteType = ECmdShowBtBatteryLow;
-        iLog -> Log( _L("Generic info message type: ECmdShowBtBatteryLow") );
-        }
-    else if ( !aTypeString.Compare( _L( "ECmdShowBtBatteryCritical" ) ) )
-        {
-        aGenericInfoNoteType = ECmdShowBtBatteryCritical;
-        iLog -> Log( _L("Generic info message type: ECmdShowBtBatteryCritical") );
-        }
-    else if ( !aTypeString.Compare( _L( "EBTStayPowerOn" ) ) )
-        {
-        aGenericInfoNoteType = EBTStayPowerOn;
-        iLog -> Log( _L("Generic info message type: EBTStayPowerOn") );
-        }
-    else
-        {
-        iLog -> Log( _L("Generic info message type: No type matched") );
-        return KErrNotFound;
-        }
-    
-    return KErrNone;
-    }
-
-// -----------------------------------------------------------------------------
-// CBtNotifApiTest::GenericQueryNotifierTests
-// -----------------------------------------------------------------------------
-//
-
-TInt CBtNotifApiTest::GenericQueryNotifierTest( CStifItemParser& aItem )
-    {
-    TInt res;
-    TBTGenericQueryNotifierParams notifierParams;
-    TBTGenericQueryNoteType genericQueryNoteType;
-    TPtrC genericQueryNoteTypeString( KNullDesC );
-    
-    res = iNotifier -> Connect();
-    if ( res != KErrNone )
-        {
-        iLog -> Log( _L("Failed to connect RNotifier with value: %d"), res );
-        return res;
-        }   
-    iLog -> Log( _L("RNotifier connected") );
-    
-    res = aItem.GetNextString( genericQueryNoteTypeString );
-    if ( res != KErrNone )
-        {
-        iLog -> Log( _L("GetNextString failed with value: %d"), res );
-        iNotifier -> Close();
-        return res;
-        } 
-    
-    res = GetGenericQueryNoteType( genericQueryNoteTypeString, genericQueryNoteType );
-    if ( res != KErrNone )
-        {
-        iLog -> Log( _L("Generic query note type not found") );
-        iNotifier -> Close();
-        return res;
-        }
-    
-    notifierParams.iMessageType = genericQueryNoteType;
-    notifierParams.iNameExists = EFalse;   
-    TBTGenericQueryNotiferParamsPckg messageInfo( notifierParams );   
-    iNotifier -> StartNotifierAndGetResponse( iReqStatus, KBTGenericQueryNotifierUid, messageInfo, iGenericQueryReply );
-    iLog -> Log( _L("Notifier started") );
-    
-    return KErrNone;
-    }
-
-
-TInt CBtNotifApiTest::FinishGenericQuery( CStifItemParser& aItem )
-    {
-    TInt res;
-    TPtrC optionName( KNullDesC );
-    TTestOption option;
-    
-    res = aItem.GetNextString( optionName );   
-    if ( res != KErrNone )
-        {
-        iLog -> Log( _L("GetNextString failed with value: %d"), res );
-        iNotifier -> Close();
-        return res;
-        }  
-    
-    res = GetTestOption( optionName, option );
-    if ( res != KErrNone )
-        {
-        iLog -> Log( _L("GetTestOption failed with value: %d"), res );
-        iNotifier -> Close();
-        return res;
-        }   
-    
-    User::WaitForRequest( iReqStatus );
-    if ( iReqStatus.Int()!= KErrNone )
-        {
-        iLog -> Log( _L("Failed to get notifier's response: %d"), iReqStatus.Int() );
-        iNotifier -> Close();
-        return iReqStatus.Int();
-        }
-    iLog -> Log( _L("Notifier responded") );
-    
-    switch ( option )
-        {
-        case EQueryDiscarded:
-            iLog -> Log( _L("Notifier's response value: %b, expected: %b"), iGenericQueryReply(), EFalse );  
-            STIF_ASSERT_FALSE( iGenericQueryReply() );
-            break;
-        case EQueryAccepted:
-            iLog -> Log( _L("Notifier's response value: %b, expected: %b"), iGenericQueryReply(), ETrue );
-            STIF_ASSERT_TRUE( iGenericQueryReply() );
-            break;
-        default:
-            iLog -> Log( _L("Option unavailable") );
-            return KErrNotFound;
-        }
-    
-    iNotifier -> Close();
-    iLog -> Log( _L("Test case passed") );
-    
-    return KErrNone;
-    }
-
-
-TInt CBtNotifApiTest::GetGenericQueryNoteType( TPtrC aTypeString, TBTGenericQueryNoteType& aGenericQueryNoteType )
-    {   
-    if ( !aTypeString.Compare( _L( "EBTReceiveMessageQuery" ) ) )
-        {
-        aGenericQueryNoteType = EBTReceiveMessageQuery;
-        iLog -> Log( _L("Generic query message type: EBTReceiveMessageQuery") );
-        }
-    else if ( !aTypeString.Compare( _L( "EBTReceiveMessagePairedQuery" ) ) )
-        {
-        aGenericQueryNoteType = EBTReceiveMessagePairedQuery;
-        iLog -> Log( _L("Generic query message type: EBTReceiveMessagePairedQuery") );
-        }
-    else if ( !aTypeString.Compare( _L( "EBTIsOffQuery" ) ) )
-        {
-        aGenericQueryNoteType = EBTIsOffQuery;
-        iLog -> Log( _L("Generic query message type: EBTIsOffQuery") );
-        }
-    else if ( !aTypeString.Compare( _L( "EBTActivateOffLineQuery" ) ) )
-        {
-        aGenericQueryNoteType = EBTActivateOffLineQuery;
-        iLog -> Log( _L("Generic query message type: EBTActivateOffLineQuery") );
-        }
-    else if ( !aTypeString.Compare( _L( "EBTNoDevicesFoundQuery" ) ) )
-        {
-        aGenericQueryNoteType = EBTNoDevicesFoundQuery;
-        iLog -> Log( _L("Generic query message type: EBTNoDevicesFoundQuery") );
-        }
-    else if ( !aTypeString.Compare( _L( "EBTAcceptRequestQuery" ) ) )
-        {
-        aGenericQueryNoteType = EBTAcceptRequestQuery;
-        iLog -> Log( _L("Generic query message type: EBTAcceptRequestQuery") );
-        }
-    else if ( !aTypeString.Compare( _L( "EBTBlockConnectionQuery" ) ) )
-        {
-        aGenericQueryNoteType = EBTBlockConnectionQuery;
-        iLog -> Log( _L("Generic query message type: EBTBlockConnectionQuery") );
-        }
-    else if ( !aTypeString.Compare( _L( "EBTBlockPairedConnectionQuery" ) ) )
-        {
-        aGenericQueryNoteType = EBTBlockPairedConnectionQuery;
-        iLog -> Log( _L("Generic query message type: EBTBlockPairedConnectionQuery") );
-        }
-    else if ( !aTypeString.Compare( _L( "EBTIsNotShownQuery" ) ) )
-        {
-        aGenericQueryNoteType = EBTIsNotShownQuery;
-        iLog -> Log( _L("Generic query message type: EBTIsNotShownQuery") );
-        }
-    else if ( !aTypeString.Compare( _L( "EBTIsOffJavaQuery" ) ) )
-        {
-        aGenericQueryNoteType = EBTIsOffJavaQuery;
-        iLog -> Log( _L("Generic query message type: EBTIsOffJavaQuery") );
-        }
-    else
-        {
-        iLog -> Log( _L("Generic query message type: No type matched") );
-        return KErrNotFound;
-        }
-    
-    return KErrNone;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CBtNotifApiTest::GetTestOption
-// -----------------------------------------------------------------------------
-//
-
-TInt CBtNotifApiTest::GetTestOption( TPtrC aOptionString, TTestOption& aOption )
-    {    
-    if ( !aOptionString.Compare( _L( "DISCARD" ) ) )
-        {
-        aOption = EQueryDiscarded;
-        iLog -> Log( _L("Test type: EQueryDiscarded") );
-        }
-    else if ( !aOptionString.Compare( _L( "ACCEPT" ) ) )
-        {
-        aOption = EQueryAccepted;
-        iLog -> Log( _L("Test type: EQueryAccepted") );
-        }
-    else if ( !aOptionString.Compare( _L( "PASSKEY" ) ) )
-        {
-        aOption = ECheckPasskey;
-        iLog -> Log( _L("Test type: ECheckPasskey") );
-        }
-    else if ( !aOptionString.Compare( _L( "CANCEL" ) ) )
-        {
-        aOption = EQueryCanceled;
-        iLog -> Log( _L("Test type: EQueryCanceled") );
-        }
-    else
-        return KErrNotFound;  
- 
-    return KErrNone;
-    }
-
-TInt CBtNotifApiTest::TurnLightsOn( CStifItemParser& aItem )
-    {
-    TInt res;
-    res = RProperty::Set(KPSUidCoreApplicationUIs, KLightsControl, ELightsOn);
-    return res;
-    }
-
-
-// ========================== OTHER EXPORTED FUNCTIONS =========================
-// None
-
-//  [End of File] - Do not remove
--- a/bluetoothengine/btnotif/tsrc/BtNotifApiTest/src/BtSettingsObserver.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,133 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#include "BtSettingsObserver.h"
-
-CBtSettingsObserver::CBtSettingsObserver()
-    {
-    }
-
-CBtSettingsObserver::~CBtSettingsObserver()
-    {
-    delete iSettings;
-    if( iWaiter->IsStarted() )
-        {
-        iWaiter->AsyncStop();
-        }
-    delete iWaiter;
-    }
-
-CBtSettingsObserver* CBtSettingsObserver::NewLC()
-    {
-    CBtSettingsObserver* self = new ( ELeave ) CBtSettingsObserver();
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    return self;
-    }
-
-CBtSettingsObserver* CBtSettingsObserver::NewL()
-    {
-    CBtSettingsObserver* self = CBtSettingsObserver::NewLC();
-    CleanupStack::Pop(); // self;
-    return self;
-    }
-
-void CBtSettingsObserver::ConstructL()
-    {
-    iWaiter = new ( ELeave ) CActiveSchedulerWait();
-    iSettings = CBTEngSettings::NewL( this );
-    iError = KErrNone;
-    }
-
-void CBtSettingsObserver::PowerStateChanged( TBTPowerStateValue /*aState*/ )
-    {
-    if( iWaiter->IsStarted() )
-        {
-        iWaiter->AsyncStop();
-        }
-    }
-
-void CBtSettingsObserver::VisibilityModeChanged( TBTVisibilityMode /*aState*/ )
-    {
-    if( iWaiter->IsStarted() )
-        {
-        iWaiter->AsyncStop();
-        }
-    }
-
-TInt CBtSettingsObserver::GetPowerState( TBTPowerStateValue& aState )
-    {
-    iError = iSettings->GetPowerState( aState );
-    return iError;
-    }
-
-TInt CBtSettingsObserver::SetPowerState( TBTPowerStateValue aState )
-    {
-    TBTPowerStateValue state;
-    
-    iError = iSettings->GetPowerState( state );
-    if( iError )
-        {
-        return iError;
-        }
-    else if( state != aState )
-            {
-            if( state == EBTPowerOff )
-                {
-                iError = iSettings->SetPowerState( EBTPowerOn );
-                }
-            else
-                {
-                iError = iSettings->SetPowerState( EBTPowerOff );
-                }
-            
-            if( iError )
-                {
-                return iError;
-                }
-            else
-                {
-                if ( !iWaiter->IsStarted() )
-                    {
-                    iWaiter->Start();
-                    }
-                }
-            }
-    return iError;
-    }
-
-TInt CBtSettingsObserver::GetVisibilityMode( TBTVisibilityMode& /*aMode*/ )
-    {
-    return KErrNone;
-    }
-
-TInt CBtSettingsObserver::SetVisibilityMode( TBTVisibilityMode /*aMode*/, TInt /*aTime*/ )
-    {
-    return KErrNone;
-    }
-
-TInt CBtSettingsObserver::GetLocalName( TDes& aName )
-    {
-    iError = iSettings -> GetLocalName( aName );    
-    return iError;
-    }
-
-TInt CBtSettingsObserver::SetLocalName( const TDes& aName )
-    {
-    iError = iSettings -> SetLocalName( aName );    
-    return iError;
-    }
--- a/bluetoothengine/btserviceutil/bwins/btserviceutilu.def	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btserviceutil/bwins/btserviceutilu.def	Mon Jul 12 18:51:05 2010 +0300
@@ -32,4 +32,5 @@
 	?Device@CBtDevRepository@@QBEPBVCBtDevExtension@@ABVTBTDevAddr@@@Z @ 31 NONAME ; class CBtDevExtension const * CBtDevRepository::Device(class TBTDevAddr const &) const
 	?ReInitialize@CBtDevRepository@@QAEXXZ @ 32 NONAME ; void CBtDevRepository::ReInitialize(void)
 	?IsHeadset@CBtDevExtension@@SAHABVTBTDeviceClass@@@Z @ 33 NONAME ; int CBtDevExtension::IsHeadset(class TBTDeviceClass const &)
+	?NewLC@CBtDevExtension@@SAPAV1@ABVTBTDevAddr@@ABVTDesC16@@W4TDefaultDevNameOption@@@Z @ 34 NONAME ; class CBtDevExtension * CBtDevExtension::NewLC(class TBTDevAddr const &, class TDesC16 const &, enum TDefaultDevNameOption)
 
--- a/bluetoothengine/btserviceutil/eabi/btserviceutilu.def	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btserviceutil/eabi/btserviceutilu.def	Mon Jul 12 18:51:05 2010 +0300
@@ -40,4 +40,5 @@
 	_ZN15CBtDevExtension17IsUserAwareBondedERK17TBTNamelessDevice @ 39 NONAME
 	_ZN15CBtDevExtension8IsBondedERK17TBTNamelessDevice @ 40 NONAME
 	_ZN15CBtDevExtension9IsHeadsetERK14TBTDeviceClass @ 41 NONAME
+	_ZN15CBtDevExtension5NewLCERK10TBTDevAddrRK7TDesC1621TDefaultDevNameOption @ 42 NONAME
 
--- a/bluetoothengine/btserviceutil/export/btdevextension.h	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btserviceutil/export/btdevextension.h	Mon Jul 12 18:51:05 2010 +0300
@@ -77,14 +77,27 @@
 
     /**
      * Two-phase constructor
-     * @param aDev a CBTDevice instance. The ownership is transferred.
+     * @param aAddr the inquiry socket address of the device.
+     * @param aName the device-name of the device.
      * @param aNameOption the option for formating the default device
-     *  name when the given aDev instance has no valid name.
+     *  name when the given name is empty.
      */
     IMPORT_C static CBtDevExtension* NewLC( 
             const TInquirySockAddr& aAddr, 
             const TDesC& aName = KNullDesC,
             TDefaultDevNameOption aNameOption = EColonSeperatedBDAddr );        
+
+    /**
+     * Two-phase constructor
+     * @param aAddr the bd_addr of the device.
+     * @param aName the device-name of the device.
+     * @param aNameOption the option for formating the default device
+     *  name when the given name is empty.
+     */
+    IMPORT_C static CBtDevExtension* NewLC( 
+            const TBTDevAddr& aAddr, 
+            const TDesC& aName = KNullDesC,
+            TDefaultDevNameOption aNameOption = EColonSeperatedBDAddr );      
     
     /**
      * Destructor
--- a/bluetoothengine/btserviceutil/src/btdevextension.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btserviceutil/src/btdevextension.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -77,6 +77,27 @@
     }
 
 // ---------------------------------------------------------------------------
+// NewLC
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CBtDevExtension* CBtDevExtension::NewLC( 
+        const TBTDevAddr& aAddr,
+        const TDesC& aName,
+        TDefaultDevNameOption aNameOption )
+    {
+    CBtDevExtension* self = new (ELeave) CBtDevExtension( aNameOption );
+    CleanupStack::PushL( self );
+    CBTDevice* dev = CBTDevice::NewLC( aAddr );
+    if ( aName.Length() )
+        {
+        dev->SetDeviceNameL(  BTDeviceNameConverter::ToUTF8L( aName ) );
+        }
+    self->ConstructL( dev );
+    CleanupStack::Pop( dev );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
 // Destructor
 // ---------------------------------------------------------------------------
 //
@@ -248,12 +269,15 @@
     iAlias.Zero();
     if ( iDev->IsValidFriendlyName() && iDev->FriendlyName().Length() != 0 )
         {
-        iAlias.CreateL( iDev->FriendlyName() );
+        iAlias.ReAllocL(iDev->FriendlyName().Length());
+        iAlias.Append(iDev->FriendlyName());
         }
     // otherwise, device name, if it is available, will be displayed
     else if ( iDev->IsValidDeviceName() && iDev->DeviceName().Length() != 0 )
         {
-        iAlias.CreateL( BTDeviceNameConverter::ToUnicodeL(iDev->DeviceName() ) );
+        TBTDeviceName name = BTDeviceNameConverter::ToUnicodeL(iDev->DeviceName());
+        iAlias.ReAllocL(name.Length());
+        iAlias.Append(name);
         }
     if ( iAlias.Length() == 0 && 
         ( iNameOption == EColonSeperatedBDAddr || iNameOption == EPlainBDAddr ) )
--- a/bluetoothengine/btui/Ecom/data/1020742B.rss	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*        ECOM plugin resource file for BTUI plugin.
-*
-*
-*/
-
-#include <registryinfo.rh>
-
-RESOURCE REGISTRY_INFO theInfo
-	{
-	dll_uid     = 0x1020742B; 
-	interfaces  = 
-		{
-		INTERFACE_INFO
-			{
-			interface_uid   = 0x10207236; // UID for CGSPluginInterface 
-			implementations = 
-				{
-				IMPLEMENTATION_INFO
-					{
-					implementation_uid  = 0x1020742C; 
-					version_no          = 1;
-					display_name        = "GS Btui Plugin"; // Plugin debug name
-					default_data        = "0x10207250"; // Parent UID (BTUI is under "Connection" folder of General Setting Application)
-					opaque_data         = "30"; // Order number
-					}
-				};
-			},	
-		
-		INTERFACE_INFO
-			{
-			interface_uid   = 0x1020745F; // UID for CBtuiPluginInterface
-			implementations = 
-				{
-				IMPLEMENTATION_INFO
-					{
-					implementation_uid  = 0x1020745C; // implementation UID
-					version_no          = 1;
-					display_name        = "Btui Application Plugin for MainView"; // Plugin debug name 
-					},
-
-				IMPLEMENTATION_INFO
-					{
-					implementation_uid  = 0x1020745D; // implementation UID
-					version_no          = 1;
-					display_name        = "Btui Application Plugin for PairedDevicesView"; // Plugin debug name
-					},
-
-				IMPLEMENTATION_INFO
-					{
-					implementation_uid  = 0x20002780; // implementation UID
-					version_no          = 1;
-					display_name        = "Btui Application Plugin for BlockedDevicesView"; // Plugin debug name
-					}
-					
-				};
-				
-			}		
-			
-		};
-	}
-
--- a/bluetoothengine/btui/Ecom/data/BtuiViewResources.rss	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1440 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This file contains all the resources for the BTUI.
-*
-*/
-
-
-#include <data_caging_paths_strings.hrh>
-
-//  RESOURCE IDENTIFIER
-
-NAME    BVIE          // 4 letter ID
-
-//  INCLUDES
-#include <eikon.rh>
-#include "btui.hrh"   // Enums for these resources
-#include <btui.loc>   // Localisation file
-#include <btui.mbg>   // Icon indexes created by abld
-#include "eikon.rsg"
-#include <avkon.rsg>
-#include <avkon.rh>
-#include <avkon.mbg>
-#include <avkon.loc>
-#include <appinfo.rh>
-
-//  MACROS
-
-//  RESOURCE DEFINITIONS
-
-RESOURCE RSS_SIGNATURE { }
-
-RESOURCE TBUF { buf=""; }
-
-//----------------------------------------------------
-//
-//  Hotkeys for BTUI
-//
-//----------------------------------------------------
-//
-RESOURCE HOTKEYS r_btui_hotkeys
-    {
-    control=
-        {
-        HOTKEY { command=EAknCmdExit; key='e'; }
-        };
-    }
-
-// == MAIN VIEW ==============================================================
-
-RESOURCE CBA r_btui_softkeys_options_back__change
-    {
-    buttons =
-        {
-        CBA_BUTTON
-            {
-            id = EAknSoftkeyOptions;
-            txt = text_softkey_option;
-            },
-        CBA_BUTTON
-            {
-            id = EAknSoftkeyBack;
-            txt = text_softkey_back; 
-            },
-        CBA_BUTTON 
-            {
-            id = EBTUICmdMSK ;
-            txt = qtn_msk_change; 
-            }
-            
-        };
-    }
-
-
-
-
-//----------------------------------------------------
-//
-//  The main view of the BTUI application
-//
-//----------------------------------------------------
-//
-RESOURCE AVKON_VIEW r_btui_main_view
-    {
-    hotkeys = r_btui_hotkeys;
-    menubar = r_btui_menubar_main_view;
-    cba     = r_btui_softkeys_options_exit__change;
-    }
-
-//----------------------------------------------------
-//
-//  The main view's menu bar
-//
-//----------------------------------------------------
-//
-RESOURCE MENU_BAR r_btui_menubar_main_view
-    {
-    titles =
-        {
-        MENU_TITLE { menu_pane = r_btui_app_menu; txt=""; },
-        MENU_TITLE { menu_pane = r_btui_main_view_menu; txt=""; }
-        };
-    }
-
-//----------------------------------------------------
-//
-//  The main view options
-//
-//----------------------------------------------------
-//
-RESOURCE MENU_PANE r_btui_main_view_menu
-    {
-    items =
-        {
-        MENU_ITEM { command = EBTUICmdChangePowerStateMenu;   txt = qtn_bt_change_value; },
-        MENU_ITEM { command = EBTUICmdChangeVisibilityMenu;   txt = qtn_bt_change_value; },
-        MENU_ITEM { command = EBTUICmdChangeBTNameMenu;       txt = qtn_bt_change_value; }
-		#ifdef __BT_SAP
-		,
-		MENU_ITEM { command = EBTUICmdChangeSapStateMenu;   txt = qtn_bt_change_value; }
-		#endif
-        };
-    }
-
-//----------------------------------------------------
-//
-//  Editor for entering all settings
-//
-//----------------------------------------------------
-//
-RESOURCE LISTBOX r_bt_setting_editor
-    {
-    flags = EEikListBoxMultipleSelection;
-    }
-
-//----------------------------------------------------
-//
-//  The input dialog for entering power mode
-//
-//----------------------------------------------------
-//
-RESOURCE AVKON_SETTING_PAGE r_bt_power_setting_page
-    {
-    label              = qtn_bt_sett_module;
-    hint_text          = " ";
-    softkey_resource   = R_AVKON_SOFTKEYS_OK_CANCEL__OK;
-    type               = EAknSetListBox;
-    editor_resource_id = r_bt_setting_editor;
-    }
-
-//----------------------------------------------------
-//
-//  Bluetooth power modes
-//
-//----------------------------------------------------
-//
-RESOURCE ARRAY r_bt_power_modes
-    {
-    items =
-        {
-        LBUF { txt = qtn_bt_sett_on; },
-        LBUF { txt = qtn_bt_sett_off; }
-        };
-    }
-
-//----------------------------------------------------
-//
-//  The input dialog for bluetooth visibility setting
-//
-//----------------------------------------------------
-//
-RESOURCE AVKON_SETTING_PAGE r_bt_visibility_setting_page
-    {
-    label              = qtn_bt_sett_phone_visibility;
-    hint_text          = " ";
-    softkey_resource   = R_AVKON_SOFTKEYS_OK_CANCEL__OK;
-    type               = EAknSetListBox;
-    editor_resource_id = r_bt_setting_editor;
-    }
-
-//----------------------------------------------------
-//
-//  Bluetooth visibility modes
-//
-//----------------------------------------------------
-//
-RESOURCE ARRAY r_bt_visibility_modes
-    {
-    items =
-        {
-        LBUF { txt = qtn_bt_det_sett_general; },
-        LBUF { txt = qtn_bt_set_visibility_time; },
-        LBUF { txt = qtn_bt_hidden; }
-        };
-    }
-
-//----------------------------------------------------
-//
-//  The input dialog for bluetooth local name setting
-//
-//----------------------------------------------------
-//
-RESOURCE AVKON_SETTING_PAGE r_bt_name_setting_page
-    {
-    label   = qtn_bt_sett_bt_name;
-    type    = EEikCtEdwin;
-    softkey_resource   = R_AVKON_SOFTKEYS_OK_CANCEL__OK;    
-    editor_resource_id = r_bt_name_setting_editor;
-    }
-
-//----------------------------------------------------
-//
-//  Editor for entering BT's local name
-//
-//----------------------------------------------------
-//
-RESOURCE EDWIN r_bt_name_setting_editor
-    {
-    lines = 0; // Expanding to multiple rows
-    maxlength = KBTUIMaxNameLength;
-    flags = EEikEdwinNoLineOrParaBreaks;
-    }
-
-
-// === PAIRED DEVICES VIEW ===================================================
-
-//----------------------------------------------------
-//
-//  This view shows all paired Bluetooth devices.
-//
-//----------------------------------------------------
-//
-RESOURCE AVKON_VIEW r_btui_other_devices_view
-    {
-    hotkeys = r_btui_hotkeys;
-    menubar = r_btui_menubar_other_devices_view;
-    cba     = r_btui_softkeys_options_exit__conoptions; 
-    }
-    
-
-RESOURCE CBA r_btui_softkeys_options_exit__conoptions
-    {
-    buttons =
-        {
-        CBA_BUTTON
-            {
-            id = EAknSoftkeyOptions;
-            txt = text_softkey_option;
-            },
-        CBA_BUTTON
-            {
-            id = EAknSoftkeyExit;
-            txt = text_softkey_exit;
-            },
-        CBA_BUTTON
-            {
-            id = EAknSoftkeyContextOptions;//EAknSoftkeyOptions;
-            txt = text_softkey_option;
-            }
-            
-        };
-    }  
-    
-RESOURCE AVKON_VIEW r_btui_other_devices_view_gs
-    {
-    hotkeys = r_btui_hotkeys;
-    menubar = r_btui_menubar_other_devices_view;
-    cba     = r_btui_softkeys_options_back__conoptions; 
-    }
-//    menubar_context = r_btui_menubar_other_devices_view__context;
-// this is defined in CBTUIOtherDevicesView::DoActivate, since I did not
-// find a way to do this by resources
-
-RESOURCE CBA r_btui_softkeys_options_back__conoptions
-    {
-    buttons =
-        {
-        CBA_BUTTON
-            {
-            id = EAknSoftkeyOptions;
-            txt = text_softkey_option;
-            },
-        CBA_BUTTON
-            {
-            id = EAknSoftkeyBack;
-            txt = text_softkey_back; 
-            },
-        CBA_BUTTON
-            {
-            id = EAknSoftkeyContextOptions;//EAknSoftkeyOptions;
-            txt = text_softkey_option;
-            }
-            
-        };
-    }    
-    
-//----------------------------------------------------
-//
-//  The menubar for other paired devices view
-//
-//----------------------------------------------------
-//
-RESOURCE MENU_BAR r_btui_menubar_other_devices_view
-    {
-    titles =
-        {
-        MENU_TITLE { menu_pane = r_btui_app_menu; txt = ""; },
-        MENU_TITLE { menu_pane = r_btui_other_devices_view_menu; txt = ""; }
-        };
-    }
-
-
-RESOURCE MENU_BAR r_btui_menubar_other_devices_view_context
-    {
-    titles =
-        {
-        MENU_TITLE { menu_pane = r_btui_other_devices_view_menu_context; txt = ""; }
-        };
-    }
-
-//----------------------------------------------------
-//
-//  The other devices view options
-//
-//----------------------------------------------------
-//
-RESOURCE MENU_PANE r_btui_other_devices_view_menu
-    {
-    items =
-        {
-        MENU_ITEM { command = EBTUICmdNewPairedDevice;    txt = qtn_bt_new_paired_device; },
-        MENU_ITEM { command = EBTUICmdConnect;            txt = qtn_bt_gen_connect; },
-        MENU_ITEM { command = EBTUICmdConnectAudio;       txt = qtn_bt_connect; },
-        MENU_ITEM { command = EBTUICmdDisconnect;         txt = qtn_bt_disconnect; },
-        MENU_ITEM { command = EBTUICmdGiveNickname;       txt = qtn_bt_give_nickname; },
-        MENU_ITEM { command = EBTUICmdSetTrusted;         txt = qtn_bt_set_as_trusted; },
-        MENU_ITEM { command = EBTUICmdSetUnTrusted;       txt = qtn_bt_set_as_untrusted; },
-        MENU_ITEM { command = EBTUICmdSetBlocked;         txt = qtn_bt_block; },        
-        MENU_ITEM { command = EBTUICmdDelete;             txt = qtn_bt_delete; },
-        MENU_ITEM { command = EBTUICmdSettings;           txt = qtn_bt_settings; },
-        MENU_ITEM { command = EBTUICmdDeleteAll;          txt = qtn_bt_delete_all; }
-        };
-    }
-
-RESOURCE MENU_PANE r_btui_other_devices_view_menu_context
-    {
-    items =
-        {
-        MENU_ITEM { command = EBTUICmdNewPairedDevice;    txt = qtn_bt_new_paired_device; },
-        MENU_ITEM { command = EBTUICmdConnect;            txt = qtn_bt_gen_connect; },
-        MENU_ITEM { command = EBTUICmdConnectAudio;       txt = qtn_bt_connect; },
-        MENU_ITEM { command = EBTUICmdDisconnect;         txt = qtn_bt_disconnect; },
-        MENU_ITEM { command = EBTUICmdGiveNickname;       txt = qtn_bt_give_nickname; },
-        MENU_ITEM { command = EBTUICmdSetTrusted;         txt = qtn_bt_set_as_trusted; },
-        MENU_ITEM { command = EBTUICmdSetUnTrusted;       txt = qtn_bt_set_as_untrusted; },
-        MENU_ITEM { command = EBTUICmdSetBlocked;         txt = qtn_bt_block; },                
-        MENU_ITEM { command = EBTUICmdDelete;             txt = qtn_bt_delete; },
-        MENU_ITEM { command = EBTUICmdSettings;           txt = qtn_bt_settings; }
-        };
-    }
-
-
-// == APPLICATION ============================================================
-
-//----------------------------------------------------
-//
-//  The BTUI application level menu
-//  Common for all views
-//
-//----------------------------------------------------
-//
-RESOURCE MENU_PANE r_btui_app_menu
-    {
-    items =
-        {
-#ifdef __SERIES60_HELP
-        MENU_ITEM { command = EAknCmdHelp; txt = qtn_options_help; },
-#endif
-        MENU_ITEM { command = EAknCmdExit; txt = qtn_options_exit; }
-        };
-    }
-
-    
-
-// === QUERIES ===============================================================
-
-//----------------------------------------------------
-// Data query "Enter Bluetooth name for your phone"
-//----------------------------------------------------
-//
-RESOURCE DIALOG r_bt_enter_local_name_query
-    {
-    flags   = EGeneralQueryFlags;
-    buttons = R_AVKON_SOFTKEYS_OK_EMPTY__OK;
-    items   =
-        {
-        DLG_LINE
-            {
-            type    = EAknCtQuery;
-            id      = EGeneralQuery;
-            control = AVKON_DATA_QUERY
-                {
-                layout  = EDataLayout;
-                label   = qtn_enter_bt_name;
-                control = EDWIN
-                    {
-                    flags     = EEikEdwinNoHorizScrolling | EEikEdwinResizable | EEikEdwinNoLineOrParaBreaks;
-                    maxlength = KBTUIMaxNameLength;
-                    };
-                };
-            }
-        };
-    }
-
-//----------------------------------------------------
-// Confirmation query "You have active Bluetooth
-// connections on. Switch off anyway?"
-//----------------------------------------------------
-//
-RESOURCE DIALOG r_bt_switch_off_anyway_query
-    {
-    flags   = EGeneralQueryFlags;
-    buttons = R_AVKON_SOFTKEYS_YES_NO__YES;
-    items   =
-        {
-        DLG_LINE
-            {
-            type    = EAknCtQuery;
-            id      = EGeneralQuery;
-            control = AVKON_CONFIRMATION_QUERY
-                {
-                layout    = EConfirmationLayout;
-                label     = qtn_bt_switch_off_anyway;
-                animation = R_QGN_NOTE_QUERY_ANIM;
-                };
-            }
-        };
-    }
-
-//----------------------------------------------------
-// Confirmation query "Bluetooth is currently off.
-// Do you want to switch it on?"
-//----------------------------------------------------
-//
-RESOURCE DIALOG r_bt_is_off_query
-    {
-    flags   = EGeneralQueryFlags;
-    buttons = R_AVKON_SOFTKEYS_YES_NO__YES;
-    items   =
-        {
-        DLG_LINE
-            {
-            type    = EAknCtQuery;
-            id      = EGeneralQuery;
-            control = AVKON_CONFIRMATION_QUERY
-                {
-                layout    = EConfirmationLayout;
-                label     = qtn_bt_is_off;
-                animation = R_QGN_NOTE_QUERY_ANIM;
-                };
-            }
-        };
-    }
-
-//----------------------------------------------------
-// Confirmation query "Do you want to activate bluetooth in off-line mode?"
-//----------------------------------------------------
-//
-RESOURCE DIALOG r_bt_activate_in_offline_query
-    {
-    flags   = EGeneralQueryFlags;
-    buttons = R_AVKON_SOFTKEYS_YES_NO__YES;
-    items   =
-        {
-        DLG_LINE
-            {
-            type    = EAknCtQuery;
-            id      = EGeneralQuery;
-            control = AVKON_CONFIRMATION_QUERY
-                {
-                layout    = EConfirmationQueryLayout;
-                label     = qtn_bt_activate_in_offline;
-                animation = R_QGN_NOTE_QUERY_ANIM;
-                };
-            }
-        };
-    }
-
-//----------------------------------------------------
-// Confirmation query "Cancel pairing with: %U"
-//----------------------------------------------------
-//
-RESOURCE DIALOG r_bt_warn_erase_query
-    {
-    flags   = EGeneralQueryFlags;
-    buttons = R_AVKON_SOFTKEYS_YES_NO__YES;
-    items   =
-        {
-        DLG_LINE
-            {
-            type    = EAknCtQuery;
-            id      = EGeneralQuery;
-            control = AVKON_CONFIRMATION_QUERY
-                {
-                layout    = EConfirmationLayout;
-                animation = R_QGN_NOTE_QUERY_ANIM;
-                };
-            }
-        };
-    }
-
-RESOURCE TBUF r_bt_warn_erase { buf = qtn_bt_warn_erase; }
-RESOURCE TBUF r_bt_warn_erase_connected { buf = qtn_bt_warn_erase_connected; }
-
-//----------------------------------------------------
-// Confirmation query "Cancel all pairings"
-//----------------------------------------------------
-//
-RESOURCE DIALOG r_bt_warn_erase_all_query
-    {
-    flags   = EGeneralQueryFlags;
-    buttons = R_AVKON_SOFTKEYS_YES_NO__YES;
-    items   =
-        {
-        DLG_LINE
-            {
-            type    = EAknCtQuery;
-            id      = EGeneralQuery;
-            control = AVKON_CONFIRMATION_QUERY
-                {
-                layout    = EConfirmationLayout;
-                label     = qtn_bt_warn_erase_all;
-                animation = R_QGN_NOTE_QUERY_ANIM;
-                };
-            }
-        };
-    }
-
-//----------------------------------------------------
-// Confirmation query "Delete all pairings? Some devices may be disconnected."
-//----------------------------------------------------
-//
-RESOURCE DIALOG r_bt_warn_erase_all_connected_query
-    {
-    flags   = EGeneralQueryFlags;
-    buttons = R_AVKON_SOFTKEYS_YES_NO__YES;
-    items   =
-        {
-        DLG_LINE
-            {
-            type    = EAknCtQuery;
-            id      = EGeneralQuery;
-            control = AVKON_CONFIRMATION_QUERY
-                {
-                layout    = EConfirmationLayout;
-                label     = qtn_bt_warn_erase_all_connected;
-                animation = R_QGN_NOTE_QUERY_ANIM;
-                };
-            }
-        };
-    }
-
-//----------------------------------------------------
-// Data query "Enter alias"
-//----------------------------------------------------
-//
-RESOURCE DIALOG r_bt_enter_nickname_query
-    {
-    flags   = EGeneralQueryFlags;
-    buttons = R_AVKON_SOFTKEYS_OK_CANCEL__OK;
-    items   =
-        {
-        DLG_LINE
-            {
-            type    = EAknCtQuery;
-            id      = EGeneralQuery;
-            control = AVKON_DATA_QUERY
-                {
-                layout  = EDataLayout;
-                label   = qtn_bt_enter_nickname;
-                control = EDWIN
-                    {
-                    flags     = EEikEdwinNoHorizScrolling | EEikEdwinResizable;
-                    maxlength = KBTUIMaxAliasLength;
-                    };
-                };
-            }
-        };
-    }
-
-//----------------------------------------------------
-// Confirmation query "Set this device as trusted"
-//----------------------------------------------------
-//
-RESOURCE DIALOG r_bt_set_trusted_query
-    {
-    flags   = EGeneralQueryFlags;
-    buttons = R_AVKON_SOFTKEYS_YES_NO__YES;
-    items   =
-        {
-        DLG_LINE
-            {
-            type    = EAknCtQuery;
-            id      = EGeneralQuery;
-            control = AVKON_CONFIRMATION_QUERY
-                {
-                layout    = EConfirmationLayout;
-                label     = qtn_bt_conf_aut;
-                animation = R_QGN_NOTE_QUERY_ANIM;
-                };
-            }
-        };
-    }
-
-RESOURCE TBUF r_bt_set_as_trusted_prompt { buf = qtn_bt_conf_aut; }
-
-//----------------------------------------------------
-// Confirmation query "Disconnect from: %U"
-//----------------------------------------------------
-//
-RESOURCE DIALOG r_bt_disconnect_from_query
-    {
-    flags   = EGeneralQueryFlags;
-    buttons = R_AVKON_SOFTKEYS_YES_NO__YES;
-    items   =
-        {
-        DLG_LINE
-            {
-            type    = EAknCtQuery;
-            id      = EGeneralQuery;
-            control = AVKON_CONFIRMATION_QUERY
-                {
-                layout    = EConfirmationLayout;
-                animation = R_QGN_NOTE_QUERY_ANIM;
-                };
-            }
-        };
-    }
-
-RESOURCE TBUF r_bt_disconnect_from { buf = qtn_bt_disconn_from; }
-
-
-// === NOTES =================================================================
-
-//----------------------------------------------------
-// Information note "Phone is visible to other
-// Bluetooth devices."
-//----------------------------------------------------
-//
-RESOURCE DIALOG r_bt_phone_visib_to_oth_note
-    {
-    flags   = EAknInformationNoteFlags;
-    buttons = R_AVKON_SOFTKEYS_EMPTY;
-    items   =
-        {
-        DLG_LINE
-            {
-            type    = EAknCtNote;
-            id      = EBTUIPhoneVisibleToOthers;
-            control = AVKON_NOTE
-                {
-                layout          = EGeneralLayout;
-                singular_label  = qtn_bt_phone_visib_to_oth;
-                animation       = R_QGN_NOTE_INFO_ANIM;
-                };
-            }
-        };
-    }
-
-//----------------------------------------------------
-// Information note "Phone is hidden from others"
-//----------------------------------------------------
-//
-RESOURCE DIALOG r_bt_hidden_from_others
-    {
-    flags   = EAknInformationNoteFlags;
-    buttons = R_AVKON_SOFTKEYS_EMPTY;
-    items   =
-        {
-        DLG_LINE
-            {
-            type    = EAknCtNote;
-            id      = EBTUIHiddenFromOthersNote;
-            control = AVKON_NOTE
-                {
-                layout          = EGeneralLayout;
-                singular_label  = qtn_bt_hidden_from_others;
-                animation       = R_QGN_NOTE_INFO_ANIM;
-                };
-            }
-        };
-    }
-
-//----------------------------------------------------
-// Error note "Alias exists in Paired devices list."
-//----------------------------------------------------
-//
-RESOURCE DIALOG r_bt_name_exists_note
-    {
-    flags   = EAknErrorNoteFlags | EEikDialogFlagWait;
-    buttons = R_AVKON_SOFTKEYS_EMPTY;
-    items   =
-        {
-        DLG_LINE
-            {
-            type    = EAknCtNote;
-            id      = EBTUINameAlreadyExists;
-            control = AVKON_NOTE
-                {
-                layout          = EGeneralLayout;
-                singular_label  = qtn_bt_name_exists;
-                animation       = R_QGN_NOTE_ERROR_ANIM;
-                };
-            }
-        };
-    }
-
-//----------------------------------------------------
-// Error note "Invalid name entered, try again."
-//----------------------------------------------------
-//
-RESOURCE DIALOG r_bt_invalid_local_name_note
-    {
-    //removed
-    //Leave the name here to keep binary compatibility
-    }
-
-//----------------------------------------------------
-// Confirmation note "Device set as untrusted."
-//----------------------------------------------------
-//
-RESOURCE DIALOG r_bt_device_untrusted_note
-    {
-    flags   = EAknConfirmationNoteFlags;
-    buttons = R_AVKON_SOFTKEYS_EMPTY;
-    items   =
-        {
-        DLG_LINE
-            {
-            type    = EAknCtNote;
-            id      = EBTUIDeviceSetAsUntrusted;
-            control = AVKON_NOTE
-                {
-                layout          = EGeneralLayout;
-                singular_label  = qtn_bt_dev_set_as_untrust;
-                animation       = R_QGN_NOTE_OK_ANIM;
-                };
-            }
-        };
-    }
-
-//----------------------------------------------------
-// Wait note "Waiting for response from %U"
-//----------------------------------------------------
-//
-RESOURCE DIALOG r_bt_waiting
-    {
-    flags   = EAknWaitNoteFlags;
-    buttons = R_AVKON_SOFTKEYS_EMPTY; 
-    items   =
-        {
-        DLG_LINE
-            {
-            type    = EAknCtNote;
-            id      = EBTUIWaitingForPairing;
-            control = AVKON_NOTE
-                {
-                layout          = EWaitLayout;
-                singular_label  = qtn_bt_waiting;
-                animation       = R_QGN_GRAF_WAIT_BAR_ANIM;
-                };
-            }
-        };
-    }
-
-RESOURCE TBUF r_bt_waiting_prompt { buf = qtn_bt_waiting; }
-
-//----------------------------------------------------
-// Error note "Cannot execute Bluetooth operation
-// successfully!"
-//----------------------------------------------------
-//
-RESOURCE DIALOG r_bt_general_error_note
-    {
-    flags   = EAknErrorNoteFlags | EEikDialogFlagWait;
-    buttons = R_AVKON_SOFTKEYS_EMPTY;
-    items   =
-        {
-        DLG_LINE
-            {
-            type    = EAknCtNote;
-            id      = EBTUIGeneralError;
-            control = AVKON_NOTE
-                {
-                layout          = EGeneralLayout;
-                singular_label  = qtn_bt_general_error;
-                animation       = R_QGN_NOTE_ERROR_ANIM;
-                };
-            }
-        };
-    }
-
-
-//----------------------------------------------------
-// Wait note "Connecting to %U"
-//----------------------------------------------------
-//
-RESOURCE DIALOG r_bt_connecting_to_wait_note
-    {
-    flags   = EAknWaitNoteFlags;
-    buttons = R_AVKON_SOFTKEYS_CANCEL;
-    items   =
-        {
-        DLG_LINE
-            {
-            type    = EAknCtNote;
-            id      = EBTUIConnectingTo;
-            control = AVKON_NOTE
-                {
-                layout          = EWaitLayout;                
-                animation       = R_QGN_GRAF_WAIT_BAR_ANIM;
-                };
-            }
-        };
-    }
-
-RESOURCE TBUF r_bt_connecting_to { buf = qtn_bt_wait_connecting_to;}
-
-//----------------------------------------------------
-// Information note "Disconnect wired accessory"
-//----------------------------------------------------
-//
-RESOURCE DIALOG r_bt_disconnect_wired_note
-    {
-    flags   = EAknInformationNoteFlags;
-    buttons = R_AVKON_SOFTKEYS_EMPTY;
-    items   =
-        {
-        DLG_LINE
-            {
-            type    = EAknCtNote;
-            id      = EBTUIDisconnectWired;
-            control = AVKON_NOTE
-                {
-                layout          = EGeneralLayout;
-                singular_label  = qtn_bt_disconnect_wired;
-                animation       = R_QGN_NOTE_INFO_ANIM;
-                };
-            }
-        };
-    }
-
-//----------------------------------------------------
-// Information note "Cannot establish Bluetooth connection"
-//----------------------------------------------------
-//
-RESOURCE DIALOG r_bt_not_incall_note
-    {
-    flags   = EAknInformationNoteFlags;
-    buttons = R_AVKON_SOFTKEYS_EMPTY;
-    items   =
-        {
-        DLG_LINE
-            {
-            type    = EAknCtNote;
-            id      = EBTUINotIncall;
-            control = AVKON_NOTE
-                {
-                layout          = EGeneralLayout;
-                singular_label  = qtn_bt_not_incall;
-                animation       = R_QGN_NOTE_INFO_ANIM;
-                };
-            }
-        };
-    }
-
-//----------------------------------------------------
-// Information note "Disconnect %U first"
-//----------------------------------------------------
-//
-RESOURCE TBUF r_bt_disconnect_first_prompt { buf = qtn_bt_disconnect_first; }
-
-//----------------------------------------------------
-// Information note "Maximum amount of Bluetooth conn..."
-//----------------------------------------------------
-//
-RESOURCE DIALOG r_bt_busy
-    {
-    flags   = EAknInformationNoteFlags;
-    buttons = R_AVKON_SOFTKEYS_EMPTY;
-    items   =
-        {
-        DLG_LINE
-            {
-            type    = EAknCtNote;
-            id      = EBTUIBtBusy;
-            control = AVKON_NOTE
-                {
-                layout          = EGeneralLayout;
-                singular_label  = qtn_bt_busy;
-                animation       = R_QGN_NOTE_INFO_ANIM;
-                };
-            }
-        };
-    }
-
-//----------------------------------------------------
-// Information note "Bluetooth can't activated in off-line mode"
-//----------------------------------------------------
-//
-RESOURCE TBUF r_bt_offline_disabled { buf = qtn_bt_offline_disabled; }
-
-//----------------------------------------------------
-// Default value for "My Bluetooth name"
-//----------------------------------------------------
-//
-RESOURCE TBUF r_bt_default_local_name {	buf = qtn_bt_default_local_name; }
-
-
-// === GLOBAL QUERIES AND NOTES ==============================================
-
-//----------------------------------------------------
-// Global Information note "Audio routed to BT handsfree"
-//----------------------------------------------------
-//
-RESOURCE TBUF r_bt_audios_accessory_prompt { buf = qtn_bt_audio_accessory; }
-
-//----------------------------------------------------
-// Global Information note "Connected to %U"
-//----------------------------------------------------
-//
-RESOURCE TBUF r_bt_conf_connected_prompt { buf = qtn_bt_conf_connected; }
-
-//----------------------------------------------------
-// Global Information note "Disconnected from %U"
-//----------------------------------------------------
-//
-RESOURCE TBUF r_bt_conf_disconnected_prompt { buf = qtn_bt_conf_disconnected; }
-
-//----------------------------------------------------
-// Global Information note "Cannot establish Bluetooth connection"
-//----------------------------------------------------
-//
-RESOURCE TBUF r_bt_device_not_avail_note { buf = qtn_bt_device_not_avail; }
-
-//----------------------------------------------------
-// Global Information note "Hands-Free Profile not supported by %U"
-//----------------------------------------------------
-//
-RESOURCE TBUF r_bt_hfp_not_supported { buf = qtn_bt_hfp_not_supported; }
-
-//----------------------------------------------------
-// Global Information note "Unsupported device: %U"
-//----------------------------------------------------
-//
-RESOURCE TBUF r_bt_device_not_supported { buf = qtn_bt_device_not_supported; }
-
-// ===========================================================================
-
-//----------------------------------------------------
-// Titles for views
-//----------------------------------------------------
-//
-RESOURCE TBUF r_bt_title_bluetooth  { buf = qtn_bt_title_bluetooth; }
-RESOURCE TBUF r_bt_title_paired_dev { buf = qtn_bt_title_paired_dev; }
-
-//----------------------------------------------------
-// Empty list text
-//----------------------------------------------------
-//
-RESOURCE TBUF r_bt_no_paired_devices { buf = qtn_bt_no_paired_devices; }
-
-//----------------------------------------------------
-// Popup commands for paired devices view when
-// there are no devices
-//----------------------------------------------------
-//
-RESOURCE ARRAY r_bt_no_paired_devices_popup_commands
-    {
-    items = {
-        LBUF { txt = qtn_bt_new_paired_device; }
-        };
-    }
-
-//----------------------------------------------------
-// Standard popup commands for paired devices view
-//----------------------------------------------------
-//
-RESOURCE ARRAY r_bt_paired_devices_popup_commands
-    {
-    items = {		
-        LBUF { txt = qtn_bt_give_nickname; },        
-        LBUF { txt = qtn_bt_delete; }
-        };
-    }
-
-//----------------------------------------------------
-// Optional popup commands for paired devices view
-//----------------------------------------------------
-//
-RESOURCE TBUF r_bt_set_untrusted_command { buf = qtn_bt_set_as_untrusted; }
-
-RESOURCE TBUF r_bt_set_trusted_command { buf = qtn_bt_set_as_trusted; }
-
-RESOURCE TBUF r_bt_connect_command { buf = qtn_bt_connect; }
-
-RESOURCE TBUF r_bt_disconnect_command { buf = qtn_bt_disconnect; }
-
-
-//----------------------------------------------------
-// Format/label strings for main view
-// There is also TBTUIMainViewSettingFormatStrings enum
-// in the BTUI.hrh which must reflect EXACTLY this resource !
-//----------------------------------------------------
-//
-RESOURCE ARRAY r_bt_label_strings
-    {
-    items = {
-        LBUF { txt=" \t"qtn_bt_sett_module"\t\t"qtn_bt_sett_on; },
-        LBUF { txt=" \t"qtn_bt_sett_module"\t\t"qtn_bt_sett_off; },
-        LBUF { txt=" \t"qtn_bt_sett_phone_visibility"\t\t"qtn_bt_det_sett_general; },
-        LBUF { txt=" \t"qtn_bt_sett_phone_visibility"\t\t"qtn_bt_hidden; },
-        
-        //temp visible mode		
-        LBUF { txt=" \t"qtn_bt_sett_phone_visibility"\t\t" qtn_bt_temp_visible; },
-        
-        LBUF { txt=" \t"qtn_bt_sett_bt_name"\t\t"; }
-		#ifdef __BT_SAP
-		,
-		LBUF { txt=" \t"qtn_bt_sap"\t\t"qtn_bt_sap_enabled; },
-        LBUF { txt=" \t"qtn_bt_sap"\t\t"qtn_bt_sap_disabled; }
-		#endif
-        };
-    }
-
-
-#ifdef __BT_SAP
-//----------------------------------------------------
-//
-//  The input dialog for SIM access profile setting
-//
-//----------------------------------------------------
-//
-RESOURCE AVKON_SETTING_PAGE r_bt_sap_setting_page
-    {
-    label              = qtn_bt_sap;
-    hint_text          = " ";
-    softkey_resource   = R_AVKON_SOFTKEYS_OK_CANCEL__OK;
-    type               = EAknSetListBox;
-    editor_resource_id = r_bt_setting_editor;
-    }
-
-//----------------------------------------------------
-//
-//  Bluetooth sap modes
-//
-//----------------------------------------------------
-//
-RESOURCE ARRAY r_bt_sap_modes
-    {
-    items =
-        {
-        LBUF { txt = qtn_bt_sap_enabled; },
-        LBUF { txt = qtn_bt_sap_disabled; }
-        };
-    }  
-
-//----------------------------------------------------
-// Information Note "Enabling SIM Access Profile  
-// connection Bluetooth must be ON"
-//----------------------------------------------------
-//
-RESOURCE DIALOG r_bt_sap_enable_note
-    { 
-    flags   = EAknInformationNoteFlags;
-    buttons = R_AVKON_SOFTKEYS_OK_EMPTY__OK;
-    items   =
-        {
-        DLG_LINE
-            {
-            type    = EAknCtNote;
-            id      = EBTUIBtSapEnableNote;
-            control = AVKON_NOTE
-                {
-                layout           = EGeneralLayout;
-                singular_label   = qtn_bt_sap_enable_info;
-                animation        = R_QGN_NOTE_INFO_ANIM;
-                };
-            }
-        };
-    }
-#endif //__BT_SAP
-
-//  Visibility TIMEOUT
-//----------------------------------------------------
-//    
-//    r_setting_visibility_time_slider    
-//    visibility timeout setting slider
-//
-//----------------------------------------------------
-//
-RESOURCE SLIDER r_setting_visibility_time_slider 
-    {
-    layout = EAknSettingsItemSliderLayout;
-    minvalue = 1;
-    maxvalue = 60;
-    step = 1; 
-    valuetype = EAknSliderValueBareFigure;
-    singular_valuelabel = qtn_bt_slider_singular;
-        
-    minlabel = qtn_bt_slider_min;
-    maxlabel = qtn_bt_slider_max;
-    valuelabel = qtn_bt_slider_plural; 
-    }
-
-//----------------------------------------------------
-//    
-//    r_visibility_time_setting_page     
-//    visibility timeout setting page. 
-//
-//----------------------------------------------------
-//
-RESOURCE AVKON_SETTING_PAGE r_visibility_time_setting_page
-    { 
-    number = EAknSettingPageNoOrdinalDisplayed;
-    label = qtn_bt_slider_visibility_time;
-    type = EAknCtSlider;
-    softkey_resource   = R_AVKON_SOFTKEYS_OK_CANCEL__OK;    
-    editor_resource_id = r_setting_visibility_time_slider;
-    }
- 
-
-//----------------------------------------------------
-//  r_gs_btui_view_caption 
-// 
-// Btui view caption for GS plugin
-//----------------------------------------------------
-//
-RESOURCE TBUF r_gs_btui_view_caption
-    {
-    buf = qtn_set_folder_bluetooth;
-    }
-
-//----------------------------------------------------
-//
-//  The main view of the BTUI as GS plugin
-//
-//----------------------------------------------------
-//
-RESOURCE AVKON_VIEW r_btui_main_view_gs_plugin
-    {
-    hotkeys = r_btui_hotkeys;
-    menubar = r_btui_menubar_main_view;
-    cba     = r_btui_softkeys_options_back__change;   
-    }
-    
-RESOURCE CBA r_btui_softkeys_options_exit__change
-    {
-    buttons =
-        {
-        CBA_BUTTON
-            {
-            id = EAknSoftkeyOptions;
-            txt = text_softkey_option; 
-            },
-        CBA_BUTTON
-            {
-            id = EAknSoftkeyExit;
-            txt = text_softkey_exit; 
-            },
-        CBA_BUTTON 
-            {
-            id = EBTUICmdMSK ;
-            txt = qtn_msk_change; 
-            }
-            
-        };
-    }    
-
-//----------------------------------------------------
-// Audio connection confirmation query 
-//----------------------------------------------------
-//
-RESOURCE DIALOG r_bt_connect_query
-    {
-    flags   = EGeneralQueryFlags;
-    buttons = R_AVKON_SOFTKEYS_YES_NO__YES;
-    items   =
-        {
-        DLG_LINE
-            {
-            type    = EAknCtQuery;
-            id      = EGeneralQuery;
-            control = AVKON_CONFIRMATION_QUERY
-                {
-                layout    = EConfirmationLayout;
-                animation = R_QGN_NOTE_QUERY_ANIM;
-                };
-            }
-        };
-     }
-     
-// === BLOCKED DEVICES VIEW ===================================================
-
-//----------------------------------------------------
-//
-//  This view shows all blocked Bluetooth devices.(for GS)
-//
-//----------------------------------------------------
-//
-RESOURCE AVKON_VIEW r_btui_block_devices_view_gs
-    {
-    hotkeys = r_btui_hotkeys;
-    menubar = r_btui_menubar_block_devices_view;
-    cba     = r_btui_softkeys_options_back__unblock ;
-    }
-
-//----------------------------------------------------
-//
-//  The menubar buttons for blocked devices view
-//  MSK is dimmed when needed.
-//
-//----------------------------------------------------
-//
-
-
-RESOURCE CBA r_btui_softkeys_options_back__unblock
-    {
-    buttons =
-        {
-        CBA_BUTTON
-            {
-            id = EAknSoftkeyOptions;
-            txt = text_softkey_option; 
-            },
-        CBA_BUTTON
-            {
-            id = EAknSoftkeyBack;
-            txt = text_softkey_back; 
-            },
-        CBA_BUTTON 
-            {
-            id = EBTUICmdUnblock ;
-            txt = qtn_msk_delete ;
-            }
-            
-        };
-    }
-    
-//----------------------------------------------------
-//
-//  This view shows all blocked Bluetooth devices.(bt application) 
-//
-//----------------------------------------------------
-//
-RESOURCE AVKON_VIEW r_btui_block_devices_view
-    {
-    hotkeys = r_btui_hotkeys;
-    menubar = r_btui_menubar_block_devices_view;
-    cba     = r_btui_softkeys_options_exit__unblock ;
-    }
-
-//----------------------------------------------------
-//
-//  The menubar buttons for blocked devices view
-//  MSK is dimmed when needed.
-//
-//----------------------------------------------------
-//
-
-
-RESOURCE CBA r_btui_softkeys_options_exit__unblock
-    {
-    buttons =
-        {
-        CBA_BUTTON
-            {
-            id = EAknSoftkeyOptions;
-            txt = text_softkey_option; 
-            },
-        CBA_BUTTON
-            {
-            id = EAknSoftkeyExit;
-            txt = text_softkey_exit;
-            },
-        CBA_BUTTON 
-            {
-            id = EBTUICmdUnblock ;
-            txt = qtn_msk_delete ;
-            }
-            
-        };
-    }
-    
-//----------------------------------------------------
-//
-//  The menubar for other blocked devices view
-//
-//----------------------------------------------------
-//
-RESOURCE MENU_BAR r_btui_menubar_block_devices_view
-    {
-    titles =
-        {
-        MENU_TITLE { menu_pane = r_btui_app_menu; txt = ""; },
-        MENU_TITLE { menu_pane = r_btui_block_devices_view_menu; txt = ""; }
-        };
-    }
-
-
-//----------------------------------------------------
-//
-//  The blocked devices view options
-//
-//----------------------------------------------------
-//
-RESOURCE MENU_PANE r_btui_block_devices_view_menu
-    {
-    items =
-        {
-        MENU_ITEM { command = EBTUICmdUnblock;    	txt = qtn_bt_delete;},
-        MENU_ITEM { command = EBTUICmdUnblockAll;   txt = qtn_bt_delete_all; }
-        };
-    }
-
-//-----------------------------------------------
-//Title for blocked device view    
-//------------------------------------------------
-//
-RESOURCE TBUF r_bt_title_blocked_dev { buf = qtn_bt_title_blocked_devices; }
-// empty listy
-RESOURCE TBUF r_bt_no_blocked_devices { buf = qtn_bt_no_blocked_devices; }
-// Information note "Disconnect %0U device and %1U device first"
-//----------------------------------------------------
-//
-RESOURCE TBUF r_bt_disconnect_first_stereo_prompt { buf = qtn_bt_disconnect_first_stereo; }
-
-
-RESOURCE TBUF r_bt_warn_erase_blocked
-{
-	buf=qtn_bt_warn_erase_blocked;
-}
-RESOURCE TBUF r_bt_warn_erase_all_blocked
-{
-	buf=qtn_bt_warn_erase_all_blocked;
-}
-
-RESOURCE DIALOG r_bt_generic_query
-    {
-    flags   = EGeneralQueryFlags;
-    buttons = R_AVKON_SOFTKEYS_YES_NO__YES;
-    items   =
-        {
-        DLG_LINE
-            {
-            type    = EAknCtQuery;
-            id      = EGeneralQuery;
-            control = AVKON_CONFIRMATION_QUERY
-                {
-                layout    = EConfirmationQueryLayout;
-                animation = R_QGN_NOTE_QUERY_ANIM;
-                };
-            }
-        };
-    }      
-
-RESOURCE TBUF r_bt_option_block_device_header  
-{
-	buf=qtn_bt_block_device_header     ;
-}
-RESOURCE TBUF r_bt_option_block_paired_device_help
-{
-		buf= qtn_bt_block_paired_device "\n\n" qtn_bt_block_device_link;
-}
-
-RESOURCE TBUF r_bt_option_block_paired_device_nohelp
-{
-		buf=qtn_bt_block_paired_device;
-}
-
-RESOURCE TBUF r_bt_option_block_connected_paired_devices_help
-{
-		buf= qtn_bt_block_connected_paired_devices "\n\n" qtn_bt_block_device_link;
-}
-
-RESOURCE TBUF r_bt_option_block_connected_paired_devices_nohelp
-{
-		buf= qtn_bt_block_connected_paired_devices ;
-}
-RESOURCE TBUF r_bt_block_device_link
-	{
-		buf=qtn_bt_block_device_link;
-	}
-	
-RESOURCE DIALOG r_bt_message_query 
-    {
-    flags = EGeneralQueryFlags | EEikDialogFlagNoBorder | EEikDialogFlagNoShadow;
-    buttons = R_AVKON_SOFTKEYS_YES_NO__YES;
-    items=
-        {
-		DLG_LINE 
-	        {
-            type = EAknCtPopupHeadingPane;
-            id = EAknMessageQueryHeaderId;
-            control = AVKON_HEADING
-                {
-                label = header_not_defined;
-                };
-            },
-        DLG_LINE
-            {
-            type = EAknCtMessageQuery;
-            id = EAknMessageQueryContentId;
-            control = AVKON_MESSAGE_QUERY
-                {
-                };
-            }
-        };
-    }
-
-RESOURCE TBUF r_cp_detail_bt_off { buf= qtn_cp_detail_bt_off; }   
-RESOURCE TBUF r_cp_detail_bt_on_shown {	buf= qtn_cp_detail_bt_on_shown; }	
-RESOURCE TBUF r_cp_detail_bt_on_hidden {	buf= qtn_cp_detail_bt_on_hidden; }	
-RESOURCE TBUF r_cp_detail_bt_conn_shown {	buf= qtn_cp_detail_bt_conn_shown; }	
-RESOURCE TBUF r_cp_detail_bt_conn_hidden {	buf= qtn_cp_detail_bt_conn_hidden; }	
-
-RESOURCE TBUF r_bt_ssp_incorrect_passcode { buf = qtn_bt_simple_incorrect_passcode;}
-RESOURCE TBUF r_bt_ssp_passcode_retry { buf = qtn_bt_simple_passcode_retry; }
-
-// End of File
--- a/bluetoothengine/btui/Ecom/group/BtuiPlugin.mmp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,134 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This module contains the views of BTUI.
-*
-*/
-
-
-#include <platform_paths.hrh>
-#include <data_caging_paths.hrh>
-#include <bldvariant.hrh>
-
-
-CAPABILITY          CAP_ECOM_PLUGIN NetworkControl
-TARGET              BtuiPlugin.dll 
-TARGETTYPE          PLUGIN
-UID                 0x10009D8D 0x1020742B // UPDATE THIS
-VENDORID            VID_DEFAULT
-
-//********* UIDs *************
-//0x1020742B 	//DLL UID
-//0x1020742C 	//Impl1. UID
-//0x1020745C	//impl2. UID
-//0x1020745D	//impl3. UID 
-//****************************
-
-SOURCEPATH      ../src
-SOURCE          BTUIMainContainer.cpp
-SOURCE          BTUIMainView.cpp
-SOURCE          BTUIViewsCommonUtils.cpp
-SOURCE          BTUIKeyWatcher.cpp
-SOURCE          BTUIActive.cpp
-
-#ifdef __BT_SAP
-SOURCE          BTUISap.cpp
-#else
-SOURCE          BTUINonSap.cpp
-#endif
-
-SOURCE          BTUIBlockedDevicesView.cpp
-SOURCE          BTUIPairedDevicesView.cpp
-SOURCE          BTUIDeviceContainer.cpp
-SOURCE          BtuiPluginImplementationTable.cpp
-SOURCE          btuipluginman.cpp
-
-//BTUI plugin resource definition
-START RESOURCE  ../data/BtuiViewResources.rss
-HEADER
-TARGETPATH 		RESOURCE_FILES_DIR
-LANGUAGE_IDS
-END  
-
-
-//***********ECOM resource definition******************
-//--Ecom resource TARGET name must be same as DLL name,
-//--otherwise Ecom won't recognise it. 
-//*****************************************************
-START RESOURCE      ../data/1020742B.rss
-TARGET              BtuiPlugin.rsc   
-END 
-
-
-USERINCLUDE     ../inc	
-USERINCLUDE     ../../inc	
-USERINCLUDE	../data //for documents
-
-
-SYSTEMINCLUDE   ../../inc   	//for private API headers (BluetoothEngine subsystem)
-SYSTEMINCLUDE   ../../../inc    //for internal API headers (localconnectivity)
-APP_LAYER_SYSTEMINCLUDE
-
-SYSTEMINCLUDE   /epoc32/include/ecom
-
-#ifdef __SERIES60_HELP
-SYSTEMINCLUDE   /epoc32/include/cshelp
-#endif
-LIBRARY         btdevmodel.lib	// Model of BTUI 
-LIBRARY         btengdiscovery.lib	// device search
-LIBRARY         btengsettings.lib	// main settings view
-LIBRARY			btengdevman.lib		// sap name,PairedDevicesView,Blocked devices view
-LIBRARY			btengconnman.lib	// sap address, connect/disconnect device
-LIBRARY			btmanclient.lib		// TBTRegistrySearch for sap address
-LIBRARY         euser.lib apparc.lib cone.lib       // Symbian OS framework libraries
-LIBRARY         eikcore.lib eikcoctl.lib eikctl.lib // UIKON libraries
-LIBRARY         avkon.lib                           // Series 60 UI library
-LIBRARY         bafl.lib                            // Basic Application Framework Library
-LIBRARY         btdevice.lib                        // Bluetooth device handling routines
-LIBRARY         bluetooth.lib                       // Bluetooth device address handling routines
-LIBRARY         commonengine.lib                    // Series 60 common components library publish & subsribe and string loader
-LIBRARY         aknnotify.lib                       // Avkon global notes
-LIBRARY         AknSkins.lib                        // Skinned icons
-LIBRARY         aknicon.lib
-LIBRARY         centralrepository.lib               // Central Repository
-LIBRARY         FeatMgr.lib
-LIBRARY         ecom.lib
-LIBRARY         charconv.lib
-LIBRARY         esock.lib
-
-LIBRARY     	GSEcomPlugin.lib
-LIBRARY         GSFramework.lib
-
-// For cover display support:
-LIBRARY         eikdlg.lib
-LIBRARY         estor.lib
-
-
-#ifdef __BT_SAP
-//LIBRARY         BTSap.lib
-#endif
-                
-DEBUGLIBRARY    flogger.lib                         // File logging services
-
-#ifdef __SERIES60_HELP
-LIBRARY         hlplch.lib                          // Help library
-#endif
-
-LIBRARY         egul.lib 
-LIBRARY         btfeatures.lib
-
-// This is optional - used only by Codewarrior IDE for .RSS file editing.
-//DOCUMENT            ../data/1020742B.rss 
-//DOCUMENT            ../data/BtuiViewResources.rss
-
-//**** End of .mmp *****
--- a/bluetoothengine/btui/Ecom/group/bld.inf	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This file provides project information required for BTUI/ECOM.
-*
-*/
-
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-
-PRJ_EXPORTS
-
-PRJ_MMPFILES
-./BtuiPlugin.mmp 
-
-  
-//---End of File---  
--- a/bluetoothengine/btui/Ecom/inc/BTUIActive.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,199 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Active object helper class.
-*
-*/
-
-
-
-#ifndef BTUIACTIVE_H
-#define BTUIACTIVE_H
-
-
-#include <e32base.h>
-
-class CBTUIActive;
-
-/**
- *  Class MBTUIActiveObserver
- *
- *  Callback class for receiving a completed active object event.
- *  Users of CBTUIActive need to derive from this class. 
- * 
- *  @since S60 v5.0
- */
-class MBTUIActiveObserver
-    {
-
-public:
-
-    /**
-     * Callback to notify that an outstanding request has completed.
-     *
-     * @since S60 v5.0
-     * @param aActive Pointer to the active object that completed.
-     * @param aId The ID that identifies the outstanding request.
-     * @param aStatus The status of the completed request.
-     */
-    virtual void RequestCompletedL( CBTUIActive* aActive, TInt aId, 
-                                    TInt aStatus ) = 0;
-
-    /**
-     * Callback to notify that an error has occurred in RunL.
-     *
-     * @param aActive Pointer to the active object that completed.
-     * @param aId The ID that identifies the outstanding request.
-     * @param aStatus The status of the completed request.
-     */
-    virtual void HandleError( CBTUIActive* aActive, TInt aId, 
-                                    TInt aError ) = 0;
-
-    };
-
-
-/**
- *  Class CBTUIActive
- *
- *  Base clase for active objects used in BTUI
- *
- *  @since S60 v5.0
- */
-NONSHARABLE_CLASS( CBTUIActive ) : public CActive
-    {
-
-public:
-
-    /**
-     * Two-phase constructor
-     *
-     * @since S60 v5.0
-     * @param aObserver Pointer to callback interface that receives notification
-     *                  that the request has been completed.
-     * @param aId The request ID
-     * @param aPriority Active Object Priority 
-     * @return Pointer to the constructed CBTUIActive object.
-     */
-    static CBTUIActive* NewL( MBTUIActiveObserver* aObserver, 
-                                TInt aId, TInt aPriority );
-
-    /**
-     * Destructor
-     */
-    virtual ~CBTUIActive();
-
-    /**
-     * Get the request ID of this active object.
-     *
-     * @since S60 v5.0
-     * @return The request ID of this active object.
-     */
-    TInt RequestId();
-    
-    /**
-     * Set a new request ID for this active object.
-     *
-     * @since S60 v5.0
-     * @param The new request ID of this active object.
-     */
-    void SetRequestId( TInt aId );
-    
-    /**
-     * Activate the active object.
-     *
-     * @since S60 v5.0
-     */
-    void GoActive();
-
-    /**
-     * Cancel an outstanding request.
-     *
-     * @since S60 v5.0
-     */
-    void CancelRequest();
-
-    /**
-     * Get a reference to the active object request status.
-     *
-     * @since S60 v5.0
-     * @return Reference to the active object request status.
-     */
-    TRequestStatus& RequestStatus();
-
-// from base class CActive
-
-    /**
-     * From CActive.
-     * Called by the active scheduler when the request has been cancelled.
-     *
-     * @since S60 v5.0
-     */
-    void DoCancel();
-
-    /**
-     * From CActive.
-     * Called by the active scheduler when the request has been completed.
-     *
-     * @since S60 v5.0
-     */
-    void RunL();
-
-    /**
-     * From CActive.
-     * Called by the active scheduler when an error in RunL has occurred.
-     * Error handling is really done by callback in HandleError().
-     *
-     * @since S60 v5.0
-     * @param aError Error occured in Active Object's RunL().
-     * @return KErrNone. 
-     */
-    TInt RunError( TInt aError );
-
-private:
-
-    /**
-     * C++ default constructor
-     *
-     * @since S60 v5.0
-     * @param aObserver Pointer to callback interface that receives notification
-     *                  that the request has been completed.
-     * @param aId ID of the request (for the client to keep track of multiple 
-     *            active objects).
-     * @param aPriority Priority of 
-     */
-    CBTUIActive( MBTUIActiveObserver* aObserver, TInt aId, TInt aPriority );
-
-    /**
-     * Symbian 2nd-phase constructor
-     *
-     * @since S60 v5.0
-     */
-    void ConstructL();
-
-private: // data
-
-    /**
-     * ID of the request (used only by our client).
-     */
-    TInt iRequestId;
-
-    /**
-     * Our observer.
-     * Not own.
-     */
-    MBTUIActiveObserver* iObserver;
-
-    };
-
-
-#endif // BTUIACTIVE_H
--- a/bluetoothengine/btui/Ecom/inc/BTUIBlockedDevicesView.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,176 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  The view that handles paired devices.
-*
-*/
-
-#ifndef BTUIBLOCKEDDEVICESVIEW_H
-#define BTUIBLOCKEDDEVICESVIEW_H
-
-#include <aknview.h>
-#include <eikmenup.h>       // Menu pane definitions
-#include <btengdevman.h>
-#include "BtuiPluginInterface.h"
-#include "BTUIListedDevicesView.h"
-#include <gstabbedview.h>
-
-
-class CGSTabHelper;
-class CBTUIMainView;  //base view
-class CBTUiDeviceContainer;        
-class CBTDevModel;
-
-/**
-* Blocked devicew view of the pluetooth application.
-*
-* This view handles lists of blocked devices and the abolity to unblock them.
-*
-*@lib BTUIPlugin.dll
-*@since S60 v3.2
-*/
-class CBTUIBlockedDevicesView : public CBTUIListedDevicesView,
-		                      public MGSTabbedView 
-
-    {
-    public: // New functions
-		
-		/**
-        * Symbian 2nd phase constructor.
-        */       
-        void ConstructL( );
-        
-		/**
-        * Symbian 2nd phase constructor when serve as GS plugin.
-        * @param aBaseView, GS base view pointer.
-        * @param aTabViewArray, the array which contains all the tabed views' pointer.
-        * @return None. 
-        */         
-        void ConstructL( CBTUIMainView* aBaseView, CArrayPtrFlat<MGSTabbedView>* aTabViewArray );
-        
-        /*
-        * ECOM implementation instantiation factory function of 
-        * interface "CBtuiPluginInterface", to be used by BTUI Application.
-        */        
-        static CBTUIBlockedDevicesView* NewL(MBtuiPluginViewActivationObserver* aObserver = NULL);
- 
- 		/**
-        * Symbian 2 phase constructor used by base view when serve as GS plugin.
-       	* @param aBaseView, GS base view pointer.
-        * @param aTabViewArray, the array which contains all the tabed views' pointer.        
-        * @return None.
-        */ 		
-        static CBTUIBlockedDevicesView* NewLC(CBTUIMainView* aBaseView, 
-        					CArrayPtrFlat<MGSTabbedView>* aTabViewArray);  
-        					         
-		/**
-        * Destructor.
-        */
-        virtual ~CBTUIBlockedDevicesView();       
-        
-            
-        /**
-        * From MGSTabbedView:
-        * Creates new icon for tab. Ownership is transferred to client.
-        * @since 3.1
-        */       	
-    	CGulIcon* CreateTabIconL();
-    	
-    public: // Functions from base classes
-        
-        /**
-        * From CAknView Returns view id.
-        * @param None.
-        * @return View id.
-        */
-        TUid Id() const;
-
-        /**
-        * From CAknView Handles user commands.
-        * @param aCommand A command id.        
-        * @return None.
-        */
-        void HandleCommandL(TInt aCommand);
-        
-		/** Dim/unDim middleSoftkey.
-		 * This function is called by CBTUiDeviceContainer
-		 * durings screen refreshes based on if there are devices or not.
-         *
-		 * @param aDimmed. If this is true the middleSoftKey is invisible. 
-		 */
-		void DimMskL(TBool aDimmed);
-		
-        /**
-        * From CAknView Dynamically initialises options menu.
-        * @param aResourceId Id identifying the menu pane to initialise.
-        * @param aMenuPane The in-memory representation of the menu pane.
-        * @return None.
-        */
-        void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane);    
-            
-    public:
-    	/**
-        * Informs the observer that adevice has been changes or a new device added.
-        * @param aErr Symbian error code
-        * @param aDevice the device which is changed.  If iAddr == 0, it's for notifiying "GetAllDevices()", 
-        * @param aEnable True: pair/authorize/block/connect; False: unpair/unauthorize/unblock/disconnect
-        * @param aDevNameArray hold conflicting devices' short names if "AlreadyExist" error happened during "connect"
-        * @return None.
-        */    
-  		void NotifyChangeDeviceComplete(const TInt aErr, const TBTDevice& aDevice, 
-          											const RBTDevNameArray* aDevNameArray = NULL);        
-          
-		/** Updates the shown device list. This module will send this list forward
-		 * to container that takes care of the actual display of those devices
-		 *
-		 *@param aDevices all the devices to be shown
-		 *@param aSelectedItemIndex currently selected item after refresh.
-		 */
-		void RefreshDeviceList(const RDeviceArray* aDevices,TInt aSelectedItemIndex);
-
-	protected:		
-        /**
-        * C++ default constructor.
-        */
-        CBTUIBlockedDevicesView (MBtuiPluginViewActivationObserver* aObserver= NULL);	
-
-    private: // Functions from base classes
-
-        /**
-        * From CAknView Activates view.
-        * @param aPrevViewId Id of previous view.
-        * @param aCustomMessageId Custom message id.
-        * @param aCustomMessage Custom message.
-        * @return None.
-        */
-        void DoActivateL( const TVwsViewId& aPrevViewId,
-                                TUid aCustomMessageId,
-                          const TDesC8& aCustomMessage );
-
-        /**
-        * From CAknView Deactivates view.        
-        * @param None.
-        * @return None.
-        */
-        void DoDeactivate();       
-       
-    private: // Data
-        
-        CGSTabHelper* 					iTabHelper;
-	    CBTUIMainView*					iBaseView; 
-		TBool							iConstructAsGsPlugin;	// Flag that indicate this obj is served as GS plugin not BTUI app's plugin.    
-		MBtuiPluginViewActivationObserver* iActivationObserver; // view activation observer
-    };
-
-#endif
-
--- a/bluetoothengine/btui/Ecom/inc/BTUIDeviceContainer.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,206 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  The view that handles paired devices.
-*
-*/
-#ifndef BTUIDEVICECONTAINER_H
-#define BTUIDEVICECONTAINER_H
-
-#include <aknview.h>                // AVKON components
-#include <aknlists.h>
-#include <aknPopup.h>               // Commands popup window
-#include <eikclbd.h>                // For column listbox access
-#include <AknIconArray.h>
-
-#include "btdevmodel.h"
-#include "btui.hrh"
-
-class CBTEngConnMan;
-class CAknView;
-class CBTDevModel;
-class CBTUIListedDevicesView;
-
-/**
-* This class displays lists of bluetooth devices.
-*
-* This class is used by blocked devices view and paired devices view to show
-* lists of blocked or paired devices.
-*
-*@lib BTUIPlugin.dll
-*@since S60 v3.2
-*/
-NONSHARABLE_CLASS(CBTUiDeviceContainer) : public CCoeControl, 
-			public MCoeControlObserver,
-			public MEikListBoxObserver  
-    {
-    public: // Constructors and destructor
-
-        /** Create new instance
-	     * @param aView PairedDevicesView or BlockedDevicesView.
-	     * @param aStorage The handler of 
-	     * @param aContainerMode are we serving as blocked or paired device list		
-	     * @param aParent used by SetMopParent
-		 */	
-		static CBTUiDeviceContainer* NewL(const TRect& aRect, 
-			CBTUIListedDevicesView* aView, TBTDeviceGroup aGroup, MObjectProvider* aParent);
-
-		/**
-        * Destructor.
-        */
-        virtual ~CBTUiDeviceContainer();
-
-    public: // Methods ralated devicelist upkeep.
-
-	     /** Refreshes this container to show these devices.
-	     * Note: This container will not refresh screen if the listed
-	     * devices have not changed.
-	     *@param aDeviceArray The items to be displayed
-	     *@param aSelectedItem which one of the items is selected after the refresh. 
-	     *Must be between 0 and aDeviceArray.Count()-1 or -1 if the list is empty.
-	     */
-	    void RefreshDeviceListL(const RDeviceArray* aDeviceArray,TInt aSelectedItem);
-
-	    /** Counts how many devices this container displays.     
-	     * @return the amount of items in this container
-	     */
-	    TInt CountItems();
-
-		/** 
-		 * Return the currently selected item index. KErrNotFound found if
-		 * this container has no items and therefore no selected item.
-		 *
-		 * @return index of currently selected item, or KErrNotFund if none.
-		 */
-		TInt CurrentItemIndex() ;   
-
-   	private: 
-		/** 2nd phase constructor 
-	     * @param aView PairedDevicesView or BlockedDevicesView.
-	     * @param aStorage The handler of 
-	     * @param aContainerMode are we serving as blocked or paired device list		
-	     * @param aParent used by SetMopParent		
-		*/
-		void ConstructL(const TRect& aRect, CBTUIListedDevicesView* aView, TBTDeviceGroup aGroup);
-
-        /**
-        * From CoeControl Responds to size changes. 
-        * Sets the size and position of the contents of this control.
-        * @param None.
-        * @return None.
-        */
-        void SizeChanged();
-
-        /**
-        * From CoeControl Gets the number of controls contained 
-        * in a compound control.        
-        * @param None.
-        * @return The number of component controls contained by this control.
-        */
-        TInt CountComponentControls() const;
-
-        /**
-        * From CoeControl Gets the specified component of a compound control.
-        * @param aIndex The index of the control to get.
-        * @return Reference to the component control.
-        */
-        CCoeControl* ComponentControl(TInt aIndex) const;
-
-        /**
-        * From CoeControl Draws the control.
-        * @param aRect The region of the control to be redrawn.
-        * @return None.
-        */
-        void Draw(const TRect& aRect) const;
-
-        /**
-        * From CoeControl Handles key events.
-        * @param aKeyEvent The key event that occurred.
-        * @param aType The event type.
-        * @return Response to the key event.
-        */
-        TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);        
-        
-        /**
-        * From MCoeControlObserver Handles an event from an observed control.
-        * @param aControl The control that sent the event.
-        * @param aEventType The event type.
-        * @return None.
-        */
-        void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType);
-
-		/** returns help context or empty context, if help is not supported 
-		 */
-		void GetHelpContext(TCoeHelpContext& aContext) const;
-        
-        /**
-		* From CCoeControl
-		*
-		* Handles a change to the control's resources.
-		*/
-		void HandleResourceChange( TInt aType );
-
-		/**
-        * From CCoeControl 
-        *
-        * Responds to a change in focus.
-        */
-		void FocusChanged(TDrawNow aDrawNow);
-		
-		/**
-        * From MEikListBoxObserver Handles list box events.
-        * 
-        * This is used to handle touch screen double click.
-        *
-        * @param aListBox The originating list box.
-        * @param aEventType The event type.
-        * @return None.
-        */
-        void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType);
-		
-
-		/** Create descriptor representation of given device
-		 * @param aDevice The device to be represented
-		 * @param aListItem where the representation will be written.
-		 */   
-		void CreateListItemL(const TBTDevice& aDevice, TBTDeviceName& alistItem);
-
-		/**
-	    * Creates and adds local bitmap to icon array.
-	    * @param aID Item ID of the masked bitmap to be created.
-	    * @param aFilename Filename to be used to construct the item.
-	    * @param aBitmapId The ID if bitmap 
-	    * @param aMaskId The ID of bitmap's mask
-		* @param aIconList The icon list for BT devices listbox.
-	    */
-	    void CreateAndAppendIconL( const TAknsItemID& aID,
-			     				   const TDesC& aFileName,
-								   const TInt aBitmapId,
-								   const TInt aMaskId,
-								   CAknIconArray* aIconList);
-	    /**
-	     * Internal leave function called by HandleResourceChange()
-	     * @param aType Type of resource change
-	     */
-	    void HandleResourceChangeL( TInt aType );
-	    
-    private: 
-        CAknSingleGraphicStyleListBox*  	iDeviceList;      // Other paired BT-devices list
-		CBTUIListedDevicesView*				iView;			// The reference to PairedDevicesView or BlockedDevicesView
-		TBTDeviceGroup						iGroup; 		// are we operating blocked or paired devices container
-
-	};
-
-#endif
-
-
--- a/bluetoothengine/btui/Ecom/inc/BTUIKeyWatcher.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,114 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Watcher for PubSub and CenRep keys.
-*
-*/
-
-
-#ifndef CBTUIKEYWATCHER_H
-#define CBTUIKEYWATCHER_H
-
-#include <e32property.h>
-#include <centralrepository.h>
-#include "BTUIActive.h"
-
-//  Identification for key and active object to be watched
-const TInt KBTUIPHYCountWatcher = 0x01;
-
-/**
- *  Class CBTUIKeyWatcher
- *
- *  Notify and handle the key values' change.
- *
- *  @since S60 v5.0
- */
-class CBTUIKeyWatcher : public CBase, public MBTUIActiveObserver
-    {
-
-public:
-
-    /**
-     * Two-phase constructor
-	 * 
-	 * @param aCaller The one calls this class.
-	 * @param aServiceID Identify which key to be listened to. 
-	 *                   It can be a logical AND value when listening to multiple keys. 
-     */
-    static CBTUIKeyWatcher* NewL( TAny* aCaller, TInt aServiceID);
-
-    /**
-     * Destructor
-     */
-    virtual ~CBTUIKeyWatcher();
-
-    /**
-     * From MBTUIActiveObserver.
-     * Notification that a key value has changed.
-     *
-     * @since S60 v5.0
-     * @param aActive Active object for the key which value changed.
-     * @param aId Identification for key, defined in this file.
-     * @param aStatus Request status
-     */
-    void RequestCompletedL( CBTUIActive* aActive, TInt aId, TInt aStatus );
-
-    /**
-     * From MBTUIActiveObserver.
-     * Notification that a key value has changed.
-     *
-     * @since S60 v5.0
-     * @param aActive Active object for the key which value changed.
-     * @param aId Identification for key, defined in this file.
-     * @param aError Error occured in Active Object's RunL().
-     */
-    void HandleError( CBTUIActive* aActive, TInt aId, TInt aError );
-
-private:
-
-    /**
-     * C++ default constructor
-     * @param aCaller The one calls this class.
-     */
-    CBTUIKeyWatcher( TAny* aCaller );
-
-    /**
-     * Symbian 2nd-phase constructor
-     * @param aServiceID Identify which key to be listened to. It can 
-	 *        be a logical AND value when listening to multiple keys. 
-     */
-    void ConstructL( TInt aServiceID );
-
-private: // data
-   	
-   	/**
-     * Property containing count of physical BT connections.
-     * When physical connections exists, specific BT UI indicator is shown.
-     */
-    RProperty iPHYCountKey;
-          
-    /**
-     * Active object for listening to above keys' change.
-     * Own.
-     */    
-    CBTUIActive* iPHYCountWatcher;
-    
-    /**
-     * Our caller view.
-     * Not own.
-     */
-    TAny* iCaller; 
-   
-    };
-
-#endif // CBTUIKEYWATCHER_H
--- a/bluetoothengine/btui/Ecom/inc/BTUIListedDevicesView.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,71 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  The view that handles paired devices.
-*
-*/
-
-#ifndef BTUILISTEDDEVICESVIEW_H
-#define BTUILISTEDDEVICESVIEW_H
-
-#include "BtuiPluginInterface.h"
-#include "BTUIDeviceContainer.h"
-#include "btdevmodel.h"
-#include "BTUIViewsCommonUtils.h"
-
-/**
-* SuperClass of PairedDevicesView and BlockedDevicesview.
-*
-* This defines functionality common to PairedDevicesView and BlockedDevicesview.
-*
-*@lib BTUIPlugin.dll
-*@since S60 v3.2
-*/
-class CBTUIListedDevicesView : public CBtuiPluginInterface,
-		                     public MBTDeviceObserver,
-		                     public TBTUIViewsCommonUtils		                      
-		                      
-    {
-    public:
-
-	    /** Checks if there a device change operation
-	     * ongoing.
-	     * @return ETrue if there is. EFalse otherwise
-	     */    	
-    	TBool DeviceChangeInProgress()
-    		{
-   			return iModel && iModel->DeviceChangeInProgress();
-    		}
-    		
-    	/** The index of currently selected item.
-    	 * This function delegates the question to BTUIDevicesContainer.
-    	 * @return the index, or KErrNotFound in the list is empty 
-    	 * or if iContainer is not yet initialized;
-    	 */	
-    	TInt CurrentItemIndex()
-    	{
-    		if(iContainer)
-    			return iContainer->CurrentItemIndex();
-    		else
-    			return KErrNotFound;	
-    	}
-    protected:    
-        CBTUiDeviceContainer* 	iContainer;
-        CBTDevModel* 		  	iModel;
-        TBool					iCoverDisplayEnabled;
-        MBtuiPluginViewActivationObserver*  iActivationObserver;
-    };
-
-#endif
-
-
--- a/bluetoothengine/btui/Ecom/inc/BTUIMainContainer.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,205 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declares container control for application.
-*
-*/
-
-#ifndef BTUIMAINCONTAINER_H
-#define BTUIMAINCONTAINER_H
-
-#include <aknview.h>    // AVKON components
-#include <aknlists.h>
-#include "btui.hrh"
-#include "BTUIMainView.h"
-#include "btengsettings.h"
-
-/**
-* This class handles main view dependent requests from user and 
-* contains listbox for main view items.
-*
-*@lib BTUIPlugin.dll
-*@since S60 v3.0
-*/
-class CBTUIMainContainer : public CCoeControl,
-                           public MCoeControlObserver,
-                           public MEikListBoxObserver
-    {
-    public: // Constructors and destructor
-
-		/**
-        * Symbian 2nd phase constructor.
-        */
-        void ConstructL( const TRect& aRect, CBTUIMainView* aMainView );
-
-		/**
-        * Destructor.
-        */
-        virtual ~CBTUIMainContainer();
-
-
-    public: // New functions
-        
-        /**
-        * Returns the current item index (highlight position) 
-        * for main setting list.
-        * @param None.
-        * @return Current item index.
-        */
-        TInt CurrentItemIndex();
-
-		/**
-        * From MBTUISettingsObserver Handles setting changes.
-        * @param aListItem The changed setting item.
-        * @return None.
-        */
-        void SettingChanged( TBTMainListItemIndexes aListItem );
-        		        
-    private: // Functions from base classes
-        
-        /**
-        * From CoeControl Responds to size changes. 
-        * Sets the size and position of the contents of this control.
-        * @param None.
-        * @return None.
-        */
-        void SizeChanged();
-
-        /**
-        * From CoeControl Gets the number of controls contained 
-        * in a compound control.        
-        * @param None.
-        * @return The number of component controls contained by this control.
-        */
-        TInt CountComponentControls() const;
-
-        /**
-        * From CoeControl Gets the specified component of a compound control.
-        * @param aIndex The index of the control to get.
-        * @return Reference to the component control.
-        */
-        CCoeControl* ComponentControl(TInt aIndex) const;
-
-        /**
-        * From CoeControl Draws the control.
-        * @param aRect The region of the control to be redrawn.
-        * @return None.
-        */
-        void Draw(const TRect& aRect) const;
-
-        /**
-        * From CoeControl Handles key events.
-        * @param aKeyEvent The key event that occurred.
-        * @param aType The event type.
-        * @return Response to the key event.
-        */
-        TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);       
-
-        /**
-        * From MEikListBoxObserver Handles list box events.
-        * @param aListBox The originating list box.
-        * @param aEventType The event type.
-        * @return None.
-        */
-        void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType);
-
-        /**
-        * From MCoeControlObserver Handles an event from an observed control.
-        * @param aControl The control that sent the event.
-        * @param aEventType The event type.
-        * @return None.
-        */
-        void HandleControlEventL(CCoeControl* aControl, TCoeEvent aEventType);        
-
-       
-        /**
-        * From CoeControl Gets the control's help context.
-        * @param aContext The control's help context
-        * @return None.
-        */
-        void GetHelpContext(TCoeHelpContext& aContext) const;
-        
-        /**
-		* From CCoeControl
-		*/
-		void HandleResourceChange( TInt aType );
-
-		/**
-        * From CCoeControl 
-        */
-		void FocusChanged(TDrawNow /*aDrawNow*/);
-
-
-    private: // Data
-
-        /**
-        *  Friend class for generating format string for main list.
-        */
-        class TMainListItemArray : public MDesCArray
-	        {
-            public: // Constructors and destructor
-
-		        /**
-		        * C++ default constructor.
-		        */                
-                TMainListItemArray( CDesCArray* aBtAllItemsArray, CBTUIMainView* aMainView,
-                  CBTEngSettings* aBtEngSettings );
-
-            public: // New functions
-
-                /**
-                * Returns number of items in array / main list.
-                * @param None.
-                * @return Number of items.
-                */
-                TInt MdcaCount() const;      
-
-                /**
-                * Returns the current format string for the given item.
-                * @param aIndex Index of the item.
-                * @return Pointer to the format string.
-                */
-                TPtrC MdcaPoint(TInt aIndex) const;
-            private:
-                static void GetSapStatusL( TInt& aStatus );
-        
-            private: // Data
-    
-                // Local BT name format string
-                __MUTABLE TBuf<KBTUIMaxFormattedNameLength> iItemText;
-                
-                // No ownership (reference)
-                CDesCArray& 				iArray;
-                CBTUIMainView*				iMainView;     
-        		CBTEngSettings*				iBtEngSettingsRef;
-         
-            }; 
-        
-        CAknSettingStyleListBox*    iBtMainListBox;		// The setting items list (scrollable)
-        CDesCArray*                 iBtAllItemsArray;   // All format string combinations (ownership)
-        TMainListItemArray*         iBtListItemArray;   // Format strings for list items
-        TInt                        iCurrentItemIndex;  // Current highlighted main list item		
-		CBTUIMainView*				iMainView;			
-		CBTEngSettings*				iBtEngSettingsRef;
-		
-		
-		
-    private: // Friend classes
-        
-        friend class TMainListItemArray;
-
-		 
-
-};
-
-#endif
--- a/bluetoothengine/btui/Ecom/inc/BTUIMainView.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,427 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declares the settings view for BTUI application.
-*
-*/
-
-
-#ifndef BTUIMAINVIEW_H
-#define BTUIMAINVIEW_H
-
-#include "BtuiPluginInterface.h"
-#include "BTUIViewsCommonUtils.h"
-#include "btui.hrh"
-
-#include <aknview.h>        	// AVKON components
-#include <btengconnman.h>       // for disconnect type and connection observer
-#include <btengdomaincrkeys.h>
-#include <btengprivatecrkeys.h>
-#include <btengconstants.h>
-#include <btengdevman.h>
-#include <btengsettings.h>
-#include <bt_sock.h>
-#include <gsplugininterface.h>
-#include <gstabbedview.h>
-#include <eikclb.h>
-#include <ConeResLoader.h>
-
-class CBTUIMainContainer;
-class CBTDevModel;
-class TBTUIViewsCommonUtils;
-class CGSTabHelper;
-class CBTUIKeyWatcher;
-class CAknViewAppUi;
-class MGSTabbedView;
-
-/**
-* Main view of the application.
-*
-* This view handles option activation, 
-* deactivation, commands and dynamic options menus.
-*
-*@lib BTUIPlugin.dll
-*@since S60 v3.0
-*/
-class CBTUIMainView : public CBtuiPluginInterface,
-                      public MBTEngSettingsObserver,
-                      public TBTUIViewsCommonUtils,
-                      public MGSTabbedView 
-    {
-    public: // Constructors and destructor
-
-
-		/**
-        * ECOM implementation instantiation function of 
-        * interface "CBtuiPluginInterface", to be used by BTUI Application.
-        */	            
-        static CBTUIMainView* NewL(MBtuiPluginViewActivationObserver* aObserver= NULL);
-		/**
-        * ECOM implementation instantiation function of 
-        * interface "CGSPluginInterface", to be used by GS application.
-        */
-        static CBTUIMainView* NewGsPluginL();
-
-		/**
-        * Destructor.
-        */
-        virtual ~CBTUIMainView();
-
-        /**
-        * From MGSTabbedView:
-        * Creates new icon for tab. Ownership is transferred to client.
-        * @since 3.1
-        */       
-        CGulIcon* CreateTabIconL();
-
-        /**
-        * From MBTEngSettingsObserver - Called when powerstate is changed
-        * @param TBTPowerStateValue power state
-        * @return None
-        */       
-		void PowerStateChanged( TBTPowerStateValue aState );
-		
-        /**
-        * From MBTEngSettingsObserver - Called when visibility is changed
-        * @param TBTPowerStateValue state of visibility mode
-        * @return None
-        */    		
-		void VisibilityModeChanged( TBTVisibilityMode aState );       
-                
-    protected:
-    
-        /**
-        * C++ default constructor.
-        */
-        CBTUIMainView (MBtuiPluginViewActivationObserver* aObserver= NULL);
-
-		/**
-        * Symbian 2nd phase constructor.
-        */
-        void ConstructL();
-    
-
-    public: // Functions from base classes
-
-        /**
-        * From CAknView Returns view id.
-        * @param None.
-        * @return View id.
-        */
-        TUid Id() const;
-		
-		/**
-        * Calls possibly leaving HandleCommandL function
-        * @param aCommand A command id.        
-        * @return None.
-        */
-        void HandleCommand(TInt aCommand); 		
-        
-		/**
-        * From CAknView Handles user commands.
-        * @param aCommand A command id.        
-        * @return None.
-        */
-        void HandleCommandL(TInt aCommand);
-        
-        /**
-		* Used by BTUIAppUI to Redraw BT name
-		* field.
-		* @param aListItem The changed setting item.
-		* @return None.
-		*/
-		void SettingChangedL( TBTMainListItemIndexes aListItem );
-
-	private: // Functions from base classes
-
-        /**
-        * From CAknView Activates view.
-        * @param aPrevViewId Id of previous view.
-        * @param aCustomMessageId Custom message id.
-        * @param aCustomMessage Custom message.
-        * @return None.
-        */
-        void DoActivateL( const TVwsViewId& aPrevViewId,
-                                TUid aCustomMessageId,
-                          const TDesC8& aCustomMessage );		
-
-        /**
-        * From CAknView Deactivates view.        
-        * @param None.
-        * @return None.
-        */
-        void DoDeactivate();
-
-        /**
-        * From CAknView Dynamically initialises options menu.
-        * @param aResourceId Id identifying the menu pane to initialise.
-        * @param aMenuPane The in-memory representation of the menu pane.
-        * @return None.
-        */
-        void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane);
-        
-        /**
-        * From MProgressDialogCallback Get's called when a dialog is dismissed.        
-        * @param aButtonId Id of the pressed button.
-        * @return None.
-        */
-        void DialogDismissedL( TInt aButtonId );
-
-    public: // New functions
-		
-        /**
-        * Set the power status of Bluetooth.
-        *
-        * @param aValue The new power status.
-        * @return Symbian OS error code.
-        */
-        TInt SetPowerStatusL( TBool aValue );
-
-        /**
-        * Set the visibility mode of Bluetooth.
-        *
-        * @param aMode The new visibility mode.
-        * @return None.
-        */
-        void SetVisibilityStatusL( TBTVisibilityMode aMode );
-        
-
-        /**
-        * Returns the local name of BT Device.
-        *
-        * @param None.
-        * @return The local name.
-        */
-        TDesC* GetBTLocalName();
-          
-        /**
-        * Returns a reference to class CBTEngSettings.
-        *
-        * @param None.
-        * @return A reference to class CBTEngSettings.
-        */        
-        CBTEngSettings* GetBtSettingsReference();     		   
-        
-        /**
-        * Set the SIM Access Profile status .
-        *
-        * @param aValue The new SAP status.
-        */
-        void SetSapStatusL( TBTSapMode aValue );
-        
-        /**
-        * Update its parent's view
-        * @param None.
-        * @return None.
-        */        
-        void UpdateParentView();
-        
-    private:
-        /** takes care of middle softkey press.
-         */
-		void HandleMiddleSoftkey();
-
-         /**
-        * Asks new power mode from user via selection buttons.
-        *
-        * @param None.
-        * @return None.
-        */
-        void AskPowerModeDlgL();
-
-        /**
-        * Asks new visibility mode from user via selection buttons.
-        *
-        * @param None.
-        * @return None.
-        */
-        void AskVisibilityDlgL();
-
-        /**
-        * Asks new local BT Device name from user.
-        *
-        * @param None.
-        * @return None.
-        */
-        void AskNewBtNameDlgL();
-       
-        /**
-        * A callback for launching local BT Device name query.
-        *
-        * @param aAppUi A reference to self.
-        * @return Symbian OS error code.
-        */
-        static TInt LaunchBTLocalNameQueryL(TAny* aAppUi);
-
-        /**
-        * Asks local BT Device name from user at startup.
-        *
-        * @param None.
-        * @return Symbian OS error code.
-        */
-        TInt AskBTLocalNameQueryL();
-
-        /**
-        * Initiates BT local name query after Symbian OS has entered idle state.
-        *
-        * @param None.
-        * @return None.
-        */
-        void InitiateBTLocalNameQueryL();
-		
-        /**
-        * blaa blaa
-        *
-        * @param aNum  count of connectionsions.
-        * @return None.
-        */			
-		TInt GetConnectionNumber(TInt& aNum);
-        
-		/**
-        * Asks new SAP mode from user via selection buttons.
-        *
-        * @param None.
-        * @return None.
-        */
-        void AskSapModeDlgL();
-             
-        /**
-        * Connected sap name
-        *
-        * @param aName
-        * @return TInt.
-        */  	
-		TInt GetConnectedSapNameL( TDes& aName );
-		
-		/**
-        * Get settings' values including power state, discovery mode and connection state
-        * Then set member varient iBtState.
-        */  	
-		void RefreshSettingsStatusL();
-		
-		/**
-		* Internal leave function used by GetValue().
-		*/
-		void GetValueL( const TGSPluginValueKeys aKey, TDes& aValue );
-
-		/**
-		* Checks from central repository whether the Bluetooth friendly name 
-        * has been modified .
-		* @param aStatus
-		* @return error code
-		*/
-		
-		TInt IsLocalNameModifiedL( TBool& aStatus );
-		
-	public: // Enumerations
-	
-	    enum TBTStateSummary
-			{
-			EBTOff = 0,
-			EBTOnShown,
-			EBTOnHidden,
-			EBTConnectedShown,
-			EBTConnectedHidden
-			};
-											
-	private: // from CGSBaseView
-	
-        /**
-        * Handles OK key press.
-        * @since 3.1
-        */
-        void HandleListBoxSelectionL();
-        
-        /**
-        * Creates new container.
-        * @since 3.1
-        */
-        void NewContainerL();
- 
- 
-	public: //Functions from CGSPluginInterface
-	
-        /**
-        * Method for checking plugin's Uid. Uid identifies this GS plugin. Use
-        * same Uid as the ECOM plugin implementation Uid.
-        *
-        * @return PluginUid
-        */
-        TUid PluginUid() const;
-
-        /**
-        * Method for getting caption of this plugin. This should be the 
-        * localized name of the settings view to be shown in parent view.
-        *
-        * @param aCaption pointer to Caption variable
-        */
-        void GetCaptionL( TDes& aCaption ) const;
-
-
-        /**
-        * Creates a new icon of desired type. 
-        * @param aIconType UID Icon type UID of the icon to be created.
-        * @return Pointer of the icon. NOTE: Ownership of this icon is
-        *         transferred to the caller.
-        */
-        CGulIcon* CreateIconL( const TUid aIconType );
-        
-        /**
-        * Function for getting plugin's value for a certain key.
-        * Override to provide own functionality.
-        *
-        * @param aKey Key for the value to be retrieved.
-        * @parem aValue Value for the given gey in TDes format.
-        */
-        void GetValue( const TGSPluginValueKeys aKey, TDes& aValue );
-             
-        /**
-        * Returns sap status
-        *
-        * @param None
-        * @return TInt.
-        */        
-		TInt GetSapStatusL();          
- 
- 		TVwsViewId GetParentView();
- 
-         /**
-        * From MGSTabbedView
-        * @return Reference to owned tabbed views which should be included in 
-        *         the sub-view's tab group.
-        * @since 3.1
-        */
-        CArrayPtrFlat<MGSTabbedView>* TabbedViews();
-    		       	
-    private: // Data
-        CBTUIMainContainer*             iContainer;      	    // Main container           
-        CBTEngSettings*					iBtEngSettings;         // Settings class        
-        CIdle*                          iIdle;              	// Idle time class (for doing operation delayed)
-        TBTDeviceName                   iTempNameBuffer;    	// Temporary storage for BT name        
-        CEikonEnv*                  	iEikEnv;                // Local eikonenv		
-        TInt                        	iResourceFileFlag;      // Flag for eikon env.
-		TBool							iConstructAsGsPlugin;	// Flag that indicate who constrct this obj
-		TBool							iCoverDisplayEnabled;	// Flag that indicate cover UI feature							                			
-
-        CGSTabHelper* 					iTabHelper;
-	    TBool							iParentViewNotSetYet;
-        CArrayPtrFlat<MGSTabbedView>* 	iViewArray; 
-        TVwsViewId 						iParentView; 
-        TBTStateSummary					iBtState;
-        CBTUIKeyWatcher*				iKeyWatcher;
-        MBtuiPluginViewActivationObserver* iActivationObserver; // view activation observer
-    };
-    
-#endif
-
-
--- a/bluetoothengine/btui/Ecom/inc/BTUIPairedDevicesView.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,490 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  The view that handles paired devices.
-*
-*/
-
-#ifndef BTUIPAIREDDEVICESVIEW_H
-#define BTUIPAIREDDEVICESVIEW_H
-
-#include <aknview.h>
-#include <eikmenup.h>       // Menu pane definitions
-#include <AknWaitDialog.h>
-#include <AknQueryDialog.h>
-#include <btengconstants.h>
-#include <btengdiscovery.h>
-#include "BtuiPluginInterface.h"
-#include "btdevmodel.h"
-#include "BTUIListedDevicesView.h"
-#include "btuipluginman.h"
-#include "BTUIActive.h"
-#include <secondarydisplay/BtuiSecondaryDisplayAPI.h>
-#include <gstabbedview.h>
-
-class CAknNavigationControlContainer;
-class CBTUiDeviceContainer;        
-class CGSTabHelper;
-class CBTEngSettings;
-class CBTUIMainView;
-
-// if there are more connection that this, it is disallowed to
-// connect to any device
-const TInt KBtUiMaxConnections = 6; 
-
-/**
-* Paired devicew view of the pluetooth application.
-*
-* This view handles lists of paired device and pairing new devices, unpairing devices
-* and setting previously paired devices as blocked. Also connecting and disconnecting 
-* are done by using this view.
-*
-*@lib BTUIPlugin.dll
-*@since S60 v3.0
-*/
-class CBTUIPairedDevicesView : public CBTUIListedDevicesView,
-							  public MBTEngSettingsObserver,
-		                      public MProgressDialogCallback,
-		                      public MBTEngSdpResultReceiver, // for bt discovery. SDP is not used
-		                      public MGSTabbedView,
-		                      public MBTUIActiveObserver
-{	
-    public:
-
-		/**
-        * ECOM implementation instantiation function of 
-        * interface "CBtuiPluginInterface", to be used by BTUI Application.
-        */        
-        static CBTUIPairedDevicesView* NewL(MBtuiPluginViewActivationObserver* aObserver = NULL);
-
-		static CBTUIPairedDevicesView* NewLC(CBTUIMainView* aBaseView, CArrayPtrFlat<MGSTabbedView>* aTabViewArray);
-		
-		/**
-        * Symbian 2nd phase constructor.
-        */
-        void ConstructL();
-
-		void ConstructL( CBTUIMainView* aBaseView, CArrayPtrFlat<MGSTabbedView>* aTabViewArray );
-
-		/**
-        * Destructor.
-        */
-        virtual ~CBTUIPairedDevicesView();
-
-        /**
-        * From MGSTabbedView:
-        * Creates new icon for tab. Ownership is transferred to client.
-        * @since 3.1
-        */       
-        CGulIcon* CreateTabIconL();        
-
-    public: // Functions from base classes
-        
-        /**
-        * From CAknView Returns view id.
-        * @param None.
-        * @return View id.
-        */
-        TUid Id() const;
-
-        /**
-        * From CAknView Handles user commands.
-        * @param aCommand A command id.        
-        * @return None.
-        */
-        void HandleCommandL(TInt aCommand);
-
-	protected:		
-        /**
-        * C++ default constructor.
-        */
-        CBTUIPairedDevicesView (MBtuiPluginViewActivationObserver* aObserver= NULL);
-
-    private: // Functions from base classes
-
-        /**
-        * From CAknView Activates view.
-        * @param aPrevViewId Id of previous view.
-        * @param aCustomMessageId Custom message id.
-        * @param aCustomMessage Custom message.
-        * @return None.
-        */
-        void DoActivateL( const TVwsViewId& aPrevViewId,
-                                TUid aCustomMessageId,
-                          const TDesC8& aCustomMessage );
-
-        /**
-        * From CAknView Deactivates view.        
-        * @param None.
-        * @return None.
-        */
-        void DoDeactivate();       
-
-        /**
-        * From CAknView Dynamically initialises options menu.
-        * @param aResourceId Id identifying the menu pane to initialise.
-        * @param aMenuPane The in-memory representation of the menu pane.
-        * @return None.
-        */
-        void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane);
-
-		// implemented from MProgressDialogCallback
-        /** This is used to cancel connecting and pairing, if user presses the Cancel-button.
-        * From MProgressDialogCallback Get's called when a dialog is dismissed.        
-        * @param aButtonId Id of the pressed button.
-        * @return None.
-        */
-        void DialogDismissedL( TInt aButtonId );
-
-	public: // from MBTDeviceObserver
-    	/**
-        * Informs the observer that an error happened in changing device status or a new device added.
-        * @param aErr Symbian error code
-        * @param aDevice the device which is changed.
-        * @param aDevNameArray hold conflicting devices' short names if "AlreadyExist" error happened during "connect"
-        * @return None.
-        */
-		void NotifyChangeDeviceComplete(const TInt aErr, const TBTDevice& aDevice,
-			const RBTDevNameArray* /*aDevNameArray*/ )	;
-    	/**
-        * Leaving version of NotifyChangeDeviceComplete
-        * @param aErr Symbian error code
-        * @param aDevice the device which is changed.
-        * @param aDevNameArray hold conflicting devices' short names if "AlreadyExist" error happened during "connect"
-        * @return None.
-        */
-		void NotifyChangeDeviceCompleteL(const TInt aErr, const TBTDevice& aDevice,
-			const RBTDevNameArray* /*aDevNameArray*/ )	;
-		
-		/** Updates the shown device list. This module will send this list forward
-		 * to container that takes care of the actual display of those devices
-		 *
-		 *@param aDevices all the devices to be shown
-		 *@param aSelectedItemIndex currently selected item after refresh.
-		 */
-		void RefreshDeviceList(const RDeviceArray* aDevices,TInt aSelectedItemIndex);	
-		
-	private: // From MBTUIActiveObserver
-	    
-	    /**
-	     * Callback to notify that an outstanding request has completed.
-	     * @param aActive Pointer to the active object that completed.
-	     * @param aId The ID that identifies the outstanding request.
-	     * @param aStatus The status of the completed request.
-	     */
-	    void RequestCompletedL( CBTUIActive* aActive, TInt aId, 
-	                            TInt aStatus );
-
-	    /**
-	     * Callback to notify that an error has occurred in RunL.
-	     *
-	     * @param aActive Pointer to the active object that completed.
-	     * @param aId The ID that identifies the outstanding request.
-	     * @param aStatus The status of the completed request.
-	     */
-	    void HandleError( CBTUIActive* aActive, TInt aId, 
-	                      TInt aError );
-		
-	public: // Operations to devices not containing confirmation queries
-        /**
-        * Sets the current security setting of the device.
-        * Does not ask user about it.
-        *
-        * @param aTrusted  ETrue when trusted, EFalse if untrusted.
-        * @return None.
-        */
-        void ChangeDeviceSecurityL( TBool aTrusted );
-        		
-        /**
-        * Issues prompts to connects to specified accessory.
-        * Connects to it if user andswers yes.
-        *
-        * @param TBTDevice  connect to this device
-        * @return None.
-        */
-		void ConnectL( const TBTDevice& aDevice, TBool aNewWaitNote );        
-   
-        /**
-        * Disconnects from the selected BT Accessory.
-        *
-        * @param None.
-        * @return None.
-        */
-        void DisconnectL();
-		
-		/**
-        * Removes iDisconnectQueryDlg created in DisconnectL
-        *
-        * @param None.
-        * @return None.
-        */        
-        void CancelDisconnectQueryDlg();
-        
-        /**
-        * Disconnects from the selected BT Accessory without query.
-        *
-        * @param None.
-        * @return None.
-        */        
-        void DisconnectWithoutQuery();
-
-    	/** Checks if there is an active phonecall.
-    	*@return ETrue if there is, EFalse otherwise
-    	*/
-    	TBool CallOnGoing();
-              		
-
-		/** This is used to create TCallBack to help. This is static, since TCallBack does not
-		 * allow instance methods. This is used by BlockDeviceDlgL to add help callback to the query.
-		 *
-		 * @param aTCoeHelpContext. Must be instance TCoeHelpContext, or NULL.
-		 * If this is not specified this will open help about blocked devices.
-		 * This is not an instance of TCoeHelpContext, since TCallback does not allow
-		 * parameters of other type that TAny*.
-		 * @return allways KErrNone. TCallBack does not allow void functions
-		 */
-		static TInt LaunchHelp(TAny *aTCoeHelpContext=NULL);
-
-	private: //These handle command given by user	
-        /**
-        * Asks new nick name for the BT Device from user and
-        * attempt to rename the device. Failures are handled by NotifyChangeDeviceComplete.
-        *
-        * @param None.
-        * @return None.
-        */
-        void RenameDeviceDlgL();
-
-        /**
-        * Asks confirmation for deleting a BT Device from user.
-        * Delete the current device if yes replied yes.
-        *
-        * @param None.
-        * @return None.
-        */
-        void DeleteDeviceDlgL();
-
-        /**
-        * Asks confirmation for deleting all BT devices from user.
-        * Delete the devices if yes replied yes.
-        *
-        * @param None.
-        * @return None.
-        */
-        void DeleteAllDevicesDlgL();
-
-        /**
-        * Initiates the pairing procedure to get a new paired device.
-        * DeviceSearchComplete is called after the dialog is done.
-        *
-        * @param None.
-        * @return None.
-        */
-        void NewPairedDeviceDlgL();
-        
-  		/**
-        * Asks confirmation for Blocking the selected BT Device.
-        * Blocks the current device if yes replied yes.
-        *
-        * @param None.
-        * @return None.
-        */
-		void BlockDeviceDlgL();
-		
-		/**Opens a wait note.
-		 *
-		 *@param dialog. The dialog object to be used for displaying this note.
-		 *@param aNoteResource The resource of the note, not including the text.
-		 *@param aNoteTextResource The text resource. The %U if this note is filled up with aDevName.
-		 *@param aSec SecondaryDisplaycommand
-		 *@param aDevName The dev name filled in aNoteTextResource
-		 */		
-		void OpenWaitNoteL(CAknWaitDialog *&dialog,TUint aNoteResource,TUint aNoteTextResource,
-			TSecondaryDisplayBtuiDialogs aSec,const TDesC& aDevName);
-		
-		/** Open Setting view for peripheral devices
-		 * 
-		 * @param None.
-		 * @return None.
-		 */
-		void LaunchSettingViewL();
-
-	public:	// Inherited from MBTEngSdpResultReceiver
-		
-		
-		/** Inherited from MBTEngSdpResultReceiver and implemented as empty, 
-		 * since this class will not do service searches, only device searches.
-		 */
-		void ServiceSearchComplete( const RSdpRecHandleArray& aResult, 
-			TUint aTotalRecordsCount, TInt aErr ) ;
-		/** Inherited from MBTEngSdpResultReceiver and implemented as empty, 
-		 * since this class will not do attributes seaches, only device searches.
-		 */
-    	void AttributeSearchComplete( TSdpServRecordHandle aHandle, 
-    		const RSdpResultArray& aAttr,TInt aErr ) ;		
-		/** Inherited from MBTEngSdpResultReceiver and implemented as empty, 
-		 * since this class will not do service attribute seaches, only device searches.
-		 */
-	    void ServiceAttributeSearchComplete( TSdpServRecordHandle aHandle,
-	    	const RSdpResultArray& aAttr,TInt aErr );
-
-	  /**
-	    * Provides notification of the result of the discovery of nearby 
-	    * Bluetooth devices. If a device is selected this class will try to pair it.
-		*
-	    * @param aDevice The data structure encapsulates all information 
-	    *                about the selected device. Ownership of the data 
-	    *                structure has not been transfered and is still with
-	    *                the API client.
-	    *				 This is not TBTDevice that is normally used inside the UI.	    
-	    * @param aErr Error code of the device search operation; KErrNone if 
-	    *             sucessful, KErrCancel if the user cancelled the 
-	    *             dialog, KErrAbort if CBTEngDiscovery::CancelSearchRemoteDevice
-	    *             was called; otherwise one of the system-wide error codes.
-	    */
-	    void DeviceSearchComplete( CBTDevice* aDevice, TInt aErr );
-	    
-	    /**
-	     * Provides notification of the result of the discovery of nearby 
-	     * Bluetooth devices and EIR data. If a device is selected this class will try to pair it.
-	     *
-	     * @since S60 v5.1
-	     * @param aDevice The data structure encapsulates information 
-	     *                about the selected device. 
-	     *                Ownership of the data structure has not been transfered and
-	     *                is still with the API client.
-	     * @param aEirWrapper Contains the EIR data of the remote device.
-	     *                Ownership of the data structure has not been transfered and
-	     *                is still with the API client. 
-	     * @param aErr Error code of the device search operation; KErrNone if 
-	     *             sucessful, KErrCancel if the user cancelled the 
-	     *             dialog, KErrAbort if CBTEngDiscovery::CancelSearchRemoteDevice
-	     *             was called; otherwise one of the system-wide error codes.
-	     */	    
-	    void DeviceSearchComplete( CBTDevice* aDevice, 
-	            TNameEntry* aNameEntry, 
-	            TInt aErr );
-	    
-private:	    
-	  /** Leaving version of DeviceSearchComplete.
-		*
-	    * @param aDevice The data structure encapsulates all information 
-	    *                about the selected device. Ownership of the data 
-	    *                structure has not been transfered and is still with
-	    *                the API client.
-	    *				 This is not TBTDevice that is normally used inside the UI.
-	    * @param aEirWrapper Contains the EIR data of the remote device.
-        *                Ownership of the data structure has not been transfered and
-        *                is still with the API client.	    
-	    * @param aErr Error code of the device search operation; KErrNone if 
-	    *             sucessful, KErrCancel if the user cancelled the 
-	    *             dialog, KErrAbort if CBTEngDiscovery::CancelSearchRemoteDevice
-	    *             was called; otherwise one of the system-wide error codes.
-	    */
-	    
-	    void DeviceSearchCompleteL( CBTDevice* aDevice, 
-	            TNameEntry* aNameEntry, TInt aErr );
-	    
-	  /** Shows 'Disonnect first' note
-		*
-	    * @param aDevice 
-	    */	    
-        void ShowDisconnecNoteL(TBTDevice *aDevice);	
-        
-        /**
-         * Auto connect to headset after pairing succeeded.
-         * @param aCount the counter of connecting request issuing staring from 0.
-         */
-        void ConnectIfNeededAfterPairL( TInt aCount );
-        
-	public: // internal methods for informing operation completes	    
-        /**
-        * Informs that pairing attempt of a device has been completed.
-        * Dismisses wait note and displays questions about authorizing and
-        * connecting, if the device is connectable.
-        *
-        * This method is called by ModifyDeviceChangeL. This method will not inform
-        * iContainer about the pairing since that is done by ModifyDeviceChangeL.
-        *
-        * @param aError Status code of the operation.
-        * @param aDeviceIndex the new place of the device in UI
-        * @return None.
-        */  
-	    void BondingCompleteL( TInt aError,const TBTDevice& aDevice);
-	    
-	    /** Informs that attempt to connect to a device is completed. Closes wait
-	     * note and if there was an error shows the error notice.
-	     *
-         * This method is called by ModifyDeviceChangeL. This method will not inform
-         * iContainer about the pairing since that is done by ModifyDeviceChangeL.	    
-         *
-	     * @param aError KErrNone or system wide error code
-	     * @param aDeviceIndex The index of the new device 
-	     * @param aConflictingDeviceName this is filled only when
-	     */    	
-    	void ConnectCompleteL(TInt aError,const TBTDevice& aDevice,
-    	  const RBTDevNameArray* aConflictingDeviceNames=NULL);
-    	  
-    	  
-       /**
-        * From MBTEngSettingsObserver - Called when powerstate is changed
-        * @param TBTPowerStateValue power state
-        * @return None
-        */       
-		void PowerStateChanged( TBTPowerStateValue aState );
-		
-        /**
-        * From MBTEngSettingsObserver - Called when visibility is changed
-        * @param TBTPowerStateValue state of visibility mode
-        * @return None
-        */    		
-		void VisibilityModeChanged( TBTVisibilityMode aState );
-		 
-    	
-    private: // Data
-    
-        CAknWaitDialog*                 iWaitForPairingDlg; 	// Wait note for pairing
-        CAknWaitDialog*                 iWaitForConnectDlg; 	// Wait note for connecting to BT Accessory        
-		CAknQueryDialog* 				iDisconnectQueryDlg;	// Question dialog for disconnecting BT Accessory
-        TBool                           iHelpEnabled; 				// Flag for the Help feature
-		
-		// these are needed so these are owened by someone
-		// and can be cleaned up, in case the operations are interrupted by the user.
-		CBTDevice*						iPairingDevice;
-		TNameEntry                      iPairingDevNameEntry;
-		TBTDevice* 						iConnectDevice; 	//device we are trying to connect to
-		TBTDevice 						iDisconnectQueryDevice; 	//device we are trying to disconnect
-				
-		CBTEngDiscovery*				iDeviceSearcher;	// used only for searching devices, not for device discovery
-		CBTEngSettings*					iBtEngSettings;		// used only for turning on bluetooth, 
-		CBTUIPluginMan* 				iBTPluginMan;		
-        CGSTabHelper* 					iTabHelper;
-	    CBTUIMainView*					iBaseView; 
-		TBool							iConstructAsGsPlugin;	// Flag that indicate this obj is served as GS plugin not BTUI app's plugin.
-        TInt                            iExpectedCallBack;      // In case of DeleteAll, counter for expected callback NotifyChangeDeviceCompleteL()
-        TBool                           iSearchOngoing;        
-        TBool							iIsConnectDevice;
-		MBtuiPluginViewActivationObserver* iActivationObserver; // view activation observer        
-        TBool 							iIsAlreadyConnected; // used only for showing "Connected to" note once for Stereo device 
-        TBTDevice                       iMenuDevice;
-        CEikMenuPane*                   iActiveMenuPane;
-        CBTUIActive*                    iActive;   // used for subscribing notifier lock status
-        TBTDevAddr                      iPairConnectAddr; // the address of the just paired device
-                                                          // with which a connection establishment is pending
-        TBool                           iIsPairConnect; // if we are doing auto-connecting after pairing or not
-
-};
-
-#endif
-
-
--- a/bluetoothengine/btui/Ecom/inc/BTUIRegistryWatcher.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,120 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declares Registry watcher class for BTUI.
-*
-*/
-
-
-#ifndef CBTUIREGISTRYWATCHERAO_H
-#define CBTUIREGISTRYWATCHERAO_H
-
-// INCLUDES
-
-#include <bt_subscribe.h>
-
-// CLASS DECLARATION
-
-/**
-* A callback interface for informing content change of BT Registry.
-*/
-class MBTUIRegistryObserver
-    {
-    public: // New functions
-
-        /**
-        * Informs the observer that contents of Registry has been changed.
-        * @param None.
-        * @return None.
-        */
-        virtual void RegistryContentChangedL()=0;
-    };
-
-
-// CLASS DECLARATION
-
-/**
-* An active object based class which can used to listen
-* Registry changes
-*/
-class CBTUIRegistryWatcherAO : public CActive
-    {
-    public: // Constructors and destructor
-
-        /**
-        * C++ default constructor.
-        */
-        CBTUIRegistryWatcherAO( MBTUIRegistryObserver* aParent );
-
-        /**
-        * Destructor.
-        */
-        virtual ~CBTUIRegistryWatcherAO();
-
-    public: // New functions
-
-        /**
-        * Starts / continues Registry watching
-        *
-        * @param None.
-        * @return None.
-        */
-        void WatchL();
-
-        /**
-        * Starts / continues Registry watching
-        *
-        * @param None.
-        * @return None.
-        */
-        void StopWatching();
-
-    private: // Functions from base classes
-
-        /**
-        * From CActive Gets called when CActive::Cancel is called, 
-        *              cancels Registry watching.
-        *
-        * @param None.
-        * @return None.
-        */
-        void DoCancel();
-
-        /**
-        * From CActive Gets called when content of Registry is changed, 
-        *              calls MBTUIRegistryObserver::RegistryContentChangedL.
-        *
-        * @param None.
-        * @return None.
-        */
-        void RunL();       
-
-        /**
-        * From CActive Handles a leave occurring in the request completion event.        
-        *
-        * @param aError The leave code.
-        * @return Symbian OS error code.
-        */
-        TInt RunError(TInt aError);
-
-    private: // Data
-
-        // Reference to observer
-        MBTUIRegistryObserver* iParent;
-        // Database handle
-        RProperty iProperty;
-    };
-
-#endif
-
-// End of File
--- a/bluetoothengine/btui/Ecom/inc/BTUIViewsCommonUtils.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#ifndef BTUIVIEWSCOMMONUTILS_H
-#define BTUIVIEWSCOMMONUTILS_H
-
-#include <e32base.h>
-
-class CBTEngSettings;
-/**
-* Utils class which offer common functions that were used by all BTUI views
-*/
-class TBTUIViewsCommonUtils 
-    {
-    public:
-
-        /**
-        * Displays a general error note.
-        *
-        * @param None.
-        * @return None.
-        */
-        static void ShowGeneralErrorNoteL();                     // Display general error note
-        
-        /** Check if there are any bluetooth connections. 
-         *@param None
-         *@return ETrue if there is one or more connections.
-         */
-		static TBool IsAnyDeviceConnectedL();
-		
-		/** Asks user to turn on bluetooth is it it not on.		
-		* @param aBtEngSettings settings object used to turn on the bt.
-		* @param aCoverDisplayEnabled. True if cover display is enabled.
-		* @return KErrNone, if bluetooth is on, or has turned on. KErrCancel if user said no. System wide errorcode otherwise.
-		*/
-		static TInt TurnBTOnIfNeededL(CBTEngSettings* aBtEngSettings,TBool aCoverDisplayEnabled );		
- 	};
- 	
-#endif
\ No newline at end of file
--- a/bluetoothengine/btui/Ecom/inc/bluetoothuiutil.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:   This provides utility for loading a BT device name without
-* localised to a string to be shown in GUI.
-*
-*/
-#include <StringLoader.h>
-
-class BluetoothUiUtil
-    {
-public:
-
-/*
- * Gets the starting position of a key whose pattern matches
- * '%'{(0)*|<n>}<aKey> where 0 and <n> is the decimal value 
- * of the specified position and <aKey> is the symbol of the key, 
- * either 'U' or 'N'.
- * 
- * For example, if the specified position of a number key 
- * is 0, both "%N" and "%0N" match, 
- * but "%1N" doesn't. If the position n is greater than 0, 
- * only "%<n>N" matches.
- * @param aDes the descriptor where a key parameter will be searched.
- * @param aKey the specified key, 'U' or 'N'
- * @param aKeyPos the position of the key. position starts from 0.
- * @param aKeyLength the length of the key at return if the key exists.
- * @return the start position of the key in aDes. KErrNotFound if the key
- *          is not available.
- */
-inline static TInt GetSubstringKeyPos( const TDes& aDes, const TDesC& aKey, 
-        TInt aKeyPos, TInt& aKeyLength );
-
-/*
- * Gets the starting position of a string key whose pattern matches
- * '%'{(0)*|<n>}'U' where 0 and <n> is the decimal value 
- * of the specified position. 
- * 
- * For example, if the specified position is 0, both "%U" and "%0U" match, 
- * but "%1U" doesn't. If the position n is greater than 0, 
- * only "%<n>U" matches.
- * @param aDes the descriptor in which a string key will be searched.
- * @param aKeyPos the position of the string key. position starts from 0.
- * @param aKeyLength the length of the string key at return if the key exists.
- * @return the start position of the string key in aDes. KErrNotFound if the key
- *          is not available.
- */
-inline static TInt GetStringSubstringKeyPos( const TDes& aDes, TInt aKeyPos, TInt& aKeyLength );
-
-/*
- * Add a substring to the specified RBuf descriptor.
- * ( Replace "%<n>U" at the specified position withe the given string.
- * @param aBuf the RBuf descriptor in which a "%<n>U" will be replaced.
- * @param aSub the substring that will replace a "%<n>U".
- * @param aSubPos the position of the "%U" to be replaced. Position starts from 0.
- */
-inline static void AddSubstringL( RBuf& aBuf, const TDesC& aSub, TInt aSubPos);
-
-/*
- * Load a string specified by the given resource ID, 
- * remove substrings that match "[" and ends with "]" and finally
- * replace the "%U" or "%<n>U" at the specified position with the
- * given substring.
- * 
- * This function is intended for adding a Bluetooth device name to a UI 
- * string but without localizing this name.
- * 
- * (Using StringLoader will get the device name localized in some variants. 
- * This is a workaround to tackle the unwanted localization.)
- * 
- * @param aBuf the RBuf descriptor in which a "%<n>U" will be replaced.
- * @param aSub the substring that will replace a "%<n>U".
- * @param aSubPos the position of the "%U" to be replaced. Position starts from 0.
- */
-inline static void LoadResourceAndSubstringL(RBuf& aBuf,
-        TInt aResourceId, const TDesC& aSub, TInt aSubPos );
-    };
-
-#include "bluetoothuiutil.inl"
-
-// End of File
-
--- a/bluetoothengine/btui/Ecom/inc/bluetoothuiutil.inl	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,103 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:   This provides utility for loading a BT device name without
-* localised to a string to be shown in GUI.
-*
-*/
-
-inline TInt BluetoothUiUtil::GetSubstringKeyPos( 
-        const TDes& aDes, const TDesC& aKey, 
-        TInt aKeyPos, TInt& aKeyLength )
-    {
-    ASSERT( aKeyPos > KErrNotFound );
-    _LIT(KPercentSymbol, "%" );
-    // 32 would be to fit any key substring in practice:
-    TBuf<32> key;
-    TInt pos( KErrNotFound );
-    // if the specified position is 0, check if "%<aKey>" (%U or %N) exists.
-    if ( aKeyPos == 0 )
-        {
-        key.Copy( KPercentSymbol );
-        key.Append(aKey);
-        pos = aDes.Find( key );
-        }
-    // Either the key is not found, or aKeyPos is not 0.
-    if ( pos == KErrNotFound )
-        {
-        key.Copy( KPercentSymbol );
-        key.AppendNum( aKeyPos );
-        key.Append( aKey );
-        pos = aDes.Find( key );
-        }
-    if ( pos > KErrNotFound )
-        {
-        aKeyLength = key.Length();
-        }
-    return pos;
-    }
-
-inline TInt BluetoothUiUtil::GetStringSubstringKeyPos( 
-        const TDes& aDes, TInt aKeyPos, TInt& aKeyLength )
-    {
-    _LIT(KStringKeyword,"U");
-    TPtrC ptr( KStringKeyword );
-    return GetSubstringKeyPos(aDes, ptr, aKeyPos, aKeyLength );
-    }
-
-inline void BluetoothUiUtil::AddSubstringL( 
-        RBuf& aBuf, const TDesC& aSub, TInt aSubPos)
-    {
-    // Find the position of the specified "%U" or %[0-9]U in aBuf.
-    TInt keyLength;
-    TInt pos = GetStringSubstringKeyPos( aBuf, aSubPos, keyLength );
-    if ( pos == KErrNotFound )
-        {
-        User::Leave( pos );
-        }
-    // Enlarge the max length of aBuf if needed:
-    TInt reqedLen = aBuf.Length() - keyLength + aSub.Length();
-    if ( aBuf.MaxLength() <  reqedLen )
-        {
-        aBuf.ReAllocL( reqedLen );
-        }
-    aBuf.Replace( pos, keyLength, aSub );
-    }
-
-inline void BluetoothUiUtil::LoadResourceAndSubstringL(RBuf& aBuf,
-        TInt aResourceId, const TDesC& aSub, TInt aSubPos )
-    {
-    HBufC* string = StringLoader::LoadL( aResourceId );
-    aBuf.Assign( string );
-    // Logical loc strings may contain redundant "[<chars>]" for some reason.
-    // This sub-string should be removed in our ad hoc parameter loading method.
-    _LIT( KLeftSquareBracket,"[" );
-    _LIT( KRightSquareBracket,"]" );
-    while ( 1 )
-        {
-        TInt lpos = aBuf.Find( KLeftSquareBracket );
-        TInt rpos = aBuf.Find( KRightSquareBracket );
-        if ( lpos > KErrNotFound && rpos > KErrNotFound && ( rpos > lpos ) )
-            {
-            aBuf.Delete(lpos, rpos - lpos + 1 );
-            continue;
-            }
-        // No sub-strings that match "[" and ends with "]". Done
-        break;
-        }
-    // Add the substring to this string loaded from resource:
-    AddSubstringL( aBuf,  aSub, aSubPos );
-    }
-
-// End of File
-
--- a/bluetoothengine/btui/Ecom/inc/btuipluginman.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,111 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Plugin loader
-*
-*/
-
-
-
-#ifndef BTUIPLUGINMAN_H
-#define BTUIPLUGINMAN_H
-
-#include <e32base.h>
-#include <btdevice.h>
-#include "BtuiPluginInterface.h"
-#include "btdevmodel.h"
-
-typedef RPointerArray<CImplementationInformation> RImplInfoPtrArray;
-typedef RPointerArray<CBtuiPluginInterface> RPluginPtrArray;
-
-/**
- *  Class CBTUIPluginMan
- *
- *  Load plugins of CBtuiPluginInterface
- *
- *  @since S60 v5.0
- */
-NONSHARABLE_CLASS( CBTUIPluginMan ) 
-    {
-
-public:
-
-    /**
-     * Two-phase constructor
-     *
-     * @since S60 v5.0
-     */
-    static CBTUIPluginMan* NewL( CAknViewAppUi* aAppUi );
-
-    /**
-     * Destructor
-     */
-    virtual ~CBTUIPluginMan();
-     
-    /**
-     * Get the setting view.
-     * @param TBTDevice Get this device's view
-     * @return CAknView the view of the specified plugin
-     */
-    CAknView* GetSettingViewL(TBTDevice& aDevice);
-    
-    /**
-     * Check if the plug-in for specified HID device exists.
-     * @param TBTDeviceClass Use ClassOfDevice as the property to search 
-     * @return ETrue if exist, otherwise EFalse.
-     */
-     TBool IsPluginAvaiable(TBTDeviceClass aDeviceClassInfo);
-
-private:
-
-    /**
-     * C++ default constructor
-     *
-     * @since S60 v5.0
-     */
-    CBTUIPluginMan( CAknViewAppUi* aAppUi );
-
-    /**
-     * Symbian 2nd-phase constructor
-     *
-     * @since S60 v5.0
-     */
-    void ConstructL();
-    
-    /**
-     * Load plugins which are for HID devices.
-     * @param None
-     * @return None
-     */
-    void LoadPluginsL();
-    
-private: // data
-
-	/**
-     * Array of pointers to ECom plug-in information objects.
-     */
-    RImplInfoPtrArray iPluginInfoArray;
-
-    /**
-     * Array of pointers to the BtuiPluginInterface ECom plug-ins loaded by PairedView.
-     */
-    RPluginPtrArray iPluginArray;
-    
-    /**
-     * Current Application process
-     */
-    CAknViewAppUi* iAppUi;
-    };
-
-
-#endif // BTUIPLUGINMAN_H
--- a/bluetoothengine/btui/Ecom/src/BTUIActive.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,151 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Active object helper class.
-*
-*/
-
-
-#include "BTUIActive.h"
-
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// C++ default constructor
-// ---------------------------------------------------------------------------
-//
-CBTUIActive::CBTUIActive(  MBTUIActiveObserver* aObserver, TInt aId, 
-    TInt aPriority )
-:   CActive( aPriority ),
-    iRequestId( aId ),
-    iObserver( aObserver )
-    {
-    CActiveScheduler::Add( this );
-    }
-
-
-// ---------------------------------------------------------------------------
-// Symbian 2nd-phase constructor
-// ---------------------------------------------------------------------------
-//
-void CBTUIActive::ConstructL()
-    {
-    }
-
-
-// ---------------------------------------------------------------------------
-// NewL
-// ---------------------------------------------------------------------------
-//
-CBTUIActive* CBTUIActive::NewL( MBTUIActiveObserver* aObserver, 
-    TInt aId, TInt aPriority )
-    {
-    CBTUIActive* self = new( ELeave ) CBTUIActive( aObserver, aId, aPriority );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-
-// ---------------------------------------------------------------------------
-// Destructor
-// ---------------------------------------------------------------------------
-//
-CBTUIActive::~CBTUIActive()
-    {
-    Cancel();
-    }
-
-// ---------------------------------------------------------------------------
-// RequestId()
-// Return the request ID of this active object.
-// ---------------------------------------------------------------------------
-//
-TInt CBTUIActive::RequestId()	
-    	{
-    	return iRequestId;
-    	}
-
-// ---------------------------------------------------------------------------
-// SetRequestId()
-// Set a new request ID for this active object.
-// ---------------------------------------------------------------------------
-//
-void CBTUIActive::SetRequestId( TInt aId )
-    	{
-    	iRequestId = aId;
-    	}    	
-    	
-// ---------------------------------------------------------------------------
-// GoActive()
-// Set active.
-// ---------------------------------------------------------------------------
-//
-void CBTUIActive::GoActive()
-	    {
-	    SetActive();
-	    }
-	    
-// ---------------------------------------------------------------------------
-// CancelRequest()
-// Cancel an outstanding request.
-// ---------------------------------------------------------------------------
-//    	
-void CBTUIActive::CancelRequest()
-	    {
-	    Cancel();
-	    }
-	    
-// ---------------------------------------------------------------------------
-// RequestStatus()
-// Get a reference to the active object request status.
-// ---------------------------------------------------------------------------
-//    
-TRequestStatus& CBTUIActive::RequestStatus()
-	    {
-	    return iStatus;
-	    }
-
-// ---------------------------------------------------------------------------
-// From class CActive.
-// Called by the active scheduler when the request has been cancelled.
-// ---------------------------------------------------------------------------
-//
-void CBTUIActive::DoCancel()
-    {
-    }
-
-
-// ---------------------------------------------------------------------------
-// From class CActive.
-// Called by the active scheduler when the request has been completed.
-// ---------------------------------------------------------------------------
-//
-void CBTUIActive::RunL()
-    {
-    iObserver->RequestCompletedL( this, iRequestId, iStatus.Int() );
-    }
-
-
-// ---------------------------------------------------------------------------
-// From class CActive.
-// Called by the active scheduler when an error in RunL has occurred.
-// ---------------------------------------------------------------------------
-//
-TInt CBTUIActive::RunError( TInt aError )
-    {
-    iObserver->HandleError( this, iRequestId, aError );
-    return KErrNone;
-    }
--- a/bluetoothengine/btui/Ecom/src/BTUIBlockedDevicesView.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,437 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:   This is view that handles listing and 
-*  unblocking blocked devices view.
-*
-*/
-
-#include <avkon.hrh>                    // AVKON components
-#include <akntitle.h>
-#include <aknViewAppUi.h>
-#include <BtuiViewResources.rsg>                     // Compiled resource ids
-#include <featmgr.h>                    // Feature Manager
-#include <AknGlobalNote.h>
-#include <aknmessagequerydialog.h> 
-#include <aknnotewrappers.h>
-#include <StringLoader.h>   // Series 60 localisation stringloader
-#include <aknnavi.h>
-#include <hlplch.h>         // Help launcher
-#include <secondarydisplay/BtuiSecondaryDisplayAPI.h>
-
-#include "BTUIBlockedDevicesView.h"
-#include "BTUIDeviceContainer.h"
-#include "debug.h"
-#include "btui.h"
-
-#include <gstabhelper.h>
-#include <btui.mbg>						// Tab icon for General Setting
-#include <bluetoothuiutil.h>
-#include "BTUIMainView.h" 				// base View.
-
-// ---------------------------------------------------------
-// CBTUIBlockedDevicesView::ConstructL
-// Symbian 2nd phase constructor can leave.
-// ---------------------------------------------------------
-//
-void CBTUIBlockedDevicesView::ConstructL()
-    {
-	TRACE_FUNC_ENTRY
-
-    BaseConstructL(R_BTUI_BLOCK_DEVICES_VIEW);    
-
-	TRACE_FUNC_EXIT
-    }
-    
-// ---------------------------------------------------------
-// CBTUIBlockedDevicesView::ConstructL
-// Symbian 2nd phase constructor when served as GS plugin.
-// ---------------------------------------------------------
-//  
-void CBTUIBlockedDevicesView::ConstructL( CBTUIMainView* aBaseView, CArrayPtrFlat<MGSTabbedView>* aTabViewArray )
-    {
-	iBaseView = aBaseView,
-    iTabHelper = CGSTabHelper::NewL();
-    aTabViewArray->AppendL(this); 
-    
-    BaseConstructL(R_BTUI_BLOCK_DEVICES_VIEW_GS);  
-    	
-    TRACE_INFO(_L("CBtuiGSPlugin* aBaseView, CArrayPtrFlat<MGSTabbedView>* aTabViewArray"))
-    }
-        
-// ---------------------------------------------------------
-// CBTUIBlockedDevicesView::NewL
-// Two phased constructor
-// ---------------------------------------------------------
-//
-CBTUIBlockedDevicesView* CBTUIBlockedDevicesView::NewL(MBtuiPluginViewActivationObserver* aObserver)
-    {
-	//TRACE_FUNC_ENTRY
-    CBTUIBlockedDevicesView* self = new (ELeave) CBTUIBlockedDevicesView(aObserver);
-	CleanupStack::PushL(self);
-	self->iConstructAsGsPlugin = EFalse;	
- 	self->ConstructL();	
-	CleanupStack::Pop(self);
-
-    return self;
-    }
-    
-// ---------------------------------------------------------
-// CBTUIBlockedDevicesView::NewL
-// Two phased constructor
-// ---------------------------------------------------------
-// 
-CBTUIBlockedDevicesView* CBTUIBlockedDevicesView::NewLC(CBTUIMainView* aBaseView, CArrayPtrFlat<MGSTabbedView>* aTabViewArray)
-    {
-    CBTUIBlockedDevicesView* self = new (ELeave) CBTUIBlockedDevicesView();    
-	CleanupStack::PushL( self );
-		
-	self->iConstructAsGsPlugin = ETrue;
- 	self->ConstructL( aBaseView, aTabViewArray );
-
-    return self;
-    }
-
-// ---------------------------------------------------------
-// CBTUIBlockedDevicesView::CBTUIBlockedDevicesView
-// ---------------------------------------------------------
-    
-CBTUIBlockedDevicesView::CBTUIBlockedDevicesView(MBtuiPluginViewActivationObserver* aObserver )
-	:iActivationObserver(aObserver)
-	{
-	}        
-        
-// ---------------------------------------------------------
-// Destructor
-// ---------------------------------------------------------
-//
-CBTUIBlockedDevicesView::~CBTUIBlockedDevicesView()
-    {
-	TRACE_FUNC_ENTRY   
-    if (iContainer)
-        {
-        AppUi()->RemoveFromViewStack(*this, iContainer);
-        }
-
-    delete iContainer;   
-    delete iModel;
-    
-	if(iConstructAsGsPlugin)
-	    	delete iTabHelper;	
-	
-	TRACE_FUNC_EXIT
-    }
-
-// ---------------------------------------------------------
-// From CAknView
-// CBTUIBlockedDevicesView::Id
-// ---------------------------------------------------------
-//
-TUid CBTUIBlockedDevicesView::Id() const
-    {
-	TRACE_FUNC_ENTRY
-    return KBtuiPluginUidBlockedDevicesView;//KBTBlockDevicesViewId;
-    }
-
-// ---------------------------------------------------------
-// From CAknView
-// CBTUIBlockedDevicesView::HandleCommandL 
-// ---------------------------------------------------------
-//
-void CBTUIBlockedDevicesView::HandleCommandL(TInt aCommand)
-    {
-    TRACE_FUNC_ENTRY
-	TInt bItemIndex;
-    switch (aCommand)
-        {
-        case EAknSoftkeyBack:
-            // do not exit if devicechange is in progress.
-            if(iModel->DeviceChangeInProgress() )
-            	return;                
-	        AppUi()->ActivateLocalViewL(iBaseView->GetParentView().iViewUid );
-            break;
-
-        case EAknSoftkeyExit:
-            // do not exit if devicechange is in progress.
-            if(iModel->DeviceChangeInProgress() )
-            	return;        
-			AppUi()->ProcessCommandL(EEikCmdExit);        
-			break;
-		
-		case  EBTUICmdDelete:
-        case  EBTUICmdUnblock:
-        	{
-        	
-        	bItemIndex = iContainer->CurrentItemIndex(); 
-			if(bItemIndex < 0) 
-        		break;
-        	        	
-        	TBTDevice device;
-            device.iIndex = bItemIndex;
-        	iModel->GetDevice(device);
-        	
-        	RBuf s;
-        	CleanupClosePushL( s );
-        	BluetoothUiUtil::LoadResourceAndSubstringL(
-        	        s, R_BT_WARN_ERASE_BLOCKED, device.iName, 0);
-        	
-        	CAknQueryDialog* dialog = CAknQueryDialog::NewL(CAknQueryDialog::EConfirmationTone);
-			TInt keypress = dialog->ExecuteLD(R_BT_GENERIC_QUERY, s);
-
-			CleanupStack::PopAndDestroy(&s);
-
-			if(keypress)  // User has accepted the dialog
-			    {
-        		device.iOperation = EOpUnblock;
-               	iModel->ChangeDevice(device);
-			    }        		
-        	
-        	break; 
-        	
-        	}
-        case EBTUICmdDeleteAll:        	
-        case EBTUICmdUnblockAll:
-            {
-        	CAknQueryDialog* dialog = CAknQueryDialog::NewL(CAknQueryDialog::EConfirmationTone);
-        	HBufC* s=iCoeEnv->AllocReadResourceLC(R_BT_WARN_ERASE_ALL_BLOCKED);
-        	TInt keypress=dialog->ExecuteLD(R_BT_GENERIC_QUERY, *s);
-        	CleanupStack::PopAndDestroy(s);
-        	
-        	if(keypress)
-            	{
-        		iModel->ChangeAllDevices(EOpUnblock);
-            	}
-        	
-        	break; 
-            }
-
-        case EAknCmdHelp:
-            {            
-            #ifdef __SERIES60_HELP
-            HlpLauncher::LaunchHelpApplicationL(iEikonEnv->WsSession(), AppUi()->AppHelpContextL());
-            #endif
-            break;
-            }          
-                	
-        default:
-            {
-            AppUi()->HandleCommandL(aCommand);
-            break;
-            }
-        }
-	TRACE_FUNC_EXIT        
-    }
-
-
-// ---------------------------------------------------------
-// From CAknView
-// CBTUIBlockedDevicesView::DoActivateL
-// ---------------------------------------------------------
-//
-void CBTUIBlockedDevicesView::DoActivateL(const TVwsViewId& /*aPrevViewId*/,
-                                               TUid /*aCustomMessageId*/,
-                                         const TDesC8& /*aCustomMessage*/)
-    {
-	TRACE_FUNC_ENTRY
-    // Setup title
-    //
-    iModel = CBTDevModel::NewL(EGroupBlocked, this);     
-    iContainer = CBTUiDeviceContainer::NewL(ClientRect(), this, EGroupBlocked, this);
-
-    HBufC* btBlockDevices = iCoeEnv->AllocReadResourceLC(R_BT_TITLE_BLOCKED_DEV);
-    CEikStatusPane* statusPane = StatusPane();
-    CAknTitlePane* titlePane;
-    titlePane = (CAknTitlePane*) statusPane->ControlL(TUid::Uid(EEikStatusPaneUidTitle));
-    titlePane->SetTextL(*btBlockDevices);
-    CleanupStack::PopAndDestroy(btBlockDevices); 
-    AppUi()->AddToStackL(*this, iContainer);
-	DimMskL(ETrue ); 
-	// the MSK will be undimmed, if there are blocked devices when
-	// the deviceList will be refreshed
-
-    if( iBaseView && iConstructAsGsPlugin)
-        {
-        iTabHelper->CreateTabGroupL( Id(), 
-            static_cast<CArrayPtrFlat<MGSTabbedView>*>
-            (iBaseView->TabbedViews()) ); 
-        }
-        
-	// notify observer   
-    if( iActivationObserver  && iConstructAsGsPlugin == EFalse)
-    {    	    
-        iActivationObserver->PluginViewActivated(EBlockedDevicesViewId);        
-    }
-        
-	TRACE_FUNC_EXIT
-	}
-
-// ---------------------------------------------------------
-// From CAknView
-// CBTUIBlockedDevicesView::DoDeactivate
-// ---------------------------------------------------------
-//
-void CBTUIBlockedDevicesView::DoDeactivate()
-    {
-	TRACE_FUNC_ENTRY
-    if (iContainer)
-        {
-        AppUi()->RemoveFromStack(iContainer);
-        delete iContainer;
-        iContainer = NULL;
-        }
-
-    delete iModel;
-    iModel=NULL;
-    if(iConstructAsGsPlugin)
-	    iTabHelper->RemoveTabGroup();  
- 
-	TRACE_FUNC_EXIT
-    }
-// ---------------------------------------------------------
-// CBTUIBlockedDevicesView::DimMskL
-// This will dim/Undim MSK.
-// However the command is sent when the key is pressed 
-// regardless wether the MSK command is visible and 
-// the view must be able to receive it anyway.
-// ---------------------------------------------------------
-void CBTUIBlockedDevicesView::DimMskL(TBool aDimmed)
-    {
-	TRACE_FUNC_ENTRY			
-	if(aDimmed)
-		{
-		Cba()->SetCommandL (EBTUICmdUnblock,KNullDesC);
-		}
-	else
-		{
-		if(iConstructAsGsPlugin)
-			{
-			Cba()->SetCommandSetL(R_BTUI_SOFTKEYS_OPTIONS_BACK__UNBLOCK); 					
-			}
-		else
-			{
-			Cba()->SetCommandSetL(R_BTUI_SOFTKEYS_OPTIONS_EXIT__UNBLOCK); 								
-			}
-		}
-		
-	Cba()->DrawDeferred();
-	
-	// NOTE: these will only hide the MSK label.
-	// The command is still being sent if button is pressed.
-	// HandleCommanL will take care
-	// of the situation that there may be no devices to unblock
-	TRACE_FUNC_EXIT	
-    }	
-
-// ---------------------------------------------------------
-// From CAknView
-// CBTUIBlockedDevicesView::DynInitMenuPaneL
-// Shows selected item's context sensitive options menu.
-// ---------------------------------------------------------
-//
-void CBTUIBlockedDevicesView::DynInitMenuPaneL(TInt aResId, CEikMenuPane* aMenu)
-    {
-	TRACE_FUNC_ENTRY    
-	// dim help if it exists and is not supported	
-	TInt tmp;	
-	if (  aMenu->MenuItemExists(EAknCmdHelp,tmp ) )			
-		{			
-		aMenu->SetItemDimmed(EAknCmdHelp,
-		  !FeatureManager::FeatureSupported( KFeatureIdHelp ) );
-		}
-    
-    // do not show "unblock" and "unblock all" commands 
-    // if there is nothing to unblock
-	if (aResId == R_BTUI_BLOCK_DEVICES_VIEW_MENU)
-	    {
-        if( iContainer->CountItems() == 0) 
-            {        
-            aMenu->SetItemDimmed(EBTUICmdUnblock, ETrue);
-            aMenu->SetItemDimmed(EBTUICmdUnblockAll, ETrue);            
-            }
-        else
-            {
-            aMenu->SetItemDimmed(EBTUICmdUnblockAll, EFalse);
-            aMenu->SetItemDimmed(EBTUICmdUnblock, ETrue);
-            }
-	    }
-	TRACE_FUNC_EXIT        
-    }
-
-// ---------------------------------------------------------
-// From MBTDeviceObserver
-// CBTUIBlockedDevicesView::NotifyChangeDeviceComplete
-// ---------------------------------------------------------
-//
-void CBTUIBlockedDevicesView::NotifyChangeDeviceComplete(const TInt aErr, 
-		const TBTDevice&, const RBTDevNameArray* )
-	{
-	TRACE_FUNC_ENTRY	
-	// we do not show any note, when blocked devices are unblocked,
-	// and that is the only command available.
-
-	if(aErr!= KErrNone)
-		{
-		TRAP_IGNORE(TBTUIViewsCommonUtils::ShowGeneralErrorNoteL(););
-		}
-	TRACE_FUNC_EXIT		
-	}
-
-
-// -----------------------------------------------
-// From MBTDeviceObserver
-// CBTUIBlockedDevicesView::RefreshDeviceList
-// -----------------------------------------------
-void CBTUIBlockedDevicesView::RefreshDeviceList(const RDeviceArray* aDevices,
-	  TInt aSelectedItemIndex)
-	{		
-	TRACE_FUNC_ENTRY	
-	
-	TRAPD(err,	
-		if(iContainer)
-			{
-			iContainer->RefreshDeviceListL(aDevices,aSelectedItemIndex );			
-			}
-		// dim the MSK if there are no devices to unblock
-		DimMskL(aDevices->Count()==0);
-			
-	);
-	if(err!= KErrNone)	    
-        {
-        TRAP_IGNORE( TBTUIViewsCommonUtils::ShowGeneralErrorNoteL(); );
-        }
-		
-	TRACE_FUNC_EXIT		
-	}
-
-// ---------------------------------------------------------------------------
-// CBTUIBlockedDevicesView::CreateTabIconL()
-// Creates icon for tab.
-// ---------------------------------------------------------------------------
-//    
-CGulIcon* CBTUIBlockedDevicesView::CreateTabIconL()
-    {
-    TFileName bmpFilename; 
-    bmpFilename += KBitmapFileDrive;
-    bmpFilename += KDC_APP_BITMAP_DIR;
-    bmpFilename += KBtuiBmpFileName;
-    
-    CGulIcon* icon = AknsUtils::CreateGulIconL(
-        AknsUtils::SkinInstance(), 
-        KAknsIIDQgnPropBtBlockedTab3,  
-        bmpFilename, 
-        EMbmBtuiQgn_prop_bt_blocked_tab3, 
-        EMbmBtuiQgn_prop_bt_blocked_tab3_mask );
-          
-    return icon;
-    }   
-    
--- a/bluetoothengine/btui/Ecom/src/BTUIDeviceContainer.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,673 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This is the implementation of device list container. It contains 
-*				 all necessary AVKON components and handles user inputs
-*				 for paired and blocked devices view.
-*
-*/
-
-
-#include <btui.mbg>				// Compiled resource ids
-#include <BtuiViewResources.rsg> 
-#include <AknsUtils.h>          // For Extended skinning icons
-#include <gulicon.h>
-#include <AknUtils.h>			// For char filter
-#include <aknlists.h> 
-#include <avkon.mbg> 			// AVKON icons
-#include <csxhelp/bt.hlp.hrh>   // Help IDs
-
-#include "BTUIDeviceContainer.h"
-#include "BTUIListedDevicesView.h"
-#include "debug.h"               
-#include "btui.h" // Global declarations
-
-const TInt KBTNumberOfIcons = 14;    // Number of class of device icons + extra one DEV_STATUS_AUTHORIZED
-	
-_LIT( DEV_TYPE_COMPUTER,"0\t");
-_LIT( DEV_TYPE_PHONE,"1\t");
-_LIT( DEV_TYPE_AUDIO,"2\t");
-_LIT( DEV_TYPE_DEFAULT,"3\t");	
-_LIT( DEV_TYPE_KEYBOARD,"4\t");
-_LIT( DEV_TYPE_MOUSE,"5\t");
-_LIT( DEV_TYPE_PRINTER,"6\t");
-_LIT( DEV_TYPE_CARKIT,"7\t");
-_LIT( DEV_TYPE_AUDIO_CONNECT,"8\t");
-_LIT( DEV_TYPE_COMPUTER_CONNECT,"9\t");
-_LIT( DEV_TYPE_KEYBOARD_CONNECT,"10\t");
-_LIT( DEV_TYPE_CARKIT_CONNECT,"11\t");
-_LIT( DEV_TYPE_MOUSE_CONNECT,"12\t");
-
-_LIT(DEV_STATUS_NORMAL, "\t" ); 		// blocked in blocked devices view, paired in pairred devices view
-_LIT(DEV_STATUS_AUTHORIZED, "\t13" ); 	// autorized in paired devices view
-
-    
-
-// ================= MEMBER FUNCTIONS =======================
-  
-// ---------------------------------------------------------
-// CBTUiDeviceContainer::ConstructL
-// ---------------------------------------------------------
-void CBTUiDeviceContainer::ConstructL(const TRect& aRect, 
-  CBTUIListedDevicesView* aView, TBTDeviceGroup aGroup)
-    {
-	TRACE_FUNC_ENTRY
-	
-    CreateWindowL();
-    
-	iView = aView;
-    iGroup = aGroup;
-    // Create new list for other paired bt-devices
-    //
-    iDeviceList = new (ELeave) CAknSingleGraphicStyleListBox;
-    iDeviceList->SetContainerWindowL(*this);
-    iDeviceList->ConstructL(this, EAknListBoxSelectionList);
-    
-	iDeviceList->SetListBoxObserver( this );    
-
-    // Set the empty text at basis of the list
-    iDeviceList->View()->SetListEmptyTextL( KNullDesC );
-
-    // Set up filenames for Btui and Avkon bitmaps
-    TFileName bmpFilename;
-    bmpFilename += KBitmapFileDrive;
-    bmpFilename += KDC_APP_BITMAP_DIR;
-    bmpFilename += KBtuiBmpFileName;
-        
-    // The avkon bitmap we will get from AknIconUtils::AvkonIconFileName()
-    TFileName avkonbmpFilename = AknIconUtils::AvkonIconFileName();
-    
-    // Setup graphic items list for BT devices listbox
-    CAknIconArray* iconList = new(ELeave) CAknIconArray(KBTNumberOfIcons);
-    CleanupStack::PushL( iconList );
-    
-
-	CreateAndAppendIconL( KAknsIIDQgnPropBtComputer, 
-						  avkonbmpFilename, 
-						  EMbmAvkonQgn_prop_bt_computer,
-						  EMbmAvkonQgn_prop_bt_computer_mask,
-						  iconList);
-
-	CreateAndAppendIconL( KAknsIIDQgnPropBtPhone,
-						  avkonbmpFilename, 
-						  EMbmAvkonQgn_prop_bt_phone,
-						  EMbmAvkonQgn_prop_bt_phone_mask,
-						  iconList);
-
-	CreateAndAppendIconL( KAknsIIDQgnPropBtAudio,
-						  avkonbmpFilename, 
-						  EMbmAvkonQgn_prop_bt_audio,
-						  EMbmAvkonQgn_prop_bt_audio_mask,
-						  iconList);
-
-	CreateAndAppendIconL( KAknsIIDQgnPropBtMisc,
-						  avkonbmpFilename, 
-						  EMbmAvkonQgn_prop_bt_misc,
-						  EMbmAvkonQgn_prop_bt_misc_mask,
-						  iconList);
-						  
-	CreateAndAppendIconL( KAknsIIDQgnPropBtKeyboard,
-						  avkonbmpFilename, 
-						  EMbmAvkonQgn_prop_bt_keyboard,
-						  EMbmAvkonQgn_prop_bt_keyboard_mask,
-						  iconList);					  
-
-	CreateAndAppendIconL( KAknsIIDQgnPropBtMouse,
-						  avkonbmpFilename, 
-						  EMbmAvkonQgn_prop_bt_mouse,
-						  EMbmAvkonQgn_prop_bt_mouse_mask,
-						  iconList);
-						  
-	CreateAndAppendIconL( KAknsIIDQgnPropBtPrinter,
-						  avkonbmpFilename, 
-						  EMbmAvkonQgn_prop_bt_printer,
-						  EMbmAvkonQgn_prop_bt_printer_mask,
-						  iconList);					  					  
-	
-	CreateAndAppendIconL( KAknsIIDQgnPropBtCarKit,
-						  avkonbmpFilename, 
-						  EMbmAvkonQgn_prop_bt_carkit,
-						  EMbmAvkonQgn_prop_bt_carkit_mask,
-						  iconList);
-						  
-	CreateAndAppendIconL( KAknsIIDQgnPropBtAudioConnect,
-						  bmpFilename, 
-						  EMbmBtuiQgn_prop_bt_audio_connect,
-						  EMbmBtuiQgn_prop_bt_audio_connect_mask,
-						  iconList);					  
-						  
-	CreateAndAppendIconL( KAknsIIDQgnPropBtComputerConnect,
-						  bmpFilename, 
-						  EMbmBtuiQgn_prop_bt_computer_connect,
-						  EMbmBtuiQgn_prop_bt_computer_connect_mask,
-						  iconList);
-						  
-    CreateAndAppendIconL( KAknsIIDQgnPropBtKeyboardConnect,
-						  bmpFilename, 
-						  EMbmBtuiQgn_prop_bt_keyboard_connect,
-						  EMbmBtuiQgn_prop_bt_keyboard_connect_mask,
-						  iconList);						  		
-						  
-	CreateAndAppendIconL( KAknsIIDQgnPropBtCarKitConnect,
-						  bmpFilename, 
-						  EMbmBtuiQgn_prop_bt_car_kit_connect,
-						  EMbmBtuiQgn_prop_bt_car_kit_connect_mask,
-						  iconList);	
-	
-	CreateAndAppendIconL( KAknsIIDQgnPropBtMouseConnect,
-                          bmpFilename, 
-                          EMbmBtuiQgn_prop_bt_mouse_connect,
-                          EMbmBtuiQgn_prop_bt_mouse_connect_mask,
-                          iconList);
-	
-	CFbsBitmap* bitmap = NULL;
-    CFbsBitmap* mask = NULL;
-    AknsUtils::CreateColorIconLC(AknsUtils::SkinInstance(), 
-                                 KAknsIIDQgnIndiBtTrustedAdd,
-                                 KAknsIIDQsnIconColors,
-                                 EAknsCIQsnIconColorsCG13,
-                                 bitmap, mask,
-                                 avkonbmpFilename,
-                                 EMbmAvkonQgn_indi_bt_trusted_add,
-                                 EMbmAvkonQgn_indi_bt_trusted_add_mask,
-                                 KRgbBlack);
-    CGulIcon* icon = CGulIcon::NewL(bitmap, mask);
-        
-    CleanupStack::Pop(mask);
-    CleanupStack::Pop(bitmap); 
-    
-    CleanupStack::PushL(icon);    
-	iconList->AppendL( icon );
-    CleanupStack::Pop(icon);
-    
-    	
-    // Transfer iconlist ownership to the listbox
-    iDeviceList->ItemDrawer()->ColumnData()->SetIconArray(iconList);
-    CleanupStack::Pop(iconList);
-
-    // Create scrollbars
-    iDeviceList->CreateScrollBarFrameL(ETrue);
-    iDeviceList->ScrollBarFrame()->SetScrollBarVisibilityL(
-    	CEikScrollBarFrame::EOn, CEikScrollBarFrame::EAuto);
-
-    SetRect(aRect);
-    ActivateL();
-
-    TRACE_FUNC_EXIT
-    }
-
-// ---------------------------------------------------------
-// CBTUiDeviceContainer::NewL
-// ---------------------------------------------------------
-CBTUiDeviceContainer* CBTUiDeviceContainer::NewL(const TRect& aRect, 
-  CBTUIListedDevicesView* aView, TBTDeviceGroup aGroup, MObjectProvider* aParent)
-    {
-	 CBTUiDeviceContainer* self = new (ELeave) CBTUiDeviceContainer();
-	 self->SetMopParent(aParent);
-	 CleanupStack::PushL(self);
-	 self->ConstructL(aRect, aView, aGroup);
-	 CleanupStack::Pop(self);
-	 return self;
-    }
-// ---------------------------------------------------------
-// destructor
-// ---------------------------------------------------------
-
-CBTUiDeviceContainer::~CBTUiDeviceContainer()
-    {
-	TRACE_FUNC_ENTRY
-    delete iDeviceList;
-	TRACE_FUNC_EXIT
-    }
-
-// ---------------------------------------------------------
-// CBTUiDeviceContainer::RefreshDeviceListL
-// This function will refresh only the changed parts of the
-// screen, if any.
-// ---------------------------------------------------------   
-void CBTUiDeviceContainer::RefreshDeviceListL(const RDeviceArray* aDeviceArray,TInt selectedItem)
-    {
-	TRACE_FUNC_ENTRY
-	
-    MDesCArray* itemTextArray = iDeviceList->Model()->ItemTextArray();
-    CDesCArray* itemArray = (CDesCArray*) itemTextArray;
-    TBool removal=EFalse;
-    TBool addition=EFalse;
-	TInt previouslySelected=CurrentItemIndex();
-    TBTDeviceName listItem;
-    TInt deviceCount = aDeviceArray->Count();
-    TInt i = 0;
-    for( ; i < deviceCount; i++)
-        {
-        TBTDevice device = *(*aDeviceArray)[i];
-        CreateListItemL(device, listItem);
-        if(itemArray->Count()<=i)
-        	{
-        	itemArray->AppendL(listItem);
-        	addition=ETrue;
-        	}
-        else
-        	if(listItem != (*itemArray)[i] )
-				{
-				itemArray->Delete(i);
-				itemArray->InsertL(i,listItem);
-				
-				removal=ETrue;
-				addition=ETrue;
-				}
-        
-        }
-	if(itemArray->Count()-i>=0)
-		{
-		itemArray->Delete(i,itemArray->Count()-i);        
-		removal=ETrue;
-		}
-		
-        
-	if(removal)        
-		iDeviceList->HandleItemRemovalL();
-	if(addition)
-    	iDeviceList->HandleItemAdditionL();
-
-	if(deviceCount >0 )
-		iDeviceList->SetCurrentItemIndex( Max(selectedItem,0 )) ;
-	else
-		{
-		HBufC* devEmptyText = NULL;
-		if(iGroup ==EGroupPaired)
-			{
-			devEmptyText=iCoeEnv->AllocReadResourceLC( R_BT_NO_PAIRED_DEVICES);
-			}    	
-		else
-			{    
-			devEmptyText=iCoeEnv->AllocReadResourceLC( R_BT_NO_BLOCKED_DEVICES);
-			}
-		iDeviceList->View()->SetListEmptyTextL(*devEmptyText );
-		CleanupStack::PopAndDestroy(devEmptyText);
-		}
-		
-	if(addition | removal | previouslySelected!=selectedItem)
-    	iDeviceList->DrawDeferred();
-	TRACE_FUNC_EXIT
-    } 
-
-// ---------------------------------------------------------
-// CBTUiDeviceContainer::CountItems
-// ---------------------------------------------------------    
-TInt CBTUiDeviceContainer::CountItems() 
-	{   
-	return iDeviceList->Model()->ItemTextArray()->MdcaCount();    
-	}
-
-// ---------------------------------------------------------
-// CBTUiDeviceContainer::CreateListItemL
-// ---------------------------------------------------------
-void CBTUiDeviceContainer::CreateListItemL(const TBTDevice& aDevice, TBTDeviceName& aListItem)
-    {
-	TRACE_FUNC_ENTRY
-    aListItem.Zero(); // may not needed
-    
-    TInt iconIndex = (TInt)(aDevice.iType);
-    
-    switch( iconIndex)
-    	{
-    	case EDeviceComputer:
-    		if(( aDevice.iStatus & EStatusBtuiConnected) == EStatusBtuiConnected)
-    			{
-    			aListItem.Append(DEV_TYPE_COMPUTER_CONNECT);   	
-    	    	}
-			else
-				{
-				aListItem.Append(DEV_TYPE_COMPUTER); 
-				}
-			break;
-    	
-    	case EDevicePhone:   	
-    		aListItem.Append(DEV_TYPE_PHONE); 
-    		break;
-    		
-    	case EDeviceAudio: 
-    		if(( aDevice.iStatus & EStatusBtuiConnected) == EStatusBtuiConnected)
-    			{
-    			aListItem.Append(DEV_TYPE_AUDIO_CONNECT);   	
-    	    	}
-			else
-				{
-    			aListItem.Append(DEV_TYPE_AUDIO);
-				}
-			break ;
-    	case EDeviceCarkit: 	  
-    	  	if(( aDevice.iStatus & EStatusBtuiConnected) == EStatusBtuiConnected)
-    			{
-    			aListItem.Append(DEV_TYPE_CARKIT_CONNECT);   	
-    	    	}
-			else
-				{
-    			aListItem.Append(DEV_TYPE_CARKIT);
-				}
-			break ;
-				
-		case EDevicePrinter:
-			aListItem.Append(DEV_TYPE_PRINTER);
-			break;
-			
-		case EDeviceKeyboard:
-		
-			if(( aDevice.iStatus & EStatusBtuiConnected) == EStatusBtuiConnected)
-    			{
-    			aListItem.Append(DEV_TYPE_KEYBOARD_CONNECT);   	
-    	    	}
-			else
-				{
-    			aListItem.Append(DEV_TYPE_KEYBOARD);
-				}
-			break ;
-				
-		case EDeviceMice:
-		    
-		    if(( aDevice.iStatus & EStatusBtuiConnected) == EStatusBtuiConnected)
-                {
-                aListItem.Append(DEV_TYPE_MOUSE_CONNECT);    
-                }
-            else
-                {
-                aListItem.Append(DEV_TYPE_MOUSE);
-                }
-			break;			
-			
-		case EDeviceDefault:	
-    		aListItem.Append(DEV_TYPE_DEFAULT); 
-    		break;
-    			
-		default:
-			aListItem.Append('\t');
-			break;
-    	}
-    	    
-    aListItem.Append(aDevice.iName);
-
-    if((aDevice.iStatus & EStatusTrusted) == EStatusTrusted && iGroup ==EGroupPaired )                            
-        {   	
-    	aListItem.Append(DEV_STATUS_AUTHORIZED);    
-        }    	
-    else 
-    	{	
-  		aListItem.Append( DEV_STATUS_NORMAL );
-    	}
-	TRACE_FUNC_EXIT    	
-    }
-
-
-// ---------------------------------------------------------
-// From CCoeControl
-// CBTUiDeviceContainer::OfferKeyEventL
-// ---------------------------------------------------------
-TKeyResponse CBTUiDeviceContainer::OfferKeyEventL(const TKeyEvent& aKeyEvent,
-                                                               TEventCode aType)
-    {
-	TRACE_FUNC_ENTRY    
-    // Inform model where we are now
-    TInt bItemIndex = CurrentItemIndex();
-
-    // Shortcut for deleting a device
-    if ((aKeyEvent.iCode == EKeyBackspace) && (bItemIndex >= 0))
-        {
-        iView->HandleCommandL( EBTUICmdDelete );
-        return EKeyWasConsumed;
-        }
-
-    // Show popup commands window if selection or enter key is pressed.
-	// It should not go to here, unless | EAknEnableMSK is not set
-    if ((aKeyEvent.iCode == EKeyDevice3) || (aKeyEvent.iCode == EKeyEnter))
-        {
-        iView->ProcessCommandL(EAknSoftkeyContextOptions);        
-        return EKeyWasConsumed;
-        }
-
-    if ((aKeyEvent.iCode != EKeyLeftArrow) && 
-        (aKeyEvent.iCode != EKeyRightArrow))
-        {
-		TRACE_FUNC_EXIT        
-        return iDeviceList->OfferKeyEventL(aKeyEvent, aType);
-        }
-    else
-        {
-        // BTRegistry operations are not done in atomic way
-        // so we cannot allow them to be interrupted
-        if(iView->DeviceChangeInProgress())
-        	return EKeyWasConsumed;
-        
-		TRACE_FUNC_EXIT        
-        return EKeyWasNotConsumed;
-        }
-    }
-
-// ----------------------------------------------------
-// CBTUiDeviceContainer::CreateAndAppendIconL
-// ----------------------------------------------------
-void CBTUiDeviceContainer::CreateAndAppendIconL( 
-  const TAknsItemID& aID,
-  const TDesC& aFileName,
-  const TInt aBitmapId,
-  const TInt aMaskId,
-  CAknIconArray* aIconList)
-    {    
-	TRACE_FUNC_ENTRY    
-	
-    CGulIcon* icon = AknsUtils::CreateGulIconL(AknsUtils::SkinInstance(),
-     aID, aFileName, aBitmapId, aMaskId);
-    
-    CleanupStack::PushL(icon);    
-	aIconList->AppendL(icon);
-    CleanupStack::Pop(icon);
-	}
-
-// ---------------------------------------------------------
-// From CCoeControl
-// CBTUiDeviceContainer::GetHelpContext
-// ---------------------------------------------------------
-void CBTUiDeviceContainer::GetHelpContext(TCoeHelpContext& aContext) const
-    {
-	TRACE_FUNC_ENTRY
-#ifdef __SERIES60_HELP
-
-    aContext.iMajor = KBtuiUid3;
-    if( iGroup ==EGroupPaired)
-    	aContext.iContext = KBT_HLP_PAIRED;
-    else
-    	aContext.iContext = KBT_HLP_BLOCKED ;
-#else    
-#endif
-    }
-
-// ---------------------------------------------------------
-// From CCoeControl
-// CBTUiDeviceContainer::SizeChanged
-// Called by framework when the view size is changed
-// ---------------------------------------------------------
-void CBTUiDeviceContainer::SizeChanged()
-    {
-	TRACE_FUNC_ENTRY    
-    iDeviceList->SetRect(Rect());  // Mandatory, otherwise not drawn
-    }
-
-// ---------------------------------------------------------
-// From CCoeControl
-// CBTUiDeviceContainer::CountComponentControls
-// ---------------------------------------------------------
-TInt CBTUiDeviceContainer::CountComponentControls() const
-    {
-	TRACE_FUNC_ENTRY    
-    // return number of controls inside this container
-    return 1;
-    }
-
-// ---------------------------------------------------------
-// From CCoeControl
-// CBTUiDeviceContainer::ComponentControl
-// ---------------------------------------------------------
-CCoeControl* CBTUiDeviceContainer::ComponentControl(TInt aIndex) const
-    {
-	TRACE_FUNC_ENTRY    
-	if(aIndex == 0)
-		{
-		return iDeviceList ;
-		}    	
-	else
-		{
-		return NULL;	
-		}		
-    }
-
-// ----------------------------------------------------
-// CBTUiDeviceContainer::CurrentItemIndex
-// ----------------------------------------------------
-TInt CBTUiDeviceContainer::CurrentItemIndex()
-    {
-	TRACE_FUNC_ENTRY    
-	
-    return iDeviceList->CurrentItemIndex();
-    }
-
-// ---------------------------------------------------------
-// From CCoeControl
-// CBTUiDeviceContainer::Draw
-// ---------------------------------------------------------
-void CBTUiDeviceContainer::Draw( const TRect& /* aRect */ ) const
-    {
-    }
-
-// ---------------------------------------------------------
-// From MCoeControlObserver
-// CBTUiDeviceContainer::HandleControlEventL
-// ---------------------------------------------------------
-void CBTUiDeviceContainer::HandleControlEventL( CCoeControl* /* aControl */, TCoeEvent /* aEventType */ )
-    {
-	TRACE_FUNC_ENTRY    
-    }
-
-// ---------------------------------------------------------
-// From CCoeControl
-// CBTUiDeviceContainer::HandleResourceChange
-// ---------------------------------------------------------
-void CBTUiDeviceContainer::HandleResourceChange( TInt aType )
-    {
-	TRACE_FUNC_ENTRY    
-    CCoeControl::HandleResourceChange(aType);
-    TRAP_IGNORE(HandleResourceChangeL(aType));
-    TRACE_FUNC_EXIT
-    }
-
-// ---------------------------------------------------------
-// Internal Leave function
-// CBTUiDeviceContainer::HandleResourceChangeL
-// ---------------------------------------------------------
-void CBTUiDeviceContainer::HandleResourceChangeL( TInt aType )
-    {
-	TRACE_FUNC_ENTRY    
-
-    //Handle change in layout orientation
-    if (aType == KEikDynamicLayoutVariantSwitch || aType == KAknsMessageSkinChange )
-        {
-        TRect mainPaneRect;
-        AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane, mainPaneRect);
-        
-        // Because the trailing icons are not changed properly after theme is changed.
-        // we refresh those icons in the iconlist from iDeviceList manually.
-        
-        // Get iconlist from listbox
-        CAknIconArray* iconList = static_cast<CAknIconArray*>(iDeviceList->ItemDrawer()->ColumnData()->IconArray());
-        
-        CleanupStack::PushL( iconList );
-        // remove the last two icons which will not be updated properly by theme changing.
-		iconList->Delete(KBTNumberOfIcons-1);
-	        
-	    // The avkon bitmap we will get from AknIconUtils::AvkonIconFileName()
-	    TFileName avkonbmpFilename = AknIconUtils::AvkonIconFileName();
-	    
-	  
-	    
-		CFbsBitmap* bitmap = NULL;
-	    CFbsBitmap* mask = NULL;
-	    AknsUtils::CreateColorIconLC(AknsUtils::SkinInstance(), 
-	                                 KAknsIIDQgnIndiBtTrustedAdd,
-	                                 KAknsIIDQsnIconColors,
-	                                 EAknsCIQsnIconColorsCG13,
-	                                 bitmap, mask,
-	                                 avkonbmpFilename,
-	                                 EMbmAvkonQgn_indi_bt_trusted_add,
-	                                 EMbmAvkonQgn_indi_bt_trusted_add_mask,
-	                                 KRgbBlack);
-	    
-	    
-	    CGulIcon* icon = CGulIcon::NewL(bitmap, mask);
-	     
-	    CleanupStack::Pop(2); // bitmap, mask;
-	    
-	    CleanupStack::PushL(icon);    
-		
-		iconList->AppendL( icon );
-	    CleanupStack::Pop(icon);
-	    
-	    	
-	    // Transfer iconlist ownership back to the listbox
-	    iDeviceList->ItemDrawer()->ColumnData()->SetIconArray(iconList);
-	    CleanupStack::Pop(iconList);
-		
-        SetRect(mainPaneRect);
-		DrawDeferred();
-		}
-	TRACE_FUNC_EXIT
-    }
-
-// ---------------------------------------------------------
-// From CCoeControl
-// CBTUiDeviceContainer::FocusChanged
-// ---------------------------------------------------------
-void CBTUiDeviceContainer::FocusChanged(TDrawNow /*aDrawNow*/)
-    {
-	TRACE_FUNC_ENTRY    
-	iDeviceList->SetFocus(IsFocused());
-	TRACE_FUNC_EXIT        
-    }
-// ---------------------------------------------------------
-// From CCoeControl
-// CBTUiDeviceContainer::HandleListBoxEventL
-//
-// Handle touch screen singleclick as MSK devent to paired view or 
-// as delete key event to blocked devices view.
-// ---------------------------------------------------------
-//
-void CBTUiDeviceContainer::HandleListBoxEventL(CEikListBox* /*aListBox*/, TListBoxEvent aEventType)
-    {
-    TRACE_FUNC_ENTRY
-	// this is no longer called, unless MSK is disabled.
-	// if msk is not disabled, then  
-	// BTMainView::HandleCommand(EBTUICmdMSK) is called instead
-    if( aEventType == EEventEnterKeyPressed 
-    || aEventType == EEventItemSingleClicked) // Selection key pressed, or item clicked
-        {        
-    	// msk open context options in paired devices view.
-    	// it will unblock the selected blocked device in blocked devices view.
-    	if(iGroup==EGroupPaired) 
-    		{
-    		iView->ProcessCommandL( EAknSoftkeyContextOptions);
-    		}				
-		else
-			{
-			iView->ProcessCommandL( EBTUICmdUnblock);				
-			}
-			 
-        }
-	TRACE_FUNC_EXIT
-    }
--- a/bluetoothengine/btui/Ecom/src/BTUIKeyWatcher.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,151 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Listen to CenRep and PubSub Keys
-*
-*/
-
-
-#include <e32base.h>
-#include <btserversdkcrkeys.h>
-#include <btengprivatecrkeys.h>
-#include <bt_subscribe.h>
-#include "BTUIKeyWatcher.h"
-#include "BTUIMainView.h"
-#include "debug.h"
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// NewL
-// ---------------------------------------------------------------------------
-//
-CBTUIKeyWatcher* CBTUIKeyWatcher::NewL( TAny* aCaller, TInt aServiceID  )
-    {
-    CBTUIKeyWatcher* self = new( ELeave ) CBTUIKeyWatcher( aCaller );
-    CleanupStack::PushL( self );
-    self->ConstructL( aServiceID );
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-// C++ default constructor
-// ---------------------------------------------------------------------------
-//
-CBTUIKeyWatcher::CBTUIKeyWatcher( TAny* aCaller )
-:   iCaller( aCaller )
-    {
-    }
-
-// ---------------------------------------------------------------------------
-// Symbian 2nd-phase constructor
-// ---------------------------------------------------------------------------
-//
-void CBTUIKeyWatcher::ConstructL( TInt aServiceID )
-    {
-    TRACE_FUNC_ENTRY
-       
-    if( aServiceID & KBTUIPHYCountWatcher )
-    	{
-	    TInt err = iPHYCountKey.Attach( KPropertyUidBluetoothCategory, KPropertyKeyBluetoothPHYCount );
-	    if( !err )
-	        {
-	        iPHYCountWatcher = CBTUIActive::NewL( this, KBTUIPHYCountWatcher, CActive::EPriorityStandard );
-	        if( iPHYCountWatcher != NULL )
-	        	{
-	        	iPHYCountKey.Subscribe( iPHYCountWatcher->RequestStatus() );
-	        	iPHYCountWatcher->GoActive();
-	        	}
-	        else
-	        	{
-	        	TRACE_INFO(_L("new iPHYCountWatcher failed"));
-	        	}
-	        }
-	    else
-	    	{
-	    	TRACE_INFO((_L("Attach failed %d"), err))
-	    	}	
-    	}
-    
-    TRACE_FUNC_EXIT
-    }
-
-// ---------------------------------------------------------------------------
-// Destructor
-// ---------------------------------------------------------------------------
-//
-CBTUIKeyWatcher::~CBTUIKeyWatcher()
-    {
-    TRACE_FUNC_ENTRY
-   
-    if( iPHYCountKey.Handle() )
-        {
-        iPHYCountKey.Cancel();
-        }
-    if( iPHYCountWatcher )
-    	{
-    	delete iPHYCountWatcher;
-    	iPHYCountWatcher = NULL;
-    	}
-    iPHYCountKey.Close();
-    
-    TRACE_FUNC_EXIT
-    }
-
-
-// ---------------------------------------------------------------------------
-// From class MBTEngActiveObserver.
-// Processes a changed key value.
-// ---------------------------------------------------------------------------
-//
-void CBTUIKeyWatcher::RequestCompletedL( CBTUIActive* aActive, TInt aId, TInt /*aStatus*/ )
-    {
-    switch( aId )
-        {
-        case KBTUIPHYCountWatcher:
-            iPHYCountKey.Subscribe( aActive->RequestStatus() );
-            aActive->GoActive();
-            static_cast<CBTUIMainView*>(iCaller)->UpdateParentView();
-            break;
-        default:
-        	TRACE_INFO((_L("wrong key notification! id=%d"), aId))
-            break;
-        }
-    TRACE_FUNC_EXIT
-    }
-
-// ---------------------------------------------------------------------------
-// From class MBTEngActiveObserver.
-// Handles a leave in RunL/RequestCompletedL by checking that all 
-// the subscriptions are active.
-// ---------------------------------------------------------------------------
-//
-void CBTUIKeyWatcher::HandleError( CBTUIActive* aActive, TInt aId, TInt aError )
-    {
-    TRACE_INFO((_L("status = %d"), aError))
-    (void) aError;
-    if( !aActive->IsActive() )
-        {
-        switch( aId )
-            {
-            case KBTUIPHYCountWatcher:
-                iPHYCountKey.Subscribe( aActive->RequestStatus() );
-                aActive->GoActive();
-                break;
-            default:         
-            	TRACE_INFO((_L("wrong key notification! id=%d"), aId))
-                break;
-            }
-        }
-    }
--- a/bluetoothengine/btui/Ecom/src/BTUIMainContainer.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,466 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:   This is the implementation of main container. It contains 
-*				  all necessary AVKON components and handles user inputs.
-*
-*/
-
-#include <e32base.h>
-#include <centralrepository.h> 
-#include <barsread.h>   // Resource reader
-#include <BtuiViewResources.rsg>     // Compiled resource ids
-#include <btfeaturescfg.h>					// For EnterpriseEnablementL()
-#include "BTUIMainContainer.h"
-#include "debug.h"      // Global declarations
-#include "btui.h"
-#ifdef __SERIES60_HELP
-#include <csxhelp/bt.hlp.hrh>   // Help ids
-#endif
-
-// ---------------------------------------------------------
-// CBTUIMainContainer::ConstructL
-// Symbian OS 2nd phase constructor can leave
-// ---------------------------------------------------------
-//
-void CBTUIMainContainer::ConstructL(const TRect& aRect, CBTUIMainView* aMainView )
-    {
-    TRACE_FUNC_ENTRY
-
-    CreateWindowL();
-
-	iMainView = aMainView;
-	
-    // Check if listbox is empty
-    __ASSERT_DEBUG(iBtMainListBox==0, PANIC( EBTMainListNotEmpty ));
-    __ASSERT_DEBUG(iBtAllItemsArray==0, PANIC( EBTAllFormatStingsArrayNotEmpty ));
-    __ASSERT_DEBUG(iBtListItemArray==0, PANIC( EBTFormatStingsArrayNotEmpty ));
-
-    // Create main itemlist
-    iBtMainListBox = new (ELeave) CAknSettingStyleListBox;
-    iBtMainListBox->SetContainerWindowL( *this );
-    iBtMainListBox->ConstructL( this, EAknListBoxMarkableList );
-
-
-    // Update settings from original sources via model    
-    iBtEngSettingsRef = iMainView->GetBtSettingsReference();    
-        
-    __ASSERT_DEBUG(iBtEngSettingsRef!=0, PANIC(EBTPanicIllegalValue));
-        
-    // Read all format strings from resources and create array for them
-    iBtAllItemsArray = iCoeEnv->ReadDesCArrayResourceL( R_BT_LABEL_STRINGS );
-    iBtListItemArray = new (ELeave) TMainListItemArray( 
-      iBtAllItemsArray, aMainView, iBtEngSettingsRef );
-
-    // Set up/down arrows at bottom of the screen (scrollbar)
-    iBtMainListBox->CreateScrollBarFrameL( ETrue );
-    iBtMainListBox->ScrollBarFrame()->SetScrollBarVisibilityL( 
-      CEikScrollBarFrame::EOn, CEikScrollBarFrame::EAuto );
-
-    // Set text labels for list items again (overwriting resource definitions)
-    iBtMainListBox->Model()->SetItemTextArray( iBtListItemArray );
-    iBtMainListBox->Model()->SetOwnershipType( ELbmDoesNotOwnItemArray );   // Does not delete items array
-
-    // Set up the observer (events listener)
-    iBtMainListBox->SetListBoxObserver( this );
-
-    
-    
-    SetRect(aRect);
-    ActivateL();    
-
-    TRACE_FUNC_EXIT
-    }
-
-// ---------------------------------------------------------
-// Destructor
-// ---------------------------------------------------------
-//
-CBTUIMainContainer::~CBTUIMainContainer()
-    {
-	TRACE_FUNC_ENTRY		   
-    delete iBtMainListBox;
-    delete iBtAllItemsArray;
-    delete iBtListItemArray;
-	TRACE_FUNC_EXIT
-    }
-
-// ---------------------------------------------------------
-// CBTUIMainContainer::SizeChanged()
-// From CCoeControl
-// Called by framework when the view size is changed
-// ---------------------------------------------------------
-//
-void CBTUIMainContainer::SizeChanged()
-    {
-	TRACE_FUNC_ENTRY    
-    iBtMainListBox->SetRect(Rect());    // Mandatory, otherwise not drawn
-    }
-
-// ---------------------------------------------------------
-// From CCoeControl
-// CBTUIMainContainer::CountComponentControls() const
-// ---------------------------------------------------------
-//
-TInt CBTUIMainContainer::CountComponentControls() const
-    {
-	TRACE_FUNC_ENTRY    
-	if(iBtMainListBox )
-    	return  1;
-    else
-    	return  0; // return nbr of controls inside this container
-    }
-
-// ---------------------------------------------------------
-// From CCoeControl
-// CBTUIMainContainer::ComponentControl(TInt aIndex) const
-// ---------------------------------------------------------
-//
-CCoeControl* CBTUIMainContainer::ComponentControl(TInt aIndex) const
-    {
-    TRACE_FUNC_ENTRY
-    if( aIndex ==0 )
-    	{
-    	return iBtMainListBox;
-    	}
-    return NULL;
-    }
-
-// ---------------------------------------------------------
-// From CCoeControl
-// CBTUIMainContainer::Draw
-// ---------------------------------------------------------
-//
-void CBTUIMainContainer::Draw(const TRect& /* aRect */) const
-    {
-    }
-
-// ---------------------------------------------------------
-// From CoeControl
-// CBTUIMainContainer::HandleControlEventL
-// ---------------------------------------------------------
-//
-void CBTUIMainContainer::HandleControlEventL( CCoeControl* /* aControl */, TCoeEvent /* aEventType */)
-    {
-    }
-
-// ---------------------------------------------------------
-// From CoeControl
-// CBTUIMainContainer::OfferKeyEventL
-// Redirect keypresses to the listbox
-// ---------------------------------------------------------
-//
-TKeyResponse CBTUIMainContainer::OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType)
-    {
-	TRACE_FUNC_ENTRY    
-    if(( iBtMainListBox ) && ( aKeyEvent.iCode != EKeyLeftArrow ) 
-      && (aKeyEvent.iCode != EKeyRightArrow ))
-        {
-        TKeyResponse res = iBtMainListBox->OfferKeyEventL( aKeyEvent, aType );
-        
-        // Store current item index for options list usage later
-        //
-        iCurrentItemIndex = iBtMainListBox->CurrentItemIndex();
-        return res;
-        }
-    return EKeyWasNotConsumed;
-    }
-
-// ---------------------------------------------------------
-// From MEikListBoxObserver 
-// CBTUIMainContainer::HandleListBoxEventL
-// ---------------------------------------------------------
-//
-void CBTUIMainContainer::HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType)
-    {
-	TRACE_FUNC_ENTRY
-	
-    __ASSERT_DEBUG(iMainView!=0, PANIC(EBTPanicIllegalValue));
-
-	// this is no longer called, unless MSK is disabled.
-	// if msk is not disabled, then  
-	// BTMainView::HandleCommand(EBTUICmdMSK) is called instead
-    if( aEventType == EEventEnterKeyPressed
-    || aEventType == EEventItemSingleClicked ) // Selection key pressed, or item clicked
-        {
-        TInt currentHighLightPosition = aListBox->CurrentItemIndex();
-        switch(currentHighLightPosition)
-            {
-            case EBTMainListItemPowerMode:
-                iMainView->HandleCommandL( EBTUICmdChangePowerStateSelect );
-                break;
-            case EBTMainListItemVisibilityMode:
-                iMainView->HandleCommandL( EBTUICmdChangeVisibilitySelect );
-                break;
-            case EBTMainListItemNameSetting:
-                iMainView->HandleCommandL( EBTUICmdChangeBTNameSelect );
-                break;
-                
-			// For Bluetooth SIM Access Profile feature
-			//
-			case EBTMainListItemSapMode:
-				iMainView->HandleCommandL( EBTUICmdChangeSapStateSelect );
-				break;
-            default:
-                break;
-            }
-        aListBox->DrawItem(currentHighLightPosition);   // Redraw item only to the screen
-        }
-    }
-
-// ----------------------------------------------------
-// From CEikListBox 
-// CBTUIMainContainer::CurrentItemIndex
-// ----------------------------------------------------
-//
-TInt CBTUIMainContainer::CurrentItemIndex()
-    {
-	TRACE_FUNC_ENTRY
-
-    return iBtMainListBox->CurrentItemIndex();
-    }
-
-// ----------------------------------------------------
-// CBTUIMainContainer::SettingChangedL
-// ----------------------------------------------------
-//
-void CBTUIMainContainer::SettingChanged( TBTMainListItemIndexes /* aListItem */ )
-    {
-	TRACE_FUNC_ENTRY
-
-    iBtMainListBox->DrawDeferred();
-    }    
-    
-#ifdef __SERIES60_HELP
-
-// ---------------------------------------------------------
-// From CCoeControl
-// CBTUIMainContainer::GetHelpContext
-// ---------------------------------------------------------
-//
-void CBTUIMainContainer::GetHelpContext(TCoeHelpContext& aContext) const
-    {
- 	TRACE_FUNC_ENTRY
-
-    aContext.iMajor = KBtuiUid3;
-    aContext.iContext = KBT_HLP_MAIN;
-    }
-
-#else
-
-// ---------------------------------------------------------
-// From CCoeControl
-// CBTUIMainContainer::GetHelpContext
-// ---------------------------------------------------------
-//
-void CBTUIMainContainer::GetHelpContext(TCoeHelpContext& /*aContext*/) const
-    {
-	TRACE_FUNC_ENTRY    
-    }
-
-#endif
-
-// ---------------------------------------------------------
-// From CCoeControl
-// CBTUIMainContainer::HandleResourceChange
-// ---------------------------------------------------------
-//
-void CBTUIMainContainer::HandleResourceChange( TInt aType )
-    {
-	TRACE_FUNC_ENTRY
-	//Pass the event to base class, so whenever resource changing happened, 
-	//this control will be considered to be re-drawed by base class, therefore
-	//no specific DrawNow() function call is needed here.
-    CCoeControl::HandleResourceChange(aType); 
-    
-    //Handle change in layout orientation
-    //aType == KAknsMessageSkinChange is handled by base class.
-    if (aType == KEikDynamicLayoutVariantSwitch)
-        {
-        //"TRect rect = iAvkonAppUi->ClientRect();"
-        // The line above provides to big rectangle in the bottom causing cba's overdrawn by by blank area.
-        // Correct way to do this is below.
-        TRect mainPaneRect;
-        AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane, mainPaneRect);
-        SetRect(mainPaneRect);
-		}      
-    }
-    
-// ---------------------------------------------------------
-// From CCoeControl
-// CBTUIMainContainer::FocusChanged
-// ---------------------------------------------------------
-//
-void CBTUIMainContainer::FocusChanged(TDrawNow /*aDrawNow*/)
-    {
-	TRACE_FUNC_ENTRY        
-	  if( iBtMainListBox)
-        {
-        iBtMainListBox->SetFocus( IsFocused() );
-        }
-    }
-
-    
-// ******************************************* 
-//    Nested class function implemenations:
-// *******************************************
-
-// ----------------------------------------------------
-// CBTUIMainContainer::TMainListItemArray::TMainListItemArray
-// Initialize friend class
-// ----------------------------------------------------
-CBTUIMainContainer::TMainListItemArray::TMainListItemArray( CDesCArray* aBtAllItemsArray, 
-																CBTUIMainView* aMainView, CBTEngSettings* aBtEngSettings)
-																
-        : iArray( *aBtAllItemsArray ),  // Store references
-        iMainView( aMainView ),        
-        iBtEngSettingsRef( aBtEngSettings )
-        
-    {
-	TRACE_FUNC_ENTRY        
-    }
-
-// ----------------------------------------------------
-// CBTUIMainContainer::TMainListItemArray::MdcaCount()
-// ----------------------------------------------------
-//
-TInt CBTUIMainContainer::TMainListItemArray::MdcaCount() const
-    {
-	TRACE_FUNC_ENTRY    
-    return KNumberOfMainViewItems;
-    }
-
-// ----------------------------------------------------
-// CBTUIMainContainer::TMainListItemArray::MdcaPointL
-// Main view listbox item formatter:
-// Returns the current format string depending value
-// of the item concerned.
-// ----------------------------------------------------
-//
-TPtrC CBTUIMainContainer::TMainListItemArray::MdcaPoint( TInt aIndex ) const
-    {
-	TRACE_FUNC_ENTRY    
-    _LIT(KBTUIEmptyFormatString, " \t \t\t "); // Empty format string if illegal indexing
-    TPtrC chosen;
-    	
-    switch ( aIndex )
-        {
-        case EBTMainListItemPowerMode:
-            {
-            TBTPowerStateValue powerState;
-            iBtEngSettingsRef->GetPowerState(powerState);            
-            if( powerState==EBTPowerOn )
-                chosen.Set( iArray.MdcaPoint( EBTUISettModulePowerOn ));
-            else
-                chosen.Set( iArray.MdcaPoint( EBTUISettModulePowerOff ));
-            break;
-            }
-
-        case EBTMainListItemVisibilityMode:
-            {
-        	TBTVisibilityMode mode;
-        	iBtEngSettingsRef->GetVisibilityMode(mode);          	
-            
-            switch(mode)
-                {                
-                case EBTVisibilityModeGeneral:
-                    chosen.Set( iArray.MdcaPoint( EBTUISettVisibilityModeGeneral ));
-                    break;
-                                 
-                case EBTVisibilityModeHidden:
-                    chosen.Set( iArray.MdcaPoint( EBTUISettVisibilityModeHidden ));
-                    break;
-                   
-                case EBTVisibilityModeTemporary:
-                    chosen.Set( iArray.MdcaPoint( EBTUISettVisibilityModeTemp ));
-                    break;                    
-                   
-                default:
-                    break;
-                }
-            break;
-            }
-
-        case EBTMainListItemNameSetting:
-            {
-            TDes &buf = MUTABLE_CAST(TBuf<KBTUIMaxFormattedNameLength>&,iItemText);
-            buf.Zero();
-            buf.Append( iArray.MdcaPoint( EBTUISettBTNameHeader ) );
-            buf.Append( *iMainView->GetBTLocalName() );
-            chosen.Set( iItemText );
-            break;
-            }
-
-		// For Bluetooth SIM Access Profile feature
-		case EBTMainListItemSapMode:
-            {
-			BluetoothFeatures::TEnterpriseEnablementMode mode = BluetoothFeatures::EEnabled;
-			TRAPD(err, mode = BluetoothFeatures::EnterpriseEnablementL());
-			if ( err == KErrNone )
-				{
-				if ( mode == BluetoothFeatures::EDataProfilesDisabled )
-					{
-					chosen.Set( iArray.MdcaPoint( EBTUISettSapDisabled ));
-					break;
-					}
-				}
-			
-			TInt sapStatus;    
-			TRAP_IGNORE(GetSapStatusL(sapStatus););
-			    
-			if(sapStatus==EBTSapEnabled)
-				{
-				 chosen.Set( iArray.MdcaPoint( EBTUISettSapEnabled ));
-				}
-			else
-				{
-				 chosen.Set( iArray.MdcaPoint( EBTUISettSapDisabled ));
-				}          
-				   
-			TInt sapMode = KErrNone;
-			TRAP_IGNORE(sapMode = iMainView->GetSapStatusL());  
-			
-			
-			if(sapMode==EBTSapEnabled)
-				{
-				if ( sapMode ) 
-					{			
-					chosen.Set( iArray.MdcaPoint( EBTUISettSapEnabled ));
-					}
-				else
-					{
-					chosen.Set( iArray.MdcaPoint( EBTUISettSapDisabled ));
-					}
-				}
-			               
-            break;
-            }	
-        default:
-            chosen.Set( KBTUIEmptyFormatString );
-            break;
-        }
-
-    return chosen;
-    }
-
-// ----------------------------------------------------------------------
-// CBTUIMainContainer::TMainListItemArray::GetSapStatusL(TInt& aStatus)
-// ----------------------------------------------------------------------
-//
-void CBTUIMainContainer::TMainListItemArray::GetSapStatusL( TInt& aStatus )
-{    
-    CRepository* repository = CRepository::NewL(KCRUidBTEngPrivateSettings);
-    CleanupStack::PushL(repository);            	
-    repository->Get(KBTSapEnabled, aStatus);
-    CleanupStack::PopAndDestroy(repository);      
-}
--- a/bluetoothengine/btui/Ecom/src/BTUIMainView.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1402 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:   This is the settings view of btui.
-*
-*/
-
-#include <aknViewAppUi.h>       		// AVKON components
-#include <avkon.hrh>
-#include <akntitle.h>
-#include <featmgr.h>            		// Feature Manager API
-
-#include "btui.hrh"             		// Menu commands
-#include "btui.h"
-#include "BTUIMainView.h"
-#include "BTUIMainContainer.h"
-#include "debug.h"
-#include "BTUIKeyWatcher.h"
-#include "BTUIPairedDevicesView.h"
-#include "BTUIBlockedDevicesView.h"
-
-#include <BtuiViewResources.rsg>     	// Compiled resource ids
-#include <AknGlobalNote.h>
-#include <aknnotewrappers.h>
-#include <aknradiobuttonsettingpage.h>
-#include <akntextsettingpage.h>
-#include <StringLoader.h>   			// Series 60 localisation stringloader
-#include <aknslidersettingpage.h> 		//visibility time setting page
-#include <data_caging_path_literals.hrh> 
-#include <bautils.h>         			// BAFL utils (for language file)
-#include <btui.mbg>						// application icon for General Setting
-#include <AknMediatorFacade.h>
-#include <AknUtils.h>					// For char filter
-#include <CoreApplicationUIsSDKCRKeys.h>
-#include <hlplch.h>         			// Help launcher
-#include <secondarydisplay/BtuiSecondaryDisplayAPI.h>
-#include <btengprivatecrkeys.h>
-#include <gstabhelper.h>
-#include <gsfwviewuids.h>
-#include <gsparentplugin.h>
-#include <utf.h>        				// CnvUtfConverter
-#include <btfeaturescfg.h>					// For EnterpriseEnablementL()
-#include <btnotif.h>
-
-// ---------------------------------------------------------
-// CBTUIMainView::NewL
-// Two phased constructor 
-// ---------------------------------------------------------
-//
-CBTUIMainView* CBTUIMainView::NewL(MBtuiPluginViewActivationObserver* aObserver)
-    {
-    //TRACE_FUNC_ENTRY
-
-    CBTUIMainView* self = new (ELeave) CBTUIMainView(aObserver);
-    
-	// Set construction type, before ConstructL().	
-    self->iConstructAsGsPlugin = EFalse;                  
-
-	CleanupStack::PushL( self );	
- 	self->ConstructL();
-	CleanupStack::Pop(self);
-
-	//TRACE_FUNC_EXIT
-    return self;
-    }
-
-
-// ---------------------------------------------------------
-// CBTUIMainView::NewL
-// Two phased constructor
-// ---------------------------------------------------------
-//
-CBTUIMainView* CBTUIMainView::NewGsPluginL()
-    {
-    //TRACE_FUNC_ENTRY
-
-    CBTUIMainView* self = new (ELeave) CBTUIMainView(NULL);    
-
-	// Set construction type, before ConstructL(). 
-    self->iConstructAsGsPlugin = ETrue;
-    
-	CleanupStack::PushL( self );	
- 	self->ConstructL();
-
-	CleanupStack::Pop( self );
-
-	//TRACE_FUNC_EXIT
-    return self;
-    }
-
-
-// ---------------------------------------------------------
-// CBTUIMainView::CBTUIMainView
-// ---------------------------------------------------------
-    
-CBTUIMainView::CBTUIMainView(MBtuiPluginViewActivationObserver* aObserver )
-	:iConstructAsGsPlugin(EFalse), iActivationObserver(aObserver)
-	{
-	}
-// ---------------------------------------------------------
-// CBTUIMainView::ConstructL
-// Symbian 2nd phase constructor can leave.
-// ---------------------------------------------------------
-//
-void CBTUIMainView::ConstructL()
-    {
-	TRACE_FUNC_ENTRY
-	    
-	// Plugin load resource manually.
-	// These resources are needed by BaseConstructL
-	
-    iEikEnv = CEikonEnv::Static();
-
-    TFileName filename;
-    filename += KFileDrive;
-    filename += KDC_RESOURCE_FILES_DIR; 
-    filename += KResourceFileName;
-
-    BaflUtils::NearestLanguageFile(iEikEnv->FsSession(),filename);
-    iResourceFileFlag=iEikEnv->AddResourceFileL(filename);
-        
-	// According to Construction type, different softkey resource will be used.
-	//
-	if(iConstructAsGsPlugin)
-		{
-	    iViewArray = new CArrayPtrFlat<MGSTabbedView>( 3 );   
-	    iTabHelper = CGSTabHelper::NewL();
-	    iViewArray->AppendL(this); 
-		iParentViewNotSetYet = ETrue;
-		
-		iKeyWatcher = CBTUIKeyWatcher::NewL(this, KBTUIPHYCountWatcher);
-
-		// Construct OtherDeviceView
-		//
-	    CAknView* pairedDeviceView = CBTUIPairedDevicesView::NewLC( this, iViewArray );	
-	    iAppUi->AddViewL( pairedDeviceView ); // Transfer ownership to CAknViewAppUi
-	    CleanupStack::Pop(pairedDeviceView );
-
-		// Construct BlockDeviceView
-		//
-	    CAknView* blockedDeviceView = CBTUIBlockedDevicesView::NewLC( this, iViewArray );
-	    iAppUi->AddViewL( blockedDeviceView ); // Transfer ownership to CAknViewAppUi
-	    CleanupStack::Pop(blockedDeviceView );        
-		
-		BaseConstructL( R_BTUI_MAIN_VIEW_GS_PLUGIN );     	
-		}
-	else
-		{
-		BaseConstructL( R_BTUI_MAIN_VIEW );
-		}
-
-    iBtEngSettings = CBTEngSettings::NewL(this);         
-        
-	// Sets up TLS, must be done before FeatureManager is used.
-	FeatureManager::InitializeLibL();
-	iCoverDisplayEnabled = FeatureManager::FeatureSupported(KFeatureIdCoverDisplay);
-    	
-
-	TRACE_FUNC_EXIT
-    }
-
-// ---------------------------------------------------------
-// ---------------------------------------------------------
-// Destructor.
-// ---------------------------------------------------------
-//
-CBTUIMainView::~CBTUIMainView()
-    {
-	TRACE_FUNC_ENTRY
-    
-	iEikEnv->DeleteResourceFile(iResourceFileFlag);
-	
-    if ( iContainer )
-        {
-        AppUi()->RemoveFromViewStack( *this, iContainer );
-        }
-	
-	delete iBtEngSettings;
-    delete iContainer;	
-	delete iIdle;
-
-    if(iConstructAsGsPlugin)
-    	{
-	    if ( iViewArray )
-	        {
-	        iViewArray->Reset();
-	        delete iViewArray;
-	        }    	
-	        
-	    delete iTabHelper;
-	    delete iKeyWatcher;
-    	}
-    
-	// Frees the TLS. Must be done after FeatureManager is used.
-    FeatureManager::UnInitializeLib();  
-    	
-
-	TRACE_FUNC_EXIT
-	}
-
-// ----------------------------------------------------
-// CBTUIMainView::PowerStateChanged
-// ----------------------------------------------------
-//
-void CBTUIMainView::PowerStateChanged( TBTPowerStateValue  )
-    {
-	TRACE_FUNC_ENTRY
-	if(iContainer)
-    	{    
-        iContainer->SettingChanged(EBTMainListItemPowerMode);
-    	}
-	
-	if( iConstructAsGsPlugin )
-		{
-		UpdateParentView();
-		}
-	TRACE_FUNC_EXIT	
-    }
-// ----------------------------------------------------
-// CBTUIMainView::VisibilityModeChanged
-// ----------------------------------------------------
-//    
-void CBTUIMainView::VisibilityModeChanged( TBTVisibilityMode  )
-    {
-	TRACE_FUNC_ENTRY
-	if(iContainer)
-    	{
-    	iContainer->SettingChanged(EBTMainListItemVisibilityMode);
-    	}
-    
-    if( iConstructAsGsPlugin )
-		{
-		UpdateParentView();
-		}	
-    }
-    
-// ---------------------------------------------------------
-// From CAknView
-// CBTUIMainView::Id
-// ---------------------------------------------------------
-//
-TUid CBTUIMainView::Id() const
-    {
-	TRACE_FUNC_ENTRY    
-    if(iConstructAsGsPlugin)
-    	{
-	    return KGsBtuiPluginUid; //same as ecom impl UID, required by GS interface.
-    	}
-    else
-    	{
-    	return KBtuiPluginUidMainView;    //view id
-    	}
-    }
-// ---------------------------------------------------------
-// CBTUIMainView::HandleMiddleSoftkey
-// Handles middle soft key
-// ---------------------------------------------------------
-//    
-void CBTUIMainView::HandleMiddleSoftkey()
-    {
-		TRACE_FUNC_ENTRY 	
-       	if( iContainer == NULL ) return;
-    	
-        TInt currentHighLightPosition= iContainer->CurrentItemIndex();
-        switch(currentHighLightPosition)
-            {
-            case EBTMainListItemPowerMode:
-                HandleCommand( EBTUICmdChangePowerStateSelect );
-                break;
-            case EBTMainListItemVisibilityMode:
-                HandleCommand( EBTUICmdChangeVisibilitySelect );
-                break;
-            case EBTMainListItemNameSetting:
-                HandleCommand( EBTUICmdChangeBTNameSelect );
-                break;
-                 
-			// For Bluetooth SIM Access Profile feature
-			//
-			case EBTMainListItemSapMode:
-				HandleCommand( EBTUICmdChangeSapStateSelect );
-				break;
-            default:
-                break;
-            }
-		TRACE_FUNC_EXIT	        	    
-    }    
-// ---------------------------------------------------------
-// TUid CBTUIMainView::HandleCommand
-// ---------------------------------------------------------
-//   
-void CBTUIMainView::HandleCommand(TInt aCommand)    
-{
-    TRAP_IGNORE(HandleCommandL(aCommand));    
-}
-// ---------------------------------------------------------
-// CBTUIMainView::HandleCommandL
-// Redirects commands to the appui class.
-// ---------------------------------------------------------
-//
-void CBTUIMainView::HandleCommandL(TInt aCommand)
-    {
-	TRACE_INFO((_L(">> CBTUIMainView::HandleCommandL: %d"), aCommand))        
-    switch ( aCommand )
-        {
-        //middle soft key is handled here
-        case EBTUICmdMSK:
-	 		 HandleMiddleSoftkey();
-	 		 break;
-         case EAknSoftkeyBack:
-	         AppUi()->ActivateLocalViewL(iParentView.iViewUid);
-             break;
-
-        case EAknSoftkeyExit:
-            {
-			AppUi()->ProcessCommandL(EEikCmdExit);
-            break;
-            }
-            
-#ifdef __SERIES60_HELP
-        case EAknCmdHelp:
-            {
-            HlpLauncher::LaunchHelpApplicationL(
-            	iEikonEnv->WsSession(), AppUi()->AppHelpContextL());
-            break;
-            }          
-#endif
-        case EBTUICmdChangePowerStateMenu:
-            {
-            AskPowerModeDlgL();
-            break;
-            }
-
-        case EBTUICmdChangePowerStateSelect:
-            {            
-            TBTPowerStateValue powerState;
-            iBtEngSettings->GetPowerState(powerState);                        
-            if(powerState==EBTPowerOn)
-                {
-                SetPowerStatusL( EFalse );
-                }
-            else
-                {
-                SetPowerStatusL( ETrue );
-                }            
-            break;
-            }
-
-        case EBTUICmdChangeVisibilitySelect: // now both select key and menu command will triger the setting page.
-        case EBTUICmdChangeVisibilityMenu:
-            {
-            AskVisibilityDlgL();
-            break;
-            }
-
-        case EBTUICmdChangeBTNameMenu:
-        case EBTUICmdChangeBTNameSelect:
-            {
-            AskNewBtNameDlgL();
-            iContainer->SettingChanged(TBTMainListItemIndexes(iContainer->CurrentItemIndex())); 
-            break;
-            }
-		
-		// For Bluetooth SIM Access Profile feature
-		case EBTUICmdChangeSapStateSelect:
-            {
-	        
-	        if ( BluetoothFeatures::EnterpriseEnablementL() == BluetoothFeatures::EDataProfilesDisabled )
-	        	{
-		        RNotifier notifier;
-		        User::LeaveIfError(notifier.Connect());
-		        CleanupClosePushL(notifier);
-				User::LeaveIfError(notifier.StartNotifier(KBTEnterpriseItSecurityInfoNotifierUid, KNullDesC8 ));
-				CleanupStack::PopAndDestroy(&notifier);
-	        	}
-	        else
-	        	{
-	        	TInt sapStatus;
-	        	CRepository* repository = CRepository::NewL(KCRUidBTEngPrivateSettings);
-	        	CleanupStack::PushL(repository);            	
-				repository->Get(KBTSapEnabled, sapStatus);
-				CleanupStack::PopAndDestroy(repository);			    
-				
-	           if(sapStatus==EBTSapEnabled)
-				    {
-	                 SetSapStatusL( EBTSapDisabled );
-	                }
-	           else
-	                {
-	                 SetSapStatusL( EBTSapEnabled );
-					}     
-	            iContainer->SettingChanged(
-	              TBTMainListItemIndexes(iContainer->CurrentItemIndex())); 				  
-              	}     
-            break;
-            }
-
-		// For Bluetooth SIM Access Profile feature
-        case EBTUICmdChangeSapStateMenu:
-            {
-            AskSapModeDlgL();
-            iContainer->SettingChanged(
-              TBTMainListItemIndexes(iContainer->CurrentItemIndex())); 				
-            break;
-            }				
-
-        default:
-            {
-            AppUi()->HandleCommandL( aCommand );
-			iContainer->SettingChanged(
-			  TBTMainListItemIndexes(iContainer->CurrentItemIndex())); 
-            break;
-            }
-        }
-	TRACE_FUNC_EXIT        
-    }
-
-
-// ---------------------------------------------------------
-// From CAknView
-// CBTUIMainView::DoActivateL
-// ---------------------------------------------------------
-//
-void CBTUIMainView::DoActivateL( const TVwsViewId&  aPrevViewId,
-                                 TUid /*aCustomMessageId*/,
-                                 const TDesC8& /*aCustomMessage*/)
-    {            
-    TRACE_FUNC_ENTRY
-    
-    
-	if ( BluetoothFeatures::EnterpriseEnablementL() == BluetoothFeatures::EDisabled ) 
-		{
-		RNotifier notifier;
-		User::LeaveIfError(notifier.Connect());
-		CleanupClosePushL(notifier);
-		User::LeaveIfError(notifier.StartNotifier(KBTEnterpriseItSecurityInfoNotifierUid, KNullDesC8 ));
-		CleanupStack::PopAndDestroy(&notifier);
-		
-		AppUi()->ActivateLocalViewL(aPrevViewId.iViewUid); //go back straight away
-		return;
-		}
-    
-    
-    if( iConstructAsGsPlugin )
-        {
-	 	// Only set parent view when entering BT GS setting.
-		// since tab change chould make aPrevViewId assign to non-parent views. e.g. paired or blocked view.
-		if(iParentViewNotSetYet)
-			{
-	        iParentView = aPrevViewId; 
-	        iParentViewNotSetYet = EFalse;
-			}
-
-		// Setup tab group
-        iTabHelper->CreateTabGroupL( Id(), iViewArray ); 
-        } 
-        
-    iContainer = new (ELeave) CBTUIMainContainer;
-    iContainer->SetMopParent(this); // MObjectProvider
-    iContainer->ConstructL( ClientRect(), this );
-
-    // Setup the title
-    //
-    HBufC* btTitleMain = iCoeEnv->AllocReadResourceLC(R_BT_TITLE_BLUETOOTH);
-    CEikStatusPane* statusPane = StatusPane();
-    CAknTitlePane* titlePane;
-    titlePane = (CAknTitlePane*) statusPane->ControlL(TUid::Uid(EEikStatusPaneUidTitle));
-    titlePane->SetTextL(btTitleMain->Des());
-    CleanupStack::PopAndDestroy(btTitleMain); // btTitleMain
-    btTitleMain = NULL;
-
-    AppUi()->AddToStackL( *this, iContainer );
-	
-	//Check if the local name has been set. If not ask user to set name
-	
-	TBool nameStatus = EFalse;
-    TInt err = IsLocalNameModifiedL( nameStatus );
-    
-    if( err || nameStatus == EBTLocalNameDefault )
-    	{
-    	InitiateBTLocalNameQueryL();    // Ask local Bluetooth name if not given yet.
-    	}
-	
-	// notify observer   
-    if( iActivationObserver  && iConstructAsGsPlugin == EFalse)
-    {    	    
-        iActivationObserver->PluginViewActivated(EMainViewId);        
-    }
-    
-	TRACE_FUNC_EXIT
-    }
-
-// ---------------------------------------------------------
-// From CAknView
-// CBTUIMainView::DoDeactivate
-// ---------------------------------------------------------
-//
-void CBTUIMainView::DoDeactivate()
-    {
-	TRACE_FUNC_ENTRY
-
-    if ( iContainer )
-        {
-        AppUi()->RemoveFromStack( iContainer );
-        }
-
-    delete iContainer;
-    iContainer = NULL;    
-     
-    if(iConstructAsGsPlugin)
-    	{
-    	iTabHelper->RemoveTabGroup();
-	    CGSBaseView::DoDeactivate();  	
-    	}
-	TRACE_FUNC_EXIT
-    
-    }
-
-// ---------------------------------------------------------
-// From CAknView
-// CBTUIMainView::DynInitMenuPaneL
-// Shows selected item's context sensitive options menu.
-// ---------------------------------------------------------
-//
-void CBTUIMainView::DynInitMenuPaneL( TInt aResId, CEikMenuPane* aMenu )
-    {
-	TRACE_FUNC_ENTRY
-    
-	// dim help if it exists and is not supported	
-	TInt tmp;	
-	if (  aMenu->MenuItemExists(EAknCmdHelp,tmp ) )			
-		{			
-		aMenu->SetItemDimmed(EAknCmdHelp,
-		  !FeatureManager::FeatureSupported( KFeatureIdHelp ) );
-		}
-			
-    if ( aResId == R_BTUI_MAIN_VIEW_MENU )
-        {
-        // Set all menus dimmed at first(hide them all)
-        //
-        aMenu->SetItemDimmed(EBTUICmdChangePowerStateMenu, ETrue);
-        aMenu->SetItemDimmed(EBTUICmdChangeVisibilityMenu, ETrue);
-        aMenu->SetItemDimmed(EBTUICmdChangeBTNameMenu, ETrue);
-        if ( FeatureManager::FeatureSupported( KFeatureIdBtSap ) )
-            aMenu->SetItemDimmed(EBTUICmdChangeSapStateMenu, ETrue);
-
-        }
-	TRACE_FUNC_EXIT        
-    }
-
-// ---------------------------------------------------------
-// CBTUIMainView::SettingChangedL
-// Redraws the BT Name field.
-// ---------------------------------------------------------
-//
-void CBTUIMainView::SettingChangedL( TBTMainListItemIndexes aListItem )
-	{
-	TRACE_FUNC_ENTRY
-	if(iContainer)
-		{
-		iContainer->SettingChanged(aListItem);	
-		}
-	
-	}
-
-// ----------------------------------------------------
-// CBTUIMainView::SetPowerStatusL
-// ----------------------------------------------------
-//
-TInt CBTUIMainView::SetPowerStatusL( TBool aValue )
-    {
-	TRACE_FUNC_ENTRY
-
-    TInt errorCode = KErrNone;    
-    TBTPowerStateValue previousPowerMode;
-    errorCode=iBtEngSettings->GetPowerState(previousPowerMode); 
-    if(errorCode)    
-    	return errorCode;    
-                   
-    TBool legalToChange = ETrue;
-
-    if ( ( previousPowerMode==EBTPowerOn ) && ( !aValue )) // power ON -> OFF
-        {
-        TRACE_INFO(_L("power ON -> OFF"))
-
-        // Check active connections before query                        
-        if( TBTUIViewsCommonUtils::IsAnyDeviceConnectedL())
-        	{
-            CAknQueryDialog* dlg = CAknQueryDialog::NewL();
-
-			if(iCoverDisplayEnabled)
-				{
-				CleanupStack::PushL(dlg);
-    			dlg->PublishDialogL(ECmdShowBtSwitchOffAnywayQuery, KUidCoverUiCategoryBtui); // initializes cover support				
-				CleanupStack::Pop(dlg);
-				}
-
-            TInt keypress = dlg->ExecuteLD( R_BT_SWITCH_OFF_ANYWAY_QUERY );
-            if( !keypress )  // User has not accepted the dialog
-                {
-                legalToChange = EFalse;
-                }
-            }
-        TRACE_INFO((_L("power ON -> OFF, legalToChange = %d"), legalToChange))
-
-        }
-    else if ( ( !previousPowerMode ) && ( aValue ) ) // power OFF -> ON
-        {
-        TRACE_INFO(_L("power OFF -> ON"))
-
-        TInt offlineModeOff = 0;    // possible values are 0 and 1
-        TInt activationEnabled = 0; // possible values are 0 and 1
-               
-        CRepository* repository = CRepository::NewL(KCRUidCoreApplicationUIs);
-        CleanupStack::PushL(repository);
-        repository->Get(KCoreAppUIsNetworkConnectionAllowed, offlineModeOff);
-		// Closing connection:
-		CleanupStack::PopAndDestroy(repository);        
-        repository =NULL;                        
-        repository = CRepository::NewL(KCRUidBluetoothEngine);
-		// Check activation enabled
-		CleanupStack::PushL(repository);
-		repository->Get(KBTEnabledInOffline, activationEnabled);
-		// Closing connection:
-		CleanupStack::PopAndDestroy(repository);
-        
-                
-		TRACE_INFO((_L("power OFF -> ON, offlineModeOff = %d"), offlineModeOff ))
-		TRACE_INFO((_L("power OFF -> ON, activationEnabled = %d"),  activationEnabled ))
-
-        // Is offline mode on
-        //
-        if ( !offlineModeOff )
-            {
-            // Choose user interaction
-            //
-            if ( activationEnabled )
-                {
-                // Create and show query
-                //
-                CAknQueryDialog* dlg = CAknQueryDialog::NewL();
-                
-				if(iCoverDisplayEnabled)
-					{  
-					CleanupStack::PushL(dlg);
-    	   	    	dlg->PublishDialogL(ECmdShowBtActivateInOfflineQuery, KUidCoverUiCategoryBtui); // initializes cover support
-					CleanupStack::Pop(dlg);
-					}
-
-                TInt keypress = dlg->ExecuteLD( R_BT_ACTIVATE_IN_OFFLINE_QUERY );
-                if( !keypress ) // User has not accepted the dialog
-                    {
-                    legalToChange = EFalse;
-                    }
-                }
-            else
-                {
-                legalToChange = EFalse;
-
-                // Load a string, create and show a note
-                //
-                HBufC* stringHolder = StringLoader::LoadLC( R_BT_OFFLINE_DISABLED );
-                CAknInformationNote* note = new (ELeave) CAknInformationNote();
-                
-				if(iCoverDisplayEnabled)
-					{  
-					CleanupStack::PushL(note);
- 	    	   	    note->PublishDialogL(ECmdShowBtOfflineDisabledNote, KUidCoverUiCategoryBtui); // initializes cover support
-					CleanupStack::Pop(note);
-					}
-                
-                note->ExecuteLD( *stringHolder );
-                CleanupStack::PopAndDestroy(stringHolder); //stringHolder
-                }
-            }
-        }
-
-    TRACE_INFO((_L("legalToChange = %d"), legalToChange))
-
-    // Switch powermode
-    //
-    if ( legalToChange )
-        {
-        
-        TInt errorCode = KErrNone;    
-        TBTPowerStateValue powerMode;
-        if(aValue)
-    	    {
-    		powerMode=EBTPowerOn;	    	
-    	    }    	
-        else
-        	{
-        	powerMode=EBTPowerOff;
-        	}
-        	
-        errorCode=iBtEngSettings->SetPowerState(powerMode); 
-                
-        if( (errorCode == KErrNone ) && (aValue))
-        
-        	{
-        	//Check the visibility mode
-        	TBTVisibilityMode visiMode;
-        	errorCode=iBtEngSettings->GetVisibilityMode(visiMode);
-        	if(errorCode==KErrNone)
-	        	{        		            		      	        		        	
-	        	if (visiMode == EBTVisibilityModeHidden)
-	        		{
-	        		//Show note
-	        		CAknNoteDialog* dlg = new (ELeave) CAknNoteDialog( CAknNoteDialog::EConfirmationTone,
-	                                                                 CAknNoteDialog::ELongTimeout );
-					if(iCoverDisplayEnabled)
-						{  
-						CleanupStack::PushL(dlg);
-		    	   	    dlg->PublishDialogL(ECmdBtuiShowBtHiddenFromOthersNote, KUidCoverUiCategoryBtui); // initializes cover support
-						CleanupStack::Pop(dlg);
-						}
-											
-	                dlg->ExecuteLD( R_BT_HIDDEN_FROM_OTHERS );
-	        		}
-	        	} 
-        	}
-        if ( errorCode != KErrNone && errorCode != KErrAlreadyExists ) 
-            {
-            TRAP_IGNORE(TBTUIViewsCommonUtils::ShowGeneralErrorNoteL());
-            }
-           
-        }
-        
-    TRACE_INFO((_L("SetPowerStatusL() complete. errorCode = %d"), errorCode))
-    return errorCode;
-    }
-
-// ----------------------------------------------------------
-// CBTUIMainView::SetVisibilityStatusL
-// ----------------------------------------------------------
-//
-void CBTUIMainView::SetVisibilityStatusL( TBTVisibilityMode aMode )
-    {
-	TRACE_FUNC_ENTRY
-
-    TInt errorCode = KErrNone;
-    
-    switch( aMode )
-        {
-            case EBTVisibilityModeGeneral:
-            {            
-            errorCode = iBtEngSettings->SetVisibilityMode(aMode);
-            
-			if(errorCode == KErrNone)
-				{
-	            CAknNoteDialog* dlg = new (ELeave) CAknNoteDialog( CAknNoteDialog::EConfirmationTone,
-                                                               CAknNoteDialog::ELongTimeout );
-
-				if(iCoverDisplayEnabled)
-					{  
-					CleanupStack::PushL(dlg);
-	    	   	    dlg->PublishDialogL(ECmdShowBtPhoneVisibToAllNote, KUidCoverUiCategoryBtui); // initializes cover support
-					CleanupStack::Pop(dlg);
-					}
-    	        dlg->ExecuteLD( R_BT_PHONE_VISIB_TO_OTH_NOTE );
-				}
-            }
-            break;
-
-            case EBTVisibilityModeHidden:
-            {            
-            errorCode = iBtEngSettings->SetVisibilityMode(aMode);
-            
-			if(errorCode == KErrNone)
-				{
-	            CAknNoteDialog* dlg = new (ELeave) CAknNoteDialog( CAknNoteDialog::EConfirmationTone,
-                                                               CAknNoteDialog::ELongTimeout );
-
-				if(iCoverDisplayEnabled)
-					{  
-					CleanupStack::PushL(dlg);
-	    	   	    dlg->PublishDialogL(ECmdBtuiShowBtHiddenFromOthersNote, KUidCoverUiCategoryBtui); // initializes cover support
-					CleanupStack::Pop(dlg);
-					}
-    	        dlg->ExecuteLD( R_BT_HIDDEN_FROM_OTHERS );		
-				}
-            }
-            break;
-                    
-            case EBTVisibilityModeTemporary:
-            {
-            // Asks user to turn on Bluetooth, if temporary visibility is chosen.            
-            if( TBTUIViewsCommonUtils::TurnBTOnIfNeededL(iBtEngSettings,iCoverDisplayEnabled) != KErrNone)
-            	{
-            	return;
-            	}            
-		    TInt sliderValue = 1; 			    
-		    CAknSettingPage* dlg = 
-		        new(ELeave) CAknSliderSettingPage(R_VISIBILITY_TIME_SETTING_PAGE, 
-		                                          sliderValue);			 
-		    
-		    if (dlg->ExecuteLD(CAknSettingPage::EUpdateWhenChanged))
-		        {			        		        
-		        errorCode = iBtEngSettings->SetVisibilityMode( aMode, sliderValue );
-		        }
-            }
-            break;
-
-            default:
-                break;
-        }
-
-    if((errorCode != KErrNone) && (errorCode != KErrAlreadyExists))
-        {
-	    TRAP_IGNORE(TBTUIViewsCommonUtils::ShowGeneralErrorNoteL());
-        }
-	TRACE_FUNC_EXIT        
-    }
-    
-// ----------------------------------------------------------
-// CBTUIMainView::GetBTLocalName
-// ----------------------------------------------------------
-//
-TDesC* CBTUIMainView::GetBTLocalName()
-    {
-	TRACE_FUNC_ENTRY
-
-    iTempNameBuffer.Zero();                 // Empty Local BT device name   
-    TInt err=iBtEngSettings->GetLocalName( iTempNameBuffer );// Store name into member variable
-    if(err!=KErrNone)
-    	TRAP_IGNORE(TBTUIViewsCommonUtils::ShowGeneralErrorNoteL());
-
-    // Cut the excess part of the name away. The query can handle only 
-    // KBTUIMaxNameLength characters.
-    //
-    if( iTempNameBuffer.Length() > KBTUIMaxNameLength )
-        {
-        iTempNameBuffer.SetLength( KBTUIMaxNameLength );
-        }
-	TRACE_FUNC_EXIT
-    return &iTempNameBuffer;                // And return reference for it
-    }
-
-// ----------------------------------------------------------
-// CBTUIMainView::AskNewBtNameDlgL
-// ----------------------------------------------------------
-//
-void CBTUIMainView::AskNewBtNameDlgL()
-    {
-    TRACE_FUNC_ENTRY
-
-    // Cut the excess part of the name away. The query can handle only 
-    // KBTUIMaxNameLength characters.
-    //
-    if( iTempNameBuffer.Length() > KBTUIMaxNameLength )
-        {
-        iTempNameBuffer.SetLength( KBTUIMaxNameLength );
-        }
-
-    FOREVER
-        {
-        CAknTextSettingPage* dlg = new( ELeave )CAknTextSettingPage( R_BT_NAME_SETTING_PAGE,
-                                                                     iTempNameBuffer );
-		if( dlg->ExecuteLD( CAknSettingPage::EUpdateWhenChanged ))
-            {
-            // Remove trouble making control chars
-	        AknTextUtils::StripCharacters(iTempNameBuffer,  KAknStripListControlChars);    
-	                 
-            iTempNameBuffer.TrimAll();                  // Remove spaces and check what is left..
-            if( iTempNameBuffer.Length() > 0 )
-                {
-                
-                if(iBtEngSettings->SetLocalName(iTempNameBuffer) != KErrNone)
-                    {
-                    TBTUIViewsCommonUtils::ShowGeneralErrorNoteL();
-                    }
-				TRACE_FUNC_EXIT       
-                return;
-                }
-            }
-        else
-            {
-            TRACE_FUNC_EXIT       
-            return; // User has cancelled this operation
-            }
-        }
-	 
-    }
-
-// ----------------------------------------------------------
-// CBTUIMainView::AskPowerModeDlgL
-// ----------------------------------------------------------
-//
-void CBTUIMainView::AskPowerModeDlgL()
-    {
-    TRACE_FUNC_ENTRY
-
-    CDesCArrayFlat* items = iCoeEnv->ReadDesCArrayResourceL( R_BT_POWER_MODES );
-    CleanupStack::PushL(items);
-    TBTPowerStateValue powerState;
-    iBtEngSettings->GetPowerState(powerState);          
-    TInt currentItem = !powerState; // Implicit cast from Not-TBool to int (inverted)
-
-    CAknRadioButtonSettingPage* dlg = new ( ELeave )CAknRadioButtonSettingPage( 
-      R_BT_POWER_SETTING_PAGE, currentItem, items );
-    if( dlg->ExecuteLD( CAknSettingPage::EUpdateWhenChanged ))
-        {
-        SetPowerStatusL( static_cast<TBool>( !currentItem )); // Cast it back (invert again)
-        }
-    CleanupStack::PopAndDestroy(items); // items
-    TRACE_FUNC_EXIT
-    }
-
-// ----------------------------------------------------------
-// CBTUIMainView::AskVisibilityDlgL
-// ----------------------------------------------------------
-//
-void CBTUIMainView::AskVisibilityDlgL()
-    {
-	TRACE_FUNC_ENTRY
-
-    CDesCArrayFlat* items = iCoeEnv->ReadDesCArrayResourceL( R_BT_VISIBILITY_MODES );
-    CleanupStack::PushL(items);
-
-    TInt currentItem = 0;  // Current position at radio button setting page    
-    TBTVisibilityMode currentMode;
-    TInt errorCode(iBtEngSettings->GetVisibilityMode(currentMode));    
-    if(errorCode==KErrNone)
-	    {
-
-	    switch( currentMode )   // Map from mode to radio button position at setting page
-	        {
-	        case EBTVisibilityModeGeneral:
-	            currentItem = 0;
-	            break;
-	        case EBTVisibilityModeTemporary: // temp visible
-	            currentItem = 1;
-	            break;	        
-	        case EBTVisibilityModeHidden:
-	            currentItem = 1+1;
-	            break;
-	        default:
-	            break;
-	        }
-
-	    // Ask new mode from user
-
-	    CAknRadioButtonSettingPage* dlg = new ( ELeave )CAknRadioButtonSettingPage( 
-	      R_BT_VISIBILITY_SETTING_PAGE, currentItem, items );
-	    if( dlg->ExecuteLD( CAknSettingPage::EUpdateWhenChanged ))
-	        {
-	        switch( currentItem )   // Map it back from radio button position to mode at setting page
-	            {
-	            case 0:	                
-	                SetVisibilityStatusL( EBTVisibilityModeGeneral );	                
-	                break;
-	                
-	            case 1:	                
-	                SetVisibilityStatusL( EBTVisibilityModeTemporary );
-		            break;
-		            
-	            case 1+1:
-	                SetVisibilityStatusL( EBTVisibilityModeHidden );
-	                break;
-	                
-	            default:
-	                break;
-	            }
-	        }
-	    }  
-	else
-		TBTUIViewsCommonUtils::ShowGeneralErrorNoteL();  
-   	        
-  	
-    CleanupStack::PopAndDestroy(items); // items
-    }
-
-  
-// ----------------------------------------------------
-// CBTUIMainView::GetBtSettingsReference
-//
-// This method returns the reference to the settings class
-// ----------------------------------------------------
-//
-CBTEngSettings* CBTUIMainView::GetBtSettingsReference()
-	{
-	TRACE_FUNC
-	return iBtEngSettings;
-	}
-
-// ----------------------------------------------------
-// CBTUIMainView::InitiateBTLocalNameQueryL
-//
-// Initiate BT local name query after Symbian OS has entered
-// idle state.
-// ----------------------------------------------------
-//
-void CBTUIMainView::InitiateBTLocalNameQueryL()
-    {
-	TRACE_FUNC
-    
-        	
-    __ASSERT_DEBUG( !iIdle, PANIC(EBTPanicClassMemberVariableNotNull) );
-
-    // Launch idle time regognition and execute local BT name query when ready
-    iIdle = CIdle::NewL(CActive::EPriorityIdle);
-    iIdle->Start(TCallBack(LaunchBTLocalNameQueryL, this));		
-    }
-
-// ----------------------------------------------------
-// CBTUIMainView::LaunchBTLocalNameQueryL
-//
-// Execute BT local name query. Symbian OS has entered
-// idle state now.
-// ----------------------------------------------------
-//
-TInt CBTUIMainView::LaunchBTLocalNameQueryL(TAny* aMainView)
-    {
-	//TRACE_FUNC
-
-    TInt errorCode = static_cast<CBTUIMainView*>(aMainView)->AskBTLocalNameQueryL();
-    if( errorCode != KErrNone )
-        {
-        CAknNoteDialog* dlg = new (ELeave) CAknNoteDialog( CAknNoteDialog::EErrorTone,
-                                                           CAknNoteDialog::ELongTimeout );
-		if(static_cast<CBTUIMainView*>(aMainView)->iCoverDisplayEnabled)
-			{  
-			CleanupStack::PushL(dlg);
-       	    dlg->PublishDialogL(ECmdShowBtGeneralErrorNote, KUidCoverUiCategoryBtui); // initializes cover support}
-			CleanupStack::Pop(dlg);
-			}			
-		dlg->ExecuteLD( R_BT_GENERAL_ERROR_NOTE );
-        }
-    return KErrNone;
-    }
-
-// ----------------------------------------------------
-// CBTUIMainView::AskBTLocalNameQueryL
-// ----------------------------------------------------
-//
-TInt CBTUIMainView::AskBTLocalNameQueryL()
-    {
-    TRACE_FUNC_ENTRY
-
-    TInt errorCode = KErrNone;
-    iTempNameBuffer.Zero();                     // Empty Local BT device name    
-    
-    //Get default name if given by e.g. phone product
-    errorCode = RProperty::Get( KPropertyUidBluetoothCategory, KPropertyKeyBluetoothSetDeviceName, iTempNameBuffer );
-    
-    if( errorCode || !iTempNameBuffer.Length() )
-    {
-        errorCode = RProperty::Get( KPropertyUidBluetoothCategory, KPropertyKeyBluetoothGetDeviceName, iTempNameBuffer );
-        
-        if( errorCode || !iTempNameBuffer.Length() )
-        {
-            RBTRegServ btRegServ;
-            RBTLocalDevice btReg;
-            TBTLocalDevice localDev;
-
-            errorCode = btRegServ.Connect();
-
-            if( !errorCode )
-            {
-                errorCode = btReg.Open( btRegServ );
-                
-                if( !errorCode )
-                {
-                    // Read the BT local name from BT Registry.
-                    errorCode = btReg.Get( localDev );
-                    
-                    if( !errorCode )
-                    {
-                        // The error can be > 0 if there are unconverted characters.
-                        errorCode = CnvUtfConverter::ConvertToUnicodeFromUtf8( iTempNameBuffer, localDev.DeviceName() );
-                    }
-                }
-            }
-
-            btReg.Close();
-            btRegServ.Close();
-        }
-    }
-    
-	if(errorCode==KErrNone)
-		{
-			
-	    // Cut the excess part of the name away. The query can handle only 
-	    // KBTUIMaxNameLength characters.
-	    //
-	    if( iTempNameBuffer.Length() > KBTUIMaxNameLength )
-	        {
-	        iTempNameBuffer.SetLength( KBTUIMaxNameLength );
-	        }
-
-	    CAknTextQueryDialog* dlg = CAknTextQueryDialog::NewL( iTempNameBuffer );
-	    TInt keypress = dlg->ExecuteLD( R_BT_ENTER_LOCAL_NAME_QUERY );
-
-	    if( keypress )  // User has accepted the dialog
-	        {
-	        // Remove trouble making control chars
-		    AknTextUtils::StripCharacters(iTempNameBuffer,  KAknStripListControlChars);    
-		                
-	        iTempNameBuffer.TrimAll();                           // Remove extra spaces	        
-	        errorCode = iBtEngSettings->SetLocalName(iTempNameBuffer);
-	        
-		 	this->SettingChangedL(EBTMainListItemNameSetting);	// Redraw BT name 
-	        }
-		}
-
-    delete iIdle; iIdle = NULL;	
-    TRACE_FUNC_EXIT
-    return errorCode;
-    }
-
-//---------------------------------------------------------------------
-// CBTUIMainView::GetCaption
-//----------------------------------------------------------------------
-//
-void CBTUIMainView::GetCaptionL( TDes& aCaption ) const
-	{
-	TRACE_FUNC
-	
-    // the resource file is already opened.
-    HBufC* result = StringLoader::LoadL( R_GS_BTUI_VIEW_CAPTION );
-    aCaption.Copy( *result );
-    delete result;	
-	}
-
-
-//---------------------------------------------------------------------
-// CBTUIMainView::CreateIconL
-//----------------------------------------------------------------------
-//    
-CGulIcon* CBTUIMainView::CreateIconL( const TUid aIconType )
-	{
-	TRACE_FUNC_ENTRY
-	
-	RefreshSettingsStatusL();		
-    CGulIcon* icon = NULL;
-    TFileName bmpFilename;
-    bmpFilename += KBitmapFileDrive;
-    bmpFilename += KDC_APP_BITMAP_DIR;
-    bmpFilename += KBtuiBmpFileName;
-
-    if(aIconType == KGSIconTypeLbxItem)
-    	{
-	
-	    switch(iBtState)
-			{
-			case EBTOff:
-				icon = AknsUtils::CreateGulIconL(
-			        AknsUtils::SkinInstance(), 
-			        KAknsIIDQgnPropSetAppsBtOff,  
-			        bmpFilename, 
-			        EMbmBtuiQgn_prop_set_apps_bt_off, 
-			        EMbmBtuiQgn_prop_set_apps_bt_off_mask );
-				break;
-			case EBTOnShown:
-				icon = AknsUtils::CreateGulIconL(
-			        AknsUtils::SkinInstance(), 
-			        KAknsIIDQgnPropSetAppsBtOnShown,  
-			        bmpFilename, 
-			        EMbmBtuiQgn_prop_set_apps_bt_on_shown, 
-			        EMbmBtuiQgn_prop_set_apps_bt_on_shown_mask );
-				break;
-			case EBTOnHidden:
-				icon = AknsUtils::CreateGulIconL(
-			        AknsUtils::SkinInstance(), 
-			        KAknsIIDQgnPropSetAppsBtOnHidden,  
-			        bmpFilename, 
-			        EMbmBtuiQgn_prop_set_apps_bt_on_hidden, 
-			        EMbmBtuiQgn_prop_set_apps_bt_on_hidden_mask );
-				break;
-			case EBTConnectedShown:
-				icon = AknsUtils::CreateGulIconL(
-			        AknsUtils::SkinInstance(), 
-			        KAknsIIDQgnPropSetAppsBtConnShown,  
-			        bmpFilename, 
-			        EMbmBtuiQgn_prop_set_apps_bt_conn_shown, 
-			        EMbmBtuiQgn_prop_set_apps_bt_conn_shown_mask );
-				break;
-			case EBTConnectedHidden:
-				icon = AknsUtils::CreateGulIconL(
-			        AknsUtils::SkinInstance(), 
-			        KAknsIIDQgnPropSetAppsBtConnHidden,  
-			        bmpFilename, 
-			        EMbmBtuiQgn_prop_set_apps_bt_conn_hidden, 
-			        EMbmBtuiQgn_prop_set_apps_bt_conn_hidden_mask );
-				break;
-			}	        
-    	}
-    else
-	    {
-	    icon = CGSPluginInterface::CreateIconL( aIconType );	
-	    }
-    	            
-    return icon;
-	}    
-
-
-// ---------------------------------------------------------------------------
-// CBTUIMainView::GetValue()
-// Get 2nd row text for parent Connectivity View.
-// ---------------------------------------------------------------------------
-//  
-void CBTUIMainView::GetValue( const TGSPluginValueKeys aKey, TDes& aValue )
-	{
-	TRACE_FUNC_ENTRY
-	
-	TRAP_IGNORE( GetValueL(aKey, aValue) );
-	}
-
-// ---------------------------------------------------------------------------
-// CBTUIMainView::GetValueL()
-// ---------------------------------------------------------------------------
-// 	
-void CBTUIMainView::GetValueL( const TGSPluginValueKeys aKey, TDes& aValue )
-	{
-	if(aKey == EGSPluginKeySettingsItemValueString)
-		{
-		HBufC* secondary = NULL; 
-		RefreshSettingsStatusL();
-		switch(iBtState)
-			{
-			case EBTOff:
-				secondary = StringLoader::LoadL( R_CP_DETAIL_BT_OFF );
-				break;
-			case EBTOnShown:
-				secondary = StringLoader::LoadL( R_CP_DETAIL_BT_ON_SHOWN );
-				break;
-			case EBTOnHidden:
-				secondary = StringLoader::LoadL( R_CP_DETAIL_BT_ON_HIDDEN );
-				break;
-			case EBTConnectedShown:
-				secondary = StringLoader::LoadL( R_CP_DETAIL_BT_CONN_SHOWN );
-				break;
-			case EBTConnectedHidden:
-				secondary = StringLoader::LoadL( R_CP_DETAIL_BT_CONN_HIDDEN );
-				break;
-			}
-		aValue.Copy( *secondary );
-		delete secondary;	
-		}
-	}
-
-// ---------------------------------------------------------------------------
-// CBTUIMainView::CreateTabIconL()
-// Creates icon for tab.
-// ---------------------------------------------------------------------------
-//    
-CGulIcon* CBTUIMainView::CreateTabIconL()
-    {
-    TFileName bmpFilename; 
-    bmpFilename += KBitmapFileDrive;
-    bmpFilename += KDC_APP_BITMAP_DIR;
-    bmpFilename += KBtuiBmpFileName;
-    
-    CGulIcon* icon = AknsUtils::CreateGulIconL(
-        AknsUtils::SkinInstance(), 
-        KAknsIIDQgnPropBtSetTab3,  
-        bmpFilename, 
-        EMbmBtuiQgn_prop_bt_set_tab3, 
-        EMbmBtuiQgn_prop_bt_set_tab3_mask );
-
-    return icon;
-    }       
-
-// ---------------------------------------------------------------------------
-// CBTUIMainView::RefreshSettingsStatusL()
-// Get the current BT settings: power, visibility and connection.
-// ---------------------------------------------------------------------------
-//    
-void CBTUIMainView::RefreshSettingsStatusL()
-	{
-		
-	if ( BluetoothFeatures::EnterpriseEnablementL() == BluetoothFeatures::EDisabled ) 
-		{
-		iBtState = EBTOff;	
-		}
-	else
-		{
-		TBTPowerStateValue powerState;
-		iBtEngSettings->GetPowerState(powerState);
-		
-		TBTVisibilityMode currentMode;
-		iBtEngSettings->GetVisibilityMode(currentMode);
-		
-		TBool connected = TBTUIViewsCommonUtils::IsAnyDeviceConnectedL();
-			
-		if(powerState == EBTPowerOff)
-			iBtState = EBTOff;	
-		else 
-			{
-			if( !connected && (currentMode == EBTVisibilityModeGeneral || 
-								currentMode == EBTVisibilityModeTemporary))	
-				iBtState = EBTOnShown;
-			
-			else if(!connected && currentMode == EBTVisibilityModeHidden)	
-				iBtState = EBTOnHidden;
-			
-			else if(connected && (currentMode == EBTVisibilityModeGeneral || 
-								currentMode == EBTVisibilityModeTemporary))	
-				iBtState = EBTConnectedShown;
-			
-			else if(connected && currentMode == EBTVisibilityModeHidden)
-				iBtState = EBTConnectedHidden;
-			}	
-		}
-	}
-	
-// ----------------------------------------------------
-// CBTUIMainView::UpdateParentView
-//
-// Update Connectivity View when it's the current  
-// active view and the key watched is changed.
-// ----------------------------------------------------
-void CBTUIMainView::UpdateParentView()
-	{
-	if(iConstructAsGsPlugin)
-		{
-		CGSParentPlugin* parent = static_cast<CGSParentPlugin*>(AppUi()->View( KGSConPluginUid ));
-		if( parent )
-			{
-			parent->UpdateView();
-			}		
-		}
-	}
-	    
-// ---------------------------------------------------------------------------
-// CBTUIMainView::NewContainerL
-// Creates new iContainer.
-// ---------------------------------------------------------------------------
-//
-void CBTUIMainView::NewContainerL()
-    {
-	//As a transparent view, do nothing here.
-    }
-
-// ---------------------------------------------------------------------------
-// CBTUIMainView::HandleListBoxSelectionL
-// Handle any user actions while in the list view.
-// ---------------------------------------------------------------------------
-//
-void CBTUIMainView::HandleListBoxSelectionL() 
-    {
-	//As a base-view, it's transparent, so do nothing here.
-    }
-    
-// ---------------------------------------------------------------------------
-// CBTUIMainView::GetParentView
-// ---------------------------------------------------------------------------
-//
-TVwsViewId CBTUIMainView::GetParentView()
-    {
-    return iParentView; 
-    } 
-
-// ---------------------------------------------------------------------------
-// CBTUIMainView::TabbedViews()
-// Returns pointer to tabbed views of application.
-// ---------------------------------------------------------------------------
-//
-CArrayPtrFlat<MGSTabbedView>* CBTUIMainView::TabbedViews()
-    {
-    return iViewArray;
-    }
-    
-
-// ---------------------------------------------------------------------------
-// CBTUIMainView::IsLocalNameModified
-// Checks from central repository whether the Bluetooth friendly name 
-// has been modified .
-// ---------------------------------------------------------------------------
-//
-TInt CBTUIMainView::IsLocalNameModifiedL( TBool& aStatus )
-    {
-    TRACE_FUNC_ENTRY
-
-    aStatus = (TBool) EBTLocalNameDefault;
-    
-    TInt val = 0;
-	CRepository* cenRep = NULL;
-    TInt err = KErrNone;
-    TRAP_IGNORE(cenRep = CRepository::NewL( KCRUidBTEngPrivateSettings ));
-    
-    err = cenRep->Get( KBTLocalNameChanged, val );
-    
-    if ( val != 0 )
-    	{
-    	aStatus = (TBool) EBTLocalNameSet;
-    	}
-    delete cenRep;
-    cenRep = NULL;
-    TRACE_FUNC_EXIT
-    return err;
-    }
-
--- a/bluetoothengine/btui/Ecom/src/BTUINonSap.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This module is created for variant that doesn't support 
-*                 Bluetooth SIM Access Profile. 
-*
-*/
-
-	
-#include "BTUIMainView.h"
-//#include "BTUIModel.h" 
-
-// ----------------------------------------------------
-// CBTUIMainView::SetSapStatusL
-// ----------------------------------------------------
-//
-void CBTUIMainView::SetSapStatusL( TBTSapMode /*aValue*/ )
-    {
-
-    }
-
-// ----------------------------------------------------------
-// CBTUIMainView::AskSapModeDlgL
-// ----------------------------------------------------------
-//
-void CBTUIMainView::AskSapModeDlgL()
-    {
-    
-    }
-// ----------------------------------------------------------
-// CBTUIMainView::GetSapStatusL
-// ----------------------------------------------------------
-
-TInt CBTUIMainView::GetSapStatusL()
-	{
-	return EBTSapDisabled;	
-	}
-
-// End of File
-
--- a/bluetoothengine/btui/Ecom/src/BTUIPairedDevicesView.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1904 +0,0 @@
-/*
-* Copyright (c) 2002,2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:   This is view that handles listing and 
- *  unblocking blocked devices view.
- *
-*/
-
-#include <avkon.hrh>                    // AVKON components
-#include <akntitle.h>
-#include <aknViewAppUi.h>
-#include <BtuiViewResources.rsg>        // Compiled resource ids
-#include <featmgr.h>                    // Feature Manager
-
-#include <AknGlobalNote.h>
-#include <aknnotewrappers.h>
-#include <StringLoader.h>   			// Series 60 localisation stringloader
-#include <AknMediatorFacade.h>
-#include <aknmessagequerydialog.h>
-#include <aknnotewrappers.h>
-#include <aknnavi.h>
-#include <hlplch.h>         			// Help launcher
-#include <btengdiscovery.h> 			// for device search
-
-#include <ctsydomainpskeys.h>
-#include <bt_subscribe.h>
-#include <btengsettings.h>
-#include <centralrepository.h>
-#include <CoreApplicationUIsSDKCRKeys.h>
-#include <bamdesca.h>
-
-#include "debug.h"             
-#include "btui.h" 						// Global declarations
-#include "BTUIPairedDevicesView.h"
-#include "BTUIDeviceContainer.h"
-#include <secondarydisplay/BtuiSecondaryDisplayAPI.h>
-#include <csxhelp/bt.hlp.hrh>   // Help IDs
-
-#include <gstabhelper.h>
-#include <btui.mbg>						// Tab icon for General Setting
-#include <bluetoothuiutil.h>
-#include "BTUIMainView.h" 				// base View.
-
-
-const TInt KAutoConnect2ndTry = 1;
-const TUint32 SetExcludePairedDeviceMask = 0x800000;
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------
-// CBTUIPairedDevicesView::NewL
-// Two phased constructor called by BT AppUI when serve as part of btui.exe
-// ---------------------------------------------------------
-//
-CBTUIPairedDevicesView* CBTUIPairedDevicesView::NewL(MBtuiPluginViewActivationObserver* aObserver)
-    {
-    CBTUIPairedDevicesView* self = new (ELeave) CBTUIPairedDevicesView(aObserver);
-	CleanupStack::PushL(self);
-	
-	self->iConstructAsGsPlugin = EFalse;	
- 	self->ConstructL();
-	CleanupStack::Pop(self);
-    return self;
-    }
-
-// ---------------------------------------------------------
-// CBTUIPairedDevicesView::NewLC
-// Two phased constructor called by mainView when serve as GS Plugin.
-// ---------------------------------------------------------
-//
-CBTUIPairedDevicesView* CBTUIPairedDevicesView::NewLC(CBTUIMainView* aBaseView, CArrayPtrFlat<MGSTabbedView>* aTabViewArray)
-    {
-    CBTUIPairedDevicesView* self = new (ELeave) CBTUIPairedDevicesView();    
-	CleanupStack::PushL( self );
-		
-	self->iConstructAsGsPlugin = ETrue;
- 	self->ConstructL( aBaseView, aTabViewArray );
-
-    return self;
-    }
-    
-
-// ---------------------------------------------------------
-// CBTUIPairedDevicesView::ConstructL
-// Symbian 2nd phase constructor can leave.
-// ---------------------------------------------------------
-//
-void CBTUIPairedDevicesView::ConstructL()
-    {
-	TRACE_FUNC_ENTRY
-
-    BaseConstructL(R_BTUI_OTHER_DEVICES_VIEW);
-
-    iCoverDisplayEnabled = FeatureManager::FeatureSupported(KFeatureIdCoverDisplay); 
-    iHelpEnabled = FeatureManager::FeatureSupported(KFeatureIdHelp);
-    
-   	iDeviceSearcher = CBTEngDiscovery::NewL(this);   	
-	iBtEngSettings = CBTEngSettings::NewL(this);
-	iBTPluginMan = CBTUIPluginMan::NewL( AppUi() );
-	iIsAlreadyConnected = EFalse;
-	iExpectedCallBack = 0;
-	TRACE_INFO(_L("Initial iIsAlreadyConnected -> False"))
-    TRACE_FUNC_EXIT
-    }
-
-void CBTUIPairedDevicesView::ConstructL( CBTUIMainView* aBaseView, CArrayPtrFlat<MGSTabbedView>* aTabViewArray )
-    {
-    TRACE_FUNC_ENTRY
-    
-	iBaseView = aBaseView,
-    iTabHelper = CGSTabHelper::NewL();
-    aTabViewArray->AppendL(this); 
-    
-    BaseConstructL(R_BTUI_OTHER_DEVICES_VIEW_GS);
-    iCoverDisplayEnabled = FeatureManager::FeatureSupported(KFeatureIdCoverDisplay); 
-    iHelpEnabled = FeatureManager::FeatureSupported(KFeatureIdHelp);
-    
-   	iDeviceSearcher = CBTEngDiscovery::NewL(this);
-    iBtEngSettings=CBTEngSettings::NewL(this);	
-    iBTPluginMan = CBTUIPluginMan::NewL( AppUi() );
-	iIsAlreadyConnected = EFalse;
-	TRACE_INFO(_L("Initial iIsAlreadyConnected = False"))
-    iExpectedCallBack = 0;
-	
-	TRACE_FUNC_EXIT
-    }
-  
-// ---------------------------------------------------------
-// CBTUIBlockedDevicesView::CBTUIBlockedDevicesView
-// ---------------------------------------------------------
-    
-CBTUIPairedDevicesView::CBTUIPairedDevicesView( MBtuiPluginViewActivationObserver* aObserver )
-	: iActivationObserver(aObserver)
-	{
-	}        
-
-// ---------------------------------------------------------
-// Destructor
-// ---------------------------------------------------------
-//
-CBTUIPairedDevicesView::~CBTUIPairedDevicesView()
-    {
-	TRACE_FUNC_ENTRY
-
-	//close dialogs if any
-	TRAP_IGNORE(
-		DialogDismissedL(EAknSoftkeyCancel);
-	);
-
-	delete iActive;
-	
-    if (iContainer)
-        {
-        AppUi()->RemoveFromViewStack(*this, iContainer);
-		delete iContainer;           
-		iContainer = NULL;
-        }
-            
-    if(iDeviceSearcher)
-        {
-    	// Canceling devicesearches is done by DialogDismissedL(),
-    	// so it is not done here    	
-    	delete iDeviceSearcher;
-    	iDeviceSearcher = NULL ;
-        }
-	delete iConnectDevice;
-	iConnectDevice=NULL;
-	
-	delete iPairingDevice;
-	delete iBtEngSettings;
-	delete iBTPluginMan;
-	
-	if(iConstructAsGsPlugin)
-	    	delete iTabHelper;	
-	
-	CancelDisconnectQueryDlg();
-	
-    TRACE_FUNC_EXIT
-    }
-
-// ---------------------------------------------------------
-// From CAknView
-// CBTUIPairedDevicesView::Id
-// ---------------------------------------------------------
-//
-TUid CBTUIPairedDevicesView::Id() const
-    {
-	TRACE_FUNC_ENTRY    
-    return KBtuiPluginUidPairedDevicesView;//KBTOtherDevicesViewId;
-    }
-
-
-
-
-// ---------------------------------------------------------
-// From CAknView
-// CBTUIPairedDevicesView::HandleCommandL 
-// Redirects commands to the appui class.
-// ---------------------------------------------------------
-//
-void CBTUIPairedDevicesView::HandleCommandL(TInt aCommand)
-    {
-	TRACE_FUNC_ENTRY
-
-    switch (aCommand)
-        {
-        
-        case EAknSoftkeyBack:      
-            // do not exit if devicechange is in progress.
-            if(iModel->DeviceChangeInProgress() )
-            	return;                
-	        AppUi()->ActivateLocalViewL(iBaseView->GetParentView().iViewUid );
-            break;
-            
-        case EAknSoftkeyExit:
-            {
-			TRACE_INFO(_L("EAknSoftkeyExit"))
-            // do not exit if devicechange or bt discovery is in progress.				
-            if(iModel->DeviceChangeInProgress() 
-                    || iSearchOngoing )   
-            	{
-            	TRACE_INFO(_L("exit denied, due to operation"))
-            	return;
-	           	}
-	           	
-			TRACE_INFO(_L("exit in progress"))
-			AppUi()->ProcessCommandL(EEikCmdExit);            
-            break;
-            }
-
-        case EAknCmdHelp:
-            {
-            #ifdef __SERIES60_HELP
-                HlpLauncher::LaunchHelpApplicationL(iEikonEnv->WsSession(),AppUi()->AppHelpContextL());
-            #endif
-            break;
-            }          
-        	
-        case EBTUICmdNewPairedDevice:
-            {
-            iSearchOngoing=ETrue;
-            NewPairedDeviceDlgL();
-            break;
-            }
-
-        case EBTUICmdDelete:
-            {
-            DeleteDeviceDlgL();
-            break;
-            }
-
-        case EBTUICmdDeleteAll:
-            {
-            DeleteAllDevicesDlgL();
-            break;
-            }
-
-        case EBTUICmdGiveNickname:
-            {
-            RenameDeviceDlgL();
-            break;
-            }
-
-        case EBTUICmdSetTrusted:
-            {
-            ChangeDeviceSecurityL(ETrue);
-            break;
-            }
-
-        case EBTUICmdSetUnTrusted:
-            {
-            ChangeDeviceSecurityL(EFalse);
-            break;
-            }
-
-        case EBTUICmdConnect:
-        case EBTUICmdConnectAudio: 
-            {
-            TBTDevice device;
-            device.iIndex = iContainer->CurrentItemIndex();
-            iModel->GetDevice(device);
-            if ( device.iStatus & EStatusBtuiConnected )
-                {
-                // If device is already connected, we do nothing here. 
-                break;
-                }
-            device.iOperation = EOpConnect;
-            ConnectL( device, ETrue );
-	        break;            	
-            }
-
-        case EBTUICmdDisconnect:
-            {
-            DisconnectL();
-            break;
-            }
-  
-        case EBTUICmdSetBlocked:
-        	{
-        	BlockDeviceDlgL();
-        	break;
-        	}
-        	
-        case EBTUICmdSettings:
-        	{
-        	LaunchSettingViewL();
-        	break;
-        	}
-        	
-        default:
-            {
-            AppUi()->HandleCommandL(aCommand);
-            break;
-            }
-        }
-	TRACE_FUNC_EXIT        
-    }
-
-
-// ---------------------------------------------------------
-// From CAknView
-// CBTUIPairedDevicesView::DoActivateL
-// ---------------------------------------------------------
-//
-void CBTUIPairedDevicesView::DoActivateL(const TVwsViewId& /*aPrevViewId*/,
-                                               TUid /*aCustomMessageId*/,
-                                         const TDesC8& /*aCustomMessage*/)
-    {
-	TRACE_FUNC_ENTRY
-
-    iModel = CBTDevModel::NewL(EGroupPaired, this);
-    iContainer = CBTUiDeviceContainer::NewL(ClientRect(), this, EGroupPaired, this);
-    iContainer->SetMopParent(this); // MObjectProvider
-
-    // Setup title
-    HBufC* btTitlePairedDevices = 
-    	iCoeEnv->AllocReadResourceLC(R_BT_TITLE_PAIRED_DEV);
-    CEikStatusPane* statusPane = StatusPane();
-    CAknTitlePane* titlePane;
-    titlePane = (CAknTitlePane*) statusPane->ControlL(
-    	TUid::Uid(EEikStatusPaneUidTitle));
-    titlePane->SetTextL(btTitlePairedDevices->Des());
-    CleanupStack::PopAndDestroy(btTitlePairedDevices); // btTitlePairedDevices
-    btTitlePairedDevices = NULL;
-
-    AppUi()->AddToStackL(*this, iContainer);
-
-    if( iBaseView && iConstructAsGsPlugin)
-        {
-        iTabHelper->CreateTabGroupL( Id(), 
-            static_cast<CArrayPtrFlat<MGSTabbedView>*>
-            (iBaseView->TabbedViews()) ); 
-        } 
-        
-	// MSK menu is added here.
-	// the left key menu is added by resources.
-    MenuBar()->SetContextMenuTitleResourceId(
-    	R_BTUI_MENUBAR_OTHER_DEVICES_VIEW_CONTEXT);		
-	// notify observer   
-    if( iActivationObserver  && iConstructAsGsPlugin == EFalse)
-    {    	    
-        iActivationObserver->PluginViewActivated(EPairedDevicesViewId);        
-    }
-
-	TRACE_FUNC_EXIT
-    }
-
-// ---------------------------------------------------------
-// From CAknView
-// CBTUIPairedDevicesView::DoDeactivate
-// ---------------------------------------------------------
-//
-void CBTUIPairedDevicesView::DoDeactivate()
-    {
-	TRACE_FUNC_ENTRY
-
-    if (iContainer)
-        {
-        AppUi()->RemoveFromStack(iContainer);
-        delete iContainer;
-        iContainer = NULL;
-        }
-	if ( iDeviceSearcher )
-	    {
-	    iDeviceSearcher->CancelSearchRemoteDevice();
-	    }
-    delete iModel;
-    iModel=NULL;
-    if(iConstructAsGsPlugin)
-	    iTabHelper->RemoveTabGroup();  
-    delete iActive;
-    iActive = NULL;
-    iIsPairConnect = EFalse;
-    TRACE_FUNC_EXIT
-    }
-
-// ---------------------------------------------------------
-// From CAknView
-// CBTUIPairedDevicesView::DynInitMenuPaneL
-// Shows only options supported for selected device, if any.
-// If not show only options supported regardless of selected
-// device
-// ---------------------------------------------------------
-//
-void CBTUIPairedDevicesView::DynInitMenuPaneL(TInt aResId, CEikMenuPane* aMenu)
-    {
-	TRACE_FUNC_ENTRY
-	iActiveMenuPane = aMenu;
-	// dim help if it exists and is not supported	
-	TInt tmp;	
-	if (  aMenu->MenuItemExists(EAknCmdHelp,tmp ) )			
-		{			
-		aMenu->SetItemDimmed(EAknCmdHelp,
-		  !FeatureManager::FeatureSupported( KFeatureIdHelp ) );
-		}
-	
-	if ( aResId == R_BTUI_OTHER_DEVICES_VIEW_MENU  )
-	    {
-        TInt index = iContainer->CurrentItemIndex();
-
-        // we only show "new pair device", "help" , "Exit" and "Delete All" if view contains device(s).  
-        aMenu->SetItemDimmed(EBTUICmdSetTrusted, ETrue);   
-        aMenu->SetItemDimmed(EBTUICmdDelete,ETrue);
-        aMenu->SetItemDimmed(EBTUICmdSetTrusted,ETrue);
-        aMenu->SetItemDimmed(EBTUICmdSetUnTrusted,ETrue);
-        aMenu->SetItemDimmed(EBTUICmdConnect,ETrue);
-        aMenu->SetItemDimmed(EBTUICmdConnectAudio,ETrue); 
-        aMenu->SetItemDimmed(EBTUICmdDisconnect,ETrue);
-        aMenu->SetItemDimmed(EBTUICmdSetBlocked,ETrue);
-        aMenu->SetItemDimmed(EBTUICmdSettings,ETrue);
-        aMenu->SetItemDimmed(EBTUICmdGiveNickname, ETrue);         
-        
-        if ( index < 0 ) // No devices at list. Hide all device related commands.
-            {
-            aMenu->SetItemDimmed(EBTUICmdDeleteAll, ETrue); 
-            }
-        
-	    }
-	
-    if ( aResId == R_BTUI_OTHER_DEVICES_VIEW_MENU_CONTEXT )
-        {
-        TInt index = iContainer->CurrentItemIndex();
-          
-        // If user is fast enough to click the RSK option between 
-        // bt discovery view and device found view,  bt ui will crash.
-        // Therefore, we disable commands if bt discovery is onging.
-        //          
-        if(iSearchOngoing)
-            {
-            aMenu->SetItemDimmed(EBTUICmdGiveNickname, ETrue);
-            aMenu->SetItemDimmed(EBTUICmdSetTrusted, ETrue);
-            aMenu->SetItemDimmed(EBTUICmdSetUnTrusted, ETrue);
-            aMenu->SetItemDimmed(EBTUICmdSetBlocked, ETrue);
-            aMenu->SetItemDimmed(EBTUICmdDelete, ETrue);
-            aMenu->SetItemDimmed(EBTUICmdConnect, ETrue);
-            aMenu->SetItemDimmed(EBTUICmdConnectAudio, ETrue);
-            aMenu->SetItemDimmed(EBTUICmdDisconnect, ETrue);            
-            aMenu->SetItemDimmed(EBTUICmdNewPairedDevice, ETrue);
-            return;
-            }
-        
-        if(index < 0)  // No devices at list. Hide all device related commands.
-            {            
-            TRACE_INFO(_L("no devices in list"))
-            
-            aMenu->SetItemDimmed(EBTUICmdGiveNickname, ETrue);
-            aMenu->SetItemDimmed(EBTUICmdSetTrusted, ETrue);
-            aMenu->SetItemDimmed(EBTUICmdSetUnTrusted, ETrue);
-            aMenu->SetItemDimmed(EBTUICmdSetBlocked, ETrue);
-            aMenu->SetItemDimmed(EBTUICmdDelete, ETrue);
-            aMenu->SetItemDimmed(EBTUICmdConnect, ETrue);
-            aMenu->SetItemDimmed(EBTUICmdConnectAudio, ETrue);
-            aMenu->SetItemDimmed(EBTUICmdDisconnect, ETrue);
-            aMenu->SetItemDimmed(EBTUICmdSettings, ETrue);
-            }
-        else // There are devices at list
-            {
-	        TBTDevice device;
-            device.iIndex = index;
-    	    iModel->GetDevice(device);
-            iMenuDevice = device;    	    
-            
-            TRACE_INFO(_L("there are device in list"))
-          
-            TBool dim = (device.iStatus & EStatusTrusted) == EStatusTrusted;
-            
-            aMenu->SetItemDimmed(EBTUICmdSetTrusted, dim);
-            aMenu->SetItemDimmed(EBTUICmdSetUnTrusted, !dim);
-             
-            // Check if device can be connected or disconnected
-			dim = (! (device.iStatus & EStatusConnectable) 
-			|| device.iStatus & EStatusBtuiConnected);
-			
-			if (dim) 
-				{
-            	aMenu->SetItemDimmed(EBTUICmdConnect, dim);
-            	aMenu->SetItemDimmed(EBTUICmdConnectAudio, dim);
-				}
-			else
-				{
-				if ( device.iDeviceClass.MajorDeviceClass() == EMajorDeviceComputer) 
-            		{
-            		aMenu->SetItemDimmed(EBTUICmdConnect, ETrue);
-            		}
-            	else 
-            		{
-            		aMenu->SetItemDimmed(EBTUICmdConnectAudio, ETrue);
-            		}
-				}
-			dim = (device.iStatus & EStatusBtuiConnected) != EStatusBtuiConnected;
-            aMenu->SetItemDimmed(EBTUICmdDisconnect, dim);
-
-            if ( !iBTPluginMan->IsPluginAvaiable(device.iDeviceClass) ) 
-                {
-                aMenu->SetItemDimmed(EBTUICmdSettings, ETrue);
-                }
-            else
-                {                
-                dim = (device.iStatus & EStatusBtuiConnected) != EStatusBtuiConnected;
-                aMenu->SetItemDimmed(EBTUICmdSettings, dim);
-                }
-            //Hide New pair device
-            aMenu->SetItemDimmed(EBTUICmdNewPairedDevice, ETrue);
-            }
-        }
-	TRACE_FUNC_EXIT        
-    }
-    
-
-// ----------------------------------------------------------
-// CBTUIPairedDevicesView::RenameDeviceDlgL
-// ----------------------------------------------------------
-//
-void CBTUIPairedDevicesView::RenameDeviceDlgL()
-    {
-	TRACE_FUNC_ENTRY
-
-	TInt index = iContainer->CurrentItemIndex();
-	if(index == KErrNotFound) return;
-    
-	TBTDevice device;
-    device.iIndex = index;
-	iModel->GetDevice(device);
-	TBTDeviceName name = device.iName;
-	
-    CAknTextQueryDialog* dlg = CAknTextQueryDialog::NewL(device.iName);
-    TInt keypress = dlg->ExecuteLD(R_BT_ENTER_NICKNAME_QUERY);
-
-    if(keypress)  // User has accepted the dialog
-        {
-        if(device.iName != name) // Check if the user really changed the name
-        	{
-    		device.iOperation = EOpChangeName;        
-    		// Remove trouble making control chars
-		    AknTextUtils::StripCharacters(device.iName, KAknStripListControlChars);    
-	        device.iName.TrimAll();  // Remove extra spaces    		
-        	iModel->ChangeDevice(device);        	
-        	}
-        }
-	TRACE_FUNC_EXIT        
-    }
-    
-
-// ----------------------------------------------------------
-// CBTUIPairedDevicesView::NewPairedDeviceDlgL
-//
-// Initiate bonding (pairing) by opening the search dialog.
-// DeviceSearchComplete is called after that.
-// ----------------------------------------------------------
-//
-void CBTUIPairedDevicesView::NewPairedDeviceDlgL()
-	{
-	TRACE_FUNC_ENTRY	
-	// we must not have other pairing in progress.
-	// we maight issue an error, but none is defined by 
-	// ui spec. Anyhow this should be possible
-	// only by pressing everything roo rapidly.
-	if(iPairingDevice!=NULL)
-		return;
-	iPairingDevice = CBTDevice::NewL();
-	
-	// Here we use last bit in device class to inform bt inquiry notifier 
-	// not to display the device which is already paired and in the paired 
-	// device list.  
-	    
-	// We use DeviceClass to tell btnotif not to show paired device in 
-	// bt discovery notifier through bteng.
-	// Set bit 24 to 1 ( bit 24 is not used for any other purpose currently )	
-	iPairingDevice->SetDeviceClass(iPairingDevice->DeviceClass().DeviceClass() | SetExcludePairedDeviceMask );
-	TInt err = iDeviceSearcher->SearchRemoteDevice(iPairingDevice,
-                                                   &iPairingDevNameEntry, 
-                                                   iPairingDevice->DeviceClass().DeviceClass());
-
-
-	if(err != KErrNone)
-		{
-		delete iPairingDevice;
-		iPairingDevice=NULL;
-        TBTUIViewsCommonUtils::ShowGeneralErrorNoteL();        
-    	}
-	TRACE_FUNC_EXIT    	
-	}
-
-// ----------------------------------------------------------
-// CBTUIPairedDevicesView::DeleteDeviceDlgL
-// ----------------------------------------------------------
-//
-void CBTUIPairedDevicesView::DeleteDeviceDlgL()
-    {
-	TRACE_FUNC_ENTRY
-	
-    iExpectedCallBack = 0;
-	TInt index = iContainer->CurrentItemIndex();
-	if(index == KErrNotFound) return;
-
-    TBTDevice device;
-    device.iIndex = index;
-    iModel->GetDevice(device);
-
-    RBuf stringholder;
-    CleanupClosePushL( stringholder );
-
-	TInt tmp=EStatusBtuiConnected|EStatusPhysicallyConnected;
-    // Choose confirmation phrase
-    TInt resourceId = ( device.iStatus & tmp ) ? R_BT_WARN_ERASE_CONNECTED :
-        R_BT_WARN_ERASE;
-    BluetoothUiUtil::LoadResourceAndSubstringL( 
-            stringholder, resourceId, device.iName, 0 );
-
-    // Create confirmation query
-    //
-    CAknQueryDialog* dlg = CAknQueryDialog::NewL();
-
-	if(iCoverDisplayEnabled)
-		{
-        CleanupStack::PushL(dlg); 
-	    dlg->PublishDialogL(ECmdShowBtWarnEraseNote, KUidCoverUiCategoryBtui); 
-	    // initializes cover support    
-        CleanupStack::Pop(dlg); 
-
-		CAknMediatorFacade* covercl = AknMediatorFacade(dlg); // uses MOP, so control provided 
-		if (covercl) // returns null if __COVER_DISPLAY is not defined
-		    {	    
-		    covercl->BufStream() << BTDeviceNameConverter::ToUTF8L(device.iName) ;// takes copy so consts are ok too
-		    covercl->BufStream().CommitL(); // no more data to send so commit buf
-		    }  
-		}
-    TInt keypress = dlg->ExecuteLD(R_BT_WARN_ERASE_QUERY, stringholder);
-
-    CleanupStack::PopAndDestroy(&stringholder);  // stringholder
-
-    if(keypress)  // User has accepted the dialog
-        {
-        // If device is connected we need to first to disconnect 
-        // then unpair, otherwise unpairing does not succeed.
-        if((device.iStatus & EStatusBtuiConnected) == EStatusBtuiConnected)
-        {
-            iExpectedCallBack++;
-            DisconnectWithoutQuery();            
-            return;
-        }
-        device.iOperation = EOpUnpair;
-        iModel->ChangeDevice(device);       
-        }
-
-	TRACE_FUNC_EXIT
-    }
-
-// ----------------------------------------------------------
-// CBTUIPairedDevicesView::DeleteAllDevicesDlgL
-// ----------------------------------------------------------
-//
-void CBTUIPairedDevicesView::DeleteAllDevicesDlgL()
-    {
-	TRACE_FUNC_ENTRY
-	
-    iExpectedCallBack = 0;
-    CAknQueryDialog* dlg = CAknQueryDialog::NewL();
-    TInt keypress = KErrNone;
-    
-    CleanupStack::PushL(dlg); 
-
-    // Choose and execute confirmation query
-    //
-    if (iModel->IsAnyDeviceConnected())
-        {
-		if(iCoverDisplayEnabled)
-			{
-            dlg->PublishDialogL(ECmdShowBtWarnEraseAllConnectedQuery, KUidCoverUiCategoryBtui); // initializes cover support    
-			}
-
-        keypress = dlg->ExecuteLD(R_BT_WARN_ERASE_ALL_CONNECTED_QUERY);
-        }
-    else
-        {        
-		if(iCoverDisplayEnabled)
-			{
-	        dlg->PublishDialogL(ECmdShowBtWarnEraseAllQuery, KUidCoverUiCategoryBtui); // initializes cover support    
-			}
-
-        keypress = dlg->ExecuteLD(R_BT_WARN_ERASE_ALL_QUERY);
-        }
-    CleanupStack::Pop(dlg); 
-
-    if(keypress)  // User has accepted the dialog
-        {
-        TInt count = iContainer->CountItems();   
-        for (TInt i = 0; i < count; i++)
-           {
-           // If device is connected we need to first to disconnect 
-           // then unpair, otherwise unpairing does not succeed.                      
-           TBTDevice device;
-           device.iIndex = i;
-           iModel->GetDevice(device);
-           if((device.iStatus & EStatusBtuiConnected) == EStatusBtuiConnected)
-               {
-               iExpectedCallBack++;
-               }
-           }
-        TRACE_INFO((_L("iExpectedCallBack %d"), iExpectedCallBack ))
-        
-        for (TInt i = 0; i < count; i++)
-            {
-            // If device is connected we need to first to disconnect 
-            // then unpair, otherwise unpairing does not succeed.                      
-            TBTDevice device;
-            device.iIndex = i;
-            iModel->GetDevice(device);           
-            
-            if((device.iStatus & EStatusBtuiConnected) == EStatusBtuiConnected)
-                {
-                //disconnect it first, removal will be done in 
-                //callback NotifyChangeDeviceCompleteL for ChangeDevice() below
-                TRACE_INFO((_L("EOpDisconnect issued for %d"), i ))
-                device.iOperation = EOpDisconnect;
-                iModel->ChangeDevice(device);  
-                }
-            else
-                {
-                //otherwise, just remove it from the paired view
-                device.iOperation = EOpUnpair;
-                iModel->ChangeDevice(device);
-                }
-            }
-        }
-
-	TRACE_FUNC_EXIT
-    }
-// ----------------------------------------------------------
-// CBTUIPairedDevicesView::BlockDeviceDlgL
-// ----------------------------------------------------------
-void CBTUIPairedDevicesView::BlockDeviceDlgL()
-	{
-	TRACE_FUNC_ENTRY
-
-	TInt index = iContainer->CurrentItemIndex();
-	if(index == KErrNotFound) return;
-			
-    TBTDevice device;
-    device.iIndex = index;
-    iModel->GetDevice(device);
-
-	//check if this is connected device
-		
-	HBufC* header= iCoeEnv->AllocReadResourceLC(R_BT_OPTION_BLOCK_DEVICE_HEADER); 
-	
-	RBuf stringHolder;
-	CleanupClosePushL( stringHolder );
-	TInt resouseId;
-	if (device.iStatus & (EStatusBtuiConnected|EStatusPhysicallyConnected) )
-	    {
-	    resouseId = iHelpEnabled? R_BT_OPTION_BLOCK_PAIRED_DEVICE_HELP : 
-            R_BT_OPTION_BLOCK_PAIRED_DEVICE_NOHELP;
-	    }
-	else
-	    {
-	    resouseId = iHelpEnabled ? R_BT_OPTION_BLOCK_PAIRED_DEVICE_HELP :
-            R_BT_OPTION_BLOCK_PAIRED_DEVICE_NOHELP;
-	    }
-	BluetoothUiUtil::LoadResourceAndSubstringL( 
-	        stringHolder, resouseId, device.iName, 0 );
-	
-	CAknMessageQueryDialog *queryDialog = CAknMessageQueryDialog::NewL (stringHolder, 
-	  CAknQueryDialog::EConfirmationTone);		
-	queryDialog->PrepareLC(R_BT_MESSAGE_QUERY);
-	
-	(queryDialog)->Heading()->SetTextL(*header);
-	queryDialog->SetFocus(ETrue);
-
-    TInt keypress=EFalse;
-#ifdef __SERIES60_HELP    
-	if (iHelpEnabled)
-        {
-		HBufC* queryLink = StringLoader::LoadL(R_BT_BLOCK_DEVICE_LINK);
-		TCoeHelpContext hc(KBtuiUid3,KBT_HLP_BLOCKED);
-		TCallBack helpCallBack(CBTUIPairedDevicesView::LaunchHelp , &hc);
-		
-		TRAPD(err,
-			static_cast<CAknMessageQueryDialog*>(queryDialog)->SetLinkTextL(*queryLink);
-			static_cast<CAknMessageQueryDialog*>(queryDialog)->SetLink(helpCallBack););
-		if(err==KErrNone)
-			{
-			keypress = queryDialog->RunLD();
-			}
-        	
-		delete queryLink; 
-        queryLink = NULL;
-        }
-    else
-#endif    
-        {
-        keypress = queryDialog->RunLD();
-        }
-	
-	CleanupStack::PopAndDestroy(&stringHolder);  				 
-	CleanupStack::PopAndDestroy(header);
-	        
-	if(keypress)
-		{
-		device.iOperation = EOpBlock;
-		iModel->ChangeDevice(device);
-		}
-	TRACE_FUNC_EXIT		
-	}
-// ----------------------------------------------------------
-// CBTUIPairedDevicesView::ChangeDeviceSecurityL
-// ----------------------------------------------------------
-//
-void CBTUIPairedDevicesView::ChangeDeviceSecurityL(TBool aTrusted)
-    {
-   	TRACE_FUNC_ENTRY
-
-	TInt index = iContainer->CurrentItemIndex();
-	if(index == KErrNotFound) return;
-			
-    TBTDevice device;
-    device.iIndex = index;
-    iModel->GetDevice(device);
-    
-    if(aTrusted)
-        {
-        // set to trusted
-        CAknQueryDialog* dlg = CAknQueryDialog::NewL();
-        
-		if(iCoverDisplayEnabled)
-			{
-			CleanupStack::PushL(dlg); 
-	        dlg->PublishDialogL(ECmdShowBtAuthConfirmQuery, KUidCoverUiCategoryBtui); // initializes cover support    
-		    CleanupStack::Pop(dlg); 
-			}
-        TInt keypress = dlg->ExecuteLD(R_BT_SET_TRUSTED_QUERY);
-
-        if(keypress)  // User has accepted the dialog
-            {
-            device.iOperation = EOpTrust;
-            iModel->ChangeDevice(device);
-            }
-        }
-    else
-        {
-        device.iOperation = EOpUntrust;
-        iModel->ChangeDevice(device);        
-        }
-	TRACE_FUNC_EXIT        
-    }
-    
-// ----------------------------------------------------
-// CBTUIMainView::VisibilityModeChanged
-// ----------------------------------------------------
-//    
-void CBTUIPairedDevicesView::VisibilityModeChanged( TBTVisibilityMode  )
-    {
-	TRACE_FUNC_ENTRY
-	
-	
-	TRACE_FUNC_EXIT	
-    }
-    
-        
-// ----------------------------------------------------
-// CBTUIMainView::PowerStateChanged
-// ----------------------------------------------------
-//
-void CBTUIPairedDevicesView::PowerStateChanged( TBTPowerStateValue  )
-    {
-	TRACE_FUNC_ENTRY
-	
-	if ( iIsConnectDevice )
-		{
-		iModel->ChangeDevice(*iConnectDevice);
-		iIsConnectDevice = EFalse;   // reset flag
-		}
-	
-	TRACE_FUNC_EXIT	
-    }
-    
-// ----------------------------------------------------------
-// CBTUIPairedDevicesView::ConnectL
-// ----------------------------------------------------------
-//
-void CBTUIPairedDevicesView::ConnectL(
-        const TBTDevice& aDevice, TBool aNewWaitNote )
-	{
-	TRACE_FUNC_ENTRY
-	
-	iIsAlreadyConnected = EFalse;
-	TRACE_INFO(_L("Set iIsAlreadyConnected -> False"))
-	//Check that there is not more than max amount of connections allready.		
-	TInt connNum = 0;
-    RProperty::Get(KPropertyUidBluetoothCategory, KPropertyKeyBluetoothPHYCount, connNum);
-	if(connNum > KBtUiMaxConnections) 
-  		{
-        ConnectCompleteL(KErrServerBusy, aDevice);
-  		}
-  	else if(CallOnGoing()&& connNum > 1)
-	  	{
-    	CAknNoteDialog* dlg = new (ELeave) CAknNoteDialog(CAknNoteDialog::ENoTone,
-                                                       CAknNoteDialog::ELongTimeout);
-		if(iCoverDisplayEnabled)
-			{
-			CleanupStack::PushL(dlg); 
-    		dlg->PublishDialogL(ECmdShowBtImpossibleIncallNote, KUidCoverUiCategoryBtui); // initializes cover support    
-			CleanupStack::Pop(dlg); 
-			}
-	
-    	dlg->ExecuteLD(R_BT_NOT_INCALL_NOTE);    	
-  		}
-    else
-        {
-		if(TBTUIViewsCommonUtils::TurnBTOnIfNeededL(iBtEngSettings,iCoverDisplayEnabled)!= KErrNone)
-			return;
-		
-		TInt errorCode = KErrNone;  
-		TBTPowerStateValue currentPowerMode;		
-		errorCode=iBtEngSettings->GetPowerState(currentPowerMode); 
-		
-	    if(errorCode)    
-	    	{
-	    	// handle the error code
-	    	return;
-	    	}
-	    if ( aNewWaitNote )
-	        {
-            // Launch wait note              
-            OpenWaitNoteL(iWaitForConnectDlg,R_BT_CONNECTING_TO_WAIT_NOTE,R_BT_CONNECTING_TO ,
-                ECmdShowBtWaitConnectingToNote,aDevice.iName); 
-	        }
-		iConnectDevice=new(ELeave) TBTDevice(aDevice);            
-		iConnectDevice->iOperation=EOpConnect;
-		     
-		if( currentPowerMode == EBTPowerOff )
-			{
-				// turn on the flag IsConnectDevice
-				//
-				iIsConnectDevice = ETrue;
-			}
-        else
-        	{	
-        		// connect device
-        		//
-        		iModel->ChangeDevice(*iConnectDevice);
-        		
-        		// reset IsConnectDevice flag
-        		iIsConnectDevice = EFalse;
-        	}
-        }
-    TRACE_FUNC_EXIT
-	}
-	
-// ----------------------------------------------------------
-// CBTUIPairedDevicesView::OpenWaitNoteL
-// ----------------------------------------------------------
-void CBTUIPairedDevicesView::OpenWaitNoteL(CAknWaitDialog*& aWaitDialog,TUint aNoteResource,TUint aNoteTextResource,
-		TSecondaryDisplayBtuiDialogs aSec,const TDesC& aDevName)
-	{
-	TRAPD(err,
-	        RBuf stringholder;
-	        CleanupClosePushL( stringholder );
-	        BluetoothUiUtil::LoadResourceAndSubstringL( 
-	                stringholder, aNoteTextResource, aDevName, 0 );
-	    aWaitDialog = new (ELeave) CAknWaitDialog(
-                    reinterpret_cast<CEikDialog**>(&aWaitDialog), ETrue);
-	    aWaitDialog->PrepareLC(aNoteResource);
-	    aWaitDialog->SetTextL(stringholder);
-
-	    if(iCoverDisplayEnabled)
-	        {
-	        aWaitDialog->PublishDialogL(
-	          aSec, KUidCoverUiCategoryBtui); // initializes cover support    
-	        CAknMediatorFacade* covercl = AknMediatorFacade(aWaitDialog); // uses MOP, so control provided 
-	        if (covercl) // returns null if __COVER_DISPLAY is not defined
-	            {	    
-	            covercl->BufStream() << BTDeviceNameConverter::ToUTF8L(aDevName);// takes copy so consts are ok too
-	            covercl->BufStream().CommitL(); // no more data to send so commit buf
-	            }  
-	        }	        
-	    aWaitDialog->SetCallback(this); // for capturing Cancel keypress	            
-	    aWaitDialog->RunLD();
-	    
-    	CleanupStack::PopAndDestroy(&stringholder); // stringholder
-    );
-    // if the above functions leaves the iWaitNote is deleted, but
-    // not set to NULL. This will cause a problem, when
-    // the items may be deleted again, since it has to
-    // be a member variable, in order to be closed
-    // programmatically.
-    if(err!=KErrNone)
-    	{
-    	// that is why we set it to NULL here and
-    	// continue leaving further.
-        aWaitDialog=NULL;
-		User::Leave(err);	
-    	}
-	}
-
-// ----------------------------------------------------------
-// CBTUIPairedDevicesView::LaunchSettingViewL
-// ----------------------------------------------------------
-//
-void CBTUIPairedDevicesView::LaunchSettingViewL()
-	{
-	TRACE_FUNC_ENTRY
-	
-	TInt index = iContainer->CurrentItemIndex();
-	if(index == KErrNotFound) return;			
-	TBTDevice device;
-	device.iIndex = index;
-	iModel->GetDevice(device);
-	
-	CAknView* settingView = iBTPluginMan->GetSettingViewL(device);
-	if(settingView != NULL)
-		{
-		TUid viewId = settingView->Id();		
-        if(( device.iStatus & EStatusBtuiConnected) == EStatusBtuiConnected )
-            {
-            TBuf8<KMaxBCBluetoothNameLen> DeviceName;
-            DeviceName.Copy(device.iName);
-            AppUi()->ActivateLocalViewL( viewId, KNullUid, DeviceName); 
-            }
-        else
-            {
-            AppUi()->ActivateLocalViewL( viewId ); 
-            }
-		}
-	else 
-		{
-		User::Leave(KErrNotFound);
-		}	
-		
-	TRACE_FUNC_EXIT
-	}
-
-// ----------------------------------------------------------
-// CBTUIPairedDevicesView::DisconnectL
-// ----------------------------------------------------------
-//
-void CBTUIPairedDevicesView::DisconnectL()
-    {
-	TRACE_FUNC_ENTRY
-    
-	TInt index = iContainer->CurrentItemIndex();
-	if(index == KErrNotFound) return;
-			
-    TBTDevice device;
-    device.iIndex = index;
-    iModel->GetDevice(device);
-    
-    if ( !( device.iStatus & EStatusBtuiConnected) )
-        {
-        // If device is already disconnected, return immediately.
-        return;
-        }
-    
-	iDisconnectQueryDevice = device;//remember device related with query dialog
-
-    // Create confirmation query
-    RBuf stringholder;
-    CleanupClosePushL( stringholder );
-    BluetoothUiUtil::LoadResourceAndSubstringL( 
-            stringholder, R_BT_DISCONNECT_FROM, device.iName, 0 );
-    if ( !iDisconnectQueryDlg )
-        {
-        iDisconnectQueryDlg = CAknQueryDialog::NewL();
-        }
-
-	if(iCoverDisplayEnabled)
-		{
-	    iDisconnectQueryDlg->PublishDialogL(ECmdShowDisconnectQuery, KUidCoverUiCategoryBtui); // initializes cover support    
-	
-		CAknMediatorFacade* covercl = AknMediatorFacade(iDisconnectQueryDlg); // uses MOP, so control provided 
-		if (covercl) // returns null if __COVER_DISPLAY is not defined
-		    {	    
-		    covercl->BufStream() << BTDeviceNameConverter::ToUTF8L(device.iName);// takes copy so consts are ok too
-		    covercl->BufStream().CommitL(); // no more data to send so commit buf
-		    }  
-		}
-			
-    TInt keypress = iDisconnectQueryDlg->ExecuteLD(R_BT_DISCONNECT_FROM_QUERY, stringholder);
-
-    CleanupStack::PopAndDestroy(&stringholder);  // stringholder
-
-	iDisconnectQueryDlg = NULL;
-    if(keypress)  // User has accepted the dialog
-        {
-        device.iOperation = EOpDisconnect;
-	    iModel->ChangeDevice(device);
-		}
-	TRACE_FUNC_EXIT		
-	}
-	
-// ----------------------------------------------------------
-// CBTUIPairedDevicesView::CancelDisconnectQueryDlgL
-// ----------------------------------------------------------
-//
-void CBTUIPairedDevicesView::CancelDisconnectQueryDlg()
-{
-	TRACE_FUNC_ENTRY
-	
-	if(iDisconnectQueryDlg)
-	{
-		delete iDisconnectQueryDlg;
-		iDisconnectQueryDlg = NULL;
-	}
-	
-	TRACE_FUNC_EXIT	
-}
-
-// ----------------------------------------------------------
-// CBTUIPairedDevicesView::DisconnectWithoutQuery
-// ----------------------------------------------------------
-//
-void CBTUIPairedDevicesView::DisconnectWithoutQuery()
-{
-	TRACE_FUNC_ENTRY
-    
-	TInt index = iContainer->CurrentItemIndex();
-	if(index == KErrNotFound) return;
-			
-    TBTDevice device;
-    device.iIndex = index;
-    iModel->GetDevice(device);  
-    device.iOperation = EOpDisconnect;
-    iModel->ChangeDevice(device);      
-}
-// ----------------------------------------------------------
-// CBTUIPairedDevicesView::ConnectCompleteL
-// ----------------------------------------------------------
-//
-void CBTUIPairedDevicesView::ConnectCompleteL(TInt aError,const TBTDevice& aDevice,
-	const RBTDevNameArray* aConflictingDeviceNames)
-    {
-	TRACE_FUNC_ENTRY
-
-    // Dismiss wait note
-    //   
-    if(iConnectDevice)
-        {
-        delete iConnectDevice;
-        iConnectDevice=NULL;
-        }
-    
-	if ( iIsPairConnect )
-	    {
-	    iIsPairConnect = EFalse;
-	    if ( aError != KErrNone && 
-	         aError != KErrCancel &&
-	         aError != KErrNotSupported &&
-	         aError != KErrAlreadyExists && 
-	         aError != KErrServerBusy )
-	        {
-	        // It is possible that we started connecting too soon before the
-	        // device moves to conntable mode from pairing mode. Let's try
-	        // once more:
-	        if ( !iActive )
-	            {
-	            iActive = CBTUIActive::NewL( 
-	                        this, KAutoConnect2ndTry, CActive::EPriorityStandard );
-	            }
-	        iActive->RequestStatus() = KRequestPending;
-	        iActive->GoActive();	
-	        TRequestStatus* stptr = &( iActive->RequestStatus() );
-	        User::RequestComplete( stptr, KErrNone );
-	        TRACE_INFO( _L("CBTUIPairedDevicesView, sceadule auto connect 2nd try") )
-            return;
-	        }
-	    }
-
-    if(iWaitForConnectDlg)
-        {
-        TRACE_INFO(_L("waiting dialog is active, dismiss it"))
-        iWaitForConnectDlg->ProcessFinishedL();
-        }
-	
-    switch (aError)
-        {
-        case KErrCancel:
-        	TRACE_INFO(_L("aError = KErrCancel"))
-            break;
-        case KErrAlreadyExists:	// connection exists allready
-        	{
-          	RBuf stringholder;
-          	CleanupClosePushL( stringholder );
-          	if(aConflictingDeviceNames && aConflictingDeviceNames->Count()> 0)
-        		{        		
-        		if(aConflictingDeviceNames->Count() == 1)
-        			{
-        			BluetoothUiUtil::LoadResourceAndSubstringL( stringholder, 
-        			        R_BT_DISCONNECT_FIRST_PROMPT, 
-        			        *(*aConflictingDeviceNames)[0], 0 );
-        			}
-        		else
-        			{
-        			BluetoothUiUtil::LoadResourceAndSubstringL( stringholder, 
-                        R_BT_DISCONNECT_FIRST_STEREO_PROMPT, 
-                        *(*aConflictingDeviceNames)[0], 0 );
-        			BluetoothUiUtil::AddSubstringL( stringholder, *(*aConflictingDeviceNames)[1], 1 );       					
-        			}
-        		TRACE_INFO(_L("KErrAllreadyExists"))      	  		  
-          		}
-          	else
-          		{
-       			// Showing a note in this case would always show a note with "%U" in it
-       			// so the note is not shown at all
-       			TRACE_INFO(_L("KErrAlreadyExists, but no device given, not showing a notification"))
-				CleanupStack::PopAndDestroy(&stringholder);
-	          	break;	
-          		}
-
-           	CAknInformationNote* note = new (ELeave) CAknInformationNote();
-            
-			if(iCoverDisplayEnabled)
-				{
-				CleanupStack::PushL(note); 			
-		    	note->PublishDialogL(ECmdShowBtDisconnectFirstNote, KUidCoverUiCategoryBtui); // initializes cover support    
-				CleanupStack::Pop(note); 
-
-				CAknMediatorFacade* covercl = AknMediatorFacade(note); // uses MOP, so control provided 
-				if (covercl) // returns null if __COVER_DISPLAY is not defined
-			    	{	
-					if(aConflictingDeviceNames && aConflictingDeviceNames->Count()> 0)			    	    
-						{
-							covercl->BufStream() << BTDeviceNameConverter::ToUTF8L(*(*aConflictingDeviceNames)[0]);	
-						}			    	
-			    	covercl->BufStream().CommitL(); // no more data to send so commit buf
-			    	}  
-				}
-		
-        	note->ExecuteLD(stringholder);
-        	CleanupStack::PopAndDestroy(&stringholder);
-        	}
-        	break;	
-		case KErrServerBusy:
-			{
-        	CAknNoteDialog* dlg = new (ELeave) CAknNoteDialog(
-        		CAknNoteDialog::ENoTone,CAknNoteDialog::ELongTimeout);                
-			if(iCoverDisplayEnabled)
-				{
-				CleanupStack::PushL(dlg); 			
-				dlg->PublishDialogL(ECmdBtuiShowBtBusyNote, KUidCoverUiCategoryBtui); // initializes cover support    
-				CleanupStack::Pop(dlg); 			
-				}
-			
-        	dlg->ExecuteLD(R_BT_BUSY);
-			}
-			break;        		
-        case KErrNone:
-            {           
-            
-            TRACE_INFO(_L("aError = KErrNone"))
-            // Create note 
-            //          
-			CAknInformationNote* notePtr = new (ELeave) CAknInformationNote();
-
-            RBuf stringHolder;
-            CleanupClosePushL( stringHolder );
-            
-            BluetoothUiUtil::LoadResourceAndSubstringL( stringHolder,
-                    R_BT_CONF_CONNECTED_PROMPT, aDevice.iName, 0 );
-            
-            if(iCoverDisplayEnabled)
-                    {
-                    CleanupStack::PushL(notePtr); 			
-                    notePtr->PublishDialogL(ECmdBtuiShowBtConfConnected, KUidCoverUiCategoryBtui); // initializes cover support    
-                    CleanupStack::Pop(notePtr); 
-
-                    CAknMediatorFacade* covercl = AknMediatorFacade(notePtr); // uses MOP, so control provided 
-                    if (covercl) // returns null if __COVER_DISPLAY is not defined
-                        {	
-                            covercl->BufStream() << BTDeviceNameConverter::ToUTF8L(aDevice.iName);	
-                          covercl->BufStream().CommitL(); // no more data to send so commit buf
-                        }  
-                    }
-                
-            notePtr->ExecuteLD(stringHolder);        
-            CleanupStack::PopAndDestroy(&stringHolder);
-            }
-            
-            TRAP_IGNORE(LaunchSettingViewL();)
-            break;
-
-        case KErrNotSupported:
-            {
-            TRACE_INFO(_L("error = KErrNotSupported"))
-            
-            RBuf stringHolder;
-            CleanupClosePushL( stringHolder );
-            
-            BluetoothUiUtil::LoadResourceAndSubstringL( stringHolder,
-                    R_BT_DEVICE_NOT_SUPPORTED, aDevice.iName, 0 );
-			
-			// create note
-			//
-			CAknInformationNote* note = new (ELeave) CAknInformationNote();
-            
-			if(iCoverDisplayEnabled)
-				{
-				CleanupStack::PushL(note); 			
-		    	note->PublishDialogL(ECmdBtuiShowBtDeviceNotSupported, KUidCoverUiCategoryBtui); // initializes cover support    
-				CleanupStack::Pop(note); 
-
-				CAknMediatorFacade* covercl = AknMediatorFacade(note); // uses MOP, so control provided 
-				if (covercl) // returns null if __COVER_DISPLAY is not defined
-			    	{	
-						covercl->BufStream() << BTDeviceNameConverter::ToUTF8L(aDevice.iName);	
-						covercl->BufStream().CommitL(); // no more data to send so commit buf
-			    	}  
-				}
-			note->ExecuteLD(stringHolder);
-        	CleanupStack::PopAndDestroy(&stringHolder);
-            }
-            break;
-
-        default:
-            {
-            // Create note
-           	CAknInformationNote* note = new (ELeave) CAknInformationNote();
-            HBufC* stringHolder=StringLoader::LoadLC(R_BT_DEVICE_NOT_AVAIL_NOTE );
-	      
-			if(iCoverDisplayEnabled)
-				{
-				CleanupStack::PushL(note); 			
-		    	note->PublishDialogL(ECmdBtuiShowBtDeviceNotAvail, KUidCoverUiCategoryBtui); // initializes cover support    
-				CleanupStack::Pop(note); 
-			
-				}
-		
-        	note->ExecuteLD(*stringHolder);
-        	CleanupStack::PopAndDestroy(stringHolder);
-        	TRACE_INFO(_L("default error note BT-not-available"))
-            }
-            break;
-        }    
-	TRACE_FUNC_EXIT
-    }
-
-// ------------------------------------------------------
-// CBTUIPairedDevicesView::LaunchHelp
-// static help launching function for TCallback
-// ------------------------------------------------------
-TInt CBTUIPairedDevicesView::LaunchHelp(TAny* aCoeHelpContext)
-	{	
-#ifdef __SERIES60_HELP      
-	//TRACE_FUNC_ENTRY
-	TCoeHelpContext hc;
-	
-	if(aCoeHelpContext==NULL)
-		hc = TCoeHelpContext(KBtuiUid3,KBT_HLP_BLOCKED);
-	else
-		hc = *static_cast<TCoeHelpContext*>(aCoeHelpContext);
-	TRAPD(err,		 
-		CArrayFix< TCoeHelpContext >* array=new (ELeave) CArrayFixFlat< TCoeHelpContext >(1);
-		array->AppendL(hc);
-		CleanupStack::PushL(array);
-		// codescan will complain about CCoeEnv::Static(), however it is not reasonable
-		// avoidable, since this is static funtion.
-        HlpLauncher::LaunchHelpApplicationL(CCoeEnv::Static()->WsSession() , array);
-        CleanupStack::Pop(array);
-   );
-    
-    // the array is not deleted, since deleting it will result
-    // to E32User-CBase 3. It is assumed that HlpLancher is taking care of it.
-    // however this has not been documented.
-    //TRACE_FUNC_EXIT
-    return err;
-#else
-	return KErrNone;    
-#endif    
-	}
-
-// ------------------------------------------------------
-// CBTUIPairedDevicesView::CallOnGoing
-// ------------------------------------------------------
-TBool CBTUIPairedDevicesView::CallOnGoing()
-	{
-	TRACE_FUNC_ENTRY	
-	TInt callState;
-	// Try to get the call state property
-    
-	TInt err = RProperty::Get(KPSUidCtsyCallInformation,
-	 KCTsyCallState, callState); //KPSUidTelephonyCallInformation should be used   // Check also,if retrieving the property value succeeded
-	return (err == KErrNone) ?
-           (callState != EPSCTsyCallStateNone && 
-           callState != EPSCTsyCallStateUninitialized) :
-           EFalse;
-	}
-// ----------------------------------------------------------
-// From MProgressDialogCallback
-// CBTUIPairedDevicesView::DialogDismissedL
-//
-// Cancels pairing/connection operation if user has pressed Cancel softkey.
-// Does nothing if the dialog has been dismissed by this program.
-// ----------------------------------------------------------
-//
-void CBTUIPairedDevicesView::DialogDismissedL(TInt aButtonId )
-    {    
-	TRACE_FUNC_ENTRY
-
-	// it was not canceled, but dialog was closed
-	// because it ended normally, so there is nothing to clean up.
-   if( aButtonId != EAknSoftkeyCancel )
-   		return;
-   
-    // Cancel ongoing operations if any
-    //
-    if ( iWaitForConnectDlg)
-    	{
-        if( iConnectDevice )
-        	{
-	        iModel->CancelChange(*iConnectDevice);
-	        delete iConnectDevice;        	
-			iConnectDevice=NULL;	  
-			iIsPairConnect = EFalse;
-        	}            	
-    	iWaitForConnectDlg = NULL;
-    	}    	
-    if ( iWaitForPairingDlg )
-        {
-        if( iPairingDevice )
-        	{
-	        TBTDevice device;
-	        device.iAddr = iPairingDevice->BDAddr();
-	        device.iOperation = EOpPair;
-
-        	iDeviceSearcher->CancelSearchRemoteDevice();
-        	
-	        iModel->CancelChange(device);
-        	        	
-	        delete iPairingDevice;        	
-			iPairingDevice=NULL;	        			
-        	}        
-        // The dialog has already been deleted by UI framework and
-        // must not be deleted manually.        	
-        iWaitForPairingDlg = NULL;
-        }
-	
-	TRACE_FUNC_EXIT
-    }    
-// ------------------------------------------------------
-// From MBTEngSdpResultReceiver
-// CBTUIPairedDevicesView::ServiceSearchComplete
-// not used and implemented as empty
-// ------------------------------------------------------
-void CBTUIPairedDevicesView::ServiceSearchComplete(const RSdpRecHandleArray& , TUint , TInt)
-	{
-	TRACE_FUNC_ENTRY	
-	}
-// ------------------------------------------------------
-// From MBTEngSdpResultReceiver
-// CBTUIPairedDevicesView::AttributeSearchComplete
-// not used and implemented as empty
-// ------------------------------------------------------
-void CBTUIPairedDevicesView::AttributeSearchComplete(TSdpServRecordHandle, 
-	const RSdpResultArray& ,TInt)
-	{
-	TRACE_FUNC_ENTRY	
-	}
-// ------------------------------------------------------
-// From MBTEngSdpResultReceiver
-// CBTUIPairedDevicesView::AttributeSearchComplete
-// not used and implemented as empty
-// ------------------------------------------------------
-void CBTUIPairedDevicesView::ServiceAttributeSearchComplete(TSdpServRecordHandle ,
-	const RSdpResultArray& ,TInt )
-	{
-	TRACE_FUNC_ENTRY	
-	}
-// ------------------------------------------------------
-// From MBTEngSdpResultReceiver
-// CBTUIPairedDevicesView::DeviceSearchComplete
-// ------------------------------------------------------	
-void CBTUIPairedDevicesView::DeviceSearchComplete(CBTDevice* aDevice, TInt aErr)
-	{
-	TRACE_FUNC_ENTRY	
-
-	TRAPD(err,	DeviceSearchCompleteL(aDevice, NULL, aErr);
-		);
-		// something went wrong.
-	if(err != KErrNone)
-		{
-		TRAP_IGNORE( TBTUIViewsCommonUtils::ShowGeneralErrorNoteL(); );
-		}			
-    iSearchOngoing=EFalse;
-	TRACE_FUNC_EXIT		
-	}
-
-// ------------------------------------------------------
-// From MBTEngSdpResultReceiver
-// CBTUIPairedDevicesView::DeviceSearchComplete
-// ------------------------------------------------------   
-void CBTUIPairedDevicesView::DeviceSearchComplete( CBTDevice* aDevice, 
-        TNameEntry* aNameEntry, TInt aErr )
-    {
-	TRACE_FUNC_ENTRY	
-
-	TRAPD(err,	DeviceSearchCompleteL(aDevice, aNameEntry, aErr);
-		);
-		// something went wrong.
-	if(err != KErrNone)
-		{
-		TRAP_IGNORE( TBTUIViewsCommonUtils::ShowGeneralErrorNoteL(); );
-		}
-    iSearchOngoing=EFalse;
-	TRACE_FUNC_EXIT		    
-    }
-
-// ------------------------------------------------------
-// CBTUIPairedDevicesView::DeviceSearchCompleteL
-// Leaving version of DeviceSearchComplete
-// ------------------------------------------------------
-
-void CBTUIPairedDevicesView::DeviceSearchCompleteL(CBTDevice* aDevice, 
-        TNameEntry* aNameEntry, TInt aErr)
-	{
-	TRACE_FUNC_ENTRY	
-    iSearchOngoing=EFalse;
-	if ( !iPairingDevice )
-	    {
-	    delete iModel;
-	    iModel = NULL;
-	    return;
-	    }
-		// we must  not have multiple pairings at the same time
-	__ASSERT_DEBUG(aDevice->BDAddr() == iPairingDevice->BDAddr(),
-		PANIC(EBTPanicTwoPairingAttemptsAtTheSameTime) );
-
-	// other error condition, most likely dialog cancel.
-	if(aErr != KErrNone && (aErr != KErrAlreadyExists))
-		{
-		delete iPairingDevice;
-		iPairingDevice=NULL;
-		return;
-		}
-
-    // In case user switches the view fast enough before searching starts, 
-	// It crashes the whole btui by iModel is null value.
-	// We add an extra check here
-	//
-	if ( !iModel )
-	    {
-	    delete iPairingDevice;
-	    iPairingDevice=NULL;
-	    return;
-	    }
-		
-	TBTDevice *tmpDevice=iModel->CreateDeviceL(aDevice, aNameEntry);
-	CleanupStack::PushL(tmpDevice);	
-    if(tmpDevice->iStatus & (EStatusPhysicallyConnected|EStatusBtuiConnected|EStatusPaired))	
-        {
-        ShowDisconnecNoteL(tmpDevice);        
-        CleanupStack::PopAndDestroy(tmpDevice);            
-	    delete iPairingDevice;
-	    iPairingDevice=NULL;                                  
-        return;
-        }
-    else        
-	    {
-    	// Launch wait note
-    	OpenWaitNoteL(iWaitForPairingDlg,R_BT_WAITING,R_BT_WAITING_PROMPT,
-           		ECmdShowBtWaitingNote,tmpDevice->iName);     
-
-    	CleanupStack::PopAndDestroy(tmpDevice); 
-    	tmpDevice=NULL;
-    	// and start the pairing	
-    	iModel->ChangeDevice(aDevice, aNameEntry, EOpPair);
-    	// aDevice is not deleted, since it points to iPairingDevice and it is still used
-    	// after this
-        }
-	TRACE_FUNC_EXIT		
-	}
-
-
-// ------------------------------------------------------
-// CBTUIPairedDevicesView::ShowDisconnecNote
-// ------------------------------------------------------	
-void CBTUIPairedDevicesView::ShowDisconnecNoteL(TBTDevice *aDevice)
-    {
-    RBuf stringholder;
-    CleanupClosePushL( stringholder );
-    BluetoothUiUtil::LoadResourceAndSubstringL( 
-            stringholder, R_BT_DISCONNECT_FIRST_PROMPT, aDevice->iName, 0 );
-    // Launch a waiting confirmation note
-    //
-    CAknConfirmationNote* note = new (ELeave) CAknConfirmationNote(ETrue);
-
-    if(iCoverDisplayEnabled)
-    	{
-        CleanupStack::PushL(note); 				
-        note->PublishDialogL(ECmdShowBtSuccesfullyPairedNote, 
-          KUidCoverUiCategoryBtui); // initializes cover support    
-    	CAknMediatorFacade* covercl = AknMediatorFacade(note); // uses MOP, so control provided 
-    	if (covercl) // returns null if __COVER_DISPLAY is not defined
-    	    {	    
-    	    covercl->BufStream() << BTDeviceNameConverter::ToUTF8L(aDevice->iName);// takes copy so consts are ok too
-    	    covercl->BufStream().CommitL(); // no more data to send so commit buf
-    	    }  
-        CleanupStack::Pop(note); 				
-    	}
-
-    note->ExecuteLD(stringholder);
-
-    CleanupStack::PopAndDestroy(&stringholder); // stringholder    
-    
-    }
-
-void CBTUIPairedDevicesView::ConnectIfNeededAfterPairL( TInt aCount )
-    {
-    TRACE_FUNC_ENTRY
-    TBTDevice device;
-    device.iAddr = iPairConnectAddr;
-    iModel->GetDevice(device);
-    device.iOperation = EOpConnect;
-    ConnectL( device, ( aCount ) ? EFalse : ETrue );
-    TRACE_FUNC_EXIT
-    }
-
-// ------------------------------------------------------
-// CBTUIPairedDevicesView::BondingCompleted
-// called by NotifyChangeDeviceComplete
-// ------------------------------------------------------
-void CBTUIPairedDevicesView::BondingCompleteL(TInt aError, const TBTDevice& aDevice)
-	{
-    TRACE_INFO((_L("aError=%d"), aError))
-	// We need to make a copy of the device, since it may be cleaned up
-	// by device refresh.
-	TBTDevice bDevice= aDevice;
-	
-	// this may look useless, however if the device has a given shortName it is listed with it
-	// all the time. If you omnit this line it will be shown with its original deviceName,
-	// dispite it will be listed with the given name
-	iModel->GetDevice(bDevice);
-	 	
-	delete iPairingDevice;
-	iPairingDevice=NULL;
-	           
-    // Dismiss wait note
-    if(iWaitForPairingDlg)
-        {
-        iWaitForPairingDlg->ProcessFinishedL();
-        iWaitForPairingDlg = NULL;
-        }
-	
-    // Error handling
-    switch(aError)
-        {
-        case KErrCancel:
-            break;
-        case KErrAlreadyExists: // This is a legal return value
-        case KErrNone:
-        case KHCIErrorBase:
-            {
-	        if( (bDevice.iStatus & EStatusConnectable) 
-	                && (bDevice.iDeviceClass.MajorDeviceClass() != EMajorDeviceComputer)) 
-	            // Only automatically query for a connectable device but not a computer
-	        	{
-	            iPairConnectAddr = aDevice.iAddr;
-	        	iIsPairConnect = ETrue;
-	        	ConnectIfNeededAfterPairL( 0 );
-	        	}
-            break;
-			}
-        default:
-            {
-            break;
-          }
-        }  
-	TRACE_FUNC_EXIT
-	}
-
-// -----------------------------------------------
-// From MBTDeviceObserver
-// CBTUIPairedDevicesView::RefreshDeviceList
-// calls the container to refresh the deviceList
-// -----------------------------------------------
-void CBTUIPairedDevicesView::RefreshDeviceList(const RDeviceArray* aDevices,
-       TInt aSelectedItemIndex)
-	{
-	TRACE_FUNC_ENTRY	
-	TRAPD(err,
-		if(iContainer)
-			{			
-				iContainer->RefreshDeviceListL(aDevices,aSelectedItemIndex);			
-			}
-		);			
-	if (iActiveMenuPane && iActiveMenuPane->NumberOfItemsInPane()>0 ) 
-	    {
-		TInt index = iContainer->CurrentItemIndex();
-	    if ( index >=0 )
-		    {
-		    TBTDevice device;
-		    device.iIndex = index;
-		    iModel->GetDevice(device);
-			if ( iMenuDevice.iAddr == device.iAddr && 
-			    ( ( iMenuDevice.iStatus & EStatusBtuiConnected ) != ( device.iStatus & EStatusBtuiConnected ) ) )
-			    {
-			    TRACE_INFO(_L("Device status changed, update menupane"));
-			    iMenuDevice = device;
-			    iActiveMenuPane->Close();
-			    TRAP_IGNORE( this->ProcessCommandL(EAknSoftkeyContextOptions) );
-			    }
-		    }
-	    }
-	if(err!= KErrNone)	    
-        {
-		TRAP_IGNORE( TBTUIViewsCommonUtils::ShowGeneralErrorNoteL(); );
-        }
-	TRACE_FUNC_EXIT        
-	}
-
-
-// -----------------------------------------------
-// 
-// -----------------------------------------------
-void CBTUIPairedDevicesView::RequestCompletedL( CBTUIActive* aActive, TInt aId, 
-                        TInt aStatus )
-    {
-    TRACE_INFO( ( _L("CBTUIPairedDevicesView::RequestCompletedL err %d"), aStatus ) )
-    (void) aActive;
-    (void) aId;
-    (void) aStatus;
-    TRACE_INFO( _L("CBTUIPairedDevicesView, auto connect 2nd try ... ") )
-    ConnectIfNeededAfterPairL( 1 );
-    }
-
-// -----------------------------------------------
-// 
-// -----------------------------------------------
-void CBTUIPairedDevicesView::HandleError( CBTUIActive* aActive, TInt aId, 
-                  TInt aError )
-    {
-    (void) aActive;
-    (void) aId;
-    (void) aError;
-    iIsPairConnect = EFalse;
-    }
-
-// ---------------------------------------------------------
-// From MBTDeviceObserver
-// CBTUIPairedDevicesView::NotifyChangeDeviceComplete
-// This function implement the functionality of command complete.
-// The lists of shown devices are refreshed by RefreshDeviceList, 
-// not by this function
-// ---------------------------------------------------------
-//
-void CBTUIPairedDevicesView::NotifyChangeDeviceComplete(const TInt aErr, 
-		const TBTDevice& aDevice, const RBTDevNameArray* aDevNameArray)
-	{
-	TRACE_FUNC_ENTRY
-	TBTDevice tmpDevice=aDevice;
-	TRAPD(err,NotifyChangeDeviceCompleteL(aErr,tmpDevice,aDevNameArray
-		););
-	if(err!= KErrNone)	    
-        {
-		TRAP_IGNORE( TBTUIViewsCommonUtils::ShowGeneralErrorNoteL(); );
-        }
-	TRACE_FUNC_EXIT		
-	}
-// ---------------------------------------------------------
-// CBTUIPairedDevicesView::NotifyChangeDeviceCompleteL
-// Leaving version of notifyChangeDevice
-// ---------------------------------------------------------
-
-void CBTUIPairedDevicesView::NotifyChangeDeviceCompleteL(const TInt aErr, 
-		const TBTDevice& aDevice, const RBTDevNameArray* aDevNameArray)
-	{
-	TRACE_FUNC_ENTRY
-	if(iContainer == NULL) return;
-
-	TRACE_INFO((_L("aErr=%d"), aErr))
-	TRACE_INFO((_L("aDevice.iOperation=%d"), aDevice.iOperation))
-	TRACE_INFO((_L("aDevice.iStatus=%d"), aDevice.iStatus))
-	TRACE_INFO((_L("iIsAlreadyConnected=%d"), iIsAlreadyConnected))
-	
-    if (aDevice.iOperation == EOpDisconnect && iExpectedCallBack>0 )
-        {
-        TBTDevice device;
-        device.iIndex = aDevice.iIndex;
-        iModel->GetDevice(device);    
-        device.iOperation = EOpUnpair;
-        iModel->ChangeDevice(device); 
-        iExpectedCallBack--;
-        }
-	
-	if( aDevice.iOperation == EOpConnect )
-		{
-		if( aErr == KErrNone && iIsAlreadyConnected )
-		    {
-		    TRACE_INFO(_L("Don't show notes several times for the same device with different profile connections"))
-		    return; 
-		    }
-		ConnectCompleteL(aErr, aDevice, aDevNameArray );
-		iIsAlreadyConnected = ETrue;
-		TRACE_INFO(_L("iIsAlreadyConnected False -> True"))
-		return;
-		}
-	if(aDevice.iOperation == EOpPair)		
-		{		
-		BondingCompleteL(aErr, aDevice);
-		}
-	if(aErr != KErrNone)
-		{
-        // The user tried to rename to a name that allready exists.
-        if(aDevice.iOperation == EOpChangeName && aErr == KErrAlreadyExists)
-            {
-            CAknNoteDialog* dlg2 = new (ELeave) CAknNoteDialog(CAknNoteDialog::EErrorTone,
-                                                                CAknNoteDialog::ELongTimeout);
-            dlg2->ExecuteLD(R_BT_NAME_EXISTS_NOTE);
-
-            RenameDeviceDlgL();
-            return;
-            }
-        // Need to properly handle situation when "Disconnect from xxx" query 
-        // has been shown and paired device has been turned off simultaneously.
-        // CancelDisconnectQuery dialog need to be closed. 
-        if(aErr == KErrDisconnected)
-            {
-            if(iDisconnectQueryDlg && aDevice.iAddr == iDisconnectQueryDevice.iAddr)
-                CancelDisconnectQueryDlg();
-            
-            TRACE_FUNC_EXIT
-            return;
-            }
-        // show general error if any of these failed
-        if(	aDevice.iOperation== EOpTrust ||
-            aDevice.iOperation== EOpUntrust ||
-            aDevice.iOperation== EOpBlock ||
-            aDevice.iOperation== EOpChangeName)		
-            {
-            TBTUIViewsCommonUtils::ShowGeneralErrorNoteL();
-            }
-		return;
-		}		
-	
-        if(aDevice.iOperation == EOpUntrust) 	        
-            {		
-            // Unauthorise ok note,
-            CAknNoteDialog* dlg = new (ELeave) CAknNoteDialog(CAknNoteDialog::EConfirmationTone,
-                                                                   CAknNoteDialog::ELongTimeout);
-            
-            if(iCoverDisplayEnabled)
-                {
-                CleanupStack::PushL(dlg); 
-                dlg->PublishDialogL(ECmdShowBtDevSetAsUntrustNote, KUidCoverUiCategoryBtui); 
-                // initializes cover support    
-                CleanupStack::Pop(dlg); 
-                }
-            dlg->ExecuteLD( R_BT_DEVICE_UNTRUSTED_NOTE );				
-            }
-	TRACE_FUNC_EXIT		
-	}
-
-// ---------------------------------------------------------------------------
-// CBTUIPairedDevicesView::CreateTabIconL()
-// Creates icon for tab.
-// ---------------------------------------------------------------------------
-//    
-CGulIcon* CBTUIPairedDevicesView::CreateTabIconL()
-    {
-    TFileName bmpFilename;
-    bmpFilename += KBitmapFileDrive;
-    bmpFilename += KDC_APP_BITMAP_DIR;
-    bmpFilename += KBtuiBmpFileName;
-        
-    CGulIcon* icon = AknsUtils::CreateGulIconL(
-        AknsUtils::SkinInstance(), 
-        KAknsIIDQgnPropBtDevicesTab3,  
-        bmpFilename, 
-        EMbmBtuiQgn_prop_bt_devices_tab3, 
-        EMbmBtuiQgn_prop_bt_devices_tab3_mask );
-          
-    return icon;
-    }   
-    
-// End of File
-
--- a/bluetoothengine/btui/Ecom/src/BTUIRegistryWatcher.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,138 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declares Registry watcher class for BTUI.
-*
-*/
-
-
-// INCLUDE FILES
-
-#include "BTUI.h"
-#include "BTUIRegistryWatcher.h"
-#include <bt_subscribe.h>
-
-#include "BTDevModel.h"  //for Log printing Macro
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------
-// CBTUIRegistryWatcherAO::CBTUIRegistryWatcherAO
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// ---------------------------------------------------------
-//
-CBTUIRegistryWatcherAO::CBTUIRegistryWatcherAO( MBTUIRegistryObserver* aParent )
-    : CActive(EPriorityNormal), iParent ( aParent )
-    {
-    TRACE_FUNC_ENTRY
-
-    CActiveScheduler::Add(this);
-
-    TRACE_FUNC_EXIT
-    }
-
-// ---------------------------------------------------------
-// Destructor.
-// ---------------------------------------------------------
-//
-CBTUIRegistryWatcherAO::~CBTUIRegistryWatcherAO()
-    {
-    TRACE_FUNC_ENTRY
-
-    Cancel();
-    iProperty.Close();
-
-    TRACE_FUNC_EXIT
-    }
-
-// ---------------------------------------------------------
-// CBTUIRegistryWatcherAO::WatchL
-// ---------------------------------------------------------
-//
-void CBTUIRegistryWatcherAO::WatchL()
-    {
-    TRACE_FUNC_ENTRY
-
-    if( !iProperty.Handle() )
-        {
-		User::LeaveIfError( iProperty.Attach( KPropertyUidBluetoothCategory,
-                                              KPropertyKeyBluetoothRegistryTableChange ) );
-        }
-
-    if( !IsActive() )
-        {
-        iProperty.Subscribe(iStatus);
-        SetActive();    
-        }
-    TRACE_FUNC_EXIT
-    }
-
-// ---------------------------------------------------------
-// CBTUIRegistryWatcherAO::DoCancel
-// ---------------------------------------------------------
-//
-void CBTUIRegistryWatcherAO::DoCancel()
-    {
-    TRACE_FUNC
-
-    iProperty.Cancel();
-    }
-
-// ---------------------------------------------------------
-// CBTUIRegistryWatcherAO::RunL
-// ---------------------------------------------------------
-//
-void CBTUIRegistryWatcherAO::RunL()
-    {
-    TRACE_FUNC_ENTRY
-
-    if( iStatus.Int()==KErrNone )
-        {
-        __ASSERT_DEBUG(iParent, PANIC(EBTPanicClassMemberVariableIsNull));
-
-        // Inform observer
-        //
-        iParent->RegistryContentChangedL();
-        
-        // Continue watching
-        //
-        WatchL();
-        }
-
-    TRACE_FUNC_EXIT
-    }
-
-// ---------------------------------------------------------
-// CBTUIRegistryWatcherAO::RunError
-// ---------------------------------------------------------
-//
-TInt CBTUIRegistryWatcherAO::RunError( TInt aError )
-    {
-    TRACE_INFO((_L("RunError: %d"), aError))
-
-    return aError;
-    }
-
-// ---------------------------------------------------------
-// CBTUIRegistryWatcherAO::StopWatching
-// ---------------------------------------------------------
-//
-void CBTUIRegistryWatcherAO::StopWatching()
-    {
-    TRACE_FUNC
-
-    Cancel();
-    }
-
-// End of File
--- a/bluetoothengine/btui/Ecom/src/BTUISap.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,249 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This module is created for Bluetooth SIM Access Profile 
-*				  feature variant.
-*
-*/
-
-#include <aknnotewrappers.h>
-#include <aknradiobuttonsettingpage.h>
-#include <BtuiViewResources.rsg>		// Compiled resource ids
-#include <BTSapDomainPSKeys.h>	
-#include <centralrepository.h> 
-#include <AknMediatorFacade.h>
-#include <btengconnman.h>       // for disconnect type and connection observer
-#include <btengsettings.h>
-#include <btengdevman.h>
-#include <secondarydisplay/BtuiSecondaryDisplayAPI.h>
-#include <btfeaturescfg.h>					// For EnterpriseEnablementL()
-#include <btnotif.h>
-#include <utf.h>
-#include <bluetoothuiutil.h>
-#include "btdevmodel.h"
-
-#include "debug.h"
-#include "BTUIMainView.h"
-
-// ----------------------------------------------------
-// CBTUIMainView::SetSapStatusL
-// ----------------------------------------------------
-//
-void CBTUIMainView::SetSapStatusL( TBTSapMode aValue )
-	{
-	TRACE_FUNC_ENTRY
-
-	TInt previousSapMode = GetSapStatusL();	
-	
-	if(previousSapMode==EBTSapEnabled)
-		previousSapMode=ETrue;
-		
-	TBool legalToChange = ETrue;
-
-	if ( ( previousSapMode ) && ( !aValue ) ) // SAP Enabled -> Disabled
-		{
-		// Check active SAP connections before query
-		TInt connStatus = EBTSapNotConnected;
-        RProperty::Get(KPSUidBluetoothSapConnectionState, KBTSapConnectionState, connStatus);
-						
-		if(connStatus == EBTSapConnected) 
-			{
-			//Get name of the currently connected SAP device
-
-			TBTDeviceName connectedSap;			
-			TInt error = GetConnectedSapNameL( connectedSap ); 
-
-			if ( error )
-				{
-				TBTUIViewsCommonUtils::ShowGeneralErrorNoteL();
-				}
-			else
-				{
-
-				// Create confirmation query
-				RBuf stringholder;
-				CleanupClosePushL( stringholder );
-				BluetoothUiUtil::LoadResourceAndSubstringL( stringholder, 
-				        R_BT_DISCONNECT_FROM, connectedSap, 0 );
-				CAknQueryDialog* dlg = CAknQueryDialog::NewL();
-
-				if(iCoverDisplayEnabled)
-					{
-					CleanupStack::PushL(dlg); 						
-				    dlg->PublishDialogL(ECmdShowDisconnectQuery, KUidCoverUiCategoryBtui); // initializes cover support    
-					CAknMediatorFacade* covercl = AknMediatorFacade(dlg); // uses MOP, so control provided 
-					if (covercl) // returns null if __COVER_DISPLAY is not defined
-					    {	    
-					    covercl->BufStream() << BTDeviceNameConverter::ToUTF8L(connectedSap);// takes copy so consts are ok too
-					    covercl->BufStream().CommitL(); // no more data to send so commit buf
-					    }
-					CleanupStack::Pop(dlg);
-					}
-					
-				TInt keypress = dlg->ExecuteLD( R_BT_DISCONNECT_FROM_QUERY, stringholder );
-
-				CleanupStack::PopAndDestroy(&stringholder);	// stringholder
-
-				if( keypress )	// User has accepted the dialog
-					{
-					legalToChange = ETrue;
-					}
-				else 
-					{
-					legalToChange = EFalse;
-					}
-				}
-			}
-		}
-			
-	else if ( ( !previousSapMode ) && ( aValue ) ) // SAP Disabled	-> Enabled 
-		{
-		
-		//if Bluetooth is off
-        TBTPowerStateValue powerState;
-        iBtEngSettings->GetPowerState(powerState);				
-		if(powerState!=EBTPowerOn)
-			{
-			CAknNoteDialog* dlg2 = new (ELeave) CAknNoteDialog( CAknNoteDialog::EConfirmationTone,
-																   CAknNoteDialog::ENoTimeout/*ELongTimeout*/ );
-		if(iCoverDisplayEnabled)
-			{
-			CleanupStack::PushL(dlg2); 						
-			dlg2->PublishDialogL(ECmdShowBtSapEnableNote, KUidCoverUiCategoryBtui); // initializes cover support    
-			CleanupStack::Pop(dlg2); 						
-			}
-
-			dlg2->ExecuteLD( R_BT_SAP_ENABLE_NOTE );
-			}
-	
-		}		
-
-	// Switch sapmode
-	//
-	if ( legalToChange )
-		{		
-        CRepository* cenRep = NULL;
-        cenRep = CRepository::NewL( KCRUidBTEngPrivateSettings );
-        CleanupStack::PushL(cenRep);                         
-        TInt err = cenRep->Set( KBTSapEnabled, aValue );        
-        CleanupStack::PopAndDestroy(cenRep);        	
-		}		
-	TRACE_FUNC_EXIT
-	}
-
-// ----------------------------------------------------------
-// CBTUIMainView::AskSapModeDlgL
-// ----------------------------------------------------------
-//
-void CBTUIMainView::AskSapModeDlgL()
-	{
-	TRACE_FUNC_ENTRY
-
-	if ( BluetoothFeatures::EnterpriseEnablementL() == BluetoothFeatures::EDataProfilesDisabled )
-		{
-		RNotifier notifier;
-        User::LeaveIfError(notifier.Connect());
-        CleanupClosePushL(notifier);
-		User::LeaveIfError(notifier.StartNotifier(KBTEnterpriseItSecurityInfoNotifierUid, KNullDesC8 ));
-		CleanupStack::PopAndDestroy(&notifier);
-		}
-	else
-		{
-		CDesCArrayFlat* items = iCoeEnv->ReadDesCArrayResourceL( R_BT_SAP_MODES );
-		CleanupStack::PushL(items);	
-		
-		TInt currentItem = KErrNotFound;
-		if(GetSapStatusL() == EBTSapEnabled )
-			{
-				currentItem=0;
-			}
-		else
-			{
-				currentItem=1;
-			
-			}
-		CAknRadioButtonSettingPage* dlg = new ( ELeave )CAknRadioButtonSettingPage(
-		   R_BT_SAP_SETTING_PAGE, currentItem, items );
-		if( dlg->ExecuteLD( CAknSettingPage::EUpdateWhenChanged ))
-			{
-			if(currentItem == 1)
-				{
-				SetSapStatusL( static_cast<TBTSapMode>(  EBTSapDisabled ) ); 
-				// Cast it back (invert again)
-				}			
-			else
-				{
-				SetSapStatusL( static_cast<TBTSapMode>(  EBTSapEnabled ) ); 
-				// Cast it back (invert again)			
-				}
-			} 
-		CleanupStack::PopAndDestroy(items); 
-		}
-	TRACE_FUNC_EXIT
-	}
-
-// ----------------------------------------------------------
-// CBTUIMainView::GetSapStatusL
-// ----------------------------------------------------------
-//
-TInt CBTUIMainView::GetSapStatusL()
-	{
-	TRACE_FUNC_ENTRY	
-	TInt sapStatus;
-	CRepository* repository = CRepository::NewL(KCRUidBTEngPrivateSettings);
-	CleanupStack::PushL(repository);            	
-	repository->Get(KBTSapEnabled, sapStatus);
-	CleanupStack::PopAndDestroy(repository);
-	TRACE_FUNC_EXIT
-	return sapStatus;	
-	}
-    
-// ----------------------------------------------------------
-// CBTUIModel::GetConnectedSapNameL
-// ----------------------------------------------------------
-//
-
-TInt CBTUIMainView::GetConnectedSapNameL( TDes& aName )
-	{
-	TRACE_FUNC_ENTRY
-
-    
-    CBTEngConnMan* cm = CBTEngConnMan::NewL(NULL);
-    CleanupStack::PushL(cm);
-        
-    RBTDevAddrArray devAddrArray;
-    cm->GetConnectedAddresses(devAddrArray, EBTProfileSAP);
-    if(devAddrArray.Count()>0)
-    {
-        CBTEngDevMan* devMan = CBTEngDevMan::NewL(NULL);  
-         
-        TBTRegistrySearch search;
-        search.FindAddress(devAddrArray[0]);
-        
-        CBTDeviceArray* deviceArray= new (ELeave) CBTDeviceArray(devAddrArray.Count());
-        //the name is in first CBTDevice in returned CBTDeviceArray. 
-        devMan->GetDevices(search, deviceArray); 
-        
-        aName = *(CnvUtfConverter::ConvertToUnicodeFromUtf8L(deviceArray->At(0)->DeviceName()));
-        
-        deviceArray->ResetAndDestroy();
-        delete deviceArray;
-        
-        delete devMan;
-    }
-        
-    devAddrArray.Close();
-    CleanupStack::PopAndDestroy(cm);               	
-	TRACE_FUNC_EXIT
-	return KErrNone;
-	}
--- a/bluetoothengine/btui/Ecom/src/BTUIViewsCommonUtils.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,194 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Utility function for the views.
-*
-*/
-
-#include <BtuiViewResources.rsg>    // Compiled resource ids
-#include <aknnotewrappers.h>
-#include <StringLoader.h>   		// Series 60 localisation stringloader
-#include <e32property.h>
-#include <bt_subscribe.h>
-#include <featmgr.h>            	// Feature Manager API
-#include <AknMediatorFacade.h>
-#include <btengsettings.h>
-#include <ctsydomainpskeys.h>
-#include <CoreApplicationUIsSDKCRKeys.h>
-#include <secondarydisplay/BtuiSecondaryDisplayAPI.h>
-
-#include "BTUIViewsCommonUtils.h"
-#include "debug.h"
-
-
-// ----------------------------------------------------------
-// TBTUIViewsCommonUtils::ShowGeneralErrorNoteL
-// ----------------------------------------------------------
-//
-void TBTUIViewsCommonUtils::ShowGeneralErrorNoteL()
-    {
-    //TRACE_FUNC_ENTRY
-
-    CAknNoteDialog* dlg = new (ELeave) CAknNoteDialog( CAknNoteDialog::EErrorTone,
-                                                       CAknNoteDialog::ELongTimeout );
-	if(FeatureManager::FeatureSupported( KFeatureIdCoverDisplay ))
-		{  
-		CleanupStack::PushL(dlg); 						
-        dlg->PublishDialogL(ECmdShowBtGeneralErrorNote, KUidCoverUiCategoryBtui); // initializes cover support    
-		CleanupStack::Pop(dlg); 						
-		}
-		
-	TRACE_INFO(_L("ShowGeneralErrorNoteL "))
-	dlg->ExecuteLD( R_BT_GENERAL_ERROR_NOTE );
-
-	//TRACE_FUNC_EXIT    
-    }
-    
-// ----------------------------------------------------------
-// TBTUIViewsCommonUtils::IsAnyDeviceConnectedL()
-// ----------------------------------------------------------
-TBool TBTUIViewsCommonUtils::IsAnyDeviceConnectedL()
-    {
-	//TRACE_FUNC_ENTRY
-
-    TInt connNum = 0;
-    TInt retVal = RProperty::Get(KPropertyUidBluetoothCategory, 
-      KPropertyKeyBluetoothGetPHYCount, connNum);
-    TRACE_INFO((_L("GetConnectionNumber(): %d"), connNum))        
-    //TRACE_FUNC_EXIT    
- 	return (connNum > 0);
-    }          
-    
-// -----------------------------------------------
-// CBTUIPairedDevicesView::TurnBTOnIfNeededL
-// -----------------------------------------------
-TInt TBTUIViewsCommonUtils::TurnBTOnIfNeededL(CBTEngSettings* aBtEngSettings,TBool aCoverDisplayEnabled )
-    {
-	//TRACE_FUNC
-
-    TInt errorCode = KErrNone;    
-    TBTPowerStateValue previousPowerMode;
-       
-    errorCode=aBtEngSettings->GetPowerState(previousPowerMode); 
-    if(errorCode)    
-    	return errorCode;    
-         
-	if( previousPowerMode==EBTPowerOn )
-		return KErrNone;
-	
-	if ( previousPowerMode==EBTPowerOff ) // power OFF -> ON
-        {
-        TRACE_INFO(_L("[BTUI]\t power OFF -> ON"))
-
-        TInt offlineModeOff = 0;    // possible values are 0 and 1
-        TInt activationEnabled = 0; // possible values are 0 and 1
-               
-        CRepository* repository = CRepository::NewL(KCRUidCoreApplicationUIs);
-        CleanupStack::PushL(repository);
-        repository->Get(KCoreAppUIsNetworkConnectionAllowed, offlineModeOff);
-		// Closing connection:
-		CleanupStack::PopAndDestroy(repository);        
-		repository=NULL;
-		
-        repository = CRepository::NewL(KCRUidBluetoothEngine);
-		// Check activation enabled
-		CleanupStack::PushL(repository);
-		repository->Get(KBTEnabledInOffline, activationEnabled);
-		// Closing connection:
-		CleanupStack::PopAndDestroy(repository);
-        
-                
-        TRACE_INFO((_L("power OFF -> ON, offlineModeOff = %d"), offlineModeOff))
-        TRACE_INFO((_L("power OFF -> ON, activationEnabled = %d"), activationEnabled))
-
-           // Choose user interaction
-        //
-        if ( !offlineModeOff && !activationEnabled )
-            {
-            // Load a string, create and show a note
-            //
-            HBufC* stringHolder = StringLoader::LoadLC( R_BT_OFFLINE_DISABLED );
-            CAknInformationNote* note = new (ELeave) CAknInformationNote();
-
-			if(aCoverDisplayEnabled)
-				{  
-				CleanupStack::PushL(note); 						
-	    		note->PublishDialogL(ECmdBtuiShowBtOfflineDisableNote, KUidCoverUiCategoryBtui); // initializes cover support    
-				CleanupStack::Pop(note); 						
-				}
-			
-    		note->ExecuteLD( *stringHolder );
-    		CleanupStack::PopAndDestroy(stringHolder); //stringHolder
-            }
-        else
-            {
-            // Choose query
-            //
-            TInt resource = 0;
-
-        	TInt coverUiDlgId = 0;
-				
-            if ( offlineModeOff )
-                {
-                resource = R_BT_IS_OFF_QUERY;
-				if(aCoverDisplayEnabled)
-					{  
-        	    	coverUiDlgId = ECmdBtuiShowBtIsOffDlg;
-					}
-                }
-            else
-                {
-                resource = R_BT_ACTIVATE_IN_OFFLINE_QUERY;
-				if(aCoverDisplayEnabled)
-					{  
-        	    	coverUiDlgId = ECmdBtuiShowBtActivateInOfflineDlg;
-					}
-                }
-
-            // Create and show query
-            //
-            CAknQueryDialog* dlg = CAknQueryDialog::NewL();
-
-   			if(aCoverDisplayEnabled)
-				{  
-				CleanupStack::PushL(dlg); 						
-    			dlg->PublishDialogL(coverUiDlgId, KUidCoverUiCategoryBtui); // initializes cover support    
-				CleanupStack::Pop(dlg); 						
-				}
-				
-            TInt keypress = dlg->ExecuteLD( resource );
-
-            if( keypress )
-                {
-                // Switch BT ON
-                //
-                errorCode=aBtEngSettings->SetPowerState(EBTPowerOn ) ;
-                if (errorCode)
-                    {
-                    ShowGeneralErrorNoteL();                   
-                    }
-                }  else     
-            	{
-            	errorCode=KErrCancel;               
-            	}       
-					
-                
-            }
-
-        }    
-	
-    return errorCode;
-    }    
-    
-
-
--- a/bluetoothengine/btui/Ecom/src/BtuiPluginImplementationTable.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:   ECOM proxy table for this plugin
-*
-*/
-
-#include <e32std.h>
-#include <implementationproxy.h>
-
-#include "BTUIMainView.h"
-#include "BTUIPairedDevicesView.h"
-#include "BTUIBlockedDevicesView.h"
-
-
-const TImplementationProxy KBtuiPluginImplementationTable[] = 
-	{
-	// UPDATE THIS - Uid for plugin implementation:
-	//This impl is for GS FW, in this case mainView will construct BTUI Model.
-	IMPLEMENTATION_PROXY_ENTRY( 0x1020742C,	CBTUIMainView::NewGsPluginL ), 	
-
-	//Following two are for BTUI App, in this case mainView won't construct BTUI Model, 
-	//BTUI's AppUi will do it and pass the pointer of Model to both views.
-	IMPLEMENTATION_PROXY_ENTRY( 0x1020745C,	CBTUIMainView::NewL ),
-	IMPLEMENTATION_PROXY_ENTRY( 0x1020745D,	CBTUIPairedDevicesView::NewL ),
-	IMPLEMENTATION_PROXY_ENTRY( 0x20002780,	CBTUIBlockedDevicesView::NewL )
-	};
-
-// ---------------------------------------------------------------------------
-// ImplementationGroupProxy
-// Gate/factory function
-// ---------------------------------------------------------------------------
-//
-EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
-	{
-	aTableCount = sizeof(KBtuiPluginImplementationTable) 
-        / sizeof(TImplementationProxy);
-	return KBtuiPluginImplementationTable;
-	}
--- a/bluetoothengine/btui/Ecom/src/btuipluginman.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,156 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Find and load plugin
-*
-*/
-
-
-#include <aknview.h>
-#include "btuipluginman.h"
-#include "debug.h"  
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// NewL
-// ---------------------------------------------------------------------------
-//
-CBTUIPluginMan* CBTUIPluginMan::NewL( CAknViewAppUi* aAppUi )
-    {
-    CBTUIPluginMan* self = new( ELeave ) CBTUIPluginMan( aAppUi );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-// Destructor
-// ---------------------------------------------------------------------------
-//
-CBTUIPluginMan::~CBTUIPluginMan()
-    {
-    TRACE_FUNC_ENTRY
-    
-    iPluginInfoArray.ResetAndDestroy();
-    iPluginInfoArray.Close();
-    iPluginArray.Reset();//Do not destroy - Plugins are owned by iAppUi
-
-    TRACE_FUNC_EXIT
-    }
-
-// ---------------------------------------------------------------------------
-// Check if availability of some plug-in
-// ---------------------------------------------------------------------------
-//
-TBool CBTUIPluginMan::IsPluginAvaiable(TBTDeviceClass aDeviceClassInfo)
-	{
-	for( TInt i=0; i<iPluginArray.Count(); i++ )
-		{
-		TBTDeviceClass devClass = iPluginArray[i]->GetCOD(); 
-		if( devClass.MajorDeviceClass() == aDeviceClassInfo.MajorDeviceClass() && 
-			devClass.MinorDeviceClass() == aDeviceClassInfo.MinorDeviceClass() )
-			return ETrue;
-		}
-	return EFalse;
-	}
-
-// ---------------------------------------------------------------------------
-// Get the setting view from PluginArrary based on the COD 
-// ---------------------------------------------------------------------------
-//
-CAknView* CBTUIPluginMan::GetSettingViewL(TBTDevice& aDevice)
-	{
-	for (TInt ii = 0; ii < iPluginArray.Count(); ii++ )
-		{
-		TBTDeviceClass tmpCOD = iPluginArray[ii]->GetCOD();
-		//Currently one device - one view - one plugin, 
-		//in future maybe other device properties will decide on getting the view. 
-		if(aDevice.iDeviceClass.MajorDeviceClass() == tmpCOD.MajorDeviceClass() &&
-				aDevice.iDeviceClass.MinorDeviceClass() == 	tmpCOD.MinorDeviceClass())
-			{
-			return (CAknView*)iPluginArray[ii];
-			}
-		}
-	
-	return NULL;	
-	}
-
-// ---------------------------------------------------------------------------
-// C++ default constructor
-// ---------------------------------------------------------------------------
-//
-CBTUIPluginMan::CBTUIPluginMan( CAknViewAppUi* aAppUi )
-    : iAppUi(aAppUi)
-    {
-
-    }
-
-// ---------------------------------------------------------------------------
-// Symbian 2nd-phase constructor
-// ---------------------------------------------------------------------------
-//
-void CBTUIPluginMan::ConstructL()
-    {   
-    LoadPluginsL();
-    }
-
-// ---------------------------------------------------------------------------
-// Load ECom plug-ins
-// ---------------------------------------------------------------------------
-//
-void CBTUIPluginMan::LoadPluginsL()
-	{
-	TRACE_FUNC_ENTRY
-	
-	REComSession::ListImplementationsL( KCBtuiPluginInterfaceUid, iPluginInfoArray );
-	TInt count = iPluginInfoArray.Count();
-	TRACE_INFO( ( _L( "[BTUI]\t CBTUIPluginMan::LoadSettingPluginL() PluginArray count=%d" ), count) )
-
-    iPluginArray.Reset();
-	for ( TUint ii = 0 ; ii < count; ++ii )
-		{
-		CImplementationInformation* impl = iPluginInfoArray[ii];
-		//Only append the plugins which datatype() is for HID devices. 
-	    if(impl->DataType().Length())
-	    	{
-	    	TLex8 lex( impl->DataType() );
-	    	TUint major = 0, minor = 0;
-	    	TInt err1 = lex.Val(major, EHex);
-	    	lex.SkipSpace();
-	    	TInt err2 = lex.Val(minor, EHex);
-	    	if( !err1 && !err2)
-	    	    {
-	    	    TRACE_INFO( ( _L( "[BTUI]\t CBTUIPluginMan::LoadSettingPluginL() MajorCOD=%d MinorCOD=%d" ), major, minor) )
- 	            TBTDeviceClass cod(0x00, major, minor);
-	    	                
-	    	    CBtuiPluginInterface* plugin = NULL;
-	    	    TRAPD( ret, plugin = CBtuiPluginInterface::NewL( impl->ImplementationUid() ) );
-	    	    if( !ret )
-	    	        {
-	    	        CleanupStack::PushL(plugin);
-	    	        
-	    	        // Transfer the ownership to AppUi
-	    	        iAppUi->AddViewL( (CAknView*)plugin ); 
-	    	        plugin->SetCOD(cod);
-	    	        iPluginArray.AppendL(plugin);
-	    	        CleanupStack::Pop(plugin);              
-	    	        }	    	        
-	    	    }
-	        }
-		}
-	
-	TRACE_FUNC_EXIT
-	}
-
--- a/bluetoothengine/btui/aif/BTUI_caption.rss	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Caption RSS file for creating the aif file for BTUI.
-*
-*/
-
-
-#include "btui.loc"
-#include <apcaptionfile.rh>
-
-RESOURCE CAPTION_DATA
-    {
-    caption      = qtn_apps_bluetooth_list;
-    shortcaption = qtn_apps_bluetooth_grid;
-    }
-
-
-// End of File
--- a/bluetoothengine/btui/aif/BTUIaif.rss	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*     RSS for creating the aif file for BTUI.
-*
-*/
-
-
-#include <aiftool.rh>
-
-RESOURCE AIF_DATA
-{
-    app_uid=0x10005951; // Application UID
-    num_icons=2;        // Grid and list icons with masks
-}
-
-// End of File
--- a/bluetoothengine/btui/btcpplugin/btcpplugin.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btui/btcpplugin/btcpplugin.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
  * All rights reserved.
  * This component and the accompanying materials are made available
  * under the terms of "Eclipse Public License v1.0"
@@ -18,7 +18,6 @@
 
 #include <cpsettingformentryitemdataimpl.h>
 #include "btcpplugin.h"
-#include "btcpuimainview.h"
 #include "btcpuisettingitem.h"
 
 /*!
@@ -42,7 +41,7 @@
 {
     
     return QList<CpSettingFormItemData*> () << new BtCpUiSettingItem(
-            itemDataHelper, tr("Bluetooth"));
+            itemDataHelper);
 
 }
 
--- a/bluetoothengine/btui/btcpplugin/btcpplugin.h	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btui/btcpplugin/btcpplugin.h	Mon Jul 12 18:51:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
  * All rights reserved.
  * This component and the accompanying materials are made available
  * under the terms of "Eclipse Public License v1.0"
--- a/bluetoothengine/btui/btcpplugin/btcpplugin.pro	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btui/btcpplugin/btcpplugin.pro	Mon Jul 12 18:51:05 2010 +0300
@@ -19,39 +19,49 @@
 DEPENDPATH += .
 INCLUDEPATH += . ../inc/
 
-
 CONFIG += qt hb plugin
 LIBS += -lcpframework -lbtuimodel -lbtuidelegate
 
 MOC_DIR = moc
 OBJECTS_DIR = obj
 
-#TRANSLATIONS = telephone_cp.ts
+TRANSLATIONS += btviews.ts \
+                btdialogs.ts \
+                btindimenu.ts
 RESOURCES += btcpplugin.qrc
 
 # Input
-HEADERS += btcpplugin.h \
-           btcpuibaseview.h \
-           btcpuimainview.h \
-           btcpuisearchview.h \
-	   btcpuideviceview.h \
-           btcpuisettingitem.h \
-           btuiviewutil.h 
-
-SOURCES += btcpplugin.cpp \
-           btcpuibaseview.cpp \
-           btcpuimainview.cpp \
-           btcpuisearchview.cpp \
-	   btcpuideviceview.cpp \
-           btcpuisettingitem.cpp
-           
-symbian: {
+HEADERS += btcpuidevicedetailsview.h\
+	btcpuimainlistviewitem.h \
+	btcpuisearchlistviewitem.h \
+    btcpplugin.h \
+    btcpuibaseview.h \
+    btcpuimainview.h \
+    btcpuisearchview.h \
+    btcpuideviceview.h \
+    btcpuisettingitem.h \
+    btuiviewutil.h \
+    btcpuidevicedetail.h
+SOURCES += btcpuidevicedetailsview.cpp \
+	btcpuimainlistviewitem.cpp \
+	btcpuisearchlistviewitem.cpp \
+    btcpplugin.cpp \
+    btcpuibaseview.cpp \
+    btcpuimainview.cpp \
+    btcpuisearchview.cpp \
+    btcpuideviceview.cpp \
+    btcpuisettingitem.cpp \
+    btcpuidevicedetail.cpp
+symbian: { 
     DEFINES += PLUGINUID3=0x2002434E
     TARGET.UID3 = 0x2002434E
     TARGET.CAPABILITY = ALL -TCB
     
     TARGET.EPOCALLOWDLLDATA = 1  
 	INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE
+	
+    LIBS += -lbtdevice \
+    		-lbtdevsettingframework
     
 	PLUGIN_STUB_PATH = /resource/qt/plugins/controlpanel
 	
--- a/bluetoothengine/btui/btcpplugin/btcpplugin.qrc	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btui/btcpplugin/btcpplugin.qrc	Mon Jul 12 18:51:05 2010 +0300
@@ -18,10 +18,9 @@
         <file>icons/qgn_prop_bt_printer.svg</file>
         <file>icons/qgn_prop_bt_unknown.svg</file>
         <file>icons/qgn_frwidget_add_friend_photo.svg</file>
-    </qresource>
-    <qresource prefix="/" >
         <file>docml/bt-main-view.docml</file>
         <file>docml/bt-search-view.docml</file>
         <file>docml/bt-device-view.docml</file>
+        <file>docml/bt-device-details-view.docml</file>
     </qresource>
 </RCC>
--- a/bluetoothengine/btui/btcpplugin/btcpuibaseview.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btui/btcpplugin/btcpuibaseview.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -1,39 +1,45 @@
 /*
-* ============================================================================
-*  Name        : btcpuibaseclass.cpp
-*  Part of     : BluetoothUI / btapplication       *** Info from the SWAD
-*  Description : Implements the baseclass for all views in btapplication.
-*
-*  Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies).
-*  All rights reserved.
-*  This component and the accompanying materials are made available
-*  under the terms of "Eclipse Public License v1.0"
-*  which accompanies this distribution, and is available
-*  at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-*  Initial Contributors:
-*  Nokia Corporation - initial contribution.
-*
-*  Contributors:
-*  Nokia Corporation
-* ============================================================================
-* Template version: 4.1
-*/
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0""
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ *
+ */
 
 #include "btcpuibaseview.h"
 #include <hbaction.h>
 
 /*!
-    Constructor.
+    This constructor constructs new setting and device models.
+ */
+BtCpUiBaseView::BtCpUiBaseView(QGraphicsItem *parent )
+    :CpBaseSettingView( 0 , parent )
+{
+    mSettingModel = new BtSettingModel(this);
+    mDeviceModel = new BtDeviceModel(this);
+}
+
+/*!
+    This constructor constructs models from the given setting and device models.
+    This implies the model impl and data structure is shared.
  */
 BtCpUiBaseView::BtCpUiBaseView(
         BtSettingModel &settingModel, 
         BtDeviceModel &deviceModel, 
         QGraphicsItem *parent )
-    :CpBaseSettingView( 0 , parent ), 
-     mSettingModel( &settingModel ),
-     mDeviceModel( &deviceModel )
+    :CpBaseSettingView( 0 , parent )
 {
+    mSettingModel = new BtSettingModel(settingModel, this);
+    mDeviceModel = new BtDeviceModel(deviceModel, this);    
 }
 
 /*!
--- a/bluetoothengine/btui/btcpplugin/btcpuibaseview.h	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btui/btcpplugin/btcpuibaseview.h	Mon Jul 12 18:51:05 2010 +0300
@@ -1,24 +1,19 @@
 /*
-* ============================================================================
-*  Name        : btcpuibaseview.h
-*  Part of     : BluetoothUI / btapplication       *** Info from the SWAD
-*  Description : Declaration of the baseclass for all views in btapplication.
-*
-*  Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies).
-*  All rights reserved.
-*  This component and the accompanying materials are made available
-*  under the terms of "Eclipse Public License v1.0"
-*  which accompanies this distribution, and is available
-*  at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-*  Initial Contributors:
-*  Nokia Corporation - initial contribution.
-*
-*  Contributors:
-*  Nokia Corporation
-* ============================================================================
-* Template version: 4.2
-*/
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0""
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ *
+ */
 
 #ifndef BTCPUIBASEVIEW_H
 #define BTCPUIBASEVIEW_H
@@ -41,13 +36,15 @@
 public:
     
     virtual ~BtCpUiBaseView();
-    virtual void activateView( const QVariant& value, int cmdId ) = 0;
+    virtual void activateView( const QVariant& value, bool fromBackButton ) = 0;
     virtual void deactivateView() = 0;    
     virtual void switchToPreviousView() = 0;
     
 signals:
 
 protected:
+    explicit BtCpUiBaseView(QGraphicsItem *parent = 0);
+    
     explicit BtCpUiBaseView( 
             BtSettingModel &settingModel, 
             BtDeviceModel &deviceModel, 
@@ -60,10 +57,10 @@
     
 protected:
     
-    // do not owned
+    // owned
     BtSettingModel *mSettingModel;
     
-    //do not owned
+    // owned
     BtDeviceModel *mDeviceModel;
     
     QGraphicsItem *mParent;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/btui/btcpplugin/btcpuidevicedetail.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,206 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0""
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ *
+ */
+
+#include "btcpuidevicedetail.h"
+#include "btcpuideviceview.h"
+#include "btcpuidevicedetailsview.h"
+
+#include <btdevsettingpluginloader.h>
+#include <bluetoothuitrace.h>
+#include <HbInstance>
+
+BtCpUiDeviceDetail::BtCpUiDeviceDetail(QObject *parent) :
+    QObject(parent), mDeviceDetailView(0)
+{
+    mMainWindow = hbInstance->allMainWindows().first();
+}
+
+BtCpUiDeviceDetail::~BtCpUiDeviceDetail()
+{
+    notifyViewStatusToPlugins(AboutToClose);
+    clearDeviceDetailList();
+    delete mDeviceDetailView;
+}
+
+void BtCpUiDeviceDetail::loadDeviceDetailPlugins(QString deviceAddress, QString deviceName)
+{
+    QList<BtDevSettingInterface*> interfaces;
+    BtAbstractDevSetting *devSetting;
+    
+    clearDeviceDetailList();
+    interfaces = BtDevSettingPluginLoader::loadDevSettingInterfaces();
+    QList<BtDevSettingInterface*>::const_iterator i;
+    
+    for (i = interfaces.constBegin(); i != interfaces.constEnd(); ++i) {
+        devSetting = 0;
+        devSetting = (*i)->createDevSetting( deviceAddress );
+        if(devSetting) {
+            appendDeviceToList(devSetting);
+        }
+    }
+
+    for (int i = interfaces.count() - 1; i >= 0; --i ) {
+        delete interfaces.at(i);
+    }
+    
+    notifyDeviceDetailStatus();
+    createDeviceDetailsView(deviceName);
+}
+
+void BtCpUiDeviceDetail::appendDeviceToList(BtAbstractDevSetting *devSetting)
+{
+    bool ret = false;
+    BtDeviceDetails devicedetails;
+    devicedetails.mSetting = 0;
+    devicedetails.mSettingForm = 0;
+    devicedetails.mSettingAvailable = false;
+    
+    devicedetails.mSetting = devSetting;
+    devicedetails.mSettingAvailable = devSetting->isSettingAvailable();
+    devicedetails.mSettingForm = devSetting->getSettingWidget();
+    
+    mDeviceDetailList.append(devicedetails);
+    
+    ret = connect(devicedetails.mSetting, SIGNAL(settingAvailabilityChanged(BtAbstractDevSetting *, bool)),
+            this, SLOT(handleSettingChange(BtAbstractDevSetting *, bool)));
+    BTUI_ASSERT_X( ret, "BtCpUiDeviceDetail::appendDeviceToList", "connect settingAvailabilityChanged() failed");
+
+}
+
+void BtCpUiDeviceDetail::handleSettingChange(BtAbstractDevSetting *setting, bool available)
+{
+    QList<BtDeviceDetails>::iterator i;
+    for (i = mDeviceDetailList.begin(); i != mDeviceDetailList.end(); ++i) {
+        if((setting == (*i).mSetting) && mDeviceDetailView) {
+            (*i).mSettingAvailable = available;
+            if(available) {
+                if(((*i).mSettingForm)) {
+                    //If item already exists, remove it first.
+                    mDeviceDetailView->removeItem((*i).mSettingForm);
+                }
+                (*i).mSettingForm = setting->getSettingWidget();
+                //add widget
+                mDeviceDetailView->addItem((*i).mSettingForm);
+            }
+            else {
+                if((*i).mSettingForm) {
+                    //remove widget
+                    //todo: In case if no items are there close this view
+                    //and disable device settings button.
+                    mDeviceDetailView->removeItem((*i).mSettingForm);
+                    (*i).mSettingForm = 0; 
+                }
+            }
+            notifyDeviceDetailStatus();
+        }
+    }
+}
+
+
+void BtCpUiDeviceDetail::notifyDeviceDetailStatus()
+{
+    QList<BtDeviceDetails>::const_iterator i;
+    bool devicedetail = false;
+    
+    for (i = mDeviceDetailList.constBegin(); i != mDeviceDetailList.constEnd(); ++i) {
+        if(((*i).mSettingAvailable == true) && ((*i).mSettingForm) ) {
+            devicedetail = true;
+            break;
+        }
+    }
+    emit deviceSettingsChanged(devicedetail);
+}
+
+void BtCpUiDeviceDetail::clearDeviceDetailList()
+{
+    QList<BtDeviceDetails>::const_iterator i;
+    
+    for (i = mDeviceDetailList.constBegin(); i != mDeviceDetailList.constEnd(); ++i) {
+        if((*i).mSetting ) {
+            disconnect((*i).mSetting);
+            delete (*i).mSetting;
+        }
+    }
+    mDeviceDetailList.clear();
+}
+
+void BtCpUiDeviceDetail::createDeviceDetailsView(QString deviceName)
+{
+    bool ret = false;
+    //Launch Device Detail View.
+    mDeviceDetailView = new BtCpUiDeviceDetailsView();
+    mDeviceDetailView->setDeviceName(deviceName);
+    
+    ret = connect(mDeviceDetailView, SIGNAL(aboutToClose()), this,
+            SLOT(handleDeviceDetailViewClose()));
+    BTUI_ASSERT_X( ret, "BtCpUiDeviceDetail::loadDeviceDetailsView", "connect deviceDetailViewClosed() failed");
+
+    QList<BtDeviceDetails>::const_iterator i;
+    
+    for (i = mDeviceDetailList.constBegin(); i != mDeviceDetailList.constEnd(); ++i) {
+        if((*i).mSettingForm) {
+            mDeviceDetailView->addItem((*i).mSettingForm);
+        }
+    }
+
+}
+
+void BtCpUiDeviceDetail::loadDeviceDetailsView()
+{
+
+    mPreviousView = mMainWindow->currentView();
+    mMainWindow->addView(mDeviceDetailView);
+    
+    notifyViewStatusToPlugins(AboutToShow);
+    
+    mMainWindow->setCurrentView( mDeviceDetailView );
+}
+
+void BtCpUiDeviceDetail::handleDeviceDetailViewClose()
+{
+    notifyViewStatusToPlugins(AboutToHide);
+    
+    mMainWindow->removeView(mDeviceDetailView);
+    
+    mMainWindow->setCurrentView( mPreviousView );
+
+}
+
+void BtCpUiDeviceDetail::notifyViewStatusToPlugins(BtCpUiDeviceDetail::NotifyType type)
+{
+    QList<BtDeviceDetails>::const_iterator i;
+    BtAbstractDevSetting *deviceSetting = 0;
+    for (i = mDeviceDetailList.constBegin(); i != mDeviceDetailList.constEnd(); ++i) {
+        deviceSetting = (*i).mSetting;
+        if(deviceSetting) {
+            switch(type) {
+                case AboutToShow:
+                    deviceSetting->aboutToForeground();
+                    break;
+                case AboutToHide:
+                    deviceSetting->aboutToBackground();
+                    break;
+                case AboutToClose:
+                    deviceSetting->aboutToClose();
+                    break;
+            }
+        }
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/btui/btcpplugin/btcpuidevicedetail.h	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0""
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ *
+ */
+
+#ifndef BTCPUIDEVICEDETAIL_H
+#define BTCPUIDEVICEDETAIL_H
+
+#include <qobject.h>
+#include <btdevsettinginterface.h>
+#include <HbView>
+
+class BtCpUiDeviceView;
+class BtCpUiDeviceDetailsView;
+
+class BtDeviceDetails
+{
+public:
+    BtAbstractDevSetting *mSetting;
+    bool mSettingAvailable;
+    HbDataForm *mSettingForm;
+};
+
+
+class BtCpUiDeviceDetail : public QObject
+{
+    Q_OBJECT
+    
+public:
+    explicit BtCpUiDeviceDetail( QObject *parent = 0 );
+    
+    virtual ~BtCpUiDeviceDetail();
+    
+    void loadDeviceDetailPlugins(QString deviceAddress, QString deviceName);
+        
+    void loadDeviceDetailsView();
+        
+signals:
+    void deviceSettingsChanged(bool settingAvailable);
+    
+public slots:
+    void handleSettingChange(BtAbstractDevSetting *setting, bool available);
+    void handleDeviceDetailViewClose();
+    
+private:
+    enum NotifyType {
+        AboutToShow,
+        AboutToHide,
+        AboutToClose,
+    };
+
+    void appendDeviceToList(BtAbstractDevSetting *devSetting);
+    void clearDeviceDetailList();
+    void notifyDeviceDetailStatus();
+    void createDeviceDetailsView(QString deviceName);
+    void notifyViewStatusToPlugins(BtCpUiDeviceDetail::NotifyType type);
+    
+private:
+    
+    HbMainWindow* mMainWindow;
+    QList<BtDeviceDetails> mDeviceDetailList;
+    BtCpUiDeviceDetailsView* mDeviceDetailView;
+    HbView *mPreviousView;
+    
+};
+
+
+#endif /* BTCPUIDEVICEDETAIL_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/btui/btcpplugin/btcpuidevicedetailsview.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,94 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  BtCpUiDeviceDetailsView implementation
+*
+*/
+#include <QtGlobal>
+#include <QGraphicsLinearLayout>
+#include <HbInstance>
+#include <hblabel.h>
+#include <hbmenu.h>
+#include <hbaction.h>
+#include <hbcombobox.h>
+#include <hbgroupbox.h>
+#include <bluetoothuitrace.h>
+#include "btcpuidevicedetailsview.h"
+
+// docml to load
+const char* BTUI_DEVICEDETAILSVIEW_DOCML = ":/docml/bt-device-details-view.docml";
+
+BtCpUiDeviceDetailsView::BtCpUiDeviceDetailsView(QGraphicsItem *parent)
+    :CpBaseSettingView( 0 , parent )
+{
+   
+    mSoftKeyBackAction = new HbAction(Hb::BackNaviAction, this);
+    BTUI_ASSERT_X(mSoftKeyBackAction, "BtCpUiBaseView::BtCpUiBaseView", "can't create back action");
+
+    // Create view for the application.
+    // Set the name for the view. The name should be same as the view's
+    // name in docml.
+    setObjectName("bt_device_details_view");
+
+    mLoader = new HbDocumentLoader();
+    // Pass the view to documentloader. Document loader uses this view
+    // when docml is parsed, instead of creating new view.
+    QObjectList objectList;
+    objectList.append(this);
+    mLoader->setObjectTree(objectList);
+
+    // read view info from docml file
+    bool ok = false;
+    mLoader->load( BTUI_DEVICEDETAILSVIEW_DOCML, &ok );
+    // Exit if the file format is invalid
+    BTUI_ASSERT_X( ok, "bt-device-details-view", "Invalid docml file" );
+    
+    mLayout = new QGraphicsLinearLayout(Qt::Vertical, this);
+    mGroupBox = new HbGroupBox();
+    mLayout->addItem(mGroupBox);
+    
+    setLayout( mLayout );
+
+}
+
+BtCpUiDeviceDetailsView::~BtCpUiDeviceDetailsView()
+{
+
+}
+
+void BtCpUiDeviceDetailsView::setDeviceName(const QString &deviceName)
+{
+    //todo: use Localised string Id.
+    QString heading(hbTrId("%1 details"));
+    
+    if(mGroupBox) {
+        mGroupBox->setHeading(heading.arg(deviceName));
+    }
+}
+
+void BtCpUiDeviceDetailsView::addItem(HbDataForm *item)
+{
+    if (item && mLayout) {
+        mLayout->addItem(item);
+    }    
+}
+
+void BtCpUiDeviceDetailsView::removeItem(HbDataForm *item)
+{
+    if (item && mLayout) {
+        //todo: with out this item is not removed from the view.
+        item->setVisible(false);
+        mLayout->removeItem(item);
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/btui/btcpplugin/btcpuidevicedetailsview.h	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,53 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  BtCpUiDeviceDetailsView declaration
+*/
+
+#ifndef BTCPUIDEVICEDETAILSVIEW_H_
+#define BTCPUIDEVICEDETAILSVIEW_H_
+
+#include <hbview.h>
+#include <qglobal.h>
+#include <hbdataform.h>
+#include <hbgroupbox.h>
+#include <hbdocumentloader.h>
+#include <cpbasesettingview.h>
+#include <QGraphicsLinearLayout>
+
+class BtCpUiDeviceDetailsView : public CpBaseSettingView
+{
+    Q_OBJECT
+
+public:
+    
+    explicit BtCpUiDeviceDetailsView(QGraphicsItem *parent = 0);
+    
+    virtual ~BtCpUiDeviceDetailsView();
+
+    void setDeviceName(const QString &deviceName);
+    void addItem(HbDataForm *item);
+    void removeItem(HbDataForm *item);
+
+    
+protected:
+    HbDocumentLoader *mLoader;
+    HbAction        *mSoftKeyBackAction;
+
+    QGraphicsLinearLayout *mLayout;
+    HbGroupBox      *mGroupBox;
+    
+    Q_DISABLE_COPY(BtCpUiDeviceDetailsView)
+};
+
+#endif /* BTCPUIDEVICEDETAILSVIEW_H_ */
--- a/bluetoothengine/btui/btcpplugin/btcpuideviceview.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btui/btcpplugin/btcpuideviceview.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
  * All rights reserved.
  * This component and the accompanying materials are made available
  * under the terms of "Eclipse Public License v1.0""
@@ -21,10 +21,13 @@
 #include <HbInstance>
 #include <hbdocumentloader.h>
 #include <hbdataform.h>
+#include <hbdataformmodel.h>
+#include <hbdataformmodelitem.h>
 #include <hbgroupbox.h>
 #include <hbpushbutton.h>
 #include <hblabel.h>
-#include <hbtextedit.h>
+#include <hbicon.h>
+#include <hblineedit.h>
 #include <hblistview.h>
 #include <hbmenu.h>
 #include <qstring>
@@ -35,6 +38,10 @@
 #include <btabstractdelegate.h>
 #include <btdelegatefactory.h>
 #include <QModelIndex>
+#include "btuiiconutil.h"
+#include "btuidevtypemap.h"
+
+#include "btcpuidevicedetail.h"
 
 // docml to load
 const char* BTUI_DEVICEVIEW_DOCML = ":/docml/bt-device-view.docml";
@@ -45,7 +52,8 @@
         BtDeviceModel &deviceModel, 
         QGraphicsItem *parent) :
     BtCpUiBaseView(settingModel,deviceModel,parent),
-    mPairStatus(false), mConnectStatus(false), mConnectable(false), mAbstractDelegate(0)   
+    mPairedStatus(false), mConnectedStatus(false), mTrustedStatus(false), mBlockedStatus(false), 
+    mConnectable(false), mAbstractDelegate(0), mDeviceDetail(0)   
 {
     mDeviceIndex = QModelIndex();//is it needed to initialize mIndex???
     
@@ -63,11 +71,11 @@
     // name in docml.
     setObjectName("bt_device_view");
 
+    mLoader = new HbDocumentLoader();
+    // Pass the view to documentloader. Document loader uses this view
+    // when docml is parsed, instead of creating new view.
     QObjectList objectList;
     objectList.append(this);
-    // Pass the view to documentloader. Document loader uses this view
-    // when docml is parsed, instead of creating new view.
-    mLoader = new HbDocumentLoader();
     mLoader->setObjectTree(objectList);
     
     bool ret = false;
@@ -77,23 +85,36 @@
     // Exit if the file format is invalid
     BTUI_ASSERT_X( ok, "bt-device-view", "Invalid docml file" );
     
-    // Set title for the control panel
-    // ToDo:  check if deprecated API
-    setTitle("Control Panel");
+    mOrientation = mMainWindow->orientation();
+        
+    if (mOrientation == Qt::Horizontal) {
+        mLoader->load(BTUI_DEVICEVIEW_DOCML, "landscape", &ok);
+        BTUI_ASSERT_X( ok, "bt-device-view", "Invalid docml file: landscape section problem" );
+    }
+    else {
+        mLoader->load(BTUI_DEVICEVIEW_DOCML, "portrait", &ok);
+        BTUI_ASSERT_X( ok, "bt-device-view", "Invalid docml file: landscape section problem" );        
+    }
+    
+    // listen for orientation changes
+    ret = connect(mMainWindow, SIGNAL(orientationChanged(Qt::Orientation)),
+            this, SLOT(changeOrientation(Qt::Orientation)));
+    BTUI_ASSERT_X( ret, "BtCpUiDeviceView::BtCpUiDeviceView()", "connect orientationChanged() failed");
 
+    
     // assign automatically created widgets to local variables
-    
+    /*
     mGroupBox = 0;
     mGroupBox = qobject_cast<HbGroupBox *>( mLoader->findWidget( "groupBox_deviceView" ) );
     BTUI_ASSERT_X( mGroupBox != 0, "bt-device-view", "Device groupbox not found" );
-    
+    */
     mDeviceIcon=0;
     //can't use qobject_cast since HbIcon is not derived from QObject!
     mDeviceIcon = qobject_cast<HbLabel *>( mLoader->findWidget( "deviceIcon" ) );  
     BTUI_ASSERT_X( mDeviceIcon != 0, "bt-device-view", "Device Icon not found" );
     
     mDeviceName=0;
-    mDeviceName = qobject_cast<HbTextEdit *>( mLoader->findWidget( "deviceName" ) );
+    mDeviceName = qobject_cast<HbLineEdit *>( mLoader->findWidget( "deviceName" ) );
     BTUI_ASSERT_X( mDeviceName != 0, "bt-device-view", "Device Name not found" );
     ret = connect(mDeviceName, SIGNAL(editingFinished ()), this, SLOT(changeBtDeviceName()));
     
@@ -105,6 +126,13 @@
     mDeviceStatus = qobject_cast<HbLabel *>( mLoader->findWidget( "deviceStatus" ) );  
     BTUI_ASSERT_X( mDeviceStatus != 0, "bt-device-view", "Device status not found" );
     
+    
+    mConnectionCombobox = 0;
+    mConnectionCombobox = qobject_cast<HbDataForm *>( mLoader->findWidget( "connectionCombobox" ) );
+    BTUI_ASSERT_X( mConnectionCombobox != 0, "bt-device-view", "connection combobox not found" );
+    
+    mConnectionComboboxModel = new HbDataFormModel();
+    
     mPair_Unpair=0;
     mPair_Unpair = qobject_cast<HbPushButton *>( mLoader->findWidget( "pushButton_0" ) );
     BTUI_ASSERT_X( mPair_Unpair != 0, "bt-device-view", "pair/unpair button not found" );
@@ -120,19 +148,22 @@
     mDeviceSetting = 0;
     mDeviceSetting = qobject_cast<HbPushButton *>( mLoader->findWidget( "pushButton_2" ) );
     BTUI_ASSERT_X( mDeviceSetting != 0, "bt-device-view", "settings button not found" );
-        
-    // read landscape orientation section from docml file if needed
-    // mOrientation = ((BTUIViewManager*)parent)->orientation();
-    mOrientation = Qt::Vertical;
-    if (mOrientation == Qt::Horizontal) {
-        mLoader->load(BTUI_DEVICEVIEW_DOCML, "landscape", &ok);
-        BTUI_ASSERT_X( ok, "bt-device-view", "Invalid docml file: landscape section problem" );
-    }
- 
+    
+    
+    ret = connect(mDeviceSetting, SIGNAL(clicked()), this,
+            SLOT(handleDeviceSetting()));
+    BTUI_ASSERT_X( ret, "Btui, BtCpUiDeviceView::BtCpUiDeviceView", "clicked() connect failed");
+
+    setConnectionCombobox();
+     
 }
 
 BtCpUiDeviceView::~BtCpUiDeviceView()
 {
+    delete mLoader; // Also deletes all widgets that it constructed.
+    
+    delete mConnectionComboboxModel;
+    
     setNavigationAction(0);
     delete mSoftKeyBackAction;
     if(mAbstractDelegate)
@@ -140,6 +171,7 @@
         delete mAbstractDelegate;
         mAbstractDelegate = 0;
     }
+
 }
 
 
@@ -155,11 +187,13 @@
 {
     BTUI_ASSERT_X(mMainView, "BtCpUiSearchView::switchToPreviousView", "invalid mMainView");
     mMainView->switchToPreviousView();
+    delete mDeviceDetail;
+    mDeviceDetail = 0;
 }
 
-void BtCpUiDeviceView::activateView( const QVariant& value, int cmdId )
+void BtCpUiDeviceView::activateView( const QVariant& value, bool fromBackButton )
 {
-    Q_UNUSED(cmdId);  
+    Q_UNUSED( fromBackButton );  
     
     setSoftkeyBack();
     
@@ -167,36 +201,74 @@
     mDeviceBdAddr = (mDeviceModel->data(index, BtDeviceModel::ReadableBdaddrRole));
     
     //activate view is called when device is selected
-    clearViewData();
+    //clearViewData();
     updateDeviceData();
     
+    mDeviceSetting->setVisible(false);
+    
+    mDeviceDetail = new BtCpUiDeviceDetail();
+    
     bool ret(false);
     ret=connect(mDeviceModel, SIGNAL(dataChanged(QModelIndex,QModelIndex)),
            this, SLOT(updateDeviceData()));
     BTUI_ASSERT_X( ret, "Btui, BtCpUiDeviceView::activateView", "dataChanged() connect failed");
+
+    ret=connect(mDeviceDetail, SIGNAL(deviceSettingsChanged(bool)),
+           this, SLOT(handleDeviceSettingsChange(bool)));
+    BTUI_ASSERT_X( ret, "Btui, BtCpUiDeviceView::activateView", "deviceSettingsChanged() connect failed");
+
+    
+    mDeviceDetail->loadDeviceDetailPlugins(mDeviceBdAddr.toString(), mDeviceName->text());
+    
+}
+
+void BtCpUiDeviceView::handleDeviceSettingsChange(bool status)
+{
+    mDeviceSetting->setVisible(status);        
+}
+
+void BtCpUiDeviceView::handleDeviceSetting()
+{
+    mDeviceDetail->loadDeviceDetailsView();
 }
 
 void BtCpUiDeviceView::deactivateView()
 {
 }
 
+// called due to real orientation change event coming from main window
+void BtCpUiDeviceView::changeOrientation( Qt::Orientation orientation )
+{
+    bool ok = false;
+    mOrientation = orientation;
+    if( orientation == Qt::Vertical ) {
+        // load "portrait" section
+        mLoader->load( BTUI_DEVICEVIEW_DOCML, "portrait", &ok );
+        BTUI_ASSERT_X( ok, "bt-device-view", "Invalid docml file: portrait section problem" );
+    } else {
+        // load "landscape" section
+        mLoader->load( BTUI_DEVICEVIEW_DOCML, "landscape", &ok );
+        BTUI_ASSERT_X( ok, "bt-device-view", "Invalid docml file: landscape section problem" );
+    }
+}
+
 void BtCpUiDeviceView::clearViewData()
 {
     mDeviceIcon->clear();
     mDeviceCategory->clear();
     mDeviceStatus->clear();
     
-    mPairStatus = false;
-    mConnectStatus = false;
+    mPairedStatus = false;
+    mConnectedStatus = false;
+    mTrustedStatus = false;
+    mBlockedStatus = false;
+    
     mConnectable = false;
 }
     
 void BtCpUiDeviceView::updateDeviceData()
 {
-    QModelIndex localIndex = mSettingModel->index( BtSettingModel::LocalBtNameRow, 0);
-    QString localName = (mSettingModel->data(localIndex,BtSettingModel::settingDisplayRole)).toString();
-    QString groupBoxTitle (tr("Bluetooth-"));
-    mGroupBox->setHeading(groupBoxTitle.append(localName));
+    clearViewData();
     //Get the QModelIndex of the device using the device BDAddres
     QModelIndex start = mDeviceModel->index(0,0);
     QModelIndexList indexList = mDeviceModel->match(start,BtDeviceModel::ReadableBdaddrRole, mDeviceBdAddr);
@@ -205,104 +277,145 @@
     //populate device view with device data fetched from UiModel
     QString deviceName = (mDeviceModel->data(mDeviceIndex, 
              BtDeviceModel::NameAliasRole)).toString(); 
-    mDeviceName->setPlainText(deviceName);
+    mDeviceName->setText(deviceName);
      
     int cod = (mDeviceModel->data(mDeviceIndex,BtDeviceModel::CoDRole)).toInt();
      
     int majorRole = (mDeviceModel->data(mDeviceIndex,BtDeviceModel::MajorPropertyRole)).toInt();
-    int minorRole = (mDeviceModel->data(mDeviceIndex,BtDeviceModel::MinorPropertyRole)).toInt();
     
-	setDeviceCategory(cod, majorRole, minorRole);
+	setDeviceCategory(cod, majorRole);
     setDeviceStatus(majorRole);
     setTextAndVisibilityOfButtons();
 }
 
-void BtCpUiDeviceView::setDeviceCategory(int cod,int majorRole, int minorRole)
+void BtCpUiDeviceView::setDeviceCategory(int cod,int majorRole)
 {
-    //TODO: change the hardcoded numeric value to enumerations
-    if (cod)
-    {
-        if (majorRole & 0x00020000)
-        {
-            //this is a phone
-            mDeviceCategory->setPlainText(tr("Phone"));
-        }
-        else if (majorRole & 0x00010000)
-        {
-            //this is a computer
-            mDeviceCategory->setPlainText(tr("Computer"));
-        
-        }
-        else if (majorRole & 0x00080000)
-        {  
-            //this is a A/V device
-            //int minorRole = (mDeviceModel->data(mIndex,BtDeviceModel::MinorPropertyRole)).toInt();
-            if ( minorRole & 0x00000002)
-            {
-                //this is a Headset, it is possible to connect
-                mConnectable = true;
-                mDeviceCategory->setPlainText(tr("Headset"));
-            }  
-        }
-        else 
-        {
-            mDeviceCategory->setPlainText(tr("Uncategorized Dev"));
-        }
-    
-    }
-    
-    
+    mDeviceCategory->setPlainText( getDeviceTypeString( cod ));
+    HbIcon icon =
+    getBadgedDeviceTypeIcon(cod, majorRole,
+                            BtuiBottomLeft | BtuiBottomRight | BtuiTopLeft | BtuiTopRight );
+    mDeviceIcon->setIcon(icon);
+
+    if (majorRole & BtuiDevProperty::Connectable ) {
+        mConnectable = true;
+    } 
 }
+
 void BtCpUiDeviceView::setDeviceStatus(int majorRole)
 {
-    //TODO: change the hardcoded numeric value to enumerations
     QString deviceStatus;
-    if (majorRole & 0x00000001)
-    {
-        deviceStatus = deviceStatus.append(tr("Paired"));
-        mPairStatus = true;
+    
+    updateStatusVariables(majorRole);  // should we use bitmap instead??
+    
+    if (majorRole & BtuiDevProperty::Bonded && 
+        majorRole & BtuiDevProperty::Trusted &&
+        majorRole & BtuiDevProperty::Connected ) {
+        mDeviceStatus->setPlainText(hbTrId("txt_bt_info_paired_trused_connected"));
+    } 
+    else if (majorRole & BtuiDevProperty::Bonded && 
+             majorRole & BtuiDevProperty::Connected ) {
+        mDeviceStatus->setPlainText(hbTrId("txt_bt_info_paired_connected"));
     }
-    else
-    {
-        mPairStatus = false;
+    else if (majorRole & BtuiDevProperty::Bonded && 
+             majorRole & BtuiDevProperty::Trusted ) {
+        mDeviceStatus->setPlainText(hbTrId("txt_bt_info_paired_trusted"));
+    } 
+    else if (majorRole & BtuiDevProperty::Bonded) {
+        mDeviceStatus->setPlainText(hbTrId("txt_bt_info_paired"));
+    }
+    else if (majorRole & BtuiDevProperty::Connected) {
+        mDeviceStatus->setPlainText(hbTrId("txt_bt_info_connected"));
     }
+    else if (majorRole & BtuiDevProperty::Blocked) {
+        mDeviceStatus->setPlainText(hbTrId("txt_bt_info_blocked"));
+    }
+    else {
+        // device not paired, connected, trusted or blocked.  is this ok?
+    }
+
+}
+
+void BtCpUiDeviceView::setConnectionCombobox(){
+    
+    //create a model class
     
-    if ((majorRole & 0x00000020)&& (mConnectable))
-    {
-        //if the device is connected and it is a headset NOTE! two phone can be paired but not be connected
-        deviceStatus = deviceStatus.append(tr(", connected"));
-        mConnectStatus = true;
+    mConnectionComboboxModel->appendDataFormItem(
+    HbDataFormModelItem::ComboBoxItem, QString("Connection"), mConnectionComboboxModel->invisibleRootItem());
+    
+    //set the model to the view, once model and data class are created
+    mConnectionCombobox->setModel(mConnectionComboboxModel);
+
+
+
+}
+
+
+/*!
+ *  instead of using separate boolean variables we could use bitmap in single variable
+ */
+void BtCpUiDeviceView::updateStatusVariables(int majorRole)
+{
+    if (majorRole & BtuiDevProperty::Trusted ) {
+        mTrustedStatus = true;
+    } 
+    else {
+        mTrustedStatus = false;
     }
-    else 
-    {
-        mConnectStatus = false;
+    if (majorRole & BtuiDevProperty::Bonded) {
+        mPairedStatus = true;
+    }
+    else {
+        mPairedStatus = false;
+    }
+    if (majorRole & BtuiDevProperty::Connected) {
+        mConnectedStatus = true;
     }
-    mDeviceStatus->setPlainText(deviceStatus);
-    
-    
-    
+    else {
+        mConnectedStatus = false;
+    }
+    if (majorRole & BtuiDevProperty::Blocked) {
+        mBlockedStatus = true;
+    }
+    else {
+        mBlockedStatus = false;
+    }
 }
 
 void BtCpUiDeviceView::setTextAndVisibilityOfButtons()
 {
-    if (mPairStatus)
+    mPair_Unpair->setStretched(true);
+    if (mPairedStatus)
     {
-        mPair_Unpair->setText(tr("Unpair"));
+        HbIcon icon("qtg_mono_bt_unpair");
+        icon.setIconName("qtg_mono_bt_unpair");
+        mPair_Unpair->setIcon(icon);
+        mPair_Unpair->setText(hbTrId("txt_bt_button_unpair"));
+				
     }
     else
     {
-        mPair_Unpair->setText(tr("Pair"));
+        HbIcon icon("qtg_mono_bt_pair");
+        icon.setIconName("qtg_mono_bt_pair");
+        mPair_Unpair->setIcon(icon);
+        mPair_Unpair->setText(hbTrId("txt_bt_button_pair"));
     }
     
     if (mConnectable)
     {
-        if (mConnectStatus)
+        mConnect_Disconnect->setStretched(true);
+        if (mConnectedStatus)
         {
-            mConnect_Disconnect->setText(tr("Disconnect"));
+            HbIcon icon("qtg_mono_speaker_off");
+            icon.setIconName("qtg_mono_speaker_off");
+            mConnect_Disconnect->setIcon(icon);
+            mConnect_Disconnect->setText(hbTrId("txt_bt_button_disconnect"));
         }
         else
         {
-            mConnect_Disconnect->setText(tr("Connect"));
+            HbIcon icon("qtg_mono_speaker");
+            icon.setIconName("qtg_mono_speaker");
+            mConnect_Disconnect->setIcon(icon);
+            mConnect_Disconnect->setText(hbTrId("txt_bt_button_connect"));
         }
         
     }
@@ -312,26 +425,12 @@
         mConnect_Disconnect->setVisible(false);
     }
     
-    mDeviceSetting->setVisible(false);
-
 }
 
-void BtCpUiDeviceView::changeBtDeviceName()
-{
-    /*
-    if (!mAbstractDelegate) 
-    {
-        mAbstractDelegate = BtDelegateFactory::newDelegate(BtDelegate::DeviceName, mModel); 
-        connect( mAbstractDelegate, SIGNAL(commandCompleted(int,QVariant)), this, SLOT(btNameDelegateCompleted(int,QVariant)) );
-        mAbstractDelegate->exec(mDeviceNameEdit->text ());
-    }
-    */
-    
-}
 
 void BtCpUiDeviceView::pairUnpair()
 {
-    if (mPairStatus)
+    if (mPairedStatus)
     {
         //if the device is paired, call unpairDevice() when the button is tabbed
         unpairDevice();
@@ -348,7 +447,7 @@
 
 void BtCpUiDeviceView::connectDisconnect()
 {
-    if (mConnectStatus)
+    if (mConnectedStatus)
     {
         //if the device is connected, call disconnectDevice() when the button is tabbed
         disconnectDevice();
@@ -448,8 +547,25 @@
 {
     if (!mAbstractDelegate)//if there is no other delegate running
         { 
+           
+            
+            DisconnectOption discoOpt = ServiceLevel;
+                    
+            QList<QVariant>list;
+            QVariant paramFirst;
+            paramFirst.setValue(mDeviceIndex);
+            
+            QVariant paramSecond;
+            paramSecond.setValue((int)discoOpt);
+                    
+            list.append(paramFirst);
+            list.append(paramSecond);
+                    
             QVariant params;
-            params.setValue(mDeviceIndex);
+            params.setValue(list);
+            
+            
+            //params.setValue(mDeviceIndex);
             mAbstractDelegate = BtDelegateFactory::newDelegate(
                     BtDelegate::Disconnect, mSettingModel, mDeviceModel); 
             connect( mAbstractDelegate, SIGNAL(commandCompleted(int)), this, SLOT(disconnectDelegateCompleted(int)) );
@@ -471,3 +587,48 @@
     
 }
 
+void BtCpUiDeviceView::changeBtDeviceName(){
+    if (!mAbstractDelegate)//if there is no other delegate running
+    { 
+        QList<QVariant>list;
+        
+        QVariant index;
+        index.setValue(mDeviceIndex);
+        
+        QVariant name;
+        name.setValue(mDeviceName->text());
+        
+        list.append(index);
+        list.append(name);
+        
+        QVariant params;
+        params.setValue(list);
+        
+        mAbstractDelegate = BtDelegateFactory::newDelegate(
+                BtDelegate::RemoteDevName, mSettingModel, mDeviceModel); 
+        connect( mAbstractDelegate, SIGNAL(commandCompleted(int, QVariant)), this, SLOT(changeDevNameDelegateCompleted(int, QVariant)) );
+        mAbstractDelegate->exec(params);
+    }
+    
+}
+
+void BtCpUiDeviceView::changeDevNameDelegateCompleted(int status, QVariant param)
+{
+    
+    
+    if(KErrNone == status) {
+        mDeviceName->setText(param.toString());
+    }
+    else {
+        //setPrevBtLocalName();
+    }
+    //TODO:Error handling has to be done.    
+    if (mAbstractDelegate)
+    {
+        disconnect(mAbstractDelegate);
+        delete mAbstractDelegate;
+        mAbstractDelegate = 0;
+    }
+    
+    
+}
--- a/bluetoothengine/btui/btcpplugin/btcpuideviceview.h	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btui/btcpplugin/btcpuideviceview.h	Mon Jul 12 18:51:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
  * All rights reserved.
  * This component and the accompanying materials are made available
  * under the terms of "Eclipse Public License v1.0""
@@ -25,16 +25,17 @@
 
 class HbGroupBox;
 class HbLabel;
-class HbTextEdit;
+class HbLineEdit;
 class HbPushButton;
 class HbIcon;
 class HbDocumentLoader;
-class HbListView;
+class HbDataForm;
+
 class HbDataFormModel;
-class HbDataFormModelItem;
+//class HbDataFormModelItem;
 class CpSettingFormItemData;
 class BtAbstractDelegate;
-
+class BtCpUiDeviceDetail;
 
 class BtCpUiDeviceView : public BtCpUiBaseView
 {
@@ -46,13 +47,14 @@
             BtDeviceModel &deviceModel,            
             QGraphicsItem *parent = 0);
     virtual ~BtCpUiDeviceView();
-    virtual void activateView( const QVariant& value, int cmdId );
+    virtual void activateView( const QVariant& value, bool fromBackButton );
     virtual void deactivateView();
     virtual void setSoftkeyBack();
-    
+        
 public slots:
     
     virtual void switchToPreviousView();
+    void changeOrientation( Qt::Orientation orientation );
     void updateDeviceData();
     void changeBtDeviceName();
     void pairUnpair();
@@ -61,25 +63,33 @@
     void unpairDelegateCompleted(int status);
     void connectDelegateCompleted(int status);
     void disconnectDelegateCompleted(int status);
- 
+    void changeDevNameDelegateCompleted(int status, QVariant param);
+    void handleDeviceSetting();
+    void handleDeviceSettingsChange(bool status);
+    
 private:
     void clearViewData();
     void pairDevice();
     void unpairDevice();
     void connectDevice();
     void disconnectDevice();
-    void setDeviceCategory(int cod, int majorRole, int minorRole);//cod:class of device
+    void setDeviceCategory(int cod, int majorRole);//cod:class of device
     void setDeviceStatus(int majorRole);
+    void setConnectionCombobox();
     void setTextAndVisibilityOfButtons();
+    void updateStatusVariables(int majorRole);
 
 private:
     HbDocumentLoader *mLoader;
-    HbGroupBox *mGroupBox;
+    //HbGroupBox *mGroupBox;
     HbLabel *mDeviceIcon;
-    HbTextEdit *mDeviceName;
+    HbLineEdit *mDeviceName;
     HbLabel *mDeviceCategory;
     HbLabel *mDeviceStatus;
     
+    HbDataForm *mConnectionCombobox;
+    HbDataFormModel *mConnectionComboboxModel;
+    
     HbPushButton *mPair_Unpair;
     HbPushButton *mConnect_Disconnect;
     HbPushButton *mDeviceSetting;
@@ -99,17 +109,20 @@
     QVariant mDeviceBdAddr;
     
     //true -> device is paired; false -> device is unpaired
-    bool mPairStatus;
+    bool mPairedStatus;
     
     //true-> device is connected; false -> device is disconnected
-    bool mConnectStatus;
-    
-	//true -> device is connectable
+    bool mConnectedStatus;
+    bool mTrustedStatus;
+    bool mBlockedStatus;
+
+    //true -> device is connectable
     //e.g. not possible to connect to a phone, but possible to connect to a headset
     bool mConnectable;
     
     BtAbstractDelegate* mAbstractDelegate;
 
+    BtCpUiDeviceDetail* mDeviceDetail;
     
 };
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/btui/btcpplugin/btcpuimainlistviewitem.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,114 @@
+/*
+* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  BTUISearchListViewItem implementation
+*
+*/
+
+
+#include "btcpuimainlistviewitem.h"
+#include "btdevicemodel.h"
+#include "btuiiconutil.h"
+#include <QGraphicsGridLayout>
+
+BtCpUiMainListViewItem::BtCpUiMainListViewItem(QGraphicsItem * parent) :
+    HbListViewItem(parent), mParent(parent)
+{
+    mDeviceNameLabel = 0;
+    mDevTypeIconLabel = 0;
+    mDevTypeTextLabel = 0;
+    mBtuiModelSortFilter = ((BtCpUiMainListViewItem *)parent)->mBtuiModelSortFilter;
+    
+    mRow = 0;   
+}
+
+BtCpUiMainListViewItem::~BtCpUiMainListViewItem()
+{
+//    delete mDeviceNameLabel;
+//    delete mDevTypeIconLabel;
+//    delete mDevTypeTextLabel;
+}
+
+/*
+ * This method is called by the HbListView when it needs a new
+ * view item element.
+ *
+ */
+HbAbstractViewItem * BtCpUiMainListViewItem::createItem()
+{
+    return new BtCpUiMainListViewItem(*this); 
+}
+
+/*!
+   UpdateChildItem updates the item graphics.
+   Screen elements are created once if not already done.  This may increase the overall memory 
+   consumption of the application, however, this is deemed inconsequential.  There might be a small 
+   performance improvement with current style.
+ */
+void BtCpUiMainListViewItem::updateChildItems()
+{
+    QModelIndex index;
+    
+    // Get device name from model
+    if (mBtuiModelSortFilter)
+        index = mBtuiModelSortFilter->mapToSource(modelIndex());
+    else
+        index = modelIndex();
+
+    // create new icon label if needed
+    if (!mDevTypeIconLabel) {
+        mDevTypeIconLabel = new HbLabel();
+        mDevTypeIconLabel->setPreferredSize(53.5260, 53.5260); //8un x 8un
+        mDevTypeIconLabel->setMinimumWidth(53.5260);
+    }
+    // create new label if needed
+    if (!mDeviceNameLabel) {
+        mDeviceNameLabel = new HbLabel();
+        mDeviceNameLabel->setPreferredSize(250, 26.763);
+    }
+    // create new label if needed
+    if (!mDevTypeTextLabel) {
+        mDevTypeTextLabel = new HbLabel();
+        mDevTypeTextLabel->setPreferredSize(250, 26.763);
+    }
+    // create layout if needed
+    if ( !mRow ) {
+        // Still need to create the actual layout
+        mRow = new QGraphicsGridLayout();
+        mRow->addItem(mDevTypeIconLabel,0,0,2,1);
+        mRow->addItem(mDeviceNameLabel,0,1,1,1);
+        mRow->addItem(mDevTypeTextLabel,1,1,1,1);
+        setLayout(mRow);
+    }
+        
+    QString data = index.data(Qt::DisplayRole).toString();
+    int cod = (index.data(BtDeviceModel::CoDRole)).toInt();
+    int majorProperty = (index.data(BtDeviceModel::MajorPropertyRole)).toInt();
+    
+    // ToDo:  remove clear() once Orbit bug is fixed
+    mDeviceNameLabel->clear();
+    mDeviceNameLabel->setPlainText(data);
+    mDevTypeIconLabel->clear();
+    mDevTypeTextLabel->clear();
+    mDevTypeTextLabel->setPlainText( getDeviceTypeString( cod ));
+    HbIcon icon = 
+    getBadgedDeviceTypeIcon( cod, majorProperty, 
+            BtuiBottomLeft | BtuiBottomRight | BtuiTopLeft | BtuiTopRight );
+    mDevTypeIconLabel->setIcon(icon);
+}
+
+
+void BtCpUiMainListViewItem::setModelSortFilter(BtuiModelSortFilter *filter)
+{
+    mBtuiModelSortFilter = filter;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/btui/btcpplugin/btcpuimainlistviewitem.h	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,51 @@
+/*
+* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  device view item
+*
+*/
+
+
+#ifndef BTCPUIMAINLISTVIEWITEM_H
+#define BTCPUIMAINLISTVIEWITEM_H
+
+#include <hblistviewitem.h>
+#include <hblabel.h>
+#include <hbpushbutton.h>
+#include <QtGui/QGraphicsGridLayout>
+#include "btuimodelsortfilter.h"
+
+class BtCpUiMainListViewItem : public HbListViewItem
+{
+    Q_OBJECT
+    
+public:
+    BtCpUiMainListViewItem(QGraphicsItem * parent = 0);
+    ~BtCpUiMainListViewItem();
+    
+    HbAbstractViewItem * createItem();
+    void updateChildItems();
+    
+    void setModelSortFilter(BtuiModelSortFilter *filter);
+    
+private:
+    QGraphicsItem *mParent;
+    HbLabel *mDevTypeIconLabel;
+    HbLabel *mDeviceNameLabel;
+    HbLabel *mDevTypeTextLabel;
+    BtuiModelSortFilter*    mBtuiModelSortFilter;
+    
+    QGraphicsGridLayout *mRow;
+};
+
+#endif /* BTCPUIMAINLISTVIEWITEM_H */
--- a/bluetoothengine/btui/btcpplugin/btcpuimainview.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btui/btcpplugin/btcpuimainview.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -33,13 +33,15 @@
 #include <hbmenu.h>
 #include <hbaction.h>
 #include <hbcombobox.h>
+#include <hbgroupbox.h>
 #include "btcpuisearchview.h"
 #include "btcpuideviceview.h"
 #include <bluetoothuitrace.h>
 #include <btdelegatefactory.h>
 #include <btabstractdelegate.h>
 #include "btqtconstants.h"
-
+#include "btcpuimainlistviewitem.h"
+#include "btuidevtypemap.h"
 
 // docml to load
 const char* BTUI_MAINVIEW_DOCML = ":/docml/bt-main-view.docml";
@@ -57,7 +59,7 @@
       mAbstractDelegate(0), mMainFilterModel(0)
 {
     bool ret(false);
-    
+
     mMainWindow = hbInstance->allMainWindows().first();
     mMainView = this;
     
@@ -66,11 +68,11 @@
     // name in docml.
     setObjectName("view");
 
+    mLoader = new HbDocumentLoader();
+    // Pass the view to documentloader. Document loader uses this view
+    // when docml is parsed, instead of creating new view.
     QObjectList objectList;
     objectList.append(this);
-    // Pass the view to documentloader. Document loader uses this view
-    // when docml is parsed, instead of creating new view.
-    mLoader = new HbDocumentLoader();
     mLoader->setObjectTree(objectList);
 
     bool ok = false;
@@ -103,6 +105,14 @@
     mVisibilityMode=0;
     mVisibilityMode = qobject_cast<HbComboBox *>( mLoader->findWidget( "combobox" ) );
     BTUI_ASSERT_X( mVisibilityMode != 0, "bt-main-view", "visibility combobox not found" );
+    // add new item for temporary visibility
+    // NOTE:  translation (at least default english) gives string "(p)Visible for 5 min", 
+    // if setting 1 min --> "(s)Visible for 1 min", ie p=plural, s=singular, but these should
+    // not be shown to the user!
+    // ToDo:  change this to use translation once it starts working
+    QString tempVis(hbTrId("txt_bt_setlabel_visibility_val_visible_for_l1_min", 5));  
+    //QString tempVis(hbTrId("Visible for 5 min"));  
+    mVisibilityMode->addItem(tempVis, Qt::DisplayRole);
         
     mDeviceList=0;
     mDeviceList = qobject_cast<HbListView *>( mLoader->findWidget( "listView" ) );
@@ -120,7 +130,22 @@
     HbAction *discoverAction = static_cast<HbAction*>( mLoader->findObject( "discoverAction" ) );
     BTUI_ASSERT_X( discoverAction, "bt-main-view", "discover action missing" ); 
     ret = connect(discoverAction, SIGNAL(triggered()), this, SLOT(goToDiscoveryView()));
-    BTUI_ASSERT_X( ret, "bt-main-view", "orientation toggle can't connect" ); 
+    BTUI_ASSERT_X( ret, "bt-main-view", "discover action can't connect" ); 
+
+    // load tool bar actions
+    mAllAction = static_cast<HbAction*>( mLoader->findObject( "allAction" ) );
+    BTUI_ASSERT_X( mAllAction, "bt-main-view", "All action missing" ); 
+    ret = connect(mAllAction, SIGNAL(triggered()), this, SLOT(allActionTriggered()));
+    BTUI_ASSERT_X( ret, "bt-main-view", "all action can't connect" ); 
+
+    // load tool bar actions
+    mPairAction = static_cast<HbAction*>( mLoader->findObject( "pairedAction" ) );
+    BTUI_ASSERT_X( mPairAction, "bt-main-view", "Pair action missing" ); 
+    ret = connect(mPairAction, SIGNAL(triggered()), this, SLOT(pairActionTriggered()));
+    BTUI_ASSERT_X( ret, "bt-main-view", "pair action can't connect" ); 
+
+    mGroupBox = qobject_cast<HbGroupBox *>( mLoader->findWidget( "groupBox" ) );
+    BTUI_ASSERT_X( mGroupBox != 0, "bt-main-view", "Group Box not found" ); 
     
     //*********************Testing device view START****************************//
     HbAction *removePairedDevices = static_cast<HbAction*>( mLoader->findObject( "removePairedDevices" ) );
@@ -158,14 +183,14 @@
     mMainFilterModel = new BtuiModelSortFilter(this);
     
     mMainFilterModel->setSourceModel( mDeviceModel );
-    // filter to match only InRegistry devices
-    mMainFilterModel->addDeviceMajorFilter(
-            BtDeviceModel::InRegistry, 
-            BtuiModelSortFilter::AtLeastMatch);
+    updateDeviceListFilter(BtuiPaired);
+	    // List view item
+    BtCpUiMainListViewItem *prototype = new BtCpUiMainListViewItem(mDeviceList);
+    prototype->setModelSortFilter(mMainFilterModel);
+    mDeviceList->setItemPrototype(prototype);
 
     mDeviceList->setModel(mMainFilterModel);
 
-    
 }
 
 /*!
@@ -174,13 +199,8 @@
 BtCpUiMainView::~BtCpUiMainView()
 {
     delete mLoader; // Also deletes all widgets that it constructed.
-    
     mMainWindow->removeView(mSearchView);
-    delete mSearchView;
-    
     mMainWindow->removeView(mDeviceView);
-    delete mDeviceView;
-        
 	if (mAbstractDelegate) {
         delete mAbstractDelegate;
     }
@@ -189,10 +209,10 @@
 /*! 
     from base class, initialize the view
  */
-void BtCpUiMainView::activateView(const QVariant& value, int cmdId )
+void BtCpUiMainView::activateView(const QVariant& value, bool fromBackButton )
 {
     Q_UNUSED(value);
-    Q_UNUSED(cmdId);
+    Q_UNUSED(fromBackButton);
     
 }
 
@@ -204,14 +224,9 @@
 
 }
 
-void BtCpUiMainView::itemActivated(QModelIndex index)
-{
-    Q_UNUSED(index);
-}
-
 void BtCpUiMainView::goToDiscoveryView()
 {
-    changeView( SearchView, false, 0 );
+    changeView( SearchView, false );
 }
 
 void BtCpUiMainView::goToDeviceView(const QModelIndex& modelIndex)
@@ -219,7 +234,7 @@
     //the QModelIndex of the selected device should be given as parameter here 
     QVariant params;
     params.setValue(modelIndex);
-    changeView( DeviceView, false, 0, params );
+    changeView( DeviceView, false, params );
 }
 
 Qt::Orientation BtCpUiMainView::orientation()
@@ -243,8 +258,8 @@
 
 void BtCpUiMainView::setPrevBtLocalName()
 {
-    //Should we notify user this as Error...?
-    HbNotificationDialog::launchDialog(hbTrId("Error"));
+    //ToDo: Should we notify user this as Error...?
+    //HbNotificationDialog::launchDialog(hbTrId("Error"));
     QModelIndex index = mSettingModel->index( BtSettingModel::LocalBtNameRow,0 );
     
     mDeviceNameEdit->setText( mSettingModel->data(
@@ -276,12 +291,12 @@
     
     VisibilityMode mode = indexToVisibilityMode(index);
     list.append(QVariant((int)mode));
-    if(BtTemporary == VisibilityMode(mode)) {
+    if( BtTemporary == VisibilityMode(mode) ) {
         //Right now hardcoded to 5 Mins.
         list.append(QVariant(5));
     }
     //Error handling has to be done.    
-    if (!mAbstractDelegate) {
+    if ( !mAbstractDelegate ) {
         mAbstractDelegate = BtDelegateFactory::newDelegate(BtDelegate::Visibility, 
                 mSettingModel, mDeviceModel); 
         connect( mAbstractDelegate, SIGNAL(commandCompleted(int)), this, SLOT(visibilityDelegateCompleted(int)) );
@@ -295,24 +310,49 @@
 
 void BtCpUiMainView::setPrevVisibilityMode()
 {
-    bool ret(false);
-    
-    //Should we notify this error to user..?
-    HbNotificationDialog::launchDialog(hbTrId("Error"));
+   
     QModelIndex index = mSettingModel->index( BtSettingModel::VisibilityRow, 0 );
     
-    ret = disconnect(mVisibilityMode, SIGNAL(currentIndexChanged (int)), 
-                    this, SLOT(visibilityChanged (int)));
-    BTUI_ASSERT_X( ret, "BtCpUiMainView::setPrevVisibilityMode", "can't disconnect signal" );
-    
     mVisibilityMode->setCurrentIndex ( visibilityModeToIndex((VisibilityMode)
                 mSettingModel->data(index,BtSettingModel::SettingValueRole).toInt()) );
     
-    //Handle Visibility Change User Interaction
-    ret = connect(mVisibilityMode, SIGNAL(currentIndexChanged (int)), 
-            this, SLOT(visibilityChanged (int)));
-    BTUI_ASSERT_X( ret, "BtCpUiMainView::setPrevVisibilityMode", "can't connect signal" );
+}
+
+
+void BtCpUiMainView::allActionTriggered()
+{
+    updateDeviceListFilter(BtuiAll);
+}
+
+void BtCpUiMainView::pairActionTriggered()
+{
+    updateDeviceListFilter(BtuiPaired);
+}
 
+void BtCpUiMainView::updateDeviceListFilter(BtCpUiMainView::filterType filter)
+{
+    mMainFilterModel->clearDeviceMajorFilters();
+    
+    switch (filter) {
+        case BtuiAll:
+            mGroupBox->setHeading(hbTrId("txt_bt_subhead_bluetooth_all_devices"));
+            mPairAction->setEnabled(true);
+            mAllAction->setEnabled(false);
+            mMainFilterModel->addDeviceMajorFilter(
+                    BtuiDevProperty::InRegistry, 
+                    BtuiModelSortFilter::AtLeastMatch);
+
+            break;
+        case BtuiPaired:
+            mGroupBox->setHeading(hbTrId("txt_bt_subhead_bluetooth_paired_devices"));
+            mPairAction->setEnabled(false);
+            mAllAction->setEnabled(true);
+            mMainFilterModel->addDeviceMajorFilter(
+                    BtuiDevProperty::InRegistry | BtuiDevProperty::Bonded, 
+                    BtuiModelSortFilter::AtLeastMatch);
+
+            break;
+    }
 }
 
 
@@ -351,21 +391,14 @@
     }
 }
 
-void BtCpUiMainView::commandCompleted( int cmdId, int err, const QString &diagnostic )
-{
-    Q_UNUSED(cmdId);
-    Q_UNUSED(err);
-    Q_UNUSED(diagnostic);
-
-}
-
 /*!
     Slot for receiving notification of local setting changes from the model.
     Identify the setting changed and update the corresponding UI item.
  */
 void BtCpUiMainView::updateSettingItems(const QModelIndex &topLeft, const QModelIndex &bottomRight)
 {   
-
+    bool val(false);
+    
     // update only the part of the view specified by the model's row(s)
     for (int i=topLeft.row(); i <= bottomRight.row(); i++) {
         QModelIndex index = mSettingModel->index( i, 0);
@@ -376,8 +409,17 @@
                     mSettingModel->data(index,BtSettingModel::settingDisplayRole).toString() );
             break;
         case BtSettingModel::PowerStateRow:
-            mPowerButton->setText( mSettingModel->data(index,
-                    BtSettingModel::settingDisplayRole).toString() );
+            val = mSettingModel->data(index, BtSettingModel::SettingValueRole).toBool();
+            if (val) {
+                HbIcon icon("qtg_mono_bluetooth");
+                icon.setIconName("qtg_mono_bluetooth");
+                mPowerButton->setIcon(icon);  
+            }
+            else {
+                HbIcon icon("qtg_mono_bluetooth_off");
+                icon.setIconName("qtg_mono_bluetooth_off");
+                mPowerButton->setIcon(icon);
+            }
             break;
         case BtSettingModel::VisibilityRow:
             mVisibilityMode->setCurrentIndex ( visibilityModeToIndex((VisibilityMode)
@@ -393,15 +435,24 @@
  */
 void BtCpUiMainView::changePowerState()
 {
+    QModelIndex index = mSettingModel->index(BtSettingModel::PowerStateRow, 0);
+    PowerStateQtValue powerState = (PowerStateQtValue)mSettingModel->data(index, Qt::EditRole).toInt();
+    BTUI_ASSERT_X(((powerState == BtPowerOn) || (powerState == BtPowerOff)), 
+            "BtCpUiMainView::changePowerState()", "incorrect qt power state");
+
+    if (powerState == BtPowerOff) {
+        powerState = BtPowerOn;
+    }
+    else {
+        powerState = BtPowerOff;
+    } 
     
-    QModelIndex index = mSettingModel->index(BtSettingModel::PowerStateRow, 0);
-    QVariant powerState = mSettingModel->data(index, Qt::EditRole);
     if (!mAbstractDelegate)//if there is no other delegate running
     { 
         mAbstractDelegate = BtDelegateFactory::newDelegate(BtDelegate::ManagePower, 
                 mSettingModel, mDeviceModel ); 
         connect( mAbstractDelegate, SIGNAL(commandCompleted(int)), this, SLOT(powerDelegateCompleted(int)) );
-        mAbstractDelegate->exec(powerState);
+        mAbstractDelegate->exec(QVariant((int)powerState));
     }
    
 }
@@ -424,7 +475,7 @@
  */
 VisibilityMode BtCpUiMainView::indexToVisibilityMode(int index)
 {
-    VisibilityMode mode; 
+    VisibilityMode mode = BtVisibilityUnknown;
     switch(index) {
     case UiRowBtHidden:  
         mode = BtHidden;
@@ -436,7 +487,7 @@
         mode = BtTemporary;
         break;
     default:
-        mode = BtUnknown;
+        BTUI_ASSERT_X(false, "BtCpUiMainView::indexToVisibilityMode", "invalid mode");
     }
     return mode;
 }
@@ -446,7 +497,7 @@
  */
 int BtCpUiMainView::visibilityModeToIndex(VisibilityMode mode)
 {
-    int uiRow;
+    int uiRow = UiRowBtUnknown;
     switch(mode) {
     case BtHidden:  
         uiRow = UiRowBtHidden;
@@ -458,15 +509,12 @@
         uiRow = UiRowBtTemporary;
         break;
     default:
-        uiRow = -1;  // error
+        BTUI_ASSERT_X(false, "BtCpUiMainView::visibilityModeToIndex", "invalid mode");
     }
     return uiRow;
 }
-//////////////////////
-//
-// from view manager
-// 
-//////////////////////
+
+
 
 /*!
     Create views(main view, device view and search view).
@@ -495,12 +543,11 @@
 
 /*!
     Switch between the views.  
-    Parameter cmdId is used for automatically executing command.
     Parameter "value" is optional except for GadgetView, 
-    which needs the BT address (QString)
+    which needs the QModelIndex of device
  */
 void BtCpUiMainView::changeView(int targetViewId, bool fromBackButton, 
-        int cmdId, const QVariant& value )
+        const QVariant& value )
 {
     mCurrentView->deactivateView();
 
@@ -509,14 +556,8 @@
     // the previous viewId of target view should not be changed. 
     // Otherwise, loop happens between two views.
     if(!fromBackButton) {
-        if ((targetViewId == DeviceView) && (mCurrentViewId == SearchView)) {
-            // we don't want to return to search view after e.g. pairing a new device
-            mPreviousViewIds[ targetViewId ] = MainView;  
-        } 
-        else {
-            // normal case:  return to previous view
-            mPreviousViewIds[ targetViewId ] = mCurrentViewId;
-        }
+        // normal case:  return to previous view
+        mPreviousViewIds[ targetViewId ] = mCurrentViewId;
     }
 
     // set the new current view 
@@ -525,7 +566,7 @@
     mMainWindow->setCurrentView( mCurrentView );
 
     // do preparation or some actions when new view is activated 
-    mCurrentView->activateView( value, cmdId );
+    mCurrentView->activateView( value, fromBackButton );
 }
  
 
@@ -536,7 +577,7 @@
     QVariant params;
     params.setValue(index);
     
-    changeView( DeviceView, false, 0, params );
+    changeView( DeviceView, false, params );
 }
 
 BtCpUiBaseView * BtCpUiMainView::idToView(int targetViewId)
@@ -554,24 +595,9 @@
     return 0;
 }
 
-/*
-   Jump to previous view.  This function is used when back button is pressed.
- */
-void BtCpUiMainView::switchToPreviousViewReally()
-{  
-//    // jump to previous view of current view.
-//    if( (mCurrentViewId >= 0) && (mCurrentViewId < LastView)) {
-//        changeView( mPreviousViewIds[mCurrentViewId], true, 0 );
-//    } 
-//    else {
-//        BTUI_ASSERT_X(false, "BtCpUiMainView::switchToPreviousViewReally", "invalid view id");
-//    }
-}
-
-
 void BtCpUiMainView::setSoftkeyBack()
 {
-
+    // not needed in main view
 }
 
 /*!
@@ -581,12 +607,8 @@
  */
 void BtCpUiMainView::switchToPreviousView()
 {
-    // jump to previous view of current view.
-    if( (mCurrentViewId >= 0) && (mCurrentViewId < LastView)) {
-        changeView( mPreviousViewIds[mCurrentViewId], true, 0 );
-    } 
-    else {
-        BTUI_ASSERT_X(false, "BtCpUiMainView::switchToPreviousView", "invalid view id");
-    }      
+    BTUI_ASSERT_X( (mCurrentViewId >= 0) && (mCurrentViewId < LastView), 
+            "BtCpUiMainView::switchToPreviousView", "invalid view id");
+    changeView( mPreviousViewIds[mCurrentViewId], true );
 }
 
--- a/bluetoothengine/btui/btcpplugin/btcpuimainview.h	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btui/btcpplugin/btcpuimainview.h	Mon Jul 12 18:51:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -31,18 +31,13 @@
 class HbGridView;
 class BtAbstractDelegate;
 class HbListView;
+class HbGroupBox;
 
 class BtCpUiMainView : public BtCpUiBaseView
 {
     Q_OBJECT
 
 public:
-//    enum ViewIndex {
-//        MainView,
-//        SearchView, 
-//        DeviceView,
-//        LastView
-//    };
     explicit BtCpUiMainView(
             BtSettingModel &settingModel, 
             BtDeviceModel &deviceModel, 
@@ -55,35 +50,36 @@
 
     // from base class BtCpUiBaseView
     virtual void setSoftkeyBack();
-    virtual void activateView( const QVariant& value, int cmdId );
+    virtual void activateView( const QVariant& value, bool fromBackButton );
     virtual void deactivateView();
 
 public slots: 
-    void commandCompleted( int cmdId, int err, const QString &diagnostic );
     void changeOrientation( Qt::Orientation orientation );
-    void itemActivated(QModelIndex index); 
     void changePowerState();
+    void visibilityChanged (int index);
+    void changeBtLocalName();
     
     void updateSettingItems(const QModelIndex &topLeft, const QModelIndex &bottomRight);
     void deviceSelected(const QModelIndex& modelIndex);
     void goToDiscoveryView();
     void goToDeviceView(const QModelIndex& modelIndex);
-    
-    // from view manager
-    void changeView(int targetViewId, bool fromBackButton, int cmdId, const QVariant& value = 0 );
-    void switchToPreviousViewReally();
     virtual void switchToPreviousView();
-    
-    void visibilityChanged (int index);
-    void changeBtLocalName();
-    
+
     //from delegate classes
     void powerDelegateCompleted(int status);
     void visibilityDelegateCompleted(int status);
     void btNameDelegateCompleted(int status, QVariant param);
+    void allActionTriggered();
+    void pairActionTriggered();
     
-protected:
+private slots:
+    void changeView(int targetViewId, bool fromBackButton, const QVariant& value = 0 );    
 
+private:
+    enum filterType {
+        BtuiAll = 0,
+        BtuiPaired
+    };
     
 private:
     VisibilityMode indexToVisibilityMode(int index);
@@ -94,17 +90,17 @@
     void setPrevBtLocalName();
     void setPrevVisibilityMode();
     
+    void updateDeviceListFilter(BtCpUiMainView::filterType filter);
+    
 private:
-    QAbstractItemModel* mSubModel;
+
     HbDocumentLoader *mLoader;
+
     HbLineEdit *mDeviceNameEdit;
     HbPushButton *mPowerButton;
     HbComboBox *mVisibilityMode;
     HbListView *mDeviceList;
-    
-    // data structures for switching between views
-    bool mEventFilterInstalled;
-    int mAutoCmdId;
+
     Qt::Orientation mOrientation;
     
     // from view manager
@@ -114,12 +110,14 @@
     BtCpUiBaseView* mSearchView;
     BtCpUiBaseView* mCurrentView;
     int mCurrentViewId;
-    HbAction *mBackAction;
     QList<int> mPreviousViewIds;
     
     //poiter to abstract delegate, and it is instantiated at runtime
     BtAbstractDelegate* mAbstractDelegate;
     BtuiModelSortFilter *mMainFilterModel;
     
+    HbAction *mAllAction;
+    HbAction *mPairAction;
+    HbGroupBox *mGroupBox;
 };
 #endif // BTCPUIMAINVIEW_H 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/btui/btcpplugin/btcpuisearchlistviewitem.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,115 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  BTUISearchListViewItem implementation
+*
+*/
+
+
+#include "btcpuisearchlistviewitem.h"
+#include "btdevicemodel.h"
+#include "btuiiconutil.h"
+#include <QGraphicsGridLayout>
+
+BtCpUiSearchListViewItem::BtCpUiSearchListViewItem(QGraphicsItem * parent) :
+    HbListViewItem(parent), mParent(parent)
+{
+    mDeviceNameLabel = 0;
+    mDevTypeIconLabel = 0;
+    mDevTypeTextLabel = 0;
+    mBtuiModelSortFilter = ((BtCpUiSearchListViewItem *)parent)->mBtuiModelSortFilter;
+    
+    mRow = 0;   
+}
+
+BtCpUiSearchListViewItem::~BtCpUiSearchListViewItem()
+{
+//    delete mDeviceNameLabel;
+//    delete mDevTypeIconLabel;
+//    delete mDevTypeTextLabel;
+}
+
+/*
+ * This method is called by the HbListView when it needs a new
+ * view item element.
+ *
+ */
+HbAbstractViewItem * BtCpUiSearchListViewItem::createItem()
+{
+    return new BtCpUiSearchListViewItem(*this); 
+}
+
+/*!
+   UpdateChildItem updates the item graphics.
+   Screen elements are created once if not already done.  This may increase the overall memory 
+   consumption of the application, however, this is deemed inconsequential.  There might be a small 
+   performance improvement with current style.
+ */
+void BtCpUiSearchListViewItem::updateChildItems()
+{
+    QModelIndex index;
+    
+    // Get device name from model
+    if (mBtuiModelSortFilter)
+        index = mBtuiModelSortFilter->mapToSource(modelIndex());
+    else
+        index = modelIndex();
+
+
+    // create new icon label if needed
+    if (!mDevTypeIconLabel) {
+        mDevTypeIconLabel = new HbLabel();
+        mDevTypeIconLabel->setPreferredSize(53.5260, 53.5260); //8un x 8un
+        mDevTypeIconLabel->setMinimumWidth(53.5260);
+    }
+    // create new label if needed
+    if (!mDeviceNameLabel) {
+        mDeviceNameLabel = new HbLabel();
+        mDeviceNameLabel->setPreferredSize(250, 26.763);
+    }
+    // create new label if needed
+    if (!mDevTypeTextLabel) {
+        mDevTypeTextLabel = new HbLabel();
+        mDevTypeTextLabel->setPreferredSize(250, 26.763);
+    }
+    // create layout if needed
+    if ( !mRow ) {
+        // Still need to create the actual layout
+        mRow = new QGraphicsGridLayout();
+        mRow->addItem(mDevTypeIconLabel,0,0,2,1);
+        mRow->addItem(mDeviceNameLabel,0,1,1,1);
+        mRow->addItem(mDevTypeTextLabel,1,1,1,1);
+        setLayout(mRow);
+    }
+        
+    QString data = index.data(Qt::DisplayRole).toString();
+    int cod = (index.data(BtDeviceModel::CoDRole)).toInt();
+    int majorProperty = (index.data(BtDeviceModel::MajorPropertyRole)).toInt();
+    
+    // ToDo:  remove clear() once Orbit bug is fixed
+    mDeviceNameLabel->clear();
+    mDeviceNameLabel->setPlainText(data);
+    mDevTypeIconLabel->clear();
+    mDevTypeTextLabel->clear();
+    mDevTypeTextLabel->setPlainText( getDeviceTypeString( cod ));
+    HbIcon icon = 
+    getBadgedDeviceTypeIcon(cod, majorProperty,
+            BtuiBottomLeft | BtuiBottomRight | BtuiTopLeft | BtuiTopRight );
+    mDevTypeIconLabel->setIcon(icon);
+}
+
+
+void BtCpUiSearchListViewItem::setModelSortFilter(BtuiModelSortFilter *filter)
+{
+    mBtuiModelSortFilter = filter;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/btui/btcpplugin/btcpuisearchlistviewitem.h	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,51 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  device view item
+*
+*/
+
+
+#ifndef BTCPUISEARCHLISTVIEWITEM_H
+#define BTCPUISEARCHLISTVIEWITEM_H
+
+#include <hblistviewitem.h>
+#include <hblabel.h>
+#include <hbpushbutton.h>
+#include <QtGui/QGraphicsGridLayout>
+#include "btuimodelsortfilter.h"
+
+class BtCpUiSearchListViewItem : public HbListViewItem
+{
+    Q_OBJECT
+    
+public:
+    BtCpUiSearchListViewItem(QGraphicsItem * parent = 0);
+    ~BtCpUiSearchListViewItem();
+    
+    HbAbstractViewItem * createItem();
+    void updateChildItems();
+    
+    void setModelSortFilter(BtuiModelSortFilter *filter);
+    
+private:
+    QGraphicsItem *mParent;
+    HbLabel *mDevTypeIconLabel;
+    HbLabel *mDeviceNameLabel;
+    HbLabel *mDevTypeTextLabel;
+    BtuiModelSortFilter*    mBtuiModelSortFilter;
+    
+    QGraphicsGridLayout *mRow;
+};
+
+#endif /* BTCPUISEARCHLISTVIEWITEM_H */
--- a/bluetoothengine/btui/btcpplugin/btcpuisearchview.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btui/btcpplugin/btcpuisearchview.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
  * All rights reserved.
  * This component and the accompanying materials are made available
  * under the terms of "Eclipse Public License v1.0""
@@ -25,6 +25,7 @@
 #include <HbLabel>
 #include <HbListView>
 #include <HbMenu>
+#include <HbSelectionDialog>
 #include <QString>
 #include <QStringList>
 #include <QDebug>
@@ -32,7 +33,8 @@
 #include "btcpuimainview.h"
 #include "btdelegatefactory.h"
 #include "btabstractdelegate.h"
-
+#include "btcpuisearchlistviewitem.h"
+#include "btuidevtypemap.h"
 
 
 // docml to load
@@ -46,6 +48,7 @@
 {
     bool ret(false);
     
+    mQuery = 0;
     mMainView = (BtCpUiMainView *) parent;
     
     mMainWindow = hbInstance->allMainWindows().first();
@@ -58,11 +61,11 @@
     // name in docml.
     setObjectName("bt_search_view");
 
+    mLoader = new HbDocumentLoader();
+    // Pass the view to documentloader. Document loader uses this view
+    // when docml is parsed, instead of creating new view.
     QObjectList objectList;
     objectList.append(this);
-    // Pass the view to documentloader. Document loader uses this view
-    // when docml is parsed, instead of creating new view.
-    mLoader = new HbDocumentLoader();
     mLoader->setObjectTree(objectList);
     
     // read view info from docml file
@@ -118,9 +121,8 @@
     // load tool bar actions
     mViewBy = static_cast<HbAction*>( mLoader->findObject( "viewByAction" ) );
     BTUI_ASSERT_X( mViewBy, "bt-search-view", "view by action missing" ); 
-//    TODO - Need to implement the View by
-//    ret = connect(viewByAction, SIGNAL(triggered()), this, SLOT(noOp()));
-//    BTUI_ASSERT_X( ret, "bt-search-view", "viewByAction can't connect" ); 
+    ret = connect(mViewBy, SIGNAL(triggered()), this, SLOT(viewByDeviceTypeDialog()));
+    BTUI_ASSERT_X( ret, "bt-search-view", "viewByAction can't connect" ); 
 
     mStop = static_cast<HbAction*>( mLoader->findObject( "stopAction" ) );
     BTUI_ASSERT_X( mStop, "bt-search-view", "stopAction missing" ); 
@@ -150,28 +152,69 @@
     
     ret = connect(mDeviceList, SIGNAL(activated(QModelIndex)), this, SLOT(deviceSelected(QModelIndex)));
     BTUI_ASSERT_X( ret, "bt-search-view", "deviceSelected can't connect" ); 
+    
+    // initialize device type list for "view by" option
+    // Note:  this list needs to be in the same order as enum devTypeSelectionList
+    mDevTypeList << hbTrId("txt_bt_list_audio_devices")
+            << hbTrId("txt_bt_list_computers") 
+            << hbTrId("txt_bt_list_input_devices") 
+            << hbTrId("txt_bt_list_phones") 
+            << hbTrId("txt_bt_list_other_devices");
+    
+    // initialize sort model & create
+    // inquiry delegate
+    // Sort is set to dynamic sort filter = true in the class, will sort automatically
+    mBtuiModelSortFilter = new BtuiModelSortFilter(this);
+    mBtuiModelSortFilter->setSourceModel(mDeviceModel);
+    mBtuiModelSortFilter->addDeviceMajorFilter(
+            BtuiDevProperty::InRange, BtuiModelSortFilter::AtLeastMatch);
+    mDeviceList->setModel(mBtuiModelSortFilter);
+    // add sort order to show devices in the order they are found
+    mBtuiModelSortFilter->setSortRole(BtDeviceModel::SeqNumRole);
+    // Sort according to the first column (and the only column) in the listview - sorted according SeqNumRole
+    mBtuiModelSortFilter->sort(0, Qt::AscendingOrder);
+
+    BtCpUiSearchListViewItem *prototype = new BtCpUiSearchListViewItem(mDeviceList);
+    prototype->setModelSortFilter(mBtuiModelSortFilter);
+    mDeviceList->setItemPrototype(prototype);
+
+    // Create the inquiry delegate.
+    mAbstractDelegate = BtDelegateFactory::newDelegate(BtDelegate::Inquiry, mSettingModel, mDeviceModel );
+    
+    // Connect to the signal from the BtDelegateInquiry for completion of the search request
+    ret = connect(mAbstractDelegate, SIGNAL(commandCompleted(int)), this, SLOT(searchDelegateCompleted(int)));
+    BTUI_ASSERT_X( ret, "bt-search-view", "searchDelegateCompleted can't connect" );
+    
+    // Connect to the signal from the BtuiModel when the search has been completed.
+    ret = connect(mDeviceModel, SIGNAL(deviceSearchCompleted(int)), this, SLOT(deviceSearchCompleted(int)));
+    BTUI_ASSERT_X( ret, "bt-search-view", "deviceSearchCompleted can't connect" ); 
 }
 
 BtCpUiSearchView::~BtCpUiSearchView()
 {
+    delete mLoader; // Also deletes all widgets that it constructed.
+    
     setNavigationAction(0);
+    disconnect( mSoftKeyBackAction );
     delete mSoftKeyBackAction;
     
     if(mAbstractDelegate) {
         delete mAbstractDelegate;
-        mAbstractDelegate = 0;
     }
-    
     if(mBtuiModelSortFilter) {
         delete mBtuiModelSortFilter;
-        mBtuiModelSortFilter = 0; 
+    }
+    if ( mQuery ) {
+        delete mQuery;
     }
 }
 
 void BtCpUiSearchView::changeOrientation( Qt::Orientation orientation )
 {
+    // ToDo:  this does not handle redrawing list view items differently for portrait/landscape
     bool ok = false;
     mOrientation = orientation;
+
     if( orientation == Qt::Vertical ) {
         // load "portrait" section
         mLoader->load( BTUI_SEARCHVIEW_DOCML, "portrait_ui", &ok );
@@ -183,22 +226,99 @@
     }
 }
 
+
+void BtCpUiSearchView::viewByDeviceTypeDialog()
+{
+    if ( !mQuery ) {
+        mQuery = new HbSelectionDialog;
+        mQuery->setStringItems(mDevTypeList, 0);
+        mQuery->setSelectionMode(HbAbstractItemView::MultiSelection);
+    
+        QList<QVariant> current;
+        current.append(QVariant(0));
+        mQuery->setSelectedItems(current);
+    
+        // Set the heading for the dialog.
+        HbLabel *headingLabel = new HbLabel(hbTrId("txt_bt_title_show"), mQuery);
+        mQuery->setHeadingWidget(headingLabel);
+    }
+    mQuery->open(this,SLOT(viewByDialogClosed(HbAction*)));
+}
+/*!
+   Callback for HbSelectionDialog closing
+
+ */
+void BtCpUiSearchView::viewByDialogClosed(HbAction* action)
+{
+    disconnect( mQuery );  // remove slot
+    if (action == mQuery->actions().first()) {  // user pressed "Ok"
+        // Get selected items.
+        QList<QVariant> selections;
+        selections = mQuery->selectedItems();
+        
+        int devTypesWanted = 0;
+        
+        for (int i=0; i < selections.count(); i++) {
+            switch (selections.at(i).toInt()) {
+            case BtUiDevAudioDevice:
+                devTypesWanted |= BtuiDevProperty::AVDev;
+                break;
+            case BtUiDevComputer:
+                devTypesWanted |= BtuiDevProperty::Computer;
+                break;
+            case BtUiDevInputDevice:
+                devTypesWanted |= BtuiDevProperty::Peripheral;
+                break;
+            case BtUiDevPhone:
+                devTypesWanted |= BtuiDevProperty::Phone;
+                break;
+            case BtUiDevOtherDevice:
+                devTypesWanted |= (BtuiDevProperty::LANAccessDev |
+                        BtuiDevProperty::Toy |
+                        BtuiDevProperty::WearableDev |
+                        BtuiDevProperty::ImagingDev |
+                        BtuiDevProperty::HealthDev |
+                        BtuiDevProperty::UncategorizedDev);
+                break;
+            default:
+                // should never get here
+                BTUI_ASSERT_X(false, "BtCpUiSearchView::viewByDialogClosed()", 
+                        "wrong device type in viewBy dialog!");
+            }
+        }
+        if (devTypesWanted) {
+            mBtuiModelSortFilter->clearDeviceMajorFilters();
+            mBtuiModelSortFilter->addDeviceMajorFilter(BtuiDevProperty::InRange,
+                            BtuiModelSortFilter::AtLeastMatch);   // device must be in range
+            mBtuiModelSortFilter->addDeviceMajorFilter(devTypesWanted,
+                    BtuiModelSortFilter::RoughMatch);             // device can be any one of selected ones
+        }
+        mBtuiModelSortFilter->sort(0, Qt::AscendingOrder);
+    }
+}
+
 void BtCpUiSearchView::stopSearching()
 {
-    // Stop delegate
+    // Stop searching
     
     // Change label and buttons to reflect status
     mLabelSearching->setPlainText(hbTrId("txt_bt_subhead_search_done"));
     mRetry->setEnabled(true);
     mStop->setEnabled(false);    
 
-    // Stop delegate
+    // Stop search delegate
     mAbstractDelegate->cancel();
 }
 
+void BtCpUiSearchView::startSearchDelegate ()
+{
+    
+    mAbstractDelegate->exec(QVariant());
+}
+
 void BtCpUiSearchView::retrySearch()
 {
-    // Retry delegate
+    // Retry search
 
     // Change label and buttons to reflect status
     mLabelSearching->setPlainText(hbTrId("txt_bt_subhead_searching"));
@@ -206,9 +326,7 @@
     mStop->setEnabled(true);
     
     // Make use of the delegate and start the search.
-    mAbstractDelegate->cancel();
-    mDeviceList->setModel(mBtuiModelSortFilter);
-    mAbstractDelegate->exec(QVariant());
+    startSearchDelegate ();
 }
 
 void BtCpUiSearchView::setSoftkeyBack()
@@ -225,48 +343,31 @@
     mMainView->switchToPreviousView();
 }
 
-void BtCpUiSearchView::activateView( const QVariant& value, int cmdId )
+void BtCpUiSearchView::activateView( const QVariant& value, bool fromBackButton )
 {
     Q_UNUSED(value);
-    Q_UNUSED(cmdId);  
+
+    // ToDo:  consider whether orientation should be updated here rather than when orientation really changes;
+    // advantage:  if orientation changes temporarily in another view, but returns to previous setting before
+    // search is reactived, there is no processing overhead
     
     setSoftkeyBack();
-    
-    bool ret(false);
-    
-    if(!mAbstractDelegate) {
-        // Create the inquiry delegate.
-        mAbstractDelegate = BtDelegateFactory::newDelegate(
-                BtDelegate::Inquiry, mSettingModel, mDeviceModel );
+            
+    if ( !fromBackButton ) {
+        startSearchDelegate();
     }
-    
-    // Connect to the signal from the BtDelegateInquiry for completion of the search request
-    ret = connect(mAbstractDelegate, SIGNAL(commandCompleted(int)), this, SLOT(searchDelegateCompleted(int)));
-    BTUI_ASSERT_X( ret, "bt-search-view", "searchDelegateCompleted can't connect" );
-    
-    // Connect to the signal from the BtuiModel when the search has been completed.
-    ret = connect(mDeviceModel, SIGNAL(deviceSearchCompleted(int)), this, SLOT(deviceSearchCompleted(int)));
-    BTUI_ASSERT_X( ret, "bt-search-view", "deviceSearchCompleted can't connect" ); 
-    
-    if(!mBtuiModelSortFilter) {
-        mBtuiModelSortFilter = new BtuiModelSortFilter(this);
-    }
-    mBtuiModelSortFilter->setSourceModel(mDeviceModel);
-    mBtuiModelSortFilter->addDeviceMajorFilter(BtDeviceModel::InRange, BtuiModelSortFilter::AtLeastMatch);
-    mDeviceList->setModel(mBtuiModelSortFilter);
-
-    // Make use of the delegate and start the search.
-    mAbstractDelegate->exec(QVariant());
 }
 
 void BtCpUiSearchView::deactivateView()
 {
+    mAbstractDelegate->cancel();          // Stop searching when leaving view
+    deviceSearchCompleted(KErrNone);      // reset view 
 }
 
 void BtCpUiSearchView::searchDelegateCompleted(int error)
 {
-    //TODO - handle error.
     Q_UNUSED(error);
+    
 }
 
 void BtCpUiSearchView::deviceSearchCompleted(int error)
--- a/bluetoothengine/btui/btcpplugin/btcpuisearchview.h	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btui/btcpplugin/btcpuisearchview.h	Mon Jul 12 18:51:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
  * All rights reserved.
  * This component and the accompanying materials are made available
  * under the terms of "Eclipse Public License v1.0""
@@ -30,18 +30,20 @@
 class HbDocumentLoader;
 class HbListView;
 class BtAbstractDelegate;
+class HbSelectionDialog;
 
 class BtCpUiSearchView : public BtCpUiBaseView
 {
     Q_OBJECT
     
 public:
+
     explicit BtCpUiSearchView(
             BtSettingModel &settingModel, 
             BtDeviceModel &deviceModel, 
             QGraphicsItem *parent = 0);
     virtual ~BtCpUiSearchView();
-    virtual void activateView( const QVariant& value, int cmdId );
+    virtual void activateView( const QVariant& value, bool fromBackButton );
     virtual void deactivateView();
     virtual void setSoftkeyBack();
     
@@ -50,27 +52,37 @@
     void changeOrientation( Qt::Orientation orientation );
     void stopSearching();
     void retrySearch();
+    void viewByDeviceTypeDialog();
+    void viewByDialogClosed(HbAction* action);
     void searchDelegateCompleted(int error);
     void deviceSearchCompleted(int error);
     void deviceSelected(const QModelIndex& modelIndex);
-
+    
+private:
+    void startSearchDelegate();
+    
+private:
+    enum devTypeSelectionList {
+        BtUiDevAudioDevice = 0,
+        BtUiDevComputer,
+        BtUiDevInputDevice,
+        BtUiDevPhone,
+        BtUiDevOtherDevice
+    };
 private:
     HbDocumentLoader *mLoader;
     HbLabel *mDeviceIcon;
     HbLabel *mLabelFoundDevices;
     HbLabel *mLabelSearching;        
     HbListView *mDeviceList;
+    QStringList mDevTypeList;
+    HbSelectionDialog *mQuery;
     
-    // data structures for switching between views
-    bool mEventFilterInstalled;
-    int mAutoCmdId;
     Qt::Orientation mOrientation;
     
     HbMainWindow*           mMainWindow;
     BtCpUiBaseView*         mMainView;
-    BtCpUiBaseView*         mDeviceView;
     HbAction *              mSoftKeyBackAction;
-    HbToolBar*              mToolBar;
     HbAction*               mViewBy;
     HbAction*               mStop;
     HbAction*               mRetry;
@@ -79,8 +91,6 @@
 
     //pointer to abstract delegate, and it is instantiated at runtime
     BtAbstractDelegate*     mAbstractDelegate;
-    QModelIndex*            mParentIndex;
-    int                     mNumOfRows;
     BtuiModelSortFilter*    mBtuiModelSortFilter;
 };
 
--- a/bluetoothengine/btui/btcpplugin/btcpuisettingitem.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btui/btcpplugin/btcpuisettingitem.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
  * All rights reserved.
  * This component and the accompanying materials are made available
  * under the terms of "Eclipse Public License v1.0""
@@ -17,36 +17,46 @@
 
 #include "btcpuisettingitem.h"
 #include <cpitemdatahelper.h>
+#include <bluetoothuitrace.h>
 
 #include <HbInstance>
+#include <HbTranslator>
 
-BtCpUiSettingItem::BtCpUiSettingItem(CpItemDataHelper &itemDataHelper,
-													   const QString &text /*= QString()*/,
-													   const QString &description /*= QString()*/,
-													   const HbIcon &icon /*= HbIcon()*/,
-													   const HbDataFormModelItem *parent /*= 0*/)
-													   : CpSettingFormEntryItemData(itemDataHelper,
-													   text,
-													   description,
-													   icon,
-													   parent)
+BtCpUiSettingItem::BtCpUiSettingItem(CpItemDataHelper &itemDataHelper) :
+    CpSettingFormEntryItemData(itemDataHelper)
 {
+    bool ret(false);
+    loadTranslators();
+    mSettingModel = new BtSettingModel(this);
+    mDeviceModel = new BtDeviceModel(this);
+    
+    ret = connect(mSettingModel, SIGNAL(dataChanged(QModelIndex,QModelIndex)), 
+            this, SLOT(handleDataChanged(QModelIndex,QModelIndex)));
+    BTUI_ASSERT_X( ret, "BtCpUiSettingItem::BtCpUiSettingItem", "can't connect dataChanged" );
+
+    this->setDescription(hbTrId("txt_cp_dblist_bluetooth"));
+    updateStatus();
 }
 
 BtCpUiSettingItem::~BtCpUiSettingItem()
 {
+    delete mViewTranslator;
+    delete mDialogTranslator;
+}
 
+void BtCpUiSettingItem::loadTranslators()
+{
+    mViewTranslator = new HbTranslator("btviews");
+    mDialogTranslator = new HbTranslator("btdialogs");
 }
 
 void BtCpUiSettingItem::onLaunchView()
 {
-    mSettingModel = new BtSettingModel(this);
-    mDeviceModel = new BtDeviceModel(this);
-    
+  
     mMainWindow = hbInstance->allMainWindows().first();
     
     mBtMainView = new BtCpUiMainView(*mSettingModel, *mDeviceModel);
-    
+      
     mCpView = mMainWindow->currentView();
     
     mMainWindow->addView(mBtMainView);
@@ -60,8 +70,69 @@
 {
     mBtMainView->deactivateView();
     mMainWindow->setCurrentView(mCpView);
+    
+    mMainWindow->removeView(mBtMainView);
+    delete mBtMainView;
+    mBtMainView = 0;
+    
+}
+
+/*!
+    Slot for receiving notification of local setting changes from the model.
+    Identify the setting changed and update the corresponding UI item.
+ */
+void BtCpUiSettingItem::handleDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
+{     
+    // update only the part of the view specified by the model's row(s)
+    for (int i=topLeft.row(); i <= bottomRight.row(); i++) {
+        QModelIndex index = mSettingModel->index( i, 0);
+        // Distinguish which setting value is changed.
+        switch ( i ) {
+        case BtSettingModel::PowerStateRow:
+        case BtSettingModel::VisibilityRow:
+            updateStatus();
+            break;
+        }
+    }   
 }
 
+void BtCpUiSettingItem::updateStatus()
+{
+    QString btStatusText;
+    HbIcon btStatusIcon;
+    
+    //todo: Connection status is not updated right now, which is also required as per UI Spec.
+    PowerStateQtValue btPower = (PowerStateQtValue)mSettingModel->data(mSettingModel->index(
+            BtSettingModel::PowerStateRow, 0),
+            BtSettingModel::SettingValueRole).toInt();
+    
+    if(BtPowerOn == btPower) {
+        VisibilityMode visibilityMode = (VisibilityMode) mSettingModel->data(
+                mSettingModel->index(BtSettingModel::VisibilityRow, 0),
+                BtSettingModel::SettingValueRole).toInt();
+        switch(visibilityMode) {
+            case BtHidden:
+                btStatusText = hbTrId("txt_cp_dblist_bluetooth_val_on_and_hidden");
+                btStatusIcon.setIconName("qtg_large_bluetooth_hide");
+                break;
+            case BtVisible:
+            case BtTemporary:
+                btStatusText = hbTrId("txt_cp_dblist_bluetooth_val_on_and_visible");
+                btStatusIcon.setIconName("qtg_large_bluetooth");
+                break;
+            default:
+                BTUI_ASSERT_X(false, "BtCpUiSettingItem::updateStatus", "invalid visibility mode");
+        }
+    }
+    else {
+        //Bt is off.
+        btStatusText = hbTrId("txt_cp_dblist_bluetooth_val_off");
+        btStatusIcon.setIconName("qtg_large_bluetooth_off");
+    }
+        
+    this->setDescription(btStatusText);
+    this->setEntryItemIcon(btStatusIcon);
+}
 
 CpBaseSettingView *BtCpUiSettingItem::createSettingView() const
 {
--- a/bluetoothengine/btui/btcpplugin/btcpuisettingitem.h	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btui/btcpplugin/btcpuisettingitem.h	Mon Jul 12 18:51:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
  * All rights reserved.
  * This component and the accompanying materials are made available
  * under the terms of "Eclipse Public License v1.0""
@@ -24,22 +24,22 @@
 
 #include "btcpuimainview.h"
 
+class HbTranslator;
+
 class BtCpUiSettingItem : public CpSettingFormEntryItemData
 {
 	Q_OBJECT
 public:
-	explicit BtCpUiSettingItem(CpItemDataHelper &itemDataHelper,
-		const QString &text = QString(),
-		const QString &description = QString(),
-		const HbIcon &icon = HbIcon(),
-		const HbDataFormModelItem *parent = 0);	 
+	explicit BtCpUiSettingItem(CpItemDataHelper &itemDataHelper);	 
 	virtual ~BtCpUiSettingItem();
 private slots:
 	void onLaunchView();
 	void handleCloseView();
+	void handleDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
 private:
 	virtual CpBaseSettingView *createSettingView() const;
-	
+	void updateStatus();
+	void loadTranslators();
 private:
 	HbMainWindow* mMainWindow;
 	
@@ -51,6 +51,9 @@
 	
 	HbView *mCpView;
 	
+	HbTranslator *mViewTranslator;
+	HbTranslator *mDialogTranslator;
+	
 };
 
 #endif //BTCPUISETTINGITEM_H
--- a/bluetoothengine/btui/btcpplugin/btuiviewutil.h	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btui/btcpplugin/btuiviewutil.h	Mon Jul 12 18:51:05 2010 +0300
@@ -1,23 +1,19 @@
 /*
-* ============================================================================
-*  Name        : btuiviewutil.h
-*  Description : utilities in the view for some often used functions, 
-*
-*  Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies).
-*  All rights reserved.
-*  This component and the accompanying materials are made available
-*  under the terms of "Eclipse Public License v1.0"
-*  which accompanies this distribution, and is available
-*  at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-*  Initial Contributors:
-*  Nokia Corporation - initial contribution.
-*
-*  Contributors:
-*  Nokia Corporation
-* ============================================================================
-* Template version: 4.2
-*/
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0""
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ *   
+ */
 
 #ifndef BTUIVIEWUTIL_H
 #define BTUIVIEWUTIL_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/btui/btcpplugin/docml/bt-advanced-view.docml	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="1.1">
+    <object name="exitAction" type="HbAction">
+        <string locid="txt_common_opt_exit" name="text" value="Exit"/>
+    </object>
+    <widget name="bt_advanced_settings_view" type="HbView">
+        <widget name="viewMenu" role="HbView:menu" type="HbMenu">
+            <ref object="exitAction" role="HbWidget:addAction"/>
+        </widget>
+        <widget name="advancedSettingsContainer" role="HbView:widget" type="HbWidget">
+            <widget name="groupBox" type="HbGroupBox">
+                <sizehint type="PREFERRED" width="25un"/>
+                <bool name="collapsable" value="FALSE"/>
+                <string locid="txt_bt_subhead_bluetooth_advanced_settings" name="heading" value="Bluetooth - Advanced settings"/>
+            </widget>
+            <widget name="visibilityContainer" type="HbWidget">
+                <widget name="visibilityLabel" type="HbLabel">
+                    <string locid="txt_bt_setlabel_change_visibility_time" name="plainText" value="Change visibility time"/>
+                </widget>
+                <widget name="visibilitySlider" type="HbSlider">
+                    <integer name="majorTickInterval" value="5"/>
+                    <sizehint height="expr(var(hb-param-touch-area-gene-primary-medium) )" type="PREFERRED" width="var(hb-param-widget-dialog-width)"/>
+                    <enums name="orientation" value="Horizontal"/>
+                    <integer name="minorTickInterval" value="2"/>
+                    <integer name="value" value="15"/>
+                    <integer name="minimum" value="1"/>
+                    <integer name="maximum" value="60"/>
+                </widget>
+                <real name="z" value="0"/>
+                <sizepolicy horizontalPolicy="Ignored" horizontalStretch="0" verticalPolicy="Ignored" verticalStretch="0"/>
+                <sizehint height="23.8806un" type="PREFERRED" width="11.9403un"/>
+                <layout orientation="Vertical" spacing="0un" type="linear">
+                    <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+                    <linearitem itemname="visibilityLabel"/>
+                    <linearitem itemname="visibilitySlider"/>
+                </layout>
+            </widget>
+            <widget name="sapContainer" type="HbWidget">
+                <widget name="sapLabel" type="HbLabel">
+                    <string locid="txt_bt_setlabel_sim_access_profile" name="plainText" value="SIM access profile"/>
+                </widget>
+                <widget name="sapButton" type="HbPushButton">
+                    <sizehint type="PREFERRED" width="expr(var(hb-param-widget-dialog-width) )"/>
+                    <string locid="txt_bt_setlabel_sim_access_profile_val_disabled" name="text" value="Disabled"/>
+                    <enums name="textAlignment" value="AlignLeft|AlignLeading"/>
+                </widget>
+                <real name="z" value="0"/>
+                <sizepolicy horizontalPolicy="Ignored" horizontalStretch="0" verticalPolicy="Ignored" verticalStretch="0"/>
+                <sizehint height="23.8806un" type="PREFERRED" width="11.9403un"/>
+                <layout orientation="Vertical" spacing="0un" type="linear">
+                    <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+                    <linearitem itemname="sapLabel"/>
+                    <linearitem itemname="sapButton"/>
+                </layout>
+            </widget>
+            <widget name="container" type="HbWidget">
+                <sizehint height="23.8806un" type="PREFERRED" width="23.8806un"/>
+            </widget>
+            <real name="z" value="0"/>
+            <layout orientation="Vertical" spacing="0un" type="linear">
+                <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+                <linearitem itemname="groupBox"/>
+                <linearitem itemname="visibilityContainer"/>
+                <linearitem itemname="sapContainer"/>
+                <linearitem itemname="container"/>
+            </layout>
+        </widget>
+        <string locid="txt_cp_title_control_panel" name="title" value="Control Panel"/>
+    </widget>
+    <section name="landscape">
+        <widget name="visibilityContainer" type="HbWidget">
+            <sizepolicy horizontalPolicy="Ignored" horizontalStretch="0" verticalPolicy="Ignored" verticalStretch="0"/>
+            <layout orientation="Horizontal" spacing="0un" type="linear">
+                <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+                <linearitem itemname="visibilityLabel"/>
+                <linearitem itemname="visibilitySlider"/>
+            </layout>
+        </widget>
+        <widget name="visibilityLabel" type="HbLabel">
+            <sizepolicy horizontalPolicy="Expanding" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
+        </widget>
+        <widget name="sapContainer" type="HbWidget">
+            <sizepolicy horizontalPolicy="Ignored" horizontalStretch="0" verticalPolicy="Ignored" verticalStretch="0"/>
+            <layout orientation="Horizontal" spacing="0un" type="linear">
+                <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+                <linearitem itemname="sapLabel"/>
+                <linearitem itemname="sapButton"/>
+            </layout>
+        </widget>
+        <widget name="sapLabel" type="HbLabel">
+            <sizepolicy horizontalPolicy="Expanding" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
+        </widget>
+        <widget name="visibilitySlider" type="HbSlider">
+            <sizepolicy horizontalPolicy="Preferred" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
+        </widget>
+    </section>
+    <metadata activeUIState="landscape_ui" display="NHD-3.2-inch_landscape" unit="un">
+        <uistate name="Common ui state" sections="#common"/>
+        <uistate name="landscape_ui" sections="#common landscape"/>
+        <uistate name="portrait_ui" sections="#common"/>
+        <uistate name="landscape" sections="#common landscape"/>
+    </metadata>
+</hbdocument>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/btui/btcpplugin/docml/bt-device-details-view.docml	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="1.1">
+    <object name="exit" type="HbAction">
+        <string locid="txt_common_opt_exit" name="text" value="Exit"/>
+    </object>
+    <widget name="bt_device_details_view" type="HbView">
+        <string locid="txt_tsw_caption_control_panel" name="title" value="Control Panel"/>
+    </widget>
+    <section name="portrait"/>
+    <section name="landscape"/>
+    <metadata activeUIState="Common ui state" display="NHD-3.2-inch_portrait" unit="un">
+        <uistate name="Common ui state" sections="#common"/>
+        <uistate name="portrait" sections="#common"/>
+        <uistate name="portrait_UI" sections="#common portrait"/>
+        <uistate name="landscape" sections="#common landscape"/>
+    </metadata>
+</hbdocument>
--- a/bluetoothengine/btui/btcpplugin/docml/bt-device-view.docml	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btui/btcpplugin/docml/bt-device-view.docml	Mon Jul 12 18:51:05 2010 +0300
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<hbdocument version="1.0">
+<hbdocument version="1.1">
     <object name="Menu_item_exit" type="HbAction">
-        <string name="text" value="Exit"/>
+        <string locid="txt_common_opt_exit" name="text" value="Exit"/>
     </object>
     <widget name="bt_device_view" type="HbView">
         <widget name="content" role="HbView:widget" type="HbWidget">
@@ -10,7 +10,7 @@
                 <sizepolicy horizontalPolicy="Expanding" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
                 <sizehint height="4.92537un" type="PREFERRED" width="53.73134un"/>
                 <bool name="collapsable" value="FALSE"/>
-                <string name="heading" value="Di's Vasco"/>
+                <string locid="txt_bt_subhead_bluetooth_device" name="heading" value="Bluetooth device"/>
             </widget>
             <widget name="deviceCategory" type="HbLabel">
                 <real name="z" value="3"/>
@@ -21,46 +21,48 @@
             <widget name="deviceStatus" type="HbLabel">
                 <real name="z" value="4"/>
                 <sizehint height="var(hb-param-text-height-secondary)" type="PREFERRED" width="39.70149un"/>
-                <string name="plainText" value="Connected"/>
+                <string name="plainText" value="Paired Connected"/>
             </widget>
-            <widget name="deviceName" type="HbTextEdit">
+            <widget name="deviceName" type="HbLineEdit">
                 <real name="z" value="2"/>
-                <sizehint height="var(hb-param-text-height-primary)" type="PREFERRED" width="39.70149un"/>
-                <string name="plainText" value="Wang's N97"/>
+                <sizehint height="expr(var(hb-param-graphic-size-primary-large) )" type="PREFERRED" width="39.70149un"/>
+                <string name="text" value="Wang's N97"/>
             </widget>
             <widget name="deviceIcon" type="HbLabel">
                 <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
-                <icon iconName="note_warning" name="icon"/>
+                <icon iconName="qtg_large_mobile" name="icon"/>
                 <real name="z" value="1"/>
                 <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
                 <sizehint height="var(hb-param-graphic-size-primary-large)" type="PREFERRED" width="var(hb-param-graphic-size-primary-large)"/>
                 <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
             </widget>
-            <widget name="combo_label" type="HbLabel">
-                <real name="z" value="1"/>
-                <sizehint height="var(hb-param-text-height-primary)" type="PREFERRED" width="49.70149un"/>
-                <string name="plainText" value="Connection:"/>
-            </widget>
-            <widget name="combobox" type="HbComboBox">
-                <container name="items" type="stringlist">
-                    <string value="Combobox"/>
-                </container>
+            <widget name="connectionCombobox" type="HbDataForm">
+                <enums name="verticalScrollBarPolicy" value="ScrollBarAlwaysOff"/>
+                <enums name="horizontalScrollBarPolicy" value="ScrollBarAlwaysOff"/>
+                <enums name="selectionMode" value="NoSelection"/>
                 <real name="z" value="2"/>
-                <sizehint height="7.46269un" type="PREFERRED" width="45.67164un"/>
+                <sizehint height="16.41791un" type="PREFERRED" width="53.73134un"/>
+                <string name="description"/>
             </widget>
             <widget name="pushButton_0" type="HbPushButton">
-                <real name="z" value="2"/>
-                <sizehint height="7.46269un" type="PREFERRED" width="49.70149un"/>
+                <icon iconName="qtg_mono_bt_unpair" name="icon"/>
+                <real name="z" value="5"/>
+                <sizehint height="9un" type="PREFERRED"/>
+                <enums name="orientation" value="Horizontal"/>
                 <string name="text" value="Unpair"/>
             </widget>
             <widget name="pushButton_1" type="HbPushButton">
-                <real name="z" value="5"/>
-                <sizehint height="7.46269un" type="PREFERRED"/>
+                <icon iconName="qtg_mono_disconnect" name="icon"/>
+                <real name="z" value="6"/>
+                <sizehint height="9un" type="PREFERRED"/>
+                <enums name="orientation" value="Horizontal"/>
                 <string name="text" value="Disconnect"/>
             </widget>
             <widget name="pushButton_2" type="HbPushButton">
-                <real name="z" value="6"/>
-                <sizehint height="7.46269un" type="PREFERRED"/>
+                <icon iconName="qtg_mono_settings" name="icon"/>
+                <real name="z" value="7"/>
+                <sizehint height="9un" type="PREFERRED"/>
+                <enums name="orientation" value="Horizontal"/>
                 <string name="text" value="Settings"/>
             </widget>
             <layout type="anchor">
@@ -72,33 +74,30 @@
                 <anchoritem dst="deviceName" dstEdge="LEFT" spacing="2un" src="deviceIcon" srcEdge="RIGHT"/>
                 <anchoritem dst="deviceName" dstEdge="TOP" spacing="var(hb-param-margin-gene-top)" src="groupBox_deviceView" srcEdge="BOTTOM"/>
                 <anchoritem dst="deviceName" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-right)" src="" srcEdge="RIGHT"/>
-                <anchoritem dst="combobox" dstEdge="LEFT" spacing="6un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="combobox" dstEdge="TOP" spacing="var(hb-param-margin-gene-middle-vertical)" src="combo_label" srcEdge="BOTTOM"/>
-                <anchoritem dst="combobox" dstEdge="RIGHT" spacing="-2un" src="" srcEdge="RIGHT"/>
                 <anchoritem dst="deviceStatus" dstEdge="LEFT" spacing="12un" src="" srcEdge="LEFT"/>
                 <anchoritem dst="deviceStatus" dstEdge="TOP" spacing="var(hb-param-margin-gene-bottom)" src="deviceCategory" srcEdge="BOTTOM"/>
                 <anchoritem dst="deviceStatus" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-right)" src="" srcEdge="RIGHT"/>
                 <anchoritem dst="deviceCategory" dstEdge="LEFT" spacing="2un" src="deviceIcon" srcEdge="RIGHT"/>
                 <anchoritem dst="deviceCategory" dstEdge="TOP" spacing="var(hb-param-margin-gene-middle-vertical)" src="deviceName" srcEdge="BOTTOM"/>
                 <anchoritem dst="deviceCategory" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-right)" src="" srcEdge="RIGHT"/>
-                <anchoritem dst="combo_label" dstEdge="LEFT" spacing="var(hb-param-margin-gene-left)" src="" srcEdge="LEFT"/>
-                <anchoritem dst="combo_label" dstEdge="TOP" spacing="var(hb-param-margin-gene-top)" src="deviceStatus" srcEdge="BOTTOM"/>
-                <anchoritem dst="combo_label" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-right)" src="" srcEdge="RIGHT"/>
-                <anchoritem dst="pushButton_0" dstEdge="LEFT" spacing="var(hb-param-margin-gene-left)" src="" srcEdge="LEFT"/>
-                <anchoritem dst="pushButton_0" dstEdge="TOP" spacing="var(hb-param-margin-gene-top)" src="combobox" srcEdge="BOTTOM"/>
-                <anchoritem dst="pushButton_0" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-right)" src="" srcEdge="RIGHT"/>
-                <anchoritem dst="pushButton_1" dstEdge="LEFT" spacing="var(hb-param-margin-gene-left)" src="" srcEdge="LEFT"/>
-                <anchoritem dst="pushButton_1" dstEdge="TOP" spacing="var(hb-param-margin-gene-middle-vertical)" src="pushButton_0" srcEdge="BOTTOM"/>
-                <anchoritem dst="pushButton_1" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-right)" src="" srcEdge="RIGHT"/>
-                <anchoritem dst="pushButton_2" dstEdge="LEFT" spacing="var(hb-param-margin-gene-left)" src="" srcEdge="LEFT"/>
-                <anchoritem dst="pushButton_2" dstEdge="TOP" spacing="var(hb-param-margin-gene-top)" src="pushButton_1" srcEdge="BOTTOM"/>
-                <anchoritem dst="pushButton_2" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-right)" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="pushButton_2" dstEdge="LEFT" spacing="expr(var(hb-param-margin-gene-left) )" src="" srcEdge="LEFT"/>
+                <anchoritem dst="pushButton_2" dstEdge="TOP" spacing="expr(var(hb-param-margin-gene-bottom) )" src="pushButton_1" srcEdge="BOTTOM"/>
+                <anchoritem dst="pushButton_2" dstEdge="RIGHT" spacing="expr(-var(hb-param-margin-gene-right) )" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="connectionCombobox" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+                <anchoritem dst="connectionCombobox" dstEdge="TOP" spacing="expr(var(hb-param-margin-gene-top) )" src="deviceStatus" srcEdge="BOTTOM"/>
+                <anchoritem dst="connectionCombobox" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="pushButton_1" dstEdge="LEFT" spacing="expr(var(hb-param-margin-gene-left) )" src="" srcEdge="LEFT"/>
+                <anchoritem dst="pushButton_1" dstEdge="TOP" spacing="expr(var(hb-param-margin-gene-middle-vertical) )" src="pushButton_0" srcEdge="BOTTOM"/>
+                <anchoritem dst="pushButton_1" dstEdge="RIGHT" spacing="expr(-var(hb-param-margin-gene-right) )" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="pushButton_0" dstEdge="LEFT" spacing="expr(var(hb-param-margin-gene-left) )" src="" srcEdge="LEFT"/>
+                <anchoritem dst="pushButton_0" dstEdge="TOP" spacing="expr(var(hb-param-margin-gene-top) )" src="connectionCombobox" srcEdge="BOTTOM"/>
+                <anchoritem dst="pushButton_0" dstEdge="RIGHT" spacing="expr(-var(hb-param-margin-gene-right) )" src="" srcEdge="RIGHT"/>
             </layout>
         </widget>
         <widget name="viewMenu" role="HbView:menu" type="HbMenu">
-            <ref object="Menu_item_exit" role="HbMenu:addAction"/>
+            <ref object="Menu_item_exit" role="HbWidget:addAction"/>
         </widget>
-        <string name="title" value="Control Panel"/>
+        <string locid="txt_cp_title_control_panel" name="title" value="Control Panel"/>
     </widget>
     <section name="landscape">
         <widget name="content" role="HbView:widget" type="HbWidget">
@@ -113,31 +112,57 @@
                 <anchoritem dst="deviceName" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-right)" src="" srcEdge="RIGHT"/>
                 <anchoritem dst="deviceCategory" dstEdge="LEFT" spacing="2un" src="deviceIcon" srcEdge="RIGHT"/>
                 <anchoritem dst="deviceCategory" dstEdge="TOP" spacing="var(hb-param-margin-gene-middle-vertical)" src="deviceName" srcEdge="BOTTOM"/>
-                <anchoritem dst="deviceStatus" dstEdge="LEFT" spacing="var(hb-param-margin-gene-middle-horizontal)" src="deviceCategory" srcEdge="RIGHT"/>
-                <anchoritem dst="deviceStatus" dstEdge="TOP" spacing="var(hb-param-margin-gene-middle-vertical)" src="deviceName" srcEdge="BOTTOM"/>
+                <anchoritem dst="deviceStatus" dstEdge="LEFT" spacing="expr(var(hb-param-margin-gene-middle-horizontal) )" src="deviceCategory" srcEdge="RIGHT"/>
+                <anchoritem dst="deviceStatus" dstEdge="TOP" spacing="expr(var(hb-param-margin-gene-middle-vertical) )" src="deviceName" srcEdge="BOTTOM"/>
                 <anchoritem dst="deviceStatus" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-right)" src="" srcEdge="RIGHT"/>
-                <anchoritem dst="combo_label" dstEdge="LEFT" spacing="var(hb-param-margin-gene-left)" src="" srcEdge="LEFT"/>
-                <anchoritem dst="combo_label" dstEdge="TOP" spacing="var(hb-param-margin-gene-top)" src="deviceStatus" srcEdge="BOTTOM"/>
-                <anchoritem dst="combobox" dstEdge="LEFT" spacing="var(hb-param-margin-gene-middle-horizontal)" src="combo_label" srcEdge="RIGHT"/>
-                <anchoritem dst="combobox" dstEdge="TOP" spacing="var(hb-param-margin-gene-bottom)" src="deviceStatus" srcEdge="BOTTOM"/>
-                <anchoritem dst="combobox" dstEdge="RIGHT" spacing="-2un" src="" srcEdge="RIGHT"/>
-                <anchoritem dst="pushButton_0" dstEdge="LEFT" spacing="var(hb-param-margin-gene-left)" src="" srcEdge="LEFT"/>
-                <anchoritem dst="pushButton_0" dstEdge="TOP" spacing="var(hb-param-margin-gene-top)" src="combobox" srcEdge="BOTTOM"/>
+                <anchoritem dst="connectionCombobox" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+                <anchoritem dst="connectionCombobox" dstEdge="TOP" spacing="expr(var(hb-param-margin-gene-bottom)  )" src="deviceStatus" srcEdge="BOTTOM"/>
+                <anchoritem dst="connectionCombobox" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="pushButton_0" dstEdge="LEFT" spacing="expr(var(hb-param-margin-gene-left) )" src="" srcEdge="LEFT"/>
+                <anchoritem dst="pushButton_0" dstEdge="TOP" spacing="expr(var(hb-param-margin-gene-top) )" src="connectionCombobox" srcEdge="BOTTOM"/>
                 <anchoritem dst="pushButton_0" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-right)" src="" srcEdge="CENTERH"/>
                 <anchoritem dst="pushButton_1" dstEdge="LEFT" spacing="var(hb-param-margin-gene-middle-horizontal)" src="pushButton_0" srcEdge="RIGHT"/>
-                <anchoritem dst="pushButton_1" dstEdge="TOP" spacing="var(hb-param-margin-gene-top)" src="combobox" srcEdge="BOTTOM"/>
-                <anchoritem dst="pushButton_1" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-right)" src="" srcEdge="RIGHT"/>
-                <anchoritem dst="pushButton_2" dstEdge="LEFT" spacing="var(hb-param-margin-gene-left)" src="" srcEdge="LEFT"/>
+                <anchoritem dst="pushButton_1" dstEdge="TOP" spacing="expr(var(hb-param-margin-gene-top) )" src="connectionCombobox" srcEdge="BOTTOM"/>
+                <anchoritem dst="pushButton_1" dstEdge="RIGHT" spacing="expr(-var(hb-param-margin-gene-right) )" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="pushButton_2" dstEdge="LEFT" spacing="expr(var(hb-param-margin-gene-left) )" src="" srcEdge="LEFT"/>
                 <anchoritem dst="pushButton_2" dstEdge="TOP" spacing="var(hb-param-margin-gene-middle-vertical)" src="pushButton_1" srcEdge="BOTTOM"/>
-                <anchoritem dst="pushButton_2" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-right)" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="pushButton_2" dstEdge="RIGHT" spacing="expr(-var(hb-param-margin-gene-right) )" src="" srcEdge="RIGHT"/>
             </layout>
         </widget>
-        <widget name="deviceCategory" type="HbLabel">
-            <sizehint height="var(hb-param-text-height-secondary)" type="PREFERRED" width="39.70149un"/>
-        </widget>
     </section>
-    <section name="portrait"/>
-    <metadata activeUIState="portrait" display="NHD portrait" unit="un">
+    <section name="portrait">
+    	<widget name="content" role="HbView:widget" type="HbWidget">
+    		<layout type="anchor">
+                <anchoritem dst="groupBox_deviceView" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+                <anchoritem dst="groupBox_deviceView" dstEdge="TOP" spacing="0un" src="" srcEdge="TOP"/>
+                <anchoritem dst="groupBox_deviceView" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="deviceIcon" dstEdge="LEFT" spacing="var(hb-param-margin-gene-left)" src="" srcEdge="LEFT"/>
+                <anchoritem dst="deviceIcon" dstEdge="TOP" spacing="var(hb-param-margin-gene-top)" src="groupBox_deviceView" srcEdge="BOTTOM"/>
+                <anchoritem dst="deviceName" dstEdge="LEFT" spacing="2un" src="deviceIcon" srcEdge="RIGHT"/>
+                <anchoritem dst="deviceName" dstEdge="TOP" spacing="var(hb-param-margin-gene-top)" src="groupBox_deviceView" srcEdge="BOTTOM"/>
+                <anchoritem dst="deviceName" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-right)" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="deviceStatus" dstEdge="LEFT" spacing="12un" src="" srcEdge="LEFT"/>
+                <anchoritem dst="deviceStatus" dstEdge="TOP" spacing="var(hb-param-margin-gene-bottom)" src="deviceCategory" srcEdge="BOTTOM"/>
+                <anchoritem dst="deviceStatus" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-right)" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="deviceCategory" dstEdge="LEFT" spacing="2un" src="deviceIcon" srcEdge="RIGHT"/>
+                <anchoritem dst="deviceCategory" dstEdge="TOP" spacing="var(hb-param-margin-gene-middle-vertical)" src="deviceName" srcEdge="BOTTOM"/>
+                <anchoritem dst="deviceCategory" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-right)" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="pushButton_2" dstEdge="LEFT" spacing="expr(var(hb-param-margin-gene-left) )" src="" srcEdge="LEFT"/>
+                <anchoritem dst="pushButton_2" dstEdge="TOP" spacing="expr(var(hb-param-margin-gene-bottom) )" src="pushButton_1" srcEdge="BOTTOM"/>
+                <anchoritem dst="pushButton_2" dstEdge="RIGHT" spacing="expr(-var(hb-param-margin-gene-right) )" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="connectionCombobox" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+                <anchoritem dst="connectionCombobox" dstEdge="TOP" spacing="expr(var(hb-param-margin-gene-top) )" src="deviceStatus" srcEdge="BOTTOM"/>
+                <anchoritem dst="connectionCombobox" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="pushButton_1" dstEdge="LEFT" spacing="expr(var(hb-param-margin-gene-left) )" src="" srcEdge="LEFT"/>
+                <anchoritem dst="pushButton_1" dstEdge="TOP" spacing="expr(var(hb-param-margin-gene-middle-vertical) )" src="pushButton_0" srcEdge="BOTTOM"/>
+                <anchoritem dst="pushButton_1" dstEdge="RIGHT" spacing="expr(-var(hb-param-margin-gene-right) )" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="pushButton_0" dstEdge="LEFT" spacing="expr(var(hb-param-margin-gene-left) )" src="" srcEdge="LEFT"/>
+                <anchoritem dst="pushButton_0" dstEdge="TOP" spacing="expr(var(hb-param-margin-gene-top) )" src="connectionCombobox" srcEdge="BOTTOM"/>
+                <anchoritem dst="pushButton_0" dstEdge="RIGHT" spacing="expr(-var(hb-param-margin-gene-right) )" src="" srcEdge="RIGHT"/>
+            </layout>
+    	</widget>
+    </section>
+    <metadata activeUIState="Common ui state" display="NHD-3.2-inch_portrait" unit="un">
         <uistate name="Common ui state" sections="#common"/>
         <uistate name="landscape" sections="#common landscape"/>
         <uistate name="portrait" sections="#common portrait"/>
--- a/bluetoothengine/btui/btcpplugin/docml/bt-main-view.docml	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btui/btcpplugin/docml/bt-main-view.docml	Mon Jul 12 18:51:05 2010 +0300
@@ -1,50 +1,53 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<hbdocument version="1.0">
+<hbdocument version="1.1">
     <object name="allAction" type="HbAction">
-        <string name="text" value="All"/>
+        <icon iconName="qtg_mono_bt_show_all" name="icon"/>
+        <string name="text"/>
     </object>
     <object name="pairedAction" type="HbAction">
-        <string name="text" value="Paired"/>
+        <icon iconName="qtg_mono_bt_show_pair" name="icon"/>
+        <string name="text"/>
     </object>
     <object name="discoverAction" type="HbAction">
-        <string name="text" value="Discover"/>
+        <icon iconName="qtg_mono_search" name="icon"/>
+        <string name="text"/>
     </object>
     <object name="advanceSettings" type="HbAction">
-        <string name="text" value="Advanced Settings"/>
+        <string locid="txt_bt_opt_advanced_settings" name="text" value="Advanced Settings"/>
     </object>
     <object name="audioDevices" type="HbAction">
-        <string name="text" value="Audio Devices"/>
+        <string locid="txt_bt_list_audio_device" name="text" value="Audio Devices"/>
     </object>
     <object name="computers" type="HbAction">
-        <string name="text" value="Computers"/>
+        <string locid="txt_bt_list_computer" name="text" value="Computers"/>
     </object>
     <object name="inputDevices" type="HbAction">
-        <string name="text" value="Input Devices"/>
+        <string locid="txt_bt_list_input_device" name="text" value="Input Devices"/>
     </object>
     <object name="otherDevices" type="HbAction">
-        <string name="text" value="Other Devices"/>
+        <string locid="txt_bt_list_other" name="text" value="Other Devices"/>
     </object>
     <object name="removePairedDevices" type="HbAction">
-        <string name="text" value="Remove Paired Devices"/>
+        <string locid="txt_bt_opt_remove_paired_devices" name="text" value="Remove Paired Devices"/>
     </object>
     <object name="exit" type="HbAction">
-        <string name="text" value="Exit"/>
+        <string locid="txt_common_opt_exit" name="text" value="Exit"/>
     </object>
     <object name="phones" type="HbAction">
-        <string name="text" value="Phones"/>
+        <string locid="txt_bt_list_phone" name="text" value="Phones"/>
     </object>
     <widget name="view" type="HbView">
         <widget name="content" role="HbView:widget" type="HbWidget">
             <widget name="toolBar" type="HbToolBar">
                 <sizehint height="7.46269un" type="PREFERRED" width="22.38806un"/>
-                <ref object="allAction" role="HbToolBar:addAction"/>
-                <ref object="pairedAction" role="HbToolBar:addAction"/>
-                <ref object="discoverAction" role="HbToolBar:addAction"/>
+                <ref object="allAction" role="HbWidget:addAction"/>
+                <ref object="pairedAction" role="HbWidget:addAction"/>
+                <ref object="discoverAction" role="HbWidget:addAction"/>
             </widget>
             <widget name="container_1" type="HbWidget">
                 <widget name="groupBox" type="HbGroupBox">
                     <bool name="collapsable" value="FALSE"/>
-                    <string name="heading" value="Bluetooth"/>
+                    <string locid="txt_bt_subhead_bluetooth_paired_devices" name="heading" value="Bluetooth"/>
                 </widget>
                 <widget name="container" type="HbWidget">
                     <widget name="icon" type="HbLabel">
@@ -59,13 +62,12 @@
                         <real name="z" value="2"/>
                         <sizehint height="var(hb-param-graphic-size-primary-large)" type="PREFERRED" width="var(hb-param-graphic-size-primary-large)"/>
                         <sizehint height="var(hb-param-graphic-size-primary-large)" type="MAXIMUM" width="var(hb-param-graphic-size-primary-large)"/>
-                        <string name="text" value="On"/>
+                        <string name="text"/>
                     </widget>
                     <widget name="combobox" type="HbComboBox">
                         <container name="items" type="stringlist">
-                            <string value="Hidden"/>
-                            <string value="Visible"/>
-                            <string value="Visible for 5 Min"/>
+                            <string locid="txt_bt_setlabel_visibility_val_hidden" value="Hidden"/>
+                            <string locid="txt_bt_setlabel_visibility_val_visible" value="Visible"/>
                         </container>
                         <real name="z" value="4"/>
                         <sizepolicy horizontalPolicy="Preferred" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
@@ -73,10 +75,10 @@
                     </widget>
                     <widget name="lineEdit" type="HbLineEdit">
                         <real name="z" value="3"/>
+                        <sizehint height="var(hb-param-graphic-size-primary-large)" type="PREFERRED" width="34un"/>
+                        <string name="text" value="Text"/>
                         <integer name="maxLength" value="30"/>
                         <sizepolicy horizontalPolicy="Preferred" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
-                        <sizehint height="var(hb-param-graphic-size-primary-large)" type="PREFERRED" width="34un"/>
-                        <string name="text" value="Text"/>
                     </widget>
                     <real name="z" value="0"/>
                     <sizehint height="23.8806un" type="PREFERRED" width="23.8806un"/>
@@ -105,10 +107,11 @@
             </widget>
             <widget name="listView" type="HbListView">
                 <widget name="listItemPrototype" role="HbAbstractView:prototype" type="HbListViewItem"/>
+                <enums name="selectionMode" value="NoSelection"/>
                 <sizehint height="47.7612un" type="PREFERRED" width="35.8209un"/>
-                <enums name="selectionMode" value="NoSelection"/>
             </widget>
-            <layout orientation="Vertical" type="linear">
+            <layout orientation="Vertical" spacing="var(hb-param-margin-gene-middle-vertical)" type="linear">
+                <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
                 <linearitem itemname="container_1"/>
                 <linearitem itemname="listView"/>
                 <linearitem itemname="toolBar"/>
@@ -116,34 +119,20 @@
         </widget>
         <widget name="viewMenu" role="HbView:menu" type="HbMenu">
             <widget name="subMenu" role="HbMenu:menu" type="HbMenu">
-                <ref object="audioDevices" role="HbMenu:addAction"/>
-                <ref object="computers" role="HbMenu:addAction"/>
-                <ref object="phones" role="HbMenu:addAction"/>
-                <ref object="inputDevices" role="HbMenu:addAction"/>
-                <ref object="otherDevices" role="HbMenu:addAction"/>
-                <string name="title" value="Show Only"/>
+                <ref object="audioDevices" role="HbWidget:addAction"/>
+                <ref object="computers" role="HbWidget:addAction"/>
+                <ref object="phones" role="HbWidget:addAction"/>
+                <ref object="inputDevices" role="HbWidget:addAction"/>
+                <ref object="otherDevices" role="HbWidget:addAction"/>
+                <string locid="txt_bt_opt_show" name="title" value="Show Only"/>
             </widget>
-            <ref object="advanceSettings" role="HbMenu:addAction"/>
-            <ref object="removePairedDevices" role="HbMenu:addAction"/>
-            <ref object="exit" role="HbMenu:addAction"/>
+            <ref object="advanceSettings" role="HbWidget:addAction"/>
+            <ref object="removePairedDevices" role="HbWidget:addAction"/>
+            <ref object="exit" role="HbWidget:addAction"/>
         </widget>
-        <string name="title" value="Control Panel"/>
+        <string locid="txt_cp_title_control_panel" name="title" value="Control Panel"/>
     </widget>
     <section name="portrait">
-        <widget name="lineEdit" type="HbLineEdit">
-            <sizehint type="PREFERRED" width="29.25373un"/>
-        </widget>
-        <widget name="pushButton" type="HbPushButton">
-            <sizehint height="var(hb-param-graphic-size-primary-large)" type="PREFERRED" width="var(hb-param-graphic-size-primary-large)"/>
-            <sizehint height="var(hb-param-graphic-size-primary-large)" type="MAXIMUM" width="var(hb-param-graphic-size-primary-large)"/>
-        </widget>
-        <widget name="combobox" type="HbComboBox">
-            <sizehint height="var(hb-param-graphic-size-primary-large)" type="PREFERRED" width="31.34328un"/>
-        </widget>
-        <widget name="icon" type="HbLabel">
-            <sizehint height="var(hb-param-graphic-size-primary-large)" type="PREFERRED" width="var(hb-param-graphic-size-primary-large)"/>
-            <sizehint height="var(hb-param-graphic-size-primary-large)" type="MAXIMUM" width="var(hb-param-graphic-size-primary-large)"/>
-        </widget>
         <widget name="container" type="HbWidget">
             <layout type="anchor">
                 <anchoritem dst="icon" dstEdge="LEFT" spacing="var(hb-param-margin-gene-left)" src="" srcEdge="LEFT"/>
@@ -160,6 +149,10 @@
                 <anchoritem dst="pushButton" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
             </layout>
         </widget>
+        <widget name="pushButton" type="HbPushButton">
+            <sizehint height="var(hb-param-graphic-size-primary-large)" type="PREFERRED" width="var(hb-param-graphic-size-primary-large)"/>
+            <sizehint height="var(hb-param-graphic-size-primary-large)" type="MAXIMUM" width="var(hb-param-graphic-size-primary-large)"/>
+        </widget>
         <widget name="content" role="HbView:widget" type="HbWidget">
             <layout orientation="Vertical" spacing="var(hb-param-margin-gene-middle-vertical)" type="linear">
                 <linearitem itemname="groupBox"/>
@@ -168,17 +161,18 @@
                 <linearitem itemname="toolBar"/>
             </layout>
         </widget>
-    </section>
-    <section name="landscape">
+        <widget name="icon" type="HbLabel">
+            <sizehint height="var(hb-param-graphic-size-primary-large)" type="PREFERRED" width="var(hb-param-graphic-size-primary-large)"/>
+            <sizehint height="var(hb-param-graphic-size-primary-large)" type="MAXIMUM" width="var(hb-param-graphic-size-primary-large)"/>
+        </widget>
         <widget name="lineEdit" type="HbLineEdit">
-            <sizehint height="var(hb-param-graphic-size-primary-large)" type="PREFERRED" width="33un"/>
+            <sizehint type="PREFERRED" width="29.25373un"/>
         </widget>
         <widget name="combobox" type="HbComboBox">
-            <sizehint height="var(hb-param-graphic-size-primary-large)" type="PREFERRED" width="34.92537un"/>
+            <sizehint height="var(hb-param-graphic-size-primary-large)" type="PREFERRED" width="31.34328un"/>
         </widget>
-        <widget name="icon" type="HbLabel">
-            <sizehint height="var(hb-param-graphic-size-primary-large)" type="PREFERRED" width="var(hb-param-graphic-size-primary-large)"/>
-        </widget>
+    </section>
+    <section name="landscape">
         <widget name="container" type="HbWidget">
             <layout type="anchor">
                 <anchoritem dst="icon" dstEdge="LEFT" spacing="var(hb-param-margin-gene-left)" src="" srcEdge="LEFT"/>
@@ -192,8 +186,17 @@
                 <anchoritem dst="pushButton" dstEdge="TOP" spacing="expr(var(hb-param-margin-gene-top) )" src="" srcEdge="TOP"/>
             </layout>
         </widget>
+        <widget name="icon" type="HbLabel">
+            <sizehint height="var(hb-param-graphic-size-primary-large)" type="PREFERRED" width="var(hb-param-graphic-size-primary-large)"/>
+        </widget>
+        <widget name="lineEdit" type="HbLineEdit">
+            <sizehint height="var(hb-param-graphic-size-primary-large)" type="PREFERRED" width="33un"/>
+        </widget>
+        <widget name="combobox" type="HbComboBox">
+            <sizehint height="var(hb-param-graphic-size-primary-large)" type="PREFERRED" width="34.92537un"/>
+        </widget>
     </section>
-    <metadata activeUIState="landscape" display="NHD landscape" unit="un">
+    <metadata activeUIState="Common ui state" display="NHD-3.2-inch_portrait" unit="un">
         <uistate name="Common ui state" sections="#common"/>
         <uistate name="portrait" sections="#common"/>
         <uistate name="portrait_UI" sections="#common portrait"/>
--- a/bluetoothengine/btui/btcpplugin/docml/bt-search-view.docml	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btui/btcpplugin/docml/bt-search-view.docml	Mon Jul 12 18:51:05 2010 +0300
@@ -1,20 +1,23 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <hbdocument version="1.1">
     <object name="viewByAction" type="HbAction">
-        <string name="text" value="View by"/>
+        <icon iconName="qtg_mono_filter" name="icon"/>
+        <string name="text"/>
         <bool name="visible" value="TRUE"/>
     </object>
     <object name="stopAction" type="HbAction">
-        <string name="text" value="Stop"/>
+        <icon iconName="qtg_mono_search_stop" name="icon"/>
+        <string name="text"/>
     </object>
     <object name="retryAction" type="HbAction">
-        <string name="text" value="Retry"/>
+        <icon iconName="qtg_mono_search" name="icon"/>
+        <string name="text"/>
     </object>
     <object name="exitAction" type="HbAction">
-        <string name="text" value="Exit"/>
+        <string locid="txt_common_opt_exit" name="text" value="Exit"/>
     </object>
     <object name="connectAction" type="HbAction">
-        <string name="text" value="Connect"/>
+        <string locid="txt_bt_menu_connect" name="text" value="Connect"/>
     </object>
     <object name="disconnectAction" type="HbAction">
         <string name="text" value="Disconnect"/>
@@ -26,7 +29,7 @@
                     <real name="z" value="3"/>
                     <sizehint height="var(hb-param-graphic-size-primary-large)" type="PREFERRED" width="38.20896un"/>
                     <bool name="visible" value="TRUE"/>
-                    <string name="plainText" value="Bluetooth - Found devices"/>
+                    <string locid="txt_bt_subhead_bluetooth_found_devices" name="plainText" value="Bluetooth - Found devices"/>
                 </widget>
                 <widget name="icon" type="HbLabel">
                     <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
@@ -40,7 +43,7 @@
                     <real name="z" value="3"/>
                     <sizehint height="var(hb-param-graphic-size-primary-large)" type="PREFERRED" width="38.20896un"/>
                     <bool name="visible" value="TRUE"/>
-                    <string name="plainText" value="Searching..."/>
+                    <string locid="txt_bt_subhead_searching" name="plainText" value="Searching..."/>
                 </widget>
                 <real name="z" value="0"/>
                 <sizehint height="21un" type="PREFERRED" width="51.19403un"/>
@@ -59,9 +62,7 @@
                 </layout>
             </widget>
             <widget name="toolBar" type="HbToolBar">
-                <real name="z" value="2"/>
-                <sizehint height="7.46269un" type="PREFERRED" width="52.98508un"/>
-                <bool name="visible" value="TRUE"/>
+                <sizehint height="7.46269un" type="PREFERRED" width="22.38806un"/>
                 <ref object="viewByAction" role="HbWidget:addAction"/>
                 <ref object="stopAction" role="HbWidget:addAction"/>
                 <ref object="retryAction" role="HbWidget:addAction"/>
@@ -72,7 +73,6 @@
             </widget>
             <real name="z" value="0"/>
             <layout orientation="Vertical" type="linear">
-                <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
                 <linearitem itemname="search_container"/>
                 <linearitem itemname="deviceList"/>
                 <linearitem itemname="toolBar"/>
@@ -82,7 +82,7 @@
             <ref object="exitAction" role="HbWidget:addAction"/>
             <ref object="connectAction" role="HbWidget:addAction"/>
         </widget>
-        <string name="title" value="Control Panel"/>
+        <string locid="txt_cp_title_control_panel" name="title" value="Control Panel"/>
         <real name="z" value="1"/>
     </widget>
     <section name="landscape">
@@ -106,6 +106,7 @@
         <uistate name="Common ui state" sections="#common"/>
         <uistate name="landscape_ui" sections="#common landscape"/>
         <uistate name="portrait_ui" sections="#common"/>
-        <dummydata objectName="deviceList" section="#common" value="app_list_template5"/>
+        <uistate name="landscape" sections="#common landscape"/>
+        <dummydata objectName="deviceList" section="#common" value="0"/>
     </metadata>
 </hbdocument>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/btui/btdevsettingframework/btdevsettingframework.pro	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,51 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+
+TEMPLATE = lib
+TARGET = btdevsettingframework
+
+MOC_DIR = moc
+DEFINES += BUILD_BTDEVSETTINGFRAMEWORK
+    
+CONFIG += qt \
+    hb \
+    dll
+
+INCLUDEPATH += ../../../btservices_plat/bt_remote_device_setting_api/inc
+
+HEADERS += \
+       ../../../btservices_plat/bt_remote_device_setting_api/inc/btabstractdevsetting.h
+
+
+SOURCES += src/btabstractdevsetting.cpp \
+		   src/btdevsettingpluginloader.cpp
+
+defFilePath = .
+
+symbian: { 
+    SYMBIAN_PLATFORMS = WINSCW \
+        ARMV5
+        
+        BLD_INF_RULES.prj_exports += \
+          "$${LITERAL_HASH}include<platform_paths.hrh>" \
+          "rom/btdevsettingframework.iby CORE_MW_LAYER_IBY_EXPORT_PATH(btdevsettingframework.iby)"
+		  
+    TARGET.EPOCALLOWDLLDATA = 1
+    TARGET.UID3 = 0xEEEEEEEE
+    TARGET.CAPABILITY = CAP_GENERAL_DLL
+    
+    INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/btui/btdevsettingframework/bwins/btdevsettingframeworku.def	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,24 @@
+EXPORTS
+	?aboutToClose@BtAbstractDevSetting@@UAEXXZ @ 1 NONAME ; void BtAbstractDevSetting::aboutToClose(void)
+	??0BtAbstractDevSetting@@QAE@ABVQString@@PAVQObject@@@Z @ 2 NONAME ; BtAbstractDevSetting::BtAbstractDevSetting(class QString const &, class QObject *)
+	?tr@BtAbstractDevSetting@@SA?AVQString@@PBD0H@Z @ 3 NONAME ; class QString BtAbstractDevSetting::tr(char const *, char const *, int)
+	?staticMetaObject@BtAbstractDevSetting@@2UQMetaObject@@B @ 4 NONAME ; struct QMetaObject const BtAbstractDevSetting::staticMetaObject
+	?tr@BtAbstractDevSetting@@SA?AVQString@@PBD0@Z @ 5 NONAME ; class QString BtAbstractDevSetting::tr(char const *, char const *)
+	?isSettingAvailable@BtAbstractDevSetting@@UAE_NXZ @ 6 NONAME ; bool BtAbstractDevSetting::isSettingAvailable(void)
+	?trUtf8@BtAbstractDevSetting@@SA?AVQString@@PBD0@Z @ 7 NONAME ; class QString BtAbstractDevSetting::trUtf8(char const *, char const *)
+	?getStaticMetaObject@BtAbstractDevSetting@@SAABUQMetaObject@@XZ @ 8 NONAME ; struct QMetaObject const & BtAbstractDevSetting::getStaticMetaObject(void)
+	??_EBtDevSettingInterface@@UAE@I@Z @ 9 NONAME ; BtDevSettingInterface::~BtDevSettingInterface(unsigned int)
+	?trUtf8@BtAbstractDevSetting@@SA?AVQString@@PBD0H@Z @ 10 NONAME ; class QString BtAbstractDevSetting::trUtf8(char const *, char const *, int)
+	?aboutToBackground@BtAbstractDevSetting@@UAEXXZ @ 11 NONAME ; void BtAbstractDevSetting::aboutToBackground(void)
+	??_EBtAbstractDevSetting@@UAE@I@Z @ 12 NONAME ; BtAbstractDevSetting::~BtAbstractDevSetting(unsigned int)
+	?aboutToForeground@BtAbstractDevSetting@@UAEXXZ @ 13 NONAME ; void BtAbstractDevSetting::aboutToForeground(void)
+	?getSettingWidget@BtAbstractDevSetting@@UAEPAVHbDataForm@@XZ @ 14 NONAME ; class HbDataForm * BtAbstractDevSetting::getSettingWidget(void)
+	?metaObject@BtAbstractDevSetting@@UBEPBUQMetaObject@@XZ @ 15 NONAME ; struct QMetaObject const * BtAbstractDevSetting::metaObject(void) const
+	?qt_metacast@BtAbstractDevSetting@@UAEPAXPBD@Z @ 16 NONAME ; void * BtAbstractDevSetting::qt_metacast(char const *)
+	??1BtAbstractDevSetting@@UAE@XZ @ 17 NONAME ; BtAbstractDevSetting::~BtAbstractDevSetting(void)
+	?qt_metacall@BtAbstractDevSetting@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 18 NONAME ; int BtAbstractDevSetting::qt_metacall(enum QMetaObject::Call, int, void * *)
+	?getRemote@BtAbstractDevSetting@@QBEABVQString@@XZ @ 19 NONAME ; class QString const & BtAbstractDevSetting::getRemote(void) const
+	?loadDevSettingInterfaces@BtDevSettingPluginLoader@@SA?AV?$QList@PAVBtDevSettingInterface@@@@XZ @ 20 NONAME ; class QList<class BtDevSettingInterface *> BtDevSettingPluginLoader::loadDevSettingInterfaces(void)
+	?settingAvailabilityChanged@BtAbstractDevSetting@@IAEXPAV1@_N@Z @ 21 NONAME ; void BtAbstractDevSetting::settingAvailabilityChanged(class BtAbstractDevSetting *, bool)
+	??1BtDevSettingInterface@@UAE@XZ @ 22 NONAME ; BtDevSettingInterface::~BtDevSettingInterface(void)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/btui/btdevsettingframework/eabi/btdevsettingframeworku.def	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,22 @@
+EXPORTS
+	_ZN20BtAbstractDevSetting11qt_metacallEN11QMetaObject4CallEiPPv @ 1 NONAME
+	_ZN20BtAbstractDevSetting11qt_metacastEPKc @ 2 NONAME
+	_ZN20BtAbstractDevSetting12aboutToCloseEv @ 3 NONAME
+	_ZN20BtAbstractDevSetting16getSettingWidgetEv @ 4 NONAME
+	_ZN20BtAbstractDevSetting16staticMetaObjectE @ 5 NONAME DATA 16
+	_ZN20BtAbstractDevSetting17aboutToBackgroundEv @ 6 NONAME
+	_ZN20BtAbstractDevSetting17aboutToForegroundEv @ 7 NONAME
+	_ZN20BtAbstractDevSetting18isSettingAvailableEv @ 8 NONAME
+	_ZN20BtAbstractDevSetting19getStaticMetaObjectEv @ 9 NONAME
+	_ZN20BtAbstractDevSetting26settingAvailabilityChangedEPS_b @ 10 NONAME
+	_ZN20BtAbstractDevSettingC1ERK7QStringP7QObject @ 11 NONAME
+	_ZN20BtAbstractDevSettingC2ERK7QStringP7QObject @ 12 NONAME
+	_ZN20BtAbstractDevSettingD0Ev @ 13 NONAME
+	_ZN20BtAbstractDevSettingD1Ev @ 14 NONAME
+	_ZN20BtAbstractDevSettingD2Ev @ 15 NONAME
+	_ZN24BtDevSettingPluginLoader24loadDevSettingInterfacesEv @ 16 NONAME
+	_ZNK20BtAbstractDevSetting10metaObjectEv @ 17 NONAME
+	_ZNK20BtAbstractDevSetting9getRemoteEv @ 18 NONAME
+	_ZTI20BtAbstractDevSetting @ 19 NONAME
+	_ZTV20BtAbstractDevSetting @ 20 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/btui/btdevsettingframework/rom/btdevsettingframework.iby	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,29 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+#ifndef BTDEVSETTINGFRAMEWORK_IBY
+#define BTDEVSETTINGFRAMEWORK_IBY
+
+#include <data_caging_paths_for_iby.hrh>
+#include <bldvariant.hrh>
+#ifdef __BT
+
+file=ABI_DIR/BUILD_DIR/btdevsettingframework.dll SHARED_LIB_DIR/btdevsettingframework.dll
+
+#endif //__BT
+
+#endif  // BTDEVSETTINGFRAMEWORK_IBY
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/btui/btdevsettingframework/src/btabstractdevsetting.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,106 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  The plugin interface of Bluetooth device setting ui 
+*
+*/
+
+#include <btabstractdevsetting.h>
+
+BtAbstractDevSetting::BtAbstractDevSetting(
+        const QString &address, QObject *parent)
+    : QObject( parent )
+{
+    mRemote = address;
+}
+
+/*!
+ Destructor of BtAbstractDevSetting.
+ */
+BtAbstractDevSetting::~BtAbstractDevSetting()
+{
+}
+
+/*!
+ Gets the BD_ADDR of the remote device which this setting 
+ plugin is provided for.
+ 
+ \return the device address of the remote device in hex string
+ */
+const QString &BtAbstractDevSetting::getRemote() const
+{
+    return mRemote;
+}
+
+/*!
+ Tells if this setting plugin can provide a setting UI
+ for the target device. If the answer is true, this plugin may be
+ requested to create a setting widget by function 
+ \code createSettingWidget() \endcode.
+ 
+ \return true if a setting is currently available. false, otherwise.
+ 
+ The default implementation returns false.
+ */
+bool BtAbstractDevSetting::isSettingAvailable()
+{
+    return false;
+}
+
+/*!
+ Gets a \code HbDataForm \endcode instance which consists of the
+ setting UI from this specific plugin. The loader of this plugin will
+ add this dataform into its setting view if its setting is available at
+ the time.
+ 
+ The ownership of this widget is not transferred. That is, the plugin 
+ is responsible to free it at plugin destruction.
+ 
+ The default implementation returns 0. 
+
+ \return an \code HbDataForm \endcode instance.
+ */
+HbDataForm *BtAbstractDevSetting::getSettingWidget()
+{
+    return 0;
+}
+
+/*!
+ Informs that device setting is going to foreground. This 
+ implies that the \code HbWidget \endcode from function 
+ \code createSettingWidget \endcode will be shown if the setting
+ from this plugin is available.
+ 
+ The default implementation does nothing.
+ */  
+void BtAbstractDevSetting::aboutToForeground()
+{
+}
+
+/*!
+ Informs that device setting is going to background.
+ 
+ The default implementation does nothing.
+ */
+void BtAbstractDevSetting::aboutToBackground()
+{
+}
+
+/*!
+ Informs that device setting is going to close.
+ 
+ The default implementation does nothing.
+ */
+void BtAbstractDevSetting::aboutToClose()
+{
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/btui/btdevsettingframework/src/btdevsettingpluginloader.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,110 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+#include <btdevsettingpluginloader.h>
+#include <QString>
+#include <QDir>
+#include <QFileInfo>
+#include <QPluginLoader>
+#include <btdevsettinginterface.h>
+#include <btdevsettingglobal.h>
+
+/*!
+    \class BtDevSettingPluginLoader
+    \brief The BtDevSettingPluginLoader class loads BT device setting plugins.
+ */
+
+#ifdef WIN32
+    #define PLUGINFILE_SUFFIX "dll"
+#else
+    #define PLUGINFILE_SUFFIX "qtplugin"
+#endif
+
+
+static QStringList getDrives()
+{
+    static QStringList drives;
+    if (drives.empty()) {
+#ifdef WIN32
+        drives.append("C:");
+#else
+        QFileInfoList fileInfoList = QDir::drives();
+        foreach(const QFileInfo &fileInfo,fileInfoList) {
+            QString str = fileInfo.filePath();
+            if (str.length() > 2) {
+                str = str.left(2);
+            }
+            drives.append(str);
+        }
+#endif
+    }
+    return drives;
+}
+
+static QStringList directoriesFromAllDrives(const QString &baseDir)
+{
+    QStringList dirs;
+    QStringList drives = getDrives();
+    foreach(const QString &drive,drives) {
+        QString dir = drive + baseDir + QDir::separator();
+        if (QFileInfo(dir).exists()) {
+            dirs.append(dir);
+        }
+    }
+    return dirs;
+}
+
+static BtDevSettingInterface* loadPluginInterface(const QFileInfo &pluginFile)
+{    
+    QPluginLoader loader(pluginFile.absoluteFilePath());
+    BtDevSettingInterface *plugin = 
+            qobject_cast<BtDevSettingInterface*> (loader.instance());
+    if (!plugin) {
+        loader.unload();
+    }
+    return plugin;
+}
+
+/*!
+   Load all setting interfaces.
+   
+   \return the list of plugin interface.
+ */
+QList<BtDevSettingInterface*> BtDevSettingPluginLoader::loadDevSettingInterfaces()
+{
+    QList<BtDevSettingInterface*> interfaces;
+    
+    static QStringList pluginDirs;
+    if (pluginDirs.empty()) {
+        pluginDirs = directoriesFromAllDrives(BTDEVSETTING_PLUGIN_PATH);
+    }
+    foreach(const QString &dirStr,pluginDirs) {
+        QDir pluginDir( dirStr );
+        QFileInfoList fileInfoList = pluginDir.entryInfoList( QDir::Files );
+        foreach(const QFileInfo &fileInfo,fileInfoList) {
+            int diff = fileInfo.suffix().compare(PLUGINFILE_SUFFIX,Qt::CaseInsensitive);
+            if (!diff) {
+                BtDevSettingInterface* settingIf = loadPluginInterface(fileInfo);
+                if ( settingIf ) {
+                    interfaces.append( settingIf );
+                }
+            }
+        }
+    }
+    
+    return interfaces;
+}
+
--- a/bluetoothengine/btui/btui.pro	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btui/btui.pro	Mon Jul 12 18:51:05 2010 +0300
@@ -19,6 +19,7 @@
 
 # Directories
 SUBDIRS += btuimodel \
+btdevsettingframework \
 btuidelegate \
 btcpplugin \
 tsrc
@@ -28,7 +29,10 @@
 symbian: {
 	SYMBIAN_PLATFORMS = WINSCW \
 	        ARMV5
-    BLD_INF_RULES.prj_exports += \
+    BLD_INF_RULES.PRJ_EXPORTS += \
 				"$${LITERAL_HASH}include<platform_paths.hrh>" \
-				"rom/btui.iby CORE_MW_LAYER_IBY_EXPORT_PATH(btui.iby)"
-} 
\ No newline at end of file
+				"rom/btui.iby CORE_MW_LAYER_IBY_EXPORT_PATH(btui.iby)" \
+				"rom/btui_resources.iby LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(btui_resources.iby)" \
+				"inc/btuiiconutil.h       MW_LAYER_PLATFORM_EXPORT_PATH(btservices/btuiiconutil.h)" \
+				"inc/btuidevtypemap.h       MW_LAYER_PLATFORM_EXPORT_PATH(btservices/btuidevtypemap.h)"
+} 
--- a/bluetoothengine/btui/btuidelegate/btabstractdelegate.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btui/btuidelegate/btabstractdelegate.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -17,6 +17,8 @@
 
 
 #include "btabstractdelegate.h"
+#include "btqtconstants.h"
+
 #include <btsettingmodel.h>
 #include <btdevicemodel.h>
 
@@ -51,3 +53,13 @@
     
 }
 
+bool BtAbstractDelegate::isBtPowerOn()
+{
+    QModelIndex powerIndex = getSettingModel()->index(BtSettingModel::PowerStateRow, 0);
+    PowerStateQtValue powerState = (PowerStateQtValue)getSettingModel()->data(powerIndex, BtSettingModel::SettingValueRole).toInt();
+    
+    return (BtPowerOn == powerState);
+}
+
+
+
--- a/bluetoothengine/btui/btuidelegate/btabstractdelegate.h	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btui/btuidelegate/btabstractdelegate.h	Mon Jul 12 18:51:05 2010 +0300
@@ -61,6 +61,8 @@
     BtSettingModel *getSettingModel();
     BtDeviceModel *getDeviceModel();
     
+    bool isBtPowerOn();
+    
 public slots:
 
 private:
--- a/bluetoothengine/btui/btuidelegate/btdelegateInquiry.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#include "btdelegateinquiry.h"
-#include <btsettingmodel.h>
-#include <btdevicemodel.h>
-#include <bluetoothuitrace.h>
-
-
-BtDelegateInquiry::BtDelegateInquiry(
-        BtSettingModel* settingModel, 
-        BtDeviceModel* deviceModel, QObject* parent )
-    :BtAbstractDelegate( settingModel, deviceModel, parent )
-{
-}
-
-BtDelegateInquiry::~BtDelegateInquiry()
-{
-
-}
-
-void BtDelegateInquiry::exec( const QVariant& params )
-{
-    Q_UNUSED(params);
-    
-    bool err = getDeviceModel()->searchDevice();
-    if (!err) {
-        // TODO - Verify the error code to be used.
-        // Complete command with error
-        emit commandCompleted(KErrNotSupported);
-        return;
-    }
-    
-    emit commandCompleted(KErrNone);
-}
-
-void BtDelegateInquiry::cancel()
-{
-    getDeviceModel()->cancelSearchDevice();
-}
--- a/bluetoothengine/btui/btuidelegate/btdelegateInquiry.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#ifndef BTDELEGATEINQUIRY_H_
-#define BTDELEGATEINQUIRY_H_
-
-#include <e32base.h>
-#include <btengsettings.h>
-#include "btabstractdelegate.h"
-
-class BtuiModel;
-
-
-class BtDelegateInquiry : public BtAbstractDelegate
-{
-    Q_OBJECT
-    
-public:
-    explicit BtDelegateInquiry(
-            BtSettingModel* settingModel, 
-            BtDeviceModel* deviceModel, 
-            QObject* parent = 0 );
-    
-    virtual ~BtDelegateInquiry();
-    
-    virtual void exec( const QVariant &params );
-    
-    virtual void cancel();
-    
-private:
-};
-
-#endif /* BTDELEGATEINQUIRY_H_ */
--- a/bluetoothengine/btui/btuidelegate/btdelegateconnect.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btui/btuidelegate/btdelegateconnect.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -16,15 +16,25 @@
 */
 
 #include "btdelegateconnect.h"
+#include "btuiutil.h"
+#include "btqtconstants.h"
 #include <QModelIndex>
+#include <hblabel.h>
 #include <btsettingmodel.h>
 #include <btdevicemodel.h>
 #include <hbnotificationdialog.h>
+#include <hbmessagebox.h>
+#include "btuiiconutil.h"
+#include "btdelegatefactory.h"
+#include <bluetoothuitrace.h>
+#include <e32property.h>
+#include <ctsydomainpskeys.h>  
 
 BtDelegateConnect::BtDelegateConnect(
         BtSettingModel* settingModel, 
         BtDeviceModel* deviceModel, QObject *parent) :
-    BtAbstractDelegate(settingModel, deviceModel, parent), mBtengConnMan(0)
+    BtAbstractDelegate(settingModel, deviceModel, parent), mBtengConnMan(0),
+    mAbstractDelegate(0), mActiveHandling(false)
 {
     
 }
@@ -34,79 +44,245 @@
     delete mBtengConnMan;
 }
 
+/*!
+ * execute connect operation
+ *    first check if power is on
+ */
 void BtDelegateConnect::exec( const QVariant &params )
 {
+    if ( mActiveHandling ) {
+        emit commandCompleted( KErrAlreadyExists );
+        return;
+    }
+    mIndex = params.value<QModelIndex>();
+    mActiveHandling = true;
+    // save needed values from model
+    mDeviceName = (mIndex.data(BtDeviceModel::NameAliasRole)).toString();
+    QString addrStr = (mIndex.data(BtDeviceModel::ReadableBdaddrRole)).toString(); 
+    addrReadbleStringToSymbian( addrStr, mAddr );  
+    
+    mCod = (mIndex.data(BtDeviceModel::CoDRole)).toInt();
+    mMajorProperty = (mIndex.data(BtDeviceModel::MajorPropertyRole)).toInt();
+    
+    // first turn on power if needed
+    if (!isBtPowerOn()) {
+        if (!mAbstractDelegate) //if there is no other delegate running
+        { 
+            mAbstractDelegate = BtDelegateFactory::newDelegate(BtDelegate::ManagePower, 
+                    getSettingModel(), getDeviceModel() ); 
+            connect( mAbstractDelegate, SIGNAL(commandCompleted(int)), this, SLOT(powerDelegateCompleted(int)) );
+            mAbstractDelegate->exec(QVariant(BtPowerOn));
+        }
+    } 
+    else {
+        // power is already on
+        exec_connect();
+    }
+}
+
+/*!
+ * power delegate has completed, continue processing
+ */
+void BtDelegateConnect::powerDelegateCompleted(int status)
+{
+    if (mAbstractDelegate)
+    {
+        disconnect(mAbstractDelegate);
+        delete mAbstractDelegate;
+        mAbstractDelegate = 0;
+    }
+    if ( status == KErrNone ) {
+        // continue connecting
+        exec_connect();
+    } 
+    else {
+        // error
+        emitCommandComplete(status);
+    }
+}
+
+/*!
+ * execute connect operation
+ */
+void BtDelegateConnect::exec_connect()
+{
     int error = KErrNone;
-    QModelIndex index = params.value<QModelIndex>();
-    
-    mdeviceName = getDeviceModel()->data(index,BtDeviceModel::NameAliasRole).toString();
-    
-    QString strBtAddr = getDeviceModel()->data(index,
-            BtDeviceModel::ReadableBdaddrRole).toString();
-    int cod = getDeviceModel()->data(index,BtDeviceModel::CoDRole).toInt();
     
     if ( ! mBtengConnMan ){
-        TRAP_IGNORE( mBtengConnMan = CBTEngConnMan::NewL(this) );
+        TRAP( error, mBtengConnMan = CBTEngConnMan::NewL(this) );
     }
-    Q_CHECK_PTR( mBtengConnMan );
-    
-    TBTDeviceClass btEngDeviceClass(cod);
-    TPtrC ptrName(reinterpret_cast<const TText*>(strBtAddr.constData()));
-        
-    RBuf16 btName;
-    error = btName.Create(ptrName.Length());
-    
-    if(error == KErrNone) {
-        btName.Copy(ptrName);
-        mBtEngddr.SetReadable(btName);
-        error = mBtengConnMan->Connect(mBtEngddr, btEngDeviceClass);
-        btName.Close();
+
+    if ( !error ) {
+        TBTDeviceClass btEngDeviceClass(mCod);
+        error = mBtengConnMan->Connect(mAddr, btEngDeviceClass);
     }
     
-    
-    if(error) {
+    if( error ) {
         emitCommandComplete(error);
     }
-    
 }
 
+/*!
+ * connect callback from CBTengConnMan
+ */
 void BtDelegateConnect::ConnectComplete( TBTDevAddr& aAddr, TInt aErr, 
                                    RBTDevAddrArray* aConflicts )
 {
-    Q_UNUSED(aAddr);
-    Q_UNUSED(aConflicts);  
-    emitCommandComplete(aErr);
+    // It is possible that another audio device has just connected to phone when we are
+    // connecting to this audio device. Or a device is connected while this command
+    // is idle. No handling for these cases.
+    if ( mAddr != aAddr || !mActiveHandling ) {  
+        return;
+    }
+    
+    // conflict could occur as well if another audio device is already connected
+    // since currently we don't support multiple audio device connections.
+    if ( aErr && aConflicts && aConflicts->Count() ) {
+        // get the display name of the device that is 
+        // causing the conflict 
+        QString conflictDevAddr;
+        addrSymbianToReadbleString(conflictDevAddr, (*aConflicts)[0] );
+        QModelIndex start = getDeviceModel()->index(0,0);
+        QModelIndexList indexList = getDeviceModel()->match(start, BtDeviceModel::ReadableBdaddrRole, conflictDevAddr);
+        BTUI_ASSERT_X(indexList.count(), "BtDelegateConnect::ConnectComplete()", "device missing from model!");
+        mConflictDevIndex = indexList.at(0);
+      
+        // check if conflict device is being used in a call
+        // Note:  actually only checking if *any* audio device is involved in a call, not necessarily the
+        // one we are concerned with here.  Btaudioman does not currently support finding out the actual 
+        // device involved in a call. 
+        if (callOngoing()) {
+            HbMessageBox::warning(hbTrId("txt_bt_info_not_possible_during_a_call"));
+            emitCommandComplete(KErrCancel);
+        }
+        else {
+            // no call, check if user wants to disconnect conflict device 
+            QString conflictDevName = (mConflictDevIndex.data(BtDeviceModel::NameAliasRole)).toString();    
+    
+            QString questionText(hbTrId("txt_bt_info_to_connect_1_2_needs_to_be_disconnec")
+                    .arg(mDeviceName).arg(conflictDevName));
+            
+            HbMessageBox::question( questionText, this, SLOT(handleUserAnswer(HbAction*)), 
+                    hbTrId("txt_common_button_continue"), hbTrId("txt_common_button_cancel") );        
+        }
+    }
+    else {
+        // command is finished
+        emitCommandComplete(aErr);
+    }
 }
 
+/*!
+ * handle user response to query about disconnecting conflict device
+ */
+void BtDelegateConnect::handleUserAnswer( HbAction* answer )
+{
+    HbMessageBox* dlg = static_cast<HbMessageBox*>( sender() );
+    if( dlg->actions().first() == answer ) { 
+        // Continue, ie. disconnect conflict device and then try reconnecting again
+        if (!mAbstractDelegate) //if there is no other delegate running
+        { 
+            QList<QVariant>list;
+            QVariant paramFirst;
+            paramFirst.setValue(mConflictDevIndex);    
+            QVariant paramSecond(ServiceLevel);
+            list.append(paramFirst);
+            list.append(paramSecond);
+            QVariant paramsList(list);
+            mAbstractDelegate = BtDelegateFactory::newDelegate(BtDelegate::Disconnect, 
+                    getSettingModel(), getDeviceModel() ); 
+            connect( mAbstractDelegate, SIGNAL(commandCompleted(int)), this, SLOT(disconnectDelegateCompleted(int)) );
+            mAbstractDelegate->exec(paramsList);
+        }
+    }
+    else {
+        // Cancel connect operation
+        emitCommandComplete(KErrCancel);
+    }
+}
+
+/*!
+ * returns true if phone call is ongoing
+ */
+bool BtDelegateConnect::callOngoing()
+{
+    // ToDo:  check if there exists Qt PS key for ongoing call
+    int callState;
+    int err = RProperty::Get(KPSUidCtsyCallInformation, KCTsyCallState, callState);
+    if (!err && (callState == EPSCTsyCallStateNone || callState == EPSCTsyCallStateUninitialized)) {
+        return false;
+    }
+    else {
+        return true;
+    }
+}
+
+/*!
+ * disconnecting conflict device has completed, continue connecting
+ */
+void BtDelegateConnect::disconnectDelegateCompleted(int status)
+{
+    if (mAbstractDelegate)
+    {
+        disconnect(mAbstractDelegate);
+        delete mAbstractDelegate;
+        mAbstractDelegate = 0;
+    }
+    // finished disconnecting conflict device, now reconnect to original device
+    if ( status == KErrNone ) {
+        exec_connect();
+    }
+    else {
+        // disconnect failed, abort
+        emitCommandComplete( status );
+    }
+}
+
+/*!
+ * not used here
+ */
 void BtDelegateConnect::DisconnectComplete( TBTDevAddr& aAddr, TInt aErr )
 {
     Q_UNUSED(aAddr);
     Q_UNUSED(aErr);    
 }
 
-void BtDelegateConnect::PairingComplete( TBTDevAddr& aAddr, TInt aErr )
-{
-    Q_UNUSED(aAddr);
-    Q_UNUSED(aErr);
-}
-
+/*!
+ * cancel connect operation
+ *   ConnectComplete() callback will be called upon completion of cancel with KErrCancel
+ */
 void BtDelegateConnect::cancel()
 {
-    mBtengConnMan->CancelConnect(mBtEngddr);
+    if ( mBtengConnMan ) {
+        mBtengConnMan->CancelConnect(mAddr);
+    }
 }
 
+/*!
+ * shows user notes with connection success/failure information
+ *    cancel operation is handled without a user note
+ */
 void BtDelegateConnect::emitCommandComplete(int error)
 {
-    QString str(hbTrId("Connected to %1"));
-    QString err(hbTrId("Connecting with %1 Failed"));
-    
-    if(error != KErrNone) {
-        HbNotificationDialog::launchDialog(err.arg(mdeviceName));
+    if ( error == KErrNone ) {
+        // success, show indicator with connection status
+        
+        HbIcon icon = getBadgedDeviceTypeIcon( mCod, mMajorProperty, BtuiNoCorners); 
+        QString str(hbTrId("txt_bt_dpopinfo_connected_to_1"));
+        HbNotificationDialog::launchDialog( icon, hbTrId("txt_bt_dpophead_connected"), 
+            str.arg(mDeviceName) );  
+    }
+    else if ( error == KErrCancel ) {
+        // no user note, return success since cancel operation completed successfully
+        error = KErrNone;
     }
     else {
-        HbNotificationDialog::launchDialog(str.arg(mdeviceName));
+        // failure to connect, show user note
+        QString err(hbTrId("txt_bt_info_unable_to_connect_with_bluetooth"));
+        HbMessageBox::warning(err.arg(mDeviceName));
     }
-
+    mActiveHandling = false;
+    
     emit commandCompleted(error);
 }
 
--- a/bluetoothengine/btui/btuidelegate/btdelegateconnect.h	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btui/btuidelegate/btdelegateconnect.h	Mon Jul 12 18:51:05 2010 +0300
@@ -15,12 +15,13 @@
 *
 */
 
-#ifndef BTDELEGATECONNECT_H_
-#define BTDELEGATECONNECT_H_
+#ifndef BTDELEGATECONNECT_H
+#define BTDELEGATECONNECT_H
 
 #include <e32base.h>
 #include <btengconnman.h>
 #include "btabstractdelegate.h"
+#include <hbaction.h>
 
 class BtuiModel;
 
@@ -40,33 +41,42 @@
             QObject *parent = 0 );
     
     virtual ~BtDelegateConnect();
-
     virtual void exec( const QVariant &params );
-    
     virtual void cancel();
     
 public slots:
 
+
 protected:
     //From MBTEngConnObserver
     virtual void ConnectComplete( TBTDevAddr& aAddr, TInt aErr, 
                                    RBTDevAddrArray* aConflicts );
     virtual void DisconnectComplete( TBTDevAddr& aAddr, TInt aErr );
-    virtual void PairingComplete( TBTDevAddr& aAddr, TInt aErr );
-
-    void emitCommandComplete(int error);
+  
+private slots:
+    void handleUserAnswer( HbAction* answer );
+    void powerDelegateCompleted(int status);
+    void disconnectDelegateCompleted(int status);
     
 private:
-
+    void exec_connect();
+    void emitCommandComplete(int error);
+    bool callOngoing();
+    
+private:
+    QModelIndex mIndex;
+    QModelIndex mConflictDevIndex;
     CBTEngConnMan *mBtengConnMan;
-
-    TBTDevAddr mBtEngddr;
-    
-    QString mdeviceName;
+    QString mDeviceName;
+    int mMajorProperty;
+    int mCod;
+    BtAbstractDelegate* mAbstractDelegate;
+    bool mActiveHandling;
+    TBTDevAddr mAddr;
     
     Q_DISABLE_COPY(BtDelegateConnect)
 
 };
 
 
-#endif /* BTDELEGATECONNECT_H_ */
+#endif /* BTDELEGATECONNECT_H */
--- a/bluetoothengine/btui/btuidelegate/btdelegateconsts.h	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btui/btuidelegate/btdelegateconsts.h	Mon Jul 12 18:51:05 2010 +0300
@@ -33,6 +33,7 @@
         Pair,
         Disconnect,
         Unpair,
+        RemoteDevName
         };
     }
 
--- a/bluetoothengine/btui/btuidelegate/btdelegatedevsecurity.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btui/btuidelegate/btdelegatedevsecurity.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -17,16 +17,18 @@
 
 #include <QModelIndex>
 
+#include "btqtconstants.h"
 #include "btdelegatedevsecurity.h"
 #include <btsettingmodel.h>
 #include <btdevicemodel.h>
+#include <btdelegatefactory.h>
 #include <hbnotificationdialog.h>
 
 BtDelegateDevSecurity::BtDelegateDevSecurity(            
         BtSettingModel* settingModel, 
         BtDeviceModel* deviceModel, 
         QObject *parent) :
-    BtAbstractDelegate(settingModel, deviceModel, parent), mBtEngDevMan(0)
+    BtAbstractDelegate(settingModel, deviceModel, parent), mBtEngDevMan(0), mBtengConnMan(0), mDisconnectDelegate(0)
 {
     
 }
@@ -34,6 +36,8 @@
 BtDelegateDevSecurity::~BtDelegateDevSecurity()
 {
     delete mBtEngDevMan;
+    delete mBtengConnMan;
+    delete mDisconnectDelegate;
 }
 
 
@@ -50,7 +54,35 @@
     TBTDevAddr symaddr;
     TBuf<KBTDevAddrSize * 2> buffer(strBtAddr.utf16());
     symaddr.SetReadable( buffer );
+    
+    // Disconnect if paired device was connected 
+    if ( ! mBtengConnMan ){
+        TRAP( error, mBtengConnMan = CBTEngConnMan::NewL(this) );
+    }
+    TBTEngConnectionStatus connstatus;
+    if ( !error && mBtengConnMan->IsConnected(symaddr, connstatus ) == KErrNone) {
+        if ( connstatus == EBTEngConnected) {
+            if (! mDisconnectDelegate){
+                mDisconnectDelegate = BtDelegateFactory::newDelegate(
+                                        BtDelegate::Disconnect, getSettingModel(), getDeviceModel()); 
+                connect( mDisconnectDelegate, SIGNAL(commandCompleted(int)), this, SLOT(disconnectDelegateCompleted(int)) );
+                
+            }
+            QList<QVariant>list;
+            QVariant paramFirst;
+            paramFirst.setValue(index);            
+            QVariant paramSecond;
+            DisconnectOption discoOpt = ServiceLevel;
+            paramSecond.setValue((int)discoOpt);
+            list.append(paramFirst);
+            list.append(paramSecond);
+            QVariant paramsList;
+            paramsList.setValue(list);
+            mDisconnectDelegate->exec(paramsList);
+        }
+    }
 
+    // Set device as unpaired
     CBTDevice *symBtDevice = 0;
     TRAP( error, {
             symBtDevice = CBTDevice::NewL( symaddr );
@@ -78,6 +110,11 @@
     
 }
 
+void BtDelegateDevSecurity::disconnectDelegateCompleted( int err )
+{
+    Q_UNUSED(err);
+}
+
 void BtDelegateDevSecurity::HandleDevManComplete( TInt aErr )
 {
     emitCommandComplete(aErr);
@@ -91,20 +128,26 @@
 
 void BtDelegateDevSecurity::emitCommandComplete(int error)
 {
-    QString str(hbTrId("Unpaired to %1"));
-    QString err(hbTrId("Unpairing with %1 Failed"));
+    // no dialogs here since stack provides "unpaired to %1" dialog
+    // and failures are not reported
     
-    if(error != KErrNone) {
-        HbNotificationDialog::launchDialog(err.arg(mdeviceName));
-    }
-    else {
-        HbNotificationDialog::launchDialog(str.arg(mdeviceName));
-    }
+    emit commandCompleted(error);
+}
 
-    emit commandCompleted(error);
+void BtDelegateDevSecurity::ConnectComplete( TBTDevAddr& aAddr, TInt aErr, 
+                                   RBTDevAddrArray* aConflicts )
+{
+    Q_UNUSED(aAddr);
+    Q_UNUSED(aErr);
+    Q_UNUSED(aConflicts);  
+}
+
+void BtDelegateDevSecurity::DisconnectComplete( TBTDevAddr& aAddr, TInt aErr )
+{
+    Q_UNUSED(aAddr);
+    Q_UNUSED(aErr);    
 }
 
 
 
 
-
--- a/bluetoothengine/btui/btuidelegate/btdelegatedevsecurity.h	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btui/btuidelegate/btdelegatedevsecurity.h	Mon Jul 12 18:51:05 2010 +0300
@@ -21,16 +21,17 @@
 #include <e32base.h>
 #include <btengconnman.h>
 #include <btengdevman.h>
+#include <btengconnman.h>
 #include "btabstractdelegate.h"
 
 class BtuiModel;
 
 /*!
-    \class BtDelegateDisconnect
-    \brief the base class for Disconnecting Bluetooth Connection.
+    \class BtDelegateDevSecurity
+    \brief the base class for Unpairing Bluetooth Connection.
  */
 class BtDelegateDevSecurity : public BtAbstractDelegate,
-        public MBTEngDevManObserver
+        public MBTEngDevManObserver, public MBTEngConnObserver 
 {
     Q_OBJECT
 
@@ -47,19 +48,25 @@
     virtual void cancel();
     
 public slots:
+    void disconnectDelegateCompleted(int err);
 
 protected:
     //From MBTEngDevManObserver
     virtual void HandleDevManComplete( TInt aErr );
     virtual void HandleGetDevicesComplete( TInt aErr, CBTDeviceArray* aDeviceArray );
-    
+    //From MBTEngConnObserver
+    virtual void ConnectComplete( TBTDevAddr& aAddr, TInt aErr, 
+                                   RBTDevAddrArray* aConflicts );
+    virtual void DisconnectComplete( TBTDevAddr& aAddr, TInt aErr );    
+
     void emitCommandComplete(int error);
     
 private:
 
     CBTEngDevMan *mBtEngDevMan;
-    
     QString mdeviceName;
+    CBTEngConnMan *mBtengConnMan;
+    BtAbstractDelegate* mDisconnectDelegate;
     
     Q_DISABLE_COPY(BtDelegateDevSecurity)
 
--- a/bluetoothengine/btui/btuidelegate/btdelegatedisconnect.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btui/btuidelegate/btdelegatedisconnect.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -15,7 +15,10 @@
 *
 */
 #include "btdelegatedisconnect.h"
+#include "btuiutil.h"
+#include "btuiiconutil.h"
 #include <QModelIndex>
+#include <hblabel.h>
 #include <btsettingmodel.h>
 #include <btdevicemodel.h>
 #include <hbnotificationdialog.h>
@@ -23,7 +26,8 @@
 BtDelegateDisconnect::BtDelegateDisconnect(            
         BtSettingModel* settingModel, 
         BtDeviceModel* deviceModel, QObject *parent) :
-    BtAbstractDelegate(settingModel, deviceModel, parent), mBtengConnMan(0)
+    BtAbstractDelegate(settingModel, deviceModel, parent), mBtengConnMan(0), mPhyLinks(0),
+	 mMajorRole(0), mActiveHandling(false), mAddrArrayIndex(0), mDisconOpt(DisconUnknown)
 {
     
 }
@@ -31,41 +35,198 @@
 BtDelegateDisconnect::~BtDelegateDisconnect()
 {
     delete mBtengConnMan;
+    delete mPhyLinks;
+    mSocketServ.Close();
 }
 
 void BtDelegateDisconnect::exec( const QVariant &params )
 {
-    int error = KErrNone;
-    QModelIndex index = params.value<QModelIndex>();
-    
-    mdeviceName = getDeviceModel()->data(index,BtDeviceModel::NameAliasRole).toString();
-    
-    QString strBtAddr = getDeviceModel()->data(index,BtDeviceModel::ReadableBdaddrRole).toString();
-    
+    int err;
     if ( ! mBtengConnMan ){
-        TRAP_IGNORE( mBtengConnMan = CBTEngConnMan::NewL(this) );
+        TRAP( err, mBtengConnMan = CBTEngConnMan::NewL(this) );
+    }
+    if(err) {
+        emit commandCompleted(err);
+        return;
+    }
+    if (params.canConvert<int>()){
+        mDisconOpt = (DisconnectOption)params.toInt();
+        mActiveHandling = true;
+        
+        if (mDisconOpt == AllOngoingConnections){
+            err = mBtengConnMan->GetConnectedAddresses(mDevAddrArray);
+            disconnectAllConnections_service();
+        }
+        if(err) {
+            emit commandCompleted(err);
+        }
     }
-    Q_CHECK_PTR( mBtengConnMan );
-    
-    TPtrC ptrName(reinterpret_cast<const TText*>(strBtAddr.constData()));
+    else{
+        QList<QVariant> paramList = params.value< QList<QVariant> >(); 
+        QVariant indexVariant = paramList.at(0); 
+        QModelIndex index = indexVariant.value<QModelIndex>();
+        QVariant optionVariant = paramList.at(1); 
+        mDisconOpt = (DisconnectOption)optionVariant.toInt();
+        int error = KErrNone;
+        
+        mActiveHandling = true;
+        mDeviceName = getDeviceModel()->data(index,BtDeviceModel::NameAliasRole).toString();
+        mMajorRole = (index.data(BtDeviceModel::MajorPropertyRole)).toInt();
+        
+        QString strBtAddr = getDeviceModel()->data(index,BtDeviceModel::ReadableBdaddrRole).toString();
+        
+        // todo: address converting should be simplified. check other delegates for example.
+        
+        TPtrC ptrName(reinterpret_cast<const TText*>(strBtAddr.constData()));
+            
+        RBuf16 btName;
+        error = btName.Create(ptrName.Length());
+        
+        if(error == KErrNone) {
+            btName.Copy(ptrName);
+            mBtEngAddr.SetReadable(btName);
+            if (mDisconOpt == ServiceLevel){
+                disconnectSeviceLevel();
+            }
+            else if (mDisconOpt == PhysicalLink){
+                disconnectPhysicalLink();       
+            }
+        }
+        btName.Close();
         
-    RBuf16 btName;
-    error = btName.Create(ptrName.Length());
+        if(error) {
+            emit commandCompleted(error);
+        }
+    }  
+}
+
+
+void BtDelegateDisconnect::disconnectAllConnections_service(){
+    
+        TBuf<KBTDevAddrSize*3> addrBuf;
+        mDevAddrArray[mAddrArrayIndex].GetReadable(addrBuf);
+        QString btStringAddr= QString::fromUtf16( addrBuf.Ptr(), addrBuf.Length());
+        QModelIndex start = getDeviceModel()->index(0,0);
+        QModelIndexList indexList = getDeviceModel()->match(start,BtDeviceModel::ReadableBdaddrRole, btStringAddr);
+        QModelIndex index = indexList.at(0);
+        
+        mDeviceName = getDeviceModel()->data(index,BtDeviceModel::NameAliasRole).toString();
+        mBtEngAddr = mDevAddrArray[mAddrArrayIndex];
+        mMajorRole = (index.data(BtDeviceModel::MajorPropertyRole)).toInt();
+        
+        disconnectSeviceLevel();        
+}
+
+void BtDelegateDisconnect::disconnectAllConnections_physical(){
     
-    if(error == KErrNone) {
-        btName.Copy(ptrName);
-        mBtEngddr.SetReadable(btName);
-        error = mBtengConnMan->Disconnect(mBtEngddr, EBTDiscGraceful);
-        btName.Close();
+        TBuf<KBTDevAddrSize*3> addrBuf;
+        mDevAddrArray[mAddrArrayIndex].GetReadable(addrBuf);
+        QString btStringAddr= QString::fromUtf16( addrBuf.Ptr(), addrBuf.Length());
+        QModelIndex start = getDeviceModel()->index(0,0);
+        QModelIndexList indexList = getDeviceModel()->match(start,BtDeviceModel::ReadableBdaddrRole, btStringAddr);
+        QModelIndex index = indexList.at(0);
+        
+        mDeviceName = getDeviceModel()->data(index,BtDeviceModel::NameAliasRole).toString();
+        mBtEngAddr = mDevAddrArray[mAddrArrayIndex];
+        
+        disconnectPhysicalLink();
+        
+}
+void BtDelegateDisconnect::disconnectSeviceLevel(){
+    int err;
+    TBTEngConnectionStatus connStatus = EBTEngNotConnected;
+    err = mBtengConnMan->IsConnected(mBtEngAddr, connStatus);
+    if (connStatus == EBTEngConnected){
+        err = mBtengConnMan->Disconnect(mBtEngAddr, EBTDiscGraceful);
     }
-    
-    
-    if(error) {
-        emitCommandComplete(error);
+    if(err) {
+        if (mDisconOpt == AllOngoingConnections){
+            disconnectServiceLevelCompleted(err);
+        }
+        else{ 
+            emit commandCompleted(err);
+        }
+    }
+}
+        
+void BtDelegateDisconnect::disconnectPhysicalLink(){
+    int err;
+    if ( !mSocketServ.Handle() ) {
+        err = mSocketServ.Connect();
+    }
+    if ( !err && !mPhyLinks ) {
+        TRAP( err, 
+            mPhyLinks = CBluetoothPhysicalLinks::NewL( *this, mSocketServ ) );
+        Q_CHECK_PTR( mPhyLinks );
+    }
+    err = mPhyLinks->Disconnect( mBtEngAddr );
+    if(err) {
+        if (mDisconOpt == AllOngoingConnections){
+            disconnectPhysicalLinkCompleted(err);
+        }
+        else{ 
+            emit commandCompleted(err);
+        }
     }
     
 }
 
+void BtDelegateDisconnect::disconnectServiceLevelCompleted(int err){
+    if (mDisconOpt == ServiceLevel){
+        mActiveHandling = false;
+        emit commandCompleted(err);
+    }
+    else if (mDisconOpt == AllOngoingConnections){
+        if (err){
+            mActiveHandling = false;
+            emit commandCompleted(err);
+        }
+        else{
+            mAddrArrayIndex++;
+            if ( mAddrArrayIndex < mDevAddrArray.Count()){
+                disconnectAllConnections_service();
+            }
+            else{
+                mDevAddrArray.Reset();
+                err = mBtengConnMan->GetConnectedAddresses(mDevAddrArray);
+                if(err) {
+                    emit commandCompleted(err);
+                    return;
+                }
+                mAddrArrayIndex = 0;
+                //connect( mDisconnectDelegate, SIGNAL(commandCompleted(int)), this, SLOT(disconnectPhysicalLinkCompleted(int)) );         
+                disconnectAllConnections_physical();
+            }
+        }
+    }
+}
+
+void BtDelegateDisconnect::disconnectPhysicalLinkCompleted(int err){
+    if (mDisconOpt == PhysicalLink){
+        //emitCommandComplete(err);
+        mActiveHandling = false;
+        emit commandCompleted(err);
+    }
+    else if (mDisconOpt == AllOngoingConnections){
+        if (err){
+            mActiveHandling = false;
+            emit commandCompleted(err);
+        }
+        else{
+            mAddrArrayIndex++;
+            if ( mAddrArrayIndex < mDevAddrArray.Count()){
+                disconnectAllConnections_physical();
+            }
+            else{
+                //TODO: check if there is still ongoing connection from BTEngVonnMan. and close them again if there is any new 
+                mActiveHandling = false;
+                emit commandCompleted(err);
+            }
+        }
+        
+    }
+    
+}
 void BtDelegateDisconnect::ConnectComplete( TBTDevAddr& aAddr, TInt aErr, 
                                    RBTDevAddrArray* aConflicts )
 {
@@ -76,34 +237,46 @@
 
 void BtDelegateDisconnect::DisconnectComplete( TBTDevAddr& aAddr, TInt aErr )
 {
-    Q_UNUSED(aAddr);
-    emitCommandComplete(aErr);    
+    if ( mBtEngAddr != aAddr || !mActiveHandling ) {  
+        return;
+    }
+    DisplayCommandCompleteNotif(aErr);
+    disconnectServiceLevelCompleted(aErr);    
 }
 
-void BtDelegateDisconnect::PairingComplete( TBTDevAddr& aAddr, TInt aErr )
-{
-    Q_UNUSED(aAddr);
-    Q_UNUSED(aErr);
-}
 
 void BtDelegateDisconnect::cancel()
 {
     
 }
 
-void BtDelegateDisconnect::emitCommandComplete(int error)
+void BtDelegateDisconnect::HandleCreateConnectionCompleteL( TInt err ){
+    Q_UNUSED( err );
+}
+
+void BtDelegateDisconnect::HandleDisconnectCompleteL( TInt err ){
+    if ( !mActiveHandling ) {  
+        return;
+    } 
+    disconnectPhysicalLinkCompleted(err);
+          
+}
+
+void BtDelegateDisconnect::HandleDisconnectAllCompleteL( TInt err ){
+    Q_UNUSED( err );
+}
+
+void BtDelegateDisconnect::DisplayCommandCompleteNotif(int error)
 {
-    QString str(hbTrId("Disconnected to %1"));
-    QString err(hbTrId("Disconnecting with %1 Failed"));
     
-    if(error != KErrNone) {
-        HbNotificationDialog::launchDialog(err.arg(mdeviceName));
+    if(error == KErrNone) {
+        // success, show indicator with connection status
+        HbIcon icon = getBadgedDeviceTypeIcon( mCod, mMajorRole, 0 );  // no badging required, only icon
+        QString str( hbTrId("txt_bt_dpopinfo_disconnected_from_1") );
+        HbNotificationDialog::launchDialog( icon, hbTrId("txt_bt_dpophead_disconnected"), 
+            str.arg(mDeviceName) );  
     }
-    else {
-        HbNotificationDialog::launchDialog(str.arg(mdeviceName));
-    }
-
-    emit commandCompleted(error);
+	
 }
 
 
--- a/bluetoothengine/btui/btuidelegate/btdelegatedisconnect.h	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btui/btuidelegate/btdelegatedisconnect.h	Mon Jul 12 18:51:05 2010 +0300
@@ -20,6 +20,7 @@
 
 #include <e32base.h>
 #include <btengconnman.h>
+#include "btqtconstants.h"
 #include "btabstractdelegate.h"
 
 class BtuiModel;
@@ -29,7 +30,7 @@
     \brief the base class for Disconnecting Bluetooth Connection.
  */
 class BtDelegateDisconnect : public BtAbstractDelegate,
-        public MBTEngConnObserver
+        public MBTEngConnObserver, public MBluetoothPhysicalLinksNotifier
 {
     Q_OBJECT
 
@@ -44,25 +45,59 @@
     
     virtual void cancel();
     
-public slots:
+
 
 protected:
     //From MBTEngConnObserver
     virtual void ConnectComplete( TBTDevAddr& aAddr, TInt aErr, 
                                    RBTDevAddrArray* aConflicts );
     virtual void DisconnectComplete( TBTDevAddr& aAddr, TInt aErr );
-    virtual void PairingComplete( TBTDevAddr& aAddr, TInt aErr );
+    
+    // from MBluetoothPhysicalLinksNotifier
+    virtual void HandleCreateConnectionCompleteL( TInt err );
+
+    virtual void HandleDisconnectCompleteL( TInt err );
+
+    virtual void HandleDisconnectAllCompleteL( TInt err );
 
-    void emitCommandComplete(int error);
+    void DisplayCommandCompleteNotif(int error);
+    
+private:
+    
+    void disconnectAllConnections_service();
+    
+    void disconnectAllConnections_physical();
+    
+    void disconnectSeviceLevel();
+        
+    void disconnectPhysicalLink();
+    
+    void disconnectServiceLevelCompleted(int err);
+
+    void disconnectPhysicalLinkCompleted(int err);
+    
+    
     
 private:
 
     CBTEngConnMan *mBtengConnMan;
 
-    TBTDevAddr mBtEngddr;
+    CBluetoothPhysicalLinks *mPhyLinks;
+
+    int mMajorRole;
+    bool mActiveHandling;
     
-    QString mdeviceName;
+    int mAddrArrayIndex;
+    DisconnectOption mDisconOpt;
+
+    RBTDevAddrArray mDevAddrArray;
+    TBTDevAddr mBtEngAddr;
     
+    QString mDeviceName;
+    int mCod;
+      
+    RSocketServ mSocketServ;
+       
     Q_DISABLE_COPY(BtDelegateDisconnect)
 
 };
--- a/bluetoothengine/btui/btuidelegate/btdelegatefactory.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btui/btuidelegate/btdelegatefactory.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -21,6 +21,7 @@
 #include <btdevicemodel.h>
 #include "btdelegatepower.h"
 #include "btdelegatedevname.h"
+#include "btdelegateremotedevname.h"
 #include "btdelegatevisibility.h"
 #include "btdelegateinquiry.h"
 #include "btdelegateconnect.h"
@@ -54,6 +55,8 @@
             return new BtDelegateDisconnect( settingModel, deviceModel, parent );
         case BtDelegate::Unpair:
             return new BtDelegateDevSecurity( settingModel, deviceModel, parent );
+        case BtDelegate::RemoteDevName:
+            return new BtDelegateRemoteDevName( settingModel, deviceModel, parent );
     }
     return 0;
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/btui/btuidelegate/btdelegateinquiry.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,86 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#include "btdelegateinquiry.h"
+#include "btdelegatefactory.h"
+#include "btqtconstants.h"
+
+#include <btsettingmodel.h>
+#include <btdevicemodel.h>
+#include <bluetoothuitrace.h>
+
+
+BtDelegateInquiry::BtDelegateInquiry(
+        BtSettingModel* settingModel, 
+        BtDeviceModel* deviceModel, QObject* parent )
+    :BtAbstractDelegate( settingModel, deviceModel, parent )
+{
+    mAbstractDelegate = NULL;
+}
+
+BtDelegateInquiry::~BtDelegateInquiry()
+{
+
+}
+
+void BtDelegateInquiry::exec( const QVariant& params )
+{
+    Q_UNUSED(params);
+    
+    if(isBtPowerOn()) {
+        exec_inquiry();
+    }
+    else {
+        //If Bt Power is off, switch it on and then perform pairing.
+        //todo: Do we ask for user confirmation here..?
+        if (!mAbstractDelegate) { 
+            mAbstractDelegate = BtDelegateFactory::newDelegate(BtDelegate::ManagePower, 
+                    getSettingModel(), getDeviceModel() ); 
+            connect( mAbstractDelegate, SIGNAL(commandCompleted(int)), this, SLOT(powerDelegateCompleted(int)) );
+            mAbstractDelegate->exec(QVariant(BtPowerOn));
+        }
+    }
+}
+
+void BtDelegateInquiry::powerDelegateCompleted(int error)
+{
+    if (mAbstractDelegate) {
+        disconnect(mAbstractDelegate);
+        delete mAbstractDelegate;
+        mAbstractDelegate = 0;
+    }
+    if ( error == KErrNone ) {
+        exec_inquiry();
+    } 
+    else {
+        // error
+        emit commandCompleted(error);
+    }
+}
+
+void BtDelegateInquiry::exec_inquiry()
+{
+    bool err = getDeviceModel()->searchDevice();
+
+    emit commandCompleted(err);  // in case of error, passing original error back
+}
+
+void BtDelegateInquiry::cancel()
+{
+    getDeviceModel()->cancelSearchDevice();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/btui/btuidelegate/btdelegateinquiry.h	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,56 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#ifndef BTDELEGATEINQUIRY_H_
+#define BTDELEGATEINQUIRY_H_
+
+#include <e32base.h>
+#include <btengsettings.h>
+#include "btabstractdelegate.h"
+
+class BtuiModel;
+
+
+class BtDelegateInquiry : public BtAbstractDelegate
+{
+    Q_OBJECT
+    
+public:
+    explicit BtDelegateInquiry(
+            BtSettingModel* settingModel, 
+            BtDeviceModel* deviceModel, 
+            QObject* parent = 0 );
+    
+    virtual ~BtDelegateInquiry();
+    
+    virtual void exec( const QVariant &params );
+    
+    virtual void cancel();
+    
+public slots:
+    void powerDelegateCompleted(int error);
+    
+private:
+    void exec_inquiry();
+    
+private:
+    BtAbstractDelegate* mAbstractDelegate;
+    
+};
+
+#endif /* BTDELEGATEINQUIRY_H_ */
--- a/bluetoothengine/btui/btuidelegate/btdelegatepair.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btui/btuidelegate/btdelegatepair.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -17,6 +17,8 @@
 
 #include "btdelegatepair.h"
 #include "btuiutil.h"
+#include "btdelegatefactory.h"
+#include "btqtconstants.h"
 
 #include <QModelIndex>
 #include <btsettingmodel.h>
@@ -36,6 +38,7 @@
     BtAbstractDelegate(settingModel, deviceModel, parent), mBtengConnMan(0)
 {
     mLoader = new HbDocumentLoader();
+    mAbstractDelegate = NULL;
 }
 
 BtDelegatePair::~BtDelegatePair()
@@ -46,13 +49,48 @@
 
 void BtDelegatePair::exec( const QVariant &params )
 {
-    int error = KErrNone;
-    QModelIndex index = params.value<QModelIndex>();
+    
+    deviceIndex = params.value<QModelIndex>();
+    
+    if(isBtPowerOn()) {
+        exec_pair();
+    }
+    else {
+        //If Bt Power is off, switch it on and then perform pairing.
+        //todo: Do we ask for user confirmation here..?
+        if (!mAbstractDelegate) { 
+            mAbstractDelegate = BtDelegateFactory::newDelegate(BtDelegate::ManagePower, 
+                    getSettingModel(), getDeviceModel() ); 
+            connect( mAbstractDelegate, SIGNAL(commandCompleted(int)), this, SLOT(powerDelegateCompleted(int)) );
+            mAbstractDelegate->exec(QVariant(BtPowerOn));
+        }
+    }
     
-    mdeviceName = getDeviceModel()->data(index,BtDeviceModel::NameAliasRole).toString();
+}
+
+void BtDelegatePair::powerDelegateCompleted(int error)
+{
+    if (mAbstractDelegate) {
+        disconnect(mAbstractDelegate);
+        delete mAbstractDelegate;
+        mAbstractDelegate = 0;
+    }
+    if ( error == KErrNone ) {
+        exec_pair();
+    } 
+    else {
+        // error
+        emitCommandComplete(error);
+    }
+}
+
+void BtDelegatePair::exec_pair()
+{
+    int error = KErrNone;
+    mdeviceName = getDeviceModel()->data(deviceIndex,BtDeviceModel::NameAliasRole).toString();
     
-    QString strBtAddr = getDeviceModel()->data(index,BtDeviceModel::ReadableBdaddrRole).toString();
-    int cod = getDeviceModel()->data(index,BtDeviceModel::CoDRole).toInt();
+    QString strBtAddr = getDeviceModel()->data(deviceIndex,BtDeviceModel::ReadableBdaddrRole).toString();
+    int cod = getDeviceModel()->data(deviceIndex,BtDeviceModel::CoDRole).toInt();
     
     if ( ! mBtengConnMan ){
         TRAP( error, mBtengConnMan = CBTEngConnMan::NewL(this) );
@@ -69,12 +107,13 @@
     if(error) {
         emitCommandComplete(error);
     }
-    
+
 }
 
+
 void BtDelegatePair::launchWaitDialog()
 {
-    QString headingText(hbTrId("Pairing with %1"));
+    QString headingText(hbTrId("txt_bt_title_pairing_with_1"));
     HbLabel *heading;
     HbProgressBar* progressBar;
     
@@ -126,15 +165,6 @@
 
 void BtDelegatePair::emitCommandComplete(int error)
 {
-    QString str(hbTrId("Paired to %1"));
-    QString err(hbTrId("Pairing with %1 Failed"));
-    
-    if(error != KErrNone) {
-        HbNotificationDialog::launchDialog(err.arg(mdeviceName));
-    }
-    else {
-        HbNotificationDialog::launchDialog(str.arg(mdeviceName));
-    }
 
     emit commandCompleted(error);
 }
--- a/bluetoothengine/btui/btuidelegate/btdelegatepair.h	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btui/btuidelegate/btdelegatepair.h	Mon Jul 12 18:51:05 2010 +0300
@@ -47,7 +47,7 @@
     virtual void cancel();
     
 public slots:
-    
+    void powerDelegateCompleted(int error);
 protected:
     //From MBTEngConnObserver
     virtual void ConnectComplete( TBTDevAddr& aAddr, TInt aErr, 
@@ -58,6 +58,7 @@
 private:
     void launchWaitDialog();
     void emitCommandComplete(int error);
+    void exec_pair();
     
 private:
 
@@ -66,6 +67,8 @@
     QString mdeviceName;
     
     HbDocumentLoader *mLoader;
+    BtAbstractDelegate* mAbstractDelegate;
+    QModelIndex deviceIndex;
     
     Q_DISABLE_COPY(BtDelegatePair)
 
--- a/bluetoothengine/btui/btuidelegate/btdelegatepower.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btui/btuidelegate/btdelegatepower.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -17,6 +17,9 @@
 
 
 #include "btdelegatepower.h"
+#include "btqtconstants.h"
+#include <btabstractdelegate.h>
+#include <btdelegatefactory.h>
 #include <btsettingmodel.h>
 #include <btdevicemodel.h>
 #include <hbmessagebox.h>
@@ -29,11 +32,12 @@
 BtDelegatePower::BtDelegatePower(            
         BtSettingModel* settingModel, 
         BtDeviceModel* deviceModel, QObject *parent )
-    : BtAbstractDelegate( settingModel, deviceModel, parent )
+    : BtAbstractDelegate( settingModel, deviceModel, parent ),
+      mDisconnectDelegate(0)
 {
     TRAP_IGNORE( mBtengSettings = CBTEngSettings::NewL(this) );
     Q_CHECK_PTR( mBtengSettings );
-    
+    mActiveHandling = false;
 }
 
 /*!
@@ -41,18 +45,36 @@
  */
 BtDelegatePower::~BtDelegatePower()
 {
+    delete mDisconnectDelegate;
     delete mBtengSettings;
-    
 }
 
-void BtDelegatePower::exec( const QVariant &params )
+/*!
+    Turns BT power on/off
+    param powerState is the desired power state and is of type PowerStateQtValue
+ */
+void BtDelegatePower::exec( const QVariant &powerState )
 {   
-    if (params.toInt()){//turn power OFF
-        
+    mReqPowerState = BtEngPowerState((PowerStateQtValue)powerState.toInt());
+    BTUI_ASSERT_X( (mReqPowerState == EBTPowerOff) || (mReqPowerState == EBTPowerOn), 
+            "BtDelegatePower::exec()", "wrong power state value" );
+    
+    // get current power status
+    TBTPowerStateValue curPowerState(EBTPowerOff);
+    mBtengSettings->GetPowerState( curPowerState );
+    
+    // verify requested power is not the same as current status
+    if ( mReqPowerState == curPowerState ) {
+        // no need to do anything
+        emit commandCompleted( KErrNone );
+        return;
+    }
+    
+    // perform power on/off operation
+    if ( mReqPowerState == EBTPowerOff ){ 
         switchBTOff();     
     }
-    else{//turn power ON  
-    
+    else if ( mReqPowerState == EBTPowerOn ) {
         switchBTOn();
     }
 }
@@ -64,30 +86,28 @@
     int err = 0;
     
     //check if device is in OFFLINE mode first
-    TBTEnabledInOfflineMode enabledInOffline = EBTDisabledInOfflineMode;
-    if (checkOfflineMode(enabledInOffline)){
-    //if (1){
-        if (enabledInOffline){
-        //if (1){
+    bool btEnabledInOffline = false;
+    if (checkOfflineMode(btEnabledInOffline)){  // offline mode is active
+        if (btEnabledInOffline){
             // BT is allowed to be enabled in offline mode, show query.
-            HbMessageBox::question( tr("Turn Bluetooth on in offline mode?"),this, 
+            HbMessageBox::question( hbTrId("txt_bt_info_trun_bluetooth_on_ini_offline_mode" ),this, 
 				SLOT(btOnQuestionClose(HbAction*)));
 
         }
         else{
             //if BT is not allowed to be enabled in offline mode, show message and complete
-            HbMessageBox::warning(tr("Bluetooth not allowed to be turned on in offline mode"),this, 
+            HbMessageBox::warning( hbTrId("txt_bt_info_bluetooth_not_allowed_to_be_turned_on" ),this, 
 				SLOT(btOnWarningClose()));
         }
         
     }
-    else{
-        //set BT on if the not in offline mode
-        err = mBtengSettings->SetPowerState((TBTPowerStateValue)(1));
+    else { // offline mode is not active
+        mActiveHandling = true;
+        err = mBtengSettings->SetPowerState(EBTPowerOn);
     }
     
     if ( err ) {
-        QString info = "Unable to switch BT power ON" ;
+        //TODO: handle the error here
         emit commandCompleted(KErrGeneral);
     }
     
@@ -100,7 +120,8 @@
     if(action == dlg->actions().at(0)) 
     {
         //user chooses "yes" for using BT in offline 
-        err = mBtengSettings->SetPowerState((TBTPowerStateValue)(1));
+        mActiveHandling = true;
+        err = mBtengSettings->SetPowerState(EBTPowerOn);
     }
     else
     {
@@ -109,7 +130,7 @@
            
     }     
     if ( err ) {
-        QString info = "Unable to switch BT power ON" ;
+        //TODO: handle the error here
         emit commandCompleted(KErrGeneral);
     }
 }
@@ -124,25 +145,101 @@
 void BtDelegatePower::switchBTOff()
 {
     int err = 0;
-    err = mBtengSettings->SetPowerState((TBTPowerStateValue)(0));
     
-    if ( err ) {
-        QString info = "Unable to switch BT power OFF" ;
+    CBTEngConnMan *btengConnMan = 0;
+    TRAP(err, btengConnMan = CBTEngConnMan::NewL(this));
+    Q_CHECK_PTR( btengConnMan );
+    RBTDevAddrArray devAddrArray;
+    err = btengConnMan->GetConnectedAddresses(devAddrArray);
+    if ( err != KErrNone) {
+       //TODO: handle the error here
+       emit commandCompleted(err);
+       return;
+    }
+    int count = devAddrArray.Count();
+    devAddrArray.Close();
+    delete btengConnMan;
+    if( count> 0 ){
+        mActiveHandling = true;
+        disconnectOngoingConnections(); 
+    }
+    else{
+        mActiveHandling = true;
+        err = mBtengSettings->SetPowerState(EBTPowerOff);
+        
+        if ( err ) {
+           //TODO: handle the error here
+           emit commandCompleted(KErrGeneral);
+        }
+        
+    }    
+}
+/*
+void BtDelegatePower::btOffDialogClose(HbAction *action)
+{
+    HbMessageBox *dlg = static_cast<HbMessageBox*>(sender());
+    if(action == dlg->actions().at(0)) 
+    {
+        //user chooses "yes" for closing active connection before power off
+        mActiveHandling = true;
+        disconnectOngoingConnections();
+    }
+    else
+    {
+        //if user chooses "NO", emits the signal
+        emit commandCompleted(KErrNone);
+           
+    }     
+    
+}
+*/
+void BtDelegatePower::disconnectOngoingConnections(){
+    if (! mDisconnectDelegate){
+        mDisconnectDelegate = BtDelegateFactory::newDelegate(
+                                                BtDelegate::Disconnect, getSettingModel(), getDeviceModel()); 
+        connect( mDisconnectDelegate, SIGNAL(commandCompleted(int)), this, SLOT(disconnectDelegateCompleted(int)) );
+            
+    
+    DisconnectOption discoOpt = AllOngoingConnections;
+    QVariant param;
+    param.setValue((int)discoOpt);
+    mDisconnectDelegate->exec(param);
+    }
+}
+
+void BtDelegatePower::disconnectDelegateCompleted(int err)
+{
+    Q_UNUSED( err );
+    //TODO: handle the return error here
+    
+    int error = mBtengSettings->SetPowerState(EBTPowerOff);
+    if ( error ) {
+        //TODO: handle the error here
         emit commandCompleted(KErrGeneral);
     }
-        
-}
-
-void BtDelegatePower::btOffDialogClose(HbAction *action)
-{
-    Q_UNUSED( action );
+    
     
 }
 
-void BtDelegatePower::PowerStateChanged( TBTPowerStateValue aState )
+
+void BtDelegatePower::PowerStateChanged( TBTPowerStateValue aPowerState )
 {
-    Q_UNUSED( aState );
-    emit commandCompleted(KErrNone);
+    // It is possible that others change power: no handling for these cases.
+    if ( !mActiveHandling ) {
+        return;
+    } 
+    mActiveHandling = false;
+    
+    if ( mReqPowerState == aPowerState ) {
+        // power state changed successfully
+        emit commandCompleted( KErrNone );
+    }
+    else {
+        // the actual power state is not the same as we requested,
+        // command failed:
+        // ToDo:  show error note?
+        emit commandCompleted( KErrGeneral );
+    }
 }
 
 //Method derived from MBTEngSettingsObserver, no need to be implemented here
@@ -151,78 +248,38 @@
     Q_UNUSED( aState );
 }
 
-bool BtDelegatePower::checkOfflineMode(TBTEnabledInOfflineMode& aEnabledInOffline)
+void BtDelegatePower::ConnectComplete( TBTDevAddr& aAddr, TInt aErr, 
+                                   RBTDevAddrArray* aConflicts )
 {
-    TCoreAppUIsNetworkConnectionAllowed offline = ECoreAppUIsNetworkConnectionAllowed;  
-   
-    mBtengSettings->GetOfflineModeSettings(offline, aEnabledInOffline);
-    return (!offline);
-    
+    Q_UNUSED(aAddr);
+    Q_UNUSED(aErr);
+    Q_UNUSED(aConflicts);  
+    /*
+    if ( mBtEngAddr != aAddr ) {  // callback coming for some other device
+        return;
+    }
+    emitCommandComplete(aErr);
+    */
 }
 
-/*if (params.toBool()) {  // turning power on
-
-        // find out if local device is in offline mode
-        QModelIndex idx = mModel->index( Btuim::OfflineMode, 0);
-        QVariant var = mModel->data( idx, Qt::EditRole );
-        bool offlineMode = var.toBool();
-
-        // find out whether BT is allowed in offline mode
-        var = mModel->data( idx, Btuim::SettingAdditionalParam );
-        bool activationAllowed = var.toBool();
-        
-        if (offlineMode) {
-            // in offline mode
-            if (activationAllowed) {
-                HbMessageBox *messageBox = new HbMessageBox(); 
-                // BT is allowed to be enabled in offline mode, show query.
-                if (messageBox->question( tr("Activate Bluetooth in offline mode?") )) {
-                    ret = mModel->setData(index, value, role);
-                }
-                delete messageBox;
-            }
-            else {
-                // BT is not allowed to be activated in offline mode, show note.
+void BtDelegatePower::DisconnectComplete( TBTDevAddr& aAddr, TInt aErr )
+{
+    Q_UNUSED(aAddr);
+    Q_UNUSED(aErr);    
+}
 
-                HbDialog *mShowOnlyPopup = new HbDialog();
-                mShowOnlyPopup->setAttribute(Qt::WA_DeleteOnClose);
-                mShowOnlyPopup->setModal(false);
-                mShowOnlyPopup->setBackgroundFaded(false);
-                mShowOnlyPopup->setDismissPolicy( HbPopup::NoDismiss  );
-                mShowOnlyPopup->setTimeout( 5000 );  // 5 sec
-                HbLabel *label = new HbLabel( tr("Bluetooth is not allowed in offline mode") );
-                label->setAlignment(Qt::AlignCenter);
-                QSizeF popupSize(350,100);
-                mShowOnlyPopup->setMinimumSize(popupSize);
-                mShowOnlyPopup->setContentWidget(label);                
-                mShowOnlyPopup->show();
-            }
-        } 
-        else {
-            // not in offline mode, forward the request to model. 
-            ret =  mModel->setData(index, value, role);    
-        }
-    }
-    else {   // turning power off
-        // first check if existing connections
-        QModelIndex idx = mModel->index(Btuim::BtConnections, 0);
-        QVariant var = mModel->data(idx, Qt::EditRole);
-        bool ok;
-        TInt connNum = var.toInt( &ok );
-        BTUI_ASSERT_X( ok, "BtUiSettingsDelegate::setData", "wrong qvariant type");
-        if (connNum) {
-            // there is at least 1 active connection, show query.
-            HbMessageBox *messageBox = new HbMessageBox(); 
-            if (messageBox->question( tr("Turn Bluetooth off even though connections exist?") )) {
-                ret = mModel->setData(index, value, role);
-            }
-            delete messageBox;
-        } 
-        else {  
-            // no active connections exist, forward the request to model.
-            ret =  mModel->setData(index, value, role);
-        }
-    }*/
-    //emit commandCompleted(err);
-        //return ret;
-    //return false;
+/*!
+   Returns true if offline mode is on, parameter returns true if BT is allowed 
+   in offline mode
+ */
+bool BtDelegatePower::checkOfflineMode(bool& btEnabledInOffline)
+{
+    TCoreAppUIsNetworkConnectionAllowed offLineMode; 
+    TBTEnabledInOfflineMode btEnabled;
+   
+    mBtengSettings->GetOfflineModeSettings(offLineMode, btEnabled);
+    
+    btEnabledInOffline = (btEnabled == EBTEnabledInOfflineMode);
+    return (offLineMode == ECoreAppUIsNetworkConnectionNotAllowed);
+}
+
--- a/bluetoothengine/btui/btuidelegate/btdelegatepower.h	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btui/btuidelegate/btdelegatepower.h	Mon Jul 12 18:51:05 2010 +0300
@@ -20,6 +20,7 @@
 
 #include <e32base.h>
 #include <btengsettings.h>
+#include <btengconnman.h>
 #include "btabstractdelegate.h"
 
 class BtuiModel;
@@ -31,7 +32,8 @@
 
     \\sa btuidelegate
  */
-class BtDelegatePower : public BtAbstractDelegate, public MBTEngSettingsObserver
+class BtDelegatePower : public BtAbstractDelegate, public MBTEngSettingsObserver, 
+        public MBTEngConnObserver 
 {
     Q_OBJECT
 
@@ -44,6 +46,8 @@
 
     virtual void exec( const QVariant &params );
     
+    //from MBTEngSettingsObserver
+    
     virtual void PowerStateChanged( TBTPowerStateValue aState );
 
     virtual void VisibilityModeChanged( TBTVisibilityMode aState );
@@ -53,20 +57,34 @@
     
     void btOnWarningClose();
     
-    void btOffDialogClose(HbAction *action);
+    void disconnectDelegateCompleted(int err);
+    
+    
+protected:
+    //From MBTEngConnObserver
+    virtual void ConnectComplete( TBTDevAddr& aAddr, TInt aErr, 
+                                   RBTDevAddrArray* aConflicts );
+    virtual void DisconnectComplete( TBTDevAddr& aAddr, TInt aErr );
+    
     
 private:
     void switchBTOn();
     
     void switchBTOff();
     
-    bool checkOfflineMode(TBTEnabledInOfflineMode& aEnabledInOffline);
+    bool checkOfflineMode(bool& btEnabledInOffline);
     
-public slots:
+    void disconnectOngoingConnections();
+    
 
 private:
     CBTEngSettings* mBtengSettings;
-
+    bool mActiveHandling; 
+    TBTPowerStateValue mReqPowerState;
+    
+    BtAbstractDelegate* mDisconnectDelegate;
+    
+    
 private:
 
     Q_DISABLE_COPY(BtDelegatePower)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/btui/btuidelegate/btdelegateremotedevname.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,184 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include "btdelegateremotedevname.h"
+#include <btsettingmodel.h>
+#include <btdevicemodel.h>
+#include <e32base.h>
+#include <bluetoothuitrace.h>
+#include <QRegExp>
+#include "btuidevtypemap.h"
+
+
+BtDelegateRemoteDevName::BtDelegateRemoteDevName(BtSettingModel* settingModel, 
+        BtDeviceModel* deviceModel,QObject *parent )
+    :BtAbstractDelegate( settingModel, deviceModel, parent ), mRegistryActive(0)
+{
+    
+}
+    
+BtDelegateRemoteDevName::~BtDelegateRemoteDevName()
+{
+    delete mRegistryActive;
+    mSymName.Close();
+    mBtRegistry.Close();
+    mBtRegServ.Close();
+}
+
+/*!
+    Validate the bluetooth device name given by the user:
+    Extra spaces (' ', '\n', '\t' and '\r') from the beginning, 
+    middle and the end of the name are always removed;
+    the maximum lengthof a name is 30.
+    
+    TODO:Add duplicate name checking. If the new name duplicates 
+    existing name in registry, prompt user to change the name
+ */
+
+bool BtDelegateRemoteDevName::validateName(QString &name )
+{
+    // remove spaces at the beginning and end:
+    name = name.trimmed();
+    // regular expression of one or more consecutive spaces:
+    QRegExp rx("[ \n\t\r]+");
+    name.replace( rx, " ");
+    if (name.length() > 30 ) {
+        name.resize( 30 );
+    }
+    return name.length() > 0;
+}
+
+void BtDelegateRemoteDevName::exec( const QVariant &params )
+{
+    QList<QVariant> paramList = params.value< QList<QVariant> >(); 
+    QVariant indexVariant = paramList.at(0); 
+    QModelIndex index = indexVariant.value<QModelIndex>();
+    QVariant nameVariant = paramList.at(1); 
+    QString btRemoteDevName = nameVariant.toString();
+    
+    int error = KErrNone;
+            
+    validateName(btRemoteDevName);
+    mNewName = btRemoteDevName;
+    
+    TPtrC ptrName(reinterpret_cast<const TText*>(btRemoteDevName.constData()));
+  
+    error = mSymName.Create(ptrName.Length());
+    
+    // todo (review comment): missing proper exception handling. 
+    if(error == KErrNone) {
+        mSymName.Copy(ptrName);
+    }
+    else{
+        emit commandCompleted(error,mNewName);
+        return;
+    }
+    
+    QString strBtAddr = getDeviceModel()->data(index,
+           BtDeviceModel::ReadableBdaddrRole).toString();
+
+    TBuf<KBTDevAddrSize * 2> buffer(strBtAddr.utf16());
+    mSymaddr.SetReadable( buffer );
+     
+    error = mBtRegServ.Connect();
+    if ( error != KErrNone && error != KErrAlreadyExists) {
+        emit commandCompleted(error,mNewName);
+        return;
+    }
+
+    error = mBtRegistry.Open( mBtRegServ ) ;
+    if ( error != KErrNone && error != KErrAlreadyExists) {
+        emit commandCompleted(error,mNewName);
+        return;
+    }
+    if (!mRegistryActive){
+        RequestIdentifiers requestId = Unknown;
+        TRAP(error, mRegistryActive = CBtSimpleActive::NewL(
+                       *this, requestId));
+        if(error!=KErrNone) {
+            emit commandCompleted(KErrGeneral);
+            return;
+        }
+    }
+    //first check if this device is already in the registry
+    
+    int majorRole = (getDeviceModel()->data(index,BtDeviceModel::MajorPropertyRole)).toInt();
+    int cod = (getDeviceModel()->data(index,BtDeviceModel::CoDRole)).toInt();
+    if (!(majorRole & BtuiDevProperty::InRegistry)) {
+        CBTDevice *symBtDevice;
+        TRAP( error, {
+               symBtDevice = CBTDevice::NewL( mSymaddr );
+               symBtDevice->SetDeviceClass(cod);
+               RequestIdentifiers requestId = AddDevice; 
+               mRegistryActive->SetRequestId(requestId);
+               mBtRegistry.AddDeviceL(*symBtDevice, mRegistryActive->iStatus);
+               mRegistryActive->GoActive();
+            });
+    
+    }
+    else{
+        RequestIdentifiers requestId = ModifyFriendlyName; 
+        mRegistryActive->SetRequestId(requestId);
+        TRAP( error, {
+                mBtRegistry.ModifyFriendlyDeviceNameL(mSymaddr, mSymName, mRegistryActive->iStatus);
+                mRegistryActive->GoActive();
+        });
+    }
+    if ( error != KErrNone ) {
+        emit commandCompleted(error,mNewName);
+    }
+  
+}
+
+void BtDelegateRemoteDevName::RequestCompletedL( CBtSimpleActive* aActive, TInt aStatus ){
+    
+    if(aStatus != KErrNone){
+        emit commandCompleted(aStatus, mNewName);
+        return;
+    }
+    int error = KErrNone;
+    if ( aActive->RequestId() == AddDevice ){
+        RequestIdentifiers requestId = ModifyFriendlyName; 
+        mRegistryActive->SetRequestId(requestId);
+        TRAP( error, {
+                mBtRegistry.ModifyFriendlyDeviceNameL(mSymaddr, mSymName, mRegistryActive->iStatus);
+                mRegistryActive->GoActive();
+        });
+        if(error != KErrNone){
+            emit commandCompleted(error, mNewName);
+        }
+    }
+    else if ( aActive->RequestId() == ModifyFriendlyName ){
+        emit commandCompleted(error, mNewName);
+    }
+    
+}
+    
+void BtDelegateRemoteDevName::CancelRequest( TInt aRequestId ){
+    if ( aRequestId == 1 ){
+        mBtRegistry.CancelRequest(mRegistryActive->RequestStatus());
+        emit commandCompleted(KErrCancel, mNewName);
+    }
+    
+}
+    
+void BtDelegateRemoteDevName::HandleError( CBtSimpleActive* aActive, TInt aError ){
+    //TODO: handle the error here
+    Q_UNUSED( aActive );
+    Q_UNUSED( aError );
+    emit commandCompleted(KErrGeneral,mNewName);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/btui/btuidelegate/btdelegateremotedevname.h	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,82 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef BTDELEGATEREMOTEDEVNAME_H
+#define BTDELEGATEREMOTEDEVNAME_H
+
+#include <e32base.h>
+#include <btmanclient.h>
+//#include <btengconnman.h>
+//#include <btengdevman.h>
+#include <btservices/btsimpleactive.h>
+#include "btabstractdelegate.h"
+
+class BtuiModel;
+
+enum RequestIdentifiers {
+    Unknown = 0,  // using a different number space than TBTVisibilityMode
+    AddDevice,
+    ModifyFriendlyName
+};
+
+/*!
+    \class BtDelegateRemoteDevName
+    \brief the base class for handling Bluetooth Local Name.
+ */
+class BtDelegateRemoteDevName : public BtAbstractDelegate, public MBtSimpleActiveObserver
+{
+    Q_OBJECT
+
+public:
+    explicit BtDelegateRemoteDevName( BtSettingModel* settingModel, 
+            BtDeviceModel* deviceModel, QObject *parent = 0 );
+    
+    virtual ~BtDelegateRemoteDevName();
+
+    virtual void exec( const QVariant &params );
+   
+    // from MBtSimpleActiveObserver
+    virtual void RequestCompletedL( CBtSimpleActive* aActive, TInt aStatus );
+    
+    virtual void CancelRequest( TInt aRequestId );
+    
+    virtual void HandleError( CBtSimpleActive* aActive, TInt aError );
+
+
+private:
+    bool validateName(QString &name );
+    
+    RBTRegistry mBtRegistry;
+    
+    RBTRegServ mBtRegServ;
+    
+    CBtSimpleActive* mRegistryActive;    
+    
+    QString mNewName;
+    
+    RBuf16 mSymName;
+    
+    TBTDevAddr mSymaddr;
+    
+
+private:
+
+    Q_DISABLE_COPY(BtDelegateRemoteDevName)
+
+};
+
+#endif // BTDELEGATEREMOTEDEVNAME_H
--- a/bluetoothengine/btui/btuidelegate/btdelegatevisibility.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btui/btuidelegate/btdelegatevisibility.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -34,7 +34,7 @@
 {
     TRAP_IGNORE( mBtengSettings = CBTEngSettings::NewL(this) );
     Q_CHECK_PTR( mBtengSettings );
-    mOperationOngoing = false;
+    mActiveHandling = false;
 }
 
 /*!
@@ -54,12 +54,12 @@
 {
     int minutes, err = 0;
 
-    if (mOperationOngoing) {
+    if (mActiveHandling) {
         // complete command with error
         emit commandCompleted(KErrInUse);
         return;
     } 
-    mOperationOngoing = true;
+    mActiveHandling = true;
     
     // read 1st parameter
     BTUI_ASSERT_X(params.toList().at(0).isValid(), "BtDelegateVisibility::exec", "invalid parameter");
@@ -70,12 +70,12 @@
     TBTVisibilityMode visibilityMode( EBTVisibilityModeNoScans );
     err = mBtengSettings->GetVisibilityMode( visibilityMode );
     if (err) {
-        mOperationOngoing = false;
+        mActiveHandling = false;
         emit commandCompleted(err);
         return;
     }
     if (visibilityMode == mOperation) {
-        mOperationOngoing = false;
+        mActiveHandling = false;
         emit commandCompleted(KErrNone);
         return;
     }
@@ -100,7 +100,7 @@
     }
     if (err) {
         // complete command with error
-        mOperationOngoing = false;
+        mActiveHandling = false;
         emit commandCompleted(err);
     }
 }
@@ -118,9 +118,9 @@
  */
 void BtDelegateVisibility::VisibilityModeChanged( TBTVisibilityMode aState )
 {
-    if (mOperationOngoing) {
+    if (mActiveHandling) {
         //Error handling has to be done, if value is not set properly.
-        mOperationOngoing = false;
+        mActiveHandling = false;
         if (mOperation == aState) {
             emit commandCompleted(KErrNone);
         }
--- a/bluetoothengine/btui/btuidelegate/btdelegatevisibility.h	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btui/btuidelegate/btdelegatevisibility.h	Mon Jul 12 18:51:05 2010 +0300
@@ -52,7 +52,7 @@
 
 private:
     CBTEngSettings* mBtengSettings;
-    bool mOperationOngoing;
+    bool mActiveHandling;
     TBTVisibilityMode mOperation;
 
 private:
--- a/bluetoothengine/btui/btuidelegate/btuidelegate.pro	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btui/btuidelegate/btuidelegate.pro	Mon Jul 12 18:51:05 2010 +0300
@@ -36,7 +36,8 @@
     btdelegateconnect.h \
     btdelegatepair.h \
     btdelegatedisconnect.h \
-    btdelegatedevsecurity.h
+    btdelegatedevsecurity.h \
+    btdelegateremotedevname.h
     
 SOURCES += btdelegatepower.cpp \
     btdelegatefactory.cpp \
@@ -47,7 +48,10 @@
     btdelegateconnect.cpp \
     btdelegatepair.cpp \
     btdelegatedisconnect.cpp \
-    btdelegatedevsecurity.cpp
+    btdelegatedevsecurity.cpp \
+    btdelegateremotedevname.cpp
+
+defFilePath = .
     
 symbian: { 
     SYMBIAN_PLATFORMS = WINSCW \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/btui/btuidelegate/bwins/btuidelegateu.def	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,20 @@
+EXPORTS
+	?qt_metacall@BtAbstractDelegate@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1 NONAME ; int BtAbstractDelegate::qt_metacall(enum QMetaObject::Call, int, void * *)
+	??1BtAbstractDelegate@@UAE@XZ @ 2 NONAME ; BtAbstractDelegate::~BtAbstractDelegate(void)
+	?metaObject@BtAbstractDelegate@@UBEPBUQMetaObject@@XZ @ 3 NONAME ; struct QMetaObject const * BtAbstractDelegate::metaObject(void) const
+	?tr@BtAbstractDelegate@@SA?AVQString@@PBD0H@Z @ 4 NONAME ; class QString BtAbstractDelegate::tr(char const *, char const *, int)
+	?newDelegate@BtDelegateFactory@@SAPAVBtAbstractDelegate@@W4Command@BtDelegate@@PAVBtSettingModel@@PAVBtDeviceModel@@PAVQObject@@@Z @ 5 NONAME ; class BtAbstractDelegate * BtDelegateFactory::newDelegate(enum BtDelegate::Command, class BtSettingModel *, class BtDeviceModel *, class QObject *)
+	?tr@BtAbstractDelegate@@SA?AVQString@@PBD0@Z @ 6 NONAME ; class QString BtAbstractDelegate::tr(char const *, char const *)
+	?qt_metacast@BtAbstractDelegate@@UAEPAXPBD@Z @ 7 NONAME ; void * BtAbstractDelegate::qt_metacast(char const *)
+	?getStaticMetaObject@BtAbstractDelegate@@SAABUQMetaObject@@XZ @ 8 NONAME ; struct QMetaObject const & BtAbstractDelegate::getStaticMetaObject(void)
+	??0BtAbstractDelegate@@QAE@PAVBtSettingModel@@PAVBtDeviceModel@@PAVQObject@@@Z @ 9 NONAME ; BtAbstractDelegate::BtAbstractDelegate(class BtSettingModel *, class BtDeviceModel *, class QObject *)
+	?staticMetaObject@BtAbstractDelegate@@2UQMetaObject@@B @ 10 NONAME ; struct QMetaObject const BtAbstractDelegate::staticMetaObject
+	??_EBtAbstractDelegate@@UAE@I@Z @ 11 NONAME ; BtAbstractDelegate::~BtAbstractDelegate(unsigned int)
+	?commandCompleted@BtAbstractDelegate@@IAEXHVQVariant@@@Z @ 12 NONAME ; void BtAbstractDelegate::commandCompleted(int, class QVariant)
+	?cancel@BtAbstractDelegate@@UAEXXZ @ 13 NONAME ; void BtAbstractDelegate::cancel(void)
+	?trUtf8@BtAbstractDelegate@@SA?AVQString@@PBD0@Z @ 14 NONAME ; class QString BtAbstractDelegate::trUtf8(char const *, char const *)
+	?getSettingModel@BtAbstractDelegate@@IAEPAVBtSettingModel@@XZ @ 15 NONAME ; class BtSettingModel * BtAbstractDelegate::getSettingModel(void)
+	?getDeviceModel@BtAbstractDelegate@@IAEPAVBtDeviceModel@@XZ @ 16 NONAME ; class BtDeviceModel * BtAbstractDelegate::getDeviceModel(void)
+	?trUtf8@BtAbstractDelegate@@SA?AVQString@@PBD0H@Z @ 17 NONAME ; class QString BtAbstractDelegate::trUtf8(char const *, char const *, int)
+	?isBtPowerOn@BtAbstractDelegate@@IAE_NXZ @ 18 NONAME ; bool BtAbstractDelegate::isBtPowerOn(void)
+
--- a/bluetoothengine/btui/btuidelegate/docml/pairwaitingdialog.docml	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btui/btuidelegate/docml/pairwaitingdialog.docml	Mon Jul 12 18:51:05 2010 +0300
@@ -1,16 +1,17 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<hbdocument version="1.0">
+<hbdocument version="1.1">
     <widget name="dialog" type="HbDialog">
+        <rect height="21.04478un" name="geometry" width="46.71642un" x="3.43284un" y="37.16418un"/>
         <widget name="heading" role="HbDialog:headingWidget" type="HbLabel">
+            <enums name="textWrapping" value="TextWordWrap"/>
             <enums name="alignment" value="AlignLeft|AlignJustify|AlignTop|AlignLeading"/>
+            <enums name="layoutDirection" value="LeftToRight"/>
             <string name="plainText" value="=== Heading ==="/>
-            <enums name="textWrapping" value="TextWordWrap"/>
-            <enums name="layoutDirection" value="LeftToRight"/>
         </widget>
         <widget name="container" role="HbDialog:contentWidget" type="HbWidget">
             <widget name="label" type="HbLabel">
                 <enums name="alignment" value="AlignLeft|AlignLeading"/>
-                <string name="plainText" value="Waiting for other device"/>
+                <string locid="txt_bt_info_waiting_the_other_device" name="plainText" value="Waiting for other device"/>
             </widget>
             <widget name="progressBar" type="HbProgressBar">
                 <integer name="progressValue" value="30"/>
@@ -23,9 +24,8 @@
                 <linearitem itemname="progressBar"/>
             </layout>
         </widget>
-        <rect height="21.04478un" name="geometry" width="46.71642un" x="3.43284un" y="37.16418un"/>
     </widget>
-    <metadata activeUIState="Common ui state" display="NHD portrait" unit="un">
+    <metadata activeUIState="Common ui state" display="NHD-3.2-inch_portrait" unit="un">
         <uistate name="Common ui state" sections="#common"/>
     </metadata>
 </hbdocument>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/btui/btuidelegate/eabi/btuidelegateu.def	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,19 @@
+EXPORTS
+	_ZN17BtDelegateFactory11newDelegateEN10BtDelegate7CommandEP14BtSettingModelP13BtDeviceModelP7QObject @ 1 NONAME
+	_ZN18BtAbstractDelegate11qt_metacallEN11QMetaObject4CallEiPPv @ 2 NONAME
+	_ZN18BtAbstractDelegate11qt_metacastEPKc @ 3 NONAME
+	_ZN18BtAbstractDelegate14getDeviceModelEv @ 4 NONAME
+	_ZN18BtAbstractDelegate15getSettingModelEv @ 5 NONAME
+	_ZN18BtAbstractDelegate16commandCompletedEi8QVariant @ 6 NONAME
+	_ZN18BtAbstractDelegate16staticMetaObjectE @ 7 NONAME DATA 16
+	_ZN18BtAbstractDelegate19getStaticMetaObjectEv @ 8 NONAME
+	_ZN18BtAbstractDelegate6cancelEv @ 9 NONAME
+	_ZN18BtAbstractDelegateC2EP14BtSettingModelP13BtDeviceModelP7QObject @ 10 NONAME
+	_ZN18BtAbstractDelegateD0Ev @ 11 NONAME
+	_ZN18BtAbstractDelegateD1Ev @ 12 NONAME
+	_ZN18BtAbstractDelegateD2Ev @ 13 NONAME
+	_ZNK18BtAbstractDelegate10metaObjectEv @ 14 NONAME
+	_ZTI18BtAbstractDelegate @ 15 NONAME
+	_ZTV18BtAbstractDelegate @ 16 NONAME
+	_ZN18BtAbstractDelegate11isBtPowerOnEv @ 17 NONAME
+
--- a/bluetoothengine/btui/btuimodel/btdevicedata.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,523 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#include "btdevicedata.h"
-#include <QDateTime>
-#include <btservices/advancedevdiscoverer.h>
-#include "btuiutil.h"
-#include "btqtconstants.h"
-
-class DevTypeIconMapping {
-public:    
-    int majorDevClass; // major device class value from CoD
-    int minorDevClass; // minor device class value from CoD
-    int majorProperty;   // one of major properties defined in BtDeviceModel
-    int minorProperty;   // one of minor properties defined in BtDeviceModel
-    char* connectedIcon; // the icon name for connected device
-    char* unconnectedIcon; // the icon name for not connected device.
-};
-
-// mapping table from major and minor Device Classes to device types and icons
-// which are specifically defined in btapplication namespace.
-// (Note audio device mapping is not in this table due to its complex logic)
-static const DevTypeIconMapping DeviceTypeIconMappingTable[] =
-{
-{EMajorDeviceComputer, 0, BtDeviceModel::Computer, 0, 
-        ":/icons/qgn_prop_bt_computer_connect.svg", ":/icons/qgn_prop_bt_computer.svg" },
-{EMajorDevicePhone,    0, BtDeviceModel::Phone,    0, 
-        ":/icons/qgn_prop_bt_phone_connect.svg", ":/icons/qgn_prop_bt_phone.svg"},
-{EMajorDeviceLanAccessPoint, 0, BtDeviceModel::LANAccessDev, 0, 
-        ":/icons/qgn_prop_bt_misc.svg", ":/icons/qgn_prop_bt_misc.svg" },
-{EMajorDevicePeripheral, EMinorDevicePeripheralKeyboard, 
-        BtDeviceModel::Peripheral, BtDeviceModel::Keyboard,
-        ":/icons/qgn_prop_bt_keyboard_connect.svg", ":/icons/qgn_prop_bt_keyboard.svg"},
-{EMajorDevicePeripheral, EMinorDevicePeripheralPointer, 
-        BtDeviceModel::Peripheral, BtDeviceModel::Mouse,
-        ":/icons/qgn_prop_bt_mouse_connect.svg", ":/icons/qgn_prop_bt_mouse.svg"},
-{EMajorDeviceImaging, 0, BtDeviceModel::ImagingDev, 0, 
-        ":/icons/qgn_prop_bt_printer_connect.svg", ":/icons/qgn_prop_bt_printer.svg"},
-{EMajorDeviceWearable, 0, BtDeviceModel::WearableDev, 0, 
-        ":/icons/qgn_prop_bt_misc.svg", ":/icons/qgn_prop_bt_misc.svg"},
-{EMajorDeviceToy, 0, BtDeviceModel::Toy, 0,
-        ":/icons/qgn_prop_bt_misc.svg", ":/icons/qgn_prop_bt_misc.svg"},
-};
-
-static const int DeviceTypeIconMappingTableSize = 
-        sizeof( DeviceTypeIconMappingTable ) / sizeof( DevTypeIconMapping );
-
-/*!
-    Constructor.
- */
-BtDeviceData::BtDeviceData( BtDeviceModel& model, QObject *parent )
-    : QObject( parent ), mModel( model ), mDiscover( 0 )
-{
-    mDeviceRepo = 0;
-    isSearchingDevice = false;
-    TRAP_IGNORE({
-        mDeviceRepo = CBtDevRepository::NewL();
-    });
-    Q_CHECK_PTR( mDeviceRepo );
-    TRAP_IGNORE( mDeviceRepo->AddObserverL( this ) );
-    
-    if ( mDeviceRepo->IsInitialized() ) {
-        initializeDataStore();
-    }
-}
-
-/*!
-    Destructor.
- */
-BtDeviceData::~BtDeviceData()
-{
-    delete mDeviceRepo;
-    delete mDiscover;
-}
-
-
-/*!
-    Tells whether the given column is in the range of the setting list.
-    
-    \param row the row number to be checked
-    \param col the column number to be checked
-    
-    \return true if the given row and column are valid; false otherwise.
-*/
-bool BtDeviceData::isValid( int row, int column) const
-{
-    return row >= 0 && row < mData.count() && column == 0;
-}
-
-/*!
-    \return the total amount of rows.
-    
-*/
-int BtDeviceData::rowCount() const
-{
-    return mData.count();
-}
-
-/*!
-    \return the total amount of columns.
-    
-*/
-int BtDeviceData::columnCount() const
-{
-    return 1;
-}
-
-/*!
-    Gets the value within a data item.
-    \param val contains the value at return.
-    \param row the row number which the value is from
-    \param col the column number which the value is from
-    \param role the role idenfier of the value.
- */
-void BtDeviceData::data(QVariant& val, int row,  int col, int role ) const
-{
-    if ( isValid( row, col ) ) {
-        val = mData.at( row ).value( role );
-    }
-    else {
-        val = QVariant( QVariant::Invalid );
-    }
-}
-
-/*!
-    Gets the whole item data at the specified column
-    \param row the row number of the item data to be returned
-    \param col the column number of the item data to be returned
-    \return the item data
- */
-BtuiModelDataItem BtDeviceData::itemData( int row, int col ) const
-{
-    if ( isValid( row, col ) ) {
-        return mData.at( row );
-    }
-    return BtuiModelDataItem();
-}
-
-
-/*!
-    Requests the model to searching Bluetooth devices.
-    \return true if the request is accepted; false otherwise
- */
-bool BtDeviceData::searchDevice()
-{
-    int err ( 0 );
-    removeTransientDevices();
-    if ( !mDiscover ) {
-        TRAP(err, mDiscover = CAdvanceDevDiscoverer::NewL( *mDeviceRepo, *this) );
-    }
-    if ( !err ) {
-        TRAP(err, mDiscover->DiscoverDeviceL() );
-    }
-    isSearchingDevice = true;
-    return err == 0;
-}
-
-/*!
-    Cancels a possible outstanding device search request.
- */
-void BtDeviceData::cancelSearchDevice()
-{
-    if ( mDiscover ) {
-        isSearchingDevice = false;
-        mDiscover->CancelDiscovery();
-    }
-}
-
-/*!
-    Removes transient (not-in-registry) devices 
-    (added as the result of device search).
- */
-void BtDeviceData::removeTransientDevices()
-{
-    // clear in-range property for all device items in this model.
-    int cnt = mData.count();
-    for ( int i = mData.count() - 1; i > -1; --i)
-        {
-        const BtuiModelDataItem& qtdev = mData.at(i);
-        if(isDeviceInRange(qtdev)) {
-            if(isDeviceInRegistry(qtdev)) {
-                // we cannot remove this device as it is in registry.
-                // remove it in-range property.
-                setMajorProperty(mData[i], BtDeviceModel::InRange, false);
-                updateRssi(mData[i], RssiInvalid);
-                mModel.emitDataChanged( i, 0, this );
-            }
-            else {
-                // this device is not in-registry. Delete it from local
-                // store.
-                mModel.beginRemoveRows(QModelIndex(), i, i);
-                mData.removeAt( i );
-                mModel.endRemoveRows();
-            }
-        }
-    }
-}
-
-/*!
-    callback from repository.
-    re-initialize our store.
- */
-void BtDeviceData::RepositoryInitialized() 
-{
-    initializeDataStore();
-}
-
-/*!
-    callback from repository.
-    update our store.
- */
-void BtDeviceData::DeletedFromRegistry( const TBTDevAddr& addr ) 
-{
-    int i = indexOf( addr );
-    if ( i > -1 ) {
-        if ( isSearchingDevice && isDeviceInRange( mData.at(i) ) ) {
-            // device searching is ongoing, and it is in-range. we can not 
-            // remore it from model now.
-            // clear-registry related properties, so that
-            // we get a chance to clean it after device searching later.
-            setMajorProperty(mData[i], BtDeviceModel::RegistryProperties, false);
-            mModel.emitDataChanged( i, 0, this );
-        }
-        else {
-            mModel.beginRemoveRows(QModelIndex(), i, i);
-            mData.removeAt( i );
-            mModel.endRemoveRows();
-        }
-    }
-}
-
-/*!
-    callback from repository.
-    update our store.
- */
-void BtDeviceData::AddedToRegistry( const CBtDevExtension& dev ) 
-{
-    ChangedInRegistry( dev, 0 );
-}
-
-/*!
-    callback from repository.
-    update our store.
- */
-void BtDeviceData::ChangedInRegistry( 
-        const CBtDevExtension& dev, TUint similarity )
-{
-    int i = indexOf( dev.Addr() );
-    if ( i == -1 ) {
-        BtuiModelDataItem devData;
-        if ( !isSearchingDevice ) {
-            // Rssi is only available at device inquiry stage. 
-            // We initialize this property to an invalid value
-            updateRssi(devData, RssiInvalid);
-        }
-        // add device-in-registry property:
-        setMajorProperty(devData, BtDeviceModel::InRegistry, true);
-        updateDeviceProperty(devData, dev, 0 );
-        mModel.beginInsertRows( QModelIndex(), mData.count(), mData.count() );
-        mData.append( devData );
-        mModel.endInsertRows();
-    }
-    else {
-        updateDeviceProperty(mData[i], dev, similarity );
-        setMajorProperty(mData[i], BtDeviceModel::InRegistry, true);
-        mModel.emitDataChanged( i, 0, this );
-    }
-}
-
-/*!
-    callback from repository.
-    update our store.
- */
-void BtDeviceData::ServiceConnectionChanged(
-        const CBtDevExtension& dev, TBool connected )
-{
-    int i = indexOf( dev.Addr() );
-    if ( i > -1 ) {
-        int preconn =  BtDeviceModel::Connected 
-                & mData[i][BtDeviceModel::MajorPropertyRole].toInt();
-        // we only update and signal if connection status is really
-        // changed:
-        if ( ( preconn != 0 && !connected )
-            || ( preconn == 0 && connected ) ) {
-            setMajorProperty(mData[i], BtDeviceModel::Connected, connected );
-            mModel.emitDataChanged( i, 0, this );
-        }
-    }
-    // it is impossible that a device has connected but it is not in
-    // our local store according to current bteng services.
-    // need to take more care in future when this becomes possible.
-}
-
-/*!
-    callback from device search.
-    update our store.
- */
-void BtDeviceData::HandleNextDiscoveryResultL( 
-        const TInquirySockAddr& inqAddr, const TDesC& name )
-{
-    int pos = indexOf( inqAddr.BTAddr() );
-    const CBtDevExtension* dev = mDeviceRepo->Device( inqAddr.BTAddr() );
-    
-    //RssiRole
-    int rssi( RssiInvalid ); // initialize to an invalid value.
-    if( inqAddr.ResultFlags() & TInquirySockAddr::ERssiValid ) {
-        rssi = inqAddr.Rssi();
-    }
-    
-    if ( pos == -1 ) {
-        BtuiModelDataItem devData;
-        setMajorProperty(devData, BtDeviceModel::InRange, true);
-        updateRssi(devData, rssi);
-        CBtDevExtension* devExt(NULL);
-        TRAP_IGNORE( {
-            devExt = CBtDevExtension::NewLC( inqAddr, name );
-            CleanupStack::Pop(); });
-        updateDeviceProperty(devData, *devExt, 0);
-        delete devExt;
-        mModel.beginInsertRows( QModelIndex(), mData.count(), mData.count() );
-        mData.append( devData );
-        mModel.endInsertRows();
-    }
-    else {
-        setMajorProperty(mData[pos], BtDeviceModel::InRange, true);
-        updateRssi(mData[pos], rssi);
-        mModel.emitDataChanged( pos, 0, this );
-    }
-}
-
-/*!
-    callback from device search.
-    inform client.
- */
-void BtDeviceData::HandleDiscoveryCompleted( TInt error )
-{
-    isSearchingDevice = false;
-    mModel.emitdeviceSearchCompleted( (int) error );
-}
-
-void BtDeviceData::initializeDataStore()
-    {
-    // it is possible that we are searching devices.
-    // We use a simple but not-so-efficient method to update the model.
-    
-    // If the device store is not empty, we clear
-    // registry property from these devices first.
-    for (int i = 0; i < mData.count(); ++i) {
-        setMajorProperty(mData[i], BtDeviceModel::RegistryProperties, false);
-    }
-    if ( mData.count() ) {
-        // need to update view because we have changed device properties.
-        QModelIndex top = mModel.createIndex(0, 0, this);
-        QModelIndex bottom = mModel.createIndex(mData.count() - 1, 0, this);
-        mModel.emitDataChanged( top, bottom );
-    }
-
-    const RDevExtensionArray& devs = mDeviceRepo->AllDevices();
-    for (int i = 0; i < devs.Count(); ++i) {
-        int pos = indexOf( devs[i]->Addr() );
-        if ( pos > -1 ) {
-            // add device-in-registry property:
-            setMajorProperty(mData[pos], BtDeviceModel::InRegistry, true);            
-            updateDeviceProperty(mData[pos], *(devs[i]), 0);
-            mModel.emitDataChanged( pos, 0, this );
-        }
-        else {
-            BtuiModelDataItem devData;
-            // add device-in-registry property:
-            setMajorProperty(devData, BtDeviceModel::InRegistry, true);
-            updateDeviceProperty(devData, *( devs[i] ), 0 );
-            mModel.beginInsertRows(QModelIndex(), mData.count(), mData.count() );
-            mData.append( devData );
-            mModel.endInsertRows();
-        }
-    }
-}
-
-void BtDeviceData::updateDeviceProperty(BtuiModelDataItem& qtdev,
-        const CBtDevExtension& dev, TUint similarity )
-{
-    // similarity is not used currently. 
-    // It is possible to gain better performance
-    // with this info to avoid re-manipulate
-    // unchanged properties.
-    Q_UNUSED(similarity);
-    
-    //DevDisplayNameRole
-    QString str = QString::fromUtf16( 
-            dev.Alias().Ptr(), dev.Alias().Length() );
-    qtdev[BtDeviceModel::NameAliasRole] = QVariant( str );
-
-    //DevAddrReadableRole
-    addrSymbianToReadbleString( str, dev.Addr() );
-    qtdev[BtDeviceModel::ReadableBdaddrRole] = QVariant( str );
-
-    //LastUsedTimeRole
-    TDateTime symDt = dev.Device().Used().DateTime();
-    QDate date( symDt.Year(), symDt.Month(), symDt.Day() );
-    QTime time( symDt.Hour(), symDt.Minute(), symDt.MicroSecond() / 1000 );
-    QDateTime qdt(date, time);
-    qtdev[BtDeviceModel::LastUsedTimeRole] = QVariant(qdt);
- 
-    // set paired status:
-    setMajorProperty(qtdev, BtDeviceModel::Bonded, isBonded( dev.Device() ));
-    
-    // set blocked status:
-    setMajorProperty(qtdev, BtDeviceModel::Blocked, 
-            dev.Device().GlobalSecurity().Banned() );
-    // set trusted status:
-    setMajorProperty(qtdev, BtDeviceModel::Trusted, 
-            dev.Device().GlobalSecurity().NoAuthorise() );
-
-    //CoDRole
-    //MinorPropertyRole
-    int cod = static_cast<int>( dev.Device().DeviceClass().DeviceClass() );
-    qtdev[BtDeviceModel::CoDRole] = QVariant(cod);
-    
-    // Initially, clear CoD related properties:
-    int majorProperty = qtdev[BtDeviceModel::MajorPropertyRole].toInt() & 
-        ~BtDeviceModel::CodProperties;
-    
-    int minorProperty = BtDeviceModel::NullProperty;
-    
-    // device type must be mapped according to CoD:
-    int majorDevCls = dev.Device().DeviceClass().MajorDeviceClass();
-    int minorDevCls = dev.Device().DeviceClass().MinorDeviceClass();
-
-    int i;
-    for (i = 0; i < DeviceTypeIconMappingTableSize; ++i ) {
-        if ( DeviceTypeIconMappingTable[i].majorDevClass == majorDevCls &&
-             ( DeviceTypeIconMappingTable[i].minorDevClass == 0 || 
-               DeviceTypeIconMappingTable[i].minorDevClass == minorDevCls ) ) {
-             // device classes match a item in table, get the mapping:
-            majorProperty |= DeviceTypeIconMappingTable[i].majorProperty;
-            minorProperty |= DeviceTypeIconMappingTable[i].minorProperty;
-            break;
-         }
-    }
-    
-    // AV device mapping are not defined in the table, do mapping here if no device
-    // type mapped so far:
-    if ( i == DeviceTypeIconMappingTableSize) {
-        // audio device, carkit, headset or speaker:
-        if( ( majorDevCls == EMajorDeviceAV) 
-            || (dev.Device().DeviceClass().MajorServiceClass() == EMajorServiceRendering 
-            && majorDevCls != EMajorDeviceImaging) ) {
-            
-            majorProperty |= BtDeviceModel::AVDev;
-            
-            if( minorDevCls == EMinorDeviceAVCarAudio ) {
-                // carkit:
-                minorProperty |= BtDeviceModel::Carkit; 
-            }
-            else {
-                // headset:
-                minorProperty |= BtDeviceModel::Headset;
-            }
-        }
-    }
-    
-    qtdev[BtDeviceModel::MajorPropertyRole] = QVariant( majorProperty );
-    qtdev[BtDeviceModel::MinorPropertyRole] = QVariant( minorProperty );
-}
-
-int BtDeviceData::indexOf( const TBTDevAddr& addr ) const
-{
-    QString addrStr;
-    addrSymbianToReadbleString( addrStr, addr );
-    for (int i = 0; i < mData.count(); ++i ) {
-        if ( mData.at( i ).value( BtDeviceModel::ReadableBdaddrRole ) 
-                == addrStr ) {
-            return i;
-        }
-    }
-    return -1;
-}
-
-void BtDeviceData::updateRssi(BtuiModelDataItem& qtdev, int rssi )
-    {
-    qtdev[BtDeviceModel::RssiRole] = QVariant( rssi );
-    }
-
-/*!
-    Add the specified major property to the device if addto is true.
-    Otherwise the property is removed from the device. 
- */
-void BtDeviceData::setMajorProperty(
-        BtuiModelDataItem& qtdev, int prop, bool addto)
-{
-    if ( addto ) {
-        qtdev[BtDeviceModel::MajorPropertyRole] = 
-            QVariant( qtdev[BtDeviceModel::MajorPropertyRole].toInt() | prop);
-    }
-    else {
-        qtdev[BtDeviceModel::MajorPropertyRole] = 
-            QVariant( qtdev[BtDeviceModel::MajorPropertyRole].toInt() & ~prop);
-    }
-}
-
-bool BtDeviceData::isDeviceInRange( const BtuiModelDataItem& qtdev )
-{   
-    return BtDeviceModel::InRange & qtdev[BtDeviceModel::MajorPropertyRole].toInt();
-}
-
-bool BtDeviceData::isDeviceInRegistry( const BtuiModelDataItem& qtdev )
-{
-    return BtDeviceModel::InRegistry & qtdev[BtDeviceModel::MajorPropertyRole].toInt();
-}
--- a/bluetoothengine/btui/btuimodel/btdevicedata.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,123 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#ifndef BTDEVICEDATA_H
-#define BTDEVICEDATA_H
-
-#include "btuimodeltypes.h"
-#include <btdevicemodel.h>
-
-#include <e32base.h>
-#include <btservices/btdevrepository.h>
-#include <btservices/devdiscoveryobserver.h>
-
-
-class CAdvanceDevDiscoverer;
-
-/*!
-    \class BtDeviceData
-    \brief class for providing remote device data.
-
-    BtDeviceData class is responsible for providing the latest information
-    regarding the properties of remote devices.
-
-    \\sa bluetoothuimodel
- */
-class BtDeviceData : public QObject,
-                     public MBtDevRepositoryObserver,
-                     public MDevDiscoveryObserver
-{
-    Q_OBJECT
-
-public:
-    explicit BtDeviceData( BtDeviceModel& model, QObject *parent = 0 );
-    
-    virtual ~BtDeviceData();
-    
-    bool isValid( int row, int col ) const;
-    
-    int rowCount() const;
-    
-    int columnCount() const;
-        
-    void data(QVariant& val, int row, int col, int role ) const;
-    
-    BtuiModelDataItem itemData( int row, int col ) const;
-    
-    bool searchDevice();
-    
-    void cancelSearchDevice();
-    
-    void removeTransientDevices();
-    
-private:
-    // From MBtDeviceRepositoryObserver
-    
-    void RepositoryInitialized();
-    
-    void DeletedFromRegistry( const TBTDevAddr& addr );
-    
-    void AddedToRegistry( const CBtDevExtension& dev );
-    
-    void ChangedInRegistry( const CBtDevExtension& dev, TUint similarity  ); 
-
-    void ServiceConnectionChanged(
-            const CBtDevExtension& dev, TBool connected );
-    
-    // from MDevDiscoveryObserver
-    void HandleNextDiscoveryResultL( 
-            const TInquirySockAddr& inqAddr, const TDesC& name );
-
-    void HandleDiscoveryCompleted( TInt error );
-    
-public slots:
-    //void activeRequestCompleted( int status, int id );
-
-private:
-
-    void initializeDataStore();
-
-    void updateDeviceProperty(BtuiModelDataItem& qtdev,
-            const CBtDevExtension& dev, TUint similarity );
-    
-    int indexOf( const TBTDevAddr& addr ) const;
-    
-    void updateRssi(BtuiModelDataItem& qtdev, int rssi );
-    
-    void setMajorProperty( BtuiModelDataItem& qtdev, int prop, bool addto);
-    
-    bool isDeviceInRange( const BtuiModelDataItem& qtdev );
-    
-    bool isDeviceInRegistry( const BtuiModelDataItem& qtdev );
-    
-private:
-
-    BtuiModelDataSource mData;
-    
-    BtDeviceModel& mModel;
-    
-    CBtDevRepository* mDeviceRepo;
-    
-    CAdvanceDevDiscoverer* mDiscover;
-    
-    bool isSearchingDevice;
-    
-    Q_DISABLE_COPY(BtDeviceData)
-
-};
-
-#endif // BTLOCALSETTING_H
--- a/bluetoothengine/btui/btuimodel/btdevicemodel.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btui/btuimodel/btdevicemodel.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -16,7 +16,8 @@
 */
 
 #include <btdevicemodel.h>
-#include "btdevicedata.h"
+#include "btdevicemodel_p.h"
+#include "bluetoothuitrace.h"
 
 /*!
     This Constructor creates new instances of model data structure.
@@ -24,17 +25,18 @@
 BtDeviceModel::BtDeviceModel( QObject *parent )
     : QAbstractItemModel( parent )
 {
-   mDeviceData = QSharedPointer<BtDeviceData>( new BtDeviceData( *this ) );
+   d = QSharedPointer<BtDeviceModelPrivate>( new BtDeviceModelPrivate( *this ) );
+   connectModelSignals();
 }
 
 /*!
-    This Constructor shares the instances of model data structure with the
-    given model.
+    This Constructor shares the private implementation of the device model.
  */
 BtDeviceModel::BtDeviceModel( const BtDeviceModel &model, QObject *parent )
     : QAbstractItemModel( parent )
 {
-    mDeviceData = model.mDeviceData;
+    d = model.d;
+    connectModelSignals();
 }
 
 /*!
@@ -50,7 +52,7 @@
  */
 bool BtDeviceModel::searchDevice()
 {
-    return mDeviceData->searchDevice();
+    return d->searchDevice();
 }
 
 /*!
@@ -58,7 +60,7 @@
  */
 void BtDeviceModel::cancelSearchDevice()
 {
-    mDeviceData->cancelSearchDevice();
+    d->cancelSearchDevice();
 }
 
 /*!
@@ -67,7 +69,7 @@
  */
 void BtDeviceModel::removeTransientDevices()
 {
-    mDeviceData->removeTransientDevices();
+    d->removeTransientDevices();
 }
 
 /*!
@@ -76,8 +78,8 @@
 QModelIndex BtDeviceModel::index( int row, int column, const QModelIndex &parent ) const
 {
     Q_UNUSED( parent );
-    if ( mDeviceData->isValid( row, column ) ) {
-        return createIndex( row, column, mDeviceData.data() );
+    if ( d->isValid( row, column ) ) {
+        return createIndex( row, column, d.data() );
     }
     // invalid row and column:
     return QModelIndex();
@@ -99,7 +101,7 @@
 int BtDeviceModel::rowCount( const QModelIndex &parent ) const
 {
     Q_UNUSED( parent );
-    return mDeviceData->rowCount();
+    return d->rowCount();
 }
 
 /*!
@@ -108,7 +110,7 @@
 int BtDeviceModel::columnCount( const QModelIndex &parent ) const
 {
     Q_UNUSED( parent );
-    return mDeviceData->columnCount();
+    return d->columnCount();
 }
 
 /*!
@@ -117,33 +119,94 @@
 QVariant BtDeviceModel::data( const QModelIndex &index, int role ) const
 {
     QVariant val( QVariant::Invalid );
-    mDeviceData.data()->data( val, index.row(), index.column(), role );
+    d.data()->data( val, index.row(), index.column(), role );
     return val;
 }
 
 QMap<int, QVariant> BtDeviceModel::itemData( const QModelIndex & index ) const
 {
-    return  mDeviceData.data()->itemData( index.row(), index.column() );
+    return  d.data()->itemData( index.row(), index.column() );
+}
+
+
+/*!
+    emits dataChanged signal.
+ */
+void BtDeviceModel::deviceDataChanged( int row, void *parent )
+{
+    QModelIndex idx = createIndex( row, 0, parent );
+    emit dataChanged( idx, idx );
 }
 
 /*!
     emits dataChanged signal.
  */
-void BtDeviceModel::emitDataChanged( int row, int column, void *parent )
+void BtDeviceModel::deviceDataChanged( int first, int last, void *parent )
 {
-    QModelIndex idx = createIndex( row, column, parent );
-    emit dataChanged( idx, idx );
+    QModelIndex top = createIndex( first, 0, parent );
+    QModelIndex bottom = createIndex( last, 0, parent );
+    emit dataChanged( top, bottom );
+}
+
+/*!
+    call beginInsertRows.
+ */
+void BtDeviceModel::beginInsertDevices(int first, int last, void *parent)
+{
+    Q_UNUSED( parent);
+    beginInsertRows(QModelIndex(), first, last); 
 }
 
-void BtDeviceModel::emitDataChanged(const QModelIndex &top, const QModelIndex &bottom )
-    {
-    emit dataChanged( top, bottom );
-    }
+/*!
+    calls endInsertRows.
+ */
+void BtDeviceModel::BtDeviceModel::endInsertDevices()
+{
+    endInsertRows();
+}
+
+/*!
+    calls beginRemoveRows.
+ */
+void BtDeviceModel::beginRemoveDevices(int first, int last, void *parent)
+{
+    Q_UNUSED( parent);
+    beginRemoveRows(QModelIndex(), first, last); 
+}
+
+/*!
+    calls endRemoveRows.
+ */
+void BtDeviceModel::endRemoveDevices()
+{
+    endRemoveRows();
+}
 
 /*!
     emits deviceSearchCompleted signal.
  */
-void BtDeviceModel::emitdeviceSearchCompleted( int error )
+void BtDeviceModel::emitDeviceSearchCompleted( int error )
 {
     emit deviceSearchCompleted( error );
 }
+
+/*!
+ connects all signals of private impl to slots of this
+ */
+void BtDeviceModel::connectModelSignals()
+{
+    bool ok = connect(d.data(), SIGNAL(deviceDataChanged(int,void*)), SLOT(deviceDataChanged(int,void*)));
+    BTUI_ASSERT_X( ok, "BtDeviceModel", "deviceDataChanged can't connect" );
+    ok = connect(d.data(), SIGNAL(deviceDataChanged(int,int,void*)), SLOT(deviceDataChanged(int,int,void*)));
+    BTUI_ASSERT_X( ok, "BtDeviceModel", "deviceDataChanged can't connect 2" );
+    ok = connect(d.data(), SIGNAL(beginInsertDevices(int,int,void*)), SLOT(beginInsertDevices(int,int,void*)));
+    BTUI_ASSERT_X( ok, "BtDeviceModel", "beginInsertDevices can't connect" );
+    ok = connect(d.data(), SIGNAL(endInsertDevices()), SLOT(endInsertDevices()));
+    BTUI_ASSERT_X( ok, "BtDeviceModel", "endInsertDevices can't connect" );    
+    ok = connect(d.data(), SIGNAL(beginRemoveDevices(int,int,void*)), SLOT(beginRemoveDevices(int,int,void*)));
+    BTUI_ASSERT_X( ok, "BtDeviceModel", "beginRemoveDevices can't connect" );
+    ok = connect(d.data(), SIGNAL(endRemoveDevices()), SLOT(endRemoveDevices()));
+    BTUI_ASSERT_X( ok, "BtDeviceModel", "endRemoveDevices can't connect" );
+    ok = connect(d.data(), SIGNAL(deviceSearchCompleted(int)), SLOT(emitDeviceSearchCompleted(int)));
+    BTUI_ASSERT_X( ok, "BtDeviceModel", "emitDeviceSearchCompleted can't connect" );    
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/btui/btuimodel/btdevicemodel_p.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,478 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include "btdevicemodel_p.h"
+#include <QDateTime>
+#include <btservices/advancedevdiscoverer.h>
+#include <btengconnman.h>
+#include "btuiutil.h"
+#include "btuidevtypemap.h"
+#include "btqtconstants.h"
+
+/*!
+    Constructor.
+ */
+BtDeviceModelPrivate::BtDeviceModelPrivate( BtDeviceModel& model, QObject *parent )
+    : QObject( parent ), mModel( model ), mDiscover( 0 ), mSeqNum( 0 )
+{
+    mDeviceRepo = 0;
+    isSearchingDevice = false;
+    TRAP_IGNORE({
+        mDeviceRepo = CBtDevRepository::NewL();
+    });
+    Q_CHECK_PTR( mDeviceRepo );
+    TRAP_IGNORE( mDeviceRepo->AddObserverL( this ) );
+    
+    if ( mDeviceRepo->IsInitialized() ) {
+        initializeDataStore();
+    }
+}
+
+/*!
+    Destructor.
+ */
+BtDeviceModelPrivate::~BtDeviceModelPrivate()
+{
+    delete mDeviceRepo;
+    delete mDiscover;
+}
+
+
+/*!
+    Tells whether the given column is in the range of the setting list.
+    
+    \param row the row number to be checked
+    \param col the column number to be checked
+    
+    \return true if the given row and column are valid; false otherwise.
+*/
+bool BtDeviceModelPrivate::isValid( int row, int column) const
+{
+    return row >= 0 && row < mData.count() && column == 0;
+}
+
+/*!
+    \return the total amount of rows.
+    
+*/
+int BtDeviceModelPrivate::rowCount() const
+{
+    return mData.count();
+}
+
+/*!
+    \return the total amount of columns.
+    
+*/
+int BtDeviceModelPrivate::columnCount() const
+{
+    return 1;
+}
+
+/*!
+    Gets the value within a data item.
+    \param val contains the value at return.
+    \param row the row number which the value is from
+    \param col the column number which the value is from
+    \param role the role identifier of the value.
+ */
+void BtDeviceModelPrivate::data(QVariant& val, int row,  int col, int role ) const
+{
+    if ( isValid( row, col ) ) {
+        val = mData.at( row ).value( role );
+    }
+    else {
+        val = QVariant( QVariant::Invalid );
+    }
+}
+
+/*!
+    Gets the whole item data at the specified column
+    \param row the row number of the item data to be returned
+    \param col the column number of the item data to be returned
+    \return the item data
+ */
+BtuiModelDataItem BtDeviceModelPrivate::itemData( int row, int col ) const
+{
+    if ( isValid( row, col ) ) {
+        return mData.at( row );
+    }
+    return BtuiModelDataItem();
+}
+
+
+/*!
+    Requests the model to searching Bluetooth devices.
+    \return true if the request is accepted; false otherwise
+ */
+bool BtDeviceModelPrivate::searchDevice()
+{
+    int err ( 0 );
+    removeTransientDevices();
+    if ( !mDiscover ) {
+        TRAP(err, mDiscover = CAdvanceDevDiscoverer::NewL( *mDeviceRepo, *this) );
+    }
+    if ( !err ) {
+        TRAP(err, mDiscover->DiscoverDeviceL() );
+    }
+    isSearchingDevice = true;
+    return err == 0;
+}
+
+/*!
+    Cancels a possible outstanding device search request.
+ */
+void BtDeviceModelPrivate::cancelSearchDevice()
+{
+    if ( mDiscover ) {
+        isSearchingDevice = false;
+        mDiscover->CancelDiscovery();
+    }
+}
+
+/*!
+    Removes transient (not-in-registry) devices 
+    (added as the result of device search).
+ */
+void BtDeviceModelPrivate::removeTransientDevices()
+{
+    // clear in-range property for all device items in this model.
+    int cnt = mData.count();
+    for ( int i = mData.count() - 1; i > -1; --i)
+        {
+        const BtuiModelDataItem& qtdev = mData.at(i);
+        if(isDeviceInRange(qtdev)) {
+            if(isDeviceInRegistry(qtdev)) {
+                // we cannot remove this device as it is in registry.
+                // remove it in-range property.
+                setMajorProperty(mData[i], BtuiDevProperty::InRange, false);
+                updateRssi(mData[i], RssiInvalid);
+                updateSeqNum(mData[i], -1);
+                emit deviceDataChanged(i, this);
+            }
+            else {
+                // this device is not in-registry. Delete it from local
+                // store.
+                emit beginRemoveDevices(i, i, this);
+                mData.removeAt( i );
+                emit endRemoveDevices();
+            }
+        }
+    }
+}
+
+/*!
+    callback from repository.
+    re-initialize our store.
+ */
+void BtDeviceModelPrivate::RepositoryInitialized() 
+{
+    initializeDataStore();
+}
+
+/*!
+    callback from repository.
+    update our store.
+ */
+void BtDeviceModelPrivate::DeletedFromRegistry( const TBTDevAddr& addr ) 
+{
+    int i = indexOf( addr );
+    if ( i > -1 ) {
+        if ( isSearchingDevice && isDeviceInRange( mData.at(i) ) ) {
+            // device searching is ongoing, and it is in-range. we can not 
+            // remove it from model now.
+            // clear-registry related properties, so that
+            // we get a chance to clean it after device searching later.
+            setMajorProperty(mData[i], BtuiDevProperty::RegistryProperties, false);
+            emit deviceDataChanged(i, this);
+        }
+        else {
+            emit beginRemoveDevices(i, i, this);
+            mData.removeAt( i );
+            emit endRemoveDevices();
+        }
+    }
+}
+
+/*!
+    callback from repository.
+    update our store.
+ */
+void BtDeviceModelPrivate::AddedToRegistry( const CBtDevExtension& dev ) 
+{
+    ChangedInRegistry( dev, 0 );
+}
+
+/*!
+    callback from repository.
+    update our store.
+ */
+void BtDeviceModelPrivate::ChangedInRegistry( 
+        const CBtDevExtension& dev, TUint similarity )
+{
+    int i = indexOf( dev.Addr() );
+    if ( i == -1 ) {
+        BtuiModelDataItem devData;
+        if ( !isSearchingDevice ) {
+            // Rssi is only available at device inquiry stage. 
+            // We initialize this property to an invalid value
+            updateRssi(devData, RssiInvalid);
+        }
+        // add device-in-registry property:
+        setMajorProperty(devData, BtuiDevProperty::InRegistry, true);
+        updateDeviceProperty(devData, dev, 0 );
+        emit beginInsertDevices( mData.count(), mData.count(), this );
+        mData.append( devData );
+        emit endInsertDevices();
+    }
+    else {
+        updateDeviceProperty(mData[i], dev, similarity );
+        setMajorProperty(mData[i], BtuiDevProperty::InRegistry, true);
+        emit deviceDataChanged( i, this );
+    }
+}
+
+/*!
+    callback from repository.
+    update our store.
+ */
+void BtDeviceModelPrivate::ServiceConnectionChanged(
+        const CBtDevExtension& dev, TBool connected )
+{
+    int i = indexOf( dev.Addr() );
+    if ( i > -1 ) {
+        int preconn =  BtuiDevProperty::Connected 
+                & mData[i][BtDeviceModel::MajorPropertyRole].toInt();
+        // we only update and signal if connection status is really
+        // changed:
+        if ( ( preconn != 0 && !connected )
+            || ( preconn == 0 && connected ) ) {
+            setMajorProperty(mData[i], BtuiDevProperty::Connected, connected );
+            emit deviceDataChanged( i, this );
+        }
+    }
+    // it is impossible that a device has connected but it is not in
+    // our local store according to current bteng services.
+    // need to take more care in future when this becomes possible.
+}
+
+/*!
+    callback from device search.
+    update our store.
+ */
+void BtDeviceModelPrivate::HandleNextDiscoveryResultL( 
+        const TInquirySockAddr& inqAddr, const TDesC& name )
+{
+    int pos = indexOf( inqAddr.BTAddr() );
+    const CBtDevExtension* dev = mDeviceRepo->Device( inqAddr.BTAddr() );
+    
+    //RssiRole
+    int rssi( RssiInvalid ); // initialize to an invalid value.
+    if( inqAddr.ResultFlags() & TInquirySockAddr::ERssiValid ) {
+        rssi = inqAddr.Rssi();
+    }
+    
+    if ( pos == -1 ) {
+        BtuiModelDataItem devData;
+        setMajorProperty(devData, BtuiDevProperty::InRange, true);
+        updateRssi(devData, rssi);
+        updateSeqNum( devData, mSeqNum++ );
+        CBtDevExtension* devExt(NULL);
+        TRAP_IGNORE( {
+            devExt = CBtDevExtension::NewLC( inqAddr, name );
+            CleanupStack::Pop(); });
+        updateDeviceProperty(devData, *devExt, 0);
+        delete devExt;
+        emit beginInsertDevices( mData.count(), mData.count(), this );
+        mData.append( devData );
+        emit endInsertDevices();
+    }
+    else {
+        setMajorProperty(mData[pos], BtuiDevProperty::InRange, true);
+        updateRssi(mData[pos], rssi);
+        updateSeqNum( mData[pos], mSeqNum++ );
+        emit deviceDataChanged( pos, this );
+    }
+}
+
+/*!
+    callback from device search.
+    inform client.
+ */
+void BtDeviceModelPrivate::HandleDiscoveryCompleted( TInt error )
+{
+    isSearchingDevice = false;
+    // Reset the sequence number for the next search
+    mSeqNum = 0;
+    emit deviceSearchCompleted( (int) error );
+}
+
+void BtDeviceModelPrivate::initializeDataStore()
+    {
+    
+    mSeqNum = 0;  // reset when starting search again
+    
+    // it is possible that we are searching devices.
+    // We use a simple but not-so-efficient method to update the model.
+    
+    // If the device store is not empty, we clear
+    // registry property from these devices first.
+    for (int i = 0; i < mData.count(); ++i) {
+        setMajorProperty(mData[i], BtuiDevProperty::RegistryProperties, false);
+    }
+    if ( mData.count() ) {
+        // need to update view because we have changed device properties.
+        emit deviceDataChanged( 0, mData.count() - 1, this );
+    }
+
+    const RDevExtensionArray& devs = mDeviceRepo->AllDevices();
+    for (int i = 0; i < devs.Count(); ++i) {
+        int pos = indexOf( devs[i]->Addr() );
+        if ( pos > -1 ) {
+            // add device-in-registry property:
+            setMajorProperty(mData[pos], BtuiDevProperty::InRegistry, true);            
+            updateDeviceProperty(mData[pos], *(devs[i]), 0);
+            updateSeqNum(mData[pos], -1);
+            emit deviceDataChanged( pos, this );
+        }
+        else {
+            BtuiModelDataItem devData;
+            // add device-in-registry property:
+            setMajorProperty(devData, BtuiDevProperty::InRegistry, true);
+            updateDeviceProperty(devData, *( devs[i] ), 0 );
+            updateSeqNum(devData, -1);
+            emit beginInsertDevices(mData.count(), mData.count(), this );
+            mData.append( devData );
+            emit endInsertDevices();
+        }
+    }
+}
+
+void BtDeviceModelPrivate::updateDeviceProperty(BtuiModelDataItem& qtdev,
+        const CBtDevExtension& dev, TUint similarity )
+{
+    // similarity is not used currently. 
+    // It is possible to gain better performance
+    // with this info to avoid re-manipulate
+    // unchanged properties.
+    Q_UNUSED(similarity);
+    
+    //DevDisplayNameRole
+    QString str = QString::fromUtf16( 
+            dev.Alias().Ptr(), dev.Alias().Length() );
+    qtdev[BtDeviceModel::NameAliasRole] = QVariant( str );
+
+    //DevAddrReadableRole
+    addrSymbianToReadbleString( str, dev.Addr() );
+    qtdev[BtDeviceModel::ReadableBdaddrRole] = QVariant( str );
+
+    //LastUsedTimeRole
+    TDateTime symDt = dev.Device().Used().DateTime();
+    QDate date( symDt.Year(), symDt.Month(), symDt.Day() );
+    QTime time( symDt.Hour(), symDt.Minute(), symDt.MicroSecond() / 1000 );
+    QDateTime qdt(date, time);
+    qtdev[BtDeviceModel::LastUsedTimeRole] = QVariant(qdt);
+ 
+    // set paired status:
+    setMajorProperty(qtdev, BtuiDevProperty::Bonded, isBonded( dev.Device() ));
+    
+    // set blocked status:
+    setMajorProperty(qtdev, BtuiDevProperty::Blocked, 
+            dev.Device().GlobalSecurity().Banned() );
+    // set trusted status:
+    setMajorProperty(qtdev, BtuiDevProperty::Trusted, 
+            dev.Device().GlobalSecurity().NoAuthorise() );
+    // set connected status:
+    // EBTEngConnecting is an intermediate state between connected and not-connected, 
+    // we do not treat it as connected:         
+    setMajorProperty(qtdev, BtuiDevProperty::Connected, dev.ServiceConnectionStatus() == EBTEngConnected);
+
+    // Check whether the device has services that are connectable in bteng scope.
+    CBTEngConnMan* connMan( 0 );
+    TRAP_IGNORE( connMan = CBTEngConnMan::NewL(0));
+    TBool connectable(EFalse);
+    if ( connMan ) {
+        (void) connMan->IsConnectable(dev.Addr(), dev.Device().DeviceClass(), connectable);
+        delete connMan;
+    }
+    setMajorProperty(qtdev, BtuiDevProperty::Connectable, connectable);
+    
+    int cod = static_cast<int>( dev.Device().DeviceClass().DeviceClass() );
+    qtdev[BtDeviceModel::CoDRole] = QVariant(cod);
+
+    int majorDeviceType;
+    int minorDeviceType;
+    // device type is mapped according to CoD:
+    BtuiDevProperty::mapDeiveType(majorDeviceType, minorDeviceType, cod);
+
+
+
+    
+    qtdev[BtDeviceModel::MajorPropertyRole] = 
+            QVariant( qtdev[BtDeviceModel::MajorPropertyRole].toInt() | majorDeviceType );
+    qtdev[BtDeviceModel::MinorPropertyRole] = QVariant( minorDeviceType );
+}
+
+int BtDeviceModelPrivate::indexOf( const TBTDevAddr& addr ) const
+{
+    QString addrStr;
+    addrSymbianToReadbleString( addrStr, addr );
+    for (int i = 0; i < mData.count(); ++i ) {
+        if ( mData.at( i ).value( BtDeviceModel::ReadableBdaddrRole ) 
+                == addrStr ) {
+            return i;
+        }
+    }
+    return -1;
+}
+
+void BtDeviceModelPrivate::updateRssi(BtuiModelDataItem& qtdev, int rssi )
+{
+    qtdev[BtDeviceModel::RssiRole] = QVariant( rssi );
+}
+
+void BtDeviceModelPrivate::updateSeqNum(BtuiModelDataItem& qtdev, int seqNum )
+{
+    qtdev[BtDeviceModel::SeqNumRole] = QVariant( seqNum );
+}
+
+/*!
+    Add the specified major property to the device if addto is true.
+    Otherwise the property is removed from the device. 
+ */
+void BtDeviceModelPrivate::setMajorProperty(
+        BtuiModelDataItem& qtdev, int prop, bool addto)
+{
+    if ( addto ) {
+        qtdev[BtDeviceModel::MajorPropertyRole] = 
+            QVariant( qtdev[BtDeviceModel::MajorPropertyRole].toInt() | prop);
+    }
+    else {
+        qtdev[BtDeviceModel::MajorPropertyRole] = 
+            QVariant( qtdev[BtDeviceModel::MajorPropertyRole].toInt() & ~prop);
+    }
+}
+
+bool BtDeviceModelPrivate::isDeviceInRange( const BtuiModelDataItem& qtdev )
+{   
+    return BtuiDevProperty::InRange & qtdev[BtDeviceModel::MajorPropertyRole].toInt();
+}
+
+bool BtDeviceModelPrivate::isDeviceInRegistry( const BtuiModelDataItem& qtdev )
+{
+    return BtuiDevProperty::InRegistry & qtdev[BtDeviceModel::MajorPropertyRole].toInt();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/btui/btuimodel/btdevicemodel_p.h	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,140 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef BTDEVICEMODE_P_H
+#define BTDEVICEMODE_P_H
+
+#include "btuimodeltypes.h"
+#include <btdevicemodel.h>
+
+#include <e32base.h>
+#include <btservices/btdevrepository.h>
+#include <btservices/devdiscoveryobserver.h>
+
+class CAdvanceDevDiscoverer;
+
+/*!
+    \class BtDeviceData
+    \brief class for providing remote device data.
+
+    BtDeviceData class is responsible for providing the latest information
+    regarding the properties of remote devices.
+
+    \\sa bluetoothuimodel
+ */
+class BtDeviceModelPrivate : public QObject,
+                     public MBtDevRepositoryObserver,
+                     public MDevDiscoveryObserver
+{
+    Q_OBJECT
+
+public:
+    explicit BtDeviceModelPrivate( BtDeviceModel& model, QObject *parent = 0 );
+    
+    virtual ~BtDeviceModelPrivate();
+    
+    bool isValid( int row, int col ) const;
+    
+    int rowCount() const;
+    
+    int columnCount() const;
+        
+    void data(QVariant& val, int row, int col, int role ) const;
+    
+    BtuiModelDataItem itemData( int row, int col ) const;
+    
+    bool searchDevice();
+    
+    void cancelSearchDevice();
+    
+    void removeTransientDevices();
+    
+private:
+    // From MBtDeviceRepositoryObserver
+    
+    void RepositoryInitialized();
+    
+    void DeletedFromRegistry( const TBTDevAddr& addr );
+    
+    void AddedToRegistry( const CBtDevExtension& dev );
+    
+    void ChangedInRegistry( const CBtDevExtension& dev, TUint similarity  ); 
+
+    void ServiceConnectionChanged(
+            const CBtDevExtension& dev, TBool connected );
+    
+    // from MDevDiscoveryObserver
+    void HandleNextDiscoveryResultL( 
+            const TInquirySockAddr& inqAddr, const TDesC& name );
+
+    void HandleDiscoveryCompleted( TInt error );
+    
+signals:
+
+    void deviceDataChanged( int row, void *parent );
+    
+    void deviceDataChanged( int first, int last, void *parent );
+    
+    void beginInsertDevices(int first, int last, void *parent);
+    void endInsertDevices();
+
+    void beginRemoveDevices(int first, int last, void *parent);
+    void endRemoveDevices();
+
+    void deviceSearchCompleted( int error );
+    
+public slots:
+    //void activeRequestCompleted( int status, int id );
+
+private:
+
+    void initializeDataStore();
+
+    void updateDeviceProperty(BtuiModelDataItem& qtdev,
+            const CBtDevExtension& dev, TUint similarity );
+    
+    int indexOf( const TBTDevAddr& addr ) const;
+    
+    void updateRssi(BtuiModelDataItem& qtdev, int rssi );
+    
+    void updateSeqNum(BtuiModelDataItem& qtdev, int seqNum );
+    
+    void setMajorProperty( BtuiModelDataItem& qtdev, int prop, bool addto);
+    
+    bool isDeviceInRange( const BtuiModelDataItem& qtdev );
+    
+    bool isDeviceInRegistry( const BtuiModelDataItem& qtdev );
+    
+private:
+
+    BtuiModelDataSource mData;
+    
+    BtDeviceModel& mModel;
+    
+    CBtDevRepository* mDeviceRepo;
+    
+    CAdvanceDevDiscoverer* mDiscover;
+    
+    bool isSearchingDevice;
+    
+    int mSeqNum;         // sequence number based on order the device is found during search
+    
+    Q_DISABLE_COPY(BtDeviceModelPrivate)
+
+};
+
+#endif // BTLOCALSETTING_H
--- a/bluetoothengine/btui/btuimodel/btlocalsetting.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,300 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#include "btlocalsetting.h"
-#include <btdevice.h>
-//#include <QStringList>
-#include <btmanclient.h>
-#include <bt_subscribe.h>
-//#include <centralrepository.h>
-//#include <coreapplicationuissdkcrkeys.h>
-#include "btqtconstants.h"
-
-const int KLocalDeviceNameWatcher = 10;
-const int KBtLinkCountWatcher = 11;
-
-/*!
-    Constructor.
- */
-BtLocalSetting::BtLocalSetting( BtSettingModel& model, QObject *parent )
-    : QObject( parent), mModel( model ), mLocalDeviceWatcher(0)
-    {
-    int err( 0 );
-    if (!err ) {
-        err = mLocalDeviceKey.Attach( KPropertyUidBluetoothCategory, 
-                    KPropertyKeyBluetoothGetRegistryTableChange );
-    }
-    
-    Q_CHECK_PTR( !err ); // other proper alternative?
-
-    TRAP_IGNORE({
-        mBtengSetting = CBTEngSettings::NewL( this );
-        mLocalDeviceWatcher = CBtSimpleActive::NewL(*this, KLocalDeviceNameWatcher );
-    });
-    
-    Q_CHECK_PTR( mBtengSetting );
-    Q_CHECK_PTR( mLocalDeviceWatcher );
-
-    for ( int i = 0; i < BtSettingModel::LocalSettingRowCount; ++i ) {
-        // Initialize the list with empty values.
-        mData.append( BtuiModelDataItem() );
-    }
-    
-    // subscribe to local device table change:
-    mLocalDeviceKey.Subscribe( mLocalDeviceWatcher->RequestStatus() );
-    mLocalDeviceWatcher->GoActive();
-    
-    // Get the device name
-    TBTDeviceName  deviceName;
-    (void) mBtengSetting->GetLocalName( deviceName );
-    updateDeviceName( QString::fromUtf16( deviceName.Ptr(), deviceName.Length() ) );
-    
-    // Get the power setting.
-    TBTPowerStateValue power( EBTPowerOff );
-    (void) mBtengSetting->GetPowerState( power );
-    setPowerSetting( power );
-    
-    // Get the visibility mode
-    TBTVisibilityMode visibilityMode( EBTVisibilityModeNoScans );
-    (void) mBtengSetting->GetVisibilityMode( visibilityMode );
-    setVisibilityMode( visibilityMode );
-}
-
-/*!
-    Destructor.
- */
-BtLocalSetting::~BtLocalSetting()
-{
-    // delete main data structure
-    delete mBtengSetting;
-    delete mLocalDeviceWatcher;
-    mLocalDeviceKey.Close();
-    
-    // delete mBtLinkCountWatcher;
-    //mBtLinkCountKey.Close();
-}
-
-
-/*!
-    Tells whether the given column is in the range of the setting list.
-    
-    \param row the row number to be checked
-    \param col the column number to be checked
-    
-    \return true if the given row and column are valid; false otherwise.
-*/
-bool BtLocalSetting::isValid( int row, int column) const
-{
-    return row >= 0 && row < mData.count() && column == 0;
-}
-
-/*!
-    \return the total amount of rows.
-    
-*/
-int BtLocalSetting::rowCount() const
-{
-    return mData.count();
-}
-
-/*!
-    \return the total amount of columns.
-    
-*/
-int BtLocalSetting::columnCount() const
-{
-    return 1;
-}
-
-/*!
-    Gets the value within a data item.
-    \param val contains the value at return.
-    \param row the row number which the value is from
-    \param col the column number which the value is from
-    \param role the role idenfier of the value.
- */
-void BtLocalSetting::data(QVariant& val, int row,  int col, int role ) const
-{
-    if ( isValid( row, col ) ) {
-        val = mData.at( row ).value( role );
-    }
-    else {
-        val = QVariant( QVariant::Invalid );
-    }
-}
-
-/*!
-    Gets the whole item data at the specified column
-    \param row the row number of the item data to be returned
-    \param col the column number of the item data to be returned
-    \return the item data
- */
-BtuiModelDataItem BtLocalSetting::itemData( int row, int col ) const
-{
-    if ( isValid( row, col ) ) {
-        return mData.at( row );
-    }
-    return BtuiModelDataItem();
-}
-
-/*!
-    Provides notification of changes in the power state
-    of the Bluetooth hardware.
-
-    \param state EBTPowerOff if the BT hardware has been turned off,
-                 EBTPowerOn if it has been turned on.
- */
-void BtLocalSetting::PowerStateChanged( TBTPowerStateValue state ) 
-{
-    setPowerSetting( state );
-    mModel.emitDataChanged( BtSettingModel::PowerStateRow, 0, this );
-}
-
-/*!
-    Provides notification of changes in the discoverability
-    mode of the Bluetooth hardware.
-    \param state EBTDiscModeHidden if the BT hardware is in hidden mode,
-                  EBTDiscModeGeneral if it is in visible mode.
- */
-void BtLocalSetting::VisibilityModeChanged( TBTVisibilityMode state )
-{
-    setVisibilityMode( state );
-    mModel.emitDataChanged( BtSettingModel::VisibilityRow, 0, this );
-}
-
-void BtLocalSetting::RequestCompletedL( CBtSimpleActive* active, TInt status ) {
-    Q_UNUSED( active );
-    Q_UNUSED( status );
-    if ( active->RequestId() == KLocalDeviceNameWatcher ) {
-        mLocalDeviceKey.Subscribe( mLocalDeviceWatcher->RequestStatus() );
-        mLocalDeviceWatcher->GoActive();
-        updateDeviceName( QString() );
-    }
-}
-
-void BtLocalSetting::CancelRequest( TInt requestId ) {
-    if ( requestId == KLocalDeviceNameWatcher ) {
-        mLocalDeviceKey.Cancel();
-    }
-    else if ( requestId == KBtLinkCountWatcher ) {
-        //mBtLinkCountKey.Cancel();
-    }
-}
-
-void BtLocalSetting::HandleError( CBtSimpleActive* active, TInt error ) {
-    Q_UNUSED( active );
-    Q_UNUSED( error );
-}
-
-/*!
-    Update local Bluetooth device name in the data store.
-    @param name the latest Bluetooth name.
- */
-void BtLocalSetting::updateDeviceName( const QString &name ) 
-{
-    // To-do: the data structure initialization is not impled yet in the model
-    BtuiModelDataItem& item = 
-            mData[ BtSettingModel::LocalBtNameRow ];
-    
-    if ( item.isEmpty() ) {
-        // Initialize with additional information on the setting
-        item[ BtSettingModel::SettingNameRole ] = QVariant( tr( "Local Bluetooth name" ) );
-    }
-    
-    bool setByUser = !name.isEmpty();
-    
-    // The additional parameter is the flag indicating whether the 
-    // Bluetooth name has been set by the user.
-    // The flag is set to true if the name has been set.    
-    // requirement does not 
-    //nitem[ BtSettingModel::SettingValueParamRole ] = QVariant( setByUser );
-    
-    QString resolvedName( name );
-    if ( resolvedName.isEmpty() ) {
-        // We get the default name as suggestion for the user to set.
-        getNameFromRegistry( resolvedName );
-    }
-    item[ BtSettingModel::settingDisplayRole ] = QVariant( resolvedName );
-    item[ BtSettingModel::SettingValueRole ] = QVariant( resolvedName );
-}
-
-/*!
-    Updates all values related to the power setting.
- */
-void BtLocalSetting::setPowerSetting( TBTPowerStateValue state )
-{
-    BtuiModelDataItem& item = 
-            mData[ BtSettingModel::PowerStateRow ];
-    if ( item.isEmpty() ) {
-        // Initialize with additional information on the setting
-        item[ BtSettingModel::SettingNameRole ] = QVariant( tr( "Bluetooth power" ) );
-    }
-    
-    bool powerOn = ( state == EBTPowerOn );
-
-    item[ BtSettingModel::settingDisplayRole ] = 
-            powerOn ? QVariant( tr( "On" ) ) : QVariant( tr( "Off" ) );
-    item[ BtSettingModel::SettingValueRole ] = QVariant( powerOn );
-}
-
-void BtLocalSetting::setVisibilityMode( TBTVisibilityMode state )
-{
-    BtuiModelDataItem& item = mData[ BtSettingModel::VisibilityRow ];
-
-    if ( item.isEmpty() ) {
-        item[ BtSettingModel::SettingNameRole ] = QVariant( tr( "Phone visibility" ) );
-    }
-    
-    if ( state == EBTVisibilityModeHidden )
-        {
-        item [ BtSettingModel::settingDisplayRole ] = QVariant( tr( "Hidden" ) );
-        }
-    else if ( state == EBTVisibilityModeGeneral )
-        {
-        item [ BtSettingModel::settingDisplayRole ] = QVariant( tr( "Visible" ) );
-        }
-    else
-        {
-        item [ BtSettingModel::settingDisplayRole ] = QVariant( tr( "Temporarily visible" ) );
-        }
-    item [ BtSettingModel::SettingValueRole ] = QVariant( QtVisibilityMode(state) );
-}
-
-/*!
-    Get local Bluetooth device name from BTRegistry.
- */
-void BtLocalSetting::getNameFromRegistry( QString &name )
-{
-    RBTRegServ btRegServ;   // Session with BTMan
-    RBTLocalDevice btReg;   // Subsession with local device table
-    TBTLocalDevice localDev;// Data structure holding local device information
-
-    TInt err = btRegServ.Connect();
-    if ( !err ) {
-        err = btReg.Open( btRegServ );
-    }
-    if ( !err ) {
-        // Read the BT local name from BT Registry.
-        err = btReg.Get( localDev );
-    }
-    if ( !err ) {
-        name = QString::fromUtf8( (const char*) localDev.DeviceName().Ptr(), (int) localDev.DeviceName().Length() );
-    }
-    btReg.Close();
-    btRegServ.Close();
-}
--- a/bluetoothengine/btui/btuimodel/btlocalsetting.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,113 +0,0 @@
-/*
-* ============================================================================
-*  Name        : btuimsettings.h
-*  Part of     : BluetoothUI / bluetoothuimodel       *** Info from the SWAD
-*  Description : Declaration of the class representing the Bluetooth
-*                settings source data.
-*
-*  Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies).
-*  All rights reserved.
-*  This component and the accompanying materials are made available
-*  under the terms of "Eclipse Public License v1.0"
-*  which accompanies this distribution, and is available
-*  at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-*  Initial Contributors:
-*  Nokia Corporation - initial contribution.
-*
-*  Contributors:
-*  Nokia Corporation
-* ============================================================================
-* Template version: 4.2
-*/
-
-#ifndef BTLOCALSETTING_H
-#define BTLOCALSETTING_H
-
-#include "btsettingmodel.h"
-
-#include <e32base.h>
-#include <e32property.h>
-#include <btengsettings.h>
-#include <btservices/btsimpleactive.h>
-
-/*!
-    \class BtuimSettings
-    \brief class for handling local Bluetooth setting updates.
-
-    BtLocalSetting class is responsible for providing the latest information
-    regarding the local Bluetooth settings such as device name and power state.
-
-    \\sa bluetoothuimodel
- */
-class BtLocalSetting : public QObject,
-                      public MBTEngSettingsObserver,
-                      public MBtSimpleActiveObserver
-{
-    Q_OBJECT
-
-public:
-    explicit BtLocalSetting( BtSettingModel& model, QObject *parent = 0 );
-    
-    virtual ~BtLocalSetting();
-    
-    bool isValid( int row, int col ) const;
-    
-    int rowCount() const;
-    
-    int columnCount() const;
-        
-    void data(QVariant& val, int row, int col, int role ) const;
-    
-    BtuiModelDataItem itemData( int row, int col ) const;
-    
-private:
-    // from MBTEngSettingsObserver
-    
-    void PowerStateChanged( TBTPowerStateValue state );
-    
-    void VisibilityModeChanged( TBTVisibilityMode state );
-    
-    // from MBtSimpleActiveObserver
-    
-    void RequestCompletedL( CBtSimpleActive* active, TInt status );
-
-    void CancelRequest( TInt requestId );
-
-    void HandleError( CBtSimpleActive* active, TInt error );
-    
-    
-public slots:
-    //void activeRequestCompleted( int status, int id );
-
-private:
-
-    void setVisibilityMode( TBTVisibilityMode state );
-    void updateDeviceName( const QString &name );
-    
-    void setPowerSetting( TBTPowerStateValue state );
-    
-    //void setOfflineSetting( bool state );
-    //void setBtConnectionsSetting( int connections );
-    
-    void getNameFromRegistry( QString &name );
-
-private:
-    
-    BtuiModelDataSource mData;
-    
-    BtSettingModel& mModel;
-    
-    CBTEngSettings *mBtengSetting;
-    
-    // For monitoring local device name change
-    RProperty mLocalDeviceKey;
-    CBtSimpleActive *mLocalDeviceWatcher;
-    
-    //RProperty mBtLinkCountKey;
-    //CBTEngActive *mBtLinkCountWatcher;
-    Q_DISABLE_COPY(BtLocalSetting)
-
-};
-
-#endif // BTLOCALSETTING_H
--- a/bluetoothengine/btui/btuimodel/btsettingmodel.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btui/btuimodel/btsettingmodel.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 #include <btsettingmodel.h>
-#include "btlocalsetting.h"
+#include "btsettingmodel_p.h"
 #include "bluetoothuitrace.h"
 
 /*!
@@ -25,17 +25,18 @@
 BtSettingModel::BtSettingModel( QObject *parent )
     : QAbstractItemModel( parent )
 {
-   mLocalSetting = QSharedPointer<BtLocalSetting>( new BtLocalSetting( *this ) );
+   d = QSharedPointer<BtSettingModelPrivate>( new BtSettingModelPrivate( *this ) );
+   connectModelSignals();
 }
 
 /*!
-    This Constructor shares the instances of model data structure with the
-    given model.
+    This Constructor shares the private implementation of the setting model.
  */
 BtSettingModel::BtSettingModel( const BtSettingModel &model, QObject *parent )
     : QAbstractItemModel( parent )
 {
-    mLocalSetting = model.mLocalSetting;
+    d = model.d;
+    connectModelSignals();
 }
 
 /*!
@@ -51,8 +52,8 @@
 QModelIndex BtSettingModel::index( int row, int column, const QModelIndex &parent ) const
 {
     Q_UNUSED( parent );
-    if ( mLocalSetting->isValid( row, column ) ) {
-        return createIndex( row, column, mLocalSetting.data() );
+    if ( d->isValid( row, column ) ) {
+        return createIndex( row, column, d.data() );
     }
     // invalid row and column:
     return QModelIndex();
@@ -74,7 +75,7 @@
 int BtSettingModel::rowCount( const QModelIndex &parent ) const
 {
     Q_UNUSED( parent );
-    return mLocalSetting->rowCount();
+    return d->rowCount();
 }
 
 /*!
@@ -83,7 +84,7 @@
 int BtSettingModel::columnCount( const QModelIndex &parent ) const
 {
     Q_UNUSED( parent );
-    return mLocalSetting->columnCount();
+    return d->columnCount();
 }
 
 /*!
@@ -92,25 +93,41 @@
 QVariant BtSettingModel::data( const QModelIndex &index, int role ) const
 {
     QVariant val( QVariant::Invalid );
-    mLocalSetting.data()->data( val, index.row(), index.column(), role );
+    d.data()->data( val, index.row(), index.column(), role );
     return val;
 }
 
 QMap<int, QVariant> BtSettingModel::itemData( const QModelIndex & index ) const
 {
-    return mLocalSetting.data()->itemData( index.row(), index.column() );
+    return d.data()->itemData( index.row(), index.column() );
+}
+
+/*!
+    emits dataChanged signal.
+ */
+void BtSettingModel::settingDataChanged( int row, void *parent )
+{
+    QModelIndex idx = createIndex( row, 0, parent );
+    emit dataChanged( idx, idx );
 }
 
 /*!
     emits dataChanged signal.
  */
-void BtSettingModel::emitDataChanged( int row, int column, void *parent )
-{
-    QModelIndex idx = createIndex( row, column, parent );
-    emit dataChanged( idx, idx );
-}
-
-void BtSettingModel::emitDataChanged(const QModelIndex &top, const QModelIndex &bottom )
+void BtSettingModel::settingDataChanged(int first, int last, void *parent )
     {
+    QModelIndex top = createIndex( first, 0, parent );
+    QModelIndex bottom = createIndex( last, 0, parent );
     emit dataChanged( top, bottom );
     }
+
+/*!
+ connects all signals of private impl to slots of this
+ */
+void BtSettingModel::connectModelSignals()
+{
+    bool ok = connect(d.data(), SIGNAL(settingDataChanged(int,void*)), SLOT(settingDataChanged(int,void*)));
+    BTUI_ASSERT_X( ok, "BtSettingModel", "settingDataChanged can't connect" );
+    ok = connect(d.data(), SIGNAL(settingDataChanged(int,int,void*)), SLOT(settingDataChanged(int,int,void*)));
+    BTUI_ASSERT_X( ok, "BtSettingModel", "settingDataChanged can't connect 2" );
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/btui/btuimodel/btsettingmodel_p.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,267 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#include "btsettingmodel_p.h"
+#include <btdevice.h>
+#include <btmanclient.h>
+#include <bt_subscribe.h>
+#include "btqtconstants.h"
+
+const int KLocalDeviceNameWatcher = 10;
+const int KBtLinkCountWatcher = 11;
+
+/*!
+    Constructor.
+ */
+BtSettingModelPrivate::BtSettingModelPrivate( BtSettingModel& model, QObject *parent )
+    : QObject( parent), mModel( model ), mLocalDeviceWatcher(0)
+    {
+    int err( 0 );
+    if (!err ) {
+        err = mLocalDeviceKey.Attach( KPropertyUidBluetoothCategory, 
+                    KPropertyKeyBluetoothGetRegistryTableChange );
+    }
+    
+    Q_CHECK_PTR( !err ); // other proper alternative?
+
+    TRAP_IGNORE({
+        mBtengSetting = CBTEngSettings::NewL( this );
+        mLocalDeviceWatcher = CBtSimpleActive::NewL(*this, KLocalDeviceNameWatcher );
+    });
+    
+    Q_CHECK_PTR( mBtengSetting );
+    Q_CHECK_PTR( mLocalDeviceWatcher );
+
+    for ( int i = 0; i < BtSettingModel::LocalSettingRowCount; ++i ) {
+        // Initialize the list with empty values.
+        mData.append( BtuiModelDataItem() );
+    }
+    
+    // subscribe to local device table change:
+    mLocalDeviceKey.Subscribe( mLocalDeviceWatcher->RequestStatus() );
+    mLocalDeviceWatcher->GoActive();
+    
+    // Get the device name
+    TBTDeviceName  deviceName;
+    (void) mBtengSetting->GetLocalName( deviceName );
+    updateDeviceName( QString::fromUtf16( deviceName.Ptr(), deviceName.Length() ) );
+    
+    // Get the power setting.
+    TBTPowerStateValue power( EBTPowerOff );
+    (void) mBtengSetting->GetPowerState( power );
+    setPowerSetting( power );
+    
+    // Get the visibility mode
+    TBTVisibilityMode visibilityMode( EBTVisibilityModeNoScans );
+    (void) mBtengSetting->GetVisibilityMode( visibilityMode );
+    setVisibilityMode( visibilityMode );
+}
+
+/*!
+    Destructor.
+ */
+BtSettingModelPrivate::~BtSettingModelPrivate()
+{
+    // delete main data structure
+    delete mBtengSetting;
+    delete mLocalDeviceWatcher;
+    mLocalDeviceKey.Close();
+    
+    // delete mBtLinkCountWatcher;
+    //mBtLinkCountKey.Close();
+}
+
+
+/*!
+    Tells whether the given column is in the range of the setting list.
+    
+    \param row the row number to be checked
+    \param col the column number to be checked
+    
+    \return true if the given row and column are valid; false otherwise.
+*/
+bool BtSettingModelPrivate::isValid( int row, int column) const
+{
+    return row >= 0 && row < mData.count() && column == 0;
+}
+
+/*!
+    \return the total amount of rows.
+    
+*/
+int BtSettingModelPrivate::rowCount() const
+{
+    return mData.count();
+}
+
+/*!
+    \return the total amount of columns.
+    
+*/
+int BtSettingModelPrivate::columnCount() const
+{
+    return 1;
+}
+
+/*!
+    Gets the value within a data item.
+    \param val contains the value at return.
+    \param row the row number which the value is from
+    \param col the column number which the value is from
+    \param role the role idenfier of the value.
+ */
+void BtSettingModelPrivate::data(QVariant& val, int row,  int col, int role ) const
+{
+    if ( isValid( row, col ) ) {
+        val = mData.at( row ).value( role );
+    }
+    else {
+        val = QVariant( QVariant::Invalid );
+    }
+}
+
+/*!
+    Gets the whole item data at the specified column
+    \param row the row number of the item data to be returned
+    \param col the column number of the item data to be returned
+    \return the item data
+ */
+BtuiModelDataItem BtSettingModelPrivate::itemData( int row, int col ) const
+{
+    if ( isValid( row, col ) ) {
+        return mData.at( row );
+    }
+    return BtuiModelDataItem();
+}
+
+/*!
+    Provides notification of changes in the power state
+    of the Bluetooth hardware.
+
+    \param state EBTPowerOff if the BT hardware has been turned off,
+                 EBTPowerOn if it has been turned on.
+ */
+void BtSettingModelPrivate::PowerStateChanged( TBTPowerStateValue state ) 
+{
+    setPowerSetting( state );
+    emit settingDataChanged( BtSettingModel::PowerStateRow, this );
+}
+
+/*!
+    Provides notification of changes in the discoverability
+    mode of the Bluetooth hardware.
+    \param state EBTDiscModeHidden if the BT hardware is in hidden mode,
+                  EBTDiscModeGeneral if it is in visible mode.
+ */
+void BtSettingModelPrivate::VisibilityModeChanged( TBTVisibilityMode state )
+{
+    setVisibilityMode( state );
+    emit settingDataChanged( BtSettingModel::VisibilityRow, this );
+}
+
+void BtSettingModelPrivate::RequestCompletedL( CBtSimpleActive* active, TInt status ) {
+    Q_UNUSED( active );
+    Q_UNUSED( status );
+    if ( active->RequestId() == KLocalDeviceNameWatcher ) {
+        mLocalDeviceKey.Subscribe( mLocalDeviceWatcher->RequestStatus() );
+        mLocalDeviceWatcher->GoActive();
+        updateDeviceName( QString() );
+    }
+}
+
+void BtSettingModelPrivate::CancelRequest( TInt requestId ) {
+    if ( requestId == KLocalDeviceNameWatcher ) {
+        mLocalDeviceKey.Cancel();
+    }
+    else if ( requestId == KBtLinkCountWatcher ) {
+        //mBtLinkCountKey.Cancel();
+    }
+}
+
+void BtSettingModelPrivate::HandleError( CBtSimpleActive* active, TInt error ) {
+    Q_UNUSED( active );
+    Q_UNUSED( error );
+}
+
+/*!
+    Update local Bluetooth device name in the data store.
+    @param name the latest Bluetooth name.
+ */
+void BtSettingModelPrivate::updateDeviceName( const QString &name ) 
+{
+    // To-do: the data structure initialization is not impled yet in the model
+    BtuiModelDataItem& item = 
+            mData[ BtSettingModel::LocalBtNameRow ];
+    
+    bool setByUser = !name.isEmpty();
+    
+    // The additional parameter is the flag indicating whether the 
+    // Bluetooth name has been set by the user.
+    // The flag is set to true if the name has been set.    
+    // item[ BtSettingModel::SettingValueParamRole ] = QVariant( setByUser );
+    
+    QString resolvedName( name );
+    if ( resolvedName.isEmpty() ) {
+        // We get the default name as suggestion for the user to set.
+        getNameFromRegistry( resolvedName );
+    }
+    item[ BtSettingModel::settingDisplayRole ] = QVariant( resolvedName );
+    item[ BtSettingModel::SettingValueRole ] = QVariant( resolvedName );
+}
+
+/*!
+    Updates all values related to the power setting.
+ */
+void BtSettingModelPrivate::setPowerSetting( TBTPowerStateValue state )
+{
+    BtuiModelDataItem& item = 
+            mData[ BtSettingModel::PowerStateRow ];
+    
+    item[ BtSettingModel::SettingValueRole ] = QVariant( QtPowerMode(state) );
+}
+
+void BtSettingModelPrivate::setVisibilityMode( TBTVisibilityMode state )
+{
+    BtuiModelDataItem& item = mData[ BtSettingModel::VisibilityRow ];
+
+    item [ BtSettingModel::SettingValueRole ] = QVariant( QtVisibilityMode(state) );
+}
+
+/*!
+    Get local Bluetooth device name from BTRegistry.
+ */
+void BtSettingModelPrivate::getNameFromRegistry( QString &name )
+{
+    RBTRegServ btRegServ;   // Session with BTMan
+    RBTLocalDevice btReg;   // Subsession with local device table
+    TBTLocalDevice localDev;// Data structure holding local device information
+
+    TInt err = btRegServ.Connect();
+    if ( !err ) {
+        err = btReg.Open( btRegServ );
+    }
+    if ( !err ) {
+        // Read the BT local name from BT Registry.
+        err = btReg.Get( localDev );
+    }
+    if ( !err ) {
+        name = QString::fromUtf8( (const char*) localDev.DeviceName().Ptr(), (int) localDev.DeviceName().Length() );
+    }
+    btReg.Close();
+    btRegServ.Close();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/btui/btuimodel/btsettingmodel_p.h	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,108 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0""
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ *   
+ */
+
+#ifndef BTSETTINGMODEL_P_H
+#define BTSETTINGMODEL_P_H
+
+#include <btsettingmodel.h>
+
+#include <e32base.h>
+#include <e32property.h>
+#include <btengsettings.h>
+#include <btservices/btsimpleactive.h>
+
+/*!
+    \class BtuimSettings
+    \brief class for handling local Bluetooth setting updates.
+
+    BtLocalSetting class is responsible for providing the latest information
+    regarding the local Bluetooth settings such as device name and power state.
+
+    \\sa bluetoothuimodel
+ */
+class BtSettingModelPrivate : public QObject,
+                      public MBTEngSettingsObserver,
+                      public MBtSimpleActiveObserver
+{
+    Q_OBJECT
+
+public:
+    explicit BtSettingModelPrivate( BtSettingModel& model, QObject *parent = 0 );
+    
+    virtual ~BtSettingModelPrivate();
+    
+    bool isValid( int row, int col ) const;
+    
+    int rowCount() const;
+    
+    int columnCount() const;
+        
+    void data(QVariant& val, int row, int col, int role ) const;
+    
+    BtuiModelDataItem itemData( int row, int col ) const;
+signals:
+
+    void settingDataChanged( int row, void *parent );
+    
+    void settingDataChanged( int first, int last, void *parent );
+    
+private:
+    // from MBTEngSettingsObserver
+    
+    void PowerStateChanged( TBTPowerStateValue state );
+    
+    void VisibilityModeChanged( TBTVisibilityMode state );
+    
+    // from MBtSimpleActiveObserver
+    
+    void RequestCompletedL( CBtSimpleActive* active, TInt status );
+
+    void CancelRequest( TInt requestId );
+
+    void HandleError( CBtSimpleActive* active, TInt error );
+
+private:
+
+    void setVisibilityMode( TBTVisibilityMode state );
+    void updateDeviceName( const QString &name );
+    
+    void setPowerSetting( TBTPowerStateValue state );
+    
+    //void setOfflineSetting( bool state );
+    //void setBtConnectionsSetting( int connections );
+    
+    void getNameFromRegistry( QString &name );
+
+private:
+    
+    BtuiModelDataSource mData;
+    
+    BtSettingModel& mModel;
+    
+    CBTEngSettings *mBtengSetting;
+    
+    // For monitoring local device name change
+    RProperty mLocalDeviceKey;
+    CBtSimpleActive *mLocalDeviceWatcher;
+    
+    //RProperty mBtLinkCountKey;
+    //CBTEngActive *mBtLinkCountWatcher;
+    Q_DISABLE_COPY(BtSettingModelPrivate)
+
+};
+
+#endif // BTSETTINGMODEL_P_H
--- a/bluetoothengine/btui/btuimodel/btuimodel.pro	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btui/btuimodel/btuimodel.pro	Mon Jul 12 18:51:05 2010 +0300
@@ -26,19 +26,21 @@
 CONFIG += qt \
     hb \
     dll
-HEADERS += btdevicedata.h \
-    btlocalsetting.h \
+HEADERS += btdevicemodel_p.h \
+    btsettingmodel_p.h \
     ../inc/btsettingmodel.h \
     ../inc/btdevicemodel.h \
     ../inc/btuimodelsortfilter.h \
     ../inc/btuiutil.h
     
-SOURCES += btdevicedata.cpp \
-    btlocalsetting.cpp \
+SOURCES += btdevicemodel_p.cpp \
+    btsettingmodel_p.cpp \
     btsettingmodel.cpp \
     btdevicemodel.cpp \
     btuimodelsortfilter.cpp
     
+defFilePath = .
+    
 symbian: { 
     SYMBIAN_PLATFORMS = WINSCW \
         ARMV5
--- a/bluetoothengine/btui/btuimodel/btuimodelsortfilter.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btui/btuimodel/btuimodelsortfilter.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -17,7 +17,7 @@
 
 #include <btuimodelsortfilter.h>
 #include <btdevicemodel.h>
-
+#include "btuidevtypemap.h"
 /*!
     Constructor.
  */
@@ -36,8 +36,7 @@
 
 /*!
     Replace current filter values for filtering on major device class with
-    the specified. This Model will not reset itself for performance reason, 
-    the caller shall call reset after all filters have been set.
+    the specified.
  */
 void BtuiModelSortFilter::setDeviceMajorFilter( int filter, FilterMode mode )
 {
@@ -48,21 +47,18 @@
 /*!
     Add the specified filter value for filtering on major device class 
     if the specified filter doesn't exist when this function is called.
-    This Model will not reset itself for performance reason, 
-    the caller shall call reset after all filters have been set.
  */
 void BtuiModelSortFilter::addDeviceMajorFilter( int filter, FilterMode mode )
 {
     FilterItem f(filter, mode);
     if ( mFilters.indexOf(f) == -1 ) {
         mFilters.append( f );
+        invalidateFilter();
     }
 }
 
 /*!
     Clear the specified filter value for filtering on major device class from this model.
-    This Model will not reset itself for performance reason, 
-    the caller shall call reset after all filters have been set.
  */
 void BtuiModelSortFilter::clearDeviceMajorFilter( int filter, FilterMode mode )
 {
@@ -70,23 +66,21 @@
     int i = mFilters.indexOf(f);
     if ( i > -1 ) {
         mFilters.removeAt( i );
+        invalidateFilter();
     }
 }
 
 /*!
     clear all filters for filtering on major device class.
-    This Model will not reset itself for performance reason, 
-    the caller shall call reset after all filters have been set.
+    This Model will reset itself.
  */
 void BtuiModelSortFilter::clearDeviceMajorFilters()
 {
     // model reset is needed if there are filters :
-    bool shReset = ( mFilters.size() > 0 );
-
-    if ( shReset ) {
-        reset();
+    if ( mFilters.size() > 0 ) {
+        mFilters.clear();
+        invalidateFilter();
     }
-    mFilters.clear();
 }
 
 /*!
@@ -110,7 +104,7 @@
 
     // the row shall pass all filters:
     for (int i = 0; i < mFilters.size(); i++ ) {
-        if ( mFilters.at(i).mFilter == BtDeviceModel::NullProperty ) {
+        if ( mFilters.at(i).mFilter == BtuiDevProperty::NullProperty ) {
             accepted = true;    // There is no filter, we accept all
         }
         else {
@@ -122,12 +116,12 @@
                     accepted = majorProperty == mFilters.at(i).mFilter ;
                     break;
                 case AtLeastMatch:
-                    // accept if it matches all specified filters:
+                    // accept if it matches all specified properties:
                     accepted = ( mFilters.at(i).mFilter == 
                         ( majorProperty & mFilters.at(i).mFilter ) );
                     break;
                 case RoughMatch:
-                    // Accept if it matches one of specified filters:
+                    // Accept if it matches one of specified properties:
                     accepted = (majorProperty & mFilters.at(i).mFilter) != 0;
                     break;
                 case Exclusive:
@@ -138,6 +132,9 @@
                     accepted = false;
             }
         }
+        // Break out of the loop at first non-accepted condition
+        if (!accepted)
+            break;
     }
     if (accepted) {
         // emit signal to inform a row has been accepted by fitler,
@@ -153,11 +150,10 @@
 bool BtuiModelSortFilter::lessThan(
         const QModelIndex &left, const QModelIndex &right) const
 {
-    Q_UNUSED( left );
-    Q_UNUSED( right );
     if (sortRole() == BtDeviceModel::NameAliasRole ||
         sortRole() == BtDeviceModel::LastUsedTimeRole ||
-        sortRole() == BtDeviceModel::RssiRole) {
+        sortRole() == BtDeviceModel::RssiRole ||
+        sortRole() == BtDeviceModel::SeqNumRole) {
         // base class provides sorting for these types already:
         return QSortFilterProxyModel::lessThan(left, right);
     }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/btui/btuimodel/bwins/btuimodelu.def	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,75 @@
+EXPORTS
+	?emitDeviceSearchCompleted@BtDeviceModel@@AAEXH@Z @ 1 NONAME ; void BtDeviceModel::emitDeviceSearchCompleted(int)
+	??1BtDeviceModel@@UAE@XZ @ 2 NONAME ; BtDeviceModel::~BtDeviceModel(void)
+	?tr@BtDeviceModel@@SA?AVQString@@PBD0H@Z @ 3 NONAME ; class QString BtDeviceModel::tr(char const *, char const *, int)
+	?searchDevice@BtDeviceModel@@QAE_NXZ @ 4 NONAME ; bool BtDeviceModel::searchDevice(void)
+	?parent@BtSettingModel@@UBE?AVQModelIndex@@ABV2@@Z @ 5 NONAME ; class QModelIndex BtSettingModel::parent(class QModelIndex const &) const
+	?settingDataChanged@BtSettingModel@@AAEXHPAX@Z @ 6 NONAME ; void BtSettingModel::settingDataChanged(int, void *)
+	?setDeviceMajorFilter@BtuiModelSortFilter@@QAEXHW4FilterMode@1@@Z @ 7 NONAME ; void BtuiModelSortFilter::setDeviceMajorFilter(int, enum BtuiModelSortFilter::FilterMode)
+	?metaObject@BtuiModelSortFilter@@UBEPBUQMetaObject@@XZ @ 8 NONAME ; struct QMetaObject const * BtuiModelSortFilter::metaObject(void) const
+	?metaObject@BtSettingModel@@UBEPBUQMetaObject@@XZ @ 9 NONAME ; struct QMetaObject const * BtSettingModel::metaObject(void) const
+	?hasFilter@BtuiModelSortFilter@@QAE_NHW4FilterMode@1@@Z @ 10 NONAME ; bool BtuiModelSortFilter::hasFilter(int, enum BtuiModelSortFilter::FilterMode)
+	?itemData@BtSettingModel@@UBE?AV?$QMap@HVQVariant@@@@ABVQModelIndex@@@Z @ 11 NONAME ; class QMap<int, class QVariant> BtSettingModel::itemData(class QModelIndex const &) const
+	?tr@BtSettingModel@@SA?AVQString@@PBD0@Z @ 12 NONAME ; class QString BtSettingModel::tr(char const *, char const *)
+	??0BtDeviceModel@@QAE@PAVQObject@@@Z @ 13 NONAME ; BtDeviceModel::BtDeviceModel(class QObject *)
+	?tr@BtDeviceModel@@SA?AVQString@@PBD0@Z @ 14 NONAME ; class QString BtDeviceModel::tr(char const *, char const *)
+	?staticMetaObject@BtuiModelSortFilter@@2UQMetaObject@@B @ 15 NONAME ; struct QMetaObject const BtuiModelSortFilter::staticMetaObject
+	?qt_metacast@BtuiModelSortFilter@@UAEPAXPBD@Z @ 16 NONAME ; void * BtuiModelSortFilter::qt_metacast(char const *)
+	?qt_metacall@BtDeviceModel@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 17 NONAME ; int BtDeviceModel::qt_metacall(enum QMetaObject::Call, int, void * *)
+	??_EBtDeviceModel@@UAE@I@Z @ 18 NONAME ; BtDeviceModel::~BtDeviceModel(unsigned int)
+	?index@BtSettingModel@@UBE?AVQModelIndex@@HHABV2@@Z @ 19 NONAME ; class QModelIndex BtSettingModel::index(int, int, class QModelIndex const &) const
+	?trUtf8@BtuiModelSortFilter@@SA?AVQString@@PBD0@Z @ 20 NONAME ; class QString BtuiModelSortFilter::trUtf8(char const *, char const *)
+	?qt_metacall@BtSettingModel@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 21 NONAME ; int BtSettingModel::qt_metacall(enum QMetaObject::Call, int, void * *)
+	?settingDataChanged@BtSettingModel@@AAEXHHPAX@Z @ 22 NONAME ; void BtSettingModel::settingDataChanged(int, int, void *)
+	??0BtuiModelSortFilter@@QAE@PAVQObject@@@Z @ 23 NONAME ; BtuiModelSortFilter::BtuiModelSortFilter(class QObject *)
+	?lessThan@BtuiModelSortFilter@@MBE_NABVQModelIndex@@0@Z @ 24 NONAME ; bool BtuiModelSortFilter::lessThan(class QModelIndex const &, class QModelIndex const &) const
+	??1BtuiModelSortFilter@@UAE@XZ @ 25 NONAME ; BtuiModelSortFilter::~BtuiModelSortFilter(void)
+	?deviceDataChanged@BtDeviceModel@@AAEXHHPAX@Z @ 26 NONAME ; void BtDeviceModel::deviceDataChanged(int, int, void *)
+	?columnCount@BtDeviceModel@@UBEHABVQModelIndex@@@Z @ 27 NONAME ; int BtDeviceModel::columnCount(class QModelIndex const &) const
+	?trUtf8@BtDeviceModel@@SA?AVQString@@PBD0H@Z @ 28 NONAME ; class QString BtDeviceModel::trUtf8(char const *, char const *, int)
+	?deviceSearchCompleted@BtDeviceModel@@IAEXH@Z @ 29 NONAME ; void BtDeviceModel::deviceSearchCompleted(int)
+	?cancelSearchDevice@BtDeviceModel@@QAEXXZ @ 30 NONAME ; void BtDeviceModel::cancelSearchDevice(void)
+	??_EBtuiModelSortFilter@@UAE@I@Z @ 31 NONAME ; BtuiModelSortFilter::~BtuiModelSortFilter(unsigned int)
+	??0BtSettingModel@@QAE@PAVQObject@@@Z @ 32 NONAME ; BtSettingModel::BtSettingModel(class QObject *)
+	?deviceAcceptedByFilter@BtuiModelSortFilter@@IAEXH@Z @ 33 NONAME ; void BtuiModelSortFilter::deviceAcceptedByFilter(int)
+	?index@BtDeviceModel@@UBE?AVQModelIndex@@HHABV2@@Z @ 34 NONAME ; class QModelIndex BtDeviceModel::index(int, int, class QModelIndex const &) const
+	?qt_metacast@BtDeviceModel@@UAEPAXPBD@Z @ 35 NONAME ; void * BtDeviceModel::qt_metacast(char const *)
+	?rowCount@BtSettingModel@@UBEHABVQModelIndex@@@Z @ 36 NONAME ; int BtSettingModel::rowCount(class QModelIndex const &) const
+	??1BtSettingModel@@UAE@XZ @ 37 NONAME ; BtSettingModel::~BtSettingModel(void)
+	??0BtSettingModel@@QAE@ABV0@PAVQObject@@@Z @ 38 NONAME ; BtSettingModel::BtSettingModel(class BtSettingModel const &, class QObject *)
+	?endRemoveDevices@BtDeviceModel@@AAEXXZ @ 39 NONAME ; void BtDeviceModel::endRemoveDevices(void)
+	?trUtf8@BtSettingModel@@SA?AVQString@@PBD0@Z @ 40 NONAME ; class QString BtSettingModel::trUtf8(char const *, char const *)
+	??_EBtSettingModel@@UAE@I@Z @ 41 NONAME ; BtSettingModel::~BtSettingModel(unsigned int)
+	?filterAcceptsRow@BtuiModelSortFilter@@MBE_NHABVQModelIndex@@@Z @ 42 NONAME ; bool BtuiModelSortFilter::filterAcceptsRow(int, class QModelIndex const &) const
+	?clearDeviceMajorFilter@BtuiModelSortFilter@@QAEXHW4FilterMode@1@@Z @ 43 NONAME ; void BtuiModelSortFilter::clearDeviceMajorFilter(int, enum BtuiModelSortFilter::FilterMode)
+	?tr@BtuiModelSortFilter@@SA?AVQString@@PBD0@Z @ 44 NONAME ; class QString BtuiModelSortFilter::tr(char const *, char const *)
+	?addDeviceMajorFilter@BtuiModelSortFilter@@QAEXHW4FilterMode@1@@Z @ 45 NONAME ; void BtuiModelSortFilter::addDeviceMajorFilter(int, enum BtuiModelSortFilter::FilterMode)
+	?qt_metacall@BtuiModelSortFilter@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 46 NONAME ; int BtuiModelSortFilter::qt_metacall(enum QMetaObject::Call, int, void * *)
+	?rowCount@BtDeviceModel@@UBEHABVQModelIndex@@@Z @ 47 NONAME ; int BtDeviceModel::rowCount(class QModelIndex const &) const
+	?itemData@BtDeviceModel@@UBE?AV?$QMap@HVQVariant@@@@ABVQModelIndex@@@Z @ 48 NONAME ; class QMap<int, class QVariant> BtDeviceModel::itemData(class QModelIndex const &) const
+	?parent@BtDeviceModel@@UBE?AVQModelIndex@@ABV2@@Z @ 49 NONAME ; class QModelIndex BtDeviceModel::parent(class QModelIndex const &) const
+	?staticMetaObject@BtDeviceModel@@2UQMetaObject@@B @ 50 NONAME ; struct QMetaObject const BtDeviceModel::staticMetaObject
+	?getStaticMetaObject@BtSettingModel@@SAABUQMetaObject@@XZ @ 51 NONAME ; struct QMetaObject const & BtSettingModel::getStaticMetaObject(void)
+	?qt_metacast@BtSettingModel@@UAEPAXPBD@Z @ 52 NONAME ; void * BtSettingModel::qt_metacast(char const *)
+	??0BtDeviceModel@@QAE@ABV0@PAVQObject@@@Z @ 53 NONAME ; BtDeviceModel::BtDeviceModel(class BtDeviceModel const &, class QObject *)
+	?trUtf8@BtuiModelSortFilter@@SA?AVQString@@PBD0H@Z @ 54 NONAME ; class QString BtuiModelSortFilter::trUtf8(char const *, char const *, int)
+	?tr@BtuiModelSortFilter@@SA?AVQString@@PBD0H@Z @ 55 NONAME ; class QString BtuiModelSortFilter::tr(char const *, char const *, int)
+	?beginInsertDevices@BtDeviceModel@@AAEXHHPAX@Z @ 56 NONAME ; void BtDeviceModel::beginInsertDevices(int, int, void *)
+	?staticMetaObject@BtSettingModel@@2UQMetaObject@@B @ 57 NONAME ; struct QMetaObject const BtSettingModel::staticMetaObject
+	?data@BtSettingModel@@UBE?AVQVariant@@ABVQModelIndex@@H@Z @ 58 NONAME ; class QVariant BtSettingModel::data(class QModelIndex const &, int) const
+	?columnCount@BtSettingModel@@UBEHABVQModelIndex@@@Z @ 59 NONAME ; int BtSettingModel::columnCount(class QModelIndex const &) const
+	?removeTransientDevices@BtDeviceModel@@QAEXXZ @ 60 NONAME ; void BtDeviceModel::removeTransientDevices(void)
+	?trUtf8@BtDeviceModel@@SA?AVQString@@PBD0@Z @ 61 NONAME ; class QString BtDeviceModel::trUtf8(char const *, char const *)
+	?metaObject@BtDeviceModel@@UBEPBUQMetaObject@@XZ @ 62 NONAME ; struct QMetaObject const * BtDeviceModel::metaObject(void) const
+	?deviceDataChanged@BtDeviceModel@@AAEXHPAX@Z @ 63 NONAME ; void BtDeviceModel::deviceDataChanged(int, void *)
+	?endInsertDevices@BtDeviceModel@@AAEXXZ @ 64 NONAME ; void BtDeviceModel::endInsertDevices(void)
+	?trUtf8@BtSettingModel@@SA?AVQString@@PBD0H@Z @ 65 NONAME ; class QString BtSettingModel::trUtf8(char const *, char const *, int)
+	?getStaticMetaObject@BtuiModelSortFilter@@SAABUQMetaObject@@XZ @ 66 NONAME ; struct QMetaObject const & BtuiModelSortFilter::getStaticMetaObject(void)
+	?clearDeviceMajorFilters@BtuiModelSortFilter@@QAEXXZ @ 67 NONAME ; void BtuiModelSortFilter::clearDeviceMajorFilters(void)
+	?tr@BtSettingModel@@SA?AVQString@@PBD0H@Z @ 68 NONAME ; class QString BtSettingModel::tr(char const *, char const *, int)
+	?beginRemoveDevices@BtDeviceModel@@AAEXHHPAX@Z @ 69 NONAME ; void BtDeviceModel::beginRemoveDevices(int, int, void *)
+	?getStaticMetaObject@BtDeviceModel@@SAABUQMetaObject@@XZ @ 70 NONAME ; struct QMetaObject const & BtDeviceModel::getStaticMetaObject(void)
+	?data@BtDeviceModel@@UBE?AVQVariant@@ABVQModelIndex@@H@Z @ 71 NONAME ; class QVariant BtDeviceModel::data(class QModelIndex const &, int) const
+	?connectModelSignals@BtDeviceModel@@AAEXXZ @ 72 NONAME ; void BtDeviceModel::connectModelSignals(void)
+	?connectModelSignals@BtSettingModel@@AAEXXZ @ 73 NONAME ; void BtSettingModel::connectModelSignals(void)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/btui/btuimodel/eabi/btuimodelu.def	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,77 @@
+EXPORTS
+	_ZN13BtDeviceModel11qt_metacallEN11QMetaObject4CallEiPPv @ 1 NONAME
+	_ZN13BtDeviceModel11qt_metacastEPKc @ 2 NONAME
+	_ZN13BtDeviceModel12searchDeviceEv @ 3 NONAME
+	_ZN13BtDeviceModel16endInsertDevicesEv @ 4 NONAME
+	_ZN13BtDeviceModel16endRemoveDevicesEv @ 5 NONAME
+	_ZN13BtDeviceModel16staticMetaObjectE @ 6 NONAME DATA 16
+	_ZN13BtDeviceModel17deviceDataChangedEiPv @ 7 NONAME
+	_ZN13BtDeviceModel17deviceDataChangedEiiPv @ 8 NONAME
+	_ZN13BtDeviceModel18beginInsertDevicesEiiPv @ 9 NONAME
+	_ZN13BtDeviceModel18beginRemoveDevicesEiiPv @ 10 NONAME
+	_ZN13BtDeviceModel18cancelSearchDeviceEv @ 11 NONAME
+	_ZN13BtDeviceModel19getStaticMetaObjectEv @ 12 NONAME
+	_ZN13BtDeviceModel21deviceSearchCompletedEi @ 13 NONAME
+	_ZN13BtDeviceModel22removeTransientDevicesEv @ 14 NONAME
+	_ZN13BtDeviceModel25emitDeviceSearchCompletedEi @ 15 NONAME
+	_ZN13BtDeviceModelC1EP7QObject @ 16 NONAME
+	_ZN13BtDeviceModelC1ERKS_P7QObject @ 17 NONAME
+	_ZN13BtDeviceModelC2EP7QObject @ 18 NONAME
+	_ZN13BtDeviceModelC2ERKS_P7QObject @ 19 NONAME
+	_ZN13BtDeviceModelD0Ev @ 20 NONAME
+	_ZN13BtDeviceModelD1Ev @ 21 NONAME
+	_ZN13BtDeviceModelD2Ev @ 22 NONAME
+	_ZN14BtSettingModel11qt_metacallEN11QMetaObject4CallEiPPv @ 23 NONAME
+	_ZN14BtSettingModel11qt_metacastEPKc @ 24 NONAME
+	_ZN14BtSettingModel16staticMetaObjectE @ 25 NONAME DATA 16
+	_ZN14BtSettingModel18settingDataChangedEiPv @ 26 NONAME
+	_ZN14BtSettingModel18settingDataChangedEiiPv @ 27 NONAME
+	_ZN14BtSettingModel19getStaticMetaObjectEv @ 28 NONAME
+	_ZN14BtSettingModelC1EP7QObject @ 29 NONAME
+	_ZN14BtSettingModelC1ERKS_P7QObject @ 30 NONAME
+	_ZN14BtSettingModelC2EP7QObject @ 31 NONAME
+	_ZN14BtSettingModelC2ERKS_P7QObject @ 32 NONAME
+	_ZN14BtSettingModelD0Ev @ 33 NONAME
+	_ZN14BtSettingModelD1Ev @ 34 NONAME
+	_ZN14BtSettingModelD2Ev @ 35 NONAME
+	_ZN19BtuiModelSortFilter11qt_metacallEN11QMetaObject4CallEiPPv @ 36 NONAME
+	_ZN19BtuiModelSortFilter11qt_metacastEPKc @ 37 NONAME
+	_ZN19BtuiModelSortFilter16staticMetaObjectE @ 38 NONAME DATA 16
+	_ZN19BtuiModelSortFilter19getStaticMetaObjectEv @ 39 NONAME
+	_ZN19BtuiModelSortFilter20addDeviceMajorFilterEiNS_10FilterModeE @ 40 NONAME
+	_ZN19BtuiModelSortFilter20setDeviceMajorFilterEiNS_10FilterModeE @ 41 NONAME
+	_ZN19BtuiModelSortFilter22clearDeviceMajorFilterEiNS_10FilterModeE @ 42 NONAME
+	_ZN19BtuiModelSortFilter22deviceAcceptedByFilterEi @ 43 NONAME
+	_ZN19BtuiModelSortFilter23clearDeviceMajorFiltersEv @ 44 NONAME
+	_ZN19BtuiModelSortFilter9hasFilterEiNS_10FilterModeE @ 45 NONAME
+	_ZN19BtuiModelSortFilterC1EP7QObject @ 46 NONAME
+	_ZN19BtuiModelSortFilterC2EP7QObject @ 47 NONAME
+	_ZN19BtuiModelSortFilterD0Ev @ 48 NONAME
+	_ZN19BtuiModelSortFilterD1Ev @ 49 NONAME
+	_ZN19BtuiModelSortFilterD2Ev @ 50 NONAME
+	_ZNK13BtDeviceModel10metaObjectEv @ 51 NONAME
+	_ZNK13BtDeviceModel11columnCountERK11QModelIndex @ 52 NONAME
+	_ZNK13BtDeviceModel4dataERK11QModelIndexi @ 53 NONAME
+	_ZNK13BtDeviceModel5indexEiiRK11QModelIndex @ 54 NONAME
+	_ZNK13BtDeviceModel6parentERK11QModelIndex @ 55 NONAME
+	_ZNK13BtDeviceModel8itemDataERK11QModelIndex @ 56 NONAME
+	_ZNK13BtDeviceModel8rowCountERK11QModelIndex @ 57 NONAME
+	_ZNK14BtSettingModel10metaObjectEv @ 58 NONAME
+	_ZNK14BtSettingModel11columnCountERK11QModelIndex @ 59 NONAME
+	_ZNK14BtSettingModel4dataERK11QModelIndexi @ 60 NONAME
+	_ZNK14BtSettingModel5indexEiiRK11QModelIndex @ 61 NONAME
+	_ZNK14BtSettingModel6parentERK11QModelIndex @ 62 NONAME
+	_ZNK14BtSettingModel8itemDataERK11QModelIndex @ 63 NONAME
+	_ZNK14BtSettingModel8rowCountERK11QModelIndex @ 64 NONAME
+	_ZNK19BtuiModelSortFilter10metaObjectEv @ 65 NONAME
+	_ZNK19BtuiModelSortFilter16filterAcceptsRowEiRK11QModelIndex @ 66 NONAME
+	_ZNK19BtuiModelSortFilter8lessThanERK11QModelIndexS2_ @ 67 NONAME
+	_ZTI13BtDeviceModel @ 68 NONAME
+	_ZTI14BtSettingModel @ 69 NONAME
+	_ZTI19BtuiModelSortFilter @ 70 NONAME
+	_ZTV13BtDeviceModel @ 71 NONAME
+	_ZTV14BtSettingModel @ 72 NONAME
+	_ZTV19BtuiModelSortFilter @ 73 NONAME
+	_ZN14BtSettingModel19connectModelSignalsEv @ 74 NONAME
+	_ZN13BtDeviceModel19connectModelSignalsEv @ 75 NONAME
+
--- a/bluetoothengine/btui/bwins/btuidelegateu.def	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-EXPORTS
-	?qt_metacall@BtAbstractDelegate@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1 NONAME ; int BtAbstractDelegate::qt_metacall(enum QMetaObject::Call, int, void * *)
-	??1BtAbstractDelegate@@UAE@XZ @ 2 NONAME ; BtAbstractDelegate::~BtAbstractDelegate(void)
-	?metaObject@BtAbstractDelegate@@UBEPBUQMetaObject@@XZ @ 3 NONAME ; struct QMetaObject const * BtAbstractDelegate::metaObject(void) const
-	?tr@BtAbstractDelegate@@SA?AVQString@@PBD0H@Z @ 4 NONAME ; class QString BtAbstractDelegate::tr(char const *, char const *, int)
-	?newDelegate@BtDelegateFactory@@SAPAVBtAbstractDelegate@@W4Command@BtDelegate@@PAVBtSettingModel@@PAVBtDeviceModel@@PAVQObject@@@Z @ 5 NONAME ; class BtAbstractDelegate * BtDelegateFactory::newDelegate(enum BtDelegate::Command, class BtSettingModel *, class BtDeviceModel *, class QObject *)
-	?tr@BtAbstractDelegate@@SA?AVQString@@PBD0@Z @ 6 NONAME ; class QString BtAbstractDelegate::tr(char const *, char const *)
-	?qt_metacast@BtAbstractDelegate@@UAEPAXPBD@Z @ 7 NONAME ; void * BtAbstractDelegate::qt_metacast(char const *)
-	?getStaticMetaObject@BtAbstractDelegate@@SAABUQMetaObject@@XZ @ 8 NONAME ; struct QMetaObject const & BtAbstractDelegate::getStaticMetaObject(void)
-	??0BtAbstractDelegate@@QAE@PAVBtSettingModel@@PAVBtDeviceModel@@PAVQObject@@@Z @ 9 NONAME ; BtAbstractDelegate::BtAbstractDelegate(class BtSettingModel *, class BtDeviceModel *, class QObject *)
-	?staticMetaObject@BtAbstractDelegate@@2UQMetaObject@@B @ 10 NONAME ; struct QMetaObject const BtAbstractDelegate::staticMetaObject
-	??_EBtAbstractDelegate@@UAE@I@Z @ 11 NONAME ; BtAbstractDelegate::~BtAbstractDelegate(unsigned int)
-	?commandCompleted@BtAbstractDelegate@@IAEXHVQVariant@@@Z @ 12 NONAME ; void BtAbstractDelegate::commandCompleted(int, class QVariant)
-	?cancel@BtAbstractDelegate@@UAEXXZ @ 13 NONAME ; void BtAbstractDelegate::cancel(void)
-	?trUtf8@BtAbstractDelegate@@SA?AVQString@@PBD0@Z @ 14 NONAME ; class QString BtAbstractDelegate::trUtf8(char const *, char const *)
-	?getSettingModel@BtAbstractDelegate@@IAEPAVBtSettingModel@@XZ @ 15 NONAME ; class BtSettingModel * BtAbstractDelegate::getSettingModel(void)
-	?getDeviceModel@BtAbstractDelegate@@IAEPAVBtDeviceModel@@XZ @ 16 NONAME ; class BtDeviceModel * BtAbstractDelegate::getDeviceModel(void)
-	?trUtf8@BtAbstractDelegate@@SA?AVQString@@PBD0H@Z @ 17 NONAME ; class QString BtAbstractDelegate::trUtf8(char const *, char const *, int)
-
--- a/bluetoothengine/btui/bwins/btuimodelu.def	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-EXPORTS
-	?deviceSearchCompleted@BtDeviceModel@@IAEXH@Z @ 1 NONAME ; void BtDeviceModel::deviceSearchCompleted(int)
-	?cancelSearchDevice@BtDeviceModel@@QAEXXZ @ 2 NONAME ; void BtDeviceModel::cancelSearchDevice(void)
-	??0BtSettingModel@@QAE@PAVQObject@@@Z @ 3 NONAME ; BtSettingModel::BtSettingModel(class QObject *)
-	??1BtDeviceModel@@UAE@XZ @ 4 NONAME ; BtDeviceModel::~BtDeviceModel(void)
-	?emitdeviceSearchCompleted@BtDeviceModel@@AAEXH@Z @ 5 NONAME ; void BtDeviceModel::emitdeviceSearchCompleted(int)
-	?tr@BtDeviceModel@@SA?AVQString@@PBD0H@Z @ 6 NONAME ; class QString BtDeviceModel::tr(char const *, char const *, int)
-	?qt_metacast@BtDeviceModel@@UAEPAXPBD@Z @ 7 NONAME ; void * BtDeviceModel::qt_metacast(char const *)
-	?index@BtDeviceModel@@UBE?AVQModelIndex@@HHABV2@@Z @ 8 NONAME ; class QModelIndex BtDeviceModel::index(int, int, class QModelIndex const &) const
-	?rowCount@BtSettingModel@@UBEHABVQModelIndex@@@Z @ 9 NONAME ; int BtSettingModel::rowCount(class QModelIndex const &) const
-	?emitDataChanged@BtSettingModel@@AAEXHHPAX@Z @ 10 NONAME ; void BtSettingModel::emitDataChanged(int, int, void *)
-	??1BtSettingModel@@UAE@XZ @ 11 NONAME ; BtSettingModel::~BtSettingModel(void)
-	??0BtSettingModel@@QAE@ABV0@PAVQObject@@@Z @ 12 NONAME ; BtSettingModel::BtSettingModel(class BtSettingModel const &, class QObject *)
-	?searchDevice@BtDeviceModel@@QAE_NXZ @ 13 NONAME ; bool BtDeviceModel::searchDevice(void)
-	?parent@BtSettingModel@@UBE?AVQModelIndex@@ABV2@@Z @ 14 NONAME ; class QModelIndex BtSettingModel::parent(class QModelIndex const &) const
-	?trUtf8@BtSettingModel@@SA?AVQString@@PBD0@Z @ 15 NONAME ; class QString BtSettingModel::trUtf8(char const *, char const *)
-	??_EBtSettingModel@@UAE@I@Z @ 16 NONAME ; BtSettingModel::~BtSettingModel(unsigned int)
-	?emitDataChanged@BtSettingModel@@AAEXABVQModelIndex@@0@Z @ 17 NONAME ; void BtSettingModel::emitDataChanged(class QModelIndex const &, class QModelIndex const &)
-	?rowCount@BtDeviceModel@@UBEHABVQModelIndex@@@Z @ 18 NONAME ; int BtDeviceModel::rowCount(class QModelIndex const &) const
-	?metaObject@BtSettingModel@@UBEPBUQMetaObject@@XZ @ 19 NONAME ; struct QMetaObject const * BtSettingModel::metaObject(void) const
-	?itemData@BtDeviceModel@@UBE?AV?$QMap@HVQVariant@@@@ABVQModelIndex@@@Z @ 20 NONAME ; class QMap<int, class QVariant> BtDeviceModel::itemData(class QModelIndex const &) const
-	?staticMetaObject@BtDeviceModel@@2UQMetaObject@@B @ 21 NONAME ; struct QMetaObject const BtDeviceModel::staticMetaObject
-	?parent@BtDeviceModel@@UBE?AVQModelIndex@@ABV2@@Z @ 22 NONAME ; class QModelIndex BtDeviceModel::parent(class QModelIndex const &) const
-	?itemData@BtSettingModel@@UBE?AV?$QMap@HVQVariant@@@@ABVQModelIndex@@@Z @ 23 NONAME ; class QMap<int, class QVariant> BtSettingModel::itemData(class QModelIndex const &) const
-	?tr@BtSettingModel@@SA?AVQString@@PBD0@Z @ 24 NONAME ; class QString BtSettingModel::tr(char const *, char const *)
-	??0BtDeviceModel@@QAE@PAVQObject@@@Z @ 25 NONAME ; BtDeviceModel::BtDeviceModel(class QObject *)
-	?tr@BtDeviceModel@@SA?AVQString@@PBD0@Z @ 26 NONAME ; class QString BtDeviceModel::tr(char const *, char const *)
-	?qt_metacast@BtSettingModel@@UAEPAXPBD@Z @ 27 NONAME ; void * BtSettingModel::qt_metacast(char const *)
-	?getStaticMetaObject@BtSettingModel@@SAABUQMetaObject@@XZ @ 28 NONAME ; struct QMetaObject const & BtSettingModel::getStaticMetaObject(void)
-	??0BtDeviceModel@@QAE@ABV0@PAVQObject@@@Z @ 29 NONAME ; BtDeviceModel::BtDeviceModel(class BtDeviceModel const &, class QObject *)
-	?emitDataChanged@BtDeviceModel@@AAEXHHPAX@Z @ 30 NONAME ; void BtDeviceModel::emitDataChanged(int, int, void *)
-	?staticMetaObject@BtSettingModel@@2UQMetaObject@@B @ 31 NONAME ; struct QMetaObject const BtSettingModel::staticMetaObject
-	?data@BtSettingModel@@UBE?AVQVariant@@ABVQModelIndex@@H@Z @ 32 NONAME ; class QVariant BtSettingModel::data(class QModelIndex const &, int) const
-	?columnCount@BtSettingModel@@UBEHABVQModelIndex@@@Z @ 33 NONAME ; int BtSettingModel::columnCount(class QModelIndex const &) const
-	?removeTransientDevices@BtDeviceModel@@QAEXXZ @ 34 NONAME ; void BtDeviceModel::removeTransientDevices(void)
-	?qt_metacall@BtDeviceModel@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 35 NONAME ; int BtDeviceModel::qt_metacall(enum QMetaObject::Call, int, void * *)
-	?trUtf8@BtDeviceModel@@SA?AVQString@@PBD0@Z @ 36 NONAME ; class QString BtDeviceModel::trUtf8(char const *, char const *)
-	??_EBtDeviceModel@@UAE@I@Z @ 37 NONAME ; BtDeviceModel::~BtDeviceModel(unsigned int)
-	?index@BtSettingModel@@UBE?AVQModelIndex@@HHABV2@@Z @ 38 NONAME ; class QModelIndex BtSettingModel::index(int, int, class QModelIndex const &) const
-	?qt_metacall@BtSettingModel@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 39 NONAME ; int BtSettingModel::qt_metacall(enum QMetaObject::Call, int, void * *)
-	?metaObject@BtDeviceModel@@UBEPBUQMetaObject@@XZ @ 40 NONAME ; struct QMetaObject const * BtDeviceModel::metaObject(void) const
-	?trUtf8@BtSettingModel@@SA?AVQString@@PBD0H@Z @ 41 NONAME ; class QString BtSettingModel::trUtf8(char const *, char const *, int)
-	?columnCount@BtDeviceModel@@UBEHABVQModelIndex@@@Z @ 42 NONAME ; int BtDeviceModel::columnCount(class QModelIndex const &) const
-	?tr@BtSettingModel@@SA?AVQString@@PBD0H@Z @ 43 NONAME ; class QString BtSettingModel::tr(char const *, char const *, int)
-	?data@BtDeviceModel@@UBE?AVQVariant@@ABVQModelIndex@@H@Z @ 44 NONAME ; class QVariant BtDeviceModel::data(class QModelIndex const &, int) const
-	?getStaticMetaObject@BtDeviceModel@@SAABUQMetaObject@@XZ @ 45 NONAME ; struct QMetaObject const & BtDeviceModel::getStaticMetaObject(void)
-	?emitDataChanged@BtDeviceModel@@AAEXABVQModelIndex@@0@Z @ 46 NONAME ; void BtDeviceModel::emitDataChanged(class QModelIndex const &, class QModelIndex const &)
-	?trUtf8@BtDeviceModel@@SA?AVQString@@PBD0H@Z @ 47 NONAME ; class QString BtDeviceModel::trUtf8(char const *, char const *, int)
-	?setDeviceMajorFilter@BtuiModelSortFilter@@QAEXHW4FilterMode@1@@Z @ 48 NONAME ; void BtuiModelSortFilter::setDeviceMajorFilter(int, enum BtuiModelSortFilter::FilterMode)
-	?metaObject@BtuiModelSortFilter@@UBEPBUQMetaObject@@XZ @ 49 NONAME ; struct QMetaObject const * BtuiModelSortFilter::metaObject(void) const
-	?hasFilter@BtuiModelSortFilter@@QAE_NHW4FilterMode@1@@Z @ 50 NONAME ; bool BtuiModelSortFilter::hasFilter(int, enum BtuiModelSortFilter::FilterMode)
-	?staticMetaObject@BtuiModelSortFilter@@2UQMetaObject@@B @ 51 NONAME ; struct QMetaObject const BtuiModelSortFilter::staticMetaObject
-	?qt_metacast@BtuiModelSortFilter@@UAEPAXPBD@Z @ 52 NONAME ; void * BtuiModelSortFilter::qt_metacast(char const *)
-	?trUtf8@BtuiModelSortFilter@@SA?AVQString@@PBD0@Z @ 53 NONAME ; class QString BtuiModelSortFilter::trUtf8(char const *, char const *)
-	??0BtuiModelSortFilter@@QAE@PAVQObject@@@Z @ 54 NONAME ; BtuiModelSortFilter::BtuiModelSortFilter(class QObject *)
-	?lessThan@BtuiModelSortFilter@@MBE_NABVQModelIndex@@0@Z @ 55 NONAME ; bool BtuiModelSortFilter::lessThan(class QModelIndex const &, class QModelIndex const &) const
-	??1BtuiModelSortFilter@@UAE@XZ @ 56 NONAME ; BtuiModelSortFilter::~BtuiModelSortFilter(void)
-	??_EBtuiModelSortFilter@@UAE@I@Z @ 57 NONAME ; BtuiModelSortFilter::~BtuiModelSortFilter(unsigned int)
-	?deviceAcceptedByFilter@BtuiModelSortFilter@@IAEXH@Z @ 58 NONAME ; void BtuiModelSortFilter::deviceAcceptedByFilter(int)
-	?filterAcceptsRow@BtuiModelSortFilter@@MBE_NHABVQModelIndex@@@Z @ 59 NONAME ; bool BtuiModelSortFilter::filterAcceptsRow(int, class QModelIndex const &) const
-	?clearDeviceMajorFilter@BtuiModelSortFilter@@QAEXHW4FilterMode@1@@Z @ 60 NONAME ; void BtuiModelSortFilter::clearDeviceMajorFilter(int, enum BtuiModelSortFilter::FilterMode)
-	?tr@BtuiModelSortFilter@@SA?AVQString@@PBD0@Z @ 61 NONAME ; class QString BtuiModelSortFilter::tr(char const *, char const *)
-	?addDeviceMajorFilter@BtuiModelSortFilter@@QAEXHW4FilterMode@1@@Z @ 62 NONAME ; void BtuiModelSortFilter::addDeviceMajorFilter(int, enum BtuiModelSortFilter::FilterMode)
-	?qt_metacall@BtuiModelSortFilter@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 63 NONAME ; int BtuiModelSortFilter::qt_metacall(enum QMetaObject::Call, int, void * *)
-	?trUtf8@BtuiModelSortFilter@@SA?AVQString@@PBD0H@Z @ 64 NONAME ; class QString BtuiModelSortFilter::trUtf8(char const *, char const *, int)
-	?tr@BtuiModelSortFilter@@SA?AVQString@@PBD0H@Z @ 65 NONAME ; class QString BtuiModelSortFilter::tr(char const *, char const *, int)
-	?getStaticMetaObject@BtuiModelSortFilter@@SAABUQMetaObject@@XZ @ 66 NONAME ; struct QMetaObject const & BtuiModelSortFilter::getStaticMetaObject(void)
-	?clearDeviceMajorFilters@BtuiModelSortFilter@@QAEXXZ @ 67 NONAME ; void BtuiModelSortFilter::clearDeviceMajorFilters(void)
-
--- a/bluetoothengine/btui/data/BTUI.rss	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,150 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This file contains all the resources for the BTUI.
-*
-*/
-
-
-#include <data_caging_paths_strings.hrh>
-
-//  RESOURCE IDENTIFIER
-
-NAME    BTUI          // 4 letter ID
-
-//  INCLUDES
-#include <eikon.rh>
-#include "btui.hrh"   // Enums for these resources
-#include <btui.loc>   // Localisation file
-#include <btui.mbg>   // Icon indexes created by abld
-#include "eikon.rsg"
-#include <avkon.rsg>
-#include <avkon.rh>
-#include <appinfo.rh>
-
-//  MACROS
-
-//  RESOURCE DEFINITIONS
-
-RESOURCE RSS_SIGNATURE { }
-
-RESOURCE TBUF { buf="BTUI"; }
-
-RESOURCE EIK_APP_INFO
-    {
-    status_pane = r_btui_status_pane;
-    }
-
-//----------------------------------------------------
-//
-//  Hotkeys for BTUI
-//
-//----------------------------------------------------
-//
-RESOURCE HOTKEYS r_btui_hotkeys
-    {
-    control=
-        {
-        HOTKEY { command=EAknCmdExit; key='e'; }
-        };
-    }
-
-//----------------------------------------------------
-//
-//  The status pane for BTUI application
-//
-//----------------------------------------------------
-//
-RESOURCE STATUS_PANE_APP_MODEL r_btui_status_pane
-    {
-    panes =
-        {
-        SPANE_PANE
-            {
-            id       = EEikStatusPaneUidNavi;
-            type     = EAknCtNaviPane;
-            resource = r_btui_navi_decorator;
-            }
-        };
-    }
-
-//----------------------------------------------------
-//
-//  The navi decorator for BTUI application
-//  Defines application views tabs
-//
-//----------------------------------------------------
-//
-RESOURCE NAVI_DECORATOR r_btui_navi_decorator
-    {
-    type    = ENaviDecoratorControlTabGroup;
-    control = TAB_GROUP
-        {
-        tab_width = EAknTabWidthWithThreeTabs;
-        active    = 0;  // Initial tab to be active
-        tabs =
-            {
-            TAB
-                {
-                id      = EBTUIMainViewTab;
-                bmpfile = btui_bitmap_file_data_caging;
-                bmpid   = EMbmBtuiQgn_prop_bt_set_tab3;
-                bmpmask = EMbmBtuiQgn_prop_bt_set_tab3_mask;
-                },
-            TAB
-                {
-                id      = EBTUIPairedDevicesViewTab;
-                bmpfile = btui_bitmap_file_data_caging;
-                bmpid   = EMbmBtuiQgn_prop_bt_devices_tab3;
-                bmpmask = EMbmBtuiQgn_prop_bt_devices_tab3_mask;
-                },
-
-            TAB
-                {
-                id      = EBTUIBlockedDevicesViewTab;
-                bmpfile = btui_bitmap_file_data_caging;
-                bmpid   = EMbmBtuiQgn_prop_bt_blocked_tab3;
-                bmpmask = EMbmBtuiQgn_prop_bt_blocked_tab3_mask;
-                }
-            };
-        };
-    }
-
-
-
-//----------------------------------------------------
-//
-// 	LOCALISABLE_APP_INFO
-//
-//----------------------------------------------------
-
-
-RESOURCE LOCALISABLE_APP_INFO r_btui_localisable_app_info
-    {
-    short_caption = qtn_apps_bluetooth_grid;
-    caption_and_icon = 
-    CAPTION_AND_ICON_INFO
-        {
-        caption = qtn_apps_bluetooth_list;
-		#ifdef __SCALABLE_ICONS
-			number_of_icons = 1;
-        	icon_file = APP_BITMAP_DIR"\\Btui_aif.mif";			
-		#else
-			number_of_icons = 2;
-        	icon_file = APP_BITMAP_DIR"\\Btui_aif.mbm";
-		#endif
-        };
-    }
-
-
-
--- a/bluetoothengine/btui/data/Btui_reg.rss	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-/*
-* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#include <appinfo.rh>
-#include <BTUI.rsg>
-#include <data_caging_paths_strings.hrh>
-
-UID2 KUidAppRegistrationResourceFile
-UID3 0x10005951 
-
-RESOURCE APP_REGISTRATION_INFO
-    {
-    app_file = "Btui";
-	localisable_resource_file = APP_RESOURCE_DIR"\\btui";
-	localisable_resource_id = R_BTUI_LOCALISABLE_APP_INFO;
-    }
-
-
--- a/bluetoothengine/btui/devmodel/BWINS/btdevmodelU.DEF	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-EXPORTS
-	??0TBTDevice@@QAE@XZ @ 1 NONAME ; TBTDevice::TBTDevice(void)
-	?IsAnyDeviceConnected@CBTDevModel@@QAEHXZ @ 2 NONAME ; int CBTDevModel::IsAnyDeviceConnected(void)
-	?CancelChange@CBTDevModel@@QAEXABVTBTDevice@@@Z @ 3 NONAME ; void CBTDevModel::CancelChange(class TBTDevice const &)
-	?ReverseCompareAphabetically@TBTDeviceComparison@@SAHABVTBTDevice@@0@Z @ 4 NONAME ; int TBTDeviceComparison::ReverseCompareAphabetically(class TBTDevice const &, class TBTDevice const &)
-	?ChangeDevice@CBTDevModel@@QAEXPBVCBTDevice@@PAV?$TPckgBuf@VTNameRecord@@@@W4TBTDeviceOp@@@Z @ 5 NONAME ; void CBTDevModel::ChangeDevice(class CBTDevice const *, class TPckgBuf<class TNameRecord> *, enum TBTDeviceOp)
-	?DeviceChangeInProgress@CBTDevModel@@QAEHXZ @ 6 NONAME ; int CBTDevModel::DeviceChangeInProgress(void)
-	??0TBTDevice@@QAE@ABV0@@Z @ 7 NONAME ; TBTDevice::TBTDevice(class TBTDevice const &)
-	?CreateDeviceL@CBTDevModel@@QAEPAVTBTDevice@@PBVCBTDevice@@PAV?$TPckgBuf@VTNameRecord@@@@@Z @ 8 NONAME ; class TBTDevice * CBTDevModel::CreateDeviceL(class CBTDevice const *, class TPckgBuf<class TNameRecord> *)
-	?ChangeDevice@CBTDevModel@@QAEXABVTBTDevice@@@Z @ 9 NONAME ; void CBTDevModel::ChangeDevice(class TBTDevice const &)
-	??4TBTDevice@@QAEAAV0@ABV0@@Z @ 10 NONAME ; class TBTDevice & TBTDevice::operator=(class TBTDevice const &)
-	?ChangeAllDevices@CBTDevModel@@QAEXW4TBTDeviceOp@@@Z @ 11 NONAME ; void CBTDevModel::ChangeAllDevices(enum TBTDeviceOp)
-	?GetDevice@CBTDevModel@@QAEHAAVTBTDevice@@@Z @ 12 NONAME ; int CBTDevModel::GetDevice(class TBTDevice &)
-	?NewL@CBTDevModel@@SAPAV1@W4TBTDeviceGroup@@PAVMBTDeviceObserver@@PAV?$TLinearOrder@VTBTDevice@@@@@Z @ 13 NONAME ; class CBTDevModel * CBTDevModel::NewL(enum TBTDeviceGroup, class MBTDeviceObserver *, class TLinearOrder<class TBTDevice> *)
-	?CompareAphabetically@TBTDeviceComparison@@SAHABVTBTDevice@@0@Z @ 14 NONAME ; int TBTDeviceComparison::CompareAphabetically(class TBTDevice const &, class TBTDevice const &)
-
--- a/bluetoothengine/btui/devmodel/eabi/btdevmodelu.DEF	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-EXPORTS
-	_ZN11CBTDevModel12CancelChangeERK9TBTDevice @ 1 NONAME
-	_ZN11CBTDevModel12ChangeDeviceEPK9CBTDeviceP8TPckgBufI11TNameRecordE11TBTDeviceOp @ 2 NONAME
-	_ZN11CBTDevModel12ChangeDeviceERK9TBTDevice @ 3 NONAME
-	_ZN11CBTDevModel13CreateDeviceLEPK9CBTDeviceP8TPckgBufI11TNameRecordE @ 4 NONAME
-	_ZN11CBTDevModel16ChangeAllDevicesE11TBTDeviceOp @ 5 NONAME
-	_ZN11CBTDevModel20IsAnyDeviceConnectedEv @ 6 NONAME
-	_ZN11CBTDevModel22DeviceChangeInProgressEv @ 7 NONAME
-	_ZN11CBTDevModel4NewLE14TBTDeviceGroupP17MBTDeviceObserverP12TLinearOrderI9TBTDeviceE @ 8 NONAME
-	_ZN11CBTDevModel9GetDeviceER9TBTDevice @ 9 NONAME
-	_ZN19TBTDeviceComparison20CompareAphabeticallyERK9TBTDeviceS2_ @ 10 NONAME
-	_ZN19TBTDeviceComparison27ReverseCompareAphabeticallyERK9TBTDeviceS2_ @ 11 NONAME
-	_ZN9TBTDeviceC1ERKS_ @ 12 NONAME
-	_ZN9TBTDeviceC1Ev @ 13 NONAME
-	_ZN9TBTDeviceC2ERKS_ @ 14 NONAME
-	_ZN9TBTDeviceC2Ev @ 15 NONAME
-	_ZN9TBTDeviceaSERKS_ @ 16 NONAME
-
--- a/bluetoothengine/btui/devmodel/group/bld.inf	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Build information file for project btdevmodel
-*
-*/
-
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-../inc/btdevmodel.h                 |../../../inc/btdevmodel.h
-PRJ_MMPFILES
-btdevmodel.mmp
-
-PRJ_TESTMMPFILES
-
-PRJ_TESTEXPORTS
--- a/bluetoothengine/btui/devmodel/group/btdevmodel.mmp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Project definition file for project btdevmodel
-*
-*/
-
-
-
-#include <platform_paths.hrh>
-#include <data_caging_paths.hrh>
-
-TARGET                  btdevmodel.dll
-TARGETTYPE              DLL
-UID                     0x10009D8D 0x1020745E
-
-CAPABILITY          CAP_GENERAL_DLL NetworkControl
-VENDORID                VID_DEFAULT
-
-SOURCEPATH              ../src
-SOURCE                  btdevmodel.cpp
-SOURCE                  btdevmodelbase.cpp
-SOURCE                  btpairedmodel.cpp
-SOURCE                  btblockedmodel.cpp
-SOURCE                  btregistryobserver.cpp
-SOURCE			btdevice.cpp
-
-USERINCLUDE             ../inc
-USERINCLUDE             ../../inc
-SYSTEMINCLUDE           ../../../inc
-MW_LAYER_SYSTEMINCLUDE
-
-LIBRARY                 euser.lib //CActive, TDes
-LIBRARY         		btengsettings.lib
-LIBRARY                 btengdevman.lib
-LIBRARY                 btengconnman.lib
-LIBRARY                 btmanclient.lib //TBTRegistrySearch,CBluetoothPhysicalLinks
-LIBRARY                 bluetooth.lib //TBTDevAddr
-LIBRARY                 btdevice.lib
-LIBRARY                 centralrepository.lib
-LIBRARY					esock.lib //btpairedmodel
-DEBUGLIBRARY            flogger.lib
--- a/bluetoothengine/btui/devmodel/inc/btblockedmodel.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:   Maintains a Bluetooth devices data model for blocked devices view.
-*
-*/
-
-#ifndef BTBLOCKEDMODEL_H
-#define BTBLOCKEDMODEL_H
-
-#include "btdevmodelbase.h"
-/**
-* This is a adds funtionality to show only blocked devices to BTDevModelBase.
-*
-* It act as a mediator between UI applications and Bluetooth Engine Device Management API.
-*
-*@lib btdevmodel.dll
-*@since S60 V3.2
-*/
-NONSHARABLE_CLASS(CBTBlockedModel) : public CBTDevModelBase
-    {
-public: // Constructors and destructor
-	/** NewL function 
-	 * @param aObserver The observer will receive information about command completes and
-	 * changes in the devices.
-	 * @param aOrder The order the devices are sorted. Default order is added by CBTDevMan, so
-	 * this class can assume this parameter to be used. This class is responsible for deleting this parameter on
-	 * its destructor.
-	 */
-    static CBTBlockedModel* NewL(MBTDeviceObserver* aObserver , 
-                                 TBTDeviceSortOrder* aOrder  );
-    /** Destructor
-     */
-    virtual ~CBTBlockedModel();       
-
-    /** Add new device to the list, but only if the device is blocked.
-     * This function will filter out those devices that are not blocked.
-     *@param aRegdevice the device to be added to the list
-     */
-    void HandleNewDeviceL(const CBTDevice* aRegDevice,
-            TNameEntry* aNameEntry);
-
-private:
-	/** Constructor
-	 * @param aObserver The observer will receive information about command completes and
-	 * changes in the devices.
-	 * @param aOrder The order the devices are sorted. Default order is added by CBTDevMan, so
-	 * this class can assume this parameter to be used. This class is responsible for deleting this parameter on
-	 * its destructor.	
-	 */
-    CBTBlockedModel(MBTDeviceObserver* aObserver , 
-                     TBTDeviceSortOrder* aOrder  );
-    /** Symbian 2nd phase constuctor that may leave.
-     *@param None.
-     * @return None.
-     */
-    void ConstructL();
-    
-    
-    };
-    
-#endif 
-
--- a/bluetoothengine/btui/devmodel/inc/btdevmodel.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,304 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:   Maintain a Bluetooth devices data model for UI components.
-*
-*/
-
-#ifndef BTDEVMODEL_H
-#define BTDEVMODEL_H
-
-#include <e32base.h>     
-#include <btmanclient.h>
-#include <btdevice.h>
-#include <e32cmn.h>
-  
-// used to support different device list of UI
-enum TBTDeviceGroup
-    {
-    EGroupPaired, // for paired device list
-    EGroupBlocked // for blocked device list
-    };
-    
-// for showing left side icon of a device in device list. Based on CoD major device
-enum TBTDeviceType
-    {
-    EDeviceComputer = 0,// computer
-    EDevicePhone,		// mobile phone
-    EDeviceAudio, 		// headset or loudspeakers    
-    EDeviceCarkit, 		// audio-caraudio
-    EDevicePrinter, 	// imaging-printer
-    EDeviceKeyboard,	// peripheral-keyboard
-    EDeviceMice, 		// peripheral-pointer
-    EDeviceGPS, 		// major service positioning
-    EDeviceDefault,		// device of other type than define above.
-    };
-
-// for showing right side icon of a device on a device list    
-enum TBTDeviceStatus
-    {
-    EStatusTrusted = 0x0001,	 		// show authorised icon on both paired and blocked lists
-    EStatusBtuiConnected = 0x0002,  	// show connected icon on paired list
-    EStatusBlocked = 0x0004, 			// show device on blocked list
-    EStatusPaired = 0x0008, 			// show the device in paired devices list
-    EStatusConnectable = 0x0010, 		// The device can be connected to.
-    									// NOTE: connected devices are also connectable,
-    									// despite they cannot be connected before disconnect.
-	EStatusPhysicallyConnected = 0x0020  // Physical bluetooth connection. 
-    };
-    
-enum TBTDeviceOp
-    {
-    EOpPair,	
-    EOpUnpair,	
-    EOpBlock,	
-    EOpUnblock, 
-    EOpConnect, 
-    EOpDisconnect,
-    EOpTrust,
-    EOpUntrust,
-    EOpChangeName,
-    EOpNone,
-    EOPInternalUntust // used by CBTDevModel internally
-    };
-    
-/* TBTDevAddr that is not address of any device
-*/    
-#define KNullAddress TBTDevAddr(TInt64(0))
-   
-// contain all device info needed for shown on a device list
-NONSHARABLE_CLASS( TBTDevice )
-    {
-public:
-	/** Constructor, that initialized this as empty*/
-    IMPORT_C TBTDevice();
-    /** Copy constructor */
-    IMPORT_C TBTDevice(const TBTDevice& aDevice);
-    /** Copy  */
-    IMPORT_C TBTDevice& operator=(const TBTDevice& aDevice);
-    
-    TBTDeviceType iType; 				// left side icon
-    TBTDeviceClass iDeviceClass; 		// this is needed by connect
-    TBTDeviceName iName; 				// a formated friendly/device name in corresponding CBTDevice
-    TBTDeviceName iFriendlyName;        // still need to remember if friendly name has been set   
-    TUint iStatus; 						// mask of TDeviceStatus
-    TBTDeviceOp iOperation; 			// last operation on the device
-    TBTDevAddr iAddr; 					// bt device address
-    TInt iIndex; 						// new position of the device in the device list. 
-                 						// Default value means iAddr should be used instead.
-    TBTLinkKeyType iLinkKeyType;
-    TNameEntry iNameEntry; // the device's EIR data
-    };   
-/** Static methods for TBTDeviceComparison. These are meant to be given to TBTDeviceSortOrder and
-* to be used for defining sort orders.
-*/
-class TBTDeviceComparison
-	{
-public:
-	/** 
-	* Compare function for alphabetic sorting order.
-	* @param aFirstDevice to be compared
-	* @param aSecondDevice sencond device to be compared
-	* @return 1 if aFirstDevice is before aSecondDevice -1 otherwise. May not return 0,
-	* on devices that are not the same.
-	*/
-		
-	IMPORT_C static TInt CompareAphabetically(
-		const TBTDevice& aFirstDevice, const TBTDevice& aSecondDevice) ;
-		
-	/** 
-	* Compare function for reverse alphabetic sorting order.
-	* @param aFirstDevice to be compared
-	* @param aSecondDevice sencond device to be compared
-	* @return 1 if aFirstDevice is before aSecondDevice -1 otherwise. May not return 0,
-	* on devices that are not the same.
-	*/	
-	IMPORT_C static TInt ReverseCompareAphabetically(
-	 	const TBTDevice& aFirstDevice, const TBTDevice& aSecondDevice) ;
-	};
-	     
-typedef RPointerArray<TBTDevice> RDeviceArray; 
-typedef RPointerArray<TBTDeviceName> RBTDevNameArray; 
-typedef TLinearOrder<TBTDevice> TBTDeviceSortOrder ;
-
-class CBTDevModelBase;
-
-/**
-* Callback interface for informing about the changes in the devices shown by the listening view.
-* Also a callback interface that informs the listener when the issued commands have been completed.
-*/
-class MBTDeviceObserver
-    {
-public: 
-    /** 
-    * Informs the observer that ChangeDevice command has been completed.
-    *
-    * The listener must not change the displaid devices, since RefreshDeviceList is used for that purpose.
-    * Also this will not be called, if changes happen from outside such as pairing initiated by 3rd party
-    * of blocking from notifier.
-    *
-    * @param aErr Symbian error code, KErrNone if no error.
-    * @param aDevice the device which is changed. This has allways given to the listener by RefreshDeviceList 
-    * prior this call, if that device is visible at the listening view. This not passed by refrence,
-    * since this device could change, if registry is changed
-    * @param aDevNameArray hold conflicting devices' short names if "AlreadyExist" error happened during "connect"
-    * @return None.
-    */
-    virtual void NotifyChangeDeviceComplete(const TInt aErr, const TBTDevice& aDevice, 
-        const RBTDevNameArray* aDevNameArray = NULL) = 0;
-	
-	/** 
-	 * This is used to notify the listening graphic component that the deviceList is changed.
-	 * After receiving this call the graphic component has to redraw its screen to match this list.
-	 * @param aDevices The devices to be displaid. 
-	 * @param aSelectedItemIndex The index of the item to be selected in the given devices.
-	 */
-	virtual void RefreshDeviceList(const RDeviceArray* aDevices,TInt aSelectedItemIndex) =0;
-	
-	/** 
-	* This is used before calling RefreshDeviceList to save the currently selected index,
-	* so that the same device could be selected after the refresh, if that device still exists.
-	* @param None.
-	* @return the selected device. KErrNotFound if the view has no devices.
-	*/
-	virtual TInt CurrentItemIndex() =0;
-    };
-
-/**
-* This is a abstract class providing basic common fucntions for derived classes.
-* It act as a facade between UI applications and Bluetooth Engine Device Management API.
-*/
-NONSHARABLE_CLASS( CBTDevModel ) : public CBase
-    {
-public: // Constructors and destructor
-    /**
-    * Constructs devmodel.
-    * @param aGroup. do you wish to list other or blocked devices.
-    * @param MBTDeviceObserver The object that will receive the notifications for command completes,
-    * @param the order the devices are sorted in the list. If you do not give this the devices
-    * will be sorted in ascending alphabetic order. Devices with same name are sorted according to
-    * bluetooth addreses. DevModel will take the ownership of this object.
-    */    
-    IMPORT_C static CBTDevModel* NewL(const TBTDeviceGroup aGroup,
-                                      MBTDeviceObserver* aObserver=NULL, 
-                                      TBTDeviceSortOrder* aOrder=NULL);
-    /** Destructor */
-    virtual ~CBTDevModel();       
-
-public: // New functions
-
-   /**
-    * Get device based on addr or index.
-    * @param aDevice the TBTDevice holder. The device address is passed in
-    * @return KErrNone if ok.
-    * KErrArgument, if neither index not address is filled.
-    * KErrOverFlow if index is out of range. 
-    * KErrNotFound if the given address does not exists, in the internal array.
-    */
-    IMPORT_C TInt GetDevice(TBTDevice& aDevice);
-    
-	/** 
-	* Checks if any of the devices shown in view have active bluetooth connection.
-	* @return ETrue, if one or more devices are connected. EFalse if no devices are connected.
-	* This also return EFalse, in case of blocked devices.
-	*/
-	IMPORT_C TBool IsAnyDeviceConnected();
-	
-    /** 
-    * Creates and allocates TBTDevice representation of this device.
-    * The caller is responsibe for the garbage connection of the created device.
-    * @param aRegDevice the device to be converted
-    * @return the TBTDevice representation of the same device
-    */
-    IMPORT_C TBTDevice* CreateDeviceL(const CBTDevice* aRegDevice,
-            TNameEntry* aNameEntry); 
-           
-    /**
-    * Change status of all devices on the list, e.g. used by unpair all and unblock all commands.
-    * @param aOperation unpair/unblock
-    * @return None.
-    */
-    IMPORT_C void ChangeAllDevices(const TBTDeviceOp aOperation);
-    
-    /**
-    * Change device status, add device, e.g. pair/block, or delete device,e.g. unpair/unblcok
-    * You must not pair device without properly filling deviceName.
-    * @param aDevice the TBTDevice holder. The device address is passed in
-    * @return None
-    */
-    IMPORT_C void ChangeDevice(const TBTDevice& aDevice);
-    
-    /**
-    * Change device status, add device, e.g. pair/block, or delete device,e.g. unpair/unblcok
-    * @param aDevice the CBTDevice holder.
-    * @return None.
-    */
-  	IMPORT_C void ChangeDevice(const CBTDevice* aDevice,
-  	      TNameEntry* aNameEntry,
-  	        TBTDeviceOp aOp) ;
-  	
-    /**
-    * Cancel ongoing operation, such as connecting or pairing.
-    * At the moment btui does not support other Other operations than pairing and connecting cannot be canceled.
-    *
-    * @param aDevice the device, whose command is to be canceled.   
-    * @return None.
-    */
-    IMPORT_C void CancelChange(const TBTDevice& aDevice);
-
-	/** 
-	*Checks if there are ChangeDeviceCommands that are not finnished.
-	*/
-	IMPORT_C TBool DeviceChangeInProgress();
-	
-	
-private:
-	/** constructor */
-    CBTDevModel();
-    
-    /** Symbian 2nd phase constuctor that may leave.
-     * @param aGroup EGroupPaired and EGroupBlocked are supported.
-     * @param aObserver the observer of the device list. This is not mandatory
-     * @param aOrder The order the devices are sorted
-     */
-    void ConstructL(const TBTDeviceGroup aGroup,
-                    MBTDeviceObserver* aObserver,
-					TBTDeviceSortOrder* aOrder );
-private:
-	
-    CBTDevModelBase* iDevModel; // CBTDevModelPaired or CBTDevModel Blocked 
-    TBTDeviceGroup iGroup;
-    };    
-	
-     
-/** Adds flags to iStatus of TBTDevice.
- *@param aStatus the status of the device
- *@param aFlags the flags to be set
- */
-inline TUint SetStatusFlags(TUint& aStatus,TBTDeviceStatus aFlags)
-	{
-		aStatus |=aFlags;
-		return aStatus;
-	}
-/** Clear status flags to iStatus of TBTDevice.
- *@param aStatus the status of the device
- *@param aFlags the flags to be set
- */	
-inline TUint UnsetStatusFlags(TUint& aStatus,TBTDeviceStatus aFlags)
-	{
-		aStatus &= ~aFlags;
-		return aStatus;
-	}
-
-#endif     
-
--- a/bluetoothengine/btui/devmodel/inc/btdevmodelbase.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,286 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Abstract base class for concete models.
-*
-*/
-
-
-#ifndef BTDEVMODELBASE_H
-#define BTDEVMODELBASE_H
-
-#include <btengdevman.h>       // for MBTEngDevManObserver
-
-#include "btdevmodel.h"
-#include "btregistryobserver.h" // for MBTRegistryObserver
-
-/**
-* This is a abstract class providing basic common fucntions for derived classes.
-* It act as a mediator between UI applications and Bluetooth Engine Device Management API.
-*
-*@lib btdevmodel.dll
-*@since S60 V3.2
-*/
-NONSHARABLE_CLASS( CBTDevModelBase ): public CBase, public MBTEngDevManObserver, public MBTRegistryObserver
-    {
-public: // Constructors and destructor
-    /** destructor 
-    *@param none.
-    *@return none.
-    */
-    virtual ~CBTDevModelBase();       
-public: 
-
-	/** Checks if any of the devices shown in view have active bluetooth connection.
-	 * This baseclass does not support connections, so the answer is allways EFalse.
-	 *
-	 * NOTE: TBTUIViewsCommonUtils::IsAnyDeviceConnectedL will report also those devices
-	 * that are not part of particular view, such as paired devices.
-	 * CBTPairedModel::IsAnyDeviceConnected reports only connection from paired devices.
-	 *
-	 *@return ETrue, if one or more devices are connected. EFalse if no devices are connected.
-	 */
-	TBool virtual IsAnyDeviceConnected();
-    /**
-    * Get device based on addr or index.
-    * @param aDevice the TBTDevice holder. You have to set either the deviceAddress or the
-    * or the device index. If you specify both the device address and the index then the address is used,
-    * this includes those cases when there is no device corresponding the address.
-    * @return KErrNone if ok. 
-    * KErrArgument, if neither index not address is filled.
-    * KErrOverFlow if index is out of range. which means it is negative or the internal array does not have that
-    * many items.
-    * KErrNotFound if the given address does not exists, in the internal array.
-    */
-    TInt virtual GetDevice(TBTDevice& aDevice);
-       
-    /**
-    * Change status of all devices on the list. This is used by Delete All operations in paired devices view
-    * (EOpPair) and Blocked devices view(EOpUnblock)
-    *
-    * This creates multiple operations in the intergal queue that are all executed on by one.
-    *
-    * @param aOperation unpair/unblock
-    * @return None.
-    */
-    void ChangeAllDevices(const TBTDeviceOp aOperation);
-
-    /**
-    * Change device status, add device, e.g. block, unpair,unblock etc.
-    *
-    * The operation is put to queue and executed when the prior operations
-    * of the queue are finnished. Immeadiately if the queue is empty.
-    *
-    * @param aDevice. The device and the type of the change. If the address is empty, then the 
-    * device index means what device is to be used.
-    * @return none
-    */
-    virtual void ChangeDeviceL(const TBTDevice& aDevice);
-    
-    /**
-    * Change device status, add device, e.g. block, unpair,unblock etc.
-    * This will check for leaves and make a callback, if leave occurs.
-    *
-    * The operation is put to queue and executed when the prior operations
-    * of the queue are finnished. Immeadiately if the queue is empty.
-    *
-    * @param aDevice. The device and the type of the change. If the address is empty, then the 
-    * device index means what device is to be used.
-    * @return none
-    */
-    
-    virtual void ChangeDevice(const TBTDevice& aDevice);
-    
-    /**
-    * Cancel connecting, pairing, modifying device in BTRegistry
-    *
-    * Cancels ongoing operation or operation from queue, if it has not been started yet.
-    * Cancels it, if it is being executed. Used by Canceling Connecting and pairing operations.
-    *
-    * @param aDevice. The device and the type of the change that will be canceled. 
-    * If the address is empty, then the 
-    * device index means what device is to be used.
-    * @return None.
-    */
-    virtual void CancelChange(const TBTDevice& aDevice);
-    
-    /** Creates and allocates TBTDevice representation of this device
-     *@param aRegDevice the device to be converted,
-     *@param aNameEntry contains the EIR data of the device if its data is valid
-     *@return the TBTDevice representation of the same device. (Note the caller is responsible for deleting
-     * the returned item.)
-     */
-    virtual TBTDevice* CreateDeviceL(const CBTDevice* aRegDevice, 
-            TNameEntry* aNameEntry);    
-    
-	/** Checks if there are any ChangeDeviceCommands that are not finnished.
-	 *@return ETrue if the are one or more commands being executed or are in the execution queue.
-	 */
-	virtual TBool DeviceChangeInProgress();
-	
-	/** This is used to make callback to iObserver, when a leave has been detected.
-	*It will also clean up the partial operation.
-	*
-	*@param aErr the leave error code
-	*@param aDevice The device and operation that cause the leave.
-	* If this is inserted in the queue, it is deleted from there.
-	* If the leave occurred before inserting it to execution queue 
-	* (not common), then it will not deleted from there.
-	*@return none.
-	*/
-	virtual void HandleLeave(TInt aErr,const TBTDevice* aDevice );
-
-protected:
-    /**
-    * Change device status, add device, e.g. block, unpair,unblock etc.
-    *
-    * This is the operation that is used to to execute the operation queued by ChangeDevice.
-    *
-    * @param aDevice. The device and the type of the change. If the address is empty, then the 
-    * device index means what device is to be used.
-    * @return KerrNone or system wide error code.
-    */
-    virtual TInt DoChangeDeviceL(const TBTDevice& aDevice);    
-    
-    /**
-    * Cancel ongoing connecting, pairing, modifying device in BTRegistry
-    *
-    * This is the operation that is used to cancel ongoing operation.
-    *
-    * @param aDevice. The device and the type of the change that will be canceled. 
-    * If the address is empty, then the 
-    * device index means what device is to be used.
-    * @return None.
-    */   
-    virtual void DoCancelChangeL(const TBTDevice& aDevice);
-
-	/** This function recounts the indexes of iDeviceArray.
-	 *@return none.
-	 */
-	void RenumberDeviceArray();
-
-	/** Constructor 
-	 * @param aObserver The observer will receive information about command completes and
-	 * changes in the devices.
-	 * @param aOrder The order the devices are sorted. Default order is added by CBTDevMan, so
-	 * this class can assume this parameter to be used. This class is responsible for deleting this parameter on
-	 * its destructor.
-	 */
-    CBTDevModelBase(MBTDeviceObserver* aObserver,
-                    TBTDeviceSortOrder* aOrder );
-
-	/** Get the index for a device specified by bluetooth device address.
-	 *
-	 *@param aAddr the address of the searched device or KNullAddres.
-	 *@param aIndexIfNullAddress, if this parameter is defined this function 
-	 *returns this index instead of KErrNotFound, it the device has nullAddress.
-	 *@return index of the address. If the given address is KNullAddress then returns aIndexIfNullAddress or KErrNotFound if one is not specified by called.
-	 *This will allways return KErrNone if the given address is not a KNullAddress  and is not found.	 
-	 */
-    TInt GetIndexByAddress(const TBTDevAddr aAddr,TInt aIndexIfNullAddress=KErrNotFound);
-	    
-    /** Adds the TBTDevice representation of this device to iDeviceArray, if
-     * this device is of that type (paired/blocked) that this model supports.
-     * If the device is not that type, it will not be added.
-     *
-     * NOTE: This function is not guaranteed againt duplicates, so multiple
-     * additions of the same device will lead to multiple copies of it.
-     *
-     * Subclasses can also implement their version of this function to add information
-     * to the device objects, such as connection information.
-     *
-     * @param aRegDevice the device to be added (if not filtered).
-     * @param aNameEntry contains the EIR data of the device if its data is valid
-     * @aOperation the operation that this device will contain when added.
-     */
-    void AddDeviceL(const CBTDevice* aRegDevice, 
-            TNameEntry* aNameEntry,
-            const TBTDeviceOp aOperation=EOpNone);
-        
-    /** Replaces iDeviceArray contents with the given devices 
-     *@param aDeviceArray the devices that will be added to internal structures.
-     */
-    virtual void CreateDevicesL(const CBTDeviceArray* aDeviceArray);
-    
-    /** Adds the given device to internal structures of this class
-     * using AddDeviceL, if the device is such that it should not be listed by this
-     * class, then it is not added.
-     *
-     * Implementing is used to filter out devices that are not handled by particular view.
-     * 
-     * @param aNameEntry contains the EIR data of the device if its data is valid
-     */
-    virtual void HandleNewDeviceL(const CBTDevice* aRegDevice,
-            TNameEntry* aNameEntry) = 0;
-	
-	/** Sends refresh of list of shown devices to listener.
-	 *
-	 * @param aErr If this is not KErrNone, then this function
-	 * will send refresh to the listener. Allways send, if not specified. 
-	 * If this funtion is not KEerrNone, then the funtion does nothing.	
-	 * @param aSelectedItem. If this is specified, then select this item.
-	 * if not specified uses the same item that the listener used to have active.
-	 */
-	virtual void SendRefreshIfNoError(TInt aErr=KErrNone,TInt aSelectedItem = KErrNotSupported );
-	 
-protected:
-
-    /** This callback is used to to notify this call from completed changed from iDevMan.
-    * Inherited from MBTEngDevManObserver.
-    *
-    * This funtion will trap any leave if they may occur and report them as errors in the
-    * corresponfing device change operarion.
-    */
-    void HandleDevManComplete(TInt aErr); 
-        
-    /** Inherited from BTEng's MBTEngDevManObserver, and implemented as empty,    
-    * because we do ask devicelists directly from iDevman, but trough iRegistryObserver->Refresh()
-    */
-    void HandleGetDevicesComplete(TInt aErr, CBTDeviceArray* aDeviceArray); 
-
-    /** This callback is used by iRegistryObserver to notify device changes, that
-     * originate both from changes of the BTRegistry as well as refreshes requested
-     * by this class. 
-     * @aDeviceArray the devices that the registry observer gets.
-     */
-    void RegistryChangedL(const CBTDeviceArray* aDeviceArray);
-
-	/** Check if there is allready one or more devices with this name.
-	 *@return ETrue if there is.
-	 */
-    TBool IsNameExisting(const TDesC& aName);
-    
-    /** Executes the next one in the queue, if any.
-    * Leaves are trapped by this class and send as failed commands to iObserver
-    * using HandleLeave.
-	*@param none.
-	*@return none.
-    */
-	void HandleQueue();    
-		
-protected: // Data
-    MBTDeviceObserver* iObserver;	// the listener of the completed commands and registry changes.
-    CBTEngDevMan* iDevMan;			// This is used to change the devices.
-    TBTDeviceSortOrder* iSortOrder;	// The order the devices are sorted to.    				
-    RDeviceArray iDeviceArray;		// The list of current devices.
-    CBTRegistryObserver* iRegistryObserver;	// This takes care of sending the devicelist to us each time 
-    										// something may have been changes.
-    TBTRegistrySearch iSearchPattern; // the pattern iRegistrySearch uses in retrieving devicelist.
-    								  // NOTE: HandleDeviceL is used to filter the results.
-    TBool iIsChangeAll;    
-    TBTDevice* iDevice;				 // the currently changed device, if any
-    RDeviceArray iQueue;			// The queue of commands to be executed
-    };
-  
-#endif // BT_DEV_MODEL_BASE_H
-
--- a/bluetoothengine/btui/devmodel/inc/btpairedmodel.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,282 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  The model that is used to list and handle all paired devices.
-*
-*/
-
-
-#ifndef BTPAIREDMODEL_H
-#define BTPAIREDMODEL_H
-
-#include "btdevmodelbase.h"
-#include <btengconnman.h>
-#include <bt_sock.h> 				// for TBTDevAddr
-#include <btserversdkcrkeys.h> 		//for TBTPowerStateValue
-#include <btengconstants.h>
-#include <btengsettings.h>
-
-enum TPairedModelState
-	{
-	EIdleState=0,
-	EDeleteDeviceState,
-	EAddDeviceState,
-	EPairDeviceState,
-	EDisconnectBeforeOperationState,	
-	};
-class CBTEngSettings;
-
-/**
-* This is a adds pairing and connecting functionality to BTDevModelBase.
-*
-* It act as a mediator between UI applications and Bluetooth Engine Device Management API.
-*
-*@lib btdevmodel.dll
-*@since S60 V3.2
-*/	
-NONSHARABLE_CLASS(CBTPairedModel) :
-		public CBTDevModelBase, public MBTEngConnObserver, 
-		public MBluetoothPhysicalLinksNotifier,
-		public MBTEngSettingsObserver
-    {
-    
-public: // Constructors and destructor
-
-	/**
-    * C++ default constructor.
-    */
-	CBTPairedModel(MBTDeviceObserver* aObserver, 
-                  TBTDeviceSortOrder* aOrder  );
-                  
-    /** Symbian 2nd phase constuctor that may leave.
-    *@param None.
-    *@return None.
-    */
-    void ConstructL();
-
-	/** 
-	* NewL function 
-	* @param aObserver The observer will receive information about command completes and
-	* changes in the devices.
-	* @param aOrder The order the devices are sorted. Default order is added by CBTDevMan, so
-	* this class can assume this parameter to be used. This class is responsible for deleting this parameter on
-	* its destructor.
-	*/
-    static CBTPairedModel* NewL(MBTDeviceObserver* aObserver,
-                                TBTDeviceSortOrder* aOrder  );
-    
-    /** 
-    * Destructor
-    * @param None.
-    */
-    virtual ~CBTPairedModel();       
-
-	/** 
-	* Checks if any of the devices shown in paired devices view have active bluetooth connection.
-    *
-	* NOTE: TBTUIViewsCommonUtils::IsAnyDeviceConnectedL will also check
-	* those devices that are not paired.
-	*
-	*@return ETrue, if one or more devices are connected. EFalse if no devices are connected.
-	*/
-	TBool virtual IsAnyDeviceConnected();
-	
-	/** 
-	* Start new device pairing. This is handled by Queue, like
-	* all other device changes. 
-	*
-	* This is used by CBTDevice::ChangeDevice(CBTDevice* ,EOpPair)
-	*
-	* @param aPairingDevice the device to be paired.
-	* @return KErrInUse, if another operation has be queued and not finnished. KErrNone otherwise.
-	*/
-	TInt PairDeviceL(const CBTDevice* aPairingDevice,
-	        TNameEntry* aNameEntry);
-	
-protected:
-
-    /**
-	* Change device status, add device, e.g. block, unpair,unblock etc.
-    *
-    * This is the operation that is used to to execute the operation queued by ChangeDevice.
-    *
-    * This class will add connection releted operations to CBTDevModelBase::DoChangeDevice.
-    *
-    * @param aDevice. The device and the type of the change. If the address is empty, then the 
-    * device index means what device is to be used.
-    * @return KerrNone or system wide error code.
-    */
-    TInt DoChangeDeviceL(const TBTDevice& aDevice);
-
-    /**
-    * Cancel ongoing connecting, pairing, modifying device in BTRegistry
-    *
-    * This is the operation that is used to cancel ongoing operation.
-    *
-    * @param aDevice. The device and the type of the change that will be canceled. 
-    * If the address is empty, then the 
-    * device index means what device is to be used.
-    * @return None.
-    */    
-    void DoCancelChangeL(const TBTDevice& aDevice);
-
-    /** 
-    * These two methods set the EStatusPhysicallyConnected attribute to 
-    * the devices that have active connection.
-    */
-    void FlagPhysicallyConnectedDevices(RDeviceArray &aDevices);
-    void FlagPhysicallyConnectedDevices(TBTDevice& aDevice, RBTDevAddrArray& aBTDeviceArray);
-
-	
-private:
-			
-	/** 
-	* Start the actual pairing of iPairingDevice
-	* This is called by DoChangeDevice, if the operation is pairing.
-	*@param none.
-	*@return none.
-	*/
-	void DoPairDeviceL();
-
-	/** 
-	* BTEngConnMan will call this when the connecting is finnished.
-	* This is called as callback not only for connections initiated by this class,
-	* but also for all BT Engines supported porofile connections, including those
-	* initiated by remote devices.
-	* @param aAddr The address of the device whose connection attempt has been finnished.
-	* @param aErr KErrNone if connection is succesfull, Otherwise system wide error code.
-	* @param aConflicts The conflicting devices in case of unsuccesfull connection attempt if any.
-	* @return none.
-	*/    
-    void ConnectComplete(TBTDevAddr& aAddr, TInt aErr, RBTDevAddrArray* aConflicts = NULL);
-
-	/** 
-	* BTEngConnMan will call this when the disconnecting is finnished.
-	* This is called as callback not only for disconnections initiated by this class,
-	* but also for disconnection of BT Engines supported porofile connections, including those
-	* initiated by remote devices.
-	* @param aAddr The address of the device whose connection attempt has been finnished.
-	* @param aErr KErrNone if disconnection is succesfull, Otherwise system wide error code.
-	* @return none.
-	*/    
-	void DisconnectComplete(TBTDevAddr& aAddr, TInt aErr);
-    
-	/**
-	*  from BTEng's MBTEngConnObserver
-	*/
-    void PairingComplete(TBTDevAddr& aAddr, TInt aErr);
-    
-    /** 
-    * The leaving version of PairingComplete. Internally called by PairingComplete
-    */
-    void PairingCompleteL(TBTDevAddr& aAddr, TInt aErr);
-
-    /** 
-    * Creates and allocates TBTDevice representation of this device
-    *
-    * This class will add the connection status information to 
-    * to CBTDevModelBase::CreateDevice.
-    *
-    * @param aRegDevice the device to be converted
-    * @return the TBTDevice representation of the same device. (Note the caller is responsible for deleting
-    * the returned item.)
-    */    
-    TBTDevice* CreateDeviceL(const CBTDevice* aRegDevice, TNameEntry* aNameEntry);
-    
-    /** 
-    * Adds the given device to internal structures of this class
-    * using AddDeviceL, if it is paired and not blocked.
-    *
-    * @param aRegDevice
-    */    
-    void HandleNewDeviceL(const CBTDevice* aRegDevice,
-            TNameEntry* aNameEntry);
-
-    /** 
-    * This callback is used to to notify this call from completed changed from iDevMan.
-    * Inherited from MBTEngDevManObserver.    
-    *
-    * This funtion will trap any leave if they may occur and report them as errors in the
-    * corresponfing device change operarion.
-    *
-    * @param aErr KErrNone or system wide error code.
-    */
-    void HandleDevManComplete(TInt aErr);
-    
-public: 
-    
-    /**
-     * From MBTEngSettingsObserver - Called when powerstate is changed
-     * @param TBTPowerStateValue power state
-     * @return None
-     */       
-	void PowerStateChanged( TBTPowerStateValue aState );
-		
-    /**
-     * From MBTEngSettingsObserver - Called when visibility is changed
-     * @param TBTPowerStateValue state of visibility mode
-     * @return None
-     */    		
-	void VisibilityModeChanged( TBTVisibilityMode aState );  
-    
-    
-public:    //from MBluetoothPhysicalLinksNotifier
-
-	/** 
-	* Inherited from MBluetoothPhysicalLinksNotifier and implemented empty
-	*/
-	void HandleCreateConnectionCompleteL(TInt ) {};
-	
-	/** 
-	* Disconnect from non BTEng device by iLinks is complete.
-	*@param aErr KErrNone or system wide errorcode.
-	*/	
-	void HandleDisconnectCompleteL(TInt aErr) ;
-	
-	/** Inherited from MBluetoothPhysicalLinksNotifier and not used.
-	*/
-	void HandleDisconnectAllCompleteL(TInt aErr) {HandleDisconnectCompleteL(aErr); }
-
-    /**
-    * Get device based on addr or index.
-    * @param aDevice the TBTDevice holder. The device address is passed in
-    * @return KErrNone if ok.
-    * KErrArgument, if neither index not address is filled.
-    * KErrOverFlow if index is out of range. 
-    * KErrNotFound if the given address does not exists, in the internal array.
-    */
-    TInt virtual GetDevice(TBTDevice& aDevice);
-
-	/** 
-	* This is used to make callback to iObserver, when a leave has been detected.
-	*
-	*@param aErr the leave error code
-	*@param aDevice The device and operation that cause the leave.
-	*/
-	virtual void HandleLeave(TInt aErr,const TBTDevice* aDevice );               
-	
-private:
-
-    CBTEngConnMan* iConnMan;
-    CBTDevice* iPairingDevice;	
-
-    TBTDevice* iDisconnectDevice;
-    TPairedModelState iState;	// The device is deleted and written back to bt registry before pairing
-    							// this is used to control those operations
-	//used for disconnecting connections not managed by BTEngine    							
-	CBluetoothPhysicalLinks *iLinks;   							
-	RSocketServ iSocketServ;
-	CBTEngSettings *iBtEngSettings; // used for turning on BT, if not enabled
-    };
-    
-#endif
--- a/bluetoothengine/btui/devmodel/inc/btregistryobserver.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,139 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Registry observer is listening to registry changes and
-* 				  and reporting the changed devices to the listener.
-*
-*/
-
-#ifndef BTREGISTRYOBSERVER_H
-#define BTREGISTRYOBSERVER_H
-
-#include <e32base.h>
-#include <e32property.h>
-#include <btmanclient.h>
-#include <btengdevman.h> 
-
-/** This class will inform the listener about the new BTregistry status
-*after registry change events. 
-*
-* This class will listen to events about registry changes and inform
-* the listener about the latest registry status. The listener can
-* also ask the status using refresh. This is usefull for for
-* for example retrieval of initial lists of devices. 
-*
-*@lib btdevmodel.dll
-*@since S60 V3.2
-*/
-NONSHARABLE_CLASS(MBTRegistryObserver)
-    {
-public:
-	/** The aDeviceArray constents are deleted after this
-	* call returns. If storage is wanted the array and its contents
-	* must be copied by implementor.
-	*/
-    virtual void RegistryChangedL(const CBTDeviceArray* aDeviceArray) = 0;
-    };
-    
-NONSHARABLE_CLASS(CBTRegistryObserver) : public CActive, public MBTEngDevManObserver
-    {
-public: 
-	/** NewL
-	 *@param aObserver The class that is listening to registry changes
-	 *@param aPattern The pattern to be used to retrieve the changed objects.
-	 */
-    static CBTRegistryObserver* NewL(MBTRegistryObserver* aObserver, 
-        const TBTRegistrySearch aPattern);
-    
-    /** Destructor*/
-    virtual ~CBTRegistryObserver();       
-
-	/** Start listening to registry changes. 
-	 *
-	 *Calling this while registry observer is running is silently ignored.
-	 */
-    void StartIfNotRunning();
-
-    /* Registry observer will retrieve list of devices in the backround 
-     * and send it to the listener, when one is retrieved.
-     */
-    void Refresh();
-    
-    /** Check if this is running.       
-     *@return ETrue if not listening to registry changes.
-     */
-    inline TBool IsStopped() {return iIsStopped;}
-
-    /** This will stop listening and cancel any retrieval of devicelists,
-    * if any.
-    * @param none.
-    * @return none.
-    */
-    void Cancel();    
-private:
-	/* Constructor that may not leave.
-	 *@param aObserver The class that is listening to registry changes
-	 *@param aPattern The pattern to be used to retrieve the changed objects.
-	 */
-    CBTRegistryObserver(MBTRegistryObserver* aObserver, const TBTRegistrySearch aPattern);
-	/** 2nd phase constructor. Called by NewL only.
-    * @param none.
-    * @return none.	
-	 */
-    void ConstructL();
-
-	/** This is called when registry changes occur, but not when deviceLists are
-	* retrieved, since HandleGetDevicesComplete is called then. 
-	*
-	* If one or more registry events occur during devicelist retrieval, there
-	* will be one new devicelist retrieval after the current retrieval is done.
-	*
-    * @param none.
-    * @return none.
-	*/
-    void RunL();
-    
-    /** This will clear iRegDeviceArray and delete its contents.
-    * @param none.
-    * @return none.     
-    */
-    void DeleteAllocatedDevices();
-    
-    
-    /** This will cancel listening. To be called by Cancel only.
-     * @param none.
-     * @return none.
-	 */
-    void DoCancel();    
-    
-	/** This is called when devicelist have been read from BtDevMan 
-	* @param aErr KErrNone or the accurred error.
-	* @param aDeviceArray the devices that have been retrieved.
-    * @return none.
-    */
-    void HandleGetDevicesComplete(TInt aErr, CBTDeviceArray* aDeviceArray);
-    
-private:
-    MBTRegistryObserver* iObserver; // the class listening to this class
-    CBTDeviceArray* iRegDeviceArray;  // this is used for retrieving devices
-    TBTRegistrySearch iSearchPattern; // the search used to retrieve devices
-    								 // NOTE: this class does not filter the results,
-    								 // but the one listening to this (if filtering is done).
-    RProperty iProperty;
-    CBTEngDevMan* iDevMan;			// the object that is used to retrieve the device lists.
-    TBool iIsStopped;				// is this runining.
-    TBool iAnotherEventPending;		// Has there been one or more changes during this retrieval.
-    								// if this is true then HandleGetDevices will start a new search.
-    };
-    
-#endif 
--- a/bluetoothengine/btui/devmodel/src/btblockedmodel.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Maintain a Bluetooth devices data model for Blocked devices view.
-*
-*/
-
-
-// INCLUDE FILES
-#include "btblockedmodel.h"
-#include "debug.h"
-
-// ---------------------------------------------------------------------
-// constructor
-// ----------------------------------------------------------------------        
-CBTBlockedModel::CBTBlockedModel(MBTDeviceObserver* aObserver,TBTDeviceSortOrder* aOrder )
-    : CBTDevModelBase(aObserver, aOrder)
-    {
-    TRACE_FUNC
-    }
-// ---------------------------------------------------------------------
-// CBTBlockedModel::NewL
-// ----------------------------------------------------------------------        
-CBTBlockedModel* CBTBlockedModel::NewL(MBTDeviceObserver* aObserver, TBTDeviceSortOrder* aOrder )
-    {
-    CBTBlockedModel* self = new (ELeave) CBTBlockedModel(aObserver, aOrder);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    return self;    
-    }
-// ---------------------------------------------------------------------
-// destructor
-// ----------------------------------------------------------------------        
-CBTBlockedModel::~CBTBlockedModel() 
-    {    
-    TRACE_FUNC
-    }
-// ---------------------------------------------------------------------
-// CBTBlockedModel::ConstructL
-// ----------------------------------------------------------------------        
-void CBTBlockedModel::ConstructL()
-    {
-    TRACE_FUNC_ENTRY
-    // get all devices from btregistry to iDeviceArray - a TBTDevice array 
-    iDevMan = CBTEngDevMan::NewL(this);
-    iSearchPattern.FindAll();
-   	iRegistryObserver = CBTRegistryObserver::NewL(this, iSearchPattern);
-	iRegistryObserver->Refresh();
-    TRACE_FUNC_EXIT
-    }
-// ---------------------------------------------------------------------
-// CBTBlockedModel::HandleNewDeviceL
-// from CBTDevModel
-// ----------------------------------------------------------------------    
-void CBTBlockedModel::HandleNewDeviceL(const CBTDevice* aRegDevice,
-        TNameEntry* aNameEntry)
-    {
-    TRACE_FUNC_ENTRY
-    TBTDeviceSecurity security = aRegDevice->GlobalSecurity();
-    if (security.Banned())
-        {
-        AddDeviceL(aRegDevice, aNameEntry, EOpBlock);
-        }
-    TRACE_FUNC_EXIT        
-    }
-
--- a/bluetoothengine/btui/devmodel/src/btdevice.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This is used by BTUI to contain the information on a displaid device.
-*
-*/
-
-#include "btdevmodel.h"
-// ---------------------------------------------------------------------
-// Default Constructor
-// ---------------------------------------------------------------------
-EXPORT_C TBTDevice::TBTDevice()
-    {
-    iType = EDeviceDefault;
-    iName = KNullDesC;
-    iFriendlyName = KNullDesC;
-    iStatus = 0;
-    iOperation = EOpNone;
-    iAddr = KNullAddress;
-    iIndex = KErrNotFound;    
-    iDeviceClass=TBTDeviceClass(0);
-    iLinkKeyType = ELinkKeyCombination;
-    iNameEntry() = TNameRecord();
-    }
-// ---------------------------------------------------------------------
-// Copy Constructor
-// ---------------------------------------------------------------------    
-EXPORT_C TBTDevice::TBTDevice(const TBTDevice& aDevice) 
-    {
-    iType = aDevice.iType;
-    iName = aDevice.iName;
-    iFriendlyName = aDevice.iFriendlyName;
-    iStatus = aDevice.iStatus;
-    iOperation = aDevice.iOperation;
-    iAddr = aDevice.iAddr;
-    iIndex = aDevice.iIndex;
-    iDeviceClass= aDevice.iDeviceClass;
-    iLinkKeyType = aDevice.iLinkKeyType;
-    iNameEntry() = TNameRecord();
-    }
-// ---------------------------------------------------------------------
-// operator=
-// ---------------------------------------------------------------------    
-EXPORT_C TBTDevice& TBTDevice::operator=(const TBTDevice& aDevice)
-    {
-    iType = aDevice.iType;
-    iName = aDevice.iName;
-    iFriendlyName = aDevice.iFriendlyName;
-    iStatus = aDevice.iStatus;
-    iOperation = aDevice.iOperation;
-    iAddr = aDevice.iAddr;
-    iIndex = aDevice.iIndex;
-    iDeviceClass= aDevice.iDeviceClass;    
-    iLinkKeyType = aDevice.iLinkKeyType;
-    iNameEntry = aDevice.iNameEntry;
-	return *this;
-    } 
-// End of File
--- a/bluetoothengine/btui/devmodel/src/btdevmodel.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,230 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Maintain a Bluetooth devices data model for UI components.
-*
-*/
-
-// INCLUDE FILES
-#include <e32cmn.h>
-#include "btdevmodel.h"
-#include "btpairedmodel.h"
-#include "btblockedmodel.h"
-#include "debug.h"
-
-// --------------------------------------------------------------------------------------------
-// CBTDevModel::CBTDevModel
-// --------------------------------------------------------------------------------------------                            
-CBTDevModel::CBTDevModel()
-    {
-    }
-// --------------------------------------------------------------------------------------------
-// CBTDevModel::NewL
-// --------------------------------------------------------------------------------------------                            
-EXPORT_C CBTDevModel* CBTDevModel::NewL(const TBTDeviceGroup aGroup,
-                                        MBTDeviceObserver* aObserver,
-                                        TBTDeviceSortOrder* aOrder 
-                                         )
-    {
-    CBTDevModel* self = new (ELeave) CBTDevModel();
-    CleanupStack::PushL(self);
-    
-    TBTDeviceSortOrder *order=NULL;    
-    if(aOrder == NULL)
-    	{
-    	order=new(ELeave) TBTDeviceSortOrder(TBTDeviceComparison::CompareAphabetically);    	
-    	// Order ownership goes to btdevmodel - don't push it to stack
-    	self->ConstructL(aGroup, aObserver, order);
-    	}    	
-    else
-		{
-    	order=aOrder;		
-		self->ConstructL(aGroup, aObserver, order);    	
-		}        
-    CleanupStack::Pop(self);
-    return self;
-    }    
-// --------------------------------------------------------------------------------------------
-// CBTDevModel::~CBTDevModel
-//
-// Destructor
-// --------------------------------------------------------------------------------------------
-
-CBTDevModel::~CBTDevModel()
-    {
-	TRACE_FUNC_ENTRY
-    delete iDevModel;
-    }
-// --------------------------------------------------------------------------------------------
-// CBTDevModel::ConstructL
-//
-// Constructs CBTPairedModel or CBTBlockedModel, depending on aGroup
-// --------------------------------------------------------------------------------------------                                
-void CBTDevModel::ConstructL(const TBTDeviceGroup aGroup,
-                             MBTDeviceObserver* aObserver,
-                             TBTDeviceSortOrder* aOrder  )
-    { 
-	TRACE_FUNC_ENTRY    
-    iGroup=aGroup;
-    switch (aGroup)
-        {
-        case EGroupPaired:
-            iDevModel = CBTPairedModel::NewL(aObserver, aOrder);
-            break;
-        
-        case EGroupBlocked:
-            iDevModel = CBTBlockedModel::NewL(aObserver, aOrder);
-            break;
-        default:
-            break;
-        }
-	TRACE_FUNC_EXIT
-    }
-
-EXPORT_C TBool CBTDevModel::IsAnyDeviceConnected()
-	{
-	return iDevModel->IsAnyDeviceConnected();
-	}
-// --------------------------------------------------------------------------------------------
-// CBTDevModel::GetDevice
-// wrapper function
-// --------------------------------------------------------------------------------------------                                
-EXPORT_C TInt CBTDevModel::GetDevice(TBTDevice& aDevice)
-    {
-    return iDevModel->GetDevice(aDevice);
-    }
-// --------------------------------------------------------------------------------------------
-// CBTDevModel::CreateDevice 
-// wrapper function
-// --------------------------------------------------------------------------------------------                                
-EXPORT_C TBTDevice* CBTDevModel::CreateDeviceL(const CBTDevice* aRegDevice, 
-        TNameEntry* aNameEntry)
-	{
-		return iDevModel->CreateDeviceL(aRegDevice, aNameEntry);
-	}
-
-// --------------------------------------------------------------------------------------------
-// CBTDevModel::GetDeviceType
-// wrapper function
-// --------------------------------------------------------------------------------------------                                    
-EXPORT_C void CBTDevModel::ChangeAllDevices(const TBTDeviceOp aOperation)
-    {
-    iDevModel->ChangeAllDevices(aOperation);
-    }
-// --------------------------------------------------------------------------------------------
-// CBTDevModel::ChangeDevice
-// wrapper function
-// --------------------------------------------------------------------------------------------    
-EXPORT_C void CBTDevModel::ChangeDevice(const TBTDevice& aDevice)
-    {
-    iDevModel->ChangeDevice(aDevice);    
-    }
-// --------------------------------------------------------------------------------------------
-// CBTDevModel::ChangeDevice
-// --------------------------------------------------------------------------------------------       
-EXPORT_C void CBTDevModel::ChangeDevice(const CBTDevice* aDevice,
-        TNameEntry* aNameEntry, TBTDeviceOp aOp)
-    {
-    	TRACE_FUNC_ENTRY
-		TBTDevice *tmp=NULL;      	
-    	TInt err = KErrNone;
-		if(aOp == EOpPair)
-    		{
-    		if(iGroup !=EGroupPaired )
-    			{
-    			err = KErrNotSupported;
-    			}
-    		else
-    			{
-    			TInt err2 = KErrNone;
-    			TRAP(err, err2 = static_cast<CBTPairedModel*>(iDevModel)->PairDeviceL( aDevice, aNameEntry));
-    			err = (err2 != KErrNone) ? err2 : err;
-    			}
-    		}
-		else 
-			{
-			TRAP(err, tmp=iDevModel->CreateDeviceL(aDevice, aNameEntry ));
-			if(err == KErrNone)
-				{
-				tmp->iOperation=aOp;
-				iDevModel->ChangeDevice(*tmp );
-				}
-			}
-		if(err != KErrNone)
-		    {
-		    iDevModel->HandleLeave(err,tmp);
-		    }
-    	TRACE_FUNC_EXIT
-    }        
-// --------------------------------------------------------------------------------------------
-// CBTDevModel::CancelChange
-// wrapper function
-// --------------------------------------------------------------------------------------------        
-EXPORT_C void CBTDevModel::CancelChange(const TBTDevice& aDevice)
-    {
-    iDevModel->CancelChange(aDevice);
-    }
-
-// --------------------------------------------------------------------------------------------
-// CBTDevModel::DeviceChangeInProgress
-// wrapper function
-// --------------------------------------------------------------------------------------------        
-EXPORT_C TBool CBTDevModel::DeviceChangeInProgress()
-	{
-	return iDevModel->DeviceChangeInProgress();
-	}
-// --------------------------------------------------------------------------------------------
-// TBTDeviceComparison::CompareAphabetically
-// --------------------------------------------------------------------------------------------
-EXPORT_C TInt TBTDeviceComparison::CompareAphabetically(
-	  const TBTDevice& aFirstDevice, const TBTDevice& aSecondDevice) 
-	{  	
-	// This funtion is used when sorting devicelists, so the tracing has been omnitted
-	// in order decreas the amount of trash in the logs.
-	TInt rvalue= aFirstDevice.iName.CompareC(aSecondDevice.iName);
-	if(rvalue !=0)
-		{
-		return rvalue;
-		}		
-	if( aFirstDevice.iAddr <= aSecondDevice.iAddr )
-		{
-		return  -1;
-		}			
-	else
-		{
-		return 1;			
-		}		
-	}
-
-// --------------------------------------------------------------------------------------------
-// TBTDeviceComparison::ReverseCompareAphabetically
-// --------------------------------------------------------------------------------------------	
-EXPORT_C TInt TBTDeviceComparison::ReverseCompareAphabetically(
-        const TBTDevice& aFirstDevice, const TBTDevice& aSecondDevice) 
-	{  	
-	// This funtion is used when sorting devicelists, so the tracing has been omnitted
-	// in order decreas the amount of trash in the logs.
-	TInt rvalue= aSecondDevice.iName.CompareC(aFirstDevice.iName);
-	if(rvalue !=0)
-		{
-		return rvalue;
-		}		
-	if(aFirstDevice.iAddr <= aSecondDevice.iAddr )
-		{
-		return 1;
-		}			
-	else
-		{
-		return -1;			
-		}		
-	}    
--- a/bluetoothengine/btui/devmodel/src/btdevmodelbase.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,807 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Maintain a Bluetooth devices data model for UI components.
-*
-*/
-
-#include "btdevice.h"
-#include "btdevmodelbase.h"
-#include <btengutil.h>
-#include "debug.h"
-#include "btui.h"
-#include "btregistryobserver.h"
-
-// --------------------------------------------------------------------------------------------
-// 1st phaze constructor
-// --------------------------------------------------------------------------------------------
-CBTDevModelBase::CBTDevModelBase(MBTDeviceObserver* aObserver, TBTDeviceSortOrder* aOrder)
-    : iObserver(aObserver)
-    {
-	TRACE_FUNC_ENTRY
-	iSortOrder=aOrder;
-    TRACE_FUNC_EXIT    
-	
-    }
-
-// --------------------------------------------------------------------------------------------
-// Destructor
-// --------------------------------------------------------------------------------------------
-CBTDevModelBase::~CBTDevModelBase()
-    {
-    TRACE_FUNC_ENTRY
-    delete iRegistryObserver;
-
-    for(TInt i=0;i<iDeviceArray.Count();i++)
-    	delete iDeviceArray[i];    
-	iDeviceArray.Close();
-	delete iDevice;
-	iDevice=NULL;
-
-    for(TInt i=0;i<iQueue.Count();i++)
-    	delete iQueue[i];    
-	iQueue.Close();
-	
-	if(iDevMan)
-		iDevMan->Cancel();
-    delete iDevMan;
-    
-    delete iSortOrder;
-    TRACE_FUNC_EXIT        
-    }
-// --------------------------------------------------------------------------------------------
-// CBTDevModelBase::IsAnyDeviceConnected
-// Allways false, since base class does not support connection
-// --------------------------------------------------------------------------------------------    
-
-TBool CBTDevModelBase::IsAnyDeviceConnected()
-    {
-    TRACE_FUNC_ENTRY
-    return EFalse;
-   
-    }
-    
-// --------------------------------------------------------------------------------------------
-// CBTDevModelBase::GetDevice
-// --------------------------------------------------------------------------------------------    
-TInt CBTDevModelBase::GetDevice(TBTDevice& aDevice)	
-    {
-    TRACE_FUNC_ENTRY
-	TBTDeviceOp op=aDevice.iOperation;
-
-    TInt index = GetIndexByAddress(aDevice.iAddr,aDevice.iIndex); 
-
-    if (index < 0 )
-        {
-        if(aDevice.iAddr == KNullAddress )
-        	{
-        	return KErrArgument;
-        	} 
-        else
-       		{
-			return KErrNotFound ;
-       		} 
-        }
-    if(index >= iDeviceArray.Count())
-    	return KErrOverflow;
-            
-    aDevice=*iDeviceArray[index];
-    aDevice.iOperation=op;
-    TRACE_FUNC_EXIT        
-    return KErrNone;
-    }
-// --------------------------------------------------------------------------------------------
-// CBTDevModelBase::ChangeAllDevices
-// --------------------------------------------------------------------------------------------        
-void CBTDevModelBase::ChangeAllDevices(const TBTDeviceOp aOperation)
-    {
-    TRACE_FUNC_ENTRY
-    TInt count = iDeviceArray.Count();  
-    
-    for (TInt i = 0; i < count; i++)
-        {        
-        //TBTDevice device;
-        //device=iDeviceArray[i];
-        //device.iIndex = i;
-        //device.iOperation = aOperation;
-        //ChangeDevice(device);
-        iDeviceArray[i]->iIndex = i;
-        iDeviceArray[i]->iOperation = aOperation;
-        ChangeDevice(*iDeviceArray[i]);        
-        }        
-    TRACE_FUNC_EXIT    
-    }
-
-// --------------------------------------------------------------------------------------------
-// CBTDevModelBase::GetIndexByAddress
-//
-// returns the index of the address, if one is not null address.
-// if it is give aNullAdressIndex
-// --------------------------------------------------------------------------------------------
-TInt CBTDevModelBase::GetIndexByAddress(TBTDevAddr aAddr,TInt aNullAdressIndex)
-	{
-    TRACE_FUNC_ENTRY	
-	
-    if(aAddr == KNullAddress )
-    	{
-		TRACE_FUNC_EXIT        			    	
-    	return aNullAdressIndex;
-    	}
-    	else
-    	{
-	    TInt count = iDeviceArray.Count();
-	    TInt i;
-	    for (i = 0; i < count; i++)
-	        {
-	        if (iDeviceArray[i]->iAddr == aAddr) break;
-	        }
-		if(i == count)
-			{
-			TRACE_FUNC_EXIT        		
-			return KErrNotFound ;	
-			}
-	    
-		else
-			{
-			TRACE_FUNC_EXIT        		
-			return i;		
-			}	    		
-    	}	    		    
-	}
-// --------------------------------------------------------------------------------------------
-// CBTDevModelBase::DoChangeDevice
-// --------------------------------------------------------------------------------------------            
-TInt CBTDevModelBase::DoChangeDeviceL(const TBTDevice& aDevice)
-    {
-    TRACE_FUNC_ENTRY
-    //check that the command in progress has been started       
-   	__ASSERT_DEBUG(iDevice==NULL,PANIC(EBTPanicDevManQueueIsCorrupt));
-
-    TInt index = GetIndexByAddress(aDevice.iAddr, aDevice.iIndex ); 
-        
-    if (index == KErrNotFound)
-        {
-        TRACE_INFO(_L("index not found"));
-	    TRACE_FUNC_EXIT    
-        if (aDevice.iAddr == KNullAddress) 
-        	{
-    		return KErrArgument;
-        	}
-        else
-    		{
-    		return KErrNotFound ;
-    		} 
-        }
-    if(index >= iDeviceArray.Count())
-    	{
-        TRACE_INFO((_L("index is %d, max expected is %d"), index, iDeviceArray.Count()));
-   		TRACE_FUNC_EXIT	   
-    	return KErrOverflow;
-    	}
-
-    
-    TBTDevice* device = iDeviceArray[index];
-    // store pointer to the indexed TBTDevice
-
-	// untrust trusted device to be deleted, and delete it only after that
-    if( (device->iStatus & EStatusTrusted ) 
-    	&& aDevice.iOperation== EOpUnpair )
-        	{
-        	device=new (ELeave) TBTDevice(*iDeviceArray[index]);
-        	device->iOperation=EOPInternalUntust;
-        	iQueue.Insert(device,0);
-        	TInt rvalue=DoChangeDeviceL(*device);
-        	TRACE_FUNC_EXIT	   
-        	return rvalue;
-        	}
-    
- 
-    iDevice = new (ELeave) TBTDevice(*device);
-    iDevice->iOperation = aDevice.iOperation;
-
-    CBTDevice* regDevice = CBTDevice::NewL(iDevice->iAddr);
-
-    regDevice->SetPaired( aDevice.iLinkKeyType );
-    
-    TBTDeviceSecurity security;
-    
-    if(aDevice.iOperation != EOpChangeName)
-        {
-        regDevice->SetDeviceNameL( BTDeviceNameConverter::ToUTF8L( iDevice->iName ) );
-        
-        // BTEngDevMan will delete friendly name when modify device if friendly name is not set
-        // So if friendly name has been set before, it need to be set again before modify it for
-        // any other purpuse e.g change security
-        regDevice->SetFriendlyNameL(iDevice->iFriendlyName);
-        }  
-        
-    switch (aDevice.iOperation)
-        {
-        case EOpUntrust:
-        case EOPInternalUntust:        
-        	security.SetNoAuthenticate(EFalse);
-            security.SetNoAuthorise(EFalse);	
-        	regDevice->SetGlobalSecurity(security);	        	
-        	UnsetStatusFlags(iDeviceArray[index]->iStatus,EStatusTrusted );  	        
-			break;
-				        	
-        case EOpTrust:	        
-            security.SetNoAuthenticate(EFalse); 
-            security.SetNoAuthorise(ETrue);	            
-            security.SetBanned(EFalse);
-        	regDevice->SetGlobalSecurity(security);	        	
-            
-            SetStatusFlags(iDeviceArray[index]->iStatus,EStatusTrusted );
-            break;  
-
-        case EOpUnblock:
-         	// unblock may be done to a number of devices.
-        	// So we want it to happen as quicky as possible
-        	iRegistryObserver->Cancel();
-          	UnsetStatusFlags( iDevice->iStatus,EStatusBlocked );
-          	security.SetBanned(EFalse );
-            regDevice->DeleteLinkKey();
-
-            regDevice->SetGlobalSecurity(security);                   	
-        	break;
-        	
-        case EOpBlock:	            
-            security.SetBanned(ETrue );
-            security.SetNoAuthenticate(EFalse );
-            security.SetNoAuthorise(EFalse);
-            regDevice->SetGlobalSecurity(security);
-            regDevice->DeleteLinkKey();
-
-			UnsetStatusFlags( iDevice->iStatus,EStatusTrusted );
-        	SetStatusFlags( iDevice->iStatus,EStatusBlocked );
-			break;
-
-        case EOpUnpair:
-        	// unpair may be done to a number of devices.
-        	// So we want it to happen as quicky as possible
-        	iRegistryObserver->Cancel();				
-            regDevice->DeleteLinkKey();
-
-            UnsetStatusFlags(iDevice->iStatus,EStatusPaired);
-            security.SetNoAuthenticate(EFalse );
-            security.SetNoAuthorise(EFalse );         
-            regDevice->SetGlobalSecurity(security);               
-            break;
-
-        case EOpChangeName:
-            if (IsNameExisting(aDevice.iName)) 
-            	{
-            	delete regDevice;
-            	regDevice=NULL;
-            	return KErrAlreadyExists;
-            	}
-                
-            regDevice->SetFriendlyNameL(aDevice.iName);
-            iDevice->iName = aDevice.iName;
-            
-            // set iFriendlyName to remember that friendly name has been set
-            iDevice->iFriendlyName = aDevice.iName;
-            break;
-
-        default:
-            delete regDevice;
-            delete iDevice;
-            iDevice=NULL;
-			TRACE_FUNC_EXIT            
-            return KErrNotSupported;
-        }
-    iDevMan->ModifyDevice(*regDevice);
-    delete regDevice;
-
-   	TRACE_FUNC_EXIT    
-    return KErrNone;
-    }
-// --------------------------------------------------------------------------------------------
-// CBTDevModelBase::DoChangeDevice
-// --------------------------------------------------------------------------------------------                
-void CBTDevModelBase::DoCancelChangeL(const TBTDevice& /*aDevice*/)
-    {
-    TRACE_FUNC_ENTRY
-    iDevMan->Cancel();    
-	TRACE_FUNC_EXIT    
-    }
-
-// --------------------------------------------------------------------------------------------
-// CBTDevModelBase::CreateDevice
-// --------------------------------------------------------------------------------------------                    
-TBTDevice* CBTDevModelBase::CreateDeviceL(const CBTDevice* aRegDevice,
-        TNameEntry* aNameEntry)
-    {
-    TRACE_FUNC_ENTRY
-    TRACE_BDADDR(aRegDevice->BDAddr());
-    TRACE_INFO((_L("CoD %b"), aRegDevice->DeviceClass().DeviceClass()));
-    TBTDevice* device = new (ELeave) TBTDevice();
-    if ( aNameEntry )
-        {
-        device->iNameEntry = *aNameEntry;
-        }
-    switch( aRegDevice->DeviceClass().MajorDeviceClass() )
-        {
-        case EMajorDeviceComputer:
-			device->iType=EDeviceComputer;
-            break;
-        case EMajorDevicePhone:
-        	device->iType=EDevicePhone;
-            break;
-        case EMajorDeviceAudioDevice:
-        	if ( aRegDevice->DeviceClass().MinorDeviceClass() == EMinorDeviceAVCarAudio ||
-        	     aRegDevice->DeviceClass().MinorDeviceClass() == EMinorDeviceAVHandsfree)
-        		{
-        		device->iType=EDeviceCarkit;
-        		}
-        	else
-        		{
-        		device->iType=EDeviceAudio;
-        		}
-            break;
-		
-        case EMajorDevicePeripheral:
-        	if ( aRegDevice->DeviceClass().MinorDeviceClass() == EMinorDevicePeripheralKeyboard )
-        		{
-				device->iType=EDeviceKeyboard;
-        		}
-        	else 
-        		{
-        		
-        		if ( aRegDevice->DeviceClass().MinorDeviceClass() == EMinorDevicePeripheralPointer )
-        			{
-					device->iType=EDeviceMice;
-        			}	
-        		else
-        			{
-        			device->iType=EDeviceDefault;
-        			}
-        		}
-        	break;
-        	
-        case EMajorDeviceImaging:
-        	if ( aRegDevice->DeviceClass().MinorDeviceClass() == EMinorDeviceImagingPrinter )
-        		{
-				device->iType=EDevicePrinter;
-        		}
-        	else
-        		{
-        		device->iType=EDeviceDefault;
-        		}
-        	break;
-        
-        default:
-        	device->iType=EDeviceDefault;
-          	break;
-        }
-    device->iAddr = aRegDevice->BDAddr();
-    
-    TBTDeviceSecurity security = aRegDevice->GlobalSecurity();
-    
-    if(security.Banned() )
-    	{
-    	SetStatusFlags(device->iStatus,EStatusBlocked);
-    	}
-    if( IsUserAwarePaired( aRegDevice->AsNamelessDevice() ) )
-    	{
-    	SetStatusFlags(device->iStatus,EStatusPaired);
-    	device->iLinkKeyType = aRegDevice->LinkKeyType();  	
-    	}
-    if( security.NoAuthorise())
-    	SetStatusFlags(device->iStatus,EStatusTrusted);
-	if(aRegDevice->FriendlyName().Length() >0)
-		{
-    	device->iName = aRegDevice->FriendlyName();
-    	
-    	// set iFriendlyName to remember that friendly name has been set before in registry 
-    	device->iFriendlyName = aRegDevice->FriendlyName();
-		}
-	else
-		{
-		CleanupStack::PushL(device);
-		device->iName = BTDeviceNameConverter::ToUnicodeL(aRegDevice->DeviceName());
-		CleanupStack::Pop(device);
-		}
-        
-
-	device->iDeviceClass=aRegDevice->DeviceClass();
-    TRACE_FUNC_EXIT    	
-    return device;
-    }
-// --------------------------------------------------------------------------------------------
-// CBTDevModelBase::AddDeviceL
-// --------------------------------------------------------------------------------------------                    
-void CBTDevModelBase::AddDeviceL(const CBTDevice* aRegDevice, 
-        TNameEntry* aNameEntry, const TBTDeviceOp aOperation)
-    {
-    TRACE_FUNC_ENTRY
-    TBTDevice* device = CreateDeviceL(aRegDevice, aNameEntry);
-    device->iOperation = aOperation;
-    // insert it to the RDeviceArray by order
-	  iDeviceArray.InsertInOrderL(device,*iSortOrder);
-    TRACE_FUNC_EXIT        
-    }
-// --------------------------------------------------------------------------------------------
-// CBTDevModelBase::CreateDevices
-// --------------------------------------------------------------------------------------------                        
-void CBTDevModelBase::CreateDevicesL(const CBTDeviceArray* aDeviceArray)
-    {
-    TRACE_FUNC_ENTRY
-    // clear the old contents of the array
-    for(TInt i=0;i<iDeviceArray.Count();i++)
-    	delete iDeviceArray[i];
-    iDeviceArray.Reset();
-    
-    TInt count = aDeviceArray->Count();
-    for (TInt i = 0; i < count; i++)
-        {
-        // form a TBTDevice for a CBTDevice
-        CBTDevice* regDevice = aDeviceArray->At(i);
-		HandleNewDeviceL(regDevice, NULL);
-		RenumberDeviceArray();
-        }
-    TRACE_FUNC_EXIT    
-    }
-// --------------------------------------------------------------------------------------------
-// CBTDevModelBase::IsNameExisting
-// --------------------------------------------------------------------------------------------                        
-TBool CBTDevModelBase::IsNameExisting(const TDesC& aName)
-    {
-    TRACE_FUNC_ENTRY
-    for (TInt i = 0; i < iDeviceArray.Count(); i++)
-        {
-        if (iDeviceArray[i]->iName.Compare(aName) == 0)
-        	{
-        	return ETrue;
-        	}
-        }
-    TRACE_FUNC_EXIT    
-    return EFalse;
-    }
-// --------------------------------------------------------------------------------------------
-// CBTDevModelBase::RegistryChangedL
-// --------------------------------------------------------------------------------------------                            
-void CBTDevModelBase::RegistryChangedL(const CBTDeviceArray* aDeviceArray)
-    {
-    TRACE_FUNC_ENTRY
-
-	// Store the device seleted before refresh
-    TInt bSelectedDeviceIndex = KErrNotFound;
-    if (iObserver)
-	{
-    	bSelectedDeviceIndex=iObserver->CurrentItemIndex();
-	}
-	
-    // the selected device before the update
-    TBTDevice currentDevice;
-        
-    if (bSelectedDeviceIndex != KErrNotFound && bSelectedDeviceIndex < iDeviceArray.Count() )
-    	{    	
-    	currentDevice=*iDeviceArray[bSelectedDeviceIndex];    	
-    	}    
-    
-	CreateDevicesL(aDeviceArray);
-
-	TInt newIndex=GetIndexByAddress(currentDevice.iAddr,KErrNotFound);
-	if (newIndex==KErrNotFound)
-	{
-		newIndex= bSelectedDeviceIndex;
-	}
-
-	newIndex=Min(newIndex,iDeviceArray.Count() -1 );
-
-	// notify the listener about the new list of devices
-	SendRefreshIfNoError(KErrNone,newIndex);    
-	TRACE_FUNC_EXIT
-    }
-// ----------------------------------------------------------
-// CBTDevModelBase::RenumberDeviceArray
-//
-// ReCalculates the indexes of internal array.
-// ----------------------------------------------------------
-void CBTDevModelBase::RenumberDeviceArray()
-	{
-	TRACE_FUNC_ENTRY
-	for(TInt i=0;i<iDeviceArray.Count();i++)
-		{
-		iDeviceArray[i]->iIndex=i;
-		}
-	TRACE_FUNC_EXIT	
-	}
-//---------------------------------------------------------------------------------------------
-// from MBTEngDevManObserver for call back on adding, modifying, deleting device completion
-//---------------------------------------------------------------------------------------------
-void  CBTDevModelBase::HandleDevManComplete(TInt aErr)
-    {    
-    TRACE_FUNC_ENTRY
-    //command has been succesfully completed. If there is no command but something has
-    // completed, something is very wrong.
-	__ASSERT_DEBUG(iDevice != NULL || aErr != KErrNone, PANIC(EBTPanicDevManQueueIsCorrupt));    
-	__ASSERT_DEBUG(iQueue.Count()>0, PANIC(EBTPanicDevManQueueIsCorrupt));    
-	
-    RenumberDeviceArray();
-    
-	// EOPInternalUntust is untrst before delete. It is not an operation of its own, so no-one is notified about it.
-    if(iDevice && iDevice->iOperation== EOPInternalUntust)
-    	{
-    	delete(iDevice);
-    	iDevice=NULL;
-		delete iQueue[0];
-		iQueue.Remove(0);
-			    	
-		HandleQueue();
-		TRACE_FUNC_EXIT
-		return;
-    	}
-	// in case of just paired device the refresh does
-	// not work adequately quickly, so we have not refresh the
-	// shown devices immediately.
-	//
-	// If we would not do it, there might be a small window, for
-	// answering yes to to question if user wants to trust the
-	// device. This would fail, since the device would not
-	// be in the list.
-    if( aErr == KErrNone && (iDevice->iOperation== EOpTrust || iDevice->iOperation== EOpUntrust ))
-    	{
-		TInt index=GetIndexByAddress(iDevice->iAddr);
-		if(index != KErrNotFound)
-			{    	
-			if(iDevice->iOperation== EOpTrust )			
-				{
-				SetStatusFlags(iDeviceArray[index]->iStatus, EStatusTrusted);
-				}				
-			else
-				{
-				UnsetStatusFlags(iDeviceArray[index]->iStatus, EStatusTrusted);	
-				}
-							
-	    	SendRefreshIfNoError(aErr);
-			}
-			
-    	}
-	// delete the unpaired and blocked devices from the list
-	if( aErr == KErrNone && iDevice && 
-			(iDevice->iOperation== EOpBlock || iDevice->iOperation== EOpUnpair ) )
-		{
-			TInt index=GetIndexByAddress(iDevice->iAddr);	
-			if(index != KErrNotFound )
-				{
-					delete( iDeviceArray[index] );
-					iDeviceArray.Remove(index);				
-				}
-			// do not send refresh if this and the next are unpair/unblock operations.
-			// This is meant to hasten the screen refresh, in case of DeleteAll command
-			// is issued.
-			if( iQueue.Count()>1 && iQueue[1]->iOperation==iDevice->iOperation )
-				{
-				
-				}
-			else
-				{
-	    		SendRefreshIfNoError();	
-	    		iRegistryObserver->StartIfNotRunning();				
-	    		//NOTE:It is ok to attempt starting when allready running.	    		
-				}
-				
-		}
-    if(iObserver && iDevice)    
-    	iObserver->NotifyChangeDeviceComplete(aErr, *iDevice);
-    
-    delete(iDevice);
-    iDevice=NULL;
-    
-    iRegistryObserver->Refresh();
-
-	delete iQueue[0];
-	iQueue.Remove(0);
-		    
-	HandleQueue();
-	TRACE_FUNC_EXIT	
-    }
-    
-// ---------------------------------------------------------------------
-// CBTDevModelBase::HandleGetDevicesComplete
-// From MBTEngDevManObserver
-//
-// Devices are received from CBTRegistryObserver, so this is not used.
-// ----------------------------------------------------------------------
-void  CBTDevModelBase::HandleGetDevicesComplete(TInt /*aErr*/, CBTDeviceArray* /*aDeviceArray*/)
-    {
-	TRACE_FUNC_ENTRY
- 
-	TRACE_FUNC_EXIT    
-    }
-    
-
-// ---------------------------------------------------------------------
-// CBTDevModelBase::SendRefreshIfNoError
-// ---------------------------------------------------------------------
-void CBTDevModelBase::SendRefreshIfNoError(TInt aErr,TInt selectedItem)
-	{
-	TRACE_FUNC_ENTRY	
-	
-	//this shouldn't be reached if iObserver is NULL
-	__ASSERT_DEBUG(iObserver, PANIC(EBTPanicNullObserver));
-	
-	if (selectedItem == KErrNotSupported )
-		{
-   		iObserver->RefreshDeviceList( &iDeviceArray ,
-   		        Min(iObserver->CurrentItemIndex(),iDeviceArray.Count()-1  ) );    				
-		}
-	else
-		{
-	   	if (aErr == KErrNone && iObserver)
-	   	    {
-	   		iObserver->RefreshDeviceList( &iDeviceArray,
-	   		        Min(selectedItem,iDeviceArray.Count()-1  ) );
-	   	    }
-		}
-	
-	TRACE_FUNC_EXIT   		  
-	}    
-// ---------------------------------------------------------------------
-// CBTDevModelBase::ChangeDeviceL
-//
-// puts the change device command into Queue
-// ---------------------------------------------------------------------	
-void CBTDevModelBase::ChangeDeviceL(const TBTDevice& aDevice)
-	{
-	TRACE_FUNC_ENTRY
-	
-	TBTDevice* device=new(ELeave) TBTDevice(aDevice);		
-	CleanupStack::PushL(device);
-
-	TInt err = GetDevice(*device);
-	if(err!=KErrNone)
-		{
-		CleanupStack::PopAndDestroy(device);
-		User::Leave(err);
-		}
-
-	if(aDevice.iOperation==EOpChangeName)
-		{
-		device->iName=aDevice.iName;		
-		}
-	
-	iQueue.Append(device);
-	CleanupStack::Pop(device);	
-	if(iQueue.Count() ==1 )
-		{
-			User::LeaveIfError( DoChangeDeviceL(*iQueue[0]) );
-		}
-	TRACE_FUNC_EXIT
-	}
-
-// ---------------------------------------------------------------------
-// CBTDevModelBase::ChangeDevice
-//
-// Calls the ChangeDeviceL and traps leaves and calls error callback,
-// if they occur.
-// ---------------------------------------------------------------------	
-void CBTDevModelBase::ChangeDevice(const TBTDevice& aDevice)
-	{
-	TRACE_FUNC_ENTRY		
-	TRAPD(err,
-		ChangeDeviceL(aDevice);
-	);
-	if(err!=KErrNone)
-	{
-		HandleLeave(err,&aDevice);	
-	}
-	TRACE_FUNC_EXIT
-	}
-
-// ---------------------------------------------------------------------
-// CBTDevModelBase::CancelChange
-//
-// cancels the change from queue, only calls DoCancelChange,
-// if the command is actually in progress.
-// ---------------------------------------------------------------------		
-void CBTDevModelBase::CancelChange(const TBTDevice& aDevice)	
-	{
-	TRACE_FUNC_ENTRY	
-	// retrieve the device based on index, in
-	// case the address is not filled in.
-	TBTDevice device=aDevice;
-	GetDevice(device);
-	device.iOperation=aDevice.iOperation;
-				
-	// delete any operations to device from queueu
-	if(iQueue.Count()>0 )
-		{
-		// Before calling DoCancelChangeL check if first operation on the 
-		// queue is the one to be cancelled - otherwise crash may occure 
-		// as per TSW EMZA-7EUHYE
-		if(iQueue[0]->iAddr== device.iAddr &&
-			iQueue[0]->iOperation== device.iOperation )
-			TRAP_IGNORE(DoCancelChangeL(device));
-		
-		for (TInt i = iQueue.Count() - 1; i >= 0; i--)
-			{
-			if(iQueue[i]->iAddr== device.iAddr &&
-				iQueue[i]->iOperation== device.iOperation )
-				{
-				delete iQueue[i];
-				iQueue.Remove(i);
-				}
-			}
-		}
-	// failed cancel is not reported forward.		
-	TRACE_FUNC_EXIT			
-	}
-	
-// ---------------------------------------------------------------------
-// CBTDevModelBase::DeviceChangeInProgress
-// ---------------------------------------------------------------------
-TBool CBTDevModelBase::DeviceChangeInProgress()
-	{
-	TRACE_FUNC_ENTRY
-	TRACE_FUNC_EXIT
-	return iQueue.Count() !=0;
-	}
-
-// ---------------------------------------------------------------------
-// CBTDevModelBase::HandleQueue
-//
-// Starts executing the next devicechange(if any).
-// Currently Executed command must be deleted from iQueue and iDevice
-// (and corresponding places in subclasses), before calling this method.
-// ---------------------------------------------------------------------
-	
-void CBTDevModelBase::HandleQueue()
-	{
-	TRACE_FUNC_ENTRY
-	
-	RenumberDeviceArray();
-	if(iQueue.Count() >0 )
-		{
-		TRAPD(err2,	DoChangeDeviceL(*iQueue[0]); );
-		if (err2 !=KErrNone)
-			{
-			HandleLeave(err2,iQueue[0]);
-			}
-		}
-	TRACE_FUNC_EXIT		
-	}
-
-// ---------------------------------------------------------------------
-// CBTDevModelBase::HandleLeave
-// ---------------------------------------------------------------------
-void CBTDevModelBase::HandleLeave(TInt aErr,const TBTDevice* aDevice )
-	{
-	TRACE_FUNC_ENTRY
-	iRegistryObserver->StartIfNotRunning();
-	iRegistryObserver->Refresh();
-	if(aDevice == NULL )
-		{		
-		iObserver->NotifyChangeDeviceComplete(aErr,TBTDevice() );	
-		} 
-	else
-		{		
-		iObserver->NotifyChangeDeviceComplete(aErr, *aDevice );	
-		} 
-	delete iDevice;
-	iDevice=NULL;
-	iDevMan->Cancel();
-
-	if(aDevice != NULL && iQueue.Count() > 0 && 
-		(iQueue[0]->iAddr == aDevice->iAddr ) && 
-		(iQueue[0]->iOperation == aDevice->iOperation ) )
-		{
-		delete iQueue[0];
-		iQueue.Remove(0);
-		}	
-	
-	HandleQueue();
-	TRACE_FUNC_EXIT
-	}
--- a/bluetoothengine/btui/devmodel/src/btpairedmodel.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,999 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Maintain a Bluetooth devices data model for paired devices view
-*
-*/
-
-
-#include "btpairedmodel.h"
-#include <btengutil.h>
-#include "debug.h"
-#include "btui.h"
-
-const TInt KMaxCheckedConnections=20;
-
-
-// ---------------------------------------------------------------------
-// CBTPairedModel::CBTPairedModel
-// ---------------------------------------------------------------------
-//
-CBTPairedModel::CBTPairedModel(MBTDeviceObserver* aObserver, TBTDeviceSortOrder* aOrder)
-	: CBTDevModelBase(aObserver, aOrder)
-    {
-	TRACE_FUNC_ENTRY    
-    TRACE_FUNC_EXIT	
-    }
-
-// ---------------------------------------------------------------------
-// CBTPairedModel::NewL
-// ---------------------------------------------------------------------
-//
-CBTPairedModel* CBTPairedModel::NewL(MBTDeviceObserver* aObserver, TBTDeviceSortOrder* aOrder )
-    {
-    CBTPairedModel* self = new (ELeave) CBTPairedModel(aObserver, aOrder);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-     
-    return self;       
-    }
-    
-// --------------------------------------------------------------------------------------------
-// Destructor
-// --------------------------------------------------------------------------------------------
-//
-CBTPairedModel::~CBTPairedModel()
-    {
-	TRACE_FUNC_ENTRY    
-	
-    delete iConnMan;
-    delete iPairingDevice;
-    delete iLinks;
-    delete iBtEngSettings;
-    iSocketServ.Close();    
-    
-    TRACE_FUNC_EXIT    
-    }
-
-// ---------------------------------------------------------------------
-// CBTPairedModel::ConstructL
-// ----------------------------------------------------------------------
-//
-void CBTPairedModel::ConstructL()
-    {
-	TRACE_FUNC_ENTRY
-	
-    // get all devices from btregistry to cache - local copy of CBTDeviceArray
-    iDevMan = CBTEngDevMan::NewL(this);
-    iConnMan = CBTEngConnMan::NewL(this);
-    iSearchPattern.FindAll(); 
-   	iRegistryObserver = CBTRegistryObserver::NewL(this, iSearchPattern);
-	iRegistryObserver->Refresh();
-	User::LeaveIfError( iSocketServ.Connect() );
-	iLinks=CBluetoothPhysicalLinks::NewL(*this,iSocketServ);
-	
-	iBtEngSettings = CBTEngSettings::NewL(this);
-	
-    TRACE_FUNC_EXIT	
-    }
-    
-// ---------------------------------------------------------------------
-// CBTPairedModel::IsAnyDeviceConnected
-// ----------------------------------------------------------------------
-//
-TBool CBTPairedModel::IsAnyDeviceConnected()
-    {        
-	TRACE_FUNC_ENTRY
-
-	FlagPhysicallyConnectedDevices(iDeviceArray);
-    
-	for(TInt i = 0; i < iDeviceArray.Count(); i++)
-		{
-		if(iDeviceArray[i]->iStatus & (EStatusPhysicallyConnected|EStatusBtuiConnected))
-			{
-			TRACE_FUNC_EXIT				
-			return ETrue;
-			}        
-		}
-					
-	TRACE_FUNC_EXIT				
-	
-    return EFalse;
-    }
-    
-// ---------------------------------------------------------------------
-// CBTPairedModel::DoChangeDevice
-// ---------------------------------------------------------------------
-
-TInt CBTPairedModel::DoChangeDeviceL(const TBTDevice& aDevice)
-    {
-    TRACE_FUNC_ENTRY
-    TRACE_BDADDR(aDevice.iAddr)
-   	// check that the device actually still exists
-   	if(aDevice.iOperation != EOpPair )
-   		{
-   		User::LeaveIfError( GetIndexByAddress(aDevice.iAddr, aDevice.iIndex ) );	
-   		}
-   	
-    // disconnect device to be unpaired, or blocked
-    if((aDevice.iOperation == EOpBlock || aDevice.iOperation == EOpUnpair ))
-    	{    	
-    	if( iState != EDisconnectBeforeOperationState)
-    		{
-    			// disconnect by CBTEngConnMan if connected that way.
-    			if (aDevice.iStatus & static_cast<TInt>(EStatusBtuiConnected ) )
-    				{
-    				TInt code=KErrNone;
-		    		TRAPD(err,
-		    		iState=EDisconnectBeforeOperationState;
-			    		iDisconnectDevice=new(ELeave) TBTDevice(aDevice);
-			    		code=iConnMan->Disconnect(aDevice.iAddr,EBTDiscImmediate);    				
-			    		);
-					// if the return code is KErrNone then there will be
-					// a callback. However if it fails, there will not be any.
-					// So the execution will go on inside this method, if there was an error.
-					if(err == KErrNone && code==KErrNone )
-						{
-						return KErrNone;
-						}
-						
-    				}
-    			else // try disconnecting from the link layer
-    				{
-    				TInt code=KErrNone;
-    				TRAPD(err,
-					iState=EDisconnectBeforeOperationState;
-						iDisconnectDevice=new(ELeave) TBTDevice(aDevice);
-						code=iLinks->Disconnect(aDevice.iAddr);
-						);
-					// if the return code is KErrNone then there will be
-					// a callback. However if it fails, there will not be any.
-					// So the execution will go on inside this method, if there was an error.
-					if(err == KErrNone && code==KErrNone )
-						{
-						return KErrNone;
-						}
-    				}
-    		}
-   		else    
-			iState=EIdleState;
-    
-    	}
-    	
-    if(	aDevice.iOperation ==EOpPair)
-    	{
-    	DoPairDeviceL();
-    	TRACE_FUNC_EXIT 
-    	return KErrNone;    	
-    	}
-    
-    TInt err = CBTDevModelBase::DoChangeDeviceL(aDevice);
-    if(iDisconnectDevice!= NULL)
-    	{
-    	delete iDisconnectDevice;
-    	iDisconnectDevice=NULL;
-    	}
-    
-    if (err != KErrNone)
-        {      
-        TBTDevAddr addr;
-        if(aDevice.iAddr == KNullAddress )
-        	{        	        	
-        	if(aDevice.iIndex < 0 || aDevice.iIndex >= iDeviceArray.Count())
-        		return KErrArgument;
-        	else
-        		addr=iDeviceArray[aDevice.iIndex]->iAddr;
-        	}
-        	else
-        		addr=aDevice.iAddr;
-        	
-        switch (aDevice.iOperation)
-            {
-            case EOpConnect:
-            	{                    	   		            		               
-                err = iConnMan->Connect(addr, aDevice.iDeviceClass);
-                break;
-            	}
-            case EOpDisconnect:
-            	{
-            	iDisconnectDevice=new(ELeave) TBTDevice(aDevice);            		            		           	
-				if (aDevice.iStatus & static_cast<TInt>(EStatusBtuiConnected ) )            	
-					{
-					err = iConnMan->Disconnect(addr, EBTDiscImmediate);	
-					}
-				else
-					{
-					err=iLinks->Disconnect(aDevice.iAddr);
-					}
-                
-                break;
-            	}
-            default:
-            	User::Leave(err);
-                break;
-            }
-        }
-        
-    TRACE_FUNC_EXIT        
-    
-    return err;
-    }
-    
-// ---------------------------------------------------------------------
-// CBTPairedModel::DoCancelChange
-// ---------------------------------------------------------------------
-//    
-void CBTPairedModel::DoCancelChangeL(const TBTDevice& aDevice)
-    {
-    TRACE_FUNC_ENTRY
-    
-	if(aDevice.iIndex >= iDeviceArray.Count())
-        {
-        TRACE_INFO((_L("index is %d, max expected is %d"), aDevice.iIndex, iDeviceArray.Count()));
-        TRACE_FUNC_EXIT    
-		return; 
-        }
-    
-    // in case it was stopped
-    iRegistryObserver->StartIfNotRunning();
-    switch (aDevice.iOperation)
-        {
-        case EOpPair:
-        	if( iState==EDeleteDeviceState || iState==EAddDeviceState )
-        		{
-        		iDevMan->Cancel();
-        		}        		
-        	else
-        		{
-        		iConnMan->CancelPairDevice();
-        		}            	        	
-            delete iPairingDevice;
-            iPairingDevice=NULL;
-            iState=EIdleState;
-            iRegistryObserver->Refresh();
-            break;
-            
-        case EOpConnect:
-        	{	
-        	
-            TBTDevAddr addr;
-            if(aDevice.iIndex == KErrNotFound) 
-            	{
-            	addr=aDevice.iAddr;
-            	}                
-            else
-            	{
-            	addr=iDeviceArray[aDevice.iIndex]->iAddr;
-            	}
-            	
-            iConnMan->CancelConnect(addr);
-            break;
-        	}
-        default:
-            CBTDevModelBase::CancelChange(aDevice);
-            return;
-        }
-    iRegistryObserver->StartIfNotRunning();
-    
-	if(iQueue.Count()>0)
-		{
-		delete iQueue[0];
-		iQueue.Remove(0);		
-		HandleQueue();
-		}
-	
-    TRACE_FUNC_EXIT	       
-    }
-    
-// ---------------------------------------------------------------------
-// CBTPairedModel::HandleNewDevice
-//
-// Adds the device if it is not banned
-// ---------------------------------------------------------------------
-//
-void CBTPairedModel::HandleNewDeviceL(const CBTDevice* aRegDevice,
-        TNameEntry* aNameEntry)
-    {
-    TRACE_FUNC_ENTRY
-    
-    // It is needed to filter out blocked devices,
-    // since otherwise blocked and paired devices would
-    // be listed.
-    if( ! aRegDevice->GlobalSecurity().Banned()     	
-            && IsUserAwarePaired( aRegDevice->AsNamelessDevice() ) ) 
-        {
-        AddDeviceL(aRegDevice, aNameEntry, EOpNone);
-        }
-
-    TRACE_FUNC_EXIT		    
-    }
-    
-// -----------------------------------------------------------------------
-// CBTPairedModel::CreateDevice
-//
-// This implementaion will add the connectable status from the superclass.
-// -----------------------------------------------------------------------  
-//
-TBTDevice* CBTPairedModel::CreateDeviceL(const CBTDevice* aRegDevice,
-        TNameEntry* aNameEntry)
-    {
-    TRACE_FUNC_ENTRY
-    
-    TBTDevice* device = CBTDevModelBase::CreateDeviceL(aRegDevice, aNameEntry);
-    
-    // add EStatusBtuiConnected status if the device has a profile connection
-    TBTEngConnectionStatus connStatus;
-    iConnMan->IsConnected(device->iAddr, connStatus);
-    
-    if(connStatus == EBTEngConnecting || connStatus == EBTEngConnected)
-    	{
-    	SetStatusFlags(device->iStatus,EStatusBtuiConnected);
-    	}
-    
-    // add connectable status
-    TBool connectable=EFalse;
-    iConnMan->IsConnectable(aRegDevice->BDAddr(), aRegDevice->DeviceClass(), connectable );
-    
-    if( connectable) 
-    	{
-    	SetStatusFlags(device->iStatus, EStatusConnectable );
-    	}
-    	
-	TRACE_FUNC_EXIT 
-	       
-    return device;
-    }
-    
-// ---------------------------------------------------------------------
-// CBTPairedModel::ConnectComplete
-// from MBTEngConnObserver
-// ----------------------------------------------------------------------
-//
-void CBTPairedModel::ConnectComplete(TBTDevAddr& aAddr, TInt aErr, RBTDevAddrArray* aConflicts)
-    {
-    TRACE_FUNC_ENTRY
-    
-    TRACE_INFO((_L("aErr=%d"), aErr))
-
-    TInt index = GetIndexByAddress(aAddr);
-    TBool requestIssuedFromPhone = EFalse;
-    TBTDevice connectedDevice;
-    
-    // was the device connected from request by the ui
-	if(iQueue.Count()>0 && iQueue[0]->iOperation==EOpConnect && 
-	  iQueue[0]->iAddr == aAddr)
-		{
-		requestIssuedFromPhone = ETrue;
-		if(index >=0) // is it from paired list
-			{			
-			connectedDevice=*iDeviceArray[index];
-			connectedDevice.iOperation=EOpConnect;
-			}
-		else
-			{
-			connectedDevice=*iQueue[0];		
-			}
-    	
-    	}
-    else
-    	{
-    	requestIssuedFromPhone = EFalse;
-		if(index >=0) // is it from paired list
-			{
-			connectedDevice=*iDeviceArray[index];
-			connectedDevice.iOperation=EOpConnect;
-			}
-		else
-			{
-	    	// it was not. Try to fill what can be filled.
-			connectedDevice.iAddr=aAddr;
-			connectedDevice.iIndex=KErrNotFound;
-			connectedDevice.iOperation = EOpConnect;			
-			}    	
-    	}        
-    
-    if (aErr == KErrAlreadyExists )
-        { 
-        // gather the names of the conflicting devices.
-        RBTDevNameArray nameArray;
-        for (TInt i = 0; aConflicts!= NULL && i < aConflicts->Count(); i++)
-            {
-            //remove duplicates
-            if(i>0&& (*aConflicts)[i]==(*aConflicts)[i-1])
-            	{
-            	continue;
-            	}
-            TInt di = GetIndexByAddress((*aConflicts)[i]);
-            
-            if(di >=0 )
-            	{
-            	nameArray.Append(&iDeviceArray[di]->iName);
-            	}
-            }
-
-        // we will unset the connect status of the device if connection failed &
-            // it is found in paired devices.
-        if( index >= 0 )
-            {
-            // add EStatusBtuiConnected status if the device has a profile connection
-            TBTEngConnectionStatus connStatus;
-            iConnMan->IsConnected(connectedDevice.iAddr, connStatus);
-   
-            if (connStatus != EBTEngConnecting && connStatus != EBTEngConnected)
-                {
-                TRACE_INFO(_L("Unset EStatusBtuiConnected"))
-                UnsetStatusFlags(iDeviceArray[index]->iStatus,EStatusBtuiConnected );
-                }
-            }
-        
-        if(iObserver)
-            {
-            //Show only phone issued request complete notes
-            //Do not show notes for device issued request when BTUI is active
-            if ( requestIssuedFromPhone ) 
-                {
-                iObserver->NotifyChangeDeviceComplete(aErr, connectedDevice, &nameArray);
-                }
-               
-            SendRefreshIfNoError(aErr);
-            }
-        nameArray.Reset();
-        }
-    else 
-        {
-        if (aErr == KErrNone)
-            {
-            // we will set the connect status of the device
-            // if it is found in paired devices.
-            if( index >= 0 )
-            	{
-            	SetStatusFlags(iDeviceArray[index]->iStatus,EStatusBtuiConnected );
-            	}
-            }
-        else        
-            {
-            // we will unset the connect status of the device if connection failed &
-            // it is found in paired devices.
-            if( index >= 0 )
-                {                   
-                // add EStatusBtuiConnected status if the device has a profile connection
-                TBTEngConnectionStatus connStatus;
-                iConnMan->IsConnected(connectedDevice.iAddr, connStatus);
-   
-                if (connStatus != EBTEngConnecting && connStatus != EBTEngConnected)
-                   {
-                   TRACE_INFO(_L("Unset EStatusBtuiConnected"))
-                   UnsetStatusFlags(iDeviceArray[index]->iStatus,EStatusBtuiConnected );
-                   }                
-                }
-            }
-		if(iObserver)
-			{
-			//Show only phone issued request complete notes
-			//Do not show notes for device issued request when BTUI is active
-			if ( requestIssuedFromPhone ) 
-			    {
-        	    iObserver->NotifyChangeDeviceComplete(aErr, connectedDevice);
-			    }
-        	
-        	SendRefreshIfNoError(aErr);
-			}		
-        }           
-    
-    // Process the next command if the connect was
-    //initiated by this UI.    
-	if(iQueue.Count()>0 && iQueue[0]->iOperation==EOpConnect && 
-       iQueue[0]->iAddr == aAddr)        
-        {
-        delete iQueue[0];
-        iQueue.Remove(0);		
-        HandleQueue();
-        }
-    else
-        {
-        if( iQueue.Count()==0 ) 
-            {
-            TRACE_INFO((_L("op Q is empty")));
-            }
-        else
-            {
-            TRACE_INFO((_L("unexpected op Q contents, count is %d, op is %d"), iDeviceArray.Count(), iQueue[0]->iOperation));
-            }
-        }
-    TRACE_FUNC_EXIT	
-    }
-    
-// ---------------------------------------------------------------------
-// CBTPairedModel::PowerStateChanged
-// from MBTEngSettingObserver
-// ----------------------------------------------------------------------
-//
-void CBTPairedModel::PowerStateChanged( TBTPowerStateValue )
-	{
-	TRACE_FUNC_ENTRY
-	
-	// This is implemented for case like when user choses offlne mode, Bluetooth is swithced off
-	// very fast. Bt audio components don't have enough time to close audio connection.
-	// BTUI needs to update UI display.
-	
-	TInt count = iDeviceArray.Count();  
-    
-    for (TInt i = 0; i < count; i++)
-    	{
-     	UnsetStatusFlags(iDeviceArray[i]->iStatus, EStatusBtuiConnected );
-    	}
-	
-	SendRefreshIfNoError(KErrNone);
-	
-	TRACE_FUNC_EXIT
-	}
-    
-// ----------------------------------------------------
-// CBTPairedModel::VisibilityModeChanged
-// from MBTEngSettingObserver
-// ----------------------------------------------------
-//    
-void CBTPairedModel::VisibilityModeChanged( TBTVisibilityMode  )
-    {
-	TRACE_FUNC_ENTRY
-	
-	
-	TRACE_FUNC_EXIT	
-    }
-        
-// ---------------------------------------------------------------------
-// CBTPairedModel::DisconnectComplete
-// from MBTEngConnObserver
-// ----------------------------------------------------------------------
-//
-void CBTPairedModel::DisconnectComplete(TBTDevAddr& aAddr, TInt aErr)
-    {
-    TRACE_FUNC_ENTRY
-    
-    // the disconnect was part of a unpairing or blocking operation
-	if(iState == EDisconnectBeforeOperationState && iDisconnectDevice && aAddr == iDisconnectDevice->iAddr )
-		{
-
-		TRAPD(err,
-			DoChangeDeviceL(*iDisconnectDevice);		
-		);
-		iState=EIdleState;		
-		if(err != KErrNone)
-			{
-			HandleLeave(err,iDisconnectDevice);
-			}
-		TRACE_FUNC_EXIT
-		return;
-		}		    
-    
-    TInt index = GetIndexByAddress(aAddr);
-    
-    // the disconnected device was not the devicein the list,
-    // so we do not tell anyone about it.
-    if ( iDisconnectDevice == NULL || iDisconnectDevice->iAddr != aAddr )
-    	{
-    	if (index >=0 )
-    	{
-    		UnsetStatusFlags(iDeviceArray[index]->iStatus, EStatusBtuiConnected );
-    	}
-    	
-    	SendRefreshIfNoError(KErrNone);
-
-		TBTDevice disconnectedDevice;
-		disconnectedDevice.iAddr = aAddr;
-		// Notify needed when there is active disconnect query dialog
-    	iObserver->NotifyChangeDeviceComplete(KErrDisconnected, disconnectedDevice);
-		
-    	TRACE_FUNC_EXIT  
-    	return;
-    	}
-    	
-	if(index >=0 )
-		{
-	    // set it to "not connected" no matter disconnection works or not
-	    UnsetStatusFlags(iDeviceArray[index]->iStatus, EStatusBtuiConnected );
-	    iDeviceArray[index]->iOperation = EOpDisconnect;
-	    iObserver->NotifyChangeDeviceComplete(aErr, *iDeviceArray[index]);		
-		}
-	else
-		{
-		iDisconnectDevice->iIndex=index;
-		iObserver->NotifyChangeDeviceComplete(aErr, *iDisconnectDevice);		
-		}
-
-	delete iDisconnectDevice;
-	iDisconnectDevice=NULL;    	
-
-   	SendRefreshIfNoError(aErr);
-   	// continue processing queue only if the disconnected device is
-   	// the device with we requested disconnect to.
-   	// this has to be checked so that we do not end on having multiple
-   	// queue processors at the same time
-	if(iQueue.Count()>0 && iQueue[0]->iOperation==EOpDisconnect && 
-	  iQueue[0]->iAddr == aAddr)           	
-		{
-		delete iQueue[0];
-		iQueue.Remove(0);		
-		HandleQueue();
-		}
-    else
-        {
-        if( iQueue.Count()==0 ) 
-            {
-            TRACE_INFO((_L("op Q is empty")));
-            }
-        else
-            {
-            TRACE_INFO((_L("unexpected op Q contents, count is %d, op is %d"), iDeviceArray.Count(), iQueue[0]->iOperation));
-            }
-        }
-    TRACE_FUNC_EXIT   	
-    }
-    
-// ---------------------------------------------------------------------
-// CBTPairedModel::PairingComplete
-// from MBTEngConnObserver
-// ----------------------------------------------------------------------
-//
-void CBTPairedModel::PairingComplete(TBTDevAddr& aAddr, TInt aErr)
-	{
-	TRACE_FUNC_ENTRY
-	
-	TRAPD(err,
-		PairingCompleteL(aAddr,aErr);
-		);
-		
-	if(err!=KErrNone)
-	{
-		TBTDevice tmp;
-		tmp.iAddr=aAddr;					
-		tmp.iIndex=GetIndexByAddress(aAddr);
-		tmp.iOperation=EOpPair;
-		HandleLeave(err,&tmp );
-
-		delete iPairingDevice;
-		iPairingDevice=NULL;				
-	}
-	
-	TRACE_FUNC_EXIT
-	}
-	
-// ---------------------------------------------------------------------
-// CBTPairedModel::PairingCompleteL
-// Leaving version of PairingComplete
-// ----------------------------------------------------------------------
-//	
-void CBTPairedModel::PairingCompleteL(TBTDevAddr& aAddr, TInt aErr)
-    {
-    TRACE_FUNC_ENTRY
-    
-	// The device that was attempted to be paired is 
-	// different from the the device that the pairing is finnished.
-	// This cannot happen, since CBTConnMan will report
-	// only pairing started by the listener and the UI
-	// does not allow making two pairings at the same time
-    __ASSERT_DEBUG(aAddr==iPairingDevice->BDAddr(),
-      PANIC(EBTPanicCommandComplettedToDiffrentDeviceThanStarted));
-    (void) aAddr;
-
-    // bail out if the operation queue is not what we expect
-    if( iQueue.Count() == 0 
-        || iQueue[0]->iOperation != EOpPair 
-        || iQueue[0]->iAddr != aAddr )        
-        {
-        if( iQueue.Count()==0 ) 
-            {
-            TRACE_INFO((_L("op Q is empty")));
-            }
-        else
-            {
-            TRACE_INFO((_L("unexpected op Q contents, count is %d, op is %d"), iDeviceArray.Count(), iQueue[0]->iOperation));
-            }
-        TRACE_FUNC_EXIT
-        return;
-        }
-
-    iState=EIdleState;		
-	TBTDevice* tmpDevice=NULL;
-	tmpDevice=CreateDeviceL(iPairingDevice, &( iQueue[0]->iNameEntry ) );
-	tmpDevice->iOperation=EOpPair;    		
-	
-    // new paired device must be inserted to the array, since
-    // user may be doing trust/ connect operations before
-    // it is refreshed from registry
-    TBool deleleteTmpDevice=ETrue;
-	
-	if( aErr == KErrNone  )    	
-		{
-		SetStatusFlags(tmpDevice->iStatus,EStatusPaired);
-		TInt index;
-		index=GetIndexByAddress(iPairingDevice->BDAddr());
-		
-		if(index == KErrNotFound)
-			{
-			iDeviceArray.InsertInOrderL(tmpDevice,*iSortOrder );
-  			  			
-    		RenumberDeviceArray();
-
-    		// iPairingDevice is now owned by iDeviceArray. 
-    		// So it must not be deleted by his function
-    		deleleteTmpDevice=EFalse;
-    		
-    		SendRefreshIfNoError(aErr,GetIndexByAddress(iPairingDevice->BDAddr()));
-			}					
-		}
-
-	
-    iObserver->NotifyChangeDeviceComplete(aErr, *tmpDevice);         
-    
-    /*
-     * We issue an background refresh in case 
-     * registry is updated from btnotif
-     */
-	iRegistryObserver->StartIfNotRunning();
-	iRegistryObserver->Refresh();
-    // delete if the ownership has not changed
-    if(deleleteTmpDevice )
-        {
-    	delete tmpDevice;
-    	tmpDevice=NULL;
-        }
-
-	delete iPairingDevice;    
-    iPairingDevice=NULL;       
-	delete iQueue[0];
-	iQueue.Remove(0);
-    
-    HandleQueue();    		    
-
-    TRACE_FUNC_EXIT    
-    }
-    
-// ---------------------------------------------------------------------
-// BTPairedModel::HandleDevManComplete
-// from MBTEngDevModelBase
-// ----------------------------------------------------------------------
-//
-void  CBTPairedModel::HandleDevManComplete(TInt aErr)
-	{
-	TRACE_FUNC_ENTRY
-	
-	// if this is handled we can remove this
-	if(iDisconnectDevice)
-		{
-		delete iDisconnectDevice;
-		iDisconnectDevice=NULL;
-		}
-		
-	if(iPairingDevice)
-		{
-		// add the device just deleted	
-		if(iState==EDeleteDeviceState && (aErr==KErrNone || aErr == KErrNotFound))
-			{
-				iPairingDevice->DeleteLinkKey();
-				TBTDeviceSecurity sec=iPairingDevice->GlobalSecurity();
-				sec.SetBanned(EFalse);
-				sec.SetNoAuthorise(EFalse);
-				iDevMan->AddDevice(*iPairingDevice);
-				iState=EAddDeviceState;
-				TRACE_FUNC_EXIT	
-				return;
-			}
-		// if the device is added allready, or if deletion failed
-		// we will go on with pairing the device
-		if(iState==EAddDeviceState||(iState==EDeleteDeviceState&& aErr != KErrNone))
-			{
-			aErr = iConnMan->PairDevice(iPairingDevice->BDAddr(), iPairingDevice->DeviceClass());
-			iState=EPairDeviceState;
-			// NOTE: now PairingComplete will be called and not this method.
-			TRACE_FUNC_EXIT	
-			return;
-			}
-		}
-	// these are not handled by superclass		
-	if(iQueue.Count()>0 &&
-	    ( iQueue[0]->iOperation==EOpConnect || 
-	     iQueue[0]->iOperation==EOpDisconnect ) )
-		{
-		iObserver->NotifyChangeDeviceComplete(aErr, *iQueue[0]);
-		}
-			
-	CBTDevModelBase::HandleDevManComplete(aErr);
-	
-    TRACE_FUNC_EXIT	
-	}
-	
-// ---------------------------------------------------------------------
-// CBTPairedModel::DoPairDevice
-// ---------------------------------------------------------------------
-//
-void  CBTPairedModel::DoPairDeviceL()
-	{
-	TRACE_FUNC_ENTRY
-	
-	// we are starting a new command. Checks that no earlier commands 
-	// have been executed, but not finished properly.
-	__ASSERT_DEBUG(iState==EIdleState,PANIC(EBTPanicDevManQueueIsInIllegalState));
-	// check that there is no other pairing going on.
-	__ASSERT_DEBUG(iPairingDevice!=NULL,PANIC(EBTPanicTwoPairingAttemptsAtTheSameTime));
-	
-	iRegistryObserver->Cancel();
-	
-	// devices to be paired are first deleted
-	// then added back. Only after that the paring itself is
-	// started
-	TBTRegistrySearch dele;
-	dele.FindAddress(iPairingDevice->BDAddr());
-	TInt err = iDevMan->DeleteDevices(dele);
-
-	iState=EDeleteDeviceState;
-   if (err)
-       {
-       HandleDevManComplete(err);
-       }
-       
-    TRACE_FUNC_EXIT
-	}
-	
-// ---------------------------------------------------------------------
-// CBTPairedModel::PairDevice
-//
-// Puts the given aPairingDevice to iPairingDevice and
-// adds and empty device with iOperation=EOpPair as placeholder to iQueue.
-// the pairing itself will be handled by DoChangeDevice that
-// cals then 
-// ---------------------------------------------------------------------
-//
-TInt CBTPairedModel::PairDeviceL(const CBTDevice* aPairingDevice,
-        TNameEntry* aNameEntry)	
-	{
-	TRACE_FUNC_ENTRY
-	
-	// cannot put two pairings to queue. 
-	// this is not possible since ui does not allow it.
-	if(iPairingDevice)
-		return KErrInUse;
-		
-	TBTDevice*  device=new(ELeave) TBTDevice();
-	device->iOperation=EOpPair;
-	device->iAddr=aPairingDevice->BDAddr();
-	if ( aNameEntry )
-	    {
-	    device->iNameEntry = *aNameEntry;
-	    }
-	CleanupStack::PushL(device);
-	iPairingDevice=aPairingDevice->CopyL();
-	// put the device to queue directly
-	iQueue.AppendL(device);
-	TInt err = KErrNone;
-	if(iQueue.Count() ==1 )
-		{
-		err = DoChangeDeviceL(*iQueue[0]);
-		}
-	CleanupStack::Pop(device);	
-    TRACE_FUNC_EXIT			
-	return err;
-	
-	}
-	
-// ---------------------------------------------------------------------
-// CBTPairedModel::HandleDisconnectCompleteL
-// Disconnection by CBluetoothPhysicalLinks, for those
-// connections not opened by btui. 
-// ---------------------------------------------------------------------
-//
-void CBTPairedModel::HandleDisconnectCompleteL(TInt aErr)
-	{
-	 TRACE_FUNC_ENTRY 
-	 
-	 if(iDisconnectDevice)
-	 	{
-	 	DisconnectComplete(iDisconnectDevice->iAddr,aErr);
-	 	}
-	 	
-	TRACE_FUNC_EXIT
-	}
-	
-// ---------------------------------------------------------------------
-// CBTPairedModel::FlagPhysicallyConnectedDevices
-//
-// Marks the EStatusPhysicallyConnected attribute to the devices
-// that have active connection.
-// ---------------------------------------------------------------------
-//
-void CBTPairedModel::FlagPhysicallyConnectedDevices(RDeviceArray &aDeviceArray)
-	{
-	TRACE_FUNC_ENTRY 
-	
-	RBTDevAddrArray a;
-	iLinks->Enumerate(a,KMaxCheckedConnections);
-	
-	TInt i=0; 
-	
-	for(i=0;i<aDeviceArray.Count();i++)
-		{
-        FlagPhysicallyConnectedDevices( *aDeviceArray[i], a );
-		}
-	a.Close();	
-	
-	TRACE_FUNC_EXIT 	
-	}
-	
-void CBTPairedModel::FlagPhysicallyConnectedDevices(TBTDevice& aDevice, RBTDevAddrArray& aBTDeviceArray)
-	{
-	TRACE_FUNC_ENTRY 
-	
-	TInt i2=0;
-	
-    UnsetStatusFlags( aDevice.iStatus, EStatusPhysicallyConnected );		
-    for( i2=0; i2<aBTDeviceArray.Count(); i2++ )
-        {
-        if(aDevice.iAddr == aBTDeviceArray[i2])
-            {
-            SetStatusFlags( aDevice.iStatus,EStatusPhysicallyConnected );		
-            break;				
-            }
-        }
-	
-	TRACE_FUNC_EXIT 	
-	}
-	
-// ---------------------------------------------------------------------
-// CBTPairedModel::GetDevice
-//
-// Adds the EPhysicallyConnected attribute devices that have any active
-// bluetooth connection.
-// ---------------------------------------------------------------------	
-//
-TInt CBTPairedModel::GetDevice(TBTDevice& aDevice)
-	{	
-	TRACE_FUNC_ENTRY 	
-	
-	TInt rvalue=CBTDevModelBase::GetDevice(aDevice);
-	RBTDevAddrArray a;
-	iLinks->Enumerate(a,KMaxCheckedConnections);
-    FlagPhysicallyConnectedDevices(aDevice, a);
-	a.Close();	
-	
-	TRACE_FUNC_EXIT 
-	
-	return rvalue;	
-	}
-	
-// ---------------------------------------------------------------------
-// CBTPairedModel::HandleLeave
-// from CBTDevModelBase
-// ---------------------------------------------------------------------
-//
-void CBTPairedModel::HandleLeave(TInt aErr,const TBTDevice* aDevice )
-	{
-	TRACE_FUNC_ENTRY
-	
-	iConnMan->CancelPairDevice();
-
-	delete iPairingDevice;
-	iPairingDevice=NULL;
-
-	delete iDisconnectDevice;
-	iDisconnectDevice=NULL;
-	
-	iRegistryObserver->StartIfNotRunning();
-	iRegistryObserver->Refresh();
-	
-	iState=EIdleState;
-	
-	CBTDevModelBase::HandleLeave(aErr,aDevice );
-	
-	TRACE_FUNC_EXIT
-	}
--- a/bluetoothengine/btui/devmodel/src/btregistryobserver.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,256 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Monitors BTRegistry device changes and sends the 
-*				 new status to listener
-*
-*/
-
-#include "btregistryobserver.h"
-#include "debug.h"
-
-#include <bt_subscribe.h>
-const TInt KDeviceArrayDefaultSize=10;
-// ---------------------------------------------------------------------
-// Constructor
-// ---------------------------------------------------------------------
-CBTRegistryObserver::CBTRegistryObserver(MBTRegistryObserver* aObserver, 
-    const TBTRegistrySearch aPattern) 
-    	: CActive(CActive::EPriorityHigh), 
-      	  iObserver(aObserver),   iSearchPattern(aPattern)
-    {    
-    TRACE_FUNC_ENTRY
-    CActiveScheduler::Add(this);
-    // The priority will be EPriorityHigh only initially.
-    // after the first successfull retrieval of the devicelist
-    // the priority will be changed to EPriorityLow.
-    
-    // This will make the 1st devicelist drawn as quickly as possible,
-    // but the subsequent refrehes will not decrease the responsiveness
-    // of the Btui.
-    iAnotherEventPending=EFalse;
-    
-    TRACE_FUNC_EXIT
-    }
-// ---------------------------------------------------------------------
-// CBTRegistryObserver::NewL
-// ---------------------------------------------------------------------
-CBTRegistryObserver* CBTRegistryObserver::NewL(MBTRegistryObserver* aObserver,
-	  const TBTRegistrySearch aPattern)
-    {
-    CBTRegistryObserver* self = new (ELeave) CBTRegistryObserver(aObserver, aPattern);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    return self;
-    }
-// ---------------------------------------------------------------------
-// Destructor
-// ---------------------------------------------------------------------    
-CBTRegistryObserver::~CBTRegistryObserver()
-    {
-    TRACE_FUNC_ENTRY
-    Cancel();
-    iProperty.Close();
-    delete iDevMan;
-    
-    DeleteAllocatedDevices();
-    
-    delete iRegDeviceArray;
-    iRegDeviceArray=NULL;
-    
-    TRACE_FUNC_EXIT
-    }
-// ---------------------------------------------------------------------
-// CBTRegistryObserver::ConstructL()
-// ---------------------------------------------------------------------
-void CBTRegistryObserver::ConstructL()
-    {
-    TRACE_FUNC_ENTRY
-	iRegDeviceArray = new (ELeave) CBTDeviceArray(KDeviceArrayDefaultSize);    
-    iDevMan =  CBTEngDevMan::NewL(this);
-    iDevMan->SetPriority(CActive::EPriorityHigh);
-    
-    iProperty.Attach(KPropertyUidBluetoothCategory, KPropertyKeyBluetoothGetRegistryTableChange);
-    StartIfNotRunning();
-    TRACE_FUNC_EXIT
-    }
-// ---------------------------------------------------------------------
-// CBTRegistryObserver::Refresh
-// This will simulate registry change event.
-// ---------------------------------------------------------------------    
-void CBTRegistryObserver::Refresh()
-	{
-	TRACE_FUNC_ENTRY
-	
-	__ASSERT_DEBUG(iDevMan, User::Invariant());
-	
-    if (iDevMan->IsActive())
-    	{
-    	// An attempt to start a new search, during a prior
-    	// one. 
-    	iAnotherEventPending=ETrue;
-    	return;
-    	}   
-	Cancel();
-
-    DeleteAllocatedDevices();
-    iDevMan->GetDevices(iSearchPattern, iRegDeviceArray);
-    
-	StartIfNotRunning();    
-    
-    TRACE_FUNC_EXIT    
-	}
-	
-// ---------------------------------------------------------------------
-// CBTRegistryObserver::StartIfNotRunning
-// this have to be called again each time there has been registry event
-// ---------------------------------------------------------------------
-void CBTRegistryObserver::StartIfNotRunning()
-    {
-    TRACE_FUNC_ENTRY
-    if (!IsActive())
-        {
-        TRACE_INFO(_L("Start()"))
-        iIsStopped = EFalse;
-        iProperty.Subscribe(iStatus);
-        SetActive();
-        }
-    TRACE_FUNC_EXIT        
-    }
-// ---------------------------------------------------------------------
-// CBTRegistryObserver::RunL
-// From CAtive
-// This is called when registry has changed. This will not
-// be called when BTRegistry date retrieval is complete, since
-// HandleGetDevicesComplete is called when RBTregistry data retrieval
-// is complete
-// ----------------------------------------------------------------------
-
-void CBTRegistryObserver::RunL()
-    {
-    TRACE_FUNC_ENTRY
-    if(iDevMan && iDevMan->IsActive())
-    	{
-    	// An attempt to start a new search, during a prior
-    	// one. We will not start a new search, but we
-    	// will do it after the current search is complete
-    	iAnotherEventPending=ETrue;
-    	StartIfNotRunning();
-		TRACE_FUNC_EXIT    	
-    	return;
-    	}
-    if(!IsActive())
-    	SetPriority(CActive::EPriorityLow);
-    
-    
-
-    TInt registryTable;
-    iProperty.Get(registryTable);
-    iAnotherEventPending=EFalse;
-    
-    if(iDevMan && iStatus.Int() == KErrNone && registryTable == KRegistryChangeRemoteTable)
-        {
-        TRACE_INFO(_L("Remote table change"))
-        
-        DeleteAllocatedDevices();
-        iDevMan->GetDevices(iSearchPattern, iRegDeviceArray);
-        }
-    StartIfNotRunning();
-    TRACE_FUNC_EXIT
-    }
-
-// ---------------------------------------------------------------------
-// CBTRegistryObserver::HandleGetDevicesComplete
-// From MBTEngDevManObserver
-//
-// This function will not filter out refreshes with no changes,
-// since the connect status may have been changed in those cases, and
-// this class does not know about that
-//
-// It is worth to mention that CBTDeviceContainer will not refresh parts
-// of the screen that are not changed.
-// ---------------------------------------------------------------------
-void  CBTRegistryObserver::HandleGetDevicesComplete(TInt aErr, CBTDeviceArray* aDeviceArray)
-    {
-    TRACE_FUNC_ENTRY
-    TRACE_INFO((_L("aErr = %d"), aErr))
-    
-    // the initial view refresh is done. We will decrese
-    // the priority of this component to quarantee UI
-    // responsiveness
-    if(!iDevMan->IsActive())
-    	iDevMan->SetPriority(CActive::EPriorityLow);
-    
-    TRAP_IGNORE(
-		if( aErr != KErrNotFound)
-			iObserver->RegistryChangedL(aDeviceArray );
-		else
-			{
-			// handle the empty response case. The DevMan may issue
-			// NULL in that case 
-			iObserver->RegistryChangedL(iRegDeviceArray );	
-			}
-	);	
-
-    DeleteAllocatedDevices();
-
-	if(iAnotherEventPending)	
-		{
-		// Current results are not sent further, since
-		// there has been changes, witch may have rendered the current
-		// results allready obsolate. Therefore a refresh is made instead
-    
-		iAnotherEventPending=EFalse;
-        iDevMan->GetDevices(iSearchPattern, iRegDeviceArray);
-		}
-    TRACE_FUNC_EXIT		
-    }
-
-// ---------------------------------------------------------------------
-// CBTRegistryObserver::DeleteAllocatedDevices
-// ---------------------------------------------------------------------
-void CBTRegistryObserver::DeleteAllocatedDevices()
-	{
-	TRACE_FUNC_ENTRY
-	if(iRegDeviceArray)
-		{
-        iRegDeviceArray->ResetAndDestroy();
-        }
-    TRACE_FUNC_EXIT		
-	}
-// ---------------------------------------------------------------------
-// CBTRegistryObserver::Cancel
-// From CActive
-// ---------------------------------------------------------------------
-    
-void CBTRegistryObserver::Cancel()
-    {
-    TRACE_FUNC_ENTRY
-    iIsStopped = ETrue;
-    iAnotherEventPending=EFalse;    
-    CActive::Cancel();
-    if (iDevMan) iDevMan->Cancel();
-    DeleteAllocatedDevices();
-    TRACE_FUNC_EXIT    
-    }
-// ---------------------------------------------------------------------
-// CBTRegistryObserver::DoCancel
-// From CActive
-// ---------------------------------------------------------------------
-void CBTRegistryObserver::DoCancel()
-	{
-	TRACE_FUNC_ENTRY
-    iProperty.Cancel();	
-    TRACE_FUNC_EXIT
-	}
--- a/bluetoothengine/btui/eabi/btuidelegateu.def	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-EXPORTS
-	_ZN17BtDelegateFactory11newDelegateEN10BtDelegate7CommandEP14BtSettingModelP13BtDeviceModelP7QObject @ 1 NONAME
-	_ZN18BtAbstractDelegate11qt_metacallEN11QMetaObject4CallEiPPv @ 2 NONAME
-	_ZN18BtAbstractDelegate11qt_metacastEPKc @ 3 NONAME
-	_ZN18BtAbstractDelegate14getDeviceModelEv @ 4 NONAME
-	_ZN18BtAbstractDelegate15getSettingModelEv @ 5 NONAME
-	_ZN18BtAbstractDelegate16commandCompletedEi8QVariant @ 6 NONAME
-	_ZN18BtAbstractDelegate16staticMetaObjectE @ 7 NONAME DATA 16
-	_ZN18BtAbstractDelegate19getStaticMetaObjectEv @ 8 NONAME
-	_ZN18BtAbstractDelegate6cancelEv @ 9 NONAME
-	_ZN18BtAbstractDelegateC2EP14BtSettingModelP13BtDeviceModelP7QObject @ 10 NONAME
-	_ZN18BtAbstractDelegateD0Ev @ 11 NONAME
-	_ZN18BtAbstractDelegateD1Ev @ 12 NONAME
-	_ZN18BtAbstractDelegateD2Ev @ 13 NONAME
-	_ZNK18BtAbstractDelegate10metaObjectEv @ 14 NONAME
-	_ZTI18BtAbstractDelegate @ 15 NONAME
-	_ZTV18BtAbstractDelegate @ 16 NONAME
-
--- a/bluetoothengine/btui/eabi/btuimodelu.def	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,71 +0,0 @@
-EXPORTS
-	_ZN13BtDeviceModel11qt_metacallEN11QMetaObject4CallEiPPv @ 1 NONAME
-	_ZN13BtDeviceModel11qt_metacastEPKc @ 2 NONAME
-	_ZN13BtDeviceModel12searchDeviceEv @ 3 NONAME
-	_ZN13BtDeviceModel15emitDataChangedERK11QModelIndexS2_ @ 4 NONAME
-	_ZN13BtDeviceModel15emitDataChangedEiiPv @ 5 NONAME
-	_ZN13BtDeviceModel16staticMetaObjectE @ 6 NONAME DATA 16
-	_ZN13BtDeviceModel18cancelSearchDeviceEv @ 7 NONAME
-	_ZN13BtDeviceModel19getStaticMetaObjectEv @ 8 NONAME
-	_ZN13BtDeviceModel21deviceSearchCompletedEi @ 9 NONAME
-	_ZN13BtDeviceModel22removeTransientDevicesEv @ 10 NONAME
-	_ZN13BtDeviceModel25emitdeviceSearchCompletedEi @ 11 NONAME
-	_ZN13BtDeviceModelC1EP7QObject @ 12 NONAME
-	_ZN13BtDeviceModelC1ERKS_P7QObject @ 13 NONAME
-	_ZN13BtDeviceModelC2EP7QObject @ 14 NONAME
-	_ZN13BtDeviceModelC2ERKS_P7QObject @ 15 NONAME
-	_ZN13BtDeviceModelD0Ev @ 16 NONAME
-	_ZN13BtDeviceModelD1Ev @ 17 NONAME
-	_ZN13BtDeviceModelD2Ev @ 18 NONAME
-	_ZN14BtSettingModel11qt_metacallEN11QMetaObject4CallEiPPv @ 19 NONAME
-	_ZN14BtSettingModel11qt_metacastEPKc @ 20 NONAME
-	_ZN14BtSettingModel15emitDataChangedERK11QModelIndexS2_ @ 21 NONAME
-	_ZN14BtSettingModel15emitDataChangedEiiPv @ 22 NONAME
-	_ZN14BtSettingModel16staticMetaObjectE @ 23 NONAME DATA 16
-	_ZN14BtSettingModel19getStaticMetaObjectEv @ 24 NONAME
-	_ZN14BtSettingModelC1EP7QObject @ 25 NONAME
-	_ZN14BtSettingModelC1ERKS_P7QObject @ 26 NONAME
-	_ZN14BtSettingModelC2EP7QObject @ 27 NONAME
-	_ZN14BtSettingModelC2ERKS_P7QObject @ 28 NONAME
-	_ZN14BtSettingModelD0Ev @ 29 NONAME
-	_ZN14BtSettingModelD1Ev @ 30 NONAME
-	_ZN14BtSettingModelD2Ev @ 31 NONAME
-	_ZNK13BtDeviceModel10metaObjectEv @ 32 NONAME
-	_ZNK13BtDeviceModel11columnCountERK11QModelIndex @ 33 NONAME
-	_ZNK13BtDeviceModel4dataERK11QModelIndexi @ 34 NONAME
-	_ZNK13BtDeviceModel5indexEiiRK11QModelIndex @ 35 NONAME
-	_ZNK13BtDeviceModel6parentERK11QModelIndex @ 36 NONAME
-	_ZNK13BtDeviceModel8itemDataERK11QModelIndex @ 37 NONAME
-	_ZNK13BtDeviceModel8rowCountERK11QModelIndex @ 38 NONAME
-	_ZNK14BtSettingModel10metaObjectEv @ 39 NONAME
-	_ZNK14BtSettingModel11columnCountERK11QModelIndex @ 40 NONAME
-	_ZNK14BtSettingModel4dataERK11QModelIndexi @ 41 NONAME
-	_ZNK14BtSettingModel5indexEiiRK11QModelIndex @ 42 NONAME
-	_ZNK14BtSettingModel6parentERK11QModelIndex @ 43 NONAME
-	_ZNK14BtSettingModel8itemDataERK11QModelIndex @ 44 NONAME
-	_ZNK14BtSettingModel8rowCountERK11QModelIndex @ 45 NONAME
-	_ZTI13BtDeviceModel @ 46 NONAME
-	_ZTI14BtSettingModel @ 47 NONAME
-	_ZTV13BtDeviceModel @ 48 NONAME
-	_ZTV14BtSettingModel @ 49 NONAME
-	_ZN19BtuiModelSortFilter11qt_metacallEN11QMetaObject4CallEiPPv @ 50 NONAME
-	_ZN19BtuiModelSortFilter11qt_metacastEPKc @ 51 NONAME
-	_ZN19BtuiModelSortFilter16staticMetaObjectE @ 52 NONAME DATA 16
-	_ZN19BtuiModelSortFilter19getStaticMetaObjectEv @ 53 NONAME
-	_ZN19BtuiModelSortFilter20addDeviceMajorFilterEiNS_10FilterModeE @ 54 NONAME
-	_ZN19BtuiModelSortFilter20setDeviceMajorFilterEiNS_10FilterModeE @ 55 NONAME
-	_ZN19BtuiModelSortFilter22clearDeviceMajorFilterEiNS_10FilterModeE @ 56 NONAME
-	_ZN19BtuiModelSortFilter22deviceAcceptedByFilterEi @ 57 NONAME
-	_ZN19BtuiModelSortFilter23clearDeviceMajorFiltersEv @ 58 NONAME
-	_ZN19BtuiModelSortFilter9hasFilterEiNS_10FilterModeE @ 59 NONAME
-	_ZN19BtuiModelSortFilterC1EP7QObject @ 60 NONAME
-	_ZN19BtuiModelSortFilterC2EP7QObject @ 61 NONAME
-	_ZN19BtuiModelSortFilterD0Ev @ 62 NONAME
-	_ZN19BtuiModelSortFilterD1Ev @ 63 NONAME
-	_ZN19BtuiModelSortFilterD2Ev @ 64 NONAME
-	_ZNK19BtuiModelSortFilter10metaObjectEv @ 65 NONAME
-	_ZNK19BtuiModelSortFilter16filterAcceptsRowEiRK11QModelIndex @ 66 NONAME
-	_ZNK19BtuiModelSortFilter8lessThanERK11QModelIndexS2_ @ 67 NONAME
-	_ZTI19BtuiModelSortFilter @ 68 NONAME
-	_ZTV19BtuiModelSortFilter @ 69 NONAME
-
--- a/bluetoothengine/btui/group/BTUI.mmp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This is project specification file for the BTUI.
-*
-*/
-
-#include <bldvariant.hrh>
-#include <data_caging_paths.hrh>
-#include <platform_paths.hrh>
-
-VENDORID	VID_DEFAULT
-
-CAPABILITY		CAP_APPLICATION NetworkServices NetworkControl
-
-TARGET          BTUI.exe
-TARGETTYPE      exe
-EPOCSTACKSIZE	0x5000
-UID             0x100039CE 0x10005951
-
-SOURCEPATH      ../src
-SOURCE          BTUIApp.cpp
-SOURCE          BTUIAppUi.cpp
-SOURCE          BTUIDocument.cpp
-
-
-// Application Resource
-//
-START RESOURCE  ../data/BTUI.rss
-HEADER
-TARGETPATH APP_RESOURCE_DIR
-LANGUAGE_IDS
-END 
-
-
-// Application Registeration Resource
-//
-START RESOURCE ../data/Btui_reg.rss
-DEPENDS btui.rsg
-
-// Do not change the UID below.
-TARGETPATH /private/10003a3f/apps
-END
-
-USERINCLUDE     ../inc 			
-USERINCLUDE		../devmodel/inc
-USERINCLUDE		../Ecom/inc
-USERINCLUDE		../data
-
-SYSTEMINCLUDE   ../../inc   	//for private API headers (BluetoothEngine subsystem)
-SYSTEMINCLUDE   ../../../inc    //for internal API headers (localconnectivity)
-MW_LAYER_SYSTEMINCLUDE
-
-LIBRARY         euser.lib apparc.lib cone.lib       // Symbian OS framework libraries
-LIBRARY         eikcore.lib eikcoctl.lib eikctl.lib // UIKON libraries
-LIBRARY         avkon.lib                           // Series 60 UI library
-LIBRARY         bafl.lib                            // Basic Application Framework 
-LIBRARY         AknSkins.lib                        // Skinned icons
-LIBRARY         aknicon.lib
-LIBRARY         BtdevModel.lib
-LIBRARY         ecom.lib
-           
-LIBRARY         GSEcomPlugin.lib
-LIBRARY         GSFramework.lib
-
-#ifdef __SERIES60_HELP
-LIBRARY         hlplch.lib                          // Help library
-#endif
-
-DEBUGLIBRARY    flogger.lib                         // File logging services
-
-// This is optional - used only by Codewarrior IDE for .RSS file editing.
-//
-//Document		../data/Btui_reg.rss
-//Document		../data/BTUI.rss
-//Document		../inc/btui.loc
-
-// End of File
--- a/bluetoothengine/btui/group/bld.inf	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This file provides project information required for BTUI.
-*
-*/
-
-
-#include <platform_paths.hrh>
-//#include "../devmodel/group/bld.inf"
-
-PRJ_PLATFORMS
-//DEFAULT
-
-PRJ_EXPORTS
-../loc/btui.loc        MW_LAYER_LOC_EXPORT_PATH(btui.loc)
-//../rom/btui.iby        CORE_MW_LAYER_IBY_EXPORT_PATH(btui.iby)
-//../rom/BtuiResources.iby LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(BtuiResources.iby)
-../inc/BtuiPluginInterface.h |../../inc/BtuiPluginInterface.h
-../inc/BtuiPluginInterface.inl |../../inc/BtuiPluginInterface.inl
-../Ecom/inc/bluetoothuiutil.h   |../../inc/bluetoothuiutil.h
-../Ecom/inc/bluetoothuiutil.inl |../../inc/bluetoothuiutil.inl
-// Help exports
-#include "../help/group/bld.inf"
-
-PRJ_EXTENSIONS
-
-START EXTENSION s60/mifconv
-OPTION TARGETFILE btui.mif
-OPTION HEADERFILE btui.mbg
-OPTION SOURCES \
-             -c8,8 qgn_prop_bt_devices_tab3 -c8,8 qgn_prop_bt_set_tab3 -c8,8 qgn_prop_set_apps_bt \
-		         -c8,8 qgn_prop_bt_blocked_tab3 -c8,8 qgn_prop_set_apps_bt_off -c8,8 qgn_prop_set_apps_bt_on_shown \
-		         -c8,8 qgn_prop_set_apps_bt_on_hidden -c8,8 qgn_prop_set_apps_bt_conn_shown -c8,8 qgn_prop_set_apps_bt_conn_hidden \
-		         -c8,8 qgn_prop_bt_audio_connect -c8,8 qgn_prop_bt_computer_connect -c8,8 qgn_prop_bt_car_kit_connect \
-		         -c8,8 qgn_prop_bt_keyboard_connect -c8,8 qgn_prop_bt_mouse_connect
-END
-
-START EXTENSION s60/mifconv
-OPTION TARGETFILE btui_aif.mif
-OPTION SOURCES -c8,8 qgn_menu_bt
-END
-
-PRJ_MMPFILES
-
-// CP plugin API removed. Do not build "../Ecom/group/BtuiPlugin.mmp"	
-//../group/BTUI.mmp			
-
-
-//---End of File---  
--- a/bluetoothengine/btui/group/btui_Icons_aif_bitmaps_dc.mk	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-#
-# Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-#
-
-ifeq (WINS,$(findstring WINS, $(PLATFORM)))
-ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\z
-else
-ZDIR=\epoc32\data\z
-endif
-
-# ----------------------------------------------------------------------------
-# TODO: Configure these
-# ----------------------------------------------------------------------------
-
-TARGETDIR=$(ZDIR)\resource\apps
-ICONTARGETFILENAME=$(TARGETDIR)\btui_aif.mbm
-
-do_nothing :
-	@rem do_nothing
-
-MAKMAKE : do_nothing
-
-BLD : do_nothing
-
-CLEAN : do_nothing
-
-LIB : do_nothing
-
-CLEANLIB : do_nothing
-
-# ----------------------------------------------------------------------------
-# TODO: Configure these.
-#
-# NOTE 1: DO NOT DEFINE MASK FILE NAMES! They are included automatically by
-# MifConv if the mask detph is defined.
-#
-# NOTE 2: Usually, source paths should not be included in the bitmap
-# definitions. MifConv searches for the icons in all icon directories in a
-# predefined order, which is currently \s60\icons, \s60\bitmaps2.
-# The directory \s60\icons is included in the search only if the feature flag
-# __SCALABLE_ICONS is defined.
-# ----------------------------------------------------------------------------
-
-RESOURCE :
-	mifconv $(ICONTARGETFILENAME) \
-		/c8,8 qgn_menu_bt_lst.bmp \
-		/c8,8 qgn_menu_bt_cxt.bmp
-
-FREEZE : do_nothing
-
-SAVESPACE : do_nothing
-
-RELEASABLES :
-	@echo $(ICONTARGETFILENAME)
-
-FINAL : do_nothing
-  
\ No newline at end of file
--- a/bluetoothengine/btui/group/btui_Icons_aif_scalable_dc.mk	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-#
-# Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-#
-
-ifeq (WINS,$(findstring WINS, $(PLATFORM)))
-ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\z
-else
-ZDIR=\epoc32\data\z
-endif
-
-# ----------------------------------------------------------------------------
-# TODO: Configure these
-# ----------------------------------------------------------------------------
-
-TARGETDIR=$(ZDIR)\resource\apps
-ICONTARGETFILENAME=$(TARGETDIR)\btui_aif.mif
-
-do_nothing :
-	@rem do_nothing
-
-MAKMAKE : do_nothing
-
-BLD : do_nothing
-
-CLEAN : do_nothing
-
-LIB : do_nothing
-
-CLEANLIB : do_nothing
-
-# ----------------------------------------------------------------------------
-# TODO: Configure these.
-#
-# NOTE 1: DO NOT DEFINE MASK FILE NAMES! They are included automatically by
-# MifConv if the mask detph is defined.
-#
-# NOTE 2: Usually, source paths should not be included in the bitmap
-# definitions. MifConv searches for the icons in all icon directories in a
-# predefined order, which is currently \s60\icons, \s60\bitmaps2.
-# The directory \s60\icons is included in the search only if the feature flag
-# __SCALABLE_ICONS is defined.
-# ----------------------------------------------------------------------------
-
-RESOURCE :
-	mifconv $(ICONTARGETFILENAME) \
-		/c8,8 qgn_menu_bt.svg
-
-FREEZE : do_nothing
-
-SAVESPACE : do_nothing
-
-RELEASABLES :
-	@echo $(ICONTARGETFILENAME)
-
-FINAL : do_nothing
-  
\ No newline at end of file
--- a/bluetoothengine/btui/group/btui_icons_dc.mk	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-#
-# Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-#
-
-ifeq (WINS,$(findstring WINS, $(PLATFORM)))
-ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\z
-else
-ZDIR=\epoc32\data\z
-endif
-
-# ----------------------------------------------------------------------------
-# TODO: Configure these
-# ----------------------------------------------------------------------------
-
-TARGETDIR=$(ZDIR)\resource\apps
-ICONTARGETFILENAME=$(TARGETDIR)\btui.mif
-
-HEADERDIR=\epoc32\include
-HEADERFILENAME=$(HEADERDIR)\btui.mbg
-
-do_nothing :
-	@rem do_nothing
-
-MAKMAKE : do_nothing
-
-BLD : do_nothing
-
-CLEAN : do_nothing
-
-LIB : do_nothing
-
-CLEANLIB : do_nothing
-
-# ----------------------------------------------------------------------------
-# TODO: Configure these.
-#
-# NOTE 1: DO NOT DEFINE MASK FILE NAMES! They are included automatically by
-# MifConv if the mask detph is defined.
-#
-# NOTE 2: Usually, source paths should not be included in the bitmap
-# definitions. MifConv searches for the icons in all icon directories in a
-# predefined order, which is currently \s60\icons, \s60\bitmaps2, \s60\bitmaps.
-# The directory \s60\icons is included in the search only if the feature flag
-# __SCALABLE_ICONS is defined.
-# ----------------------------------------------------------------------------
-
-RESOURCE :
-	mifconv $(ICONTARGETFILENAME) /h$(HEADERFILENAME) \
-		/c8,8 qgn_prop_bt_devices_tab3.svg \
-		/c8,8 qgn_prop_bt_set_tab3.svg \
-		/c8,8 qgn_prop_set_apps_bt.svg \
-		/c8,8 qgn_prop_bt_blocked_tab3.svg \
-		/c8,8 qgn_prop_set_apps_bt_off.svg \
-		/c8,8 qgn_prop_set_apps_bt_on_shown.svg \
-		/c8,8 qgn_prop_set_apps_bt_on_hidden.svg \
-		/c8,8 qgn_prop_set_apps_bt_conn_shown.svg \
-		/c8,8 qgn_prop_set_apps_bt_conn_hidden.svg \
-		/c8,8 qgn_prop_bt_audio_connect.svg \
-		/c8,8 qgn_prop_bt_computer_connect.svg \
-		/c8,8 qgn_prop_bt_car_kit_connect.svg \
-		/c8,8 qgn_prop_bt_keyboard_connect.svg
-
-FREEZE : do_nothing
-
-SAVESPACE : do_nothing
-
-RELEASABLES :
-	@echo $(HEADERFILENAME)&& \
-	@echo $(ICONTARGETFILENAME)
-
-FINAL : do_nothing
-  
Binary file bluetoothengine/btui/help/data/xhtml.zip has changed
--- a/bluetoothengine/btui/help/group/bld.inf	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - Initial contribution
-* 
-* Contributors:
-* 
-* 
-* Description:
-* Export help related files.
-*
-*/
-
-#include <platform_paths.hrh>				
-PRJ_EXPORTS
-:zip ../data/xhtml.zip   /epoc32/data/z/resource/ overwrite
-:zip ../data/xhtml.zip   /epoc32/winscw/c/resource/ overwrite
-
-../inc/bt.hlp.hrh	MW_LAYER_PLATFORM_EXPORT_PATH(csxhelp/bt.hlp.hrh)
-../rom/btuihelps_variant.iby		CUSTOMER_APP_LAYER_IBY_EXPORT_PATH(btuihelps_variant.iby)
--- a/bluetoothengine/btui/help/inc/bt.hlp.hrh	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-* 
-* Description:
-*
-*/
-	
-//
-// bt.hlp.hrh generated by CSXHelp Utilities.
-//           
-
-#ifndef __BT_HLP_HRH__
-#define __BT_HLP_HRH__
-
-_LIT(KBT_HLP_MAIN, "BT_HLP_MAIN"); // 
-_LIT(KBT_HLP_PAIRED, "BT_HLP_PAIRED"); // 
-_LIT(KBT_HLP_BLOCKED, "BT_HLP_BLOCKED"); // 
-_LIT(KBTKEYBOARD_HLP_SETTINGS, "BTKEYBOARD_HLP_SETTINGS"); // 
-
-#endif 
--- a/bluetoothengine/btui/help/rom/btuihelps_variant.iby	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#ifndef __BTUIHELPS_VARIANT_IBY__
-#define __BTUIHELPS_VARIANT_IBY__
-
-#if defined(FF_S60_HELPS_IN_USE) && defined(__BT)
-    data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x10005951\contents.zip, RESOURCE_FILES_DIR\xhtml\%02d\0x10005951\contents.zip)
-    data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x10005951\index.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x10005951\index.xml)
-    data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x10005951\keywords.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x10005951\keywords.xml)
-    data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x10005951\meta.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x10005951\meta.xml)
-#endif
-
-#endif
\ No newline at end of file
--- a/bluetoothengine/btui/inc/BTUIApp.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-#ifndef BTUIAPP_H
-#define BTUIAPP_H
-
-#include <aknapp.h>
-
-/**
-* CBTUIApp application class
-*
-* Provides factory to create concrete document object.
-*
-* @lib btui.exe
-* @sice S60v3.0
-*/
-class CBTUIApp : public CAknApplication
-    {
-
-    private:
-
-        /**
-        * From CAknApplication Creates CBTUIDocument document object.
-        * @return A pointer to the created document object.
-        */
-        CApaDocument* CreateDocumentL();
-
-        /**
-        * From CAknApplication  Returns application's UID (KUidBTUI).
-        * @return The value of KUidBTUI.
-        */
-        TUid AppDllUid() const;
-    };
-
-#endif
-
-
-
--- a/bluetoothengine/btui/inc/BTUIAppUi.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,100 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-#ifndef BTUIAPPUI_H
-#define BTUIAPPUI_H
-
-// INCLUDES
-#include <aknapp.h>         // AVKON components
-#include <aknViewAppUi.h>
-#include <akntabgrp.h>
-#include <aknnavide.h>
-#include <AknTabObserver.h>
-#include "BtuiPluginInterface.h"
-
-// CLASS DECLARATION
-
-/**
-*  This class is a base class mandatory for all Symbian OS UI applications.
-*/
-class CBTUIAppUi : public CAknViewAppUi, 
-                   public MAknTabObserver,
-                   public MBtuiPluginViewActivationObserver
-    {
-    public: // Constructors and destructor
-
-        /**
-        * Symbian 2nd phase constructor.
-        */
-        void ConstructL();
-
-        /**
-        * Destructor
-        */
-        virtual ~CBTUIAppUi();
-
-       
-    public: // Functions from base classes
-
-        /**
-        * From CAknViewAppUi Handles user commands.
-        * @param aCommand A command id.        
-        * @return None.
-        */
-        void HandleCommandL(TInt aCommand);
-
-    private: // Functions from base classes
-
-        /**
-        * From CAknViewAppUi Initializes menu pane dynamically.
-        * @param aResourceId Resource ID identifying the menu pane to initialise.
-        * @param aMenuPane The in-memory representation of the menu pane.
-        * @return None.
-        */
-        void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane);
-        
-        /**
-        * From CAknViewAppUi Handles key events.
-        * @param aKeyEvent The key event that occurred.
-        * @param aType The event type.
-        * @return Response to the key event.
-        */
-        virtual TKeyResponse HandleKeyEventL( const TKeyEvent& aKeyEvent,TEventCode aType );
-        
-        /**
-        * From MBtuiPluginViewActivationObserver
-        * @param aViewId  activated plugin id
-        * @return none
-        */
-        void PluginViewActivated(TPluginViewId aViewId);  
-
-        /**
-        * From MAknTabObserver Takes care of tab handling.
-        * @param aIndex tab to be handled
-        */
-        virtual void TabChangedL(TInt aIndex); 
-
-    private: // Data
-
-		CAknNavigationControlContainer* iNaviPane;          // pointer to the navi pane control
-        CAknTabGroup*                   iTabGroup;          // Tab group
-        CAknNavigationDecorator*        iDecoratedTabGroup; // Frame for tabgroup                               
-    };
-
-#endif
-
--- a/bluetoothengine/btui/inc/BTUIDocument.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-#ifndef BTUIDOCUMENT_H
-#define BTUIDOCUMENT_H
-
-// INCLUDES
-
-#include <AknDoc.h>
-#include <aknapp.h>
-
-// FORWARD DECLARATIONS
-
-class CEikAppUi;
-//class CBTUIModel;
-
-// CLASS DECLARATION
-
-/**
-*  This class is a base class mandatory for all Symbian OS UI applications.
-*/
-class CBTUIDocument : public CAknDocument
-    {
-    public: // Constructors and destructor
-
-		/**
-        * Two-phased constructor.
-        */
-        static CBTUIDocument* NewL(CAknApplication& aApp);
-
-		/**
-        * Destructor.
-        */
-        virtual ~CBTUIDocument();
-
-	private: // Functions from base classes
-
-		/**
-        * From CAknDocument Creates AppUi class.        
-        * @param None.
-        * @return A reference to created class.
-        */
-		CEikAppUi*  CreateAppUiL();
-
-    private:
-
-		/**
-        * C++ default constructor.
-        */
-        CBTUIDocument(CEikApplication& aApp) :CAknDocument(aApp) { }
-
-		/**
-        * By default Symbian 2nd phase constructor is private.
-        */
-        void ConstructL();
-    };
-
-#endif
-
--- a/bluetoothengine/btui/inc/BtuiPluginInterface.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,113 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#ifndef BTUIPLUGININTERFACE_H
-#define BTUIPLUGININTERFACE_H
-
-#include <aknview.h>
-#include <gsbaseview.h>
-#include <btdevice.h>
-
-const TUid KCBtuiPluginInterfaceUid    = { 0x1020745F }; 
-
-
-enum TPluginViewId 
-{
-    EMainViewId =1,
-    EPairedDevicesViewId=2,
-    EBlockedDevicesViewId=3
-};
-
-
-
-/**
-* Callback interface for plugins view activation observer
-*/
-class MBtuiPluginViewActivationObserver
-{
-public: 
-    /**
-     *  Called when view is activated
-     *
-     *  @param aView Activated view id
-     */
-    virtual void PluginViewActivated(TPluginViewId aViewId)=0;    
-};
-
-
-/** This class implements the CGSPluginInterface which is used 
-* to implement the main view as general settings plugin.
-*
-*@lib BTUIPlugin.dll
-*@since S60 v3.1
-*/
-class CBtuiPluginInterface	: public CGSBaseView
-    {    
-    public: // Constructors & destructors
-
-        /**
-        * Creates new BTUI View plugin having the given UID.
-        * Uses Leave code KErrNotFound if implementation is not found.
-        *
-        * @param aImplementationUid Implementation UID of the plugin to be 
-        *        created.
-        * @param aModel Pointer to the BTUI Model of BTUI Application.
-        */                                                 
-        static CBtuiPluginInterface* NewL(
-            const TUid aImplementationUid, MBtuiPluginViewActivationObserver* aObserver = NULL);
-
-        /**
-        * From CGSPluginInterface
-        */            
-		void GetCaptionL( TDes& aCaption ) const;
-
-        /**
-        * Destructor
-        */
-        inline ~CBtuiPluginInterface();
-        
-        /**
-         * One ECom plugin of a type of HID device has its unique DeviceClass.
-         * The HID plugin has to implement this function to report the plug-in loader of its COD.
-         * Otherwise, it won't be added to enable setting view.
-         * @return TBTDeviceClass Class of Device defined in btdevice.h
-         */        
-        inline void SetCOD(TBTDeviceClass& aCOD);
-        inline TBTDeviceClass GetCOD() const;
-            
-    protected: 
-    	/** Non leaving constructor
-    	*/
-        inline CBtuiPluginInterface();
-
-		inline void NewContainerL();
-
-		inline void HandleListBoxSelectionL();
-
-			
-    private: // Data
-
-        /**
-        * ECOM plugin instance UID.
-        */
-        TUid iDtor_ID_Key;
-        TBTDeviceClass iCOD;
-    };
-
-#include "BtuiPluginInterface.inl"
-
-#endif //BTUIPLUGININTERFACE_H
--- a/bluetoothengine/btui/inc/BtuiPluginInterface.inl	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Inline code of CBtuiPluginInterface class.
-*
-*/
-
-
-// -----------------------------------------------------------------------------
-// Empty implementations of 3 pure virtual functions 
-// defined in base class CGSBaseView
-// -----------------------------------------------------------------------------
-inline void CBtuiPluginInterface::NewContainerL()
-	{	
-	}
-inline void CBtuiPluginInterface::HandleListBoxSelectionL()
-	{	
-	}
-inline CBtuiPluginInterface::CBtuiPluginInterface()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// Destructor
-// -----------------------------------------------------------------------------
-//
-inline CBtuiPluginInterface::~CBtuiPluginInterface()
-    {
-    REComSession::DestroyedImplementation( iDtor_ID_Key );
-    }
-
-// -----------------------------------------------------------------------------
-// CBtuiPluginInterface::NewL
-// -----------------------------------------------------------------------------
-//
-inline CBtuiPluginInterface* CBtuiPluginInterface::NewL( 
-    TUid aImplementationUid, MBtuiPluginViewActivationObserver* aObserver)
-    {
-    TInt32 keyOffset = _FOFF( CBtuiPluginInterface, iDtor_ID_Key );
-    TAny* ptr = REComSession::CreateImplementationL( aImplementationUid, keyOffset, aObserver);
-    
-    return reinterpret_cast< CBtuiPluginInterface* >( ptr ) ;
-    }
-
-// -----------------------------------------------------------------------------
-// CBtuiPluginInterface::NewL
-// offer a default implementation to make it non-pure virtual.
-// -----------------------------------------------------------------------------
-//
-inline void CBtuiPluginInterface::GetCaptionL( TDes& aCaption ) const
-	{
-	_LIT( NO_CAPTION,"no caption to offer" );
-	aCaption.Copy(NO_CAPTION);
-	return;
-	}
-
-// -----------------------------------------------------------------------------
-// CBtuiPluginInterface::SetCOD
-// only used for derived add-on plugins out of BTUI
-// -----------------------------------------------------------------------------
-//
-inline void CBtuiPluginInterface::SetCOD(TBTDeviceClass& aCOD)
-	{
-	iCOD = aCOD;
-	}
-inline TBTDeviceClass CBtuiPluginInterface::GetCOD() const
-    {
-	return iCOD;
-    }
--- a/bluetoothengine/btui/inc/bluetoothtrace.h	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btui/inc/bluetoothtrace.h	Mon Jul 12 18:51:05 2010 +0300
@@ -1,24 +1,19 @@
 /*
-* ============================================================================
-*  Name        : bluetoothtrace.h
-*  Part of     : BluetoothUI / bluetoothuimodel       *** Info from the SWAD
-*  Description : API declaration of run-time debug tracing
-*
-*  Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies).
-*  All rights reserved.
-*  This component and the accompanying materials are made available
-*  under the terms of "Eclipse Public License v1.0"
-*  which accompanies this distribution, and is available
-*  at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-*  Initial Contributors:
-*  Nokia Corporation - initial contribution.
-*
-*  Contributors:
-*  Nokia Corporation
-* ============================================================================
-* Template version: 4.2
-*/
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0""
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ *   
+ */
 
 #ifndef BLUETOOTHTRACE_H
 #define BLUETOOTHTRACE_H
--- a/bluetoothengine/btui/inc/bluetoothuitrace.h	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btui/inc/bluetoothuitrace.h	Mon Jul 12 18:51:05 2010 +0300
@@ -1,24 +1,19 @@
 /*
-* ============================================================================
-*  Name        : bluetoothuitrace.h
-*  Part of     : BluetoothUI / bluetoothuimodel       *** Info from the SWAD
-*  Description : API declaration of run-time debug tracing in bluetoothui project
-*
-*  Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies).
-*  All rights reserved.
-*  This component and the accompanying materials are made available
-*  under the terms of "Eclipse Public License v1.0"
-*  which accompanies this distribution, and is available
-*  at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-*  Initial Contributors:
-*  Nokia Corporation - initial contribution.
-*
-*  Contributors:
-*  Nokia Corporation
-* ============================================================================
-* Template version: 4.2
-*/
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0""
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ *   
+ */
 
 #ifndef BLUETOOTHUITRACE_H
 #define BLUETOOTHUITRACE_H
--- a/bluetoothengine/btui/inc/btdevicemodel.h	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btui/inc/btdevicemodel.h	Mon Jul 12 18:51:05 2010 +0300
@@ -23,7 +23,7 @@
 #include <QSharedPointer>
 #include <btuimodeltypes.h>
 
-class BtDeviceData;
+class BtDeviceModelPrivate;
 
 /*!
     \class BtDeviceModel
@@ -67,63 +67,9 @@
         LastUsedTimeRole, // QDateTime
         RssiRole,         // QVariant::Int
         MajorPropertyRole,  // QVariant::Int, bits of DevMajorProperty
-        MinorPropertyRole,  // QVariant::Int, bits according to an item from DevMajorProperty
+        MinorPropertyRole,  // QVariant::Int, bits of DevMinorProperty
         CoDRole,  // QVariant::Int, the value of Class of Device
-    };
-    
-    /*
-     * Major device property values.
-     */
-    enum DevMajorProperty {
-        NullProperty   = 0x00000000, // device without any specific filter.
-        Bonded         = 0x00000001, // device is in registry and bonded with phone
-        Blocked        = 0x00000002, // device is in registry and blocked by user
-        RecentlyUsed   = 0x00000004, // device is in registry and was used in last 30 days.
-        Trusted        = 0x00000008, // device is in registry and authorized by user.
-        InRegistry     = 0x00000010, // device exists in registry.
-        
-        Connected      = 0x00000020, // device is currently connected to one or more 
-                                     // services managed by Bluetooth Engine.
-        Connectable    = 0x00000040, // device is connectable to one or more 
-                                     // services managed by Bluetooth Engine.
-        InRange        = 0x00000100, // device is in range
-
-        // bits re-defined according to Class of Device:
-        Computer         = 0x00010000, // a computer
-        Phone            = 0x00020000, // a phone
-        LANAccessDev     = 0x00040000, // a LAN access point
-        AVDev            = 0x00080000, // an A/V device
-        Peripheral       = 0x00100000, // a peripheral
-        ImagingDev       = 0x00200000, // an imaging device
-        WearableDev      = 0x00400000, // a wearable device
-        Toy              = 0x00800000, // a toy
-        HealthDev        = 0x01000000, // a health device
-        UncategorizedDev = 0x02000000, // a generic device that is uncategorized
-        
-        // all properties derived from BT registry
-        RegistryProperties = Bonded |
-            Blocked | RecentlyUsed | Trusted | InRegistry,
-        
-        // all properties derived from CoD
-        CodProperties = Computer | Phone | LANAccessDev |
-            AVDev | Peripheral | ImagingDev | WearableDev | 
-            Toy | HealthDev  | UncategorizedDev,
-    };
-    
-    /*
-     * Minor device filters for major property \code AVDev \endcode
-     */
-    enum AVDevMinorProperty {
-        Carkit   = 0x00000001,
-        Headset  = 0x00000002,
-    };
-    
-    /*
-     * Minor device filters for major property \code Peripheral \endcode
-     */
-    enum PeripheralMinorProperty {
-        Mouse    = 0x00000001,
-        Keyboard = 0x00000002,
+        SeqNumRole    // sequence number indicating order in which device was found
     };
     
 public:
@@ -156,19 +102,27 @@
 signals:
 
     void deviceSearchCompleted(int error);
+
+private slots:
+
+    void deviceDataChanged( int row, void *parent );
     
+    void deviceDataChanged( int first, int last, void *parent );
+    
+    void beginInsertDevices(int first, int last, void *parent);
+    void endInsertDevices();
+    
+    void beginRemoveDevices(int first, int last, void *parent);
+    void endRemoveDevices();
+
+    void emitDeviceSearchCompleted( int error );
+
 private:
     
-    void emitDataChanged(int row, int column, void *parent );
-    
-    void emitDataChanged(const QModelIndex &top, const QModelIndex &bottom );
-    
-    void emitdeviceSearchCompleted(int error);
+    void connectModelSignals();
     
 private:
-    QSharedPointer<BtDeviceData> mDeviceData;
-
-    friend class BtDeviceData;
+    QSharedPointer<BtDeviceModelPrivate> d;
 };
 
 #endif // BTUIMODEL_H
--- a/bluetoothengine/btui/inc/btqtconstants.h	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btui/inc/btqtconstants.h	Mon Jul 12 18:51:05 2010 +0300
@@ -19,6 +19,7 @@
 #define BTQTCONSTANTS_H
 
 #include <btengconstants.h>
+#include <btserversdkcrkeys.h>
 
 
 // RSSI value range: -127dB ~ +20dB
@@ -32,21 +33,35 @@
 
 const int RssiInvalid = RssiMinRange - 1;
 
+enum PowerStateQtValue {
+    BtPowerOff = 0,
+    BtPowerOn,     
+    BtPowerUnknown  // only for error situations
+};
+
+enum DisconnectOption {
+    ServiceLevel = 0,
+    PhysicalLink, 
+    AllOngoingConnections,
+    DisconUnknown
+};
+
 enum VisibilityMode {
     BtHidden = 0x10,  // using a different number space than TBTVisibilityMode
     BtVisible,
     BtTemporary,
-    BtUnknown
-    
+    BtVisibilityUnknown
 };
 
 // used for mapping between UI row and VisibilityMode item
 enum VisibilityModeUiRowMapping {
     UiRowBtHidden = 0,
     UiRowBtVisible,
-    UiRowBtTemporary
+    UiRowBtTemporary,
+    UiRowBtUnknown
 };
 
+
 inline VisibilityMode QtVisibilityMode(TBTVisibilityMode btEngMode)
 {
     VisibilityMode mode; 
@@ -61,7 +76,7 @@
         mode = BtTemporary;
         break;
     default:
-        mode = BtUnknown;
+        mode = BtVisibilityUnknown;
     }
     return mode;
 }
@@ -85,5 +100,36 @@
     return mode;
 }
 
+inline PowerStateQtValue QtPowerMode(TBTPowerStateValue btEngMode)
+{
+    PowerStateQtValue mode; 
+    switch(btEngMode) {
+    case EBTPowerOff:
+        mode = BtPowerOff;
+        break;
+    case EBTPowerOn:
+        mode = BtPowerOn;
+        break;
+    default:
+        mode = BtPowerUnknown;  // error
+    }
+    return mode;
+}
+
+inline TBTPowerStateValue BtEngPowerState(PowerStateQtValue qtPowerState)
+{
+    TBTPowerStateValue btEngPowerState;
+    switch (qtPowerState){
+    case BtPowerOff:
+        btEngPowerState = EBTPowerOff;
+        break;
+    case BtPowerOn:
+        btEngPowerState = EBTPowerOn;
+        break;
+    default:
+        btEngPowerState = (TBTPowerStateValue)KErrUnknown;
+    }
+    return btEngPowerState;
+}
 
 #endif // BTQTCONSTANTS_H
--- a/bluetoothengine/btui/inc/btsettingmodel.h	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btui/inc/btsettingmodel.h	Mon Jul 12 18:51:05 2010 +0300
@@ -23,7 +23,7 @@
 #include <QSharedPointer>
 #include <btuimodeltypes.h>
 
-class BtLocalSetting;
+class BtSettingModelPrivate;
 
 /*!
     \class BtSettingModel
@@ -97,16 +97,19 @@
 
     virtual QMap<int, QVariant> itemData( const QModelIndex & index ) const;
     
+private slots:
+
+    void settingDataChanged( int row, void *parent );
+    
+    void settingDataChanged( int first, int last, void *parent );
+    
 private:
     
-    void emitDataChanged(int row, int column, void *parent );
-    
-    void emitDataChanged(const QModelIndex &top, const QModelIndex &bottom );
+    void connectModelSignals();
     
 private:
-    QSharedPointer<BtLocalSetting> mLocalSetting;
-    
-    friend class BtLocalSetting;
+    QSharedPointer<BtSettingModelPrivate> d;
+
 };
 
 #endif
--- a/bluetoothengine/btui/inc/btui.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This header file contains global declarations and methods 
-*                  which are visible to all BTUI classes.
-*
-*/
-
-#ifndef BTUI_H
-#define BTUI_H
-
-#include <e32svr.h>     // For RDebug and Panic
-#include <data_caging_path_literals.hrh> 
-
-const TUid KBtuiUid3 = { 0x10005951 }; //Application UID for help context
-
-//Ecom implementation UID of GS interface plugin
-const TUid KGsBtuiPluginUid = { 0x1020742B };   
-
-//Ecom implementation UID of BTUI interface plugin
-const TUid KBtuiPluginUidMainView = { 0x1020745C };   			// Ecom interface implementation UID
-const TUid KBtuiPluginUidPairedDevicesView = { 0x1020745D };   	// Ecom interface implementation UID
-const TUid KBtuiPluginUidBlockedDevicesView = {0x20002780 };	// Ecom interface implementation UID
-
-
-_LIT( KBTUIAppName, "BTUI" );           // The application name
-
-// Literals for bitmap files ( drive, directory, filename(s) )
-_LIT(KBitmapFileDrive,"z:");
-// KDC_APP_BITMAP_DIR == from data_caging_path_literals.hrh
-
-
-_LIT( KGSBtuiPluginResourceFileName, "z:BtuiViewResources.rsc" );
-
-_LIT(KBtuiBmpFileName,"btui.mbm");
-
-_LIT(KFileDrive,"z:");
-_LIT(KResourceFileName, "BtuiViewResources.rsc");
-
-
-enum TBTPanics {    
-    EBTMainListNotEmpty = 10000,
-    EBTAllFormatStingsArrayNotEmpty,
-    EBTFormatStingsArrayNotEmpty,
-    EBTPairedDevicesListNotEmpty,
-    EBTPanicClassMemberVariableNotNull,
-    EBTPanicClassMemberVariableIsNull,    
-    EBTPanicIllegalValue,
-    EBTPanicDevManQueueIsCorrupt,
-    EBTPanicDevManQueueIsInIllegalState,
-	EBTPanicTwoPairingAttemptsAtTheSameTime,
-	EBTPanicCommandComplettedToDiffrentDeviceThanStarted,
-	EBTPanicNullObserver
-};
-
-// MACROS
-//#define PANIC(aPanic) User::Panic(KBTUIAppName,aPanic)
-
-#endif // BTUI_H
--- a/bluetoothengine/btui/inc/btui.hrh	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,119 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This file contains declarations for resources of BTUI.
-*
-*/
-
-
-
-
-#ifndef BTUI_HRH
-#define BTUI_HRH
-
-enum TBTUIMenuCommands
-    {
-    EBTUICmdUndefined = 0,    
-    EBTUICmdChangePowerStateMenu,
-    EBTUICmdChangePowerStateSelect,
-    EBTUICmdChangeVisibilityMenu,
-    EBTUICmdChangeVisibilitySelect,
-    EBTUICmdChangeBTNameMenu,
-    EBTUICmdChangeBTNameSelect,
-    EBTUICmdNewPairedDevice,
-    EBTUICmdDelete,
-    EBTUICmdDeleteAll,
-    EBTUICmdSetTrusted,
-    EBTUICmdSetUnTrusted,
-    EBTUICmdGiveNickname,	
-    EBTUICmdConnect,
-    EBTUICmdConnectAudio,
-    EBTUICmdDisconnect,
-	EBTUICmdChangeSapStateMenu,
-	EBTUICmdChangeSapStateSelect,
-	EBTUICmdMSK,
-	EBTUICmdUnblock,
-	EBTUICmdUnblockAll,
-	EBTUIDeleteTabGroup,
-	EBTUICreateTabGroup,
-	EBTUICmdSetBlocked,
-	EBTUICmdSettings
-	};
-
-enum TBTUITabViewId
-    {
-    EBTUIMainViewTab = 1,
-    EBTUIPairedDevicesViewTab,
-    EBTUIBlockedDevicesViewTab
-    };
-
-enum TBTUINotes
-    {
-    EBTUIGeneralError = 100,
-    EBTUIPhoneVisibleToOthers,
-    EBTUIHiddenFromOthersNote,
-    EBTUINameAlreadyExists,
-    EBTUIInvalidLocalNameNote,
-    EBTUIDeviceSetAsUntrusted,
-    EBTUIWaitingForPairing,    
-    EBTUIConnectingTo,
-    EBTUIDisconnectWired,    
-    EBTUINotIncall,
-    EBTUIBtBusy,
-	EBTUIBtSapEnableNote
-    };
-
-// This enum reflects the "r_bt_label_strings" in .rss file and must follow the same order.
-//
-enum TBTUIMainViewSettingFormatStrings
-    {
-    EBTUISettModulePowerOn,
-    EBTUISettModulePowerOff,
-    EBTUISettVisibilityModeGeneral,
-    EBTUISettVisibilityModeHidden,
-    EBTUISettVisibilityModeTemp,
-    
-    EBTUISettBTNameHeader,
-	EBTUISettSapEnabled,
-	EBTUISettSapDisabled
-    };
-
-// Main list item indexes (see KNumberOfMainViewItems also)
-
-enum TBTMainListItemIndexes
-    {
-    EBTMainListItemPowerMode = 0,
-    EBTMainListItemVisibilityMode,
-    EBTMainListItemNameSetting,
-	EBTMainListItemSapMode,
-	
-	EBTMainListItemVisibilityTimeSetting
-    };
-
-#ifdef __BT_SAP
-    #define KNumberOfMainViewItems 4
-#else
-	#define KNumberOfMainViewItems 3
-#endif
-
-// Maximum lengths of bluetooth device names
-#define KBTUIMaxNameLength   30      // Series 60 local BT name
-#define KBTUIMaxAliasLength  30      // Series 60 friendlyname/alias BT name
-#define KBTUIMaxFormattedNameLength 270     // Localized header (icon indexes with tabs) + name
-
-#define btui_bitmap_file "Z:\\system\\data\\btui.mbm"
-#define btui_bitmap_file_data_caging "Z:\\resource\\apps\\btui.mbm"
-
-#endif      //  BTUI
-
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/btui/inc/btuidevtypemap.h	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,164 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0""
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ *   
+ */
+
+#ifndef BTUIDEVTYPEMAP_H
+#define BTUIDEVTYPEMAP_H
+
+#include <qglobal.h>
+#include <btdevice.h>
+
+class BtuiDevProperty
+{
+public: // type definitions:
+    /*
+     * Major device property values.
+     */
+    enum DevMajorProperty {
+        NullProperty   = 0x00000000, // device without any specific filter.
+        Bonded         = 0x00000001, // device is in registry and bonded with phone
+        Blocked        = 0x00000002, // device is in registry and blocked by user
+        RecentlyUsed   = 0x00000004, // device is in registry and was used in last 30 days.
+        Trusted        = 0x00000008, // device is in registry and authorized by user.
+        InRegistry     = 0x00000010, // device exists in registry.
+        
+        Connected      = 0x00000020, // device is currently connected to one or more 
+                                     // services managed by Bluetooth Engine.
+        Connectable    = 0x00000040, // device is connectable to one or more 
+                                     // services managed by Bluetooth Engine.
+        InRange        = 0x00000100, // device is in range
+
+        // bits re-defined according to Class of Device:
+        Computer         = 0x00010000, // a computer
+        Phone            = 0x00020000, // a phone
+        LANAccessDev     = 0x00040000, // a LAN access point
+        AVDev            = 0x00080000, // an A/V device
+        Peripheral       = 0x00100000, // a peripheral (input device)
+        ImagingDev       = 0x00200000, // an imaging device
+        WearableDev      = 0x00400000, // a wearable device
+        Toy              = 0x00800000, // a toy
+        HealthDev        = 0x01000000, // a health device
+        UncategorizedDev = 0x02000000, // a generic device that is uncategorized
+        
+        // all properties derived from BT registry
+        RegistryProperties = Bonded |
+            Blocked | RecentlyUsed | Trusted | InRegistry,
+        
+        // all properties derived from CoD
+        CodProperties = Computer | Phone | LANAccessDev |
+            AVDev | Peripheral | ImagingDev | WearableDev | 
+            Toy | HealthDev  | UncategorizedDev,
+    };
+    
+    /*
+     * Minor device filters for major property \code AVDev \endcode
+     */
+    enum AVDevMinorProperty {
+        Carkit   = 0x00000001,
+        Headset  = 0x00000002,
+    };
+    
+    /*
+     * Minor device filters for major property \code Peripheral \endcode
+     */
+    enum PeripheralMinorProperty {
+        Mouse    = 0x00000001,
+        Keyboard = 0x00000002,
+    };
+
+public:
+    static void mapDeiveType(int &majorProperty, int &minorProperty, int cod );
+
+};
+
+
+class DevTypeMapping 
+{
+public:    
+    int majorDevClass; // major device class value from CoD
+    int minorDevClass; // minor device class value from CoD
+    int majorProperty;   // one of major properties defined in BtDeviceModel
+    int minorProperty;   // one of minor properties defined in BtDeviceModel
+};
+
+// mapping table from major and minor Device Classes to device types
+// which are specifically defined in Bluetooth ui namespace.
+// (Note audio device mapping is not in this table due to its complex logic)
+static const DevTypeMapping DeviceTypeMappingTable[] =
+{
+{EMajorDeviceComputer,       0, BtuiDevProperty::Computer, 0 },
+{EMajorDevicePhone,          0, BtuiDevProperty::Phone,    0 },
+{EMajorDeviceLanAccessPoint, 0, BtuiDevProperty::LANAccessDev, 0},
+{EMajorDevicePeripheral,     EMinorDevicePeripheralKeyboard, 
+                             BtuiDevProperty::Peripheral, 
+                             BtuiDevProperty::Keyboard},
+{EMajorDevicePeripheral,     EMinorDevicePeripheralPointer, 
+                             BtuiDevProperty::Peripheral, 
+                             BtuiDevProperty::Mouse},
+{EMajorDeviceImaging,        0, BtuiDevProperty::ImagingDev, 0},
+{EMajorDeviceWearable,       0, BtuiDevProperty::WearableDev, 0},
+{EMajorDeviceToy,            0, BtuiDevProperty::Toy, 0}
+};
+
+static const int DeviceTypeMappingTableSize = 
+        sizeof( DeviceTypeMappingTable ) / sizeof( DevTypeMapping );
+
+inline void BtuiDevProperty::mapDeiveType(
+        int &majorProperty, int &minorProperty, int cod  )
+{
+    // remove garbage value.
+    majorProperty = 0;
+    minorProperty = 0;
+    TBTDeviceClass codClass = TBTDeviceClass( cod );
+    
+    // device type must be mapped according to CoD:
+    int majorServiceCls = codClass.MajorServiceClass();
+    int majorDevCls = codClass.MajorDeviceClass();
+    int minorDevCls = codClass.MinorDeviceClass();
+    
+    int i;
+    for (i = 0; i < DeviceTypeMappingTableSize; ++i ) {
+        if ( DeviceTypeMappingTable[i].majorDevClass == majorDevCls &&
+             ( DeviceTypeMappingTable[i].minorDevClass == 0 || 
+               DeviceTypeMappingTable[i].minorDevClass == minorDevCls ) ) {
+             // device classes match a item in table, get the mapping:
+            majorProperty |= DeviceTypeMappingTable[i].majorProperty;
+            minorProperty |= DeviceTypeMappingTable[i].minorProperty;
+            break;
+         }
+    }
+    
+    // AV device mapping are not defined in the table, 
+    // do mapping here if no device type has been mapped so far.
+    // This part is not reliably working with all AV devices.
+    if ( i == DeviceTypeMappingTableSize) {
+        // audio device, carkit, headset or speaker:
+        if( ( majorDevCls == EMajorDeviceAV) 
+            || (majorServiceCls == EMajorServiceRendering 
+            && majorDevCls != EMajorDeviceImaging) ) {
+            majorProperty |= BtuiDevProperty::AVDev;
+            if( minorDevCls == EMinorDeviceAVCarAudio ) {
+                // carkit:
+                minorProperty |= BtuiDevProperty::Carkit; 
+            }
+            else {
+                // headset:
+                minorProperty |= BtuiDevProperty::Headset;
+            }
+        }
+    }
+}
+#endif // BTUIDEVTYPEMAP_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/btui/inc/btuiiconutil.h	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,152 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0""
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ *   
+ */
+
+#ifndef BTUIICONUTIL_H
+#define BTUIICONUTIL_H
+
+#include <qglobal.h>
+#include <bt_sock.h>
+#include <HbIcon>
+#include "btdevicemodel.h"
+#include "btuidevtypemap.h"
+
+enum BtuiIconCorner {
+    BtuiNoCorners   = 0x00,   // No badge needed
+    BtuiBottomLeft  = 0x01,   // Badge for : Paired, Paired & Authorized, Blocked
+    BtuiBottomRight = 0x02,   // Badge for : Connected
+    BtuiTopLeft     = 0x04,   // Badge for : Signal strength
+    BtuiTopRight    = 0x08    // Badge for : Battery low
+};
+
+/*!
+  Creates a HbIcon according to the type of the CBTDevice dev,
+  Creates badges in the icon's 4 corners according to the parameters 
+  passed to the function
+  bottom left corner: Paired, Paired & Authorized, Blocked
+  bottom right corner: Connected
+  top right corner: Battery low
+  top left corner: signal strength
+*/
+
+inline void setBadging(HbIcon &deviceIcon, int majorProperty, int corners)
+{
+    if (corners & BtuiBottomLeft) {
+         if (majorProperty & BtuiDevProperty::Trusted ) {
+             HbIcon badge("qtg_small_authorised");
+             badge.setIconName("qtg_small_authorised");
+             deviceIcon.addBadge(Qt::AlignLeft|Qt::AlignBottom, badge);
+         }
+         else if (majorProperty & BtuiDevProperty::Bonded) {
+             HbIcon badge("qtg_small_pair");
+             badge.setIconName("qtg_small_pair");
+             deviceIcon.addBadge(Qt::AlignLeft|Qt::AlignBottom, badge);
+         }
+         else if (majorProperty & BtuiDevProperty::Blocked) {
+             HbIcon badge("qtg_small_blocked");
+             badge.setIconName("qtg_small_blocked");
+             deviceIcon.addBadge(Qt::AlignLeft|Qt::AlignBottom, badge);
+         }
+     }
+     if (corners & BtuiBottomRight) {
+         if (majorProperty & BtuiDevProperty::Connected) {
+             HbIcon badge("qtg_small_connection");
+             badge.setIconName("qtg_small_connection");
+             deviceIcon.addBadge(Qt::AlignRight|Qt::AlignBottom, badge);
+         }
+     }
+     if (corners & BtuiTopRight) {
+     //ToDo: when power level added to model
+     }
+     if (corners & BtuiTopLeft) {
+     //ToDo: add signal strength.    
+     }
+}
+
+
+/*!
+ * builds device icon based on device type, including badging with connection info, etc.
+ * 
+ * \param cod the integer value of the CoD.
+ * \param majorProperty the major property consisting of BtuiDevProperty::DevMajorProperty bits
+ * \param corners specifies which corners of primary icon 
+ *          should be badged with connectivity, pairing, trust, etc information
+ * \return an HbIcon
+ *       
+ */
+inline HbIcon getBadgedDeviceTypeIcon(int cod, int majorProperty = 0, int corners = BtuiNoCorners)
+{   
+    int uiMajorDevice;
+    int uiMinorDevice;
+    // device type is mapped according to CoD:
+    BtuiDevProperty::mapDeiveType(uiMajorDevice, uiMinorDevice, cod);
+    
+    // Set icon according to the device category
+    QString name;
+    if (uiMajorDevice & BtuiDevProperty::Phone) {
+        name = QString("qtg_large_mobile");
+    }
+    else if (uiMajorDevice & BtuiDevProperty::Computer) {
+        name = QString("qtg_large_computer");
+    }
+    else if (uiMajorDevice & BtuiDevProperty::AVDev) {
+        name = QString("qtg_large_generic_audio");
+    }
+    else if (uiMajorDevice & BtuiDevProperty::Peripheral) {
+        // todo: map to keyboard & mouse from uiMinorDevice
+        name = QString("qtg_large_input_device");
+    }
+    else {
+        name = QString("qtg_large_generic_bluetooth");
+    }
+    HbIcon icon(name);
+    if (corners > BtuiNoCorners) {
+        setBadging(icon, majorProperty, corners);
+    }
+    return icon;
+}
+
+/*
+ * returns device type as a translated string based on  
+ * Class of Device (CoD) parameter
+ */
+inline QString getDeviceTypeString( int cod )
+{   
+    int uiMajorDevice;
+    int uiMinorDevice;
+    // device type is mapped according to CoD:
+    BtuiDevProperty::mapDeiveType(uiMajorDevice, uiMinorDevice, cod);
+    
+    // Set icon according to the device category
+    if (uiMajorDevice & BtuiDevProperty::Phone) {
+        return hbTrId("txt_bt_list_phone");
+    }
+    else if (uiMajorDevice & BtuiDevProperty::Computer) {
+        return hbTrId("txt_bt_list_computer");
+    }
+    else if (uiMajorDevice & BtuiDevProperty::AVDev) {  
+        return hbTrId("txt_bt_list_audio_device");
+    }
+    else if (uiMajorDevice & BtuiDevProperty::Peripheral) {
+        // todo: map to keyboard & mouse
+        return hbTrId("txt_bt_list_input_device");
+    }
+    else {
+        return hbTrId("txt_bt_list_other");
+    }
+}
+
+#endif // BTUIMODELUTIL_H
--- a/bluetoothengine/btui/inc/btuiutil.h	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btui/inc/btuiutil.h	Mon Jul 12 18:51:05 2010 +0300
@@ -1,25 +1,19 @@
 /*
-* ============================================================================
-*  Name        : btuiutil.h
-*  Part of     : BluetoothUI / bluetoothuimodel       *** Info from the SWAD
-*  Description : utilities in the model for some often used functions, 
-*                e.g. conversions between Qt and Symbian types.
-*
-*  Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies).
-*  All rights reserved.
-*  This component and the accompanying materials are made available
-*  under the terms of "Eclipse Public License v1.0"
-*  which accompanies this distribution, and is available
-*  at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-*  Initial Contributors:
-*  Nokia Corporation - initial contribution.
-*
-*  Contributors:
-*  Nokia Corporation
-* ============================================================================
-* Template version: 4.2
-*/
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0""
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ *   
+ */
 
 #ifndef BTUIUTIL_H
 #define BTUIUTIL_H
--- a/bluetoothengine/btui/inc/debug.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,184 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Logging definition
-*
-*/
-
-
-#ifndef PRJ_LOGGING_H
-#define PRJ_LOGGING_H
-
-#include <e32base.h>
-#include <bttypes.h>
-#include "debugconfig.h"
-
-#ifdef PRJ_ENABLE_TRACE
-
-#ifdef PRJ_FILE_TRACE
-#include <flogger.h>
-#else
-#include <e32debug.h>
-#endif
-
-NONSHARABLE_CLASS(TOverflowTruncate16) : public TDes16Overflow
-    {
-public:
-    void Overflow(TDes16& /*aDes*/) {}
-    };
-
-NONSHARABLE_CLASS(TOverflowTruncate8) : public TDes8Overflow
-    {
-public:
-    void Overflow(TDes8& /*aDes*/) {}
-    };
-
-inline void Trace(TRefByValue<const TDesC16> aFmt, ...)
-    {
-    VA_LIST list;
-    VA_START(list,aFmt);
-#ifdef PRJ_FILE_TRACE
-    RFileLogger::WriteFormat(KLogDir, KLogFile, EFileLoggingModeAppend, aFmt, list);
-#else
-    TBuf16<KMaxLogLineLength> theFinalString;
-    theFinalString.Append(KTracePrefix16);
-    TOverflowTruncate16 overflow;
-    theFinalString.AppendFormatList(aFmt,list,&overflow);
-    RDebug::Print(theFinalString);
-#endif
-    }
-
-inline void Trace(TRefByValue<const TDesC8> aFmt, ...)
-    {
-    VA_LIST list;
-    VA_START(list, aFmt);
-#ifdef PRJ_FILE_TRACE
-    RFileLogger::WriteFormat(KLogDir, KLogFile, EFileLoggingModeAppend, aFmt, list);
-#else
-    TOverflowTruncate8 overflow;
-    TBuf8<KMaxLogLineLength> buf8;
-    buf8.Append(KTracePrefix8);
-    buf8.AppendFormatList(aFmt, list, &overflow);
-    TBuf16<KMaxLogLineLength> buf16(buf8.Length());
-    buf16.Copy(buf8);
-    TRefByValue<const TDesC> tmpFmt(_L("%S"));
-    RDebug::Print(tmpFmt, &buf16);
-#endif
-    }
-
-inline void TracePanic(
-    char* aFile, 
-    TInt aLine,
-    TInt aPanicCode,
-    const TDesC& aPanicCategory)
-    {
-    TPtrC8 fullFileName((const TUint8*)aFile);
-    TPtrC8 fileName(fullFileName.Ptr()+fullFileName.LocateReverse('\\')+1);
-    TBuf8<KMaxLogLineLength> buf;
-    buf.Append(KPanicPrefix8);
-    buf.AppendFormat(_L8("%d at line %d in file %S"), aPanicCode, aLine, &fileName);
-    Trace(buf);
-    User::Panic(aPanicCategory, aPanicCode); 
-    }
-
-inline void TraceLeave(char* aFile, TInt aLine, TInt aReason)
-    {
-    TPtrC8 fullFileName((const TUint8*)aFile);
-    TPtrC8 fileName(fullFileName.Ptr()+fullFileName.LocateReverse('\\')+1);
-    TBuf8<KMaxLogLineLength> buf;
-    buf.Append(KLeavePrefix8);
-    buf.AppendFormat(_L8("%d at line %d in file %S"), aReason, aLine, &fileName);
-    Trace(buf);
-    User::Leave(aReason);
-    }
-
-inline void DebugPrintBDAddr(const TBTDevAddr& aAddr)
-    {
-    TBuf<16> addrdes;
-    aAddr.GetReadable(addrdes);
-    Trace(_L("[BTENG]\t BD addr %S") , &addrdes);   
-    }
-
-#define TRACE_INFO(p) {if(KTraceMask & KPRINTINFO) Trace p;}
-
-#define TRACE_ERROR(p) {if(KTraceMask & KPRINTERROR) Trace p;}
-
-#define TRACE_STATE(p) {if(KTraceMask & KPRINTSTATE) Trace p;}
-
-#define TRACE_WARNING(p) {if(KTraceMask & KPRINTWARNING) Trace p;}
-
-#define TRACE_INFO_SEG(p) {if(KTraceMask & KPRINTINFO) p;}
-
-#define TRACE_ASSERT(GUARD, CODE) {if (!(GUARD)) TracePanic(__FILE__, __LINE__, CODE, KPanicCategory);}
-
-#define PANIC(CODE) TracePanic(__FILE__, __LINE__, CODE, KPanicCategory)
-
-#define LEAVE_IF_ERROR(REASON) {if (REASON) TraceLeave(__FILE__, __LINE__, REASON);}
-
-#define LEAVE_IF_NULL(PTR) {if (!PTR) TraceLeave(__FILE__, __LINE__, KErrGeneral);}
-
-#define LEAVE(REASON) {TraceLeave(__FILE__, __LINE__, REASON);}
-
-#define TRACE_STATIC_FUNC_ENTRY {if(KTraceMask & KPRINTINFO) { TPtrC8 ptr8((TUint8*)__PRETTY_FUNCTION__); Trace(KFuncEntryFormat8, &ptr8);}}
-
-#define TRACE_FUNC_ENTRY {if(KTraceMask & KPRINTINFO) { TPtrC8 ptr8((TUint8*)__PRETTY_FUNCTION__); Trace(KFuncEntryThisFormat8, &ptr8, this);}}
-
-#define TRACE_FUNC_EXIT {if(KTraceMask & KPRINTINFO) { TPtrC8 ptr8((TUint8*)__PRETTY_FUNCTION__); Trace(KFuncExitFormat8, &ptr8);}}
-
-#define TRACE_STATIC_FUNC {if(KTraceMask & KPRINTINFO) { TPtrC8 ptr8((TUint8*)__PRETTY_FUNCTION__); Trace(KFuncFormat8, &ptr8);}}
-
-#define TRACE_FUNC {if(KTraceMask & KPRINTINFO) { TPtrC8 ptr8((TUint8*)__PRETTY_FUNCTION__); Trace(KFuncThisFormat8, &ptr8, this);}}
-
-#define RETURN_IF_ERR(ERR) {if(ERR) {TPtrC8 ptr8((TUint8*)__FILE__); Trace(_L8(" RETURN %d at file %S line %d"), ERR, &ptr8, __LINE__); return ERR;}}
-
-#define TRACE_BDADDR( a ) { if( KTraceMask & KPRINTINFO ) DebugPrintBDAddr(a); }
-
-#else // PRJ_ENABLE_TRACE not defined
-
-#define TRACE_INFO(p)
-
-#define TRACE_ERROR(p)
-
-#define TRACE_STATE(p)
-
-#define TRACE_WARNING(p)
-
-#define TRACE_INFO_SEG(p)
-
-#define TRACE_ASSERT(GUARD, CODE)
-
-#define PANIC(CODE) {User::Panic(KPanicCategory, CODE);}
-
-#define LEAVE_IF_ERROR(REASON) {static_cast<void>(User::LeaveIfError(REASON));}
-
-#define LEAVE_IF_NULL(PTR) {static_cast<void>(User::LeaveIfNull(PTR));}
-
-#define LEAVE(REASON) {static_cast<void>(User::Leave(REASON));}
-
-#define TRACE_STATIC_FUNC_ENTRY
-
-#define TRACE_FUNC_ENTRY
-
-#define TRACE_FUNC_EXIT
-
-#define TRACE_STATIC_FUNC
-
-#define TRACE_FUNC
-
-#define RETURN_IF_ERR(ERR) {if(ERR) return ERR;}
-
-#define TRACE_BDADDR( a )
-
-#endif // PRJ_ENABLE_TRACE
-
-#endif // PRJ_LOGGING_H
--- a/bluetoothengine/btui/inc/debugconfig.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  logging configure file.
-*
-*/
-
-
-#ifndef BTUI_DEBUGCONFIG_H
-#define BTUI_DEBUGCONFIG_H
-
-#include "prjconfig.h"
-
-/**
- * Custom logging variations.
- */
-#ifdef PRJ_FILE_TRACE
-_LIT(KLogFile,"btuilog.txt");
-_LIT(KLogDir,"BT");
-#endif
-
-#ifdef PRJ_ENABLE_TRACE
-_LIT(KTracePrefix16, "[BTUI] ");
-_LIT8(KTracePrefix8, "[BTUI] ");
-_LIT8(KFuncFormat8, "><%S");
-_LIT8(KFuncThisFormat8, "><%S, [0x%08X]");
-_LIT8(KFuncEntryFormat8, ">%S");
-_LIT8(KFuncEntryThisFormat8, ">%S, [0x%08X]");
-_LIT8(KFuncExitFormat8, "<%S");
-
-_LIT(KPanicCategory, "BTUI");    
-_LIT8(KPanicPrefix8, "PANIC code ");
-_LIT8(KLeavePrefix8, "LEAVE code ");
-#endif
-
-const TInt KMaxLogLineLength = 512;
-
-#define KPRINTERROR        0x00000001 // Tracing level: error
-#define KPRINTINFO        0x00000002 // Tracing level: function trace
-#define KPRINTSTATE        0x00000004 // Tracing level: state machine info
-#define KPRINTWARNING   0x00000008 // Tracing level: warning
-
-const TInt KTraceMask = KPRINTERROR | KPRINTINFO | KPRINTSTATE | KPRINTWARNING;
-
-#endif // BTUI_DEBUGCONFIG_H
--- a/bluetoothengine/btui/inc/prjconfig.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Project configure file.
-*
-*/
-
-
-#ifndef BTUI_PRJCONFIG_H
-#define BTUI_PRJCONFIG_H
-
-/**
- * Traces are enabled in _DEBUG build, by default.
- */
-#ifdef _DEBUG
-#define PRJ_ENABLE_TRACE
-#endif
-
-/**
- * traces to file if this is defined.
- */
-//#define PRJ_FILE_TRACE
-
-
-/**
- * build the project for module test purpose if this is defined
- */
-//#define PRJ_MODULETEST_BUILD
-
-/**
- * build the project using stubs to replace the dependencies if this is defined
- */
-//#define PRJ_USE_STUB
-
-
-#endif // BTUI_PRJCONFIG_H
--- a/bluetoothengine/btui/inc/traceconfig.h	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btui/inc/traceconfig.h	Mon Jul 12 18:51:05 2010 +0300
@@ -1,24 +1,19 @@
 /*
-* ============================================================================
-*  Name        : traceconfig_template.h
-*  Part of     : BluetoothUI / bluetoothuimodel       *** Info from the SWAD
-*  Description : Configuration of debug tracing in bluetoothuimodel
-*
-*  Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies).
-*  All rights reserved.
-*  This component and the accompanying materials are made available
-*  under the terms of "Eclipse Public License v1.0"
-*  which accompanies this distribution, and is available
-*  at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-*  Initial Contributors:
-*  Nokia Corporation - initial contribution.
-*
-*  Contributors:
-*  Nokia Corporation
-* ============================================================================
-* Template version: 4.2
-*/
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0""
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ *   
+ */
 #ifndef BLUETOOTHTRACECONFIG_H
 #define BLUETOOTHTRACECONFIG_H
 
--- a/bluetoothengine/btui/loc/btui.loc	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,528 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This is a localisation file for Bluetooth UI application.
-*
-*/
-
-
-// LOCALISATION STRINGS
-
-// Please note! Default class of device names are defined in "btnotif.loc".
-
-
-// *** CAPTION STRINGS ***
-
-// d: BTUI application name on the application shell's app. list
-// l: list_single_large_graphic_pane_t1
-// 
-#define qtn_apps_bluetooth_list "Bluetooth"
-
-// d: BTUI application name on the application shell's app. grid
-// l: cell_app_pane_t1
-// 
-#define qtn_apps_bluetooth_grid "Bluetooth"
-
-
-// *** TITLES ***
-
-// d: Status pane title for main view
-// l: title_pane_t2/opt9
-//  
-#define qtn_bt_title_bluetooth "Bluetooth"
-
-// d: Status pane title for paired devices view
-// l: title_pane_t2/opt9
-// 
-#define qtn_bt_title_paired_dev "Paired devices"
-
-
-// *** MAIN VIEW SETTING ITEMS ***
-
-// d: The setting item title for bluetooth functionality (1st item)
-// l: list_setting_pane_t1
-// 
-#define qtn_bt_sett_module "Bluetooth"
-
-// d: The setting item value when bluetooth functionality is enabled
-// l: list_set_graphic_pane_t1
-// 
-#define qtn_bt_sett_on "On"
-
-// d: The setting item value when bluetooth functionality is disabled
-// l: list_set_graphic_pane_t1
-// 
-#define qtn_bt_sett_off "Off"
-
-// d: The setting item title for phone's bluetooth visibility mode (2nd item)
-// l: list_setting_pane_t1
-//
-#define qtn_bt_sett_phone_visibility "My phone's visibility" 
-
-// d: The setting item value visibility mode
-// l: list_set_graphic_pane_t1
-//
-#define qtn_bt_det_sett_general "Shown to all" 
-
-// d: The setting item value visibility mode
-// l: list_set_graphic_pane_t1
-//
-#define qtn_bt_hidden "Hidden"
-
-// d: The setting item title for phones bluetooth name (3rd item)
-// d: Also for the title of settings item editing window for phones bluetooth name
-// l: list_setting_pane_t1
-//
-#define qtn_bt_sett_bt_name "My bluetooth name"
-
-// d: The setting item title for SIM Access Profile (4th item)
-// l:  list_setting_pane_t1
-//
-#define qtn_bt_sap "SIM Access Profile"
-
-// d: The setting item value when SIM Access Profile is enabled
-// l: list_set_graphic_pane_t1
-//
-#define qtn_bt_sap_enabled "Enabled"
-
-// d: The setting item value when SIM Access profile is disabled
-// l: list_set_graphic_pane_t1
-//
-#define qtn_bt_sap_disabled "Disabled"
-
-// *** EMPTY LISTS ***
-
-// d: Empty list text when there are no paired devices
-// l: main_list_empty_pane
-//
-#define qtn_bt_no_paired_devices "(no paired devices)"
-
-
-// *** MENU POPUP OPTIONS ***
-
-// d: Command in options list
-// l: list_single_pane_t1_cp2
-//
-#define qtn_bt_change_value "Change"
-
-// d: Command in options list
-// l: list_single_pane_t1_cp2
-//
-#define qtn_bt_new_paired_device "New paired device"
-
-// d: Command in options list
-// l: list_single_pane_t1_cp2
-//
-#define qtn_bt_give_nickname "Assign short name"
-
-// d: Command in options list
-// l: list_single_pane_t1_cp2
-//
-#define qtn_bt_set_as_trusted "Set as authorised"
-
-// d: Command in options list
-// l: list_single_pane_t1_cp2
-//
-#define qtn_bt_set_as_untrusted "Set as unauthorised"
-
-// d: Command in options list
-// l: list_single_pane_t1_cp2
-//
-#define qtn_bt_delete "Delete"
-
-// d: Command in options list
-// l: list_single_pane_t1_cp2
-//
-#define qtn_bt_delete_all "Delete all"
-
-// d: Command in options list, and this text should inform user that only an audio connection can be established with this command.
-// l: list_single_pane_t1_cp2
-//
-#define qtn_bt_connect "Connect to audio"
-
-// d: Command in options list, and this text should inform user that connection can be established with this command.
-// l: list_single_pane_t1_cp2
-//
-#define qtn_bt_gen_connect "Connect"
-
-// d: Command in options list
-// l: list_single_pane_t1_cp2
-//
-#define qtn_bt_disconnect "Disconnect"
-
-// d: Command in options list
-// l: list_single_pane_t1_cp2
-//
-#define qtn_bt_settings "Settings"
-
-
-// *** QUERIES ***
-
-// d: Confirmation query if the value Enabled is selected when Bluetooth is off
-// l: popup_note_window
-//
-#define qtn_bt_sap_enable_info "Enabling SIM Access Profile connection Bluetooth must be on"
-
-// d: Data query when user has opened BTUI (for first time) and
-// d: there is no local Bluetooth name defined yet (empty name).
-// l: popup_query_data_window
-//
-#define qtn_enter_bt_name "My Bluetooth name:"
-
-// d: Confirmation query to disable bluetooth functionality while there is still connections active.
-// l: popup_note_window
-//
-#define qtn_bt_switch_off_anyway "Active Bluetooth connection. Switch off anyway?"
-
-// d: Confirmation query when Bluetooth needs to be activated in off-line mode.
-// l: popup_note_window
-//
-#define qtn_bt_activate_in_offline "Do you want to activate bluetooth in off-line mode?"
-
-// d: Confirmation query when bluetooth functionality is off and user action (connect) cannot be performed.
-// l: popup_note_window
-//
-#define qtn_bt_is_off "Bluetooth is currently switched off.\nSwitch on?"
-
-// d: Confirmation query when user has requested to remove pairing for bluetooth device concerned.
-// l: popup_note_window
-//
-#define qtn_bt_warn_erase "Delete pairing with: %U"
-
-// d: Confirmation query when user has requested to remove pairing with connected Bluetooth device.
-// d: %U contains device name.
-// l: popup_note_window
-//
-#define qtn_bt_warn_erase_connected "Deleting this pairing will disconnect %U"
-
-// d: Confirmation query when user has requested to remove all pairings.
-// l: popup_note_window
-//
-#define qtn_bt_warn_erase_all "Delete all pairings?"
-
-// d: Confirmation query when user has requested to remove all pairings and 
-// some ( or only one ) of the devices are connected.
-// l: popup_note_window
-//
-#define qtn_bt_warn_erase_all_connected "Delete all pairings? Some devices may be disconnected." 
-
-// d: Data query when user has requested to change local friendlyname/nickname for bluetooth device concerned.
-// l: popup_query_data_window
-//
-#define qtn_bt_enter_nickname "Short name:"
-
-// d: Confirmation query when user has requested to change Bluetooth device security to trusted.
-// l: popup_note_window
-//
-#define qtn_bt_conf_aut "Connections will take place automatically without confirmation. Continue?"
-
-// d: Confirmation query when disconnecting BT Accessory.
-// l: popup_note_window
-//
-#define qtn_bt_disconn_from "Disconnect from: %U"
-
-
-// *** NOTES ***
-
-// d: Information note after the phone's visibility has changed to general.
-// l: popup_note_window
-//
-#define qtn_bt_phone_visib_to_oth "Phone is detectable by all other devices."
-
-// d: Information note after the phone's visibility has changed to hidden.
-// l: popup_note_window
-//
-#define qtn_bt_hidden_from_others "Phone is not detectable in searches made by other devices" 
-
-// d: Error note after user has changed the local friendlyname/nickname and it conflicts with existing one
-// l: popup_note_window
-//
-#define qtn_bt_name_exists "Short name already in use"
-
-// d: Confirmation note when user has requested to change Bluetooth device security to untrusted.
-// l: popup_note_window
-//
-#define qtn_bt_dev_set_as_untrust "Device set as unauthorised. Connection requests will require confirmation." 
-
-// d: Error note for situations which are not defined in UI specs. and user interaction cannot be completed.
-// l: popup_note_window
-//
-#define qtn_bt_general_error "Unable to perform Bluetooth operation"
-
-// d: Wait note after "New paired device" is executed from paired devices view.
-// d: %U contains device name.
-// l: popup_note_wait_window
-//
-#define qtn_bt_waiting "Waiting for response from %U"
-
-
-// d: Information note for disconnecting wired accessory
-// d: %U contains device name.
-// l: popup_note_window
-//
-#define qtn_bt_disconnect_wired "Disconnect wired accessory"
-
-// d: Wait note during connection establishment.
-// d: %U contains device name.
-// l: popup_note_window
-//
-#define qtn_bt_wait_connecting_to "Connecting to %U"
-
-// d: Information note telling there's already an active BTAA connection.
-// d: %U contains device name.
-// l: popup_note_window
-//
-#define qtn_bt_disconnect_first "Disconnect %U first"
-
-// d: Information note telling there's already an active BTAA connection with call ongoing.
-// l: popup_note_window
-//
-#define qtn_bt_not_incall "Not possible during a call"
-
-// d: Information note if there is maximum number of connections and new one can not be created.
-// l: popup_note_window
-//
-#define qtn_bt_busy "Maximum amount of Bluetooth connections in use. Can't establish a new one."
-
-// d: An information note when Bluetooth needs to be activated and it's disallowed in off-line mode.
-// l: popup_note_window
-//
-#define qtn_bt_offline_disabled "Bluetooth can't activated in off-line mode"
-
-// d: Information note telling there's already an active BTAA connection.
-// d: %U contains device name.
-// l: popup_note_window
-//
-#define qtn_bt_disconnect_first_stereo "Disconnect %0U device and %1U device first"
-
-// *** GLOBAL NOTES ***
-
-// d: Global Information note telling audio is routed to BT handsfree.
-// l: popup_note_window
-//
-#define qtn_bt_audio_accessory "Audio routed to BT handsfree"
-
-// d: Global Information note for successful connection establishment.
-// d: %U contains device name.
-// l: popup_note_window
-//
-#define qtn_bt_conf_connected "Connected to %U"
-
-// d: Global Information note for successful connection close.
-// d: %U contains device name.
-// l: popup_note_window
-//
-#define qtn_bt_conf_disconnected "Disconnected from %U"
-
-// d: Global Information note for unsuccessful connection establishment.
-// d: Reason: The audio device does not support Hands-Free Profile.
-// d: %U contains device name.
-// l: popup_note_window
-//
-#define qtn_bt_hfp_not_supported "Hands-Free Profile not supported by %U"
-
-// d: Global Information note for unsuccessful connection establishment.
-// d: Reason: The audio device does not support Bluetooth Hands-Free nor Headset Profile.
-// d: %U contains device name.
-// l: popup_note_window
-//
-#define qtn_bt_device_not_supported "Unsupported device: %U"
-
-
-// VISIBILITY MODE OPTION
-
-//d:The setting item value of visibility mode (option item in radio box)
-//l:list_set_graphic_pane_t1
-//w:
-//r:3.1
-//
-#define qtn_bt_set_visibility_time "Set visibility time"
-
-//d:The setting item value of visibility mode (shows in listbox after visibility timeout set)
-//l:list_set_graphic_pane_t1
-//w:
-//r:3.1
-//
-#define qtn_bt_temp_visible "Temporarily visible"
-
-
-// VISIBLILITY TIME SETTING SLIDER
-
-//d:Text in slider control head label
-//d:visibility time-out setting page
-//l:list_setting_pane_t1
-//w:
-//r:3.1
-//
-#define qtn_bt_slider_visibility_time "Visibility time"
-
-//d:Text in slider control slider's current value label
-//d:visibility time-out setting page
-//d:Current value when it's 1 minute
-//l:list_set_graphic_pane_t1
-
-//w:
-//r:3.1
-//
-#define qtn_bt_slider_singular "%U minute"
-
-//d:Text in slider control slider's current value label
-//d:visibility time-out setting page
-//d:Current value when it's > 1 minute 
-//l:list_set_graphic_pane_t1
-//w:
-//r:3.1
-//
-#define qtn_bt_slider_plural "%U minutes"
-
-//d:Text in slider control
-//d:visibility time-out setting page
-//d:Minimum value
-//l:setting_slider_pane_t2
-
-//w:
-//r:3.1
-//
-#define qtn_bt_slider_min "1 min"
-
-//d:Text in slider control
-//d:visibility time-out setting page
-//d:Maximum value
-//l:setting_slider_pane_t2
-
-//w:
-//r:3.1
-//
-#define qtn_bt_slider_max "60 min"
-
-//Blocked device view
-
-// d: Command in options list
-// l: list_single_pane_t1_cp2
-// w:
-// r: 3.2
-#define qtn_bt_block "Block"
-
-// d: Status pane title for blocked devices view
-// l:  title_pane_t2/opt9
-
-// w: 
-// r: 3.2
-#define qtn_bt_title_blocked_devices "Blocked devices" 
-
-// d: query header of the message queries about blocked devices
-// l: heading_pane_t1
-// w: 
-// r: 3.2
-#define qtn_bt_block_device_header "Block device?"
-
-// d: text of dialog asking about blocking a paired devices.
-// l: popup_info_list_pane_t1
-// w: 
-// r:3.2
-#define qtn_bt_block_paired_device "Do you want to block all future connection attempts from paired device ?U? \nThis will delete your pairing with the device."
-
-
-// d: text of dialog asking about blocking a paired devices.
-// l: popup_info_list_pane_t1
-// w: 
-// r:3.2
-#define qtn_bt_block_connected_paired_devices "Do you want to block all future connection attempts from paired device ?U?\n This will disconnect the device and delete your pairing with it."
-
-// d: the link key to help in blocking queries.
-// l: popup_info_list_pane_t1
-// w:
-// r: 3.2
-#define qtn_bt_block_device_link "More Info"
-
-// d: the query text about deleting one blocking.
-// l: popup_note_window
-// w:
-// r: 3.2
-#define qtn_bt_warn_erase_blocked "Delete blocked device\n%U?"
-
-// d: the query text about deleting all blockings
-// l: popup_note_window
-// w:
-// r: 3.2
-#define qtn_bt_warn_erase_all_blocked "Delete all blocked devices?"
-
-// d: Empty list text when there are no blocked devices
-// l: main_list_empty_pane
-// w:
-// r: 3.2
-#define qtn_bt_no_blocked_devices "(no blocked devices)"
-
-// d: Empty list primary text when there are no blocked devices
-// l: main_pane_empty_t1/opt2
-// w:
-// r: 3.2
-#define qtn_bt_empty_blocked_view_primary_text "(no blocked devices)"
-
-// d: Empty list secondary text when there are no blocked devices
-// l: main_list_empty_pane/opt2
-// w:
-// r: 3.2
-#define qtn_bt_empty_blocked_view_sedondary_text "Block devices only if you wish to ever receive connections from them."
-
-// *** For General Setting Application ***
-
-// *** Caption for General Setting Application ***
-// d: BTUI Setting caption 
-// l: list_double_large_graphic_pane_t1
-// w:
-// r: 3.1
-#define qtn_set_folder_bluetooth "Bluetooth"
-
-// d: Secondary status information of BT power, discoverability and connection
-// l: list_double_large_graphic_pane_t2
-// w:
-// r:5.0
-#define qtn_cp_detail_bt_off "Switched off"
-
-// d: Secondary status information 
-// l: list_double_large_graphic_pane_t2
-// w:
-// r:5.0
-#define qtn_cp_detail_bt_on_shown "Enabled, shown to all"
-
-// d: Secondary status information 
-// l: list_double_large_graphic_pane_t2
-// w:
-// r:5.0
-#define qtn_cp_detail_bt_on_hidden "Enabled, hidden"
-
-// d: Secondary status information 
-// l: list_double_large_graphic_pane_t2
-// w:
-// r:5.0
-#define qtn_cp_detail_bt_conn_shown "Connected, shown to all"
-
-// d: Secondary status information 
-// l: list_double_large_graphic_pane_t2
-// w:
-// r:5.0
-#define qtn_cp_detail_bt_conn_hidden "Connected, hidden"
-
-// *** Error code handling for SSP PasskeyEntry mode ***
-// d: Warning Note if the passcode entered on the remote device doesn't match the one given on the local device (Passkey Entry mode).
-// l: popup_note_window
-// r: 5.1
-#define qtn_bt_simple_incorrect_passcode "Incorrect passcode"
-
-// d: Query gives the user an option to enter a passcode again (Passkey Entry mode).
-// l: popup_note_window
-// r: 5.1
-#define qtn_bt_simple_passcode_retry "Try again?"
-
-// End of File
--- a/bluetoothengine/btui/rom/BtuiResources.iby	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef __BTUIRESOURCES_IBY__
-#define __BTUIRESOURCES_IBY__
-
-#ifdef __BT
-//Resource file(s) for BTUI application (BtUi.iby)
-data=DATAZ_\APP_RESOURCE_DIR\BTUI.RSC                         APP_RESOURCE_DIR\Btui.rsc
-
-//View resource in Ecom plutin
-data=DATAZ_\RESOURCE_FILES_DIR\BtuiViewResources.rsc	RESOURCE_FILES_DIR\BtuiViewResources.rsc
-
-#endif //__BT
-#endif //__BTUIRESOURCES_IBY__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/btui/rom/btui_resources.iby	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,31 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef __BTCPPLUGIN_RESOURCES_IBY__
+#define __BTCPPLUGIN_RESOURCES_IBY__
+
+#include <data_caging_paths_for_iby.hrh>
+#include <bldvariant.hrh>
+#ifdef __BT
+
+//For localization resource
+data=DATAZ_/QT_TRANSLATIONS_DIR/btviews.qm QT_TRANSLATIONS_DIR/btviews.qm
+data=DATAZ_/QT_TRANSLATIONS_DIR/btdialogs.qm QT_TRANSLATIONS_DIR/btdialogs.qm
+data=DATAZ_/QT_TRANSLATIONS_DIR/btindimenu.qm QT_TRANSLATIONS_DIR/btindimenu.qm
+
+#endif //__BT
+#endif // __BTCPPLUGIN_RESOURCES_IBY__
--- a/bluetoothengine/btui/src/BTUIApp.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:   This is the implementation of application class.
- *
-*/
-
-
-// INCLUDE FILES
-
-#include "btui.h"       // Global declarations
-#include "BTUIApp.h"
-#include "BTUIDocument.h"
-
-// ---------------------------------------------------------
-// CBTUIApp::AppDllUid()
-// Returns application UID
-// ---------------------------------------------------------
-//
-TUid CBTUIApp::AppDllUid() const
-    {
-    return KBtuiUid3;
-    }
-
-// ---------------------------------------------------------
-// CBTUIApp::CreateDocumentL()
-// Creates CBTUIDocument object
-// ---------------------------------------------------------
-//
-CApaDocument* CBTUIApp::CreateDocumentL()
-    {
-    return CBTUIDocument::NewL( *this );
-    }
-
-#include <eikstart.h>
-
-// ---------------------------------------------------------
-// NewApplication()
-// ---------------------------------------------------------
-LOCAL_C CApaApplication* NewApplication()
-    {
-    return new CBTUIApp;
-    }
-// ---------------------------------------------------------
-// E32Main()
-// ---------------------------------------------------------
-GLDEF_C TInt E32Main()
-    {
-    return EikStart::RunApplication(NewApplication);
-    }    
-
-  
-
-
--- a/bluetoothengine/btui/src/BTUIAppUi.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,214 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:   This class the care of opening and closing the views.
- *
-*/
-
-
-// INCLUDE FILES
-#include "BTUIDocument.h"
-#include <aknview.h>
-#include "BTUIAppUi.h"
-#include <avkon.hrh>
-#include <aknappui.h>
-#include "BtuiPluginInterface.h"
-#include "btui.h"
-#include "BTUIMainView.h"
-#include "debug.h"
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ----------------------------------------------------------
-// CBTUIAppUi::ConstructL
-//
-// Symbian 2nd phase constructor can leave. 
-// Contains status pane, navi pane, tab group and view 
-// creations and setting the main view active.
-// ----------------------------------------------------------
-//
-void CBTUIAppUi::ConstructL()
-    {
-    TRACE_FUNC_ENTRY
-
-    BaseConstructL( EAknEnableSkin | EAknEnableMSK | EAknSingleClickCompatible);
-
-    // Show tabs for main views from resources
-    CEikStatusPane* sp = StatusPane();
-
-    // Fetch pointer to the default navi pane control
-    iNaviPane = (CAknNavigationControlContainer*)sp->ControlL(TUid::Uid(EEikStatusPaneUidNavi));
-
-    // Tabgroup has been read from resource and it were pushed to the navi pane.
-    // Get pointer to the navigation decorator and set this to be a MAknTabObserver    
-    iDecoratedTabGroup = iNaviPane->ResourceDecorator();
-
-    if (iDecoratedTabGroup)
-        {
-        iTabGroup = (CAknTabGroup*) iDecoratedTabGroup->DecoratedControl();
-        iTabGroup->SetObserver( this );
-        }    
-        
-    // -----------------------------------------------------------------------    
-    // Construct Views by calling ECOM interface CBtuiPluginInterface's 
-    // factory function NewL(), which in turn will call instantiation funtion
-    // of the concrate class that implement this interface.
-    // -----------------------------------------------------------------------
-        
-	// 1.Construct Mainview 
-	// 
-    CBtuiPluginInterface* mainView = CBtuiPluginInterface::NewL(KBtuiPluginUidMainView,(MBtuiPluginViewActivationObserver*) this );
-   		
-    CleanupStack::PushL( mainView );
-    AddViewL( mainView ); // Transfer ownership to CAknViewAppUi
-    CleanupStack::Pop(mainView );    
-
-	// 2.Construct OtherDeviceView
-	//
-    CBtuiPluginInterface* otherDeviceView = CBtuiPluginInterface::NewL(
-    	KBtuiPluginUidPairedDevicesView, (MBtuiPluginViewActivationObserver*) this );	
-
-    CleanupStack::PushL( otherDeviceView );
-    AddViewL( otherDeviceView ); // Transfer ownership to CAknViewAppUi
-    CleanupStack::Pop(otherDeviceView );
-
-	// 3.Construct BlockDeviceView
-	//
-    CBtuiPluginInterface* blockDeviceView = CBtuiPluginInterface::NewL(
-    	KBtuiPluginUidBlockedDevicesView , (MBtuiPluginViewActivationObserver*) this );	
-
-    CleanupStack::PushL( blockDeviceView );
-    AddViewL( blockDeviceView ); // Transfer ownership to CAknViewAppUi
-    CleanupStack::Pop(blockDeviceView );
-
-    //ActivateLocalViewL( mainView->Id() ); 
-    TRACE_FUNC_EXIT
-    }
-
-// ----------------------------------------------------
-// CBTUIAppUi::~CBTUIAppUi
-// ----------------------------------------------------
-//
-CBTUIAppUi::~CBTUIAppUi() 
-    {
-    TRACE_FUNC_ENTRY
-    if(iNaviPane != NULL && iDecoratedTabGroup != NULL)
-    	{
-    
-  		delete iDecoratedTabGroup; // Tabgroup was read from resource.
-  		iDecoratedTabGroup=NULL;
-    	}
-  	
-	REComSession::FinalClose();
-  	
-    TRACE_FUNC_EXIT
-    }
-
-
-// ------------------------------------------------------------------------------
-// CBTUIAppUi::DynInitMenuPaneL
-//
-// This function is called by the UIKON framework just before it displays
-// a menu pane. Its default implementation is empty, and by overriding it,
-// the application can set the state of menu items dynamically according
-// to the state of application data.
-// ------------------------------------------------------------------------------
-//
-void CBTUIAppUi::DynInitMenuPaneL( TInt /* aResourceId */, CEikMenuPane* /* aMenuPane */ )
-    {
-    }
-
-// ----------------------------------------------------
-// CBTUIAppUi::HandleKeyEventL
-// ----------------------------------------------------
-//
-
-TKeyResponse CBTUIAppUi::HandleKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType )
-    {
-    TRACE_FUNC
-
-    iTabGroup = (CAknTabGroup*)iDecoratedTabGroup->DecoratedControl();
-    
-	//  Event will not be handled, if:
-	//  1.It is not a key event.  
-	//  2.No tab group be created yet.
-	//  3.Device's BT name hasn't been initialized by user yet.   
-	//
-    if (aType != EEventKey || !iTabGroup ) 
-        {
-        return EKeyWasNotConsumed;
-        }
-
-    return 	iTabGroup->OfferKeyEventL(aKeyEvent, aType);
-    }
-
-// ----------------------------------------------------
-//  CBTUIAppUi::HandleCommandL
-//
-// Handle user commands. All commands are handled via
-// this routine.
-// ----------------------------------------------------
-//
-void CBTUIAppUi::HandleCommandL(TInt aCommand)
-    {
-    TRACE_INFO((_L("command = %d"), aCommand ))
-
-    switch ( aCommand )
-        {
-        case EAknCmdExit:
-        case EEikCmdExit:
-            {
-            Exit();
-            break;
-            }
-        default:
-            {
-            break;
-            }
-        }
-    }
-// ----------------------------------------------------
-// CBTUIAppUi::PluginViewActivated
-// ----------------------------------------------------
-//   
-void CBTUIAppUi::PluginViewActivated(TPluginViewId aViewId)
-
-    {
-    TRACE_INFO((_L("view id = %d"), aViewId ))        
-    if(iTabGroup->ActiveTabId()!=aViewId)
-        {            
-            iTabGroup->SetActiveTabById(aViewId);
-        }
-    }
-
-// ----------------------------------------------------
-// CBTUIAppUi::TabChangedL
-// ----------------------------------------------------
-//
-void CBTUIAppUi::TabChangedL(TInt aIndex)
-    {
-    TRACE_FUNC
-    switch (aIndex)
-    	{
-    	case 0:
-		    ActivateLocalViewL(KBtuiPluginUidMainView);
-			break;
-    	case 1:
-		    ActivateLocalViewL(KBtuiPluginUidPairedDevicesView);    	
-			break;    	
-    	case 2:
-		    ActivateLocalViewL(KBtuiPluginUidBlockedDevicesView);    	
-			break;    	
-    	}
-    }
-    
--- a/bluetoothengine/btui/src/BTUIDocument.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:    This is the implementation of document class.
- *
-*/
-
- 
-// INCLUDE FILES
-
-#include "BTUIDocument.h"
-#include "debug.h"
-#include "BTUIAppUi.h"
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ----------------------------------------------------
-// Destructor
-// ----------------------------------------------------
-//
-CBTUIDocument::~CBTUIDocument()
-    {
-    TRACE_FUNC
-  //  delete iModel;
-    }
-
-// ----------------------------------------------------
-// Symbian OS default constructor can leave.
-// ----------------------------------------------------
-//
-void CBTUIDocument::ConstructL()
-    {
-    TRACE_FUNC
-    }
-
-// ----------------------------------------------------
-// Two-phased constructor
-// ----------------------------------------------------
-//
-CBTUIDocument* CBTUIDocument::NewL( CAknApplication& aApp ) // CBTUIApp reference
-    {
-    CBTUIDocument* self = new (ELeave) CBTUIDocument( aApp );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self);
-
-    return self;
-    }
-
-// ----------------------------------------------------
-// CBTUIDocument::CreateAppUiL()
-// constructs CBTUIAppUi
-// ----------------------------------------------------
-//
-CEikAppUi* CBTUIDocument::CreateAppUiL()
-    {
-    return new (ELeave) CBTUIAppUi;
-    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/conf/TestFramework.ini	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,200 @@
+#
+# This is STIF initialization file
+# Comment lines start with '#'-character.
+# See STIF TestFramework users guide.doc for instructions
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Set following test engine settings:
+#	- Set Test Reporting mode. TestReportMode's possible values are:
+#		+ 'Summary': Summary of the tested test cases.
+#		+ 'Environment': Hardware and software info.
+#		+ 'TestCases': Test case report.
+#		+ 'FullReport': Set of all above ones.
+#		+ Example 'TestReportMode= Summary TestCases'
+#
+# 	- CreateTestReport setting controls report creation mode
+#		+ YES, Test report will created.
+#		+ NO, No Test report.
+#
+# 	- File path indicates the base path of the test report.
+# 	- File name indicates the name of the test report.
+#
+# 	- File format indicates the type of the test report.
+#		+ TXT, Test report file will be txt type, for example 'TestReport.txt'.
+#		+ HTML, Test report will be html type, for example 'TestReport.html'.
+#
+# 	- File output indicates output source of the test report.
+#		+ FILE, Test report logging to file.
+#		+ RDEBUG, Test report logging to using rdebug.
+#
+# 	- File Creation Mode indicates test report overwriting if file exist.
+#		+ OVERWRITE, Overwrites if the Test report file exist.
+#		+ APPEND, Continue logging after the old Test report information if
+#                 report exist.
+# 	- Sets a device reset module's dll name(Reboot).
+#		+ If Nokia specific reset module is not available or it is not correct one
+#		  StifHWResetStub module may use as a template for user specific reset
+#		  module.
+# 	- Sets STIF test measurement disable options. e.g. pluging1 and pluging2 disablation
+#		DisableMeasurement= stifmeasurementplugin01 stifmeasurementplugin02
+#
+
+[Engine_Defaults]
+
+TestReportMode= FullReport		# Possible values are: 'Empty', 'Summary', 'Environment',
+                                #                              'TestCases' or 'FullReport'
+
+CreateTestReport= YES			# Possible values: YES or NO
+
+TestReportFilePath= C:\LOGS\TestFramework\
+TestReportFileName= TestReport
+
+TestReportFormat= TXT			# Possible values: TXT or HTML
+TestReportOutput= FILE			# Possible values: FILE or RDEBUG
+TestReportFileCreationMode= OVERWRITE	# Possible values: OVERWRITE or APPEND
+
+DeviceResetDllName= StifResetForNokia.dll # e.g. 'StifHWResetStub.dll' for user specific reseting
+
+DisableMeasurement= stifmeasurementdisablenone	# Possible values are:
+						# 'stifmeasurementdisablenone', 'stifmeasurementdisableall'
+					  	# 'stifmeasurementplugin01', 'stifmeasurementplugin02',
+					  	# 'stifmeasurementplugin03', 'stifmeasurementplugin04',
+					  	# 'stifmeasurementplugin05' or 'stifbappeaprofiler'
+
+Timeout= 0                              # Default timeout value for each test case. In milliseconds
+
+[End_Defaults]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Module configurations start
+# Modules are added between module tags
+# tags. Module name is specified after ModuleName= tag, like
+# ModuleName= XXXXXXXXX
+# Modules might have initialisation file, specified as
+# IniFile= c:\testframework\YYYYYY
+# Modules might have several configuration files, like
+# TestCaseFile= c:\testframework\NormalCases.txt
+# TestCaseFile= c:\testframework\SmokeCases.txt
+# TestCaseFile= c:\testframework\ManualCases.txt
+
+# (TestCaseFile is synonym for old term ConfigFile)
+
+# Following case specifies demo module settings. Demo module
+# does not read any settings from file, so tags 
+# IniFile and TestCaseFile are not used.
+# In the simplest case it is enough to specify only the
+# name of the test module when adding new test module
+
+[New_Module]
+ModuleName= TestScripter
+TestCaseFile= c:\testframework\btserviceutiltest.cfg
+TestCaseFile= c:\testframework\btnotifwrappertest.cfg
+TestCaseFile= c:\testframework\btnotifsrvtest.cfg
+#TestCaseFile= c:\testframework\btnotifclienttest.cfg
+[End_Module]
+
+#
+# Load testmoduleXXX, optionally with initialization file and/or test case files
+#[New_Module]
+#ModuleName= testmodulexxx
+
+#TestModuleXXX used initialization file
+#IniFile= c:\testframework\init.txt
+
+#TestModuleXXX used configuration file(s)
+#TestCaseFile= c:\testframework\testcases1.cfg
+#TestCaseFile= c:\testframework\testcases2.cfg
+#TestCaseFile= c:\testframework\manualtestcases.cfg
+
+#[End_Module]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Set STIF logging overwrite parameters for Logger.
+# 	Hardware and emulator environment logging path and styles can
+# 	be configured from here to overwrite the Logger's implemented values.
+#	
+#	Settings description:
+#	- Indicates option for creation log directory/directories. If log directory/directories
+#         is/are not created by user they will make by software.
+#		+ YES, Create log directory/directories if not allready exist.
+#		+ NO, Log directory/directories not created. Only created one is used.
+#
+#	- Overwrite emulator path setting.
+#		+ Example: If 'EmulatorBasePath= C:\LOGS\TestFramework\' and in code is defined 
+#		           Logger's path 'D:\\LOGS\\Module\\' with those definition the path
+#		           will be 'C:\LOGS\TestFramework\LOGS\Module\'
+#
+#	- Overwrite emulator's logging format.
+#		+ TXT, Log file(s) will be txt type(s), for example 'Module.txt'.
+#		+ HTML, Log file(s) will be html type(s), for example 'Module.html'.
+#
+#	- Overwrited emulator logging output source.
+#		+ FILE, Logging to file(s).
+#		+ RDEBUG, Logging to using rdebug(s).
+#
+#	- Overwrite hardware path setting (Same description as above in emulator path).
+#	- Overwrite hardware's logging format(Same description as above in emulator format).
+#	- Overwrite hardware's logging output source(Same description as above in emulator output).
+#
+#	- File Creation Mode indicates file overwriting if file exist.
+#		+ OVERWRITE, Overwrites if file(s) exist.
+#		+ APPEND, Continue logging after the old logging information if file(s) exist.
+#
+#	- Will thread id include to the log filename.
+#		+ YES, Thread id to log file(s) name, Example filename 'Module_b9.txt'.
+#		+ NO, No thread id to log file(s), Example filename 'Module.txt'.
+#
+#	- Will time stamps include the to log file.
+#		+ YES, Time stamp added to each line in log file(s). Time stamp is 
+#                 for example'12.Nov.2003 115958    LOGGING INFO'
+#		+ NO, No time stamp(s).
+#
+#	- Will line breaks include to the log file.
+#		+ YES, Each logging event includes line break and next log event is in own line.
+#		+ NO, No line break(s).
+#
+#	- Will event ranking include to the log file.
+#		+ YES, Event ranking number added to each line in log file(s). Ranking number
+#                 depends on environment's tics, for example(includes time stamp also)
+#                 '012   12.Nov.2003 115958    LOGGING INFO'
+#		+ NO, No event ranking.
+#
+#	- Will write log file in unicode format.
+#		+ YES, Log file will be written in unicode format
+#		+ NO, Log will be written as normal, not unicode, file.
+#
+
+[Logger_Defaults]
+
+#NOTE: If you want to set Logger using next setting(s) remove comment(s)'#'
+#NOTE: TestEngine and TestServer logging settings cannot change here
+
+#CreateLogDirectories= YES		# Possible values: YES or NO
+
+#EmulatorBasePath= C:\LOGS\TestFramework\
+#EmulatorFormat= HTML			# Possible values: TXT or HTML
+#EmulatorOutput= FILE			# Possible values: FILE or RDEBUG
+
+#HardwareBasePath= D:\LOGS\TestFramework\
+#HardwareFormat= HTML			# Possible values: TXT or HTML
+#HardwareOutput= FILE			# Possible values: FILE or RDEBUG
+
+#FileCreationMode= OVERWRITE		# Possible values: OVERWRITE or APPEND
+
+#ThreadIdToLogFile= YES			# Possible values: YES or NO
+#WithTimeStamp= YES			# Possible values: YES or NO
+#WithLineBreak= YES			# Possible values: YES or NO
+#WithEventRanking= YES			# Possible values: YES or NO
+
+#FileUnicode= YES			# Possible values: YES or NO
+
+[End_Logger_Defaults]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+# End of file
\ No newline at end of file
--- a/bluetoothengine/group/bld.inf	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/group/bld.inf	Mon Jul 12 18:51:05 2010 +0300
@@ -11,7 +11,7 @@
 *
 * Contributors:
 *
-* Description:  Build information file for project ?myapp
+* Description:  Build information file for project bluetoothengine
 *
 */
 
@@ -44,3 +44,8 @@
 PRJ_TESTMMPFILES
 
 PRJ_TESTEXPORTS
+../conf/testframework.ini    /epoc32/WINSCW/C/TestFramework/testframework.ini
+../btserviceutil/tsrc/btserviceutiltest/conf/btserviceutiltest.cfg  /epoc32/winscw/c/TestFramework/btserviceutiltest.cfg
+../btnotif/btnotifclient/tsrc/btnotifclienttest/conf/btnotifclienttest.cfg   /epoc32/WINSCW/C/TestFramework/btnotifclienttest.cfg
+../btnotif/btnotifwrapper/tsrc/btnotifwrappertest/conf/btnotifwrappertest.cfg    /epoc32/WINSCW/C/TestFramework/btnotifwrappertest.cfg
+../btnotif/btnotifsrv/tsrc/btnotifsrvtest/conf/btnotifsrvtest.cfg   /epoc32/WINSCW/C/TestFramework/btnotifsrvtest.cfg
--- a/btobexprofiles/obexreceiveservices/bip/group/obexservicebip.mmp	Fri May 28 17:03:06 2010 +0300
+++ b/btobexprofiles/obexreceiveservices/bip/group/obexservicebip.mmp	Mon Jul 12 18:51:05 2010 +0300
@@ -41,6 +41,9 @@
 USERINCLUDE ../inc
 SYSTEMINCLUDE  ../../../inc ../../../../inc
 MW_LAYER_SYSTEMINCLUDE
+SYSTEMINCLUDE  /epoc32/include/mw/hb/hbcore
+SYSTEMINCLUDE  /epoc32/include/mw/hb/hbwidgets
+SYSTEMINCLUDE  /epoc32/include/platform/mw/btservices
 
 LIBRARY         euser.lib           // Base library
 LIBRARY         irobex.lib          // For Object exchange
@@ -62,7 +65,8 @@
 LIBRARY 		btengdevman.lib				//btengdevman.dll
 LIBRARY 		btengsettings.lib			//btengsettings.dll
 LIBRARY 		btengconnman.lib			//btengconnman.dll
-
+LIBRARY			HbCore.lib		
+LIBRARY			HbWidgets.lib
 
 DEBUGLIBRARY 	flogger.lib         // For logging
 
--- a/btobexprofiles/obexreceiveservices/bip/inc/BIPController.h	Fri May 28 17:03:06 2010 +0300
+++ b/btobexprofiles/obexreceiveservices/bip/inc/BIPController.h	Mon Jul 12 18:51:05 2010 +0300
@@ -24,22 +24,33 @@
 #include <e32base.h>
 #include <obex.h>
 #include <obexutilsmessagehandler.h>
-#include <obexutilsuilayer.h>
-#include <obexutilsdialog.h>
 #include "obexutilspropertynotifier.h"
 #include "debug.h"
 #include <SrcsInterface.h>
 #include <obexutilspropertynotifier.h>
-#include <obexutilsglobalprogressdialog.h>
 #include <btengsettings.h>
 #include "btengdevman.h"
 #include <obexutilsdialog.h>
+#include <hbdevicedialogsymbian.h>
+#include <hbsymbianvariant.h>
 
 // FORWARD DECLARATIONS
 
 class CBIPCapabilityHandler;
 class CBIPImageHandler;
 
+/**
+* Backup status.
+* The value is controlled by FileManager
+*/
+enum TFileManagerBkupStatusType
+    {
+    EFileManagerBkupStatusUnset   = 0x00000000,
+    EFileManagerBkupStatusBackup  = 0x00000001,
+    EFileManagerBkupStatusRestore = 0x00000002
+    };
+
+const TUid KUidMsgTypeBt                 = {0x10009ED5};
 
 // CLASS DECLARATION
 
@@ -48,8 +59,9 @@
 */
 NONSHARABLE_CLASS (CBIPController): public CSrcsInterface, public MObexServerNotify,
                                     public MObexUtilsPropertyNotifyHandler, 
-                                    public MGlobalProgressCallback, public MGlobalNoteCallback,
-                                    public MBTEngDevManObserver
+                                    public MObexUtilsDialogObserver,
+                                    public MBTEngDevManObserver,
+                                    public MHbDeviceDialogObserver
     {
 public:
     static CBIPController* NewL();
@@ -78,15 +90,13 @@
 private: // from MObexUtilsPropertyNotifyHandler
     void HandleNotifyL(TMemoryPropertyCheckType aCheckType);
     
-private: // from MGlobalProgressCallback
-    void HandleGlobalProgressDialogL(TInt aSoftkey); 
-    
-private: // from MGlobalNoteCallback
-    void HandleGlobalNoteDialogL(TInt aSoftkey);
     
 private: // from MBTEngDevManObserver
     void HandleGetDevicesComplete(TInt aErr, CBTDeviceArray* aDeviceArray);
     
+private: //from MObexUtilsDialogObserver
+    void DialogDismissed(TInt aButtonId);
+    
 private:
     CBIPController();
     void ConstructL();
@@ -101,10 +111,16 @@
     
     TBool CheckCapacityL();
     void LaunchReceivingIndicatorL();
-    inline TBool ReceivingIndicatorActive() const { return (iProgressDialog || iWaitDialog); }
-    void UpdateReceivingIndicator();
+    inline TBool ReceivingIndicatorActive() const { return (iDialogActive); }
+    void UpdateReceivingIndicatorL();
     void CloseReceivingIndicator(TBool aResetDisplayedState = ETrue);
     TInt GetDriveWithMaximumFreeSpaceL();
+    TBool IsBackupRunning();
+    TBool ProcessExists( const TSecureId& aSecureId );
+    
+private:
+    void DataReceived(CHbSymbianVariantMap& aData);
+    void DeviceDialogClosed(TInt aCompletionCode);
     
 private:
     enum TBipTransferState
@@ -117,6 +133,7 @@
         ETransferPutCancel,
         };
     
+    
 private: // Data
     CBIPCapabilityHandler*      iBIPCapabilityHandler;
     CObexBufObject*             iBTObject;
@@ -138,14 +155,16 @@
     CBufFlat                    *iBuf;
     TBool                       iLengthHeaderReceived;
     TInt                        iTotalSizeByte;
-    CGlobalProgressDialog*      iProgressDialog;
-    CGlobalDialog*              iWaitDialog;
     TBool                       iNoteDisplayed;
     CBTEngDevMan*               iDevMan;
     CBTDeviceArray*             iResultArray;
     TBTDeviceName               iRemoteDeviceName;
     TFileName                   iReceivingFileName;
     TFileName                   iCenRepFolder;
+    CObexUtilsDialog*           iDialog;
+    CHbDeviceDialogSymbian*     iProgressDialog;
+    TBool                       iDialogActive;
+    TInt                        iFileCount;
     };
     
 _LIT(KBipPanicCategory, "BIP");
--- a/btobexprofiles/obexreceiveservices/bip/inc/BIPXMLWriter.h	Fri May 28 17:03:06 2010 +0300
+++ b/btobexprofiles/obexreceiveservices/bip/inc/BIPXMLWriter.h	Mon Jul 12 18:51:05 2010 +0300
@@ -22,7 +22,6 @@
 //INCLUDES
 #include <e32base.h>
 #include <f32file.h>
-#include <obexutilsuilayer.h>
 #include "debug.h"
 
 // CONSTANTS
--- a/btobexprofiles/obexreceiveservices/bip/src/BIPController.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/btobexprofiles/obexreceiveservices/bip/src/BIPController.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -17,35 +17,33 @@
 
 
 // INCLUDE FILES
-#include    <avkon.hrh>                    // AVKON components
 #include    "BIPController.h"
 #include    "BIPCapabilityHandler.h"
 #include    "BIPImageHandler.h"
 
 
 #include    <e32base.h>
-#include    <StringLoader.h>               // Series 60 localisation stringloader
 #include    <obexutilsmessagehandler.h>
-#include    <obexutilsuilayer.h>
-#include    <obexutilsdialog.h>
-#include    <UiklafInternalCRKeys.h>
-#include    <Obexutils.rsg>
 #include    <sysutil.h>
 #include    <bautils.h>
 #include    <driveinfo.h>                   
-#include    <AknWaitDialog.h>
 #include    <btengdomaincrkeys.h> 
 #include    <e32math.h> 
 #include    <es_sock.h>
 #include    <bt_sock.h>
 #include    <msvids.h>
 #include    "debug.h"
+#include    <bluetoothdevicedialogs.h>
+#include <hbtextresolversymbian.h>
         
 // CONSTANTS
 _LIT8(KBipCapabilityType, "x-bt/img-capabilities\0");
-
+const TInt KFileManagerUID3 = 0x101F84EB; /// File Manager application UID3
+const TInt    KBufferSize = 0x10000;  // 64 kB
+_LIT( KBTDevDialogId, "com.nokia.hb.btdevicedialog/1.0" );
+_LIT(KLocFileName, "btdialogs_");
+_LIT(KPath, "z:/resource/qt/translations/");  
 
-const TInt    KBufferSize = 0x10000;  // 64 kB
 
 // ================= MEMBER FUNCTIONS =======================
 
@@ -80,6 +78,12 @@
     iResultArray = new(ELeave) CBTDeviceArray(1);
     // Get default folder from CenRep 
     TObexUtilsMessageHandler::GetCenRepKeyStringValueL(KCRUidBluetoothEngine, KLCReceiveFolder, iCenRepFolder);
+    iDialog = CObexUtilsDialog::NewL(this);
+    TBool ok = HbTextResolverSymbian::Init(KLocFileName, KPath);
+    if (!ok) 
+        {
+        User::Leave( KErrNotFound );
+        }
     TRACE_FUNC_EXIT
     }
 
@@ -96,8 +100,6 @@
     delete iLowMemoryActiveCDrive;    
     delete iLowMemoryActiveMMC;    
     delete iBuf;
-    delete iProgressDialog;
-    delete iWaitDialog;
     delete iBTObject;
     delete iDevMan;
     if (iResultArray)
@@ -106,6 +108,8 @@
         delete iResultArray;
         }
     iFs.Close();
+    delete iDialog;
+    delete iProgressDialog;
     TRACE_FUNC_EXIT    
     }
 
@@ -143,8 +147,13 @@
             iBTObject->Reset();
             }
         CancelTransfer();
-        TRAP_IGNORE(TObexUtilsUiLayer::ShowGlobalConfirmationQueryL( R_BT_FAILED_TO_RECEIVE));
-        }
+
+        TRAP_IGNORE( 
+                HBufC* note = HbTextResolverSymbian::LoadLC(_L("txt_bt_dpophead_receiving_failed"));
+                iDialog->ShowErrorNoteL(note->Des());
+                CleanupStack::PopAndDestroy(note); 
+                );
+        } 
     delete iBuf;
     iBuf = NULL;
     
@@ -197,10 +206,13 @@
 // ObexConnectIndication()
 // ---------------------------------------------------------
 //
-TInt CBIPController::ObexConnectIndication( const TObexConnectInfo& /*aRemoteInfo*/, const TDesC8& /*aInfo*/ )
+TInt CBIPController::ObexConnectIndication( const TObexConnectInfo& aRemoteInfo, const TDesC8& aInfo )
     {
     TRACE_FUNC
     
+    (void) aRemoteInfo;
+    (void) aInfo;
+    
     // Get remote device socket address and bluetooth name
     // Remote bluetooth name will be displayed in the new message in inbox.
     //
@@ -223,9 +235,10 @@
 // ObexDisconnectIndication()
 // ---------------------------------------------------------
 //
-void CBIPController::ObexDisconnectIndication(const TDesC8& /*aInfo*/)
+void CBIPController::ObexDisconnectIndication(const TDesC8& aInfo)
     {
     TRACE_FUNC
+    (void) aInfo;
     }
 
 // ---------------------------------------------------------
@@ -241,6 +254,7 @@
     iBTObject = NULL;
     TRAP_IGNORE(TObexUtilsMessageHandler::RemoveTemporaryRFileL (iFullPathFilename));  
     iFs.Close();
+    iFileCount = 0;
     }
 
 // ---------------------------------------------------------
@@ -256,7 +270,7 @@
     // Checking if backup is running now - if backup process is active, then we
     // need to cancel transfer - otherwise phone will freeze during receiving
     // data
-    if ( TObexUtilsUiLayer::IsBackupRunning() )
+    if ( IsBackupRunning() )
         {
         TRACE_INFO ( _L ("Backup in progress! Canceling incoming transfer."));
         iBTTransferState = ETransferPutInitError;
@@ -308,7 +322,11 @@
                 }
             if(!capacity)
                 {
-                TRAP_IGNORE(TObexUtilsUiLayer::ShowGlobalConfirmationQueryL(R_OUT_OF_MEMORY));
+                //TRAP_IGNORE(TObexUtilsUiLayer::ShowGlobalConfirmationQueryL(R_OUT_OF_MEMORY));
+                //todo: Need to use Localized string.
+                _LIT(KText, "Not enough memory to execute operation. Delete some documents and try again.");
+                TRAP_IGNORE(iDialog->ShowErrorNoteL(KText));
+    
                 return KErrDiskFull;
                 }
             }
@@ -326,7 +344,11 @@
         // Now we need to either create (in the first instance) or update the dialog on the UI.
         if(ReceivingIndicatorActive())
             {
-            UpdateReceivingIndicator();
+            TRAPD(err, UpdateReceivingIndicatorL());
+            if(err < KErrNone)
+                {
+                return err;
+                }
             }
         else if(!iNoteDisplayed)
             {
@@ -358,6 +380,7 @@
         retVal = HandlePutCompleteIndication();
         iBTTransferState = ETransferIdle;
         CloseReceivingIndicator();
+        iFileCount++;
         }
     TRACE_FUNC_EXIT
     return retVal;
@@ -420,12 +443,15 @@
 // SetPathIndication()
 // ---------------------------------------------------------
 //
-TInt CBIPController::SetPathIndication( const CObex::TSetPathInfo& /*aPathInfo*/, 
-                                        const TDesC8& /*aInfo*/)
+TInt CBIPController::SetPathIndication( const CObex::TSetPathInfo& aPathInfo, 
+                                        const TDesC8& aInfo)
     {
     TRACE_FUNC
     // SetPath is not implemented in BIP - so following IrOBEX guidance, return
     // the Forbidden response code.
+    (void) aPathInfo;
+    (void) aInfo;
+    
     return KErrIrObexRespForbidden;
     }
 
@@ -504,7 +530,11 @@
     //
     if (SysUtil::DiskSpaceBelowCriticalLevelL(&iFs, 0, iDrive))
         {
-        TRAP_IGNORE(TObexUtilsUiLayer::ShowGlobalConfirmationQueryL(R_OUT_OF_MEMORY));
+        //TRAP_IGNORE(TObexUtilsUiLayer::ShowGlobalConfirmationQueryL(R_OUT_OF_MEMORY));
+        //todo: Need to use Localized string.
+        _LIT(KText, "Not enough memory to execute operation. Delete some documents and try again.");
+        TRAP_IGNORE(iDialog->ShowErrorNoteL(KText));
+    
         User::Leave(KErrGeneral);
         }
     
@@ -739,57 +769,91 @@
     
     if(iTotalSizeByte > 0)
         {
-        iProgressDialog = CGlobalProgressDialog::NewL(this);  
         if(iReceivingFileName.Length() > 0)
             {
-            iProgressDialog->ShowProgressDialogNameSizeL(iReceivingFileName, iTotalSizeByte);
+            iProgressDialog = CHbDeviceDialogSymbian::NewL();
+            iProgressDialog->SetObserver(this);
+    
+            CHbSymbianVariantMap* variantMap = CHbSymbianVariantMap::NewL();
+            CleanupStack::PushL(variantMap);
+            
+            TInt dialogIdx = TBluetoothDialogParams::EReceiveProgress;
+            CHbSymbianVariant* dialogType = CHbSymbianVariant::NewL( (TAny*) &(dialogIdx), 
+                                                                CHbSymbianVariant::EInt );
+            CleanupStack::PushL(dialogType);
+            TBuf16<6> dialogTypeKey;
+            dialogTypeKey.Num(TBluetoothDialogParams::EDialogType);
+            User::LeaveIfError(variantMap->Add(dialogTypeKey, dialogType));
+            CleanupStack::Pop(dialogType);
+            
+            CHbSymbianVariant* deviceName = CHbSymbianVariant::NewL( (TAny*) (&iRemoteDeviceName), 
+                                                                CHbSymbianVariant::EDes );
+            CleanupStack::PushL(deviceName);
+            TBuf16<6> deviceNameKey;
+            deviceNameKey.Num(TBluetoothDeviceDialog::EDeviceName);
+            User::LeaveIfError(variantMap->Add(deviceNameKey, deviceName));
+            CleanupStack::Pop(deviceName);
+            
+            CHbSymbianVariant* fileName = CHbSymbianVariant::NewL( (TAny*) (&iReceivingFileName), 
+                                                                CHbSymbianVariant::EDes );
+            CleanupStack::PushL(fileName);
+            TBuf16<6> fileNameKey;
+            fileNameKey.Num(TBluetoothDeviceDialog::EReceivingFileName);
+            User::LeaveIfError(variantMap->Add(fileNameKey, fileName));
+            CleanupStack::Pop(fileName);
+            
+            CHbSymbianVariant* fileSz = CHbSymbianVariant::NewL( (TAny*) &iTotalSizeByte, 
+                                                                CHbSymbianVariant::EInt );
+            CleanupStack::PushL(fileSz);
+            TBuf16<6> fileSzKey;
+            fileSzKey.Num(TBluetoothDeviceDialog::EReceivingFileSize);
+            User::LeaveIfError(variantMap->Add(fileSzKey, fileSz));
+            CleanupStack::Pop(fileSz);
+            
+            CHbSymbianVariant* fileCnt = CHbSymbianVariant::NewL( (TAny*) &iFileCount, 
+                                                                CHbSymbianVariant::EInt );
+            CleanupStack::PushL(fileCnt);
+            TBuf16<6> fileCntKey;
+            fileCntKey.Num(TBluetoothDeviceDialog::EReceivedFileCount);
+            User::LeaveIfError(variantMap->Add(fileCntKey, fileCnt));
+            CleanupStack::Pop(fileCnt);
+        
+            iDialogActive = ETrue;
+            iProgressDialog->Show( KBTDevDialogId(), *variantMap, this );
+            CleanupStack::PopAndDestroy(variantMap);
             }
         else
             {
-            iProgressDialog->ShowProgressDialogL(R_BT_RECEIVING_DATA);
+            // TODO
+            iDialogActive = ETrue;
             }
         }
     else
         {
-        iWaitDialog = CGlobalDialog::NewL(this);
-        iWaitDialog->ShowNoteDialogL(R_BT_RECEIVING_DATA, ETrue);
+        iDialogActive = ETrue;
+        /*
+         * TODO - The functionality provided by CGlobalDialog will be removed
+         * TODO - and this will be provided by CGlobalProgressDialog.
+         */
+        
         }
     }
 
-void CBIPController::UpdateReceivingIndicator()
+void CBIPController::UpdateReceivingIndicatorL()
     {
     if(iProgressDialog)
         {
-        iProgressDialog->UpdateProgressDialog(iBTObject->BytesReceived(), iTotalSizeByte);
-        }
-    // else we are using a wait note, so no "need" to update
-    }
-
-void CBIPController::HandleGlobalProgressDialogL( TInt aSoftkey )
-    {
-    TRACE_FUNC
-    
-    if(aSoftkey == EAknSoftkeyCancel)
-        {
-        CancelTransfer();
-        }
-    else if(aSoftkey == EAknSoftkeyHide)
-        {
-        CloseReceivingIndicator(EFalse); // Don't reset state as only hiding
-        }
-    }
-
-void CBIPController::HandleGlobalNoteDialogL( TInt aSoftkey )
-    {
-    TRACE_FUNC
-    
-    if( aSoftkey == EAknSoftkeyCancel )
-        {
-        CancelTransfer();
-        }
-    else if( aSoftkey == EAknSoftkeyHide)
-        {
-        CloseReceivingIndicator(EFalse); // Don't reset state as only hiding
+        CHbSymbianVariantMap* variantMap = CHbSymbianVariantMap::NewL();
+        CleanupStack::PushL(variantMap);
+        
+        TInt bytesReceived = iBTObject->BytesReceived();
+        CHbSymbianVariant* progress = CHbSymbianVariant::NewL( (TAny*) &bytesReceived, CHbSymbianVariant::EInt );
+        CleanupStack::PushL(progress);
+        User::LeaveIfError(variantMap->Add(_L("progress"), progress));
+        CleanupStack::Pop(progress);
+        
+        iProgressDialog->Update(*variantMap);
+        CleanupStack::PopAndDestroy(variantMap);
         }
     }
 
@@ -802,16 +866,11 @@
         }
     if(iProgressDialog)
         {
-        iProgressDialog->ProcessFinished();
+        iProgressDialog->Cancel();
+        iDialogActive = EFalse;
         delete iProgressDialog;
         iProgressDialog = NULL;
         }
-    if(iWaitDialog)
-        {
-        iWaitDialog->ProcessFinished();
-        delete iWaitDialog;
-        iWaitDialog = NULL;
-        }
     }
  
  // ---------------------------------------------------------
@@ -869,8 +928,10 @@
  // ----------------------------------------------------------
  //    
  // 
- void CBIPController::HandleGetDevicesComplete(TInt aErr, CBTDeviceArray* /*aDeviceArray*/)
+ void CBIPController::HandleGetDevicesComplete(TInt aErr, CBTDeviceArray* aDeviceArray)
     {
+    (void) aDeviceArray;
+     
     if ( aErr == KErrNone )
         {
         if ( iResultArray->Count())
@@ -890,6 +951,78 @@
         }
     }
  
+ TBool CBIPController::IsBackupRunning()
+    {
+    const TUint32 KFileManagerBkupStatus = 0x00000001;
+    
+    TInt status = EFileManagerBkupStatusUnset;
+    TBool retValue = EFalse;
+    TInt err = RProperty::Get( TUid::Uid(KFileManagerUID3), KFileManagerBkupStatus,
+                              status );
+    if ( err == KErrNone )
+        {
+        if ( status == EFileManagerBkupStatusBackup || 
+             status == EFileManagerBkupStatusRestore )
+            {
+            TSecureId fileManagerSecureId( KFileManagerUID3 );
+            //only returning ETrue if backup process is still active
+            retValue = ProcessExists( fileManagerSecureId );
+            }
+        }
+   
+    return retValue;
+    }
+ 
+ TBool CBIPController::ProcessExists( const TSecureId& aSecureId )
+     {
+     _LIT( KFindPattern, "*" );
+     TFindProcess finder(KFindPattern);
+     TFullName processName;
+     while( finder.Next( processName ) == KErrNone )
+         {
+         RProcess process;
+         if ( process.Open( processName ) == KErrNone )
+             {
+             TSecureId processId( process.SecureId() );
+             process.Close();
+             if( processId == aSecureId )
+                 {
+                 return ETrue;
+                 }
+             }
+         }
+     return EFalse;
+     }
+ 
+ void CBIPController::DialogDismissed(TInt aButtonId)
+     {
+     (void) aButtonId;
+     }
+
+ void CBIPController::DataReceived(CHbSymbianVariantMap& aData)
+     {
+     if(aData.Keys().MdcaPoint(0).Compare(_L("actionResult")) == 0)
+         {
+         TInt val = *(static_cast<TInt*>(aData.Get(_L("actionResult"))->Data()));
+         if(!val)
+             {
+             //Cancel has been clicked
+             CancelTransfer();
+             }
+         else
+             {
+             //Hide has been clicked
+             CloseReceivingIndicator(EFalse);
+             }
+         }
+     }
+ 
+ void CBIPController::DeviceDialogClosed(TInt aCompletionCode)
+     {
+     (void) aCompletionCode;
+     }
+
+ 
 //////////////////////////// Global part ////////////////////////////
 
 //  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/btobexprofiles/obexreceiveservices/btmsgviewer/btmsgviewer.pro	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,45 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+
+TEMPLATE = app
+TARGET = btmsgviewer
+CONFIG += hb \
+    service
+symbian:
+ { 
+    TARGET.UID3 = 0x2002ED70
+    TARGET.CAPABILITY = ALL \
+        -TCB
+}
+LIBS += -lhbcore \
+    -lxqservice \
+    -lxqserviceutil \
+    -lbluetooth \
+    -lmsgs \
+    -lapmime
+SERVICE.FILE = service_conf.xml
+libFiles.sources = xqservice.dll
+SERVICE.OPTIONS = embeddable \
+    hidden
+libFiles.path = "!:\sys\bin"
+DEPLOYMENT += libFiles
+HEADERS += ./inc/btmsgviewer.h \
+		   ./inc/btmsgviewerutils.h
+SOURCES += ./src/btmsgviewer.cpp \
+    	   ./src/main.cpp \
+    	   ./src/btmsgviewerutils.cpp
+BLD_INF_RULES.prj_exports += "$${LITERAL_HASH}include <platform_paths.hrh>" \
+    "./rom/btmsgviewer.iby CORE_APP_LAYER_IBY_EXPORT_PATH(btmsgviewer.iby)"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/btobexprofiles/obexreceiveservices/btmsgviewer/inc/btmsgviewer.h	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0""
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ *
+ */
+
+
+#ifndef BTMSGVIEWER_H
+#define BTMSGVIEWER_H
+
+#include <xqserviceprovider.h>
+#include <hbview.h>
+#include <xqappmgr.h>
+#include "btmsgviewerutils.h"
+
+
+class BTMsgViewer : public XQServiceProvider
+{
+    Q_OBJECT
+    
+public:
+    BTMsgViewer (QObject *parent = 0 );
+    ~BTMsgViewer ();    
+public slots:
+    int displaymsg(int messageId);
+private:
+    bool isError(int aError);
+};
+
+#endif // BTMSGVIEWER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/btobexprofiles/obexreceiveservices/btmsgviewer/inc/btmsgviewerutils.h	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0""
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ *
+ */
+
+#ifndef BTMSGVIEWERUTILS_H_
+#define BTMSGVIEWERUTILS_H_
+
+#include <msvapi.h>
+
+
+class CBtMsgViewerUtils: public CBase, public MMsvSessionObserver
+    {    
+public:
+    static CBtMsgViewerUtils* NewL();
+    ~CBtMsgViewerUtils();
+    HBufC* GetMessagePath(TInt aMessageId, TInt aError);
+
+private: // From MMsvSessionObserver
+    void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3);
+    
+private:
+    void GetMessagePathL(TPtr aMsgPath, const TInt aMessageId);
+       
+private:
+    CBtMsgViewerUtils();
+    void ConstructL();
+    
+private:
+    CMsvSession* iMsvSession;
+    };
+
+#endif // BTMSGVIEWERUTILS_H_
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/btobexprofiles/obexreceiveservices/btmsgviewer/rom/btmsgviewer.iby	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0""
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ *
+ */
+
+
+#ifndef __BTMSGVIEWER_IBY__
+#define __BTMSGVIEWER_IBY__
+
+file=ABI_DIR\UREL\btmsgviewer.exe               SHARED_LIB_DIR\btmsgviewer.exe
+data=DATAZ_\resource\apps\btmsgviewer.rsc                      resource\apps\btmsgviewer.rsc
+data=DATAZ_\private\10003a3f\import\apps\btmsgviewer_reg.rsc   private\10003a3f\import\apps\btmsgviewer_reg.rsc
+
+#endif
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/btobexprofiles/obexreceiveservices/btmsgviewer/service_conf.xml	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<service name="com.nokia.services.btmsgdispservices"  filepath="must-not-be-empty" >
+  <description>BT msg Disp service</description>
+  <interface name="displaymsg" version="1.0" capabilities="">
+    <description>display message from inbox</description>
+  </interface>
+</service>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/btobexprofiles/obexreceiveservices/btmsgviewer/src/btmsgviewer.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,117 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0""
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ *
+ */
+
+
+#include "btmsgviewer.h"
+#include "apmstd.h"
+#include <xqaiwrequest.h>
+#include <f32file.h>
+//#include <documenthandler.h>
+
+
+BTMsgViewer::BTMsgViewer(QObject* parent)
+: XQServiceProvider("com.nokia.services.btmsgdispservices.displaymsg",parent)
+    {    
+    publishAll();
+    }
+
+BTMsgViewer::~BTMsgViewer ()
+    {
+    
+    }
+
+int BTMsgViewer::displaymsg( int messageId )
+    {    
+    CBtMsgViewerUtils* btViewerUtils = 0;
+    
+    TRAPD(error, btViewerUtils = CBtMsgViewerUtils::NewL());  
+    if(isError(error))
+        {
+        if(btViewerUtils)
+            delete btViewerUtils;
+        
+        return error;   
+        }
+        
+    HBufC* fileName = 0;
+    fileName = btViewerUtils->GetMessagePath(messageId, error);
+    if(isError(error))
+        {
+        if(fileName)
+            delete fileName;
+        
+        delete btViewerUtils;
+        return error;
+        }
+    
+    QString attachmentFName = QString::fromUtf16(fileName->Ptr(),fileName->Length());    
+    
+    delete fileName;
+    delete btViewerUtils;
+
+    XQSharableFile sf;
+    XQAiwRequest* request = 0;
+
+    if (!sf.open(attachmentFName)) {
+        return KErrNotFound;
+    }
+
+    // Get handlers
+    XQApplicationManager appManager;
+    QList<XQAiwInterfaceDescriptor> fileHandlers = appManager.list(sf);
+    if (fileHandlers.count() > 0) {
+        XQAiwInterfaceDescriptor d = fileHandlers.first();
+        request = appManager.create(sf, d);
+
+        if (!request) {
+            sf.close();
+            return KErrGeneral;
+        }
+    }
+    else {
+        sf.close();
+        return KErrGeneral;
+    }
+
+    request->setEmbedded(true);
+    request->setSynchronous(true);
+
+    // Fill args
+    QList<QVariant> args;
+    args << qVariantFromValue(sf);
+    request->setArguments(args);
+
+    bool res = request->send();
+    if  (!res) 
+        {
+        QString errMsg = request->lastErrorMessage();
+        }
+
+    // Cleanup
+    sf.close();
+    delete request;
+    
+    if(!res)
+        return request->lastError();
+    else
+        return KErrNone;
+    }
+
+bool BTMsgViewer::isError(int aError)
+    {
+    return ((aError < KErrNone)?true:false);
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/btobexprofiles/obexreceiveservices/btmsgviewer/src/btmsgviewerutils.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0""
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ *
+ */
+
+#include <mmsvattachmentmanager.h>
+#include "btmsgviewerutils.h"
+
+
+CBtMsgViewerUtils* CBtMsgViewerUtils::NewL()
+    {
+    CBtMsgViewerUtils* me = new (ELeave) CBtMsgViewerUtils();
+    CleanupStack::PushL(me);
+    me->ConstructL();
+    CleanupStack::Pop(me);
+    return me;
+    }
+
+CBtMsgViewerUtils::CBtMsgViewerUtils()
+    {
+    
+    }
+
+void CBtMsgViewerUtils::ConstructL()
+    {
+    iMsvSession = CMsvSession::OpenSyncL(*this);
+    }
+
+CBtMsgViewerUtils::~CBtMsgViewerUtils()
+    {
+    if ( iMsvSession )
+        {
+		 delete iMsvSession;
+        }
+    }
+
+HBufC* CBtMsgViewerUtils::GetMessagePath(TInt aMessageId, TInt aError)
+    {
+    HBufC* fileName = NULL;
+    TRAP(aError, fileName = HBufC::NewL(KMaxPath));   
+    if(aError < KErrNone)
+        {
+        return fileName;
+        }
+    
+    TRAP(aError, GetMessagePathL(fileName->Des(), aMessageId));
+    return fileName;
+    }
+
+void CBtMsgViewerUtils::GetMessagePathL(TPtr aMsgPath, const TInt aMessageId)
+    {
+    CMsvEntry* messageEntry = iMsvSession->GetEntryL(aMessageId);
+    CleanupStack::PushL(messageEntry);
+    
+    CMsvEntry* attachmentEntry = iMsvSession->GetEntryL((*messageEntry)[0].Id());
+    CleanupStack::PushL(attachmentEntry);
+    
+    CMsvStore* store = attachmentEntry->EditStoreL();
+    CleanupStack::PushL(store); 
+    
+    //get file handle for the attachment & the complete path of the file
+    RFile attachmentFile;
+    attachmentFile = store->AttachmentManagerL().GetAttachmentFileL(0);
+    attachmentFile.FullName(aMsgPath);
+    attachmentFile.Close();
+    
+    //mark attachment as Read
+    TMsvEntry attachEntry = attachmentEntry->Entry();
+    attachEntry.SetUnread(EFalse);
+    attachmentEntry->ChangeL(attachEntry);
+    
+    CleanupStack::PopAndDestroy(store);
+    CleanupStack::PopAndDestroy(attachmentEntry);
+    CleanupStack::PopAndDestroy(messageEntry);
+    }
+
+void CBtMsgViewerUtils::HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, 
+                                                    TAny* aArg2, TAny* aArg3)
+    {
+    (void) aEvent;
+    (void) aArg1;
+    (void) aArg2;
+    (void) aArg3;
+    }
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/btobexprofiles/obexreceiveservices/btmsgviewer/src/main.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0""
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ *
+ */
+
+
+#include <hbapplication.h>
+#include <xqservicerequest.h>
+#include "btmsgviewer.h"
+
+
+int main(int argc, char **argv)
+{
+    HbApplication a( argc, argv );
+    
+    BTMsgViewer* btmsgviewer = new BTMsgViewer();
+    int retVal = a.exec();
+    delete btmsgviewer;
+    return retVal;
+}
+
--- a/btobexprofiles/obexreceiveservices/mtmuibluetooth/data/btmtmui.rss	Fri May 28 17:03:06 2010 +0300
+++ b/btobexprofiles/obexreceiveservices/mtmuibluetooth/data/btmtmui.rss	Mon Jul 12 18:51:05 2010 +0300
@@ -20,7 +20,6 @@
 
 //  INCLUDES
 #include <mtmconfig.rh>
-#include <avkon.loc>
 
 //  RESOURCE DEFINITIONS 
 // ---------------------------------------------------------
@@ -43,7 +42,8 @@
  		{
  		MTM_COMPONENT_V2
  			{
- 			human_readable_name = qtn_query_send_via_bt;
+            //todo: Need to use localized string.
+ 			human_readable_name = "Via Bluetooth";
  			component_uid = KUidMtmServerComponentVal;
  			entry_point = 1;
  			version = VERSION_V2 {};
@@ -51,7 +51,8 @@
  			},
  		MTM_COMPONENT_V2
  			{
- 			human_readable_name = qtn_query_send_via_bt;
+ 			//todo: Need to use localized string.
+ 			human_readable_name = "Via Bluetooth";
  			component_uid = KUidMtmClientComponentVal;
  			entry_point = 1;
  			version = VERSION_V2 {};
@@ -59,7 +60,8 @@
  			},
  		MTM_COMPONENT_V2
  			{
- 			human_readable_name = qtn_query_send_via_bt;
+ 			//todo: Need to use localized string.
+ 			human_readable_name = "Via Bluetooth";
  			component_uid = KUidMtmUiComponentVal;
  			entry_point = 2;
  			version = VERSION_V2 {};
@@ -67,7 +69,8 @@
  			},
  		MTM_COMPONENT_V2
  			{
- 			human_readable_name = qtn_query_send_via_bt;
+ 			//todo: Need to use localized string.
+ 			human_readable_name = "Via Bluetooth";
  			component_uid = KUidMtmUiDataComponentVal;
  			entry_point = 1;
  			version = VERSION_V2 {};
--- a/btobexprofiles/obexreceiveservices/mtmuibluetooth/group/btmtmui.mmp	Fri May 28 17:03:06 2010 +0300
+++ b/btobexprofiles/obexreceiveservices/mtmuibluetooth/group/btmtmui.mmp	Mon Jul 12 18:51:05 2010 +0300
@@ -38,6 +38,9 @@
 SOURCEPATH      ../src
 USERINCLUDE     ../inc
 SYSTEMINCLUDE  ../../../inc ../../../../inc  
+SYSTEMINCLUDE /epoc32/include/mw/hb/hbwidgets
+SYSTEMINCLUDE  /epoc32/include/mw/hb/hbcore
+
 #ifdef NO101APPDEPFIXES
 APP_LAYER_SYSTEMINCLUDE
 #else   //NO101APPDEPFIXES
--- a/btobexprofiles/obexreceiveservices/mtmuibluetooth/inc/btmtmui.h	Fri May 28 17:03:06 2010 +0300
+++ b/btobexprofiles/obexreceiveservices/mtmuibluetooth/inc/btmtmui.h	Mon Jul 12 18:51:05 2010 +0300
@@ -25,8 +25,7 @@
 #include <btdevice.h>
 #include <mtmuibas.h>
 #include <btengdiscovery.h>
-
-#include <obexutilsuilayer.h>
+#include <obexutilsdialog.h>
 
 const TUint KBTSdpObjectPush            = 0x1105;
 
@@ -37,7 +36,8 @@
 *  CBtMtmUi
 *  Bluetooth messaging UI Module.
 */
-class CBtMtmUi : public CBaseMtmUi, public MBTEngSdpResultReceiver
+class CBtMtmUi : public CBaseMtmUi, public MBTEngSdpResultReceiver, 
+                 public MObexUtilsDialogObserver
 	{
     public: // Constructors and destructor
        /**
@@ -381,6 +381,11 @@
         *             was called; otherwise one of the system-wide error codes.
         */
         void DeviceSearchComplete( CBTDevice* aDevice, TInt aErr );    
+        
+        /**
+         * Callback function from base class MObexUtilsDialogObserver.
+         */
+        void DialogDismissed(TInt aButtonId);
 
     protected:
 
@@ -440,7 +445,7 @@
         CActiveSchedulerWait iWaiter;
         TInt                 iClientChannel;
         TInt                 iState;  
-        
+        CObexUtilsDialog*  iDialog;
 	};
 
 #endif      // CBTMTMUI_H  
--- a/btobexprofiles/obexreceiveservices/mtmuibluetooth/inc/btmtmuidata.h	Fri May 28 17:03:06 2010 +0300
+++ b/btobexprofiles/obexreceiveservices/mtmuibluetooth/inc/btmtmuidata.h	Mon Jul 12 18:51:05 2010 +0300
@@ -23,7 +23,6 @@
 
 //  INCLUDES
 #include <mtudcbas.h>
-#include <obexutilsuilayer.h>
 
 // FORWARD DECLARATIONS
 
--- a/btobexprofiles/obexreceiveservices/mtmuibluetooth/src/btmtmui.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/btobexprofiles/obexreceiveservices/mtmuibluetooth/src/btmtmui.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -32,8 +32,6 @@
 
 #include <mtmuidef.hrh>
 #include <mtclreg.h>
-#include <obexutilsuilayer.h>
-#include <Obexutils.rsg>
 #include <msvuids.h>
 #include <msvids.h>
 #include <obexconstants.h>
@@ -81,6 +79,7 @@
 	{
     FLOG( _L( "[CBtMtmUi] CBtMtmUi: ~CBtMtmUi\t" ) );
 	delete iClientRegistry;
+	delete iDialog;
 	}
 
 // Symbian OS default constructor can leave.
@@ -88,6 +87,7 @@
 	{
     FLOG( _L( "[CBtMtmUi] CBtMtmUi: ConstructL\t" ) );
     CBaseMtmUi::ConstructL();
+    iDialog = CObexUtilsDialog::NewL(this);
 	}
 
 // ---------------------------------------------------------
@@ -98,9 +98,8 @@
 void CBtMtmUi::GetResourceFileName( TFileName& aFileName ) const
 	{ 
 	FLOG( _L( "[CBtMtmUi] CBtMtmUi: GetResourceFileName\t" ) );
-    aFileName = KObexUtilsFileDrive;
-    aFileName += KDC_RESOURCE_FILES_DIR;
-    aFileName += KObexUtilsResourceFileName;
+	(void)aFileName;
+	//todo: This function should be removed it is using avkon resource file.
 	}
 
 // ---------------------------------------------------------
@@ -278,8 +277,11 @@
                         }
                     if ( retVal != KErrNone ||iState  != KErrNone )
                         {
-                        resourceId = R_BT_DEV_NOT_AVAIL;                        
-						TObexUtilsUiLayer::ShowInformationNoteL( resourceId );
+                        //resourceId = R_BT_DEV_NOT_AVAIL;                        
+						//TObexUtilsUiLayer::ShowInformationNoteL( resourceId );
+                        //todo: Need to use Localized string.
+                        _LIT(KText, "Cannot establish Bluetooth connection");
+                        iDialog->ShowInformationNoteL(KText);
                         CleanupStack::PopAndDestroy(3); // BtDevice, BtConnection, password
                         return CMsvCompletedOperation::NewL(
                              Session(), 
@@ -515,8 +517,12 @@
 	const TInt error = progress.iError;
     if ( error == KErrInUse )
 		{
-        resourceId = R_BT_DEV_NOT_AVAIL;
-		TObexUtilsUiLayer::ShowInformationNoteL( resourceId );
+        //resourceId = R_BT_DEV_NOT_AVAIL;
+		//TObexUtilsUiLayer::ShowInformationNoteL( resourceId );
+        //todo: Need to use Localized string.
+        _LIT(KText, "Cannot establish Bluetooth connection");
+        iDialog->ShowInformationNoteL(KText);
+
 	    return KErrNone;
 		}
     
@@ -526,8 +532,12 @@
             {
             FLOG( _L( "[CBtMtmUi] CBtMtmUi:DisplayProgressSummaryL: EDisconnected\t" ) );
             // Allowed to send again.
-            resourceId = R_BT_DATA_SENT;
-			TObexUtilsUiLayer::ShowInformationNoteL( resourceId );
+            //resourceId = R_BT_DATA_SENT;
+			//TObexUtilsUiLayer::ShowInformationNoteL( resourceId );
+            //todo: Need to use Localized string.
+            _LIT(KText, "Message sent!");
+            iDialog->ShowInformationNoteL(KText);
+
 		    break;
             }
         case TObexMtmProgress::ESendError:
@@ -535,13 +545,21 @@
             FLOG( _L( "[CBtMtmUi] CBtMtmUi:DisplayProgressSummaryL: ESendError\t" ) );
             if( error == KErrIrObexClientNoDevicesFound )
                 {
-                resourceId = R_BT_DEV_NOT_AVAIL;
-				TObexUtilsUiLayer::ShowInformationNoteL( resourceId );
+                //resourceId = R_BT_DEV_NOT_AVAIL;
+				//TObexUtilsUiLayer::ShowInformationNoteL( resourceId );
+                //todo: Need to use Localized string.
+                _LIT(KText, "Cannot establish Bluetooth connection");
+                iDialog->ShowInformationNoteL(KText);
+
                 }
             else
                 {
-                resourceId = R_BT_FAILED_TO_SEND;
-				TObexUtilsUiLayer::ShowErrorNoteL( resourceId );
+                //resourceId = R_BT_FAILED_TO_SEND;
+				//TObexUtilsUiLayer::ShowErrorNoteL( resourceId );
+                //todo: Need to use Localized string.
+                _LIT(KText, "Failed to send message");
+                iDialog->ShowErrorNoteL(KText);
+
                 }
             break;
             }
@@ -666,9 +684,13 @@
                                                   CMsvSession& aSession)
 	{
 	FLOG( _L( "[CommonMtmUi] CBtMtmUi: LaunchEditorApplicationL\t" ) );
-	CMsvEntry* message;
-	message = &iBaseMtm.Entry();    
-	return TObexUtilsUiLayer::LaunchEditorApplicationOperationL( aSession, message, aStatus );
+	(void)aStatus;
+	(void)aSession;
+	//CMsvEntry* message;
+	//message = &iBaseMtm.Entry();
+	//todo: need to replace this 
+	//return TObexUtilsUiLayer::LaunchEditorApplicationOperationL( aSession, message, aStatus );
+	return NULL;
 	}
 
 // ---------------------------------------------------------
@@ -805,4 +827,9 @@
     iWaiter.AsyncStop();
     }            
 
+void CBtMtmUi::DialogDismissed(TInt /*aButtonId*/)
+    {
+    
+    }
+
 // End of File
--- a/btobexprofiles/obexreceiveservices/mtmuibluetooth/src/btmtmuidata.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/btobexprofiles/obexreceiveservices/mtmuibluetooth/src/btmtmuidata.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -27,11 +27,11 @@
 #include <mtmuidsdef.hrh>       //kuidmtmquerymaxbodysizevalue etc
 #endif
 #include <msvuids.h>
-#include <Obexutils.rsg> 
 #include <obexutilsmessagehandler.h>
 
 
-const TInt KBtMtmUiNfcContext       = 2;
+// todo @ QT migration: take official definition from Messaging at app layer (btmsgtypeuid.h)
+const TUid KUidMsgTypeBt = {0x10009ED5};
 
 // ================= MEMBER FUNCTIONS =======================
 
@@ -78,8 +78,10 @@
 TInt CBtMtmUiData::OperationSupportedL( TInt /*aOperationId*/, 
                                        const TMsvEntry& /*aContext*/) const
 	{
-    FLOG( _L( " CBtMtmUiData: OperationSupportedL\t" ) );    
-	return TObexUtilsUiLayer::OperationNotSupported(); 
+    FLOG( _L( " CBtMtmUiData: OperationSupportedL\t" ) );
+    
+    //todo: This was returning avkon resource Id of sting "This item is not available".
+    return 0;
 	}
 
 // ---------------------------------------------------------
@@ -128,21 +130,13 @@
 // Handles received msg icon.
 // ---------------------------------------------------------
 //
-const CBaseMtmUiData::CBitmapArray& CBtMtmUiData::ContextIcon( const TMsvEntry& aContext, 
+const CBaseMtmUiData::CBitmapArray& CBtMtmUiData::ContextIcon( const TMsvEntry& /*aContext*/, 
                                                               TInt /*aStateFlags*/) const
 	{
 	// Check if NFC context
 	TInt icon = 0;
-	if ( aContext.MtmData1() == KBtMtmUiNfcContext )
-	    {
-      icon = TObexUtilsUiLayer::ContextIcon( aContext, ENfc );
-	    }
-	else
-	    {
-	    icon = TObexUtilsUiLayer::ContextIcon( aContext, EBluetooth );
-	    }
-
-	return *iIconArrays->At( icon/2 ); 
+	//todo: This function will not work as iIconArrays is not populated might cause panic.
+	return *iIconArrays->At(icon); 
 	}
 
 // ---------------------------------------------------------
@@ -153,7 +147,7 @@
 void CBtMtmUiData::PopulateArraysL()
 	{
     FLOG( _L( " CBtMtmUiData: PopulateArraysL\t" ) );
-	TObexUtilsUiLayer::CreateIconsL( KUidMsgTypeBt, iIconArrays );
+	//todo: Was populating iIconArrays which should be removed.
 	}
 
 // ---------------------------------------------------------
@@ -161,12 +155,10 @@
 // Gives resource filename.
 // ---------------------------------------------------------
 //
-void CBtMtmUiData::GetResourceFileName( TFileName& aFileName ) const
+void CBtMtmUiData::GetResourceFileName( TFileName& /*aFileName*/ ) const
 	{ 
     FLOG( _L( " CBtMtmUiData: GetResourceFileName\t" ) );
-    aFileName = KObexUtilsFileDrive;
-    aFileName += KDC_RESOURCE_FILES_DIR;
-    aFileName += KObexUtilsResourceFileName;
+    //todo: This was returning avkon resource file, which is not required now.
 	}
 
 // ---------------------------------------------------------
@@ -186,7 +178,8 @@
 		return ( aParent.iMtm.iUid == KMsvLocalServiceIndexEntryIdValue );
 		}
 	// --- Can't create other types ---
-	aReasonResourceId = TObexUtilsUiLayer::OperationNotSupported(); 
+	//todo: This was using avkon resource Id of sting "This item is not available".
+	aReasonResourceId = 0; 
 	return EFalse;
 	}
 
@@ -207,7 +200,8 @@
 			return ETrue;
 			}
 		}
-	aReasonResourceId = TObexUtilsUiLayer::OperationNotSupported(); 
+	//todo: This was using avkon resource Id of sting "This item is not available".
+	aReasonResourceId = 0; 
 	return EFalse;
 	}
 
@@ -228,7 +222,8 @@
 			return ETrue;
 			}
 		}
-	aReasonResourceId = TObexUtilsUiLayer::OperationNotSupported(); 
+	//todo: This was using avkon resource Id of sting "This item is not available".
+	aReasonResourceId = 0; 
 	return EFalse;
 	}
 
@@ -248,8 +243,9 @@
 			aReasonResourceId = 0;
 			return ETrue;
 			}
-		}   
-	aReasonResourceId = TObexUtilsUiLayer::OperationNotSupported(); 
+		}
+	//todo: This was using avkon resource Id of sting "This item is not available".
+	aReasonResourceId = 0; 
 	return EFalse;
 	}
 
@@ -262,7 +258,8 @@
                                   TInt& aReasonResourceId ) const
 	{
     FLOG( _L( " CBtMtmUiData: CanEditEntryL\t" ) );
-	aReasonResourceId = TObexUtilsUiLayer::OperationNotSupported(); 
+    //todo: This was using avkon resource Id of sting "This item is not available".
+	aReasonResourceId = 0; 
 	if( CheckEntry( aContext ) )
 		{
 		if ( ( aContext.iType.iUid == KUidMsvMessageEntryValue ) || 
@@ -283,8 +280,9 @@
 TBool CBtMtmUiData::CanDeleteServiceL( const TMsvEntry& /*aService*/, 
                                       TInt& aReasonResourceId ) const
 	{
-    FLOG( _L( " CBtMtmUiData: CanDeleteServiceL\t" ) );   
-	aReasonResourceId = TObexUtilsUiLayer::OperationNotSupported(); 
+    FLOG( _L( " CBtMtmUiData: CanDeleteServiceL\t" ) );
+    //todo: This was using avkon resource Id of sting "This item is not available".
+	aReasonResourceId = 0; 
     return EFalse; 
 	}
 
@@ -296,7 +294,8 @@
 TBool CBtMtmUiData::CanDeleteFromEntryL( const TMsvEntry& /*aContext*/, 
                                         TInt& aReasonResourceId ) const
 	{
-	aReasonResourceId = TObexUtilsUiLayer::OperationNotSupported();
+    //todo: This was using avkon resource Id of sting "This item is not available".
+	aReasonResourceId = 0;
 	return EFalse;
 	}
 
@@ -308,7 +307,8 @@
 TBool CBtMtmUiData::CanCopyMoveToEntryL( const TMsvEntry& /*aContext*/, 
                                         TInt& aReasonResourceId ) const
 	{
-	aReasonResourceId = TObexUtilsUiLayer::OperationNotSupported(); 
+    //todo: This was using avkon resource Id of sting "This item is not available".
+	aReasonResourceId = 0; 
 	return EFalse;
 	}
 
@@ -320,7 +320,8 @@
 TBool CBtMtmUiData::CanCopyMoveFromEntryL( const TMsvEntry& /*aContext*/,
                                           TInt& aReasonResourceId ) const
 	{
-	aReasonResourceId = TObexUtilsUiLayer::OperationNotSupported(); 
+    //todo: This was using avkon resource Id of sting "This item is not available".
+	aReasonResourceId = 0; 
 	return EFalse;
 	}
 
@@ -332,7 +333,8 @@
 TBool CBtMtmUiData::CanReplyToEntryL( const TMsvEntry& /*aContext*/, 
                                      TInt& aReasonResourceId ) const
 	{
-	aReasonResourceId = TObexUtilsUiLayer::OperationNotSupported();
+    //todo: This was using avkon resource Id of sting "This item is not available".
+	aReasonResourceId = 0;
 	return EFalse;	// Not Ok to do
 	}
 
@@ -344,7 +346,8 @@
 TBool CBtMtmUiData::CanForwardEntryL( const TMsvEntry& /*aContext*/, 
                                      TInt& aReasonResourceId ) const
 	{
-	aReasonResourceId = TObexUtilsUiLayer::OperationNotSupported();
+    //todo: This was using avkon resource Id of sting "This item is not available".
+	aReasonResourceId = 0;
 	return EFalse;	// Not Ok to do
 	}
 
@@ -368,7 +371,8 @@
                                TInt& aReasonResourceId ) const
     {
     // No way of sending a message from the outbox, so no need to cancel.
-	aReasonResourceId = TObexUtilsUiLayer::OperationNotSupported();
+    //todo: This was using avkon resource Id of sting "This item is not available".
+	aReasonResourceId = 0;
 	return EFalse;
     }
 
@@ -381,8 +385,9 @@
     {  
     FLOG( _L( " CBtMtmUiData: StatusTextL\t" ) );
     TBuf<80> buffer;
-    TInt resourceId = R_BT_SEND_PROGRESS_SENDING;
-    TObexUtilsUiLayer::ReadResourceL( buffer, resourceId );
+    //todo: Need to use localised string.
+    _LIT(KText, "Sending");
+    buffer.Copy(KText);
     return buffer.AllocL();
     }
 
--- a/btobexprofiles/obexreceiveservices/mtmuiinfrared/data/irmtmui.rss	Fri May 28 17:03:06 2010 +0300
+++ b/btobexprofiles/obexreceiveservices/mtmuiinfrared/data/irmtmui.rss	Mon Jul 12 18:51:05 2010 +0300
@@ -20,8 +20,6 @@
 
 //  INCLUDES
 #include <mtmconfig.rh>
-#include <avkon.loc> 
-
 
 
 #include <e32capability.h>
@@ -34,7 +32,8 @@
 		{		
 		MTM_COMPONENT_V2
 			{
-			human_readable_name = qtn_query_send_via_ir;
+            //todo: Need to use localized string.
+			human_readable_name = "Via Infrared ";
 			component_uid = KUidMtmServerComponentVal;
 			entry_point = 1;
 			version = VERSION_V2 {};
@@ -42,7 +41,8 @@
 			},
 		MTM_COMPONENT_V2
 			{
-			human_readable_name = qtn_query_send_via_ir;
+			//todo: Need to use localized string.
+			human_readable_name = "Via Infrared ";
 			component_uid = KUidMtmClientComponentVal;
 			entry_point = 1;
 			version = VERSION_V2 {};
@@ -50,7 +50,8 @@
 			},
 		MTM_COMPONENT_V2
 			{
-			human_readable_name = qtn_query_send_via_ir;
+			//todo: Need to use localized string.
+			human_readable_name = "Via Infrared ";
 			component_uid = KUidMtmUiComponentVal;
 			entry_point = 2;
 			version = VERSION_V2 {};
@@ -58,7 +59,8 @@
 			},
 		MTM_COMPONENT_V2
 			{
-			human_readable_name = qtn_query_send_via_ir;
+			//todo: Need to use localized string.
+			human_readable_name = "Via Infrared ";
 			component_uid = KUidMtmUiDataComponentVal;
 			entry_point = 1;
 			version = VERSION_V2 {};
--- a/btobexprofiles/obexreceiveservices/mtmuiinfrared/inc/irmtmui.h	Fri May 28 17:03:06 2010 +0300
+++ b/btobexprofiles/obexreceiveservices/mtmuiinfrared/inc/irmtmui.h	Mon Jul 12 18:51:05 2010 +0300
@@ -23,7 +23,6 @@
 
 //  INCLUDES
 #include <mtmuibas.h>
-#include <obexutilsuilayer.h>
 // CLASS DECLARATION
 
 // FORWARD DECLARATIONS
--- a/btobexprofiles/obexreceiveservices/mtmuiinfrared/inc/irmtmuidata.h	Fri May 28 17:03:06 2010 +0300
+++ b/btobexprofiles/obexreceiveservices/mtmuiinfrared/inc/irmtmuidata.h	Mon Jul 12 18:51:05 2010 +0300
@@ -23,7 +23,6 @@
 
 //  INCLUDES
 #include <mtudcbas.h>
-#include <obexutilsuilayer.h>
 
 // FORWARD DECLARATIONS
 
--- a/btobexprofiles/obexreceiveservices/mtmuiinfrared/src/irmtmui.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/btobexprofiles/obexreceiveservices/mtmuiinfrared/src/irmtmui.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -28,15 +28,12 @@
 
 #include <mtmuidef.hrh>
 #include <mtclreg.h>
-#include <obexutilsuilayer.h>
-#include <Obexutils.rsg>
 #include <msvuids.h>
 #include <msvids.h>
 #include <obexconstants.h>
 #include <btnotif.h>        	// Notifier UID's
-#include <aknnotewrappers.h> 	//For notifier
 #include <featmgr.h>
-#include <secondarydisplay/obexutilssecondarydisplayapi.h>
+#include <SecondaryDisplay/obexutilssecondarydisplayapi.h>
 
 // ================= MEMBER FUNCTIONS =======================
 
@@ -72,8 +69,12 @@
     {
     // --- Make sure base class correctly constructed ---
     CBaseMtmUi::ConstructL();
-    TObexUtilsUiLayer::ReadResourceL( iConnectingText, R_IR_CONNECTING );
-    TObexUtilsUiLayer::ReadResourceL( iSendingText, R_IR_SENDING_DATA );
+    //todo: Need to use localised string.
+    _LIT(KConnectText, "Connecting via Infrared..");
+    _LIT(KSendText, "Sending message via Infrared...");
+    iConnectingText.Copy(KConnectText);
+    iSendingText.Copy(KSendText);
+    
     iCurrentlySending = EFalse;
     }
 
@@ -82,12 +83,11 @@
 // return progress status.
 // ---------------------------------------------------------
 //
-void CIrMtmUi::GetResourceFileName( TFileName& aFileName ) const
+void CIrMtmUi::GetResourceFileName( TFileName& /*aFileName*/ ) const
     { 
     FLOG( _L( "[CIrMtmUi] CIrMtmUi: GetResourceFileName\t" ) );
-    aFileName = KObexUtilsFileDrive;
-    aFileName += KDC_RESOURCE_FILES_DIR;
-    aFileName += KObexUtilsResourceFileName;
+    //todo: This function should be removed it is using avkon resource file.
+
     }
 
 // ---------------------------------------------------------
@@ -601,13 +601,14 @@
 // recognition(document handler).
 // ---------------------------------------------------------
 //
-CMsvOperation* CIrMtmUi::LaunchEditorApplicationL( TRequestStatus& aStatus,
-                                                  CMsvSession& aSession)
+CMsvOperation* CIrMtmUi::LaunchEditorApplicationL( TRequestStatus& /*aStatus*/,
+                                                  CMsvSession& /*aSession*/)
     {
 	FLOG( _L( "[CIrMtmUi] CIrMtmUi: LaunchEditorApplicationL\t" ) );
-	CMsvEntry* message;
-	message = &iBaseMtm.Entry();    
-	return TObexUtilsUiLayer::LaunchEditorApplicationOperationL( aSession, message, aStatus );
+	//CMsvEntry* message;
+	//message = &iBaseMtm.Entry();
+	//todo: Need to use proper API for launching editor application, now returning NULL.
+	return NULL;
     }
 
 
--- a/btobexprofiles/obexreceiveservices/mtmuiinfrared/src/irmtmuidata.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/btobexprofiles/obexreceiveservices/mtmuiinfrared/src/irmtmuidata.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -29,7 +29,6 @@
 #include <mtmdef.hrh> //kuidmtmquerymaxbodysizevalue etc
 #include <mtmuidsdef.hrh> //kuidmtmquerymaxbodysizevalue etc
 #endif
-#include <Obexutils.rsg>
 #include <obexutilsmessagehandler.h>
 #include "debug.h"
 
@@ -84,7 +83,8 @@
     const TMsvEntry& /*aContext*/) const
 	{
     FLOG( _L( "[CIrMtmUiData] CIrMtmUiData: OperationSupportedL\t" ) );
-	return TObexUtilsUiLayer::OperationNotSupported();
+    //todo: This was returning avkon resource Id of sting "This item is not available".
+    return 0;
 	}
 
 // ---------------------------------------------------------
@@ -147,12 +147,13 @@
 // ---------------------------------------------------------
 //
 const CBaseMtmUiData::CBitmapArray& CIrMtmUiData::ContextIcon(
-     const TMsvEntry& aContext, 
+     const TMsvEntry& /*aContext*/, 
      TInt /*aStateFlags*/) const
 
 	{
-	TInt icon = TObexUtilsUiLayer::ContextIcon( aContext, EInfrared );
-	return *iIconArrays->At( icon/2 ); 
+	TInt icon = 0;
+	//todo: This function will not work as iIconArrays is not populated might cause panic.
+	return *iIconArrays->At( icon ); 
 	}
 
 // ---------------------------------------------------------
@@ -164,7 +165,7 @@
 	{
     FLOG( _L( "[CIrMtmUiData] CIrMtmUiData: PopulateArraysL\t" ) );
 
-	TObexUtilsUiLayer::CreateIconsL( KUidMsgTypeIrUID, iIconArrays );
+    //todo: Was populating iIconArrays which should be removed.
 	}
 
 // ---------------------------------------------------------
@@ -172,12 +173,10 @@
 // Gives resource filename.
 // ---------------------------------------------------------
 //
-void CIrMtmUiData::GetResourceFileName(TFileName& aFileName) const
+void CIrMtmUiData::GetResourceFileName(TFileName& /*aFileName*/) const
 	{
     FLOG( _L( "[CIrMtmUiData] CIrMtmUiData: GetResourceFileName\t" ) );
-    aFileName = KObexUtilsFileDrive;
-    aFileName += KDC_RESOURCE_FILES_DIR;
-    aFileName += KObexUtilsResourceFileName;
+    //todo: This was returning avkon resource file, which is not required now.
 	}
 
 // ---------------------------------------------------------
@@ -198,7 +197,8 @@
 		return ( aParent.iMtm.iUid == KMsvLocalServiceIndexEntryIdValue );
 		}
 	// --- Can't create other types ---
-	aReasonResourceId = TObexUtilsUiLayer::OperationNotSupported();
+	//todo: This was using avkon resource Id of sting "This item is not available".
+	aReasonResourceId = 0;
 	return EFalse;
 	}
 
@@ -220,7 +220,8 @@
 			return ETrue;
 			}
 		}
-	aReasonResourceId = TObexUtilsUiLayer::OperationNotSupported();
+	//todo: This was using avkon resource Id of sting "This item is not available".
+	aReasonResourceId = 0;
 	return EFalse;
 	}
 
@@ -242,7 +243,8 @@
 			return ETrue;
 			}
 		}
-	aReasonResourceId = TObexUtilsUiLayer::OperationNotSupported();
+	//todo: This was using avkon resource Id of sting "This item is not available".
+	aReasonResourceId = 0;
 	return EFalse;
 	}
 
@@ -264,7 +266,8 @@
 			return ETrue;
 			}
 		}
-	aReasonResourceId = TObexUtilsUiLayer::OperationNotSupported();
+	//todo: This was using avkon resource Id of sting "This item is not available".
+	aReasonResourceId = 0;
 	return EFalse;
 	}
 
@@ -278,7 +281,8 @@
     TInt& aReasonResourceId ) const
 	{
     FLOG( _L( "[CIrMtmUiData] CIrMtmUiData: CanEditEntryL\t" ) );
-	aReasonResourceId = TObexUtilsUiLayer::OperationNotSupported();
+    //todo: This was using avkon resource Id of sting "This item is not available".
+	aReasonResourceId = 0;
 	if( CheckEntry( aContext ) )
 		{
 		if ( ( aContext.iType.iUid == KUidMsvMessageEntryValue ) || 
@@ -301,7 +305,8 @@
     TInt& aReasonResourceId ) const
 	{
     FLOG( _L( "[CIrMtmUiData] CIrMtmUiData: CanDeleteServiceL\t" ) );
-	aReasonResourceId = TObexUtilsUiLayer::OperationNotSupported();
+    //todo: This was using avkon resource Id of sting "This item is not available".
+	aReasonResourceId = 0;
     return EFalse; 
 	}
 
@@ -314,7 +319,8 @@
     const TMsvEntry& /*aContext*/, 
     TInt& aReasonResourceId ) const
 	{
-	aReasonResourceId = TObexUtilsUiLayer::OperationNotSupported();
+    //todo: This was using avkon resource Id of sting "This item is not available".
+	aReasonResourceId = 0;
 	return EFalse;
 	}
 
@@ -327,7 +333,8 @@
     const TMsvEntry& /*aContext*/, 
     TInt& aReasonResourceId ) const
 	{
-	aReasonResourceId = TObexUtilsUiLayer::OperationNotSupported();
+    //todo: This was using avkon resource Id of sting "This item is not available".
+	aReasonResourceId = 0;
 	return EFalse;
 	}
 
@@ -340,7 +347,8 @@
     const TMsvEntry& /*aContext*/, 
     TInt& aReasonResourceId ) const
 	{
-	aReasonResourceId = TObexUtilsUiLayer::OperationNotSupported();
+    //todo: This was using avkon resource Id of sting "This item is not available".
+	aReasonResourceId = 0;
 	return EFalse;
 	}
 
@@ -353,7 +361,8 @@
     const TMsvEntry& /*aContext*/, 
     TInt& aReasonResourceId ) const
 	{
-	aReasonResourceId = TObexUtilsUiLayer::OperationNotSupported();
+    //todo: This was using avkon resource Id of sting "This item is not available".
+	aReasonResourceId = 0;
 	return EFalse;	// Not Ok to do
 	}
 
@@ -366,7 +375,8 @@
     const TMsvEntry& /*aContext*/, 
     TInt& aReasonResourceId ) const
 	{
-	aReasonResourceId = TObexUtilsUiLayer::OperationNotSupported();
+    //todo: This was using avkon resource Id of sting "This item is not available".
+	aReasonResourceId = 0;
 	return EFalse;	// Not Ok to do
 	}
 
@@ -391,7 +401,8 @@
     const TMsvEntry& /*aContext*/, TInt& aReasonResourceId ) const
     {
     // No way of sending a message from the outbox, so no need to cancel.
-	aReasonResourceId = TObexUtilsUiLayer::OperationNotSupported();
+    //todo: This was using avkon resource Id of sting "This item is not available".
+	aReasonResourceId = 0;
 	return EFalse;
     }
 
@@ -404,8 +415,9 @@
 	{  
     FLOG( _L( "[CIrMtmUiData] CIrMtmUiData: StatusTextL\t" ) );
     TBuf<80> buffer;
-    TInt resourceId = R_IR_SEND_PROGRESS_SENDING;
-	TObexUtilsUiLayer::ReadResourceL( buffer, resourceId );
+    //todo: Need to use localised string.
+    _LIT(KText, "Sending");
+    buffer.Copy(KText);
     HBufC* ptr;
     ptr = buffer.AllocL();
     return ptr;
--- a/btobexprofiles/obexreceiveservices/opp/group/obexserviceopp.mmp	Fri May 28 17:03:06 2010 +0300
+++ b/btobexprofiles/obexreceiveservices/opp/group/obexserviceopp.mmp	Mon Jul 12 18:51:05 2010 +0300
@@ -38,19 +38,21 @@
 USERINCLUDE   ../inc
 SYSTEMINCLUDE  ../../../inc ../../../../inc  /epoc32/include/ecom
 MW_LAYER_SYSTEMINCLUDE
+SYSTEMINCLUDE  /epoc32/include/mw/hb/hbcore
+SYSTEMINCLUDE  /epoc32/include/mw/hb/hbwidgets
+SYSTEMINCLUDE  /epoc32/include/platform/mw/btservices
 
 LIBRARY         obexutils.lib 
 LIBRARY         euser.lib
 LIBRARY         efsrv.lib
 LIBRARY 		servicehandler.lib 
-LIBRARY			avkon.lib
 LIBRARY         irobex.lib          // For Object exchange
 LIBRARY	    	imageconversion.lib
 LIBRARY         bafl.lib
 LIBRARY         ecom.lib
 LIBRARY         sysutil.lib
 LIBRARY			esock.lib
-LIBRARY			charconv.lib aknnotify.lib eiksrv.lib
+LIBRARY			charconv.lib
 LIBRARY         platformenv.lib
 LIBRARY 		bluetooth.lib                       // Bluetooth libraries
 LIBRARY 		btdevice.lib                        // Bluetooth library
@@ -60,5 +62,7 @@
 LIBRARY 		btengdevman.lib				//btengdevman.dll
 LIBRARY 		btengsettings.lib			//btengsettings.dll
 LIBRARY 		btengconnman.lib			//btengconnman.dll
+LIBRARY			HbCore.lib		
+LIBRARY			HbWidgets.lib
 
 DEBUGLIBRARY	flogger.lib
--- a/btobexprofiles/obexreceiveservices/opp/inc/oppcontroller.h	Fri May 28 17:03:06 2010 +0300
+++ b/btobexprofiles/obexreceiveservices/opp/inc/oppcontroller.h	Mon Jul 12 18:51:05 2010 +0300
@@ -26,28 +26,41 @@
 
 #include <e32base.h>
 #include <obexutilsmessagehandler.h>
-#include <obexutilsuilayer.h>
 #include "obexutilspropertynotifier.h"
 #include <SrcsInterface.h>
 #include "btengdevman.h"
 
 #include <obexutilspropertynotifier.h>
-#include <obexutilsglobalprogressdialog.h>
 
-#include <AiwServiceHandler.h> // The AIW service handler
+#include <obexutilsdialog.h>
+#include <hbdevicedialogsymbian.h>
+#include <hbsymbianvariant.h>
 
-_LIT( KUniqueTransportName, "RFCOMM" );
+
 const TInt KBtStartReserveChannel   = 9;
 const TInt KBtEndReserveChannel     = 30;
 
+// todo @ QT migration: take official definition from Messaging at app layer (btmsgtypeuid.h)
+const TUid KUidMsgTypeBt                 = {0x10009ED5};
+/**
+* Backup status.
+* The value is controlled by FileManager
+*/
+enum TFileManagerBkupStatusType
+    {
+    EFileManagerBkupStatusUnset   = 0x00000000,
+    EFileManagerBkupStatusBackup  = 0x00000001,
+    EFileManagerBkupStatusRestore = 0x00000002
+    };
 /**
 *  CBtListenActive
 *  Class to implement IrObex permanent listen
 */
 class COPPController : public CSrcsInterface, public MObexServerNotify, 
                        public MObexUtilsPropertyNotifyHandler,
-                       public MGlobalProgressCallback, public MGlobalNoteCallback, 
-                       public MBTEngDevManObserver     
+                       public MObexUtilsDialogObserver,
+                       public MBTEngDevManObserver,
+                       public MHbDeviceDialogObserver     
     {
 public:
     static COPPController* NewL();
@@ -76,15 +89,13 @@
 private: // from MObexUtilsPropertyNotifyHandler
     void HandleNotifyL(TMemoryPropertyCheckType aCheckType);
     
-private: // from MGlobalProgressCallback
-    void HandleGlobalProgressDialogL(TInt aSoftkey); 
-    
-private: // from MGlobalNoteCallback
-    void HandleGlobalNoteDialogL(TInt aSoftkey);
     
 private: // from MBTEngDevManObserver
     void HandleGetDevicesComplete(TInt aErr, CBTDeviceArray* aDeviceArray);
     
+private: //from MObexUtilsDialogObserver
+    void DialogDismissed(TInt aButtonId);
+    
 private:
     COPPController();
     void ConstructL();
@@ -96,10 +107,16 @@
     
     TBool CheckCapacityL();
     void LaunchReceivingIndicatorL();
-    inline TBool ReceivingIndicatorActive() const { return (iProgressDialog || iWaitDialog); }
-    void UpdateReceivingIndicator();
+    inline TBool ReceivingIndicatorActive() const { return (iDialogActive); }
+    void UpdateReceivingIndicatorL();
     void CloseReceivingIndicator(TBool aResetDisplayedState = ETrue);
-    TInt GetDriveWithMaximumFreeSpaceL();    
+    TInt GetDriveWithMaximumFreeSpaceL();  
+    TBool IsBackupRunning();
+    TBool ProcessExists( const TSecureId& aSecureId );
+    
+private:
+    void DataReceived(CHbSymbianVariantMap& aData);
+    void DeviceDialogClosed(TInt aCompletionCode);
 
 private:
     enum TObexTransferState
@@ -132,12 +149,14 @@
     TSrcsMediaType              iMediaType;
     TInt                        iTotalSizeByte;
     TFileName                   iReceivingFileName;
-    CGlobalProgressDialog*      iProgressDialog;
-    CGlobalDialog*              iWaitDialog;
     TBool                       iNoteDisplayed;
     CBTEngDevMan*               iDevMan;
     CBTDeviceArray*             iResultArray;
     TBTDeviceName               iRemoteDeviceName;
+    CObexUtilsDialog*           iDialog;
+    CHbDeviceDialogSymbian*     iProgressDialog;
+    TBool                       iDialogActive;
+    TInt                        iFileCount;
     };
 
 #endif      // OPPCONTROLLER_H
--- a/btobexprofiles/obexreceiveservices/opp/src/oppcontroller.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/btobexprofiles/obexreceiveservices/opp/src/oppcontroller.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -17,27 +17,28 @@
 
 
 // INCLUDE FILES
-#include    <avkon.hrh>                    // AVKON components
 #include    "oppcontroller.h"
 #include    "btengdevman.h"
 #include    <obexutilsmessagehandler.h>
 #include    "debug.h"
-#include    <Obexutils.rsg>
 #include    <bautils.h>
-#include    <UiklafInternalCRKeys.h>
-#include    <obexutilsuilayer.h>
 #include    <btengdomaincrkeys.h>
-#include    <AiwServiceHandler.h> // The AIW service handler
 #include    <sysutil.h>
 #include    <btengdomaincrkeys.h> 
 #include    <msvids.h>
-#include    <driveinfo.h> 
+#include    <driveinfo.h>
 #include    <es_sock.h>
 #include    <bt_sock.h>
+#include    <bluetoothdevicedialogs.h>
+#include <hbtextresolversymbian.h>
 
 // CONSTANTS
 
 const TInt    KBufferSize = 0x10000;  // 64 kB
+const TInt KFileManagerUID3 = 0x101F84EB; /// File Manager application UID3
+_LIT( KBTDevDialogId, "com.nokia.hb.btdevicedialog/1.0" );
+_LIT(KLocFileName, "btdialogs_");
+_LIT(KPath, "z:/resource/qt/translations/");  
 
 // ================= MEMBER FUNCTIONS =======================
 
@@ -68,6 +69,12 @@
     TObexUtilsMessageHandler::GetCenRepKeyStringValueL(KCRUidBluetoothEngine, 
                                                        KLCReceiveFolder,
                                                        iCenRepFolder);
+    iDialog = CObexUtilsDialog::NewL(this);
+    TBool ok = HbTextResolverSymbian::Init(KLocFileName, KPath);
+    if (!ok) 
+        {
+        User::Leave( KErrNotFound );
+        }
 	} 
 
 COPPController::~COPPController()
@@ -77,8 +84,6 @@
     delete iBuf;
     delete iLowMemoryActiveCDrive;
     delete iLowMemoryActiveMMC;
-    delete iProgressDialog;
-    delete iWaitDialog;
     delete iDevMan;
     if (iResultArray)
         {
@@ -86,6 +91,8 @@
         delete iResultArray;
         }
     iFs.Close();
+    delete iDialog;
+    delete iProgressDialog;
     }
 
 // ---------------------------------------------------------
@@ -123,7 +130,11 @@
         	{
 			if(iMediaType == ESrcsMediaBT)
 				{
-				TRAP_IGNORE( TObexUtilsUiLayer::ShowGlobalConfirmationQueryL( R_BT_FAILED_TO_RECEIVE ) );
+                TRAP_IGNORE(
+                        HBufC* note = HbTextResolverSymbian::LoadLC(_L("txt_bt_dpophead_receiving_failed"));
+                        iDialog->ShowErrorNoteL(note->Des());
+                        CleanupStack::PopAndDestroy(note);
+                        );
 				}
 			TRACE_ASSERT(iMediaType != ESrcsMediaIrDA, KErrNotSupported)
         	}
@@ -161,10 +172,13 @@
 // ObexConnectIndication()
 // ---------------------------------------------------------
 //
-TInt COPPController::ObexConnectIndication( const TObexConnectInfo& /*aRemoteInfo*/,
-                                            const TDesC8& /*aInfo*/)
+TInt COPPController::ObexConnectIndication( const TObexConnectInfo& aRemoteInfo,
+                                            const TDesC8& aInfo)
     {
-    TRACE_FUNC  
+    TRACE_FUNC
+    (void) aRemoteInfo;
+    (void) aInfo;
+    
     if ( iMediaType == ESrcsMediaBT )
         {
         TRACE_INFO( _L( "[oppreceiveservice] ObexConnectIndication: BT media \t" ) );
@@ -191,10 +205,10 @@
 // ObexDisconnectIndication(
 // ---------------------------------------------------------
 //
-void COPPController::ObexDisconnectIndication(const TDesC8& /*aInfo*/)
+void COPPController::ObexDisconnectIndication(const TDesC8& aInfo)
     {
     TRACE_FUNC
-
+    (void) aInfo;
     }
 
 // ---------------------------------------------------------
@@ -210,6 +224,7 @@
     iObexObject = NULL;
     TRAP_IGNORE(TObexUtilsMessageHandler::RemoveTemporaryRFileL (iFullPathFilename)); 
     iFs.Close();
+    iFileCount = 0;
     }
 
 // ---------------------------------------------------------
@@ -225,7 +240,7 @@
     // Checking if backup is running now - if backup process is active, then we
     // need to cancel transfer - otherwise phone will freeze during receiving
     // data
-    if ( TObexUtilsUiLayer::IsBackupRunning() )
+    if ( IsBackupRunning() )
         {
         TRACE_INFO ( _L ("Backup in progress! Canceling incoming transfer."));
         iObexTransferState = ETransferPutInitError;
@@ -275,7 +290,11 @@
             }
         if(!capacity)
             {
-            TRAP_IGNORE(TObexUtilsUiLayer::ShowGlobalConfirmationQueryL(R_OUT_OF_MEMORY));
+            //TRAP_IGNORE(TObexUtilsUiLayer::ShowGlobalConfirmationQueryL(R_OUT_OF_MEMORY));
+            //todo: Need to use Localized string.
+            _LIT(KText, "Not enough memory to execute operation. Delete some documents and try again.");
+            TRAP_IGNORE(iDialog->ShowErrorNoteL(KText));
+    
             return KErrDiskFull;
             }
         }
@@ -293,7 +312,11 @@
     // Now we need to either create (in the first instance) or update the dialog on the UI.
     if(ReceivingIndicatorActive())
         {
-        UpdateReceivingIndicator();
+        TRAPD(err, UpdateReceivingIndicatorL());
+        if(err < KErrNone)
+            {
+            return err;
+            }
         }
     else if(!iNoteDisplayed)
         {
@@ -323,6 +346,7 @@
         retVal = HandlePutCompleteIndication();
         iObexTransferState = ETransferIdle;
         CloseReceivingIndicator();
+        iFileCount++;
         }
     TRACE_FUNC_EXIT
     return retVal;
@@ -332,9 +356,10 @@
 // GetRequestIndication()
 // ---------------------------------------------------------
 //
-CObexBufObject* COPPController::GetRequestIndication( CObexBaseObject* /*aRequiredObject*/)
+CObexBufObject* COPPController::GetRequestIndication( CObexBaseObject* aRequiredObject)
     {
     TRACE_FUNC
+    (void) aRequiredObject;
     return NULL;
     }
 
@@ -362,10 +387,13 @@
 // SetPathIndication()
 // ---------------------------------------------------------
 //
-TInt COPPController::SetPathIndication( const CObex::TSetPathInfo& /*aPathInfo*/, 
-                                        const TDesC8& /*aInfo*/)
+TInt COPPController::SetPathIndication( const CObex::TSetPathInfo& aPathInfo, 
+                                        const TDesC8& aInfo)
     {
     TRACE_FUNC
+    
+    (void) aPathInfo;
+    (void) aInfo;
     // SetPath is not implemented in OPP - so following IrOBEX guidance, return
     // the Forbidden response code.
     return KErrIrObexRespForbidden;
@@ -429,7 +457,11 @@
     //
     if (SysUtil::DiskSpaceBelowCriticalLevelL( &iFs, 0, iDrive ))
         {
-        TRAP_IGNORE(TObexUtilsUiLayer::ShowGlobalConfirmationQueryL(R_OUT_OF_MEMORY));
+        //TRAP_IGNORE(TObexUtilsUiLayer::ShowGlobalConfirmationQueryL(R_OUT_OF_MEMORY));
+        //todo: Need to use Localized string.
+        _LIT(KText, "Not enough memory to execute operation. Delete some documents and try again.");
+        TRAP_IGNORE(iDialog->ShowErrorNoteL(KText));
+    
         User::Leave(KErrGeneral);
         }
         
@@ -692,65 +724,99 @@
     
     if(iTotalSizeByte > 0)
         {
-        iProgressDialog = CGlobalProgressDialog::NewL(this);  
         if(iReceivingFileName.Length() > 0)
             {
-            iProgressDialog->ShowProgressDialogNameSizeL(iReceivingFileName, iTotalSizeByte);
+            iProgressDialog = CHbDeviceDialogSymbian::NewL();
+            iProgressDialog->SetObserver(this);
+
+            CHbSymbianVariantMap* variantMap = CHbSymbianVariantMap::NewL();
+            CleanupStack::PushL(variantMap);
+            
+            TInt dialogIdx = TBluetoothDialogParams::EReceiveProgress;
+            CHbSymbianVariant* dialogType = CHbSymbianVariant::NewL( (TAny*) &(dialogIdx), 
+                                                                CHbSymbianVariant::EInt );
+            CleanupStack::PushL(dialogType);
+            TBuf16<6> dialogTypeKey;
+            dialogTypeKey.Num(TBluetoothDialogParams::EDialogType);
+            User::LeaveIfError(variantMap->Add(dialogTypeKey, dialogType));
+            CleanupStack::Pop(dialogType);
+            
+            CHbSymbianVariant* deviceName = CHbSymbianVariant::NewL( (TAny*) (&iRemoteDeviceName), 
+                                                                CHbSymbianVariant::EDes );
+            CleanupStack::PushL(deviceName);
+            TBuf16<6> deviceNameKey;
+            deviceNameKey.Num(TBluetoothDeviceDialog::EDeviceName);
+            User::LeaveIfError(variantMap->Add(deviceNameKey, deviceName));
+            CleanupStack::Pop(deviceName);
+            
+            CHbSymbianVariant* fileName = CHbSymbianVariant::NewL( (TAny*) (&iReceivingFileName), 
+                                                                CHbSymbianVariant::EDes );
+            CleanupStack::PushL(fileName);
+            TBuf16<6> fileNameKey;
+            fileNameKey.Num(TBluetoothDeviceDialog::EReceivingFileName);
+            User::LeaveIfError(variantMap->Add(fileNameKey, fileName));
+            CleanupStack::Pop(fileName);
+            
+            CHbSymbianVariant* fileSz = CHbSymbianVariant::NewL( (TAny*) &iTotalSizeByte, 
+                                                                CHbSymbianVariant::EInt );
+            CleanupStack::PushL(fileSz);
+            TBuf16<6> fileSzKey;
+            fileSzKey.Num(TBluetoothDeviceDialog::EReceivingFileSize);
+            User::LeaveIfError(variantMap->Add(fileSzKey, fileSz));
+            CleanupStack::Pop(fileSz);
+            
+            CHbSymbianVariant* fileCnt = CHbSymbianVariant::NewL( (TAny*) &iFileCount, 
+                                                                CHbSymbianVariant::EInt );
+            CleanupStack::PushL(fileCnt);
+            TBuf16<6> fileCntKey;
+            fileCntKey.Num(TBluetoothDeviceDialog::EReceivedFileCount);
+            User::LeaveIfError(variantMap->Add(fileCntKey, fileCnt));
+            CleanupStack::Pop(fileCnt);
+            
+            iDialogActive = ETrue;
+            iProgressDialog->Show( KBTDevDialogId(), *variantMap, this );
+            CleanupStack::PopAndDestroy(variantMap);
             }
         else
             {
             if(iMediaType == ESrcsMediaBT)
                 {
-                iProgressDialog->ShowProgressDialogL(R_BT_RECEIVING_DATA);
+                //TODO - Remove the usage of the resources.
+                //iProgressDialog->ShowProgressDialogL(R_BT_RECEIVING_DATA);
                 }
             TRACE_ASSERT(iMediaType != ESrcsMediaIrDA, KErrNotSupported);
             }
         }
     else
         {
-        iWaitDialog = CGlobalDialog::NewL(this);
+    
+        /*
+         * TODO - The functionality provided by CGlobalDialog will be removed
+         * TODO - and this will be provided by CGlobalProgressDialog.
+         */
         if(iMediaType == ESrcsMediaBT)
             {
-            iWaitDialog->ShowNoteDialogL(R_BT_RECEIVING_DATA, ETrue);
+            // TODO 
             }
         TRACE_ASSERT(iMediaType != ESrcsMediaIrDA, KErrNotSupported);
         }
     }
 
-void COPPController::UpdateReceivingIndicator()
+void COPPController::UpdateReceivingIndicatorL()
     {
     if(iProgressDialog)
         {
-        iProgressDialog->UpdateProgressDialog(iObexObject->BytesReceived(), iTotalSizeByte);
-        }
-    // else we are using a wait note, so no "need" to update
-    }
-
-void COPPController::HandleGlobalProgressDialogL( TInt aSoftkey )
-    {
-    TRACE_FUNC
-    
-    if(aSoftkey == EAknSoftkeyCancel)
-        {
-        CancelTransfer();
-        }
-    else if(aSoftkey == EAknSoftkeyHide)
-        {
-        CloseReceivingIndicator(EFalse); // Don't reset state as only hiding
-        }
-    }
-
-void COPPController::HandleGlobalNoteDialogL( TInt aSoftkey )
-    {
-    TRACE_FUNC
-    
-    if(aSoftkey == EAknSoftkeyCancel)
-        {
-        CancelTransfer();
-        }
-    else if(aSoftkey == EAknSoftkeyHide)
-        {
-        CloseReceivingIndicator(EFalse); // Don't reset state as only hiding
+        CHbSymbianVariantMap* variantMap = CHbSymbianVariantMap::NewL();
+        CleanupStack::PushL(variantMap);
+        
+        TInt bytesReceived = iObexObject->BytesReceived();
+        CHbSymbianVariant* progress = CHbSymbianVariant::NewL( (TAny*) &bytesReceived, CHbSymbianVariant::EInt );
+        CleanupStack::PushL(progress);
+        User::LeaveIfError(variantMap->Add(_L("progress"), progress));
+        CleanupStack::Pop(progress);
+        
+        iProgressDialog->Update(*variantMap);
+        CleanupStack::PopAndDestroy(variantMap);
         }
     }
 
@@ -761,18 +827,14 @@
         {
         iNoteDisplayed = EFalse;
         }
+    
     if(iProgressDialog)
         {
-        iProgressDialog->ProcessFinished();
+        iProgressDialog->Cancel();
+        iDialogActive = EFalse;
         delete iProgressDialog;
         iProgressDialog = NULL;
         }
-    if(iWaitDialog)
-        {
-        iWaitDialog->ProcessFinished();
-        delete iWaitDialog;
-        iWaitDialog = NULL;
-        }
     }
 
  // ---------------------------------------------------------
@@ -830,9 +892,12 @@
  // Callback from devman
  // ----------------------------------------------------------
  //
- void COPPController::HandleGetDevicesComplete(TInt aErr, CBTDeviceArray* /*aDeviceArray*/)
+ void COPPController::HandleGetDevicesComplete(TInt aErr, CBTDeviceArray* aDeviceArray)
     {
     TRACE_INFO( _L( "[oppreceiveservice] HandleGetDevicesComplete: enter \t" ) );
+    
+    (void) aDeviceArray;
+    
     if ( aErr == KErrNone )
         {
         if ( iResultArray->Count())
@@ -851,7 +916,77 @@
             }
         }
     }
+ TBool COPPController::IsBackupRunning()
+    {
+    const TUint32 KFileManagerBkupStatus = 0x00000001;
+    
+    TInt status = EFileManagerBkupStatusUnset;
+    TBool retValue = EFalse;
+    TInt err = RProperty::Get( TUid::Uid(KFileManagerUID3), KFileManagerBkupStatus,
+                              status );
+    if ( err == KErrNone )
+        {
+        if ( status == EFileManagerBkupStatusBackup || 
+             status == EFileManagerBkupStatusRestore )
+            {
+            TSecureId fileManagerSecureId( KFileManagerUID3 );
+            //only returning ETrue if backup process is still active
+            retValue = ProcessExists( fileManagerSecureId );
+            }
+        }
+   
+    return retValue;
+    }
  
+ TBool COPPController::ProcessExists( const TSecureId& aSecureId )
+     {
+     _LIT( KFindPattern, "*" );
+     TFindProcess finder(KFindPattern);
+     TFullName processName;
+     while( finder.Next( processName ) == KErrNone )
+         {
+         RProcess process;
+         if ( process.Open( processName ) == KErrNone )
+             {
+             TSecureId processId( process.SecureId() );
+             process.Close();
+             if( processId == aSecureId )
+                 {
+                 return ETrue;
+                 }
+             }
+         }
+     return EFalse;
+     }
+ 
+ void COPPController::DialogDismissed(TInt aButtonId)
+     {
+     (void) aButtonId;
+     }
+
+ void COPPController::DataReceived(CHbSymbianVariantMap& aData)
+     {
+     if(aData.Keys().MdcaPoint(0).Compare(_L("actionResult")) == 0)
+         {
+         TInt val = *(static_cast<TInt*>(aData.Get(_L("actionResult"))->Data()));
+         if(!val)
+             {
+             //Cancel has been clicked
+             CancelTransfer();
+             }
+         else
+             {
+             //Hide has been clicked
+             CloseReceivingIndicator(EFalse);
+             }
+         }
+     }
+ 
+ void COPPController::DeviceDialogClosed(TInt aCompletionCode)
+     {
+     (void) aCompletionCode;
+     }
+
 //////////////////////////// Global part ////////////////////////////
 
 //  End of File  
--- a/btobexprofiles/obexsendservices/group/sendutils.mmp	Fri May 28 17:03:06 2010 +0300
+++ b/btobexprofiles/obexsendservices/group/sendutils.mmp	Mon Jul 12 18:51:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -30,6 +30,7 @@
 SOURCE          BTServiceUtils.cpp
 SOURCE          BTServiceStarter.cpp
 SOURCE          BTServiceParameterList.cpp
+SOURCE          BTServiceDelayedDestroyer.cpp
 
 SOURCE          BTSOPPController.cpp
 SOURCE          BTSBIPController.cpp
@@ -46,10 +47,9 @@
 SOURCE          BTSUXmlParser.cpp
 SOURCE          BTConnectionTimer.cpp
 SOURCE          BTSController.cpp
-SOURCE          BTSProgresstimer.cpp
 
 USERINCLUDE     ../obexservicesendutils/inc
-SYSTEMINCLUDE  ../../inc ../../../inc /epoc32/include/libc
+SYSTEMINCLUDE  ../../inc /epoc32/include/libc
 SYSTEMINCLUDE  /epoc32/include/mw/hb/hbcore
 SYSTEMINCLUDE  /epoc32/include/mw/hb/hbwidgets
 MW_LAYER_SYSTEMINCLUDE
--- a/btobexprofiles/obexsendservices/obexservicesendutils/inc/BTSBIPController.h	Fri May 28 17:03:06 2010 +0300
+++ b/btobexprofiles/obexsendservices/obexservicesendutils/inc/BTSBIPController.h	Mon Jul 12 18:51:05 2010 +0300
@@ -48,6 +48,8 @@
         * Destructor.
         */
         virtual ~CBTSBIPController();
+        
+        void SendUnSupportedFiles();
 
     private: // Functions from base classes
 
--- a/btobexprofiles/obexsendservices/obexservicesendutils/inc/BTSBPPController.h	Fri May 28 17:03:06 2010 +0300
+++ b/btobexprofiles/obexsendservices/obexservicesendutils/inc/BTSBPPController.h	Mon Jul 12 18:51:05 2010 +0300
@@ -21,7 +21,6 @@
 #define BT_SERVICE_BPP_CONTROLLER_H
 
 //  INCLUDES
-#include <obexutilsdialog.h>
 #include "BTServiceStarter.h"
 #include "BTServiceParameterList.h"
 #include "BTServiceClient.h"
--- a/btobexprofiles/obexsendservices/obexservicesendutils/inc/BTSController.h	Fri May 28 17:03:06 2010 +0300
+++ b/btobexprofiles/obexsendservices/obexservicesendutils/inc/BTSController.h	Mon Jul 12 18:51:05 2010 +0300
@@ -54,6 +54,9 @@
      * @return None
      */
      void Abort( );
+     
+     
+     virtual void SendUnSupportedFiles();
 
 protected:
     
--- a/btobexprofiles/obexsendservices/obexservicesendutils/inc/BTSProgresstimer.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,89 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:    
-*
-*/
-
-
-#ifndef BTSPROGRESSTIMER_H
-#define BTSPROGRESSTIMER_H
-
-
-#include    <e32base.h>
-
-class MBTServiceObserver;
-
-// CLASS DECLARATION
-/**
-*  A timer class for updating progress dialog.
-*/
-NONSHARABLE_CLASS( CBTSProgressTimer ) : public CTimer
-    {
-    public: // Constructors and destructor
-
-        /**
-        * Two-phased constructor.
-        */                           
-        static CBTSProgressTimer* NewL( MBTServiceObserver* aProgressObserverPtr );
-        
-        /**
-        * Destructor.
-        */
-        virtual ~CBTSProgressTimer();
-     
-    public: // New functions
-
-        /**
-        * Sets the timeout of the timer.
-        * @param aTimeout The timeout in microseconds.
-        * @return None.
-        */
-        void SetTimeout( TTimeIntervalMicroSeconds32 aTimeout );
-
-        /**
-        * Restarts the timer.
-        * @return None.
-        */
-        void Tickle();
-
-    private: // Functions from base classes
-
-        /**
-        * From CTimer Get's called when the timer expires.        
-        * @return None.
-        */
-        void RunL();
-        
-        TInt RunError( TInt aError );
-
-    private:
-
-        /**
-        * C++ default constructor.
-        */
-        CBTSProgressTimer( MBTServiceObserver* aProgressObserverPtr );
-        
-        /**
-        * By default Symbian OS constructor is private.
-        */      
-        void ConstructL();
-
-    private: // Data
-        TTimeIntervalMicroSeconds32 iTimeout;
-        MBTServiceObserver* iProgressObserverPtr;
-    };
-
-#endif      // BTSPROGRESSTIMER_H
-            
-// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/btobexprofiles/obexsendservices/obexservicesendutils/inc/BTServiceDelayedDestroyer.h	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,81 @@
+/*
+* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  The base active object declaration
+*
+*/
+
+
+#ifndef BT_SERVICE_DELAYED_DESTROYER_H
+#define BT_SERVICE_DELAYED_DESTROYER_H
+
+//  INCLUDES
+#include <btengdiscovery.h>
+#include <e32base.h>
+
+NONSHARABLE_CLASS (CBTServiceDelayedDestroyer) : public CActive
+    {
+    
+public:
+
+    static CBTServiceDelayedDestroyer* NewL(CActive::TPriority aPriority);
+
+    static CBTServiceDelayedDestroyer* NewLC(CActive::TPriority aPriority);
+
+    virtual ~CBTServiceDelayedDestroyer();
+
+public:
+
+    /**
+     * Calls SetActive().
+     */
+    void GoActive();
+    
+    // Sets the pointer which will be destroyed.
+    // Must be called with GoActive, they are pairs, first 
+    // call SetDestructPointer and then GoActive.
+    void SetDestructPointer(CBTEngDiscovery* aPtr);
+
+private:    
+
+    /**
+     * From CActive. 
+     * cancels the outstanding request.
+     */
+    virtual void DoCancel();
+
+    /**
+     * From CActive. 
+     * Handles the request completion event.
+     * Deletes CBTEngDiscovery object which is passed via SetDestructPointer method.
+     */
+    virtual void RunL();
+
+    /**
+     * From CActive. 
+     * Handles the leave from RunL().
+     * @param aError the leave code in RunL()
+     * @return the error code to Active Scheduler
+     */
+    virtual TInt RunError(TInt aError);
+
+private:    
+
+    CBTServiceDelayedDestroyer(CActive::TPriority aPriority);
+
+private:
+    TRequestStatus iStatus;
+    CBTEngDiscovery* iPtr;    
+    };
+
+#endif  // BT_SERVICE_DELAYED_DESTROYER_H
--- a/btobexprofiles/obexsendservices/obexservicesendutils/inc/BTServiceStarter.h	Fri May 28 17:03:06 2010 +0300
+++ b/btobexprofiles/obexsendservices/obexservicesendutils/inc/BTServiceStarter.h	Mon Jul 12 18:51:05 2010 +0300
@@ -24,14 +24,12 @@
 #include "BTServiceAPI.h"
 #include "BTServiceUtils.h"
 #include "BTServiceParameterList.h"
+#include "BTServiceDelayedDestroyer.h"
 
 #include <btengdiscovery.h>
 #include <btengsettings.h>
 #include <obexutilsdialog.h>
 #include <msvapi.h>
-#include <hbdevicedialogsymbian.h>
-#include <hb/hbwidgets/hbdeviceprogressdialogsymbian.h>
-#include <hbsymbianvariant.h>
 
 // DATA TYPES
 
@@ -54,7 +52,6 @@
 class CObexUtilsUiLayer;
 class MBTServiceProgressGetter;
 class CBTSController;
-class CBTSProgressTimer;
 
 
 const TUint KBTSdpObjectPush            = 0x1105;
@@ -83,7 +80,8 @@
         * @param aGetter A pointer to a progess status getter object.
         * @return None.
         */
-        virtual void LaunchProgressNoteL( MBTServiceProgressGetter* aGetter, TInt aTotalSize, TInt aFileCount ) = 0;
+        //todo reusing the second param aTotalsize to aFileCount as it wass no longer used check it being used in other places
+        virtual void LaunchProgressNoteL( MBTServiceProgressGetter* aGetter, TInt aFileCount) = 0;
         
         
         /**
@@ -93,21 +91,12 @@
         */
         virtual void UpdateProgressNoteL(TInt aFileSize,TInt aFileIndex, const TDesC& aFileName ) = 0;
         
-
-        /**
-        * Informs the observer that a progress note should be shown.
-        * @param aGetter A pointer to a progess status getter object.
-        * @return None.
-        */
-        virtual void UpdateProgressInfoL() = 0;
-        
-        
         /**
         *  Informs the observer that a confirmation query for sending
-        *  should be shouwn for BIP sendign
+        *  should be shouwn for BIP sending
         *  @return
         */ 
-        virtual TInt LaunchConfirmationQuery(TInt aResouceId)=0;        
+        virtual void LaunchConfirmationQuery(const TDesC& aConfirmText)=0; 
         
         /**
         *  Informs the observer that a connect is timedout        
@@ -126,9 +115,7 @@
                           public MObexUtilsDialogObserver,
                           public MObexUtilsProgressObserver,
                           public MBTEngSdpResultReceiver,
-                          public MBTEngSettingsObserver,
-                          public MHbDeviceProgressDialogObserver,
-						  public MHbDeviceDialogObserver 
+                          public MBTEngSettingsObserver
     {
     public:  // Constructors and destructor
         
@@ -170,9 +157,11 @@
         * From MBTServiceObserver A progress note should be shown.
         * @param aGetter A pointer to a progess status getter object.
         * @param aTotalSize Max size of the progress bar.
+        * @param aFileCount Total Number of files to be sent
         * @return None.
         */
-        void LaunchProgressNoteL( MBTServiceProgressGetter* aGetter, TInt aTotalSize, TInt aFileCount );
+        //todo reuse the second param as it is no longer used check it being used in other places
+        void LaunchProgressNoteL( MBTServiceProgressGetter* aGetter, TInt aFileCount);
         
         
         /**
@@ -184,32 +173,15 @@
         */
         void UpdateProgressNoteL(TInt aFileSize,TInt aFileIndex, const TDesC& aFileName );
 		
-      /**
-        * From MBTServiceObserver Updating progress note info about the progress percentage
-        * @return None.
-        */
-         void UpdateProgressInfoL();
 
         /**
         * From MObexUtilsWaitDialogObserver The wait note has been dismissed.
         * @param aButtonId The button id that was used to dismiss the dialog.
         * @return None.
         */
-        void DialogDismissed( TInt aButtonId );
+        void DialogDismissed(TInt aButtonId);
         
         /**
-		* From MHbDeviceProgressDialogObserver
-		*
-		*/
-        void ProgressDialogCancelled(const CHbDeviceProgressDialogSymbian *  aDialog);
-        
-	  /**
-		* From MHbDeviceProgressDialogObserver
-		*
-		*/
-        void ProgressDialogClosed(const CHbDeviceProgressDialogSymbian *  aDialog )  ; 
-
-        /**
         * From MObexUtilsProgressObserver request for number of bytes sent
         * @Param None.
         * @return Number of bytes sent.
@@ -223,6 +195,13 @@
         */ 
         TInt LaunchConfirmationQuery(TInt aResourceId); 
         
+        
+        /**
+        *  From MBTServiceObserver A confirmation query for BIP
+        *  profile  should be shown.
+        */ 
+        void LaunchConfirmationQuery(const TDesC& aConfirmText);
+        
         /**
         *  From MBTServiceObserver a connect request is timedout        
         *  @return
@@ -414,7 +393,7 @@
         * @param aReason Error value
         * @return None.
         */
-        void ShowNote( TInt aReason ) const;
+        void ShowErrorNote( TInt aReason ) const;
 
         /**
         * Cancel progress note
@@ -449,9 +428,6 @@
          */
         void TurnBTPowerOnL( const TBTPowerStateValue aState );
         
-        void DataReceived(CHbSymbianVariantMap& aData);
-       
-        void DeviceDialogClosed(TInt aCompletionCode);
     private:    // Data definitions
 
         enum TBTServiceStarterState
@@ -468,12 +444,14 @@
         CBTDevice*                  iDevice;
         CBTEngDiscovery*            iBTEngDiscovery;
         CBTServiceParameterList*    iList;
- //       CObexUtilsDialog*           iDialog;
+        CObexUtilsDialog*           iDialog;
         CBTSController*       iController;
 
         TBTServiceType              iService;
         TInt                        iClientChannel;
         TBTServiceStarterState      iState;
+        //todo verify the usage of below variable when file sending to mulitple devices or
+        //when files from different applications are sent simultaneously
         TBool                       iServiceStarted;
         TMsvId                      iMessageServerIndex;
         
@@ -481,6 +459,8 @@
         CActiveSchedulerWait*       iWaiter;
         TBool                       iAllSend;                     
         TInt						iBytesSendWithBIP;        
+        //todo verify the usage of below variable as this part of legacy code
+        //and false condition will never be hit.
         TBool						iProgressDialogActive;        
         TBool                       iUserCancel;
         CBTEngSettings*             iBTEngSettings;
@@ -493,11 +473,8 @@
         TBool                       iFeatureManagerInitialized;
         TBool                       iTriedBIP;
         TBool                       iTriedOPP;
-        CHbDeviceDialogSymbian *iDeviceDialog;
-        CHbDeviceProgressDialogSymbian *iProgressDialog;
-        TInt                        iFileCount;
-        TInt                        iFileIndex;
-        CBTSProgressTimer *iProgressTimer;
+        CBTServiceDelayedDestroyer* iDelayedDestroyer;
+        TBool                       iLocalisationInit;
     };
 
 #endif      // BT_SERVICE_CONTROLLER_H
--- a/btobexprofiles/obexsendservices/obexservicesendutils/src/BTSBIPController.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/btobexprofiles/obexsendservices/obexservicesendutils/src/BTSBIPController.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -22,7 +22,7 @@
 #include "BTSUDebug.h"
 #include "BTSUImageConverter.h"
 #include "BTSUXmlParser.h"
-#include <Obexutils.rsg>
+#include <hbtextresolversymbian.h>
 
 
 
@@ -49,6 +49,10 @@
 const TInt KBTSUMaxPathLenght=256;
 const TInt KBTSUMaxPrivatePathLenght=20;
 
+_LIT(KBTNotSendSomeText,"txt_bt_info_receiving_device_does_not_support_all");
+_LIT(KBTNotSendOneText,"txt_bt_info_receiving_device_does_not_support_this");
+
+
 
 
 // ============================ MEMBER FUNCTIONS ===============================
@@ -235,7 +239,7 @@
         }
     else if( aStatus != KErrAbort && aGetResponse->BytesReceived()==0 )
         {
-        TRAPD( error,iObserverPtr->LaunchProgressNoteL( iClient, iListPtr->ImageListSize(),iListPtr->ImageCount() ) );
+        TRAPD( error,iObserverPtr->LaunchProgressNoteL( iClient,iListPtr->ImageCount() ) );
         error=KErrNone;
         TRAP(error, SendL() );    	 
         if ( error != KErrNone )
@@ -291,7 +295,7 @@
         
         TBTSUImageParam imageparam = iListPtr->ImageAtL( iFileIndex );        
         RBuf filename;
-        filename.CreateL(256);
+        filename.CreateL(KMaxFileName);
         CleanupClosePushL(filename);
         imageparam.iFile.Name(filename);
         
@@ -557,7 +561,6 @@
     TBool found;
     TBool allSupported;
     TInt picindex,capindex;
-    TInt confirm=0;
     CBTSUXmlParser* xmlParser = CBTSUXmlParser::NewL();
     CleanupStack::PushL( xmlParser );
     GenerateTempFileNameL( iTempFileName );
@@ -631,42 +634,20 @@
     
     if(!allSupported  && iListPtr->ImageCount() > 1)
     	{      	
-    	
-    	confirm=iObserverPtr->LaunchConfirmationQuery(R_BT_NOT_SEND_ALL_QUERY_MIXED);    	
-    		
-    	if(confirm==EAknSoftkeyYes)
-    		{
-    		// Everything went ok. Start sending images
-    		//
-    		iObserverPtr->LaunchProgressNoteL( iClient, iListPtr->ImageListSize(),iListPtr->ImageCount() );
-    
-		    // Start sending images
-    		//
-   			SendL();
-    		}
-    	
-    		
+        HBufC* sendText = HbTextResolverSymbian::LoadLC(KBTNotSendSomeText);
+    	iObserverPtr->LaunchConfirmationQuery(sendText->Des());
+    	CleanupStack::PopAndDestroy( sendText );
     	}
     else if ( !allSupported  &&  iListPtr->ImageCount() == 1)
         {
         // We allow user to choose wheather to send the image file which is not supported on target device
-        // Original codeline: iObserverPtr->ControllerComplete( EBTSBIPOneNotSend ); 
-        confirm=iObserverPtr->LaunchConfirmationQuery(R_BT_NOT_SEND_ALL_QUERY_SINGLE);       
-                    
-        if(confirm==EAknSoftkeyYes)
-            {
-            // Everything went ok. Start sending the images
-            //
-            iObserverPtr->LaunchProgressNoteL( iClient, iListPtr->ImageListSize(),iListPtr->ImageCount() );
-            
-            // Start sending images
-            //
-            SendL();
-            }
+        HBufC* sendText = HbTextResolverSymbian::LoadLC(KBTNotSendOneText);
+        iObserverPtr->LaunchConfirmationQuery(sendText->Des());
+        CleanupStack::PopAndDestroy( sendText );
         } 	
     else if( allSupported )  	
         {
-    	iObserverPtr->LaunchProgressNoteL( iClient, iListPtr->ImageListSize() + iListPtr->ObjectListSizeL(),iListPtr->ImageCount() + iListPtr->ObjectCount());
+    	iObserverPtr->LaunchProgressNoteL( iClient, iListPtr->ImageCount() + iListPtr->ObjectCount());
     
 	    // Start sending images
     	//   	
@@ -688,4 +669,23 @@
     }
 
 
+
+void CBTSBIPController::SendUnSupportedFiles()
+    {
+    // Everything went ok. Start sending images
+
+    // group leaving functions in one trap for better performance:
+    TRAPD(err, {
+            iObserverPtr->LaunchProgressNoteL( iClient, iListPtr->ImageCount() );
+            SendL(); } );
+    
+    if ( err != KErrNone )
+        {
+        DeleteTempFile( iTempFileName );
+        // Error on capability handling
+        //
+        iObserverPtr->ControllerComplete( EBTSGettingFailed );
+        }
+    }
+
 //  End of File  
--- a/btobexprofiles/obexsendservices/obexservicesendutils/src/BTSBPPController.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/btobexprofiles/obexsendservices/obexservicesendutils/src/BTSBPPController.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -23,8 +23,6 @@
 #include "BTSUDebug.h"
 
 #include <obexheaders.h>
-#include <Obexutils.rsg>
-#include <obexutilsuilayer.h>
 
 // CONSTANTS
 _LIT8( KBTSDirectPrintingUUID, "\x00\x00\x11\x18\x00\x00\x10\x00\x80\x00\x00\x80\x5F\x9B\x34\xFB" );
--- a/btobexprofiles/obexsendservices/obexservicesendutils/src/BTSController.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/btobexprofiles/obexsendservices/obexservicesendutils/src/BTSController.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -58,6 +58,11 @@
     FLOG(_L("[BTSU]\t CBTSController::Abort"));            
     }
 
+void CBTSController::SendUnSupportedFiles()
+    {
+    
+    }
+
 // ---------------------------------------------------------------------------
 // CBTSController::Abort
 // ---------------------------------------------------------------------------
--- a/btobexprofiles/obexsendservices/obexservicesendutils/src/BTSOPPController.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/btobexprofiles/obexsendservices/obexservicesendutils/src/BTSOPPController.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -218,7 +218,7 @@
                 }            
             }
         }
-    iObserverPtr->LaunchProgressNoteL( iClient, iListPtr->ObjectListSizeL(),iListPtr->ObjectCount() );
+    iObserverPtr->LaunchProgressNoteL( iClient, iListPtr->ObjectCount() );
     iFileIndex = 0;
     UpdateProgressNoteL();    
     Send();
@@ -230,7 +230,7 @@
     TInt size;
     RBuf filename;
     iListPtr->ObjectAtL( iFileIndex ).Size(size);
-    filename.CreateL(255);
+    filename.CreateL(KMaxFileName);
     iListPtr->ObjectAtL( iFileIndex ).Name(filename);
     iObserverPtr->UpdateProgressNoteL(size,iFileIndex,filename);
     filename.Close();
--- a/btobexprofiles/obexsendservices/obexservicesendutils/src/BTSProgresstimer.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,121 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-// INCLUDE FILES
-#include "BTSProgresstimer.h"
-#include "BTServiceStarter.h"
-#include "BTSUDebug.h"
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-CBTSProgressTimer::CBTSProgressTimer( MBTServiceObserver* aProgressObserverPtr)
-                               : CTimer( EPriorityLow ), 
-                                       iProgressObserverPtr( aProgressObserverPtr )
-    {
-    CActiveScheduler::Add( this );
-    }
-
-// -----------------------------------------------------------------------------
-// CObexUtilsDialogTimer::ConstructL
-// Symbian OS default constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CBTSProgressTimer::ConstructL()
-    {
-    FLOG(_L("[OBEXUTILS]\t CBTSProgressTimer::ConstructL()"));
-
-    CTimer::ConstructL();
-
-    FLOG(_L("[OBEXUTILS]\t CBTSProgressTimer::ConstructL() completed"));
-    }
-
-// -----------------------------------------------------------------------------
-// CObexUtilsDialogTimer::NewL
-// -----------------------------------------------------------------------------
- CBTSProgressTimer* CBTSProgressTimer::NewL( MBTServiceObserver* aProgressObserverPtr)
-    {
-    CBTSProgressTimer* self = 
-        new( ELeave ) CBTSProgressTimer( aProgressObserverPtr );
-
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// -----------------------------------------------------------------------------
-// Destructor
-// -----------------------------------------------------------------------------
-//
-CBTSProgressTimer::~CBTSProgressTimer()
-    {
-    Cancel();
-    }
-
-// -----------------------------------------------------------------------------
-// CObexUtilsDialogTimer::Tickle
-// -----------------------------------------------------------------------------
-//
- void CBTSProgressTimer::Tickle()
-    {
-    FLOG(_L("[OBEXUTILS]\t CBTSProgressTimer::Tickle()"));
-
-    Cancel();
-    After( iTimeout );
-
-    FLOG(_L("[OBEXUTILS]\t CBTSProgressTimer::Tickle() completed"));
-    }
-
-// -----------------------------------------------------------------------------
-// CObexUtilsDialogTimer::RunL
-// -----------------------------------------------------------------------------
-//
-void CBTSProgressTimer::RunL()
-    {
-    FLOG(_L("[OBEXUTILS]\t CBTSProgressTimer::RunL()"));
-    if (iProgressObserverPtr)
-        {
-        iProgressObserverPtr->UpdateProgressInfoL();
-        }
-
-    FLOG(_L("[OBEXUTILS]\t CBTSProgressTimer::RunL() completed"));
-    }
-
-TInt CBTSProgressTimer::RunError( TInt aError )
-    {
-    FLOG(_L("[OBEXUTILS]\t CBTSProgressTimer::RunError()"));
-    (void) aError;
-    FLOG(_L("[OBEXUTILS]\t CBTSProgressTimer::RunError() - completed"));
-    return KErrNone;
-    }
-
-// -----------------------------------------------------------------------------
-// CObexUtilsDialogTimer::SetTimeout
-// -----------------------------------------------------------------------------
-//
- void CBTSProgressTimer::SetTimeout( TTimeIntervalMicroSeconds32 aTimeout )
-    {
-    iTimeout = aTimeout;
-    }
-
-//  End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/btobexprofiles/obexsendservices/obexservicesendutils/src/BTServiceDelayedDestroyer.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,139 @@
+/*
+* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  The base active class definition 
+*
+*/
+
+
+#include "BTServiceDelayedDestroyer.h"
+#include "BTSUDebug.h"
+
+// ======== MEMBER FUNCTIONS ========
+
+// -----------------------------------------------------------------------------
+// CBTServiceDelayedDestroyer::NewL()
+// -----------------------------------------------------------------------------
+//  
+CBTServiceDelayedDestroyer* CBTServiceDelayedDestroyer::NewL(CActive::TPriority aPriority)
+    {
+    CBTServiceDelayedDestroyer* self = CBTServiceDelayedDestroyer::NewLC(aPriority);
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CBTServiceDelayedDestroyer::NewLC()
+// -----------------------------------------------------------------------------
+//  
+CBTServiceDelayedDestroyer* CBTServiceDelayedDestroyer::NewLC(CActive::TPriority aPriority)
+    {
+    CBTServiceDelayedDestroyer* self = new (ELeave) CBTServiceDelayedDestroyer(aPriority);
+    CleanupStack::PushL(self);
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CBTServiceDelayedDestroyer::CBTServiceDelayedDestroyer()
+// -----------------------------------------------------------------------------
+//  
+CBTServiceDelayedDestroyer::CBTServiceDelayedDestroyer(CActive::TPriority aPriority)
+    : CActive(aPriority), iPtr(NULL)
+    {
+    FLOG(_L("[BTSU]\t CBTServiceDelayedDestroyer::CBTServiceDelayedDestroyer()"));
+    CActiveScheduler::Add(this);
+    }
+
+// -----------------------------------------------------------------------------
+// CBTServiceDelayedDestroyer::~CBTServiceDelayedDestroyer()
+// -----------------------------------------------------------------------------
+//  
+CBTServiceDelayedDestroyer::~CBTServiceDelayedDestroyer()
+    {
+    FLOG(_L("[BTSU]\t CBTServiceDelayedDestroyer::Destructor()"));
+    if( iPtr )
+        {
+        delete iPtr;
+        iPtr = NULL;
+        }
+    Cancel();
+    }
+
+// -----------------------------------------------------------------------------
+// CBTServiceDelayedDestroyer::GoActive()
+// -----------------------------------------------------------------------------
+//  
+void CBTServiceDelayedDestroyer::GoActive()
+    {
+    FLOG(_L("[BTSU]\t CBTServiceDelayedDestroyer::GoActive()"));
+    if( !IsActive() )
+        {
+        TRequestStatus* status = &iStatus;
+        iStatus = KRequestPending;
+        User::RequestComplete(status, KErrNone);
+    	SetActive();
+        }
+    else
+    	{
+        FLOG(_L("[BTSU]\t CBTServiceDelayedDestroyer::GoActive(), Already active"));
+    	}
+    }
+
+// -----------------------------------------------------------------------------
+// CBTServiceDelayedDestroyer::SetDestructPointer()
+// Must be called with GoActive, they are pairs, first call SetDestructPointer
+// and then GoActive.
+// -----------------------------------------------------------------------------
+//  
+void CBTServiceDelayedDestroyer::SetDestructPointer(CBTEngDiscovery* aPtr)
+    {
+    FLOG(_L("[BTSU]\t CBTServiceDelayedDestroyer::SetDestructPointer()"));
+    if( iPtr )
+        {
+        // If previous is not deleted yet, meaning, RunL is not called yet,
+        // we can safely delete previous here.
+        delete iPtr;
+        }
+    iPtr = aPtr;
+    }
+
+// -----------------------------------------------------------------------------
+// CBTServiceDelayedDestroyer::DoCancel()
+// -----------------------------------------------------------------------------
+//  
+void CBTServiceDelayedDestroyer::DoCancel()
+    {
+    FLOG(_L("[BTSU]\t CBTServiceDelayedDestroyer::DoCancel()"));
+    }
+    
+// -----------------------------------------------------------------------------
+// CBTServiceDelayedDestroyer::RunL()
+// -----------------------------------------------------------------------------
+//  
+void CBTServiceDelayedDestroyer::RunL()
+    {
+    FLOG(_L("[BTSU]\t CBTServiceDelayedDestroyer::RunL()"));
+    delete iPtr;
+    iPtr = NULL;
+    }
+
+// -----------------------------------------------------------------------------
+// CBTServiceDelayedDestroyer::RunError()
+// -----------------------------------------------------------------------------
+//      
+TInt CBTServiceDelayedDestroyer::RunError(TInt aError)
+    {
+    FTRACE(FPrint(_L("[BTSU]\t CBTServiceStarter::RunError() aError = %d"), aError) );
+    (void) aError;
+    return KErrNone;
+    } 
--- a/btobexprofiles/obexsendservices/obexservicesendutils/src/BTServiceStarter.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/btobexprofiles/obexsendservices/obexservicesendutils/src/BTServiceStarter.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -24,14 +24,10 @@
 #include "BTSBIPController.h"
 #include "BTSBPPController.h"
 
-#include <Obexutils.rsg>
-#include <obexutilsuilayer.h>
 #include <obexutilsmessagehandler.h>
-#include <btnotif.h>
 #include <featmgr.h>
-#include "BTSProgresstimer.h"
 #include <hbdevicenotificationdialogsymbian.h>
-#include <btservices/bluetoothdevicedialogs.h>
+#include <hbtextresolversymbian.h>
 
 // CONSTANTS
 
@@ -42,8 +38,21 @@
 
 const TUint KBTProgressInterval         = 1000000;
 
+const TUid KUidMsgTypeBt                 = {0x10009ED5};
+//todo  need to find a suitable header to include. This is from obexutilslayer.h
 
-_LIT(KSendingDialog,"com.nokia.hb.btdevicedialog/1.0");
+const TInt KMaxDesCLength  = 256;
+
+
+//_LIT(KSendingDialog,"com.nokia.hb.btdevicedialog/1.0");
+
+_LIT(KLocFileName, "btdialogs_");
+_LIT(KPath, "z:/resource/qt/translations/");  
+
+_LIT(KFilesSentText, "txt_bt_dpophead_all_files_sent");//All files sent 
+_LIT(KDeviceText,"txt_bt_dpopinfo_sent_to_1");
+//_LIT(KNotConnectedText,"txt_bt_info_unable_to_connect_with_bluetooth");
+_LIT(KSendingFailedText,"txt_bt_dpophead_sending_failed");
 
 // ============================ MEMBER FUNCTIONS ===============================
 
@@ -78,12 +87,11 @@
     {
     FLOG(_L("[BTSU]\t CBTServiceStarter::ConstructL()"));
     iDevice = CBTDevice::NewL();
-//    iDialog = CObexUtilsDialog::NewL( this );
-    iDeviceDialog = CHbDeviceDialogSymbian::NewL();
-    iProgressDialog = CHbDeviceProgressDialogSymbian::NewL(CHbDeviceProgressDialogSymbian::EWaitDialog,this);
-    
+    iDialog = CObexUtilsDialog::NewL( this );
+    iDelayedDestroyer = CBTServiceDelayedDestroyer::NewL(CActive::EPriorityStandard);
     FeatureManager::InitializeLibL();
     iFeatureManagerInitialized = ETrue;
+    iLocalisationInit = HbTextResolverSymbian::Init(KLocFileName, KPath);
     FLOG(_L("[BTSU]\t CBTServiceStarter::ConstructL() completed"));
     }
 
@@ -117,14 +125,9 @@
 
     delete iController;
     delete iBTEngDiscovery;
- //   delete iDialog;
-    delete iDeviceDialog;
-    delete iProgressDialog;
-    if(iProgressTimer)
-        {
-        delete iProgressTimer;
-        }
-
+    delete iDialog;
+    delete iDelayedDestroyer;
+    
     if(iWaiter && iWaiter->IsStarted() )
         {
         iWaiter->AsyncStop();
@@ -262,41 +265,6 @@
         }
     }
 
-void CBTServiceStarter::UpdateProgressInfoL()
-    {
-    HBufC* key = HBufC::NewL(50);
-    CleanupStack::PushL(key);
-   
-    HBufC* value = HBufC::NewL(50);
-    CleanupStack::PushL(value);
-    
-    CHbSymbianVariantMap* map = CHbSymbianVariantMap::NewL();
-    CleanupStack::PushL(map);
-    
-    TInt progress = GetProgressStatus();
-    
-    key->Des().Copy(_L("progressValue"));
-    CHbSymbianVariant* progressvalue = CHbSymbianVariant::NewL(&progress, CHbSymbianVariant::EInt);
-    map->Add(*key,progressvalue);
-    
-    key->Des().Copy(_L("currentFileIdx"));
-    value->Des().AppendNum(iFileIndex);
-    CHbSymbianVariant* currentFileIdx = CHbSymbianVariant::NewL(value, CHbSymbianVariant::EDes);
-    map->Add(*key,currentFileIdx);
-
-    
-    TInt ret = iDeviceDialog->Update(*map);
-    
-    CleanupStack::PopAndDestroy(map);
-    CleanupStack::PopAndDestroy(value);            
-    CleanupStack::PopAndDestroy(key);
-    
-    
-    if ( iProgressTimer )
-        {
-        iProgressTimer->Tickle();
-        }
-    }
 
 // -----------------------------------------------------------------------------
 // CBTServiceStarter::ValidParameters
@@ -480,10 +448,9 @@
         }
     else
         {
-        //       iDialog->LaunchWaitDialogL( R_BT_CONNECTING_WAIT_NOTE );
+    //todo need to do the localisation here
         _LIT(KConnectText, "Connecting...");
-        iProgressDialog->SetTextL(KConnectText);
-        iProgressDialog->ShowL();
+        iDialog->LaunchWaitDialogL(KConnectText);
         
         }    
     FLOG(_L("[BTSU]\t CBTServiceStarter::LaunchWaitNoteL() completed"));
@@ -497,15 +464,10 @@
     {
     FLOG(_L("[BTSU]\t CBTServiceStarter::CancelWaitNote()"));
 
-  //  if ( iDialog )
-  //      {
-        //       TRAP_IGNORE( iDialog->CancelWaitDialogL() );
-        if(iProgressDialog)
-            {
-            //This has to be tested
-            iProgressDialog->Close();
-            }
-    //    }
+    if ( iDialog )
+        {
+        iDialog->CancelWaitDialog();
+        }
 
     FLOG(_L("[BTSU]\t CBTServiceStarter::CancelWaitNote() completed"));
     }
@@ -515,12 +477,12 @@
 // CBTServiceStarter::LaunchProgressNoteL
 // -----------------------------------------------------------------------------
 //
+//todo reusing the second param aTotalSize to aFileCount as it is no longer used check it being used in other places
 void CBTServiceStarter::LaunchProgressNoteL( MBTServiceProgressGetter* aGetter,
-                                             TInt aTotalSize, TInt aFileCount)
+                                              TInt aFileCount)
     {
     FLOG(_L("[BTSU]\t CBTServiceStarter::LaunchProgressNoteL()"));
-    (void) aTotalSize;
-    
+    RBuf deviceName;
     if ( iService != EBTPrintingService )
         {    
         iProgressGetter = aGetter;     
@@ -528,33 +490,24 @@
         
         if ( !iProgressDialogActive )
         	{
-            iFileCount = aFileCount;
+            // todo need to change the last parameter because we are now using the textmap id which is a string
+            // whether we replace it with that or remove the parameter is to be decided
         	iMessageServerIndex = TObexUtilsMessageHandler::CreateOutboxEntryL( 
-            KUidMsgTypeBt, R_BT_SEND_OUTBOX_SENDING );        
-   //     	iDialog->LaunchProgressDialogL( this, aTotalSize, 
-     //        								R_BT_SENDING_DATA, KBTProgressInterval );	
-            CHbSymbianVariantMap* map = CHbSymbianVariantMap::NewL();
-            CleanupStack::PushL(map);
-            if ( iProgressTimer )
-                {
-                iProgressTimer->Cancel();
-                delete iProgressTimer;
-                iProgressTimer = NULL;
-                }
+            KUidMsgTypeBt, 0 );     
 
-            iProgressTimer = CBTSProgressTimer::NewL( this );
-            iProgressTimer->SetTimeout( KBTProgressInterval );
+            deviceName.CreateL(KMaxDesCLength);
             
-            iProgressTimer->Tickle();
-
-            CHbSymbianVariant* value = NULL;
-            TBuf<6> key;
-            TInt data = TBluetoothDialogParams::ESend;
-            key.Num(TBluetoothDialogParams::EDialogType);
-            value = CHbSymbianVariant::NewL( (TAny*) &data, CHbSymbianVariant::EInt );
-            User::LeaveIfError(map->Add( key, value ));   // Takes ownership of value
-            iDeviceDialog->Show(KSendingDialog(),*map,this);
-            CleanupStack::PopAndDestroy(map);
+            if ( iDevice->IsValidFriendlyName() )
+                {
+                deviceName.Copy( iDevice->FriendlyName() );
+                }
+            else 
+                {
+                deviceName.Copy( BTDeviceNameConverter::ToUnicodeL(iDevice->DeviceName()));
+                }        	
+        	iDialog->LaunchProgressDialogL( this, aFileCount, 
+                                deviceName, KBTProgressInterval );	
+        	deviceName.Close();
         	}        
         iProgressDialogActive=ETrue;     
         }
@@ -562,77 +515,16 @@
     FLOG(_L("[BTSU]\t CBTServiceStarter::LaunchProgressNoteL() completed"));
     }
 
+// -----------------------------------------------------------------------------
+// CBTServiceStarter::UpdateProgressNoteL
+// -----------------------------------------------------------------------------
+//
 void CBTServiceStarter::UpdateProgressNoteL(TInt aFileSize,TInt aFileIndex, const TDesC& aFileName )
     {
-    HBufC* key = HBufC::NewL(50);
-    CleanupStack::PushL(key);
-   
-    HBufC* value = HBufC::NewL(50);
-    CleanupStack::PushL(value);
     
-    CHbSymbianVariantMap* map = CHbSymbianVariantMap::NewL();
-    CleanupStack::PushL(map);
-    
-    iFileIndex = aFileIndex+1;
-    key->Des().Copy(_L("currentFileIdx"));
-    value->Des().AppendNum(aFileIndex+1);
-    CHbSymbianVariant* currentFileIdx = CHbSymbianVariant::NewL(value, CHbSymbianVariant::EDes);
-    map->Add(*key,currentFileIdx);
-    
-    key->Des().Copy(_L("totalFilesCnt"));
-    value->Des().Zero();
-    value->Des().AppendNum(iFileCount);
-    CHbSymbianVariant* totalFilesCnt = CHbSymbianVariant::NewL(value, CHbSymbianVariant::EDes);
-    map->Add(*key,totalFilesCnt);
-
-    
-    key->Des().Copy(_L("destinationName"));
-    if ( iDevice->IsValidFriendlyName() )
-        {
-        value->Des().Copy( iDevice->FriendlyName() );
-        }
-    else 
-        {
-        value->Des().Copy( BTDeviceNameConverter::ToUnicodeL(iDevice->DeviceName()));
-        }
+    iDialog->UpdateProgressNoteL(aFileSize,aFileIndex,aFileName);
+    }
 
-    CHbSymbianVariant* destinationName = CHbSymbianVariant::NewL(value, CHbSymbianVariant::EDes);
-    map->Add(*key,destinationName);
-    
-    key->Des().Copy(_L("fileName"));
-    value->Des().Copy(aFileName);
-    CHbSymbianVariant* fileName = CHbSymbianVariant::NewL(value, CHbSymbianVariant::EDes);
-    map->Add(*key,fileName);
-    
-    key->Des().Copy(_L("fileSzTxt"));
-    value->Des().Zero();
-    if(aFileSize < 1024)
-        {
-        value->Des().AppendNum(aFileSize);
-        value->Des().Append(_L(" Bytes"));
-        }
-    else
-        {
-        TInt filesize =  aFileSize/1024;
-        value->Des().AppendNum(filesize);
-        value->Des().Append(_L(" KB"));
-        }
-
-    CHbSymbianVariant* fileSzTxt = CHbSymbianVariant::NewL(value, CHbSymbianVariant::EDes);
-    map->Add(*key,fileSzTxt);
-    
-    
-    key->Des().Copy(_L("fileSz"));
-    CHbSymbianVariant* fileSz = CHbSymbianVariant::NewL(&aFileSize, CHbSymbianVariant::EInt);
-    map->Add(*key,fileSz);
-
-
-    
-    TInt ret = iDeviceDialog->Update(*map);
-    CleanupStack::PopAndDestroy(map);
-    CleanupStack::PopAndDestroy(value);            
-    CleanupStack::PopAndDestroy(key);
-    }
 // -----------------------------------------------------------------------------
 // CBTServiceStarter::CancelProgressNote
 // -----------------------------------------------------------------------------
@@ -641,31 +533,21 @@
     {
     FLOG(_L("[BTSU]\t CBTServiceStarter::CancelProgressNote()"));
 
- //   if ( iDialog )
+    if ( iDialog )
         {
-  //      TRAP_IGNORE( iDialog->CancelProgressDialogL() );
-    if ( iProgressTimer )
-         {
-         iProgressTimer->Cancel();
-         delete iProgressTimer;
-         iProgressTimer = NULL;
-         }
+        iDialog->CancelProgressDialog();
         }
-    if(iDeviceDialog)
-         {
-         iDeviceDialog->Cancel();
-         }
     }
 
 // -----------------------------------------------------------------------------
 // CBTServiceStarter::DialogDismissed
 // -----------------------------------------------------------------------------
 //
-void CBTServiceStarter::DialogDismissed( TInt aButtonId )
+void CBTServiceStarter::DialogDismissed(TInt aButtonId )
     {
     FLOG(_L("[BTSU]\t CBTServiceStarter::DialogDismissed()"));   
-    if( aButtonId == EAknSoftkeyCancel )
-        {
+    if( aButtonId == ECancelButton )
+        { // this condition is hit for the progress dialog and connecting dialog cancel
         FLOG(_L("[BTSU]\t CBTServiceStarter::DialogDissmissed(), cancelled by user"));        
         iUserCancel=ETrue;
         if ( iController )
@@ -677,148 +559,93 @@
            StopTransfer(KErrCancel);
            }    
         }
-    else if ( aButtonId == EAknSoftkeyNo )
+    else if ( aButtonId == ENoButton )
         {
         // user abortion
         //
         iUserCancel = ETrue;
         StopTransfer( KErrCancel );
+        CancelWaitNote();
+        }
+    else //EYesButton
+        {// this condition is hit when user is ok with sending the unsupported images
+        iController->SendUnSupportedFiles();
         }
     FLOG(_L("[BTSU]\t CBTServiceStarter::DialogDismissed() completed"));
     }
 
 // -----------------------------------------------------------------------------
-// CBTServiceStarter::ShowNote
+// CBTServiceStarter::ShowErrorNote
 // -----------------------------------------------------------------------------
 //
-void CBTServiceStarter::ShowNote( TInt aReason ) const
+void CBTServiceStarter::ShowErrorNote( TInt aReason ) const
     {
-    FLOG(_L("[BTSU]\t CBTServiceStarter::ShowNote()"));
+    FLOG(_L("[BTSU]\t CBTServiceStarter::ShowErrorNote()"));
      
-//    TInt resource = 0;
-    TBuf<255> buf;
+    TBuf<KMaxDesCLength> buf;
+    TPtrC sendTextMapId;
+    
+    if ( iDevice->IsValidFriendlyName() )
+        {
+        buf.Copy( iDevice->FriendlyName() );
+        }
+    else 
+        {
+        TRAP_IGNORE( buf.Copy( BTDeviceNameConverter::ToUnicodeL(iDevice->DeviceName())));
+        }
+    
 
     switch ( aReason )
         {
         case EBTSNoError:
             {
-    /*        if ( iService == EBTPrintingService )
-                {
-               // resource = R_BT_DATA_SENT2;
-                
-                _LIT(KText, "Data Sent");
-                buf.Copy(KText);
-                }
-            else
-                {
-                //resource = R_BT_DATA_SENT;*/
-                _LIT(KText, "All files Sent to ");
-                buf.Copy(KText);
-                if ( iDevice->IsValidFriendlyName() )
-                    {
-                    buf.Append( iDevice->FriendlyName() );
-                    }
-                else 
-                    {
-                   TRAP_IGNORE( buf.Append( BTDeviceNameConverter::ToUnicodeL(iDevice->DeviceName())));
-                    }
-
-
-//                }
+            sendTextMapId.Set(KFilesSentText());
             break;
             }
         case EBTSConnectingFailed:
-            {
-            //resource = R_BT_DEV_NOT_AVAIL;
-            _LIT(KText, "Cannot establish Bluetooth connection");
-            buf.Copy(KText);
-            break;
-            }
         case EBTSGettingFailed:
         case EBTSPuttingFailed:
-            {
-            if ( iService == EBTPrintingService )
-                {
-                _LIT(KText, "Sending failed");
-                //resource = R_BT_FAILED_TO_SEND2;
-                buf.Copy(KText);
-                }
-            else
-                {
-                _LIT(KText, "Failed to send Data");
-                //resource = R_BT_FAILED_TO_SEND;
-                buf.Copy(KText);
-                }
-            break;
-            }
         case EBTSNoSuitableProfiles:
+      //todo below three enums are not valid and it is not being used at anywhere do we need to have it 
+            
+//        case EBTSBIPSomeSend:
+//        case EBTSBIPOneNotSend:
+//        case EBTSBIPNoneSend:
+        default:            
             {
-            if ( iService == EBTPrintingService )
-                {
-                _LIT(KText, "Printer not supported");
-                buf.Copy(KText);
-            //    resource = R_BT_PRINTING_NOT_SUPPORTED;
-                }
-            else
-                {
-                _LIT(KText, "Failed to send Data");
-                buf.Copy(KText);
-         //       resource = R_BT_FAILED_TO_SEND;
-                }
-            break;
-            }
-        case EBTSBIPSomeSend:
-        	{
-        	_LIT(KText, "Failed to send Data");
-        	 buf.Copy(KText);
-        	//resource = R_BT_FAILED_TO_SEND;
-        	break;	
-        	}    
-        case EBTSBIPOneNotSend:
-        	{
-        	_LIT(KText, "Receiving device does not support this image format.");
-        	 buf.Copy(KText);
-        	//resource = R_BT_NOT_RECEIVE_ONE;
-        	break;
-        	}
-        case EBTSBIPNoneSend:
-        	{
-        	_LIT(KText, "Receiving device does not support the needed image formats.");
-        	 buf.Copy(KText);
-        	//resource = R_BT_NOT_RECEIVE_ANY;
-        	break;
-        	}	
-        default:
-            {            
-           // resource = R_BT_DEV_NOT_AVAIL;
-            _LIT(KText, "Cannot establish Bluetooth connection");
-            buf.Copy(KText);
+            sendTextMapId.Set(KSendingFailedText());
             break;
             }
         }        
     
-//	TRAP_IGNORE(TObexUtilsUiLayer::ShowInformationNoteL( resource ) );	
-//    CHbDeviceMessageBoxSymbian::InformationL(buf);
-      TRAP_IGNORE(CHbDeviceNotificationDialogSymbian::NotificationL(KNullDesC, buf, KNullDesC));
-    FLOG(_L("[BTSU]\t CBTServiceStarter::ShowNote() completed"));
+    
+    if(iLocalisationInit)
+        {
+        TRAP_IGNORE(
+               HBufC* sendText = HbTextResolverSymbian::LoadLC(sendTextMapId);
+               HBufC* deviceName =  HbTextResolverSymbian::LoadLC(KDeviceText,buf);
+               CHbDeviceNotificationDialogSymbian::NotificationL(KNullDesC, deviceName->Des(), sendText->Des());
+               CleanupStack::PopAndDestroy( deviceName );
+               CleanupStack::PopAndDestroy( sendText );
+               );
+        }
+    else
+        {
+        TRAP_IGNORE(CHbDeviceNotificationDialogSymbian::NotificationL(KNullDesC, KDeviceText(), sendTextMapId));
+        }
+    FLOG(_L("[BTSU]\t CBTServiceStarter::ShowErrorNote() completed"));
     }
 
+
+
 // -----------------------------------------------------------------------------
 // CBTServiceStarter::LaunchConfirmationQuery
 // -----------------------------------------------------------------------------
 //
-TInt CBTServiceStarter::LaunchConfirmationQuery(TInt /*aResourceId*/)
-	{
-	TInt keypress=0;
-//	TRAP_IGNORE( keypress = iDialog->LaunchQueryDialogL(  aResourceId ));	
-	if ( !keypress )
-		{
-		FLOG(_L("[BTSU]\t CBTServiceStarter::LaunchConfirmationQuery(), cancelled by user"));
-		DialogDismissed(EAknSoftkeyNo);
-		CancelWaitNote();		
-		}   		
-	return keypress;
-	}
+void  CBTServiceStarter::LaunchConfirmationQuery(const TDesC& aConfirmText)
+    {
+    TRAP_IGNORE(iDialog->LaunchQueryDialogL(aConfirmText ));
+    }
 
 // -----------------------------------------------------------------------------
 // CBTServiceStarter::StopTransfer
@@ -836,7 +663,7 @@
 	
         if ( aError != KErrCancel )
             {
-            ShowNote( aError );
+            ShowErrorNote( aError );
             }     
         }
     if ( iMessageServerIndex != 0 )
@@ -987,7 +814,12 @@
         }
     else
         {
-        delete iBTEngDiscovery;
+        // Set destroyer AO active (destroys CBTEngDiscovery/CBTEngSdpQuery classes). This is done
+        // to ensure that CBTEngDiscovery/CBTEngSdpQuery classes have finished all their activities,
+        // callbacks etc.. Destructing it self is handled in CBTServiceDelayedDestroyer's RunL.
+        iDelayedDestroyer->SetDestructPointer(iBTEngDiscovery);
+        iDelayedDestroyer->GoActive();
+        // Set iBTEngDiscovery pointer to zero. Pointer doesn't exist CBTServiceStarter point of view anymore.
         iBTEngDiscovery = NULL;    
         StopTransfer(EBTSConnectingFailed);    
         }    
@@ -1220,61 +1052,3 @@
 
 
 
-void CBTServiceStarter::ProgressDialogCancelled(const CHbDeviceProgressDialogSymbian*/*  aDialog*/)
-    {
-    FLOG(_L("[BTSU]\t CBTServiceStarter::ProgressDialogCancelled(), cancelled by user"));        
-    iUserCancel=ETrue;
-    if ( iController )
-        {
-        iController->Abort();
-        }
-    else 
-       {
-       StopTransfer(KErrCancel);
-       }    
-    }
-
-
-void CBTServiceStarter::ProgressDialogClosed(const CHbDeviceProgressDialogSymbian* /* aDialog*/)
-    {
-    }
-
-
-void CBTServiceStarter::DataReceived(CHbSymbianVariantMap& /*aData*/)
-    {
-    
-    }
-
-
-void CBTServiceStarter::DeviceDialogClosed(TInt /* aCompletionCode*/)
-    {
-    TBuf<255> buf;
-    _LIT(KText, "Sending Cancelled to ");
-    buf.Copy(KText);
-    if ( iDevice->IsValidFriendlyName() )
-        {
-        buf.Append( iDevice->FriendlyName() );
-        }
-    else 
-        {
-        TRAP_IGNORE(buf.Append( BTDeviceNameConverter::ToUnicodeL(iDevice->DeviceName())));
-        }
-
-    iUserCancel=ETrue;
-    if ( iController )
-        {
-        iController->Abort();
-        }
-    else 
-       {
-       StopTransfer(KErrCancel);
-       }    
-    
-    if ( iProgressTimer )
-        {
-        iProgressTimer->Cancel();
-        delete iProgressTimer;
-        iProgressTimer = NULL;
-        }
-    TRAP_IGNORE(CHbDeviceNotificationDialogSymbian::NotificationL(KNullDesC, buf, KNullDesC));
-    }
--- a/btobexprofiles/obexserviceman/group/bld.inf	Fri May 28 17:03:06 2010 +0300
+++ b/btobexprofiles/obexserviceman/group/bld.inf	Mon Jul 12 18:51:05 2010 +0300
@@ -48,7 +48,6 @@
 ../rom/obexservicemanirda.iby                   CORE_MW_LAYER_IBY_EXPORT_PATH(obexservicemanirda.iby)
 ../rom/obexservicemanusb.iby                    CORE_MW_LAYER_IBY_EXPORT_PATH(obexservicemanusb.iby)
 ../rom/ObexUtils.iby                            CORE_MW_LAYER_IBY_EXPORT_PATH(ObexUtils.iby)
-../rom/ObexUtilsResources.iby                   LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(ObexUtilsResources.iby)
 
 
 #include  "../utils/group/bld.inf"
--- a/btobexprofiles/obexserviceman/obexservicemanserver/inc/SrcsServiceManager.h	Fri May 28 17:03:06 2010 +0300
+++ b/btobexprofiles/obexserviceman/obexservicemanserver/inc/SrcsServiceManager.h	Mon Jul 12 18:51:05 2010 +0300
@@ -138,7 +138,7 @@
     * Handling of Service array 
     * 
     */	
-    void ServiceArray(CArrayPtr<CSrcsTransport> &aTransport, TBool aState);
+    void ServiceArrayL(CArrayPtr<CSrcsTransport> &aTransport, TBool aState);
     
 private:
     
--- a/btobexprofiles/obexserviceman/obexservicemanserver/src/SrcsServiceManager.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/btobexprofiles/obexserviceman/obexservicemanserver/src/SrcsServiceManager.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -228,17 +228,17 @@
     case ESrcsTransportBT:
         FLOG(_L("[SRCS]\tserver\tCSrcsServiceManager: ManageServicesL(Bluetooth)"));
         iTransportName.Set(KSrcsTransportBT);
-        ServiceArray(*iBTConnectionArray, aState);
+        ServiceArrayL(*iBTConnectionArray, aState);
         break;
     case ESrcsTransportUSB:
         FLOG(_L("[SRCS]\tserver\tCSrcsServiceManager: ManageServicesL(USB)"));
         iTransportName.Set(KSrcsTransportUSB);
-        ServiceArray(*iUSBConnectionArray, aState);
+        ServiceArrayL(*iUSBConnectionArray, aState);
         break;
     case ESrcsTransportIrDA:
         FLOG(_L("[SRCS]\tserver\tCSrcsServiceManager: ManageServicesL(IrDA)"));
         iTransportName.Set(KSrcsTransportIrDA);
-        ServiceArray(*iIrDAConnectionArray, aState);
+        ServiceArrayL(*iIrDAConnectionArray, aState);
         break;
     default:
         FTRACE(FPrint(_L("[SRCS]\tserver\tCSrcsServiceManager: ManageServicesL. Transport not supported.")));
@@ -252,9 +252,9 @@
 // Method to manage Service arrays
 // ---------------------------------------------------------
 //     
-void CSrcsServiceManager::ServiceArray(CArrayPtr<CSrcsTransport> &aTransport, TBool aState)
+void CSrcsServiceManager::ServiceArrayL(CArrayPtr<CSrcsTransport> &aTransport, TBool aState)
     {
-    FLOG(_L("[SRCS]\tserver\tCSrcsServiceManager: ServiceArray"));
+    FLOG(_L("[SRCS]\tserver\tCSrcsServiceManager: ServiceArrayL"));
 
     // We start and stop services by aState value
     if ( aState ) // trun on service
@@ -320,7 +320,7 @@
                 FTRACE(FPrint(_L("[SRCS]\tserver\tCSrcsServiceManager: ManageServicesL. Transport implementation not found.")));
                 }
 
-            // Clean up            
+            // Clean up.  todo (from reviewing): memory leak when some func above leaves.  To be fixed          
             infoArrayTranport.ResetAndDestroy();                 
             infoArrayServiceController.ResetAndDestroy();                
             CleanupStack::PopAndDestroy(2); //infoArrayServiceController
--- a/btobexprofiles/obexserviceman/obexservicemanserver/src/obexsmmain.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/btobexprofiles/obexserviceman/obexservicemanserver/src/obexsmmain.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -99,7 +99,8 @@
 
 TInt E32Main() //used in all case( WINS and TARGET)
     {
-    __UHEAP_MARK;
+    //TODO uncomment UHEAP macros after orbit memory leaks are resolved till then it should be commented.
+//    __UHEAP_MARK;
 
     CTrapCleanup* cleanup=CTrapCleanup::New();
     TInt retVal = KErrNoMemory;
@@ -109,7 +110,7 @@
         delete cleanup;
         }
 
-    __UHEAP_MARKEND;
+ //   __UHEAP_MARKEND;
     return retVal;
     }
 
--- a/btobexprofiles/obexserviceman/rom/ObexUtils.iby	Fri May 28 17:03:06 2010 +0300
+++ b/btobexprofiles/obexserviceman/rom/ObexUtils.iby	Mon Jul 12 18:51:05 2010 +0300
@@ -20,5 +20,6 @@
 #define __OBEXUTILS_IBY__
 
 file=ABI_DIR\BUILD_DIR\obexutils.dll             SHARED_LIB_DIR\obexutils.dll
+data=/epoc32/data/z/resource/qt/translations/btdialogs_en_GB.qm   resource/qt/translations/btdialogs_en_GB.qm
 
 #endif
--- a/btobexprofiles/obexserviceman/rom/ObexUtilsResources.iby	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  IBY file for localizable elements (resources of ObexUtils
-*                library
-*
-*/
-
-
-#ifndef OBEXUTILSRESOURCES_IBY
-#define OBEXUTILSRESOURCES_IBY
-
-data=DATAZ_\RESOURCE_FILES_DIR\obexutils.rsc   	RESOURCE_FILES_DIR\obexutils.rsc
-
-#endif
-
-//  End of File  
--- a/btobexprofiles/obexserviceman/utils/bmarm/OBEXUTILSU.DEF	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-EXPORTS
-	UpdateProgressDialogL__16CObexUtilsDialogii @ 1 NONAME R3UNUSED ; CObexUtilsDialog::UpdateProgressDialogL(int, int)
-	CancelWaitDialogL__16CObexUtilsDialog @ 2 NONAME R3UNUSED ; CObexUtilsDialog::CancelWaitDialogL(void)
-	ContextIcon__17TObexUtilsUiLayerRC9TMsvEntry13TContextMedia @ 3 NONAME R3UNUSED ; TObexUtilsUiLayer::ContextIcon(TMsvEntry const &, TContextMedia)
-	CreateOutboxEntryL__24TObexUtilsMessageHandlerRC4TUidRCi @ 4 NONAME R3UNUSED ; TObexUtilsMessageHandler::CreateOutboxEntryL(TUid const &, int const &)
-	DeleteOutboxEntryL__24TObexUtilsMessageHandlerRCl @ 5 NONAME R3UNUSED ; TObexUtilsMessageHandler::DeleteOutboxEntryL(long const &)
-	GetFileSystemStatus__24TObexUtilsMessageHandler @ 6 NONAME R3UNUSED ; TObexUtilsMessageHandler::GetFileSystemStatus(void)
-	GetMmcFileSystemStatus__24TObexUtilsMessageHandler @ 7 NONAME R3UNUSED ; TObexUtilsMessageHandler::GetMmcFileSystemStatus(void)
-	LaunchEditorApplicationL__17TObexUtilsUiLayerP9CMsvEntryR11CMsvSession @ 8 NONAME R3UNUSED ; TObexUtilsUiLayer::LaunchEditorApplicationL(CMsvEntry *, CMsvSession &)
-	LaunchProgressDialogL__16CObexUtilsDialogP26MObexUtilsProgressObserveriii @ 9 NONAME ; CObexUtilsDialog::LaunchProgressDialogL(MObexUtilsProgressObserver *, int, int, int)
-	LaunchWaitDialogL__16CObexUtilsDialogi @ 10 NONAME R3UNUSED ; CObexUtilsDialog::LaunchWaitDialogL(int)
-	NewLC__16CObexUtilsDialogP24MObexUtilsDialogObserver @ 11 NONAME R3UNUSED ; CObexUtilsDialog::NewLC(MObexUtilsDialogObserver *)
-	NewL__16CObexUtilsDialogP24MObexUtilsDialogObserver @ 12 NONAME R3UNUSED ; CObexUtilsDialog::NewL(MObexUtilsDialogObserver *)
-	OperationNotSupported__17TObexUtilsUiLayer @ 13 NONAME R3UNUSED ; TObexUtilsUiLayer::OperationNotSupported(void)
-	ReadResourceL__17TObexUtilsUiLayerR6TDes16RCi @ 14 NONAME R3UNUSED ; TObexUtilsUiLayer::ReadResourceL(TDes16 &, int const &)
-	SaveObjToInboxL__24TObexUtilsMessageHandlerP14CObexBufObjectRC7TDesC16G4TUid @ 15 NONAME R3UNUSED ; TObexUtilsMessageHandler::SaveObjToInboxL(CObexBufObject *, TDesC16 const &, TUid)
-	ShowErrorNoteL__17TObexUtilsUiLayerRCi @ 16 NONAME R3UNUSED ; TObexUtilsUiLayer::ShowErrorNoteL(int const &)
-	ShowInformationNoteL__17TObexUtilsUiLayerRCi @ 17 NONAME R3UNUSED ; TObexUtilsUiLayer::ShowInformationNoteL(int const &)
-	UpdateBitmaps__17TObexUtilsUiLayerG4TUidRiRt4TBuf1i256T2T2 @ 18 NONAME ; TObexUtilsUiLayer::UpdateBitmaps(TUid, int &, TBuf<256> &, int &, int &)
-	CancelProgressDialogL__16CObexUtilsDialog @ 19 NONAME R3UNUSED ; CObexUtilsDialog::CancelProgressDialogL(void)
-	CreateIconsL__17TObexUtilsUiLayerG4TUidPt9CArrayPtr1Zt9CArrayPtr1Z10CFbsBitmap @ 20 NONAME R3UNUSED ; TObexUtilsUiLayer::CreateIconsL(TUid, CArrayPtr<CArrayPtr<CFbsBitmap> > *)
-	NewL__26CObexUtilsPropertyNotifierP31MObexUtilsPropertyNotifyHandler24TMemoryPropertyCheckType @ 21 NONAME R3UNUSED ; CObexUtilsPropertyNotifier::NewL(MObexUtilsPropertyNotifyHandler *, TMemoryPropertyCheckType)
-	LaunchQueryDialogL__16CObexUtilsDialogRCi @ 22 NONAME R3UNUSED ; CObexUtilsDialog::LaunchQueryDialogL(int const &)
-	ShowNumberOfSendFileL__16CObexUtilsDialogii @ 23 NONAME R3UNUSED ; CObexUtilsDialog::ShowNumberOfSendFileL(int, int)
-	CreateInboxAttachmentL__24TObexUtilsMessageHandlerP14CObexBufObjectG4TUidRlR5RFile @ 24 NONAME ; TObexUtilsMessageHandler::CreateInboxAttachmentL(CObexBufObject *, TUid, long &, RFile &)
-	RemoveInboxEntriesL__24TObexUtilsMessageHandlerRP14CObexBufObjectl @ 25 NONAME R3UNUSED ; TObexUtilsMessageHandler::RemoveInboxEntriesL(CObexBufObject *&, long)
-	SaveObjToInboxL__24TObexUtilsMessageHandlerRP14CObexBufObjectR5RFilel @ 26 NONAME R3UNUSED ; TObexUtilsMessageHandler::SaveObjToInboxL(CObexBufObject *&, RFile &, long)
-
--- a/btobexprofiles/obexserviceman/utils/bwins/OBEXUTILSU.DEF	Fri May 28 17:03:06 2010 +0300
+++ b/btobexprofiles/obexserviceman/utils/bwins/OBEXUTILSU.DEF	Mon Jul 12 18:51:05 2010 +0300
@@ -1,62 +1,39 @@
 EXPORTS
-	?ReadResourceL@TObexUtilsUiLayer@@SAXAAVTDes16@@ABH@Z @ 1 NONAME ; void TObexUtilsUiLayer::ReadResourceL(class TDes16 &, int const &)
+	?GetCenRepKeyIntValueL@TObexUtilsMessageHandler@@SAHVTUid@@KAAH@Z @ 1 NONAME ; int TObexUtilsMessageHandler::GetCenRepKeyIntValueL(class TUid, unsigned long, int &)
 	?SaveObjToInboxL@TObexUtilsMessageHandler@@SAXPAVCObexBufObject@@ABVTDesC16@@VTUid@@@Z @ 2 NONAME ; void TObexUtilsMessageHandler::SaveObjToInboxL(class CObexBufObject *, class TDesC16 const &, class TUid)
 	?RemoveInboxEntriesL@TObexUtilsMessageHandler@@SAXAAPAVCObexBufObject@@J@Z @ 3 NONAME ; void TObexUtilsMessageHandler::RemoveInboxEntriesL(class CObexBufObject * &, long)
-	?GetNumber@CObexUtilsOpaqueData@@QAEHAAI@Z @ 4 NONAME ; int CObexUtilsOpaqueData::GetNumber(unsigned int &)
-	??0CObexUtilsOpaqueData@@QAE@ABVTDesC8@@@Z @ 5 NONAME ; CObexUtilsOpaqueData::CObexUtilsOpaqueData(class TDesC8 const &)
-	?UpdateProgressDialog@CGlobalProgressDialog@@QAEXHH@Z @ 6 NONAME ; void CGlobalProgressDialog::UpdateProgressDialog(int, int)
-	?AddEntryToInboxL@TObexUtilsMessageHandler@@SAXAAJAAV?$TBuf@$0BAA@@@@Z @ 7 NONAME ; void TObexUtilsMessageHandler::AddEntryToInboxL(long &, class TBuf<256> &)
-	?CancelWaitDialogL@CObexUtilsDialog@@QAEXXZ @ 8 NONAME ; void CObexUtilsDialog::CancelWaitDialogL(void)
-	?LaunchFileManagerL@TObexUtilsUiLayer@@SAXAAVTDesC16@@HH@Z @ 9 NONAME ; void TObexUtilsUiLayer::LaunchFileManagerL(class TDesC16 &, int, int)
-	?CreateDefaultMtmServiceL@TObexUtilsMessageHandler@@SAXVTUid@@@Z @ 10 NONAME ; void TObexUtilsMessageHandler::CreateDefaultMtmServiceL(class TUid)
-	?UpdateProgressDialogL@CObexUtilsDialog@@QAEXHH@Z @ 11 NONAME ; void CObexUtilsDialog::UpdateProgressDialogL(int, int)
-	?GetCenRepKeyStringValueL@TObexUtilsMessageHandler@@SAHVTUid@@KAAVTDes16@@@Z @ 12 NONAME ; int TObexUtilsMessageHandler::GetCenRepKeyStringValueL(class TUid, unsigned long, class TDes16 &)
-	?GetMmcFileSystemStatus@TObexUtilsMessageHandler@@SAHXZ @ 13 NONAME ; int TObexUtilsMessageHandler::GetMmcFileSystemStatus(void)
-	?GetPubSubKeyIntValue@TObexUtilsMessageHandler@@SAHVTUid@@IAAH@Z @ 14 NONAME ; int TObexUtilsMessageHandler::GetPubSubKeyIntValue(class TUid, unsigned int, int &)
-	?IsBackupRunning@TObexUtilsUiLayer@@SAHXZ @ 15 NONAME ; int TObexUtilsUiLayer::IsBackupRunning(void)
-	?CancelProgressDialogL@CObexUtilsDialog@@QAEXXZ @ 16 NONAME ; void CObexUtilsDialog::CancelProgressDialogL(void)
-	?ProcessFinished@CGlobalProgressDialog@@QAEXXZ @ 17 NONAME ; void CGlobalProgressDialog::ProcessFinished(void)
-	?AddEntryToInboxL@TObexUtilsMessageHandler@@SAXAAJAAV?$TBuf@$0BAA@@@PAV?$RArray@J@@@Z @ 18 NONAME ; void TObexUtilsMessageHandler::AddEntryToInboxL(long &, class TBuf<256> &, class RArray<long> *)
-	?CreateIconsL@TObexUtilsUiLayer@@SAXVTUid@@PAV?$CArrayPtr@V?$CArrayPtr@VCFbsBitmap@@@@@@@Z @ 19 NONAME ; void TObexUtilsUiLayer::CreateIconsL(class TUid, class CArrayPtr<class CArrayPtr<class CFbsBitmap> > *)
-	?ShowProgressDialogNameSizeL@CGlobalProgressDialog@@QAEXAAVTDesC16@@_J@Z @ 20 NONAME ; void CGlobalProgressDialog::ShowProgressDialogNameSizeL(class TDesC16 &, long long)
-	?GetFileSystemStatus@TObexUtilsMessageHandler@@SAHXZ @ 21 NONAME ; int TObexUtilsMessageHandler::GetFileSystemStatus(void)
-	?NewL@CObexUtilsDialog@@SAPAV1@PAVMObexUtilsDialogObserver@@@Z @ 22 NONAME ; class CObexUtilsDialog * CObexUtilsDialog::NewL(class MObexUtilsDialogObserver *)
-	?LaunchQueryDialogL@CObexUtilsDialog@@QAEHABH@Z @ 23 NONAME ; int CObexUtilsDialog::LaunchQueryDialogL(int const &)
-	?CreateOutboxEntryL@TObexUtilsMessageHandler@@SAJABVTUid@@ABH@Z @ 24 NONAME ; long TObexUtilsMessageHandler::CreateOutboxEntryL(class TUid const &, int const &)
-	?ShowGlobalConfirmationQueryL@TObexUtilsUiLayer@@SAXABH@Z @ 25 NONAME ; void TObexUtilsUiLayer::ShowGlobalConfirmationQueryL(int const &)
-	?CreateInboxAttachmentL@TObexUtilsMessageHandler@@SAXAAPAVCObexBufObject@@VTUid@@AAJAAVRFile@@@Z @ 26 NONAME ; void TObexUtilsMessageHandler::CreateInboxAttachmentL(class CObexBufObject * &, class TUid, long &, class RFile &)
-	?GetMessageCentreDriveL@TObexUtilsMessageHandler@@SAHXZ @ 27 NONAME ; int TObexUtilsMessageHandler::GetMessageCentreDriveL(void)
-	?LaunchEditorApplicationL@TObexUtilsUiLayer@@SAXAAJ@Z @ 28 NONAME ; void TObexUtilsUiLayer::LaunchEditorApplicationL(long &)
-	?GetCenRepKeyIntValueL@TObexUtilsMessageHandler@@SAHVTUid@@KAAH@Z @ 29 NONAME ; int TObexUtilsMessageHandler::GetCenRepKeyIntValueL(class TUid, unsigned long, int &)
-	?LaunchWaitDialogL@CObexUtilsDialog@@QAEXH@Z @ 30 NONAME ; void CObexUtilsDialog::LaunchWaitDialogL(int)
-	?ShowNoteDialogL@CGlobalDialog@@QAEXHH@Z @ 31 NONAME ; void CGlobalDialog::ShowNoteDialogL(int, int)
-	?ShowGlobalConfirmationQueryPlainL@TObexUtilsUiLayer@@SAHABH@Z @ 32 NONAME ; int TObexUtilsUiLayer::ShowGlobalConfirmationQueryPlainL(int const &)
-	?NewLC@CGlobalProgressDialog@@SAPAV1@PAVMGlobalProgressCallback@@@Z @ 33 NONAME ; class CGlobalProgressDialog * CGlobalProgressDialog::NewLC(class MGlobalProgressCallback *)
-	?IsString@CObexUtilsOpaqueData@@QAEHXZ @ 34 NONAME ; int CObexUtilsOpaqueData::IsString(void)
-	?CreateReceiveBufferAndRFileL@TObexUtilsMessageHandler@@SAHAAVRFile@@ABVTDesC16@@AAV?$TBuf@$0BAA@@@AAPAVCBufFlat@@H@Z @ 35 NONAME ; int TObexUtilsMessageHandler::CreateReceiveBufferAndRFileL(class RFile &, class TDesC16 const &, class TBuf<256> &, class CBufFlat * &, int)
-	?LaunchEditorApplicationOperationL@TObexUtilsUiLayer@@SAPAVCMsvOperation@@AAVCMsvSession@@PAVCMsvEntry@@AAVTRequestStatus@@@Z @ 36 NONAME ; class CMsvOperation * TObexUtilsUiLayer::LaunchEditorApplicationOperationL(class CMsvSession &, class CMsvEntry *, class TRequestStatus &)
-	?OperationNotSupported@TObexUtilsUiLayer@@SAHXZ @ 37 NONAME ; int TObexUtilsUiLayer::OperationNotSupported(void)
-	?ProcessFinished@CGlobalDialog@@QAEXXZ @ 38 NONAME ; void CGlobalDialog::ProcessFinished(void)
-	?UpdateBitmaps@TObexUtilsUiLayer@@SAXVTUid@@AAHAAV?$TBuf@$0BAA@@@11@Z @ 39 NONAME ; void TObexUtilsUiLayer::UpdateBitmaps(class TUid, int &, class TBuf<256> &, int &, int &)
-	?ShowErrorDialogL@CGlobalDialog@@QAEXH@Z @ 40 NONAME ; void CGlobalDialog::ShowErrorDialogL(int)
-	?ShowProgressDialogL@CGlobalProgressDialog@@QAEXH@Z @ 41 NONAME ; void CGlobalProgressDialog::ShowProgressDialogL(int)
-	?ShowNumberOfSendFileL@CObexUtilsDialog@@QAEXHH@Z @ 42 NONAME ; void CObexUtilsDialog::ShowNumberOfSendFileL(int, int)
-	?ShowErrorNoteL@TObexUtilsUiLayer@@SAXABH@Z @ 43 NONAME ; void TObexUtilsUiLayer::ShowErrorNoteL(int const &)
-	?NewL@CObexUtilsPropertyNotifier@@SAPAV1@PAVMObexUtilsPropertyNotifyHandler@@W4TMemoryPropertyCheckType@@@Z @ 44 NONAME ; class CObexUtilsPropertyNotifier * CObexUtilsPropertyNotifier::NewL(class MObexUtilsPropertyNotifyHandler *, enum TMemoryPropertyCheckType)
-	?ShowGlobalFileOpenConfirmationQueryL@TObexUtilsUiLayer@@SAHABHABVTDesC16@@@Z @ 45 NONAME ; int TObexUtilsUiLayer::ShowGlobalFileOpenConfirmationQueryL(int const &, class TDesC16 const &)
-	?GetString@CObexUtilsOpaqueData@@QAEHAAV?$TBuf8@$0BAA@@@@Z @ 46 NONAME ; int CObexUtilsOpaqueData::GetString(class TBuf8<256> &)
-	?UpdateEntryAttachmentL@TObexUtilsMessageHandler@@SAXAAV?$TBuf@$0BAA@@@PAVCMsvEntry@@@Z @ 47 NONAME ; void TObexUtilsMessageHandler::UpdateEntryAttachmentL(class TBuf<256> &, class CMsvEntry *)
-	?NewL@CGlobalDialog@@SAPAV1@PAVMGlobalNoteCallback@@@Z @ 48 NONAME ; class CGlobalDialog * CGlobalDialog::NewL(class MGlobalNoteCallback *)
-	?CreateInboxAttachmentL@TObexUtilsMessageHandler@@SAXAAPAVCObexBufObject@@VTUid@@AAJAAVRFile@@ABVTDesC16@@@Z @ 49 NONAME ; void TObexUtilsMessageHandler::CreateInboxAttachmentL(class CObexBufObject * &, class TUid, long &, class RFile &, class TDesC16 const &)
-	?NewL@CGlobalProgressDialog@@SAPAV1@PAVMGlobalProgressCallback@@@Z @ 50 NONAME ; class CGlobalProgressDialog * CGlobalProgressDialog::NewL(class MGlobalProgressCallback *)
-	?RemoveTemporaryRFileL@TObexUtilsMessageHandler@@SAXABV?$TBuf@$0BAA@@@@Z @ 51 NONAME ; void TObexUtilsMessageHandler::RemoveTemporaryRFileL(class TBuf<256> const &)
-	?LaunchProgressDialogL@CObexUtilsDialog@@QAEXPAVMObexUtilsProgressObserver@@HHH@Z @ 52 NONAME ; void CObexUtilsDialog::LaunchProgressDialogL(class MObexUtilsProgressObserver *, int, int, int)
-	?DeleteOutboxEntryL@TObexUtilsMessageHandler@@SAXABJ@Z @ 53 NONAME ; void TObexUtilsMessageHandler::DeleteOutboxEntryL(long const &)
-	?ContextIcon@TObexUtilsUiLayer@@SAHABVTMsvEntry@@W4TContextMedia@@@Z @ 54 NONAME ; int TObexUtilsUiLayer::ContextIcon(class TMsvEntry const &, enum TContextMedia)
-	?SaveFileToFileSystemL@TObexUtilsMessageHandler@@SAXAAPAVCObexBufObject@@VTUid@@AAJAAV?$TBuf@$0BAA@@@AAVRFile@@ABVTDesC16@@@Z @ 55 NONAME ; void TObexUtilsMessageHandler::SaveFileToFileSystemL(class CObexBufObject * &, class TUid, long &, class TBuf<256> &, class RFile &, class TDesC16 const &)
-	?ShowInformationNoteL@TObexUtilsUiLayer@@SAXABH@Z @ 56 NONAME ; void TObexUtilsUiLayer::ShowInformationNoteL(int const &)
-	?NewLC@CObexUtilsDialog@@SAPAV1@PAVMObexUtilsDialogObserver@@@Z @ 57 NONAME ; class CObexUtilsDialog * CObexUtilsDialog::NewLC(class MObexUtilsDialogObserver *)
-	?LaunchEditorApplicationL@TObexUtilsUiLayer@@SAHPAVCMsvEntry@@AAVCMsvSession@@@Z @ 58 NONAME ; int TObexUtilsUiLayer::LaunchEditorApplicationL(class CMsvEntry *, class CMsvSession &)
-	?SaveObjToInboxL@TObexUtilsMessageHandler@@SAXAAPAVCObexBufObject@@AAVRFile@@J@Z @ 59 NONAME ; void TObexUtilsMessageHandler::SaveObjToInboxL(class CObexBufObject * &, class RFile &, long)
-	?NewLC@CGlobalDialog@@SAPAV1@PAVMGlobalNoteCallback@@@Z @ 60 NONAME ; class CGlobalDialog * CGlobalDialog::NewLC(class MGlobalNoteCallback *)
+	?CreateReceiveBufferAndRFileL@TObexUtilsMessageHandler@@SAHAAVRFile@@ABVTDesC16@@AAV?$TBuf@$0BAA@@@AAPAVCBufFlat@@H@Z @ 4 NONAME ; int TObexUtilsMessageHandler::CreateReceiveBufferAndRFileL(class RFile &, class TDesC16 const &, class TBuf<256> &, class CBufFlat * &, int)
+	?AddEntryToInboxL@TObexUtilsMessageHandler@@SAXAAJAAV?$TBuf@$0BAA@@@@Z @ 5 NONAME ; void TObexUtilsMessageHandler::AddEntryToInboxL(long &, class TBuf<256> &)
+	?CreateDefaultMtmServiceL@TObexUtilsMessageHandler@@SAXVTUid@@@Z @ 6 NONAME ; void TObexUtilsMessageHandler::CreateDefaultMtmServiceL(class TUid)
+	?GetCenRepKeyStringValueL@TObexUtilsMessageHandler@@SAHVTUid@@KAAVTDes16@@@Z @ 7 NONAME ; int TObexUtilsMessageHandler::GetCenRepKeyStringValueL(class TUid, unsigned long, class TDes16 &)
+	?GetMmcFileSystemStatus@TObexUtilsMessageHandler@@SAHXZ @ 8 NONAME ; int TObexUtilsMessageHandler::GetMmcFileSystemStatus(void)
+	?GetPubSubKeyIntValue@TObexUtilsMessageHandler@@SAHVTUid@@IAAH@Z @ 9 NONAME ; int TObexUtilsMessageHandler::GetPubSubKeyIntValue(class TUid, unsigned int, int &)
+	?UpdateEntryAttachmentL@TObexUtilsMessageHandler@@SAXAAV?$TBuf@$0BAA@@@PAVCMsvEntry@@@Z @ 10 NONAME ; void TObexUtilsMessageHandler::UpdateEntryAttachmentL(class TBuf<256> &, class CMsvEntry *)
+	?CreateInboxAttachmentL@TObexUtilsMessageHandler@@SAXAAPAVCObexBufObject@@VTUid@@AAJAAVRFile@@ABVTDesC16@@@Z @ 11 NONAME ; void TObexUtilsMessageHandler::CreateInboxAttachmentL(class CObexBufObject * &, class TUid, long &, class RFile &, class TDesC16 const &)
+	?AddEntryToInboxL@TObexUtilsMessageHandler@@SAXAAJAAV?$TBuf@$0BAA@@@PAV?$RArray@J@@@Z @ 12 NONAME ; void TObexUtilsMessageHandler::AddEntryToInboxL(long &, class TBuf<256> &, class RArray<long> *)
+	?RemoveTemporaryRFileL@TObexUtilsMessageHandler@@SAXABV?$TBuf@$0BAA@@@@Z @ 13 NONAME ; void TObexUtilsMessageHandler::RemoveTemporaryRFileL(class TBuf<256> const &)
+	?GetFileSystemStatus@TObexUtilsMessageHandler@@SAHXZ @ 14 NONAME ; int TObexUtilsMessageHandler::GetFileSystemStatus(void)
+	?DeleteOutboxEntryL@TObexUtilsMessageHandler@@SAXABJ@Z @ 15 NONAME ; void TObexUtilsMessageHandler::DeleteOutboxEntryL(long const &)
+	?SaveFileToFileSystemL@TObexUtilsMessageHandler@@SAXAAPAVCObexBufObject@@VTUid@@AAJAAV?$TBuf@$0BAA@@@AAVRFile@@ABVTDesC16@@@Z @ 16 NONAME ; void TObexUtilsMessageHandler::SaveFileToFileSystemL(class CObexBufObject * &, class TUid, long &, class TBuf<256> &, class RFile &, class TDesC16 const &)
+	?CreateOutboxEntryL@TObexUtilsMessageHandler@@SAJABVTUid@@ABH@Z @ 17 NONAME ; long TObexUtilsMessageHandler::CreateOutboxEntryL(class TUid const &, int const &)
+	?CreateInboxAttachmentL@TObexUtilsMessageHandler@@SAXAAPAVCObexBufObject@@VTUid@@AAJAAVRFile@@@Z @ 18 NONAME ; void TObexUtilsMessageHandler::CreateInboxAttachmentL(class CObexBufObject * &, class TUid, long &, class RFile &)
+	?GetMessageCentreDriveL@TObexUtilsMessageHandler@@SAHXZ @ 19 NONAME ; int TObexUtilsMessageHandler::GetMessageCentreDriveL(void)
+	?SaveObjToInboxL@TObexUtilsMessageHandler@@SAXAAPAVCObexBufObject@@AAVRFile@@J@Z @ 20 NONAME ; void TObexUtilsMessageHandler::SaveObjToInboxL(class CObexBufObject * &, class RFile &, long)
+	?NewL@CObexUtilsPropertyNotifier@@SAPAV1@PAVMObexUtilsPropertyNotifyHandler@@W4TMemoryPropertyCheckType@@@Z @ 21 NONAME ; class CObexUtilsPropertyNotifier * CObexUtilsPropertyNotifier::NewL(class MObexUtilsPropertyNotifyHandler *, enum TMemoryPropertyCheckType)
+	?IsString@CObexUtilsOpaqueData@@QAEHXZ @ 22 NONAME ; int CObexUtilsOpaqueData::IsString(void)
+	?GetNumber@CObexUtilsOpaqueData@@QAEHAAI@Z @ 23 NONAME ; int CObexUtilsOpaqueData::GetNumber(unsigned int &)
+	??0CObexUtilsOpaqueData@@QAE@ABVTDesC8@@@Z @ 24 NONAME ; CObexUtilsOpaqueData::CObexUtilsOpaqueData(class TDesC8 const &)
+	?GetString@CObexUtilsOpaqueData@@QAEHAAV?$TBuf8@$0BAA@@@@Z @ 25 NONAME ; int CObexUtilsOpaqueData::GetString(class TBuf8<256> &)
+	?LaunchQueryDialogL@CObexUtilsDialog@@QAEXABVTDesC16@@@Z @ 26 NONAME ; void CObexUtilsDialog::LaunchQueryDialogL(class TDesC16 const &)
+	?ShowErrorNoteL@CObexUtilsDialog@@QAEXABVTDesC16@@@Z @ 27 NONAME ; void CObexUtilsDialog::ShowErrorNoteL(class TDesC16 const &)
+	?NewL@CObexUtilsDialog@@SAPAV1@PAVMObexUtilsDialogObserver@@@Z @ 28 NONAME ; class CObexUtilsDialog * CObexUtilsDialog::NewL(class MObexUtilsDialogObserver *)
+	?UpdateProgressNoteL@CObexUtilsDialog@@QAEXHHABVTDesC16@@@Z @ 29 NONAME ; void CObexUtilsDialog::UpdateProgressNoteL(int, int, class TDesC16 const &)
+	?CancelWaitDialog@CObexUtilsDialog@@QAEXXZ @ 30 NONAME ; void CObexUtilsDialog::CancelWaitDialog(void)
+	?LaunchWaitDialogL@CObexUtilsDialog@@QAEXABVTDesC16@@@Z @ 31 NONAME ; void CObexUtilsDialog::LaunchWaitDialogL(class TDesC16 const &)
+	?CancelProgressDialog@CObexUtilsDialog@@QAEXXZ @ 32 NONAME ; void CObexUtilsDialog::CancelProgressDialog(void)
+	?LaunchProgressDialogL@CObexUtilsDialog@@QAEXPAVMObexUtilsProgressObserver@@HABVTDesC16@@H@Z @ 33 NONAME ; void CObexUtilsDialog::LaunchProgressDialogL(class MObexUtilsProgressObserver *, int, class TDesC16 const &, int)
+	??1CObexUtilsDialog@@UAE@XZ @ 34 NONAME ; CObexUtilsDialog::~CObexUtilsDialog(void)
+	?UpdateProgressDialogL@CObexUtilsDialog@@QAEXH@Z @ 35 NONAME ; void CObexUtilsDialog::UpdateProgressDialogL(int)
+	?ShowInformationNoteL@CObexUtilsDialog@@QAEXABVTDesC16@@@Z @ 36 NONAME ; void CObexUtilsDialog::ShowInformationNoteL(class TDesC16 const &)
+	?NewLC@CObexUtilsDialog@@SAPAV1@PAVMObexUtilsDialogObserver@@@Z @ 37 NONAME ; class CObexUtilsDialog * CObexUtilsDialog::NewLC(class MObexUtilsDialogObserver *)
 
--- a/btobexprofiles/obexserviceman/utils/data/Obexutils.hrh	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-/*
-* Copyright (c) 2002, 2003 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-enum
-{
-    ESendingProgressNote = 1,
-    EConnectingWaitNote,
-    EPrintingWaitNote
-};
-
-// End of File
--- a/btobexprofiles/obexserviceman/utils/data/Obexutils.rss	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,532 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*     This file contains all the resources for the obexutils.
-*     
-*
-*/
-
-
-//  RESOURCE IDENTIFIER
-NAME OBUT
-
-//  INCLUDES
-#include <obexutils.loc>
-#include "Obexutils.hrh"
-#include <eikon.rh>
-#include <avkon.rsg>
-#include <avkon.rh>
-#include <avkon.loc>
-#include <avkon.mbg>
-
-RESOURCE RSS_SIGNATURE { }
-
-//  RESOURCE DEFINITIONS 
-
-// Popup texts (information notes and error notes)
-
-// ---------------------------------------------------------
-//   
-//    r_ir_connecting
-//    this is the first shown when the user tries connect to other 
-//    remote device.
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_ir_connecting            {buf= qtn_ir_connecting;}
-
-// ---------------------------------------------------------
-//   
-//    r_ir_cannot_establish
-//    This informs that the IR connection cannot made to other remote device
-//    for some reason.
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_ir_cannot_establish      {buf= qtn_ir_cant_establish_conn;}
-
-// ---------------------------------------------------------
-//   
-//    r_ir_sending_data
-//    This is shown after the IR connection is made succesfully and we are
-//    sending message over IR.
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_ir_sending_data          {buf= qtn_ir_sending_data;}
-
-// ---------------------------------------------------------
-//   
-//    r_ir_sending_failed
-//    This is shown when the IR connection is made and some thing goes wrong
-//    during connection.
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_ir_sending_failed        {buf= qtn_ir_sending_failed;}
-
-// ---------------------------------------------------------
-//   
-//    r_ir_data_sent
-//    This is shown to the user when the message is sended succesfully.
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_ir_data_sent             {buf= qtn_ir_data_sent;}
-
-// ---------------------------------------------------------
-//   
-//    r_bt_connecting
-//    Informs state of Bluetooth connection.
-//    this is the first shown when the user tries connect to other 
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_bt_connecting             {buf= qtn_bt_connecting;}
-
-// ---------------------------------------------------------
-//   
-//    r_bt_sending_data
-//    This is shown after the Bluetooth connection is made succesfully 
-//    and we are sending message over Bluetooth.
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_bt_sending_data           {buf= qtn_bt_sending_data;}
-
-// ---------------------------------------------------------
-//   
-//    r_bt_dev_not_avail
-//    This informs that the Bluetooth connection cannot made to other 
-//    remote device for some reason.
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_bt_dev_not_avail             {buf= qtn_bt_dev_not_avail;}
-
-// ---------------------------------------------------------
-//   
-//    r_bt_failed_to_send
-//    This is shown when the BT connection is made and some thing goes wrong
-//    during connection.
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_bt_failed_to_send        {buf= qtn_bt_failed_to_send;}
-
-// ---------------------------------------------------------
-//   
-//    r_bt_data_sent
-//    This is shown to the user when the message is sended succesfully via BT.
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_bt_data_sent             {buf= qtn_bt_data_sent;}
-
-// ---------------------------------------------------------
-//   
-//    r_bt_not_receive_one
-//    This is shown when one image could not be sent
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_bt_not_receive_one        {buf= qtn_bt_bip_format_not_supported;}
-
-// ---------------------------------------------------------
-//   
-//    r_out_of_memory
-//    This is shown when not enough memory
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_out_of_memory	{buf= qtn_memlo_not_enough_memory;}
-
-// ---------------------------------------------------------
-//   
-//    r_bt_not_receive_all
-//    This is shown when no images could be sent
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_bt_sent_image_number	{buf= qtn_bt_bip_some_files_sent;}
-RESOURCE TBUF r_bt_not_receive_any		{buf= qtn_bt_bip_no_formats_supported;}
-
-// Confirmation queries
-
-// ---------------------------------------------------------
-//   
-//    Confirmation query
-//    __RD_BT_MSG_RENOVATION not flagged
-//    This is shown when some images could not be sent
-//
-// ---------------------------------------------------------
-//
-RESOURCE DIALOG r_bt_not_send_all_query
-    {
-    flags   = EGeneralQueryFlags;
-    buttons = R_AVKON_SOFTKEYS_YES_NO;
-    items   =
-        {
-        DLG_LINE
-            {
-            type    = EAknCtQuery;
-            id      = EGeneralQuery;
-            control = AVKON_CONFIRMATION_QUERY
-                {
-                layout    = EConfirmationLayout;
-                label     = qtn_bt_bip_not_all_formats_supported;
-                animation = R_QGN_NOTE_QUERY_ANIM;
-                };
-            }
-        };
-    }
-
-// ---------------------------------------------------------
-//   
-//    Confirmation query
-//    This is shown when some images are not supported
-//
-// ---------------------------------------------------------
-//
-RESOURCE DIALOG r_bt_not_all_supported_query
-    {
-    flags   = EGeneralQueryFlags;
-    buttons = R_AVKON_SOFTKEYS_YES_NO;
-    items   =
-        {
-        DLG_LINE
-            {
-            type    = EAknCtQuery;
-            id      = EGeneralQuery;
-            control = AVKON_CONFIRMATION_QUERY
-                {
-                layout    = EConfirmationLayout;
-                label     = qtn_bt_bip_not_all_formats_supported;
-                animation = R_QGN_NOTE_QUERY_ANIM;
-                };
-            }
-        };
-    }
-    
-// ---------------------------------------------------------
-//   
-//    Confirmation query for mixed list
-//    __RD_BT_MSG_RENOVATION flagged
-//    This is shown when some images could not be sent
-//
-// ---------------------------------------------------------
-//
-RESOURCE DIALOG r_bt_not_send_all_query_mixed
-    {
-    flags   = EGeneralQueryFlags;
-    buttons = R_AVKON_SOFTKEYS_YES_NO;
-    items   =
-        {
-        DLG_LINE
-            {
-            type    = EAknCtQuery;
-            id      = EGeneralQuery;
-            control = AVKON_CONFIRMATION_QUERY
-                {
-                layout    = EConfirmationLayout;
-                label     = qtn_bt_bip_mixed_list;
-                animation = R_QGN_NOTE_QUERY_ANIM;
-                };
-            }
-        };
-    }
-
-
-
-// Notes
-
-// -----------------------------------------------------------------------------
-//
-// r_bt_connecting_wait_note
-// 
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE DIALOG r_bt_connecting_wait_note
-    {
-    flags = EAknProgressNoteFlags;
-    buttons = R_AVKON_SOFTKEYS_CANCEL;
-    items =
-        {
-        DLG_LINE
-            {
-            type = EAknCtNote;
-            id = EConnectingWaitNote;
-            control = AVKON_NOTE
-                {
-                layout = EProgressLayout;
-                singular_label = qtn_bt_connecting;
-                imageid = EMbmAvkonQgn_note_progress;
-                imagemask = EMbmAvkonQgn_note_progress_mask;
-                animation = R_QGN_GRAF_WAIT_BAR_ANIM;
-                };
-            }
-        };
-    }
-// -----------------------------------------------------------------------------
-//
-// r_ir_connecting_wait_note
-// 
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE DIALOG r_ir_connecting_wait_note
-    {
-    flags = EAknProgressNoteFlags;
-    buttons = R_AVKON_SOFTKEYS_CANCEL;
-    items =
-        {
-        DLG_LINE
-            {
-            type = EAknCtNote;
-            id = EConnectingWaitNote;
-            control = AVKON_NOTE
-                {
-                layout = EProgressLayout;
-                singular_label = qtn_ir_connecting;
-                imageid = EMbmAvkonQgn_note_progress;
-                imagemask = EMbmAvkonQgn_note_progress_mask;
-                };
-            }
-        };
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// r_bt_printing_wait_note
-// 
-//
-// -----------------------------------------------------------------------------
-//
-
-// NOTE! The strings in the following resources need to be added into 
-//       localization file, once the UI specification is approved.
-//       
-
-RESOURCE DIALOG r_bt_printing_wait_note
-    {
-    flags   = EAknWaitNoteFlags;
-    buttons = R_AVKON_SOFTKEYS_CANCEL;
-    items   =
-        {
-        DLG_LINE
-            {
-            type = EAknCtNote;
-            id = EPrintingWaitNote;
-            control = AVKON_NOTE
-                {
-                layout = EWaitLayout;
-                singular_label = "Sending data...";
-	                animation = R_QGN_GRAF_WAIT_BAR_ANIM;
-                };
-            }
-        };
-    }
-
-// Skeletons (resources with changing text)
-
-// -----------------------------------------------------------------------------
-//
-// r_sending_progress_note
-// 
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE DIALOG r_sending_progress_note
-    {
-    flags = EAknProgressNoteFlags;
-    buttons = R_AVKON_SOFTKEYS_CANCEL;
-    items =
-        {
-        DLG_LINE
-            {
-            type = EAknCtNote;
-            id = ESendingProgressNote;
-            control = AVKON_NOTE
-                {
-                layout = EProgressLayout;
-                singular_label  = qtn_bt_sending_data;
-                imageid = EMbmAvkonQgn_note_progress;
-                imagemask = EMbmAvkonQgn_note_progress_mask;
-                };
-            }
-        };
-    }
-    
-// ---------------------------------------------------------
-//   
-//    r_ir_failed_to_receive
-//    This is shown to the user when failing receive file via infrared.
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_ir_failed_to_receive     {buf=qtn_ir_failed_to_receive;}
-
-// ---------------------------------------------------------
-//   
-//    qtn_ir_receiving_data
-//    This is shown to the user when receiving data via IR.
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_ir_receiving_data        {buf=qtn_ir_receiving_data;}
-
-// ---------------------------------------------------------
-//   
-//    r_bt_receiving_data
-//    This is shown after the Bluetooth connection is made succesfully 
-//    and we are receiving message over Bluetooth.
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_bt_receiving_data           {buf= qtn_bt_receiving_data;}
-
-// ---------------------------------------------------------
-//   
-//    qtn_bt_failed_to_receive
-//    This is shown when the BT connection is made and some thing goes wrong
-//    when receiving data.
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_bt_failed_to_receive        {buf= qtn_bt_failed_to_receive;}    
-
-// Other resource texts
-
-// ---------------------------------------------------------
-//   
-//    r_ir_send_progress_sending
-//    descripes status of item that is currently sending state in the outbox.
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_ir_send_progress_sending {buf= qtn_mce_outbox_status_sending;} 
-
-// ---------------------------------------------------------
-//   
-//    r_ir_send_progress_sending
-//    descripes status of item that is currently sending state in the outbox.
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_bt_send_progress_sending {buf= qtn_mce_outbox_status_sending;} 
-
-// ---------------------------------------------------------
-//   
-//    r_ir_send_outbox_sending
-//    Displayed in the "To/From" section for Ir objects in message centre.
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_ir_send_outbox_sending   {buf= qtn_mce_ir_message;}
-
-// ---------------------------------------------------------
-//   
-//    r_bt_send_outbox_sending
-//    Displayed in the "To/From" section for Ir objects in message centre.
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_bt_send_outbox_sending   {buf= qtn_mce_bt_message;}
-
-// ---------------------------------------------------------
-//   
-//    r_message_not_opened
-//    This is shown, when the user tries open a message that is not
-//    supported type.
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_message_not_opened       {buf= qtn_mce_info_message_not_opened;}
-
-// ---------------------------------------------------------
-//   
-//    r_name_for_invalid_file
-//    Default invalid filename
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_name_for_invalid_file  { buf=qtn_fldr_default_doc_name; }
-
-// ---------------------------------------------------------
-//   
-//    r_bt_to_from_in_inbox
-//    Displayed in the "To/From" section for Bluetooth objects.
-//
-// ---------------------------------------------------------
-// 
-RESOURCE TBUF       r_bt_to_from_in_inbox  { buf=qtn_mce_bt_message; }  
-
-// ---------------------------------------------------------
-//   
-//    r_ir_to_from_in_inbox
-//    Displayed in the "To/From" section for Ir objects.
-//
-// ---------------------------------------------------------
-// 
-RESOURCE TBUF       r_ir_to_from_in_inbox  { buf=qtn_mce_ir_message; }  
-
-RESOURCE TBUF r_bt_data_sent2 { buf= "Data sent"; }
-RESOURCE TBUF r_bt_failed_to_send2 { buf= "Sending failed"; }
-RESOURCE TBUF r_bt_printing_not_supported { buf = "Printer not supported"; }
-RESOURCE TBUF r_bt_sending_not_supported {buf = "Unsupported device";}
-
-RESOURCE TBUF r_bt_saved_single   { buf  = qtn_bt_saved_single; }
-RESOURCE TBUF r_bt_saved_multiple { buf = qtn_bt_saved_multiple; }
-RESOURCE TBUF r_bt_saved_search   { buf = qtn_bt_saved_search; }
-RESOURCE TBUF r_bt_saved_no_memory_card { buf = qtn_bt_saved_no_memory_card; }
-RESOURCE TBUF r_bt_saved_link_updated { buf = qtn_bt_saved_link_updated; }
-RESOURCE TBUF r_bt_saved_search_update   { buf  = qtn_bt_saved_search_update; }
-
-RESOURCE TBUF r_bt_ir_receiving_data_size_kb { buf = qtn_bt_ir_receiving_data_size_kb ; }
-RESOURCE TBUF r_bt_ir_receiving_data_size_mb { buf = qtn_bt_ir_receiving_data_size_mb ; }
-
-RESOURCE TBUF r_bt_ir_receiving_data_no_size { buf = qtn_bt_ir_receiving_data_no_size ; }
-
-// ---------------------------------------------------------
-//   
-//    Confirmation query for mixed list
-//    __RD_BT_MSG_RENOVATION flagged
-//    This is shown when some images could not be sent
-//
-// ---------------------------------------------------------
-//
-RESOURCE DIALOG r_bt_not_send_all_query_single
-    {
-    flags   = EGeneralQueryFlags;
-    buttons = R_AVKON_SOFTKEYS_YES_NO;
-    items   =
-        {
-        DLG_LINE
-            {
-            type    = EAknCtQuery;
-            id      = EGeneralQuery;
-            control = AVKON_CONFIRMATION_QUERY
-                {
-                layout    = EConfirmationLayout;
-                label     = qtn_bt_bip_format_not_supported_send;
-                animation = R_QGN_NOTE_QUERY_ANIM;
-                };
-            }
-        };
-    }
-
-
-// End of File
--- a/btobexprofiles/obexserviceman/utils/eabi/obexutilsu.DEF	Fri May 28 17:03:06 2010 +0300
+++ b/btobexprofiles/obexserviceman/utils/eabi/obexutilsu.DEF	Mon Jul 12 18:51:05 2010 +0300
@@ -1,63 +1,42 @@
 EXPORTS
-	_ZN13CGlobalDialog15ProcessFinishedEv @ 1 NONAME
-	_ZN13CGlobalDialog15ShowNoteDialogLEii @ 2 NONAME
-	_ZN13CGlobalDialog16ShowErrorDialogLEi @ 3 NONAME
-	_ZN13CGlobalDialog4NewLEP19MGlobalNoteCallback @ 4 NONAME
-	_ZN13CGlobalDialog5NewLCEP19MGlobalNoteCallback @ 5 NONAME
-	_ZN16CObexUtilsDialog17CancelWaitDialogLEv @ 6 NONAME
-	_ZN16CObexUtilsDialog17LaunchWaitDialogLEi @ 7 NONAME
-	_ZN16CObexUtilsDialog18LaunchQueryDialogLERKi @ 8 NONAME
-	_ZN16CObexUtilsDialog21CancelProgressDialogLEv @ 9 NONAME
-	_ZN16CObexUtilsDialog21LaunchProgressDialogLEP26MObexUtilsProgressObserveriii @ 10 NONAME
-	_ZN16CObexUtilsDialog21ShowNumberOfSendFileLEii @ 11 NONAME
-	_ZN16CObexUtilsDialog21UpdateProgressDialogLEii @ 12 NONAME
-	_ZN16CObexUtilsDialog4NewLEP24MObexUtilsDialogObserver @ 13 NONAME
-	_ZN16CObexUtilsDialog5NewLCEP24MObexUtilsDialogObserver @ 14 NONAME
-	_ZN17TObexUtilsUiLayer11ContextIconERK9TMsvEntry13TContextMedia @ 15 NONAME
-	_ZN17TObexUtilsUiLayer12CreateIconsLE4TUidP9CArrayPtrIS1_I10CFbsBitmapEE @ 16 NONAME
-	_ZN17TObexUtilsUiLayer13ReadResourceLER6TDes16RKi @ 17 NONAME
-	_ZN17TObexUtilsUiLayer13UpdateBitmapsE4TUidRiR4TBufILi256EES1_S1_ @ 18 NONAME
-	_ZN17TObexUtilsUiLayer14ShowErrorNoteLERKi @ 19 NONAME
-	_ZN17TObexUtilsUiLayer15IsBackupRunningEv @ 20 NONAME
-	_ZN17TObexUtilsUiLayer18LaunchFileManagerLER7TDesC16ii @ 21 NONAME
-	_ZN17TObexUtilsUiLayer20ShowInformationNoteLERKi @ 22 NONAME
-	_ZN17TObexUtilsUiLayer21OperationNotSupportedEv @ 23 NONAME
-	_ZN17TObexUtilsUiLayer24LaunchEditorApplicationLEP9CMsvEntryR11CMsvSession @ 24 NONAME
-	_ZN17TObexUtilsUiLayer24LaunchEditorApplicationLERl @ 25 NONAME
-	_ZN17TObexUtilsUiLayer28ShowGlobalConfirmationQueryLERKi @ 26 NONAME
-	_ZN17TObexUtilsUiLayer33LaunchEditorApplicationOperationLER11CMsvSessionP9CMsvEntryR14TRequestStatus @ 27 NONAME
-	_ZN17TObexUtilsUiLayer33ShowGlobalConfirmationQueryPlainLERKi @ 28 NONAME
-	_ZN17TObexUtilsUiLayer36ShowGlobalFileOpenConfirmationQueryLERKiRK7TDesC16 @ 29 NONAME
-	_ZN20CObexUtilsOpaqueData8IsStringEv @ 30 NONAME
-	_ZN20CObexUtilsOpaqueData9GetNumberERj @ 31 NONAME
-	_ZN20CObexUtilsOpaqueData9GetStringER5TBuf8ILi256EE @ 32 NONAME
-	_ZN20CObexUtilsOpaqueDataC1ERK6TDesC8 @ 33 NONAME
-	_ZN20CObexUtilsOpaqueDataC2ERK6TDesC8 @ 34 NONAME
-	_ZN21CGlobalProgressDialog15ProcessFinishedEv @ 35 NONAME
-	_ZN21CGlobalProgressDialog19ShowProgressDialogLEi @ 36 NONAME
-	_ZN21CGlobalProgressDialog20UpdateProgressDialogEii @ 37 NONAME
-	_ZN21CGlobalProgressDialog27ShowProgressDialogNameSizeLER7TDesC16x @ 38 NONAME
-	_ZN21CGlobalProgressDialog4NewLEP23MGlobalProgressCallback @ 39 NONAME
-	_ZN21CGlobalProgressDialog5NewLCEP23MGlobalProgressCallback @ 40 NONAME
-	_ZN24TObexUtilsMessageHandler15SaveObjToInboxLEP14CObexBufObjectRK7TDesC164TUid @ 41 NONAME
-	_ZN24TObexUtilsMessageHandler15SaveObjToInboxLERP14CObexBufObjectR5RFilel @ 42 NONAME
-	_ZN24TObexUtilsMessageHandler16AddEntryToInboxLERlR4TBufILi256EE @ 43 NONAME
-	_ZN24TObexUtilsMessageHandler16AddEntryToInboxLERlR4TBufILi256EEP6RArrayIlE @ 44 NONAME
-	_ZN24TObexUtilsMessageHandler18CreateOutboxEntryLERK4TUidRKi @ 45 NONAME
-	_ZN24TObexUtilsMessageHandler18DeleteOutboxEntryLERKl @ 46 NONAME
-	_ZN24TObexUtilsMessageHandler19GetFileSystemStatusEv @ 47 NONAME
-	_ZN24TObexUtilsMessageHandler19RemoveInboxEntriesLERP14CObexBufObjectl @ 48 NONAME
-	_ZN24TObexUtilsMessageHandler20GetPubSubKeyIntValueE4TUidjRi @ 49 NONAME
-	_ZN24TObexUtilsMessageHandler21GetCenRepKeyIntValueLE4TUidmRi @ 50 NONAME
-	_ZN24TObexUtilsMessageHandler21RemoveTemporaryRFileLERK4TBufILi256EE @ 51 NONAME
-	_ZN24TObexUtilsMessageHandler21SaveFileToFileSystemLERP14CObexBufObject4TUidRlR4TBufILi256EER5RFileRK7TDesC16 @ 52 NONAME
-	_ZN24TObexUtilsMessageHandler22CreateInboxAttachmentLERP14CObexBufObject4TUidRlR5RFile @ 53 NONAME
-	_ZN24TObexUtilsMessageHandler22CreateInboxAttachmentLERP14CObexBufObject4TUidRlR5RFileRK7TDesC16 @ 54 NONAME
-	_ZN24TObexUtilsMessageHandler22GetMessageCentreDriveLEv @ 55 NONAME
-	_ZN24TObexUtilsMessageHandler22GetMmcFileSystemStatusEv @ 56 NONAME
-	_ZN24TObexUtilsMessageHandler22UpdateEntryAttachmentLER4TBufILi256EEP9CMsvEntry @ 57 NONAME
-	_ZN24TObexUtilsMessageHandler24CreateDefaultMtmServiceLE4TUid @ 58 NONAME
-	_ZN24TObexUtilsMessageHandler24GetCenRepKeyStringValueLE4TUidmR6TDes16 @ 59 NONAME
-	_ZN24TObexUtilsMessageHandler28CreateReceiveBufferAndRFileLER5RFileRK7TDesC16R4TBufILi256EERP8CBufFlati @ 60 NONAME
-	_ZN26CObexUtilsPropertyNotifier4NewLEP31MObexUtilsPropertyNotifyHandler24TMemoryPropertyCheckType @ 61 NONAME
+	_ZN24TObexUtilsMessageHandler15SaveObjToInboxLEP14CObexBufObjectRK7TDesC164TUid @ 1 NONAME
+	_ZN24TObexUtilsMessageHandler15SaveObjToInboxLERP14CObexBufObjectR5RFilel @ 2 NONAME
+	_ZN24TObexUtilsMessageHandler16AddEntryToInboxLERlR4TBufILi256EE @ 3 NONAME
+	_ZN24TObexUtilsMessageHandler16AddEntryToInboxLERlR4TBufILi256EEP6RArrayIlE @ 4 NONAME
+	_ZN24TObexUtilsMessageHandler18CreateOutboxEntryLERK4TUidRKi @ 5 NONAME
+	_ZN24TObexUtilsMessageHandler18DeleteOutboxEntryLERKl @ 6 NONAME
+	_ZN24TObexUtilsMessageHandler19GetFileSystemStatusEv @ 7 NONAME
+	_ZN24TObexUtilsMessageHandler19RemoveInboxEntriesLERP14CObexBufObjectl @ 8 NONAME
+	_ZN24TObexUtilsMessageHandler20GetPubSubKeyIntValueE4TUidjRi @ 9 NONAME
+	_ZN24TObexUtilsMessageHandler21GetCenRepKeyIntValueLE4TUidmRi @ 10 NONAME
+	_ZN24TObexUtilsMessageHandler21RemoveTemporaryRFileLERK4TBufILi256EE @ 11 NONAME
+	_ZN24TObexUtilsMessageHandler21SaveFileToFileSystemLERP14CObexBufObject4TUidRlR4TBufILi256EER5RFileRK7TDesC16 @ 12 NONAME
+	_ZN24TObexUtilsMessageHandler22CreateInboxAttachmentLERP14CObexBufObject4TUidRlR5RFile @ 13 NONAME
+	_ZN24TObexUtilsMessageHandler22CreateInboxAttachmentLERP14CObexBufObject4TUidRlR5RFileRK7TDesC16 @ 14 NONAME
+	_ZN24TObexUtilsMessageHandler22GetMessageCentreDriveLEv @ 15 NONAME
+	_ZN24TObexUtilsMessageHandler22GetMmcFileSystemStatusEv @ 16 NONAME
+	_ZN24TObexUtilsMessageHandler22UpdateEntryAttachmentLER4TBufILi256EEP9CMsvEntry @ 17 NONAME
+	_ZN24TObexUtilsMessageHandler24CreateDefaultMtmServiceLE4TUid @ 18 NONAME
+	_ZN24TObexUtilsMessageHandler24GetCenRepKeyStringValueLE4TUidmR6TDes16 @ 19 NONAME
+	_ZN24TObexUtilsMessageHandler28CreateReceiveBufferAndRFileLER5RFileRK7TDesC16R4TBufILi256EERP8CBufFlati @ 20 NONAME
+	_ZN26CObexUtilsPropertyNotifier4NewLEP31MObexUtilsPropertyNotifyHandler24TMemoryPropertyCheckType @ 21 NONAME
+	_ZN20CObexUtilsOpaqueData8IsStringEv @ 22 NONAME
+	_ZN20CObexUtilsOpaqueData9GetNumberERj @ 23 NONAME
+	_ZN20CObexUtilsOpaqueData9GetStringER5TBuf8ILi256EE @ 24 NONAME
+	_ZN20CObexUtilsOpaqueDataC1ERK6TDesC8 @ 25 NONAME
+	_ZN20CObexUtilsOpaqueDataC2ERK6TDesC8 @ 26 NONAME
+	_ZN16CObexUtilsDialog14ShowErrorNoteLERK7TDesC16 @ 27 NONAME
+	_ZN16CObexUtilsDialog16CancelWaitDialogEv @ 28 NONAME
+	_ZN16CObexUtilsDialog17LaunchWaitDialogLERK7TDesC16 @ 29 NONAME
+	_ZN16CObexUtilsDialog18LaunchQueryDialogLERK7TDesC16 @ 30 NONAME
+	_ZN16CObexUtilsDialog19UpdateProgressNoteLEiiRK7TDesC16 @ 31 NONAME
+	_ZN16CObexUtilsDialog20CancelProgressDialogEv @ 32 NONAME
+	_ZN16CObexUtilsDialog20ShowInformationNoteLERK7TDesC16 @ 33 NONAME
+	_ZN16CObexUtilsDialog21LaunchProgressDialogLEP26MObexUtilsProgressObserveriRK7TDesC16i @ 34 NONAME
+	_ZN16CObexUtilsDialog21UpdateProgressDialogLEi @ 35 NONAME
+	_ZN16CObexUtilsDialog4NewLEP24MObexUtilsDialogObserver @ 36 NONAME
+	_ZN16CObexUtilsDialog5NewLCEP24MObexUtilsDialogObserver @ 37 NONAME
+	_ZN16CObexUtilsDialogD0Ev @ 38 NONAME
+	_ZN16CObexUtilsDialogD1Ev @ 39 NONAME
+	_ZN16CObexUtilsDialogD2Ev @ 40 NONAME
 
--- a/btobexprofiles/obexserviceman/utils/group/bld.inf	Fri May 28 17:03:06 2010 +0300
+++ b/btobexprofiles/obexserviceman/utils/group/bld.inf	Mon Jul 12 18:51:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -24,16 +24,15 @@
 
 PRJ_EXPORTS
 
-../inc/obexutilsuilayer.h                |../../../inc/obexutilsuilayer.h
 ../inc/obexutilsdialog.h                 |../../../inc/obexutilsdialog.h
 ../inc/obexutilspropertynotifier.h       |../../../inc/obexutilspropertynotifier.h
-../inc/obexutilsglobalprogressdialog.h   |../../../inc/obexutilsglobalprogressdialog.h
 
-../loc/Obexutils.loc       MW_LAYER_LOC_EXPORT_PATH(obexutils.loc)
+// todo need to remove below line of code and also the loc folder
+// once the localisation files are avaialble and in place in epoc32
 
+../loc/btdialogs_en_GB.qm  /epoc32/data/z/resource/qt/translations/btdialogs_en_GB.qm
 
 PRJ_MMPFILES
 obexutils.mmp
 
-
 // End of File
--- a/btobexprofiles/obexserviceman/utils/group/obexutils.mmp	Fri May 28 17:03:06 2010 +0300
+++ b/btobexprofiles/obexserviceman/utils/group/obexutils.mmp	Mon Jul 12 18:51:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -26,34 +26,25 @@
 UID           0x10004262 0x101F86AF
 VENDORID      VID_DEFAULT
 
-START RESOURCE  ../data/Obexutils.rss
-TARGETPATH RESOURCE_FILES_DIR  
-HEADER
-LANGUAGE_IDS
-END
-
 OS_LAYER_SYSTEMINCLUDE
 USERINCLUDE ../inc
 NON_FOUNDATION_ADAPT_LAYER_SYSTEMINCLUDE
 
-
 SOURCEPATH    ../src
-SOURCE        obexutilsuilayer.cpp
-SOURCE        obexutilslaunchwaiter.cpp
 SOURCE        obexutilsdialogtimer.cpp
 SOURCE        obexutilsdialog.cpp
 SOURCE        obexutilsmessagehandler.cpp
 SOURCE        obexutilspropertynotifier.cpp
 SOURCE        obexutilsopaquedata.cpp
-SOURCE        obexutilsglobalprogressdialog.cpp
-SOURCE        obexutilsglobaldialog.cpp
 SOURCE        obexutilsentryhandler.cpp
 SOURCE        updatemusiccollection.cpp
 #ifdef __BT_SAP
- SOURCE       vMessageHandler.cpp
+SOURCE       vMessageHandler.cpp
 #endif
 
 SYSTEMINCLUDE  ../../../inc ../../../../inc  
+SYSTEMINCLUDE  /epoc32/include/mw/hb/hbwidgets
+SYSTEMINCLUDE  /epoc32/include/mw/hb/hbcore
 #ifdef NO101APPDEPFIXES
 APP_LAYER_SYSTEMINCLUDE
 #else   //NO101APPDEPFIXES
@@ -66,37 +57,27 @@
 
 LIBRARY         apgrfx.lib
 LIBRARY         apmime.lib
-LIBRARY         avkon.lib
 LIBRARY         bafl.lib 
 LIBRARY         bifu.lib
 LIBRARY         biodb.lib
 LIBRARY         charconv.lib
-LIBRARY         cone.lib
-LIBRARY         commonengine.lib
-LIBRARY         commonui.lib
 LIBRARY         efsrv.lib
-LIBRARY         eikctl.lib
 LIBRARY         etext.lib
 LIBRARY         euser.lib
 LIBRARY         irobex.lib
 LIBRARY         msgs.lib
-LIBRARY         aknskins.lib        
 LIBRARY         centralrepository.lib
-LIBRARY         apparc.lib
-LIBRARY         servicehandler.lib
-LIBRARY         eikdlg.lib
-LIBRARY         featmgr.lib
-LIBRARY         aknnotify.lib
-LIBRARY 		commondialogs.lib 
 LIBRARY			platformenv.lib 
 LIBRARY			mpxcollectionhelper.lib
 LIBRARY			mpxplaybackutility.lib
+LIBRARY			hbcore.lib
+LIBRARY			HbWidgets.lib
 
 #ifdef __BT_SAP
- LIBRARY        smcm.lib
- LIBRARY        gsmu.lib
+LIBRARY        smcm.lib
+LIBRARY        gsmu.lib
 // SMUT Unbranch 
- LIBRARY        ecom.lib
+LIBRARY        ecom.lib
 #endif
 
 DEBUGLIBRARY    flogger.lib
--- a/btobexprofiles/obexserviceman/utils/inc/obexutilsdialog.h	Fri May 28 17:03:06 2010 +0300
+++ b/btobexprofiles/obexserviceman/utils/inc/obexutilsdialog.h	Mon Jul 12 18:51:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -19,16 +19,21 @@
 #ifndef COBEXUTILSDIALOG_H
 #define COBEXUTILSDIALOG_H
 
-//  INCLUDES
 #include    <e32base.h>
-#include    <AknWaitDialog.h>
 
-// FORWARD DECLARATIONS
-class CAknWaitDialog;
+#include <hbdeviceprogressdialogsymbian.h>
+#include <hbdevicedialogsymbian.h>
+#include <hbdevicemessageboxsymbian.h>
+#include <hbsymbianvariant.h>
+
 class CObexUtilsDialogTimer;
 
-// CLASS DECLARATION
-
+enum TButtonId
+    {
+    ECancelButton = -1,
+    EYesButton,
+    ENoButton
+    };
 /**
 *  An observer interface for asking progress status of an operation using 
 *  a progress dialog.
@@ -57,10 +62,10 @@
         /**
         * Informs the observer that a dialog has been dismissed.
         * @since 2.6
+        * todo check whether the parameter is required
         * @param aButtonId The button that was used to dismiss the dialog.
-        * @return None.
         */
-        virtual void DialogDismissed( TInt aButtonId ) = 0;
+        virtual void DialogDismissed(TInt aButtonId) = 0; //TInt aButtonId
     };
 
 
@@ -69,7 +74,10 @@
 /**
 *  A class for launching and managing dialogs.
 */
-NONSHARABLE_CLASS( CObexUtilsDialog ) : public CBase, public MProgressDialogCallback
+NONSHARABLE_CLASS( CObexUtilsDialog ) : public CBase, 
+                                        public MHbDeviceProgressDialogObserver,
+                                        public MHbDeviceDialogObserver,
+                                        public MHbDeviceMessageBoxObserver
     {
     public:// Constructors and destructor
 
@@ -89,81 +97,75 @@
    
     public: // New functions
         
+        
         /**
         * Launches a progress dialog.
-        * @since 2.6
         * @param aObserverPtr A pointer to progress observer. A NULL pointer if 
                               the progress dialog is updated manually.
-        * @param aFinalValue The final value of the operation (progress=100%).
-        * @param aResId A resource id for the string to be shown in the dialog.
+        * @param aFileCount Total number of files to be sent.
+        * @param aDeviceName Device Name to which files to be sent.
         * @param aTimeoutValue A value telling how often should the dialog be
-                               updated. Relevant only if observer given.
-        * @return None.
+                               updated. Relevant only if observer is given.
         */
         IMPORT_C void LaunchProgressDialogL( 
-            MObexUtilsProgressObserver* aObserverPtr, TInt aFinalValue, 
-            TInt aResId, TInt aTimeoutValue );    
+            MObexUtilsProgressObserver* aObserverPtr, TInt aFileCount, 
+            const TDesC& aDeviceName, TInt aTimeoutValue );
+        
+        /**
+        * Updates the progress dialog with new file information when multiples files are sent.
+        * @param aFileSize Size of the file to be sent
+        * @param aFileIndex Index of the file to be sent
+        * @param aFileName Name of the file to be sent.
+        */
+        IMPORT_C void UpdateProgressNoteL( TInt aFileSize,TInt aFileIndex, const TDesC& aFileName );    
         
         /**
         * Launches a wait dialog.
-        * @since 2.6
-        * @param aResId A resource id for the string to be shown in the dialog.
-        * @return None.
+        * @param aDisplayText Text that needs to be displayed.
         */
-        IMPORT_C void LaunchWaitDialogL( TInt aResId );
+        IMPORT_C void LaunchWaitDialogL( const TDesC& aDisplayText );
         
         /**
         * Cancels a wait dialog if one exists.
         * @since 2.6        
         * @return None.
         */
-        IMPORT_C void CancelWaitDialogL();
+        IMPORT_C void CancelWaitDialog();
         
         /**
         * Cancels a wait progress dialog if one exists.
         * @since 2.6       
         * @return None.
         */
-        IMPORT_C void CancelProgressDialogL();
+        IMPORT_C void CancelProgressDialog();
         
         /**
-        * Updates a progress dialog. Should not be used if the 
-        * MObexUtilsDialogObserver pointer was given.
-        * @since 2.6
+        * Updates a progress dialog with the latest progress value 
         * @param aValue A progress value relative to final value.
-        * @param aResId A resource id for the string to be shown in the dialog.
         * @return None
         */
-        IMPORT_C void UpdateProgressDialogL( TInt aValue, TInt aResId );
+        IMPORT_C void UpdateProgressDialogL( TInt aProgressValue );
         
         /**
         * Show a query note
-        * @param aResourceID A resource id for the note.
-        * @return User's input - Yes/No
+        * @param aConfirmText text for the note.
+        * @return None		
         */
-        IMPORT_C TInt LaunchQueryDialogL( const TInt& aResourceID );
-        
-        /**
-        * Show how many files are sent in case not all images are supported
-        * @param aSentNum Number of sent files
-        * @param aTotlNum Number of total files
-        * return None.
-        */
-        
-        IMPORT_C void ShowNumberOfSendFileL( TInt aSentNum, TInt aTotalNum );
+        IMPORT_C void LaunchQueryDialogL( const TDesC& aConfirmText );
 
         /**
-        * Prepares dialog for execution
-        * @param aResourceID Resource ID of the dialog
-        * @param aDialog Dialog
+        * Shows an error note.
+        * @param aTextId A resource id for the note.
+        * @return None.
         */
-        void PrepareDialogExecuteL( const TInt& aResourceID, CEikDialog* aDialog );
+        IMPORT_C void ShowErrorNoteL( const TDesC& aErrorText );
 
         /**
-        * Check if cover display is enabled
-        * return True if enabled
+        * Shows an information note.
+        * @param aTextId A resource id for the note.
+        * @return None.
         */
-        TBool IsCoverDisplayL();
+        IMPORT_C void ShowInformationNoteL( const TDesC& aInfoText );
 
     public: // New functions (not exported)
 
@@ -174,16 +176,42 @@
         void UpdateProgressDialog();
 
     private: // Functions from base classes
-
+        
         /**
-        * From MProgressDialogCallback A dialog has been dismissed.
-        * @param aButtonId The button that was used to dismiss the dialog.
+        * From MHbDeviceProgressDialogObserver called when dialog is closed by pressing the "cancel" button
+        * @param aDialog Pointer to dialog that was cancelled.
+        * @return None.
+        */
+        void ProgressDialogCancelled(const CHbDeviceProgressDialogSymbian* aDialog);
+        
+        /**
+        * From MHbDeviceProgressDialogObserver called when a device progress dialog is has closed
+        * @param aDialog Pointer to dialog instance that has closed.
         * @return None.
         */
-        void DialogDismissedL( TInt aButtonId );
-
-    private:
-        TInt ExecuteDialogL( const TInt& aResourceID, CEikDialog* aDialog );
+        void ProgressDialogClosed(const CHbDeviceProgressDialogSymbian* aDialog )  ; 
+        
+        /**
+          * From MHbDeviceDialogObserver called when data is received from a device dialog
+          * @param aDialog Pointer to dialog instance that has closed.
+          * @return None.
+          */
+        void DataReceived(CHbSymbianVariantMap& aData);
+       
+        /**
+          * From MHbDeviceDialogObserver called when a device dialog is closed
+          * @param  aData contains data from the dialog plugin.
+          * @return None.
+          */
+         void DeviceDialogClosed(TInt aCompletionCode);
+        
+        /**
+        * from base class MHbDeviceMessageBoxObserver
+        * @param aMessageBox Pointer to dialog instance that has closed.
+        * @param aButton the id of the button the user pressed
+        */    
+        void  MessageBoxClosed(const CHbDeviceMessageBoxSymbian *aMessageBox, 
+                CHbDeviceMessageBoxSymbian::TButtonId aButton); 
 
     private:
 
@@ -197,14 +225,40 @@
         */
         void ConstructL();
 
+        /**
+         * Add a data item into the given CHbSymbianVariantMap.
+         * @param aMap the instance to which the data item will be added.
+         * @param aKey the key of the data item.
+         * @param aData the value of the data item
+         * @param aDataType the data-type of the data item
+         */
+        void AddDataL(CHbSymbianVariantMap* aMap, const TDesC& aKey, 
+                const TAny* aData, CHbSymbianVariant::TType aDataType);
+        
+        /**
+         * Creates and shows a message box.
+         * @param aType the type of the message box to create.
+         * @param aText the text to be shown in the message box
+         * @param aObserver the observer that receives the events from the 
+         *         message box
+         * @param aTimeout the timeout value of the message box 
+         */
+        CHbDeviceMessageBoxSymbian* CreateAndShowMessageBoxL(
+                CHbDeviceMessageBoxSymbian::TType aType,
+                const TDesC& aText, 
+                MHbDeviceMessageBoxObserver* aObserver,
+                TInt aTimeout );
+        
     private: // Data
 
-        CAknProgressDialog*         iProgressDialog;
-        CAknWaitDialog*             iWaitDialog;
+        CHbDeviceDialogSymbian *iProgressDialog;
+        CHbDeviceProgressDialogSymbian* iWaitDialog;
+        CHbDeviceMessageBoxSymbian* iMessageBox;
+        
         CObexUtilsDialogTimer*      iObexDialogTimer;
-        TInt                        iResourceFileId;
-        TInt                        iProgressDialogResId;
-        TBool                       iCoverDisplayEnabled;
+        TInt                        iFileIndex;
+        TInt                        iFileCount;
+        RBuf                        iDeviceName;
 
         // Not Owned
         //
--- a/btobexprofiles/obexserviceman/utils/inc/obexutilsglobalprogressdialog.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,226 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Definition of the global progress dialog class
-*
-*/
-
-
-
-
-#ifndef __OBEXUTILS_GLOBAL_PROGRESS_DIALOG__
-#define __OBEXUTILS_GLOBAL_PROGRESS_DIALOG__
-
-//  INCLUDES
-#include <e32base.h>
-#include <stringresourcereader.h>
-#include <Obexutils.rsg>
-#include <avkon.rsg>                     // R_QGN_GRAF_WAIT_BAR_ANIM
-#include <AknGlobalNote.h>
-
-#include <coecntrl.h>
-
-// FORWARD DECLARATIONS
-class CAknGlobalProgressDialog;
-
-
-// CLASS DECLARATION
-
-// Call back for progress bar
-NONSHARABLE_CLASS(  MGlobalProgressCallback )
-    {
-    public:
-        virtual void HandleGlobalProgressDialogL( TInt aSoftkey ) = 0;
-    };
-
-
-
-
-
-NONSHARABLE_CLASS( CGlobalProgressDialog ) : public CActive
-{
-   public:  // Constructors and destructor
-        
-
-      /**
-      * Two-phased constructor.
-      */
-      IMPORT_C static CGlobalProgressDialog* NewLC(MGlobalProgressCallback* aObserver);
-      IMPORT_C static CGlobalProgressDialog* NewL(MGlobalProgressCallback* aObserver);
-
-
-      /**
-      * Destructor.
-      */
-      virtual ~CGlobalProgressDialog();
-
-   public: // New functions
-        
-      /**
-      * Sets the icon for this dialog
-      * @param aIconText Text of the icon
-      * @param aIconFile File containing icon
-      * @param aIconId Icon ID
-      * @param aIconMaskId  Icon mask ID
-      * @return void
-      */
-      void SetIconL( const TDesC& aIconText, const TDesC& aIconFile,
-                                TInt aIconId = 0, TInt aIconMaskId = -1 );
-      /**
-      * Sets the image for the dialog
-      * @param aImageFile Image filename
-      * @param aImageId Image ID
-      * @param aImageMaskId Image mask ID
-      * @return void
-      */
-      void SetImageL( const TDesC& aImageFile, TInt aImageId = 0,
-                                 TInt aImageMaskId = -1 );
-
-      /**
-      * Shows the progress dialog
-      * @return void
-      */
-      IMPORT_C void ShowProgressDialogL(TInt aStringId);
-      IMPORT_C void ShowProgressDialogNameSizeL( TDesC& aFileName, 
-                                                 TInt64 aFileSize);
-      
-      
-      /**
-      * Updates the progress dialog
-      * @param aValue progress bar value
-      * @param aFinalValue progress bar final value
-      * @return void
-      */
-      IMPORT_C void UpdateProgressDialog(TInt aValue, TInt aFinalValue);
-
-      /**
-      * Called to complete the global progress dialog
-      * @return void
-      */
-      IMPORT_C void ProcessFinished();
-      
-
-   protected:  // Functions from base classes
-        
-      /**
-      * From CActive Active Object RunL()
-      */
-      virtual void RunL();
-
-      /**
-      * From CActive Active Object DoCancel()
-      */
-      virtual void DoCancel();
-
-
-   private:
-
-      /**
-      * By default constructor is private.
-      */
-      void ConstructL(MGlobalProgressCallback* aObserver);
-
-      /**
-      * C++ default constructor.
-      */
-      CGlobalProgressDialog();
-
-   private: //data
-        CAknGlobalProgressDialog*  iProgressDialog;
-         
-        MGlobalProgressCallback*   iKeyCallback;
-        CStringResourceReader*  iStringResourceReader;
-                
-};
-
-
-
-// Call back for note with animation and without animation
-NONSHARABLE_CLASS(  MGlobalNoteCallback )
-    {
-    public:
-        virtual void HandleGlobalNoteDialogL( TInt aSoftkey ) = 0;
-    };
-
-
-
-NONSHARABLE_CLASS( CGlobalDialog ) : public CActive
-{
-   public:  // Constructors and destructor
-        
-
-      /**
-      * Two-phased constructor.
-      */
-      IMPORT_C static CGlobalDialog* NewLC(MGlobalNoteCallback* aObserver);
-      IMPORT_C static CGlobalDialog* NewL(MGlobalNoteCallback* aObserver);
-
-
-      /*
-       *  public functions
-       */
-      IMPORT_C void ShowNoteDialogL( TInt aResourceId, TBool anAnimation);
-      IMPORT_C void ShowErrorDialogL(TInt aResourceId);            
-      IMPORT_C  void ProcessFinished();
-
-      /**
-      * Destructor.
-      */
-      virtual ~CGlobalDialog();
-
-
-   protected:  // Functions from base classes
-        
-      /**
-      * From CActive Active Object RunL()
-      */
-      virtual void RunL();
-
-      /**
-      * From CActive Active Object DoCancel()
-      */
-      virtual void DoCancel();
-
-
-   private:
-
-      /**
-      * By default constructor is private.
-      */
-      void ConstructL(MGlobalNoteCallback* aObserver);
-
-      /**
-      * C++ default constructor.
-      */
-      CGlobalDialog();
-
-   private: //data
-        
-        MGlobalNoteCallback*   iKeyCallback;
-        CStringResourceReader*  iStringResourceReader;
-        CAknGlobalNote* iAknGlobalNote;
-        TInt iWaitNoteID;
-
-};
-
-
-
-
-
-
-
-
-
-
-
-#endif  // __OBEXUTILS_GLOBAL_PROGRESS_DIALOG__
--- a/btobexprofiles/obexserviceman/utils/inc/obexutilslaunchwaiter.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,139 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#ifndef COBEXUTILSLAUNCHWAITER_H
-#define COBEXUTILSLAUNCHWAITER_H
-
-//  INCLUDES
-#include <e32base.h>
-#include <apparc.h>
-
-#include <AknServerApp.h>
-#include <msvapi.h>
-#include <obexutilsdialog.h>
-
-class CDocumentHandler;
-
-// CLASS DECLARATION
-
-/**
-*  A class waiting for editing of an embedded document to complete.
-*/
-
-NONSHARABLE_CLASS( CObexUtilsLaunchWaiter ) : public CMsvOperation, public MAknServerAppExitObserver
-	{
-    public: // Constructors and destructor
-
-        /**
-        * Two-phased constructor.
-        */
-	    static CObexUtilsLaunchWaiter* NewLC( 
-        	CMsvSession& aMsvSession,
-        	CMsvEntry* aMessage,
-            TRequestStatus& aObserverRequestStatus );
-
-        /**
-        * Two-phased constructor.
-        */
-    	static CObexUtilsLaunchWaiter* NewL( 
-        	CMsvSession& aMsvSession,
-        	CMsvEntry* aMessage,
-            TRequestStatus& aObserverRequestStatus );
-
-        /**
-        * Destructor.
-        */
-        ~CObexUtilsLaunchWaiter();
-
-    public: // Functions from base classes		
-       
-        /**
-        * From MAknServerAppExitObserve Editing has completed.
-        * @param TInt The exit mode including document state.
-        * @return None.
-        */
-        void HandleServerAppExit(TInt aReason);
-
-        /**
-        * From CActive A request has been completed.
-        * @return None.
-        */
-	    void RunL();
-
-        /**
-        * From CActive A request has been cancelled.
-        * @return None.
-        */
-	    void DoCancel();
-	    
-        /**
-        * ProgressL
-        * @return TDesC8&, progress
-        */
-        virtual const TDesC8& ProgressL();
-
-    private:
-
-        /**
-        * C++ default constructor.
-        */
-	    CObexUtilsLaunchWaiter(
-        	CMsvSession& aMsvSession,
-        	CMsvEntry* aMessage,
-            TRequestStatus& aObserverRequestStatus );
-            
-        void ConstructL( CMsvEntry* aMessage );
-        
-        /**
-         * Locate the file used to fix the broken link in Inbox
-         * @param aFileName the file including full path user selects  ( on return )
-         * @param anOldFileName old file name including full path saved in attachment.
-         * @return TBool 
-         */
-        TBool LocateFileL(TFileName& aFileName, const TFileName& anOldFileName);
-        
-        /**
-         * Launch Selection dialog for user to locate the file
-         * @param aFileName the file including full path user selects  ( on return )
-         * @param anOldFileName old file name excluding full path saved in attachment.
-         * @return TBool
-         */
-        TBool LaunchFileSelectionDialogL(TFileName& aFileName, const TFileName& anOldFileName);
-        
-        /**
-         * Check the drive if available.
-         * @param aDriveNumber enum TDriveNumber defined in f32file.h
-         * @return Symbian error code
-         */
-        TInt CheckDriveL(TDriveNumber aDriveNumber); 
-        
-        /**
-         * Check if the file is saved in memory card.
-         * @param aFileName full path and name of the file 
-         * @return  TDriveNumber if saved in E or F drive; 
-         *          otherwise KErrNotFound. 
-         */
-        TInt CheckIfSaveInMMC(const TFileName& aFileName);
-
-    private:
-        CDocumentHandler* iDocumentHandler;
-	};
-
-#endif      // COBEXUTILSLAUNCHWAITER_H
-
-// End of File
--- a/btobexprofiles/obexserviceman/utils/inc/obexutilsuilayer.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,246 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#ifndef COBEXUTILSUILAYER_H
-#define COBEXUTILSUILAYER_H
-
-//  INCLUDES
-#include <e32base.h>
-#include <msvapi.h>
-#include <data_caging_path_literals.hrh> 
-#include <AknsUtils.h> 
-#include <eikdialg.h>
-#include <Obexutils.rsg>
-
-// CONSTANTS
-
-const TUid KUidMsgTypeBt                 = {0x10009ED5};
-const TInt KObexUtilsMaxChar             = 80;
-const TInt KObexUtilsMaxCharToFromField  = 256;
-
-// Literals for resource location (drive, directory, file)
-_LIT( KObexUtilsFileDrive, "z:");
-_LIT( KObexUtilsResourceFileName, "obexutils.rsc" );
-
-// Icon file
-_LIT( KCommonUiBitmapFile, "MUIU.MBM" );
-
-// Cover display
-const TInt KEnumStart = 1;  // start of enumerations; start after ECmdNone
-const TInt KResourceNumberMask = 0x00000FFF;
-const TInt KFirstResourceOffset = (R_IR_CONNECTING & KResourceNumberMask);
-
-class CMsvOperation;
-
-// DATA TYPES
-
-enum TContextMedia
-    {
-    EBluetooth,
-    EInfrared,
-	ENfc
-    };
-
-/**
-* Backup status.
-* The value is controlled by FileManager
-*/
-enum TFileManagerBkupStatusType
-    {
-    EFileManagerBkupStatusUnset   = 0x00000000,
-    EFileManagerBkupStatusBackup  = 0x00000001,
-    EFileManagerBkupStatusRestore = 0x00000002
-    };
-
-// CLASS DECLARATION
-
-/**
-*  Utility methods for UI related functionality.
-*  
-*/
-NONSHARABLE_CLASS(  TObexUtilsUiLayer )
-    {
-    public: // New functions
-    
-        typedef CArrayPtr<CFbsBitmap> CBitmapArray;
-        
-        /**
-        * Launches an editor application for the given message.
-        * @param aMessage The message to be launched in an application.
-        * @param aSession A message server session.
-        * @param aObserverRequestStatus Request status of the observer.
-        * @return MSV operation
-        */
-        IMPORT_C static CMsvOperation* LaunchEditorApplicationOperationL( 
-        	CMsvSession& aMsvSession,
-        	CMsvEntry* aMessage,
-            TRequestStatus& aObserverRequestStatus );
-
-        /**
-        * Launches an editor application for the given message.
-        * @param aMessage The message to be launched in an application.
-        * @param aSession A message server session.
-        * @return Symbian OS errorcode.
-        */
-        IMPORT_C static TInt LaunchEditorApplicationL( CMsvEntry* aMessage,
-                                                       CMsvSession& aSession );
-
-        /**
-         * LaunchFileManager by specific path and sort method
-         * @Since S60 v5.0
-         * @param aPath The directory where file manager should open
-         * @param aSortMethod sort method to sort the files in aPath
-         * @param isEmbeddedMode indicates start mode for file manager or standalone mode
-         * @return None 
-         */ 
-        IMPORT_C static void LaunchFileManagerL( TDesC& aPath, TInt aSortMethod, TBool isEmbeddedMode);
-        
-             
-        /**
-         * Open the file by Launching the suitable S60 application  
-         * @Since S60 v5.0
-         * @return None
-         */
-        IMPORT_C static void LaunchEditorApplicationL (TMsvId& aMsvIdParent);
-        
-        /**
-        * Shows an error note.
-        * @param aResourceID A resource id for the note.
-        * @return None.
-        */
-        IMPORT_C static void ShowErrorNoteL( const TInt& aResourceID );
-
-        /**
-        * Shows an information note.
-        * @param aResourceID A resource id for the note.
-        * @return None.
-        */
-        IMPORT_C static void ShowInformationNoteL( const TInt& aResourceID );
-        
-        /**
-        * Reads contents of a resource into a buffer.
-        * @parma aBuf The buffer.
-        * @param aResourceID The id of the resource
-        * @return None.
-        */
-        IMPORT_C static void ReadResourceL( TDes& aBuf,
-                                            const TInt& aResourceID );
-         
-        /**
-        * Shows an global information note.
-        * @param aResourceID A resource id for the note.
-        * @return None.
-        */                                    
-        IMPORT_C static void ShowGlobalConfirmationQueryL( const TInt& aResourceID );
-
-        /**
-         * Show global conformation query without animations or tones.
-         * @Since S60 5.0
-         * @aResourceID aREsourceID for loc string
-         * @return TBool
-         */
-        IMPORT_C static TBool ShowGlobalConfirmationQueryPlainL( const TInt& aResourceID);
-
-        /**
-         * Show global conformation query
-         * @Since S60 5.0
-         * @aResourceID aREsourceID for loc string
-         * @aFilePath location for those files received.
-         * @return TBool
-         */
-        IMPORT_C static TBool ShowGlobalFileOpenConfirmationQueryL( const TInt& aResourceID, const TDesC& aFilePath);
-        
-
-        
-        /**
-        * Returns a resource id for a not supported operation.
-        * @return The resource id.
-        */
-        IMPORT_C static TInt OperationNotSupported();
-        
-        /**
-        * Returns an icon for the given context.
-        * @param aContext The context.
-        * @param aMedia The used media.
-        * @return The resource id of the icon.
-        */
-        IMPORT_C static TInt ContextIcon( const TMsvEntry& aContext,
-                                          TContextMedia aMedia );
-
-        /**
-        * Updates bitmaps accoding to given media.
-        * @param aMedia The used media.
-        * @param aNumberOfZoomStates The media.
-        * @param aBitmapFile The bitmap file.
-        * @param aStartBitmap The resource id of the start bitmap.
-        * @param aEndBitmap The resource id of the start bitmap.
-        * @return None.
-        */
-        IMPORT_C static void UpdateBitmaps( TUid aMedia, 
-                                            TInt& aNumberOfZoomStates, 
-                                            TFileName& aBitmapFile,
-                                            TInt& aStartBitmap,
-                                            TInt& aEndBitmap );
-
-        /**
-        * Create icons according to given media
-        * @param aMedia The used media.
-        * @param aIconArray The IconArray used by the caller
-        */
-        IMPORT_C static void CreateIconsL( TUid aMedia, CArrayPtr<CBitmapArray>* aIconArrays);  
-
-        /**
-         * Checks if backup process is running 
-         */
-        IMPORT_C TBool static IsBackupRunning();
-        
-        /**
-        * Prepares dialog for execution
-        * @param aResourceID Resource ID of the dialog
-        * @param aDialog Dialog
-        */
-        void static PrepareDialogExecuteL( const TInt& aResourceID, CEikDialog* aDialog );
-        
-        /**
-        * Check if cover display is enabled
-        * return True if enabled
-        */
-        TBool static IsCoverDisplayL();
-        
-        /**
-         * Check if process with given id is active now
-         * return True if is active
-         */
-        TBool static ProcessExists( const TSecureId& aSecureId );
-        
-        /**
-         * A dummy class for opening CMsvSession.
-         */
-         class CDummySessionObserver : public CBase , public MMsvSessionObserver
-             {
-             public:
-                 void HandleSessionEventL( TMsvSessionEvent/*aEvent*/,
-                     TAny* /*aArg1*/,
-                     TAny* /*aArg2*/,
-                     TAny* /*aArg3*/ ) {};
-             };
-    };
-
-#endif      // COBEXUTILSUILAYER_H
-            
-// End of File
--- a/btobexprofiles/obexserviceman/utils/loc/Obexutils.loc	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,200 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*     This file contains the localised strings for obexutils.
-*     
-*
-*
-*/
-
-
-//  LOCALISATION STRINGS
-
-// d: descripes status of item that is currently sending state in the outbox.
-// l: list_double_graphic_pane_t2
-//                                                             
-#define qtn_mce_outbox_status_sending      "Sending"
-
-// d: Informs state of IR connection.
-// d: this is the first shown when the user tries connect to other 
-// d: remote device.
-// l: popup_note_wait_window 
-#define qtn_ir_connecting                  "Connecting via Infrared.."
-
-// d: This informs that the IR connection cannot made to other remote device
-// d: for some reason.
-// l: popup_note_window
-#define qtn_ir_cant_establish_conn         "Cannot establish Infrared connection."
-
-// d: This is shown after the IR connection is made succesfully and we are
-// d: sending message over IR.
-// l: popup_note_wait_window 
-#define qtn_ir_sending_data                "Sending message via Infrared..."
-
-// d: This is shown when the IR connection is made and some thing goes wrong
-// d: during connection.
-// l: popup_note_window
-#define qtn_ir_sending_failed              "Failed to send message via Infrared."
-
-// d: This error note is  shown when the Infrared receiving fails for some reason
-// l: popup_note_window
-#define qtn_ir_failed_to_receive              "Receiving failed"
-
-// d: This is shown to the user when the message is sended succesfully.
-// l: popup_note_window
-#define qtn_ir_data_sent                   "Message sent via Infrared!"
-
-// d: Displayed in the "To/From" section for Ir objects in message centre.
-// l: msg_header_pane_t2
-#define qtn_mce_ir_message                 "Infrared message"
-
-// d: This is shown, when the user tries open a message that is not
-// d: supported type.
-// l: popup_note_window
-#define qtn_mce_info_message_not_opened    "Invalid message, can't be opened"
-
-// d: Informs state of Bluetooth connection.
-// d: this is the first shown when the user tries connect to other 
-// d: remote device.
-// l: popup_note_wait_window 
-#define qtn_bt_connecting                  "Connecting..."
-
-// d: This is shown after the Bluetooth connection is made succesfully 
-// d: and we are sending message over Bluetooth.
-// l: popup_note_wait_window 
-#define qtn_bt_sending_data                "Sending message..."
-
-// d: This is shown after the Bluetooth connection is made succesfully 
-// d: and we are receiving message over Bluetooth.
-// l: popup_note_wait_window 
-#define qtn_bt_receiving_data                "Receiving message via Bluetooth"
-
-// d: This wait note is  shown when the device is receiving something over the Infrared
-// l: popup_note_wait_window 
-#define qtn_ir_receiving_data                "Receiving message via Infrared"
-
-// d: This informs that the Bluetooth connection cannot made to other 
-// d: remote device for some reason.
-// l: popup_note_window
-#define qtn_bt_dev_not_avail               "Cannot establish Bluetooth connection"
-
-// d: This is shown to the user when the message is sended succesfully via BT.
-// l: popup_note_window
-#define qtn_bt_data_sent                   "Message sent!"
-
-// d: This is shown when the BT connection is made and some thing goes wrong
-// d: during connection.
-// l: popup_note_window
-#define qtn_bt_failed_to_send              "Failed to send message"
-
-// d: This error note is  shown when the BT receiving fails for some reason
-// l: popup_note_window
-#define qtn_bt_failed_to_receive              "Receiving failed"
-
-// d: Displayed in the filename section for Ir objects in message centre in
-// d: case of the name is corrupted.
-// l: list_double_pane_t2_cp2
-//
-#define qtn_fldr_default_doc_name       "Document"
-
-// BIP usability improvement 
-
-// d: This is shown when one could not be sent
-// l: popup_note_window 
-#define qtn_bt_bip_format_not_supported          "Receiving device does not support this image format."
-
-// d: This is shown when some images could not be sent
-// l: popup_note_window 
-#define qtn_bt_bip_not_all_formats_supported          "Receiving device does not support all needed image formats, Continue?"
-
-// d: This is shown when sending is finished in case some images are not supported.
-// l: popup_note_window
-#define qtn_bt_bip_some_files_sent                "%0N of %1N images sent!"
-
-// d: This is shown when no images could be sent
-// l: popup_note_window 
-#define qtn_bt_bip_no_formats_supported          "Receiving device does not support the needed image formats."
-
-//d: This is shown when one could not be sent
-//l: popup_note_window 
-//r: 3.1
-//w:
-#define qtn_bt_bip_mixed_list          "Receiving device does not support all needed image formats. Send anyway?"
-
-
-//  New loc strings for Req. saving file directly to file system.
-
-//d: This is shown after a single file received.
-//l: popup_note_window
-//r: 5.0
-#define qtn_bt_saved_single            "File saved in %U. Open now?"
-
-//d: This is shown after a single file received.
-//l: popup_note_window
-//r: 5.0
-#define qtn_bt_saved_multiple          "Files saved in %U. Open now?"
-
-//d: This is shown when user opens the broken link in inbox.
-//l: popup_note_window
-//r: 5.0
-#define qtn_bt_saved_search            "File not found, would you like to locate it?"
-
-//d: This is shown when file is originally saved on MMC but mmc is not available.
-//l: popup_note_window
-//r: 5.0
-#define qtn_bt_saved_no_memory_card    "File not found as memory card is not present. Locate file?"
-
-//d: This is shown when file link is updated.
-//l: popup_note_window
-//r: 5.0
-#define qtn_bt_saved_link_updated      "File link updated"
-
-//d: This is shown when new selected filename does not match the orignal filename.
-//l: popup_note_window
-//r: 5.0
-#define qtn_bt_saved_search_update     "File names don't match, update link anyway?"
-
-
-
-// -- New string added for CR 403-9991 show filename and size while receiving -- 
-
-
-//d: This is shown while receiving files via either bluetooth or infrared
-//d: and the receiving file size is smaller than a defined limit
-//l: popup_note_wait_window
-//r: 5.0
-#define qtn_bt_ir_receiving_data_size_kb        "Receiving \n%U\n%N kB"
-
-//d: This is shown while receiving files via either bluetooth or infrared
-//d: and the receiving file size is larger than a defined limit
-//l: popup_note_wait_window
-//r: 5.0
-#define qtn_bt_ir_receiving_data_size_mb        "Receiving \n%U\n%N MB"
-
-
-//d: This is shown while receiving files via either bluetooth or infrared
-//d: and the receiving file size is unknown
-//l: popup_note_wait_window
-//r: 5.0
-#define qtn_bt_ir_receiving_data_no_size        "Receiving \n%U"
-
-
-// -- New string added for CR 404-4716 Allow sending unsupported image over BT BIP --
-
-// d: This is shown when one could not be sent
-// l: popup_note_window
-// r: 5.0
-#define qtn_bt_bip_format_not_supported_send      "Receiving device does not support this image format. Send anyway?"
-
-// End of File
Binary file btobexprofiles/obexserviceman/utils/loc/btdialogs_en_GB.qm has changed
--- a/btobexprofiles/obexserviceman/utils/src/obexutilsdialog.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/btobexprofiles/obexserviceman/utils/src/obexutilsdialog.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -17,18 +17,31 @@
 
 
 // INCLUDE FILES
-#include    "obexutilsdialog.h"
-#include    "obexutilsdialogtimer.h"
-#include    "obexutilsuilayer.h"
-#include    <secondarydisplay/obexutilssecondarydisplayapi.h>
-#include    <aknnotewrappers.h>
-#include    <eikprogi.h>
-#include    <Obexutils.rsg>
-#include    <e32def.h>
-#include    <bautils.h>
-#include    <StringLoader.h>
-#include    <featmgr.h>
-#include    "obexutilsdebug.h"
+#include "obexutilsdialog.h"
+#include "obexutilsdialogtimer.h"
+#include "obexutilsdebug.h"
+#include <hbdevicenotificationdialogsymbian.h>
+#include <btservices/bluetoothdevicedialogs.h>
+#include <hbtextresolversymbian.h>
+
+_LIT(KSendingDialog, "com.nokia.hb.btdevicedialog/1.0");
+_LIT(KCurrentFileIndex,"currentFileIdx" );
+_LIT(KTotalFileCount, "totalFilesCnt");
+_LIT(KDestinationName, "destinationName");
+_LIT(KFileName,"fileName");
+_LIT(KFileSizeTxt,"fileSzTxt");
+_LIT(KFileSize,"fileSz");
+_LIT(KProgressValue,"progressValue");
+
+_LIT(KSendingCancelledText, "txt_bt_dpophead_sending_cancelled");
+_LIT(KDeviceText,"txt_bt_dpopinfo_sent_to_1");
+
+const TInt KMaxDescriptionLength = 256;
+const TInt KMinStringSize = 10;
+const TInt KMinFileSize = 1024;
+
+_LIT(KLocFileName, "btdialogs_");     
+_LIT(KPath, "z:/resource/qt/translations/"); 
 
 // ============================ MEMBER FUNCTIONS ===============================
 
@@ -78,83 +91,122 @@
         //
         User::Leave(KErrArgument);
         }
-  
-    TFileName fileName;
-    fileName += KObexUtilsFileDrive;
-    fileName += KDC_RESOURCE_FILES_DIR;
-    fileName += KObexUtilsResourceFileName;
-    BaflUtils::NearestLanguageFile( CCoeEnv::Static()->FsSession(), fileName );
-    iResourceFileId = CCoeEnv::Static()->AddResourceFileL( fileName );
-
-    iCoverDisplayEnabled = IsCoverDisplayL();
-
     FLOG(_L("[OBEXUTILS]\t CObexUtilsDialog::ConstructL() completed"));
     } 
 
 // -----------------------------------------------------------------------------
 // Destructor
 // -----------------------------------------------------------------------------
-CObexUtilsDialog::~CObexUtilsDialog()
+EXPORT_C CObexUtilsDialog::~CObexUtilsDialog()
     {
     FLOG(_L("[OBEXUTILS]\t CObexUtilsDialog::~CObexUtilsDialog()"));
-
-    CCoeEnv::Static()->DeleteResourceFile( iResourceFileId );
+    iDeviceName.Close();
+    delete iWaitDialog;
+    delete iProgressDialog;
     delete iObexDialogTimer;
-
+    delete iMessageBox;
     FLOG(_L("[OBEXUTILS]\t CObexUtilsDialog::~CObexUtilsDialog() completed"));
     }
 
 // -----------------------------------------------------------------------------
 // CObexUtilsDialog::LaunchProgressDialogL
 // -----------------------------------------------------------------------------
-EXPORT_C void CObexUtilsDialog::LaunchProgressDialogL( 
-    MObexUtilsProgressObserver* aObserverPtr, TInt aFinalValue, 
-    TInt aResId, TInt aTimeoutValue )
+EXPORT_C void CObexUtilsDialog::LaunchProgressDialogL(
+    MObexUtilsProgressObserver* aObserverPtr, TInt aFileCount, 
+    const TDesC& aDeviceName, TInt aTimeoutValue )
     {
     FLOG(_L("[OBEXUTILS]\t CObexUtilsDialog::LaunchProgressDialogL()"));
-
+    
+    TBuf<KMinStringSize> key;
     if ( aObserverPtr )
         {
         // The observerPtr was given, so store it and start a timer
         //
         iProgressObserverPtr = aObserverPtr;
 
-        if ( iObexDialogTimer )
+        if ( !iObexDialogTimer )
             {
-            iObexDialogTimer->Cancel();
-            delete iObexDialogTimer;
-            iObexDialogTimer = NULL;
+            iObexDialogTimer = CObexUtilsDialogTimer::NewL( this );
             }
-
-        iObexDialogTimer = CObexUtilsDialogTimer::NewL( this );
+        iObexDialogTimer->Cancel();
         iObexDialogTimer->SetTimeout( aTimeoutValue );
         }
 
-    iProgressDialogResId = aResId;
-   
-    iProgressDialog = new( ELeave ) CAknProgressDialog( 
-        ( reinterpret_cast<CEikDialog**>( &iProgressDialog ) ), ETrue );
-    PrepareDialogExecuteL( aResId, iProgressDialog );
-    iProgressDialog->ExecuteLD( R_SENDING_PROGRESS_NOTE );
+    iFileCount = aFileCount;
+    iDeviceName.Close();
+    iDeviceName.CreateL(aDeviceName);
+    iProgressDialog = CHbDeviceDialogSymbian::NewL();
     
-    HBufC* buf = StringLoader::LoadLC( aResId );
-    iProgressDialog->SetTextL( buf->Des() );
-    CleanupStack::PopAndDestroy( buf );
+    CHbSymbianVariantMap* map = CHbSymbianVariantMap::NewL();
+    CleanupStack::PushL(map);
+    TInt data = TBluetoothDialogParams::ESend;
+    key.Num(TBluetoothDialogParams::EDialogType);
+    AddDataL( map, key, &data, CHbSymbianVariant::EInt );
+    User::LeaveIfError(iProgressDialog->Show(KSendingDialog(),*map,this));
+    CleanupStack::PopAndDestroy(map);    
 
-    iProgressDialog->GetProgressInfoL()->SetFinalValue( aFinalValue );
-    iProgressDialog->SetCallback( this );
     if ( iProgressObserverPtr )
         {
         iObexDialogTimer->Tickle();
         }
 
-    FLOG(_L("[OBEXUTILS]\t CObexUtilsDialog::LaunchProgressDialogL() completed"));
+    FLOG(_L("[OBEXUTILS]\t CObexUtilsDialog::LaunchProgressDialogL() completed"));    
+    }
+
+
+EXPORT_C void CObexUtilsDialog::UpdateProgressNoteL( TInt aFileSize,TInt aFileIndex, const TDesC& aFileName )
+    {
+    FLOG(_L("[OBEXUTILS]\t CObexUtilsDialog::UpdateProgressNoteL()"));  
+    HBufC* key = HBufC::NewL(KMaxDescriptionLength);
+    CleanupStack::PushL(key);
+    
+    CHbSymbianVariantMap* map = CHbSymbianVariantMap::NewL();
+    CleanupStack::PushL(map);
+    
+    iFileIndex = aFileIndex+1;
+    key->Des().Copy(KCurrentFileIndex());
+    AddDataL( map, *key, &iFileIndex, CHbSymbianVariant::EInt );
+    
+    key->Des().Copy(KTotalFileCount());
+    AddDataL( map, *key, &iFileCount, CHbSymbianVariant::EInt );
+
+    key->Des().Copy(KDestinationName());
+    AddDataL( map, *key, &iDeviceName, CHbSymbianVariant::EDes );
+    
+    key->Des().Copy(KFileName());
+    AddDataL( map, *key, &aFileName, CHbSymbianVariant::EDes );
+    
+    // todo: localiation is needed for code below:
+    HBufC* value = HBufC::NewL(KMaxDescriptionLength);
+    CleanupStack::PushL(value);
+    key->Des().Copy(KFileSizeTxt());
+    value->Des().Zero();
+    if(aFileSize < KMinFileSize)
+        {
+        value->Des().AppendNum(aFileSize);
+        value->Des().Append(_L(" Bytes"));
+        }
+    else
+        {
+        TInt filesize =  aFileSize/KMinFileSize;
+        value->Des().AppendNum(filesize);
+        value->Des().Append(_L(" KB"));
+        }
+    AddDataL( map, *key, value, CHbSymbianVariant::EDes );
+    CleanupStack::PopAndDestroy( value );
+    
+    key->Des().Copy(KFileSize());
+    AddDataL( map, *key, &aFileSize, CHbSymbianVariant::EInt );
+    TInt ret = iProgressDialog->Update(*map);
+    CleanupStack::PopAndDestroy(map);
+    CleanupStack::PopAndDestroy(key);
+    FLOG(_L("[OBEXUTILS]\t CObexUtilsDialog::UpdateProgressNoteL()Completed"));  
     }
 
 // -----------------------------------------------------------------------------
 // CObexUtilsDialog::LaunchWaitDialogL
 // -----------------------------------------------------------------------------
-EXPORT_C void CObexUtilsDialog::LaunchWaitDialogL( TInt aResId )
+EXPORT_C void CObexUtilsDialog::LaunchWaitDialogL( const TDesC& aDisplayText )
     {
     FLOG(_L("[OBEXUTILS]\t CObexUtilsDialog::LaunchWaitDialogL()"));
 
@@ -164,13 +216,9 @@
         //
         User::Leave( KErrInUse );
         }
-
-    iWaitDialog = new( ELeave ) CAknWaitDialog(
-            ( reinterpret_cast<CEikDialog**>( &iWaitDialog ) ), EFalse );
-    
-    iWaitDialog->SetCallback( this );
-    PrepareDialogExecuteL( aResId, iWaitDialog );
-    iWaitDialog->ExecuteLD( aResId );
+    iWaitDialog = CHbDeviceProgressDialogSymbian::NewL(CHbDeviceProgressDialogSymbian::EWaitDialog,this);
+    iWaitDialog->SetTextL(aDisplayText);
+    iWaitDialog->ShowL();
 
     FLOG(_L("[OBEXUTILS]\t CObexUtilsDialog::LaunchWaitDialogL() completed"));
     }
@@ -178,14 +226,14 @@
 // -----------------------------------------------------------------------------
 // CObexUtilsDialog::CancelWaitDialogL
 // -----------------------------------------------------------------------------
-EXPORT_C void CObexUtilsDialog::CancelWaitDialogL()
+EXPORT_C void CObexUtilsDialog::CancelWaitDialog()
     {
     FLOG(_L("[OBEXUTILS]\t CObexUtilsDialog::CancelWaitDialogL()"));
 
     if( iWaitDialog )
         {
-        iWaitDialog->SetCallback(NULL);
-        iWaitDialog->ProcessFinishedL();
+        iWaitDialog->Close();
+        delete iWaitDialog;
         iWaitDialog = NULL;
         }
 
@@ -195,22 +243,17 @@
 // -----------------------------------------------------------------------------
 // CObexUtilsDialog::CancelProgressDialogL
 // -----------------------------------------------------------------------------
-EXPORT_C void CObexUtilsDialog::CancelProgressDialogL()
+EXPORT_C void CObexUtilsDialog::CancelProgressDialog()
     {
     FLOG(_L("[OBEXUTILS]\t CObexUtilsDialog::CancelProgressDialogL()"));
 
     if( iProgressDialog )
         {        
-        iProgressDialog->SetCallback(NULL);
-        iProgressDialog->ProcessFinishedL();
+        iProgressDialog->Cancel();
+        delete iProgressDialog;
         iProgressDialog = NULL;
-
-        if ( iObexDialogTimer )
-            {
-            iObexDialogTimer->Cancel();
-            delete iObexDialogTimer;
-            iObexDialogTimer = NULL;
-            }
+        delete iObexDialogTimer;
+        iObexDialogTimer = NULL;
         }  
         
     FLOG(_L("[OBEXUTILS]\t CObexUtilsDialog::CancelProgressDialogL() completed"));  
@@ -219,51 +262,38 @@
 // -----------------------------------------------------------------------------
 // CObexUtilsDialog::UpdateProgressDialogL
 // -----------------------------------------------------------------------------
-EXPORT_C void CObexUtilsDialog::UpdateProgressDialogL( TInt aValue, TInt aResId  )
+EXPORT_C void CObexUtilsDialog::UpdateProgressDialogL( TInt aProgressValue  )
     {
     FLOG(_L("[OBEXUTILS]\t CObexUtilsDialog::UpdateProgressDialogL()"));
 
     if ( iProgressDialog )
         {
-        iProgressDialog->GetProgressInfoL()->SetAndDraw( aValue );
+        HBufC* key = HBufC::NewL(KMaxDescriptionLength);
+        CleanupStack::PushL(key);
+
+        CHbSymbianVariantMap* map = CHbSymbianVariantMap::NewL();
+        CleanupStack::PushL(map);
         
-        HBufC* buf = StringLoader::LoadLC( aResId );
-        iProgressDialog->SetTextL( buf->Des() );
-        iProgressDialog->LayoutAndDraw();
-        CleanupStack::PopAndDestroy( buf );
+        key->Des().Copy(KProgressValue());
+        AddDataL( map, *key, &aProgressValue, CHbSymbianVariant::EInt );
+
+        HBufC* value = HBufC::NewL(KMaxDescriptionLength);
+        CleanupStack::PushL(value);
+        key->Des().Copy(KCurrentFileIndex());
+        value->Des().AppendNum(iFileIndex);
+        AddDataL( map, *key, value, CHbSymbianVariant::EDes );
+        CleanupStack::PopAndDestroy(value);
+        
+        TInt ret = iProgressDialog->Update(*map);
+        
+        CleanupStack::PopAndDestroy(map);
+        CleanupStack::PopAndDestroy(key);    
         }
 
     FLOG(_L("[OBEXUTILS]\t CObexUtilsDialog::UpdateProgressDialogL() completed"));
     }
 
 // -----------------------------------------------------------------------------
-// CObexUtilsDialog::DialogDismissedL
-// -----------------------------------------------------------------------------
-void CObexUtilsDialog::DialogDismissedL( TInt aButtonId )
-    {
-    FLOG(_L("[OBEXUTILS]\t CObexUtilsDialog::DialogDismissedL()"));
-
-    // The dialog has already been deleted by UI framework.
-    //
-    if( aButtonId == EAknSoftkeyCancel )
-        {
-        if ( iDialogObserverPtr )
-            {
-            iDialogObserverPtr->DialogDismissed( aButtonId );
-            }
-
-        if ( iObexDialogTimer )
-            {
-            iObexDialogTimer->Cancel();
-            delete iObexDialogTimer;
-            iObexDialogTimer = NULL;
-            }
-        }
-
-    FLOG(_L("[OBEXUTILS]\t CObexUtilsDialog::DialogDismissedL() completed"));
-    }
-
-// -----------------------------------------------------------------------------
 // CObexUtilsDialog::UpdateProgressDialog
 // -----------------------------------------------------------------------------
 void CObexUtilsDialog::UpdateProgressDialog()
@@ -271,7 +301,7 @@
     FLOG(_L("[OBEXUTILS]\t CObexUtilsDialog::UpdateProgressDialog()"));
 
     TRAPD( ignoredError, UpdateProgressDialogL( 
-        iProgressObserverPtr->GetProgressStatus(), iProgressDialogResId ) );
+        iProgressObserverPtr->GetProgressStatus()) );
         
     if (ignoredError != KErrNone)
         {
@@ -290,70 +320,153 @@
 // CObexUtilsDialog::LaunchQueryDialogL
 // -----------------------------------------------------------------------------
 //
-EXPORT_C TInt CObexUtilsDialog::LaunchQueryDialogL( const TInt& aResourceID )
+EXPORT_C void CObexUtilsDialog::LaunchQueryDialogL( const TDesC& aConfirmText )
     {
     FLOG(_L("[OBEXUTILS]\t CObexUtilsDialog::LaunchQueryDialogL()"));
-    
-    CAknQueryDialog* dlg = CAknQueryDialog::NewL();
-    CleanupStack::PushL( dlg );
-    PrepareDialogExecuteL( aResourceID, dlg );
-    CleanupStack::Pop( dlg );
-    TInt keypress = dlg->ExecuteLD( aResourceID );
-    
-    return keypress;
+    if ( iMessageBox )
+        {
+        //todo: Already one dialog is displayed, currently not supported for 
+        //multiple dialogs at the same time.
+        User::Leave( KErrGeneral );
+        }
+    iMessageBox = CreateAndShowMessageBoxL( CHbDeviceMessageBoxSymbian::EQuestion,
+            aConfirmText, this, 0 );
     }
     
+
 // -----------------------------------------------------------------------------
-// CObexUtilsDialog::ShowNumberOfSendFileL
+// CObexUtilsUiDialog::ShowErrorNoteL
 // -----------------------------------------------------------------------------
-//  
-    
-EXPORT_C void CObexUtilsDialog::ShowNumberOfSendFileL( TInt aSentNum, TInt aTotalNum )
+EXPORT_C void CObexUtilsDialog::ShowErrorNoteL( const TDesC& aTextId )
     {
-    FLOG(_L("[OBEXUTILS]\t CObexUtilsDialog::ShowNumberOfSendFile()"));
-    
-    CAknInformationNote* myNote = new (ELeave) CAknInformationNote();
+    FLOG(_L("[OBEXUTILS]\t CObexUtilsUiDialog::ShowErrorNoteL"));
+    if ( iMessageBox )
+        {
+        //todo: Already one dialog is displayed, currently not supported for 
+        //multiple dialogs at the same time.
+        User::Leave( KErrGeneral );
+        }
+    iMessageBox = CreateAndShowMessageBoxL( CHbDeviceMessageBoxSymbian::EWarning,
+                aTextId, this, 0 );
+    FLOG(_L("[OBEXUTILS]\t CObexUtilsUiDialog::ShowErrorNoteL completed"));
+    }
 
-    CArrayFix<TInt>* nums = new( ELeave ) CArrayFixFlat<TInt>(3);
-    CleanupStack::PushL(nums);
-    nums->AppendL(aSentNum);  
-    nums->AppendL(aTotalNum);
-    CleanupStack::Pop(nums);
+// -----------------------------------------------------------------------------
+// CObexUtilsUiDialog::ShowInformationNoteL
+// -----------------------------------------------------------------------------
+EXPORT_C void CObexUtilsDialog::ShowInformationNoteL( const TDesC& aTextId )
+    {
+    FLOG(_L("[OBEXUTILS]\t CObexUtilsUiDialog::ShowInformationNoteL"));
+    if ( iMessageBox )
+        {
+        //todo: Already one dialog is displayed, currently not supported for 
+        //multiple dialogs at the same time.
+        User::Leave( KErrGeneral );
+        }
+    iMessageBox = CreateAndShowMessageBoxL( CHbDeviceMessageBoxSymbian::EInformation,
+                    aTextId, this, 0 );
+    FLOG(_L("[OBEXUTILS]\t CObexUtilsUiDialog::ShowInformationNoteL completed"));
+    }
 
-    HBufC* stringholder = StringLoader::LoadLC( R_BT_SENT_IMAGE_NUMBER, *nums); 
-    PrepareDialogExecuteL( R_BT_SENT_IMAGE_NUMBER, myNote );
-    myNote->ExecuteLD( *stringholder );
-    CleanupStack::PopAndDestroy( stringholder );
+void CObexUtilsDialog::ProgressDialogCancelled(const CHbDeviceProgressDialogSymbian* aDialog)
+    {
+    FLOG(_L("[BTSU]\t CObexUtilsDialog::ProgressDialogCancelled(), cancelled by user"));
+    (void) aDialog;
+    if ( iDialogObserverPtr )
+        {
+        iDialogObserverPtr->DialogDismissed(ECancelButton);
+        }
+    delete iWaitDialog;
+    iWaitDialog = NULL;
     }
 
 // -----------------------------------------------------------------------------
-// CObexUtilsDialog::PrepareDialogExecuteL
+// CObexUtilsDialog::MessageBoxClosed
 // -----------------------------------------------------------------------------
-//
-void CObexUtilsDialog::PrepareDialogExecuteL( const TInt& aResourceID, CEikDialog* aDialog )
+void  CObexUtilsDialog::MessageBoxClosed(const CHbDeviceMessageBoxSymbian *aMessageBox, 
+        CHbDeviceMessageBoxSymbian::TButtonId aButton)
+    {
+    FLOG(_L("[OBEXUTILS]\t CObexUtilsUiDialog::MessageBoxClosed"));
+    (void)aMessageBox;
+    delete iMessageBox;
+    iMessageBox = NULL;
+    if(iDialogObserverPtr)
+        {
+        //ETrue if user selects Yes, otherwise EFalse.
+         iDialogObserverPtr->DialogDismissed( 
+                 (aButton == CHbDeviceMessageBoxSymbian::EAcceptButton) ? 
+                     EYesButton : ENoButton  );
+        }
+    FLOG(_L("[OBEXUTILS]\t CObexUtilsUiDialog::MessageBoxClosed completed"));
+    }
+
+void CObexUtilsDialog::ProgressDialogClosed(const CHbDeviceProgressDialogSymbian* aDialog)
+    {
+    (void) aDialog;
+    }
+
+void CObexUtilsDialog::DataReceived(CHbSymbianVariantMap& aData)
     {
-    if (iCoverDisplayEnabled)
+    (void) aData;
+    }
+
+void CObexUtilsDialog::DeviceDialogClosed(TInt aCompletionCode)
+    {
+    FLOG(_L("[BTSU]\t CObexUtilsDialog::DeviceDialogClosed()"));   
+    (void) aCompletionCode;
+
+    delete iObexDialogTimer;
+    iObexDialogTimer = NULL;
+    delete iProgressDialog;
+    iProgressDialog = NULL;  
+    
+    TBool ok = HbTextResolverSymbian::Init(KLocFileName, KPath);
+    if(ok)
         {
-        TInt dialogIndex =
-            ((aResourceID & KResourceNumberMask) - KFirstResourceOffset) + KEnumStart;
-        aDialog->PublishDialogL( dialogIndex, KObexUtilsCategory );
+        TRAP_IGNORE(
+                 HBufC* deviceName = HbTextResolverSymbian::LoadLC(KDeviceText,iDeviceName);
+                 HBufC* sendText = HbTextResolverSymbian::LoadLC(KSendingCancelledText);
+                 CHbDeviceNotificationDialogSymbian::NotificationL(
+                         KNullDesC, deviceName->Des(), sendText->Des());
+                 CleanupStack::PopAndDestroy( sendText );		 
+                 CleanupStack::PopAndDestroy( deviceName );
+                );
+        }
+    else
+        {
+        CHbDeviceNotificationDialogSymbian::NotificationL(
+                KNullDesC, KDeviceText(), KSendingCancelledText());
+        }
+    if ( iDialogObserverPtr )
+        {
+        iDialogObserverPtr->DialogDismissed(ECancelButton);
         }
     }
 
-// -----------------------------------------------------------------------------
-// CObexUtilsDialog::IsCoverDisplayL()
-// -----------------------------------------------------------------------------
-//
-TBool CObexUtilsDialog::IsCoverDisplayL()
+void CObexUtilsDialog::AddDataL(CHbSymbianVariantMap* aMap, const TDesC& aKey, 
+        const TAny* aData, CHbSymbianVariant::TType aDataType)
     {
-    TBool coverDisplay = EFalse;
-	FeatureManager::InitializeLibL();
-	if ( FeatureManager::FeatureSupported( KFeatureIdCoverDisplay ) )
-		{
-		coverDisplay = ETrue;
-		}
-	FeatureManager::UnInitializeLib();
-    return coverDisplay;
+    CHbSymbianVariant* value = CHbSymbianVariant::NewL(aData, aDataType);
+    CleanupStack::PushL( value );
+    User::LeaveIfError( aMap->Add( aKey, value ) ); // aMap takes the ownership of value
+    CleanupStack::Pop( value );
+    }
+
+CHbDeviceMessageBoxSymbian* CObexUtilsDialog::CreateAndShowMessageBoxL(
+        CHbDeviceMessageBoxSymbian::TType aType,
+        const TDesC& aText, MHbDeviceMessageBoxObserver* aObserver,
+        TInt aTimeout )
+    {
+    CHbDeviceMessageBoxSymbian* messageBox =
+            CHbDeviceMessageBoxSymbian::NewL( aType );
+    CleanupStack::PushL(messageBox);
+    //ToDo: Need to use localised strings.
+    messageBox->SetTextL(aText);
+    messageBox->SetObserver(aObserver);
+    messageBox->SetTimeout(aTimeout);
+    messageBox->ShowL();
+    CleanupStack::Pop(messageBox);
+    return messageBox;
     }
 
 //  End of File  
--- a/btobexprofiles/obexserviceman/utils/src/obexutilsglobaldialog.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,169 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Handles the global progress dialog for voice recognition
-*
-*/
-
-
-
-
-
-// INCLUDE FILES
-
-#include "obexutilsglobalprogressdialog.h"
-#include "obexutilsuilayer.h"
-#include <AknIconUtils.h>
-#include <avkon.mbg>
-#include <avkon.rsg>
-#include <bautils.h>
-#include    "obexutilsdebug.h"
-
-
-
-// ================= MEMBER FUNCTIONS =======================
-
-// C++ default constructor can NOT contain any code, that
-// might leave.
-//
-CGlobalDialog::CGlobalDialog() : CActive(EPriorityNormal)
-   {
-   CActiveScheduler::Add( this );
-   }
-
-// Symbian default constructor can leave.
-void CGlobalDialog::ConstructL(MGlobalNoteCallback* aObserver)
-   {    
-    iKeyCallback = aObserver;
-    iAknGlobalNote = CAknGlobalNote::NewL();
-   }
-
-
-// Two-phased constructor.
-EXPORT_C CGlobalDialog* CGlobalDialog::NewL(MGlobalNoteCallback* aObserver)
-   {
-   CGlobalDialog* self = NewLC(aObserver);
-   CleanupStack::Pop();
-   return self;
-   }
-
-// Two-phased constructor.- stack version
-EXPORT_C CGlobalDialog* CGlobalDialog::NewLC(MGlobalNoteCallback* aObserver)
-   {
-   CGlobalDialog* self=new (ELeave) CGlobalDialog();
-   CleanupStack::PushL(self);
-   self->ConstructL(aObserver);
-   return self;
-   }
-
-EXPORT_C void CGlobalDialog::ShowErrorDialogL(TInt aResourceId)
-{
-    TFileName fileName;
-    fileName += KObexUtilsFileDrive;
-    fileName += KDC_RESOURCE_FILES_DIR;
-    fileName += KObexUtilsResourceFileName;
-    
-    if(!iStringResourceReader)
-    {
-        iStringResourceReader= CStringResourceReader::NewL( fileName );
-    }
-    TPtrC buf;
-    buf.Set(iStringResourceReader-> ReadResourceString(aResourceId)); 
-    iAknGlobalNote->SetSoftkeys(R_AVKON_SOFTKEYS_CLOSE);
-    iAknGlobalNote->ShowNoteL(iStatus,EAknGlobalInformationNote, buf);    
-    FTRACE( FPrint(_L( "[ObexUtils] CGlobalDialog: ShowNoteDialogL buf: \t %S" ), &buf) );
-    SetActive();    
-    
-}
-EXPORT_C void CGlobalDialog::ShowNoteDialogL( TInt aResourceId, TBool anAnimation)
-{
-    TFileName fileName;
-    fileName += KObexUtilsFileDrive;
-    fileName += KDC_RESOURCE_FILES_DIR;
-    fileName += KObexUtilsResourceFileName;
-    
-    if(!iStringResourceReader)
-    {
-        iStringResourceReader= CStringResourceReader::NewL( fileName );
-    }
-    TPtrC buf;
-    buf.Set(iStringResourceReader-> ReadResourceString(aResourceId)); 
-    iAknGlobalNote->SetSoftkeys(R_AVKON_SOFTKEYS_CANCEL);
-    if(anAnimation)
-    {
-        iAknGlobalNote->SetAnimation(R_QGN_GRAF_WAIT_BAR_ANIM);
-    }
-    iAknGlobalNote->ShowNoteL(iStatus,EAknGlobalWaitNote, buf);    
-    FTRACE( FPrint(_L( "[ObexUtils] CGlobalDialog: ShowNoteDialogL buf: \t %S" ), &buf) );
-    SetActive();
-
-}
-
-// Destructor
-CGlobalDialog::~CGlobalDialog()
-   {
-   Cancel();
-   if(iAknGlobalNote)
-   {
-       delete iAknGlobalNote;   
-       iAknGlobalNote = NULL;
-   }
-   
-   delete iStringResourceReader;
-   
-   }
-
-
-
-// ---------------------------------------------------------
-// CGlobalDialog::DoCancel
-// Active object cancel
-// ---------------------------------------------------------
-//
-void CGlobalDialog::DoCancel()
-   {
-      ProcessFinished();
-    if(iStringResourceReader)
-    {
-        delete iStringResourceReader;
-        iStringResourceReader = NULL;
-    }
-   }
-
-// ---------------------------------------------------------
-// CGlobalDialog::RunL
-// Active object RunL
-// ---------------------------------------------------------
-//
-void CGlobalDialog::RunL()
-    {
-
-    FTRACE( FPrint(_L( "[ObexUtils] CGlobalDialog: RunL iStatus.Int():\t %d" ), iStatus.Int() ) );
-    if ( iKeyCallback != NULL )
-        {
-        iKeyCallback->HandleGlobalNoteDialogL(iStatus.Int());
-        }
-    }
-
-// ---------------------------------------------------------
-// CGlobalDialog::ProcessFinished
-// Stops the progress dialog
-// ---------------------------------------------------------
-//
-EXPORT_C void CGlobalDialog::ProcessFinished()
-   { 
-    FLOG( _L( "[ObexUtils] CGlobalDialog::ProcessFinished\t" ) );   
-    delete iAknGlobalNote;
-    iAknGlobalNote = NULL;   
-   }
-
--- a/btobexprofiles/obexserviceman/utils/src/obexutilsglobalprogressdialog.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,272 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Handles the global progress dialog 
-*
-*/
-
-
-
-
-
-// INCLUDE FILES
-#include <AknGlobalProgressDialog.h>
-#include "obexutilsglobalprogressdialog.h"
-#include "obexutilsuilayer.h"
-#include <StringLoader.h>
-#include <AknIconUtils.h>
-#include <avkon.mbg>
-#include <avkon.rsg>
-#include <bautils.h>
-//#include <BtuiViewResources.rsg>     // Compiled resource ids
-#include <e32math.h>
-
-#include <StringLoader.h>            // Localisation stringloader
-#include <eikenv.h>
-
-#include "obexutilsdebug.h"
-
-const TInt KMaxDisplayFileName = 17;    // used while showing receiving filename. 
-                                        // If the filename is longer than 20 bytes, we make it show only 20 bytes.
-
-// ================= MEMBER FUNCTIONS =======================
-
-// C++ default constructor can NOT contain any code, that
-// might leave.
-//
-CGlobalProgressDialog::CGlobalProgressDialog() : CActive(EPriorityNormal)
-   {
-   CActiveScheduler::Add( this );
-   }
-
-
-// Symbian default constructor can leave.
-void CGlobalProgressDialog::ConstructL(MGlobalProgressCallback* aObserver)
-   {
-    iProgressDialog = CAknGlobalProgressDialog::NewL();
-    iKeyCallback = aObserver;
-   }
-
-
-// Two-phased constructor.
-EXPORT_C CGlobalProgressDialog* CGlobalProgressDialog::NewL(MGlobalProgressCallback* aObserver)
-   {
-   CGlobalProgressDialog* self = NewLC(aObserver);
-   CleanupStack::Pop();
-   return self;
-   }
-
-// Two-phased constructor.- stack version
-EXPORT_C CGlobalProgressDialog* CGlobalProgressDialog::NewLC(MGlobalProgressCallback* aObserver)
-   {
-   CGlobalProgressDialog* self=new (ELeave) CGlobalProgressDialog();
-   CleanupStack::PushL(self);
-   self->ConstructL(aObserver);
-   return self;
-   }
-
-
-// Destructor
-CGlobalProgressDialog::~CGlobalProgressDialog()
-   {
-   Cancel();
-   delete iProgressDialog;  
-   delete iStringResourceReader;
-   }
-
-
-
-// ---------------------------------------------------------
-// CGlobalProgressDialog::DoCancel
-// Active object cancel
-// ---------------------------------------------------------
-//
-void CGlobalProgressDialog::DoCancel()
-   {
-   if ( iProgressDialog )
-      {
-      iProgressDialog->CancelProgressDialog();
-      }
-
-    if(iStringResourceReader)
-    {
-        delete iStringResourceReader;
-        iStringResourceReader = NULL;
-    }
-   }
-
-// ---------------------------------------------------------
-// CGlobalProgressDialog::RunL
-// Active object RunL
-// ---------------------------------------------------------
-//
-void CGlobalProgressDialog::RunL()
-    {
-    if ( iKeyCallback != NULL )
-        {
-        iKeyCallback->HandleGlobalProgressDialogL(iStatus.Int());
-        }
-    }
-
-// ---------------------------------------------------------
-// CGlobalProgressDialog::SetIconL
-// Set icon on the dialog
-// ---------------------------------------------------------
-//
-void CGlobalProgressDialog::SetIconL( const TDesC& aIconText, const TDesC& aIconFile,
-                                TInt aIconId, TInt aIconMaskId )
-   {
-   iProgressDialog->SetIconL(aIconText, aIconFile, aIconId, aIconMaskId );
-   }
-
-// ---------------------------------------------------------
-// CGlobalProgressDialog::SetImageL
-// Set image on the dialog
-// ---------------------------------------------------------
-//
-void CGlobalProgressDialog::SetImageL( const TDesC& aImageFile, TInt aImageId,
-                                 TInt aImageMaskId )
-   {
-   iProgressDialog->SetImageL(aImageFile, aImageId, aImageMaskId);
-   }
-
-
-// ---------------------------------------------------------
-// CGlobalProgressDialog::ShowProgressDialogL
-// Shows progress dialog and sets active object active
-// ---------------------------------------------------------
-//
-EXPORT_C void CGlobalProgressDialog::ShowProgressDialogL(TInt aStringId)
-    {
-    TFileName fileName;
-    fileName += KObexUtilsFileDrive;
-    fileName += KDC_RESOURCE_FILES_DIR;
-    fileName += KObexUtilsResourceFileName;
-
-    if(!iStringResourceReader)
-    {
-        iStringResourceReader= CStringResourceReader::NewL( fileName );
-    }
-    TPtrC buf;
-    //buf.Set(iStringResourceReader-> ReadResourceString(R_BT_RECEIVING_DATA));   
-    buf.Set(iStringResourceReader-> ReadResourceString(aStringId));   
-    iProgressDialog->ShowProgressDialogL( iStatus, buf, R_AVKON_SOFTKEYS_HIDE_CANCEL__HIDE );   
-    //iProgressDialog->ShowProgressDialogL( iStatus, buf, R_BTUI_SOFTKEYS_OPTIONS_EXIT__CHANGE ); //R_OBEXUTILS_SOFTKEYS_HIDE_CANCEL );   
-    SetActive();    
-    }
-
-// ---------------------------------------------------------
-// CGlobalProgressDialog::ShowProgressDialogNameSizeL
-// Shows progress dialog and sets active object active
-// ---------------------------------------------------------
-//
-EXPORT_C void CGlobalProgressDialog::ShowProgressDialogNameSizeL(
-    TDesC& aFileName, 
-    TInt64 aFileSize)
-    {
-    TFileName fileName;
-    fileName += KObexUtilsFileDrive;
-    fileName += KDC_RESOURCE_FILES_DIR;
-    fileName += KObexUtilsResourceFileName;
-
-    if(!iStringResourceReader)
-        {
-        iStringResourceReader= CStringResourceReader::NewL( fileName );
-        }
-    TPtrC buf;
-   
-    
-    TBuf<20> sizeInString;
-    sizeInString.Zero();
-    
-    if ( aFileSize >> 20 )    // size in MB
-        {       
-        TReal sizeInMB = 0;
-        sizeInMB = ((TReal)aFileSize ) / (1024*1024);
-        _LIT16(KFormatTwoDecimal,"%4.2f");  // keep 2 decimals
-        sizeInString.Format(KFormatTwoDecimal,sizeInMB); 
-        buf.Set(iStringResourceReader-> ReadResourceString(R_BT_IR_RECEIVING_DATA_SIZE_MB));
-        }
-    else if( aFileSize >> 10 )        // size in KB
-        {
-        TInt64 sizeInKB = 0;
-        sizeInKB = aFileSize >> 10;
-        sizeInString.AppendNum(sizeInKB); 
-        buf.Set(iStringResourceReader-> ReadResourceString(R_BT_IR_RECEIVING_DATA_SIZE_KB));
-        }
-   else                              // size is unknown or less than 1K
-        {
-        buf.Set(iStringResourceReader-> ReadResourceString(R_BT_IR_RECEIVING_DATA_NO_SIZE));
-        }
-    
-    
-    TBuf<100> tbuf;
-    tbuf.Zero();
-    tbuf.Append(buf);
-    _LIT(KPrefix,"[");
-    _LIT(Ksuffix,"]");
-    TInt prefixPos = tbuf.Find(KPrefix); 
-    if (prefixPos!= KErrNotFound)
-        {
-        TInt keyLength = 0;
-        TInt suffixPos = tbuf.Find(Ksuffix); 
-        keyLength =(tbuf.Mid(prefixPos)).Length()-(tbuf.Mid(suffixPos)).Length()+1;
-        tbuf.Delete(prefixPos, keyLength);  
-        }
-    _LIT(KString,"%U");
-    
-
-        
-    if ( aFileName.Length() > KMaxDisplayFileName )   
-        {
-        // Filename is too long, 
-        // We make it shorter. Hiding the chars in the middle part of filename.       
-        //
-        TFileName shortname;
-        shortname = aFileName.Mid(0,KMaxDisplayFileName/2);
-        shortname.Append(_L("..."));
-        shortname.Append(aFileName.Mid(aFileName.Length() - KMaxDisplayFileName/2, KMaxDisplayFileName/2));
-        tbuf.Replace(tbuf.Find(KString) , 2, shortname);
-        }
-    else
-        {
-        tbuf.Replace(tbuf.Find(KString) , 2, aFileName);
-        }
-    _LIT(KInt, "%N");
-    if ( sizeInString.Length() > 0 )
-        {
-        tbuf.Replace(tbuf.Find(KInt) , 2, sizeInString);
-        }
-    
-    iProgressDialog->ShowProgressDialogL( iStatus, tbuf, R_AVKON_SOFTKEYS_HIDE_CANCEL__HIDE );
-    SetActive();
-    }
-// ---------------------------------------------------------
-// CGlobalProgressDialog::UpdateProgressDialog
-// Updates the progress dialog
-// ---------------------------------------------------------
-//
-EXPORT_C void CGlobalProgressDialog::UpdateProgressDialog(TInt aValue, TInt aFinalValue)
-   {
-   iProgressDialog->UpdateProgressDialog(aValue, aFinalValue);   
-   }
-
-// ---------------------------------------------------------
-// CGlobalProgressDialog::ProcessFinished
-// Stops the progress dialog
-// ---------------------------------------------------------
-//
-EXPORT_C void CGlobalProgressDialog::ProcessFinished()
-   {
-   iProgressDialog->ProcessFinished();
-   }
--- a/btobexprofiles/obexserviceman/utils/src/obexutilslaunchwaiter.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,414 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-// INCLUDE FILES
-#include <eikenv.h>
-#include <DocumentHandler.h>
-#include <mmsvattachmentmanager.h>
-#include <msvids.h>
-#include <bautils.h>
-#include <AknCommonDialogsDynMem.h>     // for memory and file selection dialogs
-#include <CommonDialogs.rsg>
-#include <pathinfo.h>                   // for getting drive root path
-#include <Obexutils.rsg>
-#include <AknGlobalNote.h>
-#include <StringLoader.h>
-#include <AiwGenericParam.h>
-#include "obexutilslaunchwaiter.h"
-#include "obexutilsdebug.h"
-#include "obexutilsuilayer.h"            // For launching file manager
-#include "obexutilsmessagehandler.h"            // For updating an entry
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CObexUtilsLaunchWaiter::NewLC
-// -----------------------------------------------------------------------------
-CObexUtilsLaunchWaiter* CObexUtilsLaunchWaiter::NewLC( 
-	CMsvSession& aMsvSession,
-	CMsvEntry* aMessage,
-    TRequestStatus& aObserverRequestStatus )
-    {
-    CObexUtilsLaunchWaiter* self = new( ELeave )CObexUtilsLaunchWaiter( 
-        aMsvSession,
-        aMessage, 
-        aObserverRequestStatus );
-    CleanupStack::PushL( self );
-    self->ConstructL( aMessage );
-    return self;
-    }
-
-// -----------------------------------------------------------------------------
-// CObexUtilsLaunchWaiter::NewL
-// -----------------------------------------------------------------------------
-CObexUtilsLaunchWaiter* CObexUtilsLaunchWaiter::NewL(
-	CMsvSession& aMsvSession,
-	CMsvEntry* aMessage,
-    TRequestStatus& aObserverRequestStatus )
-    {
-    CObexUtilsLaunchWaiter* self = CObexUtilsLaunchWaiter::NewLC(
-        aMsvSession,
-        aMessage, 
-        aObserverRequestStatus );
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// -----------------------------------------------------------------------------
-// CObexUtilsLaunchWaiter::ConstructL
-// -----------------------------------------------------------------------------
-void CObexUtilsLaunchWaiter::ConstructL( CMsvEntry* aMessage )
-    {
-    if (aMessage->Count() < 1)
-        {
-        User::Leave(KErrOverflow);
-        }
-    
-    CMsvEntry* attachEntry = iMsvSession.GetEntryL(((*aMessage)[0]).Id());
-    CleanupStack::PushL(attachEntry);  // 1st push
-    CMsvStore* store = attachEntry->ReadStoreL();
-    CleanupStack::PushL(store);  // 2nd push
-    
-    CMsvAttachment* attachInfo = store->AttachmentManagerL().GetAttachmentInfoL(0);
-    CleanupStack::PushL(attachInfo); // 3rd push
-          
-    TDataType dataType = attachInfo->MimeType();
-    TFileName filePath;
-    filePath = attachInfo->FilePath();
-  
-    TInt error = KErrNone;
-    TBool isCompleteSelf = EFalse;      
-    CEikonEnv* eikEnv = CEikonEnv::Static();
-
-    if ( attachInfo->Type() == CMsvAttachment::EMsvFile )
-        {
-        RFile attachFile;        
-        TRAP( error, attachFile = store->AttachmentManagerL().GetAttachmentFileL(0));
-        if ( error == KErrNone )
-            {
-            CleanupClosePushL(attachFile);  // 4th push          
-            CAiwGenericParamList* paramList = CAiwGenericParamList::NewLC();  // 5th push
-            TAiwGenericParam paramSave(EGenericParamAllowSave, ETrue);
-            paramList->AppendL( paramSave );          
-            
-            if ( eikEnv )
-                {               
-                iDocumentHandler = CDocumentHandler::NewL( eikEnv->Process() );
-                iDocumentHandler->SetExitObserver( this );
-                TRAP( error, iDocumentHandler->OpenFileEmbeddedL(attachFile, dataType, *paramList));               
-                }// eikEnv        
-            CleanupStack::PopAndDestroy(2); // paramList, attachFile
-            }
-        }// EMsvFile
-    
-    if ( attachInfo->Type() == CMsvAttachment::EMsvLinkedFile )
-        {
-        CAiwGenericParamList* paramList = CAiwGenericParamList::NewLC();  // 4th push
-        TAiwGenericParam paramSave(EGenericParamFileSaved, ETrue);
-        paramList->AppendL( paramSave );
-        
-        if ( eikEnv )
-            {            
-            iDocumentHandler = CDocumentHandler::NewL( eikEnv->Process() );
-            iDocumentHandler->SetExitObserver( this );
-            RFs rfs;
-            User::LeaveIfError( rfs.Connect() );
-            if ( BaflUtils::FileExists( rfs, filePath ) )                                 
-                {
-                RFile64 shareableFile;
-                TRAP( error, iDocumentHandler->OpenTempFileL(filePath,shareableFile));
-                if ( error == KErrNone)
-                    {
-                    TRAP( error, iDocumentHandler->OpenFileEmbeddedL( shareableFile, dataType, *paramList));
-                    }
-                shareableFile.Close();
-                
-                if ( error == KErrNotSupported )  
-                    {                    
-                    delete iDocumentHandler;
-                    iDocumentHandler = NULL;
-                    
-                    const TInt sortMethod = 2;  // 0 = 'By name', 1 = 'By type', 
-                                                // 2 = 'Most recent first' and 3 = 'Largest first'
-                    TRAP (error, TObexUtilsUiLayer::LaunchFileManagerL( filePath, 
-                                                                        sortMethod, 
-                                                                        ETrue )); // ETrue -> launch file manager in embedded mode.
-                    isCompleteSelf = ETrue;
-                    }  // KErrNotSupported
-                }            
-            else 
-                {
-                error = KErrNone;
-                TFileName fileName;
-                if (LocateFileL(fileName, filePath))
-                    {
-                    // Update the entry
-                    TRAP(error, TObexUtilsMessageHandler::UpdateEntryAttachmentL(fileName,aMessage));
-                    if ( error == KErrNone )
-                        {
-                        // Show a confirmation note
-                        CAknGlobalNote* note = CAknGlobalNote::NewLC();
-                        HBufC* stringholder  = StringLoader::LoadLC( R_BT_SAVED_LINK_UPDATED );
-                        note->ShowNoteL(EAknGlobalConfirmationNote, *stringholder);
-                        CleanupStack::PopAndDestroy(2); //note and stringholder
-                        }            
-                    }    
-                isCompleteSelf = ETrue;
-                }  
-           
-            rfs.Close();
-            } // eikEnv
-        
-        CleanupStack::PopAndDestroy(); // paramList                                     
-        } // EMsvLinkedFile
-     
-    
-    // Set message to READ     
-    TMsvEntry entry = aMessage->Entry();
-    entry.SetUnread( EFalse );
-    aMessage->ChangeL( entry );
-    
-    User::LeaveIfError ( error );
-    CleanupStack::PopAndDestroy(3); //  attachInfo, store, attachEntry        
-    
-    iObserverRequestStatus = KRequestPending;  // CMsvOperation (observer)
-    iStatus = KRequestPending;  // CMsvOperation
-    SetActive();
-
-    if ( isCompleteSelf )
-        {
-        HandleServerAppExit( error );
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// Destructor
-// -----------------------------------------------------------------------------
-CObexUtilsLaunchWaiter::~CObexUtilsLaunchWaiter()
-    {
-    Cancel();
-    if (iDocumentHandler)
-        {
-        delete iDocumentHandler;
-        iDocumentHandler = NULL;
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CObexUtilsLaunchWaiter::RunL
-// -----------------------------------------------------------------------------
-void CObexUtilsLaunchWaiter::RunL()
-    {
-    FLOG(_L("[OBEXUTILS]\t CObexUtilsLaunchWaiter::RunL()"));
-    
-    TRequestStatus* status = &iObserverRequestStatus;
-    User::RequestComplete( status, KErrNone );
-
-    FLOG(_L("[OBEXUTILS]\t CObexUtilsLaunchWaiter::RunL() completed"));
-    }
-    
-// -----------------------------------------------------------------------------
-// CObexUtilsLaunchWaiter::DoCancel
-// -----------------------------------------------------------------------------
-void CObexUtilsLaunchWaiter::DoCancel()
-    {
-    FLOG(_L("[OBEXUTILS]\t CObexUtilsLaunchWaiter::DoCancel()"));
-   
-    if ( iStatus == KRequestPending )
-        {
-        TRequestStatus* pstat = &iStatus;
-        User::RequestComplete( pstat, KErrCancel );
-        }
-      
-    if( iObserverRequestStatus == KRequestPending )
-        {
-        TRequestStatus* observerStatus = &iObserverRequestStatus;
-        User::RequestComplete( observerStatus, KErrCancel );
-        }
-
-    
-    FLOG(_L("[OBEXUTILS]\t CObexUtilsLaunchWaiter::DoCancel() completed"));
-    }
-
-// -----------------------------------------------------------------------------
-// CObexUtilsLaunchWaiter::CObexUtilsLaunchWaiter
-// -----------------------------------------------------------------------------
-CObexUtilsLaunchWaiter::CObexUtilsLaunchWaiter( 
-	CMsvSession& aMsvSession,
-	CMsvEntry* /*aMessage*/,
-    TRequestStatus& aObserverRequestStatus )
-    :
-    CMsvOperation(aMsvSession, EPriorityStandard, aObserverRequestStatus),
-    iDocumentHandler(NULL)
-    {
-    FLOG(_L("[OBEXUTILS]\t CObexUtilsLaunchWaiter::CObexUtilsLaunchWaiter()"));
-
-    CActiveScheduler::Add( this );
-
-    FLOG(_L("[OBEXUTILS]\t CObexUtilsLaunchWaiter::CObexUtilsLaunchWaiter() completed"));
-    }
-
-// -----------------------------------------------------------------------------
-// CObexUtilsLaunchWaiter::HandleServerAppExit
-// -----------------------------------------------------------------------------
-void CObexUtilsLaunchWaiter::HandleServerAppExit(TInt aReason)
-    {
-    FLOG(_L("[OBEXUTILS]\t CObexUtilsLaunchWaiter::HandleServerAppExit()"));
-
-    if( iStatus == KRequestPending )
-        {
-        // Complete self
-        //
-        TRequestStatus* status = &iStatus;
-        User::RequestComplete( status, aReason );
-        }
-
-	MAknServerAppExitObserver::HandleServerAppExit( aReason );	
-    FLOG(_L("[OBEXUTILS]\t CObexUtilsLaunchWaiter::HandleServerAppExit() completed"));
-    }
-
-// -----------------------------------------------------------------------------
-// CObexUtilsLaunchWaiter::ProgressL
-// -----------------------------------------------------------------------------
-const TDesC8& CObexUtilsLaunchWaiter::ProgressL()
-    {
-    return KNullDesC8;
-    }
-
-// -----------------------------------------------------------------------------
-// CObexUtilsLaunchWaiter::LocateFile
-// -----------------------------------------------------------------------------
-TBool CObexUtilsLaunchWaiter::LocateFileL(TFileName& aFileName, const TFileName& anOldFileName)
-    {
-    FLOG(_L("[OBEXUTILS]\t CObexUtilsLaunchWaiter::LocateFile()"));
-    
-    TBuf<200> buf;
-    TRequestStatus status = KRequestPending;
-    
-    TParse fileParseOld;
-    fileParseOld.Set(anOldFileName, NULL, NULL);
-    TFileName oldName = fileParseOld.NameAndExt();
-            
-    // check old link if the file saved in mmc. If so, check if mmc available. 
-    // if unavailable, show "is File not found as memory card is not present"
-    //
-    TInt err = CheckIfSaveInMMC( anOldFileName );
-    TBool showMMCOut = EFalse;
-    if( err == EDriveF)
-        {
-        if( CheckDriveL(EDriveF) )
-            showMMCOut = ETrue;
-        }
-    else if( err == EDriveE )
-        {
-        if( CheckDriveL(EDriveE) )
-            showMMCOut = ETrue;
-        }
-
-    TBool answer = EFalse;
-    if( showMMCOut )
-        {
-        answer = TObexUtilsUiLayer::ShowGlobalConfirmationQueryPlainL(R_BT_SAVED_NO_MEMORY_CARD);
-        }
-    else
-        {
-        answer = TObexUtilsUiLayer::ShowGlobalConfirmationQueryPlainL(R_BT_SAVED_SEARCH);
-        }
-   
-    TBool updateLink = EFalse;
-    if ( answer )
-        {
-        updateLink = LaunchFileSelectionDialogL(aFileName, oldName);               
-        }  
-    
-    FLOG(_L("[OBEXUTILS]\t CObexUtilsLaunchWaiter::LocateFile() completed"));
-    return updateLink;
-    }
-    
-// -----------------------------------------------------------------------------
-// CObexUtilsLaunchWaiter::LaunchFileSelectionDialogL
-// -----------------------------------------------------------------------------
-TBool CObexUtilsLaunchWaiter::LaunchFileSelectionDialogL(
-    TFileName& aFileName, 
-    const TFileName& anOldName)
-    {
-    TBuf<200> buf;
-    TParse fileParseNew;
-    TFileName nameNew;
-    TBool updateLink = EFalse;
-   
-    while ( !updateLink ) 
-        {
-        TBool isSelected =  AknCommonDialogsDynMem::RunSelectDlgLD( AknCommonDialogsDynMem::EMemoryTypeMMCExternal|
-                                                                    AknCommonDialogsDynMem::EMemoryTypeMMC|
-                                                                    AknCommonDialogsDynMem::EMemoryTypeInternalMassStorage|
-                                                                    AknCommonDialogsDynMem::EMemoryTypePhone,
-                                                                    aFileName,
-                                                                    R_CFD_DEFAULT_SELECT_MEMORY_SELECTION,
-                                                                    R_CFD_DEFAULT_SELECT_FILE_SELECTION );
-        
-        if ( isSelected )
-            {
-            fileParseNew.Set(aFileName, NULL, NULL);
-            nameNew = fileParseNew.NameAndExt();
-            
-            if ( nameNew.Compare(anOldName)) // names do not match
-                {
-                updateLink =  TObexUtilsUiLayer::ShowGlobalConfirmationQueryPlainL(R_BT_SAVED_SEARCH_UPDATE);                        
-                }
-            else
-                {
-                updateLink = ETrue;
-                }       
-            }
-        else
-            {
-            break;  // Exit from while loop.
-            }
-        }
-  
-    return updateLink;
-    }
-
-// -----------------------------------------------------------------------------
-// CObexUtilsLaunchWaiter::CheckDriveL
-// -----------------------------------------------------------------------------
-TInt CObexUtilsLaunchWaiter::CheckDriveL(TDriveNumber aDriveNumber)
-    {
-    RFs rfs;
-    User::LeaveIfError(rfs.Connect());
-    CleanupClosePushL( rfs ) ;
-    TVolumeInfo volumeInfo;
-    TInt err = rfs.Volume(volumeInfo, aDriveNumber);
-    CleanupStack::PopAndDestroy();    // rfs
-    
-    return err;
-    }
-// -----------------------------------------------------------------------------
-// CObexUtilsLaunchWaiter::CheckIfSaveInMMC
-// -----------------------------------------------------------------------------
-TInt CObexUtilsLaunchWaiter::CheckIfSaveInMMC(const TFileName& aFileName)
-    {
-    if(aFileName.Find(_L("F:")) != KErrNotFound)
-        return EDriveF;
-    if(aFileName.Find(_L("E:")) != KErrNotFound)
-        return EDriveE;
-
-    return KErrNotFound;
-    }
-//  End of File  
--- a/btobexprofiles/obexserviceman/utils/src/obexutilsmessagehandler.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/btobexprofiles/obexserviceman/utils/src/obexutilsmessagehandler.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -18,7 +18,6 @@
 
 // INCLUDE FILES
 #include "obexutilsmessagehandler.h"
-#include "obexutilsuilayer.h"
 #include "obexutilsdebug.h"
 #include "obexutilsentryhandler.h"
 
@@ -28,7 +27,6 @@
 #include <txtrich.h>
 
 #include <biouids.h>
-#include <Obexutils.rsg>
 #include <bautils.h>
 
 #include <e32property.h>
@@ -50,6 +48,12 @@
 // CONSTANT
 const TInt KFFSBelowCritical = -2;
 const TInt KRenameOffSet = 4 ;
+
+// todo @ QT migration: take official definition from Messaging at app layer (btmsgtypeuid.h)
+const TUid KUidMsgTypeBt = {0x10009ED5};
+
+const TInt KObexUtilsMaxCharToFromField = 256;
+
 // ============================= LOCAL FUNCTIONS ===============================
 
 // -----------------------------------------------------------------------------
@@ -468,18 +472,18 @@
     // 1st, 2nd, 3rd push
 
     TBuf<KObexUtilsMaxCharToFromField> toFrom;
-    TInt resourceId;
 
+    // todo @ QT migration: load from string id for localization
     if (aMtmId == KUidMsgTypeBt)
         {
-        resourceId = R_BT_TO_FROM_IN_INBOX;
+        _LIT(KBluetoothMsg, "Bluetooth message");
+        toFrom.Copy(KBluetoothMsg);
         }
     else
         {
-        resourceId = R_IR_TO_FROM_IN_INBOX;
+        _LIT(KInfraredMsg, "Infrared message");
+        toFrom.Copy(KInfraredMsg);    
         }
-   
-    TObexUtilsUiLayer::ReadResourceL( toFrom, resourceId );
     
     TMsvEntry parentTEntry;
     parentTEntry.iMtm = aMtmId;
@@ -835,19 +839,20 @@
     // 1st, 2nd, 3rd push
 
     TBuf<KObexUtilsMaxCharToFromField> toFrom;
-    TInt resourceId;
 
+    // todo @ QT migration: load from string id for localization
     if (aMtmId == KUidMsgTypeBt)
         {
-        resourceId = R_BT_TO_FROM_IN_INBOX;
+        _LIT(KBluetoothMsg, "Bluetooth message");
+        toFrom.Copy(KBluetoothMsg);
         }
     else
         {
-        resourceId = R_IR_TO_FROM_IN_INBOX;
+        _LIT(KInfraredMsg, "Infrared message");
+        toFrom.Copy(KInfraredMsg);    
         }
-    // NOTE: toFrom will be updated to Bluetooth sender's name
-    //
-    TObexUtilsUiLayer::ReadResourceL( toFrom, resourceId );  // read the toForm ( will be updated to sender's bt name in the future ) 
+    
+    // NOTE: toFrom will be updated to Bluetooth sender's bt name in the future.
 
     TMsvEntry parentTEntry;   
     parentTEntry.iMtm = aMtmId;
@@ -1000,7 +1005,7 @@
         FLOG(_L("[OBEXUTILS]\t TObexUtilsMessageHandler::AddEntryToInboxL() BIO"));
     
         RFile file;
-        User::LeaveIfError(file.Open(fsSess,aFullName,EFileRead));
+        User::LeaveIfError(file.Open(fsSess,aFullName,EFileShareReadersOnly));
         TReceivedData receivedData;
         receivedData.bytesReceived = fileEntry.iSize;
         receivedData.recTime = fileEntry.iModified;
@@ -1147,11 +1152,9 @@
     TParse fileParse;
     fileParse.Set(aFileName, NULL, NULL);
     
-    TBool nameempty = ETrue;
     if (fileParse.NameOrExtPresent())
         {        
         aFileName = fileParse.NameAndExt();
-        nameempty=EFalse;
         TText badChar;    
         TInt nameLength = aFileName.Length();
     
@@ -1174,18 +1177,6 @@
                     }
             }    
         }    
-    
-    // Did we delete all the characters? If so then we must have some filename
-    if ( aFileName.Length() == 0 || nameempty )
-        {
-        TInt resourceId = R_NAME_FOR_INVALID_FILE;
-        TRAPD( retVal, TObexUtilsUiLayer::ReadResourceL( aFileName, resourceId ) );
-        if (retVal != KErrNone)
-            {
-            FLOG(_L("TObexUtilsMessageHandler::MakeValidFileName failed."));
-            }
-        }
-
     FLOG(_L("[OBEXUTILS]\t MakeValidFileName() completed"));
     }
 
@@ -1195,7 +1186,8 @@
 //
 EXPORT_C TMsvId TObexUtilsMessageHandler::CreateOutboxEntryL(
     const TUid& aMtm,          // Message type id
-    const TInt& aResourceID )  // Resource id for the message entry text
+    //todo need to check whether to use the textmap id or send as a string here
+    const TInt& /*aResourceID*/ )  // Resource id for the message entry text
     {
     FLOG(_L("[OBEXUTILS]\t TObexUtilsMessageHandler::CreateOutboxEntryL()"));
 
@@ -1206,7 +1198,9 @@
     // 1st, 2nd, 3rd push
 
     TBuf<KObexUtilsMaxCharToFromField> toFrom;
-    TObexUtilsUiLayer::ReadResourceL( toFrom, aResourceID );
+ //   TObexUtilsUiLayer::ReadResourceL( toFrom, aResourceID );
+    //todo need to change the string constant to orbit localisation file
+    toFrom.Copy(_L("Bluetooth message"));
 
     // Message entry fields
     TMsvEntry newTEntry;
--- a/btobexprofiles/obexserviceman/utils/src/obexutilsuilayer.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,628 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-// INCLUDE FILES
-#include "obexutilsuilayer.h"
-#include "obexutilslaunchwaiter.h"
-#include "obexutilsdebug.h"
-
-#include <secondarydisplay/obexutilssecondarydisplayapi.h>
-#include <Obexutils.rsg>
-#include <aknnotewrappers.h>
-#include <AknGlobalConfirmationQuery.h>
-#include <eikon.rsg>
-#include <avkon.rsg>
-#ifdef NO101APPDEPFIXES
-#include <muiu.mbg>
-#else   //NO101APPDEPFIXES
-enum TMuiuConsts
-    {
-    EMbmMuiuQgn_prop_mce_ir_unread = 16402,
-    EMbmMuiuQgn_prop_mce_ir_unread_mask = 16403,
-    EMbmMuiuQgn_prop_mce_ir_read = 16404,
-    EMbmMuiuQgn_prop_mce_ir_read_mask = 16405,
-    EMbmMuiuQgn_prop_mce_bt_unread = 16406,
-    EMbmMuiuQgn_prop_mce_bt_unread_mask = 16407,
-    EMbmMuiuQgn_prop_mce_bt_read = 16408,
-    EMbmMuiuQgn_prop_mce_bt_read_mask = 16409
-    };
-#endif  //NO101APPDEPFIXES
-#include <bautils.h>
-#include <featmgr.h>
-
-#include <stringresourcereader.h>
-#include <StringLoader.h>
-
-// Launching file manager related header files 
-#include <AiwServiceHandler.h> // The AIW service handler
-#include <apgcli.h>
-#include <apacmdln.h>
-#include <AknLaunchAppService.h>  //  Used to launch file manager in embedded mode.
-#include <e32property.h> //for checking backup status
-
-//Constants
-const TInt KFileManagerUID3 = 0x101F84EB; /// File Manager application UID3
-const TInt KUiNumberOfZoomStates = 2;          // second for the mask
-const TInt KSortNumMax = 2;
-const TInt KNfcUnreadIconIndex = 10;
-const TInt KNfcReadIconIndex = 8;
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-
-// -----------------------------------------------------------------------------
-// TObexUtilsUiLayer::LaunchEditorApplicationOperationL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CMsvOperation* TObexUtilsUiLayer::LaunchEditorApplicationOperationL( 
-	CMsvSession& aMsvSession,
-	CMsvEntry* aMessage,
-    TRequestStatus& aObserverRequestStatus )
-    {
-    FLOG(_L("[OBEXUTILS]\t TObexUtilsUiLayer::LaunchEditorApplicationOperationL()"));
-    CObexUtilsLaunchWaiter* waiterOperation = CObexUtilsLaunchWaiter::NewL(
-        aMsvSession,
-        aMessage, 
-        aObserverRequestStatus );
-    
-    return waiterOperation;
-    }
-
-// -----------------------------------------------------------------------------
-// TObexUtilsUiLayer::LaunchEditorApplication
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt TObexUtilsUiLayer::LaunchEditorApplicationL( CMsvEntry* /*aMessage*/,
-                                                           CMsvSession& /*aSession*/ )
-    {
-    // Obsolete
-    return KErrNotSupported;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CObexUtilsMessageHandler::LaunchFileManager
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void TObexUtilsUiLayer::LaunchFileManagerL( 
-     TDesC& aPath, 
-     TInt aSortMethod, 
-     TBool isEmbeddedMode )
-    {  
-    if ( isEmbeddedMode )
-        {
-        FLOG(_L("[OBEXUTILS]\t TObexUtilsMessageHandler::LaunchFileManager() Embedded mode"));
-        
-        CAiwGenericParamList* inParams = CAiwGenericParamList::NewLC();
-        inParams->AppendL(TAiwGenericParam( EGenericParamDir, TAiwVariant( aPath ) ) );
-        inParams->AppendL(TAiwGenericParam( EGenericParamDir, TAiwVariant( aSortMethod ) ) );
-       
-        CAknLaunchAppService* launchService = CAknLaunchAppService::NewL(TUid::Uid( KFileManagerUID3 ), // Use File Manager app UID directly
-                                                                         NULL, 
-                                                                         inParams ); 
-        CleanupStack::PopAndDestroy( inParams );
-        FLOG(_L("[OBEXUTILS]\t TObexUtilsMessageHandler::LaunchFileManager() Embedded mode completed "));
-        }
-    else
-        {
-        FLOG(_L("[OBEXUTILS]\t TObexUtilsMessageHandler::LaunchFileManager() "));
-        TApaAppInfo appInfo;
-        RApaLsSession apaLsSession;
-        User::LeaveIfError( apaLsSession.Connect() );
-        CleanupClosePushL( apaLsSession );
-        User::LeaveIfError( apaLsSession.GetAppInfo( appInfo, TUid::Uid( KFileManagerUID3 ) ) ); // Use File Manager app UID directly
-        CApaCommandLine* apaCmdLine = CApaCommandLine::NewLC();
-        apaCmdLine->SetExecutableNameL( appInfo.iFullName );
-        apaCmdLine->SetCommandL( EApaCommandOpen );
-        apaCmdLine->SetDocumentNameL( aPath );
-        TBuf8<KSortNumMax> sortMode; 
-        sortMode.AppendNum( aSortMethod );
-        apaCmdLine->SetTailEndL( sortMode );
-        TThreadId dummy;
-        User::LeaveIfError( apaLsSession.StartApp( *apaCmdLine, dummy ) );
-        CleanupStack::PopAndDestroy( apaCmdLine );
-        CleanupStack::PopAndDestroy( &apaLsSession ); 
-        FLOG(_L("[OBEXUTILS]\t TObexUtilsMessageHandler::LaunchFileManager() standalone mode completed "));
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CObexUtilsMessageHandler::LaunchEditorApplication
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void TObexUtilsUiLayer::LaunchEditorApplicationL (TMsvId& aMsvIdParent)
-    {
-    FLOG(_L("[OBEXUTILS]\t TObexUtilsMessageHandler::LaunchEditorApplication() "));
-    CDummySessionObserver* sessionObs = new( ELeave )CDummySessionObserver;
-    CleanupStack::PushL( sessionObs );  //1st push
-    CMsvSession* msvSession = CMsvSession::OpenSyncL( *sessionObs ); 
-    CleanupStack::PushL( msvSession );  //2nd push
-    
-    // 1st, 2nd push?
-    CMsvEntry* parentEntry = msvSession->GetEntryL(aMsvIdParent);
-    CleanupStack::PushL(parentEntry);  // 3th push    
-    
-    TRequestStatus status = KRequestPending;
-    CObexUtilsLaunchWaiter* waiterOperation = CObexUtilsLaunchWaiter::NewL(
-                                                                    *msvSession,
-                                                                    parentEntry,
-                                                                    status);
-    CleanupStack::PopAndDestroy(3); // parentEntry, sessionObs, msvSession
-    
-    FLOG(_L("[OBEXUTILS]\t TObexUtilsMessageHandler::LaunchEditorApplication() completed "));         
-    }
-
-
-// -----------------------------------------------------------------------------
-// TObexUtilsUiLayer::ShowErrorNoteL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void TObexUtilsUiLayer::ShowErrorNoteL( const TInt& aResourceID )
-    {
-    FLOG(_L("[OBEXUTILS]\t TObexUtilsUiLayer::ShowErrorNoteL()"));
-
-    TBuf<KObexUtilsMaxChar> textdata;
-    ReadResourceL( textdata, aResourceID );
-    
-    CAknErrorNote* note = new( ELeave )CAknErrorNote( ETrue );
-    CleanupStack::PushL( note );
-    PrepareDialogExecuteL( aResourceID, note );
-    CleanupStack::Pop( note );
-    note->ExecuteLD( textdata );
-
-    FLOG(_L("[OBEXUTILS]\t TObexUtilsUiLayer::ShowErrorNoteL() completed"));
-
-    }
-
-// -----------------------------------------------------------------------------
-// TObexUtilsUiLayer::ShowInformationNoteL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void TObexUtilsUiLayer::ShowInformationNoteL( const TInt& aResourceID )
-    {
-    FLOG(_L("[OBEXUTILS]\t TObexUtilsUiLayer::ShowInformationNoteL()"));
-
-    TBuf<KObexUtilsMaxChar> textdata;
-    ReadResourceL( textdata, aResourceID );
-
-    CAknInformationNote* note = new( ELeave )CAknInformationNote;
-    CleanupStack::PushL( note );
-    PrepareDialogExecuteL( aResourceID, note );
-    CleanupStack::Pop( note );
-    note->ExecuteLD( textdata );
-
-    FLOG(_L("[OBEXUTILS]\t TObexUtilsUiLayer::ShowInformationNoteL() completed"));
-    }
-
-// -----------------------------------------------------------------------------
-// TObexUtilsUiLayer::ShowGlobalInformationNoteL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void TObexUtilsUiLayer::ShowGlobalConfirmationQueryL( const TInt& aResourceID )
-    {
-    FLOG(_L("[OBEXUTILS]\t TObexUtilsUiLayer::ShowGlobalInformationNoteL()"));
-
-    TBuf<KObexUtilsMaxChar> textdata;
-    TRequestStatus status;    
-    
-    ReadResourceL( textdata, aResourceID );    	    
-    CAknGlobalConfirmationQuery* note = CAknGlobalConfirmationQuery::NewLC();        
-    
-    status=KRequestPending;
-    note->ShowConfirmationQueryL(status,
-                                textdata, 
-                                R_AVKON_SOFTKEYS_OK_EMPTY, 
-                                R_QGN_NOTE_ERROR_ANIM,KNullDesC,
-                                0,
-                                0,
-                                CAknQueryDialog::EErrorTone
-                                );    
-    User::WaitForRequest(status);
-    
-    CleanupStack::PopAndDestroy(note );    
-
-    FLOG(_L("[OBEXUTILS]\t TObexUtilsUiLayer::ShowGlobalInformationNoteL() completed"));
-    }
-
-// -----------------------------------------------------------------------------
-// TObexUtilsUiLayer::ShowGlobalConfirmationQueryPlainL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TBool TObexUtilsUiLayer::ShowGlobalConfirmationQueryPlainL( const TInt& aResourceID)
-    {
-    CAknGlobalConfirmationQuery* pQ = CAknGlobalConfirmationQuery::NewL();
-    CleanupStack::PushL(pQ);
-    HBufC* stringholder = NULL;
-    stringholder = StringLoader::LoadLC( aResourceID);
-    TRequestStatus status = KRequestPending;
-    pQ->ShowConfirmationQueryL(status,*stringholder,R_AVKON_SOFTKEYS_YES_NO);
-    User::WaitForRequest(status);
-    CleanupStack::PopAndDestroy(2);//PQ and Stringholder
-    return (status.Int() == EAknSoftkeyYes);        
-    }
-
-
-// -----------------------------------------------------------------------------
-// TObexUtilsUiLayer::ShowGlobalFileOpenConfirmationQueryL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TBool TObexUtilsUiLayer::ShowGlobalFileOpenConfirmationQueryL( const TInt& aResourceID, const TDesC& aFilePath)
-    {
-    // Read string from resource file
-    TFileName fileName;
-    fileName += KObexUtilsFileDrive;
-    fileName += KDC_RESOURCE_FILES_DIR;
-    fileName += KObexUtilsResourceFileName;
-    
-    CStringResourceReader* stringResourceReader = CStringResourceReader::NewL(fileName);
-    CleanupStack::PushL(stringResourceReader);
-    const TDesC& resString = stringResourceReader->ReadResourceString(aResourceID);
-    RBuf manipString;
-    manipString.Assign(resString.AllocL());
-    CleanupStack::PopAndDestroy(stringResourceReader);
-    manipString.CleanupClosePushL();
-    
-    // Remove bracket section
-    _LIT(KPrefix, "[");
-    _LIT(KSuffix, "]");
-    TInt prefixPos = manipString.Find(KPrefix); 
-    if (prefixPos != KErrNotFound)
-        {
-        TInt keyLength = 0;
-        TInt suffixPos = manipString.Find(KSuffix); 
-        keyLength = (manipString.Mid(prefixPos)).Length()-(manipString.Mid(suffixPos)).Length()+1;
-        manipString.Delete(prefixPos, keyLength);  
-        }
-    
-    // Replace "%U" string parameter with file path
-    _LIT(KString, "%U");
-    TInt replacePos = manipString.Find(KString); 
-    if( replacePos == KErrNotFound )
-        {
-        User::Leave(KErrNotFound);
-        }
-    const TInt minRequiredSize = manipString.Length() - KString().Length() + aFilePath.Length();
-    // ensure that the buffer is big enough (otherwise re-alloc)
-    if(manipString.MaxLength() < minRequiredSize)
-        {
-        manipString.ReAllocL(minRequiredSize);
-        }
-    manipString.Replace(replacePos, KString().Length(), aFilePath);
-    
-    // Initiate query dialog
-    TRequestStatus status = KRequestPending;
-    
-    CAknGlobalConfirmationQuery* pQ = CAknGlobalConfirmationQuery::NewL();
-    CleanupStack::PushL(pQ);
-    pQ->ShowConfirmationQueryL(status, manipString, R_AVKON_SOFTKEYS_YES_NO);
-    User::WaitForRequest(status);
-    CleanupStack::PopAndDestroy(2, &manipString); // pQ, manipString
-    return (status.Int() == EAknSoftkeyYes);
-    }
-
-
-// -----------------------------------------------------------------------------
-// TObexUtilsUiLayer::ReadResourceL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void TObexUtilsUiLayer::ReadResourceL( TDes& aBuf, const TInt& aResourceID )
-    {
-    FLOG(_L("[OBEXUTILS]\t TObexUtilsUiLayer::ReadResourceL()"));
-
-    RFs fileSession;
-    CleanupClosePushL<RFs>( fileSession );
-    User::LeaveIfError( fileSession.Connect() );
-    
-    TFileName fileName;
-    fileName += KObexUtilsFileDrive;
-    fileName += KDC_RESOURCE_FILES_DIR;
-    fileName += KObexUtilsResourceFileName;
-    
-    BaflUtils::NearestLanguageFile( fileSession, fileName );
-    
-    RResourceFile resourcefile;
-    CleanupClosePushL<RResourceFile>( resourcefile );
-    resourcefile.OpenL( fileSession, fileName );
-    resourcefile.ConfirmSignatureL( 0 );
-    HBufC8* readBuffer = resourcefile.AllocReadLC( aResourceID );
-    
-    const TPtrC16 ptrReadBuffer( (TText16*) readBuffer->Ptr(),( readBuffer->Length() + 1 ) >> 1 ); 
-    HBufC16* textBuffer=HBufC16::NewLC( ptrReadBuffer.Length() );
-    *textBuffer = ptrReadBuffer;
-    aBuf.Copy( *textBuffer );
-
-    CleanupStack::PopAndDestroy( 4 ); // textBuffer, fileSession, resourcefile, readBuffer
-    
-    FLOG(_L("[OBEXUTILS]\t TObexUtilsUiLayer::ReadResourceL() completed"));
-    }
-
-// -----------------------------------------------------------------------------
-// TObexUtilsUiLayer::OperationNotSupported
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt TObexUtilsUiLayer::OperationNotSupported()
-    {
-    return R_EIK_TBUF_NOT_AVAILABLE;
-    }
-
-// -----------------------------------------------------------------------------
-// TObexUtilsUiLayer::ContextIcon
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt TObexUtilsUiLayer::ContextIcon( const TMsvEntry& aContext, TContextMedia aMedia )
-    {
-    FLOG(_L("[OBEXUTILS]\t TObexUtilsUiLayer::ContextIcon()"));
-
-    TInt icon = 0;
-    if( aMedia == EBluetooth )
-        {
-        if( aContext.Unread() )
-            {
-            icon = EMbmMuiuQgn_prop_mce_bt_unread - EMbmMuiuQgn_prop_mce_ir_unread;
-            }
-        else
-            {
-            icon = EMbmMuiuQgn_prop_mce_bt_read - EMbmMuiuQgn_prop_mce_ir_unread;
-            }
-        }
-    else if( aMedia == EInfrared )
-        {
-        if( aContext.Unread() )
-            {
-            icon = 0;
-            }
-        else
-            {
-            icon = EMbmMuiuQgn_prop_mce_ir_read - EMbmMuiuQgn_prop_mce_ir_unread;
-            }
-        }
-    else if( aMedia == ENfc )
-        {
-        if( aContext.Unread() )
-            {
-            icon = KNfcUnreadIconIndex;
-            }
-        else
-            {
-            icon = KNfcReadIconIndex;
-            }
-        }
-
-    FLOG(_L("[OBEXUTILS]\t TObexUtilsUiLayer::ContextIcon() completed"));
-
-    return icon;
-    }
-
-// -----------------------------------------------------------------------------
-// TObexUtilsUiLayer::UpdateBitmaps
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void TObexUtilsUiLayer::UpdateBitmaps( TUid aMedia, 
-    TInt& aNumberOfZoomStates, TFileName& aBitmapFile, TInt& aStartBitmap, 
-    TInt& aEndBitmap )
-    {
-    FLOG(_L("[OBEXUTILS]\t TObexUtilsUiLayer::UpdateBitmaps()"));
-
-    aBitmapFile = KCommonUiBitmapFile;
-    aNumberOfZoomStates = KUiNumberOfZoomStates;
-    if( aMedia == KUidMsgTypeBt )
-        {
-        aStartBitmap = EMbmMuiuQgn_prop_mce_ir_unread;
-        aEndBitmap = EMbmMuiuQgn_prop_mce_bt_read_mask;
-        }
-    else
-        {
-        aStartBitmap = EMbmMuiuQgn_prop_mce_ir_unread;
-        aEndBitmap = EMbmMuiuQgn_prop_mce_bt_unread_mask;
-        }
-
-    FLOG(_L("[OBEXUTILS]\t TObexUtilsUiLayer::UpdateBitmaps() completed"));
-    }
-
-// -----------------------------------------------------------------------------
-// TObexUtilsUiLayer::DeleteCBitMapArray
-// -----------------------------------------------------------------------------
-//
-inline void DeleteCBitMapArray(TAny* aPtr)
-    {
-    if (aPtr) 
-        {
-        TObexUtilsUiLayer::CBitmapArray* array =
-            reinterpret_cast<TObexUtilsUiLayer::CBitmapArray*>(aPtr);    
-        array->ResetAndDestroy();
-        delete array;
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// TObexUtilsUiLayer::CreateAndAppendBitmapL
-// -----------------------------------------------------------------------------
-//
-void CreateAndAppendBitmapL(const TAknsItemID&          aID,
-                            const TInt                  aFileBitmapId,
-                            CArrayPtr<TObexUtilsUiLayer::CBitmapArray>* aIconArrays     )
-    {
-    TFileName muiubmpFilename;
-    muiubmpFilename += KObexUtilsFileDrive;
-    muiubmpFilename += KDC_APP_BITMAP_DIR;
-    muiubmpFilename += KCommonUiBitmapFile;
-
-    TObexUtilsUiLayer::CBitmapArray* array=NULL;
-    array=new(ELeave) CArrayPtrFlat<CFbsBitmap>(KUiNumberOfZoomStates);
-    CleanupStack::PushL(TCleanupItem(DeleteCBitMapArray, array));
-
-    CFbsBitmap* bitmap=0, *mask=0;
-    
-    //Can not use CreateIconLC since the order in which bitmap and mask are pushed into Cleanup Stack is undefined.
-    AknsUtils::CreateIconL(
-        AknsUtils::SkinInstance(),
-        aID,
-        bitmap,
-        mask,
-        muiubmpFilename,
-        aFileBitmapId,
-        aFileBitmapId+1);
-    CleanupStack::PushL(mask);
-    CleanupStack::PushL(bitmap);
-
-    // warning: bmp is deleted by the array CleanupItem. Immediately Pop or risk double deletion upon a Leave.
-    array->AppendL(bitmap);
-    CleanupStack::Pop(bitmap);
-
-    // warning: bmp is deleted by the array CleanupItem. Immediately Pop or risk double deletion upon a Leave.
-    array->AppendL(mask);
-    CleanupStack::Pop(mask);
-
-    aIconArrays->AppendL(array);
-    CleanupStack::Pop(array);
-    }
-
-// -----------------------------------------------------------------------------
-// TObexUtilsUiLayer::CreateIconsL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void TObexUtilsUiLayer::CreateIconsL(
-    TUid aMedia,
-    CArrayPtr<TObexUtilsUiLayer::CBitmapArray>* aIconArrays )
-    {
-    if( aMedia == KUidMsgTypeBt ) //Bluetooth 
-        {
-        CreateAndAppendBitmapL(
-            KAknsIIDQgnPropMceIrUnread,
-            EMbmMuiuQgn_prop_mce_ir_unread,
-            aIconArrays);
-        CreateAndAppendBitmapL(
-            KAknsIIDQgnPropMceIrRead,
-            EMbmMuiuQgn_prop_mce_ir_read,
-            aIconArrays);
-        CreateAndAppendBitmapL(
-            KAknsIIDQgnPropMceBtUnread,
-            EMbmMuiuQgn_prop_mce_bt_unread,
-            aIconArrays);
-        CreateAndAppendBitmapL(
-            KAknsIIDQgnPropMceBtRead,
-            EMbmMuiuQgn_prop_mce_bt_read,
-            aIconArrays);
-        CreateAndAppendBitmapL(
-            KAknsIIDQgnPropMceNfcRead,
-            0,
-            aIconArrays);
-        CreateAndAppendBitmapL(
-            KAknsIIDQgnPropMceNfcUnread,
-            0,
-            aIconArrays);        
-        }
-    else //Infrared
-        {
-        CreateAndAppendBitmapL(
-            KAknsIIDQgnPropMceIrUnread,
-            EMbmMuiuQgn_prop_mce_ir_unread,
-            aIconArrays);
-        CreateAndAppendBitmapL(
-            KAknsIIDQgnPropMceIrRead,
-            EMbmMuiuQgn_prop_mce_ir_read,
-            aIconArrays);
-        CreateAndAppendBitmapL(
-            KAknsIIDQgnPropMceBtUnread,
-            EMbmMuiuQgn_prop_mce_bt_unread,
-            aIconArrays);
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// TObexUtilsUiLayer::IsBackupRunning
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TBool TObexUtilsUiLayer::IsBackupRunning()
-    {
-    const TUint32 KFileManagerBkupStatus = 0x00000001;
-    
-    TInt status = EFileManagerBkupStatusUnset;
-    TBool retValue = EFalse;
-    TInt err = RProperty::Get( TUid::Uid(KFileManagerUID3), KFileManagerBkupStatus,
-                              status );
-    if ( err == KErrNone )
-        {
-        if ( status == EFileManagerBkupStatusBackup || 
-             status == EFileManagerBkupStatusRestore )
-            {
-            TSecureId fileManagerSecureId( KFileManagerUID3 );
-            //only returning ETrue if backup process is still active
-            retValue = ProcessExists( fileManagerSecureId );
-            }
-        }
-   
-    return retValue;
-    }
-
-// -----------------------------------------------------------------------------
-// TObexUtilsUiLayer::PrepareDialogExecuteL
-// -----------------------------------------------------------------------------
-//
-void TObexUtilsUiLayer::PrepareDialogExecuteL( const TInt& aResourceID, CEikDialog* aDialog )
-    {
-    if (IsCoverDisplayL())
-        {
-        TInt dialogIndex =
-            ((aResourceID & KResourceNumberMask) - KFirstResourceOffset) + KEnumStart;
-        aDialog->PublishDialogL( dialogIndex, KObexUtilsCategory );
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// TObexUtilsUiLayer::IsCoverDisplayL()
-// -----------------------------------------------------------------------------
-//
-TBool TObexUtilsUiLayer::IsCoverDisplayL()
-    {
-    TBool coverDisplay = EFalse;
-	FeatureManager::InitializeLibL();
-	if ( FeatureManager::FeatureSupported( KFeatureIdCoverDisplay ) )
-		{
-		coverDisplay = ETrue;
-		}
-	FeatureManager::UnInitializeLib();
-    return coverDisplay;
-    }
-
-// -----------------------------------------------------------------------------
-// TObexUtilsUiLayer::ProcessExists
-// -----------------------------------------------------------------------------
-//
-TBool TObexUtilsUiLayer::ProcessExists( const TSecureId& aSecureId )
-    {
-    _LIT( KFindPattern, "*" );
-    TFindProcess finder(KFindPattern);
-    TFullName processName;
-    while( finder.Next( processName ) == KErrNone )
-        {
-        RProcess process;
-        if ( process.Open( processName ) == KErrNone )
-            {
-            TSecureId processId( process.SecureId() );
-            process.Close();
-            if( processId == aSecureId )
-                {
-                return ETrue;
-                }
-            }
-        }
-    return EFalse;
-    }
-//  End of File  
--- a/btobexprofiles/obexserviceman/utils/src/vMessageHandler.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/btobexprofiles/obexserviceman/utils/src/vMessageHandler.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -18,7 +18,6 @@
 
 // INCLUDE FILES
 #include "vMessageHandler.h"
-#include "obexutilsuilayer.h"
 #include "obexutilsdebug.h"
 #include "etelmm.h"
 #include <BTSapDomainPSKeys.h>
@@ -38,6 +37,9 @@
 #include <app/csmsgetdetdescinterface.h>
 #endif //NO101APPDEPFIXES_NEW
 
+// todo @ QT migration: take official definition from Messaging at app layer (btmsgtypeuid.h)
+const TUid KUidMsgTypeBt = {0x10009ED5};
+
 // ================= MEMBER FUNCTIONS =======================
 TBool CSapVMessageParser::HandleMessageL(CObexBufObject*  aReceivedObject, const TUid aMtmID,
                                         RFile& aFile, CMsvSession* aMsvSession, TTime aTime)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/btservices.pro	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,29 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+# 
+# Description:
+#
+#
+
+TEMPLATE = subdirs
+
+# Directories
+SUBDIRS += btservices_plat \
+           bluetoothengine/btui \
+           bluetoothengine/btnotif/btdevicedialogplugin \
+           bluetoothengine/btindicator \
+           btobexprofiles/obexsendservices/obexhighway \
+		   btobexprofiles/obexreceiveservices/btmsgviewer \
+
+CONFIG += ordered
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/btservices_plat/bt_remote_device_setting_api/bt_remote_device_setting_api.metaxml	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<api id="a0cc3394936d8941cbfd0036b3d3b851" dataversion="2.0">
+  <name>bt_remote_device_setting_api</name>
+  <description>The framework API for implementing the settings UI for remote Bluetooth devices.</description>
+  <type>c++</type>
+  <collection>bluetoothengine</collection>
+  <libs/>
+  <release category="platform" sinceversion="5.2"/>
+  <attributes>
+    <htmldocprovided>no</htmldocprovided>
+    <adaptation>no</adaptation>
+  </attributes>
+</api>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/btservices_plat/bt_remote_device_setting_api/bt_remote_device_setting_api.pri	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,26 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+# 
+# Description:
+#
+#
+
+symbian*: {
+    # Build.inf rules
+            BLD_INF_RULES.prj_exports += \
+          "$${LITERAL_HASH}include<platform_paths.hrh>" \
+          "bt_remote_device_setting_api/inc/btdevsettingglobal.h MW_LAYER_PLATFORM_EXPORT_PATH(btdevsettingglobal.h)" \
+          "bt_remote_device_setting_api/inc/btdevsettinginterface.h MW_LAYER_PLATFORM_EXPORT_PATH(btdevsettinginterface.h)" \
+          "bt_remote_device_setting_api/inc/btabstractdevsetting.h MW_LAYER_PLATFORM_EXPORT_PATH(btabstractdevsetting.h)" \
+          "bt_remote_device_setting_api/inc/btdevsettingpluginloader.h MW_LAYER_PLATFORM_EXPORT_PATH(btdevsettingpluginloader.h)"
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/btservices_plat/bt_remote_device_setting_api/inc/btabstractdevsetting.h	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,138 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  The plugin interface of Bluetooth device setting ui 
+*
+*/
+
+#ifndef BTABSTRACTDEVSETTING_H
+#define BTABSTRACTDEVSETTING_H
+
+#include <HbDataForm>
+#include <btdevsettingglobal.h>
+
+/*!
+    \class BtAbstractDevSetting
+    \brief The class BtAbstractDevSetting is the base class 
+    for offering a UI to manage certain settings of 
+    a remote Bluetooth device, e.g., accessory and keyboard settings. 
+ */
+class BTDEVSETTINGINTERFACE_EXPORT BtAbstractDevSetting : public QObject
+{
+    Q_OBJECT
+    
+public:
+    
+    /*!
+     Constructs a device setting plugin entry.
+     
+     \param address the BD_ADDR of the remote device which this setting 
+     plugin is provided for. Its format is XXXXXXXXXXXX, where X is a 
+     hexadecimal digit. Case is insensitive.
+     \parent the parent of this object.
+     */
+    explicit BtAbstractDevSetting(const QString &address, QObject *parent = 0 );
+    
+    /*!
+     Destructor of BtAbstractDeviceSetting.
+     */
+    virtual ~BtAbstractDevSetting();
+    
+    /*!
+     Gets the BD_ADDR of the remote device which this setting 
+     plugin is provided for.
+     
+     \return the device address of the remote device in hex string
+     */
+    const QString &getRemote() const;
+    
+    /*!
+     Tells if this setting plugin can provide a setting UI
+     for the target device. If the answer is true, this plugin may be
+     requested to create a setting widget by function 
+     \code createSettingWidget() \endcode.
+     
+     \return true if a setting is currently available. false, otherwise.
+     
+     The default implementation returns false.
+     */
+    virtual bool isSettingAvailable();
+    
+    /*!
+     Gets a \code HbDataForm \endcode instance which consists of the
+     setting UI from this specific plugin. The loader of this plugin will
+     add this dataform into its setting view if its setting is available at
+     the time.
+     
+     The ownership of this widget is transferred to the plugin loader.
+     
+     The default implementation returns 0. 
+
+     \return an \code HbDataForm \endcode instance.
+     */
+    virtual HbDataForm *getSettingWidget();
+    
+    /*!
+     Informs that device setting is going to foreground. This 
+     implies that the \code HbWidget \endcode from function 
+     \code createSettingWidget \endcode will be shown if the setting
+     from this plugin is available.
+     
+     The default implementation does nothing.
+     */
+    virtual void aboutToForeground();
+    
+    /*!
+     Informs that device setting is going to background.
+     
+     The default implementation does nothing.
+     */
+    virtual void aboutToBackground();
+
+    /*!
+     Informs that device setting is going to close.
+     
+     The default implementation does nothing.
+     */
+    virtual void aboutToClose();
+    
+signals:
+    
+    /*!
+    The signal the plugin should emit for informing that the
+    availability of this setting is changed.
+    
+    If the setting becomes available, the owner of this plugin may
+    request the plugin to create a setting widget.
+    
+    If the setting becomes unavailable, the owner of this plugin may close and 
+    destroy the setting widget.
+    
+    \param setting the pointer of the setting whose status has changed.
+    
+    \param available true if the setting is available; false otherwise.
+    
+    \sa isSettingAvailable().
+     */
+    void settingAvailabilityChanged(BtAbstractDevSetting *setting, bool available);
+    
+private:
+    
+    /*!
+     The remote device address in format XXXXXXXXXXXX where X is a 
+     hexadecimal digit.
+     */
+    QString mRemote;
+};
+
+#endif /* BTABSTRACTDEVSETTING_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/btservices_plat/bt_remote_device_setting_api/inc/btdevsettingglobal.h	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,31 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+
+#ifndef BTDEVSETTINGGLOBAL_H
+#define BTDEVSETTINGGLOBAL_H
+
+#include <QtGlobal>
+
+#ifdef BUILD_BTDEVSETTINGFRAMEWORK
+#define BTDEVSETTINGINTERFACE_EXPORT Q_DECL_EXPORT
+#else
+#define BTDEVSETTINGINTERFACE_EXPORT Q_DECL_IMPORT
+#endif
+
+#define BTDEVSETTING_PLUGIN_PATH QLatin1String("/resource/qt/plugins/btdevsetting")
+
+#endif /* BTDEVSETTINGGLOBAL_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/btservices_plat/bt_remote_device_setting_api/inc/btdevsettinginterface.h	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,58 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  The plugin interface of Bluetooth device setting ui 
+*
+*/
+
+#ifndef BTDEVSETTINGINTERFACE_H
+#define BTDEVSETTINGINTERFACE_H
+
+#include <QtPlugin>
+#include <btdevsettingglobal.h>
+#include <btabstractdevsetting.h>
+
+/*!
+    \class BtDeviceSettingInterface
+    \brief The class BtDeviceSettingInterface is an interface 
+    for creating a BT device setting plugin instance.
+ */
+class BTDEVSETTINGINTERFACE_EXPORT BtDevSettingInterface
+{
+public:
+    
+    /*!
+     Destructor of BtDeviceSettingPlugin.
+     */
+    virtual ~BtDevSettingInterface() {}
+
+    /*!
+     Creates a \code BtDeviceSettingPlugin \endcode instance from a 
+     specific plugin. 
+    
+     \param address the BD_ADDR of the remote device which this setting 
+     plugin is provided for. Its format is XXXXXXXXXXXX, where X is a 
+     hexadecimal digit. Case is insensitive.
+     
+     \parent the parent of this object.
+            
+     \return an \code BtDeviceSettingPlugin \endcode instance the ownership of which is 
+               transferred to the plugin loader.
+     */
+    virtual BtAbstractDevSetting *createDevSetting(
+            const QString &address, QObject *parent = 0) = 0;
+};
+
+Q_DECLARE_INTERFACE(BtDevSettingInterface, "com.nokia.bt.devsettinginterface/1.0");
+
+#endif /* BTDEVSETTINGINTERFACE_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/btservices_plat/bt_remote_device_setting_api/inc/btdevsettingpluginloader.h	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,42 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+
+#ifndef BTDEVSETTINGPLUGINLOADER_H
+#define BTDEVSETTINGPLUGINLOADER_H
+
+#include <QtGlobal>
+#include <btdevsettingglobal.h>
+#include <QList>
+
+class QString;
+class QStringList;
+class BtDevSettingInterface;
+
+class BTDEVSETTINGINTERFACE_EXPORT BtDevSettingPluginLoader
+{
+public:
+
+    /*!
+       Load all setting interfaces.
+       
+       \return the list of plugin interface.
+     */
+    static QList<BtDevSettingInterface*> loadDevSettingInterfaces();
+
+};
+
+#endif /* BTDEVSETTINGPLUGINLOADER_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/btservices_plat/btservices_plat.pro	Mon Jul 12 18:51:05 2010 +0300
@@ -0,0 +1,22 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+# 
+# Description:
+#
+#
+
+TEMPLATE = subdirs
+
+symbian*: { 
+    include(bt_remote_device_setting_api/bt_remote_device_setting_api.pri)
+}
--- a/btservices_plat/obex_service_utils_api/tsrc/src/ObexServAPItestBlocks.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/btservices_plat/obex_service_utils_api/tsrc/src/ObexServAPItestBlocks.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -23,7 +23,6 @@
 #include <Stiftestinterface.h>
 #include <UiklafInternalCRKeys.h>
 #include <UikonInternalPSKeys.h>
-#include <Obexutils.rsg>
 #include <obex.h>
 #include "testlogger.h"
 #include "ObexServAPItest.h"
@@ -262,8 +261,10 @@
 // -----------------------------------------------------------------------------
 //
 TInt CObexServAPItest::CreateOutBoxEntryL( CStifItemParser& /*aItem*/ )
-    {    
-    TRAPD(error, iMessageServerIndex = TObexUtilsMessageHandler::CreateOutboxEntryL( KUidMsgTypeBt, R_BT_SEND_OUTBOX_SENDING ));  
+    {
+    //todo resource is unavailable at the moment.
+    // need to change the string constant according to the coming new localisation file
+    TRAPD(error, iMessageServerIndex = TObexUtilsMessageHandler::CreateOutboxEntryL( KUidMsgTypeBt, 1 ));  
     if( error != KErrNone)
         {
         TestCompleted( error, TLFUNCLOG, _L("CreateOutBoxEntryL leaves")); 
--- a/cbsatplugin/atmisccmdplugin/src/cfuncommandhandler.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/cbsatplugin/atmisccmdplugin/src/cfuncommandhandler.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -154,7 +154,7 @@
     TInt systemState;
     
     TInt ret = iProperty.Get(systemState);
-    if (ret != KErrNone)
+    if (ret == KErrNone)
         {
         if (systemState != iExpectedState)
             {
@@ -166,6 +166,7 @@
             ret = RestartDevice();
             }
         }
+    
     if (!IsActive())
         {
         if (ret != KErrNone)
@@ -206,7 +207,7 @@
         TRACE_FUNC_EXIT
         return err;
         }
-    
+   
     switch (aFunc)
         {
         case (0):
@@ -216,15 +217,17 @@
             // issue the profile change request and start monitoring the property
             if (systemState != ESwStateNormalRfOff)
                 {
-                err = SetActiveProfile(KOfflineProfileId);
-                
-                
+                err = SetActiveProfile(KOfflineProfileId);                
                 if (err == KErrNone)
                     {
                     iExpectedState = ESwStateNormalRfOff;
                     iProperty.Subscribe(iStatus);
                     SetActive();
-                    }           
+                    }       
+                }
+            else if (iReset)
+                {
+                err = RestartDevice();
                 }
             break;
             }
@@ -243,6 +246,10 @@
                     SetActive();
                     }
                 }
+            else if (iReset)
+                {
+                err = RestartDevice();
+                }
             break;
             }
         default:
--- a/cbsatplugin/atmisccmdplugin/src/clckcommandhandler.cpp	Fri May 28 17:03:06 2010 +0300
+++ b/cbsatplugin/atmisccmdplugin/src/clckcommandhandler.cpp	Mon Jul 12 18:51:05 2010 +0300
@@ -719,11 +719,6 @@
                 }
             break;
             }
-        default:
-            {
-            TRACE_FUNC_EXIT
-            return KErrArgument;
-            }
         }
     
     // if phone password is required it needs to be hashed before verification
--- a/layers.sysdef.xml	Fri May 28 17:03:06 2010 +0300
+++ b/layers.sysdef.xml	Mon Jul 12 18:51:05 2010 +0300
@@ -9,11 +9,8 @@
       <module name="btservices">
         <unit unitID="lcdo.btservices" mrp="" bldFile="&layer_real_source_path;/group" name="btservices" />
       </module>
-      <module name="btcpplugin">
-        <unit unitID="lcdo.btservices.btcpplugin" mrp="" bldFile="&layer_real_source_path;/bluetoothengine/btui" name="bluetooth_setting_plugin" proFile="btui.pro" qmakeArgs="" />
-      </module>
-      <module name="btdialog">
-        <unit unitID="lcdo.btservices.btdialog" mrp="" bldFile="&layer_real_source_path;/bluetoothengine/btnotif/btdevicedialogplugin" name="bluetooth_dialogs" proFile="btdevicedialogplugin.pro" qmakeArgs="" />
+      <module name="btservices_qt">
+        <unit unitID="lcdo.btservices.qt" mrp="" bldFile="&layer_real_source_path;" name="btservices_qt" proFile="btservices.pro" qmakeArgs="" />
       </module>
     </layer>
     <layer name="api_test_layer">
--- a/sysdef_1_4_0.dtd	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
- <!ELEMENT SystemDefinition (systemModel?, build?)>
- <!ATTLIST SystemDefinition
-  name CDATA #REQUIRED
-  schema CDATA #REQUIRED>
- <!ELEMENT systemModel (layer+)>
- <!ELEMENT layer (logicalset* | module*)*>
- <!ATTLIST layer
-  name CDATA #REQUIRED
-  levels CDATA #IMPLIED
-  span CDATA #IMPLIED>
- <!ELEMENT logicalset (logicalsubset* | module* | unit* | package* | prebuilt*)*>
- <!ATTLIST logicalset name CDATA #REQUIRED>
- <!ELEMENT logicalsubset (module* | unit* | package* | prebuilt*)*>
- <!ATTLIST logicalsubset name CDATA #REQUIRED>
- <!ELEMENT module (component* | unit* | package* | prebuilt*)*>
- <!ATTLIST module
-  name CDATA #REQUIRED
-  level CDATA #IMPLIED>
- <!ELEMENT component (unit* | package* | prebuilt*)*>
- <!ATTLIST component name CDATA #REQUIRED>
- <!ELEMENT unit EMPTY>
- <!ATTLIST unit
-  unitID ID #REQUIRED
-  name CDATA #REQUIRED
-  mrp CDATA #REQUIRED
-  filter CDATA #IMPLIED
-  bldFile CDATA #REQUIRED
-  priority CDATA #IMPLIED
-  contract CDATA #IMPLIED>
- <!ELEMENT package EMPTY>
- <!ATTLIST package
-  name CDATA #REQUIRED
-  mrp CDATA #REQUIRED
-  filter CDATA #IMPLIED
-  contract CDATA #IMPLIED>
- <!ELEMENT prebuilt EMPTY>
- <!ATTLIST prebuilt
-  name CDATA #REQUIRED
-  version CDATA #REQUIRED
-  late (Y|N) #IMPLIED
-  filter CDATA #IMPLIED
-  contract CDATA #IMPLIED>
- <!ELEMENT build (option* | target+ | targetList+ | unitList+ | configuration+)*>
- <!ELEMENT unitList (unitRef+)>
- <!ATTLIST unitList
-  name ID #REQUIRED
-  description CDATA #REQUIRED>
- <!ELEMENT unitRef EMPTY>
- <!ATTLIST unitRef unit IDREF #REQUIRED>
- <!ELEMENT targetList EMPTY>
- <!ATTLIST targetList
-  name ID #REQUIRED
-  description CDATA #REQUIRED
-  target IDREFS #REQUIRED>
- <!ELEMENT target EMPTY>
- <!ATTLIST target
-  name ID #REQUIRED
-  abldTarget CDATA #REQUIRED
-  description CDATA #REQUIRED>
- <!ELEMENT option EMPTY>
- <!ATTLIST option
-  name ID #REQUIRED
-  abldOption CDATA #REQUIRED
-  description CDATA #REQUIRED
-  enable (Y | N | y | n) #REQUIRED>
- <!ELEMENT configuration (unitListRef+ | layerRef+ | task+)*>
- <!ATTLIST configuration
-  name ID #REQUIRED
-  description CDATA #REQUIRED
-  filter CDATA #REQUIRED>
- <!ELEMENT task ( unitListRef* , (buildLayer | specialInstructions))>
- <!ELEMENT unitListRef EMPTY>
- <!ATTLIST unitListRef unitList IDREF #REQUIRED>
- <!ELEMENT layerRef EMPTY>
- <!ATTLIST layerRef layerName CDATA #REQUIRED>
- <!ELEMENT buildLayer EMPTY>
- <!ATTLIST buildLayer
-  command CDATA #REQUIRED
-  targetList IDREFS #IMPLIED
-  unitParallel (Y | N | y | n) #REQUIRED
-  targetParallel (Y | N | y | n) #IMPLIED>
- <!ELEMENT specialInstructions EMPTY>
- <!ATTLIST specialInstructions
-  name CDATA #REQUIRED
-  cwd CDATA #REQUIRED
-  command CDATA #REQUIRED>  
--- a/tsrc/public/basic/btengapitest/group/rd-key.pem	Fri May 28 17:03:06 2010 +0300
+++ b/tsrc/public/basic/btengapitest/group/rd-key.pem	Mon Jul 12 18:51:05 2010 +0300
@@ -1,15 +1,15 @@
------BEGIN RSA PRIVATE KEY-----
-MIICXAIBAAKBgQDLRF+r1FGGkCwTrb420kbnAps7gi1yYUcXYUdWeFTuBeQe5eW4
-6Y+LWaA8HMlDdoHRB0FgASisYcFagwno9+oFf4AJka4H1gWEs5XTGwAA1s0d8XGh
-7W7Dt9F5FZij8F7/9Pi6+FhhxZFIf1DD+yry9D7+Sp+BgdNALe4XOpf25QIBAwKB
-gQCHgupyjYuvCsgNHn7PNtnvVxInrB5MQNoPli+O+uNJWUK/Q+57Rl+yO8AoEzDX
-pFaLWiuVVhsdloDnAgabT/FXzYncs6uOHyEUV+dSXb78vtLPJqAX+Fg2i3hOXreB
-yskcZ13/OsKVOu5wgrJkx2baZufkqMwOSytf5y9nwjEIKwJBAP+inobagVNrN62j
-KQva3cC+UN/6XnKdTc0CA6bHyLOaJoH1xiMwG/VS2PGjHI0tiSMNtLn/QPpHJ003
-iabGhdUCQQDLjp/9UjFT6K6CF66Chqf30pZXhx+GTSQZmv/gvZiMly7X9fX9BGX3
-2MbJohBC4yI21XKTbisWywkF73Hwh+TRAkEAqmxprzxWN5zPyRdwspHpKymLP/w+
-9xOJM1atGdqFzRFvAU6EF3Vn+OHl9my9s3OwwgkjJqorUYTE3iUGby8D4wJBAIe0
-aqjhdjfwdFa6dFcEb/qMZDpaFQQzbWZnVUB+ZbMPdI/5TqitmU/l2dvBYCyXbCSO
-TGJJcg8yBgP09qBamIsCQFL7j1tM0XPVQJQ89WpKCld7O9ORxRGVj1eG0tWijrH8
-mGbYh8SGCVoWV3vrKSS8GBrFVgQnqUaHuEdtM7tpCAQ=
------END RSA PRIVATE KEY-----
+-----BEGIN RSA PRIVATE KEY-----
+MIICXAIBAAKBgQDLRF+r1FGGkCwTrb420kbnAps7gi1yYUcXYUdWeFTuBeQe5eW4
+6Y+LWaA8HMlDdoHRB0FgASisYcFagwno9+oFf4AJka4H1gWEs5XTGwAA1s0d8XGh
+7W7Dt9F5FZij8F7/9Pi6+FhhxZFIf1DD+yry9D7+Sp+BgdNALe4XOpf25QIBAwKB
+gQCHgupyjYuvCsgNHn7PNtnvVxInrB5MQNoPli+O+uNJWUK/Q+57Rl+yO8AoEzDX
+pFaLWiuVVhsdloDnAgabT/FXzYncs6uOHyEUV+dSXb78vtLPJqAX+Fg2i3hOXreB
+yskcZ13/OsKVOu5wgrJkx2baZufkqMwOSytf5y9nwjEIKwJBAP+inobagVNrN62j
+KQva3cC+UN/6XnKdTc0CA6bHyLOaJoH1xiMwG/VS2PGjHI0tiSMNtLn/QPpHJ003
+iabGhdUCQQDLjp/9UjFT6K6CF66Chqf30pZXhx+GTSQZmv/gvZiMly7X9fX9BGX3
+2MbJohBC4yI21XKTbisWywkF73Hwh+TRAkEAqmxprzxWN5zPyRdwspHpKymLP/w+
+9xOJM1atGdqFzRFvAU6EF3Vn+OHl9my9s3OwwgkjJqorUYTE3iUGby8D4wJBAIe0
+aqjhdjfwdFa6dFcEb/qMZDpaFQQzbWZnVUB+ZbMPdI/5TqitmU/l2dvBYCyXbCSO
+TGJJcg8yBgP09qBamIsCQFL7j1tM0XPVQJQ89WpKCld7O9ORxRGVj1eG0tWijrH8
+mGbYh8SGCVoWV3vrKSS8GBrFVgQnqUaHuEdtM7tpCAQ=
+-----END RSA PRIVATE KEY-----
--- a/tsrc/public/basic/btengapitest/group/rd.cer	Fri May 28 17:03:06 2010 +0300
+++ b/tsrc/public/basic/btengapitest/group/rd.cer	Mon Jul 12 18:51:05 2010 +0300
@@ -1,17 +1,17 @@
------BEGIN CERTIFICATE-----
-MIICzDCCAjWgAwIBAgIBADANBgkqhkiG9w0BAQUFADArMRAwDgYDVQQKEwdSRCBD
-ZXJ0MRcwFQYDVQQDEw5SRCBDZXJ0aWZpY2F0ZTAeFw0wNDExMTUxMjQyMDZaFw0z
-NzA5MjMxMjQyMDZaMCsxEDAOBgNVBAoTB1JEIENlcnQxFzAVBgNVBAMTDlJEIENl
-cnRpZmljYXRlMIGdMA0GCSqGSIb3DQEBAQUAA4GLADCBhwKBgQDLRF+r1FGGkCwT
-rb420kbnAps7gi1yYUcXYUdWeFTuBeQe5eW46Y+LWaA8HMlDdoHRB0FgASisYcFa
-gwno9+oFf4AJka4H1gWEs5XTGwAA1s0d8XGh7W7Dt9F5FZij8F7/9Pi6+FhhxZFI
-f1DD+yry9D7+Sp+BgdNALe4XOpf25QIBA6OCAQAwgf0wDAYDVR0TBAUwAwEB/zAL
-BgNVHQ8EBAMCAoQwHQYDVR0OBBYEFFi/kuGzxhVpjGxe9ZwlxC3fH9jFMFMGA1Ud
-IwRMMEqAFFi/kuGzxhVpjGxe9ZwlxC3fH9jFoS+kLTArMRAwDgYDVQQKEwdSRCBD
-ZXJ0MRcwFQYDVQQDEw5SRCBDZXJ0aWZpY2F0ZYIBADBsBgNVHSAEZTBjMGEGBFUd
-IAAwWTATBggrBgEFBQcCARYHaHR0cDovLzBCBggrBgEFBQcCAjA2GjRGb3IgUiZE
-IHVzYWdlIG9ubHkuIFRoaXMgY2VydGlmaWNhdGUgaXMgbm90IHRydXN0ZWQuMA0G
-CSqGSIb3DQEBBQUAA4GBAHGB4RQMAgBdeT2hxfOr6f2nA/dZm+M5yX5daUtZnET9
-Ed0A9sazLawfN2G1KFQT9kxEParAyoAkpbMAsRrnRz/9cM3OHgFm/NiKRnf50DpT
-7oCx0I/65mVD2kt+xXE62/Ii5KPnTufIkPi2uLvURCia1tTS8JmJ8dtxDGyQt8BR
------END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIICzDCCAjWgAwIBAgIBADANBgkqhkiG9w0BAQUFADArMRAwDgYDVQQKEwdSRCBD
+ZXJ0MRcwFQYDVQQDEw5SRCBDZXJ0aWZpY2F0ZTAeFw0wNDExMTUxMjQyMDZaFw0z
+NzA5MjMxMjQyMDZaMCsxEDAOBgNVBAoTB1JEIENlcnQxFzAVBgNVBAMTDlJEIENl
+cnRpZmljYXRlMIGdMA0GCSqGSIb3DQEBAQUAA4GLADCBhwKBgQDLRF+r1FGGkCwT
+rb420kbnAps7gi1yYUcXYUdWeFTuBeQe5eW46Y+LWaA8HMlDdoHRB0FgASisYcFa
+gwno9+oFf4AJka4H1gWEs5XTGwAA1s0d8XGh7W7Dt9F5FZij8F7/9Pi6+FhhxZFI
+f1DD+yry9D7+Sp+BgdNALe4XOpf25QIBA6OCAQAwgf0wDAYDVR0TBAUwAwEB/zAL
+BgNVHQ8EBAMCAoQwHQYDVR0OBBYEFFi/kuGzxhVpjGxe9ZwlxC3fH9jFMFMGA1Ud
+IwRMMEqAFFi/kuGzxhVpjGxe9ZwlxC3fH9jFoS+kLTArMRAwDgYDVQQKEwdSRCBD
+ZXJ0MRcwFQYDVQQDEw5SRCBDZXJ0aWZpY2F0ZYIBADBsBgNVHSAEZTBjMGEGBFUd
+IAAwWTATBggrBgEFBQcCARYHaHR0cDovLzBCBggrBgEFBQcCAjA2GjRGb3IgUiZE
+IHVzYWdlIG9ubHkuIFRoaXMgY2VydGlmaWNhdGUgaXMgbm90IHRydXN0ZWQuMA0G
+CSqGSIb3DQEBBQUAA4GBAHGB4RQMAgBdeT2hxfOr6f2nA/dZm+M5yX5daUtZnET9
+Ed0A9sazLawfN2G1KFQT9kxEParAyoAkpbMAsRrnRz/9cM3OHgFm/NiKRnf50DpT
+7oCx0I/65mVD2kt+xXE62/Ii5KPnTufIkPi2uLvURCia1tTS8JmJ8dtxDGyQt8BR
+-----END CERTIFICATE-----
--- a/tsrc/public/basic/obexservapitest/Bmarm/ObexServAPItestU.DEF	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
-	LibEntryL__FR13CTestModuleIf @ 1 NONAME R3UNUSED ; LibEntryL(CTestModuleIf &)
-
--- a/tsrc/public/basic/obexservapitest/Bwins/ObexServAPItestU.DEF	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
-	?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * __cdecl LibEntryL(class CTestModuleIf &)
-
--- a/tsrc/public/basic/obexservapitest/EABI/ObexServAPItestU.def	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
-	_Z9LibEntryLR13CTestModuleIf @ 1 NONAME
-
--- a/tsrc/public/basic/obexservapitest/group/bld.inf	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/*
-* Copyright (c) 2002 - 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  ?Description
-*
-*/
-
-
-
-PRJ_PLATFORMS
-// specify the platforms your component needs to be built for here
-// defaults to WINS MARM so you can ignore this if you just build these
-DEFAULT
-
-PRJ_TESTEXPORTS
-// NOTE: If using ARS requirements all export operations should be done under this.
-// 'abld test export'
-
-PRJ_EXPORTS
-// Specify the source file followed by its destination here
-// copy will be used to copy the source file to its destination
-// If there's no destination then the source file will be copied
-// to the same name in /epoc32/include
-// Example: 
-/*
-/agnmodel/inc/AGMCOMON.H
-*/
-
-PRJ_TESTMMPFILES
-// NOTE: If using ARS requirements .mmp file operation should be done under this.
-// 'abld test build'
-
-PRJ_MMPFILES
-// Specify the .mmp files required for building the important component
-// releasables.
-//
-// Specify "tidy" if the component you need to build doesn't need to be
-// released. Specify "ignore" if the MMP file exists but should be
-// ignored.
-// Example:
-/*
-/agnmodel/group/agnmodel.mmp
-#if defined(MARM)
-/agnmodel/group/agsvexe.mmp
-#endif
-*/
-obexservapitest.mmp
-
-//  End of File
\ No newline at end of file
--- a/tsrc/public/basic/obexservapitest/group/obexservapitest.mmp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*TYPE TESTCLASS*/
-/*
-* Copyright (c) 2002 - 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  ?Description
-*
-*/
-
-
-#if defined(__S60_)
-        // To get the OS_LAYER_SYSTEMINCLUDE-definition
-        #include <platform_paths.hrh>
-#endif
-
-TARGET          obexservapitest.dll
-TARGETTYPE      dll
-UID             0x1000008D 0x101FB3E3
-
-CAPABILITY      ALL -TCB
-/* Remove comments and replace 0x00000000 with correct vendor id */
-// VENDORID     0x00000000
-/* Remove comments and replace 0x00000000 with correct secure id */
-// SECUREID     0x00000000
-
-//TARGETPATH      ?target_path
-DEFFILE         ObexServAPItest.def
-
-SOURCEPATH      ../src
-SOURCE          ObexServAPItest.cpp
-SOURCE          ObexServAPItestBlocks.cpp
-SOURCE          testlogger.cpp
-
-
-USERINCLUDE     ../inc 
-
-MW_LAYER_SYSTEMINCLUDE
-
-
-LIBRARY         euser.lib
-LIBRARY         stiftestinterface.lib
-LIBRARY         sysutil.lib
-LIBRARY         obexutils.lib
-LIBRARY         irobex.lib
-LIBRARY         efsrv.lib
-
-LANG            SC
-
-// End of File
--- a/tsrc/public/basic/obexservapitest/inc/ObexServAPItest.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,211 +0,0 @@
-/*
-* Copyright (c) 2002 - 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  ?Description
-*
-*/
-
-
-
-#ifndef OBEXSERVAPITEST_H
-#define OBEXSERVAPITEST_H
-
-//  INCLUDES
-#include <StifLogger.h>
-#include <TestScripterInternal.h>
-#include <StifTestModule.h>
-#include <ObexUtilsMessageHandler.h>
-#include "testlogger.h"
-
-
-// FORWARD DECLARATIONS
-class CObexServAPItest;
-
-
-// CLASS DECLARATION
-
-/**
-*  CObexServAPItest test class for STIF Test Framework TestScripter.
-*/
-NONSHARABLE_CLASS(CObexServAPItest) : public CScriptBase
-    {
-    public:  // Constructors and destructor
-
-        /**
-        * Two-phased constructor.
-        */
-        static CObexServAPItest* NewL( CTestModuleIf& aTestModuleIf );
-
-        /**
-        * Destructor.
-        */
-        virtual ~CObexServAPItest();
-
-    public: // New functions
-
-       
-
-    public: // Functions from base classes
-
-        /**
-        * From CScriptBase Runs a script line.
-        * @since ?Series60_version
-        * @param aItem Script line containing method name and parameters
-        * @return Symbian OS error code
-        */
-        virtual TInt RunMethodL( CStifItemParser& aItem );
-
-    
-
-    private:
-
-        /**
-        * C++ default constructor.
-        */
-        CObexServAPItest( CTestModuleIf& aTestModuleIf );
-
-        /**
-        * By default Symbian 2nd phase constructor is private.
-        */
-        void ConstructL();
-
-        // Prohibit copy constructor if not deriving from CBase.
-        // ?classname( const ?classname& );
-        // Prohibit assigment operator if not deriving from CBase.
-        // ?classname& operator=( const ?classname& );
-
-        /**
-        * Frees all resources allocated from test methods.
-        * @since ?Series60_version
-        */
-        void Delete();
-        
-        void TestCompleted( TInt aErr, const TUint8* aFunc, const TDesC& aArg );
-
-        /**
-        * Test methods are listed below. 
-        */
-
-        /**
-        * Test code for getting file system status.
-        * @since ?Series60_version
-        * @param aItem Script line containing parameters.
-        * @return Symbian OS error code.
-        */
-        virtual TInt GetFileSystemStatusL( CStifItemParser& aItem );
-        
-        /**
-        * Test code for getting mmc file system status.
-        * @since ?Series60_version
-        * @param aItem Script line containing parameters.
-        * @return Symbian OS error code.
-        */
-        virtual TInt GetMmcFileSystemStatusL( CStifItemParser& aItem );
-        
-        /**
-        * Test code for getting message center drive. 
-        * @since ?Series60_version
-        * @param aItem Script line containing parameters.
-        * @return Symbian OS error code.
-        */
-        virtual TInt GetMessageCentreDriveL( CStifItemParser& aItem );
-        
-        /**
-        * Test code for creating Default MTM services.
-        * @since ?Series60_version
-        * @param aItem Script line containing parameters.
-        * @return Symbian OS error code.
-        */
-        virtual TInt CreateDefaultMtmServiceL( CStifItemParser& aItem );
-        
-        /**
-        * Test code for Getting CenRep key.    .    
-        * @since ?Series60_version
-        * @param aItem Script line containing parameters.
-        * @return Symbian OS error code.
-        */
-        virtual TInt GetCenRepKeyIntValueL( CStifItemParser& aItem );
-        
-        /**
-        * Test code for Getting PubSub key.    
-        * @since ?Series60_version
-        * @param aItem Script line containing parameters.
-        * @return Symbian OS error code.
-        */
-        virtual TInt GetPubSubKeyIntValueL( CStifItemParser& aItem );
-        
-        /**
-        * Test code for Creating outbox entry.
-        * @since ?Series60_version
-        * @param aItem Script line containing parameters.
-        * @return Symbian OS error code.
-        */
-        virtual TInt CreateOutBoxEntryL( CStifItemParser& aItem );
-        
-        /**
-        * Test code for removing outbox entry.
-        * @since ?Series60_version
-        * @param aItem Script line containing parameters.
-        * @return Symbian OS error code.
-        */
-        virtual TInt RemoveOutBoxEntryL( CStifItemParser& aItem );
-        
-        /**
-        * Test code for save received file to inbox. 
-        * @since ?Series60_version
-        * @param aItem Script line containing parameters.
-        * @return Symbian OS error code.
-        */
-        virtual TInt SaveObjToInboxL( CStifItemParser& aItem );
-        
-        /**
-        * Test code for creating entry to inbox.
-        * @since ?Series60_version
-        * @param aItem Script line containing parameters.
-        * @return Symbian OS error code.
-        */
-        virtual TInt CreateEntryToInboxL( CStifItemParser& aItem );
-        
-        /**
-        * Test code for creating entry to inbox.
-        * @since ?Series60_version
-        * @param aItem Script line containing parameters.
-        * @return Symbian OS error code.
-        */
-        virtual TInt SaveRFileObjectToInboxL( CStifItemParser& aItem );
-        
-        /**
-        * Test code for removing entry to inbox.
-        * @since ?Series60_version
-        * @param aItem Script line containing parameters.
-        * @return Symbian OS error code.
-        */
-        virtual TInt RemoveObjectL( CStifItemParser& aItem );
-        
-     
-
-    private:    // Data
-        
-        
-        
-         TMsvId           iMessageServerIndex;
-         CObexBufObject*  iObexObject; 
-         RFile            iFile;
-         CBufFlat*        iBuf; 
-         CObexTestLogger* iTestLogger;
-
-    };
-
-#endif      // OBEXSERVAPITEST_H
-
-// End of File
--- a/tsrc/public/basic/obexservapitest/inc/testlogger.h	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-#ifndef BTTESTLOGGER_H
-#define BTTESTLOGGER_H
-
-// INCLUDES
-#include <e32base.h>
-
-// FORWARD DECLARATIONS
-class CStifLogger;
-class CTestModuleIf;
-
-#define TLFUNCLOG (TUint8*) __FUNCTION__
-
-// CLASS DECLARATION
-
-NONSHARABLE_CLASS( CObexTestLogger ) : public CBase
-{
-	public:
-	
-		static CObexTestLogger* NewL(const CTestModuleIf* aTestModuleIf);
-		virtual ~CObexTestLogger();
-
-	public: // Data used by functions
-
-		enum TLogLevel {ETLError, ETLResult, ETLInfo, ETLDebug};
-
-	public: // New functions
-	
-		TBool GetEnabled() const;
-		CStifLogger* GetLogger() const;
-		const CTestModuleIf* GetTestModuleIf() const;
-		TInt Log(TLogLevel aLevel, TRefByValue<const TDesC8> aLogText, ...) const;
-		TInt Log(const TDesC& aCategory, TRefByValue<const TDesC8> aLogText, ...) const;
-		TInt Log(TLogLevel aLevel, TRefByValue<const TDesC16> aLogText, ...) const;
-		TInt Log(const TDesC& aCategory, TRefByValue<const TDesC16> aLogText, ...) const;
-		TInt LogResult( const TDesC8& aFunc, const TDesC& aArg, TInt aRes ) const;
-		TInt LogNewLine() const;
-		void SetEnabled(TBool aEnabled);
-		void SetLogger(CStifLogger* aLog);
-		void SetTestModuleIf(const CTestModuleIf* aTestModuleIf);
-
-	public: // Functions from base classes
-
-	private:  // New functions
-
-		TInt WriteLog(TLogLevel aLevel, TDes16& aLog) const;
-		TInt WriteLog(const TDesC16& aCategory, const TDesC16& aLog) const;
-		static TPtrC GetPrefix(TLogLevel aLevel);
-		TInt CheckLogFile();
-		void LogHeadSectionL();
-		void LogTimeStampL(TDes& aBuf, TBool aTime = ETrue) const;
-
-	private:  // Constructors
-	
-		CObexTestLogger(const CTestModuleIf* aTestModuleIf);
-		void ConstructL();
-
-	public:     // Data
-		static const TInt KPrefixLength;
-
-	private:    // Data
-
-		TBool iEnabled;
-		CStifLogger* iLog;
-		const CTestModuleIf* iTestModuleIf;
-	};
-
-#endif // BTTESTLOGGER_H
-
--- a/tsrc/public/basic/obexservapitest/rom/obexservapitest.iby	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-/*
-* Copyright (c) 2007-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Image description file for project bteng
-*
-*/
-
-#ifndef BTENGAPITEST_IBY
-#define BTENGAPITEST_IBY
-
-#include <data_caging_paths_for_iby.hrh>
-
-file=ABI_DIR\BUILD_DIR\ObexServAPItest.dll			SHARED_LIB_DIR\ObexServAPItest.dll
-
-#endif // BTENGAPITEST_IBY
--- a/tsrc/public/basic/obexservapitest/src/ObexServAPItest.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,145 +0,0 @@
-/*
-* Copyright (c) 2002 - 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  ?Description
-*
-*/
-
-
-
-// INCLUDE FILES
-#include <Stiftestinterface.h>
-#include "ObexServAPItest.h"
-
-// EXTERNAL DATA STRUCTURES
-//extern  ?external_data;
-
-// EXTERNAL FUNCTION PROTOTYPES  
-//extern ?external_function( ?arg_type,?arg_type );
-
-// CONSTANTS
-//const ?type ?constant_var = ?constant;
-
-// MACROS
-//#define ?macro ?macro_def
-
-// LOCAL CONSTANTS AND MACROS
-//const ?type ?constant_var = ?constant;
-//#define ?macro_name ?macro_def
-
-// MODULE DATA STRUCTURES
-//enum ?declaration
-//typedef ?declaration
-
-// LOCAL FUNCTION PROTOTYPES
-//?type ?function_name( ?arg_type, ?arg_type );
-
-// FORWARD DECLARATIONS
-//class ?FORWARD_CLASSNAME;
-
-// ============================= LOCAL FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// ?function_name ?description.
-// ?description
-// Returns: ?value_1: ?description
-//          ?value_n: ?description_line1
-//                    ?description_line2
-// -----------------------------------------------------------------------------
-//
-/*
-?type ?function_name(
-    ?arg_type arg,  // ?description
-    ?arg_type arg)  // ?description
-    {
-
-    ?code  // ?comment
-
-    // ?comment
-    ?code
-    }
-*/
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CObexServAPItest::CObexServAPItest
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-CObexServAPItest::CObexServAPItest( 
-    CTestModuleIf& aTestModuleIf ):
-        CScriptBase( aTestModuleIf )
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// CObexServAPItest::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CObexServAPItest::ConstructL()
-    {
-    
-    iTestLogger = CObexTestLogger::NewL( &TestModuleIf() );         
-
-    }
-
-// -----------------------------------------------------------------------------
-// CObexServAPItest::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CObexServAPItest* CObexServAPItest::NewL( 
-    CTestModuleIf& aTestModuleIf )
-    {
-    CObexServAPItest* self = new (ELeave) CObexServAPItest( aTestModuleIf );
-
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop();
-
-    return self;
-
-    }
-
-// Destructor
-CObexServAPItest::~CObexServAPItest()
-    { 
-
-    // Delete resources allocated from test methods
-    Delete();
-
-    // Delete logger
-    delete iTestLogger; 
-    iTestLogger = NULL;
-    }
-
-// ========================== OTHER EXPORTED FUNCTIONS =========================
-
-// -----------------------------------------------------------------------------
-// LibEntryL is a polymorphic Dll entry point.
-// Returns: CScriptBase: New CScriptBase derived object
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CScriptBase* LibEntryL( 
-    CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework
-    {
-
-    return ( CScriptBase* ) CObexServAPItest::NewL( aTestModuleIf );
-
-    }
-
-
-//  End of File
--- a/tsrc/public/basic/obexservapitest/src/ObexServAPItestBlocks.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,414 +0,0 @@
-/*
-* Copyright (c) 2002 - 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  ?Description
-*
-*/
-
-
-
-// INCLUDE FILES
-#include <e32svr.h>
-#include <StifParser.h>
-#include <Stiftestinterface.h>
-#include <UiklafInternalCRKeys.h>
-#include <UikonInternalPSKeys.h>
-#include <obexutils.rsg>
-#include <obex.h>
-#include "testlogger.h"
-#include "ObexServAPItest.h"
-
-
-// Defined to coincide with the definition in btmsgtypeuid.h 
-const TUid KUidMsgTypeBt                 = {0x10009ED5};
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CObexServAPItest::Delete
-// Delete here all resources allocated and opened from test methods. 
-// Called from destructor. 
-// -----------------------------------------------------------------------------
-//
-void CObexServAPItest::Delete() 
-    {
-    delete iObexObject;
-    iObexObject = NULL;
-    delete iBuf;
-    iBuf = NULL;
-    }
-
-// -----------------------------------------------------------------------------
-// CObexServAPItest::RunMethodL
-// Run specified method. Contains also table of test mothods and their names.
-// -----------------------------------------------------------------------------
-//
-TInt CObexServAPItest::RunMethodL( 
-    CStifItemParser& aItem ) 
-    {
-
-    static TStifFunctionInfo const KFunctions[] =
-        {  
-        // Copy this line for every implemented function.
-        // First string is the function name used in TestScripter script file.
-        // Second is the actual implementation member function. 
-        ENTRY( "GetFileSystemStatus", CObexServAPItest::GetFileSystemStatusL ),
-        ENTRY( "GetMmcFileSystemStatus", CObexServAPItest::GetMmcFileSystemStatusL ),
-        ENTRY( "GetMessageCentreDriveL", CObexServAPItest::GetMessageCentreDriveL ),
-        ENTRY( "CreateDefaultMtmServiceL", CObexServAPItest::CreateDefaultMtmServiceL ),
-        ENTRY( "GetCenRepKeyIntValueL", CObexServAPItest::GetCenRepKeyIntValueL ),
-        ENTRY( "GetPubSubKeyIntValue", CObexServAPItest::GetPubSubKeyIntValueL ),
-        ENTRY( "CreateOutBoxEntry", CObexServAPItest::CreateOutBoxEntryL ),
-        ENTRY( "RemoveOutBoxEntry", CObexServAPItest::RemoveOutBoxEntryL ),
-        ENTRY( "SaveObjToInbox", CObexServAPItest::SaveObjToInboxL ),
-        ENTRY( "CreateEntryToInbox", CObexServAPItest::CreateEntryToInboxL ),
-        ENTRY( "SaveRFileObjectToInbox", CObexServAPItest::SaveRFileObjectToInboxL ),
-        ENTRY( "RemoveObjectFromInbox", CObexServAPItest::RemoveObjectL ),
-        };
-
-    const TInt count = sizeof( KFunctions ) / 
-                        sizeof( TStifFunctionInfo );
-
-    return RunInternalL( KFunctions, count, aItem );
-
-    }
-    
- // -----------------------------------------------------------------------------
-// CBtApiTest::TestCompleted
-// -----------------------------------------------------------------------------
-//  
-void CObexServAPItest::TestCompleted( TInt aErr, const TUint8* aFunc, const TDesC& aArg )
-    {
-    iTestLogger->LogResult( (TPtrC8( aFunc )), aArg, aErr );
-    Signal( aErr );
-    }
-       
-
-// -----------------------------------------------------------------------------
-// CObexServAPItest::GetFileSystemStatusL
-// Test code for getting file system status.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt CObexServAPItest::GetFileSystemStatusL( CStifItemParser& /*aItem*/ )
-    {
-    // Print to log file
-    TInt retVal=TObexUtilsMessageHandler::GetFileSystemStatus();
-    if (retVal == 0 || retVal == KErrDiskFull)
-        {
-        TestCompleted( KErrNone, TLFUNCLOG, _L("GetFileSystemStatusL"));
-        }
-    else
-        {
-        TestCompleted( retVal, TLFUNCLOG, _L("Error getting files ystem status"));    
-        }    
-    return KErrNone;
-
-    }
-
-// -----------------------------------------------------------------------------
-// CObexServAPItest::GetMmcFileSystemStatusL
-// Test code for getting mmc file system status.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt CObexServAPItest::GetMmcFileSystemStatusL( CStifItemParser& /*aItem*/ )
-    {
-    TInt retVal=TObexUtilsMessageHandler::GetMmcFileSystemStatus();
-    if (retVal == 0 || retVal == KErrDiskFull)
-        {
-        TestCompleted( KErrNone, TLFUNCLOG, _L("GetFileSystemStatusL"));
-        }
-    else
-        {
-        TestCompleted( retVal, TLFUNCLOG, _L("Error getting files ystem status"));    
-        }    
-
-    return KErrNone;
-
-    }
-
-// -----------------------------------------------------------------------------
-// CObexServAPItest::GetMessageCentreDriveL
-// Test code for getting message center drive. 
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt CObexServAPItest::GetMessageCentreDriveL( CStifItemParser& /*aItem*/ )
-    {
-    
-    TInt retVal = TObexUtilsMessageHandler::GetMessageCentreDriveL();
-    if (retVal >= 0 )
-        {
-        TestCompleted( KErrNone, TLFUNCLOG, _L("GetMessageCentreDrive"));
-        }
-    else
-        {
-        TestCompleted( retVal, TLFUNCLOG, _L("GetMessageCentreDrive failed"));    
-        }    
-
-    return KErrNone;
-
-    }
-
-// -----------------------------------------------------------------------------
-// CObexServAPItest::CreateDefaultMtmServiceL
-// Test code for creating Default MTM services.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt CObexServAPItest::CreateDefaultMtmServiceL( CStifItemParser& /*aItem*/ )
-    {
-
-    TRAPD(error, TObexUtilsMessageHandler::CreateDefaultMtmServiceL(KUidMsgTypeBt) );
-    if (error == KErrNone)
-        {
-        TestCompleted( KErrNone, TLFUNCLOG, _L("CreateDefaultMtmServiceL"));        
-        }
-    else
-        {
-        TestCompleted( error, TLFUNCLOG, _L("CreateDefaultMtmServiceL"));                       
-        }
-    return KErrNone;
-
-    }
-
-// -----------------------------------------------------------------------------
-// CObexServAPItest::GetCenRepKeyIntValueL
-// Test code for Getting CenRep key.    
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt CObexServAPItest::GetCenRepKeyIntValueL( CStifItemParser&  /*aItem*/ )
-    {
-    TInt limit=0;    
-    TInt error=0;
-    TRAPD(leaveVal, error = TObexUtilsMessageHandler::GetCenRepKeyIntValueL(KCRUidUiklaf,
-                                                                KUikOODDiskCriticalThreshold,
-                                                                limit));
-    if( leaveVal != KErrNone ) 
-        {
-        TestCompleted( leaveVal, TLFUNCLOG, _L("GetCenRepKeyIntValueL leaves"));                       
-        }    
-    else if (error == KErrNone)
-        {
-        TestCompleted( leaveVal, TLFUNCLOG, _L("GetCenRepKeyIntValue return error"));                       
-        }   
-    else
-        {
-        TestCompleted( KErrNone, TLFUNCLOG, _L("GetCenRepKeyIntValueL"));                           
-        }    
-    
-    return KErrNone;
-
-    }
-
-// -----------------------------------------------------------------------------
-// CObexServAPItest::GetPubSubKeyIntValueL
-// Test code for Getting PubSub key.    
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt CObexServAPItest::GetPubSubKeyIntValueL( CStifItemParser& /*aItem*/ )
-    {
-    TInt status = KErrNone;
-    TInt retVal = KErrNone;
-    
-    TRAPD(leaveVal, retVal = TObexUtilsMessageHandler::GetPubSubKeyIntValue(KPSUidUikon, KUikFFSFreeLevel, status));
-    
-    if( leaveVal != KErrNone ) 
-        {
-        TestCompleted( leaveVal, TLFUNCLOG, _L("GetPubSubKeyIntValueL leaves"));                       
-        }    
-    else if (retVal == KErrNone)
-        {
-        TestCompleted( retVal, TLFUNCLOG, _L("GetPubSubKeyIntValueL return error"));                       
-        }   
-    else
-        {
-        TestCompleted( KErrNone, TLFUNCLOG, _L("GetPubSubKeyIntValue"));                           
-        }  
-
-    return KErrNone;
-
-    }
-
-// -----------------------------------------------------------------------------
-// CObexServAPItest::OutBoxEntryL
-// Test code for Creating outbox entry.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt CObexServAPItest::CreateOutBoxEntryL( CStifItemParser& /*aItem*/ )
-    {    
-    TRAPD(error, iMessageServerIndex = TObexUtilsMessageHandler::CreateOutboxEntryL( KUidMsgTypeBt, R_BT_SEND_OUTBOX_SENDING ));  
-    if( error != KErrNone)
-        {
-        TestCompleted( error, TLFUNCLOG, _L("CreateOutBoxEntryL leaves")); 
-        }
-    else     
-        {
-        TestCompleted( KErrNone, TLFUNCLOG, _L("CreateOutBoxEntryL"));     
-        }
-
-    return KErrNone;
-
-    }
-
-// -----------------------------------------------------------------------------
-// CObexServAPItest::OutBoxEntryL
-// Test code for removing outbox entry.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt CObexServAPItest::RemoveOutBoxEntryL( CStifItemParser& /*aItem*/ )
-    {   
-    
-    TRAPD(error, TObexUtilsMessageHandler::DeleteOutboxEntryL( iMessageServerIndex ));
-    if( error != KErrNone)
-        {
-        TestCompleted( error, TLFUNCLOG, _L("RemoveOutBoxEntryL leaves")); 
-        }
-    else     
-        {
-        TestCompleted( KErrNone, TLFUNCLOG, _L("RemoveOutBoxEntryL"));     
-        }
-    return KErrNone;
-
-    }
-    
-// -----------------------------------------------------------------------------
-// CObexServAPItest::SaveObjToInboxL
-// Test code for save received file to inbox. 
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt CObexServAPItest::SaveObjToInboxL( CStifItemParser& /*aItem*/ )
-    {   
-    
-    CObexBufObject* obexobject = CObexBufObject::NewL( NULL );
-    CleanupStack::PushL(obexobject);    
-    
-    TRAP_IGNORE(TObexUtilsMessageHandler::SaveObjToInboxL(obexobject ,
-                                              KNullDesC, 
-                                              KUidMsgTypeBt ));
-    TestCompleted( KErrNone, TLFUNCLOG, _L("SaveObjToInboxL leaves")); 
-    
-    CleanupStack::PopAndDestroy(obexobject);
-    return KErrNone;
-
-    }
-
-// -----------------------------------------------------------------------------
-// CObexServAPItest::CreateAndSaveObjectL
-// Test code for creating entry to inbox.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt CObexServAPItest::CreateEntryToInboxL( CStifItemParser& /*aItem*/ )
-    {
-    iFile = RFile();
-    
-    if ( iObexObject)
-        {
-        delete iObexObject;
-        iObexObject = NULL;
-        }
-        
-    iObexObject = CObexBufObject::NewL( NULL );
-    
-    TRAPD( error, TObexUtilsMessageHandler::CreateInboxAttachmentL( iObexObject,
-                                                      KUidMsgTypeBt,
-                                                      iMessageServerIndex,
-                                                      iFile));
-                                                      
-                                                      
-    iBuf = CBufFlat::NewL(1024);
-    iBuf->ResizeL(1024);
-    
-    TObexRFileBackedBuffer bufferdetails(*iBuf,iFile,CObexBufObject::EDoubleBuffering);    
-    
-    TRAP_IGNORE( iObexObject->SetDataBufL( bufferdetails) );
-    
-                                                      
-                                                      
-    iFile.Write(_L8("test"));    
-    iObexObject->SetNameL(_L("test.txt"));        
-    
-    if( error != KErrNone)
-        {
-        TestCompleted( error, TLFUNCLOG, _L("CreateEntryToInboxL leaves")); 
-        }    
-    else     
-        {
-        TestCompleted( error, TLFUNCLOG, _L("CreateEntryToInboxL"));     
-        }         
-    return KErrNone;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CObexServAPItest::CreateAndSaveObjectL
-// Test code for creating entry to inbox.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt CObexServAPItest::SaveRFileObjectToInboxL( CStifItemParser& /*aItem*/ )
-    {
-    TRAPD( error, TObexUtilsMessageHandler::SaveObjToInboxL(
-            iObexObject,
-            iFile,
-            iMessageServerIndex));
-    
-    delete iBuf;
-    iBuf = NULL;
-    if( error != KErrNone)
-        {
-        TestCompleted( error, TLFUNCLOG, _L("SaveObjToInboxL leaves")); 
-        }
-    else     
-        {
-        TestCompleted( error, TLFUNCLOG, _L("SaveObjToInboxL"));     
-        }                                          
-    
-    return KErrNone;
-    }
-    
-// -----------------------------------------------------------------------------
-// CObexServAPItest::RemoveObjectL
-// Test code for removing entry to inbox.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt CObexServAPItest::RemoveObjectL( CStifItemParser& /*aItem*/ )
-    {
-    TRAPD(error,TObexUtilsMessageHandler::RemoveInboxEntriesL(iObexObject, iMessageServerIndex));    
-    delete iBuf;
-    iBuf = NULL;
-    if( error != KErrNone)
-        {
-        TestCompleted( error, TLFUNCLOG, _L("SaveObjToInboxL leaves")); 
-        }
-    else     
-        {
-        TestCompleted( error, TLFUNCLOG, _L("SaveObjToInboxL"));     
-        }                                              
-    return KErrNone;
-    }
-
-
-// ========================== OTHER EXPORTED FUNCTIONS =========================
-// None
-
-//  End of File
--- a/tsrc/public/basic/obexservapitest/src/testlogger.cpp	Fri May 28 17:03:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,530 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-// INCLUDES
-
-#include "testlogger.h"
-
-#include <StifTestModule.h>
-#include <StifLogger.h>
-
-#include <e32std.h>
-#include <f32file.h>
-#include <sysutil.h>
-
-// RDebug
-#include <e32debug.h>
-
-const TInt CObexTestLogger::KPrefixLength = 8;
-// Timestamp string length
-const TInt KTimeStampStrLen = 21;
-// Extended Timestamp string length
-const TInt KExtTimeStampStrLen = 40;
-// Extended time stamp
-typedef TBuf<KExtTimeStampStrLen> TExtTimeStamp;
-// Logging path
-_LIT( KObexServAPITestSystemLogPath, "e:\\logs\\ObexServAPItest\\" );
-// Log file
-_LIT( KObexServAPITestSystemLogFile, "ObexServAPItest.html" );
-// Log file
-_LIT( KObexServAPITestSystemLogFullName, "\\logs\\ObexServAPItest\\ObexServAPItest%x.html" );
-// Time stamp format string
-_LIT( KFormatTimeStamp, "<br/>[%H:%T:%S.%*C4] " );
-// Date format string
-_LIT( KFormatDate, "%F%D %N %Y" );
-// HTML header section
-_LIT( KHtmlHeadSection, "<html>\n<head>\n<title>Obex Message Handler Test System results</title>\n<style type=\"text/css\">\n.res, .case { display: inline; }\n</style>\n</head>\n\n<body onLoad=\"FormatResults();\">\n\n" );
-// HTML code which will display the statistics
-_LIT( KHtmlStatSection, "<p>Logfile created on %S at %S<br />\nS60 version %S</p>\n\n<div id=\"stats\"></div>\n<br />\n\n" );
-// HTML identifier for test case start
-_LIT( KHtmlTestCaseStart, "<div class=\"case\">" );
-// Test case result logging
-_LIT( KTestCaseResult, "Test completed; function %S, parameter %S, result <div class=\"res\">%d</div></div>" );
-// JavaScript function for calculating test result
-#define KJSSECTION _L( "<script type=\"text/javascript\">\nfunction FormatResults() { \
-\n\tvar tl = document.getElementsByTagName( \"div\" );\n\tvar passed = 0, failed = 0, testcases = 0; \
-\n\tfor( var i = 0; i < tl.length; i++ ) {\n\t\tif( tl[i].className == \"case\" ) {\n\t\t\ttestcases++;\n\t\t\t} \
-\n\t\tif( tl[i].className == \"res\" ) {\n\t\t\tif( tl[i].innerHTML == 0 ) {\n\t\t\t\tpassed++;\n\t\t\t\t} \
-\n\t\t\telse {\n\t\t\t\tfailed++;\n\t\t\t\ttl[i].parentNode.style.color = \"red\";\n\t\t\t\t} } } \
-\n\tvar stat = document.getElementById( \"stats\" );\n\tvar passrate = Math.round( ( passed / testcases ) * 10000 ) / 100; \
-\n\tstat.innerHTML = \"Test cases run: \" + testcases + \"<br />Passed: \" + passed \
-+\"<br />Failed: \" + failed + \"<br /><b>Passrate: \" + passrate + \"%%</b>\";\n\t}\n</script>" )
-
-// Construction and destruction.
-
-// -----------------------------------------------------------------------------
-// CObexTestLogger::NewL
-// Static constructor to constructor builder objects.
-// -----------------------------------------------------------------------------
-//
-CObexTestLogger* CObexTestLogger::NewL(const CTestModuleIf* aTestModuleIf)
-	{
-	CObexTestLogger* self = new (ELeave) CObexTestLogger(aTestModuleIf);
-
-	CleanupStack::PushL( self );
-	self->ConstructL();
-	CleanupStack::Pop(self);
-
-	return self;
-	}
-
-// -----------------------------------------------------------------------------
-// CObexTestLogger::CObexTestLogger
-// Constructor.
-// -----------------------------------------------------------------------------
-//
-CObexTestLogger::CObexTestLogger(const CTestModuleIf* aTestModuleIf)
-	: CBase(),
-	  iEnabled(ETrue),
-	  iTestModuleIf(aTestModuleIf)
-	{
-	}
-
-// -----------------------------------------------------------------------------
-// CTestLogger::ConstructL
-// 2nd phase constructor.
-// -----------------------------------------------------------------------------
-//
-void CObexTestLogger::ConstructL()
-    {
-    TInt err = CheckLogFile();
-    iLog = CStifLogger::NewL( KObexServAPITestSystemLogPath, KObexServAPITestSystemLogFile,
-                              CStifLogger::ETxt, CStifLogger::EFile, EFalse, EFalse );
-    if( err == KErrNotFound )
-        {   // Add info & HTML markup to the beginning of the log file.
-        LogHeadSectionL();
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CObexTestLogger::~CObexTestLogger
-// Destructor.
-// -----------------------------------------------------------------------------
-//
-CObexTestLogger::~CObexTestLogger()
-	{
-	delete iLog;
-	}
-
-// Member functions.
-
-// -----------------------------------------------------------------------------
-// CObexTestLogger::GetLogger
-// Returns a pointer to current STIF logger.
-// -----------------------------------------------------------------------------
-//
-CStifLogger* CObexTestLogger::GetLogger() const
-	{
-	return iLog;
-	}
-
-// -----------------------------------------------------------------------------
-// CObexTestLogger::GetTestModuleIf
-// Returns a pointer to current STIF test module interface.
-// -----------------------------------------------------------------------------
-//
-const CTestModuleIf* CObexTestLogger::GetTestModuleIf() const
-	{
-	return iTestModuleIf;
-	}
-
-// -----------------------------------------------------------------------------
-// CObexTestLogger::Log
-// Logs 8 bit data to screen and file.
-// -----------------------------------------------------------------------------
-//
-TInt CObexTestLogger::Log(TLogLevel aLevel, TRefByValue<const TDesC8> aLogText, ...) const
-    {
-    if (!iEnabled)
-        {
-        return KErrNone;
-        }
-
-    const TDesC8& actualData = aLogText;
-
-    // Check that user does not try to output too much data.
-    if (actualData.Length() > KMaxLogData - KPrefixLength)
-        {
-        return KErrTooBig;
-        }
-
-    // Buffer to convert 8 bit data to to 16 bit.
-    TLogInfo8 converter;
-
-    // Create variable argument list.
-    VA_LIST args;
-    VA_START(args, aLogText);
-
-    // Format the argument list to the output buffer.
-    converter.FormatList( aLogText, args );
-
-    // Free the variable argument list
-    VA_END(args);
-
-    TLogInfo buffer;
-    buffer.Copy( converter );
-
-    // Append log prefix to the output buffer.
-    buffer.Insert( 0, GetPrefix( aLevel ) );
-
-    // Log a timestamp
-    TStifLoggerTimeStamp8 time;
-    TRAP_IGNORE( LogTimeStampL( time ) );
-    buffer.Insert( 0, time );
-
-    // Write log.
-    return WriteLog(aLevel, buffer);
-    }
-
-// -----------------------------------------------------------------------------
-// CObexTestLogger::Log
-// Logs 8 bit data to screen and file.
-// -----------------------------------------------------------------------------
-//
-TInt CObexTestLogger::Log(const TDesC& aCategory, TRefByValue<const TDesC8> aLogText, ...) const
-    {
-    if (!iEnabled)
-	    {
-        return KErrNone;
-        }
-
-    const TDesC8& actualData = aLogText;
-
-    // Check that user does not try to output too much data.
-    if (actualData.Length() > KMaxLogData - KPrefixLength)
-        {
-        return KErrTooBig;
-        }
-
-    // Buffer to convert 8 bit data to to 16 bit.
-    TLogInfo8 converter;
-
-    // Create variable argument list.
-    VA_LIST args;
-    VA_START(args, aLogText);
-
-    // Format the argument list to the output buffer.
-    converter.FormatList(aLogText, args);
-
-    // Free the variable argument list
-    VA_END(args);
-
-    TLogInfo buffer;
-    buffer.Copy( converter );
-
-    // Log a timestamp
-    TStifLoggerTimeStamp8 time;
-    TRAP_IGNORE( LogTimeStampL( time ) );
-    buffer.Insert( 0, time );
-
-    // Write log.
-    return WriteLog(aCategory, buffer);
-    }
-
-// -----------------------------------------------------------------------------
-// CObexTestLogger::Log
-// Logs 16 bit data to screen and file.
-// -----------------------------------------------------------------------------
-//
-TInt CObexTestLogger::Log(TLogLevel aLevel, TRefByValue<const TDesC16> aLogText, ...) const
-	{
-	if (!iEnabled)
-		{
-		return KErrNone;
-		}
-
-	const TDesC16& actualData = aLogText;
-	// Check that user does not try to output too much data.
-	if (actualData.Length() + KPrefixLength > KMaxLogData)
-		{
-		return KErrTooBig;
-		}
-
-	TLogInfo buffer;
-
-	// Log a timestamp
-	TRAP_IGNORE( LogTimeStampL( buffer ) );
-
-	// Create variable argument list.
-	VA_LIST args;
-	VA_START(args, aLogText);
-
-	// Format the argument list to the output buffer.
-	buffer.AppendFormatList(aLogText, args);
-
-	// Free the variable argument list
-	VA_END(args);
-
-	// Write log.
-	return WriteLog(aLevel, buffer);
-	}
-
-// -----------------------------------------------------------------------------
-// CObexTestLogger::Log
-// Logs 16 bit data to screen and file.
-// -----------------------------------------------------------------------------
-//
-TInt CObexTestLogger::Log(const TDesC& aCategory, TRefByValue<const TDesC16> aLogText, ...) const
-	{
-	if (!iEnabled)
-		{
-		return KErrNone;
-		}
-
-	const TDesC16& actualData = aLogText;
-	// Check that user does not try to output too much data.
-	if (actualData.Length() + KPrefixLength > KMaxLogData)
-		{
-		return KErrTooBig;
-		}
-
-	TLogInfo buffer;
-
-	// Log a timestamp
-	TRAP_IGNORE( LogTimeStampL( buffer ) );
-
-	// Create variable argument list.
-	VA_LIST args;
-	VA_START(args, aLogText);
-
-	// Format the argument list to the output buffer.
-	buffer.AppendFormatList(aLogText, args);
-
-	// Free the variable argument list
-	VA_END(args);
-
-	// Write log.
-	return WriteLog(aCategory, buffer);
-	}
-
-// -----------------------------------------------------------------------------
-// CObexTestLogger::LogNewLine
-// Logs an HTML  newline and timestamp.
-// -----------------------------------------------------------------------------
-//
-TInt CObexTestLogger::LogResult( const TDesC8& aFunc, const TDesC& aArg, TInt aRes ) const
-    {
-    TExtTimeStamp func;
-    func.Copy( aFunc ); // Copy 8-bit string to 16-bit buffer
-
-    Log( CObexTestLogger::ETLResult, KTestCaseResult, &func, &aArg, aRes );
-    return KErrNone;
-    }
-
-// -----------------------------------------------------------------------------
-// CObexTestLogger::LogNewLine
-// Logs an HTML  newline and timestamp.
-// -----------------------------------------------------------------------------
-//
-TInt CObexTestLogger::LogNewLine() const
-    {
-    if (!iEnabled)
-        {
-        return KErrNone;
-        }
-    TExtTimeStamp time;
-    TRAPD( err, LogTimeStampL( time ) );
-    if( !err )
-        {
-        time.Insert( 0, KHtmlTestCaseStart );
-        err = iLog->Log( time );
-        }
-    return err;
-    }
-
-// -----------------------------------------------------------------------------
-// CObexTestLogger::SetEnabled
-// Returns a pointer to current STIF logger.
-// -----------------------------------------------------------------------------
-//
-void CObexTestLogger::SetEnabled(TBool aEnabled)
-	{
-	iEnabled = aEnabled;
-	}
-
-// -----------------------------------------------------------------------------
-// CObexTestLogger::SetLogger
-// Sets a pointer to current STIF logger.
-// -----------------------------------------------------------------------------
-//
-void CObexTestLogger::SetLogger(CStifLogger* aLog)
-	{
-	iLog = aLog;
-	}
-
-// -----------------------------------------------------------------------------
-// CObexTestLogger::SetTestModuleIf
-// Sets a pointer to current STIF test module.
-// -----------------------------------------------------------------------------
-//
-void CObexTestLogger::SetTestModuleIf(const CTestModuleIf* aTestModuleIf)
-	{
-	iTestModuleIf = aTestModuleIf;
-	}
-
-// -----------------------------------------------------------------------------
-// CObexTestLogger::WriteLog
-// Writes log.
-// -----------------------------------------------------------------------------
-//
-TInt CObexTestLogger::WriteLog(TLogLevel aLevel, TDes16& aLog) const
-    {
-    // Write log to file if file logger is available.
-    if (iLog != 0)
-        {
-        iLog->Log(aLog);
-        }
-    // Remove the timestamp from the logging data.
-    TPtrC16 log( aLog.Mid( KTimeStampStrLen ) );
-
-    // Write log with RDebug.
-    RDebug::Print(log);
-
-    // Write log to screen if test module interface is available.
-	if (iTestModuleIf != 0)
-        {
-        CTestModuleIf* nonStaticLogger = const_cast<CTestModuleIf*>(iTestModuleIf);
-        nonStaticLogger->Printf(aLevel, _L(""), log);
-        }
-
-    return KErrNone;
-    }
-
-// -----------------------------------------------------------------------------
-// CObexTestLogger::WriteLog
-// Writes log.
-// -----------------------------------------------------------------------------
-//
-TInt  CObexTestLogger::WriteLog(const TDesC16& aCategory, const TDesC16& aLog) const
-    {
-    // Write log to file if file logger is available.
-    if (iLog != 0)
-        {
-        iLog->Log(aLog);
-        }
-    // Remove the timestamp from the logging data.
-    TPtrC16 log( aLog.Mid( KTimeStampStrLen ) );
-
-    // Write log with RDebug.
-    RDebug::Print(log);
-
-    // Write log to screen if test module interface is available.
-    if (iTestModuleIf != 0)
-        {
-        CTestModuleIf* nonStaticLogger = const_cast<CTestModuleIf*>(iTestModuleIf);
-        nonStaticLogger->Printf(0, aCategory, log);
-        }
-
-    return KErrNone;
-    }
-
-// -----------------------------------------------------------------------------
-// CObexTestLogger::GetPrefix
-// Returns the prefix for a given logging level.
-// -----------------------------------------------------------------------------
-//
-TPtrC CObexTestLogger::GetPrefix(TLogLevel aLevel)
-	{
-	// Select a prefix for a log level and return a pointer to it.
-	switch(aLevel)
-		{
-		case ETLError:
-			{
-			TPtrC logPrefix = _L("ERROR : ");
-			return logPrefix;
-			}
-		case ETLInfo:
-		case ETLResult: 
-			{
-			TPtrC logPrefix = _L("INFO  : ");
-			return logPrefix;
-			}
-		case ETLDebug:
-			{
-			TPtrC logPrefix = _L("DEBUG : ");
-			return logPrefix;
-			}
-		default:
-			{
-			// Return a null pointer.
-			return TPtrC();
-			}
-
-		}
-	}
-
-// -----------------------------------------------------------------------------
-// CObexTestLogger::CheckLogFile
-// Check if a log file is already existing, otherwise HTML formatting 
-// should be added.
-// -----------------------------------------------------------------------------
-//
-TInt CObexTestLogger::CheckLogFile()
-    {
-    RThread thread;
-    TInt id = thread.Id();
-    TBuf<KMaxFileName > file;
-    file.Format( KObexServAPITestSystemLogFullName, id );
-    RFs fs;
-    TInt err = fs.Connect();
-    TBool open = EFalse;
-    if( !err )
-        {
-        err = fs.IsFileOpen( file, open );
-        }
-    fs.Close();
-    return err;
-    }
-
-// -----------------------------------------------------------------------------
-// CObexTestLogger::LogTimeStamp
-// Log HTML head section and general information in a newly created logfile.
-// -----------------------------------------------------------------------------
-//
-void CObexTestLogger::LogHeadSectionL()
-    {
-    iLog->Log( KHtmlHeadSection );
-    iLog->Log( KJSSECTION );
-    TBuf<KSysUtilVersionTextLength> version( _L( "Version unknown!" ) );
-    (void) SysUtil::GetSWVersion( version );
-    TStifLoggerTimeStamp8 date;
-    LogTimeStampL( date, EFalse );
-    TStifLoggerTimeStamp8 time;
-    LogTimeStampL( time );
-    TPtrC timePtr( time.Mid( 6, 13 ) );
-    iLog->Log( KHtmlStatSection, &date, &timePtr, &version );
-    }
-
-// -----------------------------------------------------------------------------
-// CObexTestLogger::LogTimeStamp
-// Format a timestamp for logging.
-// If aTime is set to false, the (formatted) date is returned.
-// -----------------------------------------------------------------------------
-//
-void CObexTestLogger::LogTimeStampL(TDes& aBuf, TBool aTime) const
-    {
-    TTime time;
-    time.HomeTime();    // Get time and format it
-    if( aTime )
-        {
-        time.FormatL( aBuf, KFormatTimeStamp );
-        }
-    else
-        {
-        time.FormatL( aBuf, KFormatDate );
-        }
-    }